fix: allow restoring erased simp attributes - #14657
Open
sankalpsthakur wants to merge 4 commits into
Open
Conversation
|
Mathlib CI status (docs):
|
Collaborator
|
Reference manual CI status:
|
mathlib-nightly-testing Bot
pushed a commit
to leanprover-community/batteries
that referenced
this pull request
Aug 4, 2026
mathlib-nightly-testing Bot
pushed a commit
to leanprover-community/mathlib4-nightly-testing
that referenced
this pull request
Aug 4, 2026
sankalpsthakur
marked this pull request as ready for review
August 4, 2026 03:29
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.
This PR lets an explicit
attribute [simp]restore a theorem or definition afterattribute [-simp]erased it in the current environment.Simp erasure records an origin in a separate tombstone set. Re-adding the corresponding simp entry populated the theorem data again but left that tombstone in place, so the simplifier continued to ignore it.
Clear the matching tombstone when the attribute handler explicitly re-adds a proposition, definition, or generated equation theorem. The existing erase-simp test now includes the reproducer from #5868.
Closes #5868
Validation
tests/elab/eraseSimp.leanAI assistance
AI tools assisted with issue triage, extension-state analysis, implementation, and regression preparation. I reviewed the tombstone semantics, reverse simp origins, definition equation entries, and final diff.