-
Notifications
You must be signed in to change notification settings - Fork 415
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
New stack overflow on simp
s dealing with UInt64
#3267
Comments
I also had this issue when updating to latest Lean/mathlib recently. The issue seems to be with having a looping set of simp-lemmas (in your example, |
Here are some examples that show roughly the boundary between the panic occurring and not occuring. namespace error
def a : Nat := 0
@[simp] theorem h1 : 0 = a := rfl
@[simp] theorem h2 : a = 0 := rfl
example (x : Nat) : x = 0 := by
simp only [h1, h2] -- causes a panic
end error
namespace works
def a : Bool := false
@[simp] theorem h1 : a = false := rfl
@[simp] theorem h2 : false = a := rfl
example (x : Bool) : x = false := by
simp only [h1, h2] -- gives a normal error (expected)
end works
namespace also_works
def a : Nat := 0
def b : Nat := 0
@[simp] theorem h1 : b = a := rfl
@[simp] theorem h2 : a = b := rfl
example (x : Nat) : x = a := by
simp only [h1, h2] -- gives a normal error (expected)
end also_works |
Stack overflow does not happen anymore. The new error message is
If we add |
Yes, the issue is solved on my side |
Prerequisites
Description
After updating to
leanprover/lean4:v4.6.0-rc1
, I get new crashes when usingsimp
. Here is a no-import example:which if run in VSCode results in
Context
I got several of these crashes in my https://github.com/girving/ray repo after updating Lean and Mathlib (4 or 5 total), all in code proving things about
UInt64
or anInt64
type built on top ofUInt64
.Zulip discussion
Steps to Reproduce
Expected behavior: It builds.
Actual behavior: It crashes with a stack overflow.
Versions
macOS 14.2.1
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: