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 New.Congruences.Selmer.Line |
| 4 | public import New.Congruences.Selmer.TiedClasses |
| 5 | public import New.Congruences.Selmer.Descent |
| 6 | |
| 7 | /-! |
| 8 | # The descent bounds for tied Selmer groups, stated for classes |
| 9 | |
| 10 | The descent bounds the lengths of tied Selmer groups, which are modules of cocycles that vanish at |
| 11 | `γ_*`. By `New.Selmer.SelmerDatum.length_tiedSelmer_eq_length_map_π₁` such a group has the length |
| 12 | of the module of classes in `H¹(Gal(Ω/E), T / a)` of the cocycles with the same local conditions and |
| 13 | ties, without the normalisation at `γ_*`. This file states the descent bounds for those classes. |
| 14 | |
| 15 | * `New.Selmer.exists_isTiedPrimes_length_classes_le`, |
| 16 | `New.Selmer.exists_isTiedPrimes_card_le_and_length_classes_le`: sets of tied primes for which the |
| 17 | tied Selmer classes of every datum are short. |
| 18 | * `New.Selmer.SelmerDatum.exists_boundsSelmer_ellVal_eval_le_of_length_classes_le`: the polynomial |
| 19 | bound from a bound on the classes tied at the later primes. |
| 20 | |
| 21 | Notions from other files: |
| 22 | * `New.Selmer.SelmerDatum.tiedCocyclesZ1`: the tied cocycles without the normalisation at `γ_*`, |
| 23 | as continuous 1-cocycles of `T / a`; `New.DiscreteModule.π₁` sends them to their classes. |
| 24 | |
| 25 | ## Relation to the literature |
| 26 | |
| 27 | See `New.Congruences.Selmer.Descent` for related work. |
| 28 | -/ |
| 29 | |
| 30 | @[expose] public section |
| 31 | |
| 32 | noncomputable section |
| 33 | |
| 34 | namespace New.Selmer |
| 35 | |
| 36 | open Module Finset |
| 37 | |
| 38 | open scoped NNReal |
| 39 | |
| 40 | variable {ℓ : ℕ} [ThePrime ℓ] {E : Type} [Field E] [EmbeddedNumberField E] [NumberField.IsCMField E] |
| 41 | {S₀ : Finset (FinPlace E)} {g₀ : Gal(Ω/E)} {O ι : Type} [CommRing O] [PadicIntegerRing O ℓ] |
| 42 | {n : ι → Type} [∀ i : ι, Fintype (n i)] [∀ i : ι, DecidableEq (n i)] |
| 43 | (T : ∀ i : ι, SelmerDatum ℓ S₀ g₀ O (n i)) |
| 44 | |
| 45 | /-- `New.Selmer.exists_isTiedPrimes_length_tiedSelmer_le` for classes: the tied primes it gives |
| 46 | make the module of tied Selmer classes modulo `ϖ ^ e` of every datum no longer than its global |
| 47 | and local terms. -/ |
| 48 | theorem exists_isTiedPrimes_length_classes_le [Fintype ι] {M N : ℕ} {V : ι → Gal(Ω/E) → Prop} |
| 49 | {W : Set Gal(Ω/E)} {P₀ : FinPlace E} {J : Finset (FinPlace E)} |
| 50 | {x : FinPlace E → AuxPrimeData E (ℓ ^ N) × (ι → O)} {ϖ : O} (hϖ : Irreducible ϖ) {e : ℕ} |
| 51 | (h_room : ∀ i : ι, 2 * Fintype.card (n i) * e + 1 < Nat.card (IsLocalRing.ResidueField O)) |
| 52 | (hV : ∀ (i : ι) (g : Gal(Ω/E)), V i g ↔ reduceModPow ℓ M (T i).ρ g = 1) (hN : M < N) |
| 53 | (he : ϖ ^ e ∣ ℓ ^ M) (hJ : IsTiedPrimes ℓ S₀ V W N P₀ J x) : |
| 54 | ∃ (J' : Finset (FinPlace E)) (x' : FinPlace E → AuxPrimeData E (ℓ ^ N) × (ι → O)), |
| 55 | IsTiedPrimes ℓ S₀ V W N P₀ J' x' ∧ |
| 56 | (#J' : ℕ∞) ≤ #J + totalTiedLength T ϖ e J x ∧ |
| 57 | ∀ i : ι, |
| 58 | length O (((T i).tiedCocyclesZ1 he J' J' x' i).map ((T i).reductionModule he).π₁) ≤ |
| 59 | (T i).globalTerm + (T i).placesTerm := by |
| 60 | obtain ⟨J', x', hJ', h_card, h_len⟩ := |
| 61 | exists_isTiedPrimes_length_tiedSelmer_le T hϖ h_room hV hN he hJ |
| 62 | refine ⟨J', x', hJ', h_card, fun i ↦ ?_⟩ |
| 63 | rw [← (T i).length_tiedSelmer_eq_length_map_π₁ he hJ' (fun g ↦ (hV i g).1) subset_rfl] |
| 64 | exact h_len i |
| 65 | |
| 66 | /-- `New.Selmer.exists_isTiedPrimes_card_le_and_length_le` for classes. Let `g₀` be inertial at a |
| 67 | place of `S₀` prime to `ℓ`, let the residue field of `O` be large, and let `W` be a neighbourhood of |
| 68 | `g₀`. There is `s` such that for every `N > M` there is a set `J` of at most `s` tied primes for |
| 69 | which, for every datum `T i`, the module of tied Selmer classes in `H¹(Gal(Ω/E), T i / ℓ ^ M)` is |
| 70 | no longer than the global term plus the local terms of `T i`. -/ |
| 71 | theorem exists_isTiedPrimes_card_le_and_length_classes_le [Finite ι] |
| 72 | (hg₀ : g₀ ∈ inertiaAbove (S₀ \ placesDividing E ℓ)) (M : ℕ) |
| 73 | (h_room : ∀ i : ι, 2 * Fintype.card (n i) * IsDiscreteValuationRing.addVal O (ℓ ^ M) + 1 < |
| 74 | Nat.card (IsLocalRing.ResidueField O)) |
| 75 | {W : Set Gal(Ω/E)} (hW : W ∈ nhds g₀) : |
| 76 | ∃ s : ℕ, ∀ N > M, ∃ (P₀ : FinPlace E) (J : Finset (FinPlace E)) |
| 77 | (x : FinPlace E → AuxPrimeData E (ℓ ^ N) × (ι → O)), |
| 78 | IsTiedPrimes ℓ S₀ (fun (i : ι) (g : Gal(Ω/E)) ↦ reduceModPow ℓ M (T i).ρ g = 1) W N P₀ J x ∧ |
| 79 | #J ≤ s ∧ |
| 80 | ∀ i : ι, |
| 81 | length O (((T i).tiedCocyclesZ1 (dvd_refl ((ℓ : O) ^ M)) J J x i).map |
| 82 | ((T i).reductionModule (dvd_refl ((ℓ : O) ^ M))).π₁) ≤ |
| 83 | (T i).globalTerm + (T i).placesTerm := by |
| 84 | obtain ⟨s, h⟩ := exists_isTiedPrimes_card_le_and_length_le T hg₀ M h_room hW |
| 85 | refine ⟨s, fun N hN ↦ ?_⟩ |
| 86 | obtain ⟨P₀, J, x, hJ, h_card, h_len⟩ := h N hN |
| 87 | refine ⟨P₀, J, x, hJ, h_card, fun i ↦ ?_⟩ |
| 88 | rw [← (T i).length_tiedSelmer_eq_length_map_π₁ dvd_rfl hJ (fun _ h ↦ h) subset_rfl] |
| 89 | exact h_len i |
| 90 | |
| 91 | namespace SelmerDatum |
| 92 | |
| 93 | variable {ι n : Type} [Fintype n] [DecidableEq n] {V : ι → Gal(Ω/E) → Prop} {W : Set Gal(Ω/E)} |
| 94 | {J : Finset (FinPlace E)} {M N s₀ : ℕ} {P₀ : FinPlace E} {r : ℚ≥0} |
| 95 | |
| 96 | open scoped Classical in |
| 97 | /-- `New.Selmer.SelmerDatum.exists_boundsSelmer_ellVal_eval_le` with its hypothesis on classes: if |
| 98 | the tied Selmer classes modulo `ℓ ^ M` with the ties at the primes of `J` other than `P₀` have |
| 99 | length at most `β_T`, then some `P` bounds the length of the Selmer module of the characters at |
| 100 | all points (`BoundsSelmer`), and `v(P(x₀)) ≤ β_T + s₀ r` at a point `x₀` whose coordinates have |
| 101 | valuation at least `r`. -/ |
| 102 | theorem exists_boundsSelmer_ellVal_eval_le_of_length_classes_le {O : CoeffRing ℓ} |
| 103 | (T : SelmerDatum ℓ S₀ g₀ O.val n) {d : FinPlace E → AuxPrimeData E (ℓ ^ N) × (ι → O.val)} |
| 104 | (h_primes : IsTiedPrimes ℓ S₀ V W N P₀ J d) (hN₀ : N ≠ 0) (i : ι) |
| 105 | (hV : ∀ g : Gal(Ω/E), V i g → reduceModPow ℓ M T.ρ g = 1) |
| 106 | (h_tied : length O.val |
| 107 | ((T.tiedCocyclesZ1 (dvd_refl ((ℓ : O.val) ^ M)) J (J.erase P₀) d i).map |
| 108 | (T.reductionModule (dvd_refl ((ℓ : O.val) ^ M))).π₁) ≤ T.β) |
| 109 | (hs₀ : 2 * Fintype.card n * #J ≤ s₀) (hr : r ≤ 1) (hN : M ≤ N * r) : |
| 110 | ∃ (P : MvPolynomial J O.val) (x₀ : J → intQpBar ℓ), |
| 111 | (∀ v : J, (r : ℝ≥0) ≤ ellVal (x₀ v).val) ∧ |
| 112 | ellVal (MvPolynomial.eval x₀ (P.map O.toIntQpBar)).val ≤ |
| 113 | O.normLength T.β + s₀ * (r : ℝ≥0) ∧ |
| 114 | BoundsSelmer ℓ M (fun v : J ↦ (d v).1.character) T.ρ (unionWithConj T.places J) |
| 115 | T.classRelations P := by |
| 116 | rw [← T.length_tiedSelmer_eq_length_map_π₁ dvd_rfl h_primes hV (erase_subset P₀ J)] at h_tied |
| 117 | exact T.exists_boundsSelmer_ellVal_eval_le h_primes hN₀ i hV h_tied hs₀ hr hN |
| 118 | |
| 119 | end SelmerDatum |
| 120 | |
| 121 | end New.Selmer |