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.Basic.Complex.Basic |
| 4 | public import Mathlib.FieldTheory.IsAlgClosed.Basic |
| 5 | public import Mathlib.SetTheory.Cardinal.Basic |
| 6 | import Mathlib.Analysis.Complex.Cardinality |
| 7 | import Mathlib.Analysis.Complex.Polynomial.Basic |
| 8 | import Mathlib.FieldTheory.IsAlgClosed.Classification |
| 9 | import Mathlib.RingTheory.Localization.Cardinality |
| 10 | import Mathlib.Tactic.Algebraize |
| 11 | import TauCeti.Analysis.Complex.FieldEmbedding |
| 12 | public import Lib.Speed |
| 13 | |
| 14 | /-! |
| 15 | # Extending embeddings of countable rings into ℂ |
| 16 | |
| 17 | This file compares embeddings of a countable ring into `ℂ` and into other fields. Two embeddings, |
| 18 | into `ℂ` and into an algebraically closed field of the same cardinality, differ by an isomorphism |
| 19 | of the fields, and an embedding into `ℂ` extends along an embedding into a field of cardinality at |
| 20 | most that of `ℂ`. |
| 21 | |
| 22 | ## Main definitions and results |
| 23 | |
| 24 | * `New.exists_ringEquiv_extend`: two embeddings of a countable ring, into `ℂ` and into an |
| 25 | algebraically closed field of the same cardinality, are matched by an isomorphism of the fields |
| 26 | (Steinitz's classification, relative to the ring). |
| 27 | * `New.exists_ringHom_complex_extend` lets one view a point over a field of cardinality at most that |
| 28 | of ℂ as a complex point, compatibly with given embeddings of a countable base ring in the field |
| 29 | and in ℂ. |
| 30 | |
| 31 | ## Relation to the literature |
| 32 | |
| 33 | The isomorphisms of fields come from Steinitz's theorem. |
| 34 | -/ |
| 35 | |
| 36 | @[expose] public section |
| 37 | |
| 38 | /-! ## Steinitz's theorem relative to a countable ring -/ |
| 39 | |
| 40 | section ExtendEmbedding |
| 41 | |
| 42 | open Cardinal IsAlgClosed |
| 43 | |
| 44 | /-- Let `K` be a countable ring, `L` an algebraically closed field with the cardinality of `ℂ`, and |
| 45 | `f : K → ℂ`, `g : K → L` injective ring maps. Then some isomorphism `σ : ℂ ≃+* L` satisfies |
| 46 | `σ ∘ f = g`. |
| 47 | |
| 48 | A form of Steinitz's theorem (characteristic and cardinality determine an uncountable algebraically |
| 49 | closed field up to isomorphism), refined so that the isomorphism respects the given embeddings. -/ |
| 50 | lemma New.exists_ringEquiv_extend {L : Type} {K : Type*} [Field L] [IsAlgClosed L] [CommRing K] |
| 51 | [Countable K] (h_mk : #ℂ = #L) (f : K →+* ℂ) (g : K →+* L) |
| 52 | (hf : Function.Injective f) (hg : Function.Injective g) : |
| 53 | ∃ σ : ℂ ≃+* L, ∀ a : K, σ (f a) = g a := by |
| 54 | -- Use the two embeddings to regard the ambient fields as faithful `K`-algebras. |
| 55 | algebraize [f, g] |
| 56 | have : FaithfulSMul K ℂ := (faithfulSMul_iff_algebraMap_injective K ℂ).2 hf |
| 57 | have : FaithfulSMul K L := (faithfulSMul_iff_algebraMap_injective K L).2 hg |
| 58 | have := IsDomain.of_faithfulSMul K ℂ |
| 59 | have : Countable (FractionRing K) := mk_le_aleph0_iff.mp (by simp) |
| 60 | let := FractionRing.liftAlgebra K ℂ |
| 61 | let := FractionRing.liftAlgebra K L |
| 62 | obtain ⟨σ⟩ := TauCeti.Complex.nonempty_algEquiv (k := FractionRing K) (E := L) |
| 63 | (h_mk.symm.trans mk_complex) |
| 64 | exact ⟨σ.symm.toRingEquiv, (σ.symm.restrictScalars K).commutes⟩ |
| 65 | |
| 66 | end ExtendEmbedding |
| 67 | |
| 68 | /-! ## Extension of embeddings of a countable ring into ℂ -/ |
| 69 | |
| 70 | section ComplexExtension |
| 71 | |
| 72 | open Cardinal |
| 73 | |
| 74 | /-- Let `D` be a countable ring, `K` a field with `#K ≤ #ℂ`, and `f : D → K`, `φ : D → ℂ` |
| 75 | injective ring maps. Then `φ` extends along `f` to a ring map `ψ : K → ℂ`. -/ |
| 76 | lemma New.exists_ringHom_complex_extend {D : Type*} {K : Type} [CommRing D] [Countable D] [Field K] |
| 77 | {f : D →+* K} {φ : D →+* ℂ} (hf : Function.Injective f) (hφ : Function.Injective φ) |
| 78 | (h_le : #K ≤ #ℂ) : |
| 79 | ∃ ψ : K →+* ℂ, ψ.comp f = φ := by |
| 80 | -- Use the two embeddings to regard the ambient fields as faithful `D`-algebras. |
| 81 | algebraize [f, φ] |
| 82 | have : FaithfulSMul D K := (faithfulSMul_iff_algebraMap_injective D K).2 hf |
| 83 | have : FaithfulSMul D ℂ := (faithfulSMul_iff_algebraMap_injective D ℂ).2 hφ |
| 84 | have := IsDomain.of_faithfulSMul D K |
| 85 | have : Countable (FractionRing D) := mk_le_aleph0_iff.mp (by simp) |
| 86 | let := FractionRing.liftAlgebra D K |
| 87 | let := FractionRing.liftAlgebra D ℂ |
| 88 | obtain ⟨ψ⟩ := TauCeti.Complex.nonempty_algHom (k := FractionRing D) (E := K) |
| 89 | (h_le.trans_eq mk_complex) |
| 90 | exact ⟨ψ.toRingHom, RingHom.ext (ψ.restrictScalars D).commutes⟩ |
| 91 | |
| 92 | end ComplexExtension |