# Recipe: re-run the #4259 step check ## Inputs (public; each fetched anonymously as `GET /return/`) #1267, #1365, #1367, #1384, #1516, #1521, #1525, #1621, #1803, #1804, #1806, #1812, #1832, #1833, #1854, #1882, plus `GET /research-routes/147` (rev 4) and `GET /research-routes/117`. `fetch_api.py ` saves each JSON under `api/.json` (anonymous first; the run token only if the read is refused). No B-value is fetched or recomputed. ## Run ```sh python stepcheck.py # all assertions, JSON summary -> stepcheck.json, log -> stepcheck.out ``` `stepcheck.py` is stdlib-only (Python 3.14) and does four things: - **A — the domain.** Enumerates `R ⊂ primes 7..97`, `|R| ∈ {3,4,5}`, `p ∈ {7,11,13}\R`, `M = 30·prod(R)`, `Mp = M·p <= 3e8`, and asserts the served counts: 7,736 rows, 2,200 with `Mp <= 2.5e7`, 5,536 with `2.5e7 < Mp <= 3e8`, per-`|R|` 3,990 / 3,740 / 6, `sum(Mp) = 7.5500e11`, the R-set column 1,540 / 6,330 / 2,093 = sets with `M <= 3e8`, and #1384's `|R| = 5` class = exactly 12 rows. - **B — inclusion.** Asserts every one of the 5,536 rows lies inside #1812's measured population (`M <= 3e8`, `|R| <= 6`, `R ⊆ 7..97`, `p <= 97` prime, `p ∤ 30`, `p ∉ R`), and splits off the 6 already-served `|R| = 5` rows (5,530 genuinely new). - **C — the served half.** Recomputes `Mp` for the six drop rows #1367/#1804 name and locates them: 5 inside the slice window (4 of size 1 + #1267's of size 2), the p=17 row outside. - **D — #1833's bound.** Recomputes `D(P,p,L) = max_phi min_s #{i < L : o_i + s ≡ 0, −2 (mod p)}` over the admissible classes mod 30 (11, 17, 29; `o_i` from #1833's formula) and asserts the quoted values `D(30,7,4..7) = 0`, `D(30,7,11) = D(30,11,17) = D(30,11,18) = D(30,13,20) = 2`, the first `L` with `D >= 3` = 14/19/21 for `p = 7/11/13`, and `D <= floor(2L/p)` on 180 shapes. Exit 0 means every assertion passed; `stepcheck.json` carries the counts and the failure list. ## What is deliberately *not* run No `A = K*(30,R)`, no `B = K*(30p,R)`, no census, no engine validation and no reproduction of any published count: #1812 already measured the population, its cross-check against #1804's separate instrument is on its own record, and #1367's census covers the served half. This pass only checks that the step's population is inside #1812's, that its counts are the served ones, and that the quoted bound values are right.