Did AI "Solve" Fermat's Last Theorem? The 13 Million-Line Proof Completed in 11 Days That Could Change Mathematics

Did AI "Solve" Fermat's Last Theorem? The 13 Million-Line Proof Completed in 11 Days That Could Change Mathematics

The 350-Year Problem "Proven" in 11 Days

One of the most famous problems in the history of mathematics is once again capturing the world's attention.

In September 2026, Anthropic announced that its AI, "Claude," had created a complete formal proof of Fermat's Last Theorem that could be verified by a computer from start to finish. The task took 11 days. The generated Lean code reached about 13 million lines, with 33,000 theorems proven during the process, of which 29,500 were used in the final proof.

At first glance, these numbers suggest that AI solved a problem that had puzzled humanity for centuries in just 11 days. However, there is an important distinction to be made here. What Claude did was not discover an unknown solution. Instead, it translated the proof completed by Andrew Wiles and Richard Taylor in the 1990s, which has been recognized as correct in the mathematical community, into a language that a computer could verify step by step, filling in the vast missing intermediate parts.

This is not a "discovery of a new proof" but a "complete machine verification of an existing proof." Failing to recognize this difference would lead to overestimating the achievement. On the other hand, considering formalization as merely a translation task would underestimate its difficulty and the impact of this achievement.


The Line Fermat Left in the Margin

Fermat's Last Theorem asserts that there are no positive integers a, b, c, and an integer n greater than 2, such that "a^n + b^n = c^n."

Around 1637, Pierre de Fermat wrote this assertion in the margin of an ancient Greek mathematics book, "Arithmetica," claiming to have discovered a remarkable proof, but noted that the margin was too narrow to contain it. However, that proof was never found.

Subsequently, generations of mathematicians attempted to solve it, and while proofs for individual exponents progressed, the general case remained unsolved for over 350 years. The turning point came in 1993 when Wiles announced a proof after years of secret research, but a significant flaw was found during verification. Wiles, along with Taylor, worked on corrections, overcoming the issue in 1994, and the paper was published in 1995.

This story illustrates that in mathematics, "proven" does not mean that the answer is established the moment someone writes it down. A proof must be read by other experts, examined including the premises and cited theorems, and verified that the chain of logic is unbroken. The fact that even a mathematician of Wiles' caliber had a flaw found after the initial announcement symbolizes its difficulty.


What is "Obvious to Humans" Doesn't Translate to Computers

Typical mathematical papers are written for human experts to read. Authors omit common transformations, refer to known results, and do not explicitly state parts that can be understood from context. Readers use their background knowledge to fill in the gaps and follow the logic.

However, computers do not make assumptions like "this is obvious." Definitions, premises, types, theorems used, and the conclusions derived from them must be specified precisely, and each step must be shown to follow the rules. The tool used for this task was the theorem-proving assistant, Lean.

In Lean, proofs are written in a format close to programming. A small kernel checks whether the inputted proof follows logical rules and does not accept it if there are leaps in the process. In that sense, formal proofs are akin to very rigorous automated tests for mathematical assertions.

The challenge is that it's not enough to simply translate Wiles' paper into machine language. Proofs intended for humans are built upon vast bodies of knowledge in algebra, geometry, harmonic analysis, number theory, and more. If necessary concepts and auxiliary theorems do not exist in Lean's shared library, they must also be newly defined and proven. The scale of 13 million lines is also a result of building this "invisible foundation" piece by piece.


Multiple AIs Collaborated on the Massive Proof

In Anthropic's experiment, dozens of Claude agents worked in parallel. One agent defined concepts, another proved auxiliary theorems, and yet another combined them to progress to higher-level theorems. The AI group executed a large-scale division of labor similar to how humans conduct joint research.

However, it wasn't smooth sailing from the start. In early trials, agents lost track of the project's overall progress and couldn't effectively utilize each other's results. In long-term tasks, not only the reasoning power of individual AIs but also a system to manage which tasks were completed and what should be proven next was crucial.

The collaborative formalization platform Prove2Me, which managed dependencies between theorems as a directed acyclic graph, was used. It mapped out the items to be proven like a map, allowing each agent to choose unresolved tasks and enabling other agents to reuse completed results. The design also supported large-scale division of labor by reducing Lean's compilation load and utilizing natural language explanations for search.

Ultimately, the AI group consumed about 6 billion output tokens and reached the root of the proof in just under 11 days. According to Anthropic, in addition to verification by Lean, a comparison tool confirmed that the final description of the theorem matched the Fermat's Last Theorem in the existing Mathlib library. In other words, they confirmed that they reached the intended assertion, not a different problem with a similar name.


The 11 Days of AI Cannot Be Simply Compared to a Human 5-Year Plan

A frequent comparison is made with the human-centered formalization project led by mathematician Kevin Buzzard at Imperial College London. This project started in 2024 and aims to formalize Fermat's Last Theorem in Lean over several years.

The description "AI completed in 11 days what humans would take 5 years" is striking, but their objectives are not entirely the same. Anthropic's achievement prioritized making the theorem machine-verifiable from end to end. Meanwhile, Buzzard and his team aim to organize foundational theories that can be incorporated into shared libraries and create dynamic documents where humans can explore and learn modern proofs.

Creating a massive code that "passes" in a short time and organizing it in a way that mathematicians can understand, reuse, and connect to future research are different challenges. Anthropic itself explained that it utilized the foundation built by human projects and existing Mathlib. Portraying this competition as a simple speed race between AI and mathematicians is inaccurate.

