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.UpperBound.Size.ShortColumns |
| 4 | import Lib.ClassField.Avatar.HeckeBaseChange |
| 5 | import Lib.ClassField.HeckeCharacter.TameModulus |
| 6 | import New.UpperBound.Objects.Rows |
| 7 | |
| 8 | /-! |
| 9 | # Characters of the lifts of the chain above the level N |
| 10 | |
| 11 | This file shows that the characters of the lifts of the chain are unramified above the level `N`. |
| 12 | It identifies the character given by `New.rankTwist` and `New.AutChar.spaceChar` with a base |
| 13 | change. It also moves scalings at the primes dividing π, which lie above `N`, through chains of |
| 14 | lifts. A chain whose data at one lift are fixed by such a scaling annihilates the forms `ψ - z ψ`. |
| 15 | |
| 16 | ## Main definitions and results |
| 17 | |
| 18 | * `New.Data.spaceChar_rankTwist`: `New.rankTwist` followed by `New.AutChar.spaceChar` gives the base |
| 19 | change of the character of a lift. |
| 20 | * `New.Data.tensorChainLift_eq_zero_of_ramified`: for the chosen scaling `z_w` at a prime `w` |
| 21 | dividing `π` and a tensor `t` of the data of the first `m` lifts, take `j < m` such that |
| 22 | `ω(1, z_w)` on the factor of the lift from stage `j` to stage `j + 1` fixes `t`. Then the chain |
| 23 | with the data `t` vanishes on the ramified source forms (`New.Data.ramifiedSourceForms`). |
| 24 | |
| 25 | Notions from other files: |
| 26 | * `New.Data.N`: The level: a chosen prime N ≡ 1 mod q₂² with log N ∈ [λ, λ + √(log b)], where |
| 27 | λ = `New.Data.logLevelTarget`. |
| 28 | * `New.Data.liftKernel`: The theta kernel of the lift from forms on X_j (`New.Data.FormX`) to forms |
| 29 | on X_{j+1}. The finite unitary groups of X_j and X_{j+1} act on its data by ω. |
| 30 | * `New.chain`, `New.doubleLiftChain`, `New.TensorChain.lift`: The chain of theta lifts with data |
| 31 | Φ_0, Φ_1, …, the same chain taken in pairs with data in S_{2i} ⊗ S_{2i+1}, and the chain with a |
| 32 | tensor of data. |
| 33 | |
| 34 | ## Relation to the literature |
| 35 | |
| 36 | See `New.UpperBound.Divisibility.ValuationAtLevel` for related work. |
| 37 | -/ |
| 38 | |
| 39 | @[expose] public section |
| 40 | |
| 41 | namespace New.Data |
| 42 | |
| 43 | variable {P : Parameters} (D : Data P) (ϑ : D.TameChar) (j : ℕ) |
| 44 | |
| 45 | /-- Let `ν_j = D.chainChar ϑ j` be the character of `U(1)(𝔸)` used, for `j ≥ 1`, by the lift from |
| 46 | `X_{j-1}` to `X_j`. At a place `w` of `E` above the level `N`, the twist `rankTwist ν_j n` |
| 47 | (`ν_j` times `upsilonU1 ^ ⌊#n / 2⌋`) has a base change whose finite part is trivial on the local |
| 48 | units at `w`. -/ |
| 49 | lemma charUnramifiedAt_rankTwist_of_N_mem (n : Type*) [Fintype n] (w : FinPlace D.E) |
| 50 | (hw_N : ↑D.N ∈ w.asIdeal) : |
| 51 | CharUnramifiedAt (rankTwist (D.chainChar ϑ j) n).baseChange.finPart w := by |
| 52 | -- The tame part `D.liftTamePart` is trivial at `w` and `star w`, as places above `N` are neither |
| 53 | -- chosen places (`not_isChosen_of_N_mem`) nor in `ϑ.Q`. |
| 54 | have hQ (v : FinPlace D.E) (hv : ↑D.N ∈ v.asIdeal) : v ∉ ϑ.Q := fun hvQ ↦ |
| 55 | (D.normQ_mem_and_notMem_of_mem_Q ϑ (.inl hvQ)).right.right hv |
| 56 | apply D.hasWeight_liftChar.hasWeight_rankTwist.charUnramifiedAt <;> |
| 57 | simp [liftTamePart, not_isChosen_of_N_mem, ϑ.tamePart_eq_one, hQ, hw_N, TameChar.pow] |
| 58 | |
| 59 | /-- Let ν = `D.chainChar ϑ i` be the character of U(1)(𝔸) used, for i ≥ 1, by the lift from X_{i-1} |
| 60 | to X_i with the twist ϑ. Applying `New.rankTwist` for X_j and then `New.AutChar.spaceChar` in rank |
| 61 | |X_j| to ν gives the Hecke character x ↦ ν(x/x̄), as |X_j| is even. -/ |
| 62 | lemma spaceChar_rankTwist (i : ℕ) : |
| 63 | (rankTwist (D.chainChar ϑ i) (D.X j)).spaceChar (Fintype.card (D.X j)) = |
| 64 | (D.chainChar ϑ i).baseChange := by |
| 65 | have h_even : Even (Fintype.card (D.X j)) := by simpa only [card_X] using D.n_even j |
| 66 | exact Exchange.spaceChar_rankTwist h_even.two_dvd |
| 67 | |
| 68 | section Scalings |
| 69 | |
| 70 | open TensorProduct |
| 71 | |
| 72 | variable (w : D.piNPlaces) |
| 73 | |
| 74 | /-- The finite adelic unitary groups of the definite spaces `X_j` and `X_{j+1}` act by the twisted |
| 75 | Weil action `ω` on the data of the theta lift `D.liftKernel ϑ j` from forms on `X_j` to forms on |
| 76 | `X_{j+1}`, twisted by the tame character `ϑ`. Let `w` be a prime dividing `π = D.piN`, the integer |
| 77 | of `E` with `π π̄ = N` for the level `N = D.N`, and `z` a scaling at `w`. Then the pair of scalars |
| 78 | `(z, z)` acts trivially. -/ |
| 79 | lemma liftKernel_omega_scaling {z : unitary (𝔸f D.E)} (hz : D.IsScalingAt w z) : |
| 80 | (D.liftKernel ϑ j).ω (scalarFin (D.X j) z, scalarFin (D.X (j + 1)) z) = 1 := by |
| 81 | -- The pair fixes every linear map from `X_j` to `X_{j+1}`, and the characters of the lift are |
| 82 | -- unramified above `N`. |
| 83 | have h_split : star w.val ≠ w.val := |
| 84 | (ne_of_mem_of_not_mem w.property (D.isSplitLevel_piNPlaces.star_notMem _ w.property)).symm |
| 85 | have hN_mem : ↑D.N ∈ w.val.asIdeal := D.isSplitLevel_piNPlaces.natCast_level_mem _ w.property |
| 86 | have h_det (n m : Type) [Fintype n] [Fintype m] [DecidableEq m] (s : m → ℤˣ) : |
| 87 | (rankTwist (D.chainChar ϑ (j + 1)) n).val (detFin s (scalarFin m z)) = 1 := |
| 88 | (D.charUnramifiedAt_rankTwist_of_N_mem ϑ (j + 1) n w hN_mem).det_maxCompactAt_eq_one h_split |
| 89 | (D.scalarFin_mem_maxCompactAt_of_isScalingAt w m hz) |
| 90 | simp [liftKernel_ω, Seesaw.pairWeilFinite_scalarFin, Prod.mk_one_one, h_det] |
| 91 | |
| 92 | /-- Let `t` be a tensor of data of the first `m` lifts, so that `TensorChain.lift` is the composite |
| 93 | of these lifts, extended linearly in `t`. Let `z` be a scaling at a prime `w` dividing `π = D.piN`, |
| 94 | the integer of `E` with `π π̄ = N` for the level `N = D.N`, and let `j < m`. If `ω(1, z)`, acting on |
| 95 | factor `j` alone, fixes `t`, then the chain with data `t` sends `ψ - z ψ` to `0` for every algebraic |
| 96 | form `ψ` on `X_0`. -/ |
| 97 | theorem tensorChainLift_sub_scaling_eq_zero {m j : ℕ} (hj : j < m) |
| 98 | (t : TensorChain (fun i : ℕ ↦ (D.homX i).finitePart) m) {z : unitary (𝔸f D.E)} |
| 99 | (hz : D.IsScalingAt w z) |
| 100 | (h_fix : TensorChain.map (fun i : ℕ ↦ |
| 101 | if i = j then (D.liftKernel ϑ i).ω (1, scalarFin (D.X (i + 1)) z) else 1) m t = t) |
| 102 | (ψ : D.FormX 0) : |
| 103 | TensorChain.lift (fun i : ℕ ↦ (D.liftKernel ϑ i).lift) |
| 104 | (ψ - algFormRep D.columnCount (D.lastEntry 0) (scalarFin (D.X 0) z) ψ) m t = 0 := by |
| 105 | -- `ω(1, z)` on factor `j` inserts `z` after lift `j`; move it to the source. |
| 106 | have h_moved : TensorChain.lift (fun i : ℕ ↦ (D.liftKernel ϑ i).lift) |
| 107 | (algFormRep D.columnCount (D.lastEntry 0) (scalarFin (D.X 0) z) ψ) m t = |
| 108 | TensorChain.lift (fun i : ℕ ↦ (D.liftKernel ϑ i).lift) ψ m t := |
| 109 | TensorChain.lift_algFormRep_of_map_eq (D.liftKernel ϑ) |
| 110 | (z := fun i : ℕ ↦ scalarFin (D.X i) z) (fun i ↦ D.liftKernel_omega_scaling ϑ i w hz) hj h_fix |
| 111 | ψ |
| 112 | rw [TensorChain.lift_sub, h_moved, sub_self] |
| 113 | |
| 114 | /-- Let `w` be a prime dividing `π = D.piN`, the integer of `E` with `π π̄ = N` for the level |
| 115 | `N = D.N`, let `t` be a tensor of data of the first `m` lifts, and let `j < m`. If `ω(1, z_w)`, |
| 116 | acting on factor `j` alone, fixes `t`, then the chain of lifts with data `t` annihilates the |
| 117 | ramified source forms: the forms on `X_0` of level `D.levelX 0` whose translates by `z_v ^ k`, |
| 118 | `0 ≤ k < N - 1`, have sum `0` for each prime `v` dividing `π`, where `z_v = D.scalingGenerator v` is |
| 119 | the chosen scaling at `v` (integral, `1` off `v` and `v̄`, of order `N - 1` modulo `v`). -/ |
| 120 | theorem tensorChainLift_eq_zero_of_ramified {m j : ℕ} (hj : j < m) |
| 121 | (t : TensorChain (fun i : ℕ ↦ (D.homX i).finitePart) m) |
| 122 | (h_fix : TensorChain.map (fun i : ℕ ↦ if i = j then |
| 123 | (D.liftKernel ϑ i).ω (1, scalarFin (D.X (i + 1)) (D.scalingGenerator w)) else 1) m t = t) |
| 124 | {φ : D.SourceForm} (hφ : φ ∈ D.ramifiedSourceForms) : |
| 125 | TensorChain.lift (fun i : ℕ ↦ (D.liftKernel ϑ i).lift) φ.val m t = 0 := by |
| 126 | obtain ⟨ψ, hψ⟩ : ∃ ψ : D.SourceForm, φ.val = |
| 127 | ψ.val - algFormRep D.columnCount (D.lastEntry 0) (scalarFin (D.X 0) (D.scalingGenerator w)) |
| 128 | ψ.val := |
| 129 | D.exists_eq_sub_scalingGenerator w hφ |
| 130 | rw [hψ] |
| 131 | exact D.tensorChainLift_sub_scaling_eq_zero ϑ w hj t (D.isScalingAt_scalingGenerator w) h_fix ψ |
| 132 | |
| 133 | /-- For each `l`, the finite adelic unitary groups of the definite spaces `X_l` and `X_{l+1}` act |
| 134 | by the twisted Weil action `ω` on the data (Schwartz functions in `(D.homX l).finitePart`) of the |
| 135 | theta lift `D.liftKernel ϑ l` from forms on `X_l` to forms on `X_{l+1}`, twisted by the tame |
| 136 | character `ϑ`. |
| 137 | Let `τ i` lie in the tensor product of the data for `l = 2 i` and `l = 2 i + 1`, so that it gives a |
| 138 | map from forms on `X_{2i}` to forms on `X_{2i+2}`; `doubleLiftChain` is the composite of the first |
| 139 | `p` of these maps. Let `w` be a prime dividing `π = D.piN`, the integer of `E` with `π π̄ = N` for |
| 140 | the level `N = D.N`. If for some `i < p` the operator `ω(1, z_w)` on the second tensor factor fixes |
| 141 | `τ i`, then the composite annihilates the ramified source forms: the forms on `X_0` of level |
| 142 | `D.levelX 0` whose translates by `z_v ^ k`, `0 ≤ k < N - 1`, have sum `0` for each prime `v` |
| 143 | dividing `π`, where `z_v = D.scalingGenerator v` is the chosen scaling at `v` (integral, `1` off |
| 144 | `v` and `v̄`, of order `N - 1` modulo `v`). -/ |
| 145 | theorem doubleLiftChain_eq_zero_of_ramified |
| 146 | {τ : ∀ i : ℕ, (D.homX (2 * i)).finitePart ⊗[ℂ] (D.homX (2 * i + 1)).finitePart} {i p : ℕ} |
| 147 | (hi : i < p) |
| 148 | (h_fix : map LinearMap.id ((D.liftKernel ϑ (2 * i + 1)).ω |
| 149 | (1, scalarFin (D.X (2 * i + 1 + 1)) (D.scalingGenerator w))) (τ i) = τ i) |
| 150 | {φ : D.SourceForm} (hφ : φ ∈ D.ramifiedSourceForms) : |
| 151 | doubleLiftChain (D.liftKernel ϑ) τ p φ.val = 0 := by |
| 152 | -- Regroup the data into `2 * p` single factors; `ω(1, z_w)` on factor `2 * i + 1` fixes them. |
| 153 | have h_regrouped : TensorChain.map (fun l : ℕ ↦ if l = 2 * i + 1 then |
| 154 | (D.liftKernel ϑ l).ω (1, scalarFin (D.X (l + 1)) (D.scalingGenerator w)) else 1) (2 * p) |
| 155 | (TensorChain.ofPairs τ p) = TensorChain.ofPairs τ p := by |
| 156 | rw [TensorChain.map_ofPairs] |
| 157 | congr! with l |
| 158 | obtain rfl | h_ne := eq_or_ne l i |
| 159 | · rw [ite_eq_right (by omega), ite_eq_left rfl] |
| 160 | exact h_fix |
| 161 | · rw [ite_eq_right (by omega), ite_eq_right (by omega), TensorProduct.map_one, |
| 162 | one_apply_eq_self] |
| 163 | dsimp only [doubleLiftChain] |
| 164 | rw [← TensorChain.lift_ofPairs] |
| 165 | exact D.tensorChainLift_eq_zero_of_ramified ϑ w (by omega) _ h_regrouped hφ |
| 166 | |
| 167 | end Scalings |
| 168 | |
| 169 | end New.Data |