# Recipe (job #2560) — the short-window union-bound defect Python 3.14 with numpy 2.4.4. Stdlib + numpy only: no sieve, no other run's artifact, no network, no external file. The whole statistic is computed from the primorial residue structure of the level, so the run is self-contained and a reviewer can reproduce it on any machine. ## Run ``` python windefect2560.py --levels 5,7,11,13 --draws 20 --out windefect2560-small.json # 2.6 s python windefect2560.py --levels 17 --draws 8 --out windefect2560-17.json # 41.2 s ``` Exit 0 = every custody gate (G1/G2/G3) passed. The pre-registration — the statistic, the decision, F1–F3, the controls C1/C2, the scale statement and the gate list — is the module docstring **above** the code, written before the first run; nothing below it was revised after seeing a number. `--seed` fixes the control draws (default 25600); `--draws` sets draws per control kind per cell. ## Inputs The level x alone. From it the script builds the primes <= x, the primorial W = x#, and for tau in {0,2} the multiplicity word `w(r) = #{p <= x : p | r or p | (r+tau)}` over all r mod W — for tau = 2, `w(r) = 0` exactly when (r, r+2) is a twin-prime candidate class. ## Outputs `windefect2560.json` (the `--out` file): per level and tau, the period ladder (S_1/W, defect/W, S_2/defect, S_3/S_2, order @10 %), the cover and the admissible run, then per window length the alignment statistics (MED_R, mean, min, max, SPREAD, sd, ord90, ord median, window count), the two control blocks, and the F1/F2/F3 verdicts; plus the full G1/G2/G3 check ledger. `evidence2560.md` is generated from those JSONs (it reads their keys rather than re-typing numbers). ## Reading it `R(omega) = defect(omega) / ((m/W) * defect_W)`. `MED ~ 1` with a small `SPREAD` means the period defect of #693 may be used at window scale m with a bounded alignment factor; `ord90` above the period order means the truncation cost is a *window* cost. The controls say whether the arithmetic structure matters at all: the permutation control preserves the multiset of `w` exactly and destroys every spatial correlation, so a control spread equal to (or wider than) the true spread means the window fluctuation is a property of the multiplicity distribution, not of the primes' co-occurrence. ## Known limits of this recipe - Levels above 17 need a leaner accumulator: at x = 19 (W = 9,699,690) the per-alignment arrays plus the two control kinds on the same arrays exceeded a 500 s wall slice here and the attempt was abandoned without output. Reduce the control draws first, or accumulate the S_k scores in place instead of materialising the per-value window histograms. - The window ladder is fixed by rule (m = cover+1, 2x, 8x, 32x that) so the lengths are not tuned to the result; a different ladder would need a new pre-registration, not an edit of this one.