-
Notifications
You must be signed in to change notification settings - Fork 437
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
split
runs out of heartbeats with nested matches and as-patterns
#6065
Comments
The issue isn’t the unfolding, it’s what happens afterwards; and it seems to be related to creating the splitter =: def foo (r : Nat) : Nat :=
match r with
| Nat.zero => 0
| l@(Nat.succ _) =>
match l with
| 0 => 0
| Nat.succ ll =>
match ll with
| Nat.succ _ => 0
| _ => 0
set_option maxHeartbeats 20000
/--
error: (deterministic) timeout at `whnf`, maximum number of heartbeats (20000) has been reached
Use `set_option maxHeartbeats <num>` to set the limit.
Additional diagnostic information may be available using the `set_option diagnostics true` command.
-/
#guard_msgs in
example {r : Nat} : foo r = 0 := by
unfold foo
-- trace_state
split
· rfl
· split
· rfl
· split |
nomeata
changed the title
Nov 13, 2024
simp
runs out of heartbeats when unfolding a definitionsimp
runs out of heartbeats with nested matches and as-patterns
nomeata
changed the title
Nov 13, 2024
simp
runs out of heartbeats with nested matches and as-patternssplit
runs out of heartbeats with nested matches and as-patterns
3 tasks
leodemoura
added a commit
that referenced
this issue
Nov 21, 2024
…orem This PR fixes a non-termination bug that occurred when generating the match-expression splitter theorem. The bug was triggered when the proof automation for the splitter theorem repeatedly applied `injection` to the same local declaration, as it could not be removed due to forward dependencies. See issue #6065 for an example that reproduces this issue. closes #6065
github-merge-queue bot
pushed a commit
that referenced
this issue
Nov 21, 2024
…orem (#6146) This PR fixes a non-termination bug that occurred when generating the match-expression splitter theorem. The bug was triggered when the proof automation for the splitter theorem repeatedly applied `injection` to the same local declaration, as it could not be removed due to forward dependencies. See issue #6065 for an example that reproduces this issue. closes #6065
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Please put an X between the brackets as you perform the following steps:
https://github.com/leanprover/lean4/issues
Avoid dependencies to Mathlib or Batteries.
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
Context
Found while working on the ordered tree.
Expected behavior: No error
Actual behavior: See above
Versions
4.15.0-nightly-2024-11-13
on live.lean-lang.orgImpact
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: