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 TauCeti.NumberTheory.PrimitivePrimeDivisors.Zsigmondy |
| 4 | import Mathlib.Algebra.Order.Star.Rat |
| 5 | import Mathlib.FieldTheory.Galois.Profinite |
| 6 | import Mathlib.GroupTheory.CosetCover |
| 7 | import Mathlib.NumberTheory.NumberField.Cyclotomic.Ideal |
| 8 | import Mathlib.RingTheory.Fintype |
| 9 | public import Lib.ClassField.Local.ArtinMap |
| 10 | import Lib.Adelic.Adeles.LocalFactors |
| 11 | import Lib.ClassField.Global.AlbertBrauerHasseNoether |
| 12 | import Lib.ClassField.Global.ArtinMap |
| 13 | import Lib.ClassField.Local.InvariantMap |
| 14 | import Lib.ClassField.Places.LocalFields |
| 15 | import Lib.ClassField.Places.TameInertia |
| 16 | |
| 17 | /-! |
| 18 | # Artin's reciprocity law and the sign law |
| 19 | |
| 20 | Global reciprocity for a number field `K` with absolute Galois group `Γ`, on finite ideles. |
| 21 | |
| 22 | ## Overview of this theory |
| 23 | |
| 24 | Class field theory, local duality and Hecke `L`-functions, in the cases that the proof uses. Here |
| 25 | `K` is a number field and `Γ` an absolute Galois group. |
| 26 | |
| 27 | * `New.IsHeckeOfType.eulerProd_ne_zero`: for a Hecke character `ψ` of `K` whose infinity type is |
| 28 | given by an integer at each infinite place, with `ψ ^ 2 ≠ 1`, and a finite set `S` of primes, the |
| 29 | partial `L`-function `L^S(s, ψ)` is nonzero for real `s ≥ 1`. |
| 30 | * `New.IsLocalGalois.classOfInvariant_bijective`: for a henselian local field `k` of characteristic |
| 31 | `0`, not necessarily complete, the map from `ℚ/ℤ` to `H²(Γ, k̄ˣ)` is bijective. So the Brauer |
| 32 | group of `k` is `ℚ/ℤ`. |
| 33 | * `New.exists_comp_artinMap`: for totally complex `K`, a continuous homomorphism from the finite |
| 34 | ideles `𝔸_fˣ` to a `T₁` group that is trivial on `Kˣ` factors continuously through `Art`. |
| 35 | * `New.card_mul_card_le_of_orthogonal`: let `k` be local with valuation ring `O`, `l` a prime with |
| 36 | `#(O/l) = l ^ d`, and `M` a finite Galois module killed by `l ^ r`. Suppose `M` is fixed by a |
| 37 | subgroup `Q` containing an `l`-power of every element. If groups of 1-cocycles `X` in |
| 38 | `Hom(M, k̄ˣ)` and `W` in `M` are orthogonal under cup product, then `#X · #W ≤ #M ^ (2 + d)`. |
| 39 | * `New.RelationSetting.exists_card_cocycles_le`: let `K` be totally complex and `M` finite, killed |
| 40 | by `ℓ ^ r`, unramified outside a finite set `S`, with local conditions at `S` that contain the |
| 41 | coboundaries. Relations are equivariant homomorphisms from an open normal subgroup `U` to the dual |
| 42 | of `M` that obey the reciprocity law at the primes split for `U`. If some element is central |
| 43 | modulo `U`, fixes the roots of unity of `ℓ`-power order and fixes no nonzero vector, the number of |
| 44 | relations is bounded from below by the number of Selmer cocycles and the local terms. |
| 45 | |
| 46 | These replace local and global class field theory (finite ideles only, no Weil group), local Tate |
| 47 | duality and the Greenberg–Wiles formula (inequalities for cocycles; no perfect pairing, no dual |
| 48 | Selmer group), and the continuation of Hecke `L`-functions (infinity type given by integers, real |
| 49 | `s` only). |
| 50 | |
| 51 | `Places` and `GaloisCohomology` give the setting. `Local` builds the invariant and the local Artin |
| 52 | map, and `LocalDuality` counts by Kummer theory and dévissage. In `Global`, prime densities from |
| 53 | `HeckeL` give the second inequality. This gives Chebotarev and, with Tate's index formula for |
| 54 | `S`-units, Albert–Brauer–Hasse–Noether. Norm and existence theorems come next. `GreenbergWiles` |
| 55 | counts cocycles by `S`-units and power residue reciprocity. `Grunwald`, `Avatar` and |
| 56 | `HeckeCharacter` hold applications. `New.exists_avatar` is in `Lib.PadicHodge.Characters`. |
| 57 | |
| 58 | ## This file |
| 59 | |
| 60 | * `New.artin_reciprocity`: if the symbol `(ξ, x)` dies on an open subgroup containing the complex |
| 61 | conjugations, the character `ξ` kills the Artin symbol of `x ∈ Kˣ`. This applies when `ξ` kills |
| 62 | the conjugations (`New.abelianLift_artinMap_principalIdele_eq_one`) or `x` is totally positive |
| 63 | (`New.artinMap_principalIdele_eq_one_of_isTotallyPositive`). |
| 64 | * `New.abelianLift_artinMap_principalIdele_eq_one_iff`: the sign law for characters nontrivial on |
| 65 | all conjugations. |
| 66 | |
| 67 | The case `K(μ_q)` is `New.artin_reciprocity_cyclotomic`. Characters `χ : New.QZChar Γ` are |
| 68 | continuous with values in `ℚ/ℤ`. `New.QZChar.abelianLift χ` is the induced map on the |
| 69 | abelianisation, written multiplicatively. `artinMap Γ (principalIdele x)` is the Artin symbol of the |
| 70 | finite idele of `x`. Only `Γ` is an explicit argument of `artinMap`; `ideleAt v` takes the component |
| 71 | at `v` of an idele. There are no components at the real places. |
| 72 | |
| 73 | Notions from other files: |
| 74 | * `New.IsProGalois`: a profinite group acts on the Galois extension Ω/K (Ω the fixed algebraic |
| 75 | closure of ℚ; `EmbeddedNumberField K` puts the number field `K` inside Ω) as its Galois group, |
| 76 | with open stabilisers. |
| 77 | * `New.cyclicClass`: The symbol (χ, w) = δχ ∪ w in H²(Γ, M) of a character χ : Γ → ℚ/ℤ and an |
| 78 | invariant w; here M = Ωˣ (`New.unitsModule`), and `DiscreteUnits.ofBase` sends `x ∈ Kˣ` to an |
| 79 | invariant of Ωˣ, and `resH2` restricts classes to a subgroup. |
| 80 | * `New.artinAt`: The local Artin map K_v^× → Γ^ab, through the decomposition group of the chosen |
| 81 | valuation subring `New.placeOver v` over v. |
| 82 | |
| 83 | ## Relation to the literature |
| 84 | |
| 85 | Known; see `Lib.ClassField.Global.AlbertBrauerHasseNoether` for sources. |
| 86 | -/ |
| 87 | |
| 88 | @[expose] public section |
| 89 | |
| 90 | namespace New |
| 91 | |
| 92 | open NumberField Set Subgroup QZChar QZ Nat Algebra IsCyclotomicExtension Cohomology |
| 93 | MulSemiringAction HeightOneSpectrum Polynomial Valuation IsAlgClosed ZMod |
| 94 | |
| 95 | variable {Γ K : Type} [Group Γ] [TopologicalSpace Γ] [Field K] [EmbeddedNumberField K] |
| 96 | [MulSemiringAction Γ Ω] [IsProGalois Γ K Ω] |
| 97 | |
| 98 | omit [TopologicalSpace Γ] in |
| 99 | /-- Let `s` be in the inertia group of `A` and send `ζ` (with `ζ ≡ 1` and `ζ ≠ 1`) to `ζ ^ a`. For |
| 100 | a unit `w` of `A` and `y = (ζ - 1) * w`, the quotient `s • y / y` is `≡ a` modulo the maximal |
| 101 | ideal. -/ |
| 102 | lemma valuation_smul_div_sub_natCast_lt_one {A : ValuationSubring Ω} {s : Γ} |
| 103 | (hs : s ∈ inertiaGroup Γ A) {ζ w : Ω} {a : ℕ} (hζ : ζ ≠ 1) (hζ_cong : A.valuation (ζ - 1) < 1) |
| 104 | (ha : s • ζ = ζ ^ a) (hw : A.valuation w = 1) : |
| 105 | A.valuation (s • ((ζ - 1) * w) / ((ζ - 1) * w) - a) < 1 := by |
| 106 | have h_mem (x : Ω) (hx : A.valuation (x - 1) < 1) : |
| 107 | Units.mk0 x (fun h0 : x = 0 ↦ hx.ne (by simp [h0])) ∈ A.principalUnitGroup := hx |
| 108 | -- The elements `≡ 1` form a group, which holds `ζ` and `s • w / w`. |
| 109 | have h_term (i : ℕ) : A.valuation (ζ ^ i * (s • w / w) - 1) < 1 := by |
| 110 | simpa [ValuationSubring.mem_principalUnitGroup_iff] using |
| 111 | mul_mem (pow_mem (h_mem ζ hζ_cong) i) (h_mem _ (valuation_smul_div_sub_one_lt_one hs hw)) |
| 112 | -- The quotient is `(ζ ^ a - 1) / (ζ - 1) * (s • w / w)`, a sum of `a` such elements. |
| 113 | have h_sum : |
| 114 | s • ((ζ - 1) * w) / ((ζ - 1) * w) - a = ∑ i ∈ Finset.range a, (ζ ^ i * (s • w / w) - 1) := by |
| 115 | simp [geom_sum_eq hζ, ← Finset.sum_mul, mul_div_mul_comm, smul_sub, ha] |
| 116 | rw [h_sum] |
| 117 | exact A.valuation.map_sum_lt one_ne_zero fun i _ ↦ h_term i |
| 118 | |
| 119 | /-- A homomorphism `F` from `ℚˣ` to a monoid that is `1` at every prime and not `1` at `-1` is `1` |
| 120 | exactly at the positive rationals. -/ |
| 121 | lemma map_eq_one_iff_pos {M : Type*} [Monoid M] (F : ℚˣ →* M) |
| 122 | (h_prime : ∀ p : ℕ, p.Prime → ∀ h0 : (p : ℚ) ≠ 0, F (Units.mk0 p h0) = 1) (h_neg : F (-1) ≠ 1) |
| 123 | (x : ℚˣ) : |
| 124 | F x = 1 ↔ 0 < x.val := by |
| 125 | -- `F` is `1` at every natural number, by induction on the prime factorisation. |
| 126 | have h_nat : ∀ (n : ℕ) (h0 : (n : ℚ) ≠ 0), F (Units.mk0 n h0) = 1 := |
| 127 | recOnMul nofun (by simp) h_prime (by simp +contextual) |
| 128 | -- A rational number times its denominator is its sign times a natural number. |
| 129 | have h_sign : x * .mk0 x.val.den (Nat.cast_ne_zero.mpr x.val.den_nz) = |
| 130 | (if 0 < x.val then 1 else -1) * |
| 131 | .mk0 x.val.num.natAbs (Nat.cast_ne_zero.mpr (Int.natAbs_ne_zero.mpr |
| 132 | (Rat.num_ne_zero.mpr x.ne_zero))) := by |
| 133 | apply Units.ext |
| 134 | rw [Units.val_mul, Units.val_mk0, Rat.mul_den_eq_num, Units.val_mul, Units.val_mk0] |
| 135 | split_ifs with hx |
| 136 | · rw [Units.val_one, one_mul, ← Int.cast_natCast, |
| 137 | Int.natAbs_of_nonneg (Rat.num_pos.mpr hx).le] |
| 138 | · rw [Units.val_neg, Units.val_one, neg_one_mul, ← Int.cast_natCast, ← Int.cast_neg, |
| 139 | Int.ofNat_natAbs_of_nonpos (Rat.num_nonpos.mpr (le_of_not_gt hx)), neg_neg] |
| 140 | have h_val : F x = F (if 0 < x.val then 1 else -1) := by |
| 141 | simpa only [F.map_mul, h_nat, mul_one] using congrArg F h_sign |
| 142 | simp [h_val, apply_ite F, h_neg] |
| 143 | |
| 144 | /-- The tame symbol at the place `v` of a prime `q = v.q` of `ℚ`. Let `ξ` be a character of |
| 145 | `Gal(Ω/ℚ)` whose kernel is that of the cyclotomic character modulo `q`, `ζ` a primitive `q`-th root |
| 146 | of unity with `ζ ≡ 1` at `placeOver v`, and `η` a unit there with `((ζ - 1) η) ^ (q - 1) = q`. For |
| 147 | `x ∈ ℚˣ` a unit at `v` equal to the integer `k` and `g ∈ Gal(Ω/ℚ)`, `ξ` of the local Artin symbol |
| 148 | of `x` is `ξ g` exactly when `k` is the cyclotomic character modulo `q` of `g`. -/ |
| 149 | lemma abelianLift_artinAt_eq_toHom_iff_of_tame {ξ : QZChar Gal(Ω/ℚ)} {v : FinPlace ℚ} |
| 150 | [Fact v.q.Prime] (hξ : ker ξ = cycloGalGroup v.q) |
| 151 | (h_unif : IsUniformizer (placeOver v) (v.q : ℚ)) {ζ η : Ω} (hζ : IsPrimitiveRoot ζ v.q) |
| 152 | (hζ_cong : (placeOver v).valuation (ζ - 1) < 1) (hη_unit : (placeOver v).valuation η = 1) |
| 153 | (h_root : ((ζ - 1) * η) ^ (v.q - 1) = algebraMap ℚ Ω v.q) (k : ℤ) (g : Gal(Ω/ℚ)) (x : ℚˣ) |
| 154 | (hu : v.valuation ℚ x = 1) (hx : x.val = k) : |
| 155 | abelianLift ξ (artinAt Gal(Ω/ℚ) v (ideleAt v (principalIdele x))) = toHom ξ g ↔ |
| 156 | k = (cyclotomicCharMod Ω v.q g).val := by |
| 157 | have h_over : IsPlaceOver (placeOver v) v := v.isPlaceOver_placeOver |
| 158 | have hu_idele : Valued.v (ideleAt v (principalIdele x)).val = 1 := |
| 159 | (v_algebraMap_eq_valuation _).trans hu |
| 160 | -- The symbol of `x` at `v` is the class of an element `s` of the inertia group. |
| 161 | obtain ⟨s, hs, hs_art⟩ : ∃ s : decompGroup Gal(Ω/ℚ) (placeOver v), |
| 162 | s.val ∈ inertiaGroup Gal(Ω/ℚ) (placeOver v) ∧ |
| 163 | localArtin Gal(Ω/ℚ) (placeOver v) v (ideleAt v (principalIdele x)) = s := |
| 164 | h_over.exists_mem_inertiaGroup_localArtin_eq (Γ := Gal(Ω/ℚ)) hu_idele |
| 165 | -- With `y = (ζ - 1) * η` and `s • ζ = ζ ^ a`, the quotient `s • y / y` is `≡ k` by the tame |
| 166 | -- symbol and `≡ a` by direct computation. So `q` divides `k - a`. |
| 167 | let a : ℕ := (cyclotomicCharMod Ω v.q s.val : ZMod v.q).val |
| 168 | let y : Ω := (ζ - 1) * η |
| 169 | have h_k : (placeOver v).valuation (s.val • y / y - algebraMap ℚ Ω k) < 1 := by |
| 170 | refine (h_over.valuation_sub_lt_one_iff_of_localArtin_eq h_unif hu_idele hs_art h_root |
| 171 | (x := k)).mp ?_ |
| 172 | -- The side condition says that the component of the idele of `x` at `v` is `k`. |
| 173 | simp [ideleAt, principalIdele, hx] |
| 174 | have h_a : (placeOver v).valuation (s.val • y / y - a) < 1 := |
| 175 | valuation_smul_div_sub_natCast_lt_one hs (hζ.ne_one v.one_lt_q) hζ_cong |
| 176 | (smul_eq_pow_cyclotomicCharMod s.val hζ.pow_eq_one) hη_unit |
| 177 | have h_sub_lt : (placeOver v).valuation (algebraMap ℤ Ω (k - a)) < 1 := by |
| 178 | simpa using map_sub_lt _ h_a h_k |
| 179 | have h_mem : algebraMap ℤ (𝓞 ℚ) (k - a) ∈ v.asIdeal := (h_over _).mp h_sub_lt |
| 180 | -- The absolute norm of `v` is `q`, and the norm of the integer `k - a` is `k - a`. |
| 181 | have h_norm : Algebra.norm ℤ (algebraMap ℤ (𝓞 ℚ) (k - a)) = k - a := by |
| 182 | rw [Algebra.norm_algebraMap] |
| 183 | simp [RingOfIntegers.rank] |
| 184 | have h_dvd : (v.q : ℤ) ∣ k - a := by |
| 185 | have h_norm_dvd := Ideal.absNorm_dvd_norm_of_mem h_mem |
| 186 | rw [h_norm] at h_norm_dvd |
| 187 | simpa using h_norm_dvd |
| 188 | have h_cyc : (cyclotomicCharMod Ω v.q s.val).val = k := by |
| 189 | simpa [a] using (intCast_eq_intCast_iff_dvd_sub (a : ℤ) k v.q).mpr h_dvd |
| 190 | have h_sym : abelianLift ξ (artinAt Gal(Ω/ℚ) v (ideleAt v (principalIdele x))) = toHom ξ s := |
| 191 | congrArg (abelianLift ξ) (h_over.artinAt_eq_of_localArtin_eq hs_art) |
| 192 | calc abelianLift ξ (artinAt Gal(Ω/ℚ) v (ideleAt v (principalIdele x))) = toHom ξ g |
| 193 | ↔ toHom ξ s = toHom ξ g := by rw [h_sym] |
| 194 | _ ↔ cyclotomicCharMod Ω v.q s.val = cyclotomicCharMod Ω v.q g := by |
| 195 | rw [(toHom ξ).eq_iff, ← ker, hξ, ← MonoidHom.eq_iff] |
| 196 | _ ↔ k = (cyclotomicCharMod Ω v.q g).val := by rw [Units.ext_iff, h_cyc] |
| 197 | |
| 198 | /-- Let `q` be a uniformiser at the place `placeOver v` of `Ω` over the place `v` of `ℚ` at the |
| 199 | prime `q`. Then there are a primitive `q`-th root of unity `ζ` with `ζ - 1` in the maximal ideal and |
| 200 | a unit `η` such that `(ζ - 1) * η` is a `(q - 1)`-th root of `q`. -/ |
| 201 | private lemma exists_zeta_sub_one_mul_pow_eq {v : FinPlace ℚ} [Fact v.q.Prime] |
| 202 | (h_unif : IsUniformizer (placeOver v) (v.q : ℚ)) : |
| 203 | ∃ ζ η : Ω, IsPrimitiveRoot ζ v.q ∧ (placeOver v).valuation (ζ - 1) < 1 ∧ |
| 204 | (placeOver v).valuation η = 1 ∧ ((ζ - 1) * η) ^ (v.q - 1) = algebraMap ℚ Ω v.q := by |
| 205 | -- At `A` one has `(ζ - 1) ^ (q - 1) * ε = q` with a unit `ε`; let `η` be a `(q - 1)`-th root |
| 206 | -- of `ε`. |
| 207 | let A : ClosurePlace := placeOver v |
| 208 | have h_pos : 0 < v.q - 1 := tsub_pos_of_lt (Fact.out : v.q.Prime).one_lt |
| 209 | obtain ⟨ζ, hζ⟩ : ∃ ζ : Ω, IsPrimitiveRoot ζ v.q := HasEnoughRootsOfUnity.prim |
| 210 | obtain ⟨ε, hε⟩ : ∃ ε : Aˣ, (ζ - 1) ^ (v.q - 1) * ε = v.q := by |
| 211 | have h_lift_eq : algebraMap (𝓞 Ω) Ω hζ.toInteger = ζ := hζ.coe_toInteger |
| 212 | simpa [Associated, Subtype.ext_iff, h_lift_eq] using |
| 213 | (Rat.associated_zeta_sub_one_pow_prime _ hζ).map |
| 214 | ((algebraMap (𝓞 Ω) Ω).codRestrict A (algebraMap_ringOfIntegers_mem A)) |
| 215 | obtain ⟨η, hη⟩ : ∃ η : Ω, η ^ (v.q - 1) = ε := exists_pow_nat_eq (ε : Ω) h_pos |
| 216 | have hη_unit : A.valuation η = 1 := by simpa [h_pos.ne', ← hη] using A.valuation_unit ε |
| 217 | have h_root : ((ζ - 1) * η) ^ (v.q - 1) = algebraMap ℚ Ω v.q := by simp [mul_pow, hη, hε] |
| 218 | have hζ_cong : A.valuation (ζ - 1) < 1 := by |
| 219 | simpa [← hε, pow_lt_one_iff h_pos.ne'] using |
| 220 | (mod_cast h_unif.valuationVia_lt_one : A.valuation v.q < 1) |
| 221 | exact ⟨ζ, η, hζ, hζ_cong, hη_unit, h_root⟩ |
| 222 | |
| 223 | /-- For an odd prime `q`, the character cutting out the `q`-th roots of unity over `ℚ` |
| 224 | kills the global Artin symbol of a rational number exactly when the number is positive. -/ |
| 225 | private lemma artin_reciprocity_cyclotomic_rat {q : ℕ} [P : Fact q.Prime] (hq : Fact (2 < q)) : |
| 226 | ∃ ξ : QZChar Gal(Ω/ℚ), ker ξ = cycloGalGroup q ∧ |
| 227 | ∀ x : ℚˣ, abelianLift ξ (artinMap Gal(Ω/ℚ) (principalIdele x)) = 1 ↔ 0 < x.val := by |
| 228 | classical |
| 229 | obtain ⟨ξ, hξ⟩ : ∃ ξ : QZChar Gal(Ω/ℚ), ker ξ = cycloGalGroup q := |
| 230 | exists_ker_eq_of_isCyclic ⟨cycloGalGroup q, isOpen_ker_cyclotomicCharMod.out⟩ |
| 231 | (isCyclic_of_injective _ (QuotientGroup.kerLift_injective _)) |
| 232 | -- `v` is the place of `q`: `q` is a uniformiser at `v` and a unit at the other places. |
| 233 | obtain ⟨v, ⟨rfl, hq_unit⟩, hq_val, -⟩ := exists_rat_place_of_prime P.out |
| 234 | have h_over (w : FinPlace ℚ) : IsPlaceOver (placeOver w) w := w.isPlaceOver_placeOver |
| 235 | have h_frob (w : FinPlace ℚ) : ∃ σ : Gal(Ω/ℚ), IsFrob (placeOver w) w.q σ := |
| 236 | (h_over w).exists_isFrob Gal(Ω/ℚ) |
| 237 | choose σ hσ using h_frob |
| 238 | -- `F x` and `Floc w x` are the values of `ξ` on the global symbol and on the symbol at `w`. |
| 239 | let F : ℚˣ →* Multiplicative QZ := (abelianLift ξ).comp ((artinMap _).comp principalIdele) |
| 240 | let Floc (w : FinPlace ℚ) (x : ℚˣ) : Multiplicative QZ := |
| 241 | abelianLift ξ (artinAt _ w (ideleAt w (principalIdele x))) |
| 242 | -- From here on `q` is `v.q`. At the place over `v`, `(ζ - 1) * η` is a `(q - 1)`-th root of `q` |
| 243 | -- for a primitive `q`-th root of unity `ζ` and a unit `η` (`exists_zeta_sub_one_mul_pow_eq`). |
| 244 | have h_unif : IsUniformizer (placeOver v) (v.q : ℚ) := (h_over v).isUniformizer_iff.mpr hq_val |
| 245 | obtain ⟨ζ, η, hζ, hζ_cong, hη_unit, h_root⟩ := exists_zeta_sub_one_mul_pow_eq h_unif |
| 246 | -- The symbol at `v` of an integer `k` that is a unit at `v` acts on `ζ` as the power `k`. |
| 247 | have h_tame (k : ℤ) (g : Gal(Ω/ℚ)) (x : ℚˣ) (hu : v.valuation ℚ x = 1) (hx : x.val = k) : |
| 248 | Floc v x = toHom ξ g ↔ k = (cyclotomicCharMod Ω v.q g).val := |
| 249 | abelianLift_artinAt_eq_toHom_iff_of_tame hξ h_unif hζ hζ_cong hη_unit h_root k g x hu hx |
| 250 | -- At the places `w ≠ v` the character `ξ` is unramified. |
| 251 | have hq_val' (w : FinPlace ℚ) (hw : w ≠ v) : (placeOver w).valuation v.q = 1 := |
| 252 | (h_over w).valuationVia_eq_one_iff.mpr (hq_unit w hw) |
| 253 | have h_unr (w : FinPlace ℚ) (hw : w ≠ v) (x : ℚˣ) : |
| 254 | Floc w x = .ofAdd ((w.valuation ℚ x).log • ξ.val (σ w)) := |
| 255 | (h_over w).abelianLift_artinAt_of_inertiaGroup_le_ker ξ |
| 256 | (fun g hg ↦ hξ.ge (cyclotomicCharMod_eq_one_of_mem_inertiaGroup hg (hq_val' w hw))) (hσ w) x |
| 257 | -- So if `x` is a unit away from `w`, only `v` and `w` contribute to the global symbol. |
| 258 | have h_two (w : FinPlace ℚ) (x : ℚˣ) (hx : ∀ u ≠ w, u.valuation ℚ x = 1) : |
| 259 | F x = ∏ u ∈ {v, w}, Floc u x := by |
| 260 | have h_support : Function.mulSupport (fun u ↦ Floc u x) ⊆ ({v, w} : Finset (FinPlace ℚ)) := by |
| 261 | simp +contextual [subset_def, not_imp_comm, h_unr, hx] |
| 262 | exact (abelianLift_artinMap_eq_finprod ξ (principalIdele x)).trans |
| 263 | (finprod_eq_prod_of_mulSupport_subset (fun u ↦ Floc u x) h_support) |
| 264 | have h_prime (p : ℕ) (hp : p.Prime) (h0 : (p : ℚ) ≠ 0) : F (.mk0 p h0) = 1 := by |
| 265 | obtain ⟨w, ⟨rfl, hp_unit⟩, hp_val, -⟩ := exists_rat_place_of_prime hp |
| 266 | rw [h_two w (.mk0 _ h0) hp_unit] |
| 267 | obtain rfl | hw := eq_or_ne w v |
| 268 | · -- `q` is the norm of `ζ - 1` from the field cut out by `ξ`, so its symbol vanishes. |
| 269 | obtain ⟨z, hz⟩ : ∃ z : fixedFieldOf (K := ℚ) (Ω := Ω) (ker ξ), norm ℚ z = w.q := by |
| 270 | rw [hξ] |
| 271 | exact ⟨_, |
| 272 | norm_zeta_sub_one_of_prime_ne_two _ (cyclotomic.irreducible_rat hp.pos) hq.out.ne'⟩ |
| 273 | simpa using abelianLift_artinAt_eq_one_of_mem_closure (subset_closure ⟨z, congrArg _ hz⟩) |
| 274 | · -- For `p ≠ q` the symbol at `v` is `ξ` of a Frobenius at `p`, that at `w` its inverse. |
| 275 | have h_cyc : (w.q : ℤ) = (cyclotomicCharMod Ω v.q (σ w)).val := by |
| 276 | simp [(hσ w).cyclotomicCharMod_eq (hq_val' w hw)] |
| 277 | have h_v : Floc v (.mk0 _ h0) = .ofAdd (ξ.val (σ w)) := |
| 278 | (h_tame w.q _ _ (hp_unit v hw.symm) rfl).mpr h_cyc |
| 279 | simp [Finset.prod_pair hw.symm, h_v, h_unr w hw, hp_val] |
| 280 | -- The symbol of `-1` acts on `ζ` as the power `-1`, which is not `1` as `2 < q`. |
| 281 | have h_neg : F (-1) ≠ 1 := by |
| 282 | simpa [h_two v, neg_one_ne_one] using h_tame (-1) 1 (-1) (by simp) rfl |
| 283 | exact ⟨ξ, hξ, map_eq_one_iff_pos F h_prime h_neg⟩ |
| 284 | |
| 285 | /-- Artin's law for `K(μ_q)`, `q` an odd prime. Some character `χ` (a) has the same kernel as the |
| 286 | cyclotomic character modulo `q`, and (b) kills the Artin symbol of the finite idele of `x ∈ Kˣ` |
| 287 | exactly when the norm of `x` to `ℚ` is positive. The norm carries the law down to `ℚ`, where `-1` |
| 288 | and the primes generate: `q = N (ζ - 1)`, and a unit at `q` multiplies `ζ - 1` by its residue. -/ |
| 289 | lemma artin_reciprocity_cyclotomic {q : ℕ} [P : Fact q.Prime] (hq : Fact (2 < q)) : |
| 290 | ∃ χ : QZChar Γ, |
| 291 | ker χ = (cyclotomicCharMod Ω q).ker ∧ |
| 292 | ∀ x : Kˣ, abelianLift χ (artinMap Γ (principalIdele x)) = 1 ↔ 0 < Algebra.norm ℚ x.val := by |
| 293 | obtain ⟨ξ, hξ, h_rat⟩ := artin_reciprocity_cyclotomic_rat hq |
| 294 | -- The Artin symbol of `x` over `K` restricts to that of its norm over `ℚ`. |
| 295 | let res : Γ →ₜ* Gal(Ω/ℚ) := ⟨toAlgAut Γ ℚ Ω, continuous_of_equivariant_emb 1 fun _ _ ↦ rfl⟩ |
| 296 | refine ⟨comap res ξ, congrArg (Subgroup.comap res.toMonoidHom) hξ, fun x ↦ ?_⟩ |
| 297 | obtain ⟨g, hg⟩ := QuotientGroup.mk_surjective (artinMap Γ (principalIdele x)) |
| 298 | have h_res : artinMap Gal(Ω/ℚ) (principalIdele (x.map (norm ℚ))) = res g := by |
| 299 | rw [← map_adeleNorm_principalIdele] |
| 300 | exact artinMap_map_adeleNorm hg.symm 1 (by simp) fun _ ↦ rfl |
| 301 | have h_comap : (comap res ξ).val g = ξ.val (res g) := rfl |
| 302 | simpa [h_res, ← hg, h_comap] using h_rat (x.map (norm ℚ)) |
| 303 | |
| 304 | /-! ### The law in general -/ |
| 305 | |
| 306 | /-- The abelian lift of the sum of two characters is the product of their abelian lifts. -/ |
| 307 | lemma abelianLift_add_eq_mul (χ ψ : QZChar Γ) : |
| 308 | abelianLift (χ + ψ) = abelianLift χ * abelianLift ψ := by |
| 309 | aesop |
| 310 | |
| 311 | omit [MulSemiringAction Γ Ω] in |
| 312 | /-- Evaluating a `QZChar` character at `g ^ n` equals `n` times its value at `g`. -/ |
| 313 | lemma QZChar.apply_pow (χ : QZChar Γ) (g : Γ) (n : ℕ) : χ.val (g ^ n) = n • χ.val g := by |
| 314 | apply Multiplicative.ofAdd.injective |
| 315 | simpa only [ofAdd_nsmul, toHom_apply] using map_pow (toHom χ) g n |
| 316 | |
| 317 | /-- For `l ≠ 0` and `a > 1` there is a prime `p > 2`, not dividing `a`, such that `l` divides the |
| 318 | order of `a` modulo `p`. -/ |
| 319 | lemma exists_prime_dvd_orderOf {l a : ℕ} (hl : l ≠ 0) (ha : 1 < a) : |
| 320 | ∃ p : ℕ, p.Prime ∧ 2 < p ∧ IsUnit (a : ZMod p) ∧ l ∣ orderOf (a : ZMod p) := by |
| 321 | -- By Zsigmondy's theorem, whose exceptional orders are `2` and `6`, `a` has order exactly |
| 322 | -- `4 * l` modulo some prime `p`. Then `4 * l < p`. |
| 323 | obtain ⟨p, hp, h_order⟩ : ∃ p : ℕ, p.Prime ∧ orderOf (a : ZMod p) = 4 * l := |
| 324 | (TauCeti.exists_prime_orderOf_eq_iff ha (by omega)).mpr |
| 325 | ⟨fun ⟨h, _⟩ ↦ by omega, fun ⟨_, h⟩ ↦ by omega⟩ |
| 326 | have h_lt : orderOf (a : ZMod p) < p := orderOf_lt hp.one_lt _ |
| 327 | have h_pos : 0 < orderOf (a : ZMod p) := by omega |
| 328 | exact ⟨p, hp, by omega, (orderOf_pos_iff.mp h_pos).isUnit, Dvd.intro_left 4 h_order.symm⟩ |
| 329 | |
| 330 | /-- Artin's lemma: for a Frobenius `σ` at a place `A` of `Ω` over the finite place `v` of `K` (`v.q` |
| 331 | the size of its residue field), a prime `l` and `m ≠ 0`, some character `χ` that satisfies the |
| 332 | reciprocity law has `m • χ σ` of order not prime to `l`. -/ |
| 333 | lemma exists_reciprocity_character {A : ClosurePlace} {v : FinPlace K} (hA : IsPlaceOver A v) |
| 334 | {σ : Γ} (hσ : IsFrob A v.q σ) {l m : ℕ} (hl : l.Prime) (hm : m ≠ 0) : |
| 335 | ∃ χ : QZChar Γ, |
| 336 | (∀ y : Kˣ, abelianLift χ (artinMap Γ (principalIdele y)) = 1) ∧ |
| 337 | ∀ a : ℕ, l.Coprime a → a • m • χ.val σ ≠ 0 := by |
| 338 | obtain ⟨p, hp, hp_odd, h_isUnit, h_order⟩ := |
| 339 | exists_prime_dvd_orderOf hl.ne_zero (one_lt_pow (n := 2 * m) (by simpa) v.one_lt_q) |
| 340 | have : Fact p.Prime := ⟨hp⟩ |
| 341 | -- Twice the character `χ` that cuts out the `p`-th roots of unity satisfies the law: its value |
| 342 | -- on the symbol of `y` is that of `χ` on the symbol of `y * y`, whose norm is positive. |
| 343 | obtain ⟨χ, h_ker, h_sign⟩ := artin_reciprocity_cyclotomic (Γ := Γ) (K := K) (q := p) ⟨hp_odd⟩ |
| 344 | have h_law (y : Kˣ) : abelianLift (χ + χ) (artinMap Γ (principalIdele y)) = 1 := by |
| 345 | simpa [abelianLift_add_eq_mul] using h_sign (y * y) |
| 346 | refine ⟨χ + χ, h_law, fun a ha h0 ↦ ?_⟩ |
| 347 | -- `σ` raises these roots to the power `v.q`, so the order of `v.q ^ (2 * m)` modulo `p`, and |
| 348 | -- with it `l`, would divide `a`. |
| 349 | have h_unit : A.valuation p = 1 := |
| 350 | ((isUnit_iff_coprime _ p).mp (by simpa [hm] using h_isUnit)).valuation_eq_one |
| 351 | hA.valuation_q_lt_one |
| 352 | have h_mem : (σ ^ (2 * m)) ^ a ∈ ker χ := by |
| 353 | rw [QZChar.mem_ker_iff_val_eq_zero] |
| 354 | simpa [QZChar.apply_pow, mul_nsmul', two_nsmul] using h0 |
| 355 | have h_pow : ((v.q ^ (2 * m) : ℕ) : ZMod p) ^ a = 1 := by |
| 356 | simpa [Units.ext_iff, hσ.cyclotomicCharMod_eq h_unit] using h_ker.le h_mem |
| 357 | exact hl.coprime_iff_not_dvd.mp ha (h_order.trans (orderOf_dvd_of_pow_eq_one h_pow)) |
| 358 | |
| 359 | /-- Let `c` be an element of an additive monoid whose order divides `i`. If, for every prime |
| 360 | `l ∣ n`, no `a • n • c` with `a` prime to `l` vanishes, then `n ∣ i`. -/ |
| 361 | lemma _root_.dvd_of_addOrderOf_dvd_of_forall_nsmul_ne_zero {M : Type*} [AddMonoid M] {c : M} |
| 362 | {n i : ℕ} (h_ord : addOrderOf c ∣ i) |
| 363 | (h : ∀ l : ℕ, l.Prime → l ∣ n → ¬∃ a : ℕ, l.Coprime a ∧ a • n • c = 0) : |
| 364 | n ∣ i := by |
| 365 | -- Otherwise `n = b g` and `i = a g` with `a`, `b` coprime and `b ≠ 1`; take a prime factor `l` of |
| 366 | -- `b`. Then `a` is prime to `l`, and `a • n • c = (a b g) • c = b • (i • c) = 0`. |
| 367 | obtain ⟨b, a, h_coprime, hn_eq, hi_eq⟩ := n.exists_coprime i |
| 368 | by_contra h_not |
| 369 | have hb_ne_one : b ≠ 1 := fun h_one ↦ h_not (hn_eq.dvd.trans (by simp [h_one, Nat.gcd_dvd_right])) |
| 370 | obtain ⟨l, hl, hlb⟩ := exists_prime_and_dvd hb_ne_one |
| 371 | refine h l hl (hlb.trans ⟨_, hn_eq⟩) ⟨a, h_coprime.of_dvd_left hlb, ?_⟩ |
| 372 | rw [smul_smul, ← addOrderOf_dvd_iff_nsmul_eq_zero] |
| 373 | exact h_ord.trans (hi_eq.dvd.trans (mul_dvd_mul_left a (Nat.gcd_dvd_left n i))) |
| 374 | |
| 375 | /-- The local step of Artin's reciprocity law. Let `σ v` be a Frobenius at each place `v` of `K`, |
| 376 | and let `n v` be the order of `ξ` at the local Artin symbol of `x` at `v`. Let the symbol `(ξ, x)` |
| 377 | die on an open subgroup `U` that contains the complex conjugations, and let `χ` be a character such |
| 378 | that, for each `v` and each prime `l ∣ n v`, no `a • n v • χ (σ v)` with `a` prime to `l` vanishes. |
| 379 | Then `(ξ, x)` dies on the kernel of `χ`. -/ |
| 380 | lemma resH2_ker_cyclicClass_eq_zero {ξ χ : QZChar Γ} {x : Kˣ} (U : OpenSubgroup Γ) |
| 381 | (hU : ∀ g : Γ, IsComplexConj g → g ∈ U) |
| 382 | (h_res : (unitsModule Γ).resH2 U |
| 383 | (cyclicClass (unitsModule Γ).ρ ξ (DiscreteUnits.ofBase Γ Ω (.ofMul x))) = 0) |
| 384 | {σ : FinPlace K → Γ} (hσ : ∀ v : FinPlace K, IsFrob (placeOver v) v.q (σ v)) |
| 385 | (hχ : ∀ (v : FinPlace K) (l : ℕ), l.Prime → |
| 386 | l ∣ orderOf (abelianLift ξ (artinAt Γ v (ideleAt v (principalIdele x)))) → |
| 387 | ¬∃ a : ℕ, l.Coprime a ∧ |
| 388 | a • orderOf (abelianLift ξ (artinAt Γ v (ideleAt v (principalIdele x)))) • |
| 389 | χ.val (σ v) = 0) : |
| 390 | (unitsModule Γ).resH2 (⟨ker χ, isOpen_ker χ⟩ : OpenSubgroup Γ) |
| 391 | (cyclicClass (unitsModule Γ).ρ ξ (DiscreteUnits.ofBase Γ Ω (.ofMul x))) = 0 := by |
| 392 | -- Apply `albert_brauer_hasse_noether` over the fixed field of `ker χ`: the class dies locally, |
| 393 | -- as the local degree at each `v` is divisible by `n v`. |
| 394 | let s (v : FinPlace K) : Multiplicative QZ := |
| 395 | abelianLift ξ (artinAt Γ v (ideleAt v (principalIdele x))) |
| 396 | refine albert_brauer_hasse_noether _ (fun {A w} hw ↦ ?_) |
| 397 | (U.comap _ (subgroupIncl _).continuous_toFun) (fun g ↦ hU g) |
| 398 | (DiscreteModule.resH2_subgroupOf_eq_zero_symm (congrArg _ h_res) :) |
| 399 | let v : FinPlace K := w.below K |
| 400 | have hv : IsPlaceOver A v := hw.isPlaceOver_below |
| 401 | let V : OpenSubgroup (decompGroup Γ A) := ⟨_, isOpen_ker (comap (subgroupIncl _) χ)⟩ |
| 402 | -- The group `χ (decompGroup Γ A)` depends on `v` only, being the range of `χ` on the local |
| 403 | -- symbols, and so contains `χ (σ v)`. Its order is the index of `V`. |
| 404 | have h_frob_mem : toHom χ (σ v) ∈ (decompGroup Γ A).map (toHom χ) := |
| 405 | (hv.range_abelianLift_comp_artinAt _).le |
| 406 | ((v.isPlaceOver_placeOver.range_abelianLift_comp_artinAt _).ge ⟨_, (hσ v).left, rfl⟩) |
| 407 | have h_frob : orderOf (toHom χ (σ v)) ∣ V.toSubgroup.index := |
| 408 | (orderOf_dvd_natCard _ h_frob_mem).trans (relIndex_ker ..).symm.dvd |
| 409 | have h_dvd : orderOf (s v) ∣ V.toSubgroup.index := |
| 410 | dvd_of_addOrderOf_dvd_of_forall_nsmul_ne_zero (by rwa [← orderOf_ofAdd_eq_addOrderOf]) (hχ v) |
| 411 | -- Restriction to `V` multiplies the local invariant, of order `n v`, by the index of `V`. |
| 412 | have hr : V.toSubgroup.index • (s v).toAdd = 0 := addOrderOf_dvd_iff_nsmul_eq_zero.mp h_dvd |
| 413 | have h_cls : |
| 414 | (unitsModule (decompGroup Γ A)).resH2 V |
| 415 | (classOfInvariant _ (fixedFieldOf (K := K) (decompGroup Γ A)) A (s v).toAdd) = 0 := |
| 416 | (hv.isLocalGalois_decompGroup Γ).resH2_classOfInvariant_eq_zero V hr |
| 417 | -- The restricted class lives in `restrictTo` of the module, which is |
| 418 | -- `unitsModule (decompGroup Γ A)` only after unfolding, so `map_neg` is used as an equation. |
| 419 | rw [hv.abelianLift_artinAt_principal] at h_cls |
| 420 | exact (unitsModule ..).resH2_subgroupOf_eq_zero_symm (V := decompGroup ..) |
| 421 | (neg_eq_zero.mp ((_root_.map_neg _ _).symm.trans h_cls)) |
| 422 | |
| 423 | /-- `Ω` is an algebraic closure of `ℚ`, on which `Γ` acts as the Galois group of `Ω/K`. |
| 424 | If the symbols `(ξ, x)` and `(χ, y)` are equal in `H²(Γ, Ωˣ)`, then `ξ` at the local Artin |
| 425 | symbol of `x` equals `χ` at that of `y`, at every place `v`: both are minus the local invariant of |
| 426 | the symbol, and the local invariant map is injective. -/ |
| 427 | lemma abelianLift_artinAt_eq_of_cyclicClass_eq {ξ χ : QZChar Γ} {x y : Kˣ} |
| 428 | (h_eq : cyclicClass (unitsModule Γ).ρ ξ (DiscreteUnits.ofBase Γ Ω (.ofMul x)) = |
| 429 | cyclicClass (unitsModule Γ).ρ χ (DiscreteUnits.ofBase Γ Ω (.ofMul y))) |
| 430 | (v : FinPlace K) : |
| 431 | abelianLift ξ (artinAt Γ v (ideleAt v (principalIdele x))) = |
| 432 | abelianLift χ (artinAt Γ v (ideleAt v (principalIdele y))) := by |
| 433 | -- The value of a character at a local symbol is minus the local invariant of the symbol. |
| 434 | have h_inv (ψ : QZChar Γ) (z : Kˣ) : |
| 435 | classOfInvariant (decompGroup Γ (placeOver v)) |
| 436 | (fixedFieldOf (K := K) (decompGroup Γ (placeOver v))) (placeOver v) |
| 437 | (abelianLift ψ (artinAt Γ v (ideleAt v (principalIdele z)))).toAdd = |
| 438 | -(unitsModule Γ).resH2 (decompGroup Γ (placeOver v)) |
| 439 | (cyclicClass (unitsModule Γ).ρ ψ (DiscreteUnits.ofBase Γ Ω (.ofMul z))) := |
| 440 | v.isPlaceOver_placeOver.abelianLift_artinAt_principal (Γ := Γ) ψ z |
| 441 | apply Multiplicative.toAdd.injective |
| 442 | apply (v.isPlaceOver_placeOver.isLocalGalois_decompGroup Γ).isClassOfInvariant_classOfInvariant.1 |
| 443 | rw [h_inv, h_inv, h_eq] |
| 444 | |
| 445 | /-- The characters `χ : Γ → ℚ/ℤ` that satisfy the reciprocity law over `K`: `χ` kills the Artin |
| 446 | symbol of the finite idele of every `y ∈ Kˣ`. -/ |
| 447 | private noncomputable def reciprocityChars (K : Type) [Field K] [EmbeddedNumberField K] |
| 448 | [IsProGalois Γ K Ω] : AddSubgroup (QZChar Γ) := |
| 449 | ⨅ y : Kˣ, AddMonoidHom.ker |
| 450 | (.mk' (fun χ : QZChar Γ ↦ (abelianLift χ (artinMap Γ (principalIdele y))).toAdd) |
| 451 | fun χ ψ ↦ by simp [abelianLift_add_eq_mul]) |
| 452 | |
| 453 | /-- For `g : Γ` and `n l : ℕ`, the characters `χ` for which `n • χ g` has order prime to `l`: some |
| 454 | `a` prime to `l` has `a • n • χ g = 0`. -/ |
| 455 | private noncomputable def QZChar.coprimeOrderSubgroup (g : Γ) (n l : ℕ) : AddSubgroup (QZChar Γ) := |
| 456 | let primeToL : Submonoid ℕ := |
| 457 | { carrier := {a | l.Coprime a}, mul_mem' := Nat.Coprime.mul_right, one_mem' := l.gcd_one_right } |
| 458 | (Submodule.torsion' ℤ QZ primeToL).toAddSubgroup.comap |
| 459 | (.mk' (fun χ : QZChar Γ ↦ n • χ.val g) (by simp)) |
| 460 | |
| 461 | /-- Given local symbols `s v` that are trivial outside finitely many places, there is a single |
| 462 | character satisfying reciprocity such that, at each `v` and each prime `l ∣ orderOf (s v)`, |
| 463 | `orderOf (s v) • χ (σ v)` has order divisible by `l`. -/ |
| 464 | private lemma exists_reciprocity_character_for_local_orders |
| 465 | (s : FinPlace K → Multiplicative QZ) (h_fin : (Function.mulSupport s).Finite) |
| 466 | {σ : FinPlace K → Γ} (hσ : ∀ v : FinPlace K, IsFrob (placeOver v) v.q (σ v)) : |
| 467 | ∃ χ : QZChar Γ, |
| 468 | (∀ y : Kˣ, abelianLift χ (artinMap Γ (principalIdele y)) = 1) ∧ |
| 469 | ∀ (v : FinPlace K) (l : ℕ), l.Prime → l ∣ orderOf (s v) → |
| 470 | ¬∃ a : ℕ, l.Coprime a ∧ a • orderOf (s v) • χ.val (σ v) = 0 := by |
| 471 | let n (v : FinPlace K) : ℕ := orderOf (s v) |
| 472 | have hn (v : FinPlace K) : n v ≠ 0 := (isAddTorsion (s v).toAdd).addOrderOf_pos.ne' |
| 473 | let G : AddSubgroup (QZChar Γ) := reciprocityChars K |
| 474 | have mem_G (χ : QZChar Γ) : χ ∈ G ↔ ∀ y : Kˣ, abelianLift χ (artinMap Γ (principalIdele y)) = 1 := |
| 475 | AddSubgroup.mem_iInf |
| 476 | let H (i : Σ _ : FinPlace K, ℕ) : AddSubgroup G := |
| 477 | (QZChar.coprimeOrderSubgroup (σ i.fst) (n i.fst) i.snd).addSubgroupOf G |
| 478 | have mem_H (v : FinPlace K) (l : ℕ) (χ : G) : |
| 479 | χ ∈ H ⟨v, l⟩ ↔ ∃ a : ℕ, l.Coprime a ∧ a • n v • ((χ : QZChar Γ) : Γ → QZ) (σ v) = 0 := |
| 480 | ⟨fun ⟨a, ha⟩ ↦ ⟨a.val, a.prop, ha⟩, fun ⟨a, ha, h0⟩ ↦ ⟨⟨a, ha⟩, h0⟩⟩ |
| 481 | -- By Artin's lemma these subgroups have infinite index. |
| 482 | have h_index (v : FinPlace K) (l : ℕ) (hl : l.Prime) : (H ⟨v, l⟩).index = 0 := by |
| 483 | by_contra h0 |
| 484 | obtain ⟨χ, hχ, h_ne⟩ := |
| 485 | exists_reciprocity_character v.isPlaceOver_placeOver (hσ v) hl (mul_ne_zero (hn v) h0) |
| 486 | -- A multiple of `χ` by the index lies in `H ⟨v, l⟩`, which contradicts Artin's lemma. |
| 487 | obtain ⟨a, ha, h_zero⟩ := |
| 488 | (mem_H v l _).mp ((H ⟨v, l⟩).nsmul_index_mem (⟨χ, (mem_G χ).mpr hχ⟩ : G)) |
| 489 | have h_zero' : a • (n v * (H ⟨v, l⟩).index) • χ.val (σ v) = 0 := by |
| 490 | rw [mul_smul] |
| 491 | exact h_zero |
| 492 | exact h_ne a ha h_zero' |
| 493 | -- Finitely many subgroups of infinite index do not cover `G`. |
| 494 | obtain ⟨χ, hχ⟩ : ∃ χ : G, ∀ (v : FinPlace K) (l : ℕ), l.Prime → l ∣ n v → χ ∉ H ⟨v, l⟩ := by |
| 495 | by_contra! h_cover |
| 496 | -- Otherwise the `H ⟨v, l⟩` with `s v ≠ 1` and `l` a prime factor of `n v` cover `G`. |
| 497 | let S : Finset (Σ _ : FinPlace K, ℕ) := h_fin.toFinset.sigma fun v ↦ (n v).primeFactors |
| 498 | open Pointwise in |
| 499 | have h_covers : ⋃ i ∈ S, (0 : (Σ _ : FinPlace K, ℕ) → G) i +ᵥ (H i : Set G) = univ := by |
| 500 | refine eq_univ_of_forall fun χ ↦ ?_ |
| 501 | obtain ⟨v, l, hl, hln, hχ_mem⟩ := h_cover χ |
| 502 | have hv : s v ≠ 1 := fun h_one ↦ by simp [n, h_one, hl.ne_one] at hln |
| 503 | exact mem_iUnion₂.mpr ⟨⟨v, l⟩, |
| 504 | Finset.mem_sigma.mpr ⟨h_fin.mem_toFinset.mpr hv, Nat.mem_primeFactors.mpr ⟨hl, hln, hn v⟩⟩, |
| 505 | ⟨χ, hχ_mem, zero_add χ⟩⟩ |
| 506 | obtain ⟨⟨v, l⟩, hl, ⟨h_ne⟩⟩ := |
| 507 | AddSubgroup.exists_finiteIndex_of_leftCoset_cover (H := H) (g := 0) (s := S) h_covers |
| 508 | exact h_ne (h_index v l (Nat.prime_of_mem_primeFactors (Finset.mem_sigma.mp hl).right)) |
| 509 | exact ⟨χ.val, (mem_G χ.val).mp χ.prop, fun v l hl hln h_ex ↦ |
| 510 | hχ v l hl hln ((mem_H v l χ).mpr h_ex)⟩ |
| 511 | |
| 512 | /-- Artin's reciprocity law for the number field `K`, with `Ω` an algebraic closure of `ℚ` and |
| 513 | `Γ` the Galois group of `Ω/K`. If the symbol `(ξ, x) = δξ ∪ x ∈ H²(Γ, Ωˣ)` restricts to zero on an |
| 514 | open subgroup `U` that contains the complex conjugations, then `ξ` kills the Artin symbol of the |
| 515 | finite idele of `x`. -/ |
| 516 | lemma artin_reciprocity {ξ : QZChar Γ} {x : Kˣ} (U : OpenSubgroup Γ) |
| 517 | (hU : ∀ g : Γ, IsComplexConj g → g ∈ U) |
| 518 | (h_res : (unitsModule Γ).resH2 U |
| 519 | (cyclicClass (unitsModule Γ).ρ ξ (DiscreteUnits.ofBase Γ Ω (.ofMul x))) = 0) : |
| 520 | abelianLift ξ (artinMap Γ (principalIdele x)) = 1 := by |
| 521 | -- Artin's lemma and a covering argument give a character `χ` that satisfies the law; then |
| 522 | -- `(ξ, x)` dies on `ker χ` and is a symbol `(χ, y)` with the same local symbols, of product `1`. |
| 523 | set α : H2 (unitsModule Γ).ρ := |
| 524 | cyclicClass (unitsModule Γ).ρ ξ (DiscreteUnits.ofBase Γ Ω (.ofMul x)) |
| 525 | have h_frob_exists (v : FinPlace K) : ∃ σ : Γ, IsFrob (placeOver v) v.q σ := |
| 526 | v.isPlaceOver_placeOver.exists_isFrob Γ |
| 527 | choose σ hσ using h_frob_exists |
| 528 | -- The local symbol `s v` is minus the local invariant of `α` (`abelianLift_artinAt_principal`). |
| 529 | let s (v : FinPlace K) : Multiplicative QZ := |
| 530 | abelianLift ξ (artinAt Γ v (ideleAt v (principalIdele x))) |
| 531 | obtain ⟨χ, h_law, h_local⟩ := |
| 532 | exists_reciprocity_character_for_local_orders s |
| 533 | (finite_mulSupport_artinAt ξ (principalIdele x)) hσ |
| 534 | -- The local order condition `h_local` makes the symbol vanish on `ker χ`. |
| 535 | have h_ker : (unitsModule Γ).resH2 (⟨ker χ, isOpen_ker χ⟩ : OpenSubgroup Γ) α = 0 := |
| 536 | resH2_ker_cyclicClass_eq_zero U hU h_res hσ h_local |
| 537 | -- So `α = (χ, y)`, whose local symbols are those of `(ξ, x)`. |
| 538 | obtain ⟨y, hy⟩ : ∃ y : Kˣ, α = cyclicClass _ χ (DiscreteUnits.ofBase Γ Ω (.ofMul y)) := |
| 539 | ((cyclicClass_spec χ).left α).mp h_ker |
| 540 | calc abelianLift ξ (artinMap Γ (principalIdele x)) |
| 541 | = ∏ᶠ v, s v := abelianLift_artinMap_eq_finprod ξ (principalIdele x) |
| 542 | _ = ∏ᶠ v, abelianLift χ (artinAt Γ v (ideleAt v (principalIdele y))) := |
| 543 | finprod_congr (abelianLift_artinAt_eq_of_cyclicClass_eq hy) |
| 544 | _ = abelianLift χ (artinMap Γ (principalIdele y)) := |
| 545 | (abelianLift_artinMap_eq_finprod χ (principalIdele y)).symm |
| 546 | _ = 1 := h_law y |
| 547 | |
| 548 | /-- Artin reciprocity: if χ kills all complex conjugations, then χ kills the Artin image of the |
| 549 | principal finite idele of every x ∈ K^×, whatever the signs of x at the real places. -/ |
| 550 | lemma abelianLift_artinMap_principalIdele_eq_one (χ : ↥(QZChar Γ)) (x : Kˣ) |
| 551 | (h : ∀ c : Γ, IsComplexConj c → χ.val c = 0) : |
| 552 | abelianLift χ (artinMap Γ (principalIdele x)) = 1 := |
| 553 | -- The symbol `(χ, x)` dies on the kernel of `χ`, which contains the complex conjugations. |
| 554 | artin_reciprocity ⟨_, isOpen_ker χ⟩ h (((cyclicClass_spec χ).left _).mpr ⟨x, rfl⟩) |
| 555 | |
| 556 | /-- If `x ∈ Kˣ` is totally positive, the Artin symbol `artinMap Γ (principalIdele x)` of its finite |
| 557 | idele is trivial. |
| 558 | |
| 559 | This is a case of Artin's global reciprocity law (triviality on principal ideles), for totally |
| 560 | positive elements and the map on finite ideles. -/ |
| 561 | lemma artinMap_principalIdele_eq_one_of_isTotallyPositive {x : Kˣ} (h : IsTotallyPositive x.val) : |
| 562 | artinMap Γ (principalIdele x) = 1 := by |
| 563 | refine abelianization_ext fun χ ↦ ?_ |
| 564 | obtain ⟨U, hU, h_res⟩ := h.exists_resH2_cyclicClass_eq_zero (χ := χ) |
| 565 | simpa using artin_reciprocity U hU h_res |
| 566 | |
| 567 | /-- Sign law: let `χ` be a character of `Γ` that is nonzero on every complex conjugation. Then for |
| 568 | `b ∈ Kˣ`, `χ` kills the Artin symbol of `b` exactly when the norm of `b` to `ℚ` is positive. |
| 569 | |
| 570 | This is a consequence of the global Artin reciprocity law; it describes `χ ∘ artinMap` only on |
| 571 | principal finite ideles and only for characters nonzero on every complex conjugation. -/ |
| 572 | lemma abelianLift_artinMap_principalIdele_eq_one_iff {χ : ↥(QZChar Γ)} |
| 573 | (h : ∀ c : Γ, IsComplexConj c → χ.val c ≠ 0) (b : Kˣ) : |
| 574 | abelianLift χ (artinMap Γ (principalIdele b)) = 1 ↔ 0 < Algebra.norm ℚ b.val := by |
| 575 | -- `χ` and the character `ξ` of the cube roots of unity agree on complex conjugations, so the law |
| 576 | -- applies to `χ - ξ`. |
| 577 | obtain ⟨ξ, h_ker, h_sign⟩ := artin_reciprocity_cyclotomic (Γ := Γ) (K := K) (q := 3) ⟨by simp⟩ |
| 578 | have h_diff (c : Γ) (hc : IsComplexConj c) : (χ - ξ).val c = 0 := by |
| 579 | -- As `c² = 1`, a nonzero value at `c` is the element of order 2. |
| 580 | have h_half (ψ : QZChar Γ) (hψ : ψ.val c ≠ 0) : ψ.val c = ofZMod 2 1 := by |
| 581 | have h_two : 2 • ψ.val c = 0 := (two_nsmul _).trans (map_mul_eq_one (toHom ψ) hc.mul_self) |
| 582 | rcases Fin.exists_fin_two.mp (exists_ofZMod h_two) with h_zero | h_one |
| 583 | · exact absurd (h_zero.symm.trans (map_zero _)) hψ |
| 584 | · exact h_one.symm |
| 585 | -- `c` raises the cube roots of unity to the power `-1 ≠ 1`. |
| 586 | have hξ : ξ.val c ≠ 0 := fun h0 ↦ |
| 587 | absurd (hc.cyclotomicCharMod_eq_neg_one.symm.trans (h_ker.le h0)) (by decide) |
| 588 | simp [h_half χ (h c hc), h_half ξ hξ] |
| 589 | rw [← sub_add_cancel χ ξ, abelianLift_add_eq_mul] |
| 590 | simp [abelianLift_artinMap_principalIdele_eq_one (χ - ξ) b h_diff, h_sign] |
| 591 | |
| 592 | end New |