Compile to Compress: Boosting Formal Theorem Provers by Compiler Outputs
Organizations: Department of Computer Science and Technology, Tsinghua University, Beijing, China.
Abstract
Large language models (LLMs) have demonstrated significant potential in formal theorem proving, yet state-of-the-art performance often necessitates prohibitive test-time compute via massive roll-outs or extended context windows. In this work, we address this scalability bottleneck by exploiting an informative structure in formal verification: the observation that compilers map a vast space of diverse proof attempts to a compact set of structured failure modes. We introduce a learning-to-refine framework that leverages this compression to perform efficient learning and proof exploration. We perform tree search that corrects errors locally conditioned on explicit verifier feedback, thereby circumventing the costs associated with accumulating a long history of proof attempts. Extensive evaluations show that our method consistently amplifies the reasoning capabilities of base provers across varying scales. Notably, our approach achieves state-of-the-art performance on PutnamBench among publicly reported 8B and 32B parameter models under comparable test-time budgets, offering a scalable paradigm for next-generation verifier-guided reasoning.
Figures & tables
| MiniF2F-test | Ratio |
|---|---|
| linarith failed to find a contradiction | 22.60% |
| unknown identifier ‘id’ | 16.31% |
| unsolved goals | 13.58% |
| Putnam Bench | |
| tactic ‘id’ failed, nested error | 16.78% |
| omega could not prove the goal | 13.50% |
| Model | Train Data | Strategy |
|---|---|---|
| Kimina Expert | 19.4k | BFS, DFS, Tree |
| Goedel Expert | 22.4k | BFS, DFS, Tree |
| Kimina Direct | 37k | BFS |
| Goedel Direct | 43k | BFS |
| Method | MiniF2F-test | ProofNet | MOBench | Putnam | Putnam 128 | Putnam 256 |
|---|---|---|---|---|---|---|
| Kimina | 77.46 | 14.56 | 7.78 | 10 | 10 | 10 |
| Kimina Direct | 75.41 | 14.82 | 7.78 | 12 | 14 | 16 |
| Kimina Random | 81.15 | 15.63 | 8.61 | 17 | 20 | 21 |
| Kimina Value | 81.97 | 15.36 | 8.61 | 20 | 23 | 25 |
| Goedel-V2 | 84.43 | 15.63 | 14.72 | 32 | 38 | 41 |
| Goedel Direct | 84.84 | 19.14 | 12.50 | 28 | 37 | 44 |
| Method | Size | Budget | Num-Solved |
|---|---|---|---|
| Aleph | ? | \1400$ | 668 |
| Aleph | ? | \400$ | 637 |
| Seed-V1.5* | ? | 10H 20Days | 581 |
| Aleph | ? | \100$ | 500 |
| Hilbert* | ? | 1840 | 462 |
| Ax-Base* | ? | avg. \12.6$ | 365 |
| easy | medium | hard | |
|---|---|---|---|
| Kimina Ratio | 67.62 | 9.83 | 22.54 |
| BFS | 99.40 | 91.67 | 10.91 |
| DFS | 100 | 91.67 | 20.00 |
| Random | 100 | 95.83 | 18.18 |
| Value | 100 | 91.67 | 20.00 |
| Goedel Ratio | 73.77 | 10.66 | 15.57 |
| p-value | #problem | |||
|---|---|---|---|---|
| Kimina | 53 | 45 | 39 | 69 |
| Goedel | 43 | 41 | 38 | 52 |
| Error Type | Occur Freq (%) | #Problem | Fix Prob (%) | Train Freq (%) |
|---|---|---|---|---|
| unsolved goals | 23.83 | 31 | 0.34 | 16.41 |
| linarith failed to find a contradiction | 19.79 | 28 | 0.07 | 25.41 |
| omega could not prove the goal: | 10.92 | 20 | 0.12 | 7.78 |
| tactic ‘id’ failed, nested error | 3.14 | 12 | 0.00 | 3.08 |
| maximum recursion depth has been reached | 2.86 | 15 | 0.00 | 0.00 |
| unknown identifier ‘id’ | 1.93 | 13 | 1.38 | 8.51 |
| Dataset | MiniF2F-test | ProofNet | MOBench | PutnamBench |
|---|---|---|---|---|
| Budget | 64 | 64 | 64 | 256 |
| V2 Avg. Input | 271.30 | 157.61 | 211.99 | 336.49 |
| V2 Avg. Output | 6267.47 | 7415.36 | 12200.99 | 10145.58 |
| Expert Avg. Input | 2799.80 | 2208.98 | 3230.62 | 3560.39 |
| Expert Avg. Output | 3538.73 | 3016.76 | 4560.31 | 3555.41 |
| V2 Total Input | 843 k | 3,253 k | 4,260 k | 53,869 k |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Kimina-Prover-Distill-8B | Goedel-Prover-V2-32B | ||
| Message | Ratio (%) | Message | Ratio (%) |
| MiniF2F-test | |||
| linarith failed to find a contradiction | 22.60 | unsolved goals | 18.87 |
| unknown identifier ‘id’ | 16.31 | failed to synthesize | 11.48 |
| unsolved goals | 13.58 | linarith failed to find a contradiction | 9.40 |
| unknown identifier ‘id’ | 7.84 | ||
| Method | Kimina x2 | Append Epoch1 | Append Epoch2 | Insert Epoch1 | Insert Epoch2 |
|---|---|---|---|---|---|
| #Solved | 277 | 272 | 246 | 279 | 284 |
| Dataset | Kimina SFT | Goedel SFT | Kimina Expert Iteration | Goedel Expert Iteration |
|---|---|---|---|---|
| Build on Prior | 198 | 190 | 186 | 195 |
| Start from Scratch | 2 | 10 | 14 | 5 |
| Message | Ratio (%) |
|---|---|
| unknown identifier ‘id’ | 40.38 |
| linarith failed to find a contradiction | 14.54 |
| unsolved goals | 13.43 |
| omega could not prove the goal: | 6.56 |
| tactic ‘id’ failed, did not find instance of the pattern in the target expression | 3.84 |
| type mismatch | 2.74 |
| Goedel-Prover-V2-32B | Ratio (%) |
|---|---|
| linarith failed to find a contradiction | 25.41 |
| unsolved goals | 16.41 |
| unknown identifier ‘id’ | 8.51 |
| omega could not prove the goal: | 7.78 |
| tactic ‘id’ failed, did not find instance of the pattern in the target expression | 6.89 |
| type mismatch | 4.23 |
| Error Type | Occur Freq (%) | #Problem | Fix Prob (%) | Train Freq (%) |
|---|---|---|---|---|
| omega could not prove the goal: | 40.30 | 31 | 0.04 | 6.56 |
| linarith failed to find a contradiction | 19.54 | 48 | 0.12 | 14.54 |
| unsolved goals | 17.43 | 49 | 0.03 | 13.43 |
| type mismatch, term | 2.85 | 20 | 0.00 | 1.19 |
| tactic ‘id’ failed, did not find instance of | 2.39 | 39 | 0.24 | 3.84 |
| the pattern in the target expression |
| Method | Kimina x2 | Kimina + Claude | Kimina SFT + Refine |
|---|---|---|---|
| #Solved | 277 | 280 | 284 |
| Model | Strategy | MiniF2F-test | ProofNet | MOBench | PutnamBench |
|---|---|---|---|---|---|
| Goedel-V2 | Direct | 84.43% | 15.63% | 14.72% | 32 solved |
| Goedel-V2 | Random | 84.02% | 26.42% | 25.56% | 46 solved |
| Goedel SFT | Random | 84.84% | 26.42% | 26.11% | 47 solved |
| Goedel Expert | Random | 84.43% | 23.72% | 30.28% | 63 solved |
Automated Theorem Proving
Automated theorem proving develops algorithms and AI systems that construct or check formal proofs in mathematics, logic, and software.
See all 159 papers