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.Analysis.Matrix.Accretive |
| 4 | import TauCeti.Analysis.SpecialFunctions.Gaussian.Accretive |
| 5 | import TauCeti.Analysis.Matrix.L2OpNorm |
| 6 | public import Mathlib.Analysis.CStarAlgebra.Matrix |
| 7 | import Mathlib.Algebra.Algebra.Field |
| 8 | import Mathlib.Algebra.Module.StablyFree.Basic |
| 9 | import Mathlib.Algebra.Ring.IsFormallyReal |
| 10 | import Mathlib.Analysis.Matrix.Order |
| 11 | import Mathlib.MeasureTheory.Integral.Pi |
| 12 | import Mathlib.RingTheory.Complex |
| 13 | import Mathlib.RingTheory.PiTensorProduct |
| 14 | import Mathlib.RingTheory.SimpleRing.Principal |
| 15 | import Mathlib.RingTheory.TotallySplit |
| 16 | import Mathlib.Topology.Separation.CompletelyRegular |
| 17 | public import Lib.Speed |
| 18 | import Lib.Base |
| 19 | |
| 20 | /-! |
| 21 | # Matrix norm estimates and the complex Gaussian integral |
| 22 | |
| 23 | This file proves estimates for complex matrices and computes the complex Gaussian integral on |
| 24 | `ι → ℂ`. Here `‖A‖` is the `ℓ²` operator norm. For accretive `A`, the integral of |
| 25 | `exp (-x* A (x - a))` against normalised Lebesgue measure is `(det A)⁻¹`. |
| 26 | The accretive matrix results and change of variables follow from Tau Ceti. Its Gaussian |
| 27 | integral against Lebesgue measure gives the normalised formula by rescaling. |
| 28 | |
| 29 | ## Main definitions and results |
| 30 | |
| 31 | * `New.l2_opNorm_le_of_apply`: for an `m × n` matrix the operator norm is at most `|m| |n|` times |
| 32 | a bound for the entries. |
| 33 | * `Matrix.IsAccretive`: the matrices `A` with `A + Aᴴ` positive definite. Positive definite matrices |
| 34 | are accretive (`Matrix.PosDef.isAccretive`), and accretive matrices have nonzero determinant |
| 35 | (`Matrix.IsAccretive.det_ne_zero`). |
| 36 | * `New.Fock.normalizedVolume`: Lebesgue measure divided by `π ^ card ι`, so that `exp (-|x|²)` has |
| 37 | integral `1`. |
| 38 | * `New.Fock.integral_gauss`: if `A` is accretive, the integral of `exp (-x* A (x - a))` is |
| 39 | `(det A)⁻¹`. |
| 40 | |
| 41 | ## Relation to the literature |
| 42 | |
| 43 | The complex Gaussian integral and the change-of-variables formulas are known results. |
| 44 | -/ |
| 45 | |
| 46 | @[expose] public section |
| 47 | |
| 48 | /-! ## Operator norm and matrix entries -/ |
| 49 | |
| 50 | namespace New |
| 51 | |
| 52 | open Matrix Norms.L2Operator ComplexOrder Fintype |
| 53 | |
| 54 | variable {m n : Type _} [Fintype m] [Fintype n] [DecidableEq n] {A : Matrix m n ℂ} |
| 55 | |
| 56 | lemma l2_opNorm_single [DecidableEq m] {i : m} {j : n} {c : ℂ} : ‖single i j c‖ = ‖c‖ := by |
| 57 | simp [← mul_self_inj, ← l2_opNorm_conjTranspose_mul_self, ← diagonal_single, Pi.norm_single] |
| 58 | |
| 59 | /-- If all entries of an `m × n` complex matrix `A` have norm at most `M`, then the `ℓ²` operator |
| 60 | norm of `A` is at most `|m| |n| M`. -/ |
| 61 | lemma l2_opNorm_le_of_apply {M : ℝ} (h_apply : ∀ (i : m) (j : n), ‖A i j‖ ≤ M) : |
| 62 | ‖A‖ ≤ card m * card n * M := by |
| 63 | classical |
| 64 | -- `A` is the sum of `card m * card n` matrices with one entry each. |
| 65 | grw [A.matrix_eq_sum_single, norm_sum_le, norm_sum_le, l2_opNorm_single.le, h_apply] |
| 66 | simp [field] |
| 67 | |
| 68 | end New |
| 69 | |
| 70 | /-! ## Accretive matrices, normalised measure on `ι → ℂ` and the complex Gaussian integral -/ |
| 71 | |
| 72 | section GaussianIntegral |
| 73 | |
| 74 | open MeasureTheory Matrix Complex Finset ComplexOrder MatrixOrder PiLp CStarAlgebra NNReal WithLp |
| 75 | |
| 76 | variable {ι : Type _} [Fintype ι] (x : ι → ℂ) {A : Matrix ι ι ℂ} |
| 77 | |
| 78 | /-- A complex square matrix `A` is (strictly) accretive if `A + Aᴴ` is positive definite. -/ |
| 79 | def Matrix.IsAccretive (A : Matrix ι ι ℂ) : Prop := (A + Aᴴ).PosDef |
| 80 | |
| 81 | omit [Fintype ι] in |
| 82 | lemma Matrix.PosDef.isAccretive (hA : A.PosDef) : A.IsAccretive := hA.add hA.conjTranspose |
| 83 | |
| 84 | lemma Matrix.IsAccretive.det_ne_zero [DecidableEq ι] |
| 85 | (hA : A.IsAccretive) : A.det ≠ 0 := |
| 86 | Matrix.IsStrictlyAccretive.det_ne_zero (Matrix.isStrictlyAccretive_iff_posDef.mpr hA) |
| 87 | |
| 88 | namespace New.Fock |
| 89 | |
| 90 | /-- Lebesgue measure on `ι → ℂ` divided by `π ^ card ι`. -/ |
| 91 | noncomputable def normalizedVolume (ι : Type*) [Fintype ι] : Measure (ι → ℂ) := |
| 92 | NNReal.pi⁻¹ ^ Fintype.card ι • volume |
| 93 | |
| 94 | instance : (normalizedVolume ι).IsAddHaarMeasure := .nnreal_smul _ (by simp [pi_ne_zero]) |
| 95 | |
| 96 | lemma star_dotProduct_self_eq_sum : star x ⬝ᵥ x = (∑ i : ι, ‖x i‖ ^ 2 : ℝ) := by |
| 97 | simp [dotProduct, conj_mul'] |
| 98 | |
| 99 | lemma star_dotProduct_self_eq_norm_sq : star x ⬝ᵥ x = (‖toLp 2 x‖ : ℂ) ^ 2 := by |
| 100 | rw [star_dotProduct_self_eq_sum, ← ofReal_pow, norm_sq_eq_of_L2] |
| 101 | |
| 102 | /-- The square of the sup norm of `x : ι → ℂ` is at most `x* x = ∑ |x i|²`. -/ |
| 103 | lemma norm_sq_le_re_star_dotProduct_self : ‖x‖ ^ 2 ≤ (star x ⬝ᵥ x).re := by |
| 104 | rw [star_dotProduct_self_eq_norm_sq, ← ofReal_pow, ofReal_re] |
| 105 | gcongr |
| 106 | exact (pi_norm_le_iff_of_nonneg (norm_nonneg _)).2 (PiLp.norm_apply_le (toLp 2 x)) |
| 107 | |
| 108 | /-- The complex Gaussian integral: if `A` is accretive (that is, `A + Aᴴ` is positive definite), |
| 109 | then `exp (-x* A (x - a))` has integral `(det A)⁻¹` for `normalizedVolume ι`, Lebesgue measure on |
| 110 | `ι → ℂ` divided by `π ^ card ι`. -/ |
| 111 | lemma integral_gauss [DecidableEq ι] (hA : A.IsAccretive) (a : ι → ℂ) : |
| 112 | ∫ x : ι → ℂ, exp (-(star x ⬝ᵥ A *ᵥ (x - a))) ∂normalizedVolume ι = A.det⁻¹ := by |
| 113 | have hA' := Matrix.isStrictlyAccretive_iff_posDef.mpr hA |
| 114 | simp [normalizedVolume, NNReal.smul_def, |
| 115 | TauCeti.integral_cexp_neg_star_dotProduct_mulVec hA' a, field] |
| 116 | |
| 117 | end New.Fock |
| 118 | |
| 119 | end GaussianIntegral |