perf: avoid exponential traversal in smart unfolding This PR fixes a performance issue where smart unfolding could take exponential time on function arguments with shared subterms. The new regression tests expose the slowdown. The `loop` and `acc` proofs now take about 21 and 42 heartbeats, respectively.
This is the repository for Lean 4.
See Install Lean.
Please read our Contribution Guidelines first.
See Building Lean.