Anthropic's Claude autonomously formalizes Fermat's Last Theorem in Lean in 11 days
siliconangle.com

Anthropic's Claude autonomously formalizes Fermat's Last Theorem in Lean in 11 days

Tech News
3 min read

Published by AINave Editorial • Reviewed by Ramit

TL;DRAnthropic used Claude to produce the first computer-checked formalization of Fermat's Last Theorem in Lean, generating 13 million lines of code in 11 days using multi-agent coordination and Prove2Me tooling. The milestone shows AI can tackle long-horizon formal verification tasks that previously took mathematicians years.

Anthropic used Claude to produce the first complete computer-checked proof of Fermat's Last Theorem, formalizing Andrew Wiles' 1995 proof into 13 million lines of Lean code in 11 days. For AI builders, this demonstrates that multi-agent workflows with intelligent tooling can handle long-horizon formal verification tasks that mathematicians expected to take years.

13 million lines of Lean code in 11 days

The proof of Fermat's Last Theorem, originally proposed in 1637, has been turned into a machine-verifiable format using the Lean programming language. Anthropic reported that Claude worked largely autonomously over 11 days with an internal research model described as roughly on par with Claude Fable 5.1. The system spun up several dozen AI agents that generated 6 billion tokens of output and proved at least 29,500 intermediate theorems. The resulting Lean formalization is 13 million lines of code, making it the largest Lean file ever created.

Initial attempts failed until Claude gained access to Prove2Me, an open-source tool that helps agents determine the optimal next step in a long workflow and reduces inference costs. The formalization spans algebra, harmonic analysis, geometry, and number theory.

Why this matters for AI builders

This project shows that LLMs can coordinate complex multi-step formalization tasks with minimal human supervision. For builders working on automated reasoning, verification, or long-horizon agent tasks, the combination of multi-agent coordination and external planning tools like Prove2Me is the real signal. The same pattern could apply to formal verification of software, protocol proofs, or smart contract validation.

Mathematician Kevin Buzzard, whose work was used in the formalization, noted that AI autoformalization artifacts are now robust enough to be built upon. This suggests a shift: mathematicians may move from manually writing Lean code to verifying AI-generated formal proofs.

This work follows Anthropic's earlier discovery of new information about the Riemann zeta function using Claude, and mirrors OpenAI's use of Astra to solve several Erdos problems, signaling a broader push toward AI-assisted mathematics.

Practical implications for formal verification

Computer-checked proofs eliminate the risk of human error and make it easier for researchers to share and build on each other's work. If AI can routinely produce formalizations, the bottleneck shifts from writing proofs to verifying them. For developers, the ability to generate machine-checkable proofs of complex logic could apply to critical systems, security protocols, and correctness guarantees in software.

Caveats and open questions

The evidence comes from Anthropic's blog post and tech news reports; the exact line counts and intermediate theorem counts are vendor claims and have not been independently verified. The model used is an internal research model, not a publicly available API, so replicability is limited. Early attempts failed before Prove2Me was added, which suggests the approach is sensitive to tooling and workflow design. At 6 billion tokens of output, the inference cost is substantial, and the method may not generalize to all proofs or domains without similar planning infrastructure.

FAQs

Proposed by Pierre de Fermat in 1637, the theorem states that no three positive integers a, b, c satisfy a^n + b^n = c^n for any integer n greater than 2. Mathematician Andrew Wiles proved it in 1995 in a 129-page proof.

Sources

Latest Tech News