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.Algebra.Order.Star.Rat |
| 4 | import Mathlib.GroupTheory.FiniteAbelian.Duality |
| 5 | import TauCeti.RingTheory.DiscreteValuationRing.Basic |
| 6 | public import Lib.ClassField.GaloisCohomology.KummerCyclicClasses |
| 7 | public import Lib.ClassField.GaloisCohomology.TateIndexFormula |
| 8 | import Lib.ClassField.Places.LocalFields |
| 9 | import Lib.ClassField.Places.ProfiniteGalois |
| 10 | |
| 11 | /-! |
| 12 | # Index of l-th powers in a local field and finiteness of Kummer 1-cocycles |
| 13 | |
| 14 | Let `L` be a local field with ring of integers `O`. `New.IsLocalGalois Γ L A` makes `Γ` the absolute |
| 15 | Galois group of `L`, acting on an algebraic closure `Ω` and stabilising its valuation ring `A`; then |
| 16 | `O = A ∩ L` is `New.valRingBelow L A`, a discrete valuation ring with finite residue field. Absolute |
| 17 | values `|x|` are the multiplicative valuation `A.valuation x`. This file counts the `l`-th power |
| 18 | classes in `Lˣ` and deduces the number of continuous 1-cocycles `Γ → Ωˣ` killed by `n`. |
| 19 | |
| 20 | ## Main definitions and results |
| 21 | |
| 22 | * `New.cokerKerIndex_local_units`: `#(Lˣ / Lˣ ^ l) / #μ_l(L) = l · #(O / l)`. |
| 23 | * `New.IsLocalGalois.card_kummer_cocycles`: there are `n² · #(O / n)` continuous 1-cocycles |
| 24 | `Γ → Ωˣ` killed by `n`; `New.IsLocalGalois.card_ker_natCast_Z1_unitsModule` and |
| 25 | `New.IsLocalGalois.finite_ker_natCast_Z1_unitsModule` state the count and the finiteness apart. |
| 26 | * `New.IsLocalGalois.finite_Z1`: a finite discrete `Γ`-module has finitely many continuous |
| 27 | 1-cocycles. |
| 28 | |
| 29 | Notions from other files: |
| 30 | * `New.cokerKerIndex`: `#coker / #ker` of a linear map, a rational number that is `0` if either |
| 31 | group is infinite. |
| 32 | * `New.DiscreteModule`: a discrete `Γ`-module over `R`: an `R`-module with the discrete topology |
| 33 | and a continuous `R`-linear action of the topological group `Γ`. |
| 34 | * `New.Z1 ρ`: the continuous 1-cocycles of the representation `ρ`; `New.unitsModule Γ` is `Ωˣ`, |
| 35 | written additively, as a discrete `Γ`-module. |
| 36 | |
| 37 | ## Relation to the literature |
| 38 | |
| 39 | Known; see `Lib.ClassField.LocalDuality.CrystallineDuality` for sources. |
| 40 | -/ |
| 41 | |
| 42 | @[expose] public section |
| 43 | |
| 44 | /-! |
| 45 | ## The index of l-th powers in the multiplicative group |
| 46 | |
| 47 | It rests on a form of Hensel's lemma for l-th roots, proved first in the algebraic closure and then |
| 48 | descended by Galois invariance. |
| 49 | -/ |
| 50 | |
| 51 | section LocalPowerIndex |
| 52 | |
| 53 | open Ideal Quotient Nat Polynomial Valuation IsLocalRing Function.Exact Module LinearMap |
| 54 | |
| 55 | /-- Let `A` be a valuation subring of an algebraically closed field `Ω`, with absolute value |
| 56 | `|x| = A.valuation x`. If `r ≠ 0` and `|a - 1| ≤ |l| r`, then `a` has an `l`-th root `z` with |
| 57 | `|z - 1| ≤ r`. -/ |
| 58 | lemma New.exists_root_near_one {Ω : Type*} [Field Ω] [IsAlgClosed Ω] (A : ValuationSubring Ω) |
| 59 | {l : ℕ} {a : Ω} {r : A.ValueGroup} (hr : r ≠ 0) (ha : A.valuation (a - 1) ≤ A.valuation l * r) : |
| 60 | ∃ z : Ω, a = z ^ l ∧ A.valuation (z - 1) ≤ r := by |
| 61 | by_contra! far |
| 62 | have ha_ne : a ≠ 1 := by simpa using far 1 |
| 63 | -- The logarithmic derivative of `a - X ^ l` at `1` is `-l / (a - 1) = ∑ z, 1 / (1 - z)`, the sum |
| 64 | -- over the roots. If all roots are far from `1`, every term has valuation `< r⁻¹`. |
| 65 | let P : Polynomial Ω := C a - X ^ l |
| 66 | have log_deriv : P.derivative.eval 1 / P.eval 1 = (P.roots.map fun z : Ω ↦ 1 / (1 - z)).sum := |
| 67 | (IsAlgClosed.splits P).eval_derivative_div_eval_of_ne_zero (by simp [P, sub_eq_zero, ha_ne]) |
| 68 | have small : P.derivative.eval 1 / P.eval 1 ∈ A.valuation.ltAddSubgroup (Units.mk0 r hr)⁻¹ := by |
| 69 | rw [log_deriv] |
| 70 | -- Each root `z` of `P` is far from `1`, so `|1 / (1 - z)| < r⁻¹`. |
| 71 | refine AddSubgroup.multiset_sum_mem _ _ fun t ht ↦ ?_ |
| 72 | obtain ⟨z, hz_root, rfl⟩ := Multiset.mem_map.mp ht |
| 73 | have h_far : r < A.valuation (z - 1) := |
| 74 | far z (by simpa [P, sub_eq_zero] using (mem_roots'.mp hz_root).2) |
| 75 | simp [inv_strictAnti₀, map_sub_swap, pos_iff_ne_zero, h_far, hr] |
| 76 | -- As `P' 1 / P 1 = -l / (a - 1)`, this says `|l| r < |a - 1|`. |
| 77 | have h_lt : A.valuation (l : Ω) * r < A.valuation (a - 1) := by |
| 78 | simpa [P, derivative_pow, field, ha_ne, lt_div_iff₀ (pos_iff_ne_zero.mpr hr), pos_iff, |
| 79 | sub_eq_zero] using small |
| 80 | exact ha.not_gt h_lt |
| 81 | |
| 82 | /-- Hensel's lemma for `l`-th roots in a local field `L` with absolute Galois group `Γ` |
| 83 | (`New.IsLocalGalois Γ L A`), where `|x| = A.valuation x`: if `0 < r < |l|` and `|a - 1| ≤ |l| r`, |
| 84 | then `a = x ^ l` for some `x` in `L` with `|x - 1| ≤ r`. -/ |
| 85 | lemma New.exists_local_root_near_one (Γ : Type*) {L Ω : Type} [Group Γ] [TopologicalSpace Γ] |
| 86 | [Field L] [Field Ω] [Algebra L Ω] [MulSemiringAction Γ Ω] (A : ValuationSubring Ω) |
| 87 | [hLocal : IsLocalGalois Γ L A] {l : ℕ} {a : L} {r : A.ValueGroup} (hr : r ≠ 0) |
| 88 | (hr_lt : r < A.valuation l) (ha : A.valuation (algebraMap L Ω a - 1) ≤ A.valuation l * r) : |
| 89 | ∃ x : L, a = x ^ l ∧ A.valuation (algebraMap L Ω x - 1) ≤ r := by |
| 90 | have h_alg_closed : IsAlgClosed Ω := hLocal.toIsAlgClosed |
| 91 | obtain ⟨z, hz_pow, hz⟩ := exists_root_near_one A hr ha |
| 92 | have val_z : A.valuation z = 1 := by |
| 93 | simpa using map_eq_of_sub_lt _ ((hz.trans_lt hr_lt).trans_le (by simp)) |
| 94 | -- Both roots are within `r` of `1`, so their difference has valuation less than `|l|`. |
| 95 | have h_fixed : ∀ g : Γ, g • z = z := by |
| 96 | intro g |
| 97 | have h_smul : A.valuation (g • (z - 1)) ≤ r := |
| 98 | (decompGroup.val_smul (hLocal.mem_decompGroup g) _).trans_le hz |
| 99 | have h_close : A.valuation (g • z - z) < A.valuation l := by |
| 100 | simpa [smul_sub] using (map_sub_le _ h_smul hz).trans_lt hr_lt |
| 101 | have h_pow : (g • z) ^ l = z ^ l := by rw [← smul_pow']; simp [← hz_pow] |
| 102 | exact eq_of_pow_eq_of_val_sub_lt h_pow (by simp [val_z]) h_close |
| 103 | obtain ⟨x, rfl⟩ : ∃ a : L, algebraMap L Ω a = z := hLocal.isInvariant.isInvariant z h_fixed |
| 104 | exact ⟨x, (algebraMap L Ω).injective (by simp [hz_pow]), hz⟩ |
| 105 | |
| 106 | /-- In a local field `L` with absolute Galois group `Γ` (`New.IsLocalGalois Γ L A`), the quotient of |
| 107 | the integers `O = New.valRingBelow L A` by a nonzero principal ideal is finite. -/ |
| 108 | lemma New.IsLocalGalois.finite_quotient_span_singleton {Γ L Ω : Type} [Group Γ] |
| 109 | [TopologicalSpace Γ] [Field L] [Field Ω] [Algebra L Ω] [MulSemiringAction Γ Ω] |
| 110 | {A : ValuationSubring Ω} (hLocal : IsLocalGalois Γ L A) {x : valRingBelow L A} (hx : x ≠ 0) : |
| 111 | Finite (valRingBelow L A ⧸ span {x}) := by |
| 112 | have h_dvr : IsDiscreteValuationRing (valRingBelow L A) := hLocal.isDiscreteValuationRing |
| 113 | have h_residue : Finite (ResidueField (valRingBelow L A)) := hLocal.finite_residue |
| 114 | exact Ring.HasFiniteQuotients.finiteQuotient (span_singleton_eq_bot.ne.mpr hx) |
| 115 | |
| 116 | /-- Let `A` be a valuation subring of `Ω` and `L → Ω` a field embedding. An `l`-th root of unity |
| 117 | `u` in `L` with `|u - 1| < |l|` (for the valuation of `A`) is `1`. -/ |
| 118 | lemma New.eq_one_of_pow_eq_one_of_valuation_sub_lt {L Ω : Type} [Field L] [Field Ω] [Algebra L Ω] |
| 119 | {A : ValuationSubring Ω} {l : ℕ} {u : L} (h_pow : u ^ l = 1) |
| 120 | (h_close : A.valuation (algebraMap L Ω u - 1) < A.valuation l) : u = 1 := by |
| 121 | simpa using eq_of_pow_eq_of_val_sub_lt (x := algebraMap L Ω u) |
| 122 | (by rw [← map_pow, h_pow, map_one, one_pow]) (by simp) h_close |
| 123 | |
| 124 | /-- The order at the maximal ideal as an additive map. Let `L` be a local field |
| 125 | (`New.IsLocalGalois Γ L A`) with absolute value `|x| = A.valuation x`, `π` a uniformiser and `Y` an |
| 126 | additive group isomorphic to `Lˣ` (by `y`). Then some surjective `f : Y → ℤ` has |
| 127 | `|y a| = |π| ^ n` exactly when `f a = n`. -/ |
| 128 | lemma New.IsLocalGalois.exists_surjective_ord {Γ L Ω : Type} [Group Γ] [TopologicalSpace Γ] |
| 129 | [Field L] [Field Ω] [Algebra L Ω] [MulSemiringAction Γ Ω] {A : ValuationSubring Ω} |
| 130 | (hLocal : IsLocalGalois Γ L A) {π : Lˣ} (hπ : IsUniformizer A π.val) {Y : Type} [AddCommGroup Y] |
| 131 | (y : Y ≃+ Additive Lˣ) : |
| 132 | ∃ f : Y →+ ℤ, Function.Surjective f ∧ ∀ (a : Y) (n : ℤ), |
| 133 | A.valuation.comap (algebraMap L Ω) (y a).toMul = A.valuation.comap (algebraMap L Ω) π ^ n ↔ |
| 134 | f a = n := by |
| 135 | set w : Valuation L A.ValueGroup := A.valuation.comap (algebraMap L Ω) |
| 136 | have h_ord_exists : ∀ a : Y, ∃ n : ℤ, w (y a).toMul = w π ^ n := |
| 137 | fun a ↦ hπ.exists_valuationVia_eq_zpow hLocal _ (y a).toMul.ne_zero |
| 138 | choose ord h_ord using h_ord_exists |
| 139 | have hπ_pos : 0 < w π := by simp [w, pos_iff] |
| 140 | have ord_eq {a : Y} {n : ℤ} (h_val : w (y a).toMul = w π ^ n) : ord a = n := |
| 141 | zpow_right_injective₀ hπ_pos hπ.valuationVia_lt_one.ne ((h_ord a).symm.trans h_val) |
| 142 | have ord_add (a b : Y) : ord (a + b) = ord a + ord b := |
| 143 | ord_eq <| by |
| 144 | rw [zpow_add₀ hπ_pos.ne', ← h_ord, ← h_ord] |
| 145 | simp [w] |
| 146 | refine ⟨AddMonoidHom.mk' ord ord_add, fun n ↦ ?_, fun a n ↦ ⟨ord_eq, ?_⟩⟩ |
| 147 | · -- `f` is onto: `n` is the order of `π ^ n`. |
| 148 | exact ⟨y.symm (n • .ofMul π), ord_eq (by simp)⟩ |
| 149 | · rintro rfl |
| 150 | exact h_ord a |
| 151 | |
| 152 | /-- In a field `L` over a characteristic-zero field `Ω` with valuation |
| 153 | `w = A.valuation.comap (algebraMap L Ω)`, `x / (l * π) ∈ valRingBelow L A` iff `w x ≤ w (l * π)`. -/ |
| 154 | private lemma New.div_mul_mem_valRingBelow_iff {L Ω : Type} [Field L] [Field Ω] [CharZero Ω] |
| 155 | [Algebra L Ω] {A : ValuationSubring Ω} (l : ℕ) [NeZero l] (π : Lˣ) {x : L} : |
| 156 | x / (l * π) ∈ valRingBelow L A ↔ |
| 157 | (A.valuation.comap (algebraMap L Ω)) x ≤ |
| 158 | (A.valuation.comap (algebraMap L Ω)) (l * π) := by |
| 159 | simp [div_le_one₀, pos_iff, NeZero.ne] |
| 160 | |
| 161 | /-- The principal unit subgroup `1 + l π O` inside the unit group `f.ker` (where `f : Y →ₗ[ℤ] ℤ` |
| 162 | is the valuation order map on `Y ≃+ Additive Lˣ`). -/ |
| 163 | private noncomputable def New.localUnitSubgroup {Γ L Ω : Type} [Group Γ] [TopologicalSpace Γ] |
| 164 | [Field L] [Field Ω] [Algebra L Ω] [MulSemiringAction Γ Ω] {A : ValuationSubring Ω} |
| 165 | (hLocal : IsLocalGalois Γ L A) (π : Lˣ) (l : ℕ) [NeZero l] |
| 166 | {Y : Type} [AddCommGroup Y] (y : Y ≃+ Additive Lˣ) {f : Y →ₗ[ℤ] ℤ} |
| 167 | (h_val : ∀ a : f.ker, (A.valuation.comap (algebraMap L Ω)) (y a).toMul = 1) : |
| 168 | Submodule ℤ f.ker := by |
| 169 | have h_fields := hLocal |
| 170 | obtain ⟨⟩ := h_fields |
| 171 | have : CharZero L := (algebraMap L Ω).charZero |
| 172 | set w : Valuation L A.ValueGroup := A.valuation.comap (algebraMap L Ω) |
| 173 | have div_mem {x : L} : x / (l * π) ∈ valRingBelow L A ↔ w x ≤ w (l * π) := |
| 174 | div_mul_mem_valRingBelow_iff (A := A) l π |
| 175 | exact (AddSubgroup.ofSub {a : f.ker | ((y a).toMul.val - 1) / (l * π) ∈ valRingBelow L A} |
| 176 | ⟨0, by simp⟩ fun a ha b hb ↦ by |
| 177 | -- As `|b| = 1`, `a / b - 1` has the absolute value of `(a - 1) - (b - 1)`. |
| 178 | have hb1 : w (y b).toMul = 1 := h_val b |
| 179 | simpa [hb1, div_mem, ← division_def, ← sub_div, div_sub_one] using |
| 180 | sub_mem ha.out hb.out).toIntSubmodule |
| 181 | |
| 182 | /-- Reduction modulo `l π` embeds the unit quotient `Oˣ / (1 + l π O)` into the finite ring |
| 183 | `O / l π`, so `1 + l π O` has finite index in `f.ker`. -/ |
| 184 | private lemma New.finite_quotient_localUnitSubgroup {Γ L Ω : Type} [Group Γ] [TopologicalSpace Γ] |
| 185 | [Field L] [Field Ω] [Algebra L Ω] [MulSemiringAction Γ Ω] {A : ValuationSubring Ω} |
| 186 | (hLocal : IsLocalGalois Γ L A) {π : Lˣ} (hπ : IsUniformizer A (π : L)) (l : ℕ) [NeZero l] |
| 187 | {Y : Type} [AddCommGroup Y] (y : Y ≃+ Additive Lˣ) {f : Y →ₗ[ℤ] ℤ} |
| 188 | (h_val : ∀ a : f.ker, (A.valuation.comap (algebraMap L Ω)) (y a).toMul = 1) : |
| 189 | Finite (f.ker ⧸ localUnitSubgroup hLocal π l y h_val) := by |
| 190 | have h_fields := hLocal |
| 191 | obtain ⟨⟩ := h_fields |
| 192 | have h_char : CharZero L := (algebraMap L Ω).charZero |
| 193 | set w : Valuation L A.ValueGroup := A.valuation.comap (algebraMap L Ω) |
| 194 | have div_mem {x : L} : x / (l * π) ∈ valRingBelow L A ↔ w x ≤ w (l * π) := |
| 195 | div_mul_mem_valRingBelow_iff (A := A) l π |
| 196 | let V := localUnitSubgroup hLocal π l y h_val |
| 197 | refine (hLocal.finite_quotient_span_singleton (x := l * ⟨π, hπ.valuationVia_lt_one.le⟩) |
| 198 | (by simpa [Subtype.ext_iff] using NeZero.ne l)).of_injective |
| 199 | (fun a ↦ mk _ ⟨(y a.out).toMul, (h_val a.out).le⟩) fun a b hab ↦ ?_ |
| 200 | -- Equal residues mod `l π` of representatives put their quotient in `V`. |
| 201 | have h_quot : w (((y (a.out - b.out : f.ker)).toMul : L) - 1) ≤ w (l * π) := by |
| 202 | simpa [mk_span_eq_iff_dvd_sub, dvd_iff_valuationVia_le, h_val, w, div_sub_one, |
| 203 | valuationVia] using hab |
| 204 | exact out_equiv_out.mp (V.quotientRel_def.mpr (div_mem.mpr h_quot)) |
| 205 | |
| 206 | /-- On `V = 1 + l π O`, multiplication by `l` is injective (no nontrivial `l`-th roots of unity |
| 207 | lie closer to `1` than `|l|`), and `a ↦ (a - 1) / (l π)` induces a surjection `V → O / l` whose |
| 208 | kernel is `l V` by Hensel's lemma. -/ |
| 209 | private lemma New.exists_exact_localUnitSubgroup_quotient {Γ L Ω : Type} [Group Γ] |
| 210 | [TopologicalSpace Γ] [Field L] [Field Ω] [Algebra L Ω] [MulSemiringAction Γ Ω] |
| 211 | {A : ValuationSubring Ω} (hLocal : IsLocalGalois Γ L A) {π : Lˣ} |
| 212 | (hπ : IsUniformizer A (π : L)) (l : ℕ) [NeZero l] {Y : Type} [AddCommGroup Y] |
| 213 | (y : Y ≃+ Additive Lˣ) {f : Y →ₗ[ℤ] ℤ} |
| 214 | (h_ker : ∀ a : Y, (A.valuation.comap (algebraMap L Ω)) (y a).toMul = 1 ↔ f a = 0) |
| 215 | (h_val : ∀ a : f.ker, (A.valuation.comap (algebraMap L Ω)) (y a).toMul = 1) : |
| 216 | let V := localUnitSubgroup hLocal π l y h_val |
| 217 | LinearMap.ker (l : End ℤ V) = ⊥ ∧ |
| 218 | ∃ red : V →ₗ[ℤ] valRingBelow L A ⧸ span {(l : valRingBelow L A)}, |
| 219 | Function.Surjective red ∧ Function.Exact (l : End ℤ V) red := by |
| 220 | have h_fields := hLocal |
| 221 | obtain ⟨⟩ := h_fields |
| 222 | have h_char : CharZero L := (algebraMap L Ω).charZero |
| 223 | set w : Valuation L A.ValueGroup := A.valuation.comap (algebraMap L Ω) |
| 224 | have lπ_lt : w (l * π) < A.valuation l := by simp [w, hπ.valuationVia_lt_one, pos_iff, NeZero.ne] |
| 225 | have div_mem {x : L} : x / (l * π) ∈ valRingBelow L A ↔ w x ≤ w (l * π) := |
| 226 | div_mul_mem_valRingBelow_iff (A := A) l π |
| 227 | let V := localUnitSubgroup hLocal π l y h_val |
| 228 | -- The element `1 + x` of `V`, for `x ∈ l π O`. |
| 229 | let oneAdd (x : L) (hx : w x ≤ w (l * π)) : V := |
| 230 | have h_val1 : w (1 + x) = 1 := w.map_one_add_of_lt ((hx.trans_lt lπ_lt).trans_le (by simp)) |
| 231 | have h_ne : 1 + x ≠ 0 := fun h_zero ↦ by simp [h_zero] at h_val1 |
| 232 | have h_f : f (y.symm (.ofMul (.mk0 (1 + x) h_ne))) = 0 := |
| 233 | (h_ker _).mp (by simpa [w] using h_val1) |
| 234 | ⟨⟨y.symm (.ofMul (.mk0 (1 + x) h_ne)), h_f⟩, div_mem.mpr (by simp_all)⟩ |
| 235 | -- An `l`-th root of unity closer to `1` than `|l|` is `1`. |
| 236 | have ker_pow : LinearMap.ker (l : End ℤ V) = ⊥ := by |
| 237 | refine LinearMap.ker_eq_bot'.mpr fun a ha ↦ ?_ |
| 238 | have h_pow : (y a).toMul.val ^ l = 1 := by |
| 239 | simpa using congrArg (fun v : V ↦ ((y v).toMul : L)) ha |
| 240 | have h_close : A.valuation (algebraMap L Ω (y a).toMul - 1) < A.valuation l := by |
| 241 | simpa [w] using (div_mem.mp a.property).trans_lt lπ_lt |
| 242 | simpa using eq_one_of_pow_eq_one_of_valuation_sub_lt h_pow h_close |
| 243 | -- `red a` is the class of `(a - 1) / (l π)` in `O / l`; it is additive by `h_defect`. |
| 244 | have h_defect (s t : L) : (s * t - 1) / (l * π) - ((s - 1) / (l * π) + (t - 1) / (l * π)) = |
| 245 | l * ((s - 1) / (l * π) * ((t - 1) / (l * π)) * π) := by field |
| 246 | let red : V →ₗ[ℤ] valRingBelow L A ⧸ span {(l : valRingBelow L A)} := |
| 247 | (AddMonoidHom.mk' (fun a : V ↦ mk (span {(l : valRingBelow L A)}) ⟨_, a.property⟩) fun a b ↦ by |
| 248 | refine mk_span_eq_iff_dvd_sub.mpr |
| 249 | ⟨⟨_, a.property⟩ * ⟨_, b.property⟩ * ⟨π, hπ.valuationVia_lt_one.le⟩, Subtype.ext ?_⟩ |
| 250 | simpa using h_defect _ _).toIntLinearMap |
| 251 | have red_surj : Function.Surjective red := by |
| 252 | refine Quot.ind fun x ↦ ?_ |
| 253 | -- `x` is the image of `1 + x l π`. |
| 254 | have h_le : w ((x : L) * (l * π)) ≤ w (l * π) := div_mem.mp (by simp [NeZero.ne]) |
| 255 | refine ⟨oneAdd ((x : L) * (l * π)) h_le, congrArg (Ideal.Quotient.mk _) (Subtype.ext ?_)⟩ |
| 256 | simp [oneAdd, NeZero.ne] |
| 257 | have red_exact : Function.Exact (l : End ℤ V) red := by |
| 258 | refine .of_comp_of_mem_range ?_ fun a ha ↦ ?_ |
| 259 | · ext |
| 260 | simpa using mul_eq_zero_of_left (mk_singleton_self _) _ |
| 261 | · -- If `l ∣ (a - 1) / (l π)`, Hensel's lemma gives an `l`-th root of `a` in `V`. |
| 262 | -- `ha`: `l` divides `(a - 1) / (l π)` in `O`, that is, `|(a - 1) / (l π)| ≤ |l|`. |
| 263 | have h_near : |
| 264 | A.valuation (algebraMap L Ω (y a).toMul.val - 1) ≤ A.valuation l * w (l * π) := by |
| 265 | simpa [w, div_le_iff₀, NeZero.ne, valuationVia, pos_iff] using |
| 266 | dvd_iff_valuationVia_le.mp ((eq_zero_iff_dvd (l : valRingBelow L A) _).mp ha) |
| 267 | obtain ⟨x, hx_pow, hx⟩ := |
| 268 | exists_local_root_near_one Γ A (by simp [NeZero.ne]) lπ_lt h_near |
| 269 | refine ⟨oneAdd (x - 1) (by simpa [w] using hx), Subtype.ext (Subtype.ext (y.injective ?_))⟩ |
| 270 | ext |
| 271 | simp [oneAdd, hx_pow] |
| 272 | exact ⟨ker_pow, red, red_surj, red_exact⟩ |
| 273 | |
| 274 | /-- The index of `l`-th powers in a field `L`, where `Γ = Gal(Ω/L)` with `Ω` algebraically closed of |
| 275 | characteristic 0 and `O = New.valRingBelow L A` a discrete valuation ring with finite residue field |
| 276 | (`New.IsLocalGalois Γ L A`). Let `l ≠ 0` and let `Y` be an additive group isomorphic to `Lˣ` (by |
| 277 | `y`). For multiplication by `l` on `Y`, the index `#(Y / l Y) / #Y[l]` (a) is not `0`, that is, both |
| 278 | groups are finite; (b) equals `l · #(O / l O)`. -/ |
| 279 | lemma New.cokerKerIndex_local_units {Γ L Ω : Type} [Group Γ] [TopologicalSpace Γ] [Field L] |
| 280 | [Field Ω] [Algebra L Ω] [MulSemiringAction Γ Ω] {A : ValuationSubring Ω} |
| 281 | (hLocal : IsLocalGalois Γ L A) (l : ℕ) [NeZero l] {Y : Type} [AddCommGroup Y] |
| 282 | (y : Y ≃+ Additive Lˣ) : |
| 283 | -- (a) both groups are finite |
| 284 | cokerKerIndex (l : End ℤ Y) ≠ 0 ∧ |
| 285 | -- (b) the value of the index |
| 286 | cokerKerIndex (l : End ℤ Y) = |
| 287 | l * Nat.card (valRingBelow L A ⧸ span {(l : valRingBelow L A)}) := by |
| 288 | -- The index is multiplicative in `1 → Oˣ → Lˣ → ℤ → 0`, it is `l` on `ℤ`, and `Oˣ` may be |
| 289 | -- replaced by the subgroup `V = 1 + l π O` of finite index. On `V` the `l`-th power map is |
| 290 | -- injective, and `a ↦ (a - 1) / (l π)` identifies its cokernel with `O / l`. |
| 291 | obtain ⟨π, hπ⟩ := hLocal.exists_isUniformizer |
| 292 | have h_fields := hLocal |
| 293 | obtain ⟨⟩ := h_fields |
| 294 | have : CharZero L := (algebraMap L Ω).charZero |
| 295 | have h_finite_l : Finite (valRingBelow L A ⧸ span {(l : valRingBelow L A)}) := |
| 296 | hLocal.finite_quotient_span_singleton (by simpa using NeZero.ne l) |
| 297 | -- The order `f : Y → ℤ`, whose kernel is the unit group. |
| 298 | obtain ⟨f₀, f_surj, h_ord⟩ := hLocal.exists_surjective_ord hπ y |
| 299 | let f := f₀.toIntLinearMap |
| 300 | have h_ker (a : Y) : (A.valuation.comap (algebraMap L Ω)) (y a).toMul = 1 ↔ f a = 0 := by |
| 301 | simpa [f] using h_ord a 0 |
| 302 | have val_ker (a : f.ker) : (A.valuation.comap (algebraMap L Ω)) (y a).toMul = 1 := |
| 303 | (h_ker a).mpr a.property |
| 304 | let V := localUnitSubgroup hLocal π l y val_ker |
| 305 | have h_finite_index : Finite (f.ker ⧸ V) := |
| 306 | finite_quotient_localUnitSubgroup hLocal hπ l y val_ker |
| 307 | obtain ⟨ker_pow, red, red_surj, red_exact⟩ := |
| 308 | exists_exact_localUnitSubgroup_quotient hLocal hπ l y h_ker val_ker |
| 309 | -- Pass from `f.ker` to `V` (the inclusion has finite kernel and cokernel), and read off the |
| 310 | -- kernel and the cokernel on `V`. |
| 311 | have idx_units : |
| 312 | cokerKerIndex (l : End ℤ f.ker) = |
| 313 | Nat.card (valRingBelow L A ⧸ span {(l : valRingBelow L A)}) := by |
| 314 | rw [← cokerKerIndex_natCast_eq_of_ne_zero V.subtype (by simp [ne_of_gt, cokerKerIndex]), |
| 315 | cokerKerIndex, ker_pow, card_congr (red_exact.linearEquivOfSurjective red_surj).toEquiv] |
| 316 | simp |
| 317 | -- Split off `ℤ`, where the index is `l`. |
| 318 | rw [cokerKerIndex_mul_of_exact _ f (by simp) f.exact_subtype_ker_map f_surj |
| 319 | (by simp [idx_units, ne_of_gt]), |
| 320 | idx_units, cokerKerIndex_eq_pow_finrank.right] |
| 321 | simp [mul_comm, NeZero.ne] |
| 322 | |
| 323 | end LocalPowerIndex |
| 324 | |
| 325 | /-! |
| 326 | ## Kummer count and finiteness of continuous 1-cocycles |
| 327 | |
| 328 | `New.DiscreteUnits` is Ωˣ written additively, `New.unitsModule` the same as a discrete Γ-module, and |
| 329 | `New.Z1` the module of continuous 1-cocycles. |
| 330 | -/ |
| 331 | |
| 332 | section LocalFiniteness |
| 333 | |
| 334 | open Nat Function HasEnoughRootsOfUnity NeZero LinearMap CommGroup Ideal |
| 335 | |
| 336 | namespace New.IsLocalGalois |
| 337 | |
| 338 | variable {Γ k Ω : Type} [Group Γ] [TopologicalSpace Γ] [Field k] [Field Ω] [Algebra k Ω] |
| 339 | [MulSemiringAction Γ Ω] {A : ValuationSubring Ω} |
| 340 | |
| 341 | /-- Kummer theory. Assume `New.IsLocalGalois Γ k A`: `Ω` is algebraically closed of characteristic |
| 342 | 0, `Γ` is the Galois group of `Ω` over `k` and stabilises the valuation subring `A`, and |
| 343 | `O = New.valRingBelow k A = A ∩ k` is a discrete valuation ring with finite residue field (`k` need |
| 344 | not be complete). For `n ≠ 0`, let `c` be the number of continuous 1-cocycles `Γ → Ωˣ` killed by `n` |
| 345 | (those with values in the `n`-th roots of unity). Then (a) `c > 0`, which says that the group is |
| 346 | finite, since `Nat.card` of an infinite type is `0`; (b) `c = n² · #(O / n O)`. |
| 347 | |
| 348 | It is proved from Hilbert 90, the multiplicativity of `New.cokerKerIndex` along |
| 349 | `1 → kˣ → Ωˣ → Z¹ → 1`, and `New.cokerKerIndex_local_units` on `kˣ`, not from Tate's local Euler |
| 350 | characteristic formula; it is a variant of Kummer theory; it counts 1-cocycles rather than |
| 351 | cohomology classes with values in the n-th roots of unity. -/ |
| 352 | lemma card_kummer_cocycles [hLocal : IsLocalGalois Γ k A] (n : ℕ) [NeZero n] : |
| 353 | let c := Nat.card (n : Module.End ℤ (Z1 (unitsModule Γ).ρ)).ker |
| 354 | -- (a) |
| 355 | 0 < c ∧ |
| 356 | -- (b) |
| 357 | c = n ^ 2 * Nat.card (valRingBelow k A ⧸ span {(n : valRingBelow k A)}) := by |
| 358 | -- By Hilbert 90 the sequence `1 → kˣ → Ωˣ → Z¹ → 1` is exact, and the index `#coker / #ker` of |
| 359 | -- multiplication by `n` is multiplicative in it. On `kˣ`, the group `K` of invariants of `Ωˣ`, |
| 360 | -- it is `n · #(O / n)`. |
| 361 | have h_surj : Surjective (unitsModule Γ).coboundary := |
| 362 | fun f ↦ (hilbert90_unitsRep f).imp (by aesop) |
| 363 | let K : Submodule ℤ (DiscreteUnits Ω) := (unitsRep (Γ := Γ) (Ω := Ω)).invariants |
| 364 | obtain ⟨h_ne, h_units⟩ : cokerKerIndex (n : Module.End ℤ K) ≠ 0 ∧ |
| 365 | cokerKerIndex (n : Module.End ℤ K) = |
| 366 | n * Nat.card (valRingBelow k A ⧸ span {(n : valRingBelow k A)}) := |
| 367 | cokerKerIndex_local_units hLocal n |
| 368 | (AddEquiv.ofBijective _ (DiscreteUnits.ofBase_bijective Γ)).symm |
| 369 | -- The invariants are the kernel of the coboundary map `x ↦ (g ↦ g • x - x)`. |
| 370 | have h_exact : Exact K.subtype (unitsModule Γ).coboundary := by |
| 371 | simp [K, Exact, funext_iff, Subtype.ext_iff, sub_eq_zero] |
| 372 | have h_mul : |
| 373 | cokerKerIndex (n : Module.End ℤ (DiscreteUnits Ω)) = |
| 374 | cokerKerIndex (n : Module.End ℤ K) * |
| 375 | cokerKerIndex (n : Module.End ℤ (Z1 (unitsModule Γ).ρ)) := |
| 376 | cokerKerIndex_mul_of_exact K.subtype _ K.subtype_injective h_exact h_surj h_ne |
| 377 | -- `Ωˣ` is divisible, hence so is its quotient `Z¹`; and `Ωˣ` has `n` elements killed by `n`. |
| 378 | have h_div : Surjective fun x : DiscreteUnits Ω ↦ n • x := fun x ↦ x.exists_nsmul out |
| 379 | have h_div' : Surjective fun f : Z1 (unitsModule Γ).ρ ↦ n • f := |
| 380 | .of_comp (by simpa [comp_def] using h_surj.comp h_div) |
| 381 | -- The `n`-torsion of `DiscreteUnits Ω` is `rootsOfUnity n Ω` after unfolding. |
| 382 | rw [h_units, cokerKerIndex, cokerKerIndex, range_eq_top.mpr h_div, range_eq_top.mpr h_div', |
| 383 | show Nat.card (LinearMap.ker (n : Module.End ℤ (DiscreteUnits Ω))) = n from |
| 384 | natCard_rootsOfUnity Ω n] at h_mul |
| 385 | -- What is left is an equation in `ℚ` for `c`, the number of cocycles killed by `n`. |
| 386 | replace h_mul : (1 : ℚ) / n = n * Nat.card (valRingBelow k A ⧸ span {(n : valRingBelow k A)}) * |
| 387 | (1 / Nat.card (n : Module.End ℤ (Z1 (unitsModule Γ).ρ)).ker) := by |
| 388 | simpa [Nat.card_unique] using h_mul |
| 389 | qify |
| 390 | grind |
| 391 | |
| 392 | /-- Let `k` be a local field with absolute Galois group `Γ` (`New.IsLocalGalois Γ k A`) and let |
| 393 | `n ≠ 0`. The continuous 1-cocycles `Γ → Ωˣ` killed by `n` form a finite group. -/ |
| 394 | lemma finite_ker_natCast_Z1_unitsModule [IsLocalGalois Γ k A] (n : ℕ) [NeZero n] : |
| 395 | Finite (n : Module.End ℤ (Z1 (unitsModule Γ).ρ)).ker := |
| 396 | Nat.finite_of_card_ne_zero (card_kummer_cocycles n).left.ne' |
| 397 | |
| 398 | /-- Assume `New.IsLocalGalois Γ k A`: `Ω` is algebraically closed of characteristic 0, `Γ` is the |
| 399 | Galois group of `Ω` over `k` and stabilises the valuation subring `A`, and |
| 400 | `O = New.valRingBelow k A = A ∩ k` is a discrete valuation ring with finite residue field (`k` need |
| 401 | not be complete). Then for `n ≠ 0`, the number of continuous 1-cocycles `Γ → Ωˣ` killed by `n` is |
| 402 | `n² · #(O / n O)`. -/ |
| 403 | lemma card_ker_natCast_Z1_unitsModule [IsLocalGalois Γ k A] (n : ℕ) [NeZero n] : |
| 404 | Nat.card (n : Module.End ℤ (Z1 (unitsModule Γ).ρ)).ker = |
| 405 | n ^ 2 * Nat.card (valRingBelow k A ⧸ span {(n : valRingBelow k A)}) := |
| 406 | (card_kummer_cocycles n).right |
| 407 | |
| 408 | /-- If `k` is a local field with absolute Galois group `Γ` (`New.IsLocalGalois Γ k A`), then for |
| 409 | every finite discrete `Γ`-module `M` over a commutative ring `R`, the module `Z¹(Γ, M)` of |
| 410 | continuous 1-cocycles is finite. |
| 411 | |
| 412 | A case of the finiteness of Galois cohomology of a local field: degree one, in characteristic 0, |
| 413 | stated for continuous 1-cocycles of a finite module rather than for H¹. -/ |
| 414 | lemma finite_Z1 [IsLocalGalois Γ k A] ⦃R : Type⦄ [CommRing R] (M : DiscreteModule R Γ) |
| 415 | [Finite M] : Finite (Z1 M.ρ) := by |
| 416 | -- Let `U` be an open subgroup acting trivially on `Hom(M, Ωˣ)`. A cocycle `z` is determined by |
| 417 | -- its values on representatives of `Γ / U` and by the cocycles `f ∘ z` of `U` in `Ωˣ`, for `f` |
| 418 | -- in `Hom(M, Ωˣ)`. These are killed by `#M`, so Kummer theory over the fixed field of `U` |
| 419 | -- leaves finitely many of them. |
| 420 | obtain ⟨⟨U, hU_normal⟩, hU⟩ := exists_openNormalSubgroup_apply_eq M.cartierDual.continuous |
| 421 | -- On `U` every `f : M →+ DiscreteUnits Ω` is equivariant (`using!`: the action on |
| 422 | -- `M.cartierDual` in `hU` gives this equation only after unfolding). |
| 423 | have h_equiv (f : M →+ DiscreteUnits Ω) (u : U.toSubgroup) (x : M) : |
| 424 | f (M.ρ u x) = unitsRep u.val (f x) := by |
| 425 | simpa using! congr($(hU _ u.property f) (M.ρ u x)).symm |
| 426 | -- Over the fixed field of `U` the cocycles killed by `#M` form a finite group. |
| 427 | let := (of_finite U).isLocalGalois.finite_ker_natCast_Z1_unitsModule (Nat.card M) |
| 428 | have hz_mul (z : Z1 M.ρ) (g h : Γ) : z.val (g * h) = z.val g + M.ρ g (z.val h) := |
| 429 | z.property.right g h |
| 430 | -- Restrict to `U` and compose with each character of `M`. The resulting cocycles lie in |
| 431 | -- the finite Kummer kernel, so there is no need to enumerate that kernel. |
| 432 | let res (z : Z1 M.ρ) (f : M →+ DiscreteUnits Ω) : |
| 433 | (Nat.card M : Module.End ℤ (Z1 (unitsModule U.toSubgroup).ρ)).ker := |
| 434 | ⟨⟨fun u ↦ f (z.val u), |
| 435 | continuous_of_discreteTopology.comp (z.property.left.comp continuous_subtypeVal), |
| 436 | fun g g' ↦ by simpa [hz_mul z] using! h_equiv f g _⟩, |
| 437 | by simp [Subtype.ext_iff, funext_iff, ← map_nsmul]⟩ |
| 438 | refine .of_injective (fun z ↦ (fun q : Γ ⧸ U.toSubgroup ↦ z.val q.out, res z)) fun y z hyz ↦ ?_ |
| 439 | have h_out_eq : (fun q : Γ ⧸ U.1 ↦ y.val q.out) = fun q ↦ z.val q.out := congrArg Prod.fst hyz |
| 440 | have h_res_eq : res y = res z := congrArg Prod.snd hyz |
| 441 | ext g |
| 442 | obtain ⟨u, hu⟩ := QuotientGroup.mk_out_eq_mul U g |
| 443 | -- Characters with values in `Ωˣ` separate the points of `M`, so `y` and `z` agree on `U`. |
| 444 | have h_res : y.val u = z.val u := by |
| 445 | refine (CommGroup.forall_apply_eq_apply_iff (Multiplicative M) (M := Ω)).mp fun f ↦ ?_ |
| 446 | exact congrArg (fun c ↦ c.val.val u) (congrFun h_res_eq f.toAdditiveRight) |
| 447 | -- On the representative `g * u` of the class of `g`, the two cocycles agree. |
| 448 | have h_rep : y.val (g : Γ ⧸ U.1).out = z.val (g : Γ ⧸ U.1).out := congrFun h_out_eq g |
| 449 | simpa [hz_mul y, hz_mul z, hu, h_res] using h_rep |
| 450 | |
| 451 | end New.IsLocalGalois |
| 452 | |
| 453 | end LocalFiniteness |