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.Data.Rat.Cast.OfScientific |
| 4 | public import New.UpperBound.Divisibility.JetExponent |
| 5 | import New.Reduction.Data.Sizes |
| 6 | |
| 7 | /-! |
| 8 | # Marked primes above `p`, full marks and the scaled Hecke operator |
| 9 | |
| 10 | Fix a prime `p` and an embedding `ι : ℂ → ℂ_[p]`. Each infinite place of `E` then induces a prime |
| 11 | above `p`. A finite set `Λ` of such primes is marked if it is disjoint from its conjugate and each |
| 12 | member is induced by an a-place; the definition also asks that `p` be exceptional and below `x₁`. |
| 13 | A *full mark* is a marked set that contains, for each a-place, the prime it induces or the |
| 14 | conjugate of that prime. |
| 15 | This file shows that a full mark exists and defines, with `A_𝔩` the number |
| 16 | `New.Data.heckeScalingExponent` of a prime `𝔩`, a scaled Hecke operator on the space |
| 17 | `D.SourceForm` of source forms. |
| 18 | |
| 19 | ## Main definitions and results |
| 20 | |
| 21 | * `New.Data.IsFullMark`: a marked set that meets each pair of a prime induced by an a-place and its |
| 22 | conjugate. |
| 23 | * `New.Data.exists_isFullMark`: a full mark exists for every exceptional `p < x₁`. |
| 24 | * `New.Data.IsMarked.scaledHeckeOperator`: the operator `p ^ A_𝔩 • T_{𝔩,𝔯}` at a marked prime, on |
| 25 | the space of source forms. |
| 26 | |
| 27 | Notions from other files: |
| 28 | * `New.Data.aPlaces`: The `a`-places: the infinite places of `E` whose class in `(ℤ/q₁)ˣ` is `1` |
| 29 | modulo `q₀`. |
| 30 | * `New.Data.IsExceptional`, `New.Data.ceilLogLifts`: A condition on `p` alone: `(p/d) = -1`, |
| 31 | `p ≢ ±1` modulo `m`, and the order `o₀` of `-p` modulo `q₀` is odd and at most `𝔯`, the least |
| 32 | natural number with `m ≤ p^𝔯`. |
| 33 | * `New.placeOfEmb`: The prime of `E` induced by an embedding `σ : E →+* F` into an ultrametric |
| 34 | normed field over `ℚ_p`: the centre on the integers of `E` of the valuation ring |
| 35 | `{x : E | ‖σ x‖ ≤ 1}`. |
| 36 | * `New.Data.placeOfInt`: The infinite place of E named by the class of the integer ν modulo q₁ if ν |
| 37 | is prime to q₁, and the identity place otherwise. |
| 38 | * `New.Data.lowColumns`: the number of columns at `τ` of height below `n_{j+1}` and different |
| 39 | from `1`. |
| 40 | -/ |
| 41 | |
| 42 | @[expose] public section |
| 43 | |
| 44 | noncomputable section |
| 45 | |
| 46 | namespace New.Data |
| 47 | |
| 48 | /-! ## Induced primes and marked sets -/ |
| 49 | |
| 50 | section MarkedDefs |
| 51 | |
| 52 | open Finset |
| 53 | |
| 54 | variable {P : Parameters} {D : Data P} {p : ℕ} [Fact p.Prime] [PadicPlace p] |
| 55 | (Λ : Finset (FinPlace D.E)) |
| 56 | |
| 57 | /-- The prime of `E` above `p` induced by the embedding `ι ∘ σ` of `E` into `ℂ_p`, where the |
| 58 | infinite place `σ` is read as the embedding of `E` into `ℂ` that the CM type selects. -/ |
| 59 | def inducedPlace (σ : D.Φ) : FinPlace D.E := placeOfEmb (ιₚ.comp (Φ σ)) |
| 60 | |
| 61 | /-- A marked set of primes of `E` at `ι`: `Λ` is disjoint from its complex conjugate, and each prime |
| 62 | of `Λ` is induced by an a-place. Moreover `p` is exceptional and below `x₁`. -/ |
| 63 | structure IsMarked where |
| 64 | /-- `Λ` is disjoint from its complex conjugate. -/ |
| 65 | star_notMem : ∀ l ∈ Λ, star l ∉ Λ |
| 66 | /-- `p` is exceptional. -/ |
| 67 | isExceptional : D.IsExceptional p |
| 68 | /-- Each prime of `Λ` is induced by an a-place. -/ |
| 69 | induced_by_aPlace : ∀ l ∈ Λ, ∃ τ ∈ D.aPlaces, inducedPlace τ = l |
| 70 | /-- `p` is below `x₁` and `χ_K(p) ≠ 1`. -/ |
| 71 | isSmallNonsplit : D.IsSmallNonsplit p |
| 72 | |
| 73 | /-- A full mark: a marked set that contains, for each a-place `τ`, the prime induced by `τ` or its |
| 74 | conjugate. -/ |
| 75 | structure IsFullMark extends D.IsMarked Λ where |
| 76 | /-- For each a-place, `Λ` contains its induced prime or the conjugate of that prime. -/ |
| 77 | mem_or_star_mem : ∀ τ ∈ D.aPlaces, inducedPlace τ ∈ Λ ∨ star (inducedPlace τ) ∈ Λ |
| 78 | |
| 79 | /-- The module of integral source forms: the elements of `D.SourceForm` of gauge at most `1`. -/ |
| 80 | abbrev integralSourceForms : Submodule embValRing D.SourceForm := |
| 81 | (integralFormsAt D.SourceForm 1).comap (D.SourceForm.subtype.restrictScalars embValRing) |
| 82 | |
| 83 | open scoped Classical in |
| 84 | /-- The places inducing a prime of `Λ`: the infinite places of `E` whose induced prime above `p` |
| 85 | lies in `Λ`. -/ |
| 86 | abbrev placesInducing : Finset D.Φ := {σ : D.Φ | inducedPlace σ ∈ Λ} |
| 87 | |
| 88 | open scoped Classical in |
| 89 | /-- The places inducing the conjugate of a prime of `Λ`: the infinite places of `E` whose induced |
| 90 | prime above `p` is conjugate to a prime of `Λ`. -/ |
| 91 | abbrev placesInducingConj : Finset D.Φ := {σ : D.Φ | star (inducedPlace σ) ∈ Λ} |
| 92 | |
| 93 | open scoped Classical in |
| 94 | /-- The number `A_𝔩`: the integer `D.a` times the number of a-places (places of class `1` modulo |
| 95 | `q₀`) that induce the prime `𝔩` at `ι`. -/ |
| 96 | def heckeScalingExponent (l : FinPlace D.E) : ℕ := D.a * #{τ ∈ D.aPlaces | inducedPlace τ = l} |
| 97 | |
| 98 | /-- The numbers `A_𝔩` for `𝔩 ∈ Λ` add up to `a` times the number of a-places whose induced prime |
| 99 | lies in `Λ`. -/ |
| 100 | lemma sum_heckeScalingExponent : ∑ l ∈ Λ, |
| 101 | heckeScalingExponent l = D.a * #(D.aPlaces ∩ placesInducing Λ) := by |
| 102 | classical |
| 103 | simp only [heckeScalingExponent, ← mul_sum, inter_filter, inter_univ] |
| 104 | -- The `convert` only matches the decidability instances of the two filters. |
| 105 | convert congrArg (D.a * ·) (sum_card_fiberwise_eq_card_filter D.aPlaces Λ inducedPlace) using 4 |
| 106 | |
| 107 | end MarkedDefs |
| 108 | |
| 109 | /-! ## Existence and properties of marked sets above a non-split prime -/ |
| 110 | |
| 111 | section MarkedPrimes |
| 112 | |
| 113 | open Finset Parameters Real Nat |
| 114 | |
| 115 | variable {P : Parameters} {D : Data P} {p : ℕ} [hq : Fact p.Prime] |
| 116 | |
| 117 | /-- An exceptional prime is inert in `K`: its Legendre symbol `(p/d)` is `-1`. -/ |
| 118 | lemma IsExceptional.chiK_eq_neg_one {p : ℕ} (h : D.IsExceptional p) : chiK P.d p = -1 := h.1 |
| 119 | |
| 120 | /-- For an exceptional prime `p` the order `o₀` of `-p` modulo `q₀` is odd. -/ |
| 121 | lemma IsExceptional.odd_o₀ {p : ℕ} (h : D.IsExceptional p) : Odd (D.o₀ p) := by |
| 122 | grind [IsExceptional] |
| 123 | |
| 124 | /-- `D.ceilLogLifts p`, the least natural number `k` with `m ≤ p ^ k`, is at most `D.towerExp`, the |
| 125 | exponent `s` with `2 ^ s = m ^ 22`. -/ |
| 126 | lemma ceilLogLifts_le_towerExp : D.ceilLogLifts p ≤ D.towerExp := by |
| 127 | obtain ⟨e, hm, hs⟩ := D.exists_m_eq_two_pow |
| 128 | refine clog_le_of_le_pow (hm.trans_le ?_) |
| 129 | exact (Nat.pow_le_pow_right two_pos (by lia)).trans (Nat.pow_le_pow_left hq.out.two_le D.towerExp) |
| 130 | |
| 131 | /-- The least `r` with `m ≤ p ^ r` is at most `l₀`, the least power of `3` above `27 s`, because |
| 132 | `m ≤ 2 ^ l₀`. -/ |
| 133 | lemma ceilLogLifts_le_l₀ : D.ceilLogLifts p ≤ l₀ D.towerExp := by |
| 134 | refine clog_le_of_le_pow ?_ |
| 135 | calc D.m ≤ D.m ^ 594 := Nat.le_self_pow (by norm_num) _ |
| 136 | _ ≤ 2 ^ l₀ D.towerExp := D.m_pow_le_two_pow_l₀ |
| 137 | _ ≤ p ^ l₀ D.towerExp := Nat.pow_le_pow_left hq.out.two_le _ |
| 138 | |
| 139 | /-- The number `ceilLogLifts p`, the least `𝔯` with `m ≤ p ^ 𝔯`, is bounded in order of magnitude by |
| 140 | `log (log x₁)`: it is at most `s` (`ceilLogLifts_le_towerExp`). -/ |
| 141 | instance : D.HasLogUpper (D.ceilLogLifts p) (Real.log D.logX₁) := |
| 142 | D.hasLogUpper_of_le (A := D.towerExp) ceilLogLifts_le_towerExp |
| 143 | |
| 144 | /-- If `2 ^ s` divides a product of two natural numbers, where `2 * e < s`, and `2 ^ (e + 1)` does |
| 145 | not divide the first factor, then `2 ^ (e + 1)` divides the second. -/ |
| 146 | lemma two_pow_dvd_right_of_dvd_mul {e s q o : ℕ} (hs : 2 * e < s) (h_dvd : 2 ^ s ∣ q * o) |
| 147 | (hq : ¬2 ^ (e + 1) ∣ q) : 2 ^ (e + 1) ∣ o := by |
| 148 | -- Compare `2`-adic valuations: that of `q` is at most `e`, that of `q * o` at least `s`. |
| 149 | simp only [multiplicity_dvd_iff, mul_eq_zero, not_or, not_le] at h_dvd hq ⊢ |
| 150 | grind [Nat.multiplicity_mul] |
| 151 | |
| 152 | /-- Let `p` be an exceptional prime: inert in `K = ℚ(√-d)`, not congruent to `±1` modulo the number |
| 153 | `m` of lifts, and such that the order `o₀` of `-p` modulo `q₀` is odd and at most `ceilLogLifts p`, |
| 154 | the least `r` with `m ≤ p ^ r`. Then the power of two `m` divides the order of `D.placeOfInt (-p)`, |
| 155 | the class of `-p` in the group `Gal(E/K) = (ℤ/q₁)ˣ` of infinite places of `E = K(ζ_{q₁})`. -/ |
| 156 | lemma IsExceptional.m_dvd_orderOf (h : D.IsExceptional p) : D.m ∣ orderOf (D.placeOfInt (-p)) := by |
| 157 | -- With `o` the order of `-p`, lifting the exponent gives `2 ^ s ∣ (-p ± 1) * o`. Here `m` is a |
| 158 | -- power of `2`, `2 ^ s = m ^ 22` and `m` does not divide `p ± 1`, so `m` divides `o`. |
| 159 | obtain ⟨e, (hm : D.m = 2 ^ (e + 1)), (hs : D.towerExp = (e + 1) * 22)⟩ := D.exists_m_eq_two_pow |
| 160 | obtain ⟨(h_inert : chiK P.d p = -1), (h_not_pm_one : ¬D.IsPlusMinusOneModLifts p), -⟩ := h |
| 161 | set o : ℕ := orderOf (D.placeOfInt (-p)) |
| 162 | have h_not_dvd : ¬p ∣ P.q₁ 0 := by grind [not_dvd_q₁_mul_d_of_inert h_inert (s := 0)] |
| 163 | have h_pow : ((-p : ℤ) : ZMod (2 ^ (D.towerExp + 1))) ^ o = 1 := by |
| 164 | rw [← placeClass_placeOfInt (h_dvd := two_pow_dvd_q₁) |
| 165 | (isCoprime_q₀_of_not_dvd h_not_dvd).neg_left, |
| 166 | ← Units.val_pow_eq_pow_val, ← map_pow, pow_orderOf_eq_one, map_one, Units.val_one] |
| 167 | obtain ⟨h_sub, h_add⟩ : ¬2 ^ (e + 1) ∣ p - 1 ∧ ¬2 ^ (e + 1) ∣ p + 1 := by |
| 168 | simpa [IsPlusMinusOneModLifts, hm] using h_not_pm_one |
| 169 | have hp_one : 1 ≤ p := hq.out.one_le |
| 170 | rw [hm] |
| 171 | rcases two_pow_dvd_or_of_pow_eq_one h_pow with h_dvd | h_dvd <;> |
| 172 | rw [hm, ← Int.natAbs_dvd_natAbs, Int.natAbs_mul, Int.natAbs_pow, Int.natAbs_natCast] at * |
| 173 | · rw [show ((-p : ℤ) - 1).natAbs = p + 1 by lia] at h_dvd |
| 174 | exact two_pow_dvd_right_of_dvd_mul (by lia) h_dvd h_add |
| 175 | · rw [show ((-p : ℤ) + 1).natAbs = p - 1 by lia] at h_dvd |
| 176 | exact two_pow_dvd_right_of_dvd_mul (by lia) h_dvd h_sub |
| 177 | |
| 178 | /-- For an exceptional prime `p`, no prime `w` of `E` above `p` is equal to its complex |
| 179 | conjugate. -/ |
| 180 | lemma IsExceptional.star_ne (h : D.IsExceptional p) {w : FinPlace D.E} (hw : ↑p ∈ w.asIdeal) : |
| 181 | star w ≠ w := by |
| 182 | -- The places that send `w` to its conjugate are the odd powers of `-p`. The order of `-p` is |
| 183 | -- even, so the identity is not one of them. |
| 184 | intro h_eq |
| 185 | -- The action on primes is a bare `SMul`, so `one_smul` does not apply. |
| 186 | have h_one : (1 : D.Φ) • w = w := (smul_eq_self_iff_of_inert hw h.chiK_eq_neg_one).2 ⟨0, by simp⟩ |
| 187 | obtain ⟨i, hi_eq, hi_odd⟩ : ∃ i : ℕ, 1 = D.placeOfInt (-p) ^ i ∧ Odd i := |
| 188 | (smul_eq_star_iff_of_inert hw h.chiK_eq_neg_one).1 (h_one.trans h_eq.symm) |
| 189 | exact hi_odd.not_two_dvd_nat |
| 190 | ((D.m_even.two_dvd.trans h.m_dvd_orderOf).trans (orderOf_dvd_of_pow_eq_one hi_eq.symm)) |
| 191 | |
| 192 | /-- A non-split prime `p < x₁` divides neither `D.M` (the product of the two level primes |
| 193 | `D.levelPrime i`) nor `D.M * D.N`, and differs from `N`: the prime factors of `D.M * D.N` are at |
| 194 | least `x₁`. -/ |
| 195 | lemma IsSmallNonsplit.not_dvd_M_mul_N (h : D.IsSmallNonsplit p) : |
| 196 | ¬p ∣ D.M ∧ p ≠ D.N ∧ ¬p ∣ D.M * D.N := by |
| 197 | have hN : D.x₁ ≤ D.N := D.le_of_hasLogBound |
| 198 | have hg (i : Fin 2) : D.x₁ ≤ D.levelPrime i := D.le_of_hasLogBound |
| 199 | have h_ne : p ≠ D.levelPrime 0 ∧ p ≠ D.levelPrime 1 ∧ p ≠ D.N := by grind [h.1] |
| 200 | grind [M, hq.out, levelPrime_prime, N_prime, Nat.Prime.dvd_mul, Nat.prime_dvd_prime_iff_eq] |
| 201 | |
| 202 | variable (D) [PadicPlace p] |
| 203 | |
| 204 | /-! ### Induced primes and the existence of a marked set -/ |
| 205 | |
| 206 | /-- The prime induced by an infinite place lies above `p`. -/ |
| 207 | lemma p_mem_inducedPlace (σ : D.Φ) : ↑p ∈ (D.inducedPlace σ).asIdeal := natCast_mem_placeOfEmb _ |
| 208 | |
| 209 | /-- Multiplying `σ` by `τ` pulls the induced prime back along `τ` in `Gal(E/K)`, that is, moves it |
| 210 | by `τ⁻¹`. The action `•` of infinite places on primes is this pullback. -/ |
| 211 | lemma inducedPlace_mul (σ τ : D.Φ) : D.inducedPlace (σ * τ) = τ • inducedPlace σ := by |
| 212 | ext |
| 213 | simp [inducedPlace, phi_mul] |
| 214 | |
| 215 | /-- For p inert in K and e odd, the prime induced by (−p^e)σ is the conjugate of the prime |
| 216 | induced by σ. -/ |
| 217 | lemma inducedPlace_neg_pow_mul_of_odd (h_inert : chiK P.d p = -1) {e : ℕ} (he : Odd e) (σ : D.Φ) : |
| 218 | D.inducedPlace (D.placeOfInt (-p ^ e) * σ) = star (inducedPlace σ) := by |
| 219 | rw [mul_comm, inducedPlace_mul] |
| 220 | exact (smul_eq_star_iff_of_inert (D.p_mem_inducedPlace σ) h_inert).2 |
| 221 | ⟨e, by rw [placeOfInt_pow, he.neg_pow], he⟩ |
| 222 | |
| 223 | /-- Let `p` be a prime below the cut-off `x₁` that is exceptional: `(p/d) = -1`, `p ≢ ±1` modulo |
| 224 | `m`, and the order of `-p` modulo `q₀` is odd and at most `ceilLogLifts p`, the least `r` with |
| 225 | `m ≤ p ^ r`. Then there is a full mark: a finite set of primes of `E` induced by a-places and |
| 226 | disjoint from its conjugate, which contains `𝔩` or its conjugate for each prime `𝔩` induced by an |
| 227 | a-place. -/ |
| 228 | lemma exists_isFullMark (hp_lt : p < D.x₁) (h_exceptional : D.IsExceptional p) : |
| 229 | ∃ Λ : Finset (FinPlace D.E), D.IsFullMark Λ := by |
| 230 | -- Take the primes induced by a-places that are smaller than their conjugates, for some linear |
| 231 | -- order on the primes. |
| 232 | obtain ⟨(_ : LinearOrder (FinPlace D.E)), -⟩ := exists_wellFoundedLT (FinPlace D.E) |
| 233 | refine ⟨{l ∈ D.aPlaces.image inducedPlace | l < star l}, |
| 234 | { star_notMem := by grind [star_star], isExceptional := h_exceptional, |
| 235 | induced_by_aPlace := by grind, |
| 236 | isSmallNonsplit := ⟨hp_lt, by simp [h_exceptional.chiK_eq_neg_one]⟩ }, fun τ hτ ↦ ?_⟩ |
| 237 | -- As `o₀` is odd, `-p ^ o₀ * τ` is an a-place that induces the conjugate prime. |
| 238 | grind [star_star, (D.placeOfInt_mul_mem_aPlaces_iff h_exceptional.odd_o₀ τ hτ).2 dvd_rfl, |
| 239 | D.inducedPlace_neg_pow_mul_of_odd h_exceptional.chiK_eq_neg_one h_exceptional.odd_o₀ τ, |
| 240 | h_exceptional.star_ne (D.p_mem_inducedPlace τ)] |
| 241 | |
| 242 | variable {D} {Λ : Finset (FinPlace D.E)} {l : FinPlace D.E} |
| 243 | |
| 244 | /-- Let `p` be a prime with `(p/d) = -1`. Two places induce the same prime or conjugate primes |
| 245 | exactly when they differ by a power of `D.placeOfInt (-p)`, the place of the class of `-p` modulo |
| 246 | `q₁`. -/ |
| 247 | lemma inducedPlace_eq_or_star_iff (h_inert : chiK P.d p = -1) {σ τ : D.Φ} : |
| 248 | D.inducedPlace σ = inducedPlace τ ∨ inducedPlace σ = star (inducedPlace τ) ↔ |
| 249 | ∃ i : ℕ, σ = D.placeOfInt (-p) ^ i * τ := by |
| 250 | -- Even powers of `-p` fix a prime above `p` (`smul_eq_self_iff_of_inert`), odd powers conjugate |
| 251 | -- it. |
| 252 | have h_div : inducedPlace σ = (σ / τ) • inducedPlace τ := by |
| 253 | rw [← inducedPlace_mul, mul_div_cancel] |
| 254 | rw [h_div, smul_eq_self_iff_of_inert (D.p_mem_inducedPlace τ) h_inert, |
| 255 | smul_eq_star_iff_of_inert (D.p_mem_inducedPlace τ) h_inert] |
| 256 | grind [Nat.even_or_odd, div_eq_iff_eq_mul] |
| 257 | |
| 258 | /-- The properties of the orbits of the place named by `-p` that hold at an exceptional prime `p`. |
| 259 | Write `o₀ = D.o₀ p` for the order of `-p` modulo `q₀`, `o` for the order of the place named by `-p` |
| 260 | and `r = D.ceilLogLifts p` for the least number with `m ≤ p ^ r`. -/ |
| 261 | structure HasExceptionalOrbits (D : Data P) (p : ℕ) [Fact p.Prime] [PadicPlace p] : Prop where |
| 262 | /-- `o₀` is odd. -/ |
| 263 | odd_o₀ : Odd (D.o₀ p) |
| 264 | /-- `o₀ ≤ r`. -/ |
| 265 | o₀_le_ceilLogLifts : D.o₀ p ≤ D.ceilLogLifts p |
| 266 | /-- `m` divides `o`. -/ |
| 267 | m_dvd_orderOf : D.m ∣ orderOf (D.placeOfInt (-p)) |
| 268 | |
| 269 | /-- Let `p` be an exceptional prime: `(p/d) = -1`, `p ≢ ±1` modulo `m`, and the order `o₀` of `-p` |
| 270 | modulo `q₀` is odd and at most `r = ceilLogLifts p`, the least number with `m ≤ p ^ r`. Then the |
| 271 | properties of `New.Data.HasExceptionalOrbits` hold: `o₀` is odd, `o₀ ≤ r`, and the order `o` of |
| 272 | the place named by `-p` is a multiple of `m`. -/ |
| 273 | theorem IsExceptional.hasExceptionalOrbits (h : D.IsExceptional p) : |
| 274 | D.HasExceptionalOrbits p where |
| 275 | odd_o₀ := h.odd_o₀ |
| 276 | o₀_le_ceilLogLifts := by grind [IsExceptional] |
| 277 | m_dvd_orderOf := h.m_dvd_orderOf |
| 278 | |
| 279 | /-! ### Properties of marked sets -/ |
| 280 | |
| 281 | /-- A marked set has at most `f` primes, `f` being the number of infinite places of `E`: each of its |
| 282 | primes is induced by one of them. -/ |
| 283 | lemma IsMarked.card_le (h : D.IsMarked Λ) : #Λ ≤ D.f := |
| 284 | card_le_card_of_surjOn inducedPlace fun l hl ↦ |
| 285 | (h.induced_by_aPlace l hl).imp fun τ hτ ↦ ⟨mem_univ τ, hτ.2⟩ |
| 286 | |
| 287 | /-- For a marked set `Λ`, the prime `p` divides neither `D.M` nor `D.M * D.N`, and differs |
| 288 | from `N`. -/ |
| 289 | lemma IsMarked.not_dvd_M_mul_N (h : D.IsMarked Λ) : ¬p ∣ D.M ∧ p ≠ D.N ∧ ¬p ∣ D.M * D.N := |
| 290 | h.isSmallNonsplit.not_dvd_M_mul_N |
| 291 | |
| 292 | /-- If `Λ` is a marked set above `p`, multiplying a place by the place named by `-p` conjugates the |
| 293 | induced prime, because `p` is inert in `K`. -/ |
| 294 | lemma IsMarked.inducedPlace_placeOfInt_neg_mul (h : D.IsMarked Λ) (σ : D.Φ) : |
| 295 | inducedPlace (D.placeOfInt (-p) * σ) = star (inducedPlace σ) := by |
| 296 | simpa using D.inducedPlace_neg_pow_mul_of_odd h.isExceptional.chiK_eq_neg_one odd_one σ |
| 297 | |
| 298 | /-- For a marked set `Λ` and odd `e`, multiplication by the place named by `-p ^ e` carries the |
| 299 | places whose conjugate induced prime lies in `Λ` onto the places whose induced prime lies in `Λ`. -/ |
| 300 | lemma IsMarked.neg_pow_mul_mem_placesInducing_iff (h : D.IsMarked Λ) {e : ℕ} (he : Odd e) |
| 301 | {σ : D.Φ} : |
| 302 | D.placeOfInt (-p ^ e) * σ ∈ placesInducing Λ ↔ σ ∈ placesInducingConj Λ := by |
| 303 | simp [D.inducedPlace_neg_pow_mul_of_odd h.isExceptional.chiK_eq_neg_one he] |
| 304 | |
| 305 | /-- For a marked set `Λ` and odd `e`, multiplication by the place named by `-p ^ e` carries the |
| 306 | places whose induced prime lies in `Λ` onto the places whose conjugate induced prime lies in `Λ`. -/ |
| 307 | lemma IsMarked.neg_pow_mul_mem_placesInducingConj_iff (h : D.IsMarked Λ) {e : ℕ} (he : Odd e) |
| 308 | {σ : D.Φ} : |
| 309 | D.placeOfInt (-p ^ e) * σ ∈ placesInducingConj Λ ↔ σ ∈ placesInducing Λ := by |
| 310 | simp [D.inducedPlace_neg_pow_mul_of_odd h.isExceptional.chiK_eq_neg_one he] |
| 311 | |
| 312 | /-- Let `Λ` be a marked set of primes of `E`: in particular each prime of `Λ` is induced by an |
| 313 | a-place, and `p` is exceptional, so it is inert in `K` and `-p` has odd order modulo `q₀`. If |
| 314 | `inducedPlace σ` or its conjugate lies in `Λ`, then `σ` is not a b-place. -/ |
| 315 | lemma IsMarked.notMem_bPlaces (h : D.IsMarked Λ) (σ : D.Φ) |
| 316 | (hσ : inducedPlace σ ∈ Λ ∨ star (inducedPlace σ) ∈ Λ) : σ ∉ D.bPlaces := by |
| 317 | intro h_bPlace |
| 318 | -- An a-place induces the prime of `σ` or its conjugate, so it lies on the `-p`-orbit of `σ`. |
| 319 | obtain ⟨τ, h_aPlace, h_ind⟩ : ∃ τ ∈ D.aPlaces, inducedPlace τ = inducedPlace σ ∨ |
| 320 | inducedPlace τ = star (inducedPlace σ) := by grind [h.induced_by_aPlace] |
| 321 | obtain ⟨i, rfl⟩ := (inducedPlace_eq_or_star_iff h.isExceptional.chiK_eq_neg_one).1 h_ind |
| 322 | -- Modulo `q₀`, `(-p) ^ i ≡ -1`; raising to the odd order `o₀` of `-p` gives `-1 ≡ 1`. |
| 323 | have h_neg : -P.placeClass (P.q₀.dvd_mul_right _) (D.placeOfInt (-p)) ^ i = 1 := by |
| 324 | simpa [aPlaces, placeClass_of_mem_bPlaces, h_bPlace] using h_aPlace |
| 325 | have h_neg := congrArg (· ^ D.o₀ p) h_neg |
| 326 | rw [h.isExceptional.odd_o₀.neg_pow, pow_right_comm, o₀, pow_orderOf_eq_one] at h_neg |
| 327 | exact P.d_pow_ne_neg_one 0 (by simpa using congrArg Units.val h_neg.symm) |
| 328 | |
| 329 | /-- At a place whose induced prime, or its conjugate, lies in a marked set, the weight is `a / x₁`, |
| 330 | because such a place is not a b-place. -/ |
| 331 | lemma IsMarked.cast_weight_eq (h : D.IsMarked Λ) (σ : D.Φ) |
| 332 | (hσ : inducedPlace σ ∈ Λ ∨ star (inducedPlace σ) ∈ Λ) : |
| 333 | (D.weight σ : ℝ) = D.a / D.x₁ := by |
| 334 | rw [cast_weight, ite_eq_right (h.notMem_bPlaces σ hσ)] |
| 335 | |
| 336 | /-- A subset of a marked set keeps the local hypotheses and the disjointness from conjugation. -/ |
| 337 | lemma IsMarked.of_subset {S : Finset (FinPlace D.E)} (h : D.IsMarked Λ) (hs : S ⊆ Λ) : |
| 338 | D.IsMarked S where |
| 339 | star_notMem w hw hw' := h.star_notMem w (hs hw) (hs hw') |
| 340 | isExceptional := h.isExceptional |
| 341 | induced_by_aPlace w hw := h.induced_by_aPlace w (hs hw) |
| 342 | isSmallNonsplit := h.isSmallNonsplit |
| 343 | |
| 344 | open scoped Classical in |
| 345 | /-- Multiplication by the place of `-p` pairs each place inducing a prime in `Λ` with a place |
| 346 | inducing its conjugate. The two places have the same lift weight, so the sum of any function |
| 347 | of the weight and the prime in `Λ` agrees on the two sides. -/ |
| 348 | lemma IsMarked.sum_placesInducing_eq_sum_placesInducingConj {B : Type*} [AddCommMonoid B] |
| 349 | (h : D.IsMarked Λ) (j : ℕ) (F : ℕ → FinPlace D.E → B) : |
| 350 | ∑ τ ∈ placesInducing Λ, F (D.liftWeight j τ) (inducedPlace τ) = |
| 351 | ∑ τ ∈ placesInducingConj Λ, F (D.liftWeight j τ) (star (inducedPlace τ)) := by |
| 352 | classical |
| 353 | -- Multiplication by the place of −p exchanges the two fibers and preserves the lift weight. |
| 354 | apply sum_equiv (Equiv.mulLeft (D.placeOfInt (-(p : ℤ)))) |
| 355 | · intro τ |
| 356 | simpa using (h.neg_pow_mul_mem_placesInducingConj_iff odd_one).symm |
| 357 | · intro τ hτ |
| 358 | have hmem : inducedPlace τ ∈ Λ := by simpa [placesInducing] using hτ |
| 359 | have hw : (D.weight τ : ℝ) = D.weight (D.placeOfInt (-(p : ℤ))*τ) := by |
| 360 | simp [h.cast_weight_eq, h.inducedPlace_placeOfInt_neg_mul, hmem] |
| 361 | simp [liftWeight_eq, Nat.cast_injective hw, h.inducedPlace_placeOfInt_neg_mul] |
| 362 | |
| 363 | open scoped Classical in |
| 364 | /-- For a prime `l` in a marked set, summing `F` of the lift weight over the places inducing |
| 365 | `l` gives the same result as summing over the places inducing its conjugate. -/ |
| 366 | lemma IsMarked.sum_inducedPlace_eq_sum_star {B : Type*} [AddCommMonoid B] (h : D.IsMarked Λ) |
| 367 | {l : FinPlace D.E} (hl : l ∈ Λ) (j : ℕ) (F : ℕ → B) : |
| 368 | ∑ τ : D.Φ with inducedPlace τ = l, F (D.liftWeight j τ) = |
| 369 | ∑ τ : D.Φ with inducedPlace τ = star l, F (D.liftWeight j τ) := by |
| 370 | have singleton := h.of_subset (singleton_subset_iff.2 hl) |
| 371 | simpa [placesInducing, placesInducingConj, star_eq_iff_star_eq, eq_comm (a := star l)] using |
| 372 | singleton.sum_placesInducing_eq_sum_placesInducingConj j (fun c _ ↦ F c) |
| 373 | |
| 374 | open scoped Classical in |
| 375 | /-- The balance `IsMarked.sum_placesInducing_eq_sum_placesInducingConj` as one sum over all infinite |
| 376 | places `τ`: with `𝔩 = inducedPlace τ`, add `G (D.liftWeight j τ) 𝔩` if `𝔩 ∈ Λ` and subtract |
| 377 | `G (D.liftWeight j τ) (star 𝔩)` if `star 𝔩 ∈ Λ`. The total is zero. -/ |
| 378 | lemma IsMarked.sum_inducedPlace_sub_star_eq_zero (h : D.IsMarked Λ) (j : ℕ) |
| 379 | (G : ℕ → FinPlace D.E → ℝ) : |
| 380 | ∑ τ : D.Φ, ((if inducedPlace τ ∈ Λ then G (D.liftWeight j τ) (inducedPlace τ) else 0) - |
| 381 | (if star (inducedPlace τ) ∈ Λ then G (D.liftWeight j τ) (star (inducedPlace τ)) else 0)) = |
| 382 | 0 := by |
| 383 | simp [sum_sub_distrib, ← sum_filter, h.sum_placesInducing_eq_sum_placesInducingConj j G] |
| 384 | |
| 385 | /-- A prime of a marked set lies above `p`. -/ |
| 386 | lemma IsMarked.natCast_mem_asIdeal (h : D.IsMarked Λ) (hl : l ∈ Λ) : ↑p ∈ l.asIdeal := by |
| 387 | obtain ⟨τ, -, rfl⟩ := h.induced_by_aPlace l hl |
| 388 | exact D.p_mem_inducedPlace τ |
| 389 | |
| 390 | /-- For a marked set `Λ` (`D.IsMarked Λ`) and `l ∈ Λ`, `p` is a uniformiser at `l`: its `l`-adic |
| 391 | valuation is `exp (-1)`. The reason is that the prime `p` of a marked set divides neither `q₁` nor |
| 392 | `d`. -/ |
| 393 | lemma IsMarked.valuation_natCast_eq_exp_neg_one (h : D.IsMarked Λ) (hl : l ∈ Λ) : |
| 394 | l.valuation D.E p = WithZero.exp (-1) := by |
| 395 | -- `l` lies above `p`, which is inert in `K` and so does not divide `q₁ * d`: it is unramified. |
| 396 | rw [← map_natCast (algebraMap (NumberField.RingOfIntegers D.E) D.E), l.valuation_of_algebraMap] |
| 397 | exact intValuation_natCast_eq_exp_neg_one (h.natCast_mem_asIdeal hl) |
| 398 | (not_dvd_q₁_mul_d_of_inert h.isExceptional.chiK_eq_neg_one) |
| 399 | |
| 400 | /-- Every prime `l` of a marked set `Λ` (disjoint from its complex conjugate, each prime induced by |
| 401 | an a-place) is split (`l.IsSplit`): `l` differs from its complex conjugate. -/ |
| 402 | lemma IsMarked.isSplit (h : D.IsMarked Λ) (hl : l ∈ Λ) : l.IsSplit := |
| 403 | fun h_eq : star l = l ↦ h.star_notMem l hl (by rwa [h_eq]) |
| 404 | |
| 405 | /-- Let `Λ` be a marked set of primes of `E` above `p` and `l ∈ Λ`. In the finite adelic unitary |
| 406 | group with basis indexed by `D.X 0`, the group `maxCompactAt (D.X 0) l` of elements of the standard |
| 407 | maximal compact subgroup that are trivial away from `l` and `star l` lies in `D.levelX 0`, the level |
| 408 | that fixes the forms of `D.SourceForm`. -/ |
| 409 | lemma IsMarked.maxCompactAt_le_levelX (h : D.IsMarked Λ) (hl : l ∈ Λ) : |
| 410 | maxCompactAt (D.X 0) l ≤ D.levelX 0 := by |
| 411 | -- Neither `l` nor its conjugate contains `piM * piN`, whose norm `M * N` is prime to `p`. |
| 412 | have h_notMem (v : FinPlace D.E) (hv : ↑p ∈ v.asIdeal) : D.piM * D.piN ∉ v.asIdeal := by |
| 413 | intro h_mem |
| 414 | have h_norm : ((D.M * D.N : ℕ) : NumberField.RingOfIntegers D.E) ∈ v.asIdeal := by |
| 415 | rw [Nat.cast_mul, ← piM_mul_star, ← piN_mul_star, mul_mul_mul_comm] |
| 416 | exact v.asIdeal.mul_mem_right _ h_mem |
| 417 | obtain ⟨-, -, h_ndvd⟩ := h.not_dvd_M_mul_N |
| 418 | exact h_ndvd ((v.natCast_mem_iff_dvd hv).1 h_norm) |
| 419 | have h_le : maxCompactAt (D.X 0) l ≤ principalLevel (D.X 0) (D.piM * D.piN) := by |
| 420 | refine inf_supportedOn_le_principalLevel fun w hw ↦ ?_ |
| 421 | obtain rfl : w = l := hw |
| 422 | exact ⟨h_notMem w (h.natCast_mem_asIdeal hl), |
| 423 | h_notMem (star w) (by simpa [mem_star_place] using h.natCast_mem_asIdeal hl)⟩ |
| 424 | exact h_le.trans (D.principalLevel_le_levelX 0) |
| 425 | |
| 426 | /-- The operator `p ^ A_𝔩 • T_{𝔩,𝔯}` on `D.SourceForm`, as an endomorphism over `embValRing`; here |
| 427 | `T_{𝔩,𝔯}` is the Hecke operator at the marked prime `𝔩` of index `𝔯 = D.ceilLogLifts p`, which |
| 428 | preserves `D.SourceForm`. -/ |
| 429 | noncomputable def IsMarked.scaledHeckeOperator (h : D.IsMarked Λ) (l : Λ) : |
| 430 | Module.End embValRing D.SourceForm := |
| 431 | LinearMap.restrictScalars embValRing <| |
| 432 | (p : ℂ) ^ heckeScalingExponent l.val • |
| 433 | (heckeSplit (algFormRep D.columnCount (D.lastEntry 0)) (h.isSplit l.property) |
| 434 | (D.ceilLogLifts p)).restrict |
| 435 | fun _ hv ↦ |
| 436 | -- a vector of level `D.levelX 0` is spherical at `l`, by |
| 437 | -- `maxCompactAt_le_levelX` |
| 438 | heckeSplit_mem_levelSpace _ (D.ceilLogLifts p) |
| 439 | (levelSpace_anti (h.maxCompactAt_le_levelX l.property) hv) IsLevel.le hv |
| 440 | |
| 441 | /-! ### Collisions and full marks -/ |
| 442 | |
| 443 | /-- Let `Λ` be a full mark: a marked set that contains, for each a-place, the induced prime or its |
| 444 | conjugate. A collision outside `placesInducing Λ` is a pair `(τ, e)` with `e` odd such that `τ` and |
| 445 | its product with the place `D.placeOfInt (-p ^ e)` are a-places that induce no prime of `Λ`. Then |
| 446 | `collisionSum`, the sum of `D.a / p ^ e` over these collisions, is zero. -/ |
| 447 | lemma IsFullMark.collisionSum_placesInducing_eq_zero (h : D.IsFullMark Λ) : |
| 448 | D.collisionSum p (placesInducing Λ) = 0 := by |
| 449 | -- In a collision `(τ, e)` the a-place `τ` induces no prime of `Λ`, so it induces the conjugate of |
| 450 | -- one. As `e` is odd, the partner `-p ^ e τ` then induces a prime of `Λ`: there is no collision. |
| 451 | have h_none (τ : D.Φ) (e : ℕ) : ¬D.IsCollision p (placesInducing Λ) τ e := by |
| 452 | intro hc |
| 453 | obtain ⟨-, h_odd, -⟩ := hc.ne_and_odd_and_dvd |
| 454 | obtain ⟨-, hτ, h_partner⟩ := hc |
| 455 | obtain ⟨h_aPlace, h_notMem⟩ : τ ∈ D.aPlaces ∧ τ ∉ placesInducing Λ := mem_sdiff.1 hτ |
| 456 | have h_conj : τ ∈ placesInducingConj Λ := by |
| 457 | simpa using (h.mem_or_star_mem τ h_aPlace).resolve_left (by simpa using h_notMem) |
| 458 | exact notMem_sdiff_of_mem_right |
| 459 | ((h.toIsMarked.neg_pow_mul_mem_placesInducing_iff h_odd).2 h_conj) h_partner |
| 460 | simp [collisionSum, h_none] |
| 461 | |
| 462 | end MarkedPrimes |
| 463 | |
| 464 | /-! ## The cost of the low columns at the places inducing `Λ` -/ |
| 465 | |
| 466 | section LowColumns |
| 467 | |
| 468 | open Finset Real Nat |
| 469 | |
| 470 | variable {P : Parameters} {D : Data P} {p : ℕ} [q : Fact p.Prime] {j : ℕ} |
| 471 | |
| 472 | /-- For data `D` with `m = D.m` lifts, let `j < m`, let `p < x₁` (`D.HasLogUpper p D.logX₁`) be a |
| 473 | prime, let `Λ` be a marked set of primes of `D.E` (disjoint from its conjugate, with primes induced |
| 474 | by a-places, and `p < x₁` exceptional), and let `σ` be a place inducing a prime of `Λ` |
| 475 | (`placesInducing Λ`). Let `r = D.ceilLogLifts p` be least with `m ≤ p ^ r`, and let |
| 476 | `D.lowColumns j σ` be the number of low columns (height below `D.n (j + 1)` and other than `1`) in |
| 477 | `D.columnCount` at `σ`. Then `r` times `D.lowColumns j σ` is at most `D.a / p / m`, plus |
| 478 | `D.a / D.x₁` when `σ` is an a-place (`σ ∈ D.aPlaces`), where `D.a` and `D.x₁` are the scales of |
| 479 | `D`. -/ |
| 480 | private lemma IsMarked.ceilLogLifts_mul_lowColumns_le (hj : j < D.m) [PadicPlace p] |
| 481 | [D.HasLogUpper p D.logX₁] {Λ : Finset (FinPlace D.E)} (hΛ : D.IsMarked Λ) {σ : D.Φ} |
| 482 | (hσ : σ ∈ placesInducing Λ) : |
| 483 | D.ceilLogLifts p * (D.lowColumns j σ : ℝ) ≤ |
| 484 | D.a / p / D.m + ite (σ ∈ D.aPlaces) (D.a / D.x₁) 0 := by |
| 485 | obtain ⟨h_inert, -, h_odd, h_order⟩ := hΛ.isExceptional |
| 486 | -- A place inducing a prime of `Λ` is not a b-place, so it has about `a / x₁` low columns. |
| 487 | grw [lowColumns_le hj σ, hΛ.cast_weight_eq σ (.inl (by simpa using hσ))] |
| 488 | obtain hpm | hmp := le_total p D.m |
| 489 | · have := q.out.pos |
| 490 | grw [hpm] |
| 491 | split <;> simpa using D.le_of_hasLogBound |
| 492 | · -- Here `ceilLogLifts p = 1`, so the odd number `o₀ p ≤ ceilLogLifts p` is `1`: the orbit of |
| 493 | -- the a-place that induces `inducedPlace σ` under `-p` consists of a-places, and `σ` lies on |
| 494 | -- it. |
| 495 | have h_one : D.ceilLogLifts p = 1 := clog_eq_one D.nat_le_of_hasLogBound hmp |
| 496 | have h_aPlace : σ ∈ D.aPlaces := by |
| 497 | grind [inducedPlace_eq_or_star_iff, hΛ.induced_by_aPlace, aPlaces, one_pow, o₀, |
| 498 | orderOf_eq_one_iff] |
| 499 | grw [h_one, ite_eq_left h_aPlace, add_comm] |
| 500 | simpa using D.le_of_hasLogBound |
| 501 | |
| 502 | /-- Let `j < m`, the number of lifts, and let the set `Λ` of primes of `E` be marked: it is disjoint |
| 503 | from its conjugate, its primes are induced by a-places, and `p < x₁` is exceptional. Let `L` be the |
| 504 | number of low columns, those of height below the rank `n_{j+1}` and other than `1`, in the diagrams |
| 505 | `D.columnCount` at the places that induce a prime of `Λ`. Let `r = ceilLogLifts p` be least with |
| 506 | `m ≤ p ^ r`, and `ν_p = transferExponent p = r f (n_m + r)`, where `f` is the number of infinite |
| 507 | places and `n_i = D.n i`. Then `#Λ ν_p + r L` is at most `loss p / m`, plus `a / x₁` for each |
| 508 | a-place inducing a prime of `Λ`. Here `a = x b` is the product of two scales of the data, and |
| 509 | `loss p` is `f a (log b)² / p`, times `m` if `p ≡ ±1` modulo `m`. -/ |
| 510 | lemma IsMarked.card_mul_transferExponent_add_sum_lowColumns_le (hj : j < D.m) [PadicPlace p] |
| 511 | {Λ : Finset (FinPlace D.E)} (hΛ : D.IsMarked Λ) : |
| 512 | #Λ * D.transferExponent p + D.ceilLogLifts p * ∑ σ ∈ placesInducing Λ, D.lowColumns j σ ≤ |
| 513 | D.loss p / D.m + #(D.aPlaces ∩ placesInducing Λ) * (D.a / D.x₁) := by |
| 514 | -- The size of `p < x₁`, as an instance for `D.le_of_hasLogBound`. |
| 515 | have hp_size : D.HasLogUpper p D.logX₁ := |
| 516 | D.hasLogUpper_of_le_of_nonneg hΛ.isSmallNonsplit.1.le p.cast_nonneg |
| 517 | have hp : 0 < p := q.out.pos |
| 518 | have h_place (σ : D.Φ) (hσ : σ ∈ placesInducing Λ) : |
| 519 | D.ceilLogLifts p * (D.lowColumns j σ : ℝ) ≤ D.a / p / D.m + ite (σ ∈ D.aPlaces) (D.a / D.x₁) |
| 520 | 0 := |
| 521 | hΛ.ceilLogLifts_mul_lowColumns_le hj hσ |
| 522 | grw [cast_sum, mul_sum, sum_le_sum h_place, ← le_loss, hΛ.card_le, transferExponent] |
| 523 | -- What remains once the sums over the a-places cancel holds by orders of magnitude. |
| 524 | suffices (D.f ^ 2 * D.ceilLogLifts p * (D.n D.m + D.ceilLogLifts p) * p + |
| 525 | #(placesInducing Λ) * D.a / D.m : ℝ) ≤ D.f * D.a * D.logB ^ 2 / D.m by |
| 526 | simpa [inter_comm, ← add_assoc, sum_add_distrib, field] |
| 527 | exact D.le_of_hasLogBound |
| 528 | |
| 529 | end LowColumns |
| 530 | |
| 531 | end New.Data |
| 532 | |
| 533 | end |