# isolated.py -- exact certificates of zero defect for the 2-valued circulant matrices of prime order p=3(4), coming # from the quadratic residues, with first row h=1+(z-1)1_D, D the nonzero squares, z=(1-2n+sqrt(-p))/2n, p=4n-1. The # Berezin matrix L_{ij,kl}=H_ij conj(H_kj) H_kl conj(H_il)/p, with H_ij=h(j-i), commutes with the translations # (i,j)->(i+1,j+1), and on the vectors A_kl=w^(tk) g(l-k) it acts by the matrix B_t(d,e)=sum_r w^(tr) h(d) conj(h(d-r)) # h(e) conj(h(e+r))/p. We reduce modulo a prime l=1(p) such that -p is a square modulo l, with sqrt(-p) -> s, and # w -> an element of order p of F_l, conj(h) -> 1/h. The nullity of L-1 over Q(sqrt(-p)) is at most the sum over t of # the nullities of p(B_t-1) over F_l, and when this sum is 2p-1, which is the dimension of the gauge directions, the # defect is exactly 0. Usage: python3 isolated.py import numpy as np def is_prime(n): return n>1 and all(n%m for m in range(2,int(n**.5)+1)) def rank_mod(M,l): M=M.copy()%l; r=0; rows,cols=M.shape for c in range(cols): nz=np.nonzero(M[r:,c])[0] if len(nz)==0: continue piv=r+nz[0]; M[[r,piv]]=M[[piv,r]] M[r]=M[r]*pow(int(M[r,c]),-1,l)%l others=np.nonzero(M[:,c])[0]; others=others[others!=r] M[others]=(M[others]-np.outer(M[others,c],M[r]))%l r+=1 if r==rows: break return r def certificate(p): n=(p+1)//4 for l in range(p+1,10**6,p): if not is_prime(l): continue s=next((x for x in range(1,l) if (x*x+p)%l==0),None) if s is None: continue g=next(x for x in range(2,l) if all(pow(x,(l-1)//q,l)!=1 for q in range(2,l) if (l-1)%q==0 and is_prime(q))) w=pow(g,(l-1)//p,l) z=(1-2*n+s)*pow(2*n,-1,l)%l squares={x*x%p for x in range(1,p)} h=np.array([z if x in squares else 1 for x in range(p)],dtype=np.int64) hi=np.array([pow(int(v),-1,l) for v in h],dtype=np.int64) I=np.arange(p) # F[r,d,e] = h(d) conj(h(d-r)) h(e) conj(h(e+r)) F=(h[None,:,None]*hi[(I[None,:]-I[:,None])%p][:,:,None]%l)*(h[None,None,:]*hi[(I[None,:]+I[:,None])%p][:,None,:]%l)%l null=[] for t in range(p): ch=np.array([pow(w,t*r,l) for r in range(p)],dtype=np.int64) B=np.zeros((p,p),dtype=np.int64) for r in range(p): B=(B+ch[r]*F[r])%l B=(B-p*np.eye(p,dtype=np.int64))%l null.append(p-rank_mod(B,l)) total=sum(null) if total==2*p-1: return l,s,w,z,null return None for p in [p for p in range(7,128) if is_prime(p) and p%4==3]: l,s,w,z,null=certificate(p) print("p=%d: modulo l=%d, with sqrt(-%d)->%d, z->%d, w->%d of order %d, nullities of the blocks %d (t=0) and %s (t>0), total %d=2p-1, so the defect is 0"%( p,l,p,s,z,w,p,null[0],sorted(set(null[1:])),sum(null)),flush=True)