// Zero-compute audit of xchan-at29.md and xchan-at29-prereg.md. // Inputs: ONLY the two raw columns the producer printed (mixed super-W obs, CRT), // the sealed predictions, and the rival predictions xchan-at29.md R2 prints. // Everything else in the scoring table is re-derived, so the scoring can be checked // without the 597 s @31 census. // J = obs/CRT; sigma_J = sqrt(obs)/CRT (the inherited Poisson model); // z = ((1-J) - predicted)/sigma_J; d = (1-J)/predicted - 1 const R = [ { lvl: '@19', obs: 74065, crt: 77162.70, pred: 0.041122, docJ: 0.959855, docS: 0.003527, docZ: -0.28, docD: -2.38 }, { lvl: '@23', obs: 1807665, crt: 1871421.20, pred: 0.033678, docJ: 0.965932, docS: 0.000718, docZ: +0.54, docD: +1.16 }, { lvl: '@29', obs: 53660192, crt: 55252747.16, pred: 0.028943, docJ: 0.971177, docS: 0.000133, docZ: -0.90, docD: -0.41 }, { lvl: '@31', obs: 1653241687, crt: 1695051393.52, pred: 0.024784, docJ: 0.975334, docS: 0.000024, docZ: -4.93, docD: -0.48 }, ]; const f = (x, n) => x.toFixed(n); const got = {}; console.log('=== 1. The scoring table re-derived from obs and CRT alone ==='); console.log('lvl J (doc) sigma_J (doc) z (doc) d% (doc)'); for (const r of R) { const J = r.obs / r.crt, s = Math.sqrt(r.obs) / r.crt, om = 1 - J; const z = (om - r.pred) / s, d = (om / r.pred - 1) * 100; got[r.lvl] = { J, s, om, z, d }; console.log(r.lvl + ' ' + f(J, 6) + ' (' + f(r.docJ, 6) + ') ' + f(s, 8) + ' (' + f(r.docS, 6) + ') ' + f(z, 2).padStart(6) + ' (' + f(r.docZ, 2) + ') ' + f(d, 3).padStart(7) + ' (' + f(r.docD, 2) + ')'); } const t1 = z => Math.abs(z) <= 3 ? 'HIT' : Math.abs(z) <= 6 ? 'MARGINAL' : 'MISS'; const t2 = d => { const a = Math.abs(d); return a <= 1.25 ? 'TIGHT' : a <= 2.5 ? 'CONSISTENT' : a <= 5 ? 'DRIFTING' : 'REFUTED AS THE CONSTANT'; }; const comb = (a, b) => a === 'HIT' ? 'HIT' : a === 'MARGINAL' ? (b === 'TIGHT' || b === 'CONSISTENT' ? 'SURVIVES WITH A MEASURED OFFSET' : 'WEAK') : 'MISS'; console.log('\n=== 2. Pre-registered band classification (prereg section 3), applied mechanically ==='); for (const lvl of ['@29', '@31']) { const g = got[lvl], a = t1(g.z), b = t2(g.d); console.log(' ' + lvl + ' TEST 1 z=' + f(g.z, 2) + ' -> ' + a + ' TEST 2 d=' + f(g.d, 2) + '% -> ' + b); console.log(' COMBINED: ' + comb(a, b) + ' J-band (fires if J<0.94 or J>1.00): J=' + f(g.J, 6) + ' -> ' + (g.J < 0.94 || g.J > 1.00 ? 'FIRES' : 'does not fire')); } console.log('\n=== 3. The rival laws, against the predictions xchan-at29.md R2 prints ==='); // Use the printed predictions, NOT predictions rebuilt from F: F is printed to four // significant figures and rebuilding from it injects a spurious ~0.1 sigma. const RIVALS = [ { law: 'N1 4S2 (candidate)', p29: 0.028943, p31: 0.024784, dz29: -0.90, dz31: -4.93 }, { law: 'N2 const x F @23', p29: 0.029145, p31: 0.024818, dz29: -2.43, dz31: -6.35 }, { law: 'N3 1/lnW @23', p29: 0.028990, p31: 0.025165, dz29: -1.26, dz31: -20.81 }, ]; for (const r of RIVALS) { const z29 = (got['@29'].om - r.p29) / got['@29'].s, z31 = (got['@31'].om - r.p31) / got['@31'].s; const ok = Math.abs(z29 - r.dz29) < 0.05 && Math.abs(z31 - r.dz31) < 0.05; console.log(' ' + r.law.padEnd(20) + ' z@29 ' + f(z29, 2).padStart(7) + ' (doc ' + f(r.dz29, 2) + ') z@31 ' + f(z31, 2).padStart(7) + ' (doc ' + f(r.dz31, 2) + ') ' + (ok ? 'both reproduce' : 'CHECK')); } const lnW = { 23: Math.log(223092870), 29: Math.log(6469693230), 31: Math.log(200560490130) }; const n3 = L => got['@23'].om * lnW[23] / lnW[L]; console.log(' N3 rebuilt from its own stated rule: @29 ' + f(n3(29), 6) + ' vs stated 0.028990; @31 ' + f(n3(31), 6) + ' vs stated 0.025165 ' + (Math.abs(n3(29) - 0.028990) < 5e-6 && Math.abs(n3(31) - 0.025165) < 5e-6 ? 'REPRODUCES' : 'differs')); console.log(' lnW: @23 ' + f(lnW[23], 3) + ' @29 ' + f(lnW[29], 3) + ' @31 ' + f(lnW[31], 3) + ' (prereg quotes 19.223 -> 22.590)'); console.log('\n=== 4. First attack: could the denominator carry the @31 residual? ==='); const g31 = got['@31']; const need1s = g31.s / g31.J, needAll = Math.abs(g31.om - 0.024784) / g31.J, have = 0.5e-8 / 0.33095269; console.log(' a relative error eps in CRT shifts (1-J) by J*eps = ' + f(g31.J, 4) + '*eps'); console.log(' to stay under 1 sigma_J = ' + g31.s.toExponential(3) + ' needs eps < ' + need1s.toExponential(3)); console.log(' to not fake the whole residual needs eps < ' + needAll.toExponential(3)); console.log(' document cross-check (miss+sub = e3 to 8 dp on 0.33095269) bounds eps <= ' + have.toExponential(3)); console.log(' margin ' + f(need1s / have, 0) + 'x => the denominator is NOT the weak point. Attack fails.'); console.log('\n=== 5. Prereg internal arithmetic, sealed before any @29 number existed ==='); const chk = (lab, a, b, tol) => console.log(' ' + (Math.abs(a - b) <= tol ? 'ok ' : 'DIFF ') + lab + ': ' + f(a, 4) + ' vs stated ' + f(b, 4)); chk('sigma_J at @29 as % of predicted 1-J (says 0.45%)', got['@29'].s / 0.028943 * 100, 0.45, 0.02); chk('0.0035 as % of the @19 prediction (says 8.5%)', 0.0035 / 0.041122 * 100, 8.5, 0.1); chk('0.0007 as % of the @23 prediction (says 2.1%)', 0.0007 / 0.033678 * 100, 2.1, 0.1); chk('record @19 residual as % of prediction (says -2.49%)', (0.0401 / 0.041122 - 1) * 100, -2.49, 0.01); chk('record @23 residual as % of prediction (says +1.25%)', (0.0341 / 0.033678 - 1) * 100, 1.25, 0.01); chk('predicted (1-J)/F at @29 (says 3.8399)', 0.028943 / 0.007537, 3.8399, 0.001); chk('predicted (1-J)/F at @31 (says 3.8612)', 0.024784 / 0.006419, 3.8612, 0.001); console.log(' sharpness ratio the prereg calls "between four and twenty": ' + f(2.1 / 0.45, 1) + ' and ' + f(8.5 / 0.45, 1)); console.log('\n=== 6. Instrument identities (gate, section 3) ==='); const nbar = x => { let v = 2n; for (const p of [7, 11, 13, 17, 19, 23, 29, 31]) if (p <= x) v *= BigInt(p - 2); return v; }; for (const [x, st] of [[29, 143139150n], [31, 4151035350n]]) console.log(' N-bar(@' + x + ') = 2*prod(p-2) = ' + nbar(x) + ' vs stated ' + st + ' ' + (nbar(x) === st ? 'MATCH' : 'MISMATCH')); const C3 = K => BigInt(K) * BigInt(K - 1) * BigInt(K - 2) / 6n; for (const [K, st] of [[7863, 80993070011n], [37534, 8812286043484n]]) console.log(' C(' + K + ',3) = ' + C3(K) + ' vs stated ' + st + ' ' + (C3(K) === st ? 'MATCH' : 'MISMATCH')); console.log('\n=== 7. SECOND ATTACK: how load-bearing is the inherited Poisson sigma? ==='); // xchan-at29.md section 7 (NOT REACHED): "The sigma_J error model is inherited, not derived." // d does not depend on the error model, so only TEST 1 can move. const kFlip = Math.abs(g31.z) / 3.0; console.log(' @31 z = ' + f(g31.z, 2) + ' under Poisson; TEST 2 d = ' + f(g31.d, 2) + '% is TIGHT for any sigma.'); console.log(' TEST 1 leaves MARGINAL for HIT as soon as |z| <= 3, i.e. dispersion factor k >= ' + f(kFlip, 2) + '.'); console.log(' So a factor of only ' + f(kFlip, 2) + 'x flips the combined verdict:'); console.log(' SURVIVES WITH A MEASURED OFFSET -> HIT'); const zc29 = -0.43, zc31 = -2.32; // item-x-offset.md: the slot-clustered sigma, 7 known-truth controls console.log('\n The project has since calibrated one. item-x-offset.md section 4 builds a'); console.log(' slot-clustered sigma on seven known-truth control draws (all inside 1.9 sigma)'); console.log(' and scores the SAME standing law at z = ' + zc29 + ' (@29) and z = ' + zc31 + ' (@31).'); console.log(' implied dispersion: @29 ' + f(got['@29'].z / zc29, 2) + 'x, @31 ' + f(g31.z / zc31, 2) + 'x'); console.log(' @31 under the calibrated sigma: TEST 1 ' + t1(zc31) + ', TEST 2 ' + t2(g31.d) + ' -> COMBINED: ' + comb(t1(zc31), t2(g31.d))); console.log(' measured dispersion ' + f(g31.z / zc31, 2) + 'x ' + (g31.z / zc31 >= kFlip ? 'EXCEEDS' : 'is below') + ' the ' + f(kFlip, 2) + 'x flip threshold.'); console.log(' => under the calibrated model the @31 verdict reads ' + comb(t1(zc31), t2(g31.d)) + ' and R1 has ZERO detections, not one.'); console.log(' xchan-at29.md ledger verdict still leads with "4.93 sigma low at @31".');