AnthropicP022026-09-04lab post onlyformal-verificationautoformalizationleanmulti-agent-systemsmathematics

Formalizing Fermat's Last Theorem

Claude, working largely autonomously with a multi-agent harness over about two weeks, produced the first complete, computer-checked Lean proof of Fermat's Last Theorem.

It suggests AI-assisted formalization could soon make it feasible to computer-verify large swaths of mathematics, easing the years-long burden of manually refereeing complex proofs.

How much of this do you want?
Orient me keeps four things: the abstract, the method, the claim↔evidence panel, and where it leads next. Everything adds constructs, the model table, every reported statistic, the discussion framing and the style moves. Switching hides nothing permanently and never changes what a section says — it only changes how many are on screen.
Abstract

Two readings, equal authority

How to choose: The paper’s words is verbatim — use it when you need to quote, or to judge how they write. Plain language is a paraphrase written for comprehension — use it when you want the idea fast. Neither is a summary of the other; they are two doors into the same room.

This source carries no verbatim abstract.

Constructs

What this paper defines

Every definition below is the paper’s own sentence, with its locator. The plain gloss is a reading aid and is marked as one.

Formalization (autoformalization)

“converting the mathematical reasoning into a form computers can check automatically”opening summary (untitled)

In plain terms: Translating a human-written math proof into a language a computer can automatically verify step by step.

Lean (proof assistant)

“Proof assistants like Lean verify the logic of a proof algorithmically, demonstrating its correctness beyond a doubt.”Formalizing Fermat's Last Theorem

In plain terms: Lean is software that checks every logical step of a proof automatically, leaving no room for a hidden gap.

Mathlib

“the principal community library of mathematical proofs this theorem builds on”Formalizing Fermat's Last Theorem

In plain terms: Mathlib is the shared, community-built library of previously formalized math results that new Lean proofs can build on.

Prove2Me

“an open collaborative platform for formalizing mathematics designed by Tianyi Peng and his collaborators at Columbia University”Formalizing Fermat's Last Theorem

In plain terms: Prove2Me is a shared online platform that helps multiple AI agents coordinate on proving pieces of one large formalization project.

DAG of theorem statements

“Maintaining a directed acyclic graph (DAG) of theorem statements that agents used to decide what proofs they should attempt next.”Formalizing Fermat's Last Theorem

In plain terms: A map of which theorems depend on which others, used to decide what to prove next without going in circles.

Method

What they actually did

Each step is a synthesis. Open any step to see the paper’s own sentence it was derived from, with its locator — so nothing here floats free of the source.

The path from a failed direct multi-agent attempt to a Prove2Me-coordinated, DAG-guided effort that produced and verified a complete Lean formalization of Fermat's Last Theorem.
Click any box to open it.
  1. An Anthropic researcher set out to test whether Claude could make progress formalizing Fermat's Last Theorem (FLT).
    Trace this step to the paper
    “set out to test whether Claude could make progress on formalizing FLT”opening summary (untitled)
  2. Claude worked largely autonomously for about 11 days to write the proof in the Lean programming language.
    Trace this step to the paper
    “Claude worked largely autonomously over 11 days to write the proof in the Lean programming language.”opening summary (untitled)
  3. Dozens of Claude agents collaborated to define mathematical concepts, prove intermediate theorems, and use those to prove progressively harder statements.
    Trace this step to the paper
    “Dozens of Claude agents collaborated to define concepts, prove intermediate theorems, and use those theorems to prove ever harder statements.”Formalizing Fermat's Last Theorem
  4. Claude followed a simplified version of Wiles's proof (via the Darmon-Diamond-Taylor exposition), receiving only occasional high-level human steering.
    Trace this step to the paper
    “Mathematical input from humans was limited to occasional high-level instructions from Tianyi: “Jacobian as a scheme sounds high priority,” “push [the] Mazur [theorem] to be done soon.””Formalizing Fermat's Last Theorem
  5. Initial multi-agent attempts failed because agents lost track of the project's state and stopped collaborating effectively.
    Trace this step to the paper
    “A number of Claude’s initial attempts failed: while agents had some early success, they quickly lost track of the project’s state and stopped collaborating effectively.”Formalizing Fermat's Last Theorem
  6. The team switched to the Prove2Me platform, which coordinated agents via a shared DAG of theorem statements, separated theorem statements from proofs for faster compilation, and enabled natural-language search and reuse of theorem statements.
    Trace this step to the paper
    “The effort succeeded when we switched to using Prove2Me , an open collaborative platform for formalizing mathematics designed by Tianyi Peng and his collaborators at Columbia University.”Formalizing Fermat's Last Theorem
  7. With Prove2Me and a Claude Code-based multi-agent harness, a team of agents finished the proof in a little under two weeks, consuming about six billion output tokens from an internal research model comparable to Claude Fable 5.1.
    Trace this step to the paper
    “With Prove2Me and a Claude Code-based multi-agent harness, a team of agents completed the proof in a little under two weeks, consuming about six billion output tokens from a general-purpose internal research model roughly comparable to Claude Fable 5.1.”Formalizing Fermat's Last Theorem
  8. The finished proof was checked by Lean using only Lean's three standard axioms, and a comparator confirmed the formalized statement matches Mathlib's own statement of FLT.
    Trace this step to the paper
    “The finished proof was checked by Lean; it uses just Lean’s three standard axioms, and a comparator confirmed that the theorem’s statement matches Mathlib’s own statement of FLT.”Formalizing Fermat's Last Theorem
  9. As a smaller-scale follow-up test, researchers used three personal Claude Max subscription plans coordinated through Prove2Me to formalize Vinogradov's Three Primes Theorem in three days.
    Trace this step to the paper
    “Anthropic researchers did a small experiment using three personal Claude Max plans to formalize applications of the Hardy-Littlewood Circle Method.”Reducing the burden of formal verification
The models under study

Exactly what was run, and how

ModelDeveloperTempEffort / reasoningDeploymentOther settings
general-purpose internal research model (roughly comparable to Claude Fable 5.1)Anthropicnot reportednot reportedunstatedAbout six billion output tokens were consumed across the main effort, used within a Claude Code-based multi-agent harness.
Claude (via personal Claude Max subscription plans)Anthropicnot reportednot reportedunstatedThree personal Claude Max plans were used; agents collaborated entirely through Prove2Me for a smaller-scale follow-up formalization.
Source for general-purpose internal research model (roughly comparable to Claude Fable 5.1) settings
“consuming about six billion output tokens from a general-purpose internal research model roughly comparable to Claude Fable 5.1”Formalizing Fermat's Last Theorem
Source for Claude (via personal Claude Max subscription plans) settings
“Anthropic researchers did a small experiment using three personal Claude Max plans to formalize applications of the Hardy-Littlewood Circle Method.”Reducing the burden of formal verification

What they reported — and what they left out

The post names only one model loosely ("a general-purpose internal research model roughly comparable to Claude Fable 5.1") and gives a total output-token count, but states no temperature, reasoning-effort setting, explicit API-vs-UI deployment, or system prompt for either model used.

Results

The numbers they report

Claude completed the formalization in about 11 days of largely autonomous work.

11 days

See it in the paper
“In 11 days, working largely autonomously, Claude produced the first end-to-end, computer-checked proof of FLT.”opening summary (untitled)

The proof required writing a very large amount of Lean code and proving tens of thousands of intermediate theorems.

13 million lines of Lean; 29,500 intermediate theorems proved

See it in the paper
“Along the way, it wrote 13 million lines of Lean and proved 29,500 intermediate theorems.”opening summary (untitled)

The final proof is more than five times the size of Mathlib, the community library it builds on.

over 5x the size of Mathlib

See it in the paper
“At 13 million lines of Lean code, Claude’s proof is over 5x the size of Mathlib, the principal community library of mathematical proofs this theorem builds on.”Formalizing Fermat's Last Theorem

Failed early multi-agent attempts still contributed a small fraction of the final proof's substantive code.

~7% of the non-boilerplate lines in the final proof

See it in the paper
“Their failed efforts contributed ~7% of the non-boilerplate lines in the final proof.”Formalizing Fermat's Last Theorem

Using Prove2Me and a multi-agent harness, the team finished the proof in under two weeks while consuming a large number of output tokens.

a little under two weeks; about six billion output tokens

See it in the paper
“With Prove2Me and a Claude Code-based multi-agent harness, a team of agents completed the proof in a little under two weeks, consuming about six billion output tokens from a general-purpose internal research model roughly comparable to Claude Fable 5.1.”Formalizing Fermat's Last Theorem

The finished proof relies only on Lean's basic axioms, and its formal statement was confirmed to match Mathlib's own statement of FLT.

3 (Lean's standard axioms)

See it in the paper
“The finished proof was checked by Lean; it uses just Lean’s three standard axioms, and a comparator confirmed that the theorem’s statement matches Mathlib’s own statement of FLT.”Formalizing Fermat's Last Theorem

In a smaller separate test using consumer subscription plans, agents formalized a related number-theory result in a few days.

3 days; 3 personal Claude Max plans

See it in the paper
“Collaborating entirely through Prove2Me, the agents jointly completed a formalization of Vinogradov’s Three Primes Theorem in just three days.”Reducing the burden of formal verification

The human community's own blueprint for just the initial phase of formalizing FLT was already lengthy, reflecting how much effort formalization was expected to take.

86 pages

See it in the paper
“Just the blueprint the mathematical community has been using to describe the initial phase of the project runs to 86 pages.”Formalizing Fermat's Last Theorem

For comparison, the original human-written proof of FLT was far shorter than Claude's Lean formalization.

129 pages (Wiles's original 1995 proof)

See it in the paper
“The first proof, from Sir Andrew Wiles in 1995, ran to 129 pages and required months of painstaking work to verify.”opening summary (untitled)

Historically, verifying other landmark proofs has taken years, illustrating the scale of the verification problem formalization addresses.

roughly four years (Poincaré conjecture acceptance)

See it in the paper
“Grigori Perelman’s 2002 proof of the Poincaré conjecture took the community roughly four years and three 300-page expositions to accept.”Footnotes
Claim ↔ evidence

What they assert, beside what they showed

Left is the claim in the paper’s own words. Right is the data offered for it. Where the two do not fully meet, a gold band names the distance.

The claim

Anthropic claims this is the first complete, computer-checked proof of Fermat's Last Theorem.

“We are sharing the first complete computer-checked proof of Fermat’s Last Theorem.”

The evidence

“The finished proof was checked by Lean; it uses just Lean’s three standard axioms, and a comparator confirmed that the theorem’s statement matches Mathlib’s own statement of FLT.”

Formalizing Fermat's Last Theorem
The claim

The authors claim Claude did most of the formalization work autonomously, with only light human steering.

“Claude worked largely autonomously over 11 days to write the proof in the Lean programming language.”

The evidence

“Mathematical input from humans was limited to occasional high-level instructions from Tianyi: “Jacobian as a scheme sounds high priority,” “push [the] Mazur [theorem] to be done soon.””

Formalizing Fermat's Last Theorem
Mind the gap: The post gives only two example human instructions as illustration; it does not quantify the total number of human interventions or how much they shaped the overall proof strategy, so 'largely autonomous' rests on illustrative examples rather than a full accounting.
The claim

The authors claim switching to the Prove2Me platform is what made the multi-agent effort succeed.

“The effort succeeded when we switched to using Prove2Me , an open collaborative platform for formalizing mathematics designed by Tianyi Peng and his collaborators at Columbia University.”

The evidence

“A number of Claude’s initial attempts failed: while agents had some early success, they quickly lost track of the project’s state and stopped collaborating effectively. Their failed efforts contributed ~7% of the non-boilerplate lines in the final proof.”

Formalizing Fermat's Last Theorem
Mind the gap: The evidence explains why the prior approach failed (state-tracking and coordination breakdown) but does not isolate Prove2Me's contribution from other changes made at the same time (more agents, more time, a different harness), so the causal attribution to Prove2Me specifically is not directly tested.
The claim

An outside mathematician, Kevin Buzzard, is quoted endorsing the achievement as significant and trustworthy.

“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.”

The evidence

“We thank Kevin Buzzard for reviewing the proof and for his comments.”

Acknowledgments
Mind the gap: Buzzard's endorsement is attributed to reviewing the proof and giving comments, but the post does not describe the scope or depth of that review (e.g., whether he checked the Lean code directly or relied on Anthropic's own summary and the automated Lean check).
The claim

The authors suggest large-scale AI-assisted formalization could reduce the burden on human referees checking new mathematical results.

“The speed with which we were able to produce this proof demonstrates that it is now possible to formalize large swaths of mathematics, which may both catch errors in the common body of mathematical proofs and reduce the burden of refereeing new work.”

The evidence

“Anthropic researchers did a small experiment using three personal Claude Max plans to formalize applications of the Hardy-Littlewood Circle Method. Collaborating entirely through Prove2Me, the agents jointly completed a formalization of Vinogradov’s Three Primes Theorem in just three days.”

Reducing the burden of formal verification
Mind the gap: The evidence shows a fast formalization of one number-theory result at small scale; it does not measure any actual reduction in referee workload or errors caught across the broader mathematical literature.
The claim

The authors claim writing Lean proofs also helps Claude produce novel (non-formalization) mathematical results.

“Writing Lean also seems to help Claude prove novel results.”

The evidence

“Many of our recent Claude-authored results have been formalized in parallel with their proofs, and Claude appears to use these partial proofs to independently check its hypotheses much like it writes numerical simulations to check that it’s on the right track.”

Reducing the burden of formal verification
Mind the gap: The claim is hedged with 'seems to' and 'appears to,' and no specific results, counts, or a with/without-Lean comparison are given to substantiate the effect.
Discussion & after

How they frame it, and what they want next

Their framing

Anthropic frames the FLT formalization as evidence that AI-assisted formal verification has reached a new level of feasibility and could scale to much of the mathematical literature, helping humans keep pace with a growing volume of AI-generated proofs. They present formalization as an area where they feel unambiguously positive about AI's role, while still noting it should complement rather than replace human-readable exposition.

Register: The post is confident and celebratory about the specific technical accomplishment (quoting Claude's own logs calling it a 'Historic moment' and Buzzard calling it 'extraordinary'), but hedges more cautiously when generalizing to future impact, using words like 'seems,' 'appears,' and 'may.'

Where they hedge

“Although we do not think a formalized proof should replace a human-understandable exposition, it may be the only feasible way for the mathematical community to keep up with AI-generated contributions.”Reducing the burden of formal verification
“This is partly because Mathlib is concise and well-reviewed, while our proof is likely much longer than it needs to be.”Footnotes
“Claude appears to use these partial proofs to independently check its hypotheses”Reducing the burden of formal verification

What they say it means

  • Large-scale AI-assisted formalization could make it feasible to check large swaths of existing and new mathematics, catching errors and easing referee burden.
    the paper’s words
    “The speed with which we were able to produce this proof demonstrates that it is now possible to formalize large swaths of mathematics, which may both catch errors in the common body of mathematical proofs and reduce the burden of refereeing new work.”Reducing the burden of formal verification
  • Formalized proofs may become a standard companion to human-written mathematical write-ups.
    the paper’s words
    “We expect it will become common to produce a formalized proof alongside any write-up intended for a human reader.”Reducing the burden of formal verification
  • Collaborative formalization of major theorems may become achievable with only consumer-level AI subscriptions, not just large dedicated research efforts.
    the paper’s words
    “We think with the right scaffold, collaborative formalization of major results with consumer AI subscriptions is achievable.”Reducing the burden of formal verification

What they call for next

  • Anthropic and other labs are expanding free and discounted access and research credits so more mathematicians can pursue formalization work.
    the paper’s words
    “Anthropic as well as other labs have recently expanded their support for external researchers—including mathematicians working on pure math and formalization—with free and discounted subscriptions and research credits.”Reducing the burden of formal verification
  • Anthropic offers dedicated grants for larger formalization projects and invites researchers to pursue them.
    the paper’s words
    “We also offer dedicated grants for larger scientific projects, which could include formalizing other major theorems or improving Lean or Mathlib.”Reducing the burden of formal verification

Limitations they state

“This is partly because Mathlib is concise and well-reviewed, while our proof is likely much longer than it needs to be.”Footnotes
“Although we do not think a formalized proof should replace a human-understandable exposition, it may be the only feasible way for the mathematical community to keep up with AI-generated contributions.”Reducing the burden of formal verification
“A number of Claude’s initial attempts failed: while agents had some early success, they quickly lost track of the project’s state and stopped collaborating effectively.”Formalizing Fermat's Last Theorem
For your own writing

Moves worth stealing

Opens with vivid historical narrative (Fermat's marginal note, Wiles's saga) before getting to the technical contribution, making a dry formalization result feel like a story.

“Around 1637, Pierre de Fermat jotted down a claim in the margin of his copy of Diophantus’s Arithmetica that would become one of the most famous mathematical conjectures of all time”

Brings in an independent outside expert's verbatim quote to validate the claim, rather than only asserting significance in-house.

“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.”

Shows raw, informal model-generated text (agent chat logs with emoji and timestamps) as primary evidence of the moment of discovery, humanizing the AI's process.

“🏁🏁🏁The FLT root reads PROVED on prove2me at 02:00:57Z Aug-18 (10:00:57pm ET Aug-17). Historic moment for this campaign.”

Uses footnotes to carry supporting anecdotes and caveats without interrupting the main narrative flow.

“Their failed efforts contributed ~7% of the non-boilerplate lines in the final proof.”
Connected

Where else this leads

Published alongside it

The nearest publications in time, across all three labs.

What this page was built from

This is Anthropic's public blog post about the work, not a technical preprint with numbered sections or an abstract; the manifest marks the extracted source text as 'partial' and it was scraped with surrounding site navigation and footer boilerplate, which was excluded from extraction.