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.AbsoluteValue.Equivalence |
| 4 | public import Lib.Adelic.Adeles.Basic |
| 5 | public import Lib.ClassField.Places.GaloisDefs |
| 6 | import Lib.ClassField.Places.ValuationSubrings |
| 7 | |
| 8 | /-! |
| 9 | # Places as valuation subrings and as absolute values |
| 10 | |
| 11 | In this library a place of `Ω` is a valuation subring `A`. This file compares the notions built on |
| 12 | `A` with the same notions for an absolute value `w` on `Ω` whose closed unit ball is `A`, that is, |
| 13 | `x ∈ A ↔ w x ≤ 1`. If `w` restricts to the real or a `p`-adic absolute value on `ℚ`, an element of |
| 14 | `Γ` stabilises `A` exactly when it preserves `w`, so decomposition groups, Frobenius elements and |
| 15 | inertia groups can be read off from `w`. Over a number field `K`, `A` lies over the prime `v` of |
| 16 | `𝓞 K` exactly when the restriction of `w` to `K` is equivalent to the `v`-adic absolute value. |
| 17 | |
| 18 | ## Main results |
| 19 | |
| 20 | * `New.isEquiv_of_forall_le_one_iff`: two absolute values on a field with the same closed unit ball |
| 21 | are equivalent. |
| 22 | * `New.valuation_lt_one_iff_of_forall_mem_iff`: the maximal ideal of `A` is the open unit ball of |
| 23 | `w`. |
| 24 | * `New.mem_decompGroup_iff_of_forall_mem_iff`: `σ` stabilises `A` iff `w (σ • x) = w x` for all `x`. |
| 25 | * `New.isFrob_iff_of_forall_mem_iff`: Frobenius elements of `A` in terms of `w`. Applying |
| 26 | `mem_inertiaGroup_iff` gives the inertia-group condition from the case `q = 1`. |
| 27 | * `New.isPlaceOver_iff_isEquiv_adicAbv`: `A` lies over `v` iff `w.under K` is equivalent to the |
| 28 | `v`-adic absolute value `NumberField.HeightOneSpectrum.adicAbv K v`. |
| 29 | |
| 30 | Notions from other files: |
| 31 | * `Rat.AbsoluteValue.IsStandard` (Tau Ceti): an absolute value on `ℚ` is the real one or a `p`-adic |
| 32 | one. |
| 33 | * `AbsoluteValue.under` (Mathlib): the restriction of an absolute value to a subfield. |
| 34 | |
| 35 | ## Relation to the literature |
| 36 | |
| 37 | Known; see Neukirch, *Algebraic Number Theory*, Ch. II, §§3 and 9. |
| 38 | -/ |
| 39 | |
| 40 | @[expose] public section |
| 41 | |
| 42 | open NumberField NumberField.HeightOneSpectrum |
| 43 | |
| 44 | namespace New |
| 45 | |
| 46 | section Field |
| 47 | |
| 48 | variable {F : Type*} [Field F] {v w : AbsoluteValue F ℝ} |
| 49 | |
| 50 | /-- `w x < 1` says that `x` is zero or that `w x⁻¹ ≤ 1` fails. -/ |
| 51 | private lemma apply_lt_one_iff_or {x : F} : w x < 1 ↔ x = 0 ∨ ¬w x⁻¹ ≤ 1 := by |
| 52 | rcases eq_or_ne x 0 with rfl | hx |
| 53 | · simp |
| 54 | · rw [map_inv₀, inv_le_one₀ (w.pos hx)] |
| 55 | simp [hx] |
| 56 | |
| 57 | /-- Two absolute values on a field with the same closed unit ball are equivalent. -/ |
| 58 | theorem isEquiv_of_forall_le_one_iff (h : ∀ x, v x ≤ 1 ↔ w x ≤ 1) : v.IsEquiv w := |
| 59 | AbsoluteValue.isEquiv_iff_lt_one_iff.mpr fun _ ↦ by simp only [apply_lt_one_iff_or, h] |
| 60 | |
| 61 | end Field |
| 62 | |
| 63 | variable {Ω Γ : Type*} [Field Ω] [Group Γ] [MulSemiringAction Γ Ω] {A : ValuationSubring Ω} |
| 64 | {w : AbsoluteValue Ω ℝ} |
| 65 | |
| 66 | /-- If `A` is the closed unit ball of `w`, then `A.valuation x ≤ 1` iff `w x ≤ 1`. -/ |
| 67 | theorem valuation_le_one_iff_of_forall_mem_iff (hA : ∀ x, x ∈ A ↔ w x ≤ 1) {x : Ω} : |
| 68 | A.valuation x ≤ 1 ↔ w x ≤ 1 := |
| 69 | (A.valuation_le_one_iff x).trans (hA x) |
| 70 | |
| 71 | /-- If `A` is the closed unit ball of `w`, the maximal ideal of `A` is the open unit ball of `w`. -/ |
| 72 | theorem valuation_lt_one_iff_of_forall_mem_iff (hA : ∀ x, x ∈ A ↔ w x ≤ 1) {x : Ω} : |
| 73 | A.valuation x < 1 ↔ w x < 1 := by |
| 74 | rw [← ValuationSubring.mem_nonunits_iff, ValuationSubring.mem_nonunits_iff_or, hA, |
| 75 | apply_lt_one_iff_or] |
| 76 | |
| 77 | variable {K : Type*} [Field K] [NumberField K] [Algebra K Ω] {v : FinPlace K} |
| 78 | |
| 79 | /-- If `A` is the closed unit ball of `w`, then `A` lies over the prime `v` of `𝓞 K` exactly when |
| 80 | the restriction of `w` to `K` is equivalent to the `v`-adic absolute value. -/ |
| 81 | theorem isPlaceOver_iff_isEquiv_adicAbv (hA : ∀ x, x ∈ A ↔ w x ≤ 1) : |
| 82 | IsPlaceOver A v ↔ (w.under K).IsEquiv (adicAbv K v) := by |
| 83 | have h_adic (x : K) : adicAbv K v x < 1 ↔ v.valuation K x < 1 := by |
| 84 | rw [adicAbv_def, NNReal.coe_lt_one, |
| 85 | WithZeroMulInt.toNNReal_lt_one_iff (one_lt_absNorm_nnreal v)] |
| 86 | refine ⟨fun h ↦ AbsoluteValue.isEquiv_iff_lt_one_iff.mpr fun x ↦ ?_, fun h x ↦ ?_⟩ |
| 87 | · rw [AbsoluteValue.under_apply, ← valuation_lt_one_iff_of_forall_mem_iff hA, h_adic] |
| 88 | exact h.isEquiv.lt_one_iff_lt_one |
| 89 | · rw [valuation_lt_one_iff_of_forall_mem_iff hA, ← AbsoluteValue.under_apply, h.lt_one_iff, |
| 90 | h_adic] |
| 91 | exact v.valuation_lt_one_iff_mem x |
| 92 | |
| 93 | variable [CharZero Ω] |
| 94 | |
| 95 | /-- Let `A` be the closed unit ball of `w`, and let `w` restrict to the real or a `p`-adic absolute |
| 96 | value on `ℚ`. Then `σ` stabilises `A` exactly when it preserves `w`. -/ |
| 97 | theorem mem_decompGroup_iff_of_forall_mem_iff (hA : ∀ x, x ∈ A ↔ w x ≤ 1) |
| 98 | (hw : Rat.AbsoluteValue.IsStandard (w.under ℚ)) {σ : Γ} : |
| 99 | σ ∈ decompGroup Γ A ↔ ∀ x, w (σ • x) = w x := by |
| 100 | rw [mem_decompGroup_iff] |
| 101 | refine ⟨fun h ↦ ?_, fun h x ↦ by rw [hA, hA, h]⟩ |
| 102 | -- `x ↦ w (σ • x)` also has closed unit ball `A`, and it agrees with `w` on `ℚ`, so it is `w`. |
| 103 | let f := MulSemiringAction.toRingHom Γ Ω σ |
| 104 | have h_equiv : (w.comp (f := f) f.injective).IsEquiv w := |
| 105 | isEquiv_of_forall_le_one_iff fun x ↦ (hA _).symm.trans ((h x).trans (hA x)) |
| 106 | have h_nat (n : ℕ) : w (f n) = w.under ℚ n := by |
| 107 | rw [map_natCast f, AbsoluteValue.under_apply, map_natCast (algebraMap ℚ Ω)] |
| 108 | have h_eq : w.comp (f := f) f.injective = w := |
| 109 | h_equiv.eq_of_isStandard hw hw h_nat fun n ↦ by |
| 110 | rw [AbsoluteValue.under_apply, map_natCast (algebraMap ℚ Ω)] |
| 111 | exact fun x ↦ DFunLike.congr_fun h_eq x |
| 112 | |
| 113 | /-- Let `A` be the closed unit ball of `w`, and let `w` restrict to the real or a `p`-adic absolute |
| 114 | value on `ℚ`. Then `σ` is a Frobenius element for `q` at `A` exactly when it preserves `w` and |
| 115 | `w (σ • x - x ^ q) < 1` whenever `w x ≤ 1`. -/ |
| 116 | theorem isFrob_iff_of_forall_mem_iff (hA : ∀ x, x ∈ A ↔ w x ≤ 1) |
| 117 | (hw : Rat.AbsoluteValue.IsStandard (w.under ℚ)) {q : ℕ} {σ : Γ} : |
| 118 | IsFrob A q σ ↔ (∀ x, w (σ • x) = w x) ∧ ∀ x, w x ≤ 1 → w (σ • x - x ^ q) < 1 := by |
| 119 | rw [IsFrob, mem_decompGroup_iff_of_forall_mem_iff hA hw] |
| 120 | simp only [valuation_le_one_iff_of_forall_mem_iff hA, valuation_lt_one_iff_of_forall_mem_iff hA] |
| 121 | |
| 122 | end New |