Skip to main content
Back to News
news/AI Research

Anthropic's Claude Formalizes Fermat's Last Theorem in Lean

Anthropic says Claude formalized Fermat's Last Theorem in Lean with dozens of agents, 13 million lines of code, and computer-checked verification.

Stefan Trbojevic

Stefan Trbojevic

5 September 20263 min read
LinkedIn
Abstract glowing theorem graph with branching verification pathways

The takeaway

The significance is not only the theorem: it is the combination of multi-agent parallelism, durable project state, compilation feedback, and a formal verifier.

Why it matters for builders

Reliable agent workflows need decomposed tasks, shared state, explicit dependencies, compilation or tool feedback, and a verifier that can reject invalid output.

Anthropic's Claude Formalizes Fermat's Last Theorem in Lean

Anthropic says Claude has produced the first complete, computer-checked formalization of Fermat's Last Theorem in the Lean programming language. The work took 11 days and used dozens of Claude agents coordinated through an open platform for formal mathematics.

What happened

According to Anthropic's research post, the system generated 13 million lines of Lean code and proved 30,300 intermediate theorems, using 29,500 of them in the final result. Lean checked the finished proof algorithmically against its three standard axioms.

The project tackled the theorem's modern proof, developed by Andrew Wiles in 1995, rather than trying to reconstruct Fermat's alleged original argument. Anthropic says the proof was assembled with Prove2Me, an open collaborative platform created by Tianyi Peng and collaborators at Columbia University. The platform maintains a directed acyclic graph of theorem statements, allowing multiple agents to work in parallel and reuse completed results.

Why it matters

Formal mathematics is different from asking a model for a plausible explanation. Lean requires every logical step to be explicit, so a single invalid inference can stop compilation instead of hiding inside polished prose. That makes this result less about a benchmark score and more about a reproducible artifact that another system can check.

Kevin Buzzard, the Imperial College London mathematician who reviewed the result, said the achievement is a significant step toward automatically formalizing modern mathematical literature. Anthropic also notes that the effort consumed roughly six billion output tokens, showing that the result depended on parallelism, project state, and tooling as much as on the underlying model.

Builder impact

For AI builders, the architecture is the headline. The workflow combines specialized agents, a shared theorem graph, compilation feedback, and persistent project state. That is close to the pattern needed for reliable agentic automation: split work into verifiable units, record dependencies, and make failure visible at the system boundary.

The lesson applies beyond mathematics. In an earlier n8n Lab analysis of local AI infrastructure, we examined how deployment architecture shapes what builders can do. This project adds another layer: for high-stakes outputs, a verifier and durable artifact may matter more than a longer answer.

Anthropic says the formalized proof should not replace a human-readable explanation, but it could reduce the burden of checking future AI-generated mathematics. The next test is whether the same multi-agent approach can scale across broader parts of the mathematical corpus without losing attribution, reproducibility, or human oversight.

Sources

Share𝕏

The Automation Brief

Read 5 AI stories instead of 50.

The essential moves in AI agents, models, automation and infrastructure — filtered for builders and operators, with the part that actually matters.

No noise. Unsubscribe anytime.

Editorial notes

Reported by

Stefan Trbojevic

Edited by

n8n Lab Editorial

Published

5 September 2026

Updated

5 September 2026

AI disclosure: AI assisted with research and drafting. Factual claims are reviewed by an editor.

n8n Lab is an independent service provider. We are not affiliated with, endorsed by, or sponsored by n8n GmbH. “n8n” is a trademark of n8n GmbH and is used here only to describe the platform-specific implementation and automation services we provide.