anthropic
13 million lines of Lean back Claude's Fermat proof
Claude News
anthropicAnthropic has published the first complete computer-checked proof of Fermat's Last Theorem, written by Claude in the Lean proof assistant over 11 days of largely autonomous work. Dozens of agents produced 13 million lines of Lean code along the way, the company says.
At a glance
- The formalization ran on Prove2Me, an open platform from Anthropic researcher Tianyi Peng and collaborators at Columbia University that keeps a directed acyclic graph of theorem statements agents consult to choose their next target.
- Claude proved 30,300 theorems and used 29,500 of them in the final proof, which at 13 million lines of Lean runs to over five times the size of Mathlib.
- Kevin Buzzard, who leads the Imperial College FLT project and reviewed the result, said the proof assumes nothing beyond the axioms of mathematics and that such autoformalization artefacts are now robust enough to build on.
Verification, not new mathematics, is what shifts here. Refereeing a proof of this size has historically taken years of human attention, and the bottleneck grows as models produce more purported results than reviewers can absorb. A formalization pipeline that runs in days appears to move that cost onto compute, which likely makes it practical to ship machine-checked proofs alongside human-readable write-ups rather than long after them.
The agents consumed about six billion output tokens in under two weeks
A team of agents running on a Claude Code-based harness completed the proof in a little under two weeks, consuming about six billion output tokens from a general-purpose internal research model roughly comparable to Claude Fable 5.1. The proof follows a simplified version of Wiles's argument set out by Henri Darmon, Fred Diamond and Richard Taylor.
Human mathematical input was limited to occasional high-level instructions from Peng, such as that the Jacobian as a scheme sounded high priority or that the Mazur theorem should be pushed to be done soon. Lean checked the finished proof, which uses just Lean's three standard axioms, and a comparator confirmed that the theorem statement matches Mathlib's own statement of FLT.
Anthropic says writing Lean also appears to help Claude prove novel results, and that many recent Claude-authored results have been formalized in parallel with their proofs, with the partial formalizations serving as checks on hypotheses in the way numerical simulations do.
Failed early runs left 7% of the final proof's non-boilerplate lines
Several early attempts failed. Agents had some initial success but quickly lost track of the project's state and stopped collaborating effectively, and their abandoned work still accounts for roughly 7% of the non-boilerplate lines in the final proof. The effort came together only after the switch to Prove2Me.
Prove2Me maintains the graph of theorem statements that agents use to decide what to prove next, which mitigated memory degradation and let many agents work in parallel. It also splits statements and proofs into separate files to speed up Lean compilation and keeps a natural-language description of each statement for search and reuse.
Anthropic researchers ran a smaller experiment on three personal Claude Max plans, formalizing applications of the Hardy-Littlewood circle method. Collaborating entirely through Prove2Me, those agents completed a formalization of Vinogradov's Three Primes Theorem in three days, which Anthropic offers as evidence that consumer subscriptions can carry such work given the right scaffold.
Wiles needed 129 pages and a year to close a gap in his 1993 proof
Fermat wrote the claim in the margin of Diophantus's Arithmetica around 1637. A prize of 100,000 German gold marks was announced in 1908, drawing 621 incorrect attempts in the first year alone. Wiles presented a proof in June 1993, a reviewer exposed a critical gap two months into verification, and Wiles published the corrected 129-page proof in May 1995 after a year of work, latterly with Richard Taylor.
Jan Bergstra proposed formalizing Wiles's proof a decade after its publication, and Kevin Buzzard began a multi-year community effort in 2024 to complete it in Lean. The blueprint describing only the initial phase of that project runs to 86 pages, and the formalization was expected to take years.
Grants and credits for mathematicians
The full proof and a written walk-through are on GitHub. Anthropic says it and other labs have expanded support for outside researchers, including mathematicians working on pure math and formalization, through free and discounted subscriptions, research credits and dedicated grants that could cover formalizing other major theorems or improving Lean or Mathlib.
Comments
No comments yet. Be the first.
Join the conversation
Sign in with Google to leave a comment. Your name and avatar come from your Google profile, and the comment appears after moderation.
We only use your name and avatar from Google. We never store your email address.
