lean4-htt/tests/lean/run/grind_11539_2.lean
Leonardo de Moura ea10bdf154
feat: improve case-split heuristic in grind (#11609)
This PR improves the case-split heuristics in `grind`. In this PR, we do
not increment the number of case splits in the first case. The idea is
to leverage non-chronological backtracking: if the first case is solved
using a proof that doesn't depend on the case hypothesis, we backtrack
and close the original goal directly. In this scenario, the case-split
was "free", it didn't contribute to the proof. By not counting it, we
allow deeper exploration when case-splits turn out to be irrelevant.
The new heuristic addresses the second example in #11545
2025-12-11 10:42:17 +00:00

5 lines
202 B
Text

example (a b : Nat) (f g : Nat → Nat)
(hf : (∀ i ≤ a, f i ≤ f (i + 1)) ∧ f 0 = 0)
(hg : (∀ i ≤ b, g i ≤ g (i + 1)) ∧ g 0 = 0 ∧ g b = 0) :
g (a + b - a) = 0 := by
grind