# autstructure.py -- structure of the symmetry group of had16.3 (needs aut.npy from autgroup.py): image in S_16, # orbits on the columns, and the distribution of element orders. import numpy as np from collections import Counter Qs=np.load('aut.npy'); N=16 perms=np.argmax(np.abs(Qs),axis=1); U={tuple(p) for p in perms} print("|Aut| =",len(Qs),"; image in S_16 (signs forgotten):",len(U),"; kernel:",len(Qs)//len(U)) parent=list(range(N)) def f(x): while parent[x]!=x: x=parent[x] return x for p in U: for j in range(N): parent[f(j)]=f(p[j]) print("orbits on the 16 columns:",sorted(Counter(f(j) for j in range(N)).values())) def order(Q): M=np.eye(N,dtype=int); k=0 while True: M=M@Q; k+=1 if np.array_equal(M,np.eye(N,dtype=int)): return k print("element orders:",dict(sorted(Counter(order(Q) for Q in Qs).items())))