# Recipe — job #1076 (route 13 rev6, k-fold unions to k = 8) ``` cd job1076 python kfold1076.py --primes 127,151,181 --cpu-budget-seconds 300 > kfold1076.out 2> kfold1076.err python trim1076.py # 8.5 MB stdout -> 548 KB artifact, asserted python verify1076.py kfold1076_compact.json # independent checker: 18,413 checks, exit 0 ``` Producer 288 CPU s, trim 0.5 s, checker 29 s (job hint 360 s). The producer's stdout holds no output and no timing; progress and the timing line go to stderr. `kfold1076.out` is the raw stdout (8.5 MB, rejected by `POST /files` with 413); the uploaded artifact is `kfold1076_compact.json`, produced by `trim1076.py`, which replaces every union's `certificate.slots` and `certificate.weights` with `weights_len`/`weights_all_one` plus a once-only top-level `member_slots`, asserts every remaining field is unchanged, re-derives each member with the pinned kernel against its recorded `slot_sha256`, and reconstructs all 741 unions to match their recorded `U_sha256`. ## Producer 1. Eight deep starts per prime: #443's four plus `80021, 100003, 120011, 140009` (pairwise windows far wider than the ~80–120-slot members, so the members are disjoint). 2. `tightcert.prime_band(p, a, 20000)`, `N_F` = first prefix with `F1 > 0`, member `D = slots[:N_F−1]`. If that `(p, a)` is one of #443's, assert `sha256`, `N_member`, `N_F`, `F1_member` against its record — identity is proved, not assumed. The four added starts are reported unproved. 3. All `C(8,k)` subsets for `k = 2…8`; `U = sorted(D_{i1}+…+D_{ik})` truncated to `N = min |D_i|`; `F1 = |U| − Σ_q max_b |K_U(q,b)|` computed by per-phase bincount of `{−s, −s−2} mod q`. 4. Certificate `w_s = 1` with `ratio = [|U| − F1, |U|]`, re-verified by `tightcert.verify`; the partitioned-phase LP only for unions with `F1 ≤ 0` (none occurred). 5. Fits per prime: min `F1_union` vs `k` (slope, intercept, max residual), min `F1/k` vs `1/k` (intercept = the located ceiling), min-slack increments, `N_F` min/mean/max, `b/mean N_F`. ## Independent checker Its own trial division, its own slot scan over `[a, a+20000)`, its own `N_F` search, every union rebuilt from the member lists with an explicit `q × |D|` kill matrix; checks the subset enumeration is complete, the strict inequality and its slack, disjointness, shas, sizes, gains, subadditivity, both fits (recomputed slope/intercept/residual), the density minima `F1/|U|` and `F1/N`, `N_F` statistics, `b/N_F`, the within-group size control `corr(common_N, F1)` per `(p,k)`, the summary counts and the outcome string. A plain-Python integer path and a general-weight inequality routine run on every member and every 100th union. Scope of each path is printed by the checker. ## Pitfalls encountered * The route's `--primes 127,151,181,199,211` extension did **not** fit the compute hint; cost per prime grows with `p`. `--primes` is there for that run when more budget exists. * F1 via bincount is an identity, not an approximation: `q | (s+b) ⟺ b ≡ −s (mod q)`, and `q | (s+b+2) ⟺ b ≡ −s−2 (mod q)`. The producer asserts it against the kernel's kill matrix on the largest unions, because the fast path is where a silent error would live. * Member row presence is not uniform: only the four #443 starts have a reference row. The checker asserts presence **matches the declared-start list** in both directions, so a mislabelled new start fails rather than passing quietly. * The checker must not recompute `weights_decisive` for all 741 unions (`Σ_q q·|U|` per union is billions of Python operations); it uses the kill matrix for all unions and the general-weight routine only on the stride sample, and says so in its output. * The raw artifact records each member only by `N_F`, `N_member` and `slot_sha256`, so a trim cannot lift the member lists out of the union records (they are truncated there). It must re-derive them with the kernel and check the sha — which is why `trim1076.py` imports `tightcert` while the checker deliberately does not. * Counting compute: the filed producer plus checker is 317 s, but the assignment's total machine time is about 0.18 CPU-h, because the abandoned five-prime attempt ran its wall before being killed. Report the assignment total, not just the successful run. * `k = 8` is one subset per prime; report `min = max` there rather than a spread.