Anthropic’s Claude Formalizes Fermat’s Last Theorem, But Rival Proof Lands First
Anthropic says Claude produced a complete computer-checked proof of Fermat’s Last Theorem in Lean after 11 days of mostly autonomous work.
The result matters because the Last Theorem has long stood as a test of how hard it is to verify advanced math. Andrew Wiles published the first correct proof in 1995, and checking it took months. Turning that proof into a form a computer can verify was widely expected to take years.
Anthropic described the project in a research post on Anthropic. The work also drew wider business and AI interest, including coverage from FourWeekMBA.
What Anthropic says Claude achieved on Last Theorem
According to Anthropic, Claude wrote the proof in the Lean programming language and completed the first end-to-end computer-checked proof of Fermat’s Last Theorem. The company said Claude worked “largely autonomously” and used dozens of agents that split up parts of the job.
Anthropic said the system produced 13 million lines of Lean code and proved 29,500 intermediate theorems. In another count, the company said Claude generated computer-verifiable proofs of 30,300 theorems along the way, with 29,500 used in the final proof.
The final proof was checked by Lean. Anthropic said it uses Lean’s three standard axioms, and that a comparator confirmed the theorem statement matches Mathlib’s statement of Fermat’s Last Theorem.
Kevin Buzzard of Imperial College London reviewed the Lean proof, according to Anthropic. He said the effort “proves Fermat’s Last Theorem with no assumptions other than the axioms of mathematics” and called it “a big step toward automatic formalization of the modern mathematical literature.”
Also Read: Claude Makes a Breakthrough on a 165-Year-Old Math Mystery
Why Fermat’s Last Theorem is hard to formalize
Fermat’s Last Theorem says no positive integers a, b, c satisfy aⁿ + bⁿ = cⁿ for any n greater than 2. Fermat wrote the claim around 1637 and added a famous note that he had a “truly marvelous proof,” though the mathematical community now believes that supposed proof was incorrect.
The theorem resisted proof for more than 350 years. Anthropic said a prize announced in 1908 brought 621 incorrect attempts in the first year alone.
Wiles presented what he thought was a correct proof in 1993, but reviewers found a gap. He then spent a year fixing it, first alone and then with Richard Taylor, before publishing the first correct proof in 1995.
That history helps explain why the formal version matters. A proof written for mathematicians can skip steps that experts see as obvious. Lean cannot do that. It needs every step written in a precise form that the software can check.
Formalization is also difficult because human proofs build on a huge body of earlier work. A formal proof starts only from the math that has already been encoded in systems like Lean and Mathlib. Anthropic said even the community blueprint for the first phase of the Fermat project runs 86 pages.
What this could mean for math verification
Anthropic said early attempts by Claude did not work well. Agents made some progress, then lost track of the project state and stopped coordinating. Those failed efforts still supplied about 7% of the non-boilerplate lines in the final proof.
The project succeeded after the team switched to Prove2Me, an open collaborative platform designed by Tianyi Peng and collaborators at Columbia University. Anthropic said Prove2Me kept a directed acyclic graph of theorem statements, helped multiple agents work in parallel, sped up Lean compilation, and made theorem search and reuse easier.
With Prove2Me and a Claude Code-based multi-agent setup, Anthropic said the proof was completed in a little under two weeks. The run used about six billion output tokens from an internal research model the company described as roughly comparable to Claude Fable 5.1.
The larger point for researchers is not that the theorem itself is new. Anthropic stressed that the novelty here is verification. The company argues that AI-assisted formalization could reduce the burden on referees, help catch errors in accepted work, and make it easier to check AI-generated mathematics.
That matters because verification in math can take years. Anthropic pointed to other examples, including long review periods for major proofs like the Kepler conjecture and the Poincaré conjecture. The company argued that formal proofs may become a normal companion to human-readable papers as AI systems produce more mathematical results.
Anthropic also said writing Lean appears to help Claude test ideas during research. In a smaller experiment, the company said three personal Claude Max plans working through Prove2Me formalized Vinogradov’s Three Primes Theorem in three days.
What happens next is less about Fermat’s Last Theorem itself and more about whether this process scales. Anthropic said it believes major results could be formalized with the right scaffolding and consumer AI subscriptions, and that it has expanded support for outside researchers with free and discounted subscriptions, research credits, and grants.
For now, the Last Theorem project gives AI researchers a concrete benchmark. It shows a model can help build a machine-checked proof for one of the best-known results in mathematics, while also showing how much infrastructure, coordination, and compute still sit behind that outcome.
Read Next: Anthropic Claude AI Hacking Tests Resume After Critical Breach Risk
Related: Anthropic’s Claude for Financial Advisors Gets First Real Test With Schwab, BlackRock Data
Related: Anthropic Lands 3 Claude Models In India For Banks Under Pressure
