AFTD Auto-Formalizing Theoretical Domains

one_strongly_euclidean_sphere_squared_distance_identity

theoremverified

If two vectors in a real inner-product space both have squared norm q²/4, the squared norm of x−t y equals (1−t)²q²/4+t times the squared norm of x−y.

Statement

theorem one_strongly_euclidean_sphere_squared_distance_identity (H : Type) [NormedAddCommGroup H] [InnerProductSpace ℝ H]
    (x y : H) (t q : ℝ) (hx : ‖x‖^2 = q^2/4) (hy : ‖y‖^2 = q^2/4) :
    ‖x - t • y‖^2 = (1-t)^2 * q^2/4 + t * ‖x-y‖^2
Source
OP-1304: squared-distance identity for the spherical extension.
Verified
12 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 2

The proof, explained

The proof expands both squared norms ‖x - y‖² and ‖x - t • y‖² into squared norms and inner products. Multiplying the expansion of ‖x - y‖² by t matches the cross-term -2t⟨x, y⟩ occurring in the expansion of ‖x - t • y‖². Substituting the hypotheses ‖x‖² = ‖y‖² = q²/4 cancels the inner products and reduces the identity to a straightforward quadratic relation in t, verified by nonlinear arithmetic.

  1. ‖x - y‖² = ‖x‖² - 2⟨x, y⟩ + ‖y‖²

    We expand the squared distance between x and y into the sum of their squared norms minus twice their real inner product using norm_sub_sq_real.

    line 4

    uses norm_sub_sq_real

      have hxy := norm_sub_sq_real x y
  2. ‖x - t • y‖² = ‖x‖² - 2 * (t * ⟨x, y⟩) + t² * ‖y‖²

    We expand ‖x - t • y‖² using norm_sub_sq_real, then simplify the scalar multiplication: ⟨x, t • y⟩ factors as t * ⟨x, y⟩ via real_inner_smul_right, and ‖t • y‖² simplifies to |t|² * ‖y‖² = t² * ‖y‖² via norm_smul, Real.norm_eq_abs, mul_pow, and sq_abs.

    lines 5–6

    uses norm_sub_sq_real, real_inner_smul_right, norm_smul, Real.norm_eq_abs, mul_pow, sq_abs

      have ht := norm_sub_sq_real x (t • y)
      simp only [real_inner_smul_right, norm_smul, Real.norm_eq_abs, mul_pow, sq_abs] at ht
  3. t * ‖x - y‖² = t * (‖x‖² - 2⟨x, y⟩ + ‖y‖²)

    We multiply both sides of the expansion of ‖x - y‖² by t using congrArg.

    line 7

    uses congrArg

      have hm := congrArg (fun z : ℝ => t*z) hxy
  4. ‖x - t • y‖² = (1 - t)² * (q² / 4) + t * ‖x - y‖² automation

    Substituting ‖x‖² = q²/4 and ‖y‖² = q²/4 into the expansions of ‖x - t • y‖² and t * ‖x - y‖², the cross-terms -2t⟨x, y⟩ match and cancel, leaving (1 - 2t + t²)(q²/4) = (1 - t)²(q²/4). Nonlinear arithmetic (nlinarith) closes this polynomial identity over ℝ.

    line 8

      nlinarith
norm_sub_sq_real
In a real inner product space, the squared norm of a difference expands as ‖x - y‖² = ‖x‖² - 2⟨x, y⟩ + ‖y‖².
real_inner_smul_right
In a real inner product space, scalar multiplication on the right argument pulls out of the inner product: ⟨x, r • y⟩ = r⟨x, y⟩.
norm_smul
The norm of a scalar multiple is the product of the norm of the scalar and the norm of the vector: ‖r • x‖ = ‖r‖ * ‖x‖.
Real.norm_eq_abs
The norm of a real number is its absolute value: ‖r‖ = |r|.
mul_pow
In a commutative monoid, powers distribute over multiplication: (a * b)ⁿ = aⁿ * bⁿ.
sq_abs
The square of an absolute value equals the square of the original value: |a|² = a².
congrArg
Applying a function to equal inputs yields equal outputs: if a₁ = a₂, then f(a₁) = f(a₂).

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

theorem one_strongly_euclidean_sphere_squared_distance_identity (H : Type) [NormedAddCommGroup H] [InnerProductSpace ℝ H]    (x y : H) (t q : ℝ) (hx : ‖x‖^2 = q^2/4) (hy : ‖y‖^2 = q^2/4) :    ‖x - t • y‖^2 = (1-t)^2 * q^2/4 + t * ‖x-y‖^2 := by  have hxy := norm_sub_sq_real x y  have ht := norm_sub_sq_real x (t • y)  simp only [real_inner_smul_right, norm_smul, Real.norm_eq_abs, mul_pow, sq_abs] at ht  have hm := congrArg (fun z : ℝ => t*z) hxy  nlinarith
See it in the graphDiscuss this resultChallenge it