Skip to content

Optimize homology certificate generation - #1

Merged
lucyhorowitz merged 4 commits into
masterfrom
chain-condition
Jun 1, 2026
Merged

Optimize homology certificate generation#1
lucyhorowitz merged 4 commits into
masterfrom
chain-condition

Conversation

@lucyhorowitz

@lucyhorowitz lucyhorowitz commented Jun 1, 2026

Copy link
Copy Markdown
Owner

update certificate proof generation to be efficient for once

lucyhorowitz and others added 4 commits May 31, 2026 12:24
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
lucyhorowitz marked this pull request as ready for review June 1, 2026 14:15
@lucyhorowitz
lucyhorowitz merged commit f91cf57 into master Jun 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant