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

refactor(OneLift): extract the level lemma of `smul_chosenGLRep_eq_apply_of_triangular` #59
Open
+89 −0 routes/p2-bottomoftower/README.md added View file
| @@ -0,0 +1,89 @@ | ||
| 1 | +--- | |
| 2 | +issue: 3 | |
| 3 | +status: done | |
| 4 | +--- | |
| 5 | +# p2-bottomoftower | |
| 6 | + | |
| 7 | +P-2 (#3): split the longest proof of `src/New/OneLift/FalseLifts/BottomOfTower.lean` into lemmas, | |
| 8 | +each with a name and a docstring that says what it states. | |
| 9 | + | |
| 10 | +## The proof | |
| 11 | + | |
| 12 | +Measured on `main` `b525acd`: for each declaration, the lines after the one holding its top-level | |
| 13 | +`:=`, up to the last indented line. The longest is `smul_chosenGLRep_eq_apply_of_triangular` | |
| 14 | +(lines 1024–1075: 41 lines of proof after `:= by`). The next is | |
| 15 | +`exists_leftMul_eq_and_blockAction_eq` (39), then `exists_leftMul_eq_of_translatedBlockFn_ne_zero` | |
| 16 | +(33). | |
| 17 | + | |
| 18 | +## The split | |
| 19 | + | |
| 20 | +Three private declarations, each with a docstring, placed just before the lemma in the same scope | |
| 21 | +(`namespace DescentPair`, after its `variable` line for `O`): | |
| 22 | + | |
| 23 | +- `chosenFirstBlock s`: the residue-field family equal to `diag (s (.inl i), 1)` at each chosen | |
| 24 | + place and `1` at each twist place. | |
| 25 | +- `inv_chosenFirstBlock_mul_inr`: at a twist place `i`, `(O.chosenFirstBlock s)⁻¹ * τ` agrees | |
| 26 | + with `τ`. | |
| 27 | +- `inv_chosenFirstBlock_mul_mem_descentResidueLevel`: if `τ` acts on the image of `O.incl` at each | |
| 28 | + chosen place as `s (.inl i)`, and its transpose does at each twist place as `(s (.inr i))ᵀ`, then | |
| 29 | + `(O.chosenFirstBlock s)⁻¹ * τ` lies in `descentResidueLevel O.toLevelPlaces O.incl`. | |
| 30 | + | |
| 31 | +In the proof, the twelve-line `have h_level` block becomes one call, of | |
| 32 | +`inv_chosenFirstBlock_mul_mem_descentResidueLevel`. The two-line `have h_twist` is gone, and | |
| 33 | +`inv_chosenFirstBlock_mul_inr` is called where `h_twist` used to be: inside that lemma, and in | |
| 34 | +`h_char`. The comment that explained the chosen-place case ("At a chosen place both `τ` and `σ` | |
| 35 | +send `(1, 0)ᵀ` to its product with `s`") moved into the lemma with its step. | |
| 36 | + | |
| 37 | +The lemma's statement, and every other statement in the file, is untouched. Its proof goes from 41 | |
| 38 | +lines to 28. The file goes from 1,511 to 1,539 lines and from 91 to 94 declarations. | |
| 39 | + | |
| 40 | +## Where the split comes from | |
| 41 | + | |
| 42 | +It is upstream's. There is no Lean on this machine, and none was installed, so nothing was written | |
| 43 | +here for Lean to check. Upstream split this same proof on 2026-12-06, in two merged commits of | |
| 44 | +leanprover-community/riemann-hypothesis: `a4c60c0636` ("extract | |
| 45 | +inv_firstBlockHom_mul_mem_descentResidueLevel") and `e991a45bb9` ("share chosenFirstBlock and | |
| 46 | +twist-place lemma"). | |
| 47 | + | |
| 48 | +Before them, upstream's file held this lemma's docstring, statement and proof as `main` here holds | |
| 49 | +them, line for line. After them, the three declarations and the lemma read as they do on this | |
| 50 | +branch. The change on this branch is their net diff applied to our file, with one blank line where | |
| 51 | +they kept two. | |
| 52 | + | |
| 53 | +Not taken from upstream: everything else it did to this file since our starting commit (the two | |
| 54 | +files differ in 178 lines outside this lemma). And not done here: a further split of the remaining | |
| 55 | +`have`s (`h_char`, `h_cancel`), which would make this proof differ from upstream's while upstream | |
| 56 | +is still working on it. | |
| 57 | + | |
| 58 | +## What happened | |
| 59 | + | |
| 60 | +On `ad941b8`, the commit with the change, both checks passed: | |
| 61 | + | |
| 62 | +- `challenge`, job 6814: `ok: 3 challenge files and the build configuration as approved`. | |
| 63 | +- `build`, job 6815 (464 s): `ok: lake build passes with no sorry; 5 theorem(s) report propext, | |
| 64 | + Classical.choice, Quot.sound only`. Lake rebuilt this file and the 12 modules that import it, | |
| 65 | + directly or not (by the import graph); the log keeps the last 25 lines of that step. | |
| 66 | + | |
| 67 | +The commit after `ad941b8` changes these notes only, so both verdicts carry over to it unchanged. | |
| 68 | + | |
| 69 | +## How to reproduce | |
| 70 | + | |
| 71 | +- `git diff origin/main -- src/New/OneLift/FalseLifts/BottomOfTower.lean`: 45 lines added, 17 | |
| 72 | + removed. | |
| 73 | +- The lengths: for each declaration, count the lines after its top-level `:=`. | |
| 74 | +- `shoal get jobs/6815/log`: the build of the change. | |
| 75 | +- Upstream's two commits, by their hashes above. | |
| 76 | + | |
| 77 | +## What is left open | |
| 78 | + | |
| 79 | +- The file's longest proof is now `exists_leftMul_eq_and_blockAction_eq` (39 lines), which this | |
| 80 | + route does not touch. It calls the lemma split here, with three side goals of its own. | |
| 81 | +- Whether the file reads more easily is the maintainer's call (#3's second condition). That the | |
| 82 | + change compiles is `build`'s word, not this route's. | |
| 83 | + | |
| 84 | +## Next | |
| 85 | + | |
| 86 | +The pull request is open (Closes #3) and waits for the maintainer: its agreement that the file | |
| 87 | +reads more easily, then the replay report on the head, which the merge waits for. Nothing is left | |
| 88 | +to push here. A second pull request could split `exists_leftMul_eq_and_blockAction_eq`, best with | |
| 89 | +Lean at hand. | |
+45 −17 src/New/OneLift/FalseLifts/BottomOfTower.lean View file
| @@ -1013,6 +1013,47 @@ lemma translatedBlockFn_eq_one_of_hasIntegralBlockRatio {A : Gf E r} {z : n × r | ||
| 1013 | 1013 | rw [translatedBlockFn, residueDatum_of_eq_map _ u hu, residueBlockDatum, ite_eq_left h_chosen] |
| 1014 | 1014 | exact prod_eq_one fun i _ ↦ by rw [h_res_top, det_one, map_one] |
| 1015 | 1015 | |
| 1016 | +/-- The residue-field family equal to `diag (s (.inl i), 1)` at each chosen place and `1` at each | |
| 1017 | +twist place. -/ | |
| 1018 | +private def chosenFirstBlock | |
| 1019 | + (s : ∀ j : O.ChosenIndex ⊕ O.TwistIndex, GL r (ResField (O.placeAt j))) : | |
| 1020 | + ∀ j : O.ChosenIndex ⊕ O.TwistIndex, GL n (ResField (O.placeAt j)) := | |
| 1021 | + firstBlockHom O.toLevelPlaces O.incl fun i ↦ s (.inl i) | |
| 1022 | + | |
| 1023 | +/-- At a twist place `i`, `(O.chosenFirstBlock s)⁻¹ * τ` agrees with `τ`. -/ | |
| 1024 | +private lemma inv_chosenFirstBlock_mul_inr | |
| 1025 | + (τ : ∀ j : O.ChosenIndex ⊕ O.TwistIndex, GL n (ResField (O.placeAt j))) | |
| 1026 | + (s : ∀ j : O.ChosenIndex ⊕ O.TwistIndex, GL r (ResField (O.placeAt j))) | |
| 1027 | + (i : O.TwistIndex) : | |
| 1028 | + ((O.chosenFirstBlock s)⁻¹ * τ) (.inr i) = τ (.inr i) := by | |
| 1029 | + rw [Pi.mul_apply, Pi.inv_apply, show O.chosenFirstBlock s (.inr i) = 1 from rfl, | |
| 1030 | + inv_one, one_mul] | |
| 1031 | + | |
| 1032 | +/-- If a residue-field family `τ` acts on the image of `O.incl` at each chosen place as `s (.inl i)` | |
| 1033 | +and its transpose acts at each twist place as `(s (.inr i))ᵀ`, then `(O.chosenFirstBlock s)⁻¹ * τ` | |
| 1034 | +lies in `descentResidueLevel O.toLevelPlaces O.incl`. -/ | |
| 1035 | +private lemma inv_chosenFirstBlock_mul_mem_descentResidueLevel | |
| 1036 | + (τ : ∀ j : O.ChosenIndex ⊕ O.TwistIndex, GL n (ResField (O.placeAt j))) | |
| 1037 | + (s : ∀ j : O.ChosenIndex ⊕ O.TwistIndex, GL r (ResField (O.placeAt j))) | |
| 1038 | + (h_upper : ∀ i : O.ChosenIndex, (τ (.inl i)).val * | |
| 1039 | + inclMatrix (ResField (O.placeAt (.inl i))) O.incl = | |
| 1040 | + inclMatrix (ResField (O.placeAt (.inl i))) O.incl * (s (.inl i)).val) | |
| 1041 | + (h_lower : ∀ i : O.TwistIndex, (τ (.inr i)).valᵀ * | |
| 1042 | + inclMatrix (ResField (O.placeAt (.inr i))) O.incl = | |
| 1043 | + inclMatrix (ResField (O.placeAt (.inr i))) O.incl * (s (.inr i)).valᵀ) : | |
| 1044 | + (O.chosenFirstBlock s)⁻¹ * τ ∈ descentResidueLevel O.toLevelPlaces O.incl := by | |
| 1045 | + rintro (i | i) - | |
| 1046 | + · -- At a chosen place both `τ` and `O.chosenFirstBlock s` send `(1, 0)ᵀ` to its product with `s`. | |
| 1047 | + let e : Matrix n r (ResField (O.placeAt (.inl i))) := inclMatrix _ O.incl | |
| 1048 | + have h_eq : (τ (.inl i)).val * e = (O.chosenFirstBlock s (.inl i)).val * e := | |
| 1049 | + (h_upper i).trans (extendGL_mul_inclMatrix O.incl (s (.inl i))).symm | |
| 1050 | + have h_fix : (O.chosenFirstBlock s (.inl i))⁻¹.val * (τ (.inl i)).val * e = e := by | |
| 1051 | + rw [Matrix.mul_assoc, h_eq, ← Matrix.mul_assoc, Units.inv_mul, Matrix.one_mul] | |
| 1052 | + exact mem_stabilizer_col_iff.2 h_fix | |
| 1053 | + · rw [O.inv_chosenFirstBlock_mul_inr τ s i] | |
| 1054 | + exact (mem_rangeParabolic_iff O.incl).2 fun a b hb ↦ | |
| 1055 | + apply_eq_zero_of_transpose_mul_inclMatrix (h_lower i) a hb | |
| 1056 | + | |
| 1016 | 1057 | /-- Let `π` be a representation of `Gf E n`, the unitary group in `n` variables over the finite |
| 1017 | 1058 | adeles, and `y` a vector on which the group `O.levelGroup` acts by `O.levelChar`. Let `k` be in the |
| 1018 | 1059 | maximal level `stdLevel E n`, and let its reductions `τ_w` at the places of `O` be block triangular |
| @@ -1036,22 +1077,9 @@ lemma smul_chosenGLRep_eq_apply_of_triangular {V : Type*} [AddCommGroup V] [Modu | ||
| 1036 | 1077 | -- places and `1` at `Q`. Then `σ⁻¹ * τ` lies in the level, so for the lift `k₀` of `σ` the |
| 1037 | 1078 | -- element `k₀⁻¹ * k` acts on `y` by the level character. |
| 1038 | 1079 | let τ : ∀ j, GL n (ResField (O.placeAt j)) := reduceFamily O.placeAt k |
| 1039 | - let σ : ∀ j, GL n (ResField (O.placeAt j)) := | |
| 1040 | - firstBlockHom O.toLevelPlaces O.incl fun i ↦ s (.inl i) | |
| 1041 | - have h_twist (i : O.TwistIndex) : (σ⁻¹ * τ) (.inr i) = τ (.inr i) := by | |
| 1042 | - rw [Pi.mul_apply, Pi.inv_apply, show σ (.inr i) = 1 from rfl, inv_one, one_mul] | |
| 1043 | - have h_level : σ⁻¹ * τ ∈ descentResidueLevel O.toLevelPlaces O.incl := by | |
| 1044 | - rintro (i | i) - | |
| 1045 | - · -- At a chosen place both `τ` and `σ` send `(1, 0)ᵀ` to its product with `s`. | |
| 1046 | - let e : Matrix n r (ResField (O.placeAt (.inl i))) := inclMatrix _ O.incl | |
| 1047 | - have h_eq : (τ (.inl i)).val * e = (σ (.inl i)).val * e := | |
| 1048 | - (h_upper i).trans (extendGL_mul_inclMatrix O.incl (s (.inl i))).symm | |
| 1049 | - have h_fix : (σ (.inl i))⁻¹.val * (τ (.inl i)).val * e = e := by | |
| 1050 | - rw [Matrix.mul_assoc, h_eq, ← Matrix.mul_assoc, Units.inv_mul, Matrix.one_mul] | |
| 1051 | - exact mem_stabilizer_col_iff.2 h_fix | |
| 1052 | - · rw [h_twist] | |
| 1053 | - exact (mem_rangeParabolic_iff O.incl).2 fun a b hb ↦ | |
| 1054 | - apply_eq_zero_of_transpose_mul_inclMatrix (h_lower i) a hb | |
| 1080 | + let σ : ∀ j, GL n (ResField (O.placeAt j)) := O.chosenFirstBlock s | |
| 1081 | + have h_level : σ⁻¹ * τ ∈ descentResidueLevel O.toLevelPlaces O.incl := | |
| 1082 | + O.inv_chosenFirstBlock_mul_mem_descentResidueLevel τ s h_upper h_lower | |
| 1055 | 1083 | let k₀ : stdLevel E n := liftResidue σ |
| 1056 | 1084 | let c : ℂ := ∏ i : O.TwistIndex, (O.tamePart (O.placeAt (.inr i)))⁻¹ (s (.inr i)).val.det |
| 1057 | 1085 | have h_char : O.residueLevelChar ⟨σ⁻¹ * τ, h_level⟩ = c := by |
| @@ -1060,7 +1088,7 @@ lemma smul_chosenGLRep_eq_apply_of_triangular {V : Type*} [AddCommGroup V] [Modu | ||
| 1060 | 1088 | submatrix_eq_of_transpose_mul_inclMatrix (h_lower i) |
| 1061 | 1089 | change (O.tamePart (O.placeAt (.inr i)))⁻¹ |
| 1062 | 1090 | (((σ⁻¹ * τ) (.inr i)).val.submatrix O.incl O.incl).det = _ |
| 1063 | - rw [h_twist, h_first] | |
| 1091 | + rw [O.inv_chosenFirstBlock_mul_inr τ s i, h_first] | |
| 1064 | 1092 | have h_act : π (k₀⁻¹ * k).val y = O.residueLevelChar ⟨σ⁻¹ * τ, h_level⟩ • y.val := |
| 1065 | 1093 | levelSpace_levelOf_apply y.prop _ _ (by simp [k₀, τ, reduceFamily_liftResidue]) |
| 1066 | 1094 | -- The factors at the chosen places cancel the scalar `d` in the definition of `chosenGLRep`. |