Optimize homology certificate generation - #1
Merged
Conversation
Prove the simplicial chain condition at the coefficient level in a new `Boundary/ChainCondition.lean`: - `eraseIdx_eraseIdx_of_le`/`_of_lt`: list-level simplicial face identity (the `List.eraseIdx` analogue of `SimplicialObject.δ_comp_δ`). - `boundaryCoeff_eraseIdx` / `boundaryCoeff_eq_zero_iff`: characterize the incidence coefficient on faces and non-faces (needs `Nodup`). - `boundaryCoeff_eq_sum`: express `boundaryCoeff` as an explicit sum over deletion indices, exposing the inner index. - `boundary_sq_coeff`: the headline — the alternating sum over deletion indices of the iterated boundary coefficient into a fixed target vanishes, proved by a sign-reversing involution on index pairs (`Finset.sum_involution`). This is the basis-independent combinatorial core of ∂∘∂ = 0; bridging it to `boundaryMatrix` (via canonicalBasisRaw completeness) is still TODO. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Remove the sparse `(row,col,val)` matrix encoding (`lookupSparseMatrix`, `sparseRowsToMatrix`) from `SageDecode.lean` and the corresponding `decodeSerializableSparseEntriesExpr`/`mkSparseEntryExpr`/ `sparseEntriesToMatrixExpr` pipeline in `SNF/Tactic.lean`; the tactic now builds all SNF witness matrices through the dense `rowsToMatrix` path (U,U⁻¹ at m×m, D at m×n, V,V⁻¹ at n×n). - Prove the U·U⁻¹ = 1 and V·V⁻¹ = 1 obligations via a reflected Bool computation (`MatrixReflect.mulIsOneB` + `rowsToMatrix_mul_eq_one`) instead of `native_decide` on Mathlib matrix multiplication. - Drop the deferred `Later/` SNF bridge/quotient experiments. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lucyhorowitz
marked this pull request as ready for review
June 1, 2026 14:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
update certificate proof generation to be efficient for once