Fix, Not Just Resample: Bounded Compiler-Guided Repair in Lean 4
Not on the map. Why?
Abstract (arXiv)
Automated theorem provers often rely on sampling language models, but proof assistants like Lean reject each failed step with a precise error message --- information that pure sampling discards. To overcome this, we introduce a bounded, online step-level repair module. Our search samples K candidate tactics at each step and repairs a failed tactic at most R times. Instead of discarding failed tactics, we feed the compiler's error message to a pretrained repair model to fix individual rejected steps in place. This approach improves the solve rate over a sampling-only baseline across all tested candidate budgets (K ∈ 1,3,5,8), achieving up to a 32% relative gain and solving 82 additional theorems on a 1,990-theorem subset of the LeanDojo benchmark. Repair is not free: it trades extra runtime for reachable proofs. But the trade is predictable: repair pays most when sampling is constrained; its return is front-loaded, with the first repair attempt capturing 84--96% of the total gain; and the gain comes almost entirely from shallow tactic-execution failures rather than structural errors such as type mismatches. This targeted repair successfully replicates on a second benchmark (Lean Workbook), nearly doubling the solve rate with zero regressions.
Key facts. No citing papers in the map yet (data through 26 Nov 2026). Builds on 10 of its 14 references that are in the map. Submitted 18 Oct 2026.
Builds on
10 of 14 references.
References · 10
- 2024Large Language Monkeys: Scaling Inference Compute with Repeated Samplingcited by 1,124
- 2024Lean Workbook: A large-scale Lean problem set formalized from natural language math problemscited by 133
- 2024Lean Copilot: Large Language Models as Copilots for Theorem Proving in Leancited by 69
- 2025APOLLO: Automated LLM and Lean Collaboration for Advanced Formal Reasoningcited by 41
- 2025Type-Constrained Code Generation with Language Modelscited by 40
- 2024InternLM2.5-StepProver: Advancing Automated Theorem Proving via Critic-Guided Searchcited by 37
- 2025REAL-Prover: Retrieval Augmented Lean Prover for Mathematical Reasoningcited by 23
- 2025ChopChop: a Programmable Framework for Semantically Constraining the Output of Language Modelscited by 21
- 2025ProofAug: Efficient Neural Theorem Proving via Fine-grained Proof Structure Analysiscited by 13
- 2026Learning to Repair Lean Proofs from Compiler Feedbackcited by 11
Built on by
Not cited yet.