> # This program computes cohomological dimensions > # of Z_p [T, T^{-1}] / (h(T)) where deg(h(T))=2, > # with the coefficients A=Z_q, q=2,3,5,7,11. > > restart: > with(linalg): Warning, new definition for norm Warning, new definition for trace > # The initial data are specified here (p and h(T)). > > assign(p=2): #mod p LX > Rel0:=T^2+T+1: #order ideal > Rel1:=T^2=-T-1: # ideal solved for T^2 > Rel2:=T^(-1)=-T-1: #inverse rel from Rel1 > > # Quandle operation: > g:=proc(a,b) > algsubs(Rel1, expand(T*a+(1-T)*b))mod p: end: > > # The following converts integers to quandle elements: > f:=array[0..p^2-1]: > for jj from 0 to p^2-1 do > jj1:=iquo(jj,p): > jj2:=irem(jj,p): > f[jj]:=jj2+jj1*T: > od: > > # List of prime numbers for q: > PRIME:=[2,3,5,7,11]: > for qq from 1 to 5 do > q:=op(qq,PRIME): > > # Making a matrix of 3-cocycle condition: > A:=array(sparse,1..(p^8+2*p^4),1..p^6): > > ind:=0: > > for x from 0 to p^2-1 do > for y from 0 to p^2-1 do > for z from 0 to p^2-1 do > for s from 0 to p^2-1 do > > xstry:=coeff(g(f[x],f[y]),T,0)+coeff(g(f[x],f[y]),T,1)*p: > xstrz:=coeff(g(f[x],f[z]),T,0)+coeff(g(f[x],f[z]),T,1)*p: > xstrs:=coeff(g(f[x],f[s]),T,0)+coeff(g(f[x],f[s]),T,1)*p: > ystrz:=coeff(g(f[y],f[z]),T,0)+coeff(g(f[y],f[z]),T,1)*p: > ystrs:=coeff(g(f[y],f[s]),T,0)+coeff(g(f[y],f[s]),T,1)*p: > zstrs:=coeff(g(f[z],f[s]),T,0)+coeff(g(f[z],f[s]),T,1)*p: > > #print(xstry,xstrz,xstrs,ystrz,ystrs,zstrs); > > ind:=ind+1: > if abs(x-y)>0 then > if abs(y-z)>0 then > A[ind,x*p^4 + y*p^2 + z +1]:= > (1+A[ind,x*p^4 + y*p^2 + z +1]) mod q: > fi: > fi: > > if abs(x-z) > 0 then > if abs(z-s) > 0 then > A[ind,x*p^4 + z*p^2 +s+1] := > (1 + A[ind,x*p^4 + z*p^2 +s+1]) mod q: > fi: > fi: > > if abs(xstrz-ystrz) >0 then > if abs(ystrz-s) >0 then > A[ind,xstrz*p^4 + ystrz*p^2 +s+1]:= > (1+ A[ind,xstrz*p^4 + ystrz*p^2+s+1]) mod q: > fi: > fi: > > if abs(xstry-z) >0 then > if abs(z-s) >0 then > A[ind,xstry*p^4 + z* p^2 + s+1]:= > (-1+A[ind,xstry*p^4 + z* p^2 + s+1]) mod q: > fi: > fi: > > if abs(x-y) >0 then > if abs(y-s) >0 then > A[ind,x*p^4+y*p^2+s+1]:= > (-1+A[ind,x*p^4+y*p^2+s+1]) mod q: > fi: > fi: > > if abs(xstrs-ystrs) > 0 then > if abs(ystrs-zstrs) > 0 then > > A[ind,xstrs*p^4+ystrs*p^2+zstrs+1]:= > (-1+A[ind,xstrs*p^4+ystrs*p^2+zstrs+1]) mod q: > fi: > fi: > od: od: od: od: > > for w1 from 0 to p^2-1 do > for w2 from 0 to p^2-1 do > A[p^6 + w1*p^2 +w2 +1, w1*p^4 + w1*p^2 +w2 +1]:=1: > A[p^6 + p^4+w1*p^2+w2+1,w1*p^4+w2*p^2+w2+1]:=1: > od: > od: > > #print(A); > > # End of definition os a matrix of 3-cocycle condition. > # Now we solve the equation of 3-cocycle conditions: > > Sol:=Linsolve(A,vector(p^8+2*p^4,0),'rank',c) mod q; > > # Next we define a matrix of coboundary conditions. > AA:=array(sparse,1..p^4,1..p^6): > > for xx from 0 to p^2-1 do > for yy from 0 to p^2-1 do > for zz from 0 to p^2-1 do > > > xxstryy:=coeff(g(f[xx],f[yy]),T,0) > +coeff(g(f[xx],f[yy]),T,1)*p: > xxstrzz:=coeff(g(f[xx],f[zz]),T,0) > +coeff(g(f[xx],f[zz]),T,1)*p: > yystrzz:=coeff(g(f[yy],f[zz]),T,0) > +coeff(g(f[yy],f[zz]),T,1)*p: > > if abs(xx-yy) > 0 then > if abs(yy-zz) > 0 then > if xx <> zz then > AA[xx*p^2+zz+1, xx*p^4 +yy*p^2 +zz +1]:=(AA[xx*p^2+zz+1, xx*p^4 > +yy*p^2 > +zz +1]+ 1) mod q: > fi: > if xx <> yy then > AA[xx*p^2+yy+1, xx*p^4 +yy*p^2 +zz +1]:= > (AA[xx*p^2+yy+1, xx*p^4 +yy*p^2+zz +1]-1) mod q: > fi: > if xxstrzz <> yystrzz then > AA[xxstrzz*p^2+yystrzz+1, xx*p^4 +yy*p^2 +zz +1]:= > (AA[xxstrzz*p^2+yystrzz+1, xx*p^4 +yy*p^2 +zz +1]+1) mod q: > fi: > if xxstryy <> zz then > AA[xxstryy*p^2+zz+1, xx*p^4 +yy*p^2 +zz +1]:= (AA[xxstryy*p^2+zz+1, > xx*p^4 +yy*p^2 +zz +1]-1) mod q: > fi: > fi:fi: > > od: od: od: > > > #print(wer,AA); > > # end of coboundary matrix, now solve it: > cobsol:=Linsolve(AA,vector(p^4,0),'rrank',cob) mod q; > > # Computing the cohomological dimensions: > CHdim:=(p^6 - rank) - rrank: > print(q, CHdim, p^6-rank, rrank); > > od: > > 2, 3, 11, 8 3, 0, 9, 9 5, 0, 9, 9 7, 0, 9, 9 11, 0, 9, 9 13, 0, 9, 9 17, 0, 9, 9 19, 0, 9, 9