Claude Just Proved Fermat’s Last Theorem — A Math Milestone Explained

Anthropic’s Claude has completed a remarkable mathematical milestone: the first complete, end-to-end computer-checked formalization of Fermat’s Last Theorem.

Claude Just Proved Fermat's Last Theorem — A Math Milestone Explained

Working largely autonomously for 11 days, a team of Claude agents produced about 13 million lines of Lean code and proved roughly 30,300 intermediate theorems, with about 29,500 ultimately used in the final proof.

But there is an important distinction behind the headline.

Claude did not discover Fermat’s Last Theorem from scratch. The theorem had already been proved by mathematician Andrew Wiles in the 1990s. What Claude accomplished was turning the enormously complicated mathematical argument into a form that a computer could verify step by step.

That difference may sound technical, but it is exactly what makes the achievement important.

What Is Fermat’s Last Theorem?

Fermat’s Last Theorem is one of the most famous problems in the history of mathematics.

Its statement is surprisingly simple:

For positive integers a, b and c, there are no solutions to:

aⁿ + bⁿ = cⁿ

when n > 2.

For example, the familiar equation:

3² + 4² = 5²

works because the exponent is 2.

Fermat’s theorem says that once the exponent becomes 3 or greater, there is no equivalent combination of positive integers.

The statement was written by Pierre de Fermat around 1637 in the margin of a copy of Diophantus’s Arithmetica. Fermat famously claimed that he had discovered a proof that was too large to fit in the margin.

Whether Fermat actually had a correct proof remains doubtful.

The problem survived for more than three centuries before Andrew Wiles finally established it.

Andrew Wiles Already Proved It

The phrase “Claude proved Fermat’s Last Theorem” can therefore be misleading if interpreted as a completely new mathematical discovery.

Andrew Wiles presented a proof in 1993, but a flaw was discovered during the subsequent verification process. Wiles and Richard Taylor eventually repaired the gap, and the corrected proof was published in 1995.

Wiles’s proof was enormously sophisticated.

It connected Fermat’s equation to modern areas of number theory, including elliptic curves and modular forms.

In other words, the final solution was nothing like the elementary proof Fermat may have imagined.

The mathematical proof existed.

The challenge was making a computer understand and verify every logical step.

So What Exactly Did Claude Do?

This is where the new milestone becomes fascinating.

Claude was tasked with formalizing the existing mathematics in Lean, a programming language and proof assistant designed to let computers verify mathematical arguments.

A normal mathematical paper can say things like:

“By a standard result, it follows that…”

A human mathematician may understand what that means.

A computer does not.

A formal proof assistant requires the relevant definitions, assumptions, intermediate results and logical steps to be explicitly represented in a machine-readable form.

Claude therefore had to build thousands of mathematical pieces and connect them into one enormous formal proof.

Anthropic says the resulting artifact contains about 13 million lines of Lean code and is more than five times the size of Mathlib, the major community library of formalized mathematics that the proof builds upon.

Claude Worked With Dozens of AI Agents

This was not simply one Claude conversation producing a 13-million-line answer.

Anthropic used a multi-agent workflow.

Dozens of Claude agents worked on different parts of the formalization, defining concepts, proving intermediate statements and tackling increasingly difficult pieces of the argument.

The agents collaborated through Prove2Me, a platform created for coordinating formal mathematics projects.

Prove2Me organizes mathematical work as a network of theorem statements and dependencies. Agents can select unfinished milestones, attempt proofs and build upon results that have already been verified.

This coordination turned out to be critical.

Anthropic says earlier attempts struggled because the agents lost track of the project’s state and failed to collaborate effectively. The workflow improved substantially after Prove2Me was introduced.

Lean Was the Final Judge

One of the most important parts of the story is that the final result was not accepted merely because Claude said it was correct.

Lean checked it.

Proof assistants such as Lean use a small trusted kernel to verify whether a submitted proof actually satisfies the mathematical statement it claims to prove.

If a logical step does not type-check or a required assumption is missing, the computer rejects it.

Prove2Me similarly explains that accepted submissions are checked by Lean’s kernel and cannot simply rely on text matching or an unsupported “trust me” claim.

That is fundamentally different from asking a conventional chatbot:

“Can you prove Fermat’s Last Theorem?”

An ordinary language model might produce something that looks mathematical while containing a subtle logical mistake.

A formal proof assistant is much less forgiving.

Claude Proved Thousands of Intermediate Theorems

The scale of the project is another reason researchers are paying attention.

According to Anthropic, Claude produced computer-verifiable proofs of approximately 30,300 theorems during the project, with around 29,500 used in the final Fermat formalization.

Those intermediate results covered several areas of advanced mathematics.

The final formalization follows a simplified version of the established Wiles route, drawing on exposition by Darmon, Diamond and Taylor, while also incorporating work from the broader Lean formalization effort.

That means the achievement isn’t simply about one famous equation.

It demonstrates that AI agents can potentially navigate and formalize large networks of modern mathematical knowledge.

Why Formalization Matters

At first glance, turning an existing proof into computer code might seem less impressive than discovering a brand-new theorem.

But formalization solves a major problem in mathematics: verification.

A complicated proof can take experts months or years to carefully check.

Even if a mathematical paper has been peer reviewed, errors can remain hidden in complicated arguments.

A formal proof assistant offers another layer of confidence because the final logical structure is checked mechanically.

Anthropic argues that as AI systems begin generating more mathematical work, human mathematicians may struggle to review everything manually. Formalization could therefore become a way to scale mathematical verification.

This Is Not an Independent New Proof of Fermat’s Theorem

