Fermat's Last Theorem in Lean 4

The landmark theorems and how they depend on each other

The 49 theorems named in PROOF-PATH.md and in the route chapters, with an arrow when one lies below another in the citation graph with no third landmark in between (transitively reduced). Premises are drawn above conclusions, as in the proof. Click a node for its page; every one of the 29,511 theorems has one.

Fermat's Last Theorem proved theorem (every node is proved)arrows run from a premise to the theorem whose proof cites it, possibly through unnamed intermediate theorems

The whole graph is wide and is shown at reading size: scroll sideways, or click it to fit the window; the route pages carry one smaller graph per step.

L n0 Fermat's Last Theorem fermat_last_theorem n1 Fermat's Last Theorem for prime exponents p ≥ 5 FreyPackage.fermatLastTheoremFor_of_five_le n1->n0 n2 No Frey package exists FreyPackage.no_frey_package n2->n1 n3 Frey package from a counterexample of exponent p ≥ 5 FreyPackage.of_counterexample n3->n1 n4 Irreducibility of the mod-p torsion module of the Frey curve FreyPackage.Mazur_Frey n4->n2 n5 Modularity of the Frey curve FreyPackage.frey_isModular n5->n2 n6 Level lowering to Γ₀(2) for the Frey curve FreyPackage.level_lowering_to_two n6->n2 n7 Vanishing of weight-2 cusp forms of level 2 ModularForm.S2_Gamma0_2_eq_zero n13 Level lowering for the Frey curve down to Γ₀(2) FreyPackage.level_lowering_to_two_of_conduct… n7->n13 n8 Irreducibility of E_P[p] when a ≡ 3 (mod 8) FreyPackage.Mazur_Frey_of_a_mod_eight n8->n4 n9 No Galois-stable cofixed line at p=11 FreyPackage.frey_no_cofixed_eleven n9->n4 n10 Mazur at p≥ 17: no cofixed line FreyPackage.frey_no_cofixed_large n10->n4 n11 No Galois-stable cofixed line for p∈{5,7,13} FreyPackage.frey_no_cofixed_small n11->n4 n12 Reducible Frey representation yields a Galois-stable cofixed line FreyPackage.frey_reducible_hasCofixedLine n12->n8 n13->n6 n14 Conductor-level modularity of the Frey curve's mod-p representation FreyPackage.modularRepOfConductorLevel n14->n6 n15 Modularity of semistable integral Weierstrass models WeierstrassCurve.modularity_of_semistableModel n15->n5 n16 Frey p-torsion is unramified outside {2,p} FreyPackage.freyGaloisRep_isUnramifiedAt n16->n12 n16->n13 n17 Mazur–Ribet level lowering at p for conductor levels FreyPackage.level_lowering_at_p_of_conductor… n17->n13 n18 Ribet level lowering at an odd prime q ≠ p FreyPackage.level_lowering_odd_prime_of_cond… n18->n13 n19 Weight-two cusp forms of level one vanish ModularForm.S2_Gamma0_one_eq_zero n19->n13 n34 Finiteness of the Galois invariants of the Eisenstein quotient of J₀(p) ModularCurve.eisensteinQuotientInvariantsFin… n19->n34 n20 Mod-5 transport of residual modularity across the 3–5 switch WeierstrassCurve.isResiduallyModularOfLevel_… n20->n14 n20->n15 n21 Residual modularity mod 3 at a cube-free level, with inertia condition WeierstrassCurve.isResiduallyModular_three_a… n21->n14 n21->n15 n22 Mazur's Step 3 at one multiplicative prime ℓ WeierstrassCurve.mazurStepThree_not_inZeroCo… n22->n10 n23 One of ρ̄_{W,3}, ρ̄_{W,5} is irreducible WeierstrassCurve.modThreeOrFiveIrreducible n23->n14 n23->n15 n24 Modularity lifting at p=3 from a prescribed residual level WeierstrassCurve.modularityLiftingAtConducto… n24->n14 n24->n15 n25 Modularity lifting at p∈{3,5} for p²∤ M₀ WeierstrassCurve.modularityLiftingAtConducto… n25->n14 n25->n15 n26 The 3–5 switch for semistable integral models WeierstrassCurve.threeFiveSwitchCurve n26->n14 n26->n15 n27 Fermat's Last Theorem for the exponent 5 fermatLastTheoremFive n27->n11 n28 Fermat's Last Theorem for exponent 7 fermatLastTheoremSeven n28->n11 n29 Bad-prime coefficients of weight-2 newforms on Γ₀(N) CuspForm.newformBadPrimeCoeff n29->n17 n38 Descent to the conductor level when p² ∤ N WeierstrassCurve.isModularModelOfLevel_condu… n29->n38 n30 Frey curve is peu ramifiée at every odd prime FreyCurve.isPeuRamifieeAt_odd_of_integralForm n30->n17 n31 Eichler–Shimura residual attachment at every level FreyPackage.eigenformResidualAttachmentAtFam… n31->n17 n31->n18 n32 Existence of a surjection R ↠ T DeformationRingData.exists_surjective_algHom… n32->n24 n32->n25 n33 The ring of integers of ℚ(ζ₇) is principal Rat.seven_pid n33->n28 n34->n22 n35 Specialisation of the Eisenstein quotient away from p ModularCurve.mazurQuotientSpecialization_hec… n35->n22 n36 Odd irreducible residual representations are absolutely irreducible ResidualGaloisRep.isAbsolutelyIrreducible_of… n36->n17 n36->n38 n40 Level lowering at an unramified prime exactly dividing the level WeierstrassCurve.isResiduallyModularOfLevel_… n36->n40 n37 Four possible c₄³/Δ for rational 15-isogenies WeierstrassCurve.fifteenIsogenyClassification n37->n23 n38->n24 n38->n25 n39 From a patching datum to modularity at an explicit level WeierstrassCurve.isModularModelOfLevel_of_pa… n39->n24 n39->n25 n40->n18 n40->n24 n40->n25 n41 Representability of the ordinary deformation problem for a semistable curve WeierstrassCurve.nonempty_deformationRingDat… n41->n24 n41->n25 n42 Auxiliary curve for the 3–5 switch WeierstrassCurve.threeFiveAuxiliaryCurveExists n42->n26 n43 Kummer's theorem: Fermat's Last Theorem for regular primes flt_regular n43->n9 n43->n28 n44 Taylor–Wiles patching: a patched level with zero relation ideal PatchingDatum.nonempty_patchingLevel_bot n44->n39 n45 Specialisations with rootless 3-division polynomial in a weighted family WeierstrassCurve.exists_forall_not_isRoot_Ps… n45->n42 n46 Mod-3 irreducibility from Ψ₃ with no rational root WeierstrassCurve.galoisRepIsIrreducible_thre… n46->n42 n47 Weight-one form attached to a surjective mod-3 representation LanglandsTunnell.exists_isWeightOneChiNegThr… n47->n21 n48 From cuspidal adelic eigensystems to classical weight-one cusp forms AutomorphicForm.exists_weightOne_cuspForm_of… n48->n47

