`try?` errors because `simp` errors
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
Prerequisites
- [X ] Check that your issue is not already filed:
https://github.com/leanprover/lean4/issues - [X ] Reduce the issue to a minimal, self-contained, reproducible test case.
Avoid dependencies to Mathlib or Batteries. - [ X] Test your test case against the latest nightly release, for example on
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
In the following a simple grind only would succeed, but nothing is suggested by try? since it errors out
(probably because it tries simp and that errors out).
example (f : Nat → Nat) (x : Nat) (h : x = f x) : x = f (f x) := by
/-
Tactic `simp` failed with a nested error:
maximum recursion depth has been reached
use `set_option maxRecDepth <num>` to increase limit
use `set_option diagnostics true` to get diagnostic information
-/
try?
Expected Behaviour
I believe that the simp error should be caught and proof search via the other registered tactics should continue.
A warning that simp errored out would be useful, but it shouldn't completely disable the try? tactic.
Context
This more frequently happens with simp_all since this is much more likely to loop accidentally.
Versions
Lean 4.29.0
Additional Information
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal reproducer in the issue and inspect the try? proof-search entry point, especially how errors from simp and simp_all are handled. Done means proof search continues with other registered tactics after those errors, with a useful warning if appropriate, and the example succeeds via grind only.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100