This worksheet contains the procedures used to generate the Maple input file, "PolycocInvpkg.m." Examples using these procedures appear in WorksheetIII. These procedures are for calculating quandle polynomial cocycle knot invariants. They are for special cases when the quandle is an Alexander quandle.
Last Updated: 8/15/2005
 

 

> restart;
 

Procedures for calculating the Cayley table for the Alexander Quandles over Z_p where p is a prime are contained in the package alexQuanpkg.m. 

> read "J://SaitoGood_7_22_05//alexQuanpkg.m";
 

The next procedure calculates the values for the 3-cocycles. Xpolym  (polynomial in t) is the Alexander quandle that will be used for coloring the braids. Apolym  (polynomial in t) is the quandle used for the coefficient group. p is a prime number used for the Quandles 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)x3^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. 

If the conditions are satisified the procedure will return a table of the 3-cocycle values. Otherwise it will return false. 

 

> Mochizuki3coc:=proc(Xpolym,Apolym,p,m1,m2,a3)
#Input: (1) The polynomial in t from the Alexander quandle
#           that will be used to color the braid( Z_p[t^-1,t]/(Xpolym)).
#       (2) The polynomial in t from the Alexander quandle
#           that is used for the coefficients (Z_p[t^-1,t]/(Apolym)).
#       (3) The prime modulus from the above Alexander quandles.
#       (4) m1 is the exponent from Mochizuki's formula for the first term
#           f(x1,x2,x3)=(x1-x2)^(p^m1)(x2-x3)^(p^m2)x3^a3.
#       (5) m2 is the exponent from the second term in Mochizuki formula above.
#       (6) a3 is the third term in the formula. a3 must either be zero or a power
#           of p such that Apolym divides 1-t^(p^m1+p^m2+a3).
#Output: A table that has the values for the 3-cocycles.
#Example Input: Mochizuki3coc(t^2-t+1,t^2-t+1,2,1,1,0);



local i,j,k,f, qsize, Quandle,Xelements,temp, tempcheck;
option remember;

Xelements:=[];
Xelements:=rres(Xpolym,p):


#print("Mochizuki called");
#print(Xelements);
qsize:=nops(Xelements);

# In the following statement Xpolym is used. This is the polynomial
# from the Alexander quandle that is used to color the braid.
# The paper by Kheira says that we should use the polynomial from the Alexander quandle
# that is used for the coefficients in the Divides test

tempcheck:=Divide(1-t^(p^m1+p^m2+a3),Apolym) mod p;
#print("tempcheck is ",1-t^(p^m1+p^m2+a3),Xpolym,tempcheck);
if a3=0 or tempcheck then
 continue;
else
 print("Mochizuki conditions not satisfied");
 return false;
fi;
f:=array(0..qsize-1,0..qsize-1,0..qsize-1);
for i from 1 to qsize do
 for j from 1 to qsize do
  for k from 1 to qsize do
temp:=(Xelements[i]-Xelements[j])^(p^m1)*(Xelements[j]-Xelements[k])^(p^m2)*Xelements[k]^a3;

# a[3] is zero or p^m3
#This procedure does not currently check to see if a[3] is prime power.
#DEBUG
#print("temp ploy is ",temp);   
#END DEBUG
f[i-1,j-1,k-1]:=Rem(temp,Apolym,t) mod p;
#DEBUG
#print("temp ploy reduced in A is ",f[i-1,j-1,k-1]);
#END DEBUG
od:od:
od:

return(f);
end:   
 

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 Mochizuki3coc. 

> cocycle3check:=proc(cocy,Xpolym,Apolym,p)
#Input: (1) A table that contains the values for the 3-cocycles that is generated
#           from the procedure Mochizuki3coc().
#       (2) The polynomial in t from the Alexander quandle
#           that will be used to color the braid( Z_p[t^-1,t]/(Xpolym)).
#       (3) The polynomial in t from the Alexander quandle
#           that is used for the coefficients (Z_p[t^-1,t]/(Apolym)).
#       (4) The prime modulus from the above Alexander quandles.
#Output: A true or false value. This procedure will plug the values from the table cocy
#        into the 3-cocycle condition to make sure it is a valid 3-cocycle.
#        Note: This only tests the Reidmeister type II and III moves.
#Example Input: cocycle3check(Mochizuki3coc(t^2-t+1,t^2-t+1,2,1,1,0),t^2-t+1,t^2-t+1,2);

local i, j, k,x,y,z,w,temp,rrespol,quanod,Quandle;

rrespol:=rres(Xpolym,p);
#print(rrespol);
Quandle:=AlexQuandle(Xpolym,p);

quanod:=nops(rrespol);
#print(convert(Quandle,matrix));
#print(quanod);
for i from 0 to (quanod-1) do
for j from 0 to (quanod-1) do
 if cocy[i,j,j]<>0 then
   print("f[",i,j,j,"]=",cocy[i,j,j]);
   return false;
 fi;
od;od;

# print("finished rII");
for x from 0 to (quanod-1) do
  for y from 0 to (quanod-1) do
     for z from 0 to (quanod-1) do
       for w from 0 to (quanod-1) do
       temp:= cocy[x,z,w] - cocy[x,y,w]  + cocy[x,y,z]  
- cocy[Quandle[x,y],z,w] + cocy[Quandle[x,z],Quandle[y,z],w]- cocy[Quandle[x,w],Quandle[y,w],Quandle[z,w]];


#print(temp);
       if Rem(temp,Apolym,t) mod p<>0 then
          print("temp from ReidIII is ",temp,"xyzw is",x,y,z,w);
          return false;
       fi;
od;od;od;od;

return true;
end:
 

Generates the inverses for the quandle. 

> makeinv:=proc(Quandle)
#Procedure that will create a zero indexed two dimensional array
#representing the multiplication table for the second property of a quandle.
# ie. There exists a unique c such that a=c*b. Will be used to calculate the
#     colors for a negative crossing.
#Input: A zero indexed 2-dim array representing the multiplication
#       table for the quandle.
#Output:A zero indexed 2-dim array.
local i,j,temp,L,quandleorder;
option remember;
quandleorder:=quandlesize(Quandle);
L:=array(0..quandleorder-1,0..quandleorder-1,[]):
for i from 0 to quandleorder-1 do
 for j from 0 to quandleorder-1 do
   temp:=Quandle[i,j];
   L[j,temp]:=i;
 od;
od;
return(L);
end:
 

This procedure will return the 3-cocycle invariant. First it generates the values 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 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)x3^a3. Xpolym (polynomial in t) is the quandle used for coloriung the braid. Apolym  (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 list that is the  braid of the desired knot. 

> Invar3Mochizuki:=proc(Xpolym,Apolym,p,m1,m2,a3,Knot)
#Procedure to calculate the state sum term for a knot
#Input: (1) Xpolym is the polynomial from the Alexander quandle that will
#           be used to color the knot.
#       (2) Apolym is the polynomial from the alexander quandle that
#           is used for the coefficients.
#       (3) prime, p, for the quandles.
#       (4) From Mochizuki theorem a1=p^m1
#       (5) From Mochizuki theorem a2=p^m2
#       (6) From Mochizuki theorem a3=p^m3 or a3=0. So a3 must be a power of p
#            or zero.
#       (7) A knot given in braid form (ex [1,1,1]).
#Output: The state sum of the knot.
#Example Input: Invar3Mochizuki(t^2-t+1,t^2-t+1,5,0,1,0,[1,1,1]);
#Example Output:  625+3750*u^(t+3)+3750*u^(4*t+2)+3750*u^(3*t+4)+3750*u^(1+2*t)

local SST,SSTcontri,jj3,jj5,jj6,jj8,s,num,Color,brind,
     indx,ColDiffMatch0,ColorDiff0,Ginv,quandleorder,        
     coSolutions,Facecolors,facecolors,
     precolorface,nowcolor,colcoloring,validcoc,Quandle;
SST:=0;

validcoc:=false;

#The following will create the Cayley table for the Alexander Quandle where the elements come #from the set {0..n-1}
Quandle:=AlexQuandle(Xpolym,p);

quandleorder:=quandlesize(Quandle);

Ginv:=makeinv(Quandle);

# The following statement will use Mochizuki formula to get the values for each term of the #cocycle. The indices of the array come from {0..n-1} and represent elements of the Alexander #quandle X. The values of these elements lie in A=Z_p[t^(+-1)/(Apolym) and are in polynomial #form.
coSolutions:=Mochizuki3coc(Xpolym,Apolym,p,m1,m2,a3);



if type(coSolutions,table) then
 validcoc:=cocycle3check(coSolutions,Xpolym,Apolym,p);
fi;

#print("The value of co3check is ",cocycle3check(coSolutions,Xpolym,Apolym,p));

if validcoc then
brind:=max(op(map(x->abs(x),Knot)))+1;

for jj3 from 1 to (nops(Knot)+1) do                # Color vectors.
    Color[jj3]:=array(1..brind):
    Facecolors[jj3]:=array(0..brind-1):
od;
num:=quandleorder^brind;                                        #number of possible colorings

for indx from 0 to (num-1) do                          # One color at a time.
  for jj5 from 1 to brind do
     Color[1][jj5]:=iquo(indx,quandleorder^(jj5-1)) mod quandleorder:
  od:

  for jj6 from 1 to nops(Knot) do                # Computing all color vectors.
    if Knot[jj6] > 0 then                        #The case when braid word element is >0
        for jj8 from 1 to brind do
          if jj8 = abs(Knot[jj6]) then
            Color[jj6+1][jj8]:= Color[jj6][jj8+1]:
          fi:
          if jj8 = abs(Knot[jj6])+1 then
            Color[jj6+1][jj8]:=Quandle[Color[jj6][jj8-1],Color[jj6][jj8]] :
          fi:
          if jj8 < abs(Knot[jj6]) then
            Color[jj6+1][jj8]:=Color[jj6][jj8]:
          fi:
          if jj8 > abs(Knot[jj6])+1 then
            Color[jj6+1][jj8]:=Color[jj6][jj8]:
          fi:
        od:
    else                                
                                # The case braid word element is < 0
      for jj8 from 1 to brind do
        if jj8 = abs(Knot[jj6]) then
          Color[jj6+1][jj8]:=Ginv[Color[jj6][jj8], Color[jj6][jj8+1]]:
        fi;
        if jj8 = abs(Knot[jj6])+1 then
          Color[jj6+1][jj8]:=Color[jj6][jj8-1]:
        fi;
        if jj8 < abs(Knot[jj6]) then
          Color[jj6+1][jj8]:=Color[jj6][jj8]:
        fi:
        if jj8 > abs(Knot[jj6])+1 then
          Color[jj6+1][jj8]:=Color[jj6][jj8]:
        fi:
      od:
    fi:
  od:                                                 # closes jj6.

                                                  # Finding if the colors match.
  ColorDiff0:=evalm(Color[1]-Color[nops(Knot)+1]);
  ColDiffMatch0:=sum(abs(ColorDiff0[jj]),jj=1..brind);
                      # This is zero iff the top color vec matches the bottom.
  if ColDiffMatch0 =0 then
#The braid has a valid coloring so every possible color will contribute to the state sum.
     for facecolors from 0 to  (quandleorder-1) do
       SSTcontri:=0;      # State-sum contributions.
     
       for precolorface from 1 to (nops(Knot)+1) do  
        
           Facecolors[precolorface][0]:=facecolors:

       od;
for nowcolor from 1 to nops(Knot) do
      
        for colcoloring from 0 to (abs(Knot[nowcolor])-1) do  
         Facecolors[nowcolor][colcoloring+1]:=Quandle[Facecolors[nowcolor][colcoloring],Color[nowcolor][colcoloring+1]]:
     
 od:

    od:
    for s from 1 to nops(Knot) do
      if  Knot[s] > 0 then
       SSTcontri:= SSTcontri +
coSolutions[Facecolors[s][abs(Knot[s])-1],Color[s][abs(Knot[s])], Color[s][abs(Knot[s])+1] ] :
      else
         SSTcontri:=SSTcontri -
coSolutions[Facecolors[s][abs(Knot[s])-1],Color[s+1][abs(Knot[s])], Color[s+1][abs(Knot[s])+1] ] :
      fi:
    od:                                         # Closing the state-sum term, for s.
    


#print("SSTcontri is ",SSTcontri);
#print("SSTcontri after Rem is ",Rem(SSTcontri,Apolym,t) mod p);

    SST:=SST + u^(Rem(SSTcontri,Apolym,t) mod p);
#map( z -> z mod m,  SSTcontri  ) ):
od: #closes facecolors  
fi:                                                 # Closing the ColDiffMatch
od:                                                 # Closing indx loop (one color here at a time, for indx).
return(SST);
else
print("Invalid cocycles");
return;
fi;
end:
 

This procedure will calculate the Mochizuki 3-cocycle invariants for a given range of knots. The first paramenter is the number of knots that you want to calculae. The 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 end at Knot[n,*]. If one wanted to perform calculations on all prime knots with 9 and fewer crossings, n would have a value of 83. p is the prime 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 coefficient group. 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)x3^a3.  

> TableInvars:=proc(n,p,g,m1,m2,a3)
#Input:  (1) n is a positive integer. The braids stored in the file "knotsLivingston.txt"
#            are numbered from 1 to 2976. n represents how far you want to go
#            in the list. ie. There are 83 braids with 9 for fewer crossings so if n is 83
#            you will calculate all invariants with 9 or fewer crossings.
#        (2) The prime modulus for the Alexander quandles.
#        (3) A polynomial in t. g is used for both the coloring quandle and the quandle
#            used for the coefficients. This procedure will check that the
#            gcd of g and the Alexander polynomial of the given braid is not 1. This
#            assures us that the braid has nontrivial colorings.
#        (4) m1 is the exponent from Mochizuki's formula for the first term
#            f(x1,x2,x3)=(x1-x2)^(p^m1)(x2-x3)^(p^m2)x3^a3.
#        (5) m2 is the exponent from the second term in Mochizuki formula above.
#        (6) a3 is the third term in the formula. a3 must either be zero or a power
#            of p such that g divides 1-t^(p^m1+p^m2+a3).
#Output: This procedure will print out the knot number, the braid, the gcd of
#        g and the Alexander polynomial of the knot, and finally the invariant.
#Example Input: TableInvars(83,2,t^2-t+1,2,2,0);
local i,tempgcd;

for i from 0 to n do
 tempgcd:=Gcd(g,Knot[i,3]) mod p:
 if tempgcd<>1 then
  print(Knot[i,1],Knot[i,2],tempgcd,Invar3Mochizuki(g,g,p,m1,m2,a3,Knot[i,2]));
fi:
od:
end:
 

The procedure 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). 

> Xi:=proc(n)
#input: (1)A positive integer n.
#output: A polynomial in t. Sum((-t)^i,i = 0 .. n-1).
#        Xi(0):=0 by definition.
#Example input: Xi(3);
#Example output: t^2-t+1

if n=0 then
 return 0;
else
return(sum((-t)^i,i=0..n-1));
fi;
end:
 

The next procedure calculates the values for the 2-cocycles. Xpolym  (polynomial in t) is the Alexander quandle that will be used for coloring the braids. Apolym  (polynomial in t) is the quandle used for the coefficient group. p is a prime number used for the Quandles and the 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 Apolym divides 1-t^(p^m1+a2) mod p. 

If the conditions are satisified the procedure will return a table of the 2-cocycle values. Otherwise it will return false. 

>
 

> Mochizuki2coc:=proc(Xpolym,Apolym,p,m1,a2)
#Input: (1) The polynomial in t from the Alexander quandle
#           that will be used to color the braid( Z_p[t^-1,t]/(Xpolym)).
#       (2) The polynomial in t from the Alexander quandle
#           that is used for the coefficients (Z_p[t^-1,t]/(Apolym)).
#       (3) The prime modulus from the above Alexander quandles.
#       (4) m1 is the exponent from Mochizuki's formula for the first term
#           f(x1,x2,x3)=(x1-x2)^(p^m1)x2^a2.
#       (5) a2 is the second term in the formula. a2 must either be zero or a power
#           of p such that Apolym divides 1-t^(p^m1+a2).
#Output: A table that has the values for the 2-cocycles.
#Example Input: Mochizuki3coc(t^2-t+1,t^2-t+1,2,1,0);


local i,j,f, qsize, Quandle,Xelements,temp,tempcheck;
option remember;
Xelements:=[];
Xelements:=rres(Xpolym,p):
qsize:=nops(Xelements);

tempcheck:=Divide(1-t^(p^m1+a2),Xpolym) mod p;
#print("tempcheck is ",1-t^(p^m1+a2),Xpolym,tempcheck);
if a2=0 or tempcheck then
 continue;
else
 print("Mochizuki conditions not satisfied");
 return false;
fi;
#print(Xelements);


f:=array(0..qsize-1,0..qsize-1);
for i from 1 to qsize do
 for j from 1 to qsize do

temp:=(Xelements[i]-Xelements[j])^(p^m1)*Xelements[j]^a2;
#print(temp);   
f[i-1,j-1]:=Rem(temp,Apolym,t) mod p;
od:od:
return(f);
end:   
 

This procedure will check to see if the table of values for the 2-cocycles generated form the procedure Mochizuki2coc satisfy the 2-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 Mochizuki2coc. 

 

> cocycle2check:=proc(cocy,Xpolym,Apolym,p)
#Input: (1) A table that contains the values for the 2-cocycles that is generated
#           from the procedure Mochizuki2coc().
#       (2) The polynomial in t from the Alexander quandle
#           that will be used to color the braid( Z_p[t^-1,t]/(Xpolym)).
#       (3) The polynomial in t from the Alexander quandle
#           that is used for the coefficients (Z_p[t^-1,t]/(Apolym)).
#       (4) The prime modulus from the above Alexander quandles.
#Output: A true or false value. This procedure will plug the values from the table cocy
#        into the 2-cocycle condition to make sure it is a valid 2-cocycle.
#        Note: This only tests the Reidmeister type II and III moves.
#Example Input: cocycle2check(Mochizuki2coc(t^2-t+1,t^2-t+1,2,1,1,0),t^2-t+1,t^2-t+1,2);


local i, j, k,x,y,z,w,temp,rrespol,quanod,Quandle;

rrespol:=rres(Xpolym,p);
#print(rrespol);
Quandle:=AlexQuandle(Xpolym,p);

quanod:=nops(rrespol);
#print(convert(Quandle,matrix));
#print(quanod);
for i from 0 to (quanod-1) do
  if cocy[i,i]<>0 then
   print("f[",i,i,"]=",cocy[i,i]);
   return false;
 fi;
od;

# print("finished rII");

# E[x,y,z]:= f[x,y]+f[Quandle[x,y], z]-f[x,z]-f[Quandle[x,z],Quandle[y,z]]:
for x from 0 to (quanod-1) do
  for y from 0 to (quanod-1) do
     for z from 0 to (quanod-1) do
       temp:= cocy[x,y]+cocy[Quandle[x,y], z]-cocy[x,z]-cocy[Quandle[x,z],Quandle[y,z]];


#print(temp);
       if Rem(temp,Apolym,t) mod p<>0 then
          print("temp from ReidIII is ",temp,"xyz is",x,y,z);
          return false;
       fi;
od;od;od;

return true;
end:
 

