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

| 1 | module |
| 2 | |
| 3 | import Mathlib.Algebra.Order.Star.Int |
| 4 | import Mathlib.Data.Rat.Cast.OfScientific |
| 5 | public import Lib.Weil.DualPair.Defs |
| 6 | public import New.Derivatives.Field.ChosenPlaces |
| 7 | import Lib.ClassField.HeckeCharacter.SplitTameCharacters |
| 8 | |
| 9 | /-! |
| 10 | # Weight bounds, the level N, and twists and m-fold twists for chains of lifts |
| 11 | |
| 12 | The data `D` (`New.Data`) fix a CM field `E = D.E`, scales `x ≤ x₁ ≤ b`, a number `m` of lifts, |
| 13 | weights `κ` and `κ_j = D.liftWeight j` at the infinite places and a level `N`. The file bounds the |
| 14 | weight `κ` (`New.Data.weight`) and the numbers `κ_s` (`New.Data.shiftedWeight`, |
| 15 | `New.Data.liftWeight`). For a chain of lifts one takes powers `ϑ ^ j` of an m-fold twist `ϑ`, whose |
| 16 | powers of exponent `1, …, m` are all twists. |
| 17 | |
| 18 | ## Main definitions and results |
| 19 | |
| 20 | * `New.Data.targetParameter`: the row parameter, a sequence of integers at each infinite place. |
| 21 | `New.Data.targetParameter_eq` writes its later entries as `Δ / 2 - κ_j`. |
| 22 | * `New.Data.logLevelTarget`: the logarithm of the lower end of the range for the level, between |
| 23 | `m log b` and `24 m log b`. `New.Data.log_N_mem_Icc_logLevelTarget` puts `log N` within `√(log b)` |
| 24 | above it, so `log N` lies between `m log b` and `30 m log b`. `New.Data.N_modEq_one` gives `N ≡ 1` |
| 25 | modulo `New.Data.cyclotomicConductor`. |
| 26 | * `New.Data.TameChar`, `New.Data.Twist`: characters of `U(1)(𝔸)` of weight `0` with tame part |
| 27 | `tamePart` supported on a finite set `Q` of places; a twist has `tamePart w ≠ 1` on `Q`. |
| 28 | * `New.Data.untwistedLiftChar`, `New.Data.liftChar`: the characters `μ_j⁰` and `μ_j⁰ ϑ` of weight |
| 29 | `-κ_j`. |
| 30 | * `New.Data.MFoldTwist`: twists whose powers of exponent `1, …, m` are twists |
| 31 | (`New.Data.MFoldTwist.powTwist`). |
| 32 | * `New.Data.chainChar`: the character `μ_j⁰ ϑ ^ j` of lift `j` of a chain. It is given by |
| 33 | `New.Data.liftChar` applied to `ϑ ^ j` and `j`. |
| 34 | |
| 35 | Notions from other files: |
| 36 | * `New.Data.weight`: the weight `κ` of an infinite place of `E`. It is `b = a / x` at the |
| 37 | `b`-places, which form a chosen finite set `D.bPlaces`, and `a / x₁` at the others; `a = x b`. |
| 38 | * `New.Data.shiftedWeight`, `New.Data.liftWeight`: `D.shiftedWeight i σ` is `κ_s = κ + (s + 1/2) Δ` |
| 39 | at `s = i / 2`, and `D.liftWeight j σ` is `κ_j`; the gap is `Δ = D.gap = 2 * D.halfGap`. |
| 40 | * `New.Data.HasLogBound`: `D.HasLogBound u F l` is `|F| ≤ exp l` if `u` is true (`D.HasLogUpper`) |
| 41 | and `exp l ≤ F` if `u` is false (`D.HasLogLower`). |
| 42 | * `New.AutChar`: the group of automorphic characters of `U(1)(𝔸)`. |
| 43 | * `New.AutChar.HasWeight`: `μ.HasWeight e ψ` says that the character `μ` has weight `e` and tame |
| 44 | part `ψ`, that is, almost all residue characters `ψ_w` are trivial and |
| 45 | `μ(u) = ∏_v u_v ^ e(v) * ∏_w ψ_w(u mod w)` whenever `u` has integral finite part. |
| 46 | -/ |
| 47 | |
| 48 | @[expose] public section |
| 49 | |
| 50 | noncomputable section |
| 51 | |
| 52 | /-! ## Bounds for the weights κ and κ_j -/ |
| 53 | |
| 54 | section Weights |
| 55 | |
| 56 | open Real Set |
| 57 | |
| 58 | namespace New.Data |
| 59 | |
| 60 | variable {P : Parameters} (D : Data P) {j : ℕ} (σ : D.Φ) |
| 61 | |
| 62 | /-- The weight `κ = D.weight σ` of an infinite place `σ : D.Φ` of the field `E = D.E` satisfies |
| 63 | `a / x₁ ≤ κ ≤ a / x`, where `x ≤ x₁ ≤ b` are the scales of the data and `a = x b`. -/ |
| 64 | lemma weight_mem_Icc : (D.weight σ : ℝ) ∈ Icc (D.a / D.x₁) (D.a / D.x) := by |
| 65 | have h_le : (D.a / D.x₁ : ℝ) ≤ D.a / D.x := D.le_of_hasLogBound |
| 66 | rw [cast_weight] |
| 67 | split_ifs |
| 68 | exacts [⟨h_le, le_rfl⟩, ⟨le_rfl, h_le⟩] |
| 69 | |
| 70 | /-- For `y ≤ a` and `x₁ ≤ t` we have `(y / t - κ(τ))₊ = 0`, since the weight `κ(τ)` of every |
| 71 | infinite place `τ` is at least `a / x₁`. -/ |
| 72 | lemma posPart_div_sub_weight_eq_zero {y t : ℝ} (hy : y ≤ D.a) (ht : D.x₁ ≤ t) (τ : D.Φ) : |
| 73 | (y / t - D.weight τ)⁺ = 0 := by |
| 74 | have ht_pos : 0 < t := (exp_pos _).trans_le ht |
| 75 | refine posPart_eq_zero.2 (sub_nonpos.2 ?_) |
| 76 | calc y / t ≤ D.a / t := by gcongr |
| 77 | _ ≤ D.a / D.x₁ := by gcongr |
| 78 | _ ≤ D.weight τ := (D.weight_mem_Icc τ).1 |
| 79 | |
| 80 | /-- The size of the weight: `b / x₁ ≤ κ ≤ b` (upper bound for `u` true, lower for `u` false). -/ |
| 81 | instance {u : Bool} : D.HasLogBound u (D.weight σ) (D.logB + if u then 0 else -D.logX₁) := |
| 82 | .of_mem_Icc (D.a / D.x₁) (D.a / D.x) (D.weight_mem_Icc σ) |
| 83 | (by cases u <;> scale_arith D) |
| 84 | |
| 85 | /-- The weight `κ = D.weight σ` of an infinite place is at most the scale `b`. -/ |
| 86 | lemma weight_le_b : (D.weight σ : ℝ) ≤ D.b := |
| 87 | (D.weight_mem_Icc σ).2.trans_eq <| by rw [cast_a, mul_div_cancel_left₀ _ (exp_ne_zero D.logX)] |
| 88 | |
| 89 | /-- The weight `κ = D.weight σ` satisfies `κ + x⁴² ≤ 2 b`, for the scales `x ≤ b`. -/ |
| 90 | lemma weight_add_x_pow_le_two_mul_b : (D.weight σ : ℝ) + D.x ^ 42 ≤ 2 * D.b := by |
| 91 | have h_pow : D.x ^ 42 ≤ D.b := D.le_of_hasLogBound |
| 92 | linarith [D.weight_le_b σ] |
| 93 | |
| 94 | /-- The weight `κ = D.weight σ` is at most `κ_j - Δ / 2`, where |
| 95 | `κ_j = D.liftWeight j σ = κ + (j + 1/2) Δ` and `Δ / 2 = D.halfGap` is half the gap. -/ |
| 96 | lemma weight_le_liftWeight_sub (j : ℕ) (σ : D.Φ) : |
| 97 | (D.weight σ : ℝ) ≤ D.liftWeight j σ - D.halfGap := by |
| 98 | have h_nonneg : (0 : ℝ) ≤ j * D.gap := by positivity |
| 99 | rw [liftWeight_eq] |
| 100 | push_cast |
| 101 | linarith |
| 102 | |
| 103 | /-- For `i ≤ 4 m` the shifted weight `D.shiftedWeight i σ = κ + (i + 1) Δ / 2` lies between `κ` and |
| 104 | `κ + x⁴²`, where `κ = D.weight σ` and `Δ / 2 = D.halfGap` is half the gap. -/ |
| 105 | lemma shiftedWeight_mem_Icc {i : ℕ} (hi : i ≤ 4 * D.m) (σ : D.Φ) : |
| 106 | (D.shiftedWeight i σ : ℝ) ∈ Icc (D.weight σ : ℝ) (D.weight σ + D.x ^ 42) := by |
| 107 | have h_gap : ((4 * D.m + 1) * D.halfGap : ℝ) ≤ D.x ^ 42 := D.le_of_hasLogBound |
| 108 | have hi_real : (i : ℝ) ≤ 4 * D.m := mod_cast hi |
| 109 | rw [shiftedWeight] |
| 110 | push_cast |
| 111 | exact ⟨le_add_of_nonneg_right (by positivity), by grw [hi_real, h_gap]⟩ |
| 112 | |
| 113 | /-- For `i ≤ 4 m` one has `log (D.shiftedWeight i σ) ≤ log κ + 1 / x`. -/ |
| 114 | lemma log_shiftedWeight_le {i : ℕ} (hi : i ≤ 4 * D.m) (σ : D.Φ) : |
| 115 | log (D.shiftedWeight i σ) ≤ log (D.weight σ) + D.x⁻¹ := by |
| 116 | have h_pos : (0 : ℝ) < D.weight σ := HasLogBound.pos D |
| 117 | have h_pow : D.x ^ 42 ≤ D.weight σ * D.x⁻¹ := D.le_of_hasLogBound |
| 118 | obtain ⟨h_lower, h_upper⟩ := D.shiftedWeight_mem_Icc hi σ |
| 119 | rw [log_le_iff_le_exp (h_pos.trans_le h_lower), exp_add, exp_log h_pos] |
| 120 | calc (D.shiftedWeight i σ : ℝ) ≤ D.weight σ + D.x ^ 42 := h_upper |
| 121 | _ ≤ D.weight σ * (D.x⁻¹ + 1) := by linarith |
| 122 | _ ≤ D.weight σ * exp D.x⁻¹ := by grw [add_one_le_exp] |
| 123 | |
| 124 | /-- For `j ≤ 2 m` the shifted weight `κ_j = D.liftWeight j σ` is at most `κ + x⁴²`, with |
| 125 | `κ = D.weight σ`. -/ |
| 126 | lemma liftWeight_le_weight_add {j : ℕ} (hj : j ≤ 2 * D.m) (σ : D.Φ) : |
| 127 | (D.liftWeight j σ : ℝ) ≤ D.weight σ + D.x ^ 42 := |
| 128 | (D.shiftedWeight_mem_Icc (by omega) σ).2 |
| 129 | |
| 130 | /-- For `j ≤ 2 m` the shifted weight `κ_j = D.liftWeight j σ` is at most `2 b`. -/ |
| 131 | lemma liftWeight_le_two_mul_b {j : ℕ} (hj : j ≤ 2 * D.m) (σ : D.Φ) : |
| 132 | (D.liftWeight j σ : ℝ) ≤ 2 * D.b := |
| 133 | (D.liftWeight_le_weight_add hj σ).trans (D.weight_add_x_pow_le_two_mul_b σ) |
| 134 | |
| 135 | /-- The size of `κ₀ = D.liftWeight 0 σ`: it is at most `2 b`, so at most `exp (2 + log b)`. -/ |
| 136 | instance : D.HasLogUpper (D.liftWeight 0 σ) (2 + D.logB) := |
| 137 | hasLogUpper_of_le_of_nonneg (D.liftWeight_le_two_mul_b (Nat.zero_le (2 * D.m)) σ) |
| 138 | (D.liftWeight 0 σ).cast_nonneg |
| 139 | |
| 140 | /-- A lower bound `exp l ≤ κ` for the weight `κ = D.weight σ` gives `exp l ≤ κ_j` for the shifted |
| 141 | weight `κ_j = D.liftWeight j σ`, because `κ ≤ κ_j`. -/ |
| 142 | instance {l : ℝ} [D.HasLogLower (D.weight σ) l] : D.HasLogLower (D.liftWeight j σ) l := |
| 143 | D.hasLogLower_of_le <| (D.weight_le_liftWeight_sub j σ).trans |
| 144 | (sub_le_self _ D.halfGap.cast_nonneg) |
| 145 | |
| 146 | /-- For `j ≤ 2 m` the shifted weight `κ_j = D.liftWeight j σ` has `log κ_j ≤ log κ + 1 / x`, with |
| 147 | `κ = D.weight σ`. -/ |
| 148 | lemma log_liftWeight_le {j : ℕ} (hj : j ≤ 2 * D.m) (σ : D.Φ) : |
| 149 | log (D.liftWeight j σ) ≤ log (D.weight σ) + D.x⁻¹ := |
| 150 | D.log_shiftedWeight_le (by omega) σ |
| 151 | |
| 152 | end New.Data |
| 153 | |
| 154 | end Weights |
| 155 | |
| 156 | namespace New.Data |
| 157 | |
| 158 | /-! |
| 159 | ## The row parameter, the level N, twists and the characters of the lifts |
| 160 | |
| 161 | `New.Data.le_of_hasLogBound` proves an inequality by comparing bounds `New.Data.HasLogBound`, so |
| 162 | sizes are recorded here as instances. |
| 163 | -/ |
| 164 | |
| 165 | section Level |
| 166 | |
| 167 | open NumberField Set Nat WeilData Parameters |
| 168 | |
| 169 | variable {P : Parameters} (D : Data P) |
| 170 | |
| 171 | /-- The row parameter `(k/2 - 1, k/2 - 2, …; -κ_{1/2}, -κ_{3/2}, …)` at the infinite place `v` of |
| 172 | `E`, the sequence from which the Harish-Chandra parameters at `v` of the unitary groups in the chain |
| 173 | of lifts are read off. Entries are numbered from `0`, with `k - 1` entries before the semicolon. |
| 174 | Here `k = D.k = r + 1 - m` is the rank of the source, for the rank `r = D.r` of the target and the |
| 175 | number `m = D.m` of lifts; `k/2` is integer division; and `κ_s = D.shiftedWeight (2 s) v` is the |
| 176 | shifted weight `κ + (s + 1/2) Δ`. The rank `k` is even (`New.Data.k_even`). -/ |
| 177 | def targetParameter (v : D.Φ) (i : ℕ) : ℤ := |
| 178 | if i + 1 < D.k then D.k / 2 - 1 - i else -D.shiftedWeight (2 * (i + 1 - D.k) + 1) v |
| 179 | |
| 180 | /-- A formula for entry `i` of the row parameter `D.targetParameter v`, the integer sequence |
| 181 | `(k/2 - 1, k/2 - 2, …, 1 - k/2; -κ_{1/2}, -κ_{3/2}, …)` at the infinite place `v` of `E = D.E` from |
| 182 | which the Harish-Chandra parameters in the chain of lifts are read off. The entries with |
| 183 | `i < k - 1` are `k/2 - 1 - i`, and entry `i ≥ k - 1` is `Δ / 2 - κ_j` with `j = i + 2 - k`. Here the |
| 184 | rank `k = D.k` of the source is even (`New.Data.k_even`), so the division `k / 2` is exact; |
| 185 | `Δ / 2 = D.halfGap` is half the gap; and `κ_j = D.liftWeight j v = κ + (j + 1/2) Δ` is the shifted |
| 186 | weight, for the weight `κ` of `v`. -/ |
| 187 | lemma targetParameter_eq (v : D.Φ) (i : ℕ) : |
| 188 | D.targetParameter v i = |
| 189 | if i + 1 < D.k then (D.k / 2 - 1 - i : ℤ) else D.halfGap - D.liftWeight (i + 2 - D.k) v := by |
| 190 | rw [targetParameter] |
| 191 | split_ifs with hi |
| 192 | · rfl |
| 193 | · rw [liftWeight, shiftedWeight, shiftedWeight, show i + 2 - D.k = i + 1 - D.k + 1 by omega] |
| 194 | push_cast |
| 195 | ring |
| 196 | |
| 197 | /-- The entry `D.k - 1 + a` of `D.targetParameter τ` is `D.halfGap - D.liftWeight (a + 1) τ`. -/ |
| 198 | lemma targetParameter_sub_one_add (τ : D.Φ) (a : ℕ) : |
| 199 | D.targetParameter τ (D.k - 1 + a) = D.halfGap - D.liftWeight (a + 1) τ := by |
| 200 | grind [targetParameter_eq, D.k_pos] |
| 201 | |
| 202 | /-- The size of `Ω = exp (γ - Re L'/L(1, χ_K)) * (2 π / rd_E)`: one has `x⁻¹³ ≤ Ω ≤ 1` (upper bound |
| 203 | for `u` true, lower for `u` false). Here `γ` is Euler's constant, `χ_K` is the quadratic character |
| 204 | of `K = ℚ(√-d)` for the prime `d = P.d`, and `rd_E` is the root discriminant of the field |
| 205 | `E = P.E s` of the data, where `s = D.towerExp` is the exponent with `2 ^ s = m ^ 22`. -/ |
| 206 | instance {u : Bool} : D.HasLogBound u (P.bigOmega D.towerExp) (if u then 0 else -13 * D.logX) := by |
| 207 | -- instance search finds `1 ≤ 2 π ≤ exp 6` and `x ^ 10 ≤ rd_E ≤ x ^ 12`; it remains to |
| 208 | -- compare exponents, and the constants are small against `log x` |
| 209 | have h_small : |chowlaSelbergConst P.d| + 6 ≤ D.logX := by |
| 210 | have h_sum : 0 ≤ ∑ w ∈ primitiveRoots P.q₀ ℂ, |
| 211 | |Real.log ‖(Polynomial.cyclotomic P.q₀ ℂ).derivative.eval w‖| := |
| 212 | Finset.sum_nonneg fun w _ ↦ abs_nonneg _ |
| 213 | have h_le : |chowlaSelbergConst P.d| + 6 ≤ P.constantBound := by |
| 214 | rw [constantBound] |
| 215 | linarith |
| 216 | scale_arith D |
| 217 | unfold bigOmega |
| 218 | exact .of_lower_of_upper (by grind) |
| 219 | |
| 220 | /-! ### The size and the residue class of the level `N` -/ |
| 221 | |
| 222 | /-- The logarithm of `N₋ = κ̄ ^ m (M rd_E / 2π) ^ (m - 1) b ^ (-15 / 2)`, the lower end of the range |
| 223 | for the level. Here `κ̄` is the geometric mean of the weights at the `f = D.f` infinite places of |
| 224 | `E`, the principal level `M = D.M` is the product of the two primes `D.levelPrime 0` and |
| 225 | `D.levelPrime 1`, and `rd_E = D.rootDisc` is the root discriminant of `E`. -/ |
| 226 | def logLevelTarget : ℝ := |
| 227 | P.logLevelMin D.towerExp D.m D.weight D.M D.logB |
| 228 | |
| 229 | /-- The prime level `N` of the data is chosen with `log N₋ ≤ log N ≤ log N₋ + √(log b)`, where |
| 230 | `log N₋ = D.logLevelTarget` is the logarithm of `κ̄ ^ m (M rd_E / 2π) ^ (m - 1) b ^ (-15 / 2)`. This |
| 231 | lower end satisfies `m log b ≤ log N₋ ≤ 24 m log b`, for the number `m = D.m` of lifts and |
| 232 | `log b = D.logB`. -/ |
| 233 | lemma logLevelTarget_mem_Icc : D.logLevelTarget ∈ Icc (D.m * D.logB) (24 * D.m * D.logB) := by |
| 234 | have h_one_le_weight (τ : D.Φ) : (1 : ℝ) ≤ D.weight τ := D.le_of_hasLogBound |
| 235 | have h_two_le_m : 2 ≤ D.m := by linarith [D.ten_thousand_le_m] |
| 236 | exact P.logLevelMin_mem_Icc h_two_le_m D.le_of_hasLogBound |
| 237 | (fun τ ↦ ⟨h_one_le_weight τ, D.weight_le_b τ⟩) D.M_mem_Icc D.le_of_hasLogBound |
| 238 | |
| 239 | /-- The level `N` is `≡ 1` modulo `n = D.cyclotomicConductor = q₁ d`. Here `d` is the prime with |
| 240 | `K = ℚ(√-d)` and `q₁` is the order of the root of unity that generates `E` over `K`, so `E` lies in |
| 241 | `ℚ(ζ_n)`. -/ |
| 242 | lemma N_modEq_one : D.N ≡ 1 [MOD D.cyclotomicConductor] := |
| 243 | D.N_modEq_one_q₂_sq.of_dvd ((q₁_mul_d_dvd_q₂ : D.cyclotomicConductor ∣ P.q₂ D.towerExp).pow |
| 244 | two_ne_zero) |
| 245 | |
| 246 | /-- The level `N` satisfies `log N₋ ≤ log N ≤ log N₋ + √(log b)`, where |
| 247 | `log N₋ = D.logLevelTarget`. -/ |
| 248 | lemma log_N_mem_Icc_logLevelTarget : |
| 249 | Real.log D.N ∈ Icc D.logLevelTarget (D.logLevelTarget + √D.logB) := |
| 250 | D.log_N_mem |
| 251 | |
| 252 | /-- The level `N` satisfies `m log b ≤ log N ≤ 30 m log b`. -/ |
| 253 | lemma log_N_mem_Icc : Real.log D.N ∈ Icc (D.m * D.logB) (30 * D.m * D.logB) := by |
| 254 | have h_sqrt : √D.logB ≤ 6 * D.m * D.logB := D.le_of_hasLogBound |
| 255 | obtain ⟨h_min_ge, h_min_le⟩ := D.logLevelTarget_mem_Icc |
| 256 | obtain ⟨h_log_ge, h_log_le⟩ := D.log_N_mem_Icc_logLevelTarget |
| 257 | constructor <;> linarith |
| 258 | |
| 259 | /-- The size of `log N`: `√x log b ≤ log N ≤ e³² √x log b` (upper bound for `u` true, lower for `u` |
| 260 | false), from `m log b ≤ log N ≤ 30 m log b` and `√x ≤ m ≤ 2 √x`. -/ |
| 261 | instance {u : Bool} : |
| 262 | D.HasLogBound u (Real.log D.N) (D.logX / 2 + Real.log D.logB + (if u then 32 else 0)) := |
| 263 | .of_mem_Icc (D.m * D.logB) (30 * D.m * D.logB) D.log_N_mem_Icc |
| 264 | (by cases u <;> grind [D.scale_inequalities]) |
| 265 | |
| 266 | /-- The level `N` is prime. -/ |
| 267 | instance : Fact D.N.Prime := ⟨D.N_prime⟩ |
| 268 | |
| 269 | /-- The level is large: `b¹⁰¹ ≤ N`. -/ |
| 270 | instance : D.HasLogLower D.N (101 * D.logB) := by |
| 271 | have h_log : 101 * D.logB ≤ Real.log D.N := D.le_of_hasLogBound |
| 272 | exact D.hasLogLower_iff.2 ((Real.le_log_iff_exp_le (HasLogBound.pos D)).1 h_log) |
| 273 | |
| 274 | /-! ### Tame characters and twists -/ |
| 275 | |
| 276 | /-- A character of U(1)(𝔸) of weight 0 whose tame part is supported on a finite set Q of places. The |
| 277 | places of Q have norm prime to M N, with M = `D.M` and N the level, and Q is disjoint from its |
| 278 | conjugate. -/ |
| 279 | structure TameChar where |
| 280 | /-- The automorphic character `ϑ` of `U(1)(𝔸)`. -/ |
| 281 | toAutChar : AutChar D.E |
| 282 | /-- The modulus: a finite set of finite places of `E`. -/ |
| 283 | Q : Finset (New.FinPlace D.E) |
| 284 | /-- The tame part: one character of the residue field at each finite place. -/ |
| 285 | tamePart : (w : New.FinPlace D.E) → MulChar (ResField w) ℂ |
| 286 | /-- The character has weight `0` and tame part `tamePart`. -/ |
| 287 | hasWeight : toAutChar.HasWeight 0 tamePart |
| 288 | /-- The tame part is trivial outside `Q`. -/ |
| 289 | tamePart_eq_one : ∀ w ∉ Q, tamePart w = 1 |
| 290 | /-- `Q` is disjoint from its complex conjugate. -/ |
| 291 | star_notMem : ∀ w ∈ Q, star w ∉ Q |
| 292 | /-- The places of `Q` have norm prime to `M N`, where `M = D.M` and `N` is the level. -/ |
| 293 | coprime : (D.M * D.N).Coprime (∏ w ∈ Q, w.q) |
| 294 | |
| 295 | /-- The product of the norms of the places in the finite set Q of the tame character ϑ. -/ |
| 296 | abbrev TameChar.normQ {D : Data P} (ϑ : D.TameChar) : ℕ := ∏ w ∈ ϑ.Q, w.q |
| 297 | |
| 298 | /-- A twist: a tame character (`New.Data.TameChar`) whose tame part is non-trivial at every place of |
| 299 | its set Q. -/ |
| 300 | structure Twist extends D.TameChar where |
| 301 | /-- The tame part is non-trivial at every place of `Q`. -/ |
| 302 | tamePart_ne_one : ∀ w ∈ Q, tamePart w ≠ 1 |
| 303 | |
| 304 | /-- The trivial twist, with empty set Q and trivial tame part. -/ |
| 305 | instance : One D.Twist where |
| 306 | one := |
| 307 | { toAutChar := 1 |
| 308 | Q := ∅ |
| 309 | tamePart := 1 |
| 310 | hasWeight := .one |
| 311 | tamePart_eq_one := by simp |
| 312 | star_notMem := by simp |
| 313 | coprime := by simp |
| 314 | tamePart_ne_one := by simp } |
| 315 | |
| 316 | /-- A twist is read as its tame character. -/ |
| 317 | instance : Coe D.Twist D.TameChar := ⟨Twist.toTameChar⟩ |
| 318 | |
| 319 | /-- The trivial character, as a tame character with empty set Q and trivial tame part. -/ |
| 320 | abbrev TameChar.one {D : Data P} : D.TameChar := Twist.toTameChar 1 |
| 321 | |
| 322 | /-! ### The characters of the lifts -/ |
| 323 | |
| 324 | /-- The character μ_j⁰ = μ♭(υ^{−Δ}χ)^j of U(1)(𝔸). Here μ♭ = `D.chiZero` has weight −κ₀ and trivial |
| 325 | tame part, χ = `D.chiM` has weight 0 and tame part `D.chiMLocal`, υ is the restricted splitting |
| 326 | character `New.WeilData.upsilonU1` and Δ = `D.gap` is the gap. -/ |
| 327 | def untwistedLiftChar (j : ℕ) : AutChar D.E := D.chiZero * (upsilonU1 ^ (-D.gap : ℤ) * D.chiM) ^ j |
| 328 | |
| 329 | /-- The character μ_j⁰ = `D.untwistedLiftChar j` of U(1)(𝔸), for the field E = `D.E`, has weight |
| 330 | −κ_j and tame part ω^j (`HasWeight`): almost all ω_w^j are trivial, and μ_j⁰(u) = ∏_v |
| 331 | u_v^{−κ_j(v)} · ∏_w ω_w^j(u mod w) whenever u has integral finite part, with v running over the |
| 332 | infinite places `InfinitePlace D.E` and w over the finite places of E. Here |
| 333 | κ_j = `D.liftWeight j` = κ₀ + jΔ for the gap Δ = `D.gap`, and μ_j⁰ = μ♭(υ^{−Δ}χ)^j, where |
| 334 | μ♭ = `D.chiZero` has weight −κ₀ and trivial tame part, υ = `upsilonU1` has weight 1 and trivial tame |
| 335 | part, and χ = `D.chiM` has weight 0 and tame part ω = `D.chiMLocal`, a family of characters ω_w of |
| 336 | the residue fields. -/ |
| 337 | lemma untwistedLiftChar_hasWeight (j : ℕ) : |
| 338 | (D.untwistedLiftChar j).HasWeight (fun v : InfinitePlace D.E ↦ -D.liftWeight j v) |
| 339 | (D.chiMLocal ^ (j : ℤ)) := by |
| 340 | -- weights add and tame parts multiply |
| 341 | have h_step : (upsilonU1 ^ (-D.gap : ℤ) * D.chiM).HasWeight (fun _ ↦ -D.gap) D.chiMLocal := by |
| 342 | simpa only [add_zero, one_mul] using (hasWeight_upsilonU1_zpow (-D.gap : ℤ)).mul |
| 343 | D.chiM_hasWeight |
| 344 | have h_weight : (fun v : InfinitePlace D.E ↦ (-D.liftWeight j v : ℤ)) = |
| 345 | (fun v : InfinitePlace D.E ↦ (-D.liftWeight 0 v : ℤ)) + (j : ℤ) • fun _ ↦ (-D.gap : ℤ) := |
| 346 | funext fun v ↦ by simp [liftWeight_eq, add_comm, add_left_comm] |
| 347 | rw [h_weight, untwistedLiftChar, ← zpow_natCast] |
| 348 | simpa only [one_mul] using D.chiZero_hasWeight.mul (h_step.zpow j) |
| 349 | |
| 350 | /-- For a tame character ϑ and a natural number j, the character μ_j⁰ϑ of U(1)(𝔸). -/ |
| 351 | def liftChar (ϑ : D.TameChar) (j : ℕ) : AutChar D.E := D.untwistedLiftChar j * ϑ.toAutChar |
| 352 | |
| 353 | /-- The family of residue field characters ω_w^j ψ_w, with ω = `D.chiMLocal` and |
| 354 | ψ = `ϑ.tamePart`; it is the tame part of μ_j⁰ϑ. -/ |
| 355 | def liftTamePart (ϑ : D.TameChar) (j : ℕ) : (w : New.FinPlace D.E) → MulChar (ResField w) ℂ := |
| 356 | D.chiMLocal ^ (j : ℤ) * ϑ.tamePart |
| 357 | |
| 358 | /-- For a tame character ϑ, the character μ_j⁰ϑ = `D.liftChar ϑ j` has weight −κ_j, with |
| 359 | κ_j = `D.liftWeight j`, and tame part `D.liftTamePart ϑ j`, the product of `D.chiMLocal ^ j` and |
| 360 | `ϑ.tamePart`. -/ |
| 361 | instance hasWeight_liftChar {ϑ : D.TameChar} {j : ℕ} : |
| 362 | (D.liftChar ϑ j).HasWeight (fun v : InfinitePlace D.E ↦ -D.liftWeight j v) |
| 363 | (D.liftTamePart ϑ j) := by |
| 364 | simpa only [liftChar, liftTamePart, add_zero] using (D.untwistedLiftChar_hasWeight j).mul |
| 365 | ϑ.hasWeight |
| 366 | |
| 367 | /-- The natural numbers j with 1 ≤ j ≤ m, for the number m of the data; they index the lifts. -/ |
| 368 | abbrev LiftIndex : Set ℕ := Icc 1 D.m |
| 369 | |
| 370 | end Level |
| 371 | |
| 372 | /-! ## Powers of tame characters and m-fold twists -/ |
| 373 | |
| 374 | section MFoldTwists |
| 375 | |
| 376 | variable {P : Parameters} (D : Data P) |
| 377 | |
| 378 | /-- For a tame character ϑ and a natural number n, the tame character ϑⁿ, with the same set Q and |
| 379 | tame part `ϑ.tamePart ^ n`. -/ |
| 380 | def TameChar.pow {D : Data P} (ϑ : D.TameChar) (n : ℕ) : D.TameChar where |
| 381 | toAutChar := ϑ.toAutChar ^ n |
| 382 | Q := ϑ.Q |
| 383 | tamePart := ϑ.tamePart ^ n |
| 384 | hasWeight := by simpa only [zpow_natCast, smul_zero] using ϑ.hasWeight.zpow n |
| 385 | tamePart_eq_one w hw := by rw [Pi.pow_apply, ϑ.tamePart_eq_one w hw, one_pow] |
| 386 | star_notMem := ϑ.star_notMem |
| 387 | coprime := ϑ.coprime |
| 388 | |
| 389 | /-- An m-fold twist: a twist ϑ whose tame part has `tamePart w ^ n ≠ 1` for all w in Q and |
| 390 | 1 ≤ n ≤ m. -/ |
| 391 | structure MFoldTwist extends D.Twist where |
| 392 | /-- For `1 ≤ n ≤ m` the `n`-th power of the tame part is non-trivial at every place of `Q`. -/ |
| 393 | pow_ne_one : ∀ n ∈ D.LiftIndex, ∀ w ∈ Q, tamePart w ^ n ≠ 1 |
| 394 | |
| 395 | /-- For a tame character ϑ and a natural number j, the character μ_j⁰ϑ^j of U(1)(𝔸), used for |
| 396 | lift j of a chain. -/ |
| 397 | abbrev chainChar (ϑ : D.TameChar) (j : ℕ) : AutChar D.E := D.liftChar (ϑ.pow j) j |
| 398 | |
| 399 | /-- The trivial twist is an m-fold twist, since its set Q is empty. -/ |
| 400 | instance : One D.MFoldTwist := ⟨⟨1, fun _ _ w hw ↦ absurd hw (Finset.notMem_empty w)⟩⟩ |
| 401 | |
| 402 | /-- An m-fold twist is read as its underlying twist. -/ |
| 403 | instance : Coe D.MFoldTwist D.Twist := ⟨MFoldTwist.toTwist⟩ |
| 404 | |
| 405 | /-- For an m-fold twist ϑ and 1 ≤ n ≤ m, the power ϑⁿ as a twist. -/ |
| 406 | def MFoldTwist.powTwist {D : Data P} (ϑ : D.MFoldTwist) (n : LiftIndex D) : D.Twist where |
| 407 | toTameChar := ϑ.pow n |
| 408 | tamePart_ne_one := ϑ.pow_ne_one n n.property |
| 409 | |
| 410 | end MFoldTwists |
| 411 | |
| 412 | end New.Data |
| 413 | |
| 414 | end |