# q8z8.py -- direct check that there is no cocyclic Hadamard matrix of order 8 over Q8 or over Z8: for each group E of # order 16 (groups16.py) and each central involution z with E/ isomorphic to Q8 or Z8, we run over all the # transversals s, with s(1) = 1, and test whether the cocycle psi(g,h) = s(g)s(h)s(gh)^-1 gives a Hadamard matrix. # Prints, for each such (G, E, z), the number of transversals giving a Hadamard matrix, which is 0. import itertools, numpy as np from groups16 import CATALOG from collections import Counter res=Counter() for name,G in CATALOG.items(): n=16; mult=[[G[a][b] for b in range(n)] for a in range(n)] e=next(k for k in range(n) if all(mult[k][x]==x for x in range(n))) def order(a): k=1;x=a while x!=e: x=mult[a][x]; k+=1 return k center=[z for z in range(n) if all(mult[z][x]==mult[x][z] for x in range(n))] for z in center: if order(z)!=2: continue cos={}; reps=[] for x in range(n): if x in cos: continue cos[x]=len(reps); cos[mult[z][x]]=len(reps); reps.append(x) qm=[[cos[mult[reps[a]][reps[b]]] for b in range(8)] for a in range(8)] qe=cos[e] def qorder(a): k=1;x=a while x!=qe: x=qm[a][x]; k+=1 return k os=sorted(Counter(qorder(a) for a in range(8)).items()) for qname,key in [("Q8",[(1,1),(2,1),(4,6)]),("Z8",[(1,1),(2,1),(4,2),(8,4)])]: if os!=key: continue found=0 others=[a for a in range(8) if a!=qe] for choice in itertools.product((0,1),repeat=7): s={qe:e} for a,c in zip(others,choice): s[a]=reps[a] if c==0 else mult[z][reps[a]] psi=np.zeros((8,8),int) for a in range(8): for b in range(8): prod=mult[s[a]][s[b]] psi[a,b]=1 if prod==s[qm[a][b]] else -1 if (psi@psi.T==8*np.eye(8)).all(): found+=1 res[(qname,name,z)]=found for k,v in res.items(): print(k,v)