Thsi procedue will return the 2-cocyle invariant. First it generates the values for the 2-cocycle values that are specified as m1, and a2. 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. Xpolym (polynomial in t) is the quandle used for coloriung the braid. Apolym  (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 list that is the  braid of the desired knot. 

 

> Invar2Mochizuki:=proc(Xpolym,Apolym,p,m1,a2,Knot)
#Procedure to calculate the state sum term for a knot
#Input: (1) Xpolym is the polynomial from the Alexander quandle that will
#           be used to color the knot.
#       (2) Apolym is the polynomial from the alexander quandle that
#           is used for the coefficients.
#       (3) prime, p, for the quandles.
#       (4) From Mochizuki theorem a1=p^m1
#       (5) From Mochizuki theorem a2=p^m2 or a2=0. So a2 must be a power of p
#            or zero.
#       (6) A knot given in braid form (ex [1,1,1]).
#Output: The state sum of the knot.
#Example Input: Invar2Mochizuki(Xi(5),Xi(5),2,2,1,[1,1,1,1,1]);
#Example Output:  16+80*u^(t^3+t+1)+80*u^(t+1)+80*u^(t^3)


local SST,SSTcontri,jj3,jj5,jj6,jj8,s,num,Color,brind,
     indx,ColDiffMatch0,ColorDiff0,Ginv,quandleorder,
     coSolutions,validcoc,Quandle;
SST:=0;

validcoc:=false;

Quandle:=AlexQuandle(Xpolym,p);
quandleorder:=quandlesize(Quandle);
    
Ginv:=makeinv(Quandle);

coSolutions:=Mochizuki2coc(Xpolym,Apolym,p,m1,a2);
if type(coSolutions,table) then
 validcoc:=cocycle2check(coSolutions,Xpolym,Apolym,p);
fi;

if validcoc then
brind:=max(op(map(x->abs(x),Knot)))+1;

for jj3 from 1 to (nops(Knot)+1) do                # Color vectors.
    Color[jj3]:=array(1..brind):
od;
num:=quandleorder^brind;                                        #number of possible colorings

for indx from 0 to (num-1) do                          # One color at a time.
  for jj5 from 1 to brind do
     Color[1][jj5]:=iquo(indx,quandleorder^(jj5-1)) mod quandleorder:
  od:

  for jj6 from 1 to nops(Knot) do                # Computing all color vectors.
    if Knot[jj6] > 0 then                        #The case when braid word element is >0
      if Knot[jj6]<100 then
        for jj8 from 1 to brind do
          if jj8 = abs(Knot[jj6]) then
            Color[jj6+1][jj8]:= Color[jj6][jj8+1]:
          fi:
          if jj8 = abs(Knot[jj6])+1 then
            Color[jj6+1][jj8]:=Quandle[Color[jj6][jj8-1],Color[jj6][jj8]] :
          fi:
          if jj8 < abs(Knot[jj6]) then
            Color[jj6+1][jj8]:=Color[jj6][jj8]:
          fi:
          if jj8 > abs(Knot[jj6])+1 then
            Color[jj6+1][jj8]:=Color[jj6][jj8]:
          fi:
        od:
      else
              # Virtual crossing:
        for jj8 from 1 to  brind[KT] do
          if jj8 = abs(bw[KT][jj6])-100 then
             Color[jj6+1][jj8]:=Color[jj6][jj8+1]:
          fi:
          if jj8 = abs(bw[KT][jj6])-100+1 then
             Color[jj6+1][jj8]:=Color[jj6][jj8-1]:
          fi:
          if jj8 < abs(bw[KT][jj6])-100 then
             Color[jj6+1][jj8]:=Color[jj6][jj8]:
          fi:
          if jj8 > abs(bw[KT][jj6])-100+1 then
             Color[jj6+1][jj8]:=Color[jj6][jj8]:
          fi:
         od:
      fi:
    else                                
                                # The case braid word element is < 0
      for jj8 from 1 to brind do
        if jj8 = abs(Knot[jj6]) then
          Color[jj6+1][jj8]:=Ginv[Color[jj6][jj8], Color[jj6][jj8+1]]:
        fi;
        if jj8 = abs(Knot[jj6])+1 then
          Color[jj6+1][jj8]:=Color[jj6][jj8-1]:
        fi;
        if jj8 < abs(Knot[jj6]) then
          Color[jj6+1][jj8]:=Color[jj6][jj8]:
        fi:
        if jj8 > abs(Knot[jj6])+1 then
          Color[jj6+1][jj8]:=Color[jj6][jj8]:
        fi:
      od:
    fi:
  od:                                                 # closes jj6.
  SSTcontri:=0:                                # State-sum contributions.
                                                  # Finding if the colors match.
  ColorDiff0:=evalm(Color[1]-Color[nops(Knot)+1]);
  ColDiffMatch0:=sum(abs(ColorDiff0[jj]),jj=1..brind);
                      # This is zero iff the top color vec matches the bottom.
  if ColDiffMatch0 =0 then
    for s from 1 to nops(Knot) do
      if  Knot[s] > 0 then
        if Knot[s]<100 then

       SSTcontri:=SSTcontri + coSolutions[Color[s][abs(Knot[s])], Color[s][abs(Knot[s])+1] ] :
        fi;
      else
       SSTcontri:=SSTcontri - coSolutions[Color[s+1][abs(Knot[s])], Color[s+1][abs(Knot[s])+1] ] :
      fi:
    od:                                         # Closing the state-sum term, for s.
    
     SST:=SST + u^(Rem(SSTcontri,Apolym,t) mod p):
  fi:                                                 # Closing the ColDiffMatch
od:                                                 # Closing indx loop (one color here at a time, for indx).
return(SST);
else
 print("Invalid cocycles");
 return;
fi;
end:


 

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 that satisfy the condition Divide(1-t^(p^m1+p^m2+p^m3),g) mod p. g is a polynomial in t used for the quandles. p is the prime modulus, and n is the upperbound for the values m1,m2,m3. 

> findgood3cocexp:=proc(g,p,n)
#Input:  (1) A polynomial in t.
#        (2) A prime p.
#        (3) A positive integer n. This is how far you want to search for
#            vaild exponents.
#Output:  The procedure produces a list of 5 element lists. Each term contains the
#         polynomial g the prime for the modulus and the values for the exponents
#         m1,m2, and a3 from the Mochizuki conditions.
#         f(x1,x2,x3)=(x1-x2)^(p^m1)(x2-x3)^(p^m2)x3^a3.
#Example input: findgood3cocexp(t^2-t+1,2,2);

local m1,m2,m3,L;
 L:=[];
 for m1 from 0 to n do
  for m2 from 0 to n do
    for m3 from 0 to n do
      if Divide(1-t^(p^m1+p^m2+p^m3),g) mod p then
         L:=[op(L),[g,p,m1,m2,m3]];
      fi;
od:od:od:
return L:
end:

 

This procedure 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 power of p from the 2-cocycle formula f(x1,x2)=(x1-x2)^(p^n1)(x2)^b2. Xpolym (polynomial in t) is the quandle used for coloriung the braid. Apolym  (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 list that is the  braid of the desired knot. Next it generates the values 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 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)x3^a3. This procedure return a two element list. The first element is the value of the 2-cocycle invariant and the second is the value of the 3-cocycle invariant. 

> Invariants2_3Mochizuki:=proc(Xpolym,Apolym,p,m1,m2,a3,n1,b2,Knot)
#Procedure to calculate the state sum term for a knot
#Input: (1) Xpolym is the polynomial from the Alexander quandle that will
#           be used to color the knot.
#       (2) Apolym is the polynomial from the alexander quandle that
#           is used for the coefficients.
#       (3) prime, p, for the quandles.
#       (4) From Mochizuki theorem a1=p^m1
#       (5) From Mochizuki theorem a2=p^m2
#       (6) From Mochizuki theorem a3=p^m3 or a3=0. So a3 must be a power of p
#            or zero.
#       (7) A knot given in braid form (ex [1,1,1]).
#Output: The state sum of the knot.
#Example Input: Invar3Mochizuki(t^2-t+1,t^2-t+1,5,0,1,0,[1,1,1]);
#Example Output:  625+3750*u^(t+3)+3750*u^(4*t+2)+3750*u^(3*t+4)+3750*u^(1+2*t)

local SST2coc,SST3coc,SST2contri,SST3contri,jj3,jj5,jj6,jj8,s,num,Color,brind,
     indx,ColDiffMatch0,ColorDiff0,Ginv,quandleorder,        
     co2Solutions,co3Solutions,Facecolors,facecolors,
     precolorface,nowcolor,colcoloring,Quandle,VALIDCOLORS,
     QuandleC,KnotC,x,y,i,valid2coc,valid3coc;
SST2coc:=0;
SST3coc:=0;

valid2coc:=false;
valid3coc:=false;

#print("Program start");


#The following will create the Cayley table for the Alexander Quandle where the elements come
#from the set {0..n-1}
Quandle:=AlexQuandle(Xpolym,p);

quandleorder:=quandlesize(Quandle);
Ginv:=makeinv(Quandle);
#print("Generated the quandle");
# The following statement will use Mochizuki formula to get the values for each term of the
#cocycle. The indices of the array come from {0..n-1} and represent elements of the Alexander
#quandle X. The values of these elements lie in A=Z_p[t^(+-1)]/(Apolym) and are in polynomial #form.


co3Solutions:=Mochizuki3coc(Xpolym,Apolym,p,m1,m2,a3);
co2Solutions:=Mochizuki2coc(Xpolym,Apolym,p,n1,b2);
#print("finished cocycles");
##############

#print(co2Solutions);
################
if type(co2Solutions,table) and type(co3Solutions,table) then
 valid2coc:=cocycle2check(co2Solutions,Xpolym,Apolym,p);
 valid3coc:=cocycle3check(co3Solutions,Xpolym,Apolym,p);
fi;

#print("The value of co3check is ",cocycle3check(coSolutions,Xpolym,Apolym,p));

if valid2coc and valid3coc then
brind:=max(op(map(x->abs(x),Knot)))+1;




 for y from 1 to nops(Knot)+1 do
   Color[y]:=array(1..brind,[]):
   Facecolors[y]:=array(0..brind-1);
 od:


num:=quandleorder^brind;
#print("about to enter sst loop");
for indx from 0 to (num-1) do                          # One color at a time.
  for jj5 from 1 to brind do
     Color[1][jj5]:=iquo(indx,quandleorder^(jj5-1)) mod quandleorder:
  od:

  for jj6 from 1 to nops(Knot) do                # Computing all color vectors.
    if Knot[jj6] > 0 then                        #The case when braid word element is >0
        for jj8 from 1 to brind do
          if jj8 = abs(Knot[jj6]) then
            Color[jj6+1][jj8]:= Color[jj6][jj8+1]:
          fi:
          if jj8 = abs(Knot[jj6])+1 then
            Color[jj6+1][jj8]:=Quandle[Color[jj6][jj8-1],Color[jj6][jj8]] :
          fi:
          if jj8 < abs(Knot[jj6]) then
            Color[jj6+1][jj8]:=Color[jj6][jj8]:
          fi:
          if jj8 > abs(Knot[jj6])+1 then
            Color[jj6+1][jj8]:=Color[jj6][jj8]:
          fi:
        od:
    else                                
                                # The case braid word element is < 0
      for jj8 from 1 to brind do
        if jj8 = abs(Knot[jj6]) then
          Color[jj6+1][jj8]:=Ginv[Color[jj6][jj8], Color[jj6][jj8+1]]:
        fi;
        if jj8 = abs(Knot[jj6])+1 then
          Color[jj6+1][jj8]:=Color[jj6][jj8-1]:
        fi;
        if jj8 < abs(Knot[jj6]) then
          Color[jj6+1][jj8]:=Color[jj6][jj8]:
        fi:
        if jj8 > abs(Knot[jj6])+1 then
          Color[jj6+1][jj8]:=Color[jj6][jj8]:
        fi:
      od:
    fi:
  od:                                                 # closes jj6.

                                                  # Finding if the colors match.
  ColorDiff0:=evalm(Color[1]-Color[nops(Knot)+1]);
  ColDiffMatch0:=sum(abs(ColorDiff0[jj]),jj=1..brind);
                      # This is zero iff the top color vec matches the bottom.
  if ColDiffMatch0 =0 then
     for facecolors from 0 to  (quandleorder-1) do
       SST2contri:=0;                                # State-sum contributions.
       SST3contri:=0;     
        for precolorface from 1 to (nops(Knot)+1) do  
        
           Facecolors[precolorface][0]:=facecolors:

       od;
       for nowcolor from 1 to nops(Knot) do
      
           for colcoloring from 0 to (abs(Knot[nowcolor])-1) do  
               Facecolors[nowcolor][colcoloring+1]:=Quandle[Facecolors[nowcolor][colcoloring],Color[nowcolor][colcoloring+1]]:
           od:
       od:
       for s from 1 to nops(Knot) do
           if  Knot[s] > 0 then
               SST3contri:= SST3contri + co3Solutions[Facecolors[s][abs(Knot[s])-1],Color[s][abs(Knot[s])], Color[s][abs(Knot[s])+1] ] :
           else
               SST3contri:=SST3contri -co3Solutions[Facecolors[s][abs(Knot[s])-1],
                           Color[s+1][abs(Knot[s])], Color[s+1][abs(Knot[s])+1] ] :
           fi:
       od:                          # Closing the state-sum term, for s.                             
    SST3coc:=SST3coc + u^(Rem(SST3contri,Apolym,t) mod p);
    od:     
                          #closes facecolors  

    for s from 1 to nops(Knot) do
           if  Knot[s] > 0 then
               SST2contri:= SST2contri + co2Solutions[Color[s][abs(Knot[s])],Color[s][abs(Knot[s])+1] ] :
           else
               SST2contri:=SST2contri -co2Solutions[Color[s+1][abs(Knot[s])],Color[s+1][abs(Knot[s])+1] ] :
           fi:
    od:
    SST2coc:=SST2coc + u^(Rem(SST2contri,Apolym,t) mod p);
 fi;                                              
od:                                     # Closing indx loop (one color here at a time, for indx).
return(SST2coc,SST3coc);
else
print("Invalid cocycles");
return;
fi;
end:
 

The next procedure returns true or fale if the given character, charstar, is the * character or not. This is needed for the next procedure in generating the filenames automatically. 

> ismult:=proc(charstar)
if charstar="*" then
 return true;
else
return false;
fi;
end:
 

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 convention is as follows: Z_pmod(polym)2cocinv_n_b.txt or Z_pmod(polym)3cocinvm1_m2_a3.txt. 

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 the input parameters are as described above; however, numberofKnots is how far through Livingstons table of knots you wish to calculate. This is currently not includeed in the filename. This leads to potential for error. For example, using the same quandle and cocycles with a different number of knots will result in on file being overwritten. This may be fixed later. i had intended this to run through all 2977 prime knots, but decided that adding this bound may be better. This procedure will only calculae the value of the invariant if the Gcd(polym,delta(Knot))<>1; otherwise there are only the trivial colorings.  

> Calcinvars:=proc(filePATH,p ,polym,n,b,m1,m2,a3,numberofKnots)
local i,HH,tmpfilename1,tmpfilename2,tmpfilename3,tmpf1,tmpf2,tmpf3,INVARS;
 

> tmpfilename1:=cat(filePATH,Z_,p,m,o,d,"(",convert(eval(polym),string),")",2,cocinv,n,_,b,".",txt);
 

> tmpfilename2:=cat(filePATH,Z_,p,m,o,d,"(",convert(eval(polym),string),")",3,cocinv,m1,_,m2,_,a3,".",txt);
tmpfilename1:=StringTools[Remove](ismult,tmpfilename1);
tmpfilename2:=StringTools[Remove](ismult,tmpfilename2);
 

> print(tmpfilename1);
 

> print(tmpfilename2);
 

> tmpf1:=fopen(tmpfilename1,WRITE);
 

> tmpf2:=fopen(tmpfilename2,WRITE);
 

>
 

>
 

> fprintf(tmpf1,"Mochizuki 2-cocycle invariants for Alexander Quandles\n");
 

> fprintf(tmpf2,"Mochizuki 3-cocycle invariants for Alexander Quandles\n");
 

> fprintf(tmpf1,"2-cocycle formula f(x,y)=(x-y)^%d^%d *y^%d \n",p,n,b);
 

> fprintf(tmpf2,"3-cocycle formula f(x,y,z)=(x-y)^%d^%d *(y-z)^%d^%d *z^%d\n",p,m1,p,m2,a3);
 

>
 

> fprintf(tmpf1,"Alexander Quandle %s\n",cat(Z_,p,"[t^1,t^-1]","/","(",convert(eval(polym),string),")"));
 

> fprintf(tmpf2,"Alexander Quandle %s\n",cat(Z_,p,"[t^1,t^-1]","/","(",convert(eval(polym),string),")"));
 

>
 

>
 

>
 

>
 

> #HH:=ssystem(date):HH[2];
 

>
 

> #fprintf(tmpf1,"Generated %s\n",HH[2]);
 

> #fprintf(tmpf2,"Generated %s\n",HH[2]);
 

>
 

> for i from 0 to  numberofKnots do
 

>
 

> #for i from 0 to 14 do
 

>
 

> if Gcd(polym,Knot[i,3]) mod p <>1 then
 

> #Invariants2_3Mochizuki:=proc(Xpolym,Apolym,p,m1,m2,a3,n1,b2,Knot)
 

> INVARS:=Invariants2_3Mochizuki(polym,polym,p,m1,m2,a3,n,b,Knot[i,2]):
 

> fprintf(tmpf1,"%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(INVARS[1],string));
 

> 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(INVARS[2],string));
 

>
 

>
 

> #printf("%s\t%s\n%s\n",convert(Knot[i,1],string),convert(Knot[i,2],string),convert(INVARS[1],string));
 

> # printf("%s\t%s\n%s\n",convert(Knot[i,1],string),convert(Knot[i,2],string),convert(INVARS[2],string));
 

>
 

> fi;
 

>
 

> od:
 

>
 

>
 

> #HH:=ssystem(date):HH[2];
 

>
 

> #fprintf(tmpf1,"Generated %s\n",HH[2]);
 

> #fprintf(tmpf2,"Generated %s\n",HH[2]);
 

>
 

> fclose(tmpf1);
 

> fclose(tmpf2);
 

> fclose(tmpf3);
 

>
 

> end:
 

This procedure will calculate the 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. 

> MochizukiDihedral3coc:=proc(p)
local i,j,k,f, qsize, Quandle,Xelements,temp, tempcheck;
option remember;

f:=array(0..(p-1),0..(p-1),0..(p-1));
for i from 0 to (p-1) do
 for j from 0 to (p-1) do
  for k from 0 to (p-1) do
f[i,j,k]:=((i-j)*((2*k^p-j^p)-(2*k-j)^p)/p) mod p;

od:od:
od:

return(f);
end:   
 

This procedure 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 argument that is the cocycle table.
Since these values  are in Z_p we can use the same program and just pass the 3-cocycle values from MochizukiDihedral3coc().
 

> calc3cocInvar:=proc(Quandle,Knot,m::posint)
#Procedure to calculate the state sum term for a knot
#Input: (1) A quandle.
#       (2) A knot represented as a list in braid word form.
#       (3) The modulus.
#       (4) Optional. The solutions to the 3-cocycle conditions.
#           note:No error testing is done. The user must make sure
#                 the solutions were calculated from the same quandle
#                 and modulus.
#Output: The state sum of the knot.
local SST,SSTcontri,jj3,jj5,jj6,jj8,s,num,Color,brind,
     indx,ColDiffMatch0,ColorDiff0,Ginv,quandleorder,        
     coSolutions,Facecolors,facecolors,
     precolorface,nowcolor,colcoloring;
SST:=0;

quandleorder:=quandlesize(Quandle);

if nargs<4 then
 coSolutions:=co3Solution(Quandle,m);
else
 coSolutions:=args[4];
fi;
  
Ginv:=makeinv(Quandle);
brind:=max(op(map(x->abs(x),Knot)))+1;

for jj3 from 1 to (nops(Knot)+1) do                # Color vectors.
    Color[jj3]:=array(1..brind):
    Facecolors[jj3]:=array(0..brind-1):
od;
num:=quandleorder^brind;                                        #number of possible colorings

for indx from 0 to (num-1) do                          # One color at a time.
  for jj5 from 1 to brind do
     Color[1][jj5]:=iquo(indx,quandleorder^(jj5-1)) mod quandleorder:
  od:

  for jj6 from 1 to nops(Knot) do                # Computing all color vectors.
    if Knot[jj6] > 0 then                        #The case when braid word element is >0
        for jj8 from 1 to brind do
          if jj8 = abs(Knot[jj6]) then
            Color[jj6+1][jj8]:= Color[jj6][jj8+1]:
          fi:
          if jj8 = abs(Knot[jj6])+1 then
            Color[jj6+1][jj8]:=Quandle[Color[jj6][jj8-1],Color[jj6][jj8]] :
          fi:
          if jj8 < abs(Knot[jj6]) then
            Color[jj6+1][jj8]:=Color[jj6][jj8]:
          fi:
          if jj8 > abs(Knot[jj6])+1 then
            Color[jj6+1][jj8]:=Color[jj6][jj8]:
          fi:
        od:
    else                                
                                # The case braid word element is < 0
      for jj8 from 1 to brind do
        if jj8 = abs(Knot[jj6]) then
          Color[jj6+1][jj8]:=Ginv[Color[jj6][jj8], Color[jj6][jj8+1]]:
        fi;
        if jj8 = abs(Knot[jj6])+1 then
          Color[jj6+1][jj8]:=Color[jj6][jj8-1]:
        fi;
        if jj8 < abs(Knot[jj6]) then
          Color[jj6+1][jj8]:=Color[jj6][jj8]:
        fi:
        if jj8 > abs(Knot[jj6])+1 then
          Color[jj6+1][jj8]:=Color[jj6][jj8]:
        fi:
      od:
    fi:
  od:                                                 # closes jj6.

                                                  # Finding if the colors match.
  ColorDiff0:=evalm(Color[1]-Color[nops(Knot)+1]);
  ColDiffMatch0:=sum(abs(ColorDiff0[jj]),jj=1..brind);
                      # This is zero iff the top color vec matches the bottom.
  if ColDiffMatch0 =0 then
#The braid has a valid coloring so every possible color will contribute to the state sum.
     for facecolors from 0 to  (quandleorder-1) do
       SSTcontri:=0;      # State-sum contributions.
     
       for precolorface from 1 to (nops(Knot)+1) do  
        
           Facecolors[precolorface][0]:=facecolors:

       od;
for nowcolor from 1 to nops(Knot) do
      
        for colcoloring from 0 to (abs(Knot[nowcolor])-1) do  
         Facecolors[nowcolor][colcoloring+1]:=Quandle[Facecolors[nowcolor][colcoloring],Color[nowcolor][colcoloring+1]]:
     
 od:

    od:
    for s from 1 to nops(Knot) do
      if  Knot[s] > 0 then
       SSTcontri:= SSTcontri +
coSolutions[Facecolors[s][abs(Knot[s])-1],Color[s][abs(Knot[s])], Color[s][abs(Knot[s])+1] ] :
      else
         SSTcontri:=SSTcontri -
coSolutions[Facecolors[s][abs(Knot[s])-1],Color[s+1][abs(Knot[s])], Color[s+1][abs(Knot[s])+1] ] :
      fi:
    od:                                         # Closing the state-sum term, for s.
    




    SST:=SST + u^(map( z -> z mod m,  SSTcontri  ) ):
od: #closes facecolors  
fi:                                                 # Closing the ColDiffMatch
od:                                                 # Closing indx loop (one color here at a time, for indx).
return(SST);
end:
 

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)3cocinv.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 quandle and cocycle chosen.  Most of the input parameters are as described above; however, numberofKnots is how far through Livingstons table of knots you wish to calculate. This is currently not includeed in the filename. This leads to potential for error. For example, using the same quandle and cocycles with a different number of knots will result in on file being overwritten. This may be fixed later. I had intended this to only run through all 2977 prime knots, but decided that adding a bound may be better. 

 

