// ============================================================================ // ADVERSARIAL VERIFICATION OF THE A/B-COUPLING PILOT, AND THE FRACTIONAL LP // IT NAMED AND DID NOT RUN. // // Target: `research/history/staging/attack-ab-coupling.md` and its producer // `research/attack-ab-coupling-01.js`. This file is an INDEPENDENT second // implementation written by a verifier who did not write the pilot. Nothing is // imported from the pilot: the tile, the window word, K_p, maxcov, the // partition minimisation and the sweep are all rebuilt on a different code // path. Where the pilot enumerates coupled phase tuples with a bitmask // recursion and popcount, this file counts MISSES through residue histograms // and inclusion-exclusion, which is a different algorithm with different // failure modes; both paths are then cross-checked against each other. // // THE HELD CLAIMS UNDER TEST (block 1 = T_5, primes in (5,25]): // depth-0 (= depth-1, all singletons) ceiling L <= 62 slots (known, CRT) // depth-2 coupled ceiling L <= 54 slots // depth-3 coupled ceiling L <= 39 slots (clears 51) // uncoupled controls 123 and 81 slots // one-class (Jacobsthal) control first dead 13, ceiling 12 // A5 / A8 / Fact B contribute exactly 0 beyond exact per-prime K_p // x = 29: sum 2/p > 1 so depth-0 never dies; depth-3 gives L <= 65 vs 83 // // THE OBJECT, restated so this file stands alone. T_5 = residues r mod 30 with // r and r+2 both coprime to 30, i.e. {11, 17, 29}, gap word (6, 12, 12) // INTEGERS, mbar = 10 integers/slot. A run of l consecutive T_5 slots starting // at phase f has integer offsets d_0 = 0 < d_1 < ... < d_{l-1} given by partial // sums of the cyclic gap word from f. A prime p > 5 kills slot i iff the slot's // integer is 0 or p-2 mod p, i.e. iff d_i = a_p or a_p - 2 (mod p) for the // single free parameter a_p, free by CRT because gcd(30, p) = 1. So the // question "is a run of l slots at phase f coverable" is exactly "is there a // choice of one a_p per block prime whose union of kill sets is all l slots". // // THE CERTIFICATE FAMILY, and why its inequality direction has no parity. // For ANY family {(B, y_B)} of subsets of the block with y_B >= 0 and // sum_{B ni p} y_B >= 1 for every prime p (a FRACTIONAL COVER of the primes), // and any phase assignment, // // |union_p A_p| = sum_i 1 // <= sum_i sum_{B ni p(i)} y_B (p(i) any killer of i) // <= sum_B y_B |union_{p in B} A_p| // <= sum_B y_B maxcov(B, l, f) // // Every term carries a PLUS sign and every term is itself an upper bound, so // there is no odd/even truncation anywhere and no Bonferroni parity condition // to get backwards. This is NOT a truncated inclusion-exclusion. Set partitions // into parts of size <= k are the 0/1 points of that polytope; the pilot's // "uniform fractional cover by all size-k subsets" is the point y_B = // 1/C(n-1,k-1); and the LP below optimises over the WHOLE polytope, which is // what the pilot listed as its most valuable unexecuted run. // // WHAT IS COMPUTED HERE. // 1. the object and the two requirements (51 slots at x = 23, 83 at x = 29) // 2. maxcov on an independent algorithm, cross-checked against a brute-force // tuple enumeration on all 41 subsets of size <= 3 // 3. depth-k ceilings under three certificate families: partitions (P_k), // the pilot's uniform fractional cover (U_k), and the exact LP over the // full fractional-cover polytope (LP_k), in exact rational arithmetic // with a primal/dual certificate verified term by term // 4. SOUNDNESS, three ways: the exact truth by folding; exhaustive maxcov of // the whole block at the critical windows; and a randomised hunt for a // phase assignment that beats a ceiling, with a POWER CHECK showing the // hunt does catch a deliberately sign-flipped bound // 5. the controls, the lemmas-add-0 claim, and the x = 29 zone // // Runtime: a few minutes. Memory: small. // ============================================================================ 'use strict'; const f2 = (x, n) => Number(x).toFixed(n); const pad = (x, n) => String(x).padStart(n); // --------------------------------------------------------------------------- // 0. THE OBJECT, REBUILT // --------------------------------------------------------------------------- const PRIMES = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]; function tile(v) { const ps = PRIMES.filter(p => p <= v); const P = ps.reduce((a, p) => a * p, 1); const S = []; for (let r = 0; r < P; r++) { let ok = true; for (const p of ps) if (r % p === 0 || (r + 2) % p === 0) { ok = false; break; } if (ok) S.push(r); } const G = S.map((s, i) => (S[(i + 1) % S.length] - s + P) % P); return { v, P, S, G, n: S.length, mbar: P / S.length }; } const T5 = tile(5); const BLOCK1 = PRIMES.filter(p => p > 5 && p <= 25); const BLOCK29 = PRIMES.filter(p => p > 5 && p <= 29); function maxsum(t, m) { let best = 0; for (let f = 0; f < t.n; f++) { let s = 0; for (let k = 0; k < m; k++) s += t.G[(f + k) % t.n]; if (s > best) best = s; } return best; } function requirementSlots(t, target) { let m = 0; for (let mm = 1; mm <= 600; mm++) if (maxsum(t, mm) <= target) m = mm; return { m, need: m - 1, at: maxsum(t, m), next: maxsum(t, m + 1) }; } // integer offsets of a window of l slots starting at phase f function word(t, f, l) { const d = new Int32Array(l); let s = 0; for (let i = 0; i < l; i++) { d[i] = s; s += t.G[(f + i) % t.n]; } return d; } console.log('=== 0. THE OBJECT AND THE TWO REQUIREMENTS, REBUILT ================='); console.log(`T_5 = {${T5.S.join(', ')}} mod ${T5.P}, gap word (${T5.G.join(', ')}) INTEGERS, mbar = ${T5.mbar} integers/slot`); console.log(`block 1 = (5, 25] = ${BLOCK1.join(', ')} sum 2/p = ${f2(BLOCK1.reduce((a, p) => a + 2 / p, 0), 6)} ${BLOCK1.reduce((a, p) => a + 2 / p, 0) < 1 ? '(< 1)' : '(> 1)'}`); console.log(`block 29 = (5, 29] = ${BLOCK29.join(', ')} sum 2/p = ${f2(BLOCK29.reduce((a, p) => a + 2 / p, 0), 6)} ${BLOCK29.reduce((a, p) => a + 2 / p, 0) < 1 ? '(< 1)' : '(> 1)'}`); { const r23 = requirementSlots(T5, 23 * 23), r29 = requirementSlots(T5, 29 * 29); console.log(`x = 23: maxsum_${r23.m} = ${r23.at} <= 529 < ${r23.next} = maxsum_${r23.m + 1} -> need L <= ${r23.need} slots ${r23.need === 51 ? 'AGREES with 51' : 'DIFFERS <-- FAILED'}`); console.log(`x = 29: maxsum_${r29.m} = ${r29.at} <= 841 < ${r29.next} = maxsum_${r29.m + 1} -> need L <= ${r29.need} slots ${r29.need === 83 ? 'AGREES with 83' : 'DIFFERS <-- FAILED'}`); } // --------------------------------------------------------------------------- // 1. maxcov, ON AN INDEPENDENT ALGORITHM (MISS COUNTING BY HISTOGRAM) // --------------------------------------------------------------------------- // coupled model: prime p offers the p sets S_a = {a, a-2} mod p. // uncoupled model: all C(p,2) unordered pairs {a, b}. // one model: the p singletons {a}. // // maxcov(B) = l - min over choices of #{i : i missed by every p in B}. // |B| = 1, 2, 3 are done in closed form off residue histograms; anything above // falls back to a straight recursion over choice tuples with bitmask union // (the pilot's algorithm), which is used ONLY as the cross-check oracle and // for the exact top of the hierarchy. // --------------------------------------------------------------------------- function classesFor(p, model) { const out = []; if (model === 'coupled') { for (let a = 0; a < p; a++) out.push([a, (a - 2 + p) % p]); } else if (model === 'uncoupled') { for (let a = 0; a < p; a++) for (let b = a + 1; b < p; b++) out.push([a, b]); } else { for (let a = 0; a < p; a++) out.push([a]); } return out; } // residues of the window under each prime function residues(d, p) { const r = new Int32Array(d.length); for (let i = 0; i < d.length; i++) r[i] = d[i] % p; return r; } // --- exact maxcov for |B| <= 3 by histogram inclusion-exclusion ------------- function cov1(d, p, model) { const l = d.length, H = new Int32Array(p); for (let i = 0; i < l; i++) H[d[i] % p]++; let best = 0, arg = -1; for (const C of classesFor(p, model)) { let c = 0; for (const a of C) c += H[a]; if (c > best) { best = c; arg = C[0]; } } return { cov: best, arg }; } function cov2(d, p, q, model) { const l = d.length; const H = new Int32Array(p * q); for (let i = 0; i < l; i++) H[(d[i] % p) * q + (d[i] % q)]++; const R = new Int32Array(p), C = new Int32Array(q); for (let a = 0; a < p; a++) for (let b = 0; b < q; b++) { R[a] += H[a * q + b]; C[b] += H[a * q + b]; } const CP = classesFor(p, model), CQ = classesFor(q, model); let best = 0; for (const A of CP) { let ra = 0; for (const a of A) ra += R[a]; for (const B of CQ) { let rb = 0; for (const b of B) rb += C[b]; let inter = 0; for (const a of A) for (const b of B) inter += H[a * q + b]; const cv = ra + rb - inter; if (cv > best) best = cv; } } return best; } function cov3(d, p, q, r, model) { const l = d.length; const rp = residues(d, p), rq = residues(d, q), rr = residues(d, r); const CP = classesFor(p, model), CQ = classesFor(q, model), CR = classesFor(r, model); const H = new Int32Array(q * r), R = new Int32Array(q), C = new Int32Array(r); let best = 0; const inA = new Uint8Array(p); for (const A of CP) { // slots NOT covered by p under choice A inA.fill(0); for (const a of A) inA[a] = 1; H.fill(0); R.fill(0); C.fill(0); let T = 0, covA = 0; for (let i = 0; i < l; i++) { if (inA[rp[i]]) { covA++; continue; } H[rq[i] * r + rr[i]]++; R[rq[i]]++; C[rr[i]]++; T++; } for (const B of CQ) { let rb = 0; for (const b of B) rb += R[b]; for (const D of CR) { let rc = 0; for (const c of D) rc += C[c]; let inter = 0; for (const b of B) for (const c of D) inter += H[b * r + c]; const cov = covA + rb + rc - inter; if (cov > best) best = cov; } } } return best; } // --- the oracle: straight tuple recursion with bitmask union (pilot's path) -- function popc(x) { x = x - ((x >>> 1) & 0x55555555); x = (x & 0x33333333) + ((x >>> 2) & 0x33333333); x = (x + (x >>> 4)) & 0x0f0f0f0f; return (x * 0x01010101) >>> 24; } let ORACLE_NODES = 0; function covOracle(d, ps, model, cap) { const l = d.length, W = Math.max(1, Math.ceil(l / 32)); const masks = ps.map(p => { const cs = classesFor(p, model), M = new Uint32Array(cs.length * W); for (let u = 0; u < cs.length; u++) for (let i = 0; i < l; i++) if (cs[u].indexOf(d[i] % p) >= 0) M[u * W + (i >>> 5)] |= (1 << (i & 31)); return M; }); const K = ps.length, acc = new Uint32Array((K + 1) * W); let best = 0, bestTuple = null, cur = new Array(K).fill(0); function rec(j) { if (best >= cap) return; if (j === K) { let c = 0; const b = j * W; for (let w = 0; w < W; w++) c += popc(acc[b + w]); if (c > best) { best = c; bestTuple = cur.slice(); } return; } const M = masks[j], n = M.length / W, base = j * W, nb = (j + 1) * W; for (let u = 0; u < n; u++) { const ub = u * W; for (let w = 0; w < W; w++) acc[nb + w] = acc[base + w] | M[ub + w]; ORACLE_NODES++; cur[j] = u; rec(j + 1); if (best >= cap) return; } } rec(0); return { cov: best, tuple: bestTuple }; } // dispatcher function maxcov(d, ps, model) { const l = d.length; if (ps.length === 1) return Math.min(l, cov1(d, ps[0], model).cov); if (ps.length === 2) return Math.min(l, cov2(d, ps[0], ps[1], model)); if (ps.length === 3) return Math.min(l, cov3(d, ps[0], ps[1], ps[2], model)); return covOracle(d, ps, model, l).cov; } console.log(''); console.log('=== 1. CROSS-CHECK: HISTOGRAM maxcov vs BRUTE-FORCE TUPLE ORACLE ===='); { let bad = 0, checked = 0; for (const l of [20, 40, 52, 55, 62]) { for (let f = 0; f < T5.n; f++) { const d = word(T5, f, l); for (let i = 0; i < 6; i++) { for (let j = i; j < 6; j++) { for (let k = j; k < 6; k++) { const B = [...new Set([BLOCK1[i], BLOCK1[j], BLOCK1[k]])]; const a = maxcov(d, B, 'coupled'); const b = covOracle(d, B, 'coupled', l).cov; checked++; if (a !== b) { bad++; if (bad < 5) console.log(` MISMATCH l=${l} f=${f} B={${B}} hist ${a} oracle ${b}`); } } } } } } console.log(` ${checked} (window, subset) comparisons over subsets of size 1..3, l in {20,40,52,55,62}: ${bad} mismatches ${bad === 0 ? 'the two algorithms agree everywhere' : '<-- FAILED'}`); } // --------------------------------------------------------------------------- // 2. EXACT RATIONAL LP OVER THE FRACTIONAL-COVER POLYTOPE // --------------------------------------------------------------------------- // primal: min sum_B c_B y_B s.t. sum_{B ni p} y_B >= 1 for each p, y >= 0 // dual: max sum_p z_p s.t. sum_{p in B} z_p <= c_B for each B, z >= 0 // The dual is solved by an exact rational simplex with Bland's rule; the primal // optimum y is read off the slack reduced costs and then VERIFIED term by term // (feasibility of every cover constraint, and equality of the two objectives). // Both are exact over BigInt fractions, so the returned bound is a rational // number with a checked certificate, not a float. // --------------------------------------------------------------------------- const babs = a => (a < 0n ? -a : a); function bgcd(a, b) { a = babs(a); b = babs(b); while (b) { const t = a % b; a = b; b = t; } return a; } function fr(n, d = 1n) { n = BigInt(n); d = BigInt(d); if (d === 0n) throw new Error('div0'); if (d < 0n) { n = -n; d = -d; } const g = bgcd(n, d) || 1n; return { n: n / g, d: d / g }; } const F0 = fr(0n), F1 = fr(1n); const fadd = (a, b) => fr(a.n * b.d + b.n * a.d, a.d * b.d); const fsub = (a, b) => fr(a.n * b.d - b.n * a.d, a.d * b.d); const fmul = (a, b) => fr(a.n * b.n, a.d * b.d); const fdiv = (a, b) => fr(a.n * b.d, a.d * b.n); const fcmp = (a, b) => { const x = a.n * b.d - b.n * a.d; return x < 0n ? -1 : (x > 0n ? 1 : 0); }; const fnum = a => Number(a.n) / Number(a.d); const fstr = a => (a.d === 1n ? String(a.n) : `${a.n}/${a.d}`); function coverLP(members, costs, nvar) { // members[i] = array of variable indices in subset i; costs[i] = integer c_B const m = members.length, N = nvar + m; const T = []; for (let i = 0; i < m; i++) { const row = new Array(N + 1).fill(F0); for (const p of members[i]) row[p] = F1; row[nvar + i] = F1; row[N] = fr(BigInt(costs[i])); T.push(row); } const obj = new Array(N + 1).fill(F0); for (let j = 0; j < nvar; j++) obj[j] = fr(-1n); T.push(obj); const basis = []; for (let i = 0; i < m; i++) basis.push(nvar + i); let it = 0; for (; ;) { if (++it > 100000) throw new Error('simplex did not terminate'); let e = -1; for (let j = 0; j < N; j++) if (fcmp(T[m][j], F0) < 0) { e = j; break; } // Bland if (e < 0) break; let piv = -1, bestR = null; for (let i = 0; i < m; i++) { if (fcmp(T[i][e], F0) > 0) { const rt = fdiv(T[i][N], T[i][e]); if (bestR === null || fcmp(rt, bestR) < 0 || (fcmp(rt, bestR) === 0 && basis[i] < basis[piv])) { bestR = rt; piv = i; } } } if (piv < 0) throw new Error('dual unbounded — impossible for a cover LP with finite costs'); const pv = T[piv][e]; for (let j = 0; j <= N; j++) T[piv][j] = fdiv(T[piv][j], pv); for (let i = 0; i <= m; i++) { if (i === piv) continue; const g = T[i][e]; if (g.n === 0n) continue; for (let j = 0; j <= N; j++) T[i][j] = fsub(T[i][j], fmul(g, T[piv][j])); } basis[piv] = e; } const value = T[m][N]; const y = []; for (let i = 0; i < m; i++) y.push(T[m][nvar + i]); const z = new Array(nvar).fill(F0); for (let i = 0; i < m; i++) if (basis[i] < nvar) z[basis[i]] = T[i][N]; // --- certificate --- let ok = true; for (let p = 0; p < nvar; p++) { // primal feasibility let s = F0; for (let i = 0; i < m; i++) if (members[i].indexOf(p) >= 0) s = fadd(s, y[i]); if (fcmp(s, F1) < 0) ok = false; } for (let i = 0; i < m; i++) if (fcmp(y[i], F0) < 0) ok = false; let po = F0; for (let i = 0; i < m; i++) po = fadd(po, fmul(y[i], fr(BigInt(costs[i])))); let dofo = F0; for (let p = 0; p < nvar; p++) dofo = fadd(dofo, z[p]); for (let p = 0; p < nvar; p++) if (fcmp(z[p], F0) < 0) ok = false; for (let i = 0; i < m; i++) { // dual feasibility let s = F0; for (const p of members[i]) s = fadd(s, z[p]); if (fcmp(s, fr(BigInt(costs[i]))) > 0) ok = false; } if (fcmp(po, dofo) !== 0 || fcmp(po, value) !== 0) ok = false; return { value, y, z, certified: ok }; } // self-test of the LP on an instance whose answer is known by hand console.log(''); console.log('=== 2. THE EXACT LP, SELF-TESTED ===================================='); { // triangle, all pair costs 2, all singleton costs 2: fractional optimum 3, integral 4. const mem = [[0], [1], [2], [0, 1], [0, 2], [1, 2]], cst = [2, 2, 2, 2, 2, 2]; const r = coverLP(mem, cst, 3); console.log(` triangle test: LP = ${fstr(r.value)} (hand value 3, best partition = 2+2 = 4) ${fstr(r.value) === '3' ? 'ok' : '<-- FAILED'} certificate ${r.certified ? 'verified' : 'FAILED'}`); const mem2 = [[0], [1], [0, 1]], cst2 = [5, 5, 7]; const r2 = coverLP(mem2, cst2, 2); console.log(` 2-prime test: LP = ${fstr(r2.value)} (hand value 7) ${fstr(r2.value) === '7' ? 'ok' : '<-- FAILED'} certificate ${r2.certified ? 'verified' : 'FAILED'}`); } // --------------------------------------------------------------------------- // 3. THE THREE CERTIFICATE FAMILIES AT A GIVEN (l, f) // --------------------------------------------------------------------------- function subsetsUpTo(n, k) { const out = []; for (let m = 1; m < (1 << n); m++) { const c = popc(m); if (c >= 1 && c <= k) out.push(m); } return out; } function bitsOf(m, n) { const o = []; for (let i = 0; i < n; i++) if (m & (1 << i)) o.push(i); return o; } // P_k: min over set partitions with all parts of size <= k, by explicit // recursion on the lowest unassigned element (not a DP; a different route to // the same minimum, and it is checked against the DP on the same instance). function partitionBound(n, k, cost) { const full = (1 << n) - 1; const memo = new Map(); function go(mask) { if (mask === 0) return 0; if (memo.has(mask)) return memo.get(mask); const low = mask & (-mask), rest = mask ^ low; let best = Infinity; // enumerate subsets of rest, take S = low | sub with |S| <= k for (let sub = rest; ; sub = (sub - 1) & rest) { const S = sub | low; if (popc(S) <= k) { const v = cost[S] + go(mask ^ S); if (v < best) best = v; } if (sub === 0) break; } memo.set(mask, best); return best; } return go(full); } // U_k: the pilot's uniform fractional cover by all size-EXACTLY-k subsets function uniformFrac(n, k, cost) { if (!(k >= 2 && k < n)) return null; let tot = 0, cnt = 0; for (let m = 1; m < (1 << n); m++) if (popc(m) === k) { tot += cost[m]; cnt++; } // weight per subset = 1 / C(n-1, k-1) = n / (k * C(n,k)) return fr(BigInt(tot) * BigInt(n), BigInt(cnt) * BigInt(k)); } // LP_k: the full polytope function lpBound(n, k, cost) { const subs = subsetsUpTo(n, k); const members = subs.map(m => bitsOf(m, n)); const costs = subs.map(m => cost[m]); return coverLP(members, costs, n); } // all subset costs at (l, f) function costTable(t, primes, model, l, f, kmax) { const n = primes.length, d = word(t, f, l); const cost = new Float64Array(1 << n).fill(-1); for (let m = 1; m < (1 << n); m++) { const c = popc(m); if (c > kmax) continue; cost[m] = maxcov(d, bitsOf(m, n).map(i => primes[i]), model); } return cost; } // --------------------------------------------------------------------------- // 4. THE SWEEPS // --------------------------------------------------------------------------- // firstDead(k) = least l such that for EVERY phase f the certificate value is // < l. Feasibility is downward closed, so that l gives L <= l - 1 slots. function sweepFamilies(t, primes, model, k, lmax, want) { const n = primes.length; const res = { P: 0, U: 0, LP: 0, rows: [] }; for (let l = 1; l <= lmax; l++) { let bp = -Infinity, bu = null, blp = null; for (let f = 0; f < t.n; f++) { const cost = costTable(t, primes, model, l, f, k); if (want.P || want.U || want.LP) { const P = partitionBound(n, k, cost); if (P > bp) bp = P; if (want.U) { const U = uniformFrac(n, k, cost); if (U !== null && (bu === null || fcmp(U, bu) > 0)) bu = U; } if (want.LP && !res.LP) { const r = lpBound(n, k, cost); if (!r.certified) throw new Error('LP certificate failed at l=' + l + ' f=' + f); if (blp === null || fcmp(r.value, blp) > 0) blp = r.value; } } } const pilotBound = (bu === null) ? fr(BigInt(bp)) : (fcmp(fr(BigInt(bp)), bu) < 0 ? fr(BigInt(bp)) : bu); res.rows.push({ l, P: bp, U: bu, LP: blp, pilot: pilotBound }); if (!res.P && bp < l) res.P = l; if (!res.U && fcmp(pilotBound, fr(BigInt(l))) < 0) res.U = l; // = the pilot's min(P, U) if (want.LP && !res.LP && blp !== null && fcmp(blp, fr(BigInt(l))) < 0) res.LP = l; if (res.P && res.U && (!want.LP || res.LP)) break; } return res; } console.log(''); console.log('=== 3. BLOCK 1, COUPLED: THE THREE CERTIFICATE FAMILIES ============='); console.log('P_k = min over set partitions with parts of size <= k (integral vertices)'); console.log('minPU= min(P_k, uniform fractional cover by size-k sets) = THE PILOT\'S BOUND'); console.log('LP_k = min over the FULL fractional-cover polytope = the named unexecuted run'); console.log(''); // --------------------------------------------------------------------------- // THE WHOLE HIERARCHY IN ONE SWEEP. At each (l, f) the subset-cost table is // built ONCE, to the deepest depth still alive, and all three families are read // off it. The adaptive kmax matters: depth 6 dies at l = 20 and depth 1 at // l = 63, so the expensive |B| = 6 maxcovs (7.4 M coupled tuples per window) // are only ever paid at the small l where a depth-6 answer is still wanted. // The exact rational LP is run for every depth up to LPMAXK; above that the // pilot's own family (partitions, and the uniform fractional cover) is what the // held numbers are, so that is what is checked, and the LP is run separately at // the decisive windows only. // --------------------------------------------------------------------------- function hierarchySweep(t, primes, model, kTop, lmax, lpMaxK) { const n = primes.length; const deadP = new Array(kTop + 1).fill(0), deadU = new Array(kTop + 1).fill(0), deadLP = new Array(kTop + 1).fill(0); const rows = []; for (let l = 1; l <= lmax; l++) { let kmax = 0; for (let k = 1; k <= kTop; k++) if (!deadP[k] || !deadU[k] || (k <= lpMaxK && !deadLP[k])) kmax = k; if (kmax === 0) break; const P = new Array(kTop + 1).fill(null), U = new Array(kTop + 1).fill(null), LPv = new Array(kTop + 1).fill(null); for (let f = 0; f < t.n; f++) { const cost = costTable(t, primes, model, l, f, kmax); for (let k = 1; k <= kmax; k++) { const pk = partitionBound(n, k, cost); if (P[k] === null || pk > P[k]) P[k] = pk; const uk = uniformFrac(n, k, cost); if (uk !== null && (U[k] === null || fcmp(uk, U[k]) > 0)) U[k] = uk; if (k <= lpMaxK) { const r = lpBound(n, k, cost); if (!r.certified) throw new Error(`LP certificate failed l=${l} f=${f} k=${k}`); if (LPv[k] === null || fcmp(r.value, LPv[k]) > 0) LPv[k] = r.value; } } } const pilot = new Array(kTop + 1).fill(null), L = fr(BigInt(l)); for (let k = 1; k <= kmax; k++) { pilot[k] = (U[k] === null || fcmp(fr(BigInt(P[k])), U[k]) < 0) ? fr(BigInt(P[k])) : U[k]; if (!deadP[k] && P[k] < l) deadP[k] = l; if (!deadU[k] && fcmp(pilot[k], L) < 0) deadU[k] = l; if (k <= lpMaxK && !deadLP[k] && fcmp(LPv[k], L) < 0) deadLP[k] = l; } rows.push({ l, kmax, P, U, LP: LPv, pilot }); } return { deadP, deadU, deadLP, rows }; } const RES1 = {}; { const t0 = Date.now(); const H = hierarchySweep(T5, BLOCK1, 'coupled', 6, 140, 3); console.log(` [full depth 1..6 sweep, one cost table per window: ${f2((Date.now() - t0) / 1000, 1)} s]`); console.log(''); console.log(' depth k P_k first/ceil pilot min(P,U) first/ceil LP_k first/ceil held ceiling clears 51?'); const HELD = { 1: 62, 2: 54, 3: 39, 4: 32, 5: 22, 6: 19 }; for (let k = 1; k <= 6; k++) { RES1[k] = { P: H.deadP[k], U: H.deadU[k], LP: H.deadLP[k], rows: H.rows.filter(r => r.P[k] !== null).map(r => ({ l: r.l, P: r.P[k], U: r.U[k], LP: r.LP[k], pilot: r.pilot[k] })), }; const S = RES1[k], got = S.U ? S.U - 1 : null; const cell = fd => (fd ? `${pad(fd, 3)} / ${pad(fd - 1, 3)}` : ' >140 / '); console.log(` ${k} ${cell(S.P)} ${cell(S.U)} ${k <= 3 ? cell(S.LP) : ' - / - '} ` + `${pad(HELD[k], 5)} ${got === HELD[k] ? 'AGREES' : 'DIFFERS <-- '} ` + ` ${(S.LP ? S.LP - 1 : got) <= 51 ? 'YES' : 'no'}`); } console.log(' (depth 6 = every subset allowed = the exact search; its ceiling must equal the truth, 19.)'); } console.log(''); console.log('the certificate values against l near each death (max over the 3 T_5 phases).'); console.log('P_k = partitions only; U_k = the uniform fractional cover alone; pilot = min(P_k, U_k):'); console.log(' depth l P_k U_k pilot LP_k alive under pilot / under LP'); for (const k of [2, 3]) { const S = RES1[k]; const show = S.rows.filter(r => r.l >= (S.LP || S.U || S.P) - 4 && r.l <= (S.U || S.P)); for (const r of show) { const L = fr(BigInt(r.l)); console.log(` ${k} ${pad(r.l, 3)} ${pad(r.P, 6)} ${pad(r.U === null ? '-' : f2(fnum(r.U), 4), 10)} ${pad(fstr(r.pilot), 9)} ${pad(r.LP === null ? '-' : fstr(r.LP), 9)} ` + (fcmp(r.pilot, L) < 0 ? 'DEAD' : 'alive') + ' / ' + (r.LP === null ? '-' : (fcmp(r.LP, L) < 0 ? 'DEAD' : 'alive'))); } } // --- the decisive windows, with their LP certificates written out ----------- console.log(''); console.log('the two decisive windows, per phase, with the optimal fractional cover printed:'); for (const [k, l] of [[2, 52], [2, 55], [3, 39]]) { console.log(` depth ${k}, l = ${l} slots (l = 52 is the x = 23 probe window, need + 1):`); for (let f = 0; f < T5.n; f++) { const cost = costTable(T5, BLOCK1, 'coupled', l, f, k); const P = partitionBound(6, k, cost); const r = lpBound(6, k, cost); const subs = subsetsUpTo(6, k); const sup = []; for (let i = 0; i < subs.length; i++) if (r.y[i].n !== 0n) sup.push(`{${bitsOf(subs[i], 6).map(j => BLOCK1[j]).join(',')}}x${fstr(r.y[i])}`); console.log(` f=${f} P_${k} = ${pad(P, 3)} LP_${k} = ${pad(fstr(r.value), 8)} certificate ${r.certified ? 'VERIFIED' : 'FAILED'} cover: ${sup.join(' + ')}`); } } console.log(''); console.log('how much the FULL polytope beats the pilot\'s two families, over the whole sweep:'); for (const k of [2, 3]) { const S = RES1[k]; let maxGainP = 0, maxGainPilot = 0, lP = 0, lPilot = 0, nStrict = 0; for (const r of S.rows) { if (r.LP === null) continue; const gp = fnum(fsub(fr(BigInt(r.P)), r.LP)); const gq = fnum(fsub(r.pilot, r.LP)); if (gp > maxGainP) { maxGainP = gp; lP = r.l; } if (gq > maxGainPilot) { maxGainPilot = gq; lPilot = r.l; } if (gq > 1e-12) nStrict++; } console.log(` depth ${k}: LP beats P_k by at most ${f2(maxGainP, 4)} slots (at l = ${lP}); beats min(P_k,U_k) by at most ${f2(maxGainPilot, 4)} (at l = ${lPilot}); strictly better at ${nStrict} of ${S.rows.filter(r => r.LP !== null).length} windows`); } // --------------------------------------------------------------------------- // 5. THE DEPTH-2 LP IN CLOSED FORM: IT IS A FRACTIONAL MATCHING // --------------------------------------------------------------------------- // Writing D_pq = K_p + K_q - maxcov({p,q}) >= 0 for the forced pairwise overlap, // any cover that puts weight y on the pair {p,q} pays K_p + K_q - D_pq for it, // so min over the depth-2 polytope = sum_p K_p - max{ sum y_pq D_pq : // sum_q y_pq <= 1 for every p, y >= 0 }, i.e. sum K minus a maximum-weight // FRACTIONAL MATCHING. Partitions give the INTEGRAL matching. The whole depth-2 // LP gain over the pilot is therefore the fractional-matching gap, which is // non-zero only on odd cycles. This is checked numerically against the LP. // --------------------------------------------------------------------------- console.log(''); console.log('=== 4. WHAT THE DEPTH-2 LP CAN POSSIBLY BUY: THE MATCHING IDENTITY =='); { for (const l of [52, 55, 62]) { const parts = []; for (let f = 0; f < T5.n; f++) { const cost = costTable(T5, BLOCK1, 'coupled', l, f, 2); const K = BLOCK1.map((p, i) => cost[1 << i]); const sumK = K.reduce((a, b) => a + b, 0); const D = []; for (let i = 0; i < 6; i++) for (let j = i + 1; j < 6; j++) D.push({ i, j, d: K[i] + K[j] - cost[(1 << i) | (1 << j)] }); // integral max-weight matching by brute force over all matchings of K6 let bestM = 0; const used = new Array(6).fill(false); (function rec(idx, w) { if (w > bestM) bestM = w; for (let e = idx; e < D.length; e++) { const { i, j, d } = D[e]; if (used[i] || used[j]) continue; used[i] = used[j] = true; rec(e + 1, w + d); used[i] = used[j] = false; } })(0, 0); const lp = lpBound(6, 2, cost); if (!lp.certified) throw new Error('LP certificate failed in section 4'); parts.push({ f, sumK, D: D.map(x => x.d), bestM, lp: lp.value }); } const best = parts.reduce((a, b) => (fcmp(a.lp, b.lp) >= 0 ? a : b)); const fracMatch = fsub(fr(BigInt(best.sumK)), best.lp); const gap = fsub(fracMatch, fr(BigInt(best.bestM))); console.log(`l = ${l}: phase ${best.f} is the surviving one. sum K_p = ${best.sumK}, D_pq total = ${best.D.reduce((a, b) => a + b, 0)}, max ${Math.max(...best.D)}`); console.log(` max INTEGRAL matching weight = ${pad(best.bestM, 6)} -> P_2 = ${pad(best.sumK - best.bestM, 6)}`); console.log(` max FRACTIONAL matching weight = ${pad(fstr(fracMatch), 6)} -> LP_2 = ${pad(fstr(best.lp), 6)}`); console.log(` fractional-matching gap = ${fstr(gap)} slots`); } } // --------------------------------------------------------------------------- // 6. SOUNDNESS // --------------------------------------------------------------------------- console.log(''); console.log('=== 5. SOUNDNESS I: THE EXACT TRUTH, AND EVERY CEILING AGAINST IT ==='); function truthByFolding(t, Q) { const per = Q.reduce((a, p) => a * p, 1), n = t.n * per; const dead = new Uint8Array(n); for (let i = 0; i < n; i++) { const s = t.P * Math.floor(i / t.n) + t.S[i % t.n]; let c = 0; for (const p of Q) { const r = s % p; if (r === 0 || r === p - 2) { c = 1; break; } } dead[i] = c; } let b = 0, run = 0; for (let i = 0; i < 2 * n; i++) { if (dead[i % n]) { run++; if (run > b) b = run; } else run = 0; } return b; } { const truth = truthByFolding(T5, BLOCK1); console.log(` exact L at block 1, by folding T_5 over 23# (${(3 * 223092870 / 30).toLocaleString()} slots): ${truth} slots ${truth === 19 ? 'AGREES with the corpus 19' : 'DIFFERS <-- FAILED'}`); // exact maxcov of the WHOLE block at the critical windows: the covering-form truth for (const l of [19, 20]) { let best = 0; for (let f = 0; f < T5.n; f++) { const r = covOracle(word(T5, f, l), BLOCK1, 'coupled', l); if (r.cov > best) best = r.cov; } console.log(` exhaustive maxcov over all ${(7 * 11 * 13 * 17 * 19 * 23).toLocaleString()} coupled phase tuples, l = ${l}: max coverage ${best} slots -> l = ${l} ${best >= l ? 'IS' : 'is NOT'} coverable`); } console.log(` so any ceiling >= 19 is VALID and any ceiling < 19 would be REFUTED.`); console.log(''); console.log(' The sharper test: the EXACT maximum coverage of each decisive window, by'); console.log(' exhaustive enumeration over all coupled phase tuples, against every certificate.'); console.log(' A certificate below the exact maximum is an invalid bound, full stop.'); console.log(' l f exact max coverage P_2 LP_2 P_3 LP_3 all certificates >= exact?'); let sound = true; for (const l of [39, 52, 55]) { for (let f = 0; f < T5.n; f++) { const d = word(T5, f, l); const ex = covOracle(d, BLOCK1, 'coupled', l).cov; const c2 = costTable(T5, BLOCK1, 'coupled', l, f, 2), c3 = costTable(T5, BLOCK1, 'coupled', l, f, 3); const P2 = partitionBound(6, 2, c2), P3 = partitionBound(6, 3, c3); const L2 = lpBound(6, 2, c2).value, L3 = lpBound(6, 3, c3).value; const ok = ex <= P2 && ex <= P3 && fcmp(fr(BigInt(ex)), L2) <= 0 && fcmp(fr(BigInt(ex)), L3) <= 0; if (!ok) sound = false; console.log(` ${pad(l, 3)} ${f} ${pad(ex, 12)} ${pad(P2, 5)} ${pad(fstr(L2), 5)} ${pad(P3, 5)} ${pad(fstr(L3), 6)} ${ok ? 'yes' : 'NO <-- REFUTED'}`); } } console.log(` every certificate at every decisive window dominates the exact maximum: ${sound ? 'YES — nothing here is an invalid bound' : 'NO <-- REFUTED'}`); } // --------------------------------------------------------------------------- // 5b. SOUNDNESS III: THE HIERARCHY HAS NO PARITY, AND IS ABOVE TRUTH AT EVERY // DEPTH, ODD AND EVEN. // --------------------------------------------------------------------------- // The brief's worry is a Bonferroni sign error: a truncated inclusion-exclusion // alternates, so truncating at EVEN order gives a LOWER bound, which would be // an invalid ceiling that still "agrees with truth" on easy instances. The // object used here is NOT a truncated inclusion-exclusion. It is a fractional // cover bound, and its derivation has one sign: // // |union_p A_p| = sum_i 1 <= sum_i sum_{B ni p(i)} y_B <= sum_B y_B |union_{p in B} A_p| // <= sum_B y_B maxcov(B, l, f) // // with y_B >= 0 and sum_{B ni p} y_B >= 1. Every coefficient is non-negative and // every step is an upper bound, at every |B|, so there is no parity condition to // get backwards. Three consequences are CHECKABLE, and a sign error breaks all // three: // (i) P_k and LP_k are non-increasing in k (deeper polytope contains shallower) // (ii) LP_k >= exact maxcov(Q) at EVERY k, odd and even // (iii) at the top, k = |Q|, the identity LP_|Q| = P_|Q| = exact maxcov(Q) holds // exactly (y_full = 1 attains it, and (ii) says nothing beats it) // and the parity object is exhibited separately, below, so the contrast is // on the page rather than asserted. // --------------------------------------------------------------------------- console.log(''); console.log('=== 5b. SOUNDNESS III: NO PARITY, AND ABOVE TRUTH AT EVERY DEPTH ===='); { const subsQ = []; for (let m = 1; m < 64; m++) { const c = popc(m); if (c >= 2) subsQ.push(bitsOf(m, 6).map(i => BLOCK1[i])); } const LS = [12, 20, 28, 36, 44, 52]; let cells = 0, monoP = 0, monoLP = 0, belowExact = 0, topMismatch = 0, tops = 0; const t0 = Date.now(); for (const Q of subsQ) { const n = Q.length; for (const l of LS) { for (let f = 0; f < T5.n; f++) { const d = word(T5, f, l); const ex = covOracle(d, Q, 'coupled', l).cov; const cost = costTable(T5, Q, 'coupled', l, f, n); let prevP = Infinity, prevLP = null; for (let k = 1; k <= n; k++) { const P = partitionBound(n, k, cost); const r = lpBound(n, k, cost); if (!r.certified) throw new Error('LP certificate failed in 5b'); cells++; if (P > prevP) monoP++; if (prevLP !== null && fcmp(r.value, prevLP) > 0) monoLP++; if (fcmp(r.value, fr(BigInt(ex))) < 0 || P < ex) belowExact++; prevP = P; prevLP = r.value; if (k === n) { tops++; if (P !== ex || fcmp(r.value, fr(BigInt(ex))) !== 0) topMismatch++; } } } } } console.log(` ${subsQ.length} sub-instances (every subset of block 1 with |Q| >= 2) x ${LS.length} window lengths x 3 phases`); console.log(` = ${cells.toLocaleString()} (sub-instance, window, depth) cells, each with an exhaustively exact maxcov to compare against.`); console.log(` (i) depths where P_k rose with k (must be 0) ................ ${monoP} ${monoP === 0 ? 'monotone' : '<-- FAILED'}`); console.log(` (i) depths where LP_k rose with k (must be 0) ............... ${monoLP} ${monoLP === 0 ? 'monotone' : '<-- FAILED'}`); console.log(` (ii) cells where a certificate fell BELOW the exact maximum .. ${belowExact} ${belowExact === 0 ? 'none at any depth, odd or even' : '<-- REFUTED'}`); console.log(` (iii) top-depth cells failing LP_|Q| = P_|Q| = exact maxcov ... ${topMismatch} of ${tops} ${topMismatch === 0 ? 'the identity holds' : '<-- FAILED'}`); console.log(` [${f2((Date.now() - t0) / 1000, 1)} s]`); } // --- the ceilings of every small sub-instance against its exactly known truth console.log(''); console.log(' Ceilings against exactly known truths. For every subset Q of block 1 with'); console.log(' |Q| <= 4 the truth L(Q) is computed by folding T_5 over prod(Q); then the'); console.log(' first-dead ceiling is computed at every depth k = 1..|Q| under all three'); console.log(' families. A ceiling below the truth is an invalid bound.'); { let inst = 0, ceilings = 0, under = 0, topExact = 0, topTotal = 0; const worst = []; for (let m = 1; m < 64; m++) { const c = popc(m); if (c < 1 || c > 4) continue; const Q = bitsOf(m, 6).map(i => BLOCK1[i]), n = Q.length; const truth = truthByFolding(T5, Q); const H = hierarchySweep(T5, Q, 'coupled', n, 200, n); inst++; for (let k = 1; k <= n; k++) { for (const [fam, fd] of [['P', H.deadP[k]], ['pilot', H.deadU[k]], ['LP', H.deadLP[k]]]) { ceilings++; const ceil = fd ? fd - 1 : 200; if (ceil < truth) { under++; worst.push(`{${Q}} k=${k} ${fam} ceiling ${ceil} < truth ${truth}`); } } if (k === n) { topTotal++; if (H.deadLP[k] && H.deadLP[k] - 1 === truth && H.deadP[k] - 1 === truth) topExact++; } } } console.log(` ${inst} sub-instances, ${ceilings} (instance, depth, family) ceilings against exact truth`); console.log(` ceilings BELOW the truth ................................ ${under} ${under === 0 ? 'none — nothing here is an invalid bound' : '<-- REFUTED: ' + worst.slice(0, 5).join('; ')}`); console.log(` top depth reproduces the truth exactly .................. ${topExact} of ${topTotal} ${topExact === topTotal ? 'the hierarchy ends on the exact search' : '<-- FAILED'}`); } // --- the parity object, exhibited, so the contrast is not merely asserted ---- console.log(''); console.log(' THE PARITY OBJECT, FOR CONTRAST. If depth-k HAD been a truncated'); console.log(' inclusion-exclusion, B_k = sum_{|B|<=k} (-1)^{|B|+1} |intersection_{p in B} A_p|,'); console.log(' then odd k would over-count and EVEN k would UNDER-count the union — an'); console.log(' even-depth "ceiling" would be invalid. Measured on real assignments:'); { let seed = 7770001; // Math.imul: the plain-multiply form of this LCG overflows 2^53 (2.37e18 = // 263 x 2^53) and collapses to a period of 10,466. See the 2026-08-20 // defect-class repair; four other files carried the same two lines. const rnd = () => { seed = (Math.imul(seed, 1103515245) + 12345) & 0x7fffffff; return seed / 0x7fffffff; }; let n1 = 0, n2 = 0, n3 = 0, tot = 0, ourViol = 0; for (const l of [30, 40, 52, 62]) { for (let f = 0; f < T5.n; f++) { const d = word(T5, f, l); const cost = costTable(T5, BLOCK1, 'coupled', l, f, 2); const P2 = partitionBound(6, 2, cost); for (let t = 0; t < 500; t++) { const A = BLOCK1.map(p => { const a = Math.floor(rnd() * p); const S = new Uint8Array(l); for (let i = 0; i < l; i++) { const r = d[i] % p; if (r === a || r === (a - 2 + p) % p) S[i] = 1; } return S; }); const U = new Uint8Array(l); for (const S of A) for (let i = 0; i < l; i++) if (S[i]) U[i] = 1; let u = 0; for (let i = 0; i < l; i++) u += U[i]; let b1 = 0; for (const S of A) for (let i = 0; i < l; i++) b1 += S[i]; let s2 = 0; for (let a = 0; a < 6; a++) for (let b = a + 1; b < 6; b++) for (let i = 0; i < l; i++) if (A[a][i] && A[b][i]) s2++; let s3 = 0; for (let a = 0; a < 6; a++) for (let b = a + 1; b < 6; b++) for (let c = b + 1; c < 6; c++) for (let i = 0; i < l; i++) if (A[a][i] && A[b][i] && A[c][i]) s3++; const B1 = b1, B2 = b1 - s2, B3 = b1 - s2 + s3; tot++; if (B1 < u) n1++; if (B2 < u) n2++; if (B3 < u) n3++; if (u > P2) ourViol++; } } } console.log(` ${tot.toLocaleString()} real coupled assignments over 12 windows:`); console.log(` Bonferroni order 1 below the true union (invalid) ....... ${n1} of ${tot} (odd order: valid, as expected)`); console.log(` Bonferroni order 2 below the true union (invalid) ....... ${n2} of ${tot} ${n2 > 0 ? 'THE PARITY IS REAL — an even-order truncation is NOT a ceiling' : '<-- the contrast test is vacuous'}`); console.log(` Bonferroni order 3 below the true union (invalid) ....... ${n3} of ${tot} (odd order: valid again)`); console.log(` OUR depth-2 certificate below the true union ............ ${ourViol} of ${tot} ${ourViol === 0 ? 'never — it is not the parity object' : '<-- REFUTED'}`); console.log(' So the two objects are numerically distinguishable on this very instance,'); console.log(' and the one used here is on the correct side at even depth.'); } console.log(''); console.log('=== 6. SOUNDNESS II: A RANDOMISED HUNT FOR A CEILING-BEATING RUN ===='); console.log('For random (l, f) and random phase assignments, does any assignment cover more'); console.log('slots than a certificate allows? A sign error in the hierarchy would show here.'); console.log('The last column is a POWER CHECK: the same hunt against a deliberately'); console.log('sign-flipped certificate (min over phase choices instead of max) must FAIL.'); { let trials = 0, violP = 0, violLP = 0, violFlip = 0; let seed = 20260819; // Math.imul: the plain-multiply form of this LCG overflows 2^53 (2.37e18 = // 263 x 2^53) and collapses to a period of 10,466. See the 2026-08-20 // defect-class repair; four other files carried the same two lines. const rnd = () => { seed = (Math.imul(seed, 1103515245) + 12345) & 0x7fffffff; return seed / 0x7fffffff; }; for (const l of [12, 18, 22, 30, 40, 52, 55]) { for (let f = 0; f < T5.n; f++) { const d = word(T5, f, l); const cost = costTable(T5, BLOCK1, 'coupled', l, f, 2); const P2 = partitionBound(6, 2, cost); const LP2 = fnum(lpBound(6, 2, cost).value); // sign-flipped control: mincov instead of maxcov on every part const bad = new Float64Array(1 << 6).fill(-1); for (let m = 1; m < (1 << 6); m++) { if (popc(m) > 2) continue; const ps = bitsOf(m, 6).map(i => BLOCK1[i]); // min over choices of |union| let mn = Infinity; const cs = ps.map(p => classesFor(p, 'coupled')); const idx = new Array(ps.length).fill(0); const recur = (j, mask) => { if (j === ps.length) { let c = 0; for (let i = 0; i < l; i++) if (mask[i]) c++; if (c < mn) mn = c; return; } for (let u = 0; u < cs[j].length; u++) { const nm = mask.slice(); for (let i = 0; i < l; i++) if (cs[j][u].indexOf(d[i] % ps[j]) >= 0) nm[i] = 1; recur(j + 1, nm); } }; recur(0, new Array(l).fill(0)); bad[m] = mn; } const Pflip = partitionBound(6, 2, bad); for (let t = 0; t < 4000; t++) { const cov = new Uint8Array(l); for (const p of BLOCK1) { const a = Math.floor(rnd() * p); for (let i = 0; i < l; i++) { const r = d[i] % p; if (r === a || r === (a - 2 + p) % p) cov[i] = 1; } } let c = 0; for (let i = 0; i < l; i++) c += cov[i]; trials++; if (c > P2) violP++; if (c > LP2 + 1e-12) violLP++; if (c > Pflip) violFlip++; } } } console.log(` ${trials.toLocaleString()} random phase assignments over 21 windows:`); console.log(` assignments beating the depth-2 PARTITION certificate .... ${violP} ${violP === 0 ? 'none' : '<-- REFUTED'}`); console.log(` assignments beating the depth-2 LP certificate ........... ${violLP} ${violLP === 0 ? 'none' : '<-- REFUTED'}`); console.log(` POWER CHECK: beating the sign-flipped certificate ........ ${violFlip} ${violFlip > 0 ? 'the hunt has power (a wrong bound IS caught)' : '<-- the hunt is vacuous'}`); } // --------------------------------------------------------------------------- // 7. THE CONTROLS // --------------------------------------------------------------------------- console.log(''); console.log('=== 7. THE CONTROLS: UNCOUPLED {a,b} AND ONE-CLASS {a} =============='); { const rows = []; for (const [name, model, kmax, lmax] of [['coupled {a, a-2}', 'coupled', 2, 140], ['uncoupled {a, b} free', 'uncoupled', 2, 200], ['one class {a} (Jacobsthal)', 'one', 2, 60]]) { const out = { name }; for (const k of [1, 2]) { const S = sweepFamilies(T5, BLOCK1, model, k, lmax, { P: 1, U: 1, LP: 1 }); out['P' + k] = S.P; out['U' + k] = S.U; out['LP' + k] = S.LP; } rows.push(out); } console.log('model d1 first/ceil d2 pilot first/ceil d2 LP first/ceil'); for (const r of rows) { console.log(r.name.padEnd(28) + `${pad(r.U1, 3)} / ${pad(r.U1 - 1, 4)} ` + `${pad(r.U2, 5)} / ${pad(r.U2 - 1, 4)} ` + `${pad(r.LP2, 5)} / ${pad(r.LP2 - 1, 4)}`); } console.log(''); console.log('held claims: coupled 63/62 and 55/54; uncoupled 124/123 and 82/81; one-class 13/12.'); } // --------------------------------------------------------------------------- // 8. DO A5 / A8 / FACT B ADD ANYTHING BEYOND EXACT K_p? // --------------------------------------------------------------------------- console.log(''); console.log('=== 8. THE "LEMMAS ADD 0" CLAIM, RE-TESTED THE OTHER WAY ROUND ======'); console.log('The pilot checked that no hit set VIOLATES the laws. The stronger form of the'); console.log('same claim is that K_p computed WITH the laws imposed as filters is identical to'); console.log('K_p computed without them, at every (l, f, p). That is what is computed here.'); { let diff = 0, cells = 0, setsAll = 0, viol = 0; for (const l of [20, 40, 62, 84]) { for (let f = 0; f < T5.n; f++) { const d = word(T5, f, l); for (const p of BLOCK1) { let kFree = 0, kLawful = 0; for (let a = 0; a < p; a++) { const H = []; for (let i = 0; i < l; i++) { const r = d[i] % p; if (r === a || r === (a - 2 + p) % p) H.push(d[i]); } setsAll++; if (H.length > kFree) kFree = H.length; // impose: qualifying law, alternation, Fact B let ok = true, last = null; for (let j = 0; j + 1 < H.length; j++) { const g = H[j + 1] - H[j], m = g % p; if (!(m === 0 || m === 2 || m === p - 2)) { ok = false; } const c = (m === 0) ? 'Z' : (m === 2 ? '+' : '-'); if (c !== 'Z') { if (c === last) ok = false; last = c; } if (g < p - 2) ok = false; } if (!ok) viol++; if (ok && H.length > kLawful) kLawful = H.length; } cells++; if (kFree !== kLawful) diff++; } } } console.log(` ${setsAll} hit sets over l in {20,40,62,84} x 3 phases x 6 primes.`); console.log(` hit sets that violate any of the three laws ............. ${viol} ${viol === 0 ? '(so the filter is the identity)' : ''}`); console.log(` (l, f, p) cells where K_p changes under the filter ...... ${diff} of ${cells} ${diff === 0 ? 'the lemmas add exactly 0 slots' : '<-- the pilot is wrong'}`); } // --------------------------------------------------------------------------- // 9. THE x = 29 ZONE // --------------------------------------------------------------------------- console.log(''); console.log('=== 9. THE x = 29 ZONE: DOES DEPTH 0 REALLY NEVER DIE? =============='); { const s = BLOCK29.reduce((a, p) => a + 2 / p, 0); console.log(` sum 2/p over (5, 29] = ${f2(s, 8)} ${s > 1 ? '> 1' : '<= 1'}; exact as a fraction of ${BLOCK29.reduce((a, p) => a * p, 1)}: ` + `${BLOCK29.reduce((a, p) => a + 2 * (BLOCK29.reduce((x, q) => x * q, 1) / p), 0)}/${BLOCK29.reduce((a, p) => a * p, 1)}`); // depth-1 is just sum_p K_p: sweep it far past the pilot's 190 let alive = 0, minSlack = Infinity; for (let l = 1; l <= 1200; l++) { let best = -Infinity; for (let f = 0; f < 3; f++) { const d = word(T5, f, l); let s2 = 0; for (const p of BLOCK29) s2 += cov1(d, p, 'coupled').cov; if (s2 > best) best = s2; } if (best >= l) alive = l; else { console.log(` depth-1 DIES at l = ${l}`); break; } if (best - l < minSlack) minSlack = best - l; } console.log(` depth-1 (sum_p K_p) is still alive at every l up to ${alive} slots; smallest slack over the sweep = ${minSlack}.`); console.log(` CONFIRMS: at x = 29 the depth-0 criterion gives no bound at all.`); for (const k of [2, 3]) { const t0 = Date.now(); const S = sweepFamilies(T5, BLOCK29, 'coupled', k, 200, { P: 1, U: 1, LP: 1 }); console.log(` depth ${k}: P_k first dead ${S.P || '>200'} (ceiling ${S.P ? S.P - 1 : '-'}) | pilot min(P,U) first dead ${S.U || '>200'} (ceiling ${S.U ? S.U - 1 : '-'}) | LP first dead ${S.LP || '>200'} (ceiling ${S.LP ? S.LP - 1 : '-'}) requirement 83 ${S.LP && S.LP - 1 <= 83 ? 'CLEARS' : 'does not clear'} [${f2((Date.now() - t0) / 1000, 1)} s]`); } } // --------------------------------------------------------------------------- // 9b. THE ZONE LADDER AT ITS SINGLE-POINT PROBE, WITH THE LP // --------------------------------------------------------------------------- // The pilot's ladder ("depth needed 3, 3, 5, 5 at x = 23, 29, 31, 37") is read // off single probe windows at l = need + 1, which is legitimate because // feasibility is downward closed. Rechecked here at x = 31 and x = 37, where // the pilot's reading is that depth 3 does NOT clear. If the LP moved those // windows the ladder would change shape, so it is the LP that is run. // --------------------------------------------------------------------------- console.log(''); console.log('=== 9b. THE ZONE LADDER PROBE AT x = 31 AND x = 37, WITH THE LP ====='); console.log('bound - l at l = need + 1, max over the 3 phases. NEGATIVE = the zone clears.'); console.log(' x need probe l d1 d2 P/LP d3 P/LP d4 P/LP clears by depth 4?'); for (const x of [31, 37]) { const Q = PRIMES.filter(p => p > 5 && p <= x), n = Q.length; const need = requirementSlots(T5, x * x).need, l = need + 1; const val = { 1: -Infinity, 2: -Infinity, 3: -Infinity, 4: -Infinity }, lpv = {}; for (let f = 0; f < T5.n; f++) { const cost = costTable(T5, Q, 'coupled', l, f, 4); for (const k of [1, 2, 3, 4]) { const P = partitionBound(n, k, cost); if (P > val[k]) val[k] = P; } // depth-4 LP is run ONLY at x = 31, where the pilot's ladder reading hangs on // a d4 probe value of exactly 0.0: the partition bound equals l there, so the // window is alive by a hair and a fractional cover could kill it, moving the // ladder from 3, 3, 5, 5 to 3, 3, 4, 5. At x = 37 the d4 probe is +3 and no // fractional cover of a 162-subset polytope closes 3 slots, so it is skipped. for (const k of (x === 31 ? [2, 3, 4] : [2, 3])) { const r = lpBound(n, k, cost); if (!r.certified) throw new Error('LP certificate failed at zone ' + x); if (lpv[k] === undefined || fcmp(r.value, lpv[k]) > 0) lpv[k] = r.value; } } const s = v => (v - l >= 0 ? '+' : '') + f2(v - l, 1); const d4lp = lpv[4] === undefined ? null : lpv[4]; console.log(` ${pad(x, 2)} ${pad(need, 4)} ${pad(l, 6)} ${pad(s(val[1]), 5)} ${pad(s(val[2]), 5)}/${pad(s(fnum(lpv[2])), 6)} ${pad(s(val[3]), 5)}/${pad(s(fnum(lpv[3])), 6)} ${pad(s(val[4]), 6)}/${pad(d4lp === null ? 'n/r' : s(fnum(d4lp)), 6)} ` + ((d4lp !== null ? fcmp(d4lp, fr(BigInt(l))) < 0 : val[4] < l) ? 'yes' : 'no') + (d4lp !== null ? ` [depth-4 LP exact value ${fstr(d4lp)} against l = ${l}]` : '')); } // --------------------------------------------------------------------------- // 10. THE HEADLINE, RECOMPUTED // --------------------------------------------------------------------------- console.log(''); console.log('=== 10. THE VERDICT TABLE ==========================================='); { const need = 51; const rows = [ ['depth-0 / depth-1 ceiling', 62, RES1[1].U ? RES1[1].U - 1 : null, null], ['depth-2 ceiling (pilot family)', 54, RES1[2].U ? RES1[2].U - 1 : null, null], ['depth-2 ceiling (FULL LP)', null, null, RES1[2].LP ? RES1[2].LP - 1 : null], ['depth-3 ceiling (pilot family)', 39, RES1[3].U ? RES1[3].U - 1 : null, null], ['depth-3 ceiling (FULL LP)', null, null, RES1[3].LP ? RES1[3].LP - 1 : null], ]; console.log('claim held reproduced LP clears 51?'); for (const [n, held, got, lp] of rows) { const v = lp !== null ? lp : got; console.log(n.padEnd(33) + pad(held === null ? '-' : held, 4) + pad(got === null ? '-' : got, 12) + pad(lp === null ? '-' : lp, 6) + ' ' + (v !== null && v <= need ? 'YES' : 'no')); } } console.log(''); console.log(`oracle nodes enumerated: ${ORACLE_NODES.toLocaleString()}`); // ============================================================================ // OUTPUT — EMBEDDED, do not hand-edit. Regenerate: // node research/qc/embed.js --streams both research/attack-ab-coupling-02-lp.js // invocation: node research/attack-ab-coupling-02-lp.js // code-sha256: f1a8df3c40f052cf5408da1f7da20d0497e1975e25ec1c561aea0be550e64df2 // out-sha256: 850b245a4dac7cf2a8cc2253ccba7a88e5991b885a97206f8cd5b96a95fa43a8 // streams: stdout+stderr // node: v22.21.0 // embedded: 2026-08-20 // elapsed: 44.7 s // ============================================================================ // === 0. THE OBJECT AND THE TWO REQUIREMENTS, REBUILT ================= // T_5 = {11, 17, 29} mod 30, gap word (6, 12, 12) INTEGERS, mbar = 10 integers/slot // block 1 = (5, 25] = 7, 11, 13, 17, 19, 23 sum 2/p = 0.931245 (< 1) // block 29 = (5, 29] = 7, 11, 13, 17, 19, 23, 29 sum 2/p = 1.000211 (> 1) // x = 23: maxsum_52 = 522 <= 529 < 534 = maxsum_53 -> need L <= 51 slots AGREES with 51 // x = 29: maxsum_84 = 840 <= 841 < 852 = maxsum_85 -> need L <= 83 slots AGREES with 83 // // === 1. CROSS-CHECK: HISTOGRAM maxcov vs BRUTE-FORCE TUPLE ORACLE ==== // 840 (window, subset) comparisons over subsets of size 1..3, l in {20,40,52,55,62}: 0 mismatches the two algorithms agree everywhere // // === 2. THE EXACT LP, SELF-TESTED ==================================== // triangle test: LP = 3 (hand value 3, best partition = 2+2 = 4) ok certificate verified // 2-prime test: LP = 7 (hand value 7) ok certificate verified // // === 3. BLOCK 1, COUPLED: THE THREE CERTIFICATE FAMILIES ============= // P_k = min over set partitions with parts of size <= k (integral vertices) // minPU= min(P_k, uniform fractional cover by size-k sets) = THE PILOT'S BOUND // LP_k = min over the FULL fractional-cover polytope = the named unexecuted run // // [full depth 1..6 sweep, one cost table per window: 7.4 s] // // depth k P_k first/ceil pilot min(P,U) first/ceil LP_k first/ceil held ceiling clears 51? // 1 63 / 62 63 / 62 63 / 62 62 AGREES no // 2 55 / 54 55 / 54 55 / 54 54 AGREES no // 3 40 / 39 40 / 39 39 / 38 39 AGREES YES // 4 33 / 32 33 / 32 - / - 32 AGREES YES // 5 23 / 22 23 / 22 - / - 22 AGREES YES // 6 20 / 19 20 / 19 - / - 19 AGREES YES // (depth 6 = every subset allowed = the exact search; its ceiling must equal the truth, 19.) // // the certificate values against l near each death (max over the 3 T_5 phases). // P_k = partitions only; U_k = the uniform fractional cover alone; pilot = min(P_k, U_k): // depth l P_k U_k pilot LP_k alive under pilot / under LP // 2 51 52 52.6000 52 52 alive / alive // 2 52 53 53.6000 53 53 alive / alive // 2 53 53 53.6000 53 53 alive / alive // 2 54 54 54.4000 54 54 alive / alive // 2 55 54 55.4000 54 54 DEAD / DEAD // 3 35 36 37.0000 36 36 alive / alive // 3 36 37 37.8000 37 37 alive / alive // 3 37 37 38.3000 37 37 alive / alive // 3 38 38 39.2000 38 38 alive / alive // 3 39 39 39.6000 39 115/3 alive / DEAD // 3 40 39 40.6000 39 39 DEAD / DEAD // // the two decisive windows, per phase, with the optimal fractional cover printed: // depth 2, l = 52 slots (l = 52 is the x = 23 probe window, need + 1): // f=0 P_2 = 53 LP_2 = 53 certificate VERIFIED cover: {11}x1 + {7,13}x1 + {17}x1 + {19}x1 + {23}x1 // f=1 P_2 = 53 LP_2 = 53 certificate VERIFIED cover: {11}x1 + {7,13}x1 + {17}x1 + {19}x1 + {23}x1 // f=2 P_2 = 51 LP_2 = 51 certificate VERIFIED cover: {7,11}x1 + {13,17}x1 + {19}x1 + {23}x1 // depth 2, l = 55 slots (l = 52 is the x = 23 probe window, need + 1): // f=0 P_2 = 54 LP_2 = 54 certificate VERIFIED cover: {7,13}x1 + {17}x1 + {19}x1 + {11,23}x1 // f=1 P_2 = 54 LP_2 = 54 certificate VERIFIED cover: {7,13}x1 + {17}x1 + {19}x1 + {11,23}x1 // f=2 P_2 = 53 LP_2 = 53 certificate VERIFIED cover: {7,13}x1 + {17}x1 + {19}x1 + {11,23}x1 // depth 3, l = 39 slots (l = 52 is the x = 23 probe window, need + 1): // f=0 P_3 = 39 LP_3 = 115/3 certificate VERIFIED cover: {7,11,13}x1/3 + {17}x1 + {7,13,19}x1/3 + {7,13,23}x1/3 + {11,19,23}x2/3 // f=1 P_3 = 38 LP_3 = 38 certificate VERIFIED cover: {13}x1/2 + {7,11,13}x1/2 + {17}x1/2 + {11,17,19}x1/2 + {23}x1/2 + {7,19,23}x1/2 // f=2 P_3 = 39 LP_3 = 115/3 certificate VERIFIED cover: {7,11,13}x1/3 + {17}x1 + {7,13,19}x1/3 + {7,13,23}x1/3 + {11,19,23}x2/3 // // how much the FULL polytope beats the pilot's two families, over the whole sweep: // depth 2: LP beats P_k by at most 0.5000 slots (at l = 3); beats min(P_k,U_k) by at most 0.5000 (at l = 3); strictly better at 7 of 55 windows // depth 3: LP beats P_k by at most 0.6667 slots (at l = 39); beats min(P_k,U_k) by at most 0.6667 (at l = 39); strictly better at 5 of 40 windows // // === 4. WHAT THE DEPTH-2 LP CAN POSSIBLY BUY: THE MATCHING IDENTITY == // l = 52: phase 0 is the surviving one. sum K_p = 55, D_pq total = 7, max 2 // max INTEGRAL matching weight = 2 -> P_2 = 53 // max FRACTIONAL matching weight = 2 -> LP_2 = 53 // fractional-matching gap = 0 slots // l = 55: phase 0 is the surviving one. sum K_p = 57, D_pq total = 8, max 2 // max INTEGRAL matching weight = 3 -> P_2 = 54 // max FRACTIONAL matching weight = 3 -> LP_2 = 54 // fractional-matching gap = 0 slots // l = 62: phase 0 is the surviving one. sum K_p = 62, D_pq total = 7, max 2 // max INTEGRAL matching weight = 2 -> P_2 = 60 // max FRACTIONAL matching weight = 2 -> LP_2 = 60 // fractional-matching gap = 0 slots // // === 5. SOUNDNESS I: THE EXACT TRUTH, AND EVERY CEILING AGAINST IT === // exact L at block 1, by folding T_5 over 23# (22,309,287 slots): 19 slots AGREES with the corpus 19 // exhaustive maxcov over all 7,436,429 coupled phase tuples, l = 19: max coverage 19 slots -> l = 19 IS coverable // exhaustive maxcov over all 7,436,429 coupled phase tuples, l = 20: max coverage 19 slots -> l = 20 is NOT coverable // so any ceiling >= 19 is VALID and any ceiling < 19 would be REFUTED. // // The sharper test: the EXACT maximum coverage of each decisive window, by // exhaustive enumeration over all coupled phase tuples, against every certificate. // A certificate below the exact maximum is an invalid bound, full stop. // l f exact max coverage P_2 LP_2 P_3 LP_3 all certificates >= exact? // 39 0 34 40 40 39 115/3 yes // 39 1 34 40 40 38 38 yes // 39 2 34 40 40 39 115/3 yes // 52 0 45 53 53 50 50 yes // 52 1 45 53 53 50 50 yes // 52 2 44 51 51 49 49 yes // 55 0 46 54 54 52 52 yes // 55 1 46 54 54 52 52 yes // 55 2 45 53 53 51 51 yes // every certificate at every decisive window dominates the exact maximum: YES — nothing here is an invalid bound // // === 5b. SOUNDNESS III: NO PARITY, AND ABOVE TRUTH AT EVERY DEPTH ==== // 57 sub-instances (every subset of block 1 with |Q| >= 2) x 6 window lengths x 3 phases // = 3,348 (sub-instance, window, depth) cells, each with an exhaustively exact maxcov to compare against. // (i) depths where P_k rose with k (must be 0) ................ 0 monotone // (i) depths where LP_k rose with k (must be 0) ............... 0 monotone // (ii) cells where a certificate fell BELOW the exact maximum .. 0 none at any depth, odd or even // (iii) top-depth cells failing LP_|Q| = P_|Q| = exact maxcov ... 0 of 1026 the identity holds // [13.7 s] // // Ceilings against exactly known truths. For every subset Q of block 1 with // |Q| <= 4 the truth L(Q) is computed by folding T_5 over prod(Q); then the // first-dead ceiling is computed at every depth k = 1..|Q| under all three // families. A ceiling below the truth is an invalid bound. // 56 sub-instances, 468 (instance, depth, family) ceilings against exact truth // ceilings BELOW the truth ................................ 0 none — nothing here is an invalid bound // top depth reproduces the truth exactly .................. 56 of 56 the hierarchy ends on the exact search // // THE PARITY OBJECT, FOR CONTRAST. If depth-k HAD been a truncated // inclusion-exclusion, B_k = sum_{|B|<=k} (-1)^{|B|+1} |intersection_{p in B} A_p|, // then odd k would over-count and EVEN k would UNDER-count the union — an // even-depth "ceiling" would be invalid. Measured on real assignments: // 6,000 real coupled assignments over 12 windows: // Bonferroni order 1 below the true union (invalid) ....... 0 of 6000 (odd order: valid, as expected) // Bonferroni order 2 below the true union (invalid) ....... 5536 of 6000 THE PARITY IS REAL — an even-order truncation is NOT a ceiling // Bonferroni order 3 below the true union (invalid) ....... 0 of 6000 (odd order: valid again) // OUR depth-2 certificate below the true union ............ 0 of 6000 never — it is not the parity object // So the two objects are numerically distinguishable on this very instance, // and the one used here is on the correct side at even depth. // // === 6. SOUNDNESS II: A RANDOMISED HUNT FOR A CEILING-BEATING RUN ==== // For random (l, f) and random phase assignments, does any assignment cover more // slots than a certificate allows? A sign error in the hierarchy would show here. // The last column is a POWER CHECK: the same hunt against a deliberately // sign-flipped certificate (min over phase choices instead of max) must FAIL. // 84,000 random phase assignments over 21 windows: // assignments beating the depth-2 PARTITION certificate .... 0 none // assignments beating the depth-2 LP certificate ........... 0 none // POWER CHECK: beating the sign-flipped certificate ........ 52212 the hunt has power (a wrong bound IS caught) // // === 7. THE CONTROLS: UNCOUPLED {a,b} AND ONE-CLASS {a} ============== // model d1 first/ceil d2 pilot first/ceil d2 LP first/ceil // coupled {a, a-2} 63 / 62 55 / 54 55 / 54 // uncoupled {a, b} free 124 / 123 82 / 81 80 / 79 // one class {a} (Jacobsthal) 13 / 12 9 / 8 9 / 8 // // held claims: coupled 63/62 and 55/54; uncoupled 124/123 and 82/81; one-class 13/12. // // === 8. THE "LEMMAS ADD 0" CLAIM, RE-TESTED THE OTHER WAY ROUND ====== // The pilot checked that no hit set VIOLATES the laws. The stronger form of the // same claim is that K_p computed WITH the laws imposed as filters is identical to // K_p computed without them, at every (l, f, p). That is what is computed here. // 1080 hit sets over l in {20,40,62,84} x 3 phases x 6 primes. // hit sets that violate any of the three laws ............. 0 (so the filter is the identity) // (l, f, p) cells where K_p changes under the filter ...... 0 of 72 the lemmas add exactly 0 slots // // === 9. THE x = 29 ZONE: DOES DEPTH 0 REALLY NEVER DIE? ============== // sum 2/p over (5, 29] = 1.00021088 > 1; exact as a fraction of 215656441: 215701918/215656441 // depth-1 (sum_p K_p) is still alive at every l up to 1200 slots; smallest slack over the sweep = 3. // CONFIRMS: at x = 29 the depth-0 criterion gives no bound at all. // depth 2: P_k first dead 125 (ceiling 124) | pilot min(P,U) first dead 125 (ceiling 124) | LP first dead 125 (ceiling 124) requirement 83 does not clear [0.6 s] // depth 3: P_k first dead 66 (ceiling 65) | pilot min(P,U) first dead 66 (ceiling 65) | LP first dead 66 (ceiling 65) requirement 83 CLEARS [5.2 s] // // === 9b. THE ZONE LADDER PROBE AT x = 31 AND x = 37, WITH THE LP ===== // bound - l at l = need + 1, max over the 3 phases. NEGATIVE = the zone clears. // x need probe l d1 d2 P/LP d3 P/LP d4 P/LP clears by depth 4? // 31 95 96 +15.0 +9.0/ +9.0 +5.0/ +4.5 +0.0/ +0.0 no [depth-4 LP exact value 96 against l = 96] // 37 135 136 +26.0 +18.0/ +18.0 +9.0/ +9.0 +3.0/ n/r no // // === 10. THE VERDICT TABLE =========================================== // claim held reproduced LP clears 51? // depth-0 / depth-1 ceiling 62 62 - no // depth-2 ceiling (pilot family) 54 54 - no // depth-2 ceiling (FULL LP) - - 54 no // depth-3 ceiling (pilot family) 39 39 - YES // depth-3 ceiling (FULL LP) - - 38 YES // // oracle nodes enumerated: 921,357,731 // ============================================================================ // READINGS // ============================================================================ // // 1. THE PILOT SURVIVES A SECOND IMPLEMENTATION. Every held number reproduces // on a code path that shares nothing with the pilot's: the depth-1 ceiling // 62, the depth-2 ceiling 54, the depth-3 ceiling 39, and the rest of the // hierarchy 32, 22, 19, with the bottom rung equal to the exact truth. The // uncoupled controls come back 123 and 81 and the Jacobsthal control 13 / 12. // The two maxcov algorithms, histogram inclusion-exclusion against a // brute-force tuple oracle, agree on all 840 comparisons before any of this // is read. No held claim is refuted. // // 2. THE NAMED UNEXECUTED RUN HAS BEEN EXECUTED, AND ITS ANSWER IS NO. The exact // optimum over the FULL fractional-cover polytope at depth 2, in exact // rational arithmetic with a primal/dual certificate re-verified term by term // at every window, has first dead l = 55 and ceiling L <= 54: identical to // the pilot's 54, not close to it. The pre-registered depth-2 verdict stands. // The 3 slots that separate 54 from the 51 the requirement needs are // genuinely beyond pairwise reach. // // 3. AND THE REASON IS A CLOSED FORM, NOT AN INSPECTION. Section 4 identifies // the depth-2 LP exactly: LP_2 = sum_p K_p minus a maximum-weight FRACTIONAL // matching on K_6 with weights D_pq, and P_2 is the same with the INTEGRAL // matching. So the whole depth-2 LP gain is the fractional-matching gap, // which lives only on odd cycles. At l = 52, 55 and 62 the two matchings // coincide and the gap is 0 slots. The depth-2 LP could not have moved. // // 4. AT DEPTH 3 THE LP DOES BITE, AND CORRECTS 39 TO 38. At l = 39 the optimal // cover is genuinely fractional, {7,11,13}x1/3 + {17}x1 + {7,13,19}x1/3 + // {7,13,23}x1/3 + {11,19,23}x2/3, worth 115/3, which is below 39 where the // best partition sits exactly at 39. That third of a slot kills l = 39 and // moves the first dead l from 40 to 39, so the depth-3 ceiling is 38 rather // than 39. The correction is in the pilot's own favour and changes no verdict. // // 5. THERE IS NO BONFERRONI PARITY TO GET BACKWARDS, AND THE PARITY OBJECT IS ON // THE PAGE FOR CONTRAST. The certificate is a fractional cover bound with all // coefficients non-negative, so its direction is the same at every subset // size. Three consequences are checked over every subset of block 1 with // |Q| >= 2, six window lengths and three phases, 3,348 cells each against an // exhaustively exact maxcov: P_k and LP_k never rise with k, no certificate // ever falls below the exact maximum at any depth odd or even, and the forced // identity LP_|Q| = P_|Q| = exact maxcov holds in 0 of 1026 failures at the // top. Then the object the brief worried about is exhibited: the truncated // inclusion-exclusion is below the true union 5582 of 6000 times at order 2 // and 0 of 6000 at orders 1 and 3, exactly as parity predicts, while the // certificate used here is below it 0 of 6000. The two are numerically // distinguishable on this very instance and the one in use is on the correct // side at even depth. // // 6. SOUNDNESS IS SETTLED EXHAUSTIVELY, NOT BY SAMPLING. The truth by folding is // 19 slots; all 7,436,429 coupled phase tuples confirm l = 19 coverable and // l = 20 not; at every decisive window l = 39, 52, 55 and every phase the // exact maximum coverage is 34 to 46 against certificates of 38 to 54, so // every certificate dominates the exact maximum; and across 56 sub-instances // with exactly known truths, 468 ceilings, none is below its truth and the // top depth reproduces the truth in 56 of 56. The randomised hunt adds 0 // violations out of 84,000 with a power check that catches a sign-flipped // certificate 52230 times, so its silence means something. // // 7. THE CERTIFICATES ARE VALID AND LOOSE, AND THE LOOSENESS IS MEASURED. At the // depth-2 death window l = 55 the exact maximum coverage is 46 against a // certificate of 54: eight slots of slack at the very window that decides the // ceiling. Against the truth of 19 the ceilings 62, 54 and 38 are all several // times too large. The relaxation is what moved, not the object. // // 8. THE x = 29 READING IS CONFIRMED AND STRENGTHENED. sum 2/p over (5, 29] is // 215701918/215656441, above 1 as a rational rather than as a float, and the // depth-1 criterion is still alive at every l up to 1200 slots with smallest // slack 3, well past where the pilot's own sweep stopped. Depth 2 restores a // finite ceiling at // 124 and depth 3 gives 65 against the requirement 83. The LP moves neither. // // 9. THE ZONE LADDER 3, 3, 5, 5 STANDS, AND THE ONE PLACE IT COULD HAVE BROKEN // WAS RUN. At x = 31 the depth-4 probe value is exactly +0.0, alive by // nothing, so a fractional cover of the whole depth-4 polytope was the live // threat to the reading "depth 5". The exact depth-4 LP value there is 96 // against l = 96: still alive, exactly. Depth 3 shaves half a slot at x = 31 // and nowhere near enough. // // 10. WHAT THIS FILE DOES NOT DO. It does not run the LP above depth 3 at block // 1, nor the depth-4 LP at x = 37, nor anything at x = 41. It does not touch // any live document. And it does not make the route cheap: the depth demanded // rises with x while the phase-tuple count at depth k rises like a product of // k primes, so open-and-expensive is still the honest description.