Determinant-level pivot identity for scaled Gram-Schmidt coefficients under
an elementary row addition. In the Cramer matrix computing nu[k,j], replacing
row k by row k + c * row j changes the replaced last column linearly: the
new determinant is the old Cramer determinant plus c times the leading Gram
determinant. This formulation does not require the rational coefficient
denominator to be nonzero.
When the modified row index k lies outside the leading t-prefix
(t ≤ k.val), the leading Gram matrix of Matrix.rowAdd b j k c agrees with
that of b. Internal support lemma for the row-add determinant theorem in
HexGramSchmidtMathlib.Int.
When the modified row index k lies inside the leading t-prefix
(k.val < t), the leading Gram matrix of Matrix.rowAdd b j k c agrees with
the row-and-column-add of the original leading Gram matrix at the lifted
Fin t indices jt, kt. Internal support lemma for the row-add
determinant theorem in HexGramSchmidtMathlib.Int.
The executable scaled-coefficient pivot entry changes predictably under
an earlier-row addition. This packages the Cramer/Bareiss pivot identity at
the public scaledCoeffs level so update callers need not unfold the
underlying determinant identity directly.
Adding a multiple of an earlier row to a later row leaves the leading
Gram determinant unchanged. The hypothesis j.val < k.val makes the source
row earlier than the destination row in the basis.
Under Matrix.rowAdd b j k c with l.val < j.val < k.val, the
destination-row scaled coefficient at column l updates by the linear
combination (scaledCoeffs b)[k][l] + c * (scaledCoeffs b)[j][l].
Under Matrix.rowAdd b j k c with j.val < l.val < k.val, the
destination-row scaled coefficient at column l between the source column
and the pivot is preserved.
A determinant-positive leading-Gram-prefix proof induces the executable
gramDet independence predicate. This is useful for callers that already
have determinant lemmas for special matrix families, while keeping the public
predicate stated over Mathlib-free computed data.
The identity matrix is independent: its Gram matrix is the identity, so
every leading principal minor has determinant 1 > 0.
Singular-branch zero propagation: if the partial-pass no-pivot Bareiss loop
on the full Gram matrix records a singular step at index s strictly before
slot r + 1, the public row-pivoted Bareiss determinant of the (r + 1)
leading Gram prefix is zero.
This is the supporting lemma needed by the singular branch of the
gramDetVecEntry_eq_principalSubmatrix_bareiss placeholder: both sides vanish in
this case, and this lemma supplies the right-hand side. The proof composes the
new lemma HexMatrixMathlib.noPivotLoop_invariant_of_singularStep_eq_none
(to identify det(principalSubmatrix _ (s+1)) = 0 at the moment of singularity) with
the unconditional gramDet_eq_prod_normSq_uncond and the multiplicative
succession gramSchmidtNormProduct_succ to propagate zero from s + 1 to
r + 1.
The no-pivot
Bareiss pass over the full Gram matrix records, at slot r + 1, the same
leading-prefix determinant as the public row-pivoted Bareiss surface on that
prefix.
This theorem lives in HexGramSchmidtMathlib because the proof path for the
singular branch identifies the executable determinant with Mathlib's Leibniz
determinant. Mathlib-free callers should use the executable gramDet API
instead of depending on this Bareiss-facing statement.