> CalcDihinvars:=proc(filePATH,p,numberofKnots)
local i,HH,tmpfilename1,tmpf1,Mcocycles,INVAR,polym;
 

> polym:=t+1;
Mcocycles:=MochizukiDihedral3coc(p);

tmpfilename1:=cat(filePATH,Dih_Z_,p,m,o,d,"(",convert(eval(polym),string),")",3,cocinv,".",txt);
 

> tmpfilename1:=StringTools[Remove](ismult,tmpfilename1);

 

> print(tmpfilename1);
 

>
 

> tmpf1:=fopen(tmpfilename1,WRITE);
 

>
 

> fprintf(tmpf1,"Mochizuki 3-cocycle invariants for Alexander Quandles\n");
 

>
 

> fprintf(tmpf1,"3-cocycle formula f(x,y,z)=(x-y)[(2z^%d -j^%d)-(2z-y)^%d]/%d\n",p,p,p,p);
 

>
 

> fprintf(tmpf1,"Alexander Quandle %s\n",cat(Z_,i,"[t^1,t^-1]","/","(",convert(eval(polym),string),")"));
 

>
 

>
 

>
 

>
 

>
 

> #HH:=ssystem(date):HH[2];
 

>
 

> #fprintf(tmpf1,"Generated %s\n",HH[2]);
 

