Documentation

LeanPool.DistanceGeometry.Schoenberg

Schoenberg's characterization: the easy direction #

Given a real configuration x : Fin n → EuclideanSpace ℝ (Fin k) with squared-distance matrix D, the basepoint-centered Gram matrix centeredGram D is

These are exactly the two necessary conditions in Schoenberg's theorem characterizing Euclidean squared-distance matrices. The converse (sufficiency) is proved in SchoenbergHard.lean.

The proof goes through the polarization identity centeredGram D i j = ⟪x i - x 0, x j - x 0⟫, exhibiting centeredGram D as the Gram matrix of the recentred vectors x i - x 0. Positive semidefiniteness is then Matrix.posSemidef_gram; the rank bound comes from the factorization gram = mᴴ * m over the standard orthonormal basis of EuclideanSpace ℝ (Fin k) together with Matrix.rank_conjTranspose_mul_self and Matrix.rank_le_card_height.

Main results #

theorem DistanceGeometry.centeredGram_apply_eq_inner {n k : } [NeZero n] {D : Matrix (Fin n) (Fin n) } {x : Fin nEuclideanSpace (Fin k)} (hD : IsSqDistMatrix D x) (i j : Fin n) :
centeredGram D i j = inner (x i - x 0) (x j - x 0)

The polarization identity. When D is the squared-distance matrix of x, the (i, j) entry of the basepoint-centered Gram matrix is the inner product of the recentred vectors x i - x 0 and x j - x 0.

theorem DistanceGeometry.centeredGram_eq_gram {n k : } [NeZero n] {D : Matrix (Fin n) (Fin n) } {x : Fin nEuclideanSpace (Fin k)} (hD : IsSqDistMatrix D x) :
centeredGram D = Matrix.gram fun (i : Fin n) => x i - x 0

The basepoint-centered Gram matrix is the Gram matrix of the recentred vectors.

The basepoint-centered Gram matrix of a squared-distance matrix is positive semidefinite. This is the positive-semidefiniteness half of Schoenberg's necessary conditions.

theorem DistanceGeometry.rank_centeredGram_le {n k : } [NeZero n] {D : Matrix (Fin n) (Fin n) } {x : Fin nEuclideanSpace (Fin k)} (hD : IsSqDistMatrix D x) :

The basepoint-centered Gram matrix of a squared-distance matrix of a configuration in dimension k has rank at most k. This is the rank half of Schoenberg's necessary conditions.

The necessary conditions in Schoenberg's theorem: the basepoint-centered Gram matrix of a squared-distance matrix of a configuration in EuclideanSpace ℝ (Fin k) is positive semidefinite and has rank at most k.