You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RFC: Recover better from a deterministic timeout. #3554
I think it would be nice if Lean deals a bit better when it reaches a deterministic timeout. In a typical case my timeout happens during elaboration/tactic executing of the proof of a theorem, and I would like Lean to still treat that declaration as if there was a sorry/other error in the proof
In particular:
It should show mouse-over information over the term that it parsed
It should add the declaration (with proof sorry'd) to the environment if the type was elaborated successfully
Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add 👍 to it.
Reacted by Timo Carlin-Burns, Geoffrey Irving, Richard Osborn, Julian Berman, damiano, Mario Carneiro, Matthew Robert Ballard, Michael Rothgang and Patrick Massot
I expect that this is a special case of #3831 (which has small mwe's) when the deterministic timeout occurs during elaboration (and not during tactic execution).
This realization made it easy to find a MWE for this issue:
deffoo : Nat → Nat
| 0 => 0
| n+1 => foo n + 1set_option maxHeartbeats 100in/- note: when we remove this, there is a max recursion depth error, and that also causes bar to not be added to the environment -/theorembar : True := by
simp [show foo 1000 = 1000from rfl] -- (deterministic) timeout#print bar -- unknown constant 'bar'
Activity
leodemoura commentedon Mar 6, 2024
@fpvandoorn Could you please attach an example?
The following example seems to be doing what you want.
Here is the hover over

f.fpvandoorn commentedon Mar 7, 2024
I get the same desired behavior on your example. I'll try to attach an example the next time I encounter this.
fpvandoorn commentedon Apr 3, 2024
I expect that this is a special case of #3831 (which has small mwe's) when the deterministic timeout occurs during elaboration (and not during tactic execution).
fpvandoorn commentedon Apr 3, 2024
This realization made it easy to find a MWE for this issue:
I expect it is indeed the same cause as #3831.
feat: recover from runtime errors in tactics
feat: recover from runtime errors in tactics (#4130)