Rational Gram-Schmidt API for hex-gram-schmidt.
This module wraps the executable kernel into the rational-valued basis and
coeffs of a Matrix Rat n m and proves their defining properties: the
leading row is untouched (basis_zero), distinct basis rows are orthogonal
(basis_orthogonal), the triangular factorization b = coeffs · basis
(basis_decomposition), and the unit-diagonal / lower-triangular shape of
coeffs (coeffs_diag, coeffs_upper, coeffs_lower_projection). It also
tracks how basis and coeffs transform under Matrix.rowAdd and adjacent
Matrix.rowSwap (the explicit re-orthogonalization formulas
basis_rowSwap_adjacent_prev/_curr and the coefficient updates), and proves
that orthogonalization preserves every row-prefix span (basis_span). These
are the rational facts the integer-cast layer lifts.
The Gram-Schmidt orthogonal basis for a rational matrix.
Equations
Instances For
The Gram-Schmidt coefficient matrix for a rational input matrix.
Equations
Instances For
The triangular factorization b = coeffs · basis, stated row by row: each
rational input row equals its orthogonalized basis row plus the
coefficient-weighted combination of the earlier basis rows.
The Gram-Schmidt basis is invariant under adding a scalar multiple of an earlier row to a later row. This is the rational size-reduction update used by the integer wrappers.
Swapping rows km1 and k leaves every basis row before the pair
unchanged, since each Gram-Schmidt output row depends only on the input prefix
up to its own index.
After swapping the adjacent rows km1, k, the basis row at the lower index
km1 becomes the old basis row k plus its projection coefficient times the
old basis row km1. The explicit re-orthogonalization formula for the first
vector of the swapped pair.
After swapping the adjacent rows km1, k (assuming the swapped pivot is
nonzero), the basis row at index k is the explicit two-term combination of the
old basis rows km1, k. The companion of basis_rowSwap_adjacent_prev tracking
how a swap rewrites the second vector of the pair.
After an adjacent swap, the coefficient at the lower row km1 against an
earlier column j equals the old coefficient at row k against j: the
swapped rows carry their lower coefficients with them.
Dual of coeffs_rowSwap_adjacent_lower_prev: after an adjacent swap, the
coefficient at row k against an earlier column j equals the old coefficient
at row km1 against j.
The explicit value of the new pivot coefficient (row k, column km1)
after an adjacent swap, in terms of the old projection coefficient and basis-row
norms.
Under rowAdd b src dst c with src < dst, the pivot coefficient in the
destination row increases by c when the source basis row has nonzero norm.
Swapping the adjacent rows km1, k leaves every basis row after the pair
unchanged: the orthogonalized prefix beyond index k is recomputed from the
same set of input rows.