Mathlib-side determinantal theory for the integer Gram-Schmidt surface of
hex-gram-schmidt.
This module relates the executable leading integer Gram determinant gramDet
to products of squared norms of the orthogonal Gram-Schmidt basis rows. Its
spine is a rational column-operation reduction from leadingGramMatrixInt
(via the interpolating progressMatrix, the triangular auxMatrix, and the
Int → Rat cast law det_intCast) to the diagonal norm-squared matrix,
giving gramDet_succ_rat and leadingGramMatrixInt_det_nonneg. Along the
way it builds the Cramer machinery (scaledCoeffMatrix solved through the
chosen originalProjectionCoords) that the sibling module uses to read off
the Gram-Schmidt coefficients coeffs.
Helpers for gramDet_eq_prod_normSq_core #
The remaining theorems below build the rational column-operation reduction
from the leading Gram matrix to the diagonal Gram-Schmidt norm-squared
matrix, plus the integer→rational cast law for det.
Right-side dot product distributes over vector addition.
Right-side dot product distributes over scalar multiplication.
The k-leading Gram determinant equals, as a rational, the product of the
squared Gram-Schmidt norms of the first k basis vectors
(gramSchmidtNormProduct b k). Public wrapper over
gramDet_eq_prod_normSq_core.
One-step extension of gramSchmidtNormProduct: appending the k-th
factor multiplies the k-fold product by ((basis b).row ⟨k, _⟩)..normSq
This is a Fin.foldl cancellation lemma; positivity of the leading Gram
determinant is handled separately by gramDet_pos.
The squared norm of the k-th Gram-Schmidt basis vector is the ratio of
consecutive leading Gram determinants d_{k+1} / d_k, the standard telescoping
identity. Public wrapper over basis_normSq_core.