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.Analysis.InnerProductSpace.ArrowTriangle |
| 4 | public import New.UpperBound.Objects.RowChain |
| 5 | |
| 6 | import TauCeti.LinearAlgebra.Matrix.GeneralLinearGroup.UpperTriangular.Block |
| 7 | |
| 8 | /-! |
| 9 | # Orders of block triangular groups and commutation along chains |
| 10 | |
| 11 | The group `New.parabolic (New.blockNumber j)` consists of the invertible block upper triangular |
| 12 | matrices whose diagonal blocks are one copy of `N` and `j` copies of `T`. Its order is |
| 13 | `#GL N R * (#GL T R) ^ j` times a power of `#R` whose exponent does not depend on the commutative |
| 14 | ring `R`. |
| 15 | |
| 16 | An abstract triangle of spaces `F i n` has arrows `a t i n : F i n → F i (n + 1)` along row `i` and |
| 17 | `d t i n : F i (n + 1) → F (i + 1) n` down to the next row. The map `j i` embeds `V` in `F i 0`. The |
| 18 | arrows depend on a parameter `t : I`. An abstract relation `M c f` between functions `c : I → ℂ` and |
| 19 | `f : I → ℝ`, unital and multiplicative, is read "`c` has modulus `f`". For nonzero weights, weighted |
| 20 | chains along a row are injective on `V`. If the constants of the squares have prescribed moduli |
| 21 | `L r k`, the squares obey an adjoint law and the Gram forms of the first arrows are given, then the |
| 22 | Gram form of a full chain and the modulus of its constant follow from Tau Ceti's arrow triangle |
| 23 | theorems, used directly in `ChainNorms` with group orders as real weights. In the application |
| 24 | `F i n` is attached to the interval `[i + 1, i + n]`, the arrow `a` adds the greatest element, |
| 25 | and `d` stands for the adjoint of the map that adds the least element. |
| 26 | |
| 27 | ## Main definitions and results |
| 28 | |
| 29 | * `New.exists_card_parabolic_blockNumber_eq`: the order of the group of block triangular matrices |
| 30 | `New.parabolic (New.blockNumber j)`. |
| 31 | |
| 32 | The triangle, weighted chain and Gram form theorems are in |
| 33 | `TauCeti.Analysis.InnerProductSpace.ArrowTriangle`. |
| 34 | |
| 35 | Notions from other files: |
| 36 | * `New.BlockIndex N T j`, `New.blockNumber j`: the disjoint union of `N` and `j` copies of `T`, and |
| 37 | the number of the block of an index (`0` on `N`, and `l` on the `l`-th copy of `T`). |
| 38 | * `New.compUpTo L j`: for linear maps `L i : M i → M (i + 1)`, the composite |
| 39 | `L (j - 1) ∘ ⋯ ∘ L 0 : M 0 → M j`. |
| 40 | -/ |
| 41 | |
| 42 | @[expose] public section |
| 43 | |
| 44 | /-! ## Order of a group of block triangular matrices -/ |
| 45 | |
| 46 | namespace New |
| 47 | |
| 48 | open Matrix Fintype |
| 49 | |
| 50 | variable {N T : Type} |
| 51 | |
| 52 | /-- Adding the last block leaves each earlier block unchanged as a type. -/ |
| 53 | private def blockFiberCastSucc {j : ℕ} (k : Fin (j + 1)) : |
| 54 | {a : BlockIndex N T (j + 1) // blockNumber (j + 1) a = k.castSucc} ≃ |
| 55 | {a : BlockIndex N T j // blockNumber j a = k} := by |
| 56 | letI : IsEmpty {t : T // blockNumber (R := N) (j + 1) (Sum.inr t) = k.castSucc} := |
| 57 | ⟨fun t ↦ Fin.ne_of_lt k.castSucc_lt_last (by simpa [blockNumber] using t.property.symm)⟩ |
| 58 | exact (Equiv.subtypeSum.trans (Equiv.sumEmpty _ _)).trans |
| 59 | (Equiv.subtypeEquivRight fun _ ↦ by simp [blockNumber]) |
| 60 | |
| 61 | /-- The last block is a copy of `T`. -/ |
| 62 | private def blockFiberLast (j : ℕ) : |
| 63 | {a : BlockIndex N T (j + 1) // blockNumber (j + 1) a = Fin.last (j + 1)} ≃ T := by |
| 64 | letI : IsEmpty {a : BlockIndex N T j // |
| 65 | blockNumber (T := T) (j + 1) (Sum.inl a) = Fin.last (j + 1)} := |
| 66 | ⟨fun a ↦ by |
| 67 | have ha := a.property |
| 68 | simp [blockNumber] at ha⟩ |
| 69 | exact (Equiv.subtypeSum.trans (Equiv.emptySum _ _)).trans |
| 70 | (Equiv.subtypeUnivEquiv fun _ ↦ by simp [blockNumber]) |
| 71 | |
| 72 | variable (N T) [Fintype N] [Fintype T] [DecidableEq T] [DecidableEq N] |
| 73 | |
| 74 | /-- The group `parabolic (blockNumber j)` of invertible block upper triangular matrices with one |
| 75 | diagonal block indexed by `N` and `j` diagonal blocks indexed by `T` has order |
| 76 | `#GL N R * (#GL T R) ^ j * #R ^ k`, with `k` independent of the commutative ring `R`. -/ |
| 77 | lemma exists_card_parabolic_blockNumber_eq.{u} (j : ℕ) : |
| 78 | ∃ k : ℕ, ∀ (R : Type u) [CommRing R], |
| 79 | Nat.card (parabolic (R := R) (blockNumber (R := N) (T := T) j)) = |
| 80 | Nat.card (GL N R) * Nat.card (GL T R) ^ j * Nat.card R ^ k := by |
| 81 | suffices h_blocks : ∀ (R : Type u) [CommRing R], |
| 82 | (∏ a : Fin (j + 1), Nat.card (GL {i : BlockIndex N T j // blockNumber j i = a} R)) = |
| 83 | Nat.card (GL N R) * Nat.card (GL T R) ^ j by |
| 84 | let b := blockNumber (R := N) (T := T) j |
| 85 | refine ⟨Nat.card {p : BlockIndex N T j × BlockIndex N T j // b p.1 < b p.2}, fun R _ ↦ ?_⟩ |
| 86 | have h_group : parabolic (R := R) b = TauCeti.blockTriangularGroup R b := by |
| 87 | ext g |
| 88 | exact TauCeti.mem_blockTriangularGroup_iff.symm |
| 89 | rw [h_group, TauCeti.natCard_blockTriangularGroup, h_blocks R] |
| 90 | intro R _ |
| 91 | induction j with |
| 92 | | zero => |
| 93 | rw [Fin.prod_univ_one, pow_zero, mul_one] |
| 94 | exact Nat.card_congr |
| 95 | (GeneralLinearGroup.reindex (R := R) (Equiv.subtypeUnivEquiv fun _ ↦ rfl)).toEquiv |
| 96 | | succ j ih => |
| 97 | rw [Fin.prod_univ_castSucc] |
| 98 | have h_prev (k : Fin (j + 1)) : |
| 99 | Nat.card (GL {a : BlockIndex N T (j + 1) // blockNumber (j + 1) a = k.castSucc} R) = |
| 100 | Nat.card (GL {a : BlockIndex N T j // blockNumber j a = k} R) := |
| 101 | Nat.card_congr (GeneralLinearGroup.reindex (R := R) (blockFiberCastSucc k)).toEquiv |
| 102 | have h_last : |
| 103 | Nat.card (GL {a : BlockIndex N T (j + 1) // blockNumber (j + 1) a = Fin.last (j + 1)} R) = |
| 104 | Nat.card (GL T R) := |
| 105 | Nat.card_congr (GeneralLinearGroup.reindex (R := R) (blockFiberLast (N := N) j)).toEquiv |
| 106 | simp only [h_prev, h_last, ih, pow_succ, mul_assoc] |
| 107 | |
| 108 | end New |
| 109 | |
| 110 | /-! ## Commutation along chains from square moduli -/ |
| 111 | |
| 112 | namespace New.Exchange |
| 113 | |
| 114 | open Finset TauCeti.ArrowTriangle |
| 115 | |
| 116 | variable {I : Type} {F : ℕ → ℕ → Type} [∀ i n, NormedAddCommGroup (F i n)] |
| 117 | [∀ i n, InnerProductSpace ℂ (F i n)] |
| 118 | {m : ℕ} {w : I → ℕ → ℝ} {M : (I → ℂ) → (I → ℝ) → Prop} |
| 119 | {L : ℕ → ℕ → I → ℝ} |
| 120 | {a : I → ∀ i n, F i n →ₗ[ℂ] F i (n + 1)} |
| 121 | {d : I → ∀ i n, F i (n + 1) →ₗ[ℂ] F (i + 1) n} |
| 122 | |
| 123 | /-- The weighted chain is the composite of the weighted arrows. -/ |
| 124 | lemma weightedChain_eq_compUpTo (t : I) (i n : ℕ) : |
| 125 | weightedChain w a t i n = compUpTo (fun k ↦ (w t k : ℂ) • a t i k) n := by |
| 126 | induction n with |
| 127 | | zero => ext y; simp [compUpTo_zero_apply] |
| 128 | | succ n ih => ext y; simp [compUpTo_succ_apply, ih] |
| 129 | |
| 130 | end New.Exchange |