Tech and AI
Thirteen million lines of code, and a 350 year old theorem is machine checked
By Staff Writer | 6 September 2026

A proof that took a mathematician seven years and reviewers months to certify has now been rendered into a form a computer can verify. The interesting part is not the mathematics. It is the checking.
Anthropic published on 4 September 2026 what it describes as the first complete computer checked proof of Fermat's Last Theorem. Its Claude models worked largely autonomously over 11 days, writing the proof in Lean, a language in which every step of an argument is set out in a form software can verify algorithmically.
The output is 13 million lines of Lean. Along the way the system proved 30,300 intermediate theorems, 29,500 of which are used in the final proof. The whole thing is more than five times the size of Mathlib, the community library of formalised mathematics it builds on. It follows a simplified version of the proof published by Sir Andrew Wiles in May 1995, which ran to 129 pages and took months of expert work to check.
Why this was supposed to take years
Formalisation is not the same as proving. A proof written for human readers skips the steps a competent reader can supply. Lean cannot supply anything: every step has to be there, however trivial, and a formalisation can only build on the small fraction of mathematics that has already been formalised. The community project to put Fermat's Last Theorem into Lean began in 2024, is hosted at Imperial College London and funded by an Engineering and Physical Sciences Research Council grant, and is led by Kevin Buzzard, Professor of Pure Mathematics there. The blueprint describing merely the opening phase of that project runs to 86 pages.
The test that produced this result was set by Tianyi Peng, an Anthropic researcher whose group at Columbia University builds tools for machine formalisation. Human input during the run was, on the company's account, limited to occasional one line instructions about which piece of the structure to attack next. Dozens of agents worked in parallel, defining concepts, proving intermediate results and using them to reach harder ones.
Professor Buzzard was shown the finished proof.
This extraordinary autoformalization achievement, which Anthropic researchers say only took 11 days, proves Fermat's Last Theorem with no assumptions other than the axioms of mathematics.
Kevin Buzzard, Professor of Pure Mathematics at Imperial College London
Along the way we see autoformalization of algebra, harmonic analysis, geometry and number theory, and we learn that AI autoformalization artefacts are now robust enough to be built upon; the proof is multi-layered.
Kevin Buzzard, Professor of Pure Mathematics at Imperial College London
The point that travels
Fermat wrote the conjecture in the margin of a book in about 1637, with a note that he had a marvellous proof which the margin was too narrow to contain. It held out for more than 350 years. In 1908 a prize of 100,000 German gold marks was offered for a correct proof and 621 wrong ones arrived in the first year. Wiles presented his in June 1993, a reviewer found a gap two months into the checking, and it took him a further year and the help of a former student to close it.
That history is a history of checking rather than of discovery. The gap in the 1993 proof was found by a person reading carefully. Nothing else would have found it.
This is where the result reaches beyond mathematics. Any long technical argument that only its author fully understands is a liability wherever it matters, and that is as true of a delay analysis, a quantum calculation or a structural model as it is of a proof. The reviewer's problem is always the same: the work is too long to re-derive, so it gets checked by sampling and by reputation, and errors survive in the parts nobody sampled.
A machine checked artefact does not remove judgement. Somebody still has to decide that the statement being proved is the right statement, that the model represents the real thing, and that the inputs are sound. What it removes is the possibility that the chain of reasoning contains a broken link nobody noticed. That is a narrow guarantee, and it is a large one.