The landmarks as a table

theoremsteptheorems belowdepthnamed in
fermat_last_theorem Fermat's Last TheoremThe statement29,4880PROOF-PATH.md, README.md, route.md §1
FreyPackage.fermatLastTheoremFor_of_five_le Fermat's Last Theorem for prime exponents Reduction to prime exponents p ≥ 529,4862PROOF-PATH.md
FreyPackage.no_frey_package No Frey package existsThe Frey package29,4843PROOF-PATH.md, route.md §1
FreyPackage.of_counterexample Frey package from a counterexample of exponent The Frey package03PROOF-PATH.md, route.md §1, route.md §2
FreyPackage.Mazur_Frey Irreducibility of the mod- torsion module of the Frey curveIrreducibility (Mazur; exponents 5, 7, 11, 13 settled directly)5,4354PROOF-PATH.md, route.md §2
FreyPackage.frey_isModular Modularity of the Frey curveModularity (Wiles, Taylor–Wiles)27,7974PROOF-PATH.md, route.md §2
FreyPackage.level_lowering_to_two Level lowering to for the Frey curveLevel lowering (Ribet)27,8514PROOF-PATH.md, route.md §2
ModularForm.S2_Gamma0_2_eq_zero Vanishing of weight- cusp forms of level No weight-2 cusp forms of level 204PROOF-PATH.md, route.md §2, route.md §5
FreyPackage.Mazur_Frey_of_a_mod_eight Irreducibility of when Irreducibility (Mazur; exponents 5, 7, 11, 13 settled directly)1045PROOF-PATH.md, route.md §3
FreyPackage.frey_no_cofixed_eleven No Galois-stable cofixed line at Irreducibility (Mazur; exponents 5, 7, 11, 13 settled directly)35PROOF-PATH.md, route.md §3
FreyPackage.frey_no_cofixed_large Mazur at : no cofixed lineIrreducibility (Mazur; exponents 5, 7, 11, 13 settled directly)5,3775PROOF-PATH.md, route.md §3
FreyPackage.frey_no_cofixed_small No Galois-stable cofixed line for Irreducibility (Mazur; exponents 5, 7, 11, 13 settled directly)65PROOF-PATH.md, route.md §3
FreyPackage.frey_reducible_hasCofixedLine Reducible Frey representation yields a Galois-stable cofixed lineIrreducibility (Mazur; exponents 5, 7, 11, 13 settled directly)825PROOF-PATH.md, route.md §3
FreyPackage.level_lowering_to_two_of_conductorLevel Level lowering for the Frey curve down to Level lowering (Ribet)12,9805PROOF-PATH.md, route.md §5
FreyPackage.modularRepOfConductorLevel Conductor-level modularity of the Frey curve's mod- representationLevel lowering (Ribet)27,7985PROOF-PATH.md
WeierstrassCurve.modularity_of_semistableModel Modularity of semistable integral Weierstrass modelsModularity (Wiles, Taylor–Wiles)27,7965PROOF-PATH.md
FreyPackage.freyGaloisRep_isUnramifiedAt Frey -torsion is unramified outside Level lowering (Ribet)426route.md §5
FreyPackage.level_lowering_at_p_of_conductorLevel Mazur–Ribet level lowering at for conductor levelsLevel lowering (Ribet)6,0906PROOF-PATH.md, route.md §5
FreyPackage.level_lowering_odd_prime_of_conductorLevel Ribet level lowering at an odd prime Level lowering (Ribet)12,4966PROOF-PATH.md, route.md §5
ModularForm.S2_Gamma0_one_eq_zero Weight-two cusp forms of level one vanishNo weight-2 cusp forms of level 206PROOF-PATH.md, route.md §5, route.md §6
WeierstrassCurve.isResiduallyModularOfLevel_of_switch Mod- transport of residual modularity across the switchModularity (Wiles, Taylor–Wiles)06PROOF-PATH.md, route.md §4
WeierstrassCurve.isResiduallyModular_three_and_noInertiaFixedTorsion_and_not_cube_dvd_of_isSemistableModel Residual modularity mod at a cube-free level, with inertia conditionModularity (Wiles, Taylor–Wiles)7,3066PROOF-PATH.md, route.md §4
WeierstrassCurve.mazurStepThree_not_inZeroComponentAt Mazur's Step 3 at one multiplicative prime Irreducibility (Mazur; exponents 5, 7, 11, 13 settled directly)5,2536PROOF-PATH.md, route.md §3
WeierstrassCurve.modThreeOrFiveIrreducible One of , is irreducibleModularity (Wiles, Taylor–Wiles)256PROOF-PATH.md, route.md §4
WeierstrassCurve.modularityLiftingAtConductor_threeFive_of_level_of_inertia_moves_torsion_of_eq_three_of_not_cube_dvd Modularity lifting at from a prescribed residual levelModularity (Wiles, Taylor–Wiles)23,0326PROOF-PATH.md, route.md §4
WeierstrassCurve.modularityLiftingAtConductor_threeFive_of_level_of_not_sq_dvd_of_not_cube_dvd Modularity lifting at for Modularity (Wiles, Taylor–Wiles)22,7086PROOF-PATH.md, route.md §4
WeierstrassCurve.threeFiveSwitchCurve The 3–5 switch for semistable integral modelsModularity (Wiles, Taylor–Wiles)1246PROOF-PATH.md, route.md §4
fermatLastTheoremFive Fermat's Last Theorem for the exponent Irreducibility (Mazur; exponents 5, 7, 11, 13 settled directly)06PROOF-PATH.md, route.md §3
fermatLastTheoremSeven Fermat's Last Theorem for exponent Irreducibility (Mazur; exponents 5, 7, 11, 13 settled directly)26PROOF-PATH.md, route.md §3
CuspForm.newformBadPrimeCoeff Bad-prime coefficients of weight- newforms on Level lowering (Ribet)687route.md §5
FreyCurve.isPeuRamifieeAt_odd_of_integralForm Frey curve is peu ramifiée at every odd primeLevel lowering (Ribet)47PROOF-PATH.md, route.md §5
FreyPackage.eigenformResidualAttachmentAtFamily Eichler–Shimura residual attachment at every levelLevel lowering (Ribet)1,2977route.md §5
GaloisRep.DeformationRingData.exists_surjective_algHom_of_heckeGaloisRepDatum Existence of a surjection Modularity (Wiles, Taylor–Wiles)67PROOF-PATH.md, route.md §4
IsCyclotomicExtension.Rat.seven_pid The ring of integers of is principalIrreducibility (Mazur; exponents 5, 7, 11, 13 settled directly)07PROOF-PATH.md, route.md §3
ModularCurve.eisensteinQuotientInvariantsFiniteAt_heckeModuleBar Finiteness of the Galois invariants of the Eisenstein quotient of Irreducibility (Mazur; exponents 5, 7, 11, 13 settled directly)5,1287route.md §3
ModularCurve.mazurQuotientSpecialization_heckeModuleBar Specialisation of the Eisenstein quotient away from Irreducibility (Mazur; exponents 5, 7, 11, 13 settled directly)2,1797route.md §3
ResidualGaloisRep.isAbsolutelyIrreducible_of_isIrreducible_of_isOdd Odd irreducible residual representations are absolutely irreducibleModularity (Wiles, Taylor–Wiles)07PROOF-PATH.md, route.md §7
WeierstrassCurve.fifteenIsogenyClassification Four possible for rational -isogeniesModularity (Wiles, Taylor–Wiles)247PROOF-PATH.md, route.md §4
WeierstrassCurve.isModularModelOfLevel_conductorLevel_of_not_cube_dvd_of_modRepIsIrreducible_of_not_sq_dvd Descent to the conductor level when Modularity (Wiles, Taylor–Wiles)11,0447route.md §4
WeierstrassCurve.isModularModelOfLevel_of_patchingDatum From a patching datum to modularity at an explicit levelModularity (Wiles, Taylor–Wiles)647route.md §4
WeierstrassCurve.isResiduallyModularOfLevel_div_of_isUnramifiedAt_sqf Level lowering at an unramified prime exactly dividing the levelLevel lowering (Ribet)12,4817route.md §5
WeierstrassCurve.nonempty_deformationRingData_ordinaryCondition_of_isSemistableModel Representability of the ordinary deformation problem for a semistable curveModularity (Wiles, Taylor–Wiles)1697route.md §4
WeierstrassCurve.threeFiveAuxiliaryCurveExists Auxiliary curve for the 3–5 switchModularity (Wiles, Taylor–Wiles)777route.md §4
flt_regular Kummer's theorem: Fermat's Last Theorem for regular primesIrreducibility (Mazur; exponents 5, 7, 11, 13 settled directly)07PROOF-PATH.md
Algebra.PatchingDatum.nonempty_patchingLevel_bot Taylor–Wiles patching: a patched level with zero relation idealModularity (Wiles, Taylor–Wiles)58route.md §4
WeierstrassCurve.exists_forall_not_isRoot_Psi3_specialization Specialisations with rootless -division polynomial in a weighted familyModularity (Wiles, Taylor–Wiles)58route.md §4
WeierstrassCurve.galoisRepIsIrreducible_three_of_forall_eval_Psi3_ne_zero Mod-3 irreducibility from with no rational rootModularity (Wiles, Taylor–Wiles)38route.md §4
LanglandsTunnell.exists_isWeightOneChiNegThreeRealized_eq_trace_lift Weight-one form attached to a surjective mod-3 representationModularity (Wiles, Taylor–Wiles)6,8049PROOF-PATH.md, route.md §4
AutomorphicForm.exists_weightOne_cuspForm_of_isCusp_viaCompactCuspNotion From cuspidal adelic eigensystems to classical weight-one cusp formsModularity (Wiles, Taylor–Wiles)610route.md §4