// ============================================================================ // ATTACK 24 — THE bound(K) DEPTH CURVE, MEASURED AND PRICED IN CLOSED FORM // (2026-08-14; composes natal-cap-08 (staircase/cap_K ladder), natal-cap-11 // (@23 conventions, K*(23)=27), natal-cap-15 (reading 7: the honest scaling // object is the ladder-depth curve bound(K), and its concavity should be // Mertens-predictable).) // ============================================================================ // // OBJECT. bound(K) = N − Σ_q cap_K(q) over the scour of tile @x, where cap_K // folds the deterministic natal residue system (cap2) plus the first K // freshness moduli (ascending scour primes) into the per-prime staircase cap: // cap_K(q) = s(q) + #{ 2 <= m <= (W±1)/q : lpf(m) >= q, v = q·m in the natal // residue system, v not in the 2 forbidden freshness residues mod // each of the first min(K, idx(q)) scour primes }. // TRUNCATION: only moduli q' < q constrain q's cofactors (a modulus >= q says // nothing history-blind about m), hence min(K, idx(q)), idx = q's scour index. // NEW HERE: the pool is the ENTIRE scour (cap-08 stopped at KMAX=12, cap-11 at // 192), which buys an exact per-prime anchor — at K = idx(q) the surviving // cofactors are precisely the slots alive when q marches, so // cap_full(q) = fresh(q) − self(q) + s(q) (asserted at EVERY prime), // and bound(full) = truth − (Σs − Σself): the ladder's ceiling is the march. // // THE INCREMENT LAW (cap-08 §8 heuristic turned into a prediction). Adding // modulus q_K thins every LATER prime's cofactor count by (1 − 1/(q_K − 1)): // v ≡ 0 (mod q_K) is impossible (lpf(m) >= q > q_K and q_K != q), so only ONE // forbidden residue is live, out of the q_K − 1 residues m can occupy (m is // never ≡ 0 mod q_K either). Telescoping: // cap_K(q) ≈ s + (cap2(q) − s) · ∏_{j < min(K, idx(q))} (1 − 1/(q_j − 1)) // bound_pred(K) = N − Σ_q that. // Mertens prices the product: ∏_{xq_K}(cap_{K−1}(q) − s) / (q_K − 1) — measured against prediction below. // // QUESTIONS. (1) Measure bound(K) at @23 (W = 223,092,870, truth 597,475) for // K = 0..full(1739), plus @13/@17/@19 re-runs on the same machinery (validated // digit-for-digit against cap-08/cap-11 sums before anything new is read). // (2) Does bound_pred track within a few % of truth at every level — i.e. is // the whole certificate technology priced analytically? (3) K_eps: the depth // needed to certify a given fraction of truth; growth law across levels. // (4) Efficiency: bound/truth at FIXED RELATIVE depth K/scour vs level — the // efficiency-collapse question in its cleanest form. // // COST. Per q one m-pass to (W+1)/q with an lpf gate; ranges total W·Σ 1/q // ≈ 1.03 W at @23 (no segmentation needed; lpf table only to (W+1)/29 = 7.7M). // The freshness scan stops at the FIRST violated modulus, and the structure is // kind: the heavy-cofactor primes (q=29: 365K admissible m) sit at the FRONT // of the scour and see almost no moduli, while the deep-moduli primes have // tiny cofactor counts — total scan work Σ_q Σ_j cum_q[j] ~ 5e8, seconds. // // node research/natal-cap-24-boundK-curve.js (~5 s, ~500 MB RAM) // ============================================================================ 'use strict'; function primesUpTo(n){const s=new Uint8Array(n+1),o=[];for(let i=2;i<=n;i++){if(!s[i]){o.push(i);for(let j=i*i;j<=n;j+=i)s[j]=1}}return o} function assert(c,msg){if(!c)throw new Error('ASSERT FAIL: '+msg)} const t0=Date.now(), el=()=>((Date.now()-t0)/1000).toFixed(1)+'s'; // ---- Natal@5 tile + ascending scour march (cap-11 machinery, verbatim) ----- function marchLevel(x){ const wheel=primesUpTo(x), mids=wheel.filter(p=>p>=7); let W=1;for(const p of wheel)W*=p; const alive=new Uint8Array(W); let N=0; for(const r0 of [11,17])for(let r=r0;rq>x&&q*q<=W); const rows=[]; let removed=0,selfT=0; for(const q of scour){ let fresh=0,self=0; for(let r=q;rr.q)); const LIM=Math.floor((W+1)/Q[0]); const lpf=new Int32Array(LIM+1); for(let i=2;i<=LIM;i++)if(lpf[i]===0)for(let j=i;j<=LIM;j+=i)if(lpf[j]===0)lpf[j]=i; const sumK=new Float64Array(len+1); const cap2s=new Float64Array(len), ss=new Uint8Array(len); let sSum=0; for(let idx=0;idx= j for(let j=nf;j>=0;j--)cum[j]=cum[j+1]+hist[j]; assert(cum[nf]===fresh-self,`cap_full != fresh-self at q=${q} (${cum[nf]} vs ${fresh-self})`); for(let K=0;K<=len;K++)sumK[K]+=s+cum[Kv=0?'+':'')+((p-b)/L.S).toFixed(4)} | ${String(dm).padStart(6)} ${String(dp).padStart(6)}`); pk=K; } RES.push({x,len,S:L.S,N:L.N,Kstar,sumK,sumPred,sSum,selfT:L.selfT}); } // ---- PART 2: closed-form accuracy summary ----------------------------------- console.log('\n===== PART 2: closed-form accuracy (err = (bound_pred - bound_meas)/truth) ====='); for(const R of RES){ let mx=0,mxK=0,s1=0,n1=0; for(let K=R.Kstar;K<=R.len;K++){const e=(R.sumK[K]-R.sumPred[K])/R.S;if(Math.abs(e)>mx){mx=Math.abs(e);mxK=K}s1+=Math.abs(e);n1++} console.log(` @${R.x}: max |err| over K>=K* = ${(mx*100).toFixed(2)}% of truth (at K=${mxK}); mean |err| ${(s1/n1*100).toFixed(2)}%; err at K*=${R.Kstar}: ${((R.sumK[R.Kstar]-R.sumPred[R.Kstar])/R.S*100).toFixed(2)}%; err at full: ${((R.sumK[R.len]-R.sumPred[R.len])/R.S*100).toFixed(2)}%`); } // ---- PART 3: K_eps — depth needed to certify a fraction of truth ------------ console.log('\n===== PART 3: K_eps(x) = min K with bound(K) >= f * truth ====='); console.log(' x | scour | K*(>0) | f=0.5 | f=0.9 | f=0.99 | ceiling bound(full)/truth'); for(const R of RES){ const kFor=f=>{const t=f*R.S;for(let K=0;K<=R.len;K++)if(R.N-R.sumK[K]>=t)return K;return -1}; const fmt=K=>K<0?' unreach ':`${String(K).padStart(4)} (${(K/R.len).toFixed(3)})`; console.log(` ${String(R.x).padStart(2)} | ${String(R.len).padStart(5)} | ${fmt(R.Kstar)} | ${fmt(kFor(0.5))} | ${fmt(kFor(0.9))} | ${fmt(kFor(0.99))} | ${((R.N-R.sumK[R.len])/R.S).toFixed(4)}`); } { // growth of K_eps vs scour length (pairwise power exponents) const f05=RES.map(R=>{const t=0.5*R.S;for(let K=0;K<=R.len;K++)if(R.N-R.sumK[K]>=t)return K;return -1}); const f09=RES.map(R=>{const t=0.9*R.S;for(let K=0;K<=R.len;K++)if(R.N-R.sumK[K]>=t)return K;return -1}); const pw=(a,i,j)=>((Math.log(a[j]/a[i]))/(Math.log(RES[j].len/RES[i].len))).toFixed(2); console.log(` pairwise power exponents (K_f ~ scour^e): f=0.5: 13->17 ${pw(f05,0,1)}, 17->19 ${pw(f05,1,2)}, 19->23 ${pw(f05,2,3)} | f=0.9: 13->17 ${pw(f09,0,1)}, 17->19 ${pw(f09,1,2)}, 19->23 ${pw(f09,2,3)}`); console.log(` K(0.5T)/scour: ${RES.map((R,i)=>`@${R.x} ${(f05[i]/R.len).toFixed(3)}`).join(' ')} | K(0.9T)/scour: ${RES.map((R,i)=>`@${R.x} ${(f09[i]/R.len).toFixed(3)}`).join(' ')}`); } // ---- PART 4: efficiency at fixed relative depth ------------------------------ console.log('\n===== PART 4: bound(K)/truth at fixed relative depth K/scour ====='); console.log(' x | 1.5% | 3% | 5% | 10% | 25% | 50% | 100%'); for(const R of RES){ const cells=[0.015,0.03,0.05,0.10,0.25,0.50,1.0].map(f=>{ const K=Math.round(f*R.len); return ((R.N-R.sumK[K])/R.S).toFixed(4).padStart(7)}); console.log(` ${String(R.x).padStart(2)} | ${cells.join(' | ')}`); } console.log(' (K*/scour for scale: '+RES.map(R=>`@${R.x} ${(R.Kstar/R.len).toFixed(4)}`).join(' ')+')'); console.log('\ndone in '+el()); // ============================================================================ // OUTPUT — EMBEDDED, do not hand-edit. Regenerate: // node research/qc/embed.js research/natal-cap-24-boundK-curve.js // invocation: node research/natal-cap-24-boundK-curve.js // code-sha256: d72088dbfacc1e0bb55eb9ed5748c9336713ec52093622a1adab29d999af060c // out-sha256: 8a0a6cee769627a22d29a83f265dbffaea48541fc04e74774227109f5ee63353 // node: v22.21.0 // embedded: 2026-08-18 // elapsed: 5.7 s // ============================================================================ // // ===== @13: W=30030 N=990 scour=34 primes truth=307 (verified march) removed=683 self=6 [0.0s] // validated digit-for-digit vs cap-08/11 (cap2 880, cap_12 713, K*=0, floor 110); cap_full anchor exact at all 34 primes: bound(full) = 296 = truth − (Σs−Σself) = truth − 11 [0.0s] // K | Σcap_K | bound(K) b/truth | pred bound err/T | Δm/ΔK Δp/ΔK (since prev row) // 0 | 880 | 110 0.3583 | 110 +0.0000 | // 1 | 837 | 153 0.4984 | 157 +0.0124 | 43 47 // 2 | 804 | 186 0.6059 | 191 +0.0157 | 33 34 // 5 | 753 | 237 0.7720 | 243 +0.0181 | 17 17 // 10 | 716 | 274 0.8925 | 274 -0.0001 | 7 6 // 20 | 696 | 294 0.9577 | 288 -0.0180 | 2 1 // 34 | 694 | 296 0.9642 | 290 -0.0188 | 0 0 // // ===== @17: W=510510 N=14850 scour=120 primes truth=3099 (verified march) removed=11751 self=16 [0.0s] // validated digit-for-digit vs cap-08/11 (cap2 16135, cap_2 14768, K*=2, floor 82); cap_full anchor exact at all 120 primes: bound(full) = 3057 = truth − (Σs−Σself) = truth − 42 [0.0s] // K | Σcap_K | bound(K) b/truth | pred bound err/T | Δm/ΔK Δp/ΔK (since prev row) // 0 | 16135 | -1285 -0.4146 | -1285 +0.0000 | // 2 | 14768 | 82 0.0265 | 92 +0.0031 | 684 688 // 5 | 13780 | 1070 0.3453 | 1077 +0.0023 | 329 328 // 10 | 13018 | 1832 0.5912 | 1865 +0.0105 | 152 158 // 20 | 12396 | 2454 0.7919 | 2480 +0.0085 | 62 62 // 40 | 11979 | 2871 0.9264 | 2829 -0.0136 | 21 17 // 80 | 11801 | 3049 0.9839 | 2945 -0.0336 | 4 3 // 120 | 11793 | 3057 0.9864 | 2952 -0.0339 | 0 0 // // ===== @19: W=9699690 N=252450 scour=435 primes truth=38380 (verified march) removed=214070 self=52 [0.1s] // validated digit-for-digit vs cap-08/11 (cap2 308401, cap_10 250573, K*=10, floor 1877); cap_full anchor exact at all 435 primes: bound(full) = 38219 = truth − (Σs−Σself) = truth − 161 [0.2s] // K | Σcap_K | bound(K) b/truth | pred bound err/T | Δm/ΔK Δp/ΔK (since prev row) // 0 | 308401 | -55951 -1.4578 | -55951 +0.0000 | // 5 | 267251 | -14801 -0.3856 | -14942 -0.0037 | 8230 8202 // 10 | 250573 | 1877 0.0489 | 1672 -0.0053 | 3336 3323 // 20 | 236080 | 16370 0.4265 | 16173 -0.0051 | 1449 1450 // 40 | 226176 | 26274 0.6846 | 26545 +0.0071 | 495 519 // 80 | 219427 | 33023 0.8604 | 32789 -0.0061 | 169 156 // 150 | 215805 | 36645 0.9548 | 35601 -0.0272 | 52 40 // 300 | 214326 | 38124 0.9933 | 36590 -0.0400 | 10 7 // 435 | 214231 | 38219 0.9958 | 36640 -0.0411 | 1 0 // // ===== @23: W=223092870 N=5301450 scour=1739 primes truth=597475 (verified march) removed=4703975 self=175 [3.2s] // validated digit-for-digit vs cap-08/11 (cap2 7034588, cap_27 5296609, K*=27, floor 4841); cap_full anchor exact at all 1739 primes: bound(full) = 596782 = truth − (Σs−Σself) = truth − 693 [5.6s] // K | Σcap_K | bound(K) b/truth | pred bound err/T | Δm/ΔK Δp/ΔK (since prev row) // 0 | 7034588 | -1733138 -2.9008 | -1733138 +0.0000 | // 5 | 6186041 | -884591 -1.4805 | -883743 +0.0014 | 169709 169879 // 10 | 5800625 | -499175 -0.8355 | -498295 +0.0015 | 77083 77090 // 20 | 5431271 | -129821 -0.2173 | -129768 +0.0001 | 36935 36853 // 27 | 5296609 | 4841 0.0081 | 4430 -0.0007 | 19237 19171 // 40 | 5148494 | 152956 0.2560 | 153001 +0.0001 | 11393 11429 // 60 | 5028718 | 272732 0.4565 | 275881 +0.0053 | 5989 6144 // 100 | 4919651 | 381799 0.6390 | 391060 +0.0155 | 2727 2879 // 150 | 4852158 | 449292 0.7520 | 457602 +0.0139 | 1350 1331 // 250 | 4786998 | 514452 0.8610 | 515481 +0.0017 | 652 579 // 500 | 4730678 | 570772 0.9553 | 558862 -0.0199 | 225 174 // 1000 | 4707507 | 593943 0.9941 | 574655 -0.0323 | 46 32 // 1739 | 4704668 | 596782 0.9988 | 576405 -0.0341 | 4 2 // // ===== PART 2: closed-form accuracy (err = (bound_pred - bound_meas)/truth) ===== // @13: max |err| over K>=K* = 2.54% of truth (at K=4); mean |err| 1.50%; err at K*=0: 0.00%; err at full: -1.88% // @17: max |err| over K>=K* = 3.39% of truth (at K=108); mean |err| 2.25%; err at K*=2: 0.31%; err at full: -3.39% // @19: max |err| over K>=K* = 4.11% of truth (at K=410); mean |err| 2.92%; err at K*=10: -0.53%; err at full: -4.11% // @23: max |err| over K>=K* = 3.41% of truth (at K=1694); mean |err| 2.54%; err at K*=27: -0.07%; err at full: -3.41% // // ===== PART 3: K_eps(x) = min K with bound(K) >= f * truth ===== // x | scour | K*(>0) | f=0.5 | f=0.9 | f=0.99 | ceiling bound(full)/truth // 13 | 34 | 0 (0.000) | 2 (0.059) | 12 (0.353) | unreach | 0.9642 // 17 | 120 | 2 (0.017) | 8 (0.067) | 34 (0.283) | unreach | 0.9864 // 19 | 435 | 10 (0.023) | 24 (0.055) | 100 (0.230) | 261 (0.600) | 0.9958 // 23 | 1739 | 27 (0.016) | 67 (0.039) | 317 (0.182) | 872 (0.501) | 0.9988 // pairwise power exponents (K_f ~ scour^e): f=0.5: 13->17 1.10, 17->19 0.85, 19->23 0.74 | f=0.9: 13->17 0.83, 17->19 0.84, 19->23 0.83 // K(0.5T)/scour: @13 0.059 @17 0.067 @19 0.055 @23 0.039 | K(0.9T)/scour: @13 0.353 @17 0.283 @19 0.230 @23 0.182 // // ===== PART 4: bound(K)/truth at fixed relative depth K/scour ===== // x | 1.5% | 3% | 5% | 10% | 25% | 50% | 100% // 13 | 0.4984 | 0.4984 | 0.6059 | 0.6808 | 0.8730 | 0.9511 | 0.9642 // 17 | 0.0265 | 0.2614 | 0.4105 | 0.6515 | 0.8793 | 0.9690 | 0.9864 // 19 | -0.1696 | 0.2040 | 0.4713 | 0.7131 | 0.9147 | 0.9828 | 0.9958 // 23 | -0.0184 | 0.3922 | 0.5956 | 0.7872 | 0.9410 | 0.9899 | 0.9988 // (K*/scour for scale: @13 0.0000 @17 0.0167 @19 0.0230 @23 0.0155) // // done in 5.6s // ============================================================================ // READINGS (2026-08-14) // // 1. MACHINERY VALIDATED, PLUS A NEW EXACT ANCHOR. All four ladders reproduce // cap-08/cap-11 digit-for-digit (cap2, cap_K at the recorded K, K*, floor) // before anything new is read. The full-depth pool buys a theorem-grade // cross-check the truncated ladders never had: cap_full(q) = fresh(q) − // self(q) + s(q) ASSERTED AT EVERY ONE of the 2328 scour primes — at full // depth the surviving cofactors of q are exactly the slots alive when q // marches. So bound(full) = truth − (Σs − Σself) = truth − 11/42/161/693: // the ladder's ceiling IS the march, and the only permanent slack is the // never-cashed self-strike allowance (0.1-3.6% of truth, shrinking in x — // Σs−Σself is the count of scour primes that COULD have been twins but // weren't; @23 it is 693 of 868 eligible). // // 2. THE @23 CURVE. Monotone, concave, steep head and log-slow tail: // −1,733,138 at K=0; zero-crossing at K*=27 (floor 4841); 0.5·truth at // K=67; 0.9·truth at K=317; 0.99·truth at K=872; ceiling 596,782 = 0.9988 // truth at K=1739. The first 27 moduli lift the bound by 1.74M slots; the // last 739 buy 2,839. Δbound/ΔK falls 170K → 4 across the curve, tracking // 1/(q_K−1) times the remaining cap mass, exactly as the increment law says. // // 3. THE CLOSED FORM PRICES THE WHOLE TECHNOLOGY — within 4% of truth at // every K, at every level. bound_pred(K) = N − Σ_q [s + (cap2(q)−s) · // ∏_{j= 3%" and now says >= 5%. // PART 4's own 3% column, read off the block above, is @13 0.4984, @17 0.2614, // @19 0.2040, @23 0.3922 -- @19 sits BELOW @17, so 3% is not monotone in x. // The 5%, 10%, 25%, 50% and 100% columns all are, across @17 -> @19 -> @23 and // including @13 from 5% up. Old -> new: ">= 3%" -> ">= 5%", and the companion // sentence "only below ~2% relative depth do higher levels look worse" -> // "at ~3% and below", since 3% is now on the non-monotone side of the line. // Reading 5's verdict is unchanged: the non-monotonicity is confined to the // K* crossing region, which is exactly what the reading says it is, and the // honest boundary is one column further out than it claimed. // ---------------------------------------------------------------------------