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.GroupWithZero.Submonoid.CancelMulZero |
| 4 | import Mathlib.Algebra.Module.StablyFree.Basic |
| 5 | import Mathlib.Algebra.Order.Star.Int |
| 6 | import Mathlib.RingTheory.Etale.Weakly |
| 7 | import Mathlib.RingTheory.Invariant.Profinite |
| 8 | import TauCeti.RingTheory.Invariant.Profinite.Frobenius |
| 9 | import Mathlib.RingTheory.PicardGroup |
| 10 | import Mathlib.RingTheory.TotallySplit |
| 11 | import Mathlib.RingTheory.Valuation.LocalSubring |
| 12 | import Mathlib.Topology.Algebra.Group.SubmonoidClosure |
| 13 | import Mathlib.Topology.Compactness.Paracompact |
| 14 | import Mathlib.Topology.Connected.Separation |
| 15 | import Mathlib.Topology.Separation.CompletelyRegular |
| 16 | import TauCeti.RingTheory.DiscreteValuationRing.Basic |
| 17 | public import Lib.ClassField.GaloisCohomology.ContinuousCocycles |
| 18 | import Lib.ClassField.Places.DecompositionCyclotomic |
| 19 | import Lib.ClassField.Places.ProfiniteGalois |
| 20 | import Lib.ClassField.Places.ValuationSubrings |
| 21 | import Lib.General.Groups.ProfiniteCharacters |
| 22 | import TauCeti.Topology.Algebra.ContinuousMonoidHom.Basic |
| 23 | |
| 24 | /-! |
| 25 | # Local fields: Frobenius, uniformisers, normalised valuation, extensions, unramified characters |
| 26 | |
| 27 | A local field is a field `k` whose absolute Galois group `Γ` acts on an algebraic closure `Ω` and |
| 28 | stabilises a valuation subring `A` of `Ω` (`New.IsLocalGalois`). The trace `O = A ∩ k` |
| 29 | (`New.valRingBelow k A`) must be a discrete valuation ring whose residue field has finite order `q` |
| 30 | (`New.residueCard k A`); completeness is not assumed. `A.valuation` is multiplicative (at most 1 on |
| 31 | `A`). For a uniformiser `π` of `k`, the additive valuation `New.ordRat k A : Ωˣ → ℚ` is normalised |
| 32 | so that `π` has order `1`; it is defined on `DiscreteUnits Ω`, which is `Ωˣ` written additively |
| 33 | (`x.toMul` is the unit). `valuationVia k A c` is `A.valuation` of the image of `c : k` in `Ω`. |
| 34 | |
| 35 | ## Main definitions and results |
| 36 | |
| 37 | * `New.IsLocalGalois.frobenius_spec`: for a henselian local field `k`, `Γ` contains an arithmetic |
| 38 | Frobenius `φ`. The products of a power `φ ^ n` (`n ≥ 0`) with an element of inertia are dense in |
| 39 | `Γ`, and `A` is integral over `A ∩ k`. The three parts are `New.IsLocalGalois.exists_isFrob`, |
| 40 | `New.IsLocalGalois.denseRange_frob_pow_mul_inertia` and |
| 41 | `New.IsLocalGalois.isIntegral_valRingBelow`. |
| 42 | * `New.IsLocalGalois.of_finite`: a finite extension `k'` of `k` is local, and its ramification index |
| 43 | `e` and residue degree `f` satisfy `e * f = [k' : k]`. Moreover `e = 1` if the group of `k'` |
| 44 | contains inertia. |
| 45 | * `New.existsUnique_unramified_char`: for a local field `k` and `r ∈ ℚ/ℤ` there is exactly one |
| 46 | continuous character of its absolute Galois group that is trivial on inertia and sends a given |
| 47 | Frobenius to `r`. It comes from the action on roots of unity of order dividing `q ^ m - 1`, `m` |
| 48 | the order of `r`. `New.unramifiedCharOfFrobValue` assigns this character to `r` additively. |
| 49 | |
| 50 | Notions from other files: |
| 51 | * `New.IsFrob`: `σ` stabilises the valuation subring `A` and `σ • x ≡ x ^ q` modulo the maximal |
| 52 | ideal for all `x ∈ A`. |
| 53 | * `New.IsUniformizer`: `π` is a uniformiser of `K` for `A`: an element of `K` lies in the maximal |
| 54 | ideal of `A` exactly when its valuation is at most that of `π`. |
| 55 | * `New.residueCard k A`: the order of the residue field of A ∩ k (zero if infinite). |
| 56 | * `New.ordRat k A`: the order on Ωˣ normalised on k, chosen so that `n * ordRat k A x = a` exactly |
| 57 | when `x ^ n` and `π ^ a` have the same valuation, for uniformisers `π` of `k`. |
| 58 | * `New.QZ`: the group ℚ/ℤ; it is given the discrete topology. |
| 59 | |
| 60 | ## Relation to the literature |
| 61 | |
| 62 | Known result: Hilbert ramification theory for infinite Galois extensions, here for local fields. |
| 63 | Places are valuation rings of an algebraic closure acted on by an abstract profinite group, and |
| 64 | local fields are only henselian with finite residue field. Source: J. Neukirch, Algebraic Number |
| 65 | Theory, 1999, I §9, II §§7–9, VI §1; J.-P. Serre, Local Fields, 1979, I §7, IV §2; Stacks Project, |
| 66 | tag 09EE. |
| 67 | -/ |
| 68 | |
| 69 | @[expose] public section |
| 70 | |
| 71 | /-! ## Existence of Frobenius; Frobenius and inertia are topological generators -/ |
| 72 | |
| 73 | section LocalFrobenius |
| 74 | |
| 75 | open IsLocalRing FiniteField Polynomial Ideal.Quotient MulSemiringAction Subgroup |
| 76 | |
| 77 | /-- If every element of `Γ` maps the valuation subring `A` of `Ω` to itself, then `A`, as the |
| 78 | subring `New.valRingBelow Ω A` of `Ω`, is stable under `Γ`. -/ |
| 79 | private lemma New.isInvariantSubring_valRingBelow_of_forall_mem_decompGroup {Γ Ω : Type*} |
| 80 | [Group Γ] [Field Ω] [MulSemiringAction Γ Ω] {A : ValuationSubring Ω} |
| 81 | (h_decomp : ∀ g : Γ, g ∈ decompGroup Γ A) : |
| 82 | IsInvariantSubring Γ (valRingBelow Ω A).toSubring := by |
| 83 | constructor |
| 84 | intro g x hx |
| 85 | simpa [mem_decompGroup_iff.mp (h_decomp g) x] using hx |
| 86 | |
| 87 | /-- Let every element of `Γ` map the valuation subring `A` of `Ω` to itself, so that `Γ` acts on |
| 88 | `A` (as the subring `New.valRingBelow Ω A`) and on its residue field. Then `g` is a Frobenius |
| 89 | element for `q` at `A` (`New.IsFrob`) exactly when it acts on the residue field as `y ↦ y ^ q`. -/ |
| 90 | private lemma New.isFrob_iff_forall_smul_residue_eq_pow {Γ Ω : Type*} [Group Γ] [Field Ω] |
| 91 | [MulSemiringAction Γ Ω] {A : ValuationSubring Ω} (h_decomp : ∀ g : Γ, g ∈ decompGroup Γ A) |
| 92 | (g : Γ) (q : ℕ) : |
| 93 | letI := (New.isInvariantSubring_valRingBelow_of_forall_mem_decompGroup |
| 94 | h_decomp).toMulSemiringAction |
| 95 | IsFrob A q g ↔ ∀ y : ResidueField (valRingBelow Ω A), g • y = y ^ q := by |
| 96 | let action_B : MulSemiringAction Γ (valRingBelow Ω A).toSubring := |
| 97 | (New.isInvariantSubring_valRingBelow_of_forall_mem_decompGroup h_decomp).toMulSemiringAction |
| 98 | let B : ValuationSubring Ω := valRingBelow Ω A |
| 99 | -- `g` acts on the residue of `y` through its action on `B`; two residues are equal when the |
| 100 | -- difference has valuation below `1`. |
| 101 | have h_smul_residue (y : B) : g • residue B y = residue B (g • y) := rfl |
| 102 | have h_residue_eq_iff (y z : B) : residue B y = residue B z ↔ A.valuation ((y : Ω) - z) < 1 := |
| 103 | Iff.trans (mk_eq_mk_iff_sub_mem y z) |
| 104 | (Valuation.mem_maximalIdeal_iff Ω (A.valuation.comap (algebraMap Ω Ω))) |
| 105 | unfold IsFrob |
| 106 | rw [and_iff_right (h_decomp g), residue_surjective.forall, Subtype.forall] |
| 107 | refine forall₂_congr fun x hx ↦ ?_ |
| 108 | rw [h_smul_residue, ← map_pow, h_residue_eq_iff] |
| 109 | rfl |
| 110 | |
| 111 | /-- Let `Γ` be the absolute Galois group of a henselian local field `K`, `A` the valuation ring of |
| 112 | the algebraic closure `Ω`, and `q` the order of the residue field of `A ∩ K`. |
| 113 | (a) There is an arithmetic Frobenius: `φ ∈ Γ` with `φ • x ≡ x ^ q` modulo the maximal ideal. |
| 114 | (b) For every such `φ`, the products `φ ^ n * i` (`n ≥ 0`, `i` in inertia) are dense in `Γ`. |
| 115 | (c) Every element of `A` (here `New.valRingBelow Ω A`) is integral over `A ∩ K` |
| 116 | (`New.valRingBelow K A`). -/ |
| 117 | lemma New.IsLocalGalois.frobenius_spec {Γ K Ω : Type*} [Group Γ] [TopologicalSpace Γ] [Field K] |
| 118 | [Field Ω] [Algebra K Ω] [MulSemiringAction Γ Ω] {A : ValuationSubring Ω} |
| 119 | [L : IsLocalGalois Γ K A] : |
| 120 | -- (a) an arithmetic Frobenius exists |
| 121 | (∃ φ : Γ, IsFrob A (residueCard K A) φ) ∧ |
| 122 | -- (b) the products of a power of a Frobenius and an inertia element are dense |
| 123 | (∀ {φ : Γ}, IsFrob A (residueCard K A) φ → |
| 124 | DenseRange fun p : ℕ × inertiaGroup Γ A ↦ φ ^ p.1 * (p.2 : Γ)) ∧ |
| 125 | -- (c) the valuation ring of `Ω` is integral over that of `K` |
| 126 | ∀ x : valRingBelow Ω A, IsIntegral (valRingBelow K A) (x : Ω) := by |
| 127 | -- `Γ` acts on `B = A` with invariants `A ∩ K`, so `B` is integral and `Γ` surjects onto the |
| 128 | -- automorphisms of the residue field `R` over that of `A ∩ K`; a lift of `y ↦ y ^ q` is a |
| 129 | -- Frobenius. For density apply the same surjectivity to the closed subgroup generated by `φ`. |
| 130 | have h_proGalois : IsProGalois Γ K Ω := L.toIsProGalois |
| 131 | let B : ValuationSubring Ω := valRingBelow Ω A |
| 132 | let R : Type _ := ResidueField B |
| 133 | -- with the discrete topology on `B` the action is continuous, since stabilisers are open |
| 134 | let uniformSpace_B : UniformSpace B := ⊥ |
| 135 | let action_B : MulSemiringAction Γ B.toSubring := |
| 136 | (New.isInvariantSubring_valRingBelow_of_forall_mem_decompGroup |
| 137 | L.mem_decompGroup).toMulSemiringAction |
| 138 | have smulCommClass_B : SMulCommClass Γ (valRingBelow K A) B := |
| 139 | ⟨fun g x y ↦ Subtype.ext (smul_comm g x (y : Ω))⟩ |
| 140 | have continuousSMul_B : ContinuousSMul Γ B := continuousSMul_iff_stabilizer_isOpen.mpr fun x ↦ |
| 141 | Subgroup.isOpen_mono (fun g hg ↦ Subtype.ext hg) (L.isOpen_stabilizer (x : Ω)) |
| 142 | have h_inv : Algebra.IsInvariant (valRingBelow K A) B Γ := by |
| 143 | refine ⟨fun ⟨x, hx⟩ h_fix ↦ ?_⟩ |
| 144 | obtain ⟨y, rfl⟩ : ∃ y : K, algebraMap K Ω y = x := |
| 145 | L.isInvariant.isInvariant x fun g ↦ congrArg Subtype.val (h_fix g) |
| 146 | exact ⟨⟨y, hx⟩, rfl⟩ |
| 147 | have h_int : Algebra.IsIntegral (valRingBelow K A) B := h_inv.isIntegral_of_profinite |
| 148 | -- Every `g` stabilises `A`, so `IsFrob` is a condition on the action on the residue field. |
| 149 | have isFrob_iff {g : Γ} {q : ℕ} : IsFrob A q g ↔ ∀ y : R, g • y = y ^ q := |
| 150 | New.isFrob_iff_forall_smul_residue_eq_pow L.mem_decompGroup g q |
| 151 | let k : Type _ := ResidueField (valRingBelow K A) |
| 152 | have finite_k : Finite k := L.finite_residue |
| 153 | let Q : Ideal B := maximalIdeal B |
| 154 | have hQ_under : Q.under (valRingBelow K A) = maximalIdeal (valRingBelow K A) := |
| 155 | Ideal.ext fun x ↦ by simp [Q] |
| 156 | have : Finite (valRingBelow K A ⧸ Q.under (valRingBelow K A)) := by rw [hQ_under]; exact finite_k |
| 157 | have h_arith_iff {g : Γ} : |
| 158 | IsFrob A (residueCard K A) g ↔ IsArithFrobAt (valRingBelow K A) g Q := by |
| 159 | rw [isFrob_iff, residue_surjective.forall] |
| 160 | have hcard : Nat.card (valRingBelow K A ⧸ Q.under (valRingBelow K A)) = residueCard K A := by |
| 161 | rw [hQ_under]; rfl |
| 162 | exact forall_congr' fun x ↦ by rw [← map_pow, ← hcard]; exact Ideal.Quotient.eq |
| 163 | refine ⟨?_, fun {φ} hφ g ↦ ?_, fun x ↦ (h_int.isIntegral x).algebraMap⟩ |
| 164 | · obtain ⟨φ, hφ⟩ := IsArithFrobAt.exists_of_isInvariant_of_profinite (valRingBelow K A) Γ Q |
| 165 | exact ⟨φ, h_arith_iff.mpr hφ⟩ |
| 166 | · open scoped Pointwise in |
| 167 | have hmul := Ideal.topologicalClosure_zpowers_mul_inertia_eq_stabilizer_of_isArithFrobAt |
| 168 | (R := valRingBelow K A) (G := Γ) Q (h_arith_iff.mp hφ) |
| 169 | have hg_stab : g ∈ MulAction.stabilizer Γ Q := |
| 170 | IsLocalRing.map_ringEquiv_maximalIdeal (MulSemiringAction.toRingAut Γ B g) |
| 171 | open scoped Pointwise in |
| 172 | obtain ⟨s, hs, i, hi, rfl⟩ : |
| 173 | g ∈ ((Subgroup.zpowers φ).topologicalClosure : Set Γ) * (Q.inertia Γ : Set Γ) := |
| 174 | hmul.symm ▸ hg_stab |
| 175 | have hi_mem : i ∈ inertiaGroup Γ A := |
| 176 | New.mem_inertiaGroup_iff.mpr <| isFrob_iff.mpr <| residue_surjective.forall.mpr fun x ↦ by |
| 177 | rw [pow_one]; exact Ideal.Quotient.eq.mpr (hi x) |
| 178 | let i' : inertiaGroup Γ A := ⟨i, hi_mem⟩ |
| 179 | simpa using map_mem_closure (continuous_mul_const i) ((closure_range_zpow_eq_pow φ).le hs) |
| 180 | (Set.forall_mem_range.mpr fun n ↦ Set.mem_range_self (n, i')) |
| 181 | |
| 182 | variable {Γ K Ω : Type*} [Group Γ] [TopologicalSpace Γ] [Field K] [Field Ω] [Algebra K Ω] |
| 183 | [MulSemiringAction Γ Ω] {A : ValuationSubring Ω} |
| 184 | |
| 185 | lemma New.IsLocalGalois.exists_isFrob [L : IsLocalGalois Γ K A] : |
| 186 | ∃ φ : Γ, IsFrob A (residueCard K A) φ := |
| 187 | L.frobenius_spec.left |
| 188 | |
| 189 | /-- For an arithmetic Frobenius `φ`, the products `φ ^ n * i` (`n : ℕ`, `i` in the inertia group |
| 190 | of `A`) are dense in `Γ`. -/ |
| 191 | lemma New.IsLocalGalois.denseRange_frob_pow_mul_inertia [L : IsLocalGalois Γ K A] {φ : Γ} |
| 192 | (hφ : IsFrob A (residueCard K A) φ) : |
| 193 | DenseRange fun p : ℕ × inertiaGroup Γ A ↦ φ ^ p.1 * (p.2 : Γ) := by |
| 194 | obtain ⟨-, h_dense, -⟩ := L.frobenius_spec |
| 195 | exact h_dense hφ |
| 196 | |
| 197 | /-- Every element of `A` (as `New.valRingBelow Ω A`) is integral over `New.valRingBelow K A`. -/ |
| 198 | lemma New.IsLocalGalois.isIntegral_valRingBelow [L : IsLocalGalois Γ K A] (x : valRingBelow Ω A) : |
| 199 | IsIntegral (valRingBelow K A) (x : Ω) := by |
| 200 | obtain ⟨-, -, h_int⟩ := L.frobenius_spec |
| 201 | exact h_int x |
| 202 | |
| 203 | end LocalFrobenius |
| 204 | |
| 205 | namespace New |
| 206 | |
| 207 | /-! |
| 208 | ## Uniformisers and the normalised additive valuation |
| 209 | |
| 210 | The idea: the product of the conjugates of x ∈ Ω lies in k and has the valuation of a power of x |
| 211 | (`New.Cohomology.exists_val_eq_pow_index`), so the order of x is a rational number. |
| 212 | -/ |
| 213 | |
| 214 | section LocalValuation |
| 215 | |
| 216 | open IsDiscreteValuationRing Subgroup MulAction Ideal Cohomology Finset Valuation |
| 217 | |
| 218 | variable {Γ k Ω : Type*} [Group Γ] [TopologicalSpace Γ] [Field k] [Field Ω] [Algebra k Ω] |
| 219 | [MulSemiringAction Γ Ω] {A : ValuationSubring Ω} |
| 220 | |
| 221 | /-- A uniformiser `π` of `k` lies in the maximal ideal of `A`: its valuation is below `1`. -/ |
| 222 | lemma IsUniformizer.valuationVia_lt_one {π : k} (h : IsUniformizer A π) : valuationVia k A π < 1 := |
| 223 | (h π).mpr le_rfl |
| 224 | |
| 225 | /-- Two uniformisers of `k` for the same valuation subring `A` have equal valuation. -/ |
| 226 | lemma IsUniformizer.valuationVia_eq {π π' : k} (hπ : IsUniformizer A π) |
| 227 | (hπ' : IsUniformizer A π') : valuationVia k A π = valuationVia k A π' := |
| 228 | ((hπ' π).mp hπ.valuationVia_lt_one).antisymm ((hπ π').mp hπ'.valuationVia_lt_one) |
| 229 | |
| 230 | lemma dvd_iff_valuationVia_le {x y : valRingBelow k A} : |
| 231 | x ∣ y ↔ valuationVia k A y ≤ valuationVia k A x := |
| 232 | (integer.integers _).dvd_iff_le |
| 233 | |
| 234 | /-- Two elements of the valuation subring `A ∩ k` are associated exactly when their valuations |
| 235 | at `A` are equal. -/ |
| 236 | lemma associated_iff_valuationVia_eq {x y : valRingBelow k A} : |
| 237 | Associated x y ↔ valuationVia k A x = valuationVia k A y := by |
| 238 | simp only [← dvd_dvd_iff_associated, ← ge_antisymm_iff, dvd_iff_valuationVia_le] |
| 239 | |
| 240 | /-- If A ∩ k is a discrete valuation ring, then π ∈ k is a uniformiser for A if and only if π |
| 241 | lies in A ∩ k and is irreducible there. -/ |
| 242 | lemma isUniformizer_iff_irreducible [IsDiscreteValuationRing (valRingBelow k A)] {π : k} : |
| 243 | IsUniformizer A π ↔ ∃ h : π ∈ valRingBelow k A, Irreducible (⟨π, h⟩ : valRingBelow k A) := by |
| 244 | -- Unfold both sides to inequalities of the valuation `v` of `A` read on `k`: the maximal ideal of |
| 245 | -- `A ∩ k` is `(π)` when `v a < 1 ↔ v a ≤ v π` for all `a` with `v a ≤ 1`. |
| 246 | -- `↓`: the plain `mem_maximalIdeal_iff` is too late, simp first turns membership into `¬IsUnit` |
| 247 | simp only [irreducible_iff_uniformizer, Ideal.ext_iff, ↓mem_maximalIdeal_iff, mem_span_singleton, |
| 248 | dvd_iff_valuationVia_le, ← comap_apply, IsUniformizer, Subtype.forall, mem_valuationSubring_iff, |
| 249 | exists_prop] |
| 250 | set v : Valuation k A.ValueGroup := A.valuation.comap (algebraMap k Ω) |
| 251 | change (∀ x : k, v x < 1 ↔ v x ≤ v π) ↔ v π ≤ 1 ∧ ∀ a : k, v a ≤ 1 → (v a < 1 ↔ v a ≤ v π) |
| 252 | refine ⟨fun h_unif ↦ ⟨((h_unif π).mpr le_rfl).le, fun a _ ↦ h_unif a⟩, |
| 253 | fun ⟨hπ_le, h_unif⟩ x ↦ ?_⟩ |
| 254 | -- for `v x > 1 ≥ v π` both sides are false |
| 255 | exact if hx : v x ≤ 1 then h_unif x hx |
| 256 | else iff_of_false (fun h_lt ↦ hx h_lt.le) (fun h_le ↦ hx (h_le.trans hπ_le)) |
| 257 | |
| 258 | /-- If all of Γ = Gal(Ω / k) maps the valuation subring A to itself, then for x ∈ Ω the power |
| 259 | x ^ m, with m the number of conjugates of x (the index of its stabiliser), has the valuation of an |
| 260 | element of k. -/ |
| 261 | lemma Cohomology.exists_val_eq_pow_index [h_galois : IsProGalois Γ k Ω] |
| 262 | (h_decomp : ∀ g : Γ, g ∈ decompGroup Γ A) (x : Ω) : |
| 263 | ∃ c : k, valuationVia k A c = A.valuation x ^ (stabilizer Γ x).index := by |
| 264 | -- The product of the finitely many conjugates of `x` is fixed by `Γ`, so it comes from `k`. |
| 265 | let fintype_orbit : Fintype (orbit Γ x) := (isLocallyConstant_smul x).range_finite.fintype |
| 266 | have h_fixed (g : Γ) : g • ∏ y : orbit Γ x, (y : Ω) = ∏ y : orbit Γ x, (y : Ω) := |
| 267 | smul_prod'.trans (Equiv.prod_comp (toPerm g) fun y : orbit Γ x ↦ (y : Ω)) |
| 268 | obtain ⟨c, hc⟩ : ∃ c : k, algebraMap k Ω c = ∏ y : orbit Γ x, (y : Ω) := |
| 269 | h_galois.isInvariant.isInvariant _ h_fixed |
| 270 | -- All of `Γ` is the decomposition group, so every conjugate has the valuation of `x`. |
| 271 | have h_val : ∀ y : orbit Γ x, A y = A x := by |
| 272 | rintro ⟨_, g, rfl⟩ |
| 273 | exact decompGroup.val_smul (h_decomp g) x |
| 274 | refine ⟨c, ?_⟩ |
| 275 | calc valuationVia k A c = ∏ y : orbit Γ x, A y := by simp [valuationVia, hc] |
| 276 | _ = A x ^ (stabilizer Γ x).index := by simp [h_val, index_stabilizer] |
| 277 | |
| 278 | /-- If π is a uniformiser of k for A and x in the valuation ring 𝒪 of k has the valuation of |
| 279 | π^a, then #(𝒪/x) = q^a, with q the order of the residue field. -/ |
| 280 | lemma IsUniformizer.card_quotient_span_eq_pow (L : IsLocalGalois Γ k A) {π : kˣ} |
| 281 | (h : IsUniformizer A π.val) {x : valRingBelow k A} (a : ℕ) |
| 282 | (hx : valuationVia k A x = valuationVia k A π ^ a) : |
| 283 | Nat.card (valRingBelow k A ⧸ span {x}) = residueCard k A ^ a := by |
| 284 | -- `x` generates the `a`-th power of the maximal ideal, which `π` generates. |
| 285 | have h_dvr : IsDiscreteValuationRing (valRingBelow k A) := L.isDiscreteValuationRing |
| 286 | obtain ⟨hπ_mem, hπ_irr⟩ := isUniformizer_iff_irreducible.mp h |
| 287 | have h_span : span {x} = IsLocalRing.maximalIdeal (valRingBelow k A) ^ a := by |
| 288 | -- `x` and `π ^ a` are associated because they have the same valuation. |
| 289 | rw [hπ_irr.maximalIdeal_eq, span_singleton_pow, span_singleton_eq_span_singleton, |
| 290 | associated_iff_valuationVia_eq] |
| 291 | simp [hx, valuationVia] |
| 292 | rw [h_span] |
| 293 | exact TauCeti.IsDiscreteValuationRing.natCard_quotient_maximalIdeal_pow a |
| 294 | |
| 295 | /-- A non-zero element of the local field k has the valuation of an integral power of the |
| 296 | uniformiser π. -/ |
| 297 | lemma IsUniformizer.exists_valuationVia_eq_zpow (L : IsLocalGalois Γ k A) {π : kˣ} |
| 298 | (h : IsUniformizer A π.val) (x : k) (hx : x ≠ 0) : |
| 299 | ∃ a : ℤ, valuationVia k A x = valuationVia k A π ^ a := by |
| 300 | -- In the discrete valuation ring, `x = u • π ^ a` with a unit `u`, of valuation `1`. |
| 301 | have h_dvr : IsDiscreteValuationRing (valRingBelow k A) := L.isDiscreteValuationRing |
| 302 | obtain ⟨hπ_mem, hπ_irr⟩ := isUniformizer_iff_irreducible.mp h |
| 303 | obtain ⟨a, u, rfl⟩ := exists_units_eq_smul_zpow_of_irreducible hπ_irr hx |
| 304 | have hu : valuationVia k A (u : valRingBelow k A) = 1 := |
| 305 | (valuationSubring.integers _).valuation_unit u |
| 306 | exact ⟨a, by simp [Units.smul_def, Algebra.smul_def, valuationVia, hu]⟩ |
| 307 | |
| 308 | /-- Let `Γ` be the Galois group of `Ω / k`, where `Ω` is algebraically closed of characteristic 0, |
| 309 | `Γ` stabilises the valuation subring `A`, and `A ∩ k` is a discrete valuation ring with finite |
| 310 | residue field (`IsLocalGalois`). If `k` has a uniformiser `π`, then there is an additive map `f` |
| 311 | from `Ωˣ` (written additively as `DiscreteUnits Ω`) to `ℚ` with the following property, which |
| 312 | defines `New.ordRat`: for every uniformiser `p` of `k`, every `x`, every `n : ℕ` and every `a : ℤ`, |
| 313 | the `A`-valuation of `x` raised to the power `n` equals `valuationVia k A p ^ a` exactly when |
| 314 | `n * f x = a`. -/ |
| 315 | lemma IsUniformizer.exists_addMonoidHom_valuation_pow_eq_iff (L : IsLocalGalois Γ k A) {π : kˣ} |
| 316 | (h : IsUniformizer A π.val) : |
| 317 | ∃ f : DiscreteUnits Ω →+ ℚ, ∀ p : kˣ, IsUniformizer A p.val → |
| 318 | ∀ (x : DiscreteUnits Ω) (n : ℕ) (a : ℤ), |
| 319 | A.valuation x.toMul ^ n = valuationVia k A p ^ a ↔ n * f x = a := by |
| 320 | -- The product of the `m x` conjugates of `x` has the valuation of `x ^ m x`, and that of some |
| 321 | -- `π ^ b x`; put `f x = b x / m x`. |
| 322 | let m (x : DiscreteUnits Ω) : ℕ := (stabilizer Γ (x.toMul : Ω)).index |
| 323 | have hm (x : DiscreteUnits Ω) : m x ≠ 0 := |
| 324 | index_ne_zero_iff_finite.mpr (quotient_finite_of_isOpen _ (L.isOpen_stabilizer _)) |
| 325 | have hm_ne (x : DiscreteUnits Ω) : (m x : ℚ) ≠ 0 := Nat.cast_ne_zero.mpr (hm x) |
| 326 | have h_norm (x : DiscreteUnits Ω) : |
| 327 | ∃ b : ℤ, A.valuation x.toMul ^ m x = valuationVia k A π ^ b := by |
| 328 | obtain ⟨c, hc⟩ := exists_val_eq_pow_index L.mem_decompGroup (x.toMul : Ω) |
| 329 | have hc_ne : c ≠ 0 := by |
| 330 | rintro rfl |
| 331 | simpa [valuationVia] using hc.ge |
| 332 | rw [← hc] |
| 333 | exact h.exists_valuationVia_eq_zpow L c hc_ne |
| 334 | choose b hb using h_norm |
| 335 | -- In both steps clear denominators and use that `a ↦ v(π) ^ a` is injective, as `0 < v(π) < 1`. |
| 336 | have hπ_pos : 0 < valuationVia k A π := by simp [pos_iff] |
| 337 | have h_inj : Function.Injective fun a : ℤ ↦ valuationVia k A π ^ a := |
| 338 | zpow_right_injective₀ hπ_pos h.valuationVia_lt_one.ne |
| 339 | have h_add (x y : DiscreteUnits Ω) : (b (x + y) / m (x + y) : ℚ) = b x / m x + b y / m y := by |
| 340 | suffices h_int : b (x + y) * m x * m y = m (x + y) * (m y * b x + m x * b y) by |
| 341 | have h_int_ℚ : (b (x + y) : ℚ) * m x * m y = m (x + y) * (m y * b x + m x * b y) := by |
| 342 | exact_mod_cast h_int |
| 343 | field_simp [hm_ne] |
| 344 | linear_combination h_int_ℚ |
| 345 | -- both sides give the valuation of `(x y) ^ (m (x + y) * m x * m y)` |
| 346 | apply h_inj |
| 347 | change valuationVia k A π ^ (b (x + y) * m x * m y) = |
| 348 | valuationVia k A π ^ (m (x + y) * (m y * b x + m x * b y) : ℤ) |
| 349 | simp [zpow_add₀ hπ_pos.ne', zpow_mul, ← hb, mul_comm, pow_right_comm, ← mul_pow] |
| 350 | let f : DiscreteUnits Ω →+ ℚ := .mk' (fun x ↦ b x / m x) h_add |
| 351 | have hf (x : DiscreteUnits Ω) (n : ℕ) (a : ℤ) : |
| 352 | A.valuation x.toMul ^ n = valuationVia k A π ^ a ↔ n * f x = a := by |
| 353 | have h_iff_ℚ : (n : ℚ) * f x = a ↔ n * b x = m x * a := by |
| 354 | rw [show f x = b x / m x from rfl, ← mul_div_assoc, div_eq_iff (hm_ne x), mul_comm (a : ℚ)] |
| 355 | exact_mod_cast Iff.rfl |
| 356 | rw [h_iff_ℚ, ← h_inj.eq_iff, ← pow_left_inj₀ zero_le zero_le (hm x), pow_right_comm, hb x] |
| 357 | -- both sides now compare powers of `v(π)` |
| 358 | simp [zpow_mul, mul_comm] |
| 359 | -- Any two uniformisers have the same valuation, so `f` has the property for every uniformiser. |
| 360 | exact ⟨f, fun p hp ↦ by simpa only [← h.valuationVia_eq hp] using hf⟩ |
| 361 | |
| 362 | /-- Let k be a henselian local field with uniformiser π. For x ∈ Ω^×, n ∈ ℕ and a ∈ ℤ, x^n and π^a |
| 363 | have equal A-valuation if and only if n·ord(x) = a, where ord is the order normalised on k. -/ |
| 364 | lemma IsUniformizer.valuation_pow_eq_zpow_iff_mul_ordRat_eq (L : IsLocalGalois Γ k A) {π : kˣ} |
| 365 | (h : IsUniformizer A π.val) {x : DiscreteUnits Ω} (n : ℕ) (a : ℤ) : |
| 366 | A.valuation x.toMul ^ n = valuationVia k A π ^ a ↔ n * ordRat k A x = a := |
| 367 | valuation_pow_eq_iff_mul_ordRat_eq_of_exists k A (h.exists_addMonoidHom_valuation_pow_eq_iff L) π |
| 368 | h x n a |
| 369 | |
| 370 | /-- Let `k` be a henselian local field with uniformiser `π`. For `x ∈ Ωˣ` and `d ∈ ℤ`, `x` and |
| 371 | `π ^ d` have equal `A`-valuation if and only if `ordRat k A x = d`. -/ |
| 372 | lemma IsUniformizer.valuation_eq_zpow_iff_ordRat_eq (L : IsLocalGalois Γ k A) {π : kˣ} |
| 373 | (h : IsUniformizer A π.val) {x : DiscreteUnits Ω} (d : ℤ) : |
| 374 | A.valuation x.toMul = valuationVia k A π ^ d ↔ ordRat k A x = d := by |
| 375 | simpa only [pow_one, Nat.cast_one, one_mul] using |
| 376 | h.valuation_pow_eq_zpow_iff_mul_ordRat_eq L (x := x) 1 d |
| 377 | |
| 378 | /-- A uniformiser `π` of `k` has order `1` for the order `New.ordRat k A` normalised on `k`. -/ |
| 379 | lemma IsUniformizer.ordRat_eq_one (L : IsLocalGalois Γ k A) {π : kˣ} (h : IsUniformizer A π.val) : |
| 380 | ordRat k A (DiscreteUnits.ofBase Γ Ω (Additive.ofMul π)) = 1 := by |
| 381 | -- `ofBase` sends `π` to its image in `Ω` |
| 382 | have h_val : A ((DiscreteUnits.ofBase Γ Ω (Additive.ofMul π) : DiscreteUnits Ω).toMul : Ω) = |
| 383 | valuationVia k A π := rfl |
| 384 | exact (h.valuation_eq_zpow_iff_ordRat_eq L 1).mp (by simpa using h_val) |
| 385 | |
| 386 | lemma IsLocalGalois.exists_isUniformizer (L : IsLocalGalois Γ k A) : |
| 387 | ∃ π : kˣ, IsUniformizer A π.val := by |
| 388 | have h_dvr : IsDiscreteValuationRing (valRingBelow k A) := L.isDiscreteValuationRing |
| 389 | obtain ⟨π, hπ⟩ := h_dvr.exists_irreducible |
| 390 | exact ⟨.mk0 (π : k) (by simpa using hπ.ne_zero), |
| 391 | isUniformizer_iff_irreducible.mpr ⟨π.property, hπ⟩⟩ |
| 392 | |
| 393 | lemma IsLocalGalois.ordRat_eq_zero (L : IsLocalGalois Γ k A) {x : DiscreteUnits Ω} : |
| 394 | ordRat k A x = 0 ↔ A x.toMul = 1 := by |
| 395 | simpa using (L.exists_isUniformizer.choose_spec.valuation_eq_zpow_iff_ordRat_eq L 0).symm |
| 396 | |
| 397 | end LocalValuation |
| 398 | |
| 399 | /-! ## Finite extensions, ramification index and residue degree -/ |
| 400 | |
| 401 | section LocalExtension |
| 402 | |
| 403 | open Nat IsLocalRing Module Algebra.TensorProduct Ideal Subtype Rat IsIntegralClosure ResidueField |
| 404 | |
| 405 | universe w |
| 406 | |
| 407 | variable {Γ k : Type*} {Ω : Type w} [Group Γ] [TopologicalSpace Γ] [Field k] [Field Ω] |
| 408 | [Algebra k Ω] [MulSemiringAction Γ Ω] {A : ValuationSubring Ω} [G : IsLocalGalois Γ k A] |
| 409 | |
| 410 | /-- The order `q = residueCard k A` of the residue field of `O = A ∩ k` lies in the maximal ideal |
| 411 | of `A`: its valuation `A q` is less than `1`. -/ |
| 412 | lemma valuation_residueCard_lt_one : A (residueCard k A) < 1 := by |
| 413 | -- The order of the residue field is the index of the maximal ideal, and kills `1` modulo it. |
| 414 | -- `residueCard k A` is the order of `O ⧸ maximalIdeal O`, which is this index by definition. |
| 415 | have h_index : (maximalIdeal (valRingBelow k A)).toAddSubgroup.index = residueCard k A := rfl |
| 416 | have h_mem : (residueCard k A : valRingBelow k A) ∈ maximalIdeal (valRingBelow k A) := by |
| 417 | simpa [h_index] using (maximalIdeal (valRingBelow k A)).toAddSubgroup.nsmul_index_mem 1 |
| 418 | simpa using (Valuation.mem_maximalIdeal_iff k (A.valuation.comap (algebraMap k Ω))).mp h_mem |
| 419 | |
| 420 | variable (k A) in |
| 421 | /-- For fields `k` and `k'` inside `Ω`, at the valuation subring `A`: the number `e` is the |
| 422 | ramification index and `f` the residue degree of `k'` over `k`, and their product is `n`. -/ |
| 423 | structure IsRamificationData (k' : Type*) [Field k'] [Algebra k' Ω] (n e f : ℕ) : Prop where |
| 424 | /-- The product of `e` and `f` is `n`. -/ |
| 425 | mul_eq : e * f = n |
| 426 | /-- The orders of the residue fields satisfy `q' = q ^ f`. -/ |
| 427 | residueCard_eq : residueCard k' A = residueCard k A ^ f |
| 428 | /-- The normalised additive valuations satisfy `ord' = e • ord`. -/ |
| 429 | ordRat_eq : ordRat k' A = e • ordRat k A |
| 430 | |
| 431 | variable (k A) in |
| 432 | /-- The field `k'` inside `Ω` is local with group `V ≤ Γ`, and its ramification index, residue |
| 433 | degree and valuation ring are those of an extension of `k` of degree `V.index`. -/ |
| 434 | structure IsLocalExtension (V : Subgroup Γ) (k' : Type*) [Field k'] [Algebra k' Ω] : Prop where |
| 435 | /-- The field `k'` is local with group `V`. -/ |
| 436 | isLocalGalois : IsLocalGalois V k' A |
| 437 | /-- There are `e` and `f` with `e * f = V.index`, and `e = 1` if `V` contains inertia. -/ |
| 438 | exists_isRamificationData : |
| 439 | ∃ e f : ℕ, IsRamificationData k A k' V.index e f ∧ (inertiaGroup Γ A ≤ V → e = 1) |
| 440 | /-- For the valuation rings, `#(O' / n) = #(O / n) ^ V.index`; an infinite order is `0`. -/ |
| 441 | card_quotient (n : ℕ) : |
| 442 | Nat.card (valRingBelow k' A ⧸ span {(n : valRingBelow k' A)}) = |
| 443 | Nat.card (valRingBelow k A ⧸ span {(n : valRingBelow k A)}) ^ V.index |
| 444 | |
| 445 | /-- Let `k` be local (the instance `G`) and `k'` local with group `V`, over `k` inside `Ω`, with |
| 446 | uniformisers `π` of `k` and `π'` of `k'`. If `π` has the valuation of `π' ^ e`, then the orders |
| 447 | normalised on `k'` and on `k` satisfy `ordRat k' A = e • ordRat k A`. -/ |
| 448 | private lemma ordRat_eq_nsmul_ordRat_of_valuationVia_eq_zpow {V : Subgroup Γ} {k' : Type*} |
| 449 | [Field k'] [Algebra k' Ω] [Algebra k k'] [IsScalarTower k k' Ω] (L : IsLocalGalois V k' A) |
| 450 | {π : kˣ} (hπ : IsUniformizer A π.val) {π' : k'ˣ} (hπ' : IsUniformizer A π'.val) {e : ℕ} |
| 451 | (hπ_val : valuationVia k' A (algebraMap k k' π) = valuationVia k' A π'.val ^ (e : ℤ)) : |
| 452 | ordRat k' A = e • ordRat k A := by |
| 453 | refine AddMonoidHom.ext fun x ↦ ?_ |
| 454 | -- `n * ord x = a` means that `x ^ n` has the valuation of the `a`-th power of a uniformiser. |
| 455 | -- With `ordRat k A x = a / d`, `x ^ d` has the valuation of `π ^ a`, that is of `π' ^ (e * a)`, |
| 456 | -- so `d * ordRat k' A x = e * a`. |
| 457 | set r : ℚ := ordRat k A x |
| 458 | have h_π : valuationVia k A π.val = valuationVia k' A π'.val ^ (e : ℤ) := by |
| 459 | simpa [valuationVia, IsScalarTower.algebraMap_apply k k' Ω] using hπ_val |
| 460 | have h_k' : A.valuation x.toMul ^ r.den = valuationVia k' A π'.val ^ ((e : ℤ) * r.num) := by |
| 461 | rw [zpow_mul, ← h_π] |
| 462 | exact (hπ.valuation_pow_eq_zpow_iff_mul_ordRat_eq G r.den r.num).mpr (den_mul_eq_num r) |
| 463 | have h_mul : (r.den : ℚ) * ordRat k' A x = ((e : ℤ) * r.num : ℤ) := |
| 464 | (hπ'.valuation_pow_eq_zpow_iff_mul_ordRat_eq L r.den _).mp h_k' |
| 465 | change ordRat k' A x = e • r |
| 466 | refine mul_left_cancel₀ (a := (r.den : ℚ)) (by positivity) ?_ |
| 467 | rw [h_mul, nsmul_eq_mul, Int.cast_mul, Int.cast_natCast, ← den_mul_eq_num r] |
| 468 | ring |
| 469 | |
| 470 | /-- If an open subgroup `V` of `Γ` contains inertia and the power `σ ^ f` (`f ≠ 0`) of an |
| 471 | arithmetic Frobenius `σ`, then `V` has index at most `f`. -/ |
| 472 | private lemma index_le_of_isFrob_pow_mem {V : OpenSubgroup Γ} {σ : Γ} |
| 473 | (hσ : IsFrob A (residueCard k A) σ) {f : ℕ} [NeZero f] |
| 474 | (h_ine : inertiaGroup Γ A ≤ (V : Subgroup Γ)) (h_pow : σ ^ f ∈ (V : Subgroup Γ)) : |
| 475 | V.index ≤ f := by |
| 476 | -- The elements `σ ^ m * g` with `g` in inertia are dense, and lie in the coset of `σ ^ (m % f)`. |
| 477 | have h_cover (γ : Γ) : |
| 478 | (γ : Γ ⧸ (V : Subgroup Γ)) ∈ |
| 479 | Set.range fun i : Fin f ↦ ((σ ^ i.val : Γ) : Γ ⧸ (V : Subgroup Γ)) := by |
| 480 | refine isClosed_property (G.denseRange_frob_pow_mul_inertia hσ) |
| 481 | ((Set.finite_range _).isClosed.preimage (by fun_prop)) |
| 482 | (fun ⟨m, g⟩ ↦ ⟨.ofNat f m, ?_⟩) γ |
| 483 | -- `σ ^ (m % f)` and `σ ^ m * g` lie in the same coset, as `σ ^ f ∈ V` and `g ∈ V`. |
| 484 | have h_coset : ((σ ^ (m % f) : Γ) : Γ ⧸ (V : Subgroup Γ)) = |
| 485 | ((σ ^ m * (g : Γ) : Γ) : Γ ⧸ (V : Subgroup Γ)) := by |
| 486 | simp [mod_def, h_ine g.property, h_pow, pow_sub, mul_div_le, pow_mul, pow_mem] |
| 487 | simpa using h_coset |
| 488 | simpa [Subgroup.index] using card_le_card_of_surjective |
| 489 | (fun i : Fin f ↦ ((σ ^ i.val : Γ) : Γ ⧸ (V : Subgroup Γ))) (Quotient.ind h_cover) |
| 490 | |
| 491 | /-- A finite extension of a local field is local. Here `Γ` is the Galois group of an algebraically |
| 492 | closed field `Ω` of characteristic 0 over `k`, stabilising the valuation subring `A`, with `A ∩ k` a |
| 493 | discrete valuation ring with finite residue field. Given an open subgroup `V` of `Γ` and a finite |
| 494 | extension `k'` of `k` inside `Ω` with Galois group `V`, the claim is that `k'` is local in the same |
| 495 | sense with group `V` and ring `A`, and that its ramification index, residue degree and valuation |
| 496 | ring are those of an extension of `k` of degree `V.index`. -/ |
| 497 | lemma IsLocalGalois.isLocalExtension (V : OpenSubgroup Γ) (k' : Type*) [Field k'] [Algebra k' Ω] |
| 498 | [IsProGalois (V : Subgroup Γ) k' Ω] [Algebra k k'] [IsScalarTower k k' Ω] |
| 499 | [FiniteDimensional k k'] : |
| 500 | IsLocalExtension k A (V : Subgroup Γ) k' := by |
| 501 | -- The valuation ring `P` of `k'` is the integral closure of the ring `O` of `k`, hence free of |
| 502 | -- rank `[k' : k]` over `O`. Counting `O / π` and `P / π` gives `e * f = [k' : k]`; if `V` |
| 503 | -- contains inertia, then `Γ / V` has at most `f` elements, since the powers of a Frobenius `σ` |
| 504 | -- meet every coset and `σ ^ f ∈ V`. |
| 505 | have h_dvr : IsDiscreteValuationRing (valRingBelow k A) := G.isDiscreteValuationRing |
| 506 | have h_fin : Finite (ResidueField (valRingBelow k A)) := G.finite_residue |
| 507 | obtain ⟨π, hπ⟩ : ∃ π : kˣ, IsUniformizer A π.val := G.exists_isUniformizer |
| 508 | obtain ⟨σ, hσ⟩ : ∃ σ : Γ, IsFrob A (residueCard k A) σ := G.exists_isFrob |
| 509 | have h_index : V.index = finrank k k' := |
| 510 | (eq_fixingSubgroup_of_isProGalois (V := (V : Subgroup Γ))).right |
| 511 | let O : ValuationSubring k := valRingBelow k A |
| 512 | let P : ValuationSubring k' := valRingBelow k' A |
| 513 | have charZero_k : CharZero k := (algebraMap k Ω).charZero |
| 514 | -- each `x : P` is integral over `O` in `Ω`, hence in `k'`, hence in `P` |
| 515 | have isIntegral_OP : Algebra.IsIntegral O P := |
| 516 | ⟨fun x ↦ (G.isIntegral_valRingBelow ⟨algebraMap k' Ω x, x.property⟩).tower_bot_of_field |
| 517 | |>.tower_bot val_injective⟩ |
| 518 | have isNoetherian_OP : IsNoetherian O P := isNoetherian O k k' P |
| 519 | have isNoetherianRing_P : IsNoetherianRing P := isNoetherianRing O k k' P |
| 520 | have faithfulSMul_OP : FaithfulSMul O P := .tower_bot O P k' |
| 521 | -- `P` is a noetherian valuation ring, not a field, with residue field finite over that of `O`. |
| 522 | have L : IsLocalGalois (V : Subgroup Γ) k' A := |
| 523 | { mem_decompGroup := fun g ↦ G.mem_decompGroup g |
| 524 | isDiscreteValuationRing := |
| 525 | { not_a_field' := ne_bot_of_liesOver_of_ne_bot h_dvr.not_a_field' _ } |
| 526 | finite_residue := finite_of_finite h_fin } |
| 527 | obtain ⟨π', hπ'⟩ := L.exists_isUniformizer |
| 528 | -- `P / x = (O / x) ⊗ P` is free of rank `[k' : k]` over `O / x`. |
| 529 | have h_card (x : O) : |
| 530 | Nat.card (P ⧸ span {algebraMap O P x}) = Nat.card (O ⧸ span {x}) ^ V.index := by |
| 531 | have h_equiv : Nat.card (P ⧸ (span {x}).map (algebraMap O P)) = |
| 532 | Nat.card (Fin (finrank O P) → O ⧸ span {x}) := |
| 533 | card_congr ((quotIdealMapEquivQuotTensor P (span {x})).toEquiv.trans |
| 534 | (basis (O ⧸ span {x}) (finBasis O P)).equivFun.toEquiv) |
| 535 | simpa [map_span, card_fun, h_index, IsFractionRing.finrank_eq O k P k'] using h_equiv |
| 536 | -- The ramification index `e`: `π` has the valuation of `π' ^ e`, and `e ≥ 0` as `π` is integral. |
| 537 | obtain ⟨e, he⟩ : ∃ e : ℤ, valuationVia k' A (algebraMap k k' π) = valuationVia k' A π' ^ e := |
| 538 | hπ'.exists_valuationVia_eq_zpow L _ (by simp) |
| 539 | -- `v(π') ^ e = v(π) ≤ 1` and `v(π') < 1`. |
| 540 | have he_nonneg : 0 ≤ e := by |
| 541 | simpa [pos_iff_ne_zero, hπ'.valuationVia_lt_one, valuationVia, he, |
| 542 | IsScalarTower.algebraMap_apply k k' Ω] |
| 543 | using hπ.valuationVia_lt_one.le |
| 544 | lift e to ℕ using he_nonneg |
| 545 | let f : ℕ := finrank (ResidueField O) (ResidueField P) |
| 546 | have hq : residueCard k' A = residueCard k A ^ f := natCard_eq_pow_finrank |
| 547 | -- Put `q = residueCard k A`. By `IsUniformizer.card_quotient_span_eq_pow`, `O / π` has `q` |
| 548 | -- elements and `P / π` has `(q ^ f) ^ e`; by `h_card` the latter has `q ^ V.index`. |
| 549 | have h_ef : e * f = V.index := by |
| 550 | let π₀ : O := ⟨π, hπ.valuationVia_lt_one.le⟩ |
| 551 | have h_count : residueCard k' A ^ e = Nat.card (O ⧸ span {π₀}) ^ V.index := by |
| 552 | rw [← h_card π₀, hπ'.card_quotient_span_eq_pow L e he] |
| 553 | refine Nat.pow_right_injective h_fin.one_lt_card ?_ |
| 554 | simpa [O, π₀, pow_mul', hq, hπ.card_quotient_span_eq_pow G 1] using h_count |
| 555 | refine ⟨L, ⟨e, f, ⟨h_ef, hq, ordRat_eq_nsmul_ordRat_of_valuationVia_eq_zpow L hπ hπ' he⟩, |
| 556 | fun (h_ine : inertiaGroup Γ A ≤ (V : Subgroup Γ)) ↦ ?_⟩, fun n ↦ mod_cast h_card n⟩ |
| 557 | -- `σ ^ f` and a Frobenius `τ ∈ V` of `k'` differ by an element of inertia. |
| 558 | obtain ⟨τ, hτ⟩ : ∃ τ : (V : Subgroup Γ), IsFrob A (residueCard k' A) τ := L.exists_isFrob |
| 559 | have h_pow : σ ^ f ∈ (V : Subgroup Γ) := by |
| 560 | have h_frob : IsFrob A (residueCard k' A) (σ ^ f) := by simpa only [hq] using hσ.pow f |
| 561 | simpa [mul_mem_cancel_right τ.property] using h_ine (h_frob.inv_mul_mem_inertiaGroup hτ) |
| 562 | have h_pos : 0 < V.index := h_index.trans_gt finrank_pos |
| 563 | have neZero_f : NeZero f := ⟨by lia⟩ |
| 564 | have h_le : V.index ≤ f := index_le_of_isFrob_pow_mem hσ h_ine h_pow |
| 565 | -- `0 < e * f = V.index ≤ f` forces `e = 1`. |
| 566 | nlinarith |
| 567 | |
| 568 | /-- A finite extension of a local field is local: `New.IsLocalGalois.isLocalExtension`, with `k'` by |
| 569 | default the fixed field in `Ω` of the open subgroup `V` of `Γ`. -/ |
| 570 | lemma IsLocalGalois.of_finite (V : OpenSubgroup Γ) |
| 571 | (k' : Type w := fixedFieldOf (V : Subgroup Γ)) [Field k'] [Algebra k' Ω] |
| 572 | [IsProGalois (V : Subgroup Γ) k' Ω] [Algebra k k'] [IsScalarTower k k' Ω] |
| 573 | [FiniteDimensional k k'] : |
| 574 | IsLocalExtension k A (V : Subgroup Γ) k' := |
| 575 | G.isLocalExtension V k' |
| 576 | |
| 577 | /-- The fixed field of an open subgroup `V` of `Γ` is local, a finite extension of `k` |
| 578 | (`New.IsLocalExtension`). -/ |
| 579 | lemma IsLocalGalois.isLocalExtension_fixedFieldOf (V : OpenSubgroup Γ) : |
| 580 | IsLocalExtension k A (V : Subgroup Γ) (fixedFieldOf (V : Subgroup Γ)) := |
| 581 | G.isLocalExtension V (fixedFieldOf (V : Subgroup Γ)) |
| 582 | |
| 583 | /-- Over a local field `k`, an element of `Ωˣ` fixed by the inertia group has integral order, |
| 584 | for the order normalised on `k`. -/ |
| 585 | lemma IsLocalGalois.exists_ordRat_eq_intCast {x : DiscreteUnits Ω} |
| 586 | (h_fixed : ∀ g ∈ inertiaGroup Γ A, unitsRep g x = x) : |
| 587 | ∃ n : ℤ, ordRat k A x = n := by |
| 588 | -- The field fixed by the stabiliser `V` of `x` contains `x` and is unramified over `k`, so its |
| 589 | -- normalised order agrees with that of `k`. |
| 590 | let V : OpenSubgroup Γ := ⟨MulAction.stabilizer Γ (x.toMul : Ω), G.isOpen_stabilizer _⟩ |
| 591 | have h_ext := G.isLocalExtension_fixedFieldOf V |
| 592 | obtain ⟨e, f, h_data, h_unram⟩ := h_ext.exists_isRamificationData |
| 593 | obtain rfl := h_unram fun g hg ↦ congrArg (fun y : DiscreteUnits Ω ↦ y.toMul.val) (h_fixed g hg) |
| 594 | obtain ⟨π, hπ⟩ := h_ext.isLocalGalois.exists_isUniformizer |
| 595 | -- In that field `x` has the valuation of an integral power `π ^ n`. |
| 596 | obtain ⟨n, hn⟩ := hπ.exists_valuationVia_eq_zpow h_ext.isLocalGalois |
| 597 | ⟨x.toMul, fun g ↦ g.property⟩ (fun h ↦ x.toMul.ne_zero (congrArg Subtype.val h)) |
| 598 | have h_eq := (hπ.valuation_eq_zpow_iff_ordRat_eq h_ext.isLocalGalois (x := x) n).mp hn |
| 599 | exact ⟨n, by simpa [h_data.ordRat_eq] using h_eq⟩ |
| 600 | |
| 601 | end LocalExtension |
| 602 | |
| 603 | /-! |
| 604 | ## Unramified characters with a given value at Frobenius |
| 605 | -/ |
| 606 | |
| 607 | section UnramifiedCharacters |
| 608 | |
| 609 | variable {Γ Ω k : Type*} [Group Γ] [TopologicalSpace Γ] [Field k] [Field Ω] [Algebra k Ω] |
| 610 | [MulSemiringAction Γ Ω] {A : ValuationSubring Ω} [L : IsLocalGalois Γ k A] |
| 611 | |
| 612 | /-- Continuous characters into `ℚ/ℤ` that agree on arithmetic Frobenius and inertia agree on |
| 613 | the whole local Galois group. -/ |
| 614 | private lemma qzChar_eq_of_agree_on_frobenius_and_inertia {φ : Γ} |
| 615 | (hφ : IsFrob A (residueCard k A) φ) {a b : QZChar Γ} |
| 616 | (h_frob : a.val φ = b.val φ) |
| 617 | (h_inertia : ∀ g ∈ inertiaGroup Γ A, a.val g = b.val g) : a = b := by |
| 618 | -- Powers of Frobenius times inertia elements form a dense set. |
| 619 | refine Subtype.ext ((L.denseRange_frob_pow_mul_inertia hφ).equalizer |
| 620 | (QZChar.continuous_val a) (QZChar.continuous_val b) ?_) |
| 621 | ext ⟨n, g⟩ |
| 622 | apply Multiplicative.ofAdd.injective |
| 623 | change QZChar.toHom a (φ ^ n * (g : Γ)) = QZChar.toHom b (φ ^ n * (g : Γ)) |
| 624 | simp only [map_mul, map_pow, QZChar.toHom_apply, h_frob, h_inertia _ g.property] |
| 625 | |
| 626 | /-- Let `Γ` be the absolute Galois group of a local field `k` and `φ` an arithmetic Frobenius |
| 627 | (`New.IsFrob` for `q = residueCard k A`). For every `r` in `QZ = ℚ/ℤ` there is exactly one |
| 628 | continuous character `χ : Γ → ℚ/ℤ` (an element of `New.QZChar Γ`, applied as `χ.val`) that is |
| 629 | trivial on inertia and has `χ φ = r`. -/ |
| 630 | lemma existsUnique_unramified_char {φ : Γ} (hφ : IsFrob A (residueCard k A) φ) (r : QZ) : |
| 631 | ∃! χ : QZChar Γ, (∀ g ∈ inertiaGroup Γ A, χ.val g = 0) ∧ χ.val φ = r := by |
| 632 | -- Let `m` be the order of `r` and `N = q ^ m - 1`. The action on the `N`-th roots of unity is |
| 633 | -- unramified, and a character of `(ℤ/N)ˣ` takes the image of `φ` to `r`. |
| 634 | have h_fin : Finite (IsLocalRing.ResidueField (valRingBelow k A)) := L.finite_residue |
| 635 | have hq : 1 < residueCard k A := Finite.one_lt_card |
| 636 | have hN_pos : 0 < residueCard k A ^ addOrderOf r - 1 := by simp [hq, r.isAddTorsion] |
| 637 | let N : ℕ+ := ⟨residueCard k A ^ addOrderOf r - 1, hN_pos⟩ |
| 638 | -- `N` is a unit of `A`, as `q` lies in the maximal ideal. |
| 639 | have hN : A N = 1 := by |
| 640 | simp [N, Valuation.map_sub_eq_of_lt_right, pow_lt_one', r.isAddTorsion, |
| 641 | valuation_residueCard_lt_one] |
| 642 | -- Let `n` be the order of the image of `φ`. Then `φ ^ n`, a `q ^ n`-Frobenius, fixes the `N`-th |
| 643 | -- roots of unity, so `q ^ m - 1 ∣ q ^ n - 1`, and `m ∣ n`. |
| 644 | have order_dvd : addOrderOf r ∣ orderOf (cyclotomicCharMod Ω N φ) := by |
| 645 | have h_mod : residueCard k A ^ orderOf (cyclotomicCharMod Ω N φ) ≡ 1 [MOD N] := |
| 646 | ((hφ.pow _).mem_ker_cyclotomicCharMod_iff hN).mp (by simp) |
| 647 | simpa [Nat.dvd_iff_mod_eq_zero, Nat.sub_eq_iff_eq_add, NeZero.one_le, N, hq.ne'] using |
| 648 | h_mod.symm.dvd' |
| 649 | -- So `i ↦ i • r` factors through the powers of the image of `φ`, and it extends to `(ℤ/N)ˣ` |
| 650 | -- because `ℚ/ℤ` is divisible. |
| 651 | have h_ker : (zmultiplesHom (Additive (ZMod N)ˣ) (.ofMul (cyclotomicCharMod Ω N φ))).ker ≤ |
| 652 | (zmultiplesHom QZ r).ker := by |
| 653 | simpa [zmultiplesHom_ker_eq, Int.mem_zmultiples_iff, Int.ofNat_dvd] using order_dvd |
| 654 | obtain ⟨e, he⟩ : |
| 655 | ∃ e : Additive (ZMod N)ˣ →+ QZ, ∀ i : ℤ, e (i • .ofMul (cyclotomicCharMod Ω N φ)) = i • r := |
| 656 | QZ.exists_extend _ _ h_ker |
| 657 | have h_cont := (cyclotomicCharMod Ω N : Γ →* (ZMod N)ˣ).continuous_of_isOpen_ker Fact.out |
| 658 | let χ : QZChar Γ := |
| 659 | ⟨(e ∘ .ofMul) ∘ cyclotomicCharMod Ω N, .comp (by fun_prop) h_cont, by simp⟩ |
| 660 | refine existsUnique_of_exists_of_unique ⟨χ, fun g hg ↦ ?_, ?_⟩ fun a b ha hb ↦ |
| 661 | qzChar_eq_of_agree_on_frobenius_and_inertia hφ (ha.2.trans hb.2.symm) fun g hg ↦ |
| 662 | (ha.1 g hg).trans (hb.1 g hg).symm |
| 663 | · simp [χ, cyclotomicCharMod_eq_one_of_mem_inertiaGroup hg hN] |
| 664 | · simpa [χ] using he 1 |
| 665 | |
| 666 | /-- The additive map sending `r` to the unramified character with Frobenius value `r`. -/ |
| 667 | noncomputable def unramifiedCharOfFrobValue {φ : Γ} |
| 668 | (hφ : IsFrob A (residueCard k A) φ) : QZ →+ QZChar Γ := by |
| 669 | choose χ hχ h_unique using existsUnique_unramified_char hφ |
| 670 | refine AddMonoidHom.mk' χ fun r s ↦ (h_unique _ _ ⟨?_, ?_⟩).symm |
| 671 | · intro g hg |
| 672 | change (χ r).val g + (χ s).val g = 0 |
| 673 | rw [(hχ r).1 g hg, (hχ s).1 g hg, add_zero] |
| 674 | · change (χ r).val φ + (χ s).val φ = r + s |
| 675 | rw [(hχ r).2, (hχ s).2] |
| 676 | |
| 677 | /-- The character assigned to `r` vanishes on inertia and sends Frobenius to `r`. -/ |
| 678 | lemma unramifiedCharOfFrobValue_spec {φ : Γ} (hφ : IsFrob A (residueCard k A) φ) (r : QZ) : |
| 679 | (∀ g ∈ inertiaGroup Γ A, (unramifiedCharOfFrobValue hφ r).val g = 0) ∧ |
| 680 | (unramifiedCharOfFrobValue hφ r).val φ = r := |
| 681 | (existsUnique_unramified_char hφ r).choose_spec.1 |
| 682 | |
| 683 | /-- An unramified character is recovered from its value at any arithmetic Frobenius. -/ |
| 684 | lemma unramifiedCharOfFrobValue_eq {φ φ' : Γ} (hφ : IsFrob A (residueCard k A) φ) |
| 685 | (hφ' : IsFrob A (residueCard k A) φ') {χ : QZChar Γ} |
| 686 | (hχ : inertiaGroup Γ A ≤ QZChar.ker χ) : |
| 687 | unramifiedCharOfFrobValue hφ (χ.val φ') = χ := |
| 688 | ((existsUnique_unramified_char hφ (χ.val φ')).choose_spec.2 χ |
| 689 | ⟨hχ, (QZChar.toHom χ).eq_iff.mpr (hχ (hφ'.inv_mul_mem_inertiaGroup hφ))⟩).symm |
| 690 | |
| 691 | end UnramifiedCharacters |
| 692 | |
| 693 | end New |