lemma
proved
term proof
spatialNormSq_coordRay_spatial_2
show as:
view Lean formalization →
formal statement (Lean)
210private lemma spatialNormSq_coordRay_spatial_2 (x : Fin 4 → ℝ) (s : ℝ) :
211 spatialNormSq (coordRay x 2 s) = x 1 ^ 2 + (x 2 + s) ^ 2 + x 3 ^ 2 := by
proof body
Term-mode proof.
212 unfold spatialNormSq coordRay basisVec
213 rw [if_neg (by decide : (1 : Fin 4) ≠ 2),
214 if_pos (rfl : (2 : Fin 4) = 2),
215 if_neg (by decide : (3 : Fin 4) ≠ 2)]
216 ring
217