OProver: A Unified Framework for Agentic Formal Theorem Proving

M-A-P · 2026

Read OProver: A Unified Framework for Agentic Formal Theorem Proving by M-A-P (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-17283.txt.

Introduction

Ma and colleagues present OProver, a unified framework for agentic theorem proving in Lean 4 that folds agent behavior into training rather than leaving it to inference. Failed proofs are revised with compiler feedback and retrieved verified proofs, feeding repair data and hard cases back into training. Its OProofs corpus holds 1.77 million statements and 6.86 million verified proofs, and the 32-billion-parameter model leads three of five benchmarks.

Catalog record

CREATORM-A-P
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE62320
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2605.17283

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

OProver: A Unified Framework for Agentic Formal Theorem Proving M-A-P Abstract Recent progress in formal theorem proving has benefited from large-scale proof generation and verifier-aware training, but agentic proving is rarely integrated into prover training, appearing only at inference time. We present OProver, a unified framework for agentic formal theorem proving in Lean 4, in which failed proof attempts are iteratively revised using retrieved compiler-verified proofs and Lean compiler feedback. OProver is trained through continued pretraining followed by iterative post-training: each iteration runs agentic proving, indexes newly verified proofs into OProofs and the retrieval memory, uses repair trajectories as SFT data, and uses unresolved hard cases for RL. OProofs is built from public Lean resources, large-scale proof synthesis, and agentic proving traces, containing 1.77M Lean statements, 6.86M compiler-verified proofs, and serialized trajectories with retrieved context, failed attempts, feedback, and repairs. Across five benchmarks, OProver-32B attains the best Pass@32 on MiniF2F (93.3%), ProverBench (58.2%), and PutnamBench (11.3%), and ranks second on MathOlympiad (22.8%) and ProofNet (33.2%)—more top placements than any prior open-weight whole-proof prover. Figure 1 : Pass@32 performance on MiniF2F-Test, PutnamBench, and MathOlympiadBench. OProver consistently outperforms prior open-source whole-proof provers across all three benchmarks; the only exception is LongCat-Flash-Prover with TIR on MathOlympiadBench. 1 Introduction Formal theorem proving in systems such as Lean 4 [ 4 ] provides a rigorous setting for machine reasoning, where every step of a proof is mechanically verified by a small, trusted kernel. This makes them a natural foundation for reliable mathematical reasoning and verified software, but also imposes a high bar: a proof is accepted only if it is fully formal and type-correct. Recent prover systems built on Lean have substantially improved performance on challenging benchmarks such as MiniF2F [ 36 ] and PutnamBench [ 26 ] , yet absolute success rates on harder benchmarks remain low, and most systems still rely primarily on single-pass or best-of- N whole-proof generation. Retrieval and compiler feedback, when used at all, are typically applied as test-time heuristics rather than as a proving policy that the prover is trained to use, leaving an important source of supervision largely unexploited. A small but growing line of work has begun to incorporate retrieval, compiler feedback, and iterative repair into formal theorem proving [ 33 , 13 , 30 ] . However, these capabilities are typically introduced as inference-time augmentations on top of a fixed prover, rather than as a learned policy that the model is trained to use. As a result, a prover trained mainly on finalized proofs sees compiler feedback and retrieved evidence only at deployment, in distributions it was never optimized for. Closing this train–inference mismatch requires training the prover to perform retrieval-grounded, feedback-conditioned refinement as part of its policy, not as a separate inference-time procedure. Training such a policy in turn requires data that existing formal corpora do not provide. Public formal theorem proving corpora and proof-synthesis datasets [ 29 , 34 , 20 ] focus on the end products of proving: large collections of formal statements and final compiler-verified proofs. In general, they omit failed attempts, retrieved context, and compiler diagnostics that drive proof repair in practice. Autoformalization and proof synthesis have greatly expanded the number of available statements and verified proofs, but they do not by themselves record the multi-round interaction histories needed to learn agentic self-correction. What is missing is therefore not more verified proofs, but corpora that explicitly preserve how proofs are constructed, fail, and get repaired. In this paper, we present OProver , a unified framework for agentic formal theorem proving in Lean 4. Rather than treating retrieval, compiler feedback, and iterative repair as separate inference-time modules built on top of a fixed prover, OProver unifies them with training and data construction into a single proving framework. At inference time, OProver treats proving as a multi-round refinement loop, in which each failed proof attempt is revised using retrieved compiler-verified proofs and Lean 4 compiler feedback. At training time, the same retrieval and feedback signals shape the prover’s policy: training proceeds in two phases, continued pretraining on Lean code and mathematics, followed by iterative post-training in which agentic proving, supervised fine-tuning, and reinforcement learning alternate. Newly verified proofs and repair traces produced by the current prover are recirculated into OProofs and the retrieval memory, so that the data, the training procedure, and the proving policy co-evolve within a single framework. We pair OProver with OProofs , a large-scale corpus for agentic formal theorem proving that supports both pretraining and the co-evolution loop above. Unlike prior Lean datasets, which mostly preserve only final compiler-verified proofs, OProofs additionally records the trajectories of proof construction, failure, feedback, and repair. It contains 1.77M Lean statements and 6.86M compiler-verified proofs, paired with serialized proving trajectories that capture retrieved context, failed attempts, compiler feedback, and subsequent repairs. We build OProofs from three complementary sources: public Lean resources, large-scale proof synthesis with compiler verification, and traces from OProver’s own agentic proving. The first two sources provide an initial corpus that supports both pretraining and post-training, while the third grows continuously as OProver improves: newly verified proofs are indexed into the retrieval memory and repair trajectories are added to subsequent training rounds. In summary, our contributions are: 1. A unified framework for agentic formal theorem proving. We propose OProver, which treats proving as a retrieval-grounded, feedback-conditioned refinement loop and trains the prover end-to-end to use these signals as part of its policy, rather than as test-time heuristics. 2. A large-scale corpus for agentic formal theorem proving. We construct OProofs, containing 1.77M Lean statements, 6.86M compiler-verified proofs, and serialized proving trajectories that record retrieved context, failed attempts, compiler feedback, and subsequent repairs—supervision that prior Lean corpora do not provide. 3. A co-evolution pipeline between prover and corpus. We develop an iterative post-training pipeline in which the current prover produces new verified proofs and repair trajectories: verified proofs are indexed into the retrieval memory, repair trajectories become SFT data, and the hardest unresolved cases provide RL signal for the next round. 4. State-of-the-art performance among open-weight whole-proof provers. OProver-32B attains three best and two second-best results across five formal theorem-proving benchmarks, reaching Pass@32 of 93.3 on MiniF2F, 58.2 on ProverBench, and 11.3 on PutnamBench. 2 Methodology Figure 2 illustrates the three components of our framework. The OProofs Construction pipeline (top-left) builds a Lean-specific corpus from public Lean resources and raw informal sources, through deduplication, filtering, autoformalization, agentic proving, and Lean 4 verification (§ 2.2 ). The OProver Agentic Proving pipeline (top-right) performs theorem proving as a multi-round interaction: given a target theorem, the prover policy queries a retrieval memory for top- k compiler-verified proofs, produces a proof attempt, and is verified by the Lean 4 compiler; on failure, compiler feedback is returned to the policy and the proof is revised in the next round, while successful proofs are added back into the retrieval memory (§ 2.1 ). The OProver Agentic Training pipeline (bottom) trains OProver in two stages: a one-time continued pretraining on OProofs yields a domain-adapted base model OProver-Base, followed by an iterative post-training loop in which the current prover performs agentic rollouts and is updated by SFT on round-level repair examples and RL on harder unresolved cases; verified proofs and repair

Read the complete text