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.Speed |
| 4 | |
| 5 | /-! |
| 6 | # The index of a product of subgroups is the product of the indices |
| 7 | |
| 8 | One lemma of group theory, `New.Seesaw.index_pi_univ`: in a finite product of groups, the index of a |
| 9 | product of subgroups is the product of their indices (an infinite index is read as `0`). |
| 10 | |
| 11 | ## Relation to the literature |
| 12 | |
| 13 | Known result: the index of a product of subgroups in a finite product of groups is the product of |
| 14 | the indices. Mathlib's `Subgroup.index_pi` is the case where all the factors are the same group. |
| 15 | -/ |
| 16 | |
| 17 | @[expose] public section |
| 18 | |
| 19 | /-- In a finite product of groups `G i`, the index of the product `∏ i, H i` of subgroups |
| 20 | `H i ≤ G i` is the product of the indices of the `H i`. An infinite index is read as `0`. -/ |
| 21 | lemma New.Seesaw.index_pi_univ {I : Type*} {G : I → Type*} [Fintype I] [∀ i : I, Group (G i)] |
| 22 | (H : ∀ i : I, Subgroup (G i)) : |
| 23 | (Subgroup.pi Set.univ H).index = ∏ i : I, (H i).index := by |
| 24 | -- The cosets of a product subgroup are the tuples of cosets. |
| 25 | let cosets : (∀ i : I, G i ⧸ H i) ≃ (∀ i : I, G i) ⧸ Subgroup.pi Set.univ H := |
| 26 | (Setoid.piQuotientEquiv fun i : I ↦ QuotientGroup.leftRel (H i)).trans |
| 27 | (Quotient.congrRight fun x y ↦ by rw [QuotientGroup.leftRel_pi H]) |
| 28 | simp only [Subgroup.index_eq_card, ← Nat.card_congr cosets, Nat.card_pi] |