For more than three centuries, Fermat's Last Theorem stood as one of the most stubborn challenges in mathematics. Sir Andrew Wiles finally cracked it in 1995 across 129 dense, highly specialized pages. Yet human proofs of this scale inevitably leave room for subtle gaps. To make such reasoning mathematically airtight, computer scientists rely on proof assistants like Lean, which verify every logical dependency down to foundational axioms. In 2024, Kevin Buzzard at Imperial College London initiated a multi-year community project to formalize the proof.

Anthropic researcher Tianyi Peng, whose group at Columbia University builds AI formalization frameworks, tested whether Claude could accelerate this timeline. Operating largely autonomously over 11 days, Claude generated the first complete, machine-verified proof of Fermat's Last Theorem in Lean.

Multi-Agent Architecture and Verification

The formal output spans 13 million lines of Lean code and encompasses 29,500 verified intermediate theorems. Translating 129 pages of abstract human mathematics into machine-checkable code proved that large language models can sustain complex, multi-layered reasoning without hallucinating logical steps, provided they are bound to a deterministic verification engine.

To manage this staggering dependency graph, Claude defined mathematical concepts, proved sub-lemmas, and systematically chained verified components. As Kevin Buzzard at Imperial College London noted:

"This extraordinary autoformalization achievement, which Anthropic researchers say only took 11 days, proves Fermat’s Last Theorem with no assumptions other than the axioms of mathematics."

What this means

The business significance extends far beyond academic number theory. Pairing generative models with strict formal verifiers offers a viable blueprint for zero-defect engineering in mission-critical environments: smart contract security audits, aerospace software architecture, cryptographic protocol design, and hardware synthesis.

However, practical enterprise adoption faces clear constraints. Claude succeeded here because pure mathematics possesses clear ground truths and formal Lean syntax. Unstructured corporate workflows lack these strict boundaries, and the compute expenditure required to explore and verify 29,500 lemmas over 11 days remains substantial. Autoformalization does not instantly eliminate software bugs, but it proves that coupling LLMs with programmatic proof checkers turns unreliable probabilistic generation into verifiable logic.

Artificial IntelligenceLarge Language ModelsAutomationAnthropic