SPAWNSY

Claude Formalized Fermat's Last Theorem in Eleven Days. The Mathematician Who Tried It Himself: "Nothing New, But Extraordinary"

Anthropic announced the first computer-checked proof of Fermat's Last Theorem in Lean, built by Claude in eleven days: 13.4 million lines of code, independently verified by a separate kernel. It's not new mathematics. It's proof that large-scale autoformalization works.

AuthorTwenZySPAWNSY Editorial Desk
PublishedSeptember 7, 2026
Read time5 min
SectionTech
Views690
Share
Claude Formalized Fermat's Last Theorem in Eleven Days. The Mathematician Who Tried It Himself: "Nothing New, But Extraordinary"

In the same week OpenAI declared "the AGI era" on a number that loses thirty-seven points under neutral test conditions, Anthropic showed something close to the opposite: a result you can check line by line, with no need to take anyone's word for it. The company announced that Claude, working largely on its own over eleven days, produced the first complete, computer-checked proof of Fermat's Last Theorem in the Lean programming language. Before anyone reads that as "AI proved Fermat," the record needs to be set straight: Andrew Wiles proved the theorem in 1995, after more than seven years of work. Claude formalized an existing proof, translating it into a form a computer can check line by line without trusting any human along the way, rather than discovering anything new in the mathematics itself.

13 million lines of code in eleven days

Anthropic's team had been working on this problem longer, but the breakthrough came after switching to Prove2Me, an open-source framework built specifically for large-scale mathematical formalization. With Prove2Me and a team of Claude Code-based agents, the proof came together in under two weeks. The final Lean code runs to more than 13.4 million lines, covers 30,300 proved theorems, of which 29,500 made it into the final proof, and consumed roughly six billion output tokens from Anthropic's general-purpose research model, one roughly comparable to Claude Fable 5.1.

Scale isn't the only measure here. The formalization completes Freek Wiedijk's list of a hundred classic formalization challenges, a twenty-year-old running benchmark treated in the field as an unofficial ranking of the hardest theorems to translate into machine-checkable form. Fermat had sat at the top of that list, its most famous and hardest entry, from the start.

Fermat waited 358 years for a proof, then another thirty for machine confirmation

Pierre de Fermat scribbled his theorem in a book's margin in 1637, adding the famous note that he had a proof too long to fit there. No one found that proof for 358 years, until Andrew Wiles announced a solution in 1993 after seven years of solitary work, and reviewers quickly found a gap in it. Wiles spent another year patching it with the help of his former student Richard Taylor before the corrected proof went to print in 1995. That history alone shows how hard it is in mathematics to be a hundred percent certain a proof is complete until it passes through formal, machine verification.

Verification independent of Claude itself

The entire proof was checked by nanoda, a separate verification kernel written in Rust, unrelated to the tools used to build it. Nanoda confirmed the correctness of all 1,052,234 declarations in the code, and Lean itself verified the result relying on only its three standard axioms. Two-layer verification, one tool builds the proof, a completely different one checks it, is exactly the level of rigor expected from mathematical formalization, not a shortcut an AI system could quietly take for itself.

What a mathematician who tried this himself makes of it

Kevin Buzzard of Imperial College London has run his own EPSRC-funded project to formalize Fermat's Last Theorem for years and is one of the most recognizable voices in the field. His reaction to Anthropic's result was unusually candid: he'd already been "99.9% sure" Wiles's proof was correct, so Claude's formalization "just faithfully follows the early literature and adds nothing" mathematically new. He called it an extraordinary achievement anyway, for an entirely different reason. For Anthropic, on its way to a record-setting IPO targeting $2 trillion, that kind of independently verified praise from a leading expert in the field carries more weight than any number of internal benchmarks.

Anthropic formalized the version of the proof laid out by Darmon, Diamond and Taylor, built directly on Wiles's original 1995 work, rather than the more modern approach Buzzard himself has been pursuing. Along the way, the team had to build mathematical infrastructure in Lean that hadn't existed before, including Fontaine theory and work on the Eisenstein ideal, which is on its own a lasting contribution to the formal mathematics library regardless of whether the underlying proof is new. The formal proof covers exponents 17 and above, since smaller cases already have their own separate formal proofs in the same library.

Why it matters anyway

The real value of this result sits in the speed, not the theorem itself. Buzzard put it plainly: thousands of pages of mathematical literature got formalized start to finish by something like a swarm of AI agents in eleven days. Manual formalization of comparable proofs has taken research teams years in the past, sometimes a decade. If the pace from this experiment can be repeated on other, contemporary theorems, it fundamentally changes how quickly the mathematical community can independently verify new, complicated proofs instead of waiting years for reviews and repeated human checks.

That's a real, well-documented problem in mathematics itself. The classification of finite simple groups, one of the largest proof projects of the twentieth century, spans well over ten thousand pages across dozens of separate papers, and only a handful of people worldwide have actually worked through the whole thing. Shinichi Mochizuki's proof of the ABC conjecture remains disputed among mathematicians years after publication precisely because so few people can fully verify the conceptual apparatus he used. Autoformalization at the pace of Anthropic's experiment addresses exactly that problem: it removes the dependency on how many people in the world have the time and expertise to manually trace every step of a complicated proof.

Buzzard's own project doesn't end because of this. His team is still working on contributions to mathlib, Lean's core mathematics library, and on dynamic documents exploring more contemporary approaches to the proof. Anthropic's formalization overlaps with that project's goal only partly, since it takes a different, older proof path than the one Buzzard ultimately wanted to formalize.

The most honest summary of this result is Buzzard's own line: the proof adds nothing new mathematically, but the way it came together adds a great deal. That distinction is worth keeping sharp, because it's easy to blur the two in a headline and leave readers thinking AI just solved an open mathematical problem. What actually happened is that it reproduced, in machine-checkable form, something people had already known for thirty years, just in eleven days instead of a decade.

That's exactly why this result is more interesting than plenty of louder model launches. The value sits in the proof that large-scale autoformalization genuinely works, with independent verification that doesn't rely on trusting the proof's own author, not in a benchmark record. Mathematics is one of the few fields where "trust me, I checked" can be replaced entirely by a machine-checked proof with zero uncertainty left over, and Anthropic just showed that swap works on a problem the size of Fermat, not only on textbook examples.

The next real test comes when someone tries this on a fresh, just-published proof that no mathematician has yet manually verified start to finish. Fermat was a safe testing ground, because humanity already had thirty years to check whether the original proof held up. The real test arrives once AI formalizes something nobody has had the chance to confirm yet.

Comments

Discussion

Join the conversation around this story.

0 entries

Join the discussion

Sign in to comment and reply to other readers.

Sign in

No comments yet

Start the discussion first.

Read next

All posts