Mathlib-side determinantal identification of the canonical Bareiss
Gram-Schmidt coefficients for hex-gram-schmidt.
This module finishes the Cramer identity
scaledCoeffMatrix_det_eq_gramDet_mul_coeffs, expressing the scaled
coefficient determinant as gramDet (j+1) * coeffs[i][j]. Its second half
introduces the augmented (n+1) × (n+1) matrix augmentedGram, whose upper
block is gramMatrix b and whose trailing column carries a standard basis
vector, and proves noPivotLoop_augmentedGram_invariant: the no-pivot Bareiss
pass on the augmented matrix mirrors the pass on gramMatrix b while its
trailing column tracks bareissGramCanonicalCoeff. This yields
bareissGramCanonicalCoeff_eq_augmentedGram_entry and its bordered-minor
form, identifying the canonical row coefficients with a Bareiss minor
determinant.
Augmented Gram matrix for determinantal identification of #
bareissGramCanonicalCoeff
The canonical row-coefficient vector of the initial no-pivot Bareiss trajectory
on gramMatrix b is identified with a trailing-column entry of the no-pivot
Bareiss pass on an (n + 1) × (n + 1) augmented matrix. The upper n × n
block of the augmented matrix is gramMatrix b; the trailing column at upper
rows carries the standard basis vector δ_a at the chosen coefficient slot
a; the trailing row is structurally zero.
Because the trailing row is zero and the no-pivot Bareiss update at slot
(i, j) with i, j < n only consults the upper block, the upper-block
trajectory on the augmented matrix exactly mirrors the trajectory on
gramMatrix b. Because the trailing-column update at row i < n and step
k < i.val mirrors the canonical-coefficient Bareiss step, the trailing
column at upper rows tracks bareissGramCanonicalCoeff b fuel i at slot a.
Augmented (n + 1) × (n + 1) matrix used to identify
bareissGramCanonicalCoeff b fuel i [a] with a trailing-column entry of the
no-pivot Bareiss pass. Upper block is gramMatrix b; trailing column at
upper rows is the standard basis vector δ_a; trailing row is zero.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Local copy of HexMatrixMathlib.trailing_eq_at_step (private there):
re-state BareissNoPivotInvariant.trailing_eq with the step value supplied
externally so the dependent bordered-minor type matches the desired
s = state.step substitution cleanly.
Combined invariant relating the no-pivot Bareiss trajectory on the
augmented matrix to the trajectory on gramMatrix b. Under fuel + 1 ≤ n
and a non-singular prefix on the Gram side, the augmented loop tracks the
Gram loop on (i) step, (ii) prevPivot, (iii) the upper n × n block,
and (iv) carries the canonical row coefficient in its trailing column.
Determinantal identification of the canonical row-coefficient vector
bareissGramCanonicalCoeff b fuel i at slot a as the trailing-column entry
of the no-pivot Bareiss pass on the augmented (n + 1) × (n + 1) matrix
augmentedGram b a. The hypothesis fuel ≤ i.val ensures the comparison
covers both the active-row and processed-row branches of the canonical
recursion.
Direct bordered-minor form: the canonical row-coefficient vector at slot
a equals the determinant of the (fuel + 1) × (fuel + 1) bordered minor of
the augmented Gram matrix. Composes
bareissGramCanonicalCoeff_eq_augmentedGram_entry with the Bareiss
no-pivot invariant trailing_eq.
Under a non-singular no-pivot Bareiss prefix that has not yet reached the
terminal step, the loop on the initial state of M consumed exactly fuel
regular iterations: the resulting step equals fuel, and fuel + 1 ≤ n'.
Companion to trailing_eq_at_step_local: rewrite
BareissNoPivotInvariant.prevPivot_eq with the step value supplied externally
so the dependent principalSubmatrix type matches the desired s = state.step
substitution cleanly.
Concrete bridge-side instance of StepWitness for any integer basis.
The witness quotient at slot a is the next iteration's canonical row
coefficient (bareissGramCanonicalCoeff b (fuel + 1) i)[a]. Integrality of
this quotient comes from the Bareiss-Desnanot identity applied to the
augmented (n + 1) × (n + 1) matrix augmentedGram b a: the canonical
coefficients identify with trailing-column entries of the augmented no-pivot
Bareiss pass (bareissGramCanonicalCoeff_eq_borderedMinor_aug), and the
Bareiss step recurrence on the augmented matrix supplies the exact-division
multiplicative identity.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Cramer's rule identity under singularity. When the no-pivot Bareiss pass over
the Gram matrix records an early singular step before reaching column j, the
Leibniz determinant of the Cramer minor scaledCoeffMatrix b i j hji is zero.
Internally lifts the partial-pass singularity to the full bareissNoPivotData
pass, traverses gramDetVecEntry to conclude gramDet b (j+1) = 0, and
finishes via the Cramer determinant identity
scaledCoeffMatrix_det_eq_gramDet_mul_coeffs.
Unconditional rational closed form for the strictly lower entries of
scaledCoeffs: the executable integer scaled coefficient agrees with the
Leibniz determinant of the Cramer minor scaledCoeffMatrix b i j hji,
regardless of whether the no-pivot Bareiss pass over gramMatrix b reaches
column j without recording a singular step. The non-singular branch
composes the Mathlib-free correspondence
scaledCoeffs_lower_eq_noPivotLoop_scaledCoeffMatrix (via
noPivotLoop_full_eq_borderedMinor_at_trailing + scaledCoeffMatrix_eq_borderedMinor)
with bareiss_eq_noPivotLoop_last_of_no_singular and the bareiss_eq_mathlib_det
/ det_eq cross-bridge; the singular branch sends both sides to 0 via the
singular cascade. All Mathlib-side bridge theorems for strictly lower entries
route through this unconditional identity.
Cramer/Bareiss identity: below the diagonal, the integral scaled
Gram-Schmidt coefficient is exactly the public Bareiss determinant of the
Cramer minor scaledCoeffMatrix. Derived from the unconditional
scaledCoeffs_lower_eq_det_scaledCoeffMatrix by casting back to Int and
translating Matrix.det to Matrix.bareiss via det_eq /
bareiss_eq_mathlib_det.
Below the diagonal, the rational image of the integer scaled
Gram-Schmidt coefficient factors as gramDet b (j+1) * coeffs[i,j]. Derived
from the unconditional scaledCoeffs_lower_eq_det_scaledCoeffMatrix and
scaledCoeffMatrix_det_eq_gramDet_mul_coeffs.