norm_sq_ap_quadratic
For any initial point x₀ and difference vector v in n-dimensional Euclidean space, and any real coefficient k, the squared norm of x₀ + k • v is given by ||v||^2 * k^2 + 2 * ⟪x₀, v⟫ * k + ||x₀||^2.
Statement
theorem norm_sq_ap_quadratic {n : ℕ} (x₀ v : EuclideanSpace ℝ (Fin n)) (k : ℝ) :
‖x₀ + k • v‖ ^ 2 = ‖v‖ ^ 2 * k ^ 2 + 2 * @inner ℝ _ _ x₀ v * k + ‖x₀‖ ^ 2- Formalizes
- arXiv:2611.12360, Lemma 2.1
- Verified
- 13 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Used by 3
- euclidean_radial_ap_avoidance_transfer_from_planeFor a coloring determined solely by the squared distance from the origin, avoiding a monochromatic r-term arithmetic progression of…
- rational_quadratic_coloring_implies_euclidean_avoidanceA rational coloring avoiding false length-3 and true length-17 monic quadratic sequences with arbitrary rational lower coefficients yields…
- spherical_mod5_scale149_100_blue_unit_apThe planar radial coloring that colors x true exactly when floor((149/100)‖x‖²) is nonzero modulo 5 has a true 17-term arithmetic…
Read back from the Lean
For every natural number $n$, for all vectors $x₀, v \in \mathrm{EuclideanSpace}\ \mathbb{R}\ (\mathrm{Fin}\ n)$, and for every real number $k$, the squared norm $\|x₀ + k \cdot v\|^2$ equals $\|v\|^2 k^2 + 2 \langle x₀, v \rangle k + \|x₀\|^2$ (where $\langle x₀, v \rangle$ is the real inner product of $x₀$ and $v$).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
The identity is proved by expressing the squared norm ‖x₀ + k • v‖^2 as the self-inner product ⟪x₀ + k • v, x₀ + k • v⟫. Expanding this product by bilinearity produces four terms involving inner products of x₀ and v. Replacing the diagonal terms with squared norms and using symmetry to combine the cross terms shows that both sides are identical polynomials in k.
The squared norm ‖x₀ + k • v‖^2 expands to the sum of inner products ⟪x₀, x₀⟫ + k * ⟪v, x₀⟫ + k * ⟪x₀, v⟫ + k * (k * ⟪v, v⟫).
We rewrite the squared norm ‖x₀ + k • v‖^2 as the self-inner product ⟪x₀ + k • v, x₀ + k • v⟫ using `real_inner_self_eq_norm_sq`. We then expand this inner product using bilinearity: additivity in both arguments (`inner_add_left`, `inner_add_right`) and pull out real scalar multiples (`real_inner_smul_left`, `real_inner_smul_right`).
uses
real_inner_self_eq_norm_sq,inner_add_left,inner_add_right,real_inner_smul_left,real_inner_smul_rightrw [← real_inner_self_eq_norm_sq] simp only [inner_add_left, inner_add_right, real_inner_smul_left, real_inner_smul_right]
Re-expressing diagonal inner products as squared norms and commuting cross terms yields the identity ‖v‖^2 * k^2 + 2 * ⟪x₀, v⟫ * k + ‖x₀‖^2.
We substitute ‖x₀‖^2 for ⟪x₀, x₀⟫ and ‖v‖^2 for ⟪v, v⟫ via `real_inner_self_eq_norm_sq`, and commute the cross term ⟪v, x₀⟫ to ⟪x₀, v⟫ using symmetry of the real inner product (`real_inner_comm`). Both sides are then identical polynomials in k, and the goal is closed by commutative ring arithmetic.
uses
real_inner_self_eq_norm_sq,real_inner_commrw [real_inner_self_eq_norm_sq, real_inner_self_eq_norm_sq, real_inner_comm x₀ v] ring
inner_add_left- In an inner product space, the inner product is additive in the first argument: ⟪x + y, z⟫ = ⟪x, z⟫ + ⟪y, z⟫.
inner_add_right- In an inner product space, the inner product is additive in the second argument: ⟪x, y + z⟫ = ⟪x, y⟫ + ⟪x, z⟫.
real_inner_comm- In a real inner product space, the inner product is symmetric: ⟪y, x⟫ = ⟪x, y⟫.
real_inner_self_eq_norm_sq- In a real inner product space, the inner product of a vector with itself equals the square of its norm: ⟪x, x⟫ = ‖x‖^2.
real_inner_smul_left- In a real inner product space, scalar multiplication in the first argument pulls out: ⟪r • x, y⟫ = r * ⟪x, y⟫.
real_inner_smul_right- In a real inner product space, scalar multiplication in the second argument pulls out: ⟪x, r • y⟫ = r * ⟪x, y⟫.
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
/-- Quadratic identity for the squared Euclidean norm of points along an arithmetic progression. -/theorem norm_sq_ap_quadratic {n : ℕ} (x₀ v : EuclideanSpace ℝ (Fin n)) (k : ℝ) : ‖x₀ + k • v‖ ^ 2 = ‖v‖ ^ 2 * k ^ 2 + 2 * @inner ℝ _ _ x₀ v * k + ‖x₀‖ ^ 2 := by rw [← real_inner_self_eq_norm_sq] simp only [inner_add_left, inner_add_right, real_inner_smul_left, real_inner_smul_right] rw [real_inner_self_eq_norm_sq, real_inner_self_eq_norm_sq, real_inner_comm x₀ v] ring