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

S-5: drop the always-true hypothesis `q₀ ∣ q₁ s` from two placeClass lemmas
Browse filesP.q₁ s is by definition P.q₀ * towerDeg s, so the divisibility that New.Parameters.placeClass asks for is New.Parameters.q₀_dvd_q₁. Card the two lemmas that carried it as a binder without using it, and pass that lemma instead; the caller New.Data.card_aPlaces then needs no hypothesis.
Checks
build Program · lake build and Comparator
Details
challenge Program · challenge files and build config
Details
ci/docs
Details
+15 −15 src/New/Reduction/Data/FieldsAndPlaces.lean View file
| @@ -336,17 +336,17 @@ lemma numInfPlaces_E (s : ℕ) : Core.numInfPlaces (P.E s) = towerDeg s * P.q₀ | ||
| 336 | 336 | simp [← natDegree_cyclotomic _ ℂ, ← expand_towerDeg_cyclotomic, natDegree_expand] |
| 337 | 337 | simp [card_congr (P.placeMulEquiv s).toEquiv, h_deg, mul_comm] |
| 338 | 338 | |
| 339 | -/-- Given that `P.q₀` divides `P.q₁ s` (`h_dvd`), exactly `towerDeg s = P.q₁ s / P.q₀` elements `v` | |
| 340 | -of `P.Φ s`, the infinite places of `P.E s`, have class `1` modulo `P.q₀` | |
| 341 | -(`New.Parameters.placeClass`). -/ | |
| 342 | -lemma card_placeClass_eq_one_eq_towerDeg (h_dvd : P.q₀ ∣ P.q₁ s) : | |
| 343 | - #{v : P.Φ s | P.placeClass h_dvd v = 1} = towerDeg s := by | |
| 344 | - -- The homomorphism `P.placeClass h_dvd` is onto `(ZMod q₀)ˣ`, so its kernel has index `φ(q₀)` in | |
| 345 | - -- the group of the `towerDeg s * φ(q₀)` infinite places. | |
| 346 | - have h_index : (P.placeClass h_dvd).ker.index = P.q₀.totient := by | |
| 339 | +/-- Exactly `towerDeg s = P.q₁ s / P.q₀` elements `v` of `P.Φ s`, the infinite places of `P.E s`, | |
| 340 | +have class `1` modulo `P.q₀` (`New.Parameters.placeClass`, whose divisibility hypothesis is | |
| 341 | +`New.Parameters.q₀_dvd_q₁`). -/ | |
| 342 | +lemma card_placeClass_eq_one_eq_towerDeg : | |
| 343 | + #{v : P.Φ s | P.placeClass (P.q₀_dvd_q₁ s) v = 1} = towerDeg s := by | |
| 344 | + -- The homomorphism `P.placeClass` is onto `(ZMod q₀)ˣ`, so its kernel has index `φ(q₀)` in the | |
| 345 | + -- group of the `towerDeg s * φ(q₀)` infinite places. | |
| 346 | + have h_index : (P.placeClass (P.q₀_dvd_q₁ s)).ker.index = P.q₀.totient := by | |
| 347 | 347 | simp [placeClass, Subgroup.index_ker, unitsMap_surjective] |
| 348 | 348 | simpa [h_index, numInfPlaces_E, ne, Fintype.card_subtype] using |
| 349 | - (P.placeClass h_dvd).ker.card_mul_index | |
| 349 | + (P.placeClass (P.q₀_dvd_q₁ s)).ker.card_mul_index | |
| 350 | 350 | |
| 351 | 351 | lemma isPrimitiveRoot_zeta : IsPrimitiveRoot (P.ζ s) (P.q₁ s) := zeta_spec .. |
| 352 | 352 | |
| @@ -413,13 +413,13 @@ and `d` of `d` both differ from `-1`. -/ | ||
| 413 | 413 | lemma d_pow_ne_neg_one (n : ℕ) : (P.d : ZMod P.q₀) ^ n ≠ -1 := |
| 414 | 414 | P.toTauCeti.d_pow_ne_neg_one n |
| 415 | 415 | |
| 416 | -/-- Let `ν` be an integer and suppose `q₀ ∣ q₁`. The place `P.placeOfInt s ν` of `E` is the one that | |
| 417 | -corresponds to `ν mod q₁` under the isomorphism of the group of places with `(ℤ/q₁)ˣ` if `ν` is a | |
| 418 | -unit modulo `q₁`, and the identity place otherwise; `P.placeClass h_dvd` reduces the element of | |
| 419 | -`(ℤ/q₁)ˣ` of a place modulo `q₀`. This class is `-1` if and only if `ν ≡ -1` modulo `q₀`. -/ | |
| 416 | +/-- Let `ν` be an integer. The place `P.placeOfInt s ν` of `E` is the one that corresponds to | |
| 417 | +`ν mod q₁` under the isomorphism of the group of places with `(ℤ/q₁)ˣ` if `ν` is a unit modulo `q₁`, | |
| 418 | +and the identity place otherwise; `P.placeClass (P.q₀_dvd_q₁ s)` reduces the element of `(ℤ/q₁)ˣ` of | |
| 419 | +a place modulo `q₀`. This class is `-1` if and only if `ν ≡ -1` modulo `q₀`. -/ | |
| 420 | 420 | @[simp] |
| 421 | -lemma placeClass_placeOfInt_eq_neg_one_iff {ν : ℤ} (h_dvd : P.q₀ ∣ P.q₁ s) : | |
| 422 | - P.placeClass h_dvd (P.placeOfInt s ν) = -1 ↔ (ν : ZMod P.q₀) = -1 := by | |
| 421 | +lemma placeClass_placeOfInt_eq_neg_one_iff {ν : ℤ} : | |
| 422 | + P.placeClass (P.q₀_dvd_q₁ s) (P.placeOfInt s ν) = -1 ↔ (ν : ZMod P.q₀) = -1 := by | |
| 423 | 423 | refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩ |
| 424 | 424 | · -- If `ν` is no unit mod `q₁` then `P.placeOfInt s ν = 1`, whose class is `1 ≠ -1`. |
| 425 | 425 | have h_val : (if IsUnit (ν : ZMod (P.q₁ s)) then (ν : ZMod P.q₀) else 1) = -1 := by |
+1 −1 src/New/Reduction/PrimeSums.lean View file
| @@ -83,7 +83,7 @@ def totalRemainder : ℝ := ∑ τ ∈ D.aPlaces, (D.primeSum D.a τ - D.mainPri | ||
| 83 | 83 | `E = P.E towerExp`, and `q₁ = P.q₁ towerExp` is the order of the root of unity that generates `E` |
| 84 | 84 | over `K`. -/ |
| 85 | 85 | lemma card_aPlaces : #D.aPlaces = towerDeg D.towerExp := |
| 86 | - card_placeClass_eq_one_eq_towerDeg (P.q₀_dvd_q₁ _) | |
| 86 | + card_placeClass_eq_one_eq_towerDeg (s := D.towerExp) | |
| 87 | 87 | |
| 88 | 88 | /-- The number `f` of all places is the number of `a`-places times `φ(q₀)`. -/ |
| 89 | 89 | lemma f_eq_card_aPlaces_mul : D.f = #D.aPlaces * P.q₀.totient := by |