Documentation

HexGramSchmidtMathlib.Int.GramDet

Leading integer Gram determinants are nonnegative.

theorem Hex.GramSchmidt.Int.gramDet_pos {n m : } (b : Matrix n m) (hli : independent b) (k : ) (hk : k n) (hk' : 0 < k) :
0 < gramDet b k hk

Every nonempty leading Gram determinant of an independent integer matrix is strictly positive.

Right-side dot product distributes over vector addition.

theorem Hex.GramSchmidt.Int.dot_smul_right_rat {m' : } (s : ) (u v : Vector m') :
u.dotProduct (s v) = s * u.dotProduct v

Right-side dot product distributes over scalar multiplication.

theorem Hex.GramSchmidt.Int.gramDet_eq_prod_normSq {n m : } (b : Matrix n m) (hli : independent b) (k : ) (hk : k n) :
(gramDet b k hk) = gramSchmidtNormProduct b k hk

For an independent integer matrix, each leading Gram determinant, cast to Rat, equals the product of the squared norms of its Gram-Schmidt basis rows.

theorem Hex.GramSchmidt.Int.gramSchmidtNormProduct_succ {n m : } (b : Matrix n m) (k : ) (hk : k + 1 n) :

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.

theorem Hex.GramSchmidt.Int.basis_normSq {n m : } (b : Matrix n m) (hli : independent b) (k : ) (hk : k < n) :
((basis b).row k, hk).normSq = (gramDet b (k + 1) ) / (gramDet b k )

The squared norm of the k-th Gram-Schmidt vector is the ratio of consecutive leading Gram determinants.

theorem Hex.GramSchmidt.Int.gramDet_succ_rat {n m : } (b : Matrix n m) (j : ) (hjsuc : j + 1 n) :
(gramDet b (j + 1) hjsuc) = gramSchmidtNormProduct b j * ((basis b).row j, ).normSq

The Gram-determinant succession: (gramDet (j+1) : Rat) factors as (gramSchmidtNormProduct j) * normSq(basis[j]).