Fully machine-checked Lean 4 proof of Fermat's Last Theorem released as research artifact
A complete formalization of Fermat's Last Theorem has been written and verified in the Lean 4 proof assistant, built atop the Mathlib library and following the Frey-Serre-Ribet-Wiles-Taylor-Wiles argument. The repository builds all 60,475 modules from scratch, with every declaration checked by the Lean kernel, and the final theorem relies solely on Lean's three standard axioms rather than any sorry or added axiom. An independent tool, leanprover/comparator, confirmed the proved statement matches a separately stated Mathlib-only challenge and that the entire proof chain replays correctly.
GoKawiil's interpretation of the reporting above, not reported fact.
This represents one of the most ambitious formal verification efforts in mathematics, translating a decades-old, famously difficult proof into a form a computer can independently check line by line, closing any doubt about hidden gaps or informal reasoning. It also serves as a stress test for the Lean/Mathlib ecosystem itself, demonstrating that large-scale collaborative formalization can handle deep 20th-century number theory. Though explicitly not maintained or open to contributions, it stands as a landmark reference artifact for the growing field of formalized mathematics.
- The proof is fully machine-checked in Lean 4 using only Lean's three standard axioms, with no sorry statements.
- It formalizes the Frey-Serre-Ribet-Wiles-Taylor-Wiles argument across 60,475 Mathlib-based modules.
- An independent comparator tool verified the proof matches a Mathlib-only statement of Fermat's Last Theorem, though the repo itself is unmaintained.
Fermat's Enigma by Simon Singh — If a machine-checked Lean 4 proof of Fermat's Last Theorem has you curious about the human story behind Frey, Serre, Ribet and Wiles, Simon Singh's classic narrative walks through the centuries-long chase and Wiles' breakthrough in plain language. It's the perfect companion read while you browse the formalized proof pages offline.
See Fermat's Enigma by Simon Singh on Amazon → Affiliate link — we may earn a commission on purchases, at no extra cost to you. Product picked by AI based on this article; it is not a tested recommendation.Source: github.com, 2026-09-04
Published there as: “Fermat's Last Theorem in Lean 4”
Read the original report → The summary and analysis above are GoKawiil's own, written from reporting by the source above. Facts and quotes belong to the original publisher.