> #fprintf(tmpf2,"Generated %s\n",HH[2]);
 

>
 

> for i from 0 to  numberofKnots do
#for i from 0 to 14 do
 

>
 

>
 

> INVAR:=calc3cocInvar(AlexQuandle(polym,p),Knot[i,2],p,Mcocycles);
 

>
 

> fprintf(tmpf1,"%s\t%s\t%s\n\n",convert(Knot[i,1],string),convert(Knot[i,2],string),convert(INVAR,string));
 

>
 

>
 

>
 

> # printf("%s\t%s\t%s\n\n",convert(Knot[i,1],string),convert(Knot[i,2],string),convert(INVAR,string));
 

> # printf("%s\t%s\n%s\n",convert(Knot[i,1],string),convert(Knot[i,2],string),convert(INVARS[2],string));
 

>
 

>
 

>
 

> od:
 

>
 

>
 

> #HH:=ssystem(date):HH[2];
 

>
 

> #fprintf(tmpf1,"Generated %s\n",HH[2]);
 

> #fprintf(tmpf2,"Generated %s\n",HH[2]);
 

>
 

> fclose(tmpf1);
 

>
 

>
 

> end:
 

>
 

> save Calcinvars,ismult,Invariants2_3Mochizuki,findgood3cocexp,Invar2Mochizuki,cocycle2check,Mochizuki2coc,
Xi,TableInvars,Invar3Mochizuki,makeinv,cocycle3check,Mochizuki3coc, MochizukiDihedral3coc,calc3cocInvar,
CalcDihinvars, "J:\\SaitoGood_7_22_05\\PolycocInvpkg.m";
 

>