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 TauCeti.Topology.Algebra.Group.Units |
| 4 | import TauCeti.Topology.Instances.Matrix |
| 5 | public import Lib.GLn.Branching.IntegralMap |
| 6 | public import Lib.Adelic.AutomorphicForms.Basic |
| 7 | public import Lib.Adelic.AutomorphicForms.SmoothAlgebraicForms |
| 8 | import Lib.Adelic.AutomorphicForms.AutomorphicAsAlgebraic |
| 9 | import Lib.DiscreteSeries.FlenstedJensen.PsiKTypes |
| 10 | |
| 11 | /-! |
| 12 | # Periods of algebraic forms over a block subgroup as class sums via branching |
| 13 | |
| 14 | This file takes an algebraic form `ψ` on a definite unitary group of rank `m + 1`, a finite point |
| 15 | `u` of rank one and an automorphic `Φ(x, g) = L_g(ρ₀(x) c)` on the block subgroup of rank `m`. |
| 16 | It turns the integral of `Φ(h) ψ_t(diag(h, u))` into a class sum (`New.classIntegral`) over the |
| 17 | finite adelic points. Here `ψ_t = New.algFormCoeff 1 t ψ`, and `ρ`, `ρ₀` are the representations |
| 18 | `New.conjWeylRep` of weights `(κ, e)` and `(κ₀, e₀)`. The archimedean integral gives an |
| 19 | intertwiner from weight `(κ, e)` to weight `(κ₀, e₀)`, which multiplicity one for branching |
| 20 | (`New.SpansBranchingMaps`) makes a multiple of the given matrix `A`. |
| 21 | |
| 22 | ## Main definitions and results |
| 23 | |
| 24 | * `New.Seesaw.integral_algFormCoeff_blockEmb`: the period over a block subgroup as a class sum. |
| 25 | * `New.Seesaw.isAutomorphic_algFormCoeff_blockEmb`: for a finite point `u` of rank one, the |
| 26 | restriction `h ↦ ψ_t(diag(h, u))` to a block is automorphic on the smaller standard space. |
| 27 | |
| 28 | Notions from other files: |
| 29 | * `New.Space.IsAutomorphic`: a function on `G = G_∞ × G_f` that is continuous, left invariant under |
| 30 | rational points and right invariant under an open subgroup of `G_f`. |
| 31 | * `New.algFormCoeff s L φ`: the function `(x, g) ↦ L (ρ(x⁻¹) φ(g))`; it is `New.ofAlgForm l s φ` for |
| 32 | `L = ⟨v⁺, ·⟩`, where `⟨·, ·⟩ = New.gramForm`. |
| 33 | * `New.classIntegral Γ K f`: the integral of `f` over `Γ \ G_f` for `vol K = 1`, as a finite sum. |
| 34 | |
| 35 | ## Relation to the literature |
| 36 | |
| 37 | Known; see `Lib.Adelic.AutomorphicForms.AutomorphicAsAlgebraic` for sources. |
| 38 | -/ |
| 39 | |
| 40 | @[expose] public section |
| 41 | |
| 42 | noncomputable section |
| 43 | |
| 44 | namespace New.Seesaw |
| 45 | |
| 46 | open NumberField MeasureTheory Matrix Space |
| 47 | |
| 48 | /-- For `σ : ι ⊕ Unit ≃ X`, pulling the constant signs `1` on `X` back along `σ` gives |
| 49 | the constant signs `1` on the `ι` block and the sign `1` on the `Unit` block. -/ |
| 50 | lemma one_comp_eq_one_elim_one {ι X : Type} (σ : ι ⊕ Unit ≃ X) : |
| 51 | (1 : X → ℤˣ) ∘ σ = (1 : ι → ℤˣ) ⊕ᵥ 1 := by |
| 52 | funext i |
| 53 | cases i <;> rfl |
| 54 | |
| 55 | variable {E ι X : Type} [Field E] [CMType E] [Fintype ι] [Fintype X] [DecidableEq X] [DecidableEq ι] |
| 56 | |
| 57 | /-- At a place `τ`, the archimedean component of |
| 58 | `G.blockEmb (one_comp_eq_one_elim_one σ) ((y, k), 1)` is the block matrix `diag(y τ, 1)`, |
| 59 | reindexed along `σ` (`GL.blockScalar`). -/ |
| 60 | lemma val_fst_blockEmb_one (σ : ι ⊕ Unit ≃ X) |
| 61 | (y : GInf E (1 : ι → ℤˣ)) (k : Gf E ι) (τ : InfinitePlace E) : |
| 62 | ((G.blockEmb (one_comp_eq_one_elim_one σ) |
| 63 | ((y, k), (1 : G E (1 : Unit → ℤˣ)))).1 τ : GL X ℂ).val = |
| 64 | GL.blockScalar (fun _ : InfinitePlace E ↦ σ) (fun w : InfinitePlace E ↦ (y w : GL ι ℂ).val) 1 |
| 65 | τ := by |
| 66 | ext a b |
| 67 | obtain ⟨a | a, rfl⟩ := σ.surjective a <;> obtain ⟨b | b, rfl⟩ := σ.surjective b <;> |
| 68 | rw [← G.adeleMatrix_fst] <;> simp [G.blockEmb, GL.blockScalar] |
| 69 | |
| 70 | /-- The block embedding sends a finite point `(1, k)` of the block to a finite point. -/ |
| 71 | lemma fst_blockEmb_one_one (σ : ι ⊕ Unit ≃ X) (k : Gf E ι) : |
| 72 | (G.blockEmb (one_comp_eq_one_elim_one σ) ((1, k), (1 : G E (1 : Unit → ℤˣ)))).1 = 1 := by |
| 73 | ext τ : 2 |
| 74 | simp [val_fst_blockEmb_one, GL.blockScalar] |
| 75 | |
| 76 | /-- `conjWeylMatrix κ e y` is `weylRep κ e` at the entrywise complex conjugate of `y`; |
| 77 | `conjWeylRep κ e y v` is `conjWeylMatrix κ e y *ᵥ v`. -/ |
| 78 | lemma conjWeylMatrix_eq_weylRep_map_conj {E X : Type} [Field E] [CMType E] [Fintype X] |
| 79 | [DecidableEq X] (κ : InfinitePlace E → ℕ → ℕ) (e : InfinitePlace E → ℤ) |
| 80 | (y : GInf E (1 : X → ℤˣ)) : |
| 81 | conjWeylMatrix κ e y = weylRep κ e |
| 82 | fun τ : InfinitePlace E ↦ (y τ : GL X ℂ).map (starRingEnd ℂ) := |
| 83 | rfl |
| 84 | |
| 85 | /-- The entrywise complex conjugate of a unitary matrix is unitary. -/ |
| 86 | lemma map_conj_mem_uSign_one {g : GL X ℂ} (hg : g.valᴴ * g.val = 1) : |
| 87 | g.map (starRingEnd ℂ) ∈ USign (1 : X → ℤˣ) := by |
| 88 | simp [mem_unitaryGroupOf_iff, star_eq_conjTranspose, |
| 89 | ← conjTranspose_map (⇑(starRingEnd ℂ)) fun _ ↦ rfl, ← Matrix.map_mul, hg] |
| 90 | |
| 91 | variable {κ : InfinitePlace E → ℕ → ℕ} {e : InfinitePlace E → ℤ} |
| 92 | {κ₀ : InfinitePlace E → ℕ → ℕ} {e₀ : InfinitePlace E → ℤ} |
| 93 | |
| 94 | /-- Let `ψ` be an algebraic form, `t` a linear functional and `ψ_t = algFormCoeff 1 t ψ` the |
| 95 | function `(x, g) ↦ t (ρ(x⁻¹) ψ(g))`. For a finite point `u` of rank one, the restriction |
| 96 | `h ↦ ψ_t(diag(h, u))` to a block is automorphic on the smaller standard space. Here |
| 97 | `diag = G.blockEmb (one_comp_eq_one_elim_one σ)`. -/ |
| 98 | lemma isAutomorphic_algFormCoeff_blockEmb (σ : ι ⊕ Unit ≃ X) |
| 99 | (t : (WeylIndex X κ → ℂ) →ₗ[ℂ] ℂ) (ψ : AlgForm X κ e) (u : Gf E Unit) : |
| 100 | (stdSpace E ι).IsAutomorphic |
| 101 | fun h : G E (1 : ι → ℤˣ) ↦ |
| 102 | algFormCoeff 1 t ψ (G.blockEmb (one_comp_eq_one_elim_one σ) (h, 1, u)) := by |
| 103 | let j : G E (1 : ι → ℤˣ) × G E (1 : Unit → ℤˣ) →* G E (1 : X → ℤˣ) := |
| 104 | G.blockEmb (one_comp_eq_one_elim_one σ) |
| 105 | obtain ⟨h_cont, h_rat, K', h_level⟩ := (stdSpace E X).isAutomorphic_algFormCoeff (L := t) ψ |
| 106 | -- `jf` is the block embedding `k ↦ diag(k, 1)` on finite points. |
| 107 | let jf : Gf E ι →* Gf E X := |
| 108 | (MonoidHom.snd _ _).comp (j.comp (((MonoidHom.inr _ _).prod 1))) |
| 109 | have jf_cont : Continuous fun k : Gf E ι ↦ (j ((1, k), 1)).2 := by fun_prop |
| 110 | have j_fin (k : Gf E ι) : j ((1, k), 1) = (1, jf k) := Prod.ext (fst_blockEmb_one_one σ k) rfl |
| 111 | refine ⟨by fun_prop, fun γ hγ g ↦ ?_, K'.comap jf jf_cont, fun k hk g ↦ ?_⟩ |
| 112 | · -- `diag(γ, 1)` is a rational point |
| 113 | have hγ_rat : j (γ, 1) ∈ (stdSpace E X).Γ := by simpa [j] |
| 114 | calc algFormCoeff 1 t ψ (j (γ * g, 1, u)) |
| 115 | _ = algFormCoeff 1 t ψ (j (γ, 1) * j (g, 1, u)) := by simp [← map_mul] |
| 116 | _ = algFormCoeff 1 t ψ (j (g, 1, u)) := h_rat _ hγ_rat _ |
| 117 | · -- the preimage of the level `K'` under `jf` is a level of the restriction |
| 118 | calc algFormCoeff 1 t ψ (j (g * (1, k), 1, u)) |
| 119 | _ = algFormCoeff 1 t ψ (j (g, 1, u) * (1, jf k)) := by simp [← j_fin, ← map_mul] |
| 120 | _ = algFormCoeff 1 t ψ (j (g, 1, u)) := h_level (jf k) hk _ |
| 121 | |
| 122 | /-- Suppose every intertwiner from weight `(κ, e)` to weight `(κ₀, e₀)` is a multiple of `A` |
| 123 | (`SpansBranchingMaps`). Then so is a matrix `B` with `B ρ(diag(y, 1)) = ρ₀(y) B` for all `y` in the |
| 124 | archimedean group of the block. Here `ρ` and `ρ₀` are the representations `conjWeylMatrix` of |
| 125 | weights `(κ, e)` and `(κ₀, e₀)`, and `diag(y, 1)` is the archimedean part of |
| 126 | `G.blockEmb (one_comp_eq_one_elim_one σ)`. -/ |
| 127 | lemma exists_eq_smul_of_intertwines (σ : ι ⊕ Unit ≃ X) |
| 128 | {A B : Matrix (WeylIndex ι κ₀) (WeylIndex X κ) ℂ} |
| 129 | (hA : SpansBranchingMaps (fun _ : InfinitePlace E ↦ σ) e₀ e A) |
| 130 | (hB : ∀ y : GInf E (1 : ι → ℤˣ), |
| 131 | B * conjWeylMatrix κ e |
| 132 | (G.blockEmb (one_comp_eq_one_elim_one σ) |
| 133 | ((y, (1 : Gf E ι)), (1 : G E (1 : Unit → ℤˣ)))).1 = |
| 134 | conjWeylMatrix κ₀ e₀ y * B) : |
| 135 | ∃ C : ℂ, B = C • A := by |
| 136 | -- `conjWeylMatrix` acts through complex conjugation: apply `hB` to the conjugate `y` of `g`. |
| 137 | refine hA B fun g hg ↦ ?_ |
| 138 | let y : InfinitePlace E → USign (1 : ι → ℤˣ) := |
| 139 | fun τ ↦ ⟨(g τ).map (starRingEnd ℂ), map_conj_mem_uSign_one (hg τ)⟩ |
| 140 | let d : GInf E (1 : X → ℤˣ) := |
| 141 | (G.blockEmb (one_comp_eq_one_elim_one σ) ((y, (1 : Gf E ι)), (1 : G E (1 : Unit → ℤˣ)))).1 |
| 142 | -- The conjugate `x` of `d = diag(y, 1)` is `diag(g, 1)`, as the conjugate of `y` is `g`. |
| 143 | let x : InfinitePlace E → GL X ℂ := fun τ ↦ (d τ : GL X ℂ).map (starRingEnd ℂ) |
| 144 | have hx (τ : InfinitePlace E) : (x τ).val = |
| 145 | GL.blockScalar (fun _ : InfinitePlace E ↦ σ) (fun w ↦ (g w).val) 1 τ := by |
| 146 | rw [GeneralLinearGroup.val_map_apply, val_fst_blockEmb_one] |
| 147 | simp [GL.blockScalar, ← submatrix_map, fromBlocks_map, Function.comp_def, y] |
| 148 | have hy : (fun τ ↦ (y τ : GL ι ℂ).map (starRingEnd ℂ)) = g := by |
| 149 | ext |
| 150 | simp [y] |
| 151 | refine ⟨x, hx, ?_⟩ |
| 152 | calc B * weylRep κ e x |
| 153 | _ = conjWeylMatrix κ₀ e₀ y * B := hB y |
| 154 | _ = weylRep κ₀ e₀ g * B := by rw [conjWeylMatrix_eq_weylRep_map_conj, hy] |
| 155 | |
| 156 | -- Keeps definitional checks from unfolding the finite sums. |
| 157 | seal Finset.sum Finset.prod Finset.univ in |
| 158 | /-- Let `V` be standard, `diag = G.blockEmb hσ` the embedding of the product of the block and the |
| 159 | rank-one group, and `A` a matrix of which every intertwiner from weight `(κ, e)` to weight |
| 160 | `(κ₀, e₀)` is a multiple (`SpansBranchingMaps`). For a linear form `t` and a vector `c` there is |
| 161 | `C` such that, for algebraic forms `ψ`, finite points `u` of rank one, every level `K` (an open |
| 162 | subgroup of `stdLevel`) and automorphic `Φ(x, g) = L_g(ρ₀(x) c)`, the integral of |
| 163 | `Φ(h) ψ_t(diag(h, u))` over `Γ \ G` is `C / [stdLevel : K]` times the class integral at level `K` of |
| 164 | `g ↦ L_g(A ψ(diag(g, u)))`. Here `ρ₀ = conjWeylRep κ₀ e₀`, `ψ_t = algFormCoeff 1 t ψ` and |
| 165 | `[stdLevel : K] = stdLevelIndex K`. -/ |
| 166 | lemma integral_algFormCoeff_blockEmb {s : ι → ℤˣ} |
| 167 | (V : Space E ι s) [hV : V.IsStd] {σ : ι ⊕ Unit ≃ X} (hσ : (1 : X → ℤˣ) ∘ σ = s ⊕ᵥ 1) |
| 168 | {A : Matrix (WeylIndex ι κ₀) (WeylIndex X κ) ℂ} |
| 169 | (hA : SpansBranchingMaps (fun _ : InfinitePlace E ↦ σ) e₀ e A) |
| 170 | (t : (WeylIndex X κ → ℂ) →ₗ[ℂ] ℂ) (c : WeylIndex ι κ₀ → ℂ) : |
| 171 | ∃ C : ℂ, |
| 172 | ∀ (ψ : AlgForm X κ e) (Φ : G E s → ℂ) (u : Gf E Unit) |
| 173 | (L : Gf E ι → (WeylIndex ι κ₀ → ℂ) →ₗ[ℂ] ℂ) (K : Subgroup (Gf E ι)) [IsLevel K], |
| 174 | V.IsAutomorphic Φ → |
| 175 | (∀ (x : GInf E s) (g : Gf E ι), Φ (x, g) = L g (conjWeylRep κ₀ e₀ x c)) → |
| 176 | ∫ h : G E s, Φ h * algFormCoeff 1 t ψ (G.blockEmb hσ (h, 1, u)) ∂V.quotMeasure = |
| 177 | C / stdLevelIndex K * |
| 178 | classIntegral stdRatPoints K fun g : Gf E ι ↦ |
| 179 | L g (A *ᵥ ψ.val (G.blockEmb hσ ((1, g), 1, u)).2) := by |
| 180 | -- Averaging the rank-one map `t.smulRight c` over the archimedean group gives an intertwiner `B`, |
| 181 | -- and `B = C • A` by `hA`. The integral over `Γ \ G` is an archimedean integral, which |
| 182 | -- produces `B`, inside a class sum over the finite part. |
| 183 | -- A standard space has all signs `1` and the identity as its point. |
| 184 | induction hV |
| 185 | let j : G E (1 : ι → ℤˣ) × G E (1 : Unit → ℤˣ) →* G E (1 : X → ℤˣ) := G.blockEmb hσ |
| 186 | -- The archimedean group of the block acts on weight `(κ, e)` through `x ↦ diag(x, 1)`. |
| 187 | let R : GInf E (1 : ι → ℤˣ) →* Matrix (WeylIndex X κ) (WeylIndex X κ) ℂ := |
| 188 | (conjWeylMatrix κ e).comp |
| 189 | ((MonoidHom.fst _ _).comp (j.comp ((MonoidHom.inl _ _).prod 1))) |
| 190 | let M : Matrix (WeylIndex ι κ₀) (WeylIndex X κ) ℂ := (t.smulRight c).toMatrix' |
| 191 | have hR : Continuous R := (continuous_conjWeylMatrix κ e 1).comp |
| 192 | (by fun_prop : Continuous fun x : GInf E (1 : ι → ℤˣ) ↦ (j ((x, 1), 1)).1) |
| 193 | have hρ₀ : Continuous fun x : GInf E (1 : ι → ℤˣ) ↦ conjWeylMatrix κ₀ e₀ x := |
| 194 | continuous_conjWeylMatrix κ₀ e₀ 1 |
| 195 | -- The average `B` of `ρ₀(x) M R(x⁻¹)` intertwines `R` with `ρ₀`. |
| 196 | obtain ⟨B, hB_comm, hB_int⟩ := |
| 197 | exists_intertwining_mean volume (conjWeylMatrix κ₀ e₀) R M (by fun_prop) |
| 198 | obtain ⟨C, hC⟩ : ∃ C : ℂ, B = C • A := exists_eq_smul_of_intertwines σ hA hB_comm |
| 199 | refine ⟨C, fun ψ Φ u L K hK hΦ hΦ_eq ↦ ?_⟩ |
| 200 | -- The restriction `h ↦ ψ_t(diag(h, u))` is automorphic, so the integral over `Γ \ G` is the class |
| 201 | -- integral of the archimedean integrals, divided by the index `stdLevelIndex K`. |
| 202 | have h_prod : (stdSpace E ι).IsAutomorphic fun h ↦ Φ h * algFormCoeff 1 t ψ (j (h, 1, u)) := |
| 203 | hΦ.map₂ (isAutomorphic_algFormCoeff_blockEmb σ t ψ u) fun a b ↦ a * b |
| 204 | rw [integral_eq_classIntegral_of_isLevel h_prod hK, eq_comm, div_eq_inv_mul, mul_assoc, |
| 205 | ← classIntegral_const_mul] |
| 206 | congr with g |
| 207 | -- At each finite point `g`, the archimedean integral is `hB_int` for the linear form |
| 208 | -- `N ↦ L g (N *ᵥ v)`, with `v` the value of `ψ` at `diag(g, u)`. |
| 209 | let v : WeylIndex X κ → ℂ := ψ.val (j ((1, g), 1, u)).2 |
| 210 | have h_integrand (x : GInf E (1 : ι → ℤˣ)) : |
| 211 | L g ((conjWeylMatrix κ₀ e₀ x * M * R x⁻¹) *ᵥ v) = |
| 212 | Φ (x, g) * algFormCoeff 1 t ψ (j ((x, g), 1, u)) := by |
| 213 | -- The archimedean part of `diag((x, g), u)` is `diag(x, 1)`; its finite part is `diag(g, u)`. |
| 214 | have h_rank_one : M *ᵥ R x⁻¹ *ᵥ v = t (R x⁻¹ *ᵥ v) • c := LinearMap.toMatrix'_mulVec _ _ |
| 215 | rw [← mulVec_mulVec, ← mulVec_mulVec, h_rank_one, mulVec_smul, map_smul, smul_eq_mul, |
| 216 | hΦ_eq, mul_comm] |
| 217 | rfl |
| 218 | calc C * L g (A *ᵥ v) |
| 219 | _ = L g (B *ᵥ v) := by rw [hC, smul_mulVec, map_smul, smul_eq_mul] |
| 220 | _ = ∫ x, L g ((conjWeylMatrix κ₀ e₀ x * M * R x⁻¹) *ᵥ v) := |
| 221 | (hB_int (L g ∘ₗ toLin'.toLinearMap.flip v)).symm |
| 222 | _ = ∫ x, Φ (x, g) * algFormCoeff 1 t ψ (j ((x, g), 1, u)) := |
| 223 | integral_congr_ae (.of_forall h_integrand) |
| 224 | |
| 225 | end New.Seesaw |
| 226 | |
| 227 | end |