Riemann hypothesis: the Lean proof, cleaned up together
The 2026 Lean proof of the Riemann hypothesis and GRH, machine-checked by others, not refereed, no word from Clay; cleaned up together: more readable, faster to build, the theorems unchanged

| 1 | module |
| 2 | |
| 3 | import Mathlib.FieldTheory.Galois.Profinite |
| 4 | import TauCeti.Algebra.Module.Torsion.EulerQuotient |
| 5 | public import Lib.ClassField.GreenbergWiles.Relations |
| 6 | public import Lib.ClassField.GreenbergWiles.SplitPrimeReciprocity |
| 7 | import Lib.Adelic.Adeles.StrongApproximation |
| 8 | import Lib.ClassField.Global.Chebotarev |
| 9 | import Lib.ClassField.GreenbergWiles.CocycleCounts |
| 10 | import Lib.ClassField.GreenbergWiles.SelmerRelations |
| 11 | |
| 12 | /-! |
| 13 | # Relations modulo ℓ |
| 14 | |
| 15 | A lower bound for the number of reductions modulo `ℓ` of the relations off a finite set `T` of |
| 16 | primes, for a module whose submodule of points killed by `ℓ` has order `ℓ`. Here the forms on the |
| 17 | points killed by `ℓ` are lifted to relations, and the cocycles killed by `ℓ` are bounded by the |
| 18 | count for `M[ℓ]`. |
| 19 | |
| 20 | * `New.RelationSetting.reductions`: the reductions modulo `ℓ` of the relations off `T`. |
| 21 | * `New.RelationSetting.exists_pow_le_card_reductions`: the lower bound for their number. |
| 22 | |
| 23 | Notions from other files: |
| 24 | * `New.RelationSetting`: a module `M` over `Gal(Ω/K)`, where `Ω` is the fixed algebraic closure in |
| 25 | which the number field `K` is embedded (`EmbeddedNumberField K`), unramified outside a finite set |
| 26 | `S` of primes and with trivial complex conjugations, with a chosen place `D.place v` above each |
| 27 | prime `v`, with local conditions at `S` on its decomposition group that contain the coboundaries, |
| 28 | and an open normal subgroup `U` that fixes `M` and the `m`-th roots of unity; |
| 29 | * `New.RelationSetting.cocycles`: the cocycles that satisfy the local conditions, vanish at complex |
| 30 | conjugations and are unramified outside `S` and a given set of primes; |
| 31 | * `New.RelationSetting.relations`: the functions, supported on `U`, with values in the characters of |
| 32 | `M`, that have the properties of restrictions of dual cocycles; those off `T` satisfy the |
| 33 | reciprocity law with the cocycles ramified at finitely many split primes outside `T`; |
| 34 | * `New.IsLargeLevel.SplitPlaces`: a family of primes prime to the level that split in the field of |
| 35 | an open normal subgroup, with places above them and Frobenius elements. |
| 36 | |
| 37 | ## Relation to the literature |
| 38 | |
| 39 | Known; see `Lib.ClassField.GreenbergWiles.CocycleCounts` for sources. |
| 40 | -/ |
| 41 | |
| 42 | @[expose] public section |
| 43 | |
| 44 | noncomputable section |
| 45 | |
| 46 | namespace New |
| 47 | |
| 48 | open NumberField Function Finset DiscreteModule Fintype Subgroup IsLargeLevel |
| 49 | |
| 50 | /-- The image of a finite abelian group has no more points killed by `ℓ` than the group. -/ |
| 51 | lemma card_torsionBy_le_of_surjective {Y B : Type} [AddCommGroup Y] [AddCommGroup B] [Finite Y] |
| 52 | (ℓ : ℕ) {p : Y →+ B} (hp : Surjective p) : |
| 53 | Nat.card (Submodule.torsionBy ℕ B ℓ) ≤ Nat.card (Submodule.torsionBy ℕ Y ℓ) := by |
| 54 | have : Finite B := .of_surjective p hp |
| 55 | have : Finite (QuotSMulTop (ℓ : ℤ) Y) := Quotient.finite _ |
| 56 | -- For finite A, A[ℓ] has the same order as A/ℓA. The map Y/ℓY → B/ℓB is onto. |
| 57 | simpa [TauCeti.natCard_quotSMulTop_eq_natCard_torsionBy, Submodule.mem_torsionBy_iff] using |
| 58 | Nat.card_le_card_of_surjective _ |
| 59 | (QuotSMulTop.map_surjective (ℓ : ℤ) (f := p.toIntLinearMap) hp) |
| 60 | |
| 61 | namespace RelationSetting |
| 62 | |
| 63 | variable {K R : Type} [Field K] [EmbeddedNumberField K] [CommRing R] |
| 64 | {M : DiscreteModule R Gal(Ω/K)} {m : ℕ} [NeZero m] (D : RelationSetting M m) |
| 65 | |
| 66 | /-- The reductions modulo `ℓ` of the relations off `T`, with values in `M* / ℓ M*`. -/ |
| 67 | def reductions (ℓ : ℕ) (T : Finset (FinPlace K)) : |
| 68 | Submodule R (Gal(Ω/K) → QuotSMulTop (ℓ : R) (CharacterModule M)) := |
| 69 | (D.relations T).map ((Submodule.mkQ _).compLeft Gal(Ω/K)) |
| 70 | |
| 71 | /-- If `M` is finite, then `D.reductions ℓ T` is finite, as the image of the finite set |
| 72 | `D.relations T`. -/ |
| 73 | instance finite_reductions [Finite M] (ℓ : ℕ) (T : Finset (FinPlace K)) : |
| 74 | Finite (D.reductions ℓ T) := |
| 75 | Set.Finite.image _ (D.finite_relations T) |
| 76 | |
| 77 | /-- Two characters of `M` that are congruent modulo `ℓ` agree on the points killed by `ℓ`. -/ |
| 78 | lemma apply_eq_of_mkQ_eq {ℓ : ℕ} {χ χ' : CharacterModule M} |
| 79 | (h_mk : (Submodule.Quotient.mk χ : QuotSMulTop (ℓ : R) (CharacterModule M)) = |
| 80 | Submodule.Quotient.mk χ') {a : M} (ha : ℓ • a = 0) : χ a = χ' a := by |
| 81 | -- The difference `χ - χ'` lies in `ℓ • M*`, so it is `ℓ • η` for some character `η`. |
| 82 | obtain ⟨η, -, hη⟩ := |
| 83 | (Submodule.mem_smul_pointwise_iff_exists _ _ _).1 ((Submodule.Quotient.eq _).1 h_mk) |
| 84 | have h_val : η ((ℓ : R) • a) = χ a - χ' a := DFunLike.congr_fun hη a |
| 85 | rwa [Nat.cast_smul_eq_nsmul, ha, map_zero, eq_comm, sub_eq_zero] at h_val |
| 86 | |
| 87 | /-- Let `B` be a subgroup of `M ^ ι` that contains the families `i ↦ z (γ i)` for the cocycles `z` |
| 88 | in `D.cocycles P`, and suppose that every family of characters of `M` killing these families is the |
| 89 | family of values at the `φ i` of a relation off `T`. Then every character `χ` of a subgroup `X` of |
| 90 | `M ^ ι` that kills `X ∩ B` is `x ↦ ∑ i, y (φ i) (x i)` for a relation `y` off `T`. -/ |
| 91 | private lemma exists_relation_sum_eq_of_ker {ι : Type} [Fintype ι] {φ γ : ι → Gal(Ω/K)} |
| 92 | {P : Set (FinPlace K)} {T : Finset (FinPlace K)} |
| 93 | (h_forms : ∀ ν : ι → CharacterModule M, (∀ z ∈ D.cocycles P, ∑ i : ι, ν i (z (γ i)) = 0) → |
| 94 | ∃ y ∈ D.relations T, ∀ i : ι, y (φ i) = ν i) |
| 95 | {B : AddSubgroup (ι → M)} (hB : ∀ z ∈ D.cocycles P, (fun i ↦ z (γ i)) ∈ B) |
| 96 | {X : AddSubgroup (ι → M)} (χ : X →+ QZ) (hχ : ∀ x : X, (x : ι → M) ∈ B → χ x = 0) : |
| 97 | ∃ y ∈ D.relations T, ∀ x : X, ∑ i, y (φ i) (x.1 i) = χ x := by |
| 98 | classical |
| 99 | obtain ⟨η, hη⟩ : ∃ η : (ι → M) ⧸ B →+ QZ, |
| 100 | ∀ x : X, η ((QuotientAddGroup.mk' B).comp X.subtype x) = χ x := |
| 101 | QZ.exists_extend ((QuotientAddGroup.mk' B).comp X.subtype) χ fun x hx ↦ |
| 102 | hχ x ((QuotientAddGroup.eq_zero_iff _).1 hx) |
| 103 | let ν (i : ι) : M →+ QZ := η.comp ((QuotientAddGroup.mk' _).comp (.single (fun _ ↦ M) i)) |
| 104 | have ν_sum (x : ι → M) : ∑ i, ν i (x i) = η x := by |
| 105 | conv_rhs => rw [← univ_sum_single x] |
| 106 | simp [ν] |
| 107 | have ν_kills (z : Gal(Ω/K) → M) (hz : z ∈ D.cocycles P) : ∑ i, ν i (z (γ i)) = 0 := by |
| 108 | rw [ν_sum, (QuotientAddGroup.eq_zero_iff _).2 (hB z hz)] |
| 109 | exact map_zero η |
| 110 | obtain ⟨y, hy, y_val⟩ := h_forms ν ν_kills |
| 111 | refine ⟨y, hy, fun x ↦ ?_⟩ |
| 112 | simp only [y_val] |
| 113 | exact (ν_sum x).trans (hη x) |
| 114 | |
| 115 | /-- In the relation setting `D` with `M` finite, let `P` be a finite set of finite places, and let |
| 116 | `γ` and `φ` be families of Galois elements indexed by `ι`. Let `D.cocycles P` be the cocycles |
| 117 | allowed at `S`, vanishing at complex conjugations and unramified outside `S ∪ P`. Suppose every |
| 118 | family `ν` of characters of `M` that kills the families `i ↦ z (γ i)` for all `z` in `D.cocycles P` |
| 119 | is the family of values at the `φ i` of a relation off `T` (an element of `D.relations T`). Then |
| 120 | `#M[ℓ] ^ #ι` is at most the number of reductions modulo `ℓ` of the relations off `T` (with values in |
| 121 | `M* / ℓ M*`), times the number of cocycles in `D.cocycles P` killed by `ℓ`. -/ |
| 122 | lemma pow_le_card_reductions_mul [Finite M] (ℓ : ℕ) {ι : Type} [Fintype ι] |
| 123 | {φ γ : ι → Gal(Ω/K)} {P : Set (FinPlace K)} (hP : P.Finite) {T : Finset (FinPlace K)} |
| 124 | (h_forms : ∀ ν : ι → CharacterModule M, (∀ z ∈ D.cocycles P, ∑ i : ι, ν i (z (γ i)) = 0) → |
| 125 | ∃ y ∈ D.relations T, ∀ i : ι, y (φ i) = ν i) : |
| 126 | Nat.card {a : M // ℓ • a = 0} ^ card ι ≤ |
| 127 | Nat.card (D.reductions ℓ T) * Nat.card (Submodule.torsionBy ℕ (D.cocycles P) ℓ) := by |
| 128 | classical |
| 129 | -- Let `B ⊆ M ^ ι` be the group of the families of values at the `γ i`. A character of `M[ℓ] ^ ι` |
| 130 | -- that kills `B[ℓ]` extends to a character of `M ^ ι` that kills `B`, so it comes from a |
| 131 | -- relation, whose reduction determines it. |
| 132 | have : Finite (D.cocycles P) := |
| 133 | (selmerZ1.finite_unramified_cocycles M (D.localPrimes.finite_toSet.union hP)).subset inf_le_left |
| 134 | let values : D.cocycles P →+ ι → M := .mk' (fun z i ↦ z.val (γ i)) fun _ _ ↦ rfl |
| 135 | -- `X = M[ℓ] ^ ι` maps by `f` to `M ^ ι / B`, with kernel `B[ℓ]`. |
| 136 | let X : AddSubgroup (ι → M) := (ℓ • AddMonoidHom.id (ι → M)).ker |
| 137 | let f : X →+ (ι → M) ⧸ values.range := (QuotientAddGroup.mk' _).comp X.subtype |
| 138 | have h_rel (χ : X ⧸ f.ker →+ QZ) : ∃ y ∈ D.relations T, ∀ x : X, ∑ i, y (φ i) (x.1 i) = χ x := |
| 139 | D.exists_relation_sum_eq_of_ker h_forms (B := values.range) (fun z hz ↦ ⟨⟨z, hz⟩, rfl⟩) |
| 140 | (χ.comp (QuotientAddGroup.mk' _)) fun x hx ↦ by |
| 141 | have hx_ker : x ∈ f.ker := AddMonoidHom.mem_ker.2 ((QuotientAddGroup.eq_zero_iff _).2 hx) |
| 142 | simp [(QuotientAddGroup.eq_zero_iff x).2 hx_ker] |
| 143 | choose y hy y_sum using h_rel |
| 144 | have h_chars : Nat.card (X ⧸ f.ker →+ QZ) ≤ Nat.card (D.reductions ℓ T) := by |
| 145 | -- The map from `χ` to the reduction of `y χ` is injective. |
| 146 | refine Nat.card_le_card_of_injective |
| 147 | (fun χ ↦ ⟨_, Submodule.mem_map_of_mem (hy χ)⟩) fun χ χ' h ↦ ?_ |
| 148 | ext x |
| 149 | have h_mk (g : Gal(Ω/K)) : (Submodule.Quotient.mk (y χ g) : |
| 150 | QuotSMulTop (ℓ : R) (CharacterModule M)) = Submodule.Quotient.mk (y χ' g) := |
| 151 | congrFun (Subtype.ext_iff.1 h) g |
| 152 | have h_sum : ∑ i, y χ (φ i) (x.val i) = ∑ i, y χ' (φ i) (x.val i) := |
| 153 | sum_congr rfl fun i _ ↦ apply_eq_of_mkQ_eq (h_mk (φ i)) (congrFun x.property i) |
| 154 | exact (y_sum χ x).symm.trans (h_sum.trans (y_sum χ' x)) |
| 155 | have h_ker : Nat.card f.ker ≤ Nat.card (Submodule.torsionBy ℕ values.range ℓ) := by |
| 156 | have h_range (x : f.ker) : (x : X).1 ∈ values.range := (QuotientAddGroup.eq_zero_iff _).1 x.2 |
| 157 | have h_torsion (x : f.ker) : ℓ • (x : X).val = 0 := (x : X).property |
| 158 | exact Nat.card_le_card_of_injective (fun x ↦ ⟨⟨_, h_range x⟩, Subtype.ext (h_torsion x)⟩) |
| 159 | fun x x' h ↦ by simpa only [Subtype.ext_iff] using h |
| 160 | calc Nat.card {a : M // ℓ • a = 0} ^ card ι |
| 161 | _ = Nat.card X := by |
| 162 | rw [← Nat.card_eq_fintype_card, ← Nat.card_fun] |
| 163 | exact Nat.card_congr (Equiv.subtypePiEquivPi.symm.trans |
| 164 | (Equiv.subtypeEquivRight fun x ↦ by simp [X, funext_iff])) |
| 165 | _ = Nat.card (X ⧸ f.ker →+ QZ) * Nat.card f.ker := by |
| 166 | rw [card_hom_QZ, ← f.ker.card_eq_card_quotient_mul_card_addSubgroup] |
| 167 | _ ≤ Nat.card (D.reductions ℓ T) * Nat.card (Submodule.torsionBy ℕ (D.cocycles P) ℓ) := by |
| 168 | grw [h_chars, h_ker, card_torsionBy_le_of_surjective ℓ values.rangeRestrict_surjective] |
| 169 | |
| 170 | end RelationSetting |
| 171 | namespace IsLargeLevel.SplitPlaces |
| 172 | |
| 173 | variable {K ι : Type} [Field K] [EmbeddedNumberField K] {ℓ m N : ℕ} [NeZero m] |
| 174 | {U O : OpenNormalSubgroup Gal(Ω/K)} {I : Set Gal(Ω/K)} |
| 175 | /-- Let `ℓ` divide `m` and let `O ⊇ U` fix the `ℓ`-th roots of unity. A family `s` of primes not |
| 176 | dividing `N` and split for `U` and `m` extends by two new primes to such a family for `O` and `ℓ`, |
| 177 | whose new Frobenius elements lie in the cosets `(x j)⁻¹ U` of two given elements `x j` of `O`. The |
| 178 | sets `I` and `I'` are the unions of the inertia groups above the other primes not dividing `N`. -/ |
| 179 | lemma exists_add_two_primes [NeZero ℓ] [NeZero N] |
| 180 | [Finite ι] (s : SplitPlaces (K := K) m N I U ι) (hm : ℓ ∣ m) |
| 181 | (hUO : U.toSubgroup ≤ O.toSubgroup) (hO : ∀ g ∈ O, cyclotomicCharMod Ω ℓ g = 1) (x : Bool → O) : |
| 182 | ∃ (I' : Set Gal(Ω/K)) (s' : SplitPlaces (K := K) ℓ N I' O (ι ⊕ Bool)), |
| 183 | (∀ i : ι, s'.v (.inl i) = s.v i) ∧ |
| 184 | (∀ i : ι, s'.φ (.inl i) = s.φ i) ∧ |
| 185 | ∀ j : Bool, (x j).val * s'.φ (.inr j) ∈ U := by |
| 186 | -- Prescribe the Frobenius cosets `(x j)⁻¹ U` and exclude the original primes. |
| 187 | obtain ⟨v, B, φ, v_inj, hv⟩ := chebotarev_family |
| 188 | (fun j ↦ U.isOpen.preimage (continuous_const_mul (x j).val)) |
| 189 | (fun j ↦ ⟨(x j).val⁻¹, by simp⟩) ((finite_natCast_mem N).union (Set.finite_range s.v)) |
| 190 | choose hv hB hφU hφ using hv |
| 191 | have h_new (j : Bool) : ↑N ∉ (v j).asIdeal ∧ ∀ i, s.v i ≠ v j := by |
| 192 | simpa using hv j |
| 193 | let s' : SplitPlaces (K := K) ℓ N _ O (ι ⊕ Bool) := |
| 194 | { cyclotomicCharMod_eq_one := hO |
| 195 | dvd_level := hm.trans s.dvd_level |
| 196 | v := Sum.elim s.v v |
| 197 | v_injective := s.v_injective.sumElim v_inj fun i j ↦ (h_new j).2 i |
| 198 | level_notMem := Sum.forall.2 ⟨s.level_notMem, fun j ↦ (h_new j).1⟩ |
| 199 | valuationSubring := Sum.elim s.valuationSubring B |
| 200 | isPlaceOver := Sum.forall.2 ⟨s.isPlaceOver, hB⟩ |
| 201 | φ := Sum.elim s.φ φ |
| 202 | isFrob := Sum.forall.2 ⟨fun i ↦ ⟨(s.isFrob i).1, hUO (s.isFrob i).2⟩, |
| 203 | fun j ↦ ⟨hφ j, (mul_mem_cancel_left (x j).property).1 (hUO (hφU j))⟩⟩ |
| 204 | mem_inertia_iff _ := Iff.of_eq Set.mem_ofPred_eq |
| 205 | inertiaGroup_le hv hB := (s.inertiaGroup_le hv hB).trans hUO |
| 206 | principal_sup_idelesUnitOff F _ h := |
| 207 | s.principal_sup_idelesUnitOff F fun y hy g ↦ h hy (inclusion hUO g) } |
| 208 | exact ⟨_, s', fun i ↦ rfl, fun i ↦ rfl, hφU⟩ |
| 209 | |
| 210 | /-- Descent of root detection from `m` to a divisor `ℓ`. Let `U ≤ O` and let the Frobenius elements |
| 211 | of `s` detect `m`-th roots: whatever they fix among the `m`-th roots of `N`-units of the field of |
| 212 | `U` is fixed by `U`. Then `U` also fixes every `ℓ`-th root `y` of an `N`-unit of the field of `O` |
| 213 | that they all fix. -/ |
| 214 | lemma le_stabilizer (s : SplitPlaces (K := K) m N I U ι) (h_detect : s.FrobeniiDetectRoots) |
| 215 | (hm : ℓ ∣ m) (hUO : U.toSubgroup ≤ O.toSubgroup) {y : DiscreteUnits Ω} |
| 216 | (hy : ℓ • y ∈ fixedSUnits N O) (h_frob : ∀ i : ι, unitsRep (s.φ i) y = y) : |
| 217 | U.toSubgroup ≤ MulAction.stabilizer Gal(Ω/K) y.toMul := by |
| 218 | obtain ⟨m', rfl⟩ := hm |
| 219 | have hyU : ℓ • y ∈ fixedSUnits N U := ⟨hy.1, fun g ↦ hy.2 (inclusion hUO g)⟩ |
| 220 | exact h_detect y (by simpa only [mul_nsmul] using nsmul_mem hyU m') h_frob |
| 221 | |
| 222 | end IsLargeLevel.SplitPlaces |
| 223 | |
| 224 | /-- The submodule `M[ℓ]` of the points killed by `ℓ`. -/ |
| 225 | abbrev DiscreteModule.torsion {R G : Type} [CommRing R] [Group G] [TopologicalSpace G] |
| 226 | (M : DiscreteModule R G) (ℓ : ℕ) : DiscreteModule R G := |
| 227 | M.submodule (ℓ • LinearMap.id).ker fun g a (h : ℓ • a = 0) ↦ |
| 228 | show ℓ • M.ρ g a = 0 by rw [← map_nsmul, h, map_zero] |
| 229 | |
| 230 | namespace RelationSetting |
| 231 | |
| 232 | variable {K R : Type} [Field K] [EmbeddedNumberField K] [CommRing R] |
| 233 | {M : DiscreteModule R Gal(Ω/K)} {m : ℕ} [NeZero m] (D : RelationSetting M m) |
| 234 | {ℓ : ℕ} [Fact ℓ.Prime] |
| 235 | |
| 236 | variable (M ℓ) in |
| 237 | /-- The action of the Galois group on `M[ℓ]` and on the `ℓ`-th roots of unity. -/ |
| 238 | def torsionAction : Gal(Ω/K) →* Multiplicative (AddAut (M.torsion ℓ)) × (ZMod ℓ)ˣ := |
| 239 | ((DistribMulAction.toAddAut _ (M.torsion ℓ)).comp (M.torsion ℓ).ρ.asGroupHom).prod |
| 240 | (cyclotomicCharMod Ω ℓ) |
| 241 | |
| 242 | /-- An element of the kernel of the action on `M[ℓ]` and `μ_ℓ` fixes the `ℓ`-th roots of unity. -/ |
| 243 | lemma cyclotomicCharMod_eq_one_of_mem_ker_torsionAction {g : Gal(Ω/K)} |
| 244 | (hg : g ∈ (torsionAction M ℓ).ker) : cyclotomicCharMod Ω ℓ g = 1 := |
| 245 | congrArg Prod.snd (MonoidHom.mem_ker.1 hg) |
| 246 | |
| 247 | /-- The kernel of the action on `M[ℓ]` and `μ_ℓ` acts trivially on `M[ℓ]`. -/ |
| 248 | lemma trivialOn_ker_torsionAction : (M.torsion ℓ).TrivialOn (torsionAction M ℓ).ker := fun _ hg a ↦ |
| 249 | DFunLike.congr_fun (congrArg (fun p ↦ Multiplicative.toAdd p.1) (MonoidHom.mem_ker.1 hg)) a |
| 250 | |
| 251 | /-- If `ℓ ∣ m`, the subgroup `U` of the setting acts trivially on `M[ℓ]` and on the `ℓ`-th roots of |
| 252 | unity. -/ |
| 253 | lemma le_ker_torsionAction (hm : ℓ ∣ m) : D.subgroup.toSubgroup ≤ (torsionAction M ℓ).ker := |
| 254 | fun g hg ↦ |
| 255 | MonoidHom.mem_ker.2 <| Prod.ext (AddEquiv.ext fun a ↦ Subtype.ext (D.apply_eq_of_mem g hg a.val)) |
| 256 | (cyclotomicCharMod_eq_one_of_dvd hm (D.cyclotomicCharMod_eq_one g hg)) |
| 257 | |
| 258 | /-- If `M[ℓ]` has order `ℓ`, the kernel of the action on `M[ℓ]` and `μ_ℓ` has index prime to `ℓ`: |
| 259 | the index divides `(ℓ - 1) ^ 2`. -/ |
| 260 | lemma coprime_index_ker_torsionAction [Finite M] (h_card : Nat.card (M.torsion ℓ) = ℓ) : |
| 261 | ℓ.Coprime (torsionAction M ℓ).ker.index := by |
| 262 | have hℓ : ℓ.Prime := Fact.out |
| 263 | have h_mul : Nat.card (Multiplicative (M.torsion ℓ)) = ℓ := h_card |
| 264 | have h_aut : Nat.card (Multiplicative (AddAut (M.torsion ℓ))) = ℓ - 1 := by |
| 265 | rw [← Nat.card_congr (MulAutMultiplicative (M.torsion ℓ)).toEquiv, |
| 266 | (isCyclic_of_prime_card h_mul).card_mulAut, h_mul, Nat.totient_prime hℓ] |
| 267 | have h_dvd : (torsionAction M ℓ).ker.index ∣ (ℓ - 1) ^ 2 := by |
| 268 | grw [index_ker, card_subgroup_dvd_card, Nat.card_prod, h_aut, Nat.card_units, Nat.card_zmod, sq] |
| 269 | have h_coprime : ℓ.Coprime (ℓ - 1) := (Nat.coprime_self_sub_right hℓ.one_le).2 (by simp) |
| 270 | exact (h_coprime.pow_right 2).of_dvd_right h_dvd |
| 271 | |
| 272 | variable (ℓ) in |
| 273 | /-- The local condition for `M[ℓ]`: the functions on the decomposition group of the chosen place |
| 274 | `D.place v` above `v`, with values in `M[ℓ]`, that are allowed for `M`. -/ |
| 275 | def allowedTorsion (v : FinPlace K) : |
| 276 | Submodule R (decompGroup Gal(Ω/K) (D.place v) → M.torsion ℓ) := |
| 277 | (D.allowed v).comap ((Submodule.subtype _).compLeft _) |
| 278 | |
| 279 | omit [Fact ℓ.Prime] in |
| 280 | /-- Let `P ⊆ P'` with `P'` finite. A cocycle in `D.cocycles P` killed by `ℓ` takes its values in |
| 281 | `M[ℓ]`, so there are at most as many of them as Selmer cocycles (`selmerZ1`) of `M[ℓ]` for `P'`: |
| 282 | cocycles in the local conditions at `S`, zero at complex conjugations and unramified outside |
| 283 | `S ∪ P'`. -/ |
| 284 | lemma card_torsionBy_cocycles_le [Finite M] {P P' : Set (FinPlace K)} (hP : P ⊆ P') |
| 285 | (hP' : P'.Finite) : Nat.card (Submodule.torsionBy ℕ (D.cocycles P) ℓ) ≤ |
| 286 | Nat.card (selmerZ1 (M.torsion ℓ) D.localPrimes D.place (D.allowedTorsion ℓ) P') := by |
| 287 | have : Finite (selmerZ1 (M.torsion ℓ) D.localPrimes D.place (D.allowedTorsion ℓ) P') := |
| 288 | (selmerZ1.finite_unramified_cocycles _ (D.localPrimes.finite_toSet.union hP')).subset |
| 289 | inf_le_left |
| 290 | let lift (z : Submodule.torsionBy ℕ (D.cocycles P) ℓ) (g : Gal(Ω/K)) : M.torsion ℓ := |
| 291 | ⟨(z : D.cocycles P).val g, congrFun (Subtype.ext_iff.1 z.property) g⟩ |
| 292 | have lift_mem (z : Submodule.torsionBy ℕ (D.cocycles P) ℓ) : |
| 293 | lift z ∈ selmerZ1 (M.torsion ℓ) D.localPrimes D.place (D.allowedTorsion ℓ) P' := by |
| 294 | obtain ⟨⟨⟨h_cont, h_mul⟩, h_unram⟩, h_loc, h_conj⟩ := D.cocycles_mono hP (z : D.cocycles P).2 |
| 295 | -- As `M[ℓ] → M` is injective, each condition on `lift z` is the same condition on `z`. |
| 296 | exact ⟨⟨⟨h_cont.subtype_mk _, fun g h ↦ Subtype.ext (h_mul g h)⟩, |
| 297 | fun g hg ↦ Subtype.ext (h_unram g hg)⟩, h_loc, fun g hg ↦ Subtype.ext (h_conj g hg)⟩ |
| 298 | exact Nat.card_le_card_of_injective (fun z ↦ ⟨lift z, lift_mem z⟩) fun z w h ↦ by |
| 299 | simpa only [lift, Subtype.ext_iff, funext_iff] using h |
| 300 | |
| 301 | section Procyclic |
| 302 | |
| 303 | variable {κ : Gal(Ω/K) →* ℤ_[ℓ]ˣ} |
| 304 | |
| 305 | /-- Let `κ` be continuous with values in `1 + 4 ℤ_ℓ`, so that the image of a closed subgroup `H` is |
| 306 | procyclic. Some `γ ∈ H` and `H ⊓ ker κ` generate `H` topologically: every open subgroup of `H` that |
| 307 | contains both is all of `H`. -/ |
| 308 | lemma exists_generator_mod_ker (hκ : Continuous κ) (hκ_four : ∀ g : Gal(Ω/K), 4 ∣ (κ g).val - 1) |
| 309 | (H : Subgroup Gal(Ω/K)) (hH : IsClosed (H : Set Gal(Ω/K))) : |
| 310 | ∃ γ : H, ∀ F ≥ (κ.domRestrict H).ker, F.IsOpen → γ ∈ F → ∀ g : H, g ∈ F := |
| 311 | Selmer.exists_procyclic_generator (κ.domRestrict H) hκ.continuousOn.domRestrict |
| 312 | fun g ↦ hκ_four g |
| 313 | |
| 314 | open Classical in |
| 315 | /-- Let `κ` be continuous with values in `1 + 4 ℤ_ℓ`. Suppose the local condition at each prime `v` |
| 316 | consists of the functions that vanish on the whole decomposition group if `v` is not above `ℓ`, and |
| 317 | on its intersection with `ker κ` if `v` is above `ℓ`. Then there is at most one allowed local |
| 318 | cocycle with values in `M[ℓ]` if `v` is not above `ℓ`, and at most `#M[ℓ]` if it is, as a cocycle |
| 319 | that vanishes on the kernel of `κ` is determined by one value. -/ |
| 320 | lemma card_allowedTorsion_le (hκ : Continuous κ) (hκ_four : ∀ g : Gal(Ω/K), 4 ∣ (κ g).val - 1) |
| 321 | [Finite M] (h_allowed : ∀ v : FinPlace K, |
| 322 | D.allowed v = .pi {g : decompGroup Gal(Ω/K) (D.place v) | ↑ℓ ∈ v.asIdeal → κ g = 1} ⊥) |
| 323 | (v : FinPlace K) : |
| 324 | Nat.card ↥(D.allowedTorsion ℓ v ⊓ |
| 325 | Z1 ((M.torsion ℓ).restrictTo (decompGroup Gal(Ω/K) (D.place v))).ρ) ≤ |
| 326 | if ↑ℓ ∉ v.asIdeal then 1 else Nat.card (M.torsion ℓ) := by |
| 327 | let G : Subgroup Gal(Ω/K) := decompGroup Gal(Ω/K) (D.place v) |
| 328 | have h_zero {z : G → M.torsion ℓ} (hz : z ∈ D.allowedTorsion ℓ v) (g : G) |
| 329 | (hg : ↑ℓ ∈ v.asIdeal → κ g = 1) : z g = 0 := by |
| 330 | rw [allowedTorsion, h_allowed] at hz |
| 331 | exact Subtype.ext (hz g hg) |
| 332 | split_ifs with hv |
| 333 | · obtain ⟨δ, hδ⟩ := exists_generator_mod_ker hκ hκ_four G inferInstance |
| 334 | refine Nat.card_le_card_of_injective _ |
| 335 | ((injective_iff_map_eq_zero ((LinearMap.proj δ).domRestrict _)).2 fun ⟨z, hz, hZ⟩ hzδ ↦ ?_) |
| 336 | -- The zeros of `z` form an open subgroup that contains `δ` and the kernel of `κ`. |
| 337 | exact Subtype.ext <| funext <| hδ (cocycleKer ((M.torsion ℓ).restrictTo G).ρ hZ.2) |
| 338 | (fun g hg ↦ h_zero hz g fun _ ↦ hg) (hZ.1.isOpen_preimage {0} (by simp)) hzδ |
| 339 | · exact (Nat.card_eq_one_iff_exists.2 ⟨0, fun ⟨z, hz, _⟩ ↦ |
| 340 | Subtype.ext (funext fun g ↦ h_zero hz g fun h ↦ absurd h hv)⟩).le |
| 341 | |
| 342 | /-- Let `κ` be continuous with values in `1 + 4 ℤ_ℓ`, let `ℓ ∣ m`, let `M[ℓ]` have order `ℓ`, and |
| 343 | let `ker κ` lie in `U ∪ U c⁻¹`. Adding two split primes to a family `s` whose Frobenius elements |
| 344 | detect roots gives a family `s'` of split primes for some open normal subgroup `O`. The primes of |
| 345 | `s` are among those of `s'`, and `M[ℓ]` has few cocycles for `s'`: at most `ℓ ^ (#ι + 3)` |
| 346 | cocycles trivialised above the level and infinity and on the inertia groups of the other primes. |
| 347 | That the Frobenius elements detect roots means that `U` fixes every `m`-th root of a `q`-unit of |
| 348 | its field that they all fix. -/ |
| 349 | lemma exists_hasFewCocycles_torsion (hκ : Continuous κ) |
| 350 | (hκ_four : ∀ g : Gal(Ω/K), 4 ∣ (κ g).val - 1) [Finite M] (hm : ℓ ∣ m) {c : Gal(Ω/K)} |
| 351 | (hU : ∀ g : Gal(Ω/K), κ g = 1 → g ∈ D.subgroup ∨ g * c ∈ D.subgroup) |
| 352 | (h_card : Nat.card (M.torsion ℓ) = ℓ) |
| 353 | {q : ℕ} [NeZero q] {ι : Type} [Fintype ι] {I : Set Gal(Ω/K)} |
| 354 | (s : SplitPlaces (K := K) m q I D.subgroup ι) (h_detect : s.FrobeniiDetectRoots) : |
| 355 | ∃ (O : OpenNormalSubgroup Gal(Ω/K)) (I' : Set Gal(Ω/K)) |
| 356 | (s' : SplitPlaces (K := K) ℓ q I' O (ι ⊕ Bool)), Set.range s.v ⊆ Set.range s'.v ∧ |
| 357 | (M.torsion ℓ).HasFewCocycles (PlaceAboveLevel q) I' (card ι + 3) := by |
| 358 | classical |
| 359 | -- Let `O ⊇ U` be the kernel of the action on `M[ℓ]` and `μ_ℓ`. It is generated by `U`, one |
| 360 | -- element `γ`, and `c` if `c ∈ O`; the new Frobenius elements are their inverses modulo `U`. |
| 361 | have hUO : D.subgroup.1.1 ≤ (torsionAction M ℓ).ker := D.le_ker_torsionAction hm |
| 362 | let O : OpenNormalSubgroup Gal(Ω/K) := .mk |
| 363 | ⟨(torsionAction M ℓ).ker, isOpen_mono hUO D.subgroup.toOpenSubgroup.isOpen'⟩ |
| 364 | obtain ⟨γ, hγ⟩ := exists_generator_mod_ker hκ hκ_four _ O.isClosed |
| 365 | let x (j : Bool) : O := cond j γ (if h : c ∈ O then ⟨c, h⟩ else 1) |
| 366 | obtain ⟨I', s', v_eq, φ_eq, φ_mem⟩ := s.exists_add_two_primes (O := O) hm hUO |
| 367 | (fun _ ↦ cyclotomicCharMod_eq_one_of_mem_ker_torsionAction) x |
| 368 | refine ⟨O, I', s', Set.range_subset_iff.2 fun i ↦ ⟨.inl i, v_eq i⟩, ?_⟩ |
| 369 | -- An `ℓ`-th root `y` of a `q`-unit that the Frobenius elements of `s'` fix is fixed by `O`: its |
| 370 | -- stabiliser `F` is open and contains `U`, `γ` and `O ⊓ ker κ`. |
| 371 | have fixed (y : DiscreteUnits Ω) (hy : ℓ • y ∈ fixedSUnits q O) |
| 372 | (h_frob : ∀ i, unitsRep (s'.φ i) y = y) (g : O) : unitsRep g.val y = y := by |
| 373 | let F := MulAction.stabilizer Gal(Ω/K) y.toMul |
| 374 | have hUF : D.subgroup.1.1 ≤ F := s.le_stabilizer h_detect hm hUO hy fun i ↦ by |
| 375 | rw [← φ_eq i, h_frob] |
| 376 | have hxF (j : Bool) : (x j).val ∈ F := |
| 377 | (F.mul_mem_cancel_right (h_frob (.inr j))).1 (hUF (φ_mem j)) |
| 378 | have h_ker : (κ.domRestrict O.1.1).ker ≤ F.subgroupOf O.1.1 := by |
| 379 | refine fun g hg ↦ (hU g hg).elim (fun hgU ↦ hUF hgU) fun hgc ↦ ?_ |
| 380 | -- `g c ∈ U` forces `c ∈ O`, so `c = x false ∈ F`. |
| 381 | have hcO : c ∈ O := (mul_mem_cancel_left g.property).1 (hUO hgc) |
| 382 | exact (F.mul_mem_cancel_right (by simpa [x, hcO] using hxF false)).1 (hUF hgc) |
| 383 | exact hγ _ h_ker (isOpen_mono hUF D.subgroup.toOpenSubgroup.isOpen').preimage_val (hxF true) g |
| 384 | -- `M[ℓ]` is finite, killed by `ℓ`, fixed by `O`, and `ρ 1 - 0` is injective on it. |
| 385 | have hV : (M.torsion ℓ).FiniteKilledFixedInj ℓ O 1 0 := |
| 386 | ⟨inferInstance, fun a ↦ Subtype.ext a.2, trivialOn_ker_torsionAction, by simp [Injective]⟩ |
| 387 | -- Higman's criterion holds because the index of `O` is prime to `ℓ`. |
| 388 | obtain ⟨h_few, -⟩ := s'.card_trivialized_of_isHigmanProjective hV |
| 389 | (hV.isHigmanProjective_of_coprime (coprime_index_ker_torsionAction h_card)) |
| 390 | fun y hy h_frob g ↦ by |
| 391 | simp only [map_one, one_apply_eq_self, zero_smul, sub_zero] |
| 392 | exact fixed y hy h_frob g |
| 393 | -- The family `s'` has `#ι + 2` primes and the bound has one further factor `#M[ℓ]`. |
| 394 | simpa using h_few |
| 395 | |
| 396 | open Classical in |
| 397 | /-- Let `κ` be continuous with values in `1 + 4 ℤ_ℓ` and kernel in `U ∪ U c⁻¹`, let `ℓ ∣ m`, let |
| 398 | `M[ℓ]` have order `ℓ`, let the local conditions be zero away from `ℓ` and vanishing on `ker κ` |
| 399 | above `ℓ`, and let `K` have at least four infinite places. Then the cocycles unramified outside `S` |
| 400 | and the split primes have few points killed by `ℓ`, if the primes of `S` divide the level `q` and |
| 401 | the Frobenius elements of the split primes detect the roots of `q`-units: the number of these |
| 402 | points times `ℓ ^ (k + 1)` is at most `ℓ ^ #ι`, where `k` counts the primes of `S` that are not |
| 403 | above `ℓ`. Indeed the bound `ℓ ^ (#ι + 3)` of `exists_hasFewCocycles_torsion` loses one factor `ℓ` |
| 404 | for each of four infinite places and for each of these `k` primes. -/ |
| 405 | lemma card_torsionBy_cocycles_mul_pow_le (hκ : Continuous κ) |
| 406 | (hκ_four : ∀ g : Gal(Ω/K), 4 ∣ (κ g).val - 1) [Finite M] (hm : ℓ ∣ m) |
| 407 | (h_places : 4 ≤ card (InfinitePlace K)) {c : Gal(Ω/K)} |
| 408 | (hU : ∀ g : Gal(Ω/K), κ g = 1 → g ∈ D.subgroup ∨ g * c ∈ D.subgroup) |
| 409 | (h_card : Nat.card (M.torsion ℓ) = ℓ) |
| 410 | (h_allowed : ∀ v : FinPlace K, |
| 411 | D.allowed v = .pi {g : decompGroup Gal(Ω/K) (D.place v) | ↑ℓ ∈ v.asIdeal → κ g = 1} ⊥) |
| 412 | {q : ℕ} [NeZero q] (hS : ∀ v ∈ D.localPrimes, ↑q ∈ v.asIdeal) {ι : Type} [Fintype ι] |
| 413 | {I : Set Gal(Ω/K)} |
| 414 | (s : SplitPlaces (K := K) m q I D.subgroup ι) (h_detect : s.FrobeniiDetectRoots) : |
| 415 | Nat.card (Submodule.torsionBy ℕ (D.cocycles (Set.range s.v)) ℓ) * |
| 416 | ℓ ^ (#{v ∈ D.localPrimes | ↑ℓ ∉ v.asIdeal} + 1) ≤ ℓ ^ card ι := by |
| 417 | obtain ⟨O, I', s', h_range, h_few⟩ := |
| 418 | D.exists_hasFewCocycles_torsion hκ hκ_four hm hU h_card s h_detect |
| 419 | have triv {g : Gal(Ω/K)} (hg : M.ρ g = 1) : (M.torsion ℓ).ρ g = 1 := |
| 420 | LinearMap.ext fun a ↦ Subtype.ext (LinearMap.congr_fun hg (a : M)) |
| 421 | -- The numbers of Selmer cocycles of `M[ℓ]` and of its allowed local cocycles at `v`. |
| 422 | let sel : ℕ := Nat.card (selmerZ1 _ D.localPrimes D.place (D.allowedTorsion ℓ) (Set.range s'.v)) |
| 423 | let loc (v : FinPlace K) : ℕ := Nat.card ↥(D.allowedTorsion ℓ v ⊓ |
| 424 | Z1 ((M.torsion ℓ).restrictTo (decompGroup Gal(Ω/K) (D.place v))).ρ) |
| 425 | have h_selmer : sel * ℓ ^ (#D.localPrimes + card (InfinitePlace K)) ≤ |
| 426 | ℓ ^ (card ι + 3) * ∏ v ∈ D.localPrimes, loc v := by |
| 427 | simpa only [h_card] using selmerZ1.card_mul_pow_le (fun g hg ↦ triv (D.unramified g hg)) |
| 428 | D.isPlaceOver (D.allowedTorsion ℓ) |
| 429 | (fun v hv ↦ Set.range_subset_iff.2 fun a ↦ D.coboundary_le v hv ⟨a.val, rfl⟩) |
| 430 | (fun hc ↦ triv (D.ρ_eq_one_of_isComplexConj hc)) s' h_few hS |
| 431 | set t : ℕ := Nat.card (Submodule.torsionBy ℕ (D.cocycles (Set.range s.v)) ℓ) |
| 432 | set k : ℕ := #{v ∈ D.localPrimes | ↑ℓ ∉ v.asIdeal} |
| 433 | set k' : ℕ := #{v ∈ D.localPrimes | ¬↑ℓ ∉ v.asIdeal} |
| 434 | have h_prod : ∏ v ∈ D.localPrimes, loc v ≤ ℓ ^ k' := by |
| 435 | unfold loc |
| 436 | grw [D.card_allowedTorsion_le hκ hκ_four h_allowed, h_card] |
| 437 | simp [prod_ite, k'] |
| 438 | have h_split : k + k' = #D.localPrimes := D.localPrimes.card_filter_add_card_filter_not (↑ℓ ∉ ·.1) |
| 439 | refine Nat.le_of_mul_le_mul_right ?_ (pow_pos (NeZero.pos ℓ) (k' + 3)) |
| 440 | calc t * ℓ ^ (k + 1) * ℓ ^ (k' + 3) = t * ℓ ^ (k + k' + 4) := by ring |
| 441 | _ ≤ sel * ℓ ^ (#D.localPrimes + card (InfinitePlace K)) := |
| 442 | Nat.mul_le_mul (D.card_torsionBy_cocycles_le h_range (Set.finite_range _)) |
| 443 | (Nat.pow_le_pow_right (NeZero.pos ℓ) (by omega)) |
| 444 | _ ≤ ℓ ^ (card ι + 3) * ℓ ^ k' := by grw [h_selmer, h_prod] |
| 445 | _ = ℓ ^ card ι * ℓ ^ (k' + 3) := by ring |
| 446 | |
| 447 | end Procyclic |
| 448 | |
| 449 | /-- Relations modulo `ℓ`. Let `ℓ ∣ m`, and let `M[ℓ]` have order `ℓ`. Let `κ` be a continuous |
| 450 | character with values in `1 + 4 ℤ_ℓ` (so its image is procyclic) whose kernel lies in `U ∪ U c⁻¹`. |
| 451 | Let the local condition be zero at the primes not above `ℓ` and vanishing on `ker κ` above `ℓ`. If |
| 452 | `K` has at least four infinite places, then for some `T ⊇ S` the reductions modulo `ℓ` of the |
| 453 | relations off `T` form a group of order at least `ℓ ^ (k + 1)`, where `k` counts the primes of `S` |
| 454 | not above `ℓ`. A relation off `T` is a continuous equivariant map from `U` to `M* = Hom(M, ℚ/ℤ)`, |
| 455 | unramified outside `T`, whose Frobenius values give linear relations among cocycle values at tame |
| 456 | generators. This is weaker than the count given by the formula of Greenberg and Wiles, which grows |
| 457 | with the number of infinite places; here only four of these places are used. -/ |
| 458 | theorem exists_pow_le_card_reductions [Finite M] (hm : ℓ ∣ m) |
| 459 | (h_places : 4 ≤ card (InfinitePlace K)) {κ : Gal(Ω/K) →* ℤ_[ℓ]ˣ} (hκ : Continuous κ) |
| 460 | (hκ_four : ∀ g : Gal(Ω/K), 4 ∣ (κ g).val - 1) {c : Gal(Ω/K)} |
| 461 | (hU : ∀ g : Gal(Ω/K), κ g = 1 → g ∈ D.subgroup ∨ g * c ∈ D.subgroup) |
| 462 | (h_card : Nat.card {a : M // ℓ • a = 0} = ℓ) |
| 463 | (h_allowed : ∀ v : FinPlace K, |
| 464 | D.allowed v = .pi {g : decompGroup Gal(Ω/K) (D.place v) | ↑ℓ ∈ v.asIdeal → κ g = 1} ⊥) : |
| 465 | open Classical in |
| 466 | ∃ T : Finset (FinPlace K), D.localPrimes ⊆ T ∧ |
| 467 | ℓ ^ (#{v ∈ D.localPrimes | ↑ℓ ∉ v.asIdeal} + 1) ≤ Nat.card (D.reductions ℓ T) := by |
| 468 | classical |
| 469 | -- A family of split primes whose Frobenius elements detect roots, such that every family of |
| 470 | -- characters that kills the values of the cocycles at the `γ i` comes from a relation off `T`. |
| 471 | obtain ⟨q, _, ι, _, I, s, γ, T, hS, hST, -, h_detect, -, h_forms⟩ := |
| 472 | D.exists_splitPlaces_forall_exists_mem_relations D.avoids_one |
| 473 | set t : ℕ := Nat.card (Submodule.torsionBy ℕ (D.cocycles (Set.range s.v)) ℓ) |
| 474 | have h_few : t * ℓ ^ (#{v ∈ D.localPrimes | ↑ℓ ∉ v.asIdeal} + 1) ≤ ℓ ^ card ι := |
| 475 | D.card_torsionBy_cocycles_mul_pow_le hκ hκ_four hm h_places hU h_card h_allowed hS s h_detect |
| 476 | have h_many : ℓ ^ card ι ≤ Nat.card (D.reductions ℓ T) * t := by |
| 477 | simpa only [h_card] using D.pow_le_card_reductions_mul ℓ (Set.finite_range s.v) h_forms |
| 478 | have t_pos : 0 < t := Nat.pos_of_mul_pos_left ((pow_pos (NeZero.pos ℓ) _).trans_le h_many) |
| 479 | exact ⟨T, hST, Nat.le_of_mul_le_mul_left (h_few.trans (h_many.trans_eq (mul_comm _ _))) t_pos⟩ |
| 480 | |
| 481 | end RelationSetting |
| 482 | |
| 483 | end New |
| 484 | |
| 485 | end |