# Anthropic Claude Completes 13-Million-Line Formal Proof of Fermat's Last Theorem in Lean 4

Source: TechNewsList (https://technewslist.com)
Canonical URL: https://technewslist.com/en/article/anthropic-claude-formalizes-fermats-last-theorem-lean-2026-09-10-night
Section: AI (https://technewslist.com/en/ai)
Author: TechNewsList
Language: en
Published: 2026-09-10T19:59:10.369+00:00
Updated: 2026-09-10T19:59:10.628342+00:00

> Anthropic's automated reasoning system successfully completed a 13.2-million-line formalization of Andrew Wiles' 1995 proof in Lean 4, marking a historic leap in verified mathematics.

## TL;DR
- Anthropic announced that an advanced reasoning version of Claude successfully formalized Andrew Wiles' proof of Fermat's Last Theorem.
- The generated proof contains over 13.2 million lines of computer-checked Lean 4 code, fully validated by the proof assistant's kernel.
- Conducted in partnership with Imperial College professor Kevin Buzzard, the project required roughly 42,000 GPU-hours of automated inference.
- The breakthrough demonstrates that autonomous AI agents can bridge formal verification gaps across intricate modern mathematics.

## Key points
- Anthropic research scientists and mathematicians completed the complete autoformalization of Fermat's Last Theorem in Lean 4 on September 10, 2026.
- Andrew Wiles' landmark 1995 modularity lifting proof spans dense algebraic geometry, elliptic curves, and Galois representations.
- The autonomous pipeline decomposed complex mathematical claims into dependency directed acyclic graphs without human intermediate lemma authoring.
- Professor Kevin Buzzard confirmed that all 13.2 million lines compiled cleanly through Lean 4's deterministic type checker without axiomatic cheats.
- The milestone required 42,000 GPU-hours of compute, utilizing multi-agent search to navigate syntax errors and logical bottlenecks.
- Formal verification leaders anticipate the technique will accelerate software verification, cryptography validation, and hardware formal checks.

## What happened

In a major milestone for automated reasoning and mathematical computer science, Anthropic disclosed on September 10, 2026, that an experimental reasoning edition of Claude has completely formalized Andrew Wiles' 1995 proof of Fermat's Last Theorem. The resulting verification spans more than 13.2 million lines of Lean 4 source code, every token of which has compiled deterministically through the Lean kernel without introducing extraneous axioms or human-authored scaffolding lemmas.

The effort was conducted in close collaboration with Kevin Buzzard, professor of pure mathematics at Imperial College London, and Anthropic research scientist Tianyi Peng. Buzzard, who has spent years leading academic initiatives to digitize modern number theory into interactive theorem provers, verified that the resulting proof graph rigorously establishes the modularity of semistable elliptic curves over rational numbers, thereby resolving Fermat's classic 350-year-old conjecture.

![Formal proof dependency directed acyclic graph decomposing Fermat's Last Theorem in Lean 4.](https://rkhynbcsbnkkcwgexzwg.supabase.co/storage/v1/object/public/media/api/1789070339991-kla78r-anthropic-claude-formalizes-fermats-last-theorem-lean-2026-09-10-night-inside-1-bf08a8187e.webp)

Unlike prior computer-assisted mathematical demonstrations that relied on human mathematicians to translate textbook mathematics into precise formal statements line by line, Anthropic's autoformalization pipeline operated largely autonomously. The system consumed raw LaTeX source manuscripts, constructed an extensive dependency graph of prerequisite definitions, and systematically synthesized verified formal code across a distributed compute cluster over four continuous weeks of machine execution.

## Why it matters

The complete formalization of Fermat's Last Theorem represents a qualitative transition in how artificial intelligence interacts with abstract human reasoning. While large language models have excelled at pattern recognition, code synthesis, and informal conversational explanations, they have historically struggled with the uncompromising rigor demanded by formal proof assistants, where a single missing constraint or misplaced type annotation invalidates an entire derivation.

By formalizing one of the most intricate proofs in twentieth-century mathematics, Anthropic has proved that autonomous systems can sustain logical coherence across millions of interdependent proof steps. Andrew Wiles' original proof relied on profound advances across algebraic geometry, modular forms, Galois representations, and deformation theory. Converting these conceptual breakthroughs into machine-checked definitions requires synthesizing tens of thousands of intermediate lemmas without drifting into logical inconsistency.

For the global scientific and engineering community, this accomplishment proves that automated theorem provers can serve as reliable verification engines for critical infrastructure. The techniques developed to autoformalize modularity lifting can be directly adapted to verify cryptographic primitives, audit microprocessor microcode, and prove the memory safety of distributed systems at a scale unattainable by human engineers alone.

## Technical details

The technical architecture powering this breakthrough relies on a multi-agent tree search system that couples Claude's deep language understanding with the deterministic Lean 4 compiler. The system decomposes high-level mathematical text into a hierarchical directed acyclic graph of lemmas. At each node in the graph, worker agents draft candidate Lean proofs, while specialized diagnostic agents inspect compiler feedback and execution traces to rectify tactic errors.

To overcome the severe combinatorial explosion inherent in deep mathematical proofs, Anthropic deployed an automated lemma discovery mechanism. When the agent encountered an intractable reasoning step, it generated auxiliary lemmas, verified each in isolation, and integrated the certified components back into the master proof branch. The entire verification required approximately 42,000 GPU-hours of inference compute, managed dynamically to prune unpromising proof trajectories early.

![Lean 4 interactive theorem prover checking algebraic number theory lemmas in real time.](https://rkhynbcsbnkkcwgexzwg.supabase.co/storage/v1/object/public/media/api/1789070343287-cjcojl-anthropic-claude-formalizes-fermats-last-theorem-lean-2026-09-10-night-inside-2-533e32e57b.webp)

Kevin Buzzard highlighted that the agent encountered several undocumented edge cases within Lean 4's core mathematical library, Mathlib. In dozens of instances, the model synthesized novel algebraic constructions and submitted valid type-theoretic formulations that had eluded human formalizers. The final codebase was checked from first principles using Lean 4's independent external type-checkers, ensuring that no software anomalies within the model itself could compromise mathematical truth.

## Market / industry impact

The implications for enterprise software development and algorithmic verification are profound. Industry analysts estimate that software vulnerabilities cost global enterprises hundreds of billions of dollars annually, largely because exhaustively proving that complex software matches formal specifications has been economically prohibitive. As autonomous autoformalization becomes commercially viable, formal verification will shift from an academic curiosity to an essential step in continuous integration pipelines.

Cloud infrastructure providers and financial institutions are already evaluating how to integrate Lean-based verification agents into production compiler chains. By automating the extraction of machine-checked proofs from natural language requirements and architectural specifications, companies can mathematically guarantee that smart contracts, distributed consensus protocols, and operating system kernels are entirely immune to entire classes of concurrency bugs and memory exploits.

Furthermore, Anthropic's achievement intensifies competition among frontier artificial intelligence laboratories. Google DeepMind, OpenAI, and Meta AI have all invested heavily in automated reasoning and synthetic data generation for mathematics. Demonstrating the capacity to formalize a 13-million-line proof solidifies Anthropic's positioning at the forefront of rigorous scientific reasoning, distinguishing its frontier architectures from purely conversational models.

## What to watch next

In the wake of the announcement, mathematical research teams are preparing to benchmark autonomous theorem proving systems against other unsolved and landmark conjectures. Watch for academic consortia to challenge frontier agents with the formalization of the Langlands program, the Poincaré conjecture, and modern algebraic topology foundations.

Within Anthropic's engineering roadmap, researchers plan to package the underlying autoformalization and search pipeline into specialized developer toolchains. Observers should track whether Anthropic integrates formal verification hooks directly into Claude Code, enabling enterprise software developers to generate machine-checked specifications and verified unit test suites alongside standard software pull requests.

Finally, the Lean 4 community is preparing to absorb the synthesized lemmas into Mathlib. Reviewers and maintainers will scrutinize how cleanly the automated code integrates with human-curated libraries, providing the first large-scale case study in collaborative human-AI mathematics.

## Sources

* Anthropic Research: [Formalizing Fermat's Last Theorem in Lean 4](https://www.anthropic.com/research/formalizing-fermats-last-theorem)
* The Next Web: [Anthropic Claude formalizes Fermat's Last Theorem with Kevin Buzzard](https://thenextweb.com/news/anthropic-claude-fermat-last-theorem-lean-buzzard)
* Developer's Digest: [Inside Anthropic's automated Lean 4 autoformalization architecture](https://www.developersdigest.tech/blog/anthropic-fermat-lean-autoformalization-2026)

Mentions: Anthropic, Claude, Kevin Buzzard, Tianyi Peng

## Sources
- [Anthropic Research](https://www.anthropic.com/research/formalizing-fermats-last-theorem)
- [The Next Web](https://thenextweb.com/news/anthropic-claude-fermat-last-theorem-lean-buzzard)
- [Developer's Digest](https://www.developersdigest.tech/blog/anthropic-fermat-lean-autoformalization-2026)