Orthonormality of the executable Gram–Schmidt Q factor (Qᵀ Q = 1) #
This file closes the one finite-fold property left open by
NN.Proofs.Tensor.Basic.FactorizationsReconstruction: the orthonormality of the Q factor produced
by the executable classical Gram–Schmidt gramSchmidtFn.
The strategy is to unify the executable variant with Mathlib's gramSchmidt rather than re-derive
the orthogonality induction by hand. Reading the columns of A as vectors of
EuclideanSpace ℝ (Fin m), the j-th executable Q column equals Mathlib's gramSchmidtNormed ℝ
of the column map (Qcol_bridge), so the orthonormality follows from Mathlib's
gramSchmidtNormed_orthonormal'.
Main results #
Qcol_bridge:WithLp.toLp 2 (Qcol A k) = gramSchmidtNormed ℝ (gsCol A) k— the executableQcolumn is Mathlib's normalized Gram–Schmidt vector, proved by strong induction onk.Q_orthonormal:dotFn (Qcol A a) (Qcol A b) = if a = b then 1 else 0under positiveRpivots.QT_mul_Q_eq_oneandisQR_of_pos: the matrix-levelQᵀ Q = 1and the fullSpec.Factorization.IsQRpredicate for the executable factors (combining with the reconstructionA = Q · RandRupper-triangular from the companion file).qrSpec_orthonormal: the tensor-level corollary.
Method #
The bridge rests on three connectors over ℝ: dotFn = ⟪·,·⟫ and normFn = ‖·‖ on
EuclideanSpace ℝ (Fin m), and the projection identity proj_normalize showing the un-normalized
Gram–Schmidt projection term equals the normalized one. The strong induction feeds the partial
identification of the earlier Q columns into gramSchmidt_def'', term by term.
Connectors between the executable scalar ops and the Euclidean inner product #
The executable dot product is the Euclidean inner product over ℝ.
The executable Euclidean norm is the EuclideanSpace norm over ℝ.
The Gram–Schmidt projection term, with the normalized vector pulled out. Holds with no
non-degeneracy hypothesis (both sides vanish when gramSchmidt = 0).
gramSchmidtNormed over ℝ, with the scalar coercion removed.
The bridge to Mathlib's gramSchmidt #
Column j of A as a vector of EuclideanSpace ℝ (Fin m).
Instances For
Orthogonalized-vector bridge. Given that the earlier Q columns coincide with Mathlib's
normalized Gram–Schmidt vectors, the executable orthogonalized vector v at index k equals
Mathlib's (un-normalized) gramSchmidt vector.
Normalized-column bridge. The executable Q column at index k equals Mathlib's
gramSchmidtNormed. Proved by strong induction on k, under positive R pivots (full column rank).
Orthonormality Qᵀ Q = 1 #
Full QR specification. For A with positive executable R-pivots (full column rank), the
executable Gram–Schmidt factors satisfy Spec.Factorization.IsQR: Qᵀ Q = 1, R upper-triangular,
and A = Q · R.
Tensor-level orthonormality. For a tensor A with positive qrRSpec pivots, the Q factor
qrQSpec A has orthonormal columns: Σ_i Q[i,a]·Q[i,b] = δₐᵦ.