Definitions/Def_FLTPrelim_FreyPackage.lean
The Frey package and its Frey curve
A FreyPackage is a structure bundling a normalised putative counterexample to Fermat's Last Theorem: integers a, b, c, each assumed nonzero, a natural number p together with proofs that p is prime and 5 \le p, a proof of the equation a^p + b^p = c^p, and the normalisation hypotheses \gcd(a,b) = 1 (as the \mathbb{Z}-valued gcd of the GCD monoid \mathbb{Z}), a \equiv 3 \pmod 4 (stated as an equation in ZMod 4 on the image of a) and b \equiv 0 \pmod 2 (stated in ZMod 2). All of these are fields of the structure, so a term of type FreyPackage carries the equation and the congruences as data.
The accompanying lemmas record elementary consequences: p > 0, p \ne 0, p odd (from primality and p \ge 5); gcdab_eq_gcdac, a standalone lemma that for any integers with a^p + b^p = c^p and p > 0 one has \gcd(a,b) = \gcd(a,c); hence \gcd(a,c) = 1 and \gcd(b,c) = 1 for a package; abc \ne 0; and 2 \mid abc, deduced from 2 \mid b.
Two Weierstrass curves are then defined from a package P, by giving the five coefficients (a_1,a_2,a_3,a_4,a_6) directly: freyCurve over \mathbb{Q} and freyCurveInt over \mathbb{Z}, both with a_1 = 1, a_2 = (b^p - 1 - a^p)/4, a_3 = 0, a_4 = -a^p b^p/16, a_6 = 0. Thus the curve is y^2 + xy = x^3 + \frac{b^p - 1 - a^p}{4}x^2 - \frac{a^p b^p}{16}x, the standard integral model of y^2 = x(x - a^p)(x + b^p). Note that in freyCurveInt the two divisions are integer division in \mathbb{Z} (they are exact under the normalisation hypotheses, but the definition itself does not record this), whereas in freyCurve they are genuine division in \mathbb{Q}.
Relation to Mathlib
Mathlib has no notion of a Frey package; the structure is the project's own. The curves are ordinary terms of Mathlib's WeierstrassCurve over ℤ and over ℚ, with the coefficients supplied explicitly.
Where it is used
Every module of the main line of argument is phrased for a fixed FreyPackage: one is produced from an arbitrary counterexample to Fermat's Last Theorem with prime exponent p \ge 5, and the contradiction is obtained by studying the mod p representation on the Frey curve freyCurve — irreducibility, modularity, level lowering, and the absence of weight-2 cusp forms on \Gamma_0(2).
References
- G. Frey, Links between stable elliptic curves and certain Diophantine equations, Annales Universitatis Saraviensis, Series Mathematicae 1 (1986), 1–40
- J.-P. Serre, Sur les représentations modulaires de degré 2 de \mathrm{Gal}(\overline{\mathbb{Q}}/\mathbb{Q}), Duke Mathematical Journal 54 (1987), 179–230
- H. Darmon, F. Diamond and R. Taylor, Fermat's Last Theorem, in: Current Developments in Mathematics 1995, International Press, 1995, 1–154
References are suggested automatically and have not been individually verified.
English text generated automatically from the Lean source; the Lean statement is authoritative.
- 98 lines
- 24 declarations
- used in the statements of 97 theorems and imported by 61 proofs
- imports 0 definition modules
Source file: Definitions/Def_FLTPrelim_FreyPackage.lean
Imports
- only Mathlib
Imported by
Def_FLTPrelim_CofixedLineDef_FLTPrelim_ModularRepDef_FLTPrelim_RamificationDef_FreyCurve_BasicDef_FreyPackage_AtPNewLoweringDef_FreyPackage_EigenformResidualAttachmentDef_FreyPackage_ExchangeCaseDef_FreyPackage_GaloisRepDef_FreyPackage_IsConductorLevelDef_FreyPackage_LoweringAtDef_FreyPackage_LoweringAtUniformDef_FreyPackage_MazurAttachmentApparatusDef_FreyPackage_MazurEichlerShimuraFamilyDef_FreyPackage_RouteAReversePinSeamDef_ModularCurve_JZeroTorsionFiniteDef_RibetLevelLowering_CharacterGroupApparatusV2Def_WeierstrassCurve_ModularityLiftingConductorDef_WeierstrassCurve_Semistability
Declarations
- structure
FreyPackage - field
FreyPackage.a - field
FreyPackage.b - field
FreyPackage.c - field
FreyPackage.ha0 - field
FreyPackage.hb0 - field
FreyPackage.hc0 - field
FreyPackage.p - field
FreyPackage.pp - field
FreyPackage.hp5 - field
FreyPackage.hFLT - field
FreyPackage.hgcdab - field
FreyPackage.ha4 - field
FreyPackage.hb2 - lemma
FreyPackage.hppos - lemma
FreyPackage.hp0 - lemma
FreyPackage.hp_odd - lemma
FreyPackage.gcdab_eq_gcdac - lemma
FreyPackage.hgcdac - lemma
FreyPackage.hgcdbc - lemma
FreyPackage.habc0 - lemma
FreyPackage.two_dvd_abc - def
FreyPackage.freyCurveInt - def
FreyPackage.freyCurve
Source
/- Copyright (c) 2024 Kevin Buzzard, Ruben Van de Velde, Pietro Monticone. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Ported from the Imperial College London FLT formalization (https://github.com/ImperialCollegeLondon/FLT, blueprint §2.5–2.6). -/ import Mathlib.AlgebraicGeometry.EllipticCurve.Weierstrass ↗ import Mathlib.Algebra.Field.ZMod ↗ import Mathlib.Algebra.GCDMonoid.Nat ↗ import Mathlib.Algebra.EuclideanDomain.Int ↗ import Mathlib.Data.Nat.Prime.Basic ↗ import Mathlib.RingTheory.Int.Basic ↗ import Mathlib.Tactic.ModCases ↗ set_option autoImplicit false structure FreyPackage where a : ℤ b : ℤ c : ℤ ha0 : a ≠ 0 hb0 : b ≠ 0 hc0 : c ≠ 0 p : ℕ pp : Nat.Prime p hp5 : 5 ≤ p hFLT : a ^ p + b ^ p = c ^ p hgcdab : gcd a b = 1 ha4 : (a : ZMod 4) = 3 hb2 : (b : ZMod 2) = 0 namespace FreyPackage lemma hppos (P : FreyPackage) : 0 < P.p := lt_of_lt_of_le (by omega) P.hp5 lemma hp0 (P : FreyPackage) : P.p ≠ 0 := P.hppos.ne' lemma hp_odd (P : FreyPackage) : Odd P.p := P.pp.odd_of_ne_two (by have := P.hp5; omega) lemma gcdab_eq_gcdac {a b c : ℤ} {p : ℕ} (hp : 0 < p) (h : a ^ p + b ^ p = c ^ p) : gcd a b = gcd a c := by have foo : gcd a b ∣ gcd a c := by apply dvd_gcd (gcd_dvd_left a b) rw [← Int.pow_dvd_pow_iff hp.ne', ← h] apply dvd_add <;> rw [Int.pow_dvd_pow_iff hp.ne'] · exact gcd_dvd_left a b · exact gcd_dvd_right a b have bar : gcd a c ∣ gcd a b := by apply dvd_gcd (gcd_dvd_left a c) have h2 : b ^ p = c ^ p - a ^ p := eq_sub_of_add_eq' h rw [← Int.pow_dvd_pow_iff hp.ne', h2] apply dvd_add · rw [Int.pow_dvd_pow_iff hp.ne']; exact gcd_dvd_right a c · rw [dvd_neg, Int.pow_dvd_pow_iff hp.ne']; exact gcd_dvd_left a c change _ ∣ (Int.gcd a c : ℤ) at foo apply Int.ofNat_dvd.1 at bar apply Int.ofNat_dvd.1 at foo exact congr_arg ((↑) : ℕ → ℤ) <| Nat.dvd_antisymm foo bar lemma hgcdac (P : FreyPackage) : gcd P.a P.c = 1 := by rw [← gcdab_eq_gcdac P.hppos P.hFLT, P.hgcdab] lemma hgcdbc (P : FreyPackage) : gcd P.b P.c = 1 := by rw [← gcdab_eq_gcdac P.hppos, gcd_comm, P.hgcdab] rw [add_comm]; exact P.hFLT lemma habc0 (P : FreyPackage) : P.a * P.b * P.c ≠ 0 := mul_ne_zero (mul_ne_zero P.ha0 P.hb0) P.hc0 lemma two_dvd_abc (P : FreyPackage) : (2 : ℤ) ∣ P.a * P.b * P.c := dvd_mul_of_dvd_left (dvd_mul_of_dvd_right ((ZMod.intCast_zmod_eq_zero_iff_dvd P.b 2).1 P.hb2) _) _ def freyCurveInt (P : FreyPackage) : WeierstrassCurve ℤ where a₁ := 1 a₂ := (P.b ^ P.p - 1 - P.a ^ P.p) / 4 a₃ := 0 a₄ := -(P.a ^ P.p) * (P.b ^ P.p) / 16 a₆ := 0 def freyCurve (P : FreyPackage) : WeierstrassCurve ℚ where a₁ := 1 a₂ := (P.b ^ P.p - 1 - P.a ^ P.p) / 4 a₃ := 0 a₄ := -(P.a ^ P.p) * (P.b ^ P.p) / 16 a₆ := 0 end FreyPackage
Statements phrased using this module (97)
- landmark Fermat's Last Theorem for prime exponents p ≥ 5
FreyPackage.fermatLastTheoremFor_of_five_le29,486 below · depth 2 - landmark No Frey package exists
FreyPackage.no_frey_package29,484 below · depth 3 - landmark Frey package from a counterexample of exponent p ≥ 5
FreyPackage.of_counterexample0 below · depth 3 - landmark Irreducibility of the mod-p torsion module of the Frey curve
FreyPackage.Mazur_Frey5,435 below · depth 4 - landmark Modularity of the Frey curve
FreyPackage.frey_isModular27,797 below · depth 4 - landmark Level lowering to Γ₀(2) for the Frey curve
FreyPackage.level_lowering_to_two27,851 below · depth 4 - landmark Vanishing of weight-2 cusp forms of level 2
ModularForm.S2_Gamma0_2_eq_zero0 below · depth 4 - landmark Irreducibility of E_P[p] when a ≡ 3 (mod 8)
FreyPackage.Mazur_Frey_of_a_mod_eight104 below · depth 5 - landmark No Galois-stable cofixed line at p=11
FreyPackage.frey_no_cofixed_eleven3 below · depth 5 - landmark Mazur at p≥ 17: no cofixed line
FreyPackage.frey_no_cofixed_large5,377 below · depth 5 - landmark No Galois-stable cofixed line for p∈{5,7,13}
FreyPackage.frey_no_cofixed_small6 below · depth 5 - landmark Reducible Frey representation yields a Galois-stable cofixed line
FreyPackage.frey_reducible_hasCofixedLine82 below · depth 5 - landmark Level lowering for the Frey curve down to Γ₀(2)
FreyPackage.level_lowering_to_two_of_conductorLevel12,980 below · depth 5 - landmark Conductor-level modularity of the Frey curve's mod-p representation
FreyPackage.modularRepOfConductorLevel27,798 below · depth 5 - landmark Modularity of semistable integral Weierstrass models
WeierstrassCurve.modularity_of_semistableModel27,796 below · depth 5 - landmark Frey p-torsion is unramified outside {2,p}
FreyPackage.freyGaloisRep_isUnramifiedAt42 below · depth 6 - landmark Mazur–Ribet level lowering at p for conductor levels
FreyPackage.level_lowering_at_p_of_conductorLevel6,090 below · depth 6 - landmark Ribet level lowering at an odd prime q ≠ p
FreyPackage.level_lowering_odd_prime_of_conductorLevel12,496 below · depth 6 - landmark Weight-two cusp forms of level one vanish
ModularForm.S2_Gamma0_one_eq_zero0 below · depth 6 - landmark One of ρ̄_{W,3}, ρ̄_{W,5} is irreducible
WeierstrassCurve.modThreeOrFiveIrreducible25 below · depth 6 - landmark The 3–5 switch for semistable integral models
WeierstrassCurve.threeFiveSwitchCurve124 below · depth 6 - landmark Frey curve is peu ramifiée at every odd prime
FreyCurve.isPeuRamifieeAt_odd_of_integralForm4 below · depth 7 - Fermat's Last Theorem (Mathlib's formulation)
FLT.fermatLastTheorem29,487 below · depth 1 - A prime divides the Frey model's discriminant iff it divides abc
FreyPackage.dvd_freyCurveInt_discr_iff0 below · depth 6 - The integral Frey model has non-zero discriminant
FreyPackage.freyCurveInt_discr_ne_zero0 below · depth 6 - Base change of the integral Frey model to ℚ
FreyPackage.freyCurveInt_map0 below · depth 6 - Discriminant of the Frey curve: (abc)²ᵖ/2⁸
FreyPackage.freyCurve_discriminant0 below · depth 6 - Frey curve with stable line: a p-torsion point with A-integral abscissa
FreyPackage.frey_exists_p_torsion_integral_abscissa_of_stable_line4 below · depth 6 - Semistability of the integral Frey model
FreyPackage.frey_isSemistableModel0 below · depth 6 - No cofixed line for Frey curves with a≡ 3(mod 8)
FreyPackage.frey_no_cofixed_of_a_mod_eight56 below · depth 6 - Fixed-or-cofixed dichotomy for stable submodules of Frey p-torsion
FreyPackage.frey_stable_submodule_fixed_or_cofixed78 below · depth 6 - Galois-fixed p-torsion of the Frey curve vanishes
FreyPackage.frey_torsion_fixed_eq_zero2 below · depth 6 - At primes dividing abc, c₄ of the Frey model is a unit
FreyPackage.not_dvd_freyCurveInt_c40 below · depth 6 - Decomposition group elements preserve the valuation of ℚ̄
ValuationSubring.valuation_map_eq_of_mem_decompositionSubgroup0 below · depth 6 - Inertia-fixed critical centre at a multiplicative prime
WeierstrassCurve.exists_criticalCentre_of_multiplicativeReduction1 below · depth 6 - Nonzero ℓ-torsion in the zero component at multiplicative reduction, ℓ≠ q
WeierstrassCurve.exists_torsion_ne_zero_inZeroComponentAt_of_ne_residueChar18 below · depth 6 - Some ℓ-torsion point outside the zero component at a nodal prime
WeierstrassCurve.exists_torsion_not_inZeroComponentAt_of_ne_residueChar6 below · depth 6 - ℓ-torsion in the zero component at a multiplicative prime
WeierstrassCurve.exists_torsion_zeroComponent_submodule_of_multiplicativeReduction0 below · depth 6 - Equal level, opposite branches: the sum reduces smoothly
WeierstrassCurve.inZeroComponentAt_add_of_level_eq_of_branch_ne0 below · depth 6 - Stability of the zero component under the decomposition group
WeierstrassCurve.inZeroComponentAt_smul0 below · depth 6 - Inertia displacements lie in the zero component at q
WeierstrassCurve.inZeroComponentAt_smul_sub_of_mem_inertiaSubgroupIn12 below · depth 6 - The zero component at A is closed under subtraction
WeierstrassCurve.inZeroComponentAt_sub0 below · depth 6 - Equal level and same branch: the difference lies in the zero component
WeierstrassCurve.inZeroComponentAt_sub_of_level_eq_of_branch_eq0 below · depth 6 - Off the zero component iff the abscissa meets the node
WeierstrassCurve.not_inZeroComponentAt_some_iff_of_criticalCentre0 below · depth 6 - Integrality of the branch slope at a shallow node-reducing point
WeierstrassCurve.slope_mem_of_shallow0 below · depth 6 - Discriminant valuation at a nodal critical centre
WeierstrassCurve.valuation_discriminant_eq_of_criticalCentre0 below · depth 6 - Mod-3 eigensystem at a level cube-free away from 3
FLT.No2BridgeWiring.weightOneNewformExists_levelAtThree_not_cube_dvd7,253 below · depth 7 - The Frey curve has no rational point of order p
FreyPackage.freyCurve_rational_p_torsion_eq_zero0 below · depth 7 - Frobenius swaps the branches when a ≡ 3 (mod 8)
FreyPackage.frey_exists_decomposition_branch_swap_of_a_mod_eight23 below · depth 7 - The Frey curve's p-torsion is ramified at 2
FreyPackage.frey_exists_inertia_not_fixed_at_two41 below · depth 7 - Inertia at p acts trivially on a stable submodule of Frey E[p] or on its quotient
FreyPackage.frey_inertia_at_p_trivial_on_submodule_or_quotient34 below · depth 7 - Inertia at 2 acts trivially on a stable line of Frey E[p]
FreyPackage.frey_inertia_at_two_trivial_on_stable_submodule9 below · depth 7 - Bad reduction at primes dividing abc for all integral models
FreyPackage.not_isGoodPrimeFor_of_isIntegralModelOf_freyCurve3 below · depth 7 - Some q-torsion point escapes the zero component at q
WeierstrassCurve.exists_torsionBy_residueChar_not_inZeroComponentAt8 below · depth 7 - Some ℓ-torsion escapes the zero component at a multiplicative prime
WeierstrassCurve.exists_torsion_not_inZeroComponentAt_of_multiplicativeReduction16 below · depth 7 - Good reduction at q gives ℓ-torsion unramified at q
WeierstrassCurve.galoisRepUnramifiedAt_of_goodReduction13 below · depth 7 - Multiplicative reduction with ℓ ∣ v_q(Δ): ℓ-torsion unramified at q
WeierstrassCurve.galoisRepUnramifiedAt_of_multiplicativeReduction28 below · depth 7 - Sum of two antipodal points at a node lies in E⁰
WeierstrassCurve.inZeroComponentAt_add_of_antipodal2 below · depth 7 - Antipodal plus shallow point at a node: level and branch
WeierstrassCurve.level_add_of_antipodal_of_shallow0 below · depth 7 - Level of the sum of two same-branch shallow points
WeierstrassCurve.level_add_of_branch_eq0 below · depth 7 - Level of a sum: opposite branches, distinct levels
WeierstrassCurve.level_add_of_branch_ne_of_level_lt0 below · depth 7 - Translation by a point of E⁰ preserves level and branch at a node
WeierstrassCurve.level_add_of_inZeroComponentAt5 below · depth 7 - Levels of ℓ-torsion points at a node
WeierstrassCurve.valuation_pow_eq_of_torsion_of_not_inZeroComponentAt10 below · depth 7 - Inertia preserves level and branch of shallow node-reducing points
WeierstrassCurve.valuation_slope_smul_sub_slope_lt_one1 below · depth 7 - Node-reducing 2-torsion lies at half the node depth
WeierstrassCurve.valuation_sq_eq_of_two_torsion_of_not_inZeroComponentAt0 below · depth 7 - Continuous surjective mod-3 representation with prescribed Frobenius traces
FLT.LedgerRows.ledg5_no2_hcurve_continuous139 below · depth 8 - Weight-one χ₋₃ lattice realisation with no cube away from 3
FLT.No2BridgeWiring.weightOneNewformExists_not_cube_dvd7,221 below · depth 8 - Inertia above p fixes a stable line or its quotient
FreyPackage.frey_inertia_at_p_trivial_on_submodule_or_quotient_at31 below · depth 8 - Wild inertia at 2 fixes the p-torsion of a Frey curve
FreyPackage.frey_wild_inertia_at_two_trivial4 below · depth 8 - Frey curve: p ∤ v₂(Δ) at the prime 2
FreyPackage.not_p_dvd_padicValInt_two_freyCurveInt_discr1 below · depth 8 - p divides v_ℓ(Δ) for the Frey curve over ℚ
FreyPackage.p_dvd_padicValRat_freyCurve_discr3 below · depth 8 - Two-adic valuation of the integral Frey discriminant
FreyPackage.padicValInt_two_freyCurveInt_discr0 below · depth 8 - Exact doubling identity at a critical centre
WeierstrassCurve.addX_self_sub_mul_sq_of_criticalCentre0 below · depth 8 - Sum–difference abscissa identity at a critical centre
WeierstrassCurve.addX_sub_mul_addX_neg_sub_mul_sq_of_criticalCentre0 below · depth 8 - Néron–Ogg–Shafarevich: good reduction gives E[n] unramified at q
WeierstrassCurve.galoisRepUnramifiedAt_of_hasGoodReduction12 below · depth 8 - Unit distance from the critical centre forces the zero component
WeierstrassCurve.inZeroComponentAt_of_valuation_sub_eq_one0 below · depth 8 - Inertia image of the mod-3 representation has order prime to q
WeierstrassCurve.natCard_inertia_map_coprime_of_isSemistableModel151 below · depth 8 - Inertia at 3 has image of order two under ρ
WeierstrassCurve.natCard_inertia_map_modThreeRep_eq_two_of_inertia_fixed_torsion160 below · depth 8 - Chord trichotomy at a node of a Weierstrass cubic
WeierstrassCurve.node_chord_trichotomy0 below · depth 8 - Inertia fixes ℓ-torsion off the zero component when ℓ∣ v_q(Δ)
WeierstrassCurve.smul_eq_self_of_torsion_of_not_inZeroComponentAt_of_dvd26 below · depth 8 - Levels of odd ℓ-torsion reducing to a node
WeierstrassCurve.valuation_pow_eq_of_prime_torsion_of_not_inZeroComponentAt10 below · depth 8 - Vanishing of a₃ for the Frey curve at a good prime 3
FreyCurve.freyCurveInt_apOfModel_three10 below · depth 9 - Inertia at p∣ abc acts trivially modulo a proper subspace
FreyPackage.frey_inertia_at_p_filtration_of_dvd_abc_of_stable_line26 below · depth 9 - Frey curve, p ∤ abc: inertia above p modulo a proper subspace
FreyPackage.frey_inertia_at_p_filtration_of_not_dvd_abc6 below · depth 9 - p divides v_ℓ(Δ) of the Frey curve at odd ℓ
FreyPackage.p_dvd_padicValInt_freyCurveInt_discr1 below · depth 9 - Two divides the discriminant of the integral Frey curve
FreyPackage.two_dvd_freyCurveInt_delta1 below · depth 9 - A place of ℚ̄ restricts to a DVR on a number field
ValuationSubring.isDiscreteValuationRing_comap_of_liesOverPrime0 below · depth 9 - Inertia fixes node-reducing 2-torsion of integral level
WeierstrassCurve.Affine.Point.smul_eq_self_of_two_torsion_of_mem_inertiaSubgroupIn_of_level1 below · depth 9 - Negation flips the branch slope at a shallow node reduction
WeierstrassCurve.valuation_slope_sub_slope_neg_of_shallow0 below · depth 9 - 4 divides #̃ E(𝔽_q) at good odd primes
FreyCurve.four_dvd_card_reductionMod7 below · depth 10 - Stable line yields p-torsion point with A-integral abscissa
FreyPackage.frey_exists_p_torsion_integral_abscissa4 below · depth 10 - q-adic valuation of the integral Frey discriminant at odd q
FreyPackage.padicValInt_freyCurveInt_discr0 below · depth 10 - Nonzero ℓ-torsion in the zero component at a multiplicative prime
WeierstrassCurve.exists_torsion_ne_zero_inZeroComponentAt_of_multiplicativeReduction23 below · depth 10 - q-torsion of the zero component at a multiplicative prime
WeierstrassCurve.inZeroComponentAt_torsionBy_residueChar3 below · depth 10 - Reduced Frey curve has exactly four 2-torsion points
FreyCurve.card_two_torsion_reductionMod6 below · depth 11 - Nonzero q-torsion in the zero component at residue characteristic q
WeierstrassCurve.exists_torsionBy_residueChar_ne_zero_inZeroComponentAt3 below · depth 11 - Factorisation of 8Ψ₂² for the reduced Frey curve
FreyCurve.eight_mul_Psi2Sq_eval_reductionMod1 below · depth 12