| | @@ -0,0 +1,239 @@ |
| 1 | +# Erdős #530 in Lean: the plan for 74/75 (`visible_gap_75`) |
| 2 | + |
| 3 | +**Status: plan only.** `Plan.lean` (same folder, not imported from `ErdosSwarm.lean`) states |
| 4 | +every lemma below and compiles with `sorry` in the eleven new lemmas only. Check it with |
| 5 | +`lake env lean ErdosSwarm/Erdos530Gap75/Plan.lean` after `lake build`. |
| 6 | + |
| 7 | +**Targets** (`Plan.lean`, both proved there from the lemmas, with no `sorry` of their own): |
| 8 | + |
| 9 | +```lean |
| 10 | +theorem visible_gap_75_720 : -- milestone |
| 11 | + ∀ N : ℕ, 2 ^ 720 ≤ N → (Erdos530FC.ell N : ℝ) < (74 / 75) * Real.sqrt N |
| 12 | +theorem visible_gap_75 : -- target |
| 13 | + ∀ N : ℕ, 2 ^ 512 ≤ N → (Erdos530FC.ell N : ℝ) < (74 / 75) * Real.sqrt N |
| 14 | +``` |
| 15 | + |
| 16 | +The paper proof is `experiments/erdos530/upper-smaller-k3/NOTES.md` (verified independently in |
| 17 | +its `VERIFY.md`): Theorem 1 is a cover with `K = 2999/500` at `R = 32`, and Theorem 2 gives |
| 18 | +`ℓ(N) < 0.986629·√N < (74/75)·√N` for `N ≥ 2^512`. |
| 19 | + |
| 20 | +## What the plan claims, and what it does not |
| 21 | + |
| 22 | +* **74/75, not 0.986629.** The Lean size bound is `graph_size_96` (`|U| < (1 + 96λ)m`). With |
| 23 | + it the limiting coefficient of the `K = 5.998` cover is `0.986636`, which is below `74/75 |
| 24 | + = 0.986667` but above `0.986629`. The paper's `0.986629` uses the sharper `(1 + 95λ)m + 1` |
| 25 | + of the note's (7). That would be a new proof of the B3 chain and is **not** part of this |
| 26 | + plan; it is listed under "Not planned" below. |
| 27 | +* **Two thresholds.** At `2^720` only the cover and the numerals change (stages 1–2). At |
| 28 | + `2^512` the two-stage cover's count is too large (`160·m^(-1/8)·(log m)/8 ≈ 7·10⁻⁷` at |
| 29 | + `m = 2^256`, against a tail rate of about `7·10⁻⁹`), so the three-pass outer cover of |
| 30 | + `upper-threshold/NOTES.md` §§1–4, 6 is needed, and none of it is in Lean (stage 3). |
| 31 | +* **Computation behind the plan** (run this turn, scripts in |
| 32 | + `experiments/erdos530/upper-smaller-k3/`): |
| 33 | + * `tail75_check.py` (log `tail75_check.log`, 80-digit decimals): with `δ = 0.03596`, |
| 34 | + tilt `1.0003`, `η = 10⁻⁹`: `(1 − δ − η)(74/75)² − (31/32)² = 2.71·10⁻⁵ > 0`; at |
| 35 | + `m = 2^360` the worst vertex plus the counts is `−6.61·10⁻⁹·m`; at `m = 2^256` with the |
| 36 | + three-pass count it is `−4.10·10⁻⁹·m`. |
| 37 | + * `plan75_defs_check.py` (log `plan75_defs_check.log`, exact rationals): the definitions |
| 38 | + `overlap`, `num`, `share`, `gridIso` of `Plan.lean`, transcribed, satisfy |
| 39 | + `share_add_share` on 59,530 admissible `(g, i, j)` and the coupled rounding (4) of the |
| 40 | + note (image node, inverse isometry `= isoInv`, equal rounded weight, shares adding to |
| 41 | + one) on 133,070 random doubles; `W(0) = 2929/700`; the cover error is `< 2/1000`. |
| 42 | + These support the statements; they prove nothing in Lean. |
| 43 | + |
| 44 | +## How the lemmas imply the targets |
| 45 | + |
| 46 | +`cover75` (stage 1) is `cover_of_inputs (charging P) missing_energy (seed_lower_of_grid hP)` |
| 47 | +for the table `P` given by `grid_lower`. `visible_gap_75_720` applies |
| 48 | +`visible_gap_75_720_of_parts` to `cover75`, the accepted `indepTail_holds`, `refined_count`, |
| 49 | +`refined_leaf`, `graphSize96_holds` (all of `Erdos530Gap78`, unchanged) and `pair_tail_75`. |
| 50 | +`visible_gap_75` is the same with `three_pass_cover`, `pair_tail_75_512` and |
| 51 | +`visible_gap_75_of_parts`. The steps inside the two assemblies are those of |
| 52 | +`Erdos530Gap78/PLAN.md`, "How the lemmas imply the target", with `7` replaced by `K`. |
| 53 | + |
| 54 | +## Reused unchanged (accepted, imported through `Erdos530Gap78.Main78`) |
| 55 | + |
| 56 | +`IndepTail`, `RefinedCount`, `RefinedLeaf`, `GraphSize96` with their proofs; `tilt`, |
| 57 | +`refinedLog`, `level532`; `Erdos530Gap103.cover_of_outsider_bound`, `incidence`, |
| 58 | +`exceptional_card_32`, `leaf_census`, `leaf_count`, `coord`, `iso`, `isoInv`, `isoR`, |
| 59 | +`coord_iso`, `recordLog`, `entropy_and_error_103`; `Erdos530Gap.host`, `seedSize`, |
| 60 | +`coverLog`, `deletionLaw`, `trim_survivors`, `ell_lt_of_host`, `bernoulli_card_hoeffding`, |
| 61 | +`finite_union_bound`; `Erdos530Gap78.missing_energy_of_kernel` (generic in the kernel) and |
| 62 | +the shift-integral lemmas of `Erdos530Gap103/Rounding.lean` (`shiftMeasure`, `shiftStep`, |
| 63 | +`integral_shiftStep_eq`, generic in the mesh function). The rounding lemma, `second_occurrence`, the grid checker and its data are **not** |
| 64 | +reusable: the score is a different object. |
| 65 | + |
| 66 | +## What changes against 77/78 |
| 67 | + |
| 68 | +| | 77/78 (`Erdos530Gap78`) | 74/75 (this plan) | |
| 69 | +|---|---|---| |
| 70 | +| `K`, `s` | `7`, `7.999` | `2999/500`, `6.997` | |
| 71 | +| kernel | tent `5` (area `7/10`) + tent `1/24` (area `3/10`), `W(0) = 367/50` | (1): `T_{1/16}/4 + (4T₁+2T₂+7T₃+10T₄+5T₅+37T₆+10T₇)/100`, `W(0) = 2929/700` | |
| 72 | +| mesh | `1/24`, nodes `0…768` | `1/16`, nodes `0…512` | |
| 73 | +| score | deterministic `score t y gy` from one endpoint profile `ψ` | `score P t y neg r = ∫₀¹ roundedScore`, the share read from the table `P` at the overlap `l` of the two rounded hosts; both occurrences see the same rounded distance | |
| 74 | +| rounding | "some shift is at most the mean" (`rounding`) | the grid bound holds at **every** shift and is integrated (`seed_lower_of_grid`) | |
| 75 | +| grid threshold | `32 + 15/1000` (cover uses `14/1000`) | `32 + 2/1000` for both (cover error `0.001465`) | |
| 76 | +| certificate | 113 box witnesses, 92 KB | to be measured (A3b-0), see below | |
| 77 | +| `δ` | `0.036925` | `0.03596` | |
| 78 | +| outer cover at the final threshold | two-stage, `m ≥ 2^240`, tail at `m ≥ 2^360` | the same for the milestone; three passes for `2^512` | |
| 79 | + |
| 80 | +## The lemmas |
| 81 | + |
| 82 | +Estimates are agent turns (about one hour) for a member who knows the `Erdos530Gap78` files. |
| 83 | + |
| 84 | +| Brief | Lemma (`Plan.lean`) | Source | Deps | Estimate | |
| 85 | +|---|---|---|---|---| |
| 86 | +| D0 | move the definitions (`K` … `isoShift`, `Allocation`, `delta`, `eta`) to `Erdos530Gap75/Data.lean`, imported from the root | — | — | 1, starter | |
| 87 | +| A1a | `share_add_share` | note §2 (5) | D0 | 1, starter (integer case split on `g.1`, the sign of `g.2`, full overlap) | |
| 88 | +| A1b | `charging : Charging P` | note §1 property 1, §2 (4) and last ¶ | A1a | 3–4 | |
| 89 | +| A2 | `missing_energy : MissingEnergy` | note §1, display before (3) | D0 | 1, starter (`missing_energy_of_kernel` + the right-endpoint sum of eight tents, as `Energy.lean`) | |
| 90 | +| A3b | `grid_lower : ∃ P, GridLower P` | note §3, `allocations-32.json`, `check.py` | D0 | split A3b-0 … A3b-4 below, 7–10 in total | |
| 91 | +| A3ac | `seed_lower_of_grid : GridLower P → SeedLower P` | note §2 (4), §3 last ¶ | D0 | 3 | |
| 92 | +| A4 | `cover_of_inputs : Charging P → MissingEnergy → SeedLower P → Cover75` | note §1 (3), Theorem 1 | D0 (inputs are hypotheses) | 2 (copy of `Erdos530Gap78/Cover.lean`) | |
| 93 | +| B4′ | `pair_tail_75 : PairTail75` | note §4, `tail75_check.py` | D0 | 1–2 (copy of `Parameters.lean`, new cubic Taylor numerals) | |
| 94 | +| B5′ | `visible_gap_75_720_of_parts` | note §4 | D0 | 2 (copy of `Assembly.lean` l. 212–450; or first generalise it over `(K, δ, c)`) | |
| 95 | +| C | `three_pass_cover : … → Cover75At512` | upper-threshold §§1–4, 6; upper-threshold-k7 §1; note §4 | A-inputs as hypotheses | split C0 … C6 below, 15–25 in total | |
| 96 | +| C7 | `pair_tail_75_512 : PairTail75At512` | note §4, `tail75_check.py` | D0 | 1–2 | |
| 97 | +| C8 | `visible_gap_75_of_parts` | note §4 | D0, B5′ | 1–2 (host bounds and Hoeffding at `2^512`) | |
| 98 | + |
| 99 | +Stage 1 + stage 2 (the milestone `visible_gap_75_720`): about 22–27 turns, most of them in |
| 100 | +A1b, A3ac and A3b. Stage 3: 17–29 more. |
| 101 | + |
| 102 | +### Notes on the statements |
| 103 | + |
| 104 | +* **`Allocation`** is any table of heights in `[0, 1]`. `share_add_share`, `charging` and |
| 105 | + `seed_lower_of_grid` hold for every table; only `grid_lower` is about the published one. So |
| 106 | + A1, A3ac and A4 do not wait for the data. |
| 107 | +* **`share`.** For `T = iso g` and `J = [0, 512]`, `overlap g = |J ∩ T⁻¹J| − 1` (for a |
| 108 | + translation `512 − |c|`, for a reflection `c` or `1024 − c`), `num` numbers `J` from its |
| 109 | + end inside the overlap, `shareNum` is (5), and at full overlap the two numberings are |
| 110 | + averaged. The seed node outside the overlap gets full credit (`l < j`). |
| 111 | +* **`gridIso`** is (4): `T(j) = σj − ⌊σv − 16r⌋ − 1_{σ=−1}`; the coupled shift of the image |
| 112 | + is `v′ = {σv − 16r}`, and the pair `(g⁻¹, v′)` returns `(isoInv T, v)`. |
| 113 | +* **`Charging P`** has the hypotheses of `Erdos530Gap78.second_occurrence` verbatim. The |
| 114 | + fact `g_z = g_x⁻¹` used by the note follows from them: the hypothesis applied to `(p, p′)` |
| 115 | + and to `(p′, p)` shows that `iso (g z)` and `(iso (g x))⁻¹` agree at the two distinct |
| 116 | + points `z ∈ B`, `c ∈ S`. Proof sketch for A1b: for a double, the change of variable |
| 117 | + `v ↦ v′` (measure preserving on `[0, 1)`) and `share_add_share` give |
| 118 | + `score(x, a) + score(z, c) = ∫ gridWeight(r_v(u_a) − r_v(u_x)) dv = W(u_a − u_x)` |
| 119 | + (`integral_shiftStep_eq` with mesh 16); a single has `share ≤ 1`. |
| 120 | +* **`GridLower P`** quantifies over all integer isometries `g` with `g(i)` in the host, as |
| 121 | + the checker does over `0 ≤ i ≤ l ≤ 512` (both orientations at `l = 512`). |
| 122 | +* **`SeedLower P`**: for each `v`, `u_j = w·#{a : ⌊16 y_a + v⌋ = j}` has mass `|S|w`, the |
| 123 | + node `i = ⌊16t + v⌋` and `gridIso neg r v` are admissible for almost every `v` (the image |
| 124 | + of `i` is `⌊16 g(t) + v′⌋ ∈ [0, 512]`), so `GridLower` gives `32 + 2/1000 <` the grid |
| 125 | + functional; its integral over `v` is the continuous functional (energy: knots on the mesh; |
| 126 | + score: definition). Strictness survives the integral because the bound is uniform. |
| 127 | +* **A4 arithmetic** (checked exactly in `plan75_defs_check.py`): |
| 128 | + `1024·(2929/700)·367/2^30 = 0.0014645 < 2/1000` and `s + ε − 1 + 32/m < K`. |
| 129 | + |
| 130 | +### The certificate (A3b): size risk and the measured facts |
| 131 | + |
| 132 | +The published checker certifies the 131,841 pairs `(i, l)` with **9,541 charge vectors** |
| 133 | +(one per terminal interval of overlaps, 513 entries, multiples of `2^-22`). Stored and |
| 134 | +checked like the 102/103 grid that is about `9541·513·6` hex digits ≈ **29 MB** of Lean |
| 135 | +source and, by the 102/103 ratio (385 vectors of 769 entries: 40 kernel-minutes), about |
| 136 | +**11 kernel-hours**. That is not acceptable for `check.sh`, exactly as in A3b-0 of the 77/78 |
| 137 | +plan (14,550 vectors there). |
| 138 | + |
| 139 | +What makes a compact certificate likely: |
| 140 | + |
| 141 | +* **Slack (measured).** `verify_k3_all32.log` replays every pair with its own charges and |
| 142 | + finds the least certified value `32.025136` at `(i, l) = (16, 497)`. The Lean threshold is |
| 143 | + `32.002`. The slack `0.023` is eleven times the `0.002` that the 77/78 box witnesses had |
| 144 | + (`32.01702` against `32.015`). The published `0.004049` is the least over *intervals* of |
| 145 | + overlaps, not the minimum of the functional. |
| 146 | +* **Box structure.** The grid matrix is `G = Σ_{h=1}^{7} γ_h B_hᵀB_h + 4·Id`, with |
| 147 | + `γ_h = c_h/(1600 h²)`, `c = (4, 2, 7, 10, 5, 37, 10)` and `B_h` the indicators of the |
| 148 | + integer intervals of length `16h` (note §3). So inequality (1) of |
| 149 | + `grid-certificate-78/NOTES.md` generalises with seven box vectors: |
| 150 | + `uᵀGu + 2Zᵀu ≥ 2Aℓ − Σ_h γ_h‖x_h‖² − (1/4)Σ_j (ℓ − Σ_h γ_h (B_hᵀx_h)_j − Z_j)₊²`. |
| 151 | +* **Table structure.** For `l ≥ 2r` the heights depend on `i` only through the distance to |
| 152 | + the two ends (`allocations-32.json`: 48 entries, 60 KB), so one witness can serve an |
| 153 | + interval of centres and of overlaps, as one 77/78 witness served an interval of centres and |
| 154 | + a block of peaks. The case count is 2.2 times smaller than for 77/78 (131,841 pairs against |
| 155 | + about 296,000 centre–peak pairs: 385 centres with about 770 admissible peaks each). |
| 156 | + |
| 157 | +By that analogy I expect 100–300 witnesses, 100–400 KB and a few kernel-minutes. **This is an |
| 158 | +estimate, not a measurement**; A3b-0 has to produce the number, and it is the main risk of |
| 159 | +stage 1. If no compact format is found, the fallback is to shard the 29 MB (about 60 files of |
| 160 | +500 KB), which costs hours of `check.sh` and should be refused. |
| 161 | + |
| 162 | +* **A3b-0** (experiment, Python, do first). `experiments/erdos530/grid-certificate-75/`: |
| 163 | + a generator of seven-box witnesses for the `R = 32` table at threshold `32 + 2/1000`, an |
| 164 | + exact integer verifier, the data file, and the measured size and integer-replay time. |
| 165 | + Acceptance: every `(i, l)`, `0 ≤ i ≤ l ≤ 512` (both numberings at `l = 512`), covered with |
| 166 | + margin above `32 + 2/1000`; data below 1 MB; estimated kernel time below 60 minutes. |
| 167 | +* **A3b-1.** `alloc32 : Allocation` in Lean: the table as integer data (denominator `2^14`), |
| 168 | + its decoder (bands `0, 12, 24, 40, 56, 80`, sign row, floor of the interpolated numerator, |
| 169 | + radius entries) and `mem`. A Python cross-check that the Lean decoder and |
| 170 | + `verify_k3.py` agree on every `(l, i, d)`. 2 turns. |
| 171 | +* **A3b-2.** `gridCheck75` (`ℕ`/`ℤ` only) for the A3b-0 format, in the style of |
| 172 | + `Erdos530Gap78/GridCheck.lean` (packed evaluation, `Nat.rec` loops, no `match` on numerals |
| 173 | + in the inner loop). 2 turns. |
| 174 | +* **A3b-3.** The bridge: `gridCheck75 … = true` gives `GridLower alloc32` on the covered |
| 175 | + `(i, l)`; the algebra is the seven-box inequality above. 2–3 turns. |
| 176 | +* **A3b-4.** The data shards (`decide +kernel`), the coverage lemma and `grid_lower`. 1 turn. |
| 177 | + |
| 178 | +### Stage 3 (`2^512`): the three-pass cover |
| 179 | + |
| 180 | +`Cover75At512` asks for a family at `m ≥ 2^256` with members of size at most `(1 + Kτ)m` |
| 181 | +(the note has `a < 1.187406386`, and `1 + Kτ = 1.1874375`), covering every Sidon set of size |
| 182 | +`≥ seedSize M τ`, with at most `exp(outerRate·m)` members, `outerRate = 1.4012·10⁻⁹`. The |
| 183 | +note's §4 states this number for the outer transcripts *together with* the refined pairs and |
| 184 | +the factor `M + 1` at `m = 2^256`, and says the normalised count decreases with `m`; the |
| 185 | +outer count alone is smaller. `PairTail75At512` charges the refined count again and still |
| 186 | +has `−4.1·10⁻⁹·m` (`tail75_check.py`). **Corners.** The note's §4 uses two corners and the |
| 187 | +line (7) between them with `95λ`; the Lean tail keeps the three ranges of |
| 188 | +`Erdos530Gap78/Parameters.lean` (`affine_tail`, cut at `λ₀ = 4·10⁻⁶` and `λ* = Kτ/96`, with |
| 189 | +extreme points `(1 + 52m^(-1/8), 1 + 96λ₀)`, `(1 − λ₀, 1 + 96λ₀)`, `(1 − λ*, 1 + Kτ)`) and |
| 190 | +one tilt, which is enough for `74/75` at both thresholds. |
| 191 | + |
| 192 | +None of `upper-threshold/NOTES.md` §§1–4, 6 is in Lean (the 102/103 follow-up to lower the |
| 193 | +threshold was never opened). I have not written Lean statements for its parts; **C0 is that |
| 194 | +plan**, and C1–C6 are the expected split along the sections of the note: |
| 195 | + |
| 196 | +* **C0.** A `Plan512.lean` + section in this file: statements for C1–C6 that compile with |
| 197 | + `sorry` and imply `three_pass_cover`. 2 turns. It must also fix the exact count formula |
| 198 | + (`H₀ + Σ_i w_i(1 + log(1/ρ_i)) + 3 log(M+1)/m`, upper-threshold-k7 §1 "Count") and prove |
| 199 | + on paper that it is at most `outerRate` for every `m ≥ 2^256`, not only at `2^256`. |
| 200 | +* **C1.** The first family of containers and its fingerprint count `H₀` (upper-threshold §1). |
| 201 | +* **C2.** Recording a graph refinement at fixed thresholds: record width |
| 202 | + `w_i = c_{+,i} O_{i−1}` (§2). |
| 203 | +* **C3.** Packing isometries: the listed inverse-closed heavy maps and the count |
| 204 | + `b_m m²` of discarded incidences (§3). This replaces `Erdos530Gap103.incidence`. |
| 205 | +* **C4.** The outsider bounds of passes 1 and 2 (§4, residuals `−0.028`, `−0.171`); their |
| 206 | + grids are the accepted rows of `Erdos530Gap` if the parameters `(h, β) = (100, 1.14)`, |
| 207 | + `(100, 0.51)` match — to be checked in C0. |
| 208 | +* **C5.** The final pass with `t₃ = s/32`, `s = 6.997`: `(h, β) = (1000, 0.26)`, error |
| 209 | + `R²W(0)(1/m + 2b_m) < 2.62·10⁻²⁰`, closed by `Charging`, `MissingEnergy`, `SeedLower` |
| 210 | + (the hypotheses of `three_pass_cover`); `R·c₊·0.51 < 10⁻⁵` gives the seed mass. |
| 211 | +* **C6.** The transcript count (§6) and the assembly of `Cover75At512`. |
| 212 | + |
| 213 | +### Not planned here |
| 214 | + |
| 215 | +* The coefficient `0.986629` (needs `(1 + 95λ)m + 1` in B3 and per-class tilts). |
| 216 | +* The limsup `≤ 0.98662345` of Theorem 2 (needs the sharp graph mean and Lemma 4 of |
| 217 | + `upper-deletion-constant`, neither in Lean). |
| 218 | +* The row `R = 100`. |
| 219 | +* A cheaper intermediate threshold: with the two-stage cover the count term |
| 220 | + `160·m^(-1/8)(1 + (log m)/8 − log 32)` is below the tail rate from about `m = 2^320` |
| 221 | + (`N ≥ 2^640`); it needs a new `entropy_and_error` at that `m` and gains little. |
| 222 | + |
| 223 | +## Briefs the operator can open as tasks |
| 224 | + |
| 225 | +Each brief names its lemma in `Plan.lean`. Criterion for a Lean brief: the lemma's exact |
| 226 | +statement (copied from `Plan.lean`, closed by an `example` through `import ErdosSwarm`) is |
| 227 | +proved in a new file of `ErdosSwarm/Erdos530Gap75/` imported from `ErdosSwarm.lean`, |
| 228 | +`scripts/check.sh` passes, no `sorry`/`native_decide`, nothing in `Results.lean`. |
| 229 | + |
| 230 | +1. **D0** (starter) `Data.lean` with the definitions; `Plan.lean` imports it. |
| 231 | +2. **A1a** (starter) `share_add_share`. |
| 232 | +3. **A2** (starter) `missing_energy`. |
| 233 | +4. **A3b-0** the certificate experiment (Python only). Can start at once. |
| 234 | +5. **A4** `cover_of_inputs`, **B4′** `pair_tail_75`, **B5′** `visible_gap_75_720_of_parts`: |
| 235 | + independent of each other, after D0. |
| 236 | +6. **A1b** `charging` after A1a; **A3ac** `seed_lower_of_grid` after D0. |
| 237 | +7. **A3b-1 … A3b-4** after A3b-0 is accepted. |
| 238 | +8. **Main75.lean**: `cover75`, `visible_gap_75_720` exported (the milestone), after 2–7. |
| 239 | +9. **C0**, then **C1 … C6**, **C7**, **C8**, then `visible_gap_75` exported. |