Lune

NeurIPS2025Top-tier venue

APOLLO: Automated LLM and Lean Collaboration for Advanced Formal Reasoning

Azim Ospanov, Farzan Farnia, Roozbeh Mohit

Abstract

Formal reasoning and automated theorem proving constitute a challenging subfield of machine learning, in which machines are tasked with proving mathematical theorems using formal languages like Lean. A formal verification system can check whether a formal proof is correct or not almost instantaneously, but generating a completely correct formal proof with large language models (LLMs) remains a formidable task. The usual approach in the literature is to prompt the LLM many times (up to several thousands) until one of the generated proofs passes the verification system. In this work, we present APOLLO (Automated PrOof repair via LLM and Lean cOllaboration), a modular, model-agnostic agentic framework that combines the strengths of the Lean compiler with an LLM's reasoning abilities to achieve better proof-generation results at a low token and sampling budgets. Apollo directs a fully automated process in which the LLM generates proofs for theorems, a set of agents analyze the proofs, fix the syntax errors, identify the mistakes in the proofs using Lean, isolate failing sub-lemmas, utilize automated solvers, and invoke an LLM on each remaining goal with a low top-K budget. The repaired sub-proofs are recombined and reverified, iterating up to a user-controlled maximum number of attempts. On the miniF2F benchmark, we establish a new state-of-the-art accuracy of 84.9% among sub 8B-parameter models (as of August 2025) while keeping the sampling budget below one hundred. Moreover, Apollo raises the state-of-the-art accuracy for Goedel-Prover-SFT to 65.6% while cutting sample complexity from 25,600 to a few hundred. General-purpose models (o3-mini, o4-mini) jump from 3-7% to over 40% accuracy. Our results demonstrate that targeted, compiler-guided repair of LLM outputs yields dramatic gains in both efficiency and correctness, suggesting a general paradigm for scalable automated theorem proving. The codebase is available at https://github.com/aziksh-ospanov/APOLLO

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Process-Verified Reinforcement Learning for Theorem Proving via Lean cites Llemma: An Open Language Model for Mathematics
  • Process-Verified Reinforcement Learning for Theorem Proving via Lean cites miniF2F: a cross-system benchmark for formal Olympiad-level mathematics
  • Process-Verified Reinforcement Learning for Theorem Proving via Lean cites HyperTree Proof Search for Neural Theorem Proving
  • Llemma: An Open Language Model for Mathematics cites Thor: Wielding Hammers to Integrate Language Models and Automated Theorem Provers
  • Llemma: An Open Language Model for Mathematics cites miniF2F: a cross-system benchmark for formal Olympiad-level mathematics
  • Llemma: An Open Language Model for Mathematics cites HyperTree Proof Search for Neural Theorem Proving
  • Thor: Wielding Hammers to Integrate Language Models and Automated Theorem Provers cites miniF2F: a cross-system benchmark for formal Olympiad-level mathematics
  • HyperTree Proof Search for Neural Theorem Proving cites miniF2F: a cross-system benchmark for formal Olympiad-level mathematics
  • ProofOptimizer: Training Language Models to Simplify Proofs without Human Demonstrations cites miniF2F: a cross-system benchmark for formal Olympiad-level mathematics
  • ProofOptimizer: Training Language Models to Simplify Proofs without Human Demonstrations cites HyperTree Proof Search for Neural Theorem Proving
  • MathlibLemma: Folklore Lemma Generation and Benchmark for Formal Mathematics cites miniF2F: a cross-system benchmark for formal Olympiad-level mathematics
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Process-Verified Reinforcement Learning for Theorem Proving via LeanMinsu Kim, Se-Young YunICLR 2026 · 16 citations
  2. ProofOptimizer: Training Language Models to Simplify Proofs without Human DemonstrationsAlex Gu, Bartosz Piotrowski, Fabian Gloeckle, Kaiyu Yang et al.ICLR 2026 · 11 citations
  3. MathlibLemma: Folklore Lemma Generation and Benchmark for Formal MathematicsXinyu Liu, Zixuan Xie, Amir Moeini, Claire Chen et al.ICML 2026 · 2 citations

Builds on17

  1. Llemma: An Open Language Model for MathematicsZhangir Azerbayev, Hailey Schoelkopf, Keiran Paster, Marco Dos Santos et al.ICLR 2024 · 433 citations
  2. miniF2F: a cross-system benchmark for formal Olympiad-level mathematicsKunhao Zheng, Jesse Michael Han, Stanislas PoluICLR 2022 · 342 citations
  3. HyperTree Proof Search for Neural Theorem ProvingGuillaume Lample, Timothée Lacroix, Marie-Anne Lachaux, Aurélien Rodriguez et al.NeurIPS 2022 · 271 citations
  4. Thor: Wielding Hammers to Integrate Language Models and Automated Theorem ProversAlbert Qiaochu Jiang, Wenda Li, Szymon Tworkowski, Konrad Czechowski et al.NeurIPS 2022 · 154 citations
  5. Self-Supervised Bug Detection and RepairMiltiadis Allamanis, Henry Jackson-Flux, Marc BrockschmidtNeurIPS 2021 · 145 citations

Related papers

  1. Hilbert: Recursively Building Formal Proofs with Informal ReasoningSumanth Varambally, Thomas Voice, Yanchao Sun, Zhifeng Chen et al.ICLR 2026 · 62 citations
  2. HERMES: Towards Efficient and Verifiable Mathematical Reasoning in LLMsAzim Ospanov, Zijin Feng, Jiacheng Sun, Haoli Bai et al.ICML 2026 · 5 citations
  3. FormalML: A Benchmark for Evaluating Formal Subgoal Completion in Machine Learning TheoryXiao-Wen Yang, Zihao Zhang, Jianuo Cao, Zhi Zhou et al.ICLR 2026 · 8 citations
  4. MA-LoT: Model-Collaboration Lean-based Long Chain-of-Thought Reasoning enhances Formal Theorem ProvingRuida Wang, Rui Pan, Yuxin Li, Jipeng Zhang et al.ICML 2025
  5. ImProver: Agent-Based Automated Proof OptimizationRiyaz Ahuja, Jeremy Avigad, Prasad Tetali, Sean WelleckICLR 2025
Dusk over the sea between two cliffs drawn in fine vertical lines