Keep the Proof State Live: Snapshotting for Efficient Tactic Search in Lean 4
Not on the map. Why?
Abstract (arXiv)
Automated theorem proving systems built on Lean 4 increasingly rely on parallel tactic search over partially specified proofs, such as those generated by Draft-Sketch-Prove (DSP) pipelines. In current systems, each search branch reconstructs a proof state by re-running elaboration, leading to substantial per-branch overhead. In Lean 4 with Mathlib, this cost has two components: (1) import loading, which deserializes pre-compiled libraries (~60 s per branch); and (2) theorem-body elaboration, which re-checks the theorem context up to the target goal (estimated 18-735 s depending on proof complexity). Together, these account for >99% of per-branch wall time, making portfolio-based search impractical at scale. We observe that this overhead arises from a mismatch between the structure of proof search and its execution model: branching is implemented via repeated reconstruction of proof states rather than direct reuse. To address this, we introduce proof-state snapshotting, which captures the elaborated proof state once and reuses it across branches via a small extension to the Lean 4 language server. Across 48 miniF2F-v2 problems (45 prove-phase benchmarks and 3 full end-to-end runs), our approach achieves a 5.6-50x wall-time speedup over the standard fallback (average 14x, median 9.7x). Speedup increases with the number of proof branches. Our method is orthogonal to import-level caching (e.g., Kimina Lean Server), which avoids import loading but not theorem-body elaboration. The patched Lean binary and the Snapshot-DSP pipeline will be released as open source upon publication.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 11 of its 15 references that are in the map. First posted on arXiv 25 May 2026.
Builds on
11 of 15 references.
References · 11
- 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Modelscited by 414
- 2022Draft, Sketch, and Prove: Guiding Formal Theorem Provers with Informal Proofscited by 278
- 2025DeepSeek-Prover-V2: Advancing Formal Mathematical Reasoning via Reinforcement Learning for Subgoal Decompositioncited by 270
- 2023LEGO-Prover: Neural Theorem Proving with Growing Librariescited by 108
- 2024Lean Copilot: Large Language Models as Copilots for Theorem Proving in Leancited by 52
- 2024LeanAgent: Lifelong Learning for Formal Theorem Provingcited by 34
- 2025Reviving DSP for Advanced Theorem Proving in the Era of Reasoning Modelscited by 17
- 2025Kimina Lean Server: A High-Performance Lean Server for Large-Scale Verificationcited by 16
- 2024Pantograph: A Machine-to-Machine Interaction Interface for Advanced Theorem Proving, High Level Reasoning, and Data Extraction in Lean 4cited by 15
- 2025miniF2F-Lean Revisited: Reviewing Limitations and Charting a Path Forwardcited by 13
- 2025LeanTree: Accelerating White-Box Proof Search with Factorized States in Lean 4cited by 3
Built on by
Not cited yet.