Correspondence between the executable scaledCoeffRows pass and the
matrix-level Gram-determinant API for hex-gram-schmidt.
This module proves that the array-storage scaled-coefficient loop tracks the
matrix-level no-pivot Bareiss pass entry for entry: the diagonal slots record
the leading Gram determinants (gramDetVecEntry_eq_gramDet,
scaledCoeffRows_diag_toNat_eq_gramDet) including the zero tail after an early
singular step, and the lower-triangle slots capture the corresponding Bareiss
target-column values. It exposes the determinant base case gramDet_zero, the
lower-triangularity of the public matrix (scaledCoeffs_upper), and the
lattice-norm helper vecMul_coeffs_apply_eq_of_zero_above giving the
top Gram-Schmidt coordinate of a row combination when the later integer
coefficients vanish.
The no-pivot Bareiss pass over the full Gram matrix records the same
leading-prefix determinant as the public gramDet API at every vector slot.
The integral scaled Gram-Schmidt coefficient matrix is lower triangular:
every strict-upper-triangle entry (i < j) is zero. Callers treating
scaledCoeffs as a triangular factor use this to discard above-diagonal terms.
Tagged @[grind =] (keyed on the entry (scaledCoeffs b) i j term) so the
strict-upper hypothesis i < j is discharged by grind's arithmetic when the
vanishing fact is needed.
The k-th entry of the row combination of the Gram-Schmidt coefficient
matrix with a cast integer coefficient vector, when all later integer
coefficients vanish, equals the cast k-th coefficient.
This is the top Gram-Schmidt coordinate specialization consumed by the lattice
norm lower bound: rows below k contribute zero by upper-triangularity,
row k contributes one by the diagonal lemma, and rows above k contribute
zero because the corresponding integer coefficient vanishes.