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 Mathlib.Analysis.CStarAlgebra.Classes |
| 4 | import Mathlib.MeasureTheory.Function.LpSpace.DomAct.Continuous |
| 5 | public import Lib.Speed |
| 6 | |
| 7 | /-! |
| 8 | # Fubini and convolution lemmas; idempotent kernels |
| 9 | |
| 10 | General lemmas of measure and integration, and the notion of an idempotent kernel on a group. |
| 11 | |
| 12 | * `New.IsBoundedMeasurable`: a strongly measurable function whose norm is bounded by a constant. |
| 13 | * `MeasureTheory.MeasurePreserving.integral_integral_comp`: Fubini's theorem along a |
| 14 | measure-preserving map from a product; `MeasureTheory.MeasurePreserving.fubini` adds the |
| 15 | integrability on the product. |
| 16 | * `New.integral_skew_product`: integrability and Fubini's theorem after a substitution that |
| 17 | preserves the measure on the space where it acts. |
| 18 | * `New.integral_smul_integral_swap`, `New.integral_smul_integral_eq_integral_conv_smul`: the |
| 19 | integral `∫ x, k x • ∫ g, α g • F (j x * g)`, for `g` in a group, in the opposite order and as a |
| 20 | pairing with a convolution; `New.integral_conv` is the conjunction of the two. |
| 21 | * `MeasureTheory.Integrable.tendsto_integral_norm_mul_left_sub`: left translations converge to the |
| 22 | original integrable function in `L¹` as the translation tends to the identity. |
| 23 | * `New.IsIdempotentKernel`: a continuous integrable function `e` on a group with |
| 24 | `e g⁻¹ = conj (e g)`, `e 1 ≠ 0` and `∫ e z * e ((z * x)⁻¹ * y) dz = e x⁻¹ / e 1 * e y`; in |
| 25 | particular `e * e = e` (`New.IsIdempotentKernel.convolution_self`). |
| 26 | |
| 27 | ## Relation to the literature |
| 28 | |
| 29 | The results of this file are standard. The lemmas on iterated integrals and on convolution on a |
| 30 | group are forms of Fubini's theorem, and `New.sq_lintegral_le` is the Cauchy–Schwarz inequality for |
| 31 | lower integrals, deduced from Hölder's inequality. |
| 32 | -/ |
| 33 | |
| 34 | @[expose] public section |
| 35 | |
| 36 | open MeasureTheory ENNReal ComplexConjugate |
| 37 | |
| 38 | namespace New |
| 39 | |
| 40 | variable {Z W X : Type*} [MeasurableSpace Z] [MeasurableSpace W] |
| 41 | {μ : Measure Z} {ν : Measure W} [NormedAddCommGroup X] {F : Z → X} |
| 42 | |
| 43 | /-- The function `F : Z → X` is strongly measurable, and its norm is bounded by one constant on all |
| 44 | of `Z`. -/ |
| 45 | structure IsBoundedMeasurable (F : Z → X) where |
| 46 | /-- `F` is strongly measurable. -/ |
| 47 | stronglyMeasurable : StronglyMeasurable F |
| 48 | /-- The norm of `F` is bounded by a constant. -/ |
| 49 | bounded : ∃ C : ℝ, ∀ y : Z, ‖F y‖ ≤ C |
| 50 | |
| 51 | attribute [fun_prop] IsBoundedMeasurable.stronglyMeasurable |
| 52 | |
| 53 | /-- The extended nonnegative reals satisfy `1 ≠ ∞`, as a fact for instance search. -/ |
| 54 | instance : Fact ((1 : ℝ≥0∞) ≠ ∞) := ⟨one_ne_top⟩ |
| 55 | |
| 56 | /-- A continuous function with bounded norm on a second countable Borel space is bounded and |
| 57 | strongly measurable. -/ |
| 58 | lemma IsBoundedMeasurable.of_continuous [TopologicalSpace Z] [BorelSpace Z] |
| 59 | [SecondCountableTopology Z] |
| 60 | (h_bound : ∃ C : ℝ, ∀ y : Z, ‖F y‖ ≤ C) (h_cont : Continuous F := by fun_prop) : |
| 61 | IsBoundedMeasurable F := ⟨h_cont.stronglyMeasurable, h_bound⟩ |
| 62 | |
| 63 | /-- The composition of a bounded strongly measurable function with a measurable map is bounded and |
| 64 | strongly measurable. -/ |
| 65 | lemma IsBoundedMeasurable.comp (hF : IsBoundedMeasurable F) {j : W → Z} (hj : Measurable j) : |
| 66 | IsBoundedMeasurable fun w : W ↦ F (j w) where |
| 67 | stronglyMeasurable := hF.stronglyMeasurable.comp_measurable hj |
| 68 | bounded := hF.bounded.imp fun _C hC w ↦ hC (j w) |
| 69 | |
| 70 | /-- A bounded strongly measurable function lies in `L^∞` for every measure. -/ |
| 71 | lemma IsBoundedMeasurable.memLp_top (hF : IsBoundedMeasurable F) : MemLp F ∞ μ := |
| 72 | let ⟨C, hC⟩ := hF.bounded |
| 73 | memLp_top_of_bound hF.stronglyMeasurable.aestronglyMeasurable C (.of_forall hC) |
| 74 | |
| 75 | /-- If `F` is strongly measurable and bounded, `c` is `ν`-integrable and `j` is measurable, then |
| 76 | `a ↦ c a * F (j a)` is `ν`-integrable. -/ |
| 77 | lemma IsBoundedMeasurable.integrable_mul_comp {𝕜 : Type*} [NormedRing 𝕜] |
| 78 | {F : Z → 𝕜} (hF : IsBoundedMeasurable F) {c : W → 𝕜} |
| 79 | (hc : Integrable c ν) (j : W → Z) (hj : Measurable j := by fun_prop) : |
| 80 | Integrable (fun a : W ↦ c a * F (j a)) ν := |
| 81 | hc.mul_of_top_left (hF.comp hj).memLp_top |
| 82 | |
| 83 | /-- Cauchy–Schwarz inequality for lower integrals of functions with values in `[0, ∞]`: if `f`, |
| 84 | `g` are almost everywhere measurable and `h² ≤ f g` pointwise, then `(∫ h)² ≤ ∫ f * ∫ g`. -/ |
| 85 | lemma sq_lintegral_le {f g h : Z → ℝ≥0∞} (hf : AEMeasurable f μ) (hg : AEMeasurable g μ) |
| 86 | (h_sq : ∀ x : Z, h x ^ 2 ≤ f x * g x) : |
| 87 | lintegral μ h ^ 2 ≤ lintegral μ f * lintegral μ g := by |
| 88 | -- Hölder's inequality with exponents `1/2 + 1/2 = 1`, applied to `h ≤ f ^ (1/2) * g ^ (1/2)`. |
| 89 | have h_sq_iff (a b c : ℝ≥0∞) : a ^ 2 ≤ b * c ↔ a ≤ b ^ (2 : ℝ)⁻¹ * c ^ (2 : ℝ)⁻¹ := by |
| 90 | simp [← mul_rpow_of_nonneg, le_rpow_inv_iff] |
| 91 | rw [h_sq_iff] |
| 92 | calc lintegral μ h ≤ ∫⁻ x : Z, f x ^ (2 : ℝ)⁻¹ * g x ^ (2 : ℝ)⁻¹ ∂μ := |
| 93 | lintegral_mono fun x : Z ↦ (h_sq_iff (h x) (f x) (g x)).mp (h_sq x) |
| 94 | _ ≤ lintegral μ f ^ (2 : ℝ)⁻¹ * lintegral μ g ^ (2 : ℝ)⁻¹ := |
| 95 | lintegral_mul_norm_pow_le hf hg (by simp) (by simp) (by norm_num) |
| 96 | |
| 97 | variable [SFinite μ] [SFinite ν] |
| 98 | |
| 99 | /-- Fubini's theorem along a map `T` carrying `ν × μ` (both s-finite) to `ρ`: for a `ρ`-integrable |
| 100 | `f`, one has `∫∫ f (T (k, g)) dμ(g) dν(k) = ∫ f dρ`. -/ |
| 101 | lemma _root_.MeasureTheory.MeasurePreserving.integral_integral_comp {Y : Type*} |
| 102 | [MeasurableSpace Y] [NormedSpace ℝ X] {ρ : Measure Y} {T : W × Z → Y} {f : Y → X} |
| 103 | (hT : MeasurePreserving T (ν.prod μ) ρ) (hf : Integrable f ρ) : |
| 104 | ∫ k : W, ∫ g : Z, f (T (k, g)) ∂μ ∂ν = ∫ y : Y, f y ∂ρ := |
| 105 | calc ∫ k : W, ∫ g : Z, f (T (k, g)) ∂μ ∂ν = ∫ z : W × Z, f (T z) ∂(ν.prod μ) := |
| 106 | (integral_prod (f ∘ T) (hT.integrable_comp_of_integrable hf)).symm |
| 107 | _ = ∫ y : Y, f y ∂ρ := by |
| 108 | rw [← hT.map_eq, integral_map hT.measurable.aemeasurable] |
| 109 | simpa only [hT.map_eq] using hf.aestronglyMeasurable |
| 110 | |
| 111 | /-- Fubini's theorem along a map `T` carrying `ν × μ` (both s-finite) to `ρ`: for a `ρ`-integrable |
| 112 | `f`, the function `f ∘ T` is integrable and `∫∫ f (T (k, g)) dμ(g) dν(k) = ∫ f dρ`. -/ |
| 113 | lemma _root_.MeasureTheory.MeasurePreserving.fubini {Y : Type*} [MeasurableSpace Y] |
| 114 | [NormedSpace ℝ X] {ρ : Measure Y} {T : W × Z → Y} {f : Y → X} |
| 115 | (hT : MeasurePreserving T (ν.prod μ) ρ) (hf : Integrable f ρ) : |
| 116 | Integrable (f ∘ T) (ν.prod μ) ∧ |
| 117 | ∫ k : W, ∫ g : Z, f (T (k, g)) ∂μ ∂ν = integral ρ f := |
| 118 | ⟨hT.integrable_comp_of_integrable hf, hT.integral_integral_comp hf⟩ |
| 119 | |
| 120 | /-- Let `μ`, `ν` be s-finite, `T` jointly measurable with each `T k` preserving `μ`, and `f` |
| 121 | integrable for `ν × μ`. Then `g ↦ ∫ f (k, T k g) dν(k)` is `μ`-integrable, and its integral is |
| 122 | `∫∫ f (k, g) dμ(g) dν(k)`. -/ |
| 123 | lemma integral_skew_product [NormedSpace ℝ X] {T : W → Z → Z} (hT_map : ∀ k : W, μ.map (T k) = μ) |
| 124 | {f : W × Z → X} (hf : Integrable f (ν.prod μ)) (hT : Measurable T.uncurry := by fun_prop) : |
| 125 | Integrable (fun g : Z ↦ ∫ k : W, f (k, T k g) ∂ν) μ ∧ |
| 126 | ∫ g : Z, ∫ k : W, f (k, T k g) ∂ν ∂μ = ∫ k : W, ∫ g : Z, f (k, g) ∂μ ∂ν := by |
| 127 | have h_preserving : |
| 128 | MeasurePreserving (fun p : W × Z ↦ (p.1, T p.1 p.2)) (ν.prod μ) (ν.prod μ) := |
| 129 | (MeasurePreserving.id ν).skew_product hT (.of_forall hT_map) |
| 130 | obtain ⟨h_int, h_integral⟩ := h_preserving.fubini hf |
| 131 | refine ⟨h_int.integral_prod_right, ?_⟩ |
| 132 | calc ∫ g : Z, ∫ k : W, f (k, T k g) ∂ν ∂μ = ∫ k : W, ∫ g : Z, f (k, T k g) ∂μ ∂ν := |
| 133 | integral_integral_swap h_int.swap |
| 134 | _ = ∫ p : W × Z, f p ∂(ν.prod μ) := h_integral |
| 135 | _ = ∫ k : W, ∫ g : Z, f (k, g) ∂μ ∂ν := integral_prod f hf |
| 136 | |
| 137 | /-- Let `μ`, `ν` be s-finite, `T` jointly measurable with each `T k` preserving `μ`, and `f` |
| 138 | integrable for `ν × μ`. Then `∫∫ f (k, T k g) dν(k) dμ(g) = ∫∫ f (k, g) dμ(g) dν(k)`. -/ |
| 139 | lemma integral_integral_skew_product [NormedSpace ℝ X] {T : W → Z → Z} |
| 140 | (hT_map : ∀ k : W, μ.map (T k) = μ) {f : W × Z → X} (hf : Integrable f (ν.prod μ)) |
| 141 | (hT : Measurable T.uncurry := by fun_prop) : |
| 142 | ∫ g : Z, ∫ k : W, f (k, T k g) ∂ν ∂μ = ∫ k : W, ∫ g : Z, f (k, g) ∂μ ∂ν := |
| 143 | (integral_skew_product hT_map hf hT).2 |
| 144 | |
| 145 | omit [SFinite μ] [SFinite ν] in |
| 146 | /-- For integrable `k` and `α`, strongly measurable bounded `F` and measurable `j : W → Z` into a |
| 147 | type with measurable multiplication, the function `(x, g) ↦ (k x * α g) • F (j x * g)` is |
| 148 | integrable on the product. -/ |
| 149 | lemma integrable_mul_smul_comp_mul {𝕜 : Type*} [NormedRing 𝕜] [Mul Z] [MeasurableMul₂ Z] |
| 150 | [Module 𝕜 X] [IsBoundedSMul 𝕜 X] (j : W → Z) |
| 151 | {k : W → 𝕜} {α : Z → 𝕜} (hk : Integrable k ν) (hα : Integrable α μ) |
| 152 | (hF : IsBoundedMeasurable F) (hj : Measurable j := by fun_prop) : |
| 153 | Integrable (fun z : W × Z ↦ (k z.1 * α z.2) • F (j z.1 * z.2)) (ν.prod μ) := |
| 154 | have h_meas : Measurable fun z : W × Z ↦ j z.1 * z.2 := by fun_prop |
| 155 | (hk.mul_prod hα).smul_of_top_left (hF.comp h_meas).memLp_top |
| 156 | |
| 157 | /-- For integrable `k` and `α`, strongly measurable bounded `F` and measurable `j : W → Z` into a |
| 158 | type with measurable multiplication, the iterated integral of `k x • α g • F (j x * g)` does not |
| 159 | depend on the order of integration. The scalar field can be `ℝ` or `ℂ`. -/ |
| 160 | lemma integral_smul_integral_swap {𝕜 : Type*} [RCLike 𝕜] [Mul Z] [MeasurableMul₂ Z] |
| 161 | [NormedSpace ℝ X] [NormedSpace 𝕜 X] [IsScalarTower ℝ 𝕜 X] |
| 162 | (j : W → Z) {k : W → 𝕜} {α : Z → 𝕜} (hk : Integrable k ν) |
| 163 | (hα : Integrable α μ) (hF : IsBoundedMeasurable F) (hj : Measurable j := by fun_prop) : |
| 164 | ∫ x : W, k x • ∫ g : Z, α g • F (j x * g) ∂μ ∂ν = |
| 165 | ∫ g : Z, α g • ∫ x : W, k x • F (j x * g) ∂ν ∂μ := by |
| 166 | have h_swap : ∫ x : W, ∫ g : Z, (k x * α g) • F (j x * g) ∂μ ∂ν = |
| 167 | ∫ g : Z, ∫ x : W, (k x * α g) • F (j x * g) ∂ν ∂μ := |
| 168 | integral_integral_swap (integrable_mul_smul_comp_mul j hk hα hF hj) |
| 169 | -- Move the scalar factors under the inner integrals. |
| 170 | simpa [← integral_smul, smul_smul, mul_comm] using h_swap |
| 171 | |
| 172 | /-- Let `μ` be left invariant on the group `Z`, `j : W → Z` measurable, `k` and `α` integrable and |
| 173 | `F` strongly measurable and bounded. Then `∫ k(x) ∫ α(g) F(j(x) g) dμ(g) dν(x)` equals |
| 174 | `∫ β(g) F(g) dμ(g)`, where `β(g) = ∫ k(x) α(j(x)⁻¹ g) dν(x)` is the convolution of `k`, carried |
| 175 | along `j`, and `α`. -/ |
| 176 | lemma integral_smul_integral_eq_integral_conv_smul {𝕜 : Type*} [RCLike 𝕜] [Group Z] |
| 177 | [MeasurableMul₂ Z] [MeasurableInv Z] [μ.IsMulLeftInvariant] [NormedSpace ℝ X] |
| 178 | [NormedSpace 𝕜 X] [IsScalarTower ℝ 𝕜 X] [CompleteSpace X] (j : W → Z) |
| 179 | {k : W → 𝕜} {α : Z → 𝕜} (hk : Integrable k ν) (hα : Integrable α μ) |
| 180 | (hF : IsBoundedMeasurable F) (hj : Measurable j := by fun_prop) : |
| 181 | ∫ x : W, k x • ∫ g : Z, α g • F (j x * g) ∂μ ∂ν = |
| 182 | ∫ g : Z, (∫ x : W, k x * α ((j x)⁻¹ * g) ∂ν) • F g ∂μ := by |
| 183 | -- Fubini's theorem after the substitution `g ↦ (j x)⁻¹ * g`, which preserves `μ`. |
| 184 | have h_skew : |
| 185 | ∫ g : Z, ∫ x : W, (k x * α ((j x)⁻¹ * g)) • F (j x * ((j x)⁻¹ * g)) ∂ν ∂μ = |
| 186 | ∫ x : W, ∫ g : Z, (k x * α g) • F (j x * g) ∂μ ∂ν := |
| 187 | integral_integral_skew_product (fun x : W ↦ map_mul_left_eq_self μ (j x)⁻¹) |
| 188 | (integrable_mul_smul_comp_mul j hk hα hF hj) |
| 189 | simpa [← integral_smul, ← integral_smul_const, smul_smul] using h_skew.symm |
| 190 | |
| 191 | /-- For left invariant `μ`, the double integral `∫ k(x) ∫ α(g) F(j(x) g) dμ(g) dν(x)` equals both |
| 192 | the integral in the opposite order and the integral of `F` against the convolution of `k`, carried |
| 193 | along `j`, and `α`. -/ |
| 194 | lemma integral_conv {𝕜 : Type*} [RCLike 𝕜] [Group Z] [MeasurableMul₂ Z] [MeasurableInv Z] |
| 195 | [μ.IsMulLeftInvariant] [NormedSpace ℝ X] [NormedSpace 𝕜 X] [IsScalarTower ℝ 𝕜 X] |
| 196 | [CompleteSpace X] (j : W → Z) {k : W → 𝕜} {α : Z → 𝕜} (hk : Integrable k ν) |
| 197 | (hα : Integrable α μ) (hF : IsBoundedMeasurable F) (hj : Measurable j := by fun_prop) : |
| 198 | ∫ x : W, k x • ∫ g : Z, α g • F (j x * g) ∂μ ∂ν = |
| 199 | ∫ g : Z, α g • ∫ x : W, k x • F (j x * g) ∂ν ∂μ ∧ |
| 200 | ∫ x : W, k x • ∫ g : Z, α g • F (j x * g) ∂μ ∂ν = |
| 201 | ∫ g : Z, (∫ x : W, k x * α ((j x)⁻¹ * g) ∂ν) • F g ∂μ := |
| 202 | ⟨integral_smul_integral_swap j hk hα hF hj, |
| 203 | integral_smul_integral_eq_integral_conv_smul j hk hα hF hj⟩ |
| 204 | |
| 205 | open scoped Topology in |
| 206 | /-- Left translates of an integrable function converge in L¹ as the translating element tends to |
| 207 | the identity. -/ |
| 208 | lemma _root_.MeasureTheory.Integrable.tendsto_integral_norm_mul_left_sub |
| 209 | {G V : Type*} [Group G] [TopologicalSpace G] [IsTopologicalGroup G] [MeasurableSpace G] |
| 210 | [BorelSpace G] [NormedAddCommGroup V] {μ : Measure G} |
| 211 | [μ.IsMulLeftInvariant] [IsLocallyFiniteMeasure μ] [μ.InnerRegularCompactLTTop] |
| 212 | {f : G → V} (hf : Integrable f μ) : |
| 213 | Filter.Tendsto (fun u : G ↦ ∫ x : G, ‖f (u⁻¹ * x) - f x‖ ∂μ) (𝓝 1) (𝓝 0) := by |
| 214 | have : SMulInvariantMeasure G G μ := Measure.IsMulLeftInvariant.smulInvariantMeasure |
| 215 | let T (u : G) : Lp V 1 μ := DomMulAct.mk u⁻¹ • hf.toL1 |
| 216 | have h_cont : Continuous T := |
| 217 | (DomMulAct.continuous_mk.comp continuous_inv).smul continuous_const |
| 218 | have h_norm (u : G) : ‖T u - T 1‖ = ∫ x : G, ‖f (u⁻¹ * x) - f (1⁻¹ * x)‖ ∂μ := |
| 219 | L1.norm_of_fun_eq_integral_norm ((hf.comp_mul_left u⁻¹).sub (hf.comp_mul_left 1⁻¹)) |
| 220 | simpa only [h_norm, inv_one, one_mul] using tendsto_iff_norm_sub_tendsto_zero.1 (h_cont.tendsto 1) |
| 221 | |
| 222 | variable {G : Type*} [Group G] [TopologicalSpace G] [MeasureSpace G] {e : G → ℂ} |
| 223 | |
| 224 | /-- The function `e` is a continuous integrable idempotent kernel on the group `G`: `e g⁻¹` is the |
| 225 | conjugate of `e g`, `e 1 ≠ 0`, and `∫ e z * e (x⁻¹ z⁻¹ y) dz = e x⁻¹ * e y / e 1`, the integral |
| 226 | being against `volume` on `G`. -/ |
| 227 | structure IsIdempotentKernel (e : G → ℂ) where |
| 228 | /-- `e` is continuous. -/ |
| 229 | continuous : Continuous e |
| 230 | /-- `e` is integrable. -/ |
| 231 | integrable : Integrable e |
| 232 | /-- The value of `e` at `g⁻¹` is the complex conjugate of its value at `g`. -/ |
| 233 | apply_inv (g : G) : e g⁻¹ = conj (e g) |
| 234 | /-- `e` does not vanish at the identity. -/ |
| 235 | apply_one_ne_zero : e 1 ≠ 0 |
| 236 | /-- With `δ_x` the point mass at `x`, the convolution `e * δ_x * e` is `e x⁻¹ / e 1` times `e`. -/ |
| 237 | convolution_eq (x y : G) : ∫ z : G, e z * e ((z * x)⁻¹ * y) = e x⁻¹ / e 1 * e y |
| 238 | |
| 239 | /-- Let `e : G → ℂ` be an idempotent kernel on the group `G` (`IsIdempotentKernel`): it is |
| 240 | continuous and integrable for `volume`, `e g⁻¹` is the conjugate of `e g`, `e 1 ≠ 0`, and |
| 241 | `∫ e z * e ((z * x)⁻¹ * y) dz = e x⁻¹ * e y / e 1` for all `x`, `y`. Then for every `y`, |
| 242 | `∫ e z * e (z⁻¹ * y) dz = e y`, that is `e * e = e`; this is the defining identity at `x = 1`. -/ |
| 243 | lemma IsIdempotentKernel.convolution_self (h : IsIdempotentKernel e) (y : G) : |
| 244 | ∫ z : G, e z * e (z⁻¹ * y) = e y := by |
| 245 | simpa [h.apply_one_ne_zero] using h.convolution_eq 1 y |
| 246 | |
| 247 | end New |