This distinction deserves emphasis.

Claude did not wake up and independently derive an entirely new route to Fermat’s Last Theorem.

Instead, the system formalized an established mathematical route based on Wiles’s work and related developments.

So the breakthrough is best described as:

AI-assisted formalization and machine verification of an extremely complex existing proof.

That is still a major accomplishment.

In fact, it may be more useful to think of the milestone as demonstrating that AI can help transform human mathematical knowledge into machine-verifiable mathematics at enormous scale.

The Project Was Expected to Take Years

The speed is particularly striking.

The existing human-led formalization effort had been expected to take years. The Lean project led by Kevin Buzzard at Imperial College London had already been working toward formalizing Fermat’s Last Theorem before Anthropic’s Claude-based effort.

Anthropic says its Claude agents completed their end-to-end formalization in just 11 days.

The project consumed roughly six billion output tokens from an internal research model described by Anthropic as roughly comparable to Claude Fable 5.1.

That is an enormous amount of computation, but the result shows what becomes possible when an AI system is given persistent infrastructure, theorem dependencies and tools rather than being limited to a single chat window.

Human Researchers Still Played an Important Role

It would also be wrong to describe this as completely human-free mathematics.

Anthropic researcher Tianyi Peng provided occasional high-level guidance during the project.

Anthropic also built the infrastructure around the agents, chose the mathematical target, designed the workflow and relied on existing mathematical formalization work.

And Kevin Buzzard, whose team has been working on the Lean formalization of Fermat’s Last Theorem, reviewed the resulting achievement.

So the milestone represents a collaboration between:

  • Human mathematical knowledge
  • Existing formalization projects
  • Lean and Mathlib
  • AI agents
  • Coordination infrastructure
  • Computer verification

That combination is arguably more significant than the headline alone suggests.

Why This Could Change AI Mathematics

The biggest implication isn’t necessarily Fermat’s Last Theorem.

It is the possibility of automating parts of the mathematical verification pipeline.

Imagine a future in which an AI researcher produces a complicated mathematical result and simultaneously generates a formal Lean version.

Instead of asking a small number of experts to manually inspect every logical step, researchers could first run the formal proof through a trusted proof assistant.

That would not eliminate mathematicians.

Instead, it could allow mathematicians to spend more time understanding whether a result is meaningful, finding new ideas and deciding which problems are worth solving.

Anthropic argues that formalization could eventually become a standard companion to mathematical research.

Could Claude Prove Other Famous Theorems?

Potentially, yes.

Anthropic says the same broader approach was also tested on applications of the Hardy-Littlewood Circle Method.

In a smaller experiment involving three personal Claude Max plans, agents working through Prove2Me completed a formalization of Vinogradov’s Three Primes Theorem in about three days.

That suggests the Fermat project may not be a one-off demonstration.

If AI agents become better at maintaining long-term mathematical context and coordinating large proof projects, increasingly ambitious formalization projects could become practical.

The Real AI Milestone Is Bigger Than Fermat

Fermat’s Last Theorem is famous because humans spent centuries trying to solve it.

But the more important AI milestone may be that Claude demonstrated an ability to work with large-scale formal mathematics.

The system didn’t merely produce an answer.

It generated an enormous mathematical artifact that could be checked by a formal proof system.

That changes the question researchers can ask of AI.

Instead of:

“Can AI explain a proof?”

the question becomes:

“Can AI construct mathematical work that a computer can independently verify?”

Claude’s Fermat achievement provides one of the strongest demonstrations yet that the answer can be yes.

Final Takeaway

Claude did not replace Andrew Wiles or discover Fermat’s Last Theorem for the first time.

Wiles’s proof remains the historic mathematical breakthrough.

What Claude has now done is different: it produced the first complete end-to-end computer-checked formalization of Fermat’s Last Theorem, working largely autonomously for 11 days and generating about 13 million lines of Lean code along the way.

That makes the September 2026 announcement a significant moment for AI and mathematics.

The real breakthrough may not be that an AI “solved” a 350-year-old problem.

It may be that AI is becoming capable of turning some of the most complicated mathematics humans have developed into something machines can rigorously check.

Read More:- Google Gemini Spark Can Now Manage Your Google Photos

Frequently Asked Questions

Did Claude really prove Fermat’s Last Theorem?

Claude completed the first complete computer-checked formalization of Fermat’s Last Theorem. It did not discover the theorem’s first human proof; Andrew Wiles and Richard Taylor established the mathematical proof in the 1990s.

Who first proved Fermat’s Last Theorem?

Andrew Wiles produced the first accepted proof, with Richard Taylor helping resolve a gap in the original argument. The corrected proof was published in 1995.

What did Claude actually accomplish?

Claude converted a highly complex existing mathematical proof into Lean, allowing a computer to check the logical steps of the formalized argument.

What is Lean?

Lean is a formal proof assistant and programming language used to express mathematical statements and proofs in a form that can be mechanically checked.

How long did Claude take?

Anthropic says the Claude-based effort completed the end-to-end formalization in about 11 days.

How large is Claude’s Fermat proof?

Anthropic reports approximately 13 million lines of Lean code, making it more than five times the size of Mathlib according to its comparison.

Is this a completely new proof of Fermat’s Last Theorem?

No. Claude’s work follows a simplified version of the established Wiles proof and related mathematical developments. The major novelty is the complete machine-checked formalization.

Why is this important for AI?

The project demonstrates that AI agents can potentially formalize large bodies of advanced mathematics and create proofs that can be checked mechanically rather than relying solely on human review.

 

Scroll to Top