# congruence.py -- checks of the method of Bisch and Nicoara on our matrices. (1) The congruences for the restricted # profile S(a,b,c,d) = sum_y H_ay conj(H_by) conj(H_cy) H_dy, on the pairs a != c, b != d, with D = d_ab+d_cd+d_ad+d_bc # and E = d_ab+d_cd-d_ad-d_bc: S/4 = 1+D mod 2 for the real matrices of order 4 mod 8, S/2 = 1+D modulo 1-i for the # Haagerup matrix, S/3 = -m(1-E) modulo 1-w for the Tao matrix, of order 3m, and S = -1+D modulo 1+e^(i pi/3) for the # Petrescu matrix. For the Paley matrix of order 24 we print the parities of S/8 on the disjoint pairs. (2) The # cyclic coordinates: T_n = q^(-n-1) A A^*, with A(a,z) = prod_j conj(H_{a_j z_j}) H_{a_{j+1} z_j}, the fixed space # F_n = ker(I-T_n), the rotation rho, which is the cyclic shift, and the lowest weight space W_n, formed by the vectors # of F_n vanishing on the words with 2 equal adjacent labels, and having zero sums over each coordinate. We print # dim F_n, Tr(rho|F_n), dim W_n, Tr(rho|W_n), checking |Tr(rho|F_n)| <= q, and Tr(rho|F_n) = 2 + Tr(rho|W_n) for n = 3. # (3) For the Fourier matrices F_q, with rooted law (1-1/q)delta_0+(1/q)delta_q, the annular multiplicities # a_n = int q_n(x) dmu(x), with q_0 = 2, q_1 = x-2, q_{n+1} = (x-2)q_n - q_{n-1}, are (q_n(q)+2(q-1)(-1)^n)/q, and we # compare them with dim W_n, as computed in (2), for F_6 and W_8. import numpy as np, itertools from math import comb i=1j; w3=np.exp(2j*np.pi/3); w6=np.exp(1j*np.pi/3) Haag=np.array([[1,1,1,1,1,1],[1,-1,i,i,-i,-i],[1,i,-1,-i,i,-i],[1,i,-i,-1,-i,i],[1,-i,i,-i,-1,i],[1,-i,-i,i,i,-1]]) Tao=np.array([[1,1,1,1,1,1],[1,1,w3,w3,w3**2,w3**2],[1,w3,1,w3**2,w3**2,w3],[1,w3,w3**2,1,w3,w3**2],[1,w3**2,w3**2,w3,1,w3],[1,w3**2,w3,w3**2,w3,1]]) c=[w6,1,-w6,w6-1,-w6,1] Pet=np.ones((7,7),complex); Pet[0,0]=-1 for a in range(6): for b in range(6): Pet[1+a,1+b]=c[(b-a)%6] def chi(x,q): x%=q return 0 if x==0 else (1 if pow(x,(q-1)//2,q)==1 else -1) def paley(q): S=np.zeros((q+1,q+1)); S[0,1:]=1; S[1:,0]=-1 for a in range(q): for b in range(q): S[1+a,1+b]=chi(b-a,q) return np.eye(q+1)+S def fourier(N): return np.exp(2j*np.pi*np.outer(np.arange(N),np.arange(N))/N) W8=np.kron(np.kron([[1,1],[1,-1]],[[1,1],[1,-1]]),[[1,1],[1,-1]]).astype(float) for name,H in [("Haagerup",Haag),("Tao",Tao),("Petrescu",Pet),("Paley 12",paley(11)),("Paley 20",paley(19)),("Paley 24",paley(23))]: q=len(H); assert np.allclose(H@H.conj().T,q*np.eye(q)) def profile(H): return np.einsum('ay,by,cy,dy->abcd',H,H.conj(),H.conj(),H) def restricted(q): for a,b,c_,d in itertools.product(range(q),repeat=4): if a!=c_ and b!=d: yield a,b,c_,d print("(1) congruences for the restricted profile") for name,H in [("Paley 12",paley(11)),("Paley 20",paley(19))]: q=len(H); S=np.rint(profile(H).real).astype(int); ok=True for a,b,c_,d in restricted(q): D=(a==b)+(c_==d)+(a==d)+(b==c_); ok&=(S[a,b,c_,d]%4==0) and ((S[a,b,c_,d]//4-1-D)%2==0) print(f"{name}: S/4 = 1+D mod 2 on all restricted pairs: {ok}") q=6; S=profile(Haag); ok=True for a,b,c_,d in restricted(q): x=S[a,b,c_,d]/2; X,Y=round(x.real),round(x.imag); D=(a==b)+(c_==d)+(a==d)+(b==c_) ok&=abs(x-(X+1j*Y))<1e-9 and (X+Y-1-D)%2==0 print(f"Haagerup: S/2 = 1+D modulo 1-i on all restricted pairs: {ok}") S=profile(Tao); ok=True; m=2 for a,b,c_,d in restricted(6): x=S[a,b,c_,d]/3; Y=round(x.imag/w3.imag); X=round((x-Y*w3).real); E=(a==b)+(c_==d)-(a==d)-(b==c_) ok&=abs(x-(X+Y*w3))<1e-9 and (X+Y+m*(1-E))%3==0 print(f"Tao: S/3 = -m(1-E) modulo 1-w on all restricted pairs: {ok}") S=profile(Pet); ok=True for a,b,c_,d in restricted(7): x=S[a,b,c_,d]; Y=round(x.imag/w6.imag); X=round((x-Y*w6).real); D=(a==b)+(c_==d)+(a==d)+(b==c_) ok&=abs(x-(X+Y*w6))<1e-9 and (X-Y+1-D)%3==0 print(f"Petrescu: S = -1+D modulo 1+e^(i pi/3) on all restricted pairs: {ok}") H=paley(23); S=np.rint(profile(H).real).astype(int); par={0:0,1:0} for a,b,c_,d in restricted(24): if len({a,b,c_,d})==4: par[(S[a,b,c_,d]//8)%2]+=1 print(f"Paley 24: on the disjoint pairs, S/8 is even {par[0]} times and odd {par[1]} times") def cyclic(H,n): q=len(H); words=list(itertools.product(range(q),repeat=n)); W=np.array(words) A=np.ones((q**n,q**n),complex) for j in range(n): A*=np.conj(H[W[:,j][:,None],W[:,j][None,:]])*H[W[:,(j+1)%n][:,None],W[:,j][None,:]] T=A@A.conj().T/q**(n+1); T=(T+T.conj().T)/2 ev,V=np.linalg.eigh(T); F=V[:,ev>1-1e-8] idx={wd:k for k,wd in enumerate(words)}; perm=np.array([idx[(wd[-1],)+wd[:-1]] for wd in words]) rho=np.eye(q**n)[perm] trF=np.trace(F.conj().T@rho@F) cons=[] for k,wd in enumerate(words): if any(wd[j]==wd[(j+1)%n] for j in range(n)): e=np.zeros(q**n); e[k]=1; cons.append(e) for j in range(n): for rest in itertools.product(range(q),repeat=n-1): e=np.zeros(q**n) for x in range(q): e[idx[rest[:j]+(x,)+rest[j:]]]=1 cons.append(e) M=np.array(cons)@F s=np.linalg.svd(M,compute_uv=False) if M.size else np.array([]) null=F.shape[1]-int(np.sum(s>1e-8)) if null>0: _,_,Vh=np.linalg.svd(M); K=F@Vh[-null:].conj().T; Wb=np.linalg.qr(K)[0]; trW=np.trace(Wb.conj().T@rho@Wb) else: trW=0 return F.shape[1],trF,null,trW def cat(n): return comb(2*n,n)//(n+1) print("(2) cyclic coordinates: dim F_n, Tr(rho|F_n), dim W_n, Tr(rho|W_n)") for name,H,ns in [("Haagerup",Haag,[2,3,4]),("Tao",Tao,[2,3,4]),("Petrescu",Pet,[2,3]),("Paley 12",paley(11),[2,3]),("F_6",fourier(6),[2,3,4]),("W_8",W8,[2,3])]: q=len(H) for n in ns: dF,trF,dW,trW=cyclic(H,n) print(f"{name:9s} q={q:2d} n={n} dim F_n={dF:4d} (Cat_n={cat(n):3d}) Tr(rho|F_n)={trF.real:8.4f}{trF.imag:+.4f}i dim W_n={dW:3d} Tr(rho|W_n)={trW.real:8.4f} |Tr|<=q: {abs(trF)<=q+1e-9}"+(f" Tr(rho|F_3)=2+Tr(rho|W_3): {abs(trF-2-trW)<1e-6}" if n==3 else "")) print("(3) annular multiplicities from the rooted law, for the Fourier matrices") def qn(n,x): a,b=2,x-2 for _ in range(n): a,b=b,(x-2)*b-a return a res={} for name,H,ns in [("F_6",fourier(6),[2,3,4]),("W_8",W8,[2,3])]: q=len(H) for n in ns: dF,trF,dW,trW=cyclic(H,n); an=(qn(n,q)+2*(q-1)*(-1)**n)//q print(f"{name} n={n} (q_n(q)+2(q-1)(-1)^n)/q = {an} dim W_n = {dW} agree: {an==dW}")