Nevertheless, the fact that end-to-end formalization is now possible in days rather than years is significant. Buzzard noted in his blog that while little new was learned mathematically from this achievement, the fact that AI could formalize the equivalent of thousands of pages in 11 days demonstrates the potential of automated formalization. He also stated that after formalization, he could be 100% certain about proofs previously considered 99.9% correct, which is seen as a symbol of this achievement.


Social Media Divided Between "Astonishment" and "It's Not a New Discovery"

Following the announcement, there was significant reaction on platforms like X, Reddit, and Hacker News. The official Lean account introduced the achievement as the first fully computer-verified proof. Hundreds of comments gathered on related posts on Hacker News, and on Reddit, voices expressed astonishment at the scale of 13 million lines and the necessity of over 29,000 intermediate theorems.

 

However, the most repeated warning was about the interpretation of the headlines. In response to the phrase "AI solved Fermat's Last Theorem," many corrections were posted stating, "Wiles and Taylor solved it, and Claude formalized the existing proof in Lean," and "It's not a new mathematical discovery." Some reactions lightly regarded formalization as mere format conversion, but there were counterarguments stating that supplementing the missing foundation of a lengthy proof and making tens of thousands of intermediate theorems machine-verifiable is a significant research achievement in itself.

The discussion further extended to the roles of researchers and the allocation of funds. Some welcomed the leap in research productivity as AI reached what had been pursued with large grants and years of planning in a short time. On the other hand, concerns were expressed about the possibility of AI preempting themes for young researchers and the potential loss of motivation to think about mathematics manually. In the comments section of Buzzard's blog, opinions were exchanged between those who saw it as "the sad end of mathematics" and those who responded, "The mathematical content hasn't changed; it's the verification means that have advanced."

These are not random public opinion surveys but trends observed in posts on various social media platforms. Nonetheless, they clearly illustrate why this achievement is prone to misunderstanding and evokes strong emotions. People are reacting not just to a single theorem but to the larger question of "how much of intellectual labor can be automated."


A Correct Proof and a Useful Proof Are Not the Same

There are clear weaknesses in this achievement. The scale of 13 million lines exceeds the entire major mathematical library Mathlib by more than five times. Even if a machine can verify its correctness, it is not easy for humans to grasp the overall picture, find necessary parts, and reuse them in other proofs.

For the advancement of mathematics, not only correct conclusions but also explanations that help understand why they are so, appropriate abstractions to organize concepts, and lemmas that can be used in other fields are necessary. If the same foundational theory is recreated as a massive dedicated code each time, formal proofs may increase, but the knowledge system may not grow. There is a possibility that verifiable proofs will be mass-produced, yet each will become an isolated island with little compatibility.

Therefore, the next challenge is likely to be shortening and organizing the code created by AI, reducing it to Mathlib, and linking it to human-readable explanations. AI roughly paves the way, and humans and AI map that path. This achievement should be seen not as a goal but as the starting point of this new division of labor.


A "Tireless Second Reader" to Supplement the Limits of Peer Review

The greatest significance lies not in proving a famous theorem once more, but in demonstrating the potential to execute machine verification on a large scale, which was previously unrealistic due to cost and time.

Verifying mathematical papers requires long hours from experts. Especially when a new theory spans hundreds of pages and depends on numerous prior studies, it is difficult for reviewers to reconstruct everything. If AI can assist in formalization, the habit of submitting proofs that can be checked with Lean or similar tools alongside human-oriented papers may spread.

This becomes even more important in an era when AI begins to generate mathematical results in large quantities. If AI generates paper candidates faster than humans can read them, traditional peer review alone will not suffice. By combining generating AI, formalizing AI, and a small verification kernel that ultimately checks the logic, it becomes possible to efficiently confirm at least whether "the conclusion is logically derived."

Of course, formal proofs do not determine the entire value of a paper. Judgments remain on whether the definitions appropriately represent real-world problems, whether the research topic is important, whether the proof provides new insights, and whether the explanation is educational. Trust in verification software and foundational libraries, auditing of massive code, and the uneven distribution of computational resources are also unavoidable issues.

Nevertheless, the significance of mathematics acquiring a "second reader" that does not tire, respects no authority, and does not overlook logical gaps is immense.


Will AI Replace Mathematicians?

This event is not about AI wholesale replacing the work of mathematicians. The 11 days of Claude were made possible by humans who created the original proof, researchers who developed theories over decades, the community that nurtured Mathlib and Lean, and developers who designed the foundation to divide the proof.

However, it is premature to dismiss it as "just a tool." The fact that multiple agents rebuilt from failures, tracked dependencies, accumulated tens of thousands of theorems, and completed a massive goal is qualitatively different from traditional automation. Instead of humans giving detailed step-by-step commands, AI groups given a goal and work environment executed a significant portion of a long-term project.

In the future, the value of mathematicians may shift further from "the speed of writing proof code by hand" to the ability to choose which problems to tackle, organize them with which concepts, and explain what the results mean. AI can speed up verification, but it does not automatically complete the task of editing mathematics as human knowledge.

There are no new conclusions about Fermat's Last Theorem itself. Wiles and Taylor's proof was correct. However, the fact that the work of making its correctness verifiable by machine from end to end was completed in 11 days changes the way mathematics is created, read, and believed.

Fermat's proof, which could not fit in the margin, has now expanded to 13 million lines about 360 years later. The next challenge may be to compress that massive proof back into knowledge that humans can understand.


Source URL