ProofOptimizer: Training Language Models to Simplify Proofs without Human Demonstrations
Alex Gu, Bartosz Piotrowski, Fabian Gloeckle, Kaiyu Yang, Aram H. Markosyan
cs.LG
Oct 17, 2025 · v1
TL;DR
Trains a language model to shorten Lean proofs, using Lean to verify each candidate simplification and supply training signal.
Abstract
Neural theorem proving has advanced rapidly in the past year, reaching IMO gold-medalist capabilities and producing formal proofs that span thousands of lines. Although such proofs are mechanically verified by formal systems like Lean, their excessive length renders them difficult for humans to comprehend and limits their usefulness for mathematical insight. Proof simplification is therefore a critical bottleneck. Yet, training data for this task is scarce, and existing methods -- mainly agentic scaffolding with off-the-shelf LLMs -- struggle with the extremely long proofs generated by RL-trained provers. We introduce ProofOptimizer, the first language model trained to simplify Lean proofs without requiring additional human supervision. ProofOptimizer is trained via expert iteration and reinforcement learning, using Lean to verify simplifications and provide training signal. At inference time, it operates within an iterative proof-shortening workflow, progressively reducing proof length. Experiments show that ProofOptimizer substantially compresses proofs generated by state-of-the-art RL-trained provers on standard benchmarks, reducing proof length by 87% on miniF2F, 57% on PutnamBench, and 49% on Seed-Prover's IMO 2025 proofs. Beyond conciseness, the simplified proofs check faster in Lean and further improve downstream prover performance when reused as training data for supervised finetuning.
Problem
Neural theorem provers can generate formal proofs spanning thousands of lines, but these proofs are too long for human comprehension and provide limited mathematical insight. Training data for proof simplification is scarce, and existing agentic methods struggle with extremely long proofs from RL-trained provers.
Approach
ProofOptimizer trains language models to simplify Lean proofs without human demonstrations. The pipeline uses expert iteration and online RL: starting from a base 7B model, it generates candidate simplifications, filters for those that compile and are shorter, and iterates. The system operates on proofs from miniF2F and PutnamBench, using proof state information to guide simplification.
Results
ProofOptimizer-RL achieves 63% reduction at Min@1 on miniF2F (from 302 to 190 tokens) and the ExpIt variant achieves 72.3% reduction at Min@32. On individual Putnam problems, proofs are shortened by 44-54%. The 7B model achieves 54.8% compile@1 rate, outperforming zero-shot Qwen2.5 32B (21.1%).
| Dataset | Metric | Orig | Linted | It 2 | It 7 | It 8 |
|---|
| miniF2F | Min@64 | 334 | 302 | 126 | 104 | 75 |
| miniF2F | Red@64 (%) | 0.0 | 9.2 | 80.0 | 83.1 | 87.9 |
| Putnam | Min@64 | 1468 | 1359 | 1061 | 969 | 811 |
| Putnam | Red@64 (%) | 0.0 | 7.4 | 40.0 | 47.1 | 57.2 |
Proof simplification results across iterations