Zulip Chat Archive
Stream: lean4
Topic: simp: maximum recursion depth
Marcus Rossel (May 08 2024 at 06:31):
Is this expected?:
variable (h : ∀ (p : Nat → Nat) (x : Nat), p x = p (x + 0))
example (f : Nat → Nat → Nat) : (f 1) x = (f 1) (x + 0) := by
simp [h] -- tactic 'simp' failed, nested error: maximum recursion depth has been reached
Sébastien Gouëzel (May 08 2024 at 06:59):
Yes, it's expected. Lean sees (f 1) x
, it replaces it with (f 1) (x + 0)
thanks to h
, then with (f 1) (x + 0 + 0)
thanks to h
, and so on. It doesn't zoom out after the first step to see that the equality becomes trivial, because it completes its work on a subexpression before zooming out.
Last updated: May 02 2025 at 03:31 UTC