# cosetforms.py -- which of the 10 orbits of bistochastic forms of had16.3 come from a reduction to coset sums. # A form, with column multipliers b, comes from the reduction along a subgroup G0 of D8, normal or not (for one of the # cocyclic structures R found by cocyclic16.py, cocycle163.json) when b, written on D8 and multiplied by a # trivialization phi of the cocycle on G0 (extended as in reduce.py), is constant on the cosets of G0. We test all # the forms of each orbit (images of the representative in had163reps.txt under the symmetry group, aut163.npy) against # all the 64 cocyclic structures, all the proper nontrivial subgroups with trivial restriction, normal or not, the # columns being grouped along the right cosets G0g, and all the trivializations, and record the indices, separately # for the normal and the nonnormal subgroups. Usage: cosetforms.py [matrix cocycles.json aut.npy reps.txt], the # default being had163.txt cocycle163.json aut163.npy had163reps.txt; for the Paley matrix of order 12, with the 2 # orbits of forms over mu_6 of section 4, the arguments are p12.txt cocycle_p12.json aut_p12.npy p12reps.txt. import numpy as np, json, itertools, sys arg=sys.argv[1:] or ['had163.txt','cocycle163.json','aut163.npy','had163reps.txt'] H=np.loadtxt(arg[0]); N=len(H) data=json.load(open(arg[1])); Qs=np.load(arg[2]); reps=np.atleast_2d(np.loadtxt(arg[3])) orbits=[] for r in reps: B=np.einsum('kij,j->ki',Qs,np.exp(2j*np.pi*r)); B=B/B[:,:1] _,u=np.unique(np.round(B,6),axis=0,return_index=True); orbits.append(B[u]) print("orbit sizes (forms up to global phase):",[len(o) for o in orbits],flush=True) result={} for nC,C in enumerate(data): rl,cl,mult,psi=C['rows'],C['cols'],np.array(C['mult']),np.array(C['psi'],float) Mx=H[np.ix_(rl,cl)]; cs=Mx[0,:] inv=[int(np.nonzero(mult[a]==0)[0][0]) for a in range(N)] def gen(S): S=set(S)|{0} while True: T=S|{int(mult[a][b]) for a in S for b in S} if T==S: return frozenset(S) S=T subs={gen(c) for r in (1,2) for c in itertools.combinations(range(N),r)} isnormal=lambda K: all(int(mult[mult[g][x]][inv[g]]) in K for g in range(N) for x in K) for G0 in [K for K in subs if 1