Background
Chapter 28 has partial formalization from @caiwei2026 (PR #85).
lupSolve is defined as: forward-substitute Ly = Pb, then back-substitute Ux = y.
forwardSubst_spec and backSubst_spec are fully proved.
What needs to be done
Prove lupSolve_correct:
theorem lupSolve_correct (A : Mat n n) (b : Vec n) :
Matrix.mulVec A (lupSolve A b) = b := by
sorry
This corresponds to CLRS Theorem 28.2. The proof composes:
lupDecomp_spec — PA = LU (proved, reads from structure field)
forwardSubst_spec — Ly = Pb (proved)
backSubst_spec — Ux = y (proved)
- Permutation algebra — applying P and its inverse
Dependencies
Requires lupDecomp_exists (#TODO) to be filled first, since lupDecomp
currently uses Classical.choice non-constructively.
Impact
lupSolve_correct is the transitively-used lemma that blocks:
matrixInverse_mul_eq_one
one_mul_matrixInverse_eq_one
matrixInverse_column_spec
leastSquares_normal_eq
All of these are "proved" in the current code but their proofs call
lupSolve_correct which is a sorry. Filling lupSolve_correct would
make all of them genuine kernel-checked proofs.
References
Background
Chapter 28 has partial formalization from @caiwei2026 (PR #85).
lupSolveis defined as: forward-substitute Ly = Pb, then back-substitute Ux = y.forwardSubst_specandbackSubst_specare fully proved.What needs to be done
Prove
lupSolve_correct:This corresponds to CLRS Theorem 28.2. The proof composes:
lupDecomp_spec— PA = LU (proved, reads from structure field)forwardSubst_spec— Ly = Pb (proved)backSubst_spec— Ux = y (proved)Dependencies
Requires
lupDecomp_exists(#TODO) to be filled first, sincelupDecompcurrently uses
Classical.choicenon-constructively.Impact
lupSolve_correctis the transitively-used lemma that blocks:matrixInverse_mul_eq_oneone_mul_matrixInverse_eq_onematrixInverse_column_specleastSquares_normal_eqAll of these are "proved" in the current code but their proofs call
lupSolve_correctwhich is asorry. FillinglupSolve_correctwouldmake all of them genuine kernel-checked proofs.
References
Section_28_1_LUP_Decomposition.lean