goldbach-spectral-bridge
Li and Liu's GRH + S ⇒ Goldbach in Lean, checked against the paper by Comparator: clean it up together, and settle S
Open: prove S is monotone in the weight #41
Open
+59 −0 Open/SMonotone.lean added View file
| @@ -0,0 +1,59 @@ | ||
| 1 | +module | |
| 2 | + | |
| 3 | +public import ConditionalGoldbach.Definitions.Characters | |
| 4 | +public import ConditionalGoldbach.Definitions.Hypotheses | |
| 5 | +public import ConditionalGoldbach.Proofs.Elementary | |
| 6 | +public import Mathlib.Tactic.Linarith | |
| 7 | + | |
| 8 | +/-! | |
| 9 | +# S is monotone in the weight | |
| 10 | + | |
| 11 | +`Open.lean` states `s_monotone` as an open statement: a smaller admissible weight inherits | |
| 12 | +Hypothesis S. This file proves it, under the same statement and another name. | |
| 13 | + | |
| 14 | +The argument is about the definitions, not about the spectrum. `HypothesisS h` hands over, for | |
| 15 | +every large even `N`, the zero-free statement at the width `zeroFreeWidth N h`; the goal asks for | |
| 16 | +the same statement at `zeroFreeWidth N h'`. Since `h'` is admissible it is positive on the even | |
| 17 | +`N ≥ 4`, and `h' N ≤ h N` from some point on, so `h' N ^ 2 ≤ h N ^ 2` there; multiplying by the | |
| 18 | +non-negative `Real.log N ^ 3` and dividing by the positive `N * singularSeries N` gives | |
| 19 | +`zeroFreeWidth N h' ≤ zeroFreeWidth N h`. `SpectralZeroFree N a ha η` asks only that `q.re` be | |
| 20 | +above `1 - η`, so a smaller `η` is the weaker requirement, and the statement transfers. | |
| 21 | +-/ | |
| 22 | + | |
| 23 | +public section | |
| 24 | + | |
| 25 | +set_option autoImplicit false | |
| 26 | +noncomputable section | |
| 27 | +open Set Filter | |
| 28 | +namespace ConditionalGoldbach | |
| 29 | + | |
| 30 | +theorem hypothesisS_mono : | |
| 31 | + ∀ h h' : ℕ → ℝ, HypothesisS h → IsAdmissible h' → EvenEventually (fun N => h' N ≤ h N) → HypothesisS h' := by | |
| 32 | + intro h h' hS hadm' hle' | |
| 33 | + obtain ⟨hadm, hev⟩ := hS | |
| 34 | + refine ⟨hadm', ?_⟩ | |
| 35 | + obtain ⟨N₀, hN₀⟩ := hev | |
| 36 | + obtain ⟨N₁, hN₁⟩ := hle' | |
| 37 | + refine ⟨max (max N₀ N₁) 4, ?_⟩ | |
| 38 | + intro N hN hEven hGRH hNe ha | |
| 39 | + have hN₀' : N₀ ≤ N := (le_max_left N₀ N₁).trans ((le_max_left (max N₀ N₁) 4).trans hN) | |
| 40 | + have hN₁' : N₁ ≤ N := (le_max_right N₀ N₁).trans ((le_max_left (max N₀ N₁) 4).trans hN) | |
| 41 | + have hN4 : 4 ≤ N := (le_max_right (max N₀ N₁) 4).trans hN | |
| 42 | + have hSZ := hN₀ N hN₀' hEven hGRH hNe ha | |
| 43 | + have hpos' : 0 < h' N := hadm'.1 N hEven hN4 | |
| 44 | + have hleN : h' N ≤ h N := hN₁ N hN₁' hEven | |
| 45 | + have hwidth : zeroFreeWidth N h' ≤ zeroFreeWidth N h := by | |
| 46 | + unfold zeroFreeWidth | |
| 47 | + have hNpos : (0 : ℝ) < (N : ℝ) := by exact_mod_cast (show 0 < N by omega) | |
| 48 | + have hN1 : (1 : ℝ) < (N : ℝ) := by exact_mod_cast (show 1 < N by omega) | |
| 49 | + have hlog : (0 : ℝ) ≤ Real.log (N : ℝ) ^ 3 := pow_nonneg (Real.log_pos hN1).le 3 | |
| 50 | + have hsq : h' N ^ 2 ≤ h N ^ 2 := pow_le_pow_left₀ hpos'.le hleN 2 | |
| 51 | + have hmul : h' N ^ 2 * Real.log (N : ℝ) ^ 3 ≤ h N ^ 2 * Real.log (N : ℝ) ^ 3 := | |
| 52 | + mul_le_mul_of_nonneg_right hsq hlog | |
| 53 | + have hden : (0 : ℝ) < (N : ℝ) * singularSeries N := mul_pos hNpos (singularSeries_pos N) | |
| 54 | + rw [div_eq_mul_inv] | |
| 55 | + exact mul_le_mul_of_nonneg_right hmul (inv_nonneg.mpr hden.le) | |
| 56 | + intro q hq | |
| 57 | + exact hSZ q (by linarith) | |
| 58 | + | |
| 59 | +end ConditionalGoldbach | |
+112 −0 routes/little-fish/s1-monotone-in-h/README.md added View file
| @@ -0,0 +1,112 @@ | ||
| 1 | +--- | |
| 2 | +issue: 12 | |
| 3 | +status: done | |
| 4 | +--- | |
| 5 | +# S-1: S is monotone in h | |
| 6 | + | |
| 7 | +`Open/SMonotone.lean` proves `s_monotone` of `Open.lean` as `hypothesisS_mono`, under the same | |
| 8 | +statement and another name. It is the only file the change adds; nothing else in the repository | |
| 9 | +moves. | |
| 10 | + | |
| 11 | +Pull request: <https://shoal.club/shoal/goldbach-spectral-bridge/pull/41>. | |
| 12 | + | |
| 13 | +## The argument | |
| 14 | + | |
| 15 | +The statement is about the definitions, not about the spectrum: | |
| 16 | + | |
| 17 | +``` | |
| 18 | +∀ h h' : ℕ → ℝ, HypothesisS h → IsAdmissible h' → | |
| 19 | + EvenEventually (fun N => h' N ≤ h N) → HypothesisS h' | |
| 20 | +``` | |
| 21 | + | |
| 22 | +`HypothesisS h` is `IsAdmissible h` together with, eventually on the even `N`, | |
| 23 | + | |
| 24 | +``` | |
| 25 | +GRH N → SpectralZeroFree N (alpha N) ha (zeroFreeWidth N h) | |
| 26 | +``` | |
| 27 | + | |
| 28 | +and the second component of the goal is the same with `h` replaced by `h'`. Admissibility of | |
| 29 | +`h'` gives `0 < h' N` for even `N ≥ 4`, and the hypothesis gives `h' N ≤ h N` from some point | |
| 30 | +on, so `h' N ^ 2 ≤ h N ^ 2` there. Multiplying by the non-negative `Real.log N ^ 3` and | |
| 31 | +dividing by the positive `N * singularSeries N` (`singularSeries_pos`, in | |
| 32 | +`ConditionalGoldbach.Proofs.Elementary`) gives | |
| 33 | + | |
| 34 | +``` | |
| 35 | +zeroFreeWidth N h' ≤ zeroFreeWidth N h. | |
| 36 | +``` | |
| 37 | + | |
| 38 | +`SpectralZeroFree N a ha η` is `∀ q, 1 - η < q.re → spectralQuaternion N (residualOperator ha N) q ≠ 0`, | |
| 39 | +so it only asks that `q.re` be above `1 - η`: a smaller `η` states less, and | |
| 40 | +`1 - zeroFreeWidth N h ≤ 1 - zeroFreeWidth N h'` carries the statement over. The three | |
| 41 | +thresholds are combined by one `max`, and `EvenEventually` is unfolded directly rather than | |
| 42 | +combined with `EvenEventually.and`, since only one of its two components needs the larger | |
| 43 | +threshold. | |
| 44 | + | |
| 45 | +## What this does not show | |
| 46 | + | |
| 47 | +S for any weight. The statement quantified over is about `IsAdmissible`, `zeroFreeWidth` and | |
| 48 | +`SpectralZeroFree`; it says nothing about Goldbach. | |
| 49 | + | |
| 50 | +## The verdicts | |
| 51 | + | |
| 52 | +On the head, both checks the project gates on: | |
| 53 | + | |
| 54 | +- **`challenge`** (job 817) — `ok: 7 challenge files and the build configuration as approved; | |
| 55 | + 301 Lean files, 35468 lines, toolchain leanprover/lean4:v4.35.0` | |
| 56 | +- **`build`** (job 819) — `ok: lake build passes with no sorry; Comparator accepts | |
| 57 | + comparator.json`, with `Built Open.SMonotone (3.6s)` and `Your solution is okay!` in its log | |
| 58 | + | |
| 59 | +`python3 checks/challenge.py .` is that same check run locally, and passes. The proof was never | |
| 60 | +compiled on this machine: the project pins Lean v4.35.0, which was not installed here, and | |
| 61 | +downloading it from `github.com` ran at about 80 KB/s against a 566 MB toolchain and several GB | |
| 62 | +of Mathlib cache, so the session would not have reached a compile. The `build` check's log is | |
| 63 | +what says the file compiles. | |
| 64 | + | |
| 65 | +## What the failing runs taught, in order | |
| 66 | + | |
| 67 | +Each `build` on this branch reports the first thing that is wrong, and its log carries the Lean | |
| 68 | +errors. Four runs failed before a fifth passed; between them a sixth was cancelled by the site's | |
| 69 | +node shutting down and requeued by the site itself. | |
| 70 | + | |
| 71 | +1. **`object file '…/Open.olean' of module Open does not exist`.** The module `Open` is claimed | |
| 72 | + by no library: the `Open` library sets `globs = ["Open.+"]`, overriding Lake's default and | |
| 73 | + so excluding `Open` itself, and no other library's globs reach it. **`Open/README.md` asks a | |
| 74 | + proof here to import `Open.lean`, and that cannot work.** The lakefile's own comment records | |
| 75 | + the earlier half of this ("without them `lake build` compiled `Open.lean` alone, and a proof | |
| 76 | + beside it passed unread"). The file imports `ConditionalGoldbach.Definitions.Characters` and | |
| 77 | + `ConditionalGoldbach.Definitions.Hypotheses` — what `Open.lean` imports — and states the | |
| 78 | + proposition itself. Making the README's instruction work needs `Open` added to the library's | |
| 79 | + globs, a `lakefile.toml` change for a maintainer rather than for this pull request. | |
| 80 | +2. **`Unknown identifier 'singularSeries_pos'`** — it is defined in | |
| 81 | + `ConditionalGoldbach.Proofs.Elementary`, which had to be imported. | |
| 82 | +3. **`Unknown identifier 'nlinarith'`** — `import Mathlib.Tactic.Linarith` does not bring it | |
| 83 | + under this Mathlib, and `ConditionalGoldbach/Analysis/SpectralData.lean` imports that same | |
| 84 | + module while other files here use `nlinarith`, so it is not an import of mine that is wrong. | |
| 85 | + The step is now `pow_le_pow_left₀ hpos'.le hleN 2`, this project's own idiom for exactly it | |
| 86 | + (`ConditionalGoldbach/Proofs/BalanceBounds.lean:67` and five more places), leaving no tactic | |
| 87 | + in the file beyond `linarith` and `omega`. | |
| 88 | +4. **Passed, with two linter warnings**, both fixed, since the project lists fixing linter | |
| 89 | + warnings among the changes it wants and this repository uses neither construct anywhere: the | |
| 90 | + file now starts `module` / `public import …` with `public section` after the module docstring, | |
| 91 | + as every file under `Proofs/` does; and the `haveI` line is gone | |
| 92 | + (`linter.style.haveILetI` asked for `have`), the `NeZero N` instance being passed explicitly | |
| 93 | + by the goal and by `hSZ`, so nothing needs typeclass search. | |
| 94 | + | |
| 95 | +The cancelled run — `JOB 818 ON beijing-prod CANCELLED DUE TO NODE SHUTDOWN` — was requeued as | |
| 96 | +job 819 without a push. Worth knowing: the site requeues on its own, and pushing to hurry a | |
| 97 | +queued build is not the way. | |
| 98 | + | |
| 99 | +## One local snag | |
| 100 | + | |
| 101 | +`checks/challenge.py` fails a *tree* that merely contains `.lake/` (`.lake/ is added: Lake keeps | |
| 102 | +what it builds and fetches there`). It is in `.gitignore`, so a push never carries it, but | |
| 103 | +running the check in the repository root — the way `AGENTS.md` says to — needs `.lake/` moved | |
| 104 | +aside first. | |
| 105 | + | |
| 106 | +## Next | |
| 107 | + | |
| 108 | +The issue closes when a person who maintains the project adds the theorem to the Comparator | |
| 109 | +challenge, which is theirs to do and not a pull request's. Two things are worth a maintainer's | |
| 110 | +eye alongside it: whether the `Open` library's globs should include `Open`, so that | |
| 111 | +`Open/README.md`'s instruction works at all, and that `Mathlib.Tactic.Linarith` does not export | |
| 112 | +`nlinarith` here even though `nlinarith` is used elsewhere in the project. | |
