A commemorative stamp for the World Mathematical Year 2000. It features 'Fermat's Last Theorem', one of the most famous unsolved problems in the history of mathematics. Z. Ziegler, M. Ondrachek/Wikimedia Commons

A commemorative stamp for the World Mathematical Year 2000. It features ‘Fermat’s Last Theorem’, one of the most famous unsolved problems in the history of mathematics. Z. Ziegler, M. Ondrachek/Wikimedia Commons

An artificial intelligence (AI) system has completed in just 11 days the formalization of the proof of ‘Fermat’s Last Theorem’—a task human mathematicians expected would take around 10 years—by converting it into computer-verifiable code. Anthropic’s AI model ‘Claude’ succeeded in translating the proof of this iconic mathematical problem into roughly 13 million lines of code, leading many to conclude that AI is now poised to become a mainstream tool for verifying mathematical research.

According to a report published in the international journal ‘Nature’ on the 7th (local time), Anthropic announced on the 4th that it had fully formalized the proof of Fermat’s Last Theorem into computer-verifiable code using an advanced prototype model of Claude.

In mathematics, ‘formalization’ is the process of converting a mathematical argument, written in natural language and formulas, into a formal language that a computer can rigorously verify. It goes beyond a human merely writing out the logical reasoning: each step must be encoded so that a computer can check, one by one, whether it is logically valid.

Claude used ‘Lean’, a programming language widely employed to verify mathematical theorems. Lean is software developed in 2013 by the Microsoft Research team to check the correctness of mathematical proofs.

Fermat’s Last Theorem states that when n is an integer greater than or equal to 3, there are no positive integers x, y, z that satisfy x^n+y^n=z^n. Pierre de Fermat, a 17th-century French lawyer, wrote this statement in 1637 in the margin of Diophantus’s book ‘Arithmetica’ during his leisure time, adding that he had discovered a truly marvelous proof but that the margin was too small to contain it. Because he left no proof, the statement remained one of the central unsolved problems in mathematics for more than 350 years.

According to mathematicians, Fermat’s Last Theorem is the problem for which the largest number of incorrect proofs have been announced to date. British mathematician Andrew Wiles finally completed a proof in 1995, but even then, an error was found in the proof he first presented in 1993, forcing him to revise it.

Andrew Wiles, professor of mathematics at the University of Oxford in the UK, who proved Fermat's Last Theorem in 1995. C. J. Mozzochi, Princeton N.J/Wikimedia Commons

Andrew Wiles, professor of mathematics at the University of Oxford in the UK, who proved Fermat’s Last Theorem in 1995. C. J. Mozzochi, Princeton N.J/Wikimedia Commons

Wiles’s proof is built on an extremely extensive body of modern mathematical theory. The paper he published at the time ran over 100 pages. Because the argument is so intricate, it took more than two years for fellow mathematicians to check whether there were any logical errors.

To verify the same content in Lean, one must first enter not only the final argument but also the many definitions and existing theorems on which the proof depends into the computer as code that it can understand.

 

Since 2024, Kevin Buzzard, a professor at Imperial College London in the UK, has led a project to add thousands of pages of prerequisite results needed to formalize Fermat’s Last Theorem to ‘mathlib’. Mathlib is a Lean-based mathematical knowledge library. Buzzard estimated that completing this work would take about 10 years.

Claude independently completed a Lean verification of the same proof in 11 days. The generated code spans about 13 million lines and includes roughly 29,500 intermediate lemmas that must be checked step by step to reach the final proof.

 

Buzzard said, “Two years ago, I would have thought this was fantasy, but now it has actually happened,” adding, “Until now, I was 99.9% sure that Wiles’s proof was correct, but thanks to this formalization, I am now 100% sure.”

Daniel Litt, an associate professor in the Department of Mathematics at the University of Toronto in Canada, commented, “If we can formalize Fermat’s Last Theorem, then we can probably formalize anything.”

Claude’s code cannot immediately be adopted as a shared resource for mathematicians. Mathlib is a public library established and standardized so that multiple researchers can reuse existing definitions and theorems, but the large-scale codebase Claude created was organized independently, tailored specifically to completing and verifying the proof.

 

Integrating parts of Claude’s code into mathlib is also expected to require an enormous amount of work. Some experts warn that if AI systems each generate large, independent mathematical libraries, incompatible frameworks could proliferate.

Even so, mathematicians hope that AI and automatic proof-verification technologies will eventually make the process of reviewing papers more efficient. Frederick Manners, a professor at the University of California, San Diego, said, “Mathematical papers are becoming longer and more complex, and it is difficult to catch all the errors through peer review alone,” adding, “A system that could take a paper as input and then provide a certificate that the proof is correct, or indicate where the errors lie, would be extremely useful.”

Copyright ⓒ DongA Science. All rights reserved.