{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 }{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 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 326 "This worksheet contains t he procedures used to generate the Maple input file, \"PolycocInvpkg.m .\" Examples using these procedures appear in WorksheetIII. These proc edures are for calculating quandle polynomial cocycle knot invariants. They are for special cases when the quandle is an Alexander quandle. \nLast Updated: 8/15/2005" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 142 "Procedures for calculating the Cayley table for the Alex ander Quandles over Z_p where p is a prime are contained in the packag e alexQuanpkg.m." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "read \" J://SaitoGood_7_22_05//alexQuanpkg.m\";" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 631 "The next procedure calculates the values for the 3-cocyc les. Xpolym (polynomial in t) is the Alexander quandle that will be u sed for coloring the braids. Apolym (polynomial in t) is the quandle \+ used for the coefficient group. p is a prime number used for the Quand les and the Mochizuki cocycle formula. m1 is the first exponent, m2 is the second exponent, and a3 is the third which is zero or a power of \+ p from the 3-cocycle formula f(x1,x2,x3)=(x1-x2)^(p^m1)(x2-x3)^(p^m2)x 3^a3. This program does not check if the term a3 is a power of a prime , but in this case (a3<>0) it will check if Apolym divides 1-t^(p^m1+ p^m2+a3) mod p." }}{PARA 0 "" 0 "" {TEXT -1 123 "If the conditions are satisified the procedure will return a table of the 3-cocycle values. Otherwise it will return false." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2048 "Mochizuki3coc:=proc(Xpolym ,Apolym,p,m1,m2,a3)\n#Input: (1) The polynomial in t from the Alexande r quandle \n# that will be used to color the braid( Z_p[t^-1 ,t]/(Xpolym)).\n# (2) The polynomial in t from the Alexander qua ndle \n# that is used for the coefficients (Z_p[t^-1,t]/(Apo lym)).\n# (3) The prime modulus from the above Alexander quandle s.\n# (4) m1 is the exponent from Mochizuki's formula for the fi rst term\n# f(x1,x2,x3)=(x1-x2)^(p^m1)(x2-x3)^(p^m2)x3^a3.\n # (5) m2 is the exponent from the second term in Mochizuki formu la above.\n# (6) a3 is the third term in the formula. a3 must ei ther be zero or a power\n# of p such that Apolym divides 1-t ^(p^m1+p^m2+a3).\n#Output: A table that has the values for the 3-cocyc les.\n#Example Input: Mochizuki3coc(t^2-t+1,t^2-t+1,2,1,1,0);\n\n\n\nl ocal i,j,k,f, qsize, Quandle,Xelements,temp, tempcheck;\noption rememb er;\n\nXelements:=[];\nXelements:=rres(Xpolym,p):\n\n\n#print(\"Mochiz uki called\");\n#print(Xelements);\nqsize:=nops(Xelements);\n\n# In th e following statement Xpolym is used. This is the polynomial\n# from t he Alexander quandle that is used to color the braid.\n# The paper by \+ Kheira says that we should use the polynomial from the Alexander quand le\n# that is used for the coefficients in the Divides test\n\ntempche ck:=Divide(1-t^(p^m1+p^m2+a3),Apolym) mod p;\n#print(\"tempcheck is \" ,1-t^(p^m1+p^m2+a3),Xpolym,tempcheck);\nif a3=0 or tempcheck then\n c ontinue;\nelse \n print(\"Mochizuki conditions not satisfied\");\n r eturn false;\nfi;\nf:=array(0..qsize-1,0..qsize-1,0..qsize-1);\nfor i \+ from 1 to qsize do\n for j from 1 to qsize do\n for k from 1 to qsi ze do\ntemp:=(Xelements[i]-Xelements[j])^(p^m1)*(Xelements[j]-Xelement s[k])^(p^m2)*Xelements[k]^a3;\n\n# a[3] is zero or p^m3\n#This procedu re does not currently check to see if a[3] is prime power. \n#DEBUG\n# print(\"temp ploy is \",temp); \n#END DEBUG \nf[i-1,j-1,k-1]:=Rem(te mp,Apolym,t) mod p;\n#DEBUG\n#print(\"temp ploy reduced in A is \",f[i -1,j-1,k-1]);\n#END DEBUG\nod:od:\nod:\n\nreturn(f);\nend: " }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 326 "This procedure will check to see \+ if the table of values for the 3-cocycles generated form the procedure Mochizuki3coc satisfy the 3-cocycle condition. It will return true or false depending on if the conditions are satisfied. cocy is the table of cocycle values, Xpolym, Apo.lym, and p match the above procedure M ochizuki3coc." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1705 "cocycle3 check:=proc(cocy,Xpolym,Apolym,p)\n#Input: (1) A table that contains t he values for the 3-cocycles that is generated \n# from the \+ procedure Mochizuki3coc().\n# (2) The polynomial in t from the A lexander quandle \n# that will be used to color the braid( Z _p[t^-1,t]/(Xpolym)).\n# (3) The polynomial in t from the Alexan der quandle \n# that is used for the coefficients (Z_p[t^-1, t]/(Apolym)).\n# (4) The prime modulus from the above Alexander \+ quandles.\n#Output: A true or false value. This procedure will plug th e values from the table cocy\n# into the 3-cocycle condition to make sure it is a valid 3-cocycle. \n# Note: This only tests t he Reidmeister type II and III moves.\n#Example Input: cocycle3check(M ochizuki3coc(t^2-t+1,t^2-t+1,2,1,1,0),t^2-t+1,t^2-t+1,2);\n\nlocal i, \+ j, k,x,y,z,w,temp,rrespol,quanod,Quandle;\n\nrrespol:=rres(Xpolym,p); \n#print(rrespol);\nQuandle:=AlexQuandle(Xpolym,p);\n\nquanod:=nops(rr espol);\n#print(convert(Quandle,matrix));\n#print(quanod);\nfor i from 0 to (quanod-1) do\n for j from 0 to (quanod-1) do\n if cocy[i,j,j]< >0 then\n print(\"f[\",i,j,j,\"]=\",cocy[i,j,j]);\n return false ;\n fi;\nod;od;\n\n# print(\"finished rII\");\nfor x from 0 to (quano d-1) do\n for y from 0 to (quanod-1) do\n for z from 0 to (quan od-1) do\n for w from 0 to (quanod-1) do\n temp:= cocy[x ,z,w] - cocy[x,y,w] + cocy[x,y,z] \n- cocy[Quandle[x,y],z,w] + cocy[ Quandle[x,z],Quandle[y,z],w]- cocy[Quandle[x,w],Quandle[y,w],Quandle[z ,w]];\n\n\n#print(temp);\n if Rem(temp,Apolym,t) mod p<>0 then \n print(\"temp from ReidIII is \",temp,\"xyzw is\",x,y,z,w) ;\n return false;\n fi;\nod;od;od;od;\n\nreturn true; \nend:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 39 "Generates the inverses \+ for the quandle." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 688 "makein v:=proc(Quandle)\n#Procedure that will create a zero indexed two dimen sional array \n#representing the multiplication table for the second p roperty of a quandle.\n# ie. There exists a unique c such that a=c*b. \+ Will be used to calculate the \n# colors for a negative crossing. \n#Input: A zero indexed 2-dim array representing the multiplication \+ \n# table for the quandle.\n#Output:A zero indexed 2-dim array. \nlocal i,j,temp,L,quandleorder;\noption remember;\nquandleorder:=quan dlesize(Quandle);\nL:=array(0..quandleorder-1,0..quandleorder-1,[]):\n for i from 0 to quandleorder-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);\n end:" }{TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 576 "This proc edure will return the 3-cocycle invariant. First it generates the valu es for the 3-cocycle values that are specified as m1, m2, and a3. m1 i s the first exponent, m2 is the second exponent, and a3 is the third w hich is zero or a power of p from the 3-cocycle formula f(x1,x2,x3)=(x 1-x2)^(p^m1)(x2-x3)^(p^m2)x3^a3. Xpolym (polynomial in t) is the quand le used for coloriung the braid. Apolym (polynomial in t) is the quan dle used for the coefficient group. p is a prime used for the quandles and cocycle formula. Knot is a list that is the braid of the desire d knot." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5390 "Invar3Mochizuk i:=proc(Xpolym,Apolym,p,m1,m2,a3,Knot)\n#Procedure to calculate the st ate sum term for a knot\n#Input: (1) Xpolym is the polynomial from the Alexander quandle that will \n# be used to color the knot. \n# (2) Apolym is the polynomial from the alexander quandle that \n# is used for the coefficients.\n# (3) prime, p, fo r the quandles.\n# (4) From Mochizuki theorem a1=p^m1\n# ( 5) From Mochizuki theorem a2=p^m2 \n# (6) From Mochizuki theorem a3=p^m3 or a3=0. So a3 must be a power of p \n# or zero.\n # (7) A knot given in braid form (ex [1,1,1]).\n#Output: The sta te sum of the knot.\n#Example Input: Invar3Mochizuki(t^2-t+1,t^2-t+1,5 ,0,1,0,[1,1,1]);\n#Example Output: 625+3750*u^(t+3)+3750*u^(4*t+2)+37 50*u^(3*t+4)+3750*u^(1+2*t)\n\nlocal SST,SSTcontri,jj3,jj5,jj6,jj8,s,n um,Color,brind,\n indx,ColDiffMatch0,ColorDiff0,Ginv,quandleorder , \n coSolutions,Facecolors,facecolors,\n precolorfac e,nowcolor,colcoloring,validcoc,Quandle;\nSST:=0;\n\nvalidcoc:=false; \n\n#The following will create the Cayley table for the Alexander Quan dle where the elements come #from the set \{0..n-1\}\nQuandle:=AlexQua ndle(Xpolym,p);\n\nquandleorder:=quandlesize(Quandle);\n\nGinv:=makein v(Quandle);\n\n# The following statement will use Mochizuki formula to get the values for each term of the #cocycle. The indices of the arra y come from \{0..n-1\} and represent elements of the Alexander #quandl e X. The values of these elements lie in A=Z_p[t^(+-1)/(Apolym) and ar e in polynomial #form.\ncoSolutions:=Mochizuki3coc(Xpolym,Apolym,p,m1, m2,a3);\n\n\n\nif type(coSolutions,table) then\n validcoc:=cocycle3ch eck(coSolutions,Xpolym,Apolym,p);\nfi;\n\n#print(\"The value of co3che ck is \",cocycle3check(coSolutions,Xpolym,Apolym,p));\n\nif validcoc t hen\nbrind:=max(op(map(x->abs(x),Knot)))+1;\n\nfor jj3 from 1 to (nops (Knot)+1) do # Color vectors.\n Color[jj3]:=array(1 ..brind):\n Facecolors[jj3]:=array(0..brind-1):\n od;\nnum:=quandl eorder^brind; #number of possib le colorings\n\nfor indx from 0 to (num-1) do \+ # One color at a time.\n for jj5 from 1 to brind do\n Color[1] [jj5]:=iquo(indx,quandleorder^(jj5-1)) mod quandleorder:\n od:\n \n \+ for jj6 from 1 to nops(Knot) do # Computing all color vectors.\n if Knot[jj6] > 0 then #The case when braid word element is >0\n for jj8 from 1 to brind do\n \+ if jj8 = abs(Knot[jj6]) then \n Color[jj6+1][jj8 ]:= Color[jj6][jj8+1]:\n fi:\n if jj8 = abs(Knot[j j6])+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 f i:\n if jj8 > abs(Knot[jj6])+1 then\n Color[jj6+ 1][jj8]:=Color[jj6][jj8]:\n fi:\n od:\n else \+ \n # The c ase braid word element is < 0 \n for jj8 from 1 to brind do\n \+ if jj8 = abs(Knot[jj6]) then \n Color[jj6+1][jj8]:=Gin v[Color[jj6][jj8], Color[jj6][jj8+1]]:\n fi;\n if jj8 \+ = abs(Knot[jj6])+1 then \n Color[jj6+1][jj8]:=Color[jj6][jj8 -1]:\n fi;\n if jj8 < abs(Knot[jj6]) then\n \+ Color[jj6+1][jj8]:=Color[jj6][jj8]:\n fi:\n if jj8 > a bs(Knot[jj6])+1 then\n Color[jj6+1][jj8]:=Color[jj6][jj8]:\n fi:\n od:\n fi:\n od: \+ # closes jj6. \n\n \+ # Finding if the colors match.\n ColorDiff0:=eva lm(Color[1]-Color[nops(Knot)+1]);\n ColDiffMatch0:=sum(abs(ColorDiff 0[jj]),jj=1..brind);\n # This is zero iff the to p color vec matches the bottom.\n if ColDiffMatch0 =0 then\n#The bra id has a valid coloring so every possible color will contribute to the state sum.\n for facecolors from 0 to (quandleorder-1) do\n \+ SSTcontri:=0; # State-sum contributions.\n \n for precolorface from 1 to (nops(Knot)+1) do \n \n Fa cecolors[precolorface][0]:=facecolors:\n\n od;\n for nowcolor f rom 1 to nops(Knot) do\n \n for colcoloring from 0 to (a bs(Knot[nowcolor])-1) do \n Facecolors[nowcolor][colcoloring +1]:=Quandle[Facecolors[nowcolor][colcoloring],Color[nowcolor][colcolo ring+1]]:\n \n od:\n\n od:\n for s from 1 to nops(Knot) \+ do \n if Knot[s] > 0 then\n SSTcontri:= SSTcontri + \nco Solutions[Facecolors[s][abs(Knot[s])-1],Color[s][abs(Knot[s])], Color[ s][abs(Knot[s])+1] ] :\n else\n SSTcontri:=SSTcontri - \ncoSolutions[Facecolors[s][abs(Knot[s])-1],Color[s+1][abs(Knot[s])], \+ Color[s+1][abs(Knot[s])+1] ] :\n fi: \n od: \+ # Closing the state-sum term, for s.\n \n \n\n#print(\"SSTcontri is \",SSTcontri);\n#print(\"SSTcontri after Rem is \",Rem(SSTcontri,Apolym,t) mod p);\n\n SST:=SST + u^(Rem(SSTco ntri,Apolym,t) mod p);\n#map( z -> z mod m, SSTcontri ) ):\n od: #cl oses facecolors \nfi: \+ # Closing the ColDiffMatch\nod: \+ # Closing indx loop (one color here at a time, for indx). \+ \nreturn(SST);\nelse\nprint(\"Invalid cocycles\");\nreturn;\nfi;\nend: \n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 849 "This procedure will calcul ate the Mochizuki 3-cocycle invariants for a given range of knots. The first paramenter is the number of knots that you want to calculae. Th e file knotsLivingston contains the briads for prime knots with 12 and fewer crossings. They are numbered from 0 (trefoil) to 2776 (knot 12n _088). The calculation will start out at the trefoil (Knot[0,*]) and e nd at Knot[n,*]. If one wanted to perform calculations on all prime kn ots with 9 and fewer crossings, n would have a value of 83. p is the p rime for the quandles and the 3-cocycles. g is a polynomial in t that \+ is used for both the coloring quandle and the quandle used for the coe fficient group. m1 is the first exponent, m2 is the second exponent, a nd a3 is the third which is zero or a power of p from the 3-cocycle fo rmula f(x1,x2,x3)=(x1-x2)^(p^m1)(x2-x3)^(p^m2)x3^a3. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1496 "TableInvars:=proc(n,p,g,m1,m2,a3) \n#Input: (1) n is a positive integer. The braids stored in the file \+ \"knotsLivingston.txt\" \n# are numbered from 1 to 2976. n \+ represents how far you want to go \n# in the list. ie. Ther e are 83 braids with 9 for fewer crossings so if n is 83\n# \+ you will calculate all invariants with 9 or fewer crossings.\n# \+ (2) The prime modulus for the Alexander quandles.\n# (3) A po lynomial in t. g is used for both the coloring quandle and the quandle \n# used for the coefficients. This procedure will check th at the\n# gcd of g and the Alexander polynomial of the give n braid is not 1. This\n# assures us that the braid has non trivial colorings.\n# (4) m1 is the exponent from Mochizuki's f ormula for the first term\n# f(x1,x2,x3)=(x1-x2)^(p^m1)(x2- x3)^(p^m2)x3^a3.\n# (5) m2 is the exponent from the second term in Mochizuki formula above.\n# (6) a3 is the third term in the formula. a3 must either be zero or a power\n# of p such th at g divides 1-t^(p^m1+p^m2+a3).\n#Output: This procedure will print o ut the knot number, the braid, the gcd of \n# g and the Alexand er polynomial of the knot, and finally the invariant.\n#Example Input: TableInvars(83,2,t^2-t+1,2,2,0);\nlocal i,tempgcd;\n\nfor i from 0 to n do\n tempgcd:=Gcd(g,Knot[i,3]) mod p:\n if tempgcd<>1 then\n pr int(Knot[i,1],Knot[i,2],tempgcd,Invar3Mochizuki(g,g,p,m1,m2,a3,Knot[i, 2]));\nfi:\nod:\nend:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 148 "The pro cedure Xi will take a nonnegative integer and will return a polynomial in t. The polynomial is the alternating sum, Sum((-t)^i,i = 0 .. n-1) ." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 250 "Xi:=proc(n)\n#input: \+ (1)A positive integer n. \n#output: A polynomial in t. Sum((-t)^i,i = \+ 0 .. n-1).\n# Xi(0):=0 by definition.\n#Example input: Xi(3);\n #Example output: t^2-t+1\n\nif n=0 then\n return 0;\nelse\n return(su m((-t)^i,i=0..n-1));\nfi;\nend:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 586 "The next procedure calculates the values for the 2-cocycles. Xpol ym (polynomial in t) is the Alexander quandle that will be used for c oloring the braids. Apolym (polynomial in t) is the quandle used for \+ the coefficient group. p is a prime number used for the Quandles and t he Mochizuki cocycle formula. m1 is the first exponent, and a2 is the second which is zero or a power of p from the 2-cocycle formula f(x1, x2)=(x1-x2)^(p^m1)(x2)^a2. This program does not check if the term a2 \+ is a power of a prime, but in this case (a2<>0) it will check if Apol ym divides 1-t^(p^m1+a2) mod p." }}{PARA 0 "" 0 "" {TEXT -1 123 "If th e conditions are satisified the procedure will return a table of the 2 -cocycle values. Otherwise it will return false." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1343 "Mochi zuki2coc:=proc(Xpolym,Apolym,p,m1,a2)\n#Input: (1) The polynomial in t from the Alexander quandle \n# that will be used to color t he braid( Z_p[t^-1,t]/(Xpolym)).\n# (2) The polynomial in t from the Alexander quandle \n# that is used for the coefficients (Z_p[t^-1,t]/(Apolym)).\n# (3) The prime modulus from the above Alexander quandles.\n# (4) m1 is the exponent from Mochizuki's \+ formula for the first term\n# f(x1,x2,x3)=(x1-x2)^(p^m1)x2^a 2.\n# (5) a2 is the second term in the formula. a2 must either b e zero or a power\n# of p such that Apolym divides 1-t^(p^m1 +a2).\n#Output: A table that has the values for the 2-cocycles.\n#Exam ple Input: Mochizuki3coc(t^2-t+1,t^2-t+1,2,1,0);\n\n\nlocal i,j,f, qsi ze, Quandle,Xelements,temp,tempcheck;\noption remember;\nXelements:=[] ;\nXelements:=rres(Xpolym,p):\nqsize:=nops(Xelements);\n\ntempcheck:=D ivide(1-t^(p^m1+a2),Xpolym) mod p;\n#print(\"tempcheck is \",1-t^(p^m1 +a2),Xpolym,tempcheck);\nif a2=0 or tempcheck then\n continue;\nelse \+ \n print(\"Mochizuki conditions not satisfied\");\n return false;\nf i;\n#print(Xelements);\n\n\nf:=array(0..qsize-1,0..qsize-1);\nfor i fr om 1 to qsize do\n for j from 1 to qsize do\n\ntemp:=(Xelements[i]-Xe lements[j])^(p^m1)*Xelements[j]^a2;\n#print(temp); \n f[i-1,j-1]:=Re m(temp,Apolym,t) mod p;\nod:od:\nreturn(f);\nend: " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 327 "This procedure will check to see if the table \+ of values for the 2-cocycles generated form the procedure Mochizuki2co c satisfy the 2-cocycle condition. It will return true or false depen ding on if the conditions are satisfied. cocy is the table of cocycle \+ values, Xpolym, Apo.lym, and p match the above procedure Mochizuki2coc ." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 1624 "cocycle2check:=proc(cocy,Xpolym,Apolym,p)\n#Input : (1) A table that contains the values for the 2-cocycles that is gene rated \n# from the procedure Mochizuki2coc().\n# (2) T he polynomial in t from the Alexander quandle \n# that will \+ be used to color the braid( Z_p[t^-1,t]/(Xpolym)).\n# (3) The po lynomial in t from the Alexander quandle \n# that is used fo r the coefficients (Z_p[t^-1,t]/(Apolym)).\n# (4) The prime modu lus from the above Alexander quandles.\n#Output: A true or false value . This procedure will plug the values from the table cocy\n# in to the 2-cocycle condition to make sure it is a valid 2-cocycle. \n# \+ Note: This only tests the Reidmeister type II and III moves.\n#E xample Input: cocycle2check(Mochizuki2coc(t^2-t+1,t^2-t+1,2,1,1,0),t^2 -t+1,t^2-t+1,2);\n\n\nlocal i, j, k,x,y,z,w,temp,rrespol,quanod,Quandl e;\n\nrrespol:=rres(Xpolym,p);\n#print(rrespol);\nQuandle:=AlexQuandle (Xpolym,p);\n\nquanod:=nops(rrespol);\n#print(convert(Quandle,matrix)) ;\n#print(quanod);\nfor i from 0 to (quanod-1) do\n if cocy[i,i]<>0 \+ then\n print(\"f[\",i,i,\"]=\",cocy[i,i]);\n return false;\n fi ;\nod;\n\n# print(\"finished rII\");\n\n# E[x,y,z]:= f[x,y]+f[Quandle[ x,y], z]-f[x,z]-f[Quandle[x,z],Quandle[y,z]]:\nfor x from 0 to (quanod -1) do\n for y from 0 to (quanod-1) do\n for z from 0 to (quano d-1) do\n temp:= cocy[x,y]+cocy[Quandle[x,y], z]-cocy[x,z]-cocy [Quandle[x,z],Quandle[y,z]];\n\n\n#print(temp);\n if Rem(temp,A polym,t) mod p<>0 then\n print(\"temp from ReidIII is \",tem p,\"xyz is\",x,y,z);\n return false;\n fi;\nod;od;od; \n\nreturn true;\nend:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 530 "Thsi p rocedue will return the 2-cocyle invariant. First it generates the val ues for the 2-cocycle values that are specified as m1, and a2. m1 is t he first exponent, and a2 is the second which is zero or a power of p from the 2-cocycle formula f(x1,x2)=(x1-x2)^(p^m1)(x2)^a2. Xpolym (po lynomial in t) is the quandle used for coloriung the braid. Apolym (p olynomial in t) is the quandle used for the coefficient group. p is a \+ prime used for the quandles and cocycle formula. Knot is a list that \+ is the braid of the desired knot." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4627 "Invar2Mochizuki :=proc(Xpolym,Apolym,p,m1,a2,Knot)\n#Procedure to calculate the state \+ sum term for a knot\n#Input: (1) Xpolym is the polynomial from the Ale xander quandle that will \n# be used to color the knot.\n# \+ (2) Apolym is the polynomial from the alexander quandle that \n# \+ is used for the coefficients.\n# (3) prime, p, for the quandles.\n# (4) From Mochizuki theorem a1=p^m1 \n# (5) F rom Mochizuki theorem a2=p^m2 or a2=0. So a2 must be a power of p \n# \+ or zero.\n# (6) A knot given in braid form (ex [1,1,1 ]).\n#Output: The state sum of the knot.\n#Example Input: Invar2Mochiz uki(Xi(5),Xi(5),2,2,1,[1,1,1,1,1]);\n#Example Output: 16+80*u^(t^3+t+ 1)+80*u^(t+1)+80*u^(t^3)\n\n\nlocal SST,SSTcontri,jj3,jj5,jj6,jj8,s,nu m,Color,brind,\n indx,ColDiffMatch0,ColorDiff0,Ginv,quandleorder, \n coSolutions,validcoc,Quandle;\nSST:=0;\n\nvalidcoc:=false;\n\n Quandle:=AlexQuandle(Xpolym,p);\nquandleorder:=quandlesize(Quandle);\n \nGinv:=makeinv(Quandle);\n\ncoSolutions:=Mochizuki2coc(Xpolym,Ap olym,p,m1,a2);\nif type(coSolutions,table) then\n validcoc:=cocycle2c heck(coSolutions,Xpolym,Apolym,p);\nfi;\n\nif validcoc then\nbrind:=ma x(op(map(x->abs(x),Knot)))+1;\n\nfor jj3 from 1 to (nops(Knot)+1) do \+ # Color vectors.\n Color[jj3]:=array(1..brind):\n od ;\nnum:=quandleorder^brind; #nu mber of possible colorings\n\nfor indx from 0 to (num-1) do \+ # One color at a time.\n for jj5 from 1 to brind do\n Color[1][jj5]:=iquo(indx,quandleorder^(jj5-1)) mod quandleorder: \n od:\n \n for jj6 from 1 to nops(Knot) do # Compu ting all color vectors.\n if Knot[jj6] > 0 then \+ #The case when braid word element is >0\n if Knot[jj6]<100 \+ then\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 else \n # Virtual crossing:\n for jj8 from 1 to brind[KT] do\n if jj 8 = abs(bw[KT][jj6])-100 then\n Color[jj6+1][jj8]:=Color[ jj6][jj8+1]:\n fi:\n if jj8 = abs(bw[KT][jj6])-100 +1 then \n Color[jj6+1][jj8]:=Color[jj6][jj8-1]:\n \+ fi:\n if jj8 < abs(bw[KT][jj6])-100 then\n \+ Color[jj6+1][jj8]:=Color[jj6][jj8]:\n fi:\n if jj8 > abs(bw[KT][jj6])-100+1 then\n Color[jj6+1][jj8]:=Color [jj6][jj8]:\n fi:\n od:\n fi:\n else \+ \n # The ca se braid word element is < 0 \n for jj8 from 1 to brind do\n \+ if jj8 = abs(Knot[jj6]) then \n Color[jj6+1][jj8]:=Ginv [Color[jj6][jj8], Color[jj6][jj8+1]]:\n fi;\n if jj8 = abs(Knot[jj6])+1 then \n Color[jj6+1][jj8]:=Color[jj6][jj8- 1]:\n fi;\n if jj8 < abs(Knot[jj6]) then\n C olor[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 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(ColorD iff0[jj]),jj=1..brind);\n # This is zero iff the top color vec matches the bottom.\n if ColDiffMatch0 =0 then\n \+ for s from 1 to nops(Knot) do \n if Knot[s] > 0 then\n \+ if Knot[s]<100 then\n\n SSTcontri:=SSTcontri + coSolutions[Colo r[s][abs(Knot[s])], Color[s][abs(Knot[s])+1] ] :\n fi;\n \+ else\n SSTcontri:=SSTcontri - coSolutions[Color[s+1][abs(Knot[ s])], Color[s+1][abs(Knot[s])+1] ] :\n fi: \n od: \+ # Closing the state-sum term, for s.\n \+ \n SST:=SST + u^(Rem(SSTcontri,Apolym,t) mod p):\n fi: \+ # Closing the ColDiffMatch \nod: # Closing indx l oop (one color here at a time, for indx). \nreturn(SST);\nelse\n prin t(\"Invalid cocycles\");\n return;\nfi;\nend:\n\n\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 296 "This procedure will find values for m1,m2, and a3 from the formula f(x1,x2,x3)=(x1-x2)^(p^m1)(x2-x3)^(p^m2)x3^a3 tha t satisfy the condition Divide(1-t^(p^m1+p^m2+p^m3),g) mod p. g is a p olynomial in t used for the quandles. p is the prime modulus, and n is the upperbound for the values m1,m2,m3." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 747 " findgood3cocexp:=proc(g,p,n)\n#Input: (1) A polyno mial in t. \n# (2) A prime p. \n# (3) A positive integer n. This is how far you want to search for \n# vaild expone nts.\n#Output: The procedure produces a list of 5 element lists. Each term contains the\n# polynomial g the prime for the modulus a nd the values for the exponents \n# m1,m2, and a3 from the Moc hizuki conditions.\n# f(x1,x2,x3)=(x1-x2)^(p^m1)(x2-x3)^(p^m2) x3^a3.\n#Example input: findgood3cocexp(t^2-t+1,2,2);\n\nlocal m1,m2,m 3,L;\n L:=[];\n for m1 from 0 to n do\n for m2 from 0 to n do\n \+ for m3 from 0 to n do\n if Divide(1-t^(p^m1+p^m2+p^m3),g) mod \+ p then\n L:=[op(L),[g,p,m1,m2,m3]];\n fi;\nod:od:od:\nr eturn L:\nend:\n\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 967 "This proce dure will calculate the 2 and 3 cocycle invariants. First it generates the values for the 2-cocycle values that are specified as n1, and b2. n1 is the first exponent, and b2 is the second which is zero or a po wer of p from the 2-cocycle formula f(x1,x2)=(x1-x2)^(p^n1)(x2)^b2. Xp olym (polynomial in t) is the quandle used for coloriung the braid. Ap olym (polynomial in t) is the quandle used for the coefficient group. p is a prime used for the quandles and cocycle formula. Knot is a li st that is the braid of the desired knot. Next it generates the value s for the 3-cocycle values that are specified as m1, m2, and a3. m1 is the first exponent, m2 is the second exponent, and a3 is the third wh ich is zero or a power of p from the 3-cocycle formula f(x1,x2,x3)=(x1 -x2)^(p^m1)(x2-x3)^(p^m2)x3^a3. This procedure return a two element li st. The first element is the value of the 2-cocycle invariant and the \+ second is the value of the 3-cocycle invariant." }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 6088 "Invariants2_3Mochizuki:=proc(Xpolym,Apolym,p ,m1,m2,a3,n1,b2,Knot)\n#Procedure to calculate the state sum term for \+ a knot\n#Input: (1) Xpolym is the polynomial from the Alexander quandl e that will \n# be used to color the knot.\n# (2) Apol ym is the polynomial from the alexander quandle that \n# is \+ used for the coefficients.\n# (3) prime, p, for the quandles.\n# (4) From Mochizuki theorem a1=p^m1\n# (5) From Mochizuki \+ theorem a2=p^m2 \n# (6) From Mochizuki theorem a3=p^m3 or a3=0. \+ So a3 must be a power of p \n# or zero.\n# (7) A knot given in braid form (ex [1,1,1]).\n#Output: The state sum of the knot .\n#Example Input: Invar3Mochizuki(t^2-t+1,t^2-t+1,5,0,1,0,[1,1,1]);\n #Example Output: 625+3750*u^(t+3)+3750*u^(4*t+2)+3750*u^(3*t+4)+3750* u^(1+2*t)\n\nlocal SST2coc,SST3coc,SST2contri,SST3contri,jj3,jj5,jj6,j j8,s,num,Color,brind,\n indx,ColDiffMatch0,ColorDiff0,Ginv,quandl eorder, \n co2Solutions,co3Solutions,Facecolors,facecolors ,\n precolorface,nowcolor,colcoloring,Quandle,VALIDCOLORS,\n \+ QuandleC,KnotC,x,y,i,valid2coc,valid3coc;\nSST2coc:=0;\nSST3coc:=0;\n \nvalid2coc:=false;\nvalid3coc:=false;\n\n#print(\"Program start\");\n \n\n#The following will create the Cayley table for the Alexander Quan dle where the elements come \n#from the set \{0..n-1\}\nQuandle:=AlexQ uandle(Xpolym,p);\n\nquandleorder:=quandlesize(Quandle);\nGinv:=makein v(Quandle);\n#print(\"Generated the quandle\");\n# The following state ment will use Mochizuki formula to get the values for each term of the \n #cocycle. The indices of the array come from \{0..n-1\} and represe nt elements of the Alexander \n#quandle X. The values of these element s lie in A=Z_p[t^(+-1)]/(Apolym) and are in polynomial #form.\n\n\nco3 Solutions:=Mochizuki3coc(Xpolym,Apolym,p,m1,m2,a3);\nco2Solutions:=Moc hizuki2coc(Xpolym,Apolym,p,n1,b2);\n#print(\"finished cocycles\");\n## ############\n\n#print(co2Solutions);\n################\nif type(co2So lutions,table) and type(co3Solutions,table) then\n valid2coc:=cocycle 2check(co2Solutions,Xpolym,Apolym,p);\n valid3coc:=cocycle3check(co3S olutions,Xpolym,Apolym,p);\nfi;\n\n#print(\"The value of co3check is \+ \",cocycle3check(coSolutions,Xpolym,Apolym,p));\n\nif valid2coc and va lid3coc then\nbrind:=max(op(map(x->abs(x),Knot)))+1;\n\n\n\n\n for y \+ from 1 to nops(Knot)+1 do\n Color[y]:=array(1..brind,[]):\n Face colors[y]:=array(0..brind-1);\n od:\n\n\nnum:=quandleorder^brind;\n#p rint(\"about to enter sst loop\");\nfor indx from 0 to (num-1) do \+ # One color at a time.\n for jj5 from 1 to brin d do\n Color[1][jj5]:=iquo(indx,quandleorder^(jj5-1)) mod quandle order:\n od:\n \n for jj6 from 1 to nops(Knot) do # Computing all color vectors.\n if Knot[jj6] > 0 then \+ #The case when braid word element is >0\n for jj8 f rom 1 to brind do\n if jj8 = abs(Knot[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]:=Quand le[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 > abs(Knot[jj6])+1 then\n \+ Color[jj6+1][jj8]:=Color[jj6][jj8]:\n fi:\n \+ od:\n else \n \+ # The case braid word element is < 0 \n for jj8 fro m 1 to brind do\n if jj8 = abs(Knot[jj6]) then \n Co lor[jj6+1][jj8]:=Ginv[Color[jj6][jj8], Color[jj6][jj8+1]]:\n f i;\n if jj8 = abs(Knot[jj6])+1 then \n Color[jj6+1][ jj8]:=Color[jj6][jj8-1]:\n fi;\n if jj8 < abs(Knot[jj6 ]) then\n Color[jj6+1][jj8]:=Color[jj6][jj8]:\n fi: \n if jj8 > abs(Knot[jj6])+1 then\n Color[jj6+1][jj8 ]:=Color[jj6][jj8]:\n fi:\n od:\n fi:\n od: \+ # closes jj6. \n\n \+ # Finding if the colors match .\n ColorDiff0:=evalm(Color[1]-Color[nops(Knot)+1]);\n ColDiffMatc h0:=sum(abs(ColorDiff0[jj]),jj=1..brind);\n # Th is is zero iff the top color vec matches the bottom.\n if ColDiffMat ch0 =0 then\n for facecolors from 0 to (quandleorder-1) do\n \+ SST2contri:=0; # State-sum contribu tions.\n SST3contri:=0; \n for precolorface from 1 \+ to (nops(Knot)+1) do \n \n Facecolors[precolorface ][0]:=facecolors:\n\n od;\n for nowcolor from 1 to nops( Knot) do\n \n for colcoloring from 0 to (abs(Knot[now color])-1) do \n Facecolors[nowcolor][colcoloring+1]:= Quandle[Facecolors[nowcolor][colcoloring],Color[nowcolor][colcoloring+ 1]]:\n od:\n od:\n for s from 1 to nops(Knot) do \n if Knot[s] > 0 then\n SST3contri:= S ST3contri + co3Solutions[Facecolors[s][abs(Knot[s])-1],Color[s][abs(Kn ot[s])], Color[s][abs(Knot[s])+1] ] :\n else\n \+ SST3contri:=SST3contri -co3Solutions[Facecolors[s][abs(Knot[s])-1], \n Color[s+1][abs(Knot[s])], Color[s+1][abs (Knot[s])+1] ] :\n fi: \n od: \+ # Closing the state-sum term, for s. \n SST3coc:=SST3coc + u^(Rem(SST3contri,Apolym,t) mod p);\n od: \+ \n #closes facecolors \n\n for s fr om 1 to nops(Knot) do \n if Knot[s] > 0 then\n \+ SST2contri:= SST2contri + co2Solutions[Color[s][abs(Knot[s])],Colo r[s][abs(Knot[s])+1] ] :\n else\n SST2contri :=SST2contri -co2Solutions[Color[s+1][abs(Knot[s])],Color[s+1][abs(Kno t[s])+1] ] :\n fi: \n od: \n SST2coc:=SST2coc + u^( Rem(SST2contri,Apolym,t) mod p);\n fi; \+ \nod: # Closing ind x loop (one color here at a time, for indx). \nreturn(SST2coc,SST3coc) ;\nelse\nprint(\"Invalid cocycles\");\nreturn;\nfi;\nend:\n" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 181 "The next procedure returns true o r fale if the given character, charstar, is the * character or not. Th is is needed for the next procedure in generating the filenames automa tically." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 86 "ismult:=proc(ch arstar)\nif charstar=\"*\" then\n return true;\nelse\nreturn false;\n fi;\nend:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 387 "This procedure will calculate the 2 and 3 cocycle Invariants for Alexander quandles in a \+ systematic way. The first parameter is the PATH to the directory where you want the values written. This program will generate the filename \+ for the particular calculation that you are performing. The naming con vention is as follows: Z_pmod(polym)2cocinv_n_b.txt or Z_pmod(polym)3c ocinvm1_m2_a3.txt." }}{PARA 0 "" 0 "" {TEXT -1 776 "Nameing the files \+ in this way will allow the user to easily identify the contents of the file that are specific to the quandle and cocycle chosen. Most of th e input parameters are as described above; however, numberofKnots is h ow far through Livingstons table of knots you wish to calculate. This \+ is currently not includeed in the filename. This leads to potential fo r error. For example, using the same quandle and cocycles with a diffe rent number of knots will result in on file being overwritten. This ma y be fixed later. i had intended this to run through all 2977 prime kn ots, but decided that adding this bound may be better. This procedure \+ will only calculae the value of the invariant if the Gcd(polym,delta(K not))<>1; otherwise there are only the trivial colorings. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 138 "Calcinvars:=proc(filePATH,p ,polym ,n,b,m1,m2,a3,numberofKnots)\nlocal i,HH,tmpfilename1,tmpfilename2,tmp filename3,tmpf1,tmpf2,tmpf3,INVARS;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 99 " tmpfilename1:=cat(filePATH,Z_,p,m,o,d,\"(\",convert(eval(polym),s tring),\")\",2,cocinv,n,_,b,\".\",txt);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 219 " tmpfilename2:=cat(filePATH,Z_,p,m,o,d,\"(\",convert(eval(pol ym),string),\")\",3,cocinv,m1,_,m2,_,a3,\".\",txt);\ntmpfilename1:=Str ingTools[Remove](ismult,tmpfilename1);\ntmpfilename2:=StringTools[Remo ve](ismult,tmpfilename2);\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 " pri nt(tmpfilename1);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 " print(tmpfile name2);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 34 " tmpf1:=fopen(tmpfilenam e1,WRITE);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 34 " tmpf2:=fopen(tmpfile name2,WRITE);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 74 " fprintf(tm pf1,\"Mochizuki 2-cocycle invariants for Alexander Quandles\\n\");" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 74 " fprintf(tmpf2,\"Mochizuki 3-cocycl e invariants for Alexander Quandles\\n\");" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 70 " fprintf(tmpf1,\"2-cocycle formula f(x,y)=(x-y)^%d^%d *y^%d \\n\",p,n,b);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 91 " fprintf(tm pf2,\"3-cocycle formula f(x,y,z)=(x-y)^%d^%d *(y-z)^%d^%d *z^%d\\n\",p ,m1,p,m2,a3);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 104 " fprintf(tmpf1,\"Alexander Quandle %s\\n\",cat( Z_,p,\"[t^1,t^-1]\",\"/\",\"(\",convert(eval(polym),string),\")\"));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 104 " fprintf(tmpf2,\"Alexander Quand le %s\\n\",cat(Z_,p,\"[t^1,t^-1]\",\"/\",\"(\",convert(eval(polym),str ing),\")\"));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 " #HH:=ssystem(date):HH[2];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " \+ " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 " #fprintf(tmpf1,\"Generated %s \\n\",HH[2]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 " #fprintf(tmpf2,\" Generated %s\\n\",HH[2]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 " for i from 0 to numberofKnots do " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 23 " #for i from 0 to 14 do" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " \+ " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 39 " if Gcd(polym,Knot[i,3]) mod p \+ <>1 then" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 67 " #Invariants2_3Mochizuk i:=proc(Xpolym,Apolym,p,m1,m2,a3,n1,b2,Knot)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 70 " INVARS:=Invariants2_3Mochizuki(polym,polym,p,m1,m2,a 3,n,b,Knot[i,2]):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 229 " fprintf(tmpf 1,\"%s\\t%s\\t Gcd\\(%s,%s\\) mod %d =%s\\n%s\\n\\n\",convert(Knot[i,1 ],string),convert(Knot[i,2],string),convert(polym,string),convert(Knot [i,3],string),p,convert(Gcd(polym,Knot[i,3])mod p,string),convert(INVA RS[1],string));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 230 " fprintf(tmpf2, \"%s\\t%s\\t Gcd\\(%s,%s\\) mod %d =%s \\n%s\\n\\n\",convert(Knot[i,1] ,string),convert(Knot[i,2],string),convert(polym,string),convert(Knot[ i,3],string),p,convert(Gcd(polym,Knot[i,3])mod p,string),convert(INVAR S[2],string));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 103 " #printf (\"%s\\t%s\\n%s\\n\",convert(Knot[i,1],string),convert(Knot[i,2],strin g),convert(INVARS[1],string));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 103 " # printf(\"%s\\t%s\\n%s\\n\",convert(Knot[i,1],string),convert(Knot[i, 2],string),convert(INVARS[2],string));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 " fi;" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 " od:" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 " #HH:=ssystem(date):HH[2]; " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 " #fprintf(tmpf1,\"Generated %s\\n\",HH[2]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 " #fprintf(tmpf2,\"Generated %s\\n\",HH[2]);" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 15 " fclose(tmpf1);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 15 " fclose(tmpf 2);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 15 " fclose(tmpf3);" }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "end:" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 172 "This procedure will calculate t he Mochizuki 3-cocycle values for the special case when the quandle is a Dihedral quandle. f[i,j,k]:=((i-j)*((2*k^p-j^p)-(2*k-j)^p)/p) mod p ." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 306 "MochizukiDihedral3coc :=proc(p)\nlocal i,j,k,f, qsize, Quandle,Xelements,temp, tempcheck;\no ption remember;\n\nf:=array(0..(p-1),0..(p-1),0..(p-1));\nfor i from 0 to (p-1) do\n for j from 0 to (p-1) do\n for k from 0 to (p-1) do \nf[i,j,k]:=((i-j)*((2*k^p-j^p)-(2*k-j)^p)/p) mod p;\n\nod:od:\nod:\n \nreturn(f);\nend: " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 305 "This pr ocedure is the same that appears in the file Knotpkg.m and is explaind in Worksheet I. This program was written to accept an optional 4th ar gument that is the cocycle table. \nSince these values are in Z_p we \+ can use the same program and just pass the 3-cocycle values from Mochi zukiDihedral3coc()." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4266 "ca lc3cocInvar:=proc(Quandle,Knot,m::posint)\n#Procedure to calculate the state sum term for a knot\n#Input: (1) A quandle.\n# (2) A knot represented as a list in braid word form.\n# (3) The modulus.\n # (4) Optional. The solutions to the 3-cocycle conditions.\n# \+ note:No error testing is done. The user must make sure \n# \+ the solutions were calculated from the same quandle \n# \+ and modulus.\n#Output: The state sum of the knot.\nloca l SST,SSTcontri,jj3,jj5,jj6,jj8,s,num,Color,brind,\n indx,ColDiff Match0,ColorDiff0,Ginv,quandleorder, \n coSolutions,Faceco lors,facecolors,\n precolorface,nowcolor,colcoloring;\nSST:=0;\n \nquandleorder:=quandlesize(Quandle);\n\nif nargs<4 then\n coSolution s:=co3Solution(Quandle,m);\nelse\n coSolutions:=args[4];\nfi;\n \nG inv:=makeinv(Quandle);\nbrind:=max(op(map(x->abs(x),Knot)))+1;\n\nfor \+ jj3 from 1 to (nops(Knot)+1) do # Color vectors.\n \+ Color[jj3]:=array(1..brind):\n Facecolors[jj3]:=array(0..brind-1): \n od;\nnum:=quandleorder^brind; \+ #number of possible colorings\n\nfor indx from 0 to (num-1) do \+ # One color at a time.\n for jj5 from 1 to brind do\n Color[1][jj5]:=iquo(indx,quandleorder^(jj5-1)) mod quandleo rder:\n od:\n \n for jj6 from 1 to nops(Knot) do # \+ Computing all color vectors.\n if Knot[jj6] > 0 then \+ #The case when braid word element is >0\n for jj8 fr om 1 to brind do\n if jj8 = abs(Knot[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]:=Quandl e[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 > abs(Knot[jj6])+1 then\n \+ Color[jj6+1][jj8]:=Color[jj6][jj8]:\n fi:\n \+ od:\n else \n \+ # The case braid word element is < 0 \n for jj8 from 1 to brind do\n if jj8 = abs(Knot[jj6]) then \n Col or[jj6+1][jj8]:=Ginv[Color[jj6][jj8], Color[jj6][jj8+1]]:\n fi ;\n if jj8 = abs(Knot[jj6])+1 then \n Color[jj6+1][j j8]:=Color[jj6][jj8-1]:\n fi;\n if jj8 < abs(Knot[jj6] ) then\n Color[jj6+1][jj8]:=Color[jj6][jj8]:\n fi:\n if jj8 > abs(Knot[jj6])+1 then\n Color[jj6+1][jj8]: =Color[jj6][jj8]:\n fi:\n od:\n fi:\n od: \+ # closes jj6. \n\n \+ # Finding if the colors match. \n ColorDiff0:=evalm(Color[1]-Color[nops(Knot)+1]);\n ColDiffMatch 0:=sum(abs(ColorDiff0[jj]),jj=1..brind);\n # Thi s is zero iff the top color vec matches the bottom.\n if ColDiffMatc h0 =0 then\n#The braid has a valid coloring so every possible color wi ll contribute to the state sum.\n for facecolors from 0 to (quan dleorder-1) do\n SSTcontri:=0; # State-sum contributions. \n \n for precolorface from 1 to (nops(Knot)+1) do \n \+ \n Facecolors[precolorface][0]:=facecolors:\n\n \+ od;\n for nowcolor from 1 to nops(Knot) do\n \n for col coloring from 0 to (abs(Knot[nowcolor])-1) do \n Facecolors[ nowcolor][colcoloring+1]:=Quandle[Facecolors[nowcolor][colcoloring],Co lor[nowcolor][colcoloring+1]]:\n \n od:\n\n od:\n for s \+ from 1 to nops(Knot) do \n if Knot[s] > 0 then\n SSTcont ri:= SSTcontri + \ncoSolutions[Facecolors[s][abs(Knot[s])-1],Color[s][ abs(Knot[s])], Color[s][abs(Knot[s])+1] ] :\n else\n SS Tcontri:=SSTcontri -\ncoSolutions[Facecolors[s][abs(Knot[s])-1],Color[ s+1][abs(Knot[s])], Color[s+1][abs(Knot[s])+1] ] :\n fi: \n \+ od: # Closing the state-sum te rm, for s.\n \n\n\n\n\n SST:=SST + u^(map( z -> z mod m, SSTc ontri ) ):\n od: #closes facecolors \nfi: \+ # Closing the ColDiffMatch\nod: \+ # Closing indx loop (one color here at a time, for indx). \nreturn(SST);\nend:\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 1057 "This procedure will calculate the 3 cocycle Invariants \+ for Dihedral quandles in a systematic way. The first parameter is the \+ PATH to the directory where you want the values written. This program \+ will generate the filename for the particular calculation that you are performing. The naming convention is as follows: DihZ_pmod(polym)3coc inv.txt in this case polym is just t+1 since Z_p[t,t^-1]/(polym) isthe Dihedral quandle.Nameing the files in this way will allow the user to easily identify the contents of the file that are specific to the qua ndle and cocycle chosen. Most of the input parameters are as describe d above; however, numberofKnots is how far through Livingstons table o f knots you wish to calculate. This is currently not includeed in the \+ filename. This leads to potential for error. For example, using the sa me quandle and cocycles with a different number of knots will result i n on file being overwritten. This may be fixed later. I had intended t his to only run through all 2977 prime knots, but decided that adding \+ a bound may be better." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 98 "CalcDihinvars:=proc(filePATH ,p,numberofKnots)\nlocal i,HH,tmpfilename1,tmpf1,Mcocycles,INVAR,polym ;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 148 " polym:=t+1;\n Mcocycles:=Moc hizukiDihedral3coc(p);\n\ntmpfilename1:=cat(filePATH,Dih_Z_,p,m,o,d,\" (\",convert(eval(polym),string),\")\",3,cocinv,\".\",txt);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 58 " tmpfilename1:=StringTools[Remove](ismult,t mpfilename1);\n\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 " print(tmpfile name1);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 34 " tmpf1:=fopen(tmpfilename1,WRITE);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 74 " fprintf(tm pf1,\"Mochizuki 3-cocycle invariants for Alexander Quandles\\n\");" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 89 " fprintf(tmpf1,\"3-cocycle formula f(x,y,z)=(x-y)[(2z^%d -j^%d)-(2 z-y)^%d]/%d\\n\",p,p,p,p);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 104 " fprintf(tmpf1,\"Alexander Quandle %s\\n\",cat(Z_,i,\"[t^1,t^-1]\",\"/\",\"(\",convert(eval(polym),strin g),\")\"));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 " #HH:=ssystem(date):HH[2];" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 " #fprintf(tmpf1,\"Generated %s\\n\",HH[2]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 " #fprintf(tmpf2,\"Generated %s\\n\",HH[2]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 57 " f or i from 0 to numberofKnots do\n#for i from 0 to 14 do" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 66 " INVAR:=calc3cocInvar(AlexQuandle(p olym,p),Knot[i,2],p,Mcocycles);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " \+ " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 107 " fprintf(tmpf1,\"%s\\t%s\\t%s \\n\\n\",convert(Knot[i,1],string),convert(Knot[i,2],string),convert(I NVAR,string));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 101 "# printf(\"%s\\t%s\\t%s\\n\\n\",convert( Knot[i,1],string),convert(Knot[i,2],string),convert(INVAR,string));" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 103 "# printf(\"%s\\t%s\\n%s\\n\",conv ert(Knot[i,1],string),convert(Knot[i,2],string),convert(INVARS[2],stri ng));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 " od:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 " #HH:=ssystem(date):HH[2];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " \+ " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 " #fprintf(tmpf1,\"Generated %s \\n\",HH[2]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 " #fprintf(tmpf2,\" Generated %s\\n\",HH[2]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 " fclose(tmpf1);" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 4 "end:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 268 "save Calcinvars,i smult,Invariants2_3Mochizuki,findgood3cocexp,Invar2Mochizuki,cocycle2c heck,Mochizuki2coc,\nXi,TableInvars,Invar3Mochizuki,makeinv,cocycle3ch eck,Mochizuki3coc, MochizukiDihedral3coc,calc3cocInvar,\nCalcDihinvars , \"J:\\\\SaitoGood_7_22_05\\\\PolycocInvpkg.m\";" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 0 0" 326 }{VIEWOPTS 1 1 0 3 4 1802 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }