-
Notifications
You must be signed in to change notification settings - Fork 462
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
feat: allow users to disable simpCtorEq
simproc
#5167
Conversation
Mathlib CI status (docs):
|
TODO: we must update-stage0 after merging this PR, and then remove staging workarounds. |
Managed to build stage2 locally. |
@semorrison I had to add a few workarounds to build stage2. I will cleanup after merging the PR, and updating stage0. |
About the naming of the simproc: judging from the code it only works for equalities between different constructors, but doesn't apply injectivity? The name could make users believe that it would. Also do we have a consistent naming scheme for simprocs? I think it's worth thinking about a good name for a moment here, as due to Maybe to stick to existing jargon, why not |
And while we are at it: I would find it useful if, when reading code (either as a learner or as a reviewer) I could quickly grasp which So a consistent naming convention for simprocs may be useful. I’d say it needn’t have I was thinking about using a Most (all?) of the simprocs in core are called |
Note that the |
I am not opposing this suggestion, but it should be a different PR if users see a benefit on this change. Remark: it will break many proofs in Mathlib. |
We use the injectivity theorems for that. We can add a docstring to make it clear the simproc only handles the different constructor case. |
The simproc is renamed to `reduceCtorEq`. closes #5046
We added this option to ensure `simproc`s do not invoke `whnf`. `simp` is already reducing the terms.
#5167 removed `reduceCtorEq` from the default simproc set. `norm_cast` relies on it, so we add it back in there.
Prior to leanprover/lean4#5167, this test (would have) had a less helpful error message.
simp only
will not apply this simproc anymore. Users must now writesimp only [reduceCtorEq]
. See RFC #5046 for motivation.This PR also renames simproc to
reduceCtorEq
.close #5046
@semorrison A few
simp only ...
tactics will probably break in Mathlib. Fix: includereduceCtorEq
.