← BLOG
AI6 min

How a Shared Graph Let Claude Formalize Fermat's Last Theorem in 11 Days

SolidAtoms Team
OCT 10, 2026
How a Shared Graph Let Claude Formalize Fermat's Last Theorem in 11 Days

On September 4, Anthropic announced that Claude had produced the first end-to-end, computer-checked proof of Fermat's Last Theorem in Lean, the proof assistant mathematicians use to verify formal arguments line by line. The run took 11 days, was largely autonomous, and produced 13 million lines of Lean code across roughly 30,300 formalized theorems, about 29,500 of which ended up load-bearing in the final proof. That's more than five times the size of Lean's entire main mathematics library, built in under two weeks.

The headline is easy to misread, so it's worth being precise about what happened. Andrew Wiles proved Fermat's Last Theorem in 1995. Nobody needed Claude to establish that an + bn = cn has no positive integer solutions for n > 2. What didn't exist until this run was a version of that proof a computer can check symbol by symbol, with no gaps, no hand-waving, and no trust required in any human referee. Formalizing an already-known proof is its own enormous undertaking — Imperial College London's Kevin Buzzard has been leading a community effort to do exactly this for years. He reviewed Anthropic's artifact and called it "this extraordinary autoformalization achievement," noting it spans algebra, harmonic analysis, geometry, and number theory in a form future formal proofs can build on directly.

The actual engineering problem

Long-horizon formal proof is a brutal test case for agents. A single Lean proof of something like FLT depends on tens of thousands of intermediate lemmas, and a naive approach — one agent, one long-running session, everything held in context — falls apart well before the finish line. Context windows fill up, agents forget what they've already proven, and duplicate work compounds across a task that takes days rather than minutes. This is the same failure mode teams building coding agents run into on large refactors, just sharpened to a point by mathematics, where a single wrong step invalidates everything downstream of it.

Anthropic's answer was Prove2Me, a platform built with Anthropic researcher Tianyi Peng and collaborators at Columbia University. Instead of asking one agent to carry the whole proof in its head, Prove2Me maintains a directed acyclic graph (DAG) of theorem statements as shared external state. Statement-writing is separated from proof-writing: agents propose what a useful next lemma should say, other agents attempt to prove it, and each node carries a natural-language description so agents can find and reuse results without re-deriving them from scratch.

That structure did two things at once. It let dozens of Claude agents work the graph in parallel, each picking off tractable frontier nodes instead of waiting on a single thread of execution. And it sidestepped the memory-degradation problem entirely — no individual agent needed to remember the whole proof, because the graph was the memory. Anthropic reports the run consumed on the order of six billion output tokens, with human involvement limited to occasional high-level steering from Peng rather than mathematical guidance.

Why this matters past mathematics

Strip away the number theory and Prove2Me is a case study in a pattern that generalizes well beyond Lean: when a task is too long-horizon for one agent's context, don't just make the context window bigger — externalize the state into something structured that many agents can read and write concurrently. A DAG of typed, verifiable units of work (theorems, in this case) with explicit dependencies is a much better shared memory than a transcript, because it's addressable, parallelizable, and — critically — each node has an objective, mechanical check (Lean's type checker) for whether it's actually done.

That last part is the piece that's hardest to port to other domains. Formal math is unusually friendly to agentic scaling because correctness is externally verifiable — Lean either accepts a proof or it doesn't, so agents can't quietly accumulate bad state the way they can in, say, a large codebase refactor with no equivalent of a type checker for "business logic is still correct." Teams building multi-agent systems for messier domains should read this less as "agents can now do 11-day autonomous projects" and more as a reminder that the ceiling on agent autonomy tracks the quality of the verification loop underneath it. Where you have that — tests, type systems, formal specs — long-horizon multi-agent coordination starts looking tractable. Where you don't, this result doesn't obviously transfer yet.

"This extraordinary autoformalization achievement... proves Fermat's Last Theorem with no assumptions other than the axioms of mathematics." — Kevin Buzzard, Imperial College London

The context this landed in

The run used an internal research model roughly on par with Fable 5.1, and it arrived in a week where the model layer moved fast on every front: OpenAI shipped GPT-6 Astra on September 3 with a 1.05M-token context window and headline computer-use benchmarks, and Google pushed out Gemini 3.6 and 3.7 Flash for coding and agent workloads days later. It's tempting to read all of that as a benchmark race. Prove2Me is a useful counterweight — it's a reminder that some of the most interesting recent progress isn't about a bigger base model at all, it's about the scaffolding you build around several copies of one.

Sources