Claude autonomously writes 13 million lines of Lean code to formalize Fermat's Last Theorem
Anthropic's Claude AI model has autonomously generated the first end-to-end, computer-checked proof of Fermat's Last Theorem in the Lean programming language.

Key takeaways · 3
- 01
Claude generated 13 million lines of Lean code in 11 days.
- 02
The AI model successfully proved 29,500 intermediate theorems largely autonomously.
- 03
The resulting formalization artifact relies on no assumptions beyond standard mathematical axioms.
Autonomous formalization
Anthropic announced the first complete, computer-checked proof of Fermat's Last Theorem. [2] Over an 11-day period, the Claude AI model worked largely autonomously to write the proof using the Lean programming language. [1][2]
During this process, Claude generated 13 million lines of Lean code and proved 29,500 intermediate theorems. [2] Anthropic researcher Tianyi Peng, whose group at Columbia University builds AI formalization tools, initiated the test to see if Claude could advance the formalization of the theorem. [2]
Building on Wiles's proof
The original mathematical proof, completed by Sir Andrew Wiles in 1995, spanned 129 pages. [2] In 2024, Kevin Buzzard at Imperial College London started a community project to encode the proof into the Lean proof assistant. [2]
After reviewing Anthropic's new autoformalization results, Buzzard stated that the AI-generated proof relies on no assumptions beyond standard mathematical axioms. [2] Buzzard noted that the resulting artifact is robust enough for future mathematical work to build upon. [2]
What it means
The success of Claude in generating a computer-checked proof demonstrates a significant leap in AI capabilities for advanced mathematics. By automating the translation of complex human reasoning into machine-verifiable code—a task that previously required massive community efforts like Buzzard's 2024 Lean project—this development could drastically accelerate mathematical research. The ability to autonomously generate 13 million lines of accurate theorem-proving code proves that large language models can handle rigorous, multi-layered logical constraints. What the sources don't address: whether this autoformalization technique can be reliably applied to entirely unresolved mathematical conjectures, or if it is strictly limited to translating existing human proofs into machine code.
Autoformalization represents a major breakthrough in making advanced mathematics machine-verifiable. This capability could dramatically reduce the time required to rigorously check complex human proofs and software logic.
Why it matters
Put this to work — one session a day, built for your industry.
Create a free account for a daily session — eight questions and one real-work challenge, on the news that affects your role.
Start freeHow this developed
5 September 2026
Claude autonomously writes 13 million lines of Lean code to formalize Fermat's Last Theorem
5 September 2026
Event created from source cluster.