Claude completed the first formalized proof of Fermat’s Last Theorem last month, a 13 million line body of Lean code produced in 11 days, Anthropic announced on Friday 4 September.
The proof covers one of mathematics’ most famous problems. Pierre de Fermat scribbled the conjecture in a margin in 1637, it resisted every attempt for more than 350 years, and Andrew Wiles finally proved it in work published in 1995, after an initial 1993 announcement, a discovered gap and a repair that itself took more than a year.
“Checking that a major mathematical proof is correct can take years,” Anthropic wrote in its announcement post on X. “Formalization… can help.”
That is the problem the project attacks. Converting a proof into code that the Lean proof assistant can verify means a computer confirms every logical step, so nobody has to trust the AI’s reasoning, only Lean’s small verification kernel, and Claude’s version was checked by Lean using only its three standard axioms. A comparator also confirmed the final theorem statement matches the one in Mathlib, ruling out a proof of the wrong claim.
The numbers behind the run are unusual even by AI research standards. Claude proved 30,300 theorems, of which about 29,500 feed the final result, consumed roughly 6 billion output tokens, and produced a body of code more than five times larger than Mathlib, the community library of formalised mathematics it builds on. That makes it the largest Lean proof ever completed.
Anthropic ran the project on an internal research model it describes as roughly comparable to Claude Fable 5.1, with many Claude agents working in parallel through a platform called Prove2Me. The work was led by researcher Tianyi Peng, and the company says mathematical input from humans “was limited to occasional high-level instructions…”
Those instructions were sparse in practice. The examples Anthropic gives include telling the agents that the “Jacobian as a scheme sounds high priority” and to “push [the] Mazur [theorem] to be done soon,” with the agents left to work out the rest.
The result lands on ground prepared by human mathematicians. The proof follows the simplified exposition of Wiles’ argument by Darmon, Diamond and Taylor, and adapts pieces of the Imperial College London formalisation project led by Kevin Buzzard, which has been working toward the same goal for years.
Commentary from inside the Lean community has stressed that the human project keeps its own purpose. The Imperial effort aims at formalisation mathematicians can read and learn from, and Claude’s repository credits and adapts its pieces rather than replacing the program.
Buzzard endorsed the achievement. “This extraordinary autoformalization achievement… proves Fermat’s Last Theorem with no assumptions other than the axioms of mathematics,” he said. The Lean 4 sources went up publicly the same day and drew immediate attention across the formalisation community.
It did not work first time. Anthropic says about 7 per cent of the non-boilerplate lines trace back to failed earlier attempts, and the successful run came only after the agents moved onto the Prove2Me platform.
The compute bill was serious but not unrepeatable. Anthropic describes the effort as a token-intensive project, and it argues the technique is not locked to frontier lab budgets: in a smaller demonstration, agents running on three consumer Claude Max subscriptions formalised Vinogradov’s Three Primes Theorem in three days.
Anthropic published companion research on Claude’s broader mathematical capabilities in the same week, including work connected to the Riemann zeta function. The pairing positions the Fermat result as part of a wider mathematics program rather than a one-off stunt.
The full proof is now public for the mathematical community to pull apart. Anthropic published the complete repository on GitHub on 4 September, where every one of the 13 million lines can be rechecked by anyone running Lean.











