-
Notifications
You must be signed in to change notification settings - Fork 345
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
simp
not unifying partial application of structure projection
#1937
Comments
Closed
1 task
The commit above adds support for projection functions to our indexing data structure. @[simp] theorem toFun_eq_otherProjection : a.toFun = otherProjection a := rfl to ensure the LHS is represented using a |
bors bot
pushed a commit
to leanprover-community/mathlib4
that referenced
this issue
Oct 24, 2023
This `simp` lemma was added during the port but tagged as probably unnecessary after fixing leanprover/lean4#1937. This PR confirms it is indeed no longer necessary. The only proofs that needed fixing were the one explicitly calling the new simp lemma. The porting note can go too.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Description
In the mathlib4 port, certain
simp
lemmas that would apply in Lean 3 no longer apply in Lean 4 in the same case. It looks like this happens whenever we have astructure
containing a field with a function, and asimp
lemma is defined on the partially applied function in that field.simp
has no trouble with partial application if it's on other definitions.Steps to Reproduce
The following code contains two failing
simp
calls whererw
succeeds. Equivalent code works fine in Lean 3.Expected behavior: the
simp
calls on both lines marked-- does not simplify anything
should solve the goalActual behavior:
simp
fails to rewrite. Withtrace.Meta.Tactic.simp
on, the firstsimp
call gives the following trace:Reproduces how often: always
Versions
You can get this information from copy and pasting the output of
lean --version
,please include the OS and what version of the OS you're running.
$ lean --version Lean (version 4.0.0-nightly-2022-12-09, commit 57a6aefb9240, Release) $ uname -a Linux vouwvervorming 6.0.10-arch2-1 #1 SMP PREEMPT_DYNAMIC Sat, 26 Nov 2022 16:51:18 +0000 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: