Claude Just Proved Fermat’s Last Theorem. It Took 11 Days

In a single 11-day stretch, Anthropic’s Claude did what human mathematicians haven’t managed in over a year of trying. It produced a fully computer-checked proof of Fermat’s Last Theorem—and it’s now the longest mathematical proof ever written, running to 13 million lines of code that any mathematician can verify line by line.

The Imperial College Project

The same project is running at Imperial College London. Mathematician Kevin Buzzard launched it in 2024 with plans to formalize the proof of Fermat’s Last Theorem using Lean, a language computers can check. The project’s outline alone spans 86 pages. Funding is locked in through 2029. It’s not close to finished.

Claude finished the entire job in 11 days.

A 358-Year Journey

Fermat’s Last Theorem states that no three positive whole numbers can be raised to a power greater than two, with the first two adding up to the third. Pierre de Fermat jotted that claim in the margin of a math book in 1637, alongside a note that he had a “truly marvelous” proof but no room to write it down. Then he died, leaving mathematicians to spend the next 358 years trying to figure out what he’d meant.

The actual proof didn’t arrive until 1995. British mathematician Andrew Wiles had announced a solution in June 1993, only for a reviewer to spot a gap in the argument. He spent nearly a year patching it with former student Richard Taylor and nearly gave up entirely before the corrected 129-page proof emerged in May 1995.

Wiles’ proof relied on mathematics that didn’t exist in Fermat’s era—a major reason most mathematicians now suspect Fermat’s “marvelous” proof never actually worked.

Machine Verification

Buzzard’s team reviewed Claude’s result and confirmed it holds up, using only the most basic rules of mathematical logic. The proof is entirely machine-verifiable, converting Wiles’ dense 129-page argument into a form that Lean can check step by step.

The work took dozens of Claude agents running in parallel, each writing definitions, proving smaller results, and combining them into larger ones. Human input was minimal—mostly occasional nudges like “prioritize this theorem next.” Early attempts stumbled: agents lost track of what had already been proven and duplicated work. Those false starts still account for roughly 7 percent of the final proof.

A tool called Prove2Me, built by Columbia researcher Tianyi Peng’s team, solved the coordination problem. It gave every agent the same live to-do list of unfinished proofs, preventing redundant work. It also organized files so Lean could verify results faster and kept plain-English notes on each theorem so agents could reuse each other’s work instead of starting from scratch.

Massive Scale

The finished proof established more than 30,000 supporting theorems and consumed billions of tokens, running on a research model roughly comparable to Claude Sonnet 4.1, the version Anthropic later released publicly. The final product is 13 million lines—more than five times the size of Mathlib, the shared library mathematicians already use for formal proofs. A typical novel runs about 80,000 words. Claude’s proof contains the equivalent of 160 novels, but every sentence is a verified step in a logical chain.

Why Verification Matters

That verification is the point. “This isn’t the same as discovering brand-new math,” Buzzard noted after reviewing the work. “It proves the theorem with no assumptions other than the axioms of mathematics.” Wiles already solved Fermat’s problem three decades ago. Claude built a machine-checkable receipt for it.

That matters because mathematicians are drowning in unverified proofs. AI-written results now arrive faster than human reviewers can check them. Formal proofs eliminate the ambiguity that makes manual verification so time-consuming. This isn’t a new problem—Verifying the Kepler conjecture took four years before a review panel committed to only 99 percent certainty, and Grigori Perelman’s proof of the Poincaré conjecture required roughly as long before the field fully accepted it. Computer-checkable proofs sidestep that uncertainty entirely.

The full 13-million-line proof is on GitHub, free for any mathematician with the time to pick through it.

Leave a Comment