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 Lib.Adelic.QuotientMeasure.Basic |
| 4 | import TauCeti.MeasureTheory.Group.Arithmetic |
| 5 | |
| 6 | /-! |
| 7 | # Moving a quotient from one variable to another |
| 8 | |
| 9 | Let `Λ → R` be a homomorphism from a countable group to a subgroup `R` of a group `G`, and let `F` |
| 10 | on `R × G` be invariant under the diagonal action of `Λ`. The integral of `F` over |
| 11 | `Λ \ (R × G)` may be computed as an integral over `R × (Λ \ G)` or over `(Λ \ R) × G` |
| 12 | (`New.integral_cutoff_swap`). |
| 13 | |
| 14 | Notions from other files: |
| 15 | * `New.orbitMeasure ν μ`: the measure `μ` weighted by a chosen cutoff; it computes integrals over |
| 16 | the quotient. |
| 17 | |
| 18 | ## Relation to the literature |
| 19 | |
| 20 | A consequence of a known result: the integral over a quotient does not depend on the cutoff. See |
| 21 | `Lib.Adelic.QuotientMeasure.Basic`. |
| 22 | -/ |
| 23 | |
| 24 | @[expose] public section |
| 25 | |
| 26 | open MeasureTheory Measure |
| 27 | |
| 28 | namespace New |
| 29 | |
| 30 | /-- Let `ν` be an inversion invariant measure on a group `H`, `μ` an `H`-invariant measure on `X` |
| 31 | and `β` a cutoff, that is, a measurable weight with `∫_H β (h • x) dν = 1` for every `x`. A |
| 32 | measurable `H`-invariant function `f` is integrable for the quotient measure `orbitMeasure ν μ` |
| 33 | (the measure `μ` weighted by a chosen cutoff) if and only if `β • f` is integrable for `μ`. -/ |
| 34 | lemma IsCutoff.integrable_orbitMeasure_iff {H X : Type*} [Group H] [MeasurableSpace H] |
| 35 | [MeasurableInv H] [MeasurableSpace X] [MulAction H X] [MeasurableSMul₂ H X] |
| 36 | {ν : Measure H} [SFinite ν] [ν.IsInvInvariant] |
| 37 | {μ : Measure X} [SFinite μ] [SMulInvariantMeasure H X μ] |
| 38 | {β : X → ENNReal} (hβ : IsCutoff ν β) {f : X → ℂ} |
| 39 | (h_inv : ∀ (h : H) (x : X), f (h • x) = f x) (hf : Measurable f) : |
| 40 | Integrable f (orbitMeasure ν μ) ↔ Integrable (fun x : X ↦ (β x).toReal • f x) μ := by |
| 41 | have hβ_meas : Measurable β := hβ.1 |
| 42 | rw [(identDistrib_orbitMeasure hβ hf h_inv).integrable_iff, |
| 43 | integrable_withDensity_iff_integrable_smul' hβ_meas hβ.ae_cutoff_lt_top] |
| 44 | |
| 45 | /-- **Moving the quotient from one variable to the other.** Let `R` be a subgroup of `G`, with left |
| 46 | invariant measures `ν` and `μ`, and let `i` be a homomorphism from a countable group `Λ` to `R`. |
| 47 | Let the translates under `Λ` of the measurable weight `β` on `G` add up to one, so that `β μ` and |
| 48 | `β ν` compute integrals over `Λ \ G` and `Λ \ R`. If `F` on `R × G` is measurable, invariant under |
| 49 | the diagonal action of `Λ` and integrable over `(Λ \ R) × G`, then |
| 50 | `∫_{Λ \ G} ∫_R F = ∫_{Λ \ R} ∫_G F`. -/ |
| 51 | theorem integral_cutoff_swap {G Λ : Type*} [Group G] [MeasurableSpace G] [MeasurableMul₂ G] |
| 52 | [Group Λ] [Countable Λ] {R : Subgroup G} |
| 53 | (μ : Measure G) [SFinite μ] [μ.IsMulLeftInvariant] |
| 54 | (ν : Measure R) [SFinite ν] [ν.IsMulLeftInvariant] (i : Λ →* R) {β : G → ENNReal} |
| 55 | (hβ : Measurable β) (hβ_one : ∀ x : G, ∑' l : Λ, β (i l * x) = 1) {F : R × G → ℂ} |
| 56 | (hF : Measurable F) (hF_inv : ∀ (l : Λ) (s : R) (x : G), F (i l * s, i l * x) = F (s, x)) |
| 57 | (h_int : Integrable (fun p : R × G ↦ (β p.1).toReal • F p) (ν.prod μ)) : |
| 58 | ∫ x : G, (β x).toReal • ∫ s : R, F (s, x) ∂ν ∂μ = |
| 59 | ∫ s : R, (β s).toReal • ∫ x : G, F (s, x) ∂μ ∂ν := by |
| 60 | -- Both `β s` and `β x` are cutoffs for the diagonal action of `Λ` on `R × G`, and the integral of |
| 61 | -- an invariant function does not depend on the cutoff. |
| 62 | let : MeasurableSpace Λ := ⊤ |
| 63 | let : MulAction Λ (R × G) := .compHom (R × G) i |
| 64 | have h_smul (l : Λ) (p : R × G) : l • p = (i l * p.1, i l * p.2) := rfl |
| 65 | have : MeasurableSMul₂ Λ (R × G) := |
| 66 | ⟨measurable_from_prod_countable_right fun l ↦ |
| 67 | (measurable_fst.const_mul (i l)).prodMk (measurable_snd.const_mul (i l : G))⟩ |
| 68 | have h_pres (l : Λ) : MeasurePreserving (fun p : R × G ↦ l • p) (ν.prod μ) (ν.prod μ) := |
| 69 | (measurePreserving_mul_left ν (i l)).prod (measurePreserving_mul_left μ (i l : G)) |
| 70 | have : SMulInvariantMeasure Λ (R × G) (ν.prod μ) := |
| 71 | ⟨fun l T hT ↦ (h_pres l).measure_preimage hT.nullMeasurableSet⟩ |
| 72 | have h_fst : IsCutoff (count : Measure Λ) fun p : R × G ↦ β p.1 := |
| 73 | ⟨by fun_prop, fun p ↦ by simpa [lintegral_count, h_smul] using hβ_one p.1⟩ |
| 74 | have h_snd : IsCutoff (count : Measure Λ) fun p : R × G ↦ β p.2 := |
| 75 | ⟨by fun_prop, fun p ↦ by simpa [lintegral_count, h_smul] using hβ_one p.2⟩ |
| 76 | have h_inv (l : Λ) (p : R × G) : F (l • p) = F p := hF_inv l p.1 p.2 |
| 77 | have h_int_snd : Integrable (fun p : R × G ↦ (β p.2).toReal • F p) (ν.prod μ) := by |
| 78 | rwa [← h_snd.integrable_orbitMeasure_iff h_inv hF, h_fst.integrable_orbitMeasure_iff h_inv hF] |
| 79 | calc ∫ x : G, (β x).toReal • ∫ s : R, F (s, x) ∂ν ∂μ |
| 80 | = ∫ p : R × G, (β p.2).toReal • F p ∂ν.prod μ := by |
| 81 | simp only [integral_prod_symm _ h_int_snd, integral_smul] |
| 82 | _ = ∫ p : R × G, (β p.1).toReal • F p ∂ν.prod μ := by |
| 83 | rw [← h_snd.integral_orbitMeasure h_inv hF, h_fst.integral_orbitMeasure h_inv hF] |
| 84 | _ = ∫ s : R, (β s).toReal • ∫ x : G, F (s, x) ∂μ ∂ν := by |
| 85 | simp only [integral_prod _ h_int, integral_smul] |
| 86 | |
| 87 | /-- If `a` is integrable on a subgroup `R` of `G` and `e` is integrable on `G` for a left invariant |
| 88 | measure, then `(s, x) ↦ a s * e (g * s⁻¹ * x)` is integrable on `R × G`. -/ |
| 89 | lemma integrable_mul_comp_inv_mul {G : Type*} [Group G] [MeasurableSpace G] [MeasurableMul₂ G] |
| 90 | [MeasurableInv G] {R : Subgroup G} {μ : Measure G} [SFinite μ] [μ.IsMulLeftInvariant] |
| 91 | {ν : Measure R} [SFinite ν] {a : R → ℂ} (ha : Integrable a ν) {e : G → ℂ} |
| 92 | (he : Integrable e μ) (g : G) : |
| 93 | Integrable (fun p : R × G ↦ a p.1 * e (g * (p.1 : G)⁻¹ * p.2)) (ν.prod μ) := by |
| 94 | -- The shear `(s, x) ↦ (s, g * s⁻¹ * x)` preserves the product measure. |
| 95 | have h_shear : MeasurePreserving (fun p : R × G ↦ (p.1, g * (p.1 : G)⁻¹ * p.2)) |
| 96 | (ν.prod μ) (ν.prod μ) := |
| 97 | (MeasurePreserving.id ν).skew_product (g := fun (s : R) (x : G) ↦ g * (s : G)⁻¹ * x) |
| 98 | (by fun_prop) (.of_forall fun s ↦ map_mul_left_eq_self μ (g * (s : G)⁻¹)) |
| 99 | exact h_shear.integrable_comp_of_integrable (ha.mul_prod he) |
| 100 | |
| 101 | end New |