
technology and innovation
AI turns Fermat’s last theorem into the largest Lean proof yet
Fermat’s last theorem has been translated into computer-checkable code for the first time, creating a 13-million-line formal proof in just 11 days. A group of AI agents developed roughly 29,500 intermediate theorems needed to complete the work in Lean, a programming language designed for verifying mathematical logic.
The achievement does not replace or extend the human proof completed by Andrew Wiles and Richard Taylor in the 1990s. Instead, it converts that established reasoning into a form that a computer can check step by step. The theorem states that no whole numbers can satisfy aⁿ + bⁿ = cⁿ when n is greater than 2.
Human experts provided occasional high-level guidance. The agents initially struggled to coordinate, but succeeded after using Prove2Me, a collaboration tool that helped them track completed tasks and choose what to tackle next. Mathematician Kevin Buzzard compiled the resulting code and ran Lean’s standard checks, concluding that it genuinely develops the required mathematics.
The formalization is more than five times the size of Mathlib, the main shared library of Lean mathematics. Its scale suggests that AI may soon help convert large parts of mathematical literature into verifiable code, although reviewing such vast outputs and making them understandable to people remain substantial challenges.