-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: fix superfluous lemmas in simp.trace #2923
Merged
Merged
Conversation
This file contains 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
leodemoura
reviewed
Nov 20, 2023
kim-em
force-pushed
the
backtrack_used_simps
branch
2 times, most recently
from
November 20, 2023 13:01
749bea7
to
0831ae8
Compare
github-actions
bot
added
the
toolchain-available
A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
label
Nov 20, 2023
|
leodemoura
reviewed
Nov 21, 2023
kim-em
force-pushed
the
backtrack_used_simps
branch
from
November 22, 2023 03:56
1e11c50
to
6ff569d
Compare
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Nov 22, 2023
leanprover-community-mathlib4-bot
added
the
breaks-mathlib
This is not necessarily a blocker for merging: but there needs to be a plan
label
Nov 22, 2023
Lovely -- the mathlib failures are |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 24, 2023
We noticed at #2923 (comment) that this instance is not used. It's arguably also incorrect (as it doesn't backtrack the `usedTheorems` field). Seems better to just remove to avoid confusion. Evidence that this is dead code: * After deleting the instance, calling `saveState` in the `SimpM` monad raises an error `failed to synthesize instance MonadBacktrack PUnit SimpM`. * Understanding the `MonadBacktrack` monad leads one to believe that would have happened, via the fact that the only instances for `MonadBacktrack` are either concrete instances (e.g. for `MetaM`, `TacticM`, etc), or a single lifting instance `instance [MonadBacktrack s m] [Monad m] : MonadBacktrack s (ExceptT ε m)`. (This is good and correct behaviour: lifting instances for `MonadBacktrack` would be hard to model.) * Mathlib builds after the instance is removed. Potential evidence that I have not sought, because we don't have sufficient tooling: * Compiling Lean/Std/Mathlib with a debugger, breaking on entering this code.
leodemoura
approved these changes
Dec 1, 2023
kim-em
force-pushed
the
backtrack_used_simps
branch
from
December 11, 2023 23:36
6ff569d
to
803ed2a
Compare
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Dec 11, 2023
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Dec 12, 2023
mathlib-bors bot
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Dec 14, 2023
This PR is targeting the `bump/v4.5.0` branch. It contains the adaptations required for leanprover/lean4#2923, which have now landed in the `2023-12-12` nightly toolchain. The only changes are in `simp [...] says ...` statements, where some spurious lemmas are now no longer reported. *Many* further `simp only` statements in Mathlib contain spurious lemmas which would now no longer be produced by a fresh `simp?`, and I would strongly encourage anyone interested in removing these! For now such changes will need to be made in a PR targeting `bump/v4.5.0` (like this PR), or in January they can be done on `master`. Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
mathlib-bors bot
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Dec 22, 2023
…h. (#9188) This PR: * bumps to lean-toolchain to `v4.5.0-rc1` * bumps the Std and Aesop dependencies to their versions using `v4.5.0-rc1` * merge the already reviewed changes from the `bump/v4.5.0` branch * adaptations for leanprover/lean4#2923 in #9011 * adaptations for leanprover/lean4#2973 in #9161 * adaptations for leanprover/lean4#2964 in #9176 Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaks-mathlib
This is not necessarily a blocker for merging: but there needs to be a plan
toolchain-available
A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
will-merge-soon
…unless someone speaks up
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.
Fixes an issue reported on Zulip; see the test case.
MonadBacktrack
instance forSimpM
to also backtrack theUsedSimps
field.saveState
, and thenrestoreState
if something goes wrong.I'm not certain that it makes sense to restore the
MetaM
state if discharging fails. I can easily change this to more conservatively just backtrack theUsedSimps
after failed discharging.