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

| 1 | module |
| 2 | |
| 3 | public import Mathlib.NumberTheory.NumberField.Cyclotomic.Basic |
| 4 | import TauCeti.RingTheory.DedekindDomain.AdicValuation.Basic |
| 5 | import TauCeti.RingTheory.DedekindDomain.AdicValuation.ResidueField |
| 6 | import TauCeti.RingTheory.DedekindDomain.Different.Monogenic |
| 7 | public import New.Reduction.Data.FieldsAndPlaces |
| 8 | import Lib.ClassField.Places.ProfiniteGalois |
| 9 | import Lib.ClassField.Places.ValuationSubrings |
| 10 | |
| 11 | /-! |
| 12 | # Different and prime decomposition of the CM field E = K(ζ) |
| 13 | |
| 14 | Let `K = ℚ(√-d) ⊆ ℂ` and `E = P.E s = K(ζ)`, with `ζ` a primitive root of unity of order `q₁`. |
| 15 | `star` is complex conjugation on `E`. This file computes the different of `E`, gives it a purely |
| 16 | imaginary generator, and describes how the primes `p ∤ q₁ d` decompose in `E`. The infinite |
| 17 | places `v` of `E` form a group isomorphic to `Gal(E/K)` and to `(ℤ/q₁)ˣ`, and `v • w` is the |
| 18 | pullback of a finite place `w` along the automorphism `P.galOfPlace s v`. In the comments P'(ζ) |
| 19 | stands for `New.Parameters.relDifferentGen`, the value at `ζ` of the derivative of the cyclotomic |
| 20 | polynomial of order `q₁`; this letter P is not the parameters. |
| 21 | |
| 22 | ## Main definitions and results |
| 23 | |
| 24 | * `New.Parameters.deltaE`, `New.Parameters.star_deltaE`, |
| 25 | `New.Parameters.differentIdeal_eq_span_deltaE`: the imaginary generator of the different of `E`. |
| 26 | * `New.Parameters.smul_eq_iff_exists_frobElem_pow`: for a prime `p ∤ q₁ d` and `w` above `p`, the |
| 27 | place `v` sends `w` to `w` exactly when `(v, 1)` is a power of the Frobenius element |
| 28 | `New.Parameters.frobElem` in the monoid `P.Φ s × ℤ`, and to `w̄` exactly when `(v, -1)` is. For |
| 29 | such `p`, `New.Parameters.q_eq_pow_orderOf_frobElem` gives the norm of `w`. |
| 30 | |
| 31 | Notions from other files: |
| 32 | * `New.Parameters`: a multiple `q₀` of `18480 = 16 · 3 · 5 · 7 · 11` and a prime `d` with |
| 33 | `d ≡ q₀/2 - 1 mod q₀`. |
| 34 | * `New.Parameters.q₁`: the number `q₁ = 3 ^ c * 2 ^ s * q₀`, with `c = ⌊log₃ s⌋ + 5`. |
| 35 | * `New.Parameters.Φ`: `P.Φ s` is the group of infinite places of `E`. It is distinct from the bare |
| 36 | `Φ` of the CM type of `E` (`New.CMType`): `Φ v : E →+* ℂ` is the embedding over `K` inducing `v`. |
| 37 | -/ |
| 38 | |
| 39 | @[expose] public section |
| 40 | |
| 41 | noncomputable section |
| 42 | |
| 43 | namespace New.Parameters |
| 44 | |
| 45 | /-! |
| 46 | ## Action of automorphisms of ℂ over K on the infinite places of E |
| 47 | |
| 48 | An automorphism `σ` of `ℂ` over `K` permutes the embeddings `Φ v` of `E = P.E s` over `K`, which are |
| 49 | indexed by the infinite places `v`. |
| 50 | -/ |
| 51 | |
| 52 | /-- For an automorphism `σ` of `ℂ` over `K`, the permutation of the infinite places of `E = P.E s` |
| 53 | given by multiplication by the place of the embedding `σ ∘ Φ 1`. Here `Φ v : E →+* ℂ` is the |
| 54 | embedding over `K` chosen at the place `v`, and the places carry the group structure of |
| 55 | `Gal(E/K)` (that of `P.Φ s`). -/ |
| 56 | noncomputable def placePerm {P : Parameters} (s : ℕ) (σ : Gal(ℂ/K P)) : |
| 57 | Equiv.Perm (NumberField.InfinitePlace (P.E s)) := |
| 58 | Equiv.mulLeft (NumberField.InfinitePlace.mk (RingHom.comp σ (Φ 1)) : P.Φ s) |
| 59 | |
| 60 | /-- The place `placePerm s σ v` is the product, in the group of infinite places, of the place of |
| 61 | `σ ∘ Φ 1` with `v`. -/ |
| 62 | lemma placePerm_apply {P : Parameters} {s : ℕ} (σ : Gal(ℂ/P.K)) (v : P.Φ s) : |
| 63 | placePerm s σ v = (NumberField.InfinitePlace.mk (RingHom.comp σ (Φ 1)) : P.Φ s) * v := rfl |
| 64 | |
| 65 | /-- An automorphism `σ` of `ℂ` over `K` carries the embedding `Φ v : E →+* ℂ` chosen at the infinite |
| 66 | place `v` of `E = P.E s` to the embedding chosen at the place `placePerm s σ v`. -/ |
| 67 | lemma apply_Phi_eq_Phi_placePerm {P : Parameters} {s : ℕ} {σ : Gal(ℂ/P.K)} |
| 68 | (v : NumberField.InfinitePlace (P.E s)) (x : P.E s) : |
| 69 | σ (Φ v x) = Φ (placePerm (P := P) s σ v) x := by |
| 70 | -- `σ ∘ Φ 1` is an embedding over `K`, so it is `Φ` of the place `v₀` that it induces. |
| 71 | let φ : P.E s →ₐ[P.K] ℂ := .comp σ ⟨Φ 1, by simp⟩ |
| 72 | let v₀ : P.Φ s := .mk (RingHom.comp σ (Φ 1)) |
| 73 | have h_emb : (⟨Φ v₀, by simp⟩ : P.E s →ₐ[P.K] ℂ) = φ := P.algHom_eq_of_mk_eq s (mk_Φ v₀) |
| 74 | have h_apply (y : P.E s) : Φ v₀ y = σ (Φ 1 y) := DFunLike.congr_fun h_emb y |
| 75 | rw [placePerm_apply, phi_mul, h_apply, ← phi_mul, one_mul] |
| 76 | |
| 77 | /-! |
| 78 | ## The different of E and an imaginary generator |
| 79 | |
| 80 | A primitive `q₁`-th root of unity generates `𝓞 E` over `𝓞 K`, and P'(ζ) generates the different of |
| 81 | `E/K`. |
| 82 | -/ |
| 83 | |
| 84 | section Different |
| 85 | |
| 86 | open Ideal Finset IntermediateField IsCyclotomicExtension NumberField Polynomial Algebra |
| 87 | InfinitePlace RingOfIntegers NeZero QuadField algebraMap |
| 88 | |
| 89 | variable {P : Parameters} {s : ℕ} {z : 𝓞 (E P s)} |
| 90 | |
| 91 | /-! ### The integers `ζ`, `(1 + √-d) / 2` and `√-d` of `E`, and a root of unity of order `5040` -/ |
| 92 | |
| 93 | /-- The chosen primitive `q₁`-th root of unity as an element of `𝓞 E`. -/ |
| 94 | abbrev zetaInt (P : Parameters) (s : ℕ) : 𝓞 (P.E s) := |
| 95 | (isPrimitiveRoot_zeta (P := P) (s := s)).toInteger |
| 96 | |
| 97 | /-- The integer primitive root `zetaInt` coerces to `ζ`. -/ |
| 98 | @[simp] |
| 99 | lemma coe_zetaInt : P.zetaInt s = P.ζ s := rfl |
| 100 | |
| 101 | /-- The element `zetaInt` is a primitive root of unity of order `q₁`. -/ |
| 102 | lemma isPrimitiveRoot_zetaInt : IsPrimitiveRoot (P.zetaInt s) (P.q₁ s) := |
| 103 | isPrimitiveRoot_zeta.toInteger_isPrimitiveRoot |
| 104 | |
| 105 | /-- The number `β_K = (1 + √-d) / 2` as an integer of `E`. -/ |
| 106 | abbrev betaKInE (P : Parameters) (s : ℕ) : 𝓞 (E P s) := betaK P.d |
| 107 | |
| 108 | /-- The integer `√-d = 2 β_K - 1` of `K`, as an element of `𝓞 E`. -/ |
| 109 | def sqrtNegDInE (P : Parameters) (s : ℕ) : 𝓞 (P.E s) := |
| 110 | algebraMap (𝓞 (K P)) (𝓞 (E P s)) (sqrtNegDInt P.d) |
| 111 | |
| 112 | /-- The element `√-d` of `𝓞 E` is the image in `E` of `sqrtNegD P.d`, the square root `√-d` in the |
| 113 | quadratic field `QuadField P.d = ℚ(√-d)`, which is `P.K`. -/ |
| 114 | @[simp] |
| 115 | lemma coe_sqrtNegDInE : |
| 116 | (P.sqrtNegDInE s).val = algebraMap (QuadField P.d) (P.E s) (sqrtNegD P.d) := by |
| 117 | change algebraMap P.K (P.E s) (sqrtNegDInt P.d).val = algebraMap P.K (P.E s) (sqrtNegD P.d) |
| 118 | simp [two_mul] |
| 119 | |
| 120 | /-- The complex conjugate of `√-d` in `𝓞 E` is `-√-d`. -/ |
| 121 | lemma star_sqrtNegDInE : star (P.sqrtNegDInE s) = -P.sqrtNegDInE s := |
| 122 | ext (by simp [← map_star_CM]) |
| 123 | |
| 124 | /-- The conjugate of `ζ ^ c` is its inverse in `𝓞 E`, for the root of unity `ζ = zetaInt`. -/ |
| 125 | lemma star_zetaInt_pow_mul_zetaInt_pow_eq_one (c : ℕ) : |
| 126 | star (P.zetaInt s) ^ c * P.zetaInt s ^ c = 1 := |
| 127 | ext (by simp [isPrimitiveRoot_zeta.ne_zero, ne]) |
| 128 | |
| 129 | /-- The square of `√-d` in `𝓞 E` is `-d`. -/ |
| 130 | lemma sqrtNegDInE_sq : P.sqrtNegDInE s ^ 2 = -P.d := by |
| 131 | rw [sqrtNegDInE, ← map_pow, sqrtNegDInt_sq, map_neg, map_natCast] |
| 132 | |
| 133 | /-- The element `√-d` of `𝓞 E` divides `d`. -/ |
| 134 | lemma sqrtNegDInE_dvd_d : P.sqrtNegDInE s ∣ P.d := |
| 135 | ⟨-P.sqrtNegDInE s, by rw [mul_neg, ← sq, sqrtNegDInE_sq, neg_neg]⟩ |
| 136 | |
| 137 | /-- The different of `K`, extended to `𝓞 E`, is generated by `√-d`. -/ |
| 138 | lemma map_differentIdeal_eq_span_sqrtNegDInE : |
| 139 | (differentIdeal ℤ (𝓞 P.K)).map (algebraMap (𝓞 P.K) (𝓞 (P.E s))) = span {P.sqrtNegDInE s} := by |
| 140 | rw [(different_eq_span_and_adjoin_betaK P.d).1, map_span, Set.image_singleton, sqrtNegDInE] |
| 141 | |
| 142 | /-- `β_K β̄_K = (d + 1) / 4` in `𝓞 E`, with `β̄_K = 1 - β_K`. -/ |
| 143 | lemma betaKInE_mul_one_sub (P : Parameters) (s : ℕ) : |
| 144 | betaKInE P s * (1 - P.betaKInE s) = (((P.d + 1) / 4 : ℕ) : 𝓞 (P.E s)) := by |
| 145 | simpa using congrArg (algebraMap (𝓞 P.K) (𝓞 (P.E s))) (betaK_mul_one_sub P.d) |
| 146 | |
| 147 | /-- `β_K + β̄_K = 1`: the complex conjugate of `β_K` in `𝓞 E` is `1 - β_K`. -/ |
| 148 | lemma star_betaKInE (P : Parameters) (s : ℕ) : star (betaKInE P s) = 1 - P.betaKInE s := by |
| 149 | have h_star : 2 * star (P.betaKInE s) - 1 = -(2 * P.betaKInE s - 1) := by |
| 150 | simpa [sqrtNegDInE, map_ofNat] using star_sqrtNegDInE (P := P) (s := s) |
| 151 | exact mul_left_cancel₀ two_ne_zero (by linear_combination h_star) |
| 152 | |
| 153 | /-- The field `E` contains a primitive root of unity of order `5040`. -/ |
| 154 | instance : HasPrimitiveRoot5040 (P.E s) where |
| 155 | exists_primitive_root := by |
| 156 | -- `5040` divides `18480 * 3`, hence `q₁`; take the power `q₁ / 5040` of `ζ` |
| 157 | have h_three : 3 ∣ towerDeg s := (dvd_pow_self 3 (Nat.succ_ne_zero _)).mul_right _ |
| 158 | have h_dvd : 5040 ∣ P.q₁ s := .trans (by norm_num) (mul_dvd_mul P.dvd_q₀ h_three) |
| 159 | exact ⟨P.ζ s ^ (P.q₁ s / 5040), isPrimitiveRoot_zeta.pow one_le (Nat.div_mul_cancel h_dvd).symm⟩ |
| 160 | |
| 161 | /-! ### The different of `E/K` at a primitive `q₁`-th root of unity -/ |
| 162 | |
| 163 | /-- Differentiate `X ^ N - 1 = f * Q` at a root of `f` and multiply by that root. -/ |
| 164 | lemma natCast_eq_eval_derivative_mul {R : Type*} [CommRing R] {N : ℕ} {ζ : R} {f Q : R[X]} |
| 165 | (hN : N ≠ 0) (hζ : ζ ^ N = 1) (hf : f.eval ζ = 0) (hQ : X ^ N - 1 = f * Q) : |
| 166 | (N : R) = f.derivative.eval ζ * (Q.eval ζ * ζ) := by |
| 167 | calc (N : R) = (X ^ N - 1 : R[X]).derivative.eval ζ * ζ := by |
| 168 | simp [derivative_pow, mul_assoc, pow_sub_one_mul, hζ, hN] |
| 169 | _ = _ := by simp [hQ, hf, mul_assoc] |
| 170 | |
| 171 | /-- The derivative of the cyclotomic polynomial of level `q₁`, evaluated at a primitive `q₁`-th |
| 172 | root of unity `z ∈ 𝓞 E`, divides `q₁` in `𝓞 E`. -/ |
| 173 | lemma eval_derivative_cyclotomic_dvd_q₁ (hz : IsPrimitiveRoot z (P.q₁ s)) : |
| 174 | (cyclotomic (P.q₁ s) (𝓞 (P.E s))).derivative.eval z ∣ P.q₁ s := by |
| 175 | obtain ⟨Q, hQ⟩ := cyclotomic.dvd_X_pow_sub_one (P.q₁ s) (𝓞 (P.E s)) |
| 176 | exact ⟨Q.eval z * z, natCast_eq_eval_derivative_mul (ne _) hz.pow_eq_one |
| 177 | (hz.isRoot_cyclotomic one_le) hQ⟩ |
| 178 | |
| 179 | /-- Let `z ∈ 𝓞 E` be a primitive `q₁`-th root of unity. The different of `ℚ(z)`, extended to `𝓞 E`, |
| 180 | is generated by the value at `z` of the derivative of the cyclotomic polynomial of level `q₁`. |
| 181 | |
| 182 | This is the Euler–Dedekind formula for the different of a monogenic extension, in the case of the |
| 183 | cyclotomic field `ℚ(z)` over `ℚ`, stated after extension of the ideal to `𝓞 E`. -/ |
| 184 | lemma map_differentIdeal_adjoin_eq_span (hz : IsPrimitiveRoot z (P.q₁ s)) : |
| 185 | (differentIdeal ℤ (𝓞 ℚ⟮z.val⟯)).map (algebraMap (𝓞 ℚ⟮z.val⟯) (𝓞 (P.E s))) = |
| 186 | span {(cyclotomic (P.q₁ s) (𝓞 (P.E s))).derivative.eval z} := by |
| 187 | have hz_val : IsPrimitiveRoot z.val (P.q₁ s) := hz.map_of_injective coe_injective |
| 188 | have : IsCyclotomicExtension {P.q₁ s} ℚ ℚ⟮z.val⟯ := |
| 189 | hz_val.intermediateField_adjoin_isCyclotomicExtension _ |
| 190 | have h_gen : IsPrimitiveRoot (AdjoinSimple.gen ℚ z.val) (P.q₁ s) := |
| 191 | IsPrimitiveRoot.coe_submonoidClass_iff.1 hz_val |
| 192 | -- The integers of `ℚ(z)` are generated by `z`, so the derivative generates the different. |
| 193 | set g : 𝓞 ℚ⟮z.val⟯ := h_gen.toInteger |
| 194 | have h_different := |
| 195 | TauCeti.differentIdeal_eq_span_aeval_derivative_minpoly ℤ ℚ ℚ⟮z.val⟯ _ g |
| 196 | (Rat.adjoin_singleton_eq_top h_gen) |
| 197 | have h_minpoly : cyclotomic (P.q₁ s) ℤ = minpoly ℤ g := |
| 198 | (cyclotomic_eq_minpoly h_gen one_le).trans (minpoly_coe g) |
| 199 | rw [h_different, ← h_minpoly, map_span, Set.image_singleton, ← aeval_algebraMap_apply, |
| 200 | ← eval_map_algebraMap, ← derivative_map, map_cyclotomic] |
| 201 | rfl |
| 202 | |
| 203 | /-- Let `z ∈ 𝓞 E` be a primitive `q₁`-th root of unity, and `y` the value at `z` of the derivative |
| 204 | of the cyclotomic polynomial of level `q₁`. Then the ideal `(y)` divides the different of `E/K`. -/ |
| 205 | lemma span_derivative_cyclotomic_dvd_differentIdeal (hz : IsPrimitiveRoot z (P.q₁ s)) : |
| 206 | span {(cyclotomic (P.q₁ s) (𝓞 (P.E s))).derivative.eval z} ∣ |
| 207 | differentIdeal (𝓞 P.K) (𝓞 (P.E s)) := by |
| 208 | -- `y` generates the different of `ℚ(z)` and is prime to `√-d`, which generates that of `K`. |
| 209 | rw [← map_differentIdeal_adjoin_eq_span hz] |
| 210 | refine IsDedekindDomain.map_differentIdeal_dvd_differentIdeal ℤ (𝓞 (P.E s)) (𝓞 P.K) |
| 211 | (𝓞 ℚ⟮z.val⟯) ?_ |
| 212 | rw [map_differentIdeal_eq_span_sqrtNegDInE, map_differentIdeal_adjoin_eq_span hz, |
| 213 | isCoprime_span_singleton_iff] |
| 214 | exact (P.coprime_q₁_d s).symm.cast.mono sqrtNegDInE_dvd_d (eval_derivative_cyclotomic_dvd_q₁ hz) |
| 215 | |
| 216 | /-- Let `z ∈ 𝓞 E` be a primitive `q₁`-th root of unity. The value at `z` of the derivative of the |
| 217 | cyclotomic polynomial of level `q₁` generates the different of `E/K`, and `𝓞 E = 𝓞 K[z]`. -/ |
| 218 | lemma differentIdeal_eq_span_and_adjoin_eq_top (hz : IsPrimitiveRoot z (P.q₁ s)) : |
| 219 | differentIdeal (𝓞 P.K) (𝓞 (P.E s)) = |
| 220 | span {(cyclotomic (P.q₁ s) (𝓞 (P.E s))).derivative.eval z} ∧ |
| 221 | (𝓞 P.K)[z] = ⊤ := by |
| 222 | refine differentIdeal_eq_span_of_dvd P.K |
| 223 | (adjoin_primitive_root_eq_top (hz.map_of_injective coe_injective)) |
| 224 | (cyclotomic (P.q₁ s) (𝓞 P.K)) ?_ ?_ (span_derivative_cyclotomic_dvd_differentIdeal hz) |
| 225 | · rw [← eval_map_algebraMap, map_cyclotomic] |
| 226 | exact hz.isRoot_cyclotomic one_le |
| 227 | · rw [← eval_map_algebraMap, ← derivative_map, map_cyclotomic] |
| 228 | |
| 229 | /-- The different of `E/K` is generated by the derivative of the cyclotomic polynomial of level |
| 230 | `q₁` evaluated at a primitive `q₁`-th root of unity `z ∈ 𝓞 E`. -/ |
| 231 | lemma differentIdeal_eq_span_derivative_cyclotomic (hz : IsPrimitiveRoot z (P.q₁ s)) : |
| 232 | differentIdeal (𝓞 P.K) (𝓞 (P.E s)) = |
| 233 | span {(cyclotomic (P.q₁ s) (𝓞 (P.E s))).derivative.eval z} := |
| 234 | (differentIdeal_eq_span_and_adjoin_eq_top hz).1 |
| 235 | |
| 236 | /-- A primitive `q₁`-th root of unity `z` in `𝓞 E` generates `𝓞 E` over `𝓞 K`. -/ |
| 237 | lemma adjoin_eq_top_of_isPrimitiveRoot (hz : IsPrimitiveRoot z (P.q₁ s)) : (𝓞 P.K)[z] = ⊤ := |
| 238 | (differentIdeal_eq_span_and_adjoin_eq_top hz).2 |
| 239 | |
| 240 | /-- The ring of integers of `E` is `ℤ[β_K, ζ]`, where `β_K = (1 + √-d) / 2` and `ζ` is the primitive |
| 241 | root of unity of order `q₁`. -/ |
| 242 | lemma adjoin_betaKInE_zetaInt_eq_top : adjoin ℤ {P.betaKInE s, P.zetaInt s} = ⊤ := by |
| 243 | -- `𝓞 K = ℤ[β_K]` and `𝓞 E = 𝓞 K[ζ]` |
| 244 | have h_quad : adjoin ℤ {betaK P.d} = ⊤ := (different_eq_span_and_adjoin_betaK P.d).2 |
| 245 | simpa [adjoin_eq_top_of_isPrimitiveRoot isPrimitiveRoot_zetaInt, Set.pair_comm] using |
| 246 | (adjoin_eq_adjoin_union ℤ {betaK P.d} {P.zetaInt s} h_quad).symm |
| 247 | |
| 248 | /-! ### The generator P'(ζ) and the different of `E` -/ |
| 249 | |
| 250 | /-- The value at `ζ` of the derivative of the `q₁`-th cyclotomic polynomial, as an element of `𝓞 E`. |
| 251 | It generates the different of `E/K`. -/ |
| 252 | abbrev relDifferentGen (P : Parameters) (s : ℕ) : 𝓞 (P.E s) := |
| 253 | (cyclotomic (P.q₁ s) (𝓞 (P.E s))).derivative.eval (P.zetaInt s) |
| 254 | |
| 255 | /-- The generator `relDifferentGen` of the different of `E/K` divides `q₁`. -/ |
| 256 | lemma relDifferentGen_dvd_q₁ : P.relDifferentGen s ∣ P.q₁ s := |
| 257 | eval_derivative_cyclotomic_dvd_q₁ isPrimitiveRoot_zetaInt |
| 258 | |
| 259 | /-- The different of `E/K` is generated by `relDifferentGen`. -/ |
| 260 | lemma differentIdeal_eq_span_relDifferentGen : |
| 261 | differentIdeal (𝓞 P.K) (𝓞 (P.E s)) = span {P.relDifferentGen s} := |
| 262 | differentIdeal_eq_span_derivative_cyclotomic isPrimitiveRoot_zetaInt |
| 263 | |
| 264 | /-- The generator `relDifferentGen` is nonzero. -/ |
| 265 | @[simp↓] |
| 266 | lemma relDifferentGen_ne_zero (P : Parameters) (s : ℕ) : (relDifferentGen P s).val ≠ 0 := |
| 267 | coe_ne_zero_iff.2 (ne_zero_of_dvd_ne_zero (Nat.cast_ne_zero.2 (ne _)) relDifferentGen_dvd_q₁) |
| 268 | |
| 269 | /-- The different of `E` over `ℚ` is generated by the product of the generator `relDifferentGen` of |
| 270 | the different of `E/K` and `√-d`. -/ |
| 271 | lemma differentIdeal_eq_span_relDifferentGen_mul : |
| 272 | differentIdeal ℤ (𝓞 (P.E s)) = span {P.relDifferentGen s * P.sqrtNegDInE s} := by |
| 273 | -- transitivity of the different in `ℚ ⊆ K ⊆ E` |
| 274 | rw [differentIdeal_eq_differentIdeal_mul_differentIdeal ℤ (𝓞 P.K), |
| 275 | differentIdeal_eq_span_relDifferentGen, map_differentIdeal_eq_span_sqrtNegDInE, |
| 276 | span_singleton_mul_span_singleton] |
| 277 | |
| 278 | /-- The number `q₁ * d` lies in the different of `E` over `ℤ`. -/ |
| 279 | lemma conductor_mem_differentIdeal : |
| 280 | ((P.q₁ s * P.d : ℕ) : 𝓞 (P.E s)) ∈ differentIdeal ℤ (𝓞 (P.E s)) := by |
| 281 | rw [Nat.cast_mul, differentIdeal_eq_span_relDifferentGen_mul, mem_span_singleton] |
| 282 | exact mul_dvd_mul relDifferentGen_dvd_q₁ sqrtNegDInE_dvd_d |
| 283 | |
| 284 | /-! ### The imaginary generator -/ |
| 285 | |
| 286 | /-- The generator `relDifferentGen` of the different of `E/K` is the product of `ζ - a`, where |
| 287 | `ζ = zetaInt` is the chosen primitive `q₁`-th root of unity in `𝓞 E` and `a` runs over the other |
| 288 | primitive `q₁`-th roots of unity. -/ |
| 289 | lemma relDifferentGen_eq_prod_sub [DecidableEq (𝓞 (P.E s))] : |
| 290 | P.relDifferentGen s = |
| 291 | ∏ a ∈ (primitiveRoots (P.q₁ s) (𝓞 (P.E s))).erase (P.zetaInt s), (P.zetaInt s - a) := by |
| 292 | rw [relDifferentGen, cyclotomic_eq_prod_X_sub_primitiveRoots isPrimitiveRoot_zetaInt, |
| 293 | ← mul_prod_erase _ _ ((mem_primitiveRoots (pos _)).2 isPrimitiveRoot_zetaInt)] |
| 294 | simp [eval_prod] |
| 295 | |
| 296 | /-- Let `ζ = P.zetaInt s` be the chosen primitive `q₁`-th root of unity in `𝓞 E`, `E = K(ζ)`. For |
| 297 | every primitive `q₁`-th root of unity `a` in `𝓞 E`, some `u` with `star u * u = 1` makes |
| 298 | `u * (ζ - a)` fixed by complex conjugation `star`. -/ |
| 299 | lemma exists_unit_mul_zetaInt_sub_real {a : 𝓞 (P.E s)} (ha : IsPrimitiveRoot a (P.q₁ s)) : |
| 300 | ∃ u : 𝓞 (P.E s), star u * u = 1 ∧ star (u * (P.zetaInt s - a)) = u * (P.zetaInt s - a) := by |
| 301 | -- As `q₁` is even, `a = ζ ^ (2 * e + 1)`. With `i * i = -1`, take `u = i * star ζ ^ (e + 1)`: |
| 302 | -- then `u * (ζ - a) = i * (star ζ ^ e - ζ ^ e)` is a product of two imaginary elements. |
| 303 | obtain ⟨l, -, hl, rfl⟩ := isPrimitiveRoot_zetaInt.isPrimitiveRoot_iff.1 ha |
| 304 | obtain ⟨e, rfl⟩ : Odd l := |
| 305 | (hl.of_dvd_right ((dvd_pow_self 2 s.succ_ne_zero).trans two_pow_dvd_q₁)).odd_of_right |
| 306 | obtain ⟨i, hi_sq, hi_star⟩ : ∃ i : 𝓞 (P.E s), i * i = -1 ∧ star i = -i := |
| 307 | HasPrimitiveRoot5040.exists_mul_self_eq_neg_one |
| 308 | set ξ : 𝓞 (P.E s) := P.zetaInt s |
| 309 | have h_unit (n : ℕ) : star ξ ^ n * ξ ^ n = 1 := star_zetaInt_pow_mul_zetaInt_pow_eq_one n |
| 310 | have h_factor : star ξ ^ (e + 1) * (ξ - ξ ^ (2 * e + 1)) = star ξ ^ e - ξ ^ e := by |
| 311 | linear_combination star ξ ^ e * h_unit 1 - ξ ^ e * h_unit (e + 1) |
| 312 | refine ⟨i * star ξ ^ (e + 1), ?_, ?_⟩ |
| 313 | · rw [star_mul', hi_star, star_pow, star_star] |
| 314 | linear_combination -(star ξ ^ (e + 1) * ξ ^ (e + 1)) * hi_sq + h_unit (e + 1) |
| 315 | · rw [mul_assoc, h_factor, star_mul', hi_star, star_sub, star_pow, star_pow, star_star] |
| 316 | ring |
| 317 | |
| 318 | /-- Some `c` in `𝓞 E` with `star c * c = 1` makes `c * relDifferentGen` fixed by complex |
| 319 | conjugation `star`; here `relDifferentGen` is the generator of the different of `E/K`. -/ |
| 320 | lemma exists_unit_mul_relDifferentGen_real : |
| 321 | ∃ c : 𝓞 (P.E s), star c * c = 1 ∧ star (c * P.relDifferentGen s) = c * P.relDifferentGen s := by |
| 322 | classical |
| 323 | -- `relDifferentGen` is the product of the `ζ - a`; multiply the units that make each factor real. |
| 324 | set S : Finset (𝓞 (P.E s)) := (primitiveRoots (P.q₁ s) (𝓞 (P.E s))).erase (P.zetaInt s) |
| 325 | have h_factor : ∀ a ∈ S, ∃ u : 𝓞 (P.E s), star u * u = 1 ∧ |
| 326 | star (u * (P.zetaInt s - a)) = u * (P.zetaInt s - a) := fun a ha ↦ |
| 327 | exists_unit_mul_zetaInt_sub_real (isPrimitiveRoot_of_mem_primitiveRoots (mem_of_mem_erase ha)) |
| 328 | choose! u hu hu_real using h_factor |
| 329 | refine ⟨∏ a ∈ S, u a, ?_, ?_⟩ |
| 330 | · rw [star_prod, ← prod_mul_distrib, prod_eq_one hu] |
| 331 | · rw [relDifferentGen_eq_prod_sub, ← prod_mul_distrib, star_prod, prod_congr rfl hu_real] |
| 332 | |
| 333 | /-- A chosen `c` in `𝓞 E` with `star c * c = 1` such that `c * relDifferentGen` is fixed by |
| 334 | `star`; see `star_differentGenPhase_mul_self` and `star_differentGenPhase_mul_relDifferentGen`. -/ |
| 335 | def differentGenPhase (P : Parameters) (s : ℕ) : 𝓞 (P.E s) := |
| 336 | (exists_unit_mul_relDifferentGen_real (P := P) (s := s)).choose |
| 337 | |
| 338 | /-- The element `differentGenPhase` has complex conjugate times itself equal to `1`. -/ |
| 339 | lemma star_differentGenPhase_mul_self : star (P.differentGenPhase s) * P.differentGenPhase s = 1 := |
| 340 | exists_unit_mul_relDifferentGen_real.choose_spec.1 |
| 341 | |
| 342 | /-- The product of `differentGenPhase` and the generator `relDifferentGen` of the different of `E/K` |
| 343 | is fixed by complex conjugation. -/ |
| 344 | lemma star_differentGenPhase_mul_relDifferentGen : |
| 345 | star (P.differentGenPhase s * P.relDifferentGen s) = P.differentGenPhase s * P.relDifferentGen |
| 346 | s := |
| 347 | exists_unit_mul_relDifferentGen_real.choose_spec.2 |
| 348 | |
| 349 | /-- The element `differentGenPhase` is a unit of `𝓞 E`. -/ |
| 350 | lemma isUnit_differentGenPhase : IsUnit (P.differentGenPhase s) := |
| 351 | .of_mul_eq_one_right _ star_differentGenPhase_mul_self |
| 352 | |
| 353 | /-- The element `c * relDifferentGen * √-d` of `𝓞 E`, where `c = differentGenPhase`; the comments |
| 354 | write `ϖ` for it. It is a purely imaginary generator of the different of `E`: see `star_deltaE` and |
| 355 | `differentIdeal_eq_span_deltaE`. -/ |
| 356 | def deltaE (P : Parameters) (s : ℕ) : 𝓞 (P.E s) := |
| 357 | P.differentGenPhase s * (P.relDifferentGen s * P.sqrtNegDInE s) |
| 358 | |
| 359 | /-- By definition, `deltaE` is the product of `differentGenPhase`, `relDifferentGen` and `√-d`. -/ |
| 360 | lemma deltaE_def : P.deltaE s = P.differentGenPhase s * (P.relDifferentGen s * P.sqrtNegDInE s) := |
| 361 | rfl |
| 362 | |
| 363 | /-- The generator `deltaE` of the different of `E` is purely imaginary: it is the product of a real |
| 364 | element and `√-d`. -/ |
| 365 | lemma star_deltaE : star (P.deltaE s) = -P.deltaE s := by |
| 366 | rw [deltaE_def, ← mul_assoc, star_mul', star_differentGenPhase_mul_relDifferentGen, |
| 367 | star_sqrtNegDInE, mul_neg] |
| 368 | |
| 369 | lemma differentIdeal_eq_span_deltaE : differentIdeal ℤ (𝓞 (P.E s)) = span {P.deltaE s} := by |
| 370 | rw [deltaE_def, span_singleton_mul_left_unit isUnit_differentGenPhase, |
| 371 | differentIdeal_eq_span_relDifferentGen_mul] |
| 372 | |
| 373 | /-- The product of `v (P.deltaE s)` over all infinite places `v` of `E` (the type `P.Φ s`) is the |
| 374 | root discriminant of `E` raised to the number of infinite places. -/ |
| 375 | lemma prod_deltaE_eq_rootDiscr_pow : |
| 376 | ∏ v : P.Φ s, v (P.deltaE s).val = rootDiscr (P.E s) ^ Core.numInfPlaces (P.E s) := by |
| 377 | -- The square of the product is `|N (P.deltaE s)|`, the norm of the different, that is |
| 378 | -- `|discr E|`. |
| 379 | have h_absNorm : absNorm (span {P.deltaE s}) = (discr (P.E s)).natAbs := by |
| 380 | rw [← differentIdeal_eq_span_deltaE, absNorm_differentIdeal (P.E s)] |
| 381 | rw [← sq_eq_sq₀ (prod_nonneg fun v _ ↦ apply_nonneg v _) (pow_pos (rootDiscr_pos _) _).le] |
| 382 | calc (∏ v : P.Φ s, v (P.deltaE s).val) ^ 2 = |(norm ℚ (P.deltaE s).val : ℝ)| := by |
| 383 | simpa [prod_pow] using prod_eq_abs_norm (P.deltaE s).val |
| 384 | _ = |(discr (P.E s) : ℝ)| := by |
| 385 | simpa [← coe_norm_int] using congrArg (Nat.cast : ℕ → ℝ) h_absNorm |
| 386 | _ = (rootDiscr (P.E s) ^ Core.numInfPlaces (P.E s)) ^ 2 := by rw [abs_discr_eq_rootDiscr_pow] |
| 387 | |
| 388 | /-- The element `c = differentGenPhase`, which satisfies `star c * c = 1`, has absolute value `1` |
| 389 | under the chosen embedding `Φ v : E →+* ℂ` at every infinite place `v`. -/ |
| 390 | lemma norm_Φ_differentGenPhase (v : P.Φ s) : ‖Φ v (P.differentGenPhase s).val‖ = 1 := |
| 391 | (pow_eq_one_iff_of_nonneg (norm_nonneg _) two_ne_zero).1 <| by |
| 392 | simpa [sq] using congrArg (fun x : 𝓞 (P.E s) ↦ ‖Φ v x.val‖) star_differentGenPhase_mul_self |
| 393 | |
| 394 | /-- At every infinite place `v` of `E = P.E s`, `|deltaE|_v = |relDifferentGen|_v * √d`. Here |
| 395 | `deltaE` generates the different of `E/ℚ` and `relDifferentGen` the different of `E/K`. -/ |
| 396 | lemma infinitePlace_apply_deltaE (v : P.Φ s) : |
| 397 | v (P.deltaE s).val = v (P.relDifferentGen s).val * √P.d := by |
| 398 | -- `deltaE = differentGenPhase * relDifferentGen * √-d`; read `v` through `Φ v : E →+* ℂ` |
| 399 | have apply_eq_norm (x : P.E s) : v x = ‖Φ v x‖ := (PlaceEmbedding.norm_apply v x).symm |
| 400 | simp [apply_eq_norm, deltaE_def, norm_Φ_differentGenPhase] |
| 401 | |
| 402 | end Different |
| 403 | |
| 404 | /-! |
| 405 | ## Decomposition of rational primes in E |
| 406 | |
| 407 | * `New.Parameters.intValuation_natCast_eq_exp_neg_one`: a prime not dividing `q₁ d` is unramified. |
| 408 | * `New.Parameters.smul_eq_self_iff_of_inert`, `New.Parameters.smul_eq_star_iff_of_inert`, |
| 409 | `New.Parameters.q_eq_pow_lcm_of_inert`: the case `(p/d) = -1`, where `(p/d)` is `New.chiK d p`. |
| 410 | * `New.Parameters.natCast_dvd_pow_sub_galOfPlaceInt_star`: in that case, for odd `n`, the `pⁿ`-th |
| 411 | power is modulo `p` complex conjugation followed by the Galois element named by `-pⁿ`. |
| 412 | -/ |
| 413 | |
| 414 | section Decomposition |
| 415 | |
| 416 | open NumberField IsDedekindDomain HeightOneSpectrum Ideal Quotient FiniteField Algebra CharP ZMod |
| 417 | NeZero QuadField Polynomial |
| 418 | |
| 419 | attribute [local instance] Quotient.field ZMod.algebra |
| 420 | |
| 421 | variable {P : Parameters} {s p : ℕ} |
| 422 | |
| 423 | /-! ### The action on finite places and the Frobenius element -/ |
| 424 | |
| 425 | /-- The ring endomorphism of `𝓞 E` given by the element `σ_v = galOfPlace s v` of `Gal(E/K)` |
| 426 | attached to the infinite place `v`. -/ |
| 427 | def galOfPlaceInt (v : P.Φ s) : 𝓞 (P.E s) →+* 𝓞 (P.E s) := |
| 428 | MulSemiringAction.toRingHom Gal(P.E s/P.K) (𝓞 (P.E s)) (P.galOfPlace s v) |
| 429 | |
| 430 | /-- For `x` in `𝓞 E`, the image `galOfPlaceInt v x`, viewed in `E`, is `galOfPlace s v x`: |
| 431 | `galOfPlaceInt v` is the action of `galOfPlace s v` on `𝓞 E`. -/ |
| 432 | @[simp] |
| 433 | theorem coe_galOfPlaceInt {v : P.Φ s} (x : 𝓞 (P.E s)) : |
| 434 | (galOfPlaceInt v x : P.E s) = P.galOfPlace s v x := rfl |
| 435 | |
| 436 | /-- An infinite place `v` acts on the finite places of `E` by pullback along the element |
| 437 | `galOfPlace s v` of `Gal(E/K)`. -/ |
| 438 | instance : SMul (P.Φ s) (FinPlace (P.E s)) := ⟨(FinPlace.comap <| P.galOfPlace s ·)⟩ |
| 439 | |
| 440 | /-- An integer `x` of `E` lies in the prime `v • w` if and only if `σ_v x` lies in `w`, where `σ_v` |
| 441 | is the element of `Gal(E/K)` attached to `v`. -/ |
| 442 | @[simp] |
| 443 | lemma mem_asIdeal_smul_iff {v : P.Φ s} {w : FinPlace (P.E s)} {x : 𝓞 (P.E s)} : |
| 444 | x ∈ (v • w).asIdeal ↔ galOfPlaceInt v x ∈ w.asIdeal := .rfl |
| 445 | |
| 446 | /-- The Frobenius element at the prime `p`: the pair of the place named by the integer `(p/d) p` |
| 447 | and the sign `(p/d) = chiK P.d p`. Let `p ∤ q₁ d` be prime and `e = ±1`. Then `(v, e)` is its |
| 448 | `n`-th power exactly when, modulo a prime above `p`, `galOfPlaceInt v` acts as the `n`-th power of |
| 449 | Frobenius, composed with complex conjugation if `e = -1` |
| 450 | (`New.Parameters.map_galOfPlaceInt_eq_pow_iff_eq_frobElem_pow`). -/ |
| 451 | @[simp] |
| 452 | def frobElem (s p : ℕ) : P.Φ s × ℤ := (P.placeOfInt s (chiK P.d p * p), chiK P.d p) |
| 453 | |
| 454 | /-- The pair `(c, e)` is the identity of `𝓞 E` with the sign `1`, or complex conjugation with the |
| 455 | sign `-1`. -/ |
| 456 | def IsIdOrConjWithSign (c : 𝓞 (P.E s) ≃+* 𝓞 (P.E s)) (e : ℤ) : Prop := |
| 457 | c = RingEquiv.refl (𝓞 (P.E s)) ∧ e = 1 ∨ c = starRingAut ∧ e = -1 |
| 458 | |
| 459 | /-- The identity of `𝓞 E` with the sign `1` is of the form `IsIdOrConjWithSign`. -/ |
| 460 | lemma isIdOrConjWithSign_refl : IsIdOrConjWithSign (RingEquiv.refl (𝓞 (P.E s))) 1 := .inl ⟨rfl, rfl⟩ |
| 461 | |
| 462 | /-- Complex conjugation of `𝓞 E` with the sign `-1` is of the form `IsIdOrConjWithSign`. -/ |
| 463 | lemma isIdOrConjWithSign_star : IsIdOrConjWithSign (starRingAut : 𝓞 (P.E s) ≃+* 𝓞 (P.E s)) (-1) := |
| 464 | .inr ⟨rfl, rfl⟩ |
| 465 | |
| 466 | /-- In `IsIdOrConjWithSign c e`, the sign `e` is `1` or `-1`. -/ |
| 467 | lemma IsIdOrConjWithSign.sign_eq_one_or_neg_one {c : 𝓞 (P.E s) ≃+* 𝓞 (P.E s)} {e : ℤ} |
| 468 | (h_sign : IsIdOrConjWithSign c e) : e = 1 ∨ e = -1 := |
| 469 | h_sign.imp And.right And.right |
| 470 | |
| 471 | /-- Two ring maps `f g` from `𝓞 E` to a commutative ring `R` are equal if they agree at `zetaInt` |
| 472 | (the chosen primitive `q₁`-th root of unity `ζ`) and at `betaKInE = (1 + √-d) / 2`. -/ |
| 473 | lemma ringHom_ext_zetaInt_betaKInE {R : Type*} [CommRing R] {f g : 𝓞 (P.E s) →+* R} |
| 474 | (h_zeta : f (P.zetaInt s) = g (P.zetaInt s)) (h_beta : f (P.betaKInE s) = g (P.betaKInE s)) : |
| 475 | f = g := by |
| 476 | -- `𝓞 E = ℤ[betaKInE, zetaInt]` |
| 477 | refine RingHom.toIntAlgHom_injective (AlgHom.ext_of_adjoin_eq_top adjoin_betaKInE_zetaInt_eq_top |
| 478 | ?_) |
| 479 | rintro x (rfl | rfl) |
| 480 | exacts [h_beta, h_zeta] |
| 481 | |
| 482 | /-- A number `p` that does not divide `q₁` is not `2`. -/ |
| 483 | lemma ne_two_of_not_dvd_q₁ (hp_not_dvd : ¬p ∣ P.q₁ s) : p ≠ 2 := by |
| 484 | rintro rfl |
| 485 | exact hp_not_dvd ((dvd_pow_self 2 s.succ_ne_zero).trans two_pow_dvd_q₁) |
| 486 | |
| 487 | variable [hp : Fact p.Prime] {R : Type*} [CommRing R] [CharP R p] |
| 488 | {v : P.Φ s} {w w' : FinPlace (P.E s)} {c : 𝓞 (P.E s) ≃+* 𝓞 (P.E s)} {e : ℤ} |
| 489 | |
| 490 | /-- A prime `p` that does not divide `q₁` is coprime to `q₀`. -/ |
| 491 | lemma isCoprime_q₀_of_not_dvd (hp_not_dvd : ¬p ∣ P.q₁ s) : IsCoprime (p : ℤ) P.q₀ := |
| 492 | Nat.isCoprime_iff_coprime.2 <| hp.out.coprime_iff_not_dvd.2 fun h_dvd ↦ |
| 493 | hp_not_dvd (h_dvd.mul_right (towerDeg s)) |
| 494 | |
| 495 | /-- Let `E = P.E s`, `p ∤ q₁ = P.q₁ s` be prime, and `φ : 𝓞 E → R` a ring map to characteristic `p`. |
| 496 | Let `(c, e)` be the identity with sign `1` or complex conjugation with sign `-1`. Write |
| 497 | `σ v = galOfPlaceInt v` for the Galois element of the infinite place `v`. Then |
| 498 | `φ (σ v x) = φ (c x) ^ pⁿ` for all `x` exactly when two conditions on the generators hold. First, |
| 499 | `φ (σ v ζ) = φ (σ u ζ)` for `ζ = zetaInt`, with `u = placeOfInt (e pⁿ)` the place of the class of |
| 500 | `e pⁿ` in `(ℤ/q₁)ˣ`. Second, `(p/d)ⁿ e φ(√-d) = φ(√-d)`, with `√-d = P.sqrtNegDInE s`, `d = P.d` and |
| 501 | `(p/d) = chiK P.d p` the Legendre symbol. -/ |
| 502 | lemma forall_map_galOfPlaceInt_eq_pow_iff (hp_not_dvd : ¬p ∣ P.q₁ s) (φ : 𝓞 (P.E s) →+* R) (n : ℕ) |
| 503 | (h_sign : IsIdOrConjWithSign c e) : |
| 504 | (∀ x : 𝓞 (P.E s), φ (galOfPlaceInt v x) = φ (c x) ^ p ^ n) ↔ |
| 505 | φ (galOfPlaceInt v (P.zetaInt s)) = |
| 506 | φ (galOfPlaceInt (P.placeOfInt s (e * p ^ n)) (P.zetaInt s)) ∧ |
| 507 | chiK P.d p ^ n * e * φ (P.sqrtNegDInE s) = φ (P.sqrtNegDInE s) := by |
| 508 | -- Both sides of the equation are ring maps in `x`, and `𝓞 E = ℤ[betaKInE, zetaInt]`; so compare |
| 509 | -- them at the two generators. |
| 510 | have on_generators : (∀ x : 𝓞 (P.E s), φ (galOfPlaceInt v x) = φ (c x) ^ p ^ n) ↔ |
| 511 | φ (galOfPlaceInt v (P.zetaInt s)) = φ (c (P.zetaInt s)) ^ p ^ n ∧ |
| 512 | φ (galOfPlaceInt v (P.betaKInE s)) = φ (c (P.betaKInE s)) ^ p ^ n := by |
| 513 | refine ⟨fun h_all ↦ ⟨h_all _, h_all _⟩, fun ⟨h_zeta, h_beta⟩ ↦ ?_⟩ |
| 514 | exact DFunLike.congr_fun (ringHom_ext_zetaInt_betaKInE (f := φ.comp (galOfPlaceInt v)) |
| 515 | (g := (iterateFrobenius R p n).comp (φ.comp c.toRingHom)) h_zeta h_beta) |
| 516 | -- At `zetaInt`: conjugation inverts it, so both sides are `ζ ^ (e * p ^ n)`. |
| 517 | have at_zeta : c (P.zetaInt s) ^ p ^ n = |
| 518 | galOfPlaceInt (P.placeOfInt s (e * p ^ n)) (P.zetaInt s) := by |
| 519 | have h_coprime : IsCoprime ((p : ℤ) ^ n) P.q₀ := (isCoprime_q₀_of_not_dvd hp_not_dvd).pow_left |
| 520 | rcases h_sign with ⟨rfl, rfl⟩ | ⟨rfl, rfl⟩ <;> simp [RingOfIntegers.ext_iff, ← zpow_natCast, |
| 521 | galOfPlace_placeOfInt_zeta h_coprime, galOfPlace_placeOfInt_zeta h_coprime.neg_left] |
| 522 | -- At `betaKInE`: Frobenius multiplies `√-d = 2 * betaKInE - 1` by `chiK P.d p`. |
| 523 | have at_beta : φ (galOfPlaceInt v (P.betaKInE s)) = φ (c (P.betaKInE s)) ^ p ^ n ↔ |
| 524 | 2 * φ (galOfPlaceInt v (P.betaKInE s)) - 1 = chiK P.d p ^ n * φ (c (P.sqrtNegDInE s)) := |
| 525 | eq_map_betaK_pow_iff (ne_two_of_not_dvd_q₁ hp_not_dvd) |
| 526 | (φ.comp (c.toRingHom.comp (algebraMap (𝓞 P.K) (𝓞 (P.E s))))) n _ |
| 527 | -- `galOfPlaceInt v` fixes `betaKInE`, and `c` multiplies `√-d` by `e`. |
| 528 | have gal_beta : 2 * φ (galOfPlaceInt v (P.betaKInE s)) - 1 = φ (P.sqrtNegDInE s) := by |
| 529 | simp [galOfPlaceInt, sqrtNegDInE, map_ofNat] |
| 530 | have c_sqrt : c (P.sqrtNegDInE s) = e * P.sqrtNegDInE s := by |
| 531 | rcases h_sign with ⟨rfl, rfl⟩ | ⟨rfl, rfl⟩ <;> simp [star_sqrtNegDInE] |
| 532 | rw [on_generators, ← map_pow, at_zeta, at_beta, gal_beta, c_sqrt, map_mul, map_intCast, mul_assoc, |
| 533 | eq_comm (a := φ (P.sqrtNegDInE s))] |
| 534 | |
| 535 | /-- For a prime `p ∤ d`, every power of the Legendre symbol `(p/d)` is `1` or `-1`. -/ |
| 536 | lemma chiK_pow_eq_one_or_neg_one (hp_not_dvd : ¬p ∣ P.d) (n : ℕ) : |
| 537 | chiK P.d p ^ n = 1 ∨ chiK P.d p ^ n = -1 := by |
| 538 | rcases chiK_cases P.d p with ⟨h_eq, -⟩ | ⟨-, h_chi | h_chi⟩ |
| 539 | · exact absurd h_eq.dvd hp_not_dvd |
| 540 | · simp [h_chi] |
| 541 | · simpa [h_chi] using neg_one_pow_eq_or ℤ n |
| 542 | |
| 543 | omit [Fact p.Prime] in |
| 544 | /-- Let `φ : 𝓞 E → R` be a ring map to a ring whose characteristic `p` does not divide `q₁`. |
| 545 | For infinite places `u v : P.Φ s`, write `σ v = galOfPlaceInt v` for the Galois element of `E/K` |
| 546 | attached to `v`, a ring endomorphism of `𝓞 E`. Let `ζ = zetaInt` be the chosen primitive `q₁`-th |
| 547 | root of unity in `𝓞 E`. Then `φ (σ v ζ) = φ (σ u ζ)` if and only if `v = u`. -/ |
| 548 | lemma map_galOfPlaceInt_zetaInt_inj (φ : 𝓞 (P.E s) →+* R) (hp_not_dvd : ¬p ∣ P.q₁ s) |
| 549 | (u : P.Φ s) : |
| 550 | φ (galOfPlaceInt v (P.zetaInt s)) = φ (galOfPlaceInt u (P.zetaInt s)) ↔ v = u := by |
| 551 | -- `φ zetaInt` is still a primitive `q₁`-th root of unity |
| 552 | have : NeZero (P.q₁ s : R) := of_not_dvd R hp_not_dvd |
| 553 | have primitive : IsPrimitiveRoot (φ (P.zetaInt s)) (P.q₁ s) := |
| 554 | isPrimitiveRoot_zetaInt.map_of_neZero_natCast φ |
| 555 | -- `σ_t` raises `ζ` to the residue modulo `q₁` that names `t` |
| 556 | let residue (t : P.Φ s) : ZMod (P.q₁ s) := P.placeMulEquiv s t |
| 557 | have gal_zeta (t : P.Φ s) : galOfPlaceInt t (P.zetaInt s) = P.zetaInt s ^ (residue t).val := |
| 558 | RingOfIntegers.ext (galOfPlace_zeta t) |
| 559 | rw [gal_zeta, gal_zeta, map_pow, map_pow] |
| 560 | refine ⟨fun h_eq ↦ ?_, fun h_eq ↦ by rw [h_eq]⟩ |
| 561 | simpa [residue, Units.val_inj] using |
| 562 | val_injective _ (primitive.pow_inj (val_lt _) (val_lt _) h_eq) |
| 563 | |
| 564 | /-- Let `p ∤ q₁ d` be prime, `φ : 𝓞 E → R` a ring map to a domain of characteristic `p`, and `c` |
| 565 | the identity or complex conjugation, with sign `e`. Write `σ v = galOfPlaceInt v` for the Galois |
| 566 | element of the infinite place `v`. Then `φ (σ v x) = φ (c x) ^ pⁿ` for all `x` exactly when |
| 567 | `(v, e)` is the `n`-th power of the Frobenius element at `p`, the pair of the place of the class of |
| 568 | `(p/d) p` in `(ℤ/q₁)ˣ` and the Legendre symbol `(p/d)`. -/ |
| 569 | lemma map_galOfPlaceInt_eq_pow_iff_eq_frobElem_pow [IsDomain R] (φ : 𝓞 (P.E s) →+* R) (n : ℕ) |
| 570 | (h_sign : IsIdOrConjWithSign c e) (hp_not_dvd : ¬p ∣ P.q₁ s * P.d) : |
| 571 | (∀ x : 𝓞 (P.E s), φ (galOfPlaceInt v x) = φ (c x) ^ p ^ n) ↔ |
| 572 | (v, e) = P.frobElem s p ^ n := by |
| 573 | -- The first condition of `forall_map_galOfPlaceInt_eq_pow_iff` determines `v`; as |
| 574 | -- `φ sqrtNegDInE ≠ 0`, the second one determines `e`. |
| 575 | obtain ⟨hq₁, hd⟩ : ¬p ∣ P.q₁ s ∧ ¬p ∣ P.d := by rwa [hp.out.dvd_mul, not_or] at hp_not_dvd |
| 576 | have hsq : φ (P.sqrtNegDInE s) ^ 2 = -P.d := map_sqrtNegDInt_sq (φ.comp (algebraMap _ _)) |
| 577 | have hsqrt : φ (P.sqrtNegDInE s) ≠ 0 := fun h ↦ by |
| 578 | simp [h, CharP.cast_eq_zero_iff R p, hd] at hsq |
| 579 | have h2 : (-1 : R) ≠ 1 := by |
| 580 | simpa [_root_.neg_one_eq_one_iff, ringChar.eq R p] using ne_two_of_not_dvd_q₁ hq₁ |
| 581 | rw [forall_map_galOfPlaceInt_eq_pow_iff hq₁ φ n h_sign, |
| 582 | map_galOfPlaceInt_zetaInt_inj φ hq₁, mul_left_eq_self₀, or_iff_left hsqrt, ← Int.cast_pow] |
| 583 | rcases h_sign.sign_eq_one_or_neg_one with rfl | rfl |
| 584 | · rcases chiK_pow_eq_one_or_neg_one hd n with h | h <;> simp [h, h2, placeOfInt_pow, mul_pow] |
| 585 | · rcases chiK_pow_eq_one_or_neg_one hd n with h | h <;> simp [h, h2, placeOfInt_pow, mul_pow] |
| 586 | |
| 587 | /-! ### Decomposition groups, norms and ramification -/ |
| 588 | |
| 589 | /-- Let `v : P.Φ s` be an infinite place of `E`, and write `σ v = galOfPlaceInt v` for its Galois |
| 590 | element of `E/K`, a ring endomorphism of `𝓞 E`. Let `w` be a place above the prime `p`, and let `c` |
| 591 | be any ring automorphism of `𝓞 E`. If `v • w` is also the pullback of `w` along `c`, then for some |
| 592 | `n : ℕ`, `σ v x ≡ (c x) ^ (p ^ n)` modulo `w` for all `x ∈ 𝓞 E`. -/ |
| 593 | lemma exists_mk_galOfPlaceInt_eq_pow_of_smul_eq (hp_mem : (p : 𝓞 (P.E s)) ∈ w.asIdeal) |
| 594 | (h_smul : v • w = HeightOneSpectrum.comap c c.surjective w) : |
| 595 | ∃ n : ℕ, ∀ x : 𝓞 (P.E s), Ideal.Quotient.mk w.asIdeal (galOfPlaceInt v x) = |
| 596 | Ideal.Quotient.mk w.asIdeal (c x) ^ p ^ n := by |
| 597 | -- `galOfPlaceInt v ∘ c⁻¹` induces an endomorphism of the residue field, a power of Frobenius. |
| 598 | have : CharP (𝓞 (P.E s) ⧸ w.asIdeal) p := w.charP_quotient hp_mem |
| 599 | have h_mem (x : 𝓞 (P.E s)) : galOfPlaceInt v x ∈ w.asIdeal ↔ c x ∈ w.asIdeal := by |
| 600 | rw [← mem_asIdeal_smul_iff, h_smul] |
| 601 | rfl |
| 602 | have le_comap : w.asIdeal ≤ w.asIdeal.comap ((galOfPlaceInt v).comp c.symm) := |
| 603 | fun x hx ↦ (h_mem (c.symm x)).2 (by simpa using hx) |
| 604 | let induced : (𝓞 (P.E s) ⧸ w.asIdeal) →ₐ[ZMod p] 𝓞 (P.E s) ⧸ w.asIdeal := |
| 605 | .mk' (quotientMap _ _ le_comap) (ZMod.map_smul _) |
| 606 | obtain ⟨⟨n, -⟩, hn : frobeniusAlgHom (ZMod p) (𝓞 (P.E s) ⧸ w.asIdeal) ^ n = induced⟩ := |
| 607 | (bijective_frobeniusAlgHom_pow (ZMod p) _).surjective induced |
| 608 | exact ⟨n, fun x ↦ by simpa [induced, coe_frobeniusAlgHom] using |
| 609 | (DFunLike.congr_fun hn (Ideal.Quotient.mk w.asIdeal (c x))).symm⟩ |
| 610 | |
| 611 | /-- The decomposition group is generated by the Frobenius element. Let `p ∤ q₁ d` be prime, `w` a |
| 612 | finite place of `E = K(ζ)` above `p`, and `c` the identity (sign `e = 1`) or complex conjugation |
| 613 | (sign `e = -1`). The Frobenius element `P.frobElem s p` is the pair of the place of the class of |
| 614 | `(p/d) p` in `(ℤ/q₁)ˣ` and the Legendre symbol `(p/d) = chiK P.d p`. Then `v • w`, the pullback of |
| 615 | `w` along the Galois element of the infinite place `v`, is the pullback of `w` along `c` exactly |
| 616 | when `(v, e)` is a power of this pair. -/ |
| 617 | lemma smul_eq_iff_exists_frobElem_pow (h_sign : IsIdOrConjWithSign c e) |
| 618 | (hp_mem : (p : 𝓞 (P.E s)) ∈ w.asIdeal) (hp_not_dvd : ¬p ∣ P.q₁ s * P.d) : |
| 619 | v • w = HeightOneSpectrum.comap c c.surjective w ↔ ∃ n : ℕ, (v, e) = P.frobElem s p ^ n := by |
| 620 | have : CharP (𝓞 (P.E s) ⧸ w.asIdeal) p := w.charP_quotient hp_mem |
| 621 | let π : 𝓞 (P.E s) →+* 𝓞 (P.E s) ⧸ w.asIdeal := Ideal.Quotient.mk w.asIdeal |
| 622 | have frob_iff (n : ℕ) : (v, e) = P.frobElem s p ^ n ↔ |
| 623 | ∀ x : 𝓞 (P.E s), π (galOfPlaceInt v x) = π (c x) ^ p ^ n := |
| 624 | (map_galOfPlaceInt_eq_pow_iff_eq_frobElem_pow π n h_sign hp_not_dvd).symm |
| 625 | simp only [frob_iff] |
| 626 | refine ⟨exists_mk_galOfPlaceInt_eq_pow_of_smul_eq hp_mem, fun ⟨n, h_frob⟩ ↦ ?_⟩ |
| 627 | -- modulo `w`, `galOfPlaceInt v x` is a power of `c x`, so the two vanish together |
| 628 | ext x |
| 629 | change galOfPlaceInt v x ∈ w.asIdeal ↔ c x ∈ w.asIdeal |
| 630 | rw [← eq_zero_iff_mem, ← eq_zero_iff_mem, h_frob, pow_eq_zero_iff (pow_ne_zero n hp.out.ne_zero)] |
| 631 | |
| 632 | /-- Let `p ∤ q₁ d` be prime and `w` a place above `p`. Then `v`, read in `Gal(E/K) = (ℤ/q₁)ˣ`, fixes |
| 633 | `w` exactly when `(v, 1)` is a power of the Frobenius element `((p/d) p, (p/d))` at `p`. -/ |
| 634 | lemma smul_eq_self_iff_exists_frobElem_pow (hp_mem : (p : 𝓞 (P.E s)) ∈ w.asIdeal) |
| 635 | (hp_not_dvd : ¬p ∣ P.q₁ s * P.d) : |
| 636 | v • w = w ↔ ∃ n : ℕ, (v, (1 : ℤ)) = P.frobElem s p ^ n := |
| 637 | smul_eq_iff_exists_frobElem_pow isIdOrConjWithSign_refl hp_mem hp_not_dvd |
| 638 | |
| 639 | /-- Let `p ∤ q₁ d` be prime and `w` a place above `p`. Then `v`, read in `Gal(E/K) = (ℤ/q₁)ˣ`, sends |
| 640 | `w` to `w̄` exactly when `(v, -1)` is a power of the Frobenius element `((p/d) p, (p/d))` at `p`. -/ |
| 641 | lemma smul_eq_star_iff_exists_frobElem_pow (hp_mem : (p : 𝓞 (P.E s)) ∈ w.asIdeal) |
| 642 | (hp_not_dvd : ¬p ∣ P.q₁ s * P.d) : |
| 643 | v • w = star w ↔ ∃ n : ℕ, (v, (-1 : ℤ)) = P.frobElem s p ^ n := |
| 644 | smul_eq_iff_exists_frobElem_pow isIdOrConjWithSign_star hp_mem hp_not_dvd |
| 645 | |
| 646 | /-- Let `p ∤ q₁ d` be prime and `w` a place of `E` above `p`. Then the norm `w.q` of `w` is `p ^ m`, |
| 647 | where `m` is the order of the Frobenius element `frobElem s p` at `p`. -/ |
| 648 | lemma q_eq_pow_orderOf_frobElem (hp_mem : (p : 𝓞 (P.E s)) ∈ w.asIdeal) |
| 649 | (hp_not_dvd : ¬p ∣ P.q₁ s * P.d) : |
| 650 | w.q = p ^ orderOf (P.frobElem s p) := by |
| 651 | -- The order and the residue degree `f` have the same multiples `n`: those with |
| 652 | -- `x ^ p ^ n ≡ x` modulo `w` for all `x`. |
| 653 | have : CharP (𝓞 (P.E s) ⧸ w.asIdeal) p := w.charP_quotient hp_mem |
| 654 | let π : 𝓞 (P.E s) →+* 𝓞 (P.E s) ⧸ w.asIdeal := Ideal.Quotient.mk w.asIdeal |
| 655 | obtain ⟨f, hq, hf⟩ : ∃ f, w.q = p ^ f ∧ ∀ n : ℕ, f ∣ n ↔ ∀ x : 𝓞 (P.E s), π x ^ p ^ n = π x := |
| 656 | w.exists_q_eq_pow hp_mem |
| 657 | have frob_iff (n : ℕ) : (∀ x : 𝓞 (P.E s), π x ^ p ^ n = π x) ↔ P.frobElem s p ^ n = 1 := by |
| 658 | simpa [galOfPlaceInt, eq_comm, Prod.ext_iff] using |
| 659 | map_galOfPlaceInt_eq_pow_iff_eq_frobElem_pow (v := 1) π n isIdOrConjWithSign_refl hp_not_dvd |
| 660 | have order_eq : orderOf (P.frobElem s p) = f := |
| 661 | Nat.dvd_right_iff_eq.1 fun n ↦ by rw [orderOf_dvd_iff_pow_eq_one, hf, frob_iff] |
| 662 | rw [hq, order_eq] |
| 663 | |
| 664 | /-- Let `p ∤ q₁ d` be prime and `w` a place above `p`. Then `p` does not lie in the square of the |
| 665 | prime ideal `w`. -/ |
| 666 | lemma natCast_notMem_sq (hp_mem : (p : 𝓞 (P.E s)) ∈ w.asIdeal) (hp_not_dvd : ¬p ∣ P.q₁ s * P.d) : |
| 667 | (p : 𝓞 (P.E s)) ∉ w.asIdeal ^ 2 := by |
| 668 | -- otherwise `w ^ 2 ∋ p` makes `w` divide the different, which contains `q₁ * d` |
| 669 | refine fun h_sq ↦ hp_not_dvd ((w.natCast_mem_iff_dvd hp_mem).1 ?_) |
| 670 | exact le_of_dvd (dvd_differentIdeal_of_mem_sq h_sq) conductor_mem_differentIdeal |
| 671 | |
| 672 | /-- Let `p ∤ q₁ d` be prime and `w` a finite place of `E` above `p`. Then `p` has order exactly `1` |
| 673 | at `w` (multiplicative valuation `exp (-1)`); so `p` is unramified at `w`. -/ |
| 674 | lemma intValuation_natCast_eq_exp_neg_one (hp_mem : (p : 𝓞 (P.E s)) ∈ w.asIdeal) |
| 675 | (hp_not_dvd : ¬p ∣ P.q₁ s * P.d) : |
| 676 | w.intValuation p = WithZero.exp (-1) := |
| 677 | w.intValuation_eq_exp_neg_one_of_mem_of_notMem_sq hp_mem (natCast_notMem_sq hp_mem hp_not_dvd) |
| 678 | |
| 679 | open scoped Pointwise in |
| 680 | /-- The group `Gal(E/ℚ)` acts transitively on the finite places of `E` above a prime `p`. -/ |
| 681 | lemma exists_gal_smul_mem_iff (hw : (p : 𝓞 (P.E s)) ∈ w.asIdeal) |
| 682 | (hw' : (p : 𝓞 (P.E s)) ∈ w'.asIdeal) : |
| 683 | ∃ σ : Gal(P.E s/ℚ), ∀ x : 𝓞 (P.E s), σ • x ∈ w.asIdeal ↔ x ∈ w'.asIdeal := by |
| 684 | have under_eq : w'.asIdeal.under ℤ = w.asIdeal.under ℤ := by |
| 685 | ext n |
| 686 | obtain ⟨k, rfl | rfl⟩ := n.eq_nat_or_neg <;> |
| 687 | simp [w.natCast_mem_iff_dvd hw, w'.natCast_mem_iff_dvd hw'] |
| 688 | obtain ⟨σ, hσ⟩ : ∃ σ : Gal(P.E s/ℚ), w.asIdeal = σ • w'.asIdeal := |
| 689 | IsInvariant.exists_smul_of_under_eq ℤ _ Gal(P.E s/ℚ) w'.asIdeal w.asIdeal under_eq |
| 690 | exact ⟨σ, fun x ↦ by simp [hσ]⟩ |
| 691 | |
| 692 | /-- Let `w` and `w'` be finite places of `E` above the prime `p`. Then `w'` is `v • w` or its |
| 693 | conjugate for some infinite place `v`, read as an element of `Gal(E/K)`. -/ |
| 694 | lemma exists_smul_eq_or_star (hw : (p : 𝓞 (P.E s)) ∈ w.asIdeal) |
| 695 | (hw' : (p : 𝓞 (P.E s)) ∈ w'.asIdeal) : |
| 696 | ∃ v : P.Φ s, v • w = w' ∨ star (v • w) = w' := by |
| 697 | -- Some `σ` in `Gal(E/ℚ)` moves `w'` to `w`. The chosen embedding `Φ u : E →+* ℂ` at a place `u` |
| 698 | -- is `Φ 1 ∘ galOfPlace u` (`phi_mul`). For the place `v` of `φ = Φ 1 ∘ σ`, `Φ v` is `φ` or its |
| 699 | -- conjugate (`Φ_mk_eq_or_star_eq`), so `galOfPlace v` is `σ` or `σ` composed with conjugation. |
| 700 | obtain ⟨σ, hσ⟩ := exists_gal_smul_mem_iff hw hw' |
| 701 | let φ : P.E s →+* ℂ := (Φ 1).comp σ.toRingHom |
| 702 | let v : P.Φ s := .mk φ |
| 703 | have φ_apply (x : 𝓞 (P.E s)) : φ x = Φ 1 ((σ • x : 𝓞 (P.E s)) : P.E s) := rfl |
| 704 | have Φ_apply (x : 𝓞 (P.E s)) : Φ v (x : P.E s) = Φ 1 (galOfPlaceInt v x : P.E s) := by |
| 705 | rw [coe_galOfPlaceInt, ← phi_mul, one_mul] |
| 706 | refine ⟨v, (Φ_mk_eq_or_star_eq φ).imp (fun hφ : Φ v = φ ↦ ?_) (fun hφ : star (Φ v) = φ ↦ ?_)⟩ |
| 707 | · have gal_eq (x : 𝓞 (P.E s)) : galOfPlaceInt v x = σ • x := |
| 708 | RingOfIntegers.ext ((Φ 1).injective (by rw [← Φ_apply, ← φ_apply, hφ])) |
| 709 | ext x |
| 710 | rw [mem_asIdeal_smul_iff, gal_eq, hσ] |
| 711 | · have gal_eq (x : 𝓞 (P.E s)) : galOfPlaceInt v (star x) = σ • x := |
| 712 | RingOfIntegers.ext <| (Φ 1).injective <| by |
| 713 | rw [← Φ_apply, ← φ_apply, ← hφ] |
| 714 | simp |
| 715 | ext x |
| 716 | rw [mem_star_place, mem_asIdeal_smul_iff, gal_eq, hσ] |
| 717 | |
| 718 | /-! ### Inert primes and self-conjugate places -/ |
| 719 | |
| 720 | /-- A prime `p` with Legendre symbol `(p/d) = -1` does not divide `q₁ d`. -/ |
| 721 | @[local simp] |
| 722 | lemma not_dvd_q₁_mul_d_of_inert (h_inert : chiK P.d p = -1) : ¬p ∣ P.q₁ s * P.d := by |
| 723 | -- primes that divide `q₁` have character `1`, and `d` has character `0` |
| 724 | refine hp.out.not_dvd_mul (fun hp_dvd_q₁ ↦ ?_) (fun hp_dvd_d ↦ ?_) |
| 725 | · simp [P.chiK_eq_one_of_dvd hp.out hp_dvd_q₁] at h_inert |
| 726 | · obtain rfl : p = P.d := (Nat.prime_dvd_prime_iff_eq hp.out P.d_prime).1 hp_dvd_d |
| 727 | simp [natCast_self, MulChar.map_zero] at h_inert |
| 728 | |
| 729 | /-- Let `p` be a prime with Legendre symbol `(p/d) = -1` and `w` a place of `E` above `p`. An |
| 730 | infinite place `v`, read as an element of `Gal(E/K)`, fixes `w` if and only if `v` is an even power |
| 731 | of the place named by `-p`. -/ |
| 732 | lemma smul_eq_self_iff_of_inert (hp_mem : (p : 𝓞 (P.E s)) ∈ w.asIdeal) (h_inert : chiK P.d p = -1) : |
| 733 | v • w = w ↔ ∃ n : ℕ, v = P.placeOfInt s (-p) ^ n ∧ Even n := by |
| 734 | -- the Frobenius element is `(-p, -1)`, and `(-1) ^ n = 1` says that `n` is even |
| 735 | rw [smul_eq_self_iff_exists_frobElem_pow hp_mem (not_dvd_q₁_mul_d_of_inert h_inert)] |
| 736 | simp [h_inert, neg_one_pow_eq_ite] |
| 737 | |
| 738 | /-- Let `p` be a prime with Legendre symbol `(p/d) = -1` and `w` a place of `E` above `p`. An |
| 739 | infinite place `v`, read as an element of `Gal(E/K)`, sends `w` to its conjugate `star w` if and |
| 740 | only if `v` is an odd power of the place named by `-p`. -/ |
| 741 | lemma smul_eq_star_iff_of_inert (hp_mem : (p : 𝓞 (P.E s)) ∈ w.asIdeal) (h_inert : chiK P.d p = -1) : |
| 742 | v • w = star w ↔ ∃ n : ℕ, v = P.placeOfInt s (-p) ^ n ∧ Odd n := by |
| 743 | -- the Frobenius element is `(-p, -1)`, and `(-1) ^ n = -1` says that `n` is odd |
| 744 | rw [smul_eq_star_iff_exists_frobElem_pow hp_mem (not_dvd_q₁_mul_d_of_inert h_inert)] |
| 745 | simp [h_inert, neg_one_pow_eq_ite] |
| 746 | |
| 747 | /-- Let `p` be a prime inert in `K`, that is `(p/d) = chiK P.d p = -1`, let `n` be odd, and let `τ` |
| 748 | be the element of `Gal(E/K)` at the place `P.placeOfInt s (-p ^ n)` of the class of `-pⁿ` in |
| 749 | `(ℤ/q₁)ˣ`. Then `y ^ pⁿ ≡ τ ȳ` modulo `p` for every integer `y` of `E`. -/ |
| 750 | lemma natCast_dvd_pow_sub_galOfPlaceInt_star (hp_inert : chiK P.d p = -1) {n : ℕ} (hn : Odd n) |
| 751 | (y : 𝓞 (P.E s)) : |
| 752 | (p : 𝓞 (P.E s)) ∣ y ^ p ^ n - galOfPlaceInt (P.placeOfInt s (-p ^ n)) (star y) := by |
| 753 | -- Modulo `p`, the `n`-th power of Frobenius is `τ` composed with conjugation |
| 754 | -- (`forall_map_galOfPlaceInt_eq_pow_iff`). |
| 755 | obtain ⟨w, hp_mem⟩ := FinPlace.exists_natCast_mem (P.E s) p |
| 756 | let Q : Type := 𝓞 (P.E s) ⧸ Ideal.span {(p : 𝓞 (P.E s))} |
| 757 | have : CharP Q p := CharP.quotient _ p (coe_subset_nonunits w.isPrime.ne_top hp_mem) |
| 758 | let π : 𝓞 (P.E s) →+* Q := Ideal.Quotient.mk _ |
| 759 | have hp_not_dvd_q₁ : ¬p ∣ P.q₁ s := |
| 760 | fun h_dvd ↦ not_dvd_q₁_mul_d_of_inert hp_inert (h_dvd.mul_right P.d) |
| 761 | have h_frob : π (galOfPlaceInt (P.placeOfInt s (-p ^ n)) (star y)) = |
| 762 | π (starRingAut (star y)) ^ p ^ n := |
| 763 | (forall_map_galOfPlaceInt_eq_pow_iff hp_not_dvd_q₁ π n isIdOrConjWithSign_star).2 |
| 764 | ⟨by rw [neg_one_mul], by simp [hp_inert, hn.neg_one_pow]⟩ (star y) |
| 765 | rw [starRingAut_apply, star_star, ← map_pow] at h_frob |
| 766 | exact Ideal.mem_span_singleton.1 (Ideal.Quotient.eq.1 h_frob.symm) |
| 767 | |
| 768 | /-- Let `p` be a prime with Legendre symbol `(p/d) = -1` and `w` a place of `E` above `p`. Then the |
| 769 | norm `w.q` of `w` is `p ^ lcm o 2`, where `o` is the order of the infinite place named by `-p`, that |
| 770 | is of the class of `-p` in `(ℤ/q₁)ˣ`. -/ |
| 771 | lemma q_eq_pow_lcm_of_inert (hp_mem : (p : 𝓞 (P.E s)) ∈ w.asIdeal) (h_inert : chiK P.d p = -1) : |
| 772 | w.q = p ^ (orderOf (P.placeOfInt s (-p))).lcm 2 := by |
| 773 | rw [q_eq_pow_orderOf_frobElem hp_mem (not_dvd_q₁_mul_d_of_inert h_inert), Prod.orderOf] |
| 774 | simp [h_inert] |
| 775 | |
| 776 | /-! ### Primes congruent to `1` modulo `q₁ d` -/ |
| 777 | |
| 778 | omit [Fact p.Prime] in |
| 779 | /-- For `p ≡ 1` modulo `q₁ d`, the character value `chiK d p` is `1`. -/ |
| 780 | lemma chiK_eq_one_of_modEq_one (hp_modEq : p ≡ 1 [MOD P.q₁ s * P.d]) : chiK P.d p = 1 := by |
| 781 | simp [(natCast_eq_natCast_iff p 1 P.d).2 hp_modEq.of_mul_left] |
| 782 | |
| 783 | /-- A prime `p ≡ 1` modulo `q₁ d` does not divide `q₁ d`. -/ |
| 784 | @[local simp] |
| 785 | lemma not_dvd_q₁_mul_d_of_modEq_one (hp_modEq : p ≡ 1 [MOD P.q₁ s * P.d]) : |
| 786 | ¬p ∣ P.q₁ s * P.d := fun h_dvd ↦ hp.out.not_dvd_one ((hp_modEq.dvd_iff h_dvd).1 dvd_rfl) |
| 787 | |
| 788 | omit [Fact p.Prime] in |
| 789 | /-- For `p ≡ 1` modulo `q₁ d`, the Frobenius pair `frobElem s p` is the identity `1`. -/ |
| 790 | lemma frobElem_eq_one (hp_modEq : p ≡ 1 [MOD P.q₁ s * P.d]) : P.frobElem s p = 1 := by |
| 791 | simp [placeOfInt, chiK_eq_one_of_modEq_one hp_modEq, |
| 792 | (natCast_eq_natCast_iff p 1 (P.q₁ s)).2 hp_modEq.of_mul_right] |
| 793 | |
| 794 | /-- If `w` is a finite place of `E` above a prime `p ≡ 1` modulo `q₁ d`, then no infinite place `v` |
| 795 | of `E`, read as an element of `Gal(E/K)`, sends `w` to its complex conjugate `star w`. -/ |
| 796 | lemma smul_ne_star (hp_modEq : p ≡ 1 [MOD P.q₁ s * P.d]) (hp_mem : (p : 𝓞 (P.E s)) ∈ w.asIdeal) : |
| 797 | v • w ≠ star w := by |
| 798 | -- the Frobenius element is trivial, so `(v, -1)` is not a power of it |
| 799 | rw [Ne, smul_eq_star_iff_exists_frobElem_pow hp_mem (not_dvd_q₁_mul_d_of_modEq_one hp_modEq), |
| 800 | frobElem_eq_one hp_modEq] |
| 801 | simp |
| 802 | |
| 803 | end Decomposition |
| 804 | |
| 805 | end New.Parameters |
| 806 | |
| 807 | end |