Theorem 5.3.1 — Johnson-Lindenstrauss Lemma
ProvedHighDimProb.Isoperimetry.johnson_lindenstraussThis is the Johnson-Lindenstrauss Lemma (Theorem 5.3.1), the goal theorem of this mission: any points in a Euclidean space of arbitrarily high dimension can be projected, by a single random linear map that does not depend on the data, into a space of dimension only while distorting every pairwise distance by at most a factor of .
There are absolute constants such that the following holds. Let , let be a finite set of points in , and let with
Let be a probability space and a random orthogonal projection of rank , uniformly
distributed in the Grassmannian (the companion definition IsUniformProjection).
Then
That is, with the stated probability, the scaled projection is simultaneously, for every pair of points , a -approximate isometry.
Two features make this remarkable: the map is non-adaptive — a single random object drawn without looking at the data works for the whole set with high probability — and the ambient dimension plays no role in the bound, only the target dimension , the number of points , and .
Formalization Note is a Finset of points, matching the book's " points"; the
conclusion quantifies universally over all pairs inside the same
probability event — not one high-probability event per pair — which is exactly the union-
bound content that makes this a genuine dimension-reduction statement for a whole point set
rather than a restatement of Lemma 5.3.2(b) for one fixed difference vector. Both and
are existentially quantified ahead of every other object (the probability space, ,
, , , and ), so neither numeral is fixed; the book's proof gives
for the of Lemma 5.3.2(b) under the stated hypothesis on , but only the
existence of some absolute is asserted here, matching the book's own statement.
import Mathlib import Definitions.Def_HighDimProb_Isoperimetry_UniformProjection open MeasureTheory
namespace HighDimProb.Isoperimetry
/-- **Theorem 5.3.1** (Johnson-Lindenstrauss Lemma), Vershynin, *High-Dimensional Probability*
(2018), p. 118.
Let `X` be a set of `N` points in `ℝⁿ` and `ε > 0`. Assume that `m ≥ (C/ε²) log N`. Consider a
random `m`-dimensional subspace `E` in `ℝⁿ` uniformly distributed in `G_{n,m}`. Denote the
orthogonal projection onto `E` by `P`. Then, with probability at least `1 − 2exp(−cε²m)`, the
scaled projection `Q := √(n/m) P` is an approximate isometry on `X`:
`(1 − ε) ‖x − y‖₂ ≤ ‖Qx − Qy‖₂ ≤ (1 + ε) ‖x − y‖₂` for all `x, y ∈ X`. -/
theorem johnson_lindenstrauss :
∃ C c : ℝ, 0 < C ∧ 0 < c ∧
∀ {Ω : Type} [MeasurableSpace Ω] (Prob : Measure Ω) [IsProbabilityMeasure Prob]
{n : ℕ} (m : ℕ) (X : Finset (EuclideanSpace ℝ (Fin n))) {ε : ℝ} (hε : 0 < ε),
(m : ℝ) ≥ (C / ε ^ 2) * Real.log (X.card : ℝ) →
∀ (P : Ω → (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n))),
IsUniformProjection Prob m P →
1 - 2 * Real.exp (-(c * ε ^ 2 * (m : ℝ))) ≤
Prob.real {ω | ∀ x ∈ X, ∀ y ∈ X,
(1 - ε) * ‖x - y‖ ≤ ‖Real.sqrt ((n : ℝ) / (m : ℝ)) • P ω (x - y)‖ ∧
‖Real.sqrt ((n : ℝ) / (m : ℝ)) • P ω (x - y)‖ ≤ (1 + ε) * ‖x - y‖} := by sorry
end HighDimProb.Isoperimetry
Read-back
What the Lean code literally says, in plain math · claude-fable-5-1
The theorem asserts the existence of two real constants and (fixed once, independent of everything below) such that the following holds for all of the data listed next.
The data quantified over. Any type equipped with a measurable-space structure and a probability measure on it; any natural number (the ambient dimension, implicit) and any natural number ; any finite set of points of Euclidean space (with the standard Euclidean norm ); any real with ; and any function assigning to each sample point a continuous linear map .
Hypotheses.
- , where is the number of points of cast to a real number and is the real natural logarithm (with being the junk value of the total logarithm, so the condition reads when is empty).
IsUniformProjection Prob m Pholds — a predicate imported fromDefinitions.Def_HighDimProb_Isoperimetry_UniformProjectionwhose definition is not shown in the code given to me; it relates the measure , the integer , and the random map . Whatever it requires, no other property of (such as being a projection, being orthogonal, or having rank ) is stated here.
Conclusion. The inequality
where denotes the real-valued probability of the set
Here is the real square root of the real quotient , and is the scalar multiple of the vector . Note that the map is applied to the difference (not to and separately); linearity of makes these coincide.
Edge cases made explicit by the quantifiers.
- is allowed: then is the junk value , , so the scaled vector is ; the set then consists of those for which for all pairs, and the lower bound on the left is , which is at most any probability, so the conclusion is trivially true.
- is allowed: is a single point, all norms are , and .
- empty or a singleton makes the condition defining vacuous (every pair has ), so and .
- No measurability of is assumed; is the outer-measure value converted to a real number.
- If the hypothesis
IsUniformProjection Prob m Pis unsatisfiable for some choice of the data, the statement holds vacuously for that choice. - The constants are asserted to exist but nothing is said about their size beyond positivity, and the theorem is stated with the quantifier outermost, so a single pair must work uniformly for every .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.