🤖 AI Summary
This work addresses the limitations of traditional Lean 4’s grind tactic, which relies on handcrafted heuristics that struggle to balance generality and efficiency in instantiation and case-splitting decisions, while learned strategies often compromise existing proofs due to non-monotonic search. To overcome these issues, the authors propose a failure-triggered, cascaded learning intervention framework that dynamically invokes learned strategies to guide bounded search only after grind fails, ensuring reliability through sound symbolic fallback mechanisms that preserve the original proving capability. The approach integrates a cost-aware ematch filter with lookahead steps and employs a runtime feature model to inform intervention decisions. Experimental results demonstrate a ~5% speedup in grind execution, the resolution of several previously unsolved problems, and successful proofs of five theorems that originally timed out, while also revealing the limited efficacy of static prediction for case-splitting tasks.
📝 Abstract
Lean~4's \grind{} tactic combines congruence closure, \ematch{}ing, and case-splitting into a single automated solver, and like any such solver, it relies on hand-tuned heuristics to decide what to instantiate and where to case-split. These heuristics are tempting targets for learning, but there is a catch: because \grind{}'s search is non-monotone, a learned heuristic that helps one proof can break another, and an always-on replacement usually nets out near zero. We avoid this by invoking a learned intervention only after stock \grind{} has already failed: a failure-triggered cascade that, by construction, cannot lose a proof \grind{} already had. We apply it to two of \grind{}'s internal decisions. A cost-aware \ematch{} filter solves slightly more problems and runs about 5\% faster. A lookahead step, proves five theorems it otherwise times out on. We also report the negative result that motivated the design: across four feature-based models, statically predicting the correct case split is no better than random, because whether a split explodes is a runtime property that the features do not capture. Our results suggest that learning within theorem-proving tactics is most effective as a mechanism for deciding when and how to spend bounded search, backed by a reliable symbolic fallback.