-
Notifications
You must be signed in to change notification settings - Fork 465
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
"failed to generate equational theorem" with nested matches #3219
Comments
(Could you include the failing code in the code samples above? It is there in the code playground link, but missing here.) |
Sure, I've updated the bug description. |
3 tasks
This works now, possibly due to #6901 (will confirm later which nightly unbroke it). |
nomeata
added a commit
that referenced
this issue
Feb 4, 2025
Indeed, it looks as if #6901 fixed this. |
luisacicolini
pushed a commit
to opencompl/lean4
that referenced
this issue
Feb 24, 2025
This includes the examples from issues leanprover#2961, leanprover#3219 and leanprover#5667 in our test suite, so that we know when (accidentially) fix them. In fact this closes leanprover#3219, which (judging from the nightlies) was fixed last week by leanprover#6901.
luisacicolini
pushed a commit
to opencompl/lean4
that referenced
this issue
Feb 25, 2025
This includes the examples from issues leanprover#2961, leanprover#3219 and leanprover#5667 in our test suite, so that we know when (accidentially) fix them. In fact this closes leanprover#3219, which (judging from the nightlies) was fixed last week by leanprover#6901.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Description
The unfold tactic fails with nested matches, for instance:
(Lean4 Web link)
The issue seems to be related to the nested matches, because for this slightly refactored code snippet unfold does work:
(Lean4 Web Link)
Context
I encountered this while playing around with a heap implemented in the form of a tree. Here is the full source file in its non-compiling state. A similar refactor to the one shown in the two code snippets above allowed to work around the problem there as well.
Since I was unsure if this had already been reported, I mentioned it as a comment on this other bug report, but was advised to file a different report instead.
Steps to Reproduce
unfold
the popLast function given in the first code snippet aboveExpected behavior: Unfold succeeds
Actual behavior: Unfold fails and gives the error message "failed to generate equational theorem for 'popLast'"
Versions
Observed in 4.5.0-rc1 on Lean4 Web, and 4.2.0 on my local Gentoo Linux installation.
Additional Information
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: