Fermat's Last Theorem, proved in Lean 4
A reader's guide to the tree: what is proved, by which route, and how the 29,511 theorems hang together. Every name links to a page with the exact Lean statement, what it cites, what cites it, and its place under the theorem.
theorem fermat_last_theorem (n : ℕ) (hn : 3 ≤ n) (a b c : ℕ) (ha : 0 < a) (hb : 0 < b) (hc : 0 < c) : a ^ n + b ^ n ≠ c ^ n
The default build target FinalCheck.lean makes the build fail unless the proof rests on exactly Lean's three standard axioms:
/-- info: 'fermat_last_theorem' depends on axioms: [propext, Classical.choice, Quot.sound] -/ #guard_msgs in #print axioms fermat_last_theorem
open the theorem's page → the route, step by step landmark graph README
import Theorems.Thm_… lines of its proof module). FreyPackage.no_frey_package combines irreducibility, modularity, level lowering and the vanishing of S₂(Γ₀(2)) into a contradiction. Click any card.The route
The argument is that of Frey, Serre, Ribet, Wiles and Taylor–Wiles, largely as in Darmon–Diamond–Taylor, run as a proof by contradiction. The chapters below reproduce the project's route document (the repository's own documents are under Documents), one page per step, each followed by the exact statements of the theorems it names. Named classical theorems are proved in the strength the argument needs; §7 says exactly what that is.
1From the elementary statement to a prime exponent p ≥ 5
3 named theorems
2The Frey package and the four-way contradiction
5 named theorems
3Irreducibility of the mod-p representation of the Frey curve
11 named theorems
4Modularity of semistable elliptic curves
17 named theorems
5Level lowering
10 named theorems
6No cusp forms of weight 2 and level 2
1 named theorem
7Exact strength: how the named theorems differ from the textbook
1 named theorem
The numbers
Largest namespaces by number of theorems: ModularCurve 7,711, AlgebraicGeometry 3,322, CerednikDrinfeld 2,376, AutomorphicForm 2,336, AlgebraicCurve 1,577, LanglandsTunnell 1,543, WeierstrassCurve 1,003, NumberField 766, CuspForm 692, GoodReductionJacobian 674, groupCohomology 361, ValuationSubring 337, HopfAlgebra 333, Algebra 302.
How to use these pages
- Search (top of every page) matches any part of a theorem name, its English title, a definition-module name, or a declaration inside a definition module. Landmarks rank first.
- A theorem page (
thm.html#Name) shows the statement as written inTheorems/Thm_….leanwith the preamble removed, an informal English statement and context paragraph (a reading aid; the Lean is what is proved), the theorems its proof cites and the proofs that cite it, the definition modules it is phrased in, one shortest citation path up tofermat_last_theorem, an expandable neighbourhood graph, and the closingsolutiondeclaration of the proof file. Links to the.leanfiles work when thishtml/folder sits at the root of the repository. - Definition pages show each
Definitions/Def_….leanin full with an index of its declarations and the statements that use it. - The documents are the repository's prose (README and attribution;
PROOF-PATH.mdopens the route), rendered as written; About states the file conventions (Thm_/S_/Def_,p2m_exact_reverting, theattribute [-instance]preambles). - Conventions, from the documents: proved always means a kernel-checked proof of exactly the quoted type from
propext,Classical.choice,Quot.sound, never that the classical theorem of the same name holds in its usual generality; below T means in the import closure of T's proof module.