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 | public import Lib.ClassField.GaloisCohomology.TameSelmerCocycles |
| 4 | public import Lib.ClassField.GreenbergWiles.SelmerLevels |
| 5 | public import New.Congruences.Selmer.AuxiliaryPrimes |
| 6 | import Lib.ClassField.Global.AlbertBrauerHasseNoether |
| 7 | import Lib.General.NumberTheory.CoefficientRings |
| 8 | import TauCeti.RepresentationTheory.Homological.GroupCohomology.Sah |
| 9 | |
| 10 | /-! |
| 11 | # Selmer data, tied Selmer groups and classes as functions |
| 12 | |
| 13 | A lattice `T` is given by matrices `ρ g` over `O`, and `W = (O / a) ^ n` is its reduction modulo |
| 14 | `a`. The datum includes an element `γ_*` of the Galois group that acts on `T` by a scalar `ζ_*` |
| 15 | with `ζ_* ^ 2 - 1` a unit. A class in `H¹(E, W)` is identified with its cocycle that vanishes at |
| 16 | `γ_*`. |
| 17 | |
| 18 | * `New.Selmer.finite_selmerModule`: for finite `S` and `ρ` locally constant modulo `ℓ ^ M`, the |
| 19 | Selmer module with coefficients in a finite `O / a`, `a ∣ ℓ ^ M`, is finite. |
| 20 | * `New.Selmer.SelmerDatum`: a lattice with modules `Z_w` of local cocycles above `ℓ`; |
| 21 | `New.Selmer.SelmerDatum.β` is the sum of a global term and local terms. |
| 22 | * `New.Selmer.SelmerDatum.localRelations`, |
| 23 | `New.Selmer.SelmerDatum.length_localCocycles_le_finrank_mul`: the linear relations that hold on |
| 24 | the `Z_w`, and the length of the local cocycles that obey them. |
| 25 | * `New.Selmer.SelmerDatum.tiedSelmer`: the classes with ties at auxiliary primes. |
| 26 | * `New.Selmer.IsNewAuxiliaryPrime`: the primes that may be added. |
| 27 | * `New.Selmer.SelmerDatum.sahGroup`, `New.Selmer.SelmerDatum.span_image_sahGroup_eq_top`: the group |
| 28 | `H` generated by commutators with `γ_*` and `γ_*^c`, on which classes are detected. |
| 29 | * `New.Selmer.congruenceTerm_le`: a bound for the global term from one element that acts by scalars. |
| 30 | |
| 31 | Notions from other files: |
| 32 | * `New.Selmer.IsTiedPrimes`: a set `J` of auxiliary primes ("tied primes") with places, Frobenius |
| 33 | elements `φ`, tame generators `γ`, characters to `ℤ / ℓ ^ N` and slopes, and a first prime |
| 34 | `P₀ ∈ J`. |
| 35 | * `New.IsAuxPrimeDataAt`: for auxiliary data at a prime `P`, says that they consist of a place |
| 36 | over `P`, a Frobenius, the tame generator `γ` and a character with value `1` at `γ` that is |
| 37 | unramified outside `P` and its conjugate and kills the decomposition groups above a given set. |
| 38 | * `New.idOrConjInv`: `g` if `b` is true, and `g^{-c} = (conjGal g)⁻¹` if `b` is false. |
| 39 | |
| 40 | ## Relation to the literature |
| 41 | |
| 42 | Known result: Sah's lemma, by which cocycles vanishing at an element that acts by a scalar `ζ` with |
| 43 | `ζ - 1` a unit are detected on commutators. |
| 44 | |
| 45 | See `New.Congruences.Selmer.Descent` for related work. |
| 46 | -/ |
| 47 | |
| 48 | @[expose] public section |
| 49 | |
| 50 | noncomputable section |
| 51 | |
| 52 | namespace New.Selmer |
| 53 | |
| 54 | section Finite |
| 55 | |
| 56 | open Module Matrix.Module |
| 57 | |
| 58 | variable {E n O : Type} [Field E] [EmbeddedNumberField E] [Fintype n] [DecidableEq n] [CommRing O] |
| 59 | {ℓ M : ℕ} {ρ : Gal(Ω/E) →* Matrix n n O} {S : Set (FinPlace E)} |
| 60 | |
| 61 | /-- Let `E` be a number field embedded in the algebraic closure `Ω` of `ℚ`, let `ρ` be a |
| 62 | representation of `Gal(Ω/E)` by matrices over `O` that is locally constant modulo `ℓ ^ M`, and let |
| 63 | `S` be a finite set of primes of `E`. Let `a ∣ ℓ ^ M` with `QuotSpan a = O / a` finite, and let `L` |
| 64 | be a set of relations `∑ γ, f γ • c γ = 0` on functions `c`. Then the Selmer module of `ρ` with |
| 65 | coefficients in `O / a` is finite. -/ |
| 66 | theorem finite_selmerModule {a : O} [Finite (QuotSpan a)] (ha : a ∣ ℓ ^ M) |
| 67 | (hρ : IsLocallyConstant (reduceModPow ℓ M ρ)) (hS : S.Finite) |
| 68 | (L : Set (Gal(Ω/E) →₀ Matrix n n O)) : Finite (selmerModule ρ S L (QuotSpan a)) := by |
| 69 | let : TopologicalSpace (QuotSpan a) := ⊥ |
| 70 | have : DiscreteTopology (QuotSpan a) := ⟨rfl⟩ |
| 71 | -- The ring `O / ℓ ^ M` acts on `O / a`, so `ρ` acts through its reduction, hence continuously. |
| 72 | let : Module (QuotSpan (ℓ ^ M : O)) (QuotSpan a) := |
| 73 | Module.IsTorsionBy.module (smul_quot_eq_zero_of_dvd ha) |
| 74 | have h_cont (b : n → QuotSpan a) : IsLocallyConstant fun g : Gal(Ω/E) ↦ ρ g • b := |
| 75 | hρ.comp fun m : Matrix n n (QuotSpan (ℓ ^ M : O)) ↦ m • b |
| 76 | let V : DiscreteModule O Gal(Ω/E) := .of (actionRep O (n → QuotSpan a) ρ) |
| 77 | (continuous_prod_of_discrete_right.2 fun b ↦ (h_cont b).continuous) |
| 78 | -- The Selmer module lies in the finite set of cocycles in `V` unramified outside `S`. |
| 79 | change (selmerModule ρ S L (QuotSpan a) : Set (Gal(Ω/E) → n → QuotSpan a)).Finite |
| 80 | refine (finite_cocycles_unramified_outside V hS).subset fun z hz ↦ ?_ |
| 81 | obtain ⟨h_cocycle, h_unr, -, h_const⟩ := mem_selmerModule_iff.1 hz |
| 82 | exact ⟨⟨h_const.continuous, h_cocycle⟩, fun v hv A hA g hg ↦ h_unr g ⟨v, hv, A, hA, hg⟩⟩ |
| 83 | |
| 84 | end Finite |
| 85 | |
| 86 | section Data |
| 87 | |
| 88 | /-! ### Selmer data and tied Selmer groups -/ |
| 89 | |
| 90 | open IsDiscreteValuationRing Module Matrix.Module |
| 91 | |
| 92 | variable (ℓ : ℕ) [ThePrime ℓ] {E : Type} [Field E] [EmbeddedNumberField E] [NumberField.IsCMField E] |
| 93 | |
| 94 | section Terms |
| 95 | |
| 96 | variable {O n : Type} [CommRing O] [PadicIntegerRing O ℓ] [Fintype n] [DecidableEq n] |
| 97 | (ρ : Gal(Ω/E) →* Matrix n n O) |
| 98 | |
| 99 | /-- The module `Hom_G(W, W^{*c})` for `G = Gal(Ω/E)` acting on `W = (O / a) ^ n` by the matrices |
| 100 | `ρ g`. The dual `W^*` is the character module of `W`, on which `g` acts by `y ↦ cyc(g) · y ∘ g⁻¹` |
| 101 | for the `ℓ`-adic cyclotomic character `cyc`; on `W^{*c}` the element `g` acts as its conjugate |
| 102 | `g^c = conjGal g` under complex conjugation. -/ |
| 103 | def conjDualHom (a : O) : |
| 104 | Submodule O ((n → QuotSpan a) →ₗ[O] CharacterModule (n → QuotSpan a)) where |
| 105 | carrier := {η : (n → QuotSpan a) →ₗ[O] CharacterModule (n → QuotSpan a) | |
| 106 | ∀ (g : Gal(Ω/E)) (u m : n → QuotSpan a), |
| 107 | η (ρ g • u) m = η u ((cyclotomicCharIn O Ω ℓ (conjGal g) : O) • ρ (conjGal g)⁻¹ • m)} |
| 108 | zero_mem' _ _ _ := rfl |
| 109 | add_mem' {η η'} hη hη' g u m := by |
| 110 | change η (ρ g • u) m + η' (ρ g • u) m = η u _ + η' u _ |
| 111 | rw [hη g u m, hη' g u m] |
| 112 | smul_mem' t η hη g u m := by simpa [smul_comm t] using hη g u (t • m) |
| 113 | |
| 114 | /-- The global term of the lattice `O ^ n` with the action `ρ` of `G = Gal(Ω/E)`: the supremum |
| 115 | over `a ≠ 0` of the lengths of the modules `Hom_G(W, W^{*c})` for `W = (O / a) ^ n` |
| 116 | (`conjDualHom`). -/ |
| 117 | def congruenceTerm : ℕ∞ := ⨆ (a : O) (_ : a ≠ 0), length O (conjDualHom ℓ ρ a) |
| 118 | |
| 119 | /-- The local term at a place `v` (used for `v` prime to `ℓ`): the supremum over `a ≠ 0` of the |
| 120 | excess of the length of `localCocycles` (restrictions to the decomposition group of global |
| 121 | cocycles, with no condition) over the length of `W = (O / a) ^ n`. For all cocycles of the |
| 122 | decomposition group the excess is the length of `H⁰(E_v, W^*)`, by the local Euler characteristic |
| 123 | formula and local duality. -/ |
| 124 | def localTerm (v : FinPlace E) : ℕ∞ := |
| 125 | ⨆ (a : O) (_ : a ≠ 0), |
| 126 | length O (localCocycles ρ ∅ (placeOver v) (QuotSpan a)) - length O (n → QuotSpan a) |
| 127 | |
| 128 | open scoped Classical in |
| 129 | /-- The sum of the local terms `localTerm ρ v` over the places `v` of `S` prime to `ℓ`. -/ |
| 130 | def placeTerms (S : Finset (FinPlace E)) : ℕ∞ := |
| 131 | ∑ v ∈ S with v ∉ placesDividing E ℓ, localTerm ρ v |
| 132 | |
| 133 | /-- The sum of `v(det(ρ g - 1))` over `g = g₀` and `g = g₀^{-c} = (conjGal g₀)⁻¹`, where `v` is the |
| 134 | valuation of `O`. -/ |
| 135 | def firstPrimeTerms (g₀ : Gal(Ω/E)) : ℕ∞ := |
| 136 | ∑ b : Bool, addVal O (ρ (idOrConjInv b g₀) - 1).det |
| 137 | |
| 138 | end Terms |
| 139 | |
| 140 | /-- A Selmer datum for the set `S₀` of places and the element `g₀`: an action `ρ` on the lattice |
| 141 | `T = O ^ n`, a set `S = places` of places outside which `T` is unramified, a module `Z_w` of local |
| 142 | maps for each `w ∣ ℓ`, and an element `γ_*` that acts by a scalar. The set `S` lies in `S₀`, and |
| 143 | `g₀` enters only through the local terms `v(det(ρ g - 1))` for `g = g₀, g₀^{-c}`, which are |
| 144 | finite. -/ |
| 145 | structure SelmerDatum (S₀ : Finset (FinPlace E)) (g₀ : Gal(Ω/E)) (O : Type) [CommRing O] |
| 146 | [PadicIntegerRing O ℓ] (n : Type) [Fintype n] [DecidableEq n] where |
| 147 | /-- The rank of `T` is at least `1`. -/ |
| 148 | nonempty : Nonempty n |
| 149 | /-- The action on the lattice `T = O ^ n`. -/ |
| 150 | ρ : Gal(Ω/E) →* Matrix n n O |
| 151 | /-- The action is continuous: its reductions modulo powers of `ℓ` are locally constant. -/ |
| 152 | isLocallyConstant (M : ℕ) : IsLocallyConstant (reduceModPow ℓ M ρ) |
| 153 | /-- The set `S` of places where `T` may ramify. -/ |
| 154 | places : Finset (FinPlace E) |
| 155 | /-- `S` lies in `S₀`. -/ |
| 156 | subset : places ⊆ S₀ |
| 157 | /-- `S` contains the places above `ℓ`. -/ |
| 158 | placesDividing_subset : placesDividing E ℓ ⊆ places |
| 159 | /-- `T` is unramified outside `S`. -/ |
| 160 | unramified : ∀ g ∈ inertiaAbove placesᶜ, ρ g = 1 |
| 161 | /-- The module `Z_w` of maps from the decomposition group at `w ∣ ℓ` to `T`. -/ |
| 162 | Z (w : placesDividing E ℓ) : Submodule O (decompGroup Gal(Ω/E) (placeOver w.val) → n → O) |
| 163 | /-- `Z_w` is finitely generated. -/ |
| 164 | finite_Z (w : placesDividing E ℓ) : Module.Finite O (Z w) |
| 165 | /-- `Z_w` contains the coboundaries. -/ |
| 166 | coboundary_mem_Z (w : placesDividing E ℓ) (b : n → O) : |
| 167 | (fun g : decompGroup Gal(Ω/E) (placeOver w.val) ↦ ρ g • b - b) ∈ Z w |
| 168 | /-- `T / ϖ` is absolutely irreducible, in Burnside's form: the matrices `ρ g` span all |
| 169 | matrices. -/ |
| 170 | span_range_eq_top : Submodule.span O (Set.range ρ) = ⊤ |
| 171 | /-- `∑ (rk Z_w - r') ≤ f r'`, summed over `w ∣ ℓ`, where `r'` is the rank of `T` and `f` is the |
| 172 | number of infinite places. -/ |
| 173 | sum_finrank_Z_le : ∑ w : placesDividing E ℓ, finrank O (Z w) ≤ |
| 174 | (Fintype.card (placesDividing E ℓ) + Core.numInfPlaces E) * Fintype.card n |
| 175 | /-- The global term is finite. -/ |
| 176 | congruenceTerm_ne_top : congruenceTerm ℓ ρ ≠ ⊤ |
| 177 | /-- The sum of the local terms is finite. -/ |
| 178 | localTerms_ne_top : placeTerms ℓ ρ places + firstPrimeTerms ℓ ρ g₀ ≠ ⊤ |
| 179 | /-- The element `γ_*`. -/ |
| 180 | γ : Gal(Ω/E) |
| 181 | /-- The scalar `ζ_*`. -/ |
| 182 | ζ : O |
| 183 | /-- `γ_*` is inertial at a place of `S` prime to `ℓ`. -/ |
| 184 | γ_mem_inertiaAbove : γ ∈ inertiaAbove (places \ placesDividing E ℓ) |
| 185 | /-- `γ_*` and `γ_*^{-c}` act on `T` by the scalar `ζ_*`. -/ |
| 186 | ρ_eq_smul_one (b : Bool) : ρ (idOrConjInv b γ) = ζ • 1 |
| 187 | /-- `ζ_* ^ 2 - 1` is a unit. -/ |
| 188 | isUnit_sq_sub_one : IsUnit (ζ ^ 2 - 1) |
| 189 | |
| 190 | end Data |
| 191 | |
| 192 | namespace SelmerDatum |
| 193 | |
| 194 | open IsDiscreteValuationRing Module Matrix.Module |
| 195 | |
| 196 | variable {ℓ : ℕ} [ThePrime ℓ] {E : Type} [Field E] [EmbeddedNumberField E] [NumberField.IsCMField E] |
| 197 | {S₀ : Finset (FinPlace E)} {g₀ : Gal(Ω/E)} {O n : Type} [CommRing O] [PadicIntegerRing O ℓ] |
| 198 | [Fintype n] [DecidableEq n] (T : SelmerDatum ℓ S₀ g₀ O n) |
| 199 | |
| 200 | /-- The global term of the datum `T`: the supremum over `a ≠ 0` of the lengths of |
| 201 | `Hom_G(W, W^{*c})` for `W = (O / a) ^ n` with the action `T.ρ`. -/ |
| 202 | abbrev globalTerm : ℕ∞ := congruenceTerm ℓ T.ρ |
| 203 | |
| 204 | /-- The sum of the local terms of the datum `T` at the places of `T.places` prime to `ℓ`. -/ |
| 205 | abbrev placesTerm : ℕ∞ := placeTerms ℓ T.ρ T.places |
| 206 | |
| 207 | /-- The sum of the valuations of `det(T.ρ g - 1)` over `g = g₀` and `g = g₀^{-c}`. -/ |
| 208 | abbrev firstPrimeTerm : ℕ∞ := firstPrimeTerms ℓ T.ρ g₀ |
| 209 | |
| 210 | /-- The sum of all local terms of the datum `T`: those at places and those from `g₀`. -/ |
| 211 | abbrev localTerms : ℕ∞ := T.placesTerm + T.firstPrimeTerm |
| 212 | |
| 213 | /-- The number `β_T`: the global term of the datum `T` plus all its local terms. -/ |
| 214 | def β : ℕ∞ := T.globalTerm + T.localTerms |
| 215 | |
| 216 | lemma β_ne_top : T.β ≠ ⊤ := WithTop.add_ne_top.2 ⟨T.congruenceTerm_ne_top, T.localTerms_ne_top⟩ |
| 217 | |
| 218 | lemma isUnit_ζ_sub_one : IsUnit (T.ζ - 1) := |
| 219 | isUnit_of_mul_isUnit_right (x := T.ζ + 1) |
| 220 | (by simpa [sq, mul_self_sub_one] using T.isUnit_sq_sub_one) |
| 221 | |
| 222 | /-- The local conditions of the datum `T` as linear equations that do not depend on the |
| 223 | coefficients: the relations `∑ j, a j • z (g j) = 0`, with matrices `a j` and with `g j` in the |
| 224 | decomposition group at some `w ∣ ℓ`, that hold for all `z` in `Z_w = T.Z w`. -/ |
| 225 | def localRelations : Set (Gal(Ω/E) →₀ Matrix n n O) := |
| 226 | ⋃ w : placesDividing E ℓ, Finsupp.mapDomain Subtype.val '' relationsOn (T.Z w) |
| 227 | |
| 228 | /-- A function `c` with values in `B ^ n` obeys a relation `f`, a finitely supported function to |
| 229 | matrices over `O`, if `∑ g, f g • c g = 0`, where a matrix multiplies a column vector. It obeys |
| 230 | the local conditions `T.localRelations` if and only if, at each `w ∣ ℓ`, its restriction to the |
| 231 | decomposition group obeys all the relations that the members of `Z_w = T.Z w` obey |
| 232 | (`relationsOn`). -/ |
| 233 | lemma mem_obeying_localRelations_iff {B : Type} [AddCommGroup B] [Module O B] |
| 234 | {c : Gal(Ω/E) → n → B} : |
| 235 | c ∈ obeying T.localRelations B ↔ ∀ w : placesDividing E ℓ, |
| 236 | (fun g : decompGroup Gal(Ω/E) (placeOver w.val) ↦ c g) ∈ obeying (relationsOn (T.Z w)) B := by |
| 237 | -- A relation pushed forward by `Finsupp.mapDomain` is evaluated on the restriction of `c`. |
| 238 | simp [localRelations, obeying, forall_comm (α := _ →₀ _), Function.comp_def] |
| 239 | |
| 240 | /-- Let the Galois group act on `(O / a) ^ n` by the matrices `T.ρ g` of the Selmer datum `T`. The |
| 241 | coboundary `g ↦ g b - b` of a vector `b` obeys the local conditions `T.localRelations`, the linear |
| 242 | relations that hold on the modules `Z_w = T.Z w` of local cocycles at `w ∣ ℓ`: it lifts to a |
| 243 | coboundary with values in `O ^ n`, which lies in each `Z_w`. -/ |
| 244 | lemma coboundary_mem_obeying_localRelations (a : O) (b : n → QuotSpan a) : |
| 245 | (fun g : Gal(Ω/E) ↦ T.ρ g • b - b) ∈ obeying (O := O) T.localRelations (QuotSpan a) := by |
| 246 | refine T.mem_obeying_localRelations_iff.2 fun w ↦ ?_ |
| 247 | have h_lift (k : n) : ∃ c : O, Ideal.Quotient.mk _ c = b k := Ideal.Quotient.mk_surjective _ |
| 248 | choose c hc using h_lift |
| 249 | have h_red (g : decompGroup Gal(Ω/E) (placeOver w.val)) : |
| 250 | T.ρ g • b - b = fun k : n ↦ (Ideal.span {a}).mkQ ((T.ρ g • c - c) k) := by |
| 251 | ext k |
| 252 | simp [Matrix.Module.smul_apply, hc, Algebra.smul_def] |
| 253 | simpa only [h_red] using mkQ_mem_obeying_relationsOn _ (T.coboundary_mem_Z w c) |
| 254 | |
| 255 | /-- Let `T` be a Selmer datum and `w ∣ ℓ` a place. The restrictions to the decomposition group at |
| 256 | `w` of the cocycles for `T.ρ` with values in `(O / a) ^ n` that obey the local conditions |
| 257 | `T.localRelations` form a module of length at most `rk (T.Z w) · len (O / a)`. -/ |
| 258 | lemma length_localCocycles_le_finrank_mul (a : O) (w : placesDividing E ℓ) : |
| 259 | length O (localCocycles T.ρ T.localRelations (placeOver w.val) (QuotSpan a)) ≤ |
| 260 | finrank O (T.Z w) * length O (QuotSpan a) := by |
| 261 | have : Module.Finite O (T.Z w) := T.finite_Z w |
| 262 | have : Nonempty n := T.nonempty |
| 263 | refine (length_mono ?_).trans (length_obeying_relationsOn_le (Z := T.Z w)) |
| 264 | -- A local cocycle that obeys `T.localRelations` obeys the relations that hold on `Z_w`. |
| 265 | rintro _ ⟨z, hz, rfl⟩ |
| 266 | obtain ⟨-, -, h_obey, -⟩ := mem_selmerModule_iff.1 hz |
| 267 | exact T.mem_obeying_localRelations_iff.1 h_obey w |
| 268 | |
| 269 | /-- The local conditions of `T` together with vanishing at `γ_* = T.γ`, which picks one cocycle in |
| 270 | each cohomology class. -/ |
| 271 | def classRelations : Set (Gal(Ω/E) →₀ Matrix n n O) := T.localRelations ∪ {Finsupp.single T.γ 1} |
| 272 | |
| 273 | /-- The tied Selmer group modulo `a`: the locally constant cocycles `z` with values in |
| 274 | `(O / a) ^ n` that vanish at `γ_*`, are unramified outside `T.places ∪ R ∪ R̄`, obey the local |
| 275 | conditions `T.localRelations`, and satisfy the ties `z(γ_v) = s • z(φ_v)` and |
| 276 | `z(γ_v^{-c}) = s • z(φ_v^{-c})` for `v ∈ J` (`tieRelations`). Here `γ_v` and `φ_v` are the tame |
| 277 | generator and the Frobenius element in the data `(x v).1`, which also hold a character to `ℤ / q`, |
| 278 | and `s = (x v).2 i` is the slope of datum `i`. It is used for `R = J`, and for `R = J ∪ {P}`, where |
| 279 | there is no condition at `P` and `P̄`. -/ |
| 280 | def tiedSelmer {ι : Type} {q : ℕ} (R J : Finset (FinPlace E)) |
| 281 | (x : FinPlace E → AuxPrimeData E q × (ι → O)) (i : ι) (a : O) : |
| 282 | Submodule O (Gal(Ω/E) → n → QuotSpan a) := |
| 283 | selmerModule T.ρ (unionWithConj T.places R) (T.classRelations ∪ tieRelations J x i) (QuotSpan a) |
| 284 | |
| 285 | /-- The members of a tied Selmer group, which are cocycles with values in `(O / a) ^ n`, vanish at |
| 286 | the element `γ_*` of `T`: this is one of the defining relations. -/ |
| 287 | lemma apply_γ_eq_zero {ι : Type} {q : ℕ} {R J : Finset (FinPlace E)} |
| 288 | {x : FinPlace E → AuxPrimeData E q × (ι → O)} {i : ι} {a : O} |
| 289 | {z : Gal(Ω/E) → n → QuotSpan a} (hz : z ∈ T.tiedSelmer R J x i a) : z T.γ = 0 := by |
| 290 | obtain ⟨-, -, h_obey, -⟩ := mem_selmerModule_iff.1 hz |
| 291 | simpa using mem_obeying.1 h_obey (Finsupp.single T.γ 1) (by simp [classRelations]) |
| 292 | |
| 293 | end SelmerDatum |
| 294 | |
| 295 | section Values |
| 296 | |
| 297 | /-! ### Values at conjugate elements, and Selmer cocycles -/ |
| 298 | |
| 299 | open Matrix.Module |
| 300 | |
| 301 | variable {E n O B : Type} [Field E] [EmbeddedNumberField E] [NumberField.IsCMField E] |
| 302 | [CommRing O] [CommRing B] [Algebra O B] |
| 303 | |
| 304 | /-- The values of a function at `g` (coordinates `(true, i)`) and at `g^{-c} = (conjGal g)⁻¹` |
| 305 | (coordinates `(false, i)`). -/ |
| 306 | def evalConjPair (g : Gal(Ω/E)) : (Gal(Ω/E) → n → B) →ₗ[O] Bool × n → B where |
| 307 | toFun z p := z (idOrConjInv p.1 g) p.2 |
| 308 | map_add' _ _ := rfl |
| 309 | map_smul' _ _ := rfl |
| 310 | |
| 311 | lemma evalConjPair_apply (g : Gal(Ω/E)) (z : Gal(Ω/E) → n → B) (p : Bool × n) : |
| 312 | evalConjPair (O := O) g z p = z (idOrConjInv p.1 g) p.2 := rfl |
| 313 | |
| 314 | /-- Let `z ∈ selmerModule ρ S L B`: a locally constant cocycle that is unramified outside `S` and |
| 315 | obeys the relations `L`. If `S ⊆ P ∪ Q` and `K ⊆ L`, then `z` is a Selmer cocycle (`New.selmerZ1`) |
| 316 | for the following conditions: unramified outside `P ∪ Q`, and for each `v ∈ P` the restriction to |
| 317 | the decomposition group at the chosen place `A v` is that of a cocycle obeying `K` |
| 318 | (`localCocycles`). -/ |
| 319 | lemma mem_selmerZ1_of_mem_selmerModule {E n O B : Type} [Field E] [EmbeddedNumberField E] |
| 320 | [NumberField.IsCMField E] [Fintype n] [CommRing O] [CommRing B] [Algebra O B] [DecidableEq n] |
| 321 | [TopologicalSpace B] [DiscreteTopology B] {ρ : Gal(Ω/E) →* Matrix n n O} |
| 322 | {S P Q : Set (FinPlace E)} {K L : Set (Gal(Ω/E) →₀ Matrix n n O)} {z : Gal(Ω/E) → n → B} |
| 323 | {A : FinPlace E → ClosurePlace} {hρ : Continuous (Function.uncurry |
| 324 | fun (g : Gal(Ω/E)) (b : n → B) ↦ actionRep O (n → B) ρ g b)} |
| 325 | (hz : z ∈ selmerModule ρ S L B) (hKL : K ⊆ L) (hS : S ⊆ P ∪ Q) : |
| 326 | z ∈ selmerZ1 (.of (actionRep O (n → B) ρ) hρ) P A |
| 327 | (fun v : FinPlace E ↦ localCocycles ρ K (A v) B) Q := by |
| 328 | -- `z` is unramified outside `S`, hence outside `P ∪ Q`. |
| 329 | obtain ⟨h_cocycle, h_unram, -, h_const⟩ := |
| 330 | mem_selmerModule_iff.1 (mem_selmerModule_of_subset hz .rfl hS) |
| 331 | refine ⟨⟨⟨h_const.continuous, h_cocycle⟩, h_unram⟩, fun v _ ↦ ?_, fun g hg ↦ ?_⟩ |
| 332 | · exact ⟨z, mem_selmerModule_of_subset hz hKL (Set.subset_univ S), rfl⟩ |
| 333 | · -- `E` is totally complex, so there is no complex conjugation in `Gal(Ω/E)`. |
| 334 | exact (IsComplexConj.false_of_isTotallyComplex hg).elim |
| 335 | |
| 336 | end Values |
| 337 | |
| 338 | section Eligible |
| 339 | |
| 340 | /-! ### New auxiliary primes -/ |
| 341 | |
| 342 | open Matrix Module Set |
| 343 | |
| 344 | variable {ℓ : ℕ} {E ι O : Type} [Field E] |
| 345 | [EmbeddedNumberField E] [NumberField.IsCMField E] [CommRing O] |
| 346 | {V : ι → Gal(Ω/E) → Prop} {W : Set Gal(Ω/E)} {S₀ J : Finset (FinPlace E)} {N : ℕ} |
| 347 | {P₀ : FinPlace E} {x : FinPlace E → AuxPrimeData E (ℓ ^ N) × (ι → O)} |
| 348 | |
| 349 | open scoped Classical in |
| 350 | variable (ℓ S₀ V P₀ J x) in |
| 351 | /-- The prime `P`, with the place, Frobenius element, tame generator and character to `ℤ / ℓ ^ N` |
| 352 | given by `l`, is a new auxiliary prime for datum `i` and the primes `J` chosen so far, of which `P₀` |
| 353 | is the first: it may be added to them with a nonzero slope for datum `i`. Here `(x v).1` are the |
| 354 | data of `v ∈ J`, `S₀` is the set of places to avoid, and `V i` is the property asked of the |
| 355 | Frobenius elements at the primes where datum `i` has a nonzero slope. -/ |
| 356 | structure IsNewAuxiliaryPrime (i : ι) (P : FinPlace E) (l : AuxPrimeData E (ℓ ^ N)) : Prop where |
| 357 | /-- `P` has degree one: its absolute norm `P.q` is a prime number. -/ |
| 358 | prime_norm : P.q.Prime |
| 359 | /-- `P` is a new prime. -/ |
| 360 | notMem : P ∉ J |
| 361 | /-- The conjugate of `P` is a new prime. -/ |
| 362 | star_notMem : star P ∉ J |
| 363 | /-- `P` lies outside `S₀`. -/ |
| 364 | notMem_bad : P ∉ S₀ |
| 365 | /-- The conjugate of `P` lies outside `S₀`. -/ |
| 366 | star_notMem_bad : star P ∉ S₀ |
| 367 | /-- `P` does not divide the absolute norm `P₀.q` of the first prime. -/ |
| 368 | notMem_placesDividing : P ∉ placesDividing E P₀.q |
| 369 | /-- The data `l` are auxiliary prime data at `P` (`IsAuxPrimeDataAt`) relative to every set of |
| 370 | places above `ℓ` and primes of `J` other than `P₀`; so the character of `P` vanishes on their |
| 371 | decomposition groups. -/ |
| 372 | anticyclotomic : ∀ X : Set (FinPlace E), X ⊆ ↑(J.erase P₀) ∪ placesDividing E ℓ → |
| 373 | IsAuxPrimeDataAt X P l |
| 374 | /-- The character of `P` vanishes at the Frobenius element of `P`. -/ |
| 375 | char_frob_eq_one : l.character l.frob = 1 |
| 376 | /-- The Frobenius element has value `1` under the character of `P₀` and `0` under the others. -/ |
| 377 | char_frob_eq_ite : ∀ v ∈ J, |
| 378 | (x v).1.character l.frob = if v = P₀ then Multiplicative.ofAdd 1 else 1 |
| 379 | /-- `V i` holds at the Frobenius element `φ` and at `φ^{-c}`. -/ |
| 380 | apply_idOrConjInv_frob (b : Bool) : V i (idOrConjInv b l.frob) |
| 381 | |
| 382 | open scoped Classical in |
| 383 | /-- Let `J` be a set of tied primes (`IsTiedPrimes`): primes of `E` outside `S₀`, no one of them |
| 384 | conjugate to another or to itself. Then for `v, w ∈ J` the character of `w` takes the value |
| 385 | `1 ∈ ℤ / ℓ ^ N` at the tame generator of `v` if `w = v`, and the value `0` otherwise. -/ |
| 386 | lemma IsTiedPrimes.character_tameGenerator_eq_ite (hJ : IsTiedPrimes ℓ S₀ V W N P₀ J x) |
| 387 | {v : FinPlace E} (hv : v ∈ J) (w : FinPlace E) (hw : w ∈ J) : |
| 388 | (x w).1.character (x v).1.tameGenerator = if w = v then Multiplicative.ofAdd 1 else 1 := by |
| 389 | obtain ⟨h_inertia, h_char, -⟩ := (hJ.isAuxPrimeDataAt v hv).tame_gen |
| 390 | split_ifs with h_eq |
| 391 | · rw [h_eq, h_char] |
| 392 | · -- The character of `w` is unramified at `v`, as `v` is neither `w` nor its conjugate. |
| 393 | have h_notMem : v ∈ (Set.conjClosure ({w} : Set (FinPlace E)))ᶜ := by |
| 394 | grind [IsAuxiliary, star_star, hJ.auxiliary] |
| 395 | exact (hJ.isAuxPrimeDataAt w hw).eq_one_of_mem_inertiaAbove _ |
| 396 | ⟨v, h_notMem, (x v).1.place, (hJ.isAuxPrimeDataAt v hv).isPlaceOver, h_inertia⟩ |
| 397 | |
| 398 | open scoped Classical in |
| 399 | /-- A new auxiliary prime `P` with data `l` may be added to a set `J` of tied primes, with slope `t` |
| 400 | for datum `i` and slope `0` for the other data: the result is again a set of tied primes with first |
| 401 | prime `P₀`. -/ |
| 402 | lemma IsTiedPrimes.insert_of_isNewAuxiliaryPrime [DecidableEq ι] |
| 403 | (hp : IsTiedPrimes ℓ S₀ V W N P₀ J x) {i : ι} {P : FinPlace E} {l : AuxPrimeData E (ℓ ^ N)} |
| 404 | (hl : IsNewAuxiliaryPrime ℓ V S₀ J P₀ x i P l) (t : O) : |
| 405 | IsTiedPrimes ℓ S₀ V W N P₀ (insert P J) (Function.update x P (l, Pi.single i t)) := by |
| 406 | have h_old (v : FinPlace E) (hv : v ∈ J) : Function.update x P (l, Pi.single i t) v = x v := |
| 407 | Function.update_of_ne (ne_of_mem_of_not_mem hv hl.notMem) _ _ |
| 408 | -- The new character kills the decomposition groups at the old primes other than `P₀`. |
| 409 | have h_split (v : FinPlace E) (hv : v ∈ J) (hv' : v ≠ P₀) : l.character (x v).1.frob = 1 := |
| 410 | (hl.anticyclotomic (J.erase P₀) subset_union_left).eq_one_of_mem_decompGroup (by simp [hv, hv']) |
| 411 | (hp.isAuxPrimeDataAt v hv).isPlaceOver (hp.isAuxPrimeDataAt v hv).isFrob.mem_decompGroup |
| 412 | have hP : P ≠ P₀ := (ne_of_mem_of_not_mem hp.first_mem hl.notMem).symm |
| 413 | constructor |
| 414 | case auxiliary => |
| 415 | have h_star : star P ≠ P := (hl.anticyclotomic _ Set.subset_union_right).star_ne |
| 416 | grind [star_star, IsNewAuxiliaryPrime, IsAuxiliary, hp.auxiliary] |
| 417 | case first_mem => exact Finset.mem_insert_of_mem hp.first_mem |
| 418 | case isAuxPrimeDataAt => |
| 419 | refine (Finset.forall_mem_insert ..).2 ⟨?_, fun v hv ↦ ?_⟩ |
| 420 | · simpa using hl.anticyclotomic _ Set.subset_union_right |
| 421 | · simpa [h_old v hv] using hp.isAuxPrimeDataAt v hv |
| 422 | case char_frob_eq_ite => |
| 423 | intro v hv hvP₀ w hw |
| 424 | rcases Finset.mem_insert.1 hv with rfl | hv' <;> rcases Finset.mem_insert.1 hw with rfl | hw' |
| 425 | · simp [hP, hl.char_frob_eq_one] |
| 426 | · simp [h_old w hw', hl.char_frob_eq_ite w hw'] |
| 427 | · simp [h_old v hv', hP, h_split v hv' hvP₀] |
| 428 | · simp [h_old v hv', h_old w hw', hp.char_frob_eq_ite v hv' hvP₀ w hw'] |
| 429 | case first_frob_mem => simpa [h_old P₀ hp.first_mem] using hp.first_frob_mem |
| 430 | case first_slope => simpa [h_old P₀ hp.first_mem] using hp.first_slope |
| 431 | case notMem_placesDividing => grind [hp.notMem_placesDividing, hl.notMem_placesDividing] |
| 432 | case frob_of_slope_ne_zero => |
| 433 | refine (Finset.forall_mem_insert ..).2 ⟨fun j hj ↦ ?_, fun v hv j hj ↦ ?_⟩ |
| 434 | · -- At the new prime the slope is nonzero for datum `i` only. |
| 435 | obtain rfl : j = i := of_not_not fun h_ne ↦ by simp [h_ne] at hj |
| 436 | simpa [idOrConjInv] using And.intro (hl.apply_idOrConjInv_frob true) |
| 437 | (hl.apply_idOrConjInv_frob false) |
| 438 | · simpa [h_old v hv] using hp.frob_of_slope_ne_zero v hv j (by simpa [h_old v hv] using hj) |
| 439 | |
| 440 | end Eligible |
| 441 | |
| 442 | section Sah |
| 443 | |
| 444 | /-! ### Classes as functions on the group `H` generated by commutators -/ |
| 445 | |
| 446 | open Matrix.Module Subgroup commutatorElement |
| 447 | |
| 448 | /-- If a matrix maps a set of vectors into its span, it maps the span into itself. -/ |
| 449 | lemma smul_mem_span_of_forall_smul_mem {O n B : Type} [CommRing O] [Fintype n] [DecidableEq n] |
| 450 | [AddCommGroup B] [Module O B] (A : Matrix n n O) {s : Set (n → B)} |
| 451 | (h : ∀ u ∈ s, A • u ∈ Submodule.span O s) {u : n → B} (hu : u ∈ Submodule.span O s) : |
| 452 | A • u ∈ Submodule.span O s := |
| 453 | (Submodule.span_le (p := (Submodule.span O s).comap (DistribSMul.toLinearMap O _ A))).2 h hu |
| 454 | |
| 455 | /-- Let `X` be a submodule of `(O / a) ^ n` that is stable under a set of matrices which spans all |
| 456 | matrices over `O`. If `X` contains a vector with a unit coordinate, it is the whole module. -/ |
| 457 | lemma eq_top_of_stable_of_isUnit {O n : Type} [CommRing O] [Fintype n] [DecidableEq n] {a : O} |
| 458 | {s : Set (Matrix n n O)} (hs : Submodule.span O s = ⊤) {X : Submodule O (n → QuotSpan a)} |
| 459 | (h_stable : ∀ B ∈ s, ∀ u ∈ X, B • u ∈ X) {u : n → QuotSpan a} (hu : u ∈ X) {j : n} |
| 460 | (hu_unit : IsUnit (u j)) : X = ⊤ := by |
| 461 | refine Submodule.eq_top_iff'.2 fun m ↦ ?_ |
| 462 | obtain ⟨w, hw⟩ := hu_unit.exists_left_inv |
| 463 | choose c hc using fun k ↦ Ideal.Quotient.mk_surjective (m k * w) |
| 464 | -- The matrix whose only nonzero column, the `j`-th, lifts `m / u j` takes `u` to `m`. |
| 465 | convert Submodule.span_induction (p := fun B _ ↦ B • u ∈ X) (fun B hB ↦ h_stable B hB u hu) |
| 466 | (by simp) (fun _ _ _ _ hB hC ↦ by simpa only [add_smul] using X.add_mem hB hC) |
| 467 | (fun t _ _ hB ↦ by simpa only [smul_assoc] using X.smul_mem t hB) |
| 468 | (Submodule.eq_top_iff'.1 hs (Matrix.of fun k k' ↦ if k' = j then c k else 0)) |
| 469 | ext k |
| 470 | simp [Matrix.Module.smul_apply, ite_smul, Algebra.smul_def (c k), hc, mul_assoc, hw] |
| 471 | |
| 472 | namespace SelmerDatum |
| 473 | |
| 474 | variable {ℓ : ℕ} [ThePrime ℓ] {E : Type} [Field E] [EmbeddedNumberField E] [NumberField.IsCMField E] |
| 475 | {S₀ : Finset (FinPlace E)} {g₀ : Gal(Ω/E)} {O n : Type} [CommRing O] [PadicIntegerRing O ℓ] |
| 476 | [Fintype n] [DecidableEq n] (T : SelmerDatum ℓ S₀ g₀ O n) |
| 477 | |
| 478 | /-- The element `γ_* = T.γ` acts on `T` by the scalar `ζ_* = T.ζ`. -/ |
| 479 | lemma ρ_γ : T.ρ T.γ = T.ζ • 1 := by simpa [idOrConjInv] using T.ρ_eq_smul_one true |
| 480 | |
| 481 | /-- The element `γ_*^{-c} = (conjGal T.γ)⁻¹` acts on `T` by the scalar `ζ_* = T.ζ`. -/ |
| 482 | lemma ρ_conjGal_γ_inv : T.ρ (conjGal T.γ)⁻¹ = T.ζ • 1 := by |
| 483 | simpa [idOrConjInv] using T.ρ_eq_smul_one false |
| 484 | |
| 485 | /-- The `ℓ`-adic cyclotomic character is `1` at `γ_* = T.γ`, which lies in an inertia group at a |
| 486 | place prime to `ℓ`. -/ |
| 487 | lemma cyclotomicChar_γ : cyclotomicChar Ω ℓ T.γ = 1 := by |
| 488 | obtain ⟨v, ⟨-, hvℓ⟩, A, hA, hγ⟩ := T.γ_mem_inertiaAbove |
| 489 | exact cyclotomicChar_eq_one_of_mem_inertiaAbove ⟨v, hvℓ, A, hA, hγ⟩ |
| 490 | |
| 491 | /-- The group `H` generated, as an abstract group, by the commutators `[g, γ_*]` and |
| 492 | `[g, γ_*^c]`, where `γ_* = T.γ` is the element of the datum that acts by a scalar and |
| 493 | `γ_*^c = conjGal T.γ` is its conjugate. -/ |
| 494 | def sahGroup : Subgroup Gal(Ω/E) := |
| 495 | closure (Set.range (fun g : Gal(Ω/E) ↦ ⁅g, T.γ⁆) ∪ Set.range fun g : Gal(Ω/E) ↦ ⁅g, conjGal T.γ⁆) |
| 496 | |
| 497 | lemma commutator_γ_mem (g : Gal(Ω/E)) : ⁅g, T.γ⁆ ∈ T.sahGroup := subset_closure (.inl ⟨g, rfl⟩) |
| 498 | |
| 499 | lemma commutator_conjGal_γ_mem (g : Gal(Ω/E)) : ⁅g, conjGal T.γ⁆ ∈ T.sahGroup := |
| 500 | subset_closure (.inr ⟨g, rfl⟩) |
| 501 | |
| 502 | /-- A subgroup that contains all commutators with `γ_* = T.γ` and with `γ_*^c = conjGal T.γ` |
| 503 | contains the group `T.sahGroup` that they generate. -/ |
| 504 | lemma sahGroup_le {K : Subgroup Gal(Ω/E)} (hγ : ∀ g : Gal(Ω/E), ⁅g, T.γ⁆ ∈ K) |
| 505 | (hγ' : ∀ g : Gal(Ω/E), ⁅g, conjGal T.γ⁆ ∈ K) : T.sahGroup ≤ K := |
| 506 | (closure_le K).2 (Set.union_subset (Set.range_subset_iff.2 hγ) (Set.range_subset_iff.2 hγ')) |
| 507 | |
| 508 | /-- The group `H = T.sahGroup` is normal, as `g' [g, δ] g'⁻¹ = [g' g, δ] [g', δ]⁻¹`. -/ |
| 509 | instance : T.sahGroup.Normal where |
| 510 | conj_mem h hh g' := by |
| 511 | have h_conj (g δ : Gal(Ω/E)) : MulAut.conj g' ⁅g, δ⁆ = ⁅g' * g, δ⁆ * ⁅g', δ⁆⁻¹ := by |
| 512 | simp [commutatorElement_def, mul_assoc] |
| 513 | refine T.sahGroup_le (K := T.sahGroup.comap (MulAut.conj g').toMonoidHom) (fun g ↦ ?_) |
| 514 | (fun g ↦ ?_) hh |
| 515 | all_goals simp only [mem_comap, MulEquiv.coe_toMonoidHom, h_conj] |
| 516 | · exact mul_mem (T.commutator_γ_mem _) (inv_mem (T.commutator_γ_mem g')) |
| 517 | · exact mul_mem (T.commutator_conjGal_γ_mem _) (inv_mem (T.commutator_conjGal_γ_mem g')) |
| 518 | |
| 519 | variable {T} |
| 520 | |
| 521 | /-- The group `T.sahGroup`, generated by the commutators with `T.γ` and its conjugate, is stable |
| 522 | under the conjugation `conjGal` by complex conjugation. -/ |
| 523 | lemma conjGal_mem_sahGroup {h : Gal(Ω/E)} (hh : h ∈ T.sahGroup) : conjGal h ∈ T.sahGroup := by |
| 524 | refine T.sahGroup_le (K := T.sahGroup.comap conjGal) ?_ ?_ hh <;> |
| 525 | simp [map_commutatorElement, commutator_γ_mem, commutator_conjGal_γ_mem] |
| 526 | |
| 527 | /-- Homomorphisms to commutative groups are trivial on `H = T.sahGroup`, which is generated by |
| 528 | commutators. -/ |
| 529 | lemma map_eq_one_of_mem_sahGroup {C : Type*} [CommGroup C] (χ : Gal(Ω/E) →* C) {h : Gal(Ω/E)} |
| 530 | (hh : h ∈ T.sahGroup) : χ h = 1 := by |
| 531 | refine T.sahGroup_le (K := χ.ker) ?_ ?_ hh <;> |
| 532 | simp [map_commutatorElement, commutatorElement_eq_one_iff_mul_comm, mul_comm] |
| 533 | |
| 534 | /-- The group `H = T.sahGroup`, generated by commutators with `γ_* = T.γ` and its conjugate |
| 535 | `γ_*^c`, acts trivially through `T.ρ`, because `γ_*` and `γ_*^c` act by scalars. -/ |
| 536 | lemma ρ_eq_one_of_mem_sahGroup {h : Gal(Ω/E)} (hh : h ∈ T.sahGroup) : T.ρ h = 1 := by |
| 537 | have h_comm {δ : Gal(Ω/E)} (hδ : T.ρ δ = T.ζ • 1) (g : Gal(Ω/E)) : |
| 538 | Commute (T.ρ.toHomUnits g) (T.ρ.toHomUnits δ) := Units.ext (by simp [hδ]) |
| 539 | suffices h ∈ T.ρ.toHomUnits.ker by simpa [Units.ext_iff] using this |
| 540 | refine T.sahGroup_le (fun g ↦ ?_) (fun g ↦ ?_) hh <;> |
| 541 | rw [MonoidHom.mem_ker, map_commutatorElement, commutatorElement_eq_one_iff_commute] |
| 542 | · exact h_comm T.ρ_γ g |
| 543 | · exact (h_comm T.ρ_conjGal_γ_inv g).inv_right |
| 544 | |
| 545 | /-- Let `R` contain the places of `T.places` prime to `ℓ` and their conjugates. Then `T.sahGroup`, |
| 546 | the group generated by the commutators with `γ_*` and with its complex conjugate |
| 547 | `γ_*^c = conjGal T.γ`, lies in the normal subgroup generated by `inertiaAbove R`, the union of the |
| 548 | inertia groups at places above `R`. -/ |
| 549 | lemma sahGroup_le_normalClosure {T : SelmerDatum ℓ S₀ g₀ O n} {R : Set (FinPlace E)} |
| 550 | (hR : ∀ v ∈ T.places, v ∉ placesDividing E ℓ → v ∈ R ∧ star v ∈ R) : |
| 551 | T.sahGroup ≤ normalClosure (inertiaAbove R) := by |
| 552 | obtain ⟨v, ⟨hv, hvℓ⟩, B, hB, hγ⟩ := T.γ_mem_inertiaAbove |
| 553 | -- Both `γ_*` and `γ_*^c` lie in this normal subgroup. |
| 554 | have h_mem (b : Bool) : idOrConjInv b T.γ ∈ normalClosure (inertiaAbove R) := |
| 555 | subset_normalClosure (idOrConjInv_mem_inertiaAbove hB hγ (hR v hv hvℓ) b) |
| 556 | have h_comm {δ : Gal(Ω/E)} (hδ : δ ∈ normalClosure (inertiaAbove R)) (g : Gal(Ω/E)) : |
| 557 | ⁅g, δ⁆ ∈ normalClosure (inertiaAbove R) := |
| 558 | mul_mem (normalClosure_normal.conj_mem δ hδ g) (inv_mem hδ) |
| 559 | exact T.sahGroup_le (h_comm (by simpa [idOrConjInv] using h_mem true)) |
| 560 | (h_comm (by simpa [idOrConjInv] using h_mem false)) |
| 561 | |
| 562 | section Cocycles |
| 563 | |
| 564 | variable {B : Type} [AddCommGroup B] [Module O B] |
| 565 | |
| 566 | /-- The map `b ↦ T.ρ T.γ • b - b` is bijective on `n → B`, since `γ_* = T.γ` acts by the scalar |
| 567 | `ζ_* = T.ζ` and `ζ_* - 1` is a unit. -/ |
| 568 | lemma bijective_γ_smul_sub (T : SelmerDatum ℓ S₀ g₀ O n) {B : Type} [AddCommGroup B] |
| 569 | [Module O B] : Function.Bijective fun b : n → B ↦ T.ρ T.γ • b - b := by |
| 570 | simpa [T.ρ_γ, sub_smul] using T.isUnit_ζ_sub_one.smul_bijective (β := n → B) |
| 571 | |
| 572 | /-- A cocycle `z` with values in `B ^ n` that vanishes at `γ_* = T.γ` and on the group |
| 573 | `H = T.sahGroup` is zero, by Sah's identity. -/ |
| 574 | lemma cocycle_eq_zero_of_sahGroup {z : Gal(Ω/E) → n → B} |
| 575 | (hz : ∀ g h : Gal(Ω/E), z (g * h) = z g + T.ρ g • z h) (hγ : z T.γ = 0) |
| 576 | (hH : ∀ h ∈ T.sahGroup, z h = 0) : z = 0 := by |
| 577 | -- Use the Galois action through `T.ρ` to view `z` as a cocycle in TauCeti. |
| 578 | let := DistribMulAction.compHom (n → B) T.ρ |
| 579 | have h_cocycle : groupCohomology.IsCocycle₁ z := |
| 580 | fun g h ↦ (hz g h).trans (add_comm _ _) |
| 581 | funext g |
| 582 | -- The commutator in TauCeti’s identity is conjugate to `[g, γ_*]`. |
| 583 | have h_mem : (T.γ * g)⁻¹ * (g * T.γ) ∈ T.sahGroup := by |
| 584 | convert Normal.conj_mem _ (T.commutator_γ_mem g) (T.γ * g)⁻¹ using 1 |
| 585 | simp [commutatorElement_def, mul_assoc] |
| 586 | apply (T.bijective_γ_smul_sub (B := B)).injective |
| 587 | change T.γ • z g - z g = T.γ • (0 : n → B) - 0 |
| 588 | simpa [hγ] using h_cocycle.smul_apply_sub_apply_eq (hH _ h_mem) |
| 589 | |
| 590 | end Cocycles |
| 591 | |
| 592 | /-- Let `O` be the integer ring of a finite extension of `ℚ_ℓ`, and let `O / a` be nonzero. Let `z` |
| 593 | be a cocycle for `T.ρ` with values in `(O / a) ^ n` that vanishes at `γ_*`. If some value of `z` has |
| 594 | a unit coordinate, then so does some value on `H = T.sahGroup`, the group generated by the |
| 595 | commutators with `γ_*` and with its conjugate `conjGal T.γ`. -/ |
| 596 | lemma exists_mem_sahGroup_isUnit_apply {T : SelmerDatum ℓ S₀ g₀ O n} {a : O} |
| 597 | [Nontrivial (QuotSpan a)] {z : Gal(Ω/E) → n → QuotSpan a} |
| 598 | (hz : ∀ g h : Gal(Ω/E), z (g * h) = z g + T.ρ g • z h) (hγ : z T.γ = 0) |
| 599 | (hz_unit : ∃ (g : Gal(Ω/E)) (j : n), IsUnit (z g j)) : |
| 600 | ∃ h ∈ T.sahGroup, ∃ j : n, IsUnit (z h j) := by |
| 601 | have : IsLocalRing (QuotSpan a) := |
| 602 | .of_surjective' (Ideal.Quotient.mk _) Ideal.Quotient.mk_surjective |
| 603 | let z₀ : Gal(Ω/E) → n → IsLocalRing.ResidueField (QuotSpan a) := |
| 604 | fun g j ↦ IsLocalRing.residue _ (z g j) |
| 605 | have hz₀ (g h : Gal(Ω/E)) : z₀ (g * h) = z₀ g + T.ρ g • z₀ h := by |
| 606 | funext j |
| 607 | simp [z₀, hz, Matrix.Module.smul_apply, Algebra.smul_def, |
| 608 | IsScalarTower.algebraMap_apply O (QuotSpan a) (IsLocalRing.ResidueField (QuotSpan a))] |
| 609 | by_contra! h_nonunit |
| 610 | have h_zero : z₀ = 0 := by |
| 611 | refine cocycle_eq_zero_of_sahGroup hz₀ (funext fun j ↦ by simp [z₀, hγ]) fun h hh ↦ ?_ |
| 612 | exact funext fun j ↦ (IsLocalRing.residue_eq_zero_iff _).2 (h_nonunit h hh j) |
| 613 | obtain ⟨g, j, hj⟩ := hz_unit |
| 614 | exact (IsLocalRing.residue_ne_zero_iff_isUnit _).2 hj (congrFun₂ h_zero g j) |
| 615 | |
| 616 | /-- Let `z` be a cocycle for `T.ρ` with values in `W = (O / a) ^ n` that vanishes at `γ_*`. Suppose |
| 617 | some value of `z` has a unit coordinate. Then `z(H)` spans `W`, where `H = T.sahGroup` is the group |
| 618 | generated by the commutators with `γ_*` and with its conjugate `γ_*^c = conjGal T.γ`. -/ |
| 619 | lemma span_image_sahGroup_eq_top {T : SelmerDatum ℓ S₀ g₀ O n} {a : O} |
| 620 | {z : Gal(Ω/E) → n → QuotSpan a} |
| 621 | (hz : ∀ g h : Gal(Ω/E), z (g * h) = z g + T.ρ g • z h) (hγ : z T.γ = 0) |
| 622 | (hz_unit : ∃ (g : Gal(Ω/E)) (j : n), IsUnit (z g j)) : |
| 623 | Submodule.span O (z '' T.sahGroup) = ⊤ := by |
| 624 | nontriviality QuotSpan a |
| 625 | set X : Submodule O (n → QuotSpan a) := Submodule.span O (z '' T.sahGroup) |
| 626 | have h_mem {h : Gal(Ω/E)} (hh : h ∈ T.sahGroup) : z h ∈ X := |
| 627 | Submodule.subset_span (Set.mem_image_of_mem z hh) |
| 628 | -- The span is stable under `G`, as `g z(h) = z (g h g⁻¹)` and `H` is normal. |
| 629 | have h_stable (g : Gal(Ω/E)) : ∀ u ∈ X, T.ρ g • u ∈ X := by |
| 630 | refine fun _ ↦ smul_mem_span_of_forall_smul_mem (T.ρ g) ?_ |
| 631 | rintro _ ⟨h, hh, rfl⟩ |
| 632 | rw [← cocycle_conj_eq_smul hz (γ := g) (g := h) (by simp [ρ_eq_one_of_mem_sahGroup hh])] |
| 633 | exact h_mem (Normal.conj_mem h hh g) |
| 634 | -- It contains a vector with a unit coordinate. |
| 635 | obtain ⟨h, hh, j, h_unit⟩ := exists_mem_sahGroup_isUnit_apply hz hγ hz_unit |
| 636 | exact eq_top_of_stable_of_isUnit T.span_range_eq_top (Set.forall_mem_range.2 h_stable) |
| 637 | (h_mem hh) h_unit |
| 638 | |
| 639 | end SelmerDatum |
| 640 | |
| 641 | end Sah |
| 642 | |
| 643 | section Global |
| 644 | |
| 645 | /-! ### A bound for the global term by an element that acts by scalars -/ |
| 646 | |
| 647 | open IsDiscreteValuationRing Module Matrix.Module Submodule |
| 648 | |
| 649 | variable {O n : Type} [CommRing O] [Fintype n] [DecidableEq n] |
| 650 | |
| 651 | /-- Over a discrete valuation ring `O`, the `ε`-torsion of `(O / a) ^ n` has length at most |
| 652 | `#n · v(ε)`, for the valuation `v` of `O`. -/ |
| 653 | lemma length_torsionBy_pi_quot_le [DVR O] (a ε : O) : |
| 654 | length O (torsionBy O (n → QuotSpan a) ε) ≤ Fintype.card n * addVal O ε := |
| 655 | calc _ ≤ length O (LinearMap.ker ((ε • 1 : Matrix n n O) • 1 : Module.End O (n → QuotSpan a))) := |
| 656 | length_mono fun b hb ↦ by simpa using hb |
| 657 | _ ≤ addVal O (ε • 1 : Matrix n n O).det := length_ker_le_addVal_det _ a |
| 658 | _ = Fintype.card n * addVal O ε := by simp |
| 659 | |
| 660 | /-- If the matrices `ρ g` span all matrices, the translates of a basis vector span `(O / a) ^ n`. -/ |
| 661 | lemma span_range_smul_single_eq_top {G : Type} [Monoid G] {ρ : G →* Matrix n n O} |
| 662 | (hρ : span O (Set.range ρ) = ⊤) (a : O) (i : n) : |
| 663 | span O (Set.range fun g : G ↦ ρ g • (Pi.single i 1 : n → QuotSpan a)) = ⊤ := by |
| 664 | set X : Submodule O (n → QuotSpan a) := span O (Set.range fun g : G ↦ ρ g • Pi.single i 1) |
| 665 | have h_stable (g : G) : ∀ u ∈ X, ρ g • u ∈ X := by |
| 666 | refine fun _ ↦ smul_mem_span_of_forall_smul_mem (ρ g) ?_ |
| 667 | rintro _ ⟨k, rfl⟩ |
| 668 | exact subset_span ⟨g * k, by simp only [map_mul, mul_smul]⟩ |
| 669 | exact eq_top_of_stable_of_isUnit hρ (Set.forall_mem_range.2 h_stable) |
| 670 | (subset_span ⟨1, by simp⟩ : Pi.single i 1 ∈ X) (j := i) (by simp) |
| 671 | |
| 672 | /-- Over a ring of `ℓ`-adic integers, the `ε`-torsion of a finite module and the |
| 673 | `ε`-torsion of its character module have equal length. The latter is the dual of `X / ε X`. -/ |
| 674 | lemma length_torsionBy_characterModule_eq {ℓ : ℕ} [ThePrime ℓ] [PadicIntegerRing O ℓ] {X : Type} |
| 675 | [AddCommGroup X] [Module O X] [Finite X] (ε : O) : |
| 676 | length O (torsionBy O (CharacterModule X) ε) = length O (torsionBy O X ε) := by |
| 677 | let δ : X →ₗ[O] X := LinearMap.lsmul O X ε |
| 678 | let pullback := CharacterModule.dual δ.range.mkQ |
| 679 | -- Pullback identifies the characters of `X / ε X` with those that vanish on `ε X`. |
| 680 | have h_range : torsionBy O (CharacterModule X) ε = LinearMap.range pullback := by |
| 681 | ext χ |
| 682 | constructor |
| 683 | · intro hχ |
| 684 | have h_vanish : δ.range.toAddSubgroup ≤ AddMonoidHom.ker χ := by |
| 685 | rintro _ ⟨m, rfl⟩ |
| 686 | exact (DFunLike.congr_fun ((mem_torsionBy_iff ε χ).1 hχ) m : χ (ε • m) = 0) |
| 687 | exact ⟨QuotientAddGroup.lift δ.range.toAddSubgroup χ h_vanish, by ext; rfl⟩ |
| 688 | · rintro ⟨χ, rfl⟩ |
| 689 | refine (mem_torsionBy_iff ε _).2 (DFunLike.ext _ _ fun x ↦ ?_) |
| 690 | change χ ((δ.range.mkQ.comp δ) x) = 0 |
| 691 | rw [LinearMap.range_mkQ_comp, LinearMap.zero_apply, map_zero] |
| 692 | have h_injective : Function.Injective pullback := |
| 693 | CharacterModule.dual_injective_of_surjective _ δ.range.mkQ_surjective |
| 694 | -- The dual has the same cardinality as the quotient, which has the cardinality of `X[ε]`. |
| 695 | have : Finite (X ⧸ δ.range) := .of_surjective _ δ.range.mkQ_surjective |
| 696 | have h_card : Nat.card (torsionBy O (CharacterModule X) ε) = Nat.card (torsionBy O X ε) := by |
| 697 | rw [h_range, ← Nat.card_congr (LinearEquiv.ofInjective pullback h_injective).toEquiv] |
| 698 | exact (card_hom_QZ _).trans (AddSubgroup.index_range (f := δ.toAddMonoidHom)) |
| 699 | exact le_antisymm (length_le_of_card_dvd h_card.dvd) (length_le_of_card_dvd h_card.symm.dvd) |
| 700 | |
| 701 | variable {ℓ : ℕ} [ThePrime ℓ] [PadicIntegerRing O ℓ] {E : Type} [Field E] |
| 702 | [EmbeddedNumberField E] [NumberField.IsCMField E] {ρ : Gal(Ω/E) →* Matrix n n O} |
| 703 | |
| 704 | /-- Let `g` act on `T = O ^ n` through `ρ` by the scalar `α` and let `g^{-c} = (conjGal g)⁻¹` act by |
| 705 | `α'`, so that `g` acts on `T^{*c}` by `cyc(g^c) α'`. The difference `α - cyc(g^c) α'` annihilates |
| 706 | every element of `conjDualHom ℓ ρ a`. -/ |
| 707 | lemma smul_apply_eq_zero_of_mem_conjDualHom {g : Gal(Ω/E)} {α α' a : O} (hα : ρ g = α • 1) |
| 708 | (hα' : ρ (conjGal g)⁻¹ = α' • 1) |
| 709 | {η : (n → QuotSpan a) →ₗ[O] CharacterModule (n → QuotSpan a)} (hη : η ∈ conjDualHom ℓ ρ a) |
| 710 | (u : n → QuotSpan a) : (α - cyclotomicCharIn O Ω ℓ (conjGal g) * α') • η u = 0 := by |
| 711 | ext m |
| 712 | have h_comm : η u (α • m) = η u ((cyclotomicCharIn O Ω ℓ (conjGal g) * α') • m) := by |
| 713 | simpa only [hα, hα', smul_one_smul, map_smul, CharacterModule.smul_apply, mul_smul] |
| 714 | using hη g u m |
| 715 | rw [CharacterModule.smul_apply, sub_smul, map_sub, h_comm, sub_self] |
| 716 | exact (AddMonoidHom.zero_apply m).symm |
| 717 | |
| 718 | /-- Let `g` act on `T = O ^ n` through `ρ` by the scalar `α`, and let `g^{-c} = (conjGal g)⁻¹` act |
| 719 | by `α'`. Suppose the matrices in the range of `ρ` span all matrices. Then `congruenceTerm ℓ ρ` is at |
| 720 | most `#n · addVal O (α - cyclotomicCharIn O Ω ℓ (conjGal g) * α')`. -/ |
| 721 | lemma congruenceTerm_le [Nonempty n] (hρ : span O (Set.range ρ) = ⊤) {g : Gal(Ω/E)} {α α' : O} |
| 722 | (hα : ρ g = α • 1) (hα' : ρ (conjGal g)⁻¹ = α' • 1) : |
| 723 | congruenceTerm ℓ ρ ≤ Fintype.card n * addVal O |
| 724 | (α - cyclotomicCharIn O Ω ℓ (conjGal g) * α') := by |
| 725 | refine iSup₂_le fun a ha ↦ ?_ |
| 726 | have : NeZero a := ⟨ha⟩ |
| 727 | obtain ⟨i⟩ : Nonempty n := inferInstance |
| 728 | let e : n → QuotSpan a := Pi.single i 1 |
| 729 | let ev : ((n → QuotSpan a) →ₗ[O] CharacterModule (n → QuotSpan a)) →ₗ[O] |
| 730 | CharacterModule (n → QuotSpan a) := LinearMap.applyₗ e |
| 731 | let Δ : O := α - cyclotomicCharIn O Ω ℓ (conjGal g) * α' |
| 732 | have h_maps : ∀ η ∈ conjDualHom ℓ ρ a, ev η ∈ torsionBy O _ Δ := fun η hη ↦ |
| 733 | (mem_torsionBy_iff Δ (ev η)).2 (smul_apply_eq_zero_of_mem_conjDualHom hα hα' hη e) |
| 734 | -- A `G`-map that vanishes at `e` vanishes on the translates of `e`, which span `n → QuotSpan a`. |
| 735 | have h_inj : Function.Injective (ev.restrict h_maps) := by |
| 736 | refine (injective_iff_map_eq_zero _).mpr fun ⟨η, hη⟩ h_e ↦ Subtype.ext ?_ |
| 737 | refine LinearMap.ext_on_range (span_range_smul_single_eq_top hρ a i) fun k ↦ ?_ |
| 738 | ext m |
| 739 | exact (hη k e m).trans (by rw [show η e = 0 from congrArg Subtype.val h_e]; rfl) |
| 740 | calc _ ≤ length O (torsionBy O (CharacterModule (n → QuotSpan a)) Δ) := |
| 741 | length_le_of_injective (ev.restrict h_maps) h_inj |
| 742 | _ = length O (torsionBy O (n → QuotSpan a) Δ) := length_torsionBy_characterModule_eq (ℓ := ℓ) Δ |
| 743 | _ ≤ Fintype.card n * addVal O Δ := length_torsionBy_pi_quot_le a Δ |
| 744 | |
| 745 | end Global |
| 746 | |
| 747 | end New.Selmer |
| 748 | |
| 749 | end |