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.Algebra.GroupWithZero.Units.Finite |
| 4 | public import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure |
| 5 | public import Mathlib.NumberTheory.MulChar.Basic |
| 6 | public import Mathlib.Basic.Complex.Basic |
| 7 | import Mathlib.Algebra.CharP.Lemmas |
| 8 | import Mathlib.Analysis.Complex.Polynomial.Basic |
| 9 | import Mathlib.RingTheory.Finiteness.Cardinality |
| 10 | import Mathlib.RingTheory.Ideal.GoingUp |
| 11 | import Mathlib.RingTheory.IntegralClosure.Algebra.Basic |
| 12 | import Mathlib.RingTheory.WittVector.Compare |
| 13 | import Mathlib.RingTheory.WittVector.Domain |
| 14 | import Mathlib.RingTheory.WittVector.Teichmuller |
| 15 | |
| 16 | /-! |
| 17 | # A faithful complex character over a finite field |
| 18 | |
| 19 | The Teichmüller lifts of the elements of the algebraic closure of a finite field are integral over |
| 20 | `ℤ`. Embedding the ring they generate into `ℂ` gives an injective multiplicative character. |
| 21 | Green's characters use a fixed choice of this character. |
| 22 | -/ |
| 23 | |
| 24 | @[expose] public section |
| 25 | |
| 26 | noncomputable section |
| 27 | |
| 28 | namespace New |
| 29 | |
| 30 | open Function |
| 31 | |
| 32 | variable (k : Type*) [Field k] [Finite k] |
| 33 | |
| 34 | /-- A chosen injective multiplicative character from the algebraic closure of `k` to `ℂ` |
| 35 | (arbitrary if there is none). For finite `k` one exists (`New.exists_injective_mulChar`), so the |
| 36 | chosen character is injective (the instance `New.faithfulChar_injective`). -/ |
| 37 | def faithfulChar : MulChar (AlgebraicClosure k) ℂ := |
| 38 | Classical.epsilon fun T : MulChar (AlgebraicClosure k) ℂ ↦ Injective T |
| 39 | |
| 40 | /-- The field K is algebraically closed and the multiplicative character T : K → ℂ is injective, |
| 41 | so it embeds K^× in ℂ^×. -/ |
| 42 | class IsFaithfulMulChar (K : Type*) [Field K] (T : outParam (MulChar K ℂ)) : |
| 43 | Prop extends IsAlgClosed K where |
| 44 | /-- The character T is injective. -/ |
| 45 | injective : Injective T |
| 46 | |
| 47 | open WittVector Algebra IsIntegral RingHom |
| 48 | |
| 49 | /-- The algebraic closure of a finite field has an injective multiplicative character to `ℂ`. -/ |
| 50 | theorem exists_injective_mulChar (k : Type*) [Field k] [Finite k] : |
| 51 | ∃ T : MulChar (AlgebraicClosure k) ℂ, Injective T := by |
| 52 | -- Teichmüller lifts are integral over `ℤ`, and the ring `R` of Witt vectors integral over |
| 53 | -- `ℤ` is a domain of characteristic zero, so it embeds in `ℂ`. |
| 54 | have : Fact (ringChar k).Prime := ⟨CharP.prime_ringChar k⟩ |
| 55 | have : CharZero (WittVector (ringChar k) (AlgebraicClosure k)) := |
| 56 | -- it contains the Witt vectors of the prime field, which are the `p`-adic integers |
| 57 | (charZero_iff (map_injective _ (ZMod.castHom_injective (AlgebraicClosure k)))).1 |
| 58 | (toPadicInt (ringChar k)).charZero |
| 59 | let R := integralClosure ℤ (WittVector (ringChar k) (AlgebraicClosure k)) |
| 60 | have h_int (x : AlgebraicClosure k) : teichmuller (ringChar k) x ∈ R := by |
| 61 | -- The lift of `x` satisfies `X^q - X`, where `q` is the size of the subfield generated by `x`. |
| 62 | let F := IntermediateField.adjoin k ({x} : Set (AlgebraicClosure k)) |
| 63 | have : Finite F := |
| 64 | Module.finite_iff_finite.1 (IntermediateField.adjoin.finiteDimensional (isIntegral x)) |
| 65 | let x' : F := ⟨x, IntermediateField.subset_adjoin k {x} (Set.mem_singleton x)⟩ |
| 66 | have h_pow : x ^ Nat.card F = x := by |
| 67 | simpa only [IntermediateField.coe_pow] using |
| 68 | congrArg (fun a : F ↦ (a : AlgebraicClosure k)) (TauCeti.pow_natCard x') |
| 69 | exact ⟨Polynomial.X ^ Nat.card F - Polynomial.X, |
| 70 | Polynomial.monic_X_pow_sub (by simp [Finite.one_lt_card]), by simp [← map_pow, h_pow]⟩ |
| 71 | let lift : MulChar (AlgebraicClosure k) R := |
| 72 | { (teichmuller (ringChar k)).codRestrict R h_int with |
| 73 | map_nonunit' := by simp [Subtype.ext_iff] } |
| 74 | let emb : R →ₐ[ℤ] ℂ := IsAlgClosed.lift |
| 75 | -- The kernel of `emb` is a prime of `R` lying over `(0)`, and `R` is integral over `ℤ`. |
| 76 | have h_emb : Injective emb := |
| 77 | (injective_iff_ker_eq_bot emb).2 (Ideal.eq_bot_of_liesOver_bot ℤ (Ideal.comap emb ⊥)) |
| 78 | refine ⟨lift.ringHomComp emb.toRingHom, fun x y h ↦ ?_⟩ |
| 79 | -- The coefficient `0` of the Teichmüller lift of `x` is `x`. |
| 80 | have h_lift : lift x = lift y := h_emb h |
| 81 | have h_coeff : (teichmuller (ringChar k) x).coeff 0 = (teichmuller (ringChar k) y).coeff 0 := |
| 82 | congrArg (fun w : R ↦ (w : WittVector (ringChar k) (AlgebraicClosure k)).coeff 0) h_lift |
| 83 | simpa only [teichmuller_coeff_zero] using h_coeff |
| 84 | |
| 85 | /-- For a finite field `k` the character `faithfulChar k`, chosen among the multiplicative |
| 86 | characters from the algebraic closure of `k` to `ℂ`, is injective, so it is faithful |
| 87 | (`IsFaithfulMulChar`). -/ |
| 88 | instance faithfulChar_injective {k : Type*} [Field k] [Finite k] : |
| 89 | IsFaithfulMulChar (AlgebraicClosure k) (faithfulChar k) where |
| 90 | injective := Classical.epsilon_spec (exists_injective_mulChar k) |
| 91 | |
| 92 | end New |