Anthropic’s AI Formalizes Fermat’s Last Theorem in Lean
Description and use
Anthropic’s AI produced a fully machine‑checked Lean formal proof of Fermat’s Last Theorem, verified by multiple kernels, showing that large AI‑generated formalizations can be cheaply validated.
Problem
How to produce a fully machine‑checked formal proof of a classic theorem using AI and a proof assistant.
Outcome
A fully verified Lean formalization of FLT, demonstrating that AI can generate large formal proofs that are quickly and cheaply verified by existing kernels.
Workflow
- 1. Train Anthropic’s internal research model to generate Lean code for FLT.
- 2. Run the model for 11 days, producing ~13 M lines and 6 billion tokens.
- 3. Split the formalization into small statements and hand them to agents via Prove2Me.
- 4. Build the repository with Lean 4.33.1 and Mathlib v4.33.0 (5.5 h, 96 jobs, 230 GB peak).
- 5. Verify with Lean’s kernel, comparator (15 h), and Nanoda (30 min).
- 6. Publish the GitHub repo under Apache 2.0.
- 7. Provide HTML documentation (390 MB) for non‑build users.
Evidence
The proof contains no sorry, which is Lean's placeholder for a step nobody finished.
Nanoda verified 1,052,234 declarations in roughly 30 minutes.
- Record date: 2026-09-15T13:15:45.911Z