# 0018 · DERIVATION — the witness-prefix ascent on the 83# rung Companion to `research-programme.md`. Labels: **proved** / **verified** / **measured** / **extrapolated** (explicitly not a measurement) / **refuted**. Scripts: `scripts/witness.py` (the witness arithmetic and the counting bound), `scripts/ascent.sh` (the ascent driver), `scripts/cost.py` (the cost model). The search **engine** is 0017's `../0017/scripts/jtwin` (complete two-class covering search, self-checking); 0018 owns the ascent, not a second engine. **This programme proves nothing about primes.** It formalises an ascent on the *lower* edge of the `G₂` ladder at `83#`, corrects an understatement in 0017, proves that no cheap certificate can replace the search, and measures what the search costs. --- ## 1. Setting Fix `n`, let `P = (p_1, …, p_n)` be the primes `5, …, p_n`, and put `c_p = 2·6^{-1} (mod p)`. - A **configuration** is a tuple `a = (a_p)_p` with `a_p ∈ Z/p`. - Its **covered set** is `C(a) = ⋃_p { a_p, a_p + c_p } (mod p) ⊂ Z`, periodic mod `P' = ∏ p`. - Its **prefix** is `pre(a) = min{ j ≥ 0 : j ∉ C(a) }` (finite for every `a`: the survivor set is non-empty). - `R(n)` is the maximal `R` for which some configuration covers `[0, R−1]`; by 0017's Lemma 2.2, `A144311(n+2) = 6·R(n) + 5` and `G₂(p_n#) = 6·R(n) + 6`. The 83# rung is `n = 21` (`p₂₁ = 83`), so `A144311(23) = 6·R(21) + 5`. Published anchor: `A144311(22) = 1709 = 6·284 + 5`, i.e. `R(20) = 284`. ## 2. Lemma 1 (a witness certifies its prefix) **Lemma 1.** *For every configuration `a`, `[0, pre(a) − 1] ⊆ C(a)`. Hence `R(n) ≥ pre(a)`, `A144311(n+2) ≥ 6·pre(a) + 5`, and `G₂(p_n#) ≥ 6·pre(a) + 6`.* **Proved.** Immediate from the definition of `pre(a)`. ∎ *Verification.* `scripts/witness.py check` re-derives `C(a)` from scratch and confirms that every `j < pre(a)` is covered; `scripts/witness.py pool` applies this to a file of configurations. ## 3. Lemma 2 (a search target understates the rung) — and 0017's error **Lemma 2.** *If a decision procedure reports `[0, R−1]` coverable and returns a witnessing configuration `a`, the certified rung is `pre(a)`, which may be strictly larger than `R`. Reporting `R` as the rung is sound but not tight.* **Proved.** `pre(a) ≥ R` by the definition of the decision (it stopped as soon as `[0,R−1]` was covered); strict inequality happens whenever the witness accidentally covers `R, R+1, …` as well. ∎ **Verified, and this is 0017's error.** 0017's engine returned, for target `R = 285`, the configuration ``` a_p = 0 4 1 3 3 1 13 2 1 36 25 20 28 37 6 8 52 59 19 48 48 (p = 5,7,11,…,83) ``` and 0017 reported the rung as 285. Measuring its prefix gives **`pre(a) = 288`** ("first uncovered position: 288"), so the rung 0017 actually certified is **288**: ``` A144311(23) ≥ 6·288 + 5 = 1733 , G_2(83#) ≥ 6·288 + 6 = 1734 ``` i.e. `+24` over the published `1709`, not the `+6` stated in return 1379. The submitted claim is **true but not tight**; `out/lower-bound-83.md` carries the correction as a post-submission addendum. The lesson generalises: **the rung must always be read off the witness, never off the target**, and every rung recorded here is `pre(a)`. ## 4. Lemma 3 (feasibility is monotone, so the ascent is sound) **Lemma 3.** *If `[0, R−1]` is coverable then so is `[0, R'−1]` for every `R' ≤ R`. Equivalently, `R ↦ feasible(R)` is monotone, and any witness with prefix `p` certifies every rung `≤ p`.* **Proved.** `[0, R'−1] ⊆ [0, R−1] ⊆ C(a)`. ∎ **Corollary 3.1 (sound re-seeding).** *The search may be re-seeded at `R_cert := max pre(a)` over the witnesses in hand: rungs below `R_cert` are already certified by Lemma 1, so the only new question is `R_cert + 1`.* **Corollary 3.2 (the ascent pays exactly one refutation).** *Run the complete decision at `T = R_cert + 1`. If it refutes, then `R(n) = R_cert` exactly. If it succeeds with witness `b`, update `R_cert := max(R_cert, pre(b))` and repeat. No `T ≤ R_cert` is ever re-decided, so the ascent spends its search on genuinely open rungs and pays the refutation at most once — at the end.* This is the algorithm `scripts/ascent.sh` runs; its log line `R = … witness prefix

` records both the target and the tight rung. ## 5. Lemma 4 (no counting certificate can replace the search) For `R ≥ 1` define the **capacity** ``` cap(R) = Σ_{p ∈ P} max_{r ∈ Z/p} #{ j ∈ [0,R−1] : j ≡ r or r + c_p (mod p) } . ``` `cap(R)` bounds the size of any covered set inside `[0,R−1]`, because a union is at most a sum. **Lemma 4.** *If `cap(R) < R` then `[0,R−1]` is not coverable, and `R(n) < R`.* **Proved** (union ≤ sum). ∎ **Verified vacuity at `n = 21`.** `scripts/witness.py capacity 21 320` (`out/capacity.out`): `cap(R) − R` runs from `+19` at `R = 2` to `+300` at `R = 320`, and **no `R ∈ [2,320]` has `cap(R) < R`**. So at this level the counting certificate **never fires**: it cannot certify and it cannot refute any rung in the range of interest. Since `cap` is also the root relaxation of the search's own pruning bound (`S ≥ U`), no linear relaxation of this shape can shortcut the ascent. **Consequence (recorded as a negative result).** There is no cheap upper bound at `83#`, and no cheap lower bound either. The rung's *next* lower bound and its *closure* both require the complete search. This is why 0018 is a search programme. ## 6. The cost of the ascent The only measured point at `n = 21` is 0017's decision at target `R = 285`: **36 435 858 732 nodes in 6022 s** on 8 threads, whose witness turned out to certify `R = 288`. `scripts/cost.py` fits `log10(nodes) = a + b·R` per level on the retained logs (`out/cost.out`); the largest well-sampled level is `n = 17` (28 rows), giving a factor **1.087 per `+1` in `R`**. | quantity | value | rung | |---|---|---| | certified rung at 83# | `R = 288` | **verified** (witness, Lemma 1) | | published anchor | `A144311(22) = 1709` (`R = 284`) | cited (OEIS) | | least-squares prediction for `A144311(23)` | `≈ 1841`, i.e. `R = 306` | **measured fit**, not a theorem | | remaining rungs to the prediction | `289 … 306` (18 rungs) | — | | extrapolated nodes | `≈ 1.59 × 10¹²` (`×43.8` the measured decision) | **extrapolated** | | extrapolated cost | **`≈ 586` core-hours** | **extrapolated** | | the step that closes the rung | one complete refutation at `R = R_cert+1` | not modelled | The extrapolation is labelled as such: it borrows the `1.087` growth factor from `n = 17` because `n = 21` has a single point. It is a planning figure, not a measurement, and it excludes the refutation — which, from 0017's own data (a *decision* at 285 already cost 36.4 G nodes), is not small. ## 6a. Ops hazard observed in the wild: the label is not the artefact A second engine (the hermetic Rust SAT solver, via `.solveathome/private/sat/scripts/solve.sh`) was aimed at the 83# rung by a script named `lower-bound.sh` writing to `../0017/out/cnf/cover_n21_R289.cnf`. The script's **encode step read `21 286`**, so the file labelled `R289` contained the **R = 286** instance: ``` head -1 -> p cnf 1717 2830 (the R = 286 instance) sha256 -> ea7566ff16eddfa3c3b235943208bbe4... while the R = 289 instance is p cnf 1717 2833 sha256 8d0dbc9dc3740560c1e4caf34ce78c05... ``` Consequences, both recorded rather than hidden: (i) the run was deciding a rung **already settled** by the certified witness (which covers `[0,287]`, hence `[0,285]`, so `R = 286` is coverable), so a `SAT` verdict would have added nothing; (ii) an `UNSAT` verdict there would have *contradicted* a verified covering and thereby exposed a bug in the encoder or the solver — the consistency test that a mislabelled instance accidentally provides, and it is worth running such a test deliberately rather than by accident. The fix is one token (`286 -> 289` in the encode line), after which the file and its name agree and the instance is the genuinely open `R = 289`. **The rule this reinforces** (the same one the ascent's seed header enforces): *a rung, a target or a level is whatever the artefact says, never whatever the label says.* Check the header and the hash, not the filename. **Measurement update (2026-09-22 02:58 UTC; supersedes the 02:29 note).** The `R = 289` decision was returned **COVERABLE** after `84 672 303 452` nodes, and — because the engine measures the witness's prefix — its witness reaches **prefix 294**. The certified rung therefore jumps to `R = 294`: ``` A144311(23) >= 6*294 + 5 = 1769 , G_2(83#) >= 6*294 + 6 = 1770 ``` i.e. **`+60` over the published `A144311(22) = 1709`** (the previous certified rung, `R = 288`, was `+24`), and **five rungs banked by one search**. The witness is re-verified independently by `witness.py check` (`prefix pre(a) = 294`, `uncovered positions inside the prefix: []`), and the ascent has re-seeded at 294 and is deciding `R = 295`. **Cost, on nodes (the reproducible measure).** | decision | target `R` | nodes | banked rung | |---|---|---|---| | 0017 | 285 | 36 435 858 732 | 288 | | 0018 | 289 | 84 672 303 452 | 294 | So the per-rung node factor at `n = 21` is `(84672/36436)^{1/4} = 1.235`, and the twelve rungs `295..306` to the fit prediction cost `~61 x 84.7 G ≈ 5.2 x 10^12` nodes, i.e. of order **3100 core-hours** (about 16 days of wall clock on 8 threads) **plus one refutation**. That supersedes the `586` extrapolated in §6 above. **A measurement-integrity correction, recorded because it was mine.** The 02:29 note derived a `1.39`-per-rung factor by dividing a *wall-clock* interval by the engine's printed seconds. Those are not wall clock: the same counter read `6022 s` for a decision that took roughly `2900 s` of wall time at `R = 285`, and `14 666 s` for one that took roughly `22 700 s` at `R = 289`. The printed `(%.1fs)` field of `jtwin` is neither a wall-clock nor a core-hour measure and **must not be used as one**; node counts are the cross-run measure, and wall time is the other. The `1.39` figure and the `10^4`-core-hour conclusion drawn from it were wrong in method, not merely in value — and the error was caught only because the two engines' logs made both quantities visible. ## 7. Falsifiers | # | claim | falsifier | state | |---|---|---|---| | F1 | a witness certifies its prefix (Lemma 1) | a witness with `pre(a)` exceeding a refuted `R` | not fired; verified directly by `witness.py` | | F2 | feasibility is monotone in `R` (Lemma 3) | a refuted `R` with `R+1` coverable | not fired (the implication is trivial) | | F3 | `cap(R) ≥ R` throughout `[2,320]` at `n = 21` (Lemma 4) | any `R` in range with `cap(R) < R` | not fired (`out/capacity.out`) | | F4 | the certified ladder reproduces the published terms | a mismatch with OEIS through `A144311(22) = 1709` | not fired (0017 reproduced through `A144311(18)`) | | F5 | the rung reported by a run is `pre(a)`, not the target | a log line where the target exceeds the prefix | not fired since the fix; **F5 fired against 0017's earlier reporting**, which is §3 | | F6 | the run's frontier is what the log says | a `COVERABLE` line whose certificate fails `witness.py check` | not fired (the engine self-checks every claim and prints `SELF-CHECK FAILED` otherwise) | ## 8. Non-claims No exact value of `A144311(23)`: that needs the first `REFUTED R`, which had not occurred when this was written. No asymptotic bound on `G₂`; no improvement of `β₂`; nothing about `TP`, `Dist`, or twin-prime infinitude; no claim that the `1.087` growth factor or the `586` core-hours are measurements; no claim that the fit prediction `R = 306` is where the ascent ends — it is an extrapolation of ten measured points, and the search is the instrument that would refute it. ## 9. Reproduction ``` cd research/0018 ../../../../.venv/bin/python3 scripts/witness.py pool out/seed-certificate.txt # the certified rung ../../../../.venv/bin/python3 scripts/witness.py check 21 0 4 1 3 3 1 13 2 1 36 25 20 28 37 6 8 52 59 19 48 48 ../../../../.venv/bin/python3 scripts/witness.py capacity 21 320 # Lemma 4 vacuity ../../../../.venv/bin/python3 scripts/cost.py ../0017/out/ladder-n02-21.out ../0017/out/ascent.log sh scripts/ascent.sh 8 out/ascent.log 288 # the long pole; needs ../0017/scripts/jtwin built ``` `witness.py` and `cost.py` are deterministic and offline (stdlib only, seconds). `ascent.sh` appends timestamps and node counts to its log; the `witness prefix` fields are the reproducible payload. Build the engine with `cc -O3 -o ../0017/scripts/jtwin ../0017/scripts/jtwin.c`.