{VERSION 5 0 "IBM INTEL NT" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 0 0 0 0 0 1 3 0 3 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Warning" 2 7 1 {CSTYLE "" -1 -1 "" 0 1 0 0 255 1 0 0 0 0 0 0 1 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Error" 7 8 1 {CSTYLE "" -1 -1 "" 0 1 255 0 255 1 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Output" -1 12 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 3 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 43 "Worksheet for twisted 2 co cycle invariants\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restar t;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 69 "Procedure to calculate the \+ solutions to the twisted cocycle condition" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 147 "#read \"/home/saito/grad/chad/Quandle\":\n#read \" /home/saito/public_html/Maple/Chad/qtest.m\";\nread \"E:knot_table\": \nread \"E:Quandle\":\nread \"E:qtest.m\";" }}{PARA 8 "" 1 "" {TEXT -1 37 "Error, unable to read `E:knot_table`\n" }}{PARA 8 "" 1 "" {TEXT -1 34 "Error, unable to read `E:Quandle`\n" }}{PARA 8 "" 1 "" {TEXT -1 46 "Error, could not open `E:qtest.m` for reading\n" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3271 "co2TwistedSol:=proc(Quandl e,polym,m::posint)\nlocal x,y,z,i,EQ,f,F,vars,A,quanod,E,Sol,Sol_list, j,\n temp, deg,Cof,testsol,ttemp,TempPoly,TempEq,\n TempList ,k,LL,GG,b,ss;\noption remember;\nCof:=[];\nif type(polym,polynom) the n \n deg:=degree(polym,t);\nelse \n printf(\"%s\\n\",ERROR);\n \+ return;\nfi;\nCof:=coeffs(polym);\nif gcd(Cof[1],m)<>1 and gcd(Cof[nop s(Cof)],m)<>1 then\n printf(\"%s\",\"ERROR: Not a finite ring.\");\n \+ return;\nelse\n continue;\nfi;\nquanod:=quandlesize(Quandle);\n\nf:= array(0..quanod-1,0..quanod-1,0..(deg-1));\nEQ:=[];\nfor i from 0 to q uanod-1 do\n for j from 0 to quanod-1 do\n F[i,j]:=sum(f[i,j,k]*t ^k, k=0..deg-1);\nod:od:\n\n\nfor x from 0 to (quanod-1) do\n for y \+ from 0 to (quanod-1) do\n for z from 0 to (quanod-1) do\n \+ TempEq[x,y,z]:=t*F[x,y]+F[Quandle[x,y], z]-t*F[x,z]\n \+ -F[Quandle[x,z],Quandle[y,z]]+(t-1)*F[y,z]:\n \+ # The equation for each (x,y,z).\n TempPoly:=Rem (TempEq[x,y,z],polym,t) mod m;\n\n # Mod ``polym'' and mod m, so that the equation is formulated in \n \+ # Z_m[t,t^(-1)]/(polym) . \n \+ # The number m is a prime (it's not clear if this works fo r non-prime).\n\n TempList:=PolynomialTools[CoefficientList](T empPoly,t);\n # For each (x,y,z), this i s the list of coefficients of t^k.\n\n for i from 1 to nops(Te mpList) do\n E[x,y,z,i-1]:=TempList[i];\n EQ:= [op(EQ),E[x,y,z,i-1]=0];\n od;\n\n od:\n od:\nod:\n#7/1 /04\n#will add Reid. type I move to the list of equations\nfor i from \+ 0 to (quanod-1) do\n for j from 0 to (deg-1) do\n EQ:=[op(EQ), f[i ,i,j]=0];\n od;\nod;\n \nvars:=[seq(seq(seq(f[i,j,k],i=0..quanod -1),j=0..quanod-1),k=0..deg-1)];\nA:=linalg[genmatrix](EQ,vars);\nb:=v ector(linalg[rowdim](A),0);\nSol:=Linsolve(A,b,'r',ss) mod m;\n\n # A t this point the solution is in a vector form, in the order of\n # (f [0,0,0],f[1,0,0],...]).\n # From here the free variables are renamed \+ so that the subscripts starts with 1 \n # and put the solutions back \+ into polynomial form.\n\nSol_list:=convert(Sol,list);\nLL:=indets(Sol_ list);\nLL:=convert(LL,list);\n\nx:='x'; # Unassign x. (But ``unassign (x)'' didn't seem to work.) \ntemp:=1; # The first subscript for the n ew set of free variables x_1, x_2, .... \nGG:=[];\n\nfor i from 1 to nops(LL) do\n ttemp:=op(LL[i]); # ttemp is the original subscript of the free variables in ss. \n GG:=[op(GG),ss[ttemp]=x[temp]*t^(iquo(t temp,quanod^2))]; \n # The first block matrix (whose size is quano d^2 where quanod is the order of X)\n # is for f[i,j,0], and so on , so iquo(ttemp,quanod^2) is the degree of the free variable. \n temp :=temp+1;\nod;\n\nSol_list:=subs(GG,Sol_list); # Puts new free variabl es x in polynomial forms back into Sol_list.\ntemp:=1;\nfor k from 0 t o deg-1 do\n for j from 0 to quanod-1 do\n for i from 0 to quanod- 1 do\n f[i,j,k]:=collect(Sol_list[temp],t): # Puts the solutions \+ back into f in polynomial form.\n temp:=temp+1:\nod:od:od:\n\n \n testsol:=map(`mod`,evalm(A &* Sol - b),m);\ntestsol:=convert(testsol,s et);\n\n\nif testsol=\{0\} then\n return(f);\nelse\n printf(\"%s\" ,\"ERROR: co2TwistedSol solutions are not valid\");\n return;\nfi;\n end:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 688 "makeinv:=proc(Quandle)\n#Pr ocedure that will create a zero indexed two dimensional array \n#repre senting the multiplication table for the second property of a quandle. \n# ie. There exists a unique c such that a=c*b. Will be used to calcu late the \n# colors for a negative crossing.\n#Input: A zero index ed 2-dim array representing the multiplication \n# table for the quandle.\n#Output:A zero indexed 2-dim array.\nlocal i,j,temp,L,quand leorder;\noption remember;\nquandleorder:=quandlesize(Quandle);\nL:=ar ray(0..quandleorder-1,0..quandleorder-1,[]):\nfor i from 0 to quandleo rder-1 do\n for j from 0 to quandleorder-1 do\n temp:=Quandle[i,j] ;\n L[j,temp]:=i;\n od;\nod;\nreturn(L);\nend:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1124 "tinverse:=proc(polym,m)\nlocal i,temp,L,deg,tinv,Cof,lowdeg,coff inv,tmppgcd;\noption remember;\nif type(polym,polynom) then \n deg: =degree(polym,t);\nelse \n printf(\"%s\\n\",ERROR);\n return;\nfi; \nCof:=PolynomialTools[CoefficientList](polym,t);\ntemp:=1; \n whil e Cof[temp]=0 do\n temp:=temp+1;\n od;\nif gcd(Cof[temp],m)=1 \+ and gcd(Cof[nops(Cof)],m)=1 then\n continue;\nelse\n printf(\"%s\", \"ERROR, Not a finite ring.\");\n return;\nfi;\nlowdeg:=0; # lowdeg i s the lowest degree of polym. \nwhile Cof[lowdeg+1]=0 do\n lowdeg:=low deg+1;\nod;\ntinv:=0;\nfor i from (lowdeg+2) to nops(Cof) do\n tinv:= tinv-Cof[i]*t^(i-(lowdeg+2));\nod;\n# For example, if t^2+2*t+3=polym, then first do 3=-2*t-t^2 and \n# compute 3*t^(-1)=-2-t. Then the next step cancels 3. \n\ntmppgcd:=igcdex(Cof[lowdeg+1],m,'s','r'); \n# T his is 1 iff the coeff of the lowest dgree is invertible (and it shoul d be).\n\nif tmppgcd<>1 then \n printf(\"%s %d %s %d\",\"ERROR: Inve rse dne for \",Cof[lowdeg+1],\"mod\",m);\nelse\n coffinv:=s mod m; # This is he inverse of the coeff of the lowest dgree. \nfi;\ntinv:=tin v*coffinv; \ntinv:=Rem(tinv,polym,t) mod m;\nreturn(tinv);\nend:\n\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3630 "co2TwistedInvar:=proc(Quandle,Knot,polym,m::po sint)\nlocal i,j,k,x,y,z,quandleorder,F,f,tinv,brind,\n SSTcontri ,SST,jj3,jj5,jj6,jj8,s,num,\n Color,ColDiffMatch0,ColorDiff0,Ginv ,\n indx,ttemp,deg;\n\nSST:=[];\nquandleorder:=quandlesize(Quandl e);\ntinv:=tinverse(polym,m); \nGinv:=makeinv(Quandle);\nbrind:=max( op(map(x->abs(x),Knot)))+1;\ndeg:=degree(polym,t);\n #For the opti onal 5th argument. The user sends the twisted cocycle solution as inpu t.\nif nargs<5 then\n f:=co2TwistedSol(Quandle,polym,m);\nelse\n f:= args[5];\nfi;\n \nfor i from 0 to quandleorder-1 do\n for j from 0 to quandleorder-1 do\n F[i,j]:=sum(f[i,j,k], k=0..deg-1);\n#Removed \+ the *t^k from the def of F[i,j] since the t terms are \n#introduced in the solutions by the procedure co2TwistedSol()\n\nod:od:\n\n\nfor jj3 from 1 to (nops(Knot)+1) do # Color vectors.\n Col or[jj3]:=array(1..brind):\n od;\nnum:=quandleorder^brind; \+ #number of possible colorings\n\nfor indx f rom 0 to (num-1) do # One color at a time.\n \+ for jj5 from 1 to brind do\n Color[1][jj5]:=iquo(indx,quandleor der^(jj5-1)) mod quandleorder:\n od:\n \n for jj6 from 1 to nops(K not) do # Computing all color vectors.\n if Knot[jj 6] > 0 then #The case when braid word element i s >0\n for jj8 from 1 to brind do\n if jj8 = abs(Kno t[jj6]) then \n Color[jj6+1][jj8]:= Color[jj6][jj8+1]:\n \+ fi:\n if jj8 = abs(Knot[jj6])+1 then\n \+ Color[jj6+1][jj8]:=Quandle[Color[jj6][jj8-1],Color[jj6][jj8]] :\n \+ fi:\n if jj8 < abs(Knot[jj6]) then\n Color [jj6+1][jj8]:=Color[jj6][jj8]:\n fi:\n if jj8 > ab s(Knot[jj6])+1 then\n Color[jj6+1][jj8]:=Color[jj6][jj8]: \n fi:\n od:\n \n else \+ \n # The case braid word element is < 0 \n for jj8 from 1 to brind do\n if jj8 = abs(Kno t[jj6]) then \n Color[jj6+1][jj8]:=Ginv[Color[jj6][jj8], Col or[jj6][jj8+1]]:\n fi;\n if jj8 = abs(Knot[jj6])+1 the n \n Color[jj6+1][jj8]:=Color[jj6][jj8-1]:\n fi;\n \+ if jj8 < abs(Knot[jj6]) then\n Color[jj6+1][jj8]:=Col or[jj6][jj8]:\n fi:\n if jj8 > abs(Knot[jj6])+1 then\n Color[jj6+1][jj8]:=Color[jj6][jj8]:\n fi:\n o d:\n fi:\n od: # closes jj6. \n SSTcontri:=0: # State -sum contributions.\n \+ # Finding if the colors match.\n ColorDiff0:=evalm(Color[1]-Color[ nops(Knot)+1]);\n ColDiffMatch0:=sum(abs(ColorDiff0[jj]),jj=1..brind );\n # This is zero iff the top color vec matche s the bottom.\n if ColDiffMatch0 =0 then\n\n\n for s from 1 to n ops(Knot) do \n if Knot[s] > 0 then \n \nttemp:=tinv^abs ((-abs(Knot[s])+1))*F[Color[s][abs(Knot[s])], Color[s][abs(Knot[s])+1] ]; \n\nSSTcontri:=SSTcontri + Rem(ttemp,polym,t) mod m: \n\n els e \n\nttemp:=tinv^(abs(-abs(Knot[s])+1))*F[Color[s+1][abs(Knot[s ])], Color[s+1][abs(Knot[s])+1] ]; \nSSTcontri:=SSTcontri+Rem(-tte mp,polym,t) mod m:\n fi: \n od: \+ # Closing the state-sum term, for s.\n \n SST:=[o p(SST),Rem(SSTcontri,polym,t) mod m];\n fi: \+ # Closing the ColDiffMatch\nod: \+ # Closing indx loop (one color here \+ at a time, for indx). \nreturn(SST);\nend:\n\n" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 223 "CollectTerms:=proc(SST::list)\nlocal T,SSTs,i ,j,temp;\nT:=[];\nSSTs:=convert(SST,set);\nfor i in SSTs do\ntemp:=0: \n for j from 1 to nops(SST) do\n if SST[j]=i then temp:=temp+1:fi:\n od:\nT:=[op(T),[temp,i]]:\nod:\nreturn(T);\nend:\n\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 218 "quandlesize:=proc(Quandle)\nlocal \+ T;\noption remember;\nT:=convert(Quandle,matrix);\nif linalg[rowdim](T )<>linalg[coldim](T) then \n prinf(\"%s %s %s\\n\",ERROR, quandle, d imensions);\nelse return(linalg[rowdim](T));\nfi;\nend:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 110 "save quandlesize,CollectTerms,co2T wistedInvar,tinverse,makeinv,co2TwistedSol, \"F:/cocyclesampleII/Knotp kgT.m\";" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "print(co2Twiste dSol(Q4_3,t+1,2));" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#-%&ARRAYG6$7%;\" \"!\"\"$F';F(F(72/6%F(F(F(F(/6%F(\"\"\"F(,&&%\"xG6#F0F0&F36#F)F0/6%F( \"\"#F(,&F2F0&F36#F9F0/6%F(F)F(,&F5F0&F36#\"\"%F0/6%F0F(F(,*F2F0F;F0F5 F0F@F0/6%F0F0F(F(/6%F0F9F(F2/6%F0F)F(F5/6%F9F(F(,&F2F0F@F0/6%F9F0F(,(F 2F0F;F0F@F0/6%F9F9F(F(/6%F9F)F(F@/6%F)F(F(,&F5F0F;F0/6%F)F0F(,(F;F0F5F 0F@F0/6%F)F9F(F;/6%F)F)F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "print(co2TwistedSol(Q4_3,t^2+t+1,2));" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#-%&ARRAYG6$7%;\"\"!\"\"$F';F(\"\"\"7B/6%F(F(F(F(/6%F(F( F+F(/6%F(F+F(,&*&,(&%\"xG6#F+F+&F76#\"\"#F+&F76#\"\"'F+F+%\"tGF+F+&F76 #\"\"%F+/6%F(F+F+*&,*&F76#\"\"&F+F " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "14 0 0" 0 } {VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }