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 TauCeti.Topology.Algebra.Group.Units |
| 4 | public import TauCeti.Topology.Instances.Matrix |
| 5 | public import Lib.Weil.Periods.Equivariant |
| 6 | import Lib.Weil.Periods.BesselIntegral |
| 7 | |
| 8 | /-! |
| 9 | # Real and finite points of the Bessel group |
| 10 | |
| 11 | The Bessel group `R(𝔸)` splits as `R(F_∞) × R(𝔸_fin)`, and both factors are unimodular. A function |
| 12 | on `R(𝔸)` that is supported on one coset of a level in the finite variable, and depends there only |
| 13 | on the real variable, has an integral that reduces to `R(F_∞)`. |
| 14 | |
| 15 | Notions used in the statements: |
| 16 | * `G E ε = GInf E ε × Gf E ι` is the adelic unitary group `G(𝔸) = G_∞ × G_f`. |
| 17 | * `Y.besselGroup` is the Bessel (Fourier–Jacobi) subgroup `R(𝔸)` of the grading |
| 18 | `Y : Grading V N X s` of the space `V : Space E ι ε` over the CM field `E` (both defined in |
| 19 | earlier files); its real points `R(F_∞)` are `Y.besselReal`, and its finite points `R(𝔸_fin)` are |
| 20 | `Y.besselFin`. |
| 21 | * A level `K` (`IsLevel K`) is an open subgroup of `G_f` inside the standard compact subgroup. |
| 22 | -/ |
| 23 | |
| 24 | @[expose] public section |
| 25 | |
| 26 | open MeasureTheory Measure |
| 27 | |
| 28 | noncomputable section |
| 29 | |
| 30 | /-- If the product `μ × η` of two nonzero σ-finite measures on groups `A` and `B` is right |
| 31 | invariant, then both factors are right invariant. -/ |
| 32 | lemma New.isMulRightInvariant_of_prod {A B : Type*} [Group A] [MeasurableSpace A] [MeasurableMul A] |
| 33 | [Group B] [MeasurableSpace B] [MeasurableMul B] {μ : Measure A} {η : Measure B} |
| 34 | [SigmaFinite μ] [SigmaFinite η] [NeZero μ] [NeZero η] |
| 35 | (h_prod : (μ.prod η).IsMulRightInvariant) : |
| 36 | μ.IsMulRightInvariant ∧ η.IsMulRightInvariant := by |
| 37 | have h_map (a : A) (b : B) : |
| 38 | (μ.map (· * a)).prod (η.map (· * b)) = μ.prod η := |
| 39 | (map_prod_map μ η (measurable_mul_const a) (measurable_mul_const b)).trans |
| 40 | (h_prod.map_mul_right_eq_self (a, b)) |
| 41 | -- Test rectangles whose other factor has finite positive measure, and cancel that factor. |
| 42 | obtain ⟨U, -, -, hU_pos, hU_fin⟩ := μ.exists_subset_measure_lt_top MeasurableSet.univ |
| 43 | (measure_univ_pos.2 (NeZero.ne μ)) |
| 44 | obtain ⟨V, -, -, hV_pos, hV_fin⟩ := η.exists_subset_measure_lt_top MeasurableSet.univ |
| 45 | (measure_univ_pos.2 (NeZero.ne η)) |
| 46 | constructor |
| 47 | · refine ⟨fun a ↦ Measure.ext fun S _ ↦ ?_⟩ |
| 48 | refine (ENNReal.mul_left_inj hV_pos.ne' hV_fin.ne).1 ?_ |
| 49 | simpa only [mul_one, map_id', prod_prod] using |
| 50 | congrArg (fun ρ : Measure (A × B) ↦ ρ (S ×ˢ V)) (h_map a 1) |
| 51 | · refine ⟨fun b ↦ Measure.ext fun T _ ↦ ?_⟩ |
| 52 | refine (ENNReal.mul_right_inj hU_pos.ne' hU_fin.ne).1 ?_ |
| 53 | simpa only [mul_one, map_id', prod_prod] using |
| 54 | congrArg (fun ρ : Measure (A × B) ↦ ρ (U ×ˢ T)) (h_map 1 b) |
| 55 | |
| 56 | namespace New.Grading |
| 57 | |
| 58 | variable {E ι X : Type} [Field E] [CMType E] [Fintype ι] [DecidableEq ι] [DecidableEq X] |
| 59 | {s : ℕ} {ε : ι → ℤˣ} {N : E} {V : Space E ι ε} (Y : Grading V N X s) |
| 60 | |
| 61 | /-- A real point `x` lies in `R(F_∞)` if and only if `(x, 1)` lies in the Bessel group `R(𝔸)`. -/ |
| 62 | private lemma mem_besselReal_iff {x : GInf E ε} : |
| 63 | x ∈ Y.besselReal ↔ ((x, 1) : G E ε) ∈ Y.besselGroup := Iff.rfl |
| 64 | |
| 65 | /-- A finite point `t` lies in `R(𝔸_fin)` if and only if `(1, t)` lies in the Bessel group |
| 66 | `R(𝔸)`. -/ |
| 67 | private lemma mem_besselFin_iff {t : Gf E ι} : |
| 68 | t ∈ Y.besselFin ↔ ((1, t) : G E ε) ∈ Y.besselGroup := Iff.rfl |
| 69 | |
| 70 | /-- A real point `s` and a finite point `t` of the Bessel group `R(𝔸)` give the point `(s, t)` of |
| 71 | `R(𝔸)`. -/ |
| 72 | lemma mk_mem_besselGroup (z : Y.besselReal × Y.besselFin) : |
| 73 | (((z.1 : GInf E ε), (z.2 : Gf E ι)) : G E ε) ∈ Y.besselGroup := by |
| 74 | -- `(s, t) = (s, 1) (1, t)`, and both factors lie in the Bessel group. |
| 75 | simpa using mul_mem (Y.mem_besselReal_iff.mp z.1.prop) (Y.mem_besselFin_iff.mp z.2.prop) |
| 76 | |
| 77 | /-- The real component `r_∞` of a point `r` of the Bessel group `R(𝔸)` is a real point of the |
| 78 | Bessel group. -/ |
| 79 | lemma fst_mem_besselReal (r : Y.besselGroup) : (r : G E ε).1 ∈ Y.besselReal := by |
| 80 | -- `(r_∞, 1) = r (1, r_fin)⁻¹`, and `(1, r_fin)` lies in the Bessel group. |
| 81 | have h_fin : ((1 : GInf E ε), (r : G E ε).2) ∈ Y.besselGroup := |
| 82 | Y.mem_besselFin_iff.mp (Y.snd_mem_besselFin r.prop) |
| 83 | simpa [Y.mem_besselReal_iff, Prod.mul_def] using mul_mem r.prop (inv_mem h_fin) |
| 84 | |
| 85 | /-- The decomposition `R(𝔸) = R(F_∞) × R(𝔸_fin)`: the map `(s, t) ↦ (s, t)` from the real points |
| 86 | times the finite points of the Bessel group to the Bessel group, as an isomorphism of |
| 87 | topological groups. -/ |
| 88 | def besselProdEquiv : Y.besselReal × Y.besselFin ≃ₜ* Y.besselGroup where |
| 89 | toFun z := ⟨(z.1.val, z.2.val), Y.mk_mem_besselGroup z⟩ |
| 90 | invFun r := (⟨r.val.1, Y.fst_mem_besselReal r⟩, ⟨r.val.2, Y.snd_mem_besselFin r.property⟩) |
| 91 | map_mul' _ _ := rfl |
| 92 | continuous_toFun := by fun_prop |
| 93 | continuous_invFun := by fun_prop |
| 94 | |
| 95 | /-- There is a positive scalar `c` such that `Y.besselProdEquiv` is measure preserving from the |
| 96 | product Haar measure on `R(F_∞) × R(𝔸_fin)` to `c • haar` on `R(𝔸)`. -/ |
| 97 | lemma exists_measurePreserving_besselProdEquiv : |
| 98 | ∃ c : NNReal, 0 < c ∧ |
| 99 | MeasurePreserving Y.besselProdEquiv (haar.prod haar) (c • (haar : Measure Y.besselGroup)) := |
| 100 | have : (haar.prod haar : Measure (Y.besselReal × Y.besselFin)).IsHaarMeasure := |
| 101 | prod.instIsHaarMeasure haar haar |
| 102 | let ν : Measure Y.besselGroup := (haar.prod haar).map Y.besselProdEquiv |
| 103 | have : ν.IsHaarMeasure := Y.besselProdEquiv.isHaarMeasure_map _ |
| 104 | ⟨haarScalarFactor ν haar, haarScalarFactor_pos_of_isHaarMeasure ν haar, |
| 105 | Y.besselProdEquiv.continuous.measurable, isMulLeftInvariant_eq_smul ν haar⟩ |
| 106 | |
| 107 | /-- The group `R(F_∞)` of real points of the Bessel subgroup `R` is unimodular: its left Haar |
| 108 | measure is right invariant. -/ |
| 109 | theorem isMulRightInvariant_haar_besselReal [Fintype X] : |
| 110 | (haar : Measure Y.besselReal).IsMulRightInvariant := by |
| 111 | -- `R(𝔸)` is unimodular and `Y.besselProdEquiv` identifies `haar.prod haar` with `c • haar`. |
| 112 | obtain ⟨c, -, h_mp⟩ := Y.exists_measurePreserving_besselProdEquiv |
| 113 | -- Pulling `c • haar` back along the isomorphism gives the product measure. |
| 114 | have h_emb : MeasurableEmbedding Y.besselProdEquiv := |
| 115 | Y.besselProdEquiv.toHomeomorph.measurableEmbedding |
| 116 | have h_prod : (haar.prod haar : Measure (Y.besselReal × Y.besselFin)).IsMulRightInvariant := by |
| 117 | rw [← h_emb.comap_map (haar.prod haar), h_mp.map_eq] |
| 118 | exact IsMulRightInvariant.comap (c • haar) |
| 119 | (f := Y.besselProdEquiv.toMulEquiv.toMonoidHom) h_emb |
| 120 | exact (isMulRightInvariant_of_prod h_prod).1 |
| 121 | |
| 122 | /-- Let `K` be a level and `J = R(𝔸_fin) ∩ K`. There is a constant `c ≠ 0`, the volume of `J` |
| 123 | for compatible Haar measures, with this property. Let `t₀` be a point of `R(𝔸_fin)`, and let `f` |
| 124 | be integrable on `R(𝔸)`, vanish off `R(F_∞) × t₀ J` and equal `a s` at the points `(s, t)` of this |
| 125 | set. Then `a` is integrable on `R(F_∞)` and `∫_{R(𝔸)} f = c ∫_{R(F_∞)} a`. -/ |
| 126 | lemma exists_integral_eq_mul_integral_besselReal (K : Subgroup (Gf E ι)) [hK : IsLevel K] : |
| 127 | ∃ c : ℝ, c ≠ 0 ∧ ∀ (t₀ : Y.besselFin) {f : Y.besselGroup → ℂ} {a : Y.besselReal → ℂ}, |
| 128 | (∀ (s : Y.besselReal) (t : Y.besselFin), f (Y.besselProdEquiv (s, t₀ * t)) = |
| 129 | a s * (K : Set (Gf E ι)).indicator 1 (t : Gf E ι)) → |
| 130 | Integrable f haar → |
| 131 | Integrable a haar ∧ |
| 132 | ∫ r : Y.besselGroup, f r ∂haar = c * ∫ s : Y.besselReal, a s ∂haar := by |
| 133 | -- `besselProdEquiv` carries the product Haar measure to `c • haar`. |
| 134 | obtain ⟨c, hc_pos, h_mp⟩ := Y.exists_measurePreserving_besselProdEquiv |
| 135 | have h_emb : MeasurableEmbedding Y.besselProdEquiv := |
| 136 | Y.besselProdEquiv.toHomeomorph.measurableEmbedding |
| 137 | let J : Set Y.besselFin := Subtype.val ⁻¹' K |
| 138 | have hJ_open : IsOpen J := hK.isOpen.preimage continuous_subtypeVal |
| 139 | have hJ_compact : IsCompact J := |
| 140 | (IsClosed.isClosedEmbedding_subtypeVal inferInstance).isCompact_preimage hK.isCompact |
| 141 | have hJ_pos : haar J ≠ 0 := hJ_open.measure_ne_zero haar ⟨1, one_mem K⟩ |
| 142 | refine ⟨c⁻¹ * haar.real J, ?_, fun t₀ f a h_eq hf ↦ ?_⟩ |
| 143 | · simp [hc_pos.ne', Measure.real, ENNReal.toReal_eq_zero_iff, hJ_pos, hJ_compact.measure_ne_top] |
| 144 | -- Translate by `t₀`; in the coordinates `(s, t)` the function is a product. |
| 145 | let τ : Y.besselGroup := Y.besselProdEquiv (1, t₀) |
| 146 | have h_prod (p : Y.besselReal × Y.besselFin) : |
| 147 | f (τ * Y.besselProdEquiv p) = a p.1 * J.indicator 1 p.2 := by |
| 148 | rw [← map_mul, Prod.mk_mul_mk, one_mul, h_eq] |
| 149 | rfl |
| 150 | have h_int : Integrable (fun p : Y.besselReal × Y.besselFin ↦ a p.1 * J.indicator 1 p.2) |
| 151 | (haar.prod haar) := by |
| 152 | simpa only [Function.comp_def, h_prod] using |
| 153 | (h_mp.integrable_comp_emb h_emb).2 (hf.comp_mul_left τ).smul_measure_nnreal |
| 154 | obtain ⟨t, ht, h_slice⟩ := |
| 155 | exists_mem_of_measure_ne_zero_of_ae hJ_pos (ae_restrict_of_ae h_int.prod_left_ae) |
| 156 | refine ⟨by simpa [ht] using h_slice, ?_⟩ |
| 157 | calc ∫ r, f r ∂haar = ∫ r, f (τ * r) ∂haar := (integral_mul_left_eq_self f τ).symm |
| 158 | _ = (c⁻¹ : NNReal) * ∫ p : Y.besselReal × Y.besselFin, |
| 159 | a p.1 * J.indicator 1 p.2 ∂haar.prod haar := by |
| 160 | rw [← inv_smul_smul₀ hc_pos.ne' (haar : Measure _), integral_smul_nnreal_measure, |
| 161 | ← h_mp.integral_comp h_emb] |
| 162 | simp [h_prod, NNReal.smul_def, Complex.real_smul] |
| 163 | _ = ((c⁻¹ : NNReal) * haar.real J : ℝ) * ∫ s : Y.besselReal, a s ∂haar := by |
| 164 | simp [integral_prod_mul, integral_indicator hJ_open.measurableSet, Set.univ_inter, |
| 165 | mul_assoc, mul_comm] |
| 166 | |
| 167 | end New.Grading |
| 168 | |
| 169 | end |