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

Merge pull request #32 from p3-derivatives-field-chosen-places
Browse filesdocs(Derivatives/Field): document eight public lemmas in ChosenPlaces
Checks
build Program · lake build and Comparator
Details
challenge Program · challenge files and build config
Details
+26 −0 docs/audit/docstrings-derivatives-field.md added View file
| @@ -0,0 +1,26 @@ | ||
| 1 | +# Docstrings — `src/New/Derivatives/Field` (P-3, #4) | |
| 2 | + | |
| 3 | +Unit taken: the file `ChosenPlaces.lean` of the folder `src/New/Derivatives/Field`. This note covers | |
| 4 | +that file only; the folder's other two files are still free for the next reader of P-3. | |
| 5 | + | |
| 6 | +Eight public declarations in the file had no docstring. None had a wrong one: the file's existing | |
| 7 | +docstrings (including the ones on `piM`, `IsChosen`, `chiMLocal`, `chiZero`, `chiM` and | |
| 8 | +`CriticalPair`) state what the Lean says. The eight added: | |
| 9 | + | |
| 10 | +| Declaration | What the docstring now says | | |
| 11 | +|---|---| | |
| 12 | +| `New.Data.piMBar_ne_zero` | `D.piMBar ≠ 0`: the integer of `K` of norm p₀p₁ is nonzero, its product with its conjugate being `D.M = p₀ p₁`. | | |
| 13 | +| `New.Data.piM_ne_zero` | `D.piM ≠ 0`: the image in `𝓞 E` of the conjugate of `D.piMBar` is nonzero, the same product being `D.M`. | | |
| 14 | +| `New.Data.finite_isChosen` | Only finitely many finite places of `E` are chosen: `D.IsChosen w` holds exactly for the prime divisors of `D.piM`. | | |
| 15 | +| `New.Data.orderOf_chiMLocalRoot` | At a chosen place `w`, the fixed residue character `D.chiMLocalRoot hw` has order q₂². | | |
| 16 | +| `New.Data.orderOf_chiMLocal` | At a chosen place `w`, the residue character `D.chiMLocal w`, the q₂-th power of `D.chiMLocalRoot`, has order q₂. | | |
| 17 | +| `New.Data.chiMLocal_eq_one_of_not_isChosen` | At a finite place that is not chosen, the residue character `D.chiMLocal w` is trivial. | | |
| 18 | +| `New.Data.chiZero_hasWeight` | `D.chiZero` has weight `v ↦ -w₀(v)`, with w₀(v) = `D.liftWeight 0 v`, and trivial tame part. | | |
| 19 | +| `New.Data.chiM_hasWeight` | `D.chiM` has weight `0` and tame part `D.chiMLocal`. | | |
| 20 | + | |
| 21 | +Checked: every declaration named in backticks in the new docstrings exists (`New.Data.piMBar_mul_star`, | |
| 22 | +`New.Data.piM_mul_star`, `New.Data.IsChosen`, `New.Data.chiMLocal`, `New.Data.chiMLocalRoot`, | |
| 23 | +`New.Data.liftWeight`, `New.Data.chiZero`, `New.Data.chiM`, `New.Data.CriticalPair`, | |
| 24 | +`New.Parameters.q₂`). `python3 checks/challenge.py .` ends with | |
| 25 | +`ok: 3 challenge files and the build configuration as approved; 809 Lean files, 484842 lines, toolchain leanprover/lean4:v4.37.0-rc1`. | |
| 26 | +No code, statement, hypothesis or proof line changes; the diff is docstrings and this note. | |
+20 −0 routes/p3-derivatives-field-chosen-places/README.md added View file
| @@ -0,0 +1,20 @@ | ||
| 1 | +--- | |
| 2 | +issue: 4 | |
| 3 | +status: done | |
| 4 | +--- | |
| 5 | +# p3-derivatives-field-chosen-places | |
| 6 | + | |
| 7 | +P-3 (#4), unit: the folder `src/New/Derivatives/Field`. This branch takes one file of it, | |
| 8 | +`ChosenPlaces.lean`: eight public lemmas had no docstring, and each now has one. Comments only; no | |
| 9 | +declaration, statement or proof changes. The docstrings are listed in | |
| 10 | +`docs/audit/docstrings-derivatives-field.md`; every declaration they name in backticks was checked to | |
| 11 | +exist. Pull request: #32 (`Part of #4`; the issue closes when every subfolder has a merged pull | |
| 12 | +request). | |
| 13 | + | |
| 14 | +The folder's other two files (`PrimeDecomposition.lean`, `WeilData.lean`) are untouched and stay | |
| 15 | +free for the next reader of P-3. | |
| 16 | + | |
| 17 | +## Next | |
| 18 | + | |
| 19 | +Read PR #32's `build` and `replay` verdicts when they are there; nothing in this branch needs another | |
| 20 | +push. A later P-3 route can take `PrimeDecomposition.lean` or `WeilData.lean` of the same folder. | |
+17 −0 src/New/Derivatives/Field/ChosenPlaces.lean View file
| @@ -88,10 +88,14 @@ lemma piM_mul_star : D.piM * star D.piM = D.M := by | ||
| 88 | 88 | rw [star_star, ← h_conj, ← map_mul, mul_comm, D.piMBar_mul_star] |
| 89 | 89 | simp [M] |
| 90 | 90 | |
| 91 | +/-- The integer `D.piMBar` of `K`, of norm p₀p₁, is nonzero: its product with its complex conjugate | |
| 92 | +`star D.piMBar` is `D.M = p₀ p₁` (`New.Data.piMBar_mul_star`). -/ | |
| 91 | 93 | @[simp] |
| 92 | 94 | lemma piMBar_ne_zero : D.piMBar ≠ 0 := fun h_zero ↦ by |
| 93 | 95 | simpa [h_zero, NeZero.ne] using D.piMBar_mul_star |
| 94 | 96 | |
| 97 | +/-- The integer `D.piM` of `𝓞 E`, the image of the complex conjugate `star D.piMBar`, is nonzero: | |
| 98 | +its product with its complex conjugate is `D.M = p₀ p₁` (`New.Data.piM_mul_star`). -/ | |
| 95 | 99 | lemma piM_ne_zero : D.piM ≠ 0 := by simp |
| 96 | 100 | |
| 97 | 101 | /-- The data `D` carry two distinct primes p₀, p₁ and an integer `D.piMBar` of K of norm p₀p₁; |
| @@ -126,6 +130,8 @@ degree one. -/ | ||
| 126 | 130 | lemma q_eq_levelPrime (hw : ↑(D.levelPrime i) ∈ w.asIdeal) : w.q = D.levelPrime i := |
| 127 | 131 | q_eq_of_modEq_one (D.levelPrime_modEq_one i) hw |
| 128 | 132 | |
| 133 | +/-- Only finitely many finite places `w` of `E` are chosen (`D.IsChosen w`): those whose prime | |
| 134 | +ideal contains `D.piM` are the prime divisors of the nonzero integer `D.piM`. -/ | |
| 129 | 135 | lemma finite_isChosen : {w : FinPlace D.E | D.IsChosen w}.Finite := by |
| 130 | 136 | simp [IsChosen, ← dvd_span_singleton, finite_factors] |
| 131 | 137 | |
| @@ -146,6 +152,8 @@ lemma exists_mulChar_orderOf_eq_sq_of_isChosen (hw : D.IsChosen w) : | ||
| 146 | 152 | def chiMLocalRoot (h : D.IsChosen w) : MulChar (ResField w) ℂ := |
| 147 | 153 | (D.exists_mulChar_orderOf_eq_sq_of_isChosen h).choose |
| 148 | 154 | |
| 155 | +/-- At a chosen place `w` of `E` (`D.IsChosen w`), the fixed character `D.chiMLocalRoot hw` of the | |
| 156 | +residue field `ResField w` has order q₂², with q₂ = `P.q₂ D.towerExp`. -/ | |
| 149 | 157 | lemma orderOf_chiMLocalRoot (hw : D.IsChosen w) : |
| 150 | 158 | orderOf (D.chiMLocalRoot hw) = P.q₂ D.towerExp ^ 2 := |
| 151 | 159 | (D.exists_mulChar_orderOf_eq_sq_of_isChosen hw).choose_spec |
| @@ -161,10 +169,15 @@ q₂². -/ | ||
| 161 | 169 | lemma chiMLocal_of_isChosen (hw : D.IsChosen w) : |
| 162 | 170 | D.chiMLocal w = D.chiMLocalRoot hw ^ P.q₂ D.towerExp := dite_eq_left hw |
| 163 | 171 | |
| 172 | +/-- At a chosen place `w` of `E` (`D.IsChosen w`), the residue character ω_w = `D.chiMLocal w` | |
| 173 | +has order q₂, with q₂ = `P.q₂ D.towerExp`; it is the q₂-th power of the character | |
| 174 | +`D.chiMLocalRoot hw` of order q₂². -/ | |
| 164 | 175 | lemma orderOf_chiMLocal (hw : D.IsChosen w) : orderOf (D.chiMLocal w) = P.q₂ D.towerExp := by |
| 165 | 176 | rw [D.chiMLocal_of_isChosen hw, orderOf_pow' _ (NeZero.ne _), D.orderOf_chiMLocalRoot hw, sq, |
| 166 | 177 | Nat.gcd_mul_left_left, Nat.mul_div_cancel _ (NeZero.pos _)] |
| 167 | 178 | |
| 179 | +/-- At a finite place `w` of `E` that is not chosen (`¬ D.IsChosen w`), the residue character | |
| 180 | +ω_w = `D.chiMLocal w` is trivial. -/ | |
| 168 | 181 | @[simp] |
| 169 | 182 | lemma chiMLocal_eq_one_of_not_isChosen (hw : ¬D.IsChosen w) : D.chiMLocal w = 1 := dite_eq_right hw |
| 170 | 183 | |
| @@ -251,10 +264,14 @@ def chiZero : AutChar D.E := (D.exists_char_hasWeight 1 0).choose | ||
| 251 | 264 | (`New.Data.chiMLocal`). -/ |
| 252 | 265 | def chiM : AutChar D.E := (D.exists_char_hasWeight 0 1).choose |
| 253 | 266 | |
| 267 | +/-- The character `D.chiZero` of `U(1)(𝔸)`, trivial on rational points, has weight | |
| 268 | +`v ↦ -w₀(v)`, where w₀(v) = `D.liftWeight 0 v`, and trivial tame part. -/ | |
| 254 | 269 | lemma chiZero_hasWeight : |
| 255 | 270 | D.chiZero.HasWeight (fun v : InfinitePlace D.E ↦ -D.liftWeight 0 v) 1 := by |
| 256 | 271 | simpa [chiZero] using (D.exists_char_hasWeight 1 0).choose_spec |
| 257 | 272 | |
| 273 | +/-- The character `D.chiM` of `U(1)(𝔸)`, trivial on rational points, has weight `0` and tame part | |
| 274 | +ω = `D.chiMLocal`, the residue characters of order q₂ at the chosen places and trivial elsewhere. -/ | |
| 258 | 275 | lemma chiM_hasWeight : D.chiM.HasWeight 0 D.chiMLocal := by |
| 259 | 276 | simpa [chiM, Pi.zero_def] using (D.exists_char_hasWeight 0 1).choose_spec |
| 260 | 277 | |