h1: A Taste of the Bitter Lesson in Automated Theorem Proving
Organizations: FAIR at Meta · EPFL · CERMICS, ENPC, Institut Polytechnique de Paris · New York University
Abstract
While progress in informal mathematics has come largely from scaling the chain-of-thought and agentic reasoning of frontier language models, formal theorem proving has increasingly relied on human-designed workflows around these models, such as planning, decomposition, and orchestrating specialized provers. This raises a bitter-lesson question: can a simple agentic loop that scales test-time compute match these workflows? The answer matters as formal verification must scale to keep up with frontier models producing research mathematics, yet new workflows rarely settle it, as their gains are often confounded with stronger models or more compute. We study this question with h1, a simple harness that gives a model an efficient interface to Lean 4 and keeps it working through verifier feedback and self-reflection, without imposing a decomposition or search structure. h1 reaches state-of-the-art results on PutnamBench, FATE-X, and FormalConjectures100-Solved, settles eight open problems in FormalConjectures, and, at matched models, matches or outperforms specialized workflows such as Goedel-Architect and AlphaProof Nexus, surprisingly showing that a single attempt (pass@1) can often scale to solve open problems. Through ablations and matched-model comparisons with Claude Code and AxProverBase, we find that simplicity alone is not enough: an efficient Lean interface largely determines cost and solve rate. We thus recommend that future work evaluate frontier models with efficient execution feedback before prescribing workflows, at the risk of bitter lessons.
Figures & tables
| Problem | Statement proved |
|---|---|
| Erdős 138, variant | for the two-colour van der Waerden number |
| Erdős 337, variant | for thin asymptotic bases (Ruzsa–Turjányi) |
| OEIS A108081 | for the inductively defined words |
| OEIS A211417 | for primes |
| OEIS A022030 | for |
| Open Quantum Problem 35 | an AME state exists |
| Benchmark | System + model | Time cap | Solved | Cost |
|---|---|---|---|---|
| Putnam 2025 (Numina formalization) | Numina, no informal prover, Opus 4.5 | – | 4/12 | – |
| h1 + Opus 4.5 | – | 7/12 | $1,429 total | |
| Numina, full system, Opus 4.5 + Gemini 3 Pro + GPT-5.2 | – | 12/12 | $1,800 cap | |
| h1 + GPT-5.2 | – | 12/12 | $565 total | |
| PutnamBench’s 2025 slice | h1 + Opus 4.7 | – | 11/12 | $25.97/prob. |
| MerLean + Opus 4.7 | – | 12/12 | not reported |
Appendix figures & tables41 assets
Supplementary material from the paper’s appendix.
Appendix
| Tool and arguments | Behavior |
|---|---|
| view_working_file (offset, limit | None) | Line-numbered, paginated view of the mutable file; 40,000-byte view limit. |
| view_original_file (offset, limit | None) | The immutable statement file with its initial compile feedback; 40,000-byte view limit. |
| edit_working_file (old_string, new_string, replace_all) | Whitespace-tolerant replacement; unique unless replace_all . Compiles after editing and returns errors and open goals (32,000 characters). Invalid import edits are rolled back. |
| undo_edit_working_file () | Revert the last edit and recompile; compiler feedback: 32,000 characters. |
| submit_working_file (updated_file, reasoning) | Check for errors and unfinished goals, then compile and validate with SafeVerify in an isolated environment; ends the iteration. |
| lean_leanexplore (query) | Natural-language search over Mathlib declarations (LeanExplore; Qwen3 embedding and reranker); 6 results with name, module, signature, description. |
| Prompt version | Multi-turn LLM | Reflection LLM |
|---|---|---|
| Brief | “Prove the Lean file in the user message. Use the available tools and submit your completed working file.” | “Summarize the prover’s progress for its next attempt. Be concise and return only the summary.” |
| Detailed | Describes tool use and iterative state; specifies statement integrity, proof-validity and disproof requirements, and persistence. Includes general advice and examples. | Instructs faithful context compaction: preserve verified progress and useful lemma names, attribute unverified claims to the multi-turn LLM, and treat incomplete submissions as checkpoints. |
| Observed failure | Prompt response |
|---|---|
| The multi-turn LLM uses the Lean REPL like a shell to hunt through the sandbox filesystem for a stored solution | The sandbox contains no solutions. The prompt explains that searching for stored answers or guessing proof names is wasted effort and directs the model to search for supporting lemmas instead. |
| The reflection LLM treats an incomplete checkpoint as a final failure | The submission tool asks the multi-turn LLM to explain why it is submitting. This reason is passed to the reflection LLM, whose prompt distinguishes a claimed complete proof from a checkpoint submitted when a limit is reached and asks it to preserve partial progress and remaining goals. |
| The reflection LLM turns an unverified claim into a fact | Attribute mathematical beliefs to the multi-turn LLM; state file contents and verifier feedback directly. |
| The reflection LLM reinforces a decision to give up | Retain the concrete unresolved obstacle without repeating claims that the problem is impossible or too difficult. |
| What goes wrong | What h1 does | What the model sees | How the attempt continues |
|---|---|---|---|
| Lean error or open goal | Keep the edit and check the file. | Lean’s errors and remaining goals. | The model can revise the proof in the same iteration. |
| REPL connection loss | Restart Lean and repeat the same command once. | The command’s result if it succeeds; otherwise a failure message from the tool. | If the command succeeds, the same model interaction continues. |
| REPL timeout | Restart Lean without repeating the command that timed out. | A timeout message from the tool. | Edit checks restore the previous file; scratch execution allows one failure. A timeout before submission interrupts the execution. |
| Process failure during an edit check | Restore the file to its state before the edit and check it after restarting Lean. | A message that the edit was rejected and already undone. | Continue if the restored file checks; otherwise interrupt the execution. |
| Process failure during scratch-code execution | Leave the working file unchanged. Allow one failure; stop after two in a row. | A warning that the scratch computation ran out of time or memory. | After the first failure, the model can try again. A second consecutive failure interrupts the execution. |
| Initial health check fails | Stop if Lean cannot check the original file before proving begins. | Nothing: no model call has been made. | Proving can begin once the Lean service is working. |
| Benchmark | Source revision | Lean | Mathlib |
|---|---|---|---|
| PutnamBench (including Putnam100 and the 2025 slice) | 3c9b9268 (2026-07-23) | 4.27.0 | 4.27.0 |
| FATE-X | a6fb49ee (2026-02-23) | 4.28.0 | 4.28.0 |
| FormalQualBench | efaa113c (2026-03-19) ∗ | 4.28.0 | 4.28.0 |
| FC100-solved | 7862bf6a (2026-04-29) | 4.27.0 | 4.27.0 |
| Erdős problems (APN comparison) | 7862bf6a (2026-04-29) | 4.27.0 | 4.27.0 |
| Putnam 2025 (Numina) | 60d33c8b (2026-01-20) | 4.26.0 | 4.26.0 |
| Stage | Check |
|---|---|
| Trusted challenge | Compile the original statement with fixed Lean and library versions in an isolated environment; retain its compiled artifact in storage inaccessible to the prover. |
| Submission compile | Compile the submitted source in a separate, fresh, networkless sandbox against read-only dependencies, preserving the module’s relative path. |
| Kernel validation | Compare the original and submitted compiled artifacts using SafeVerify in a trusted Lean project. Accept only when the verifier reports success and exits without error. |
| Proof or disproof | Accept a proof of the target theorem. Where disproofs are enabled, also accept a .disproof declaration proving the supported negation of that theorem. |
| Model and configuration | Input | Cache read | Cache write | Output | |
|---|---|---|---|---|---|
| 5 min | 1 hour | ||||
| Claude Haiku 4.5 | 1.00 | 0.10 | 1.25 | 2.00 | 5.00 |
| Claude Opus 4.5, 4.6, 4.7, 4.8 | 5.00 | 0.50 | 6.25 | 10.00 | 25.00 |
| Gemini 3 Flash | 0.50 | 0.05 | – | – | 3.00 |
| Gemini 3.1 Pro ( 200k input tokens) | 2.00 | 0.20 | – | – | 12.00 |
| Gemini 3.1 Pro ( 200k input tokens) | 4.00 | 0.40 | – | – | 18.00 |
| System / model | Setting | Solved (%) | $/problem |
|---|---|---|---|
| Ours + GPT-5.5 | Capped | 87.5 | 5.28 |
| Capped | 95.5 | 6.63 | |
| Endpoint | 99.7 | 9.17 | |
| + 8 attempts | 100.0 | 17.86 | |
| Ours + DeepSeek V4 Flash | Capped | 69.5 | 0.40 |
| Capped | 75.6 | 0.46 |
| Model / harness | PutnamBench | FC100-solved | FATE-X |
|---|---|---|---|
| DeepSeek V4 Flash (estimated) | 92.26% | 96.38% | 96.15% |
| GPT-5.5 | 79.09% | – | – |
| GPT-5.6 Sol | – | 93.77% | 96.21% |
| Gemini 3.1 Pro | 55.39% | 61.21% | 69.96% |
| Claude Opus 4.5 | – | – | 91.64% |
| Claude Opus 4.8 | – | – | 91.50% |
| Target | Theorem proved |
|---|---|
| Erdős 138, variant dvd_two_pow | Let be the two-colour van der Waerden number, the least such that every two-colouring of contains a monochromatic -term arithmetic progression. Then . Erdos138_dvd_two_pow_solution.lean |
| Erdős 337, variant ruzsa_turjanyi | For every asymptotic additive basis of density zero, that is with , the ratio tends to infinity. Erdos337_ruzsa_turjanyi_solution.lean |
| OEIS A108081 | Let be the smallest set of words over containing and closed under and , where and reverse a word and shift its letters by and . For every , the number of words of length in equals , where . OeisA108081_count_words_in_x_is_a_shifted.lean |
| OEIS A211417 | For , every prime and every satisfy (Bala’s supercongruence). OeisA211417_supercongruence_solution.lean |
| OEIS A022030 | Let , and, with truncated division, for even and for odd . Then for every . OeisA22030_conjecture.lean |
| Open Quantum Problem 35, ame_9_10_open | There exists a unit vector whose reduced density matrix on any four of the nine parties is the maximally mixed state; that is, an AME state exists. OpenQuantumProblem35_ame_9_10_open_solution.lean |
| Target | Defect | Correction or scoring decision |
|---|---|---|
| Erdős 507 | Signed triangle area and repeated vertices do not express the intended minimum nonnegative area of three distinct points. | Proofs of the original targets do not establish the intended geometric result. |
| Green 16 | One natural-number answer is used for every , although the extremal quantity depends on . | Define the extremal function of and state the asymptotic bound. |
| Erdős 566/567 | The size Ramsey number counts edges of an arbitrary host, whereas the source asks for the ordinary Ramsey number. | Use the least number of vertices of a complete host. |
| Lam–Litt | A chosen denominator can vanish at the initial point, making the cleared-denominator identity degenerate. | Require that denominator to be nonzero at the initial point. |
| Written on the Wall II, 100/160/314 | The extraction loses a complement, substitutes a cycle count for a binary indicator, or uses average distance for induced-path length. | Restore the complement-degree norm, the -free indicator, and the largest induced-path order, respectively. |
| Open Quantum Problem 13 | Editable answers do not fix the proposed maximum number of mutually unbiased bases. | State the fixed dimension-six conjecture IsMaxMUBCount 6 3 . |
| Benchmark | System + model | Time cap | Solved | Cost | Time |
|---|---|---|---|---|---|
| Putnam 2025 (Numina formalization) | Numina, no informal prover, Opus 4.5 | – | 4/12 | – | – |
| h1 + Opus 4.5 | – | 7/12 | $1,429 total | 6,122 min | |
| Numina, full system, Opus 4.5 + Gemini 3 Pro + GPT-5.2 | – | 12/12 | $1,800 cap | 3,889 min | |
| h1 + GPT-5.2 | – | 12/12 | $565 total | 9,636 min | |
| PutnamBench’s 2025 slice | h1 + Opus 4.7 | – | 11/12 | $25.97/prob. | 694 min |
| MerLean + Opus 4.7 | – | 12/12 | not reported | 789 min |
| h1 (%) | APN basic (%) | APN full (%) | |
|---|---|---|---|
| 1 | 68.75 | 35.67 | 71.67 |
| 3 | 79.73 | 63.36 | – |
| 6 | 82.90 | 76.14 | – |
| 10 | 83.33 | 81.82 | – |
| Putnam100 | FATE-X | |||||
|---|---|---|---|---|---|---|
| Cost component | Full | Distilled | Change [95% CI] | Full | Distilled | Change [95% CI] |
| Reflector input | 0.91 | 0.04 | [ ] | 1.74 | 0.18 | [ ] |
| Reflector output | 0.10 | 0.38 | [ ] | 0.92 | 0.69 | [ ] |
| Prover calls | 7.99 | 8.75 | [ ] | 23.37 | 25.09 | [ ] |
| Total | 9.00 | 9.17 | [ ] | 26.02 | 25.96 | [ ] |