Commit 2026-07-27 08:26 1a1a7c15
View on Github →fix(Tactic/NormDet): make norm_det proofs compatible with modules (#42119)
The proofs produced by the norm_det / eval_det simproc (added in #42059) could not be checked from within a module because the generated proofs depended on kernel checking of equalities for definitions (Array.ofFn, and certEntry, certIterStepEntry from the Bird determinant certificate evaluator) which are not exposed. The existing tests in MathlibTest/matrix.lean did not detect this issue because it was not a module itself.
This PR:
- Fixes the issues resulting from non-exposed definitions
- Makes the
MathlibTest/matrix.leanfile into a module - Adds proofs for the determinants of Cartan matrices
LinearAlgebra/Matrix/Cartanusingnorm_det- showing that the simrproc can be used in mathlib modules. The functionnormalizeDetFromEntriesgenerated a proof which related the matrix array literal toArray.ofFn fun k => A k.divNat k.modNatby an unchecked=Qequality. This cannot be checked by the kernel becauseArray.ofFnis not exposed. The solution here is to useList.ofFninstead, which is exposed. Similarly, the functionscertEntryandcertIterStepEntryin the Bird determinant certificate evaluator relied on definitional unfolding ofBirdDet.getandBirdDet.stepEntrywhich are not exposed. The generated proofs now use the unfolding lemmasBirdDet.get_eqandBirdDet.stepEntry_eqinstead.