norm_sq_toEuclideanLin
theoremverifiedimported Lean
Squared Euclidean norm as a sum of squared coordinates. Let $A$ be a $k \times d$ real matrix, regarded as the linear map $x \mapsto Ax$ from the Euclidean space $\bbr^d$ to $\bbr^k$, and let $x \in \bbr^d$. Then the squared Euclidean norm of the image is the sum of the squares of its coordinates, \[ \norm{Ax}^2 = \sum_{i=1}^{k} (Ax)_i^2 . \]
Statement
set_option relaxedAutoImplicit false in set_option autoImplicit false in open MeasureTheory ProbabilityTheory Real NNReal Matrix Finset in variable {d k : ℕ} in lemma norm_sq_toEuclideanLin (A : Matrix (Fin k) (Fin d) ℝ) (x : EuclideanSpace ℝ (Fin d)) : ‖A.toEuclideanLin x‖ ^ 2 = ∑ i, ((A.toEuclideanLin x) i) ^ 2
- Source
- TCSlib, `norm_sq_toEuclideanLin`
- Lean proof
- By Ganesh Sankar, from github.com/Shilun-Allan-Li/tcslib at
c8a02591b1e5(Copyright (c) 2026 Ganesh Sankar. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.norm_sq_toEuclideanLin← norm_sq_toEuclideanLin (TCSlib/LearningTheory/JohnsonLindenstrauss/RowDistribution.lean:233): verbatim
- Verified
- 07 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Used by 1
- jl_concentration_single_via_chi_squaredJohnson–Lindenstrauss concentration for a single vector. Let $k \ge 1$, and let $A$ be a random $k \times d$ real matrix on a probability…
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.
set_option relaxedAutoImplicit false inset_option autoImplicit false inopen MeasureTheory ProbabilityTheory Real NNReal Matrix Finset invariable {d k : ℕ} in/-- The squared Euclidean norm of the image of `x` under the linear map of the matrix `A` equals the sum over the rows `i` of the squared coordinates `((A.toEuclideanLin x) i)²`. -/lemma norm_sq_toEuclideanLin (A : Matrix (Fin k) (Fin d) ℝ) (x : EuclideanSpace ℝ (Fin d)) : ‖A.toEuclideanLin x‖ ^ 2 = ∑ i, ((A.toEuclideanLin x) i) ^ 2 := by rw [EuclideanSpace.norm_eq] rw [Real.sq_sqrt (by positivity)] simp [sq_abs]