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 New.OneLift.HeckeValues.CharacterLiftNorm |
| 4 | public import New.OneLift.TestedForms |
| 5 | public import New.Reduction.Lattices.Heights |
| 6 | |
| 7 | /-! |
| 8 | # The ratio of twisted to untwisted Hecke L-values, main pairs and regular families of twists |
| 9 | |
| 10 | Consider a pair `(ν, z)`, a tame character `ϑ` with set of places `Q` and a sign `s = ±1` (by |
| 11 | default `1`). For these, `New.Data.CriticalPair.ratio` is the quotient |
| 12 | `|L(z, (ν ϑ^s)⁻¹)| / |L(z, ν⁻¹)|`, as a complex number. The remaining definitions record what the |
| 13 | congruence arguments need to know about a family of twists `θ ι`. The family has one twist for each |
| 14 | prime `ℓ` and isomorphism `ι : ℂ ≃ ℚ̄_ℓ` (`TauCeti.PrimePadicIso`). |
| 15 | |
| 16 | For a fixed lift index, the denominator budget is a sum over primes, not embeddings. The |
| 17 | bound at a prime must work for every embedding above it, even though the chosen twists and |
| 18 | the clearing operators may vary with the embedding. The budget is imposed for each lift |
| 19 | index separately. The same family of twists must also satisfy the inverse-ratio height bounds. |
| 20 | |
| 21 | ## Main definitions |
| 22 | |
| 23 | * `New.Data.goodLift`: the lift `New.Data.singleLift` restricted to good forms, whose range is the |
| 24 | space of lifts. |
| 25 | * `New.Data.CriticalPair.IsRamified`, `New.Data.CriticalPair.IsMainPair`: ramified pairs and main |
| 26 | pairs. |
| 27 | * `New.Data.denominatorBudget`: the bound for the sums over primes of the logarithmic denominator |
| 28 | bounds. |
| 29 | * `New.Data.IsNegligible`: numbers `e ℓ` with `∑ e ℓ log ℓ ≤ x ^ C` over every finite set of |
| 30 | primes. |
| 31 | * `New.Data.HasSmallRatios`: families of twists `θ ι` with modulus prime to `ℓ` whose powers have |
| 32 | ratios of L-values of small height. |
| 33 | * `New.Data.IsRegularFamily`: regular families, that is, families with small ratios for whose powers |
| 34 | the projections to the lifts have small denominators. |
| 35 | |
| 36 | Notions from other files: |
| 37 | * `New.AutChar.L`: The partial Hecke L-function of the character x ↦ ν(x/x̄) of E. |
| 38 | * `New.Data.CriticalPair`: An integer 1 ≤ z ≤ `D.t` and a character ν of U(1)(𝔸) of weight −c, with |
| 39 | z ≤ c(v) ≤ 4 `D.b` at every infinite place v and tame part ψ supported on the chosen places. |
| 40 | * `New.Data.Twist`, `New.Data.MFoldTwist`: A tame character whose tame part ψ_w (for an m-fold |
| 41 | twist: each ψ_wⁿ, 1 ≤ n ≤ m) is non-trivial at every place w of its finite set Q. |
| 42 | * `TauCeti.PrimePadicIso.HeightLe`: A bound for the height of a family of complex numbers over ι. |
| 43 | |
| 44 | ## Relation to the literature |
| 45 | |
| 46 | See `New.Congruences.FitTwistsExist` for related work. |
| 47 | -/ |
| 48 | |
| 49 | @[expose] public section |
| 50 | |
| 51 | namespace New.Data |
| 52 | |
| 53 | /-! |
| 54 | ## The ratio of twisted to untwisted Hecke L-values of a pair |
| 55 | |
| 56 | `New.AutChar.L S` omits the Euler factors at `S` and its conjugate. The inverse in the denominator |
| 57 | does not change the L-value (`New.Data.CriticalPair.L_inv`). |
| 58 | -/ |
| 59 | |
| 60 | section LValueRatio |
| 61 | |
| 62 | variable {P : Parameters} {D : Data P} |
| 63 | |
| 64 | /-- The trivial twist has the trivial character of `U(1)(𝔸)`. -/ |
| 65 | lemma Twist.toAutChar_one : (1 : D.Twist).toAutChar = 1 := |
| 66 | rfl |
| 67 | |
| 68 | /-- The modulus `Q` of the trivial twist, its finite set of finite places, is empty. -/ |
| 69 | lemma Twist.Q_one : (1 : D.Twist).Q = ∅ := |
| 70 | rfl |
| 71 | |
| 72 | /-- The twist underlying the trivial `m`-fold twist is the trivial twist. -/ |
| 73 | lemma MFoldTwist.toTwist_one : (1 : D.MFoldTwist).toTwist = 1 := |
| 74 | rfl |
| 75 | |
| 76 | /-- Let `D` be admissible data, with CM field `E = D.E` and number of lifts `m = D.m`. The trivial |
| 77 | twist has the trivial character, underlies the trivial `m`-fold twist, and has empty modulus. -/ |
| 78 | lemma toAutChar_one_and_toTwist_one_and_Q_one : |
| 79 | ((1 : D.Twist).toAutChar = 1 ∧ (1 : D.MFoldTwist).toTwist = 1) ∧ |
| 80 | (1 : D.Twist).Q = ∅ := |
| 81 | ⟨⟨Twist.toAutChar_one, MFoldTwist.toTwist_one⟩, Twist.Q_one⟩ |
| 82 | |
| 83 | /-- For a pair `p = (ν, z)`, a tame character `ϑ` and a sign `s` (by default `1`), the ratio |
| 84 | `|L(z, (ν ϑ^s)⁻¹)| / |L(z, ν⁻¹)|`, as a complex number. Both L-functions omit the Euler factors at |
| 85 | the chosen places and their conjugates. The numerator also omits those at the places `Q` of `ϑ` and |
| 86 | their conjugates. -/ |
| 87 | noncomputable def CriticalPair.ratio (p : D.CriticalPair) (ϑ : D.TameChar) (s : ℤˣ := 1) : ℂ := |
| 88 | (‖(p.character * ϑ.toAutChar ^ (s : ℤ))⁻¹.L ({w : FinPlace D.E | D.IsChosen w} ∪ ϑ.Q) p.z‖ / |
| 89 | ‖p.character⁻¹.L {w : FinPlace D.E | D.IsChosen w} p.z‖ : ℂ) |
| 90 | |
| 91 | end LValueRatio |
| 92 | |
| 93 | /-! |
| 94 | ## Lifts, ramified pairs, main pairs and regular families |
| 95 | |
| 96 | Valuations at `ι : ℂ ≃ ℚ̄_ℓ` are written as norms: `v_ι (y) ≥ -β_ℓ` reads `‖ι y‖ ≤ exp β` with |
| 97 | `β = β_ℓ log ℓ`. |
| 98 | -/ |
| 99 | |
| 100 | section FitTwists |
| 101 | |
| 102 | open Set Selmer |
| 103 | |
| 104 | variable {P : Parameters} (D : Data P) |
| 105 | |
| 106 | /-- An index type with `20 + (2 z - 20)` elements, so `2 z` for `z ≥ 10`: the basis of the |
| 107 | definite space `E ^ (2 z)` to which the character of a main pair is lifted, split into four blocks |
| 108 | of ranks `12`, `4`, `4` and `2 z - 20`. -/ |
| 109 | abbrev RankOneIndex (z : ℕ) : Type := (Fin 12 ⊕ Fin 4 ⊕ Fin 4) ⊕ Fin (2 * z - 20) |
| 110 | |
| 111 | /-- The theta lift `New.Data.singleLift` for the tame character `ϑ` and index `j`, restricted to the |
| 112 | good forms. It takes forms on the hermitian space `W_j = D.spaceW j` of rank `D.r` to forms on the |
| 113 | definite space `V` of rank `D.r + D.t`; `D.descentPair ϑ j` is the datum of this lift. The good |
| 114 | forms are the forms fixed by the principal congruence subgroup at the chosen places that lie in the |
| 115 | image of `D.e₀`, an idempotent of the group algebra of the product of the groups `GL_r (k_w)` over |
| 116 | the residue fields `k_w` of the chosen places. -/ |
| 117 | noncomputable abbrev goodLift (ϑ : D.TameChar) (j : ℕ) : |
| 118 | D.goodForms (D.spaceW j) →ₗ[ℂ] (D.descentPair ϑ j).FormV := |
| 119 | D.singleLift ϑ j ∘ₗ (D.goodForms (D.spaceW j)).subtype |
| 120 | |
| 121 | /-- A pair `p = (ν, z)` is ramified if the tame part `ψ` of `ν`, a character `ψ_w` of the residue |
| 122 | field at each finite place `w` of `E`, is nontrivial exactly at the chosen places, those dividing |
| 123 | the integer `D.piM` of norm `p₀ p₁` of the imaginary quadratic field `K`. -/ |
| 124 | def CriticalPair.IsRamified {D : Data P} (p : D.CriticalPair) : Prop := |
| 125 | ∀ w : FinPlace D.E, p.tamePart w ≠ 1 ↔ D.IsChosen w |
| 126 | |
| 127 | /-- The pair `p = (ν, z)`, with `ν` of weight `-c`, is a main pair for `j`: the type |
| 128 | `RankOneIndex z` has `2 z` elements and `2 ≤ z` (`HasLiftRank`), `m < z ≤ r`, `1 ≤ j ≤ m`, the tame |
| 129 | part of `ν` is `D.chiMLocal ^ j`, and `w_j + r - t ≤ c ≤ w_j` at every infinite place. Here |
| 130 | `m = D.m` is the number of lifts, `r = D.r` the rank of the spaces `W_j` and `t = D.t = 5 r`; |
| 131 | `D.chiMLocal` is the fixed family of residue characters that is trivial off the chosen places, and |
| 132 | `w_j = D.liftWeight j` is minus the weight of the character of the `j`-th lift. -/ |
| 133 | structure CriticalPair.IsMainPair {D : Data P} (p : D.CriticalPair) (j : ℕ) : Prop where |
| 134 | /-- The type `RankOneIndex z` has `2 z` elements, and `2 ≤ z`. -/ |
| 135 | hasLiftRank : p.HasLiftRank (RankOneIndex p.z) |
| 136 | /-- The point satisfies `m < z ≤ r`. -/ |
| 137 | z_mem : p.z ∈ Ioc D.m D.r |
| 138 | /-- The index satisfies `1 ≤ j ≤ m`. -/ |
| 139 | j_mem : j ∈ D.LiftIndex |
| 140 | /-- The tame part of `ν` is `ω ^ j`, with `ω = D.chiMLocal`. -/ |
| 141 | tamePart_eq : p.tamePart = D.chiMLocal ^ (j : ℤ) |
| 142 | /-- The upper bound `c ≤ w_j` at each infinite place. -/ |
| 143 | negWeight_le (v : D.Φ) : p.negWeight v ≤ D.liftWeight j v |
| 144 | /-- The lower bound `w_j + r - t ≤ c` at each infinite place, written without subtraction. -/ |
| 145 | le_negWeight (v : D.Φ) : D.liftWeight j v + D.r ≤ p.negWeight v + D.t |
| 146 | |
| 147 | /-- Let `D` be admissible data, with CM field `E = D.E` and number of lifts `m = D.m`. If `p` is a |
| 148 | main pair for `j`, so in particular `1 ≤ j ≤ m` and the tame part is `ω ^ j` for the fixed family |
| 149 | `ω = D.chiMLocal` of residue characters, trivial off the chosen places and of order above `8 m` at |
| 150 | them, then `p` is ramified: its tame part is nontrivial exactly at the chosen places. -/ |
| 151 | lemma CriticalPair.IsMainPair.isRamified {D : Data P} {p : D.CriticalPair} {j : ℕ} |
| 152 | (hp : p.IsMainPair j) : |
| 153 | p.IsRamified := by |
| 154 | obtain ⟨hj_pos, hj_le⟩ : 1 ≤ j ∧ j ≤ D.m := hp.j_mem |
| 155 | rw [CriticalPair.IsRamified, hp.tamePart_eq] |
| 156 | exact D.chiMLocal_zpow_ne_one_iff_isChosen j (by omega) (by omega) |
| 157 | |
| 158 | /-- The bound `denominatorBudget = f a log³ b / (m k)` for the sum over all primes of the |
| 159 | logarithmic denominator bounds. The numerator is `D.errorUnit`, with `f` the number of infinite |
| 160 | places of `E`, `b` the weight scale of the data and `a = x b` for `x` the length of the prime sum; |
| 161 | `m` is the number of lifts and `k = r + 1 - m`. -/ |
| 162 | noncomputable abbrev denominatorBudget : ℝ := D.errorUnit / (D.m * D.k) |
| 163 | |
| 164 | open scoped Classical in |
| 165 | /-- Let `Z` be the space of lifts from `W_j` for the twist `ϑ`, the range of `D.goodLift ϑ j` in the |
| 166 | forms on the space `V` of the lift datum `D.descentPair ϑ j`, and let `pr` be the orthogonal |
| 167 | projection to `Z`. Some operator `Λ` on `Z`, with `log |ι (det Λ)| ≥ -(dim Z) r β` for `r = D.r`, |
| 168 | makes `Λ (pr y)` integral at `ι` for every form `y` that is integral at `ι` and orthogonal to the |
| 169 | false lifts. A form is integral (`integralForms`) if all its values lie in the unit ball of the |
| 170 | `ℓ`-adic gauge at `ι`. The false lifts (`IsOrthogonalToFalseLifts`) are the forms orthogonal to `Z`, |
| 171 | in the image of the idempotent `D.e₀`, that are killed by the Hecke polynomial at its test value at |
| 172 | some split place off the level. -/ |
| 173 | def ClearsProjection {ℓ : ℕ} [Fact ℓ.Prime] (ι : ℂ ≃+* PadicAlgCl ℓ) (ϑ : D.Twist) (j : ℕ) |
| 174 | (β : ℝ) : Prop := |
| 175 | ∃ Λ : Module.End ℂ (D.goodLift ϑ j).range, |
| 176 | Real.exp (-(Module.finrank ℂ (D.goodLift ϑ j).range * (D.r * β))) ≤ ‖ι Λ.det‖ ∧ |
| 177 | ∀ y ∈ LevelPlaces.LevelForm.integralForms ⟨(algebraMap (PadicAlgCl ℓ) ℂ_[ℓ]).comp ι.toRingHom⟩, |
| 178 | (D.descentPair ϑ j).IsOrthogonalToFalseLifts D.e₀ (D.goodLift ϑ j).rangeᗮ y → |
| 179 | (Λ ((D.goodLift ϑ j).range.orthogonalProjectionOnto y) : (D.descentPair ϑ j).FormV) ∈ |
| 180 | LevelPlaces.LevelForm.integralForms ⟨(algebraMap (PadicAlgCl ℓ) ℂ_[ℓ]).comp ι.toRingHom⟩ |
| 181 | |
| 182 | /-- At `ι` and for the twist `ϑ`, two bounds hold. An operator on the space `Z` of lifts from `W_j`, |
| 183 | with determinant of norm at least `exp (-(dim Z) r β)` at `ι`, clears the denominators of the |
| 184 | projection to `Z` (`ClearsProjection`). For each main pair `p = (ν, z)` for `j`, the inner product |
| 185 | of the projections of two test forms (`IsTestForm`) to the line of the lift of `ν ϑ` has norm at |
| 186 | most `exp β`. Here `p.lValueData _ ϑ` is the datum of the theta lift of the character `ν ϑ` from |
| 187 | `U(1)` to the definite space of rank `2 z`, its `descentPair.FormV` is the space of forms on that |
| 188 | space, and its `trivialLift` is the lifted form. -/ |
| 189 | structure HasDenominatorsLe {ℓ : ℕ} [Fact ℓ.Prime] (ι : ℂ ≃+* PadicAlgCl ℓ) (ϑ : D.Twist) (j : ℕ) |
| 190 | (β : ℝ) : Prop where |
| 191 | /-- An operator of controlled determinant clears the denominator of the projection for forms |
| 192 | integral at the given embedding and orthogonal to the false lifts. -/ |
| 193 | clearsProjection : D.ClearsProjection ι ϑ j β |
| 194 | /-- For a main pair for `j` and two test forms (`IsTestForm`: integral above `ℓ` and orthogonal to |
| 195 | the false lifts in the kernel of the adjoint of the lift), the inner product of the projections to |
| 196 | the line of the lift of the constant function has norm at most `exp β` at `ι`. -/ |
| 197 | mainPair (p : D.CriticalPair) (hp : p.IsMainPair j) |
| 198 | {Ξ Ξ' : (p.lValueData hp.hasLiftRank ϑ).descentPair.FormV} |
| 199 | (hΞ : (p.lValueData hp.hasLiftRank ϑ).descentPair.IsTestForm ℓ Ξ) |
| 200 | (hΞ' : (p.lValueData hp.hasLiftRank ϑ).descentPair.IsTestForm ℓ Ξ') : |
| 201 | ‖ι (inner ℂ ((ℂ ∙ (p.lValueData hp.hasLiftRank ϑ).trivialLift).starProjection Ξ) |
| 202 | ((ℂ ∙ (p.lValueData hp.hasLiftRank ϑ).trivialLift).starProjection Ξ'))‖ ≤ Real.exp β |
| 203 | |
| 204 | /-- The reals `γ ℓ`, one for each prime `ℓ`, bound the logarithms of the denominators |
| 205 | (`HasDenominatorsLe`) for the `j`-th powers of the twists `θ ι`, and their sum stays within the |
| 206 | budget `denominatorBudget`. -/ |
| 207 | structure IsDenominatorBound (θ : PrimePadicIso → D.MFoldTwist) (j : D.LiftIndex) (γ : ℕ → ℝ) : |
| 208 | Prop where |
| 209 | /-- The sum of `γ ℓ` over a finite set of primes is at most `denominatorBudget`. -/ |
| 210 | sum_le (T : Finset ℕ) (hT : ∀ ℓ ∈ T, ℓ.Prime) : ∑ ℓ ∈ T, γ ℓ ≤ D.denominatorBudget |
| 211 | /-- At `ι`, with prime `ℓ = ι.1`, both bounds of `HasDenominatorsLe` hold for the `j`-th power of |
| 212 | `θ ι` with `β = γ ℓ`. -/ |
| 213 | hasDenominatorsLe (ι : PrimePadicIso) : D.HasDenominatorsLe ι.iso ((θ ι).powTwist j) j (γ ι.prime) |
| 214 | |
| 215 | /-- Reals `e ℓ`, one for each `ℓ`, are negligible, with the exponent `C`, if |
| 216 | `∑ e ℓ log ℓ ≤ x ^ C`, the sum taken over any finite set of primes. Here `x = D.x` is the length of |
| 217 | the prime sum, the smallest scale of the data. -/ |
| 218 | structure IsNegligible (C : ℕ) (e : ℕ → ℝ) : Prop where |
| 219 | /-- The sum of `e ℓ log ℓ` over a finite set of primes is at most `x ^ C`. -/ |
| 220 | sum_mul_log_le (T : Finset ℕ) (hT : ∀ ℓ ∈ T, ℓ.Prime) : ∑ ℓ ∈ T, e ℓ * Real.log ℓ ≤ D.x ^ C |
| 221 | |
| 222 | /-- A family of `m`-fold twists `θ ι`, one for each prime `ℓ` and `ι : ℂ ≃ ℚ̄_ℓ`, has small ratios |
| 223 | if the modulus of `θ ι` is prime to `ℓ` and, for `1 ≤ j ≤ m`, the `j`-th powers `(θ ι).powTwist j` |
| 224 | and their inverses have, for every ramified pair, inverse ratios of L-values of height at most |
| 225 | `D.x₁`, the second cut-off of the data. -/ |
| 226 | structure HasSmallRatios (θ : PrimePadicIso → D.MFoldTwist) : Prop where |
| 227 | /-- The norm of the modulus of `θ ι` is prime to the prime `ℓ = ι.1` of `ι`. -/ |
| 228 | coprime (ι : PrimePadicIso) : Nat.Coprime ι.prime (θ ι).normQ |
| 229 | /-- For a ramified pair, the inverse ratios of L-values at the `j`-th powers of the twists |
| 230 | (`s = 1`) or at their inverses (`s = -1`) form a family of height at most `D.x₁`. -/ |
| 231 | height_le (j : D.LiftIndex) (p : D.CriticalPair) (s : ℤˣ) (hp : p.IsRamified) : |
| 232 | HeightLe (fun ι : PrimePadicIso ↦ (p.ratio ((θ ι).powTwist j) s)⁻¹) D.x₁ |
| 233 | |
| 234 | /-- A family of `m`-fold twists `θ ι`, one for each prime `ℓ` and `ι : ℂ ≃ ℚ̄_ℓ`, is regular if it |
| 235 | has small ratios (`HasSmallRatios`) and, for `1 ≤ j ≤ m`, the `j`-th powers `(θ ι).powTwist j` |
| 236 | have denominators within the budget `denominatorBudget` (`IsDenominatorBound`). -/ |
| 237 | structure IsRegularFamily (θ : PrimePadicIso → D.MFoldTwist) : Prop extends D.HasSmallRatios θ where |
| 238 | /-- For each `j`, some prime-indexed reals `γ ℓ` bound the denominators of the `j`-th powers |
| 239 | at all embeddings, within `denominatorBudget`. -/ |
| 240 | exists_denominator_bound (j : D.LiftIndex) : ∃ γ : ℕ → ℝ, D.IsDenominatorBound θ j γ |
| 241 | |
| 242 | end FitTwists |
| 243 | |
| 244 | end New.Data |