Anthropic's Claude Autonomously Generates First Formal Proof of Fermat's Last Theorem
Anthropic announced that an internal Claude model autonomously generated approximately 13 million lines of Lean code over 11 days to complete the first computer-verified formal proof of Fermat's Last Theorem. Operating in a multi-agent setup, the AI proved over 29,000 intermediate theorems to formalize the mathematical proof originally completed by Andrew Wiles. This achievement demonstrates that AI can automate the complex, time-consuming process of mathematical formalization, which was previously expected to take human researchers years to complete. If scaled across modern mathematics, automated formal verification could significantly reduce the labor required to verify complex proofs and raise the standard of mathematical rigor. The project relied on a multi-agent framework built on the Prove2Me platform, which managed dependent theorems using a Directed Acyclic Graph (DAG) for parallel processing across roughly 6 billion output tokens. The resulting proof follows a simplified version by Darmon, Diamond, and Taylor, checking every step against just three standard Lean axioms and generating a codebase five times larger than Mathlib.
## BACKGROUND
Fermat's Last Theorem states that no three positive integers a, b, and c satisfy aⁿ + bⁿ = cⁿ for any integer value of n greater than 2, a claim famously proved by Andrew Wiles in 1995. Human proofs often skip elementary logical steps and reference unformalized results, making manual translation into machine-checkable code exceedingly difficult. Lean is an open-source proof assistant based on type theory that mechanically verifies whether every step in a mathematical proof strictly obeys specified foundational axioms.