> # Cocycle invariants for 4-cycles of S_4 > clear: > with(group): > with(LinearAlgebra): > > tr:=array(1..6): > tr[1]:=[[1,2,3,4]]: rt([[1,2,3,4]]):=1: > tr[2]:=[[1,2,4,3]]: rt([[1,2,4,3]]):=2: > tr[3]:=[[1,3,2,4]]: rt([[1,3,2,4]]):=3: > tr[4]:=[[1,3,4,2]]: rt([[1,3,4,2]]):=4: > tr[5]:=[[1,4,2,3]]: rt([[1,4,2,3]]):=5: > tr[6]:=[[1,4,3,2]]: rt([[1,4,3,2]]):=6: > > # Forming cocycle. > f:=array(1..6,1..6): > > # Quandle cocycle conditions. > for i from 1 to 6 do > f[i,i]:=0 : > od: > > # Cocycle values specified from earlier experiments. > assign(f[3,5] = 1, f[4,6] = 0, f[3,6] = 0, f[4,3] = 0, f[4,5] = 0, f[5,2]=1): > > assign(f[1,5] = 1, f[6,3] = 1, f[2,1] = 1, f[2,4] = 1, f[1,6] = 1, f[4,2] = 1, f[6,1] = 1, f[5,3] = 1, f[3,2] = 1, f[6,2] = 1, f[1,3] = 3, f[3,1] = 1, f[6,5] = 1, f[2,5] = 2, f[2,3] = 0, f[5,6] = 1, f[5,4] = 0, f[2,6] = 3, f[6,4] = 0, f[5,1] = 2, f[4,1] = 0, f[1,2] = 1, f[1,4] = 0, f[3,4] = 0): > > > # Defining quandle operation. > g:=proc(a, b) # Quandle operation. > rt( mulperms( mulperms( tr[b], tr[a] ), invperm(tr[b]) ) ): end: > > ginv:=proc(c, d) > rt( mulperms( mulperms( invperm(tr[d]), tr[c] ), tr[d] ) ): end: > > # Defining 2-cocy equations. > for x from 1 to 6 do > for y from 1 to 6 do > for z from 1 to 6 do > E[x,y,z]:= f[x,y] + f[g(x,y),z] - f[x,z] - f[g(x,z),g(y,z)]: > od: od: od: > > # Defining the set of equations. > EQ:=[]: > for x from 1 to 6 do > for y from 1 to 6 do > for z from 1 to 6 do > EQ:=[ op(EQ), E[x,y,z]=0 ] : > od: od: od: > Eq:=convert(EQ, set): # Converting the list EQ to a set Eq. > print( map( z -> z mod 4, Eq)); # Prints the equation, but if the cocycle > # is specified, it should print {0}={0}. > > > > # Solving the cocycle conditions: > # Un# the following to solve the cocycle conditions. > #VAR:=[]: # Defining the list of variables. > #nassign('q'): > #unassign('i'): > #for i from 1 to 20 do # Make enough free variables. > #VAR:=[ op(VAR), q[i] ] : > #od: > #Var:=convert(VAR, set): # Converting the list to a set. > #Sol:=msolve(Eq, Var, 4); # Sol is the set of solutions. > {0 = 0} > # Braid words of the knot table, brind is the braid index. > # 3-colorable ones renumbered. 5 braids excluded. > bw[1]:= [1,1,1]: brind[1]:=2: #3_1 > #bw[2]:= [1,-2,1,-2]: brind[2]:=3: #4_1 > #bw[3]:= [1,1,1,1,1]: brind[3]:=2: #5_1 > #bw[4]:= [1,1,2,2,-1,2]: brind[4]:=3: #5_2 > #bw[5] > bw[2]:= [-1,2,-1,3,-2,3,2]: brind[2]:=4: #brind[5]:=4: #6_1 > #bw[6]:= [-1,2,-1,2,2,2]: brind[6]:=3: > #bw[7]:= [-1,2,2,-1,-1,2]: brind[7]:=3: #6_3 > #bw[8]:= [1,1,1,1,1,1,1]: brind[8]:=2: #7_1 > #bw[9]:= [-1,3,3,3,2,1,1,-3,2]: brind[9]:=4: > #bw[10]:= [1,1,2,-1,2,2,2,2]: brind[10]:=3: > #bw[11] > bw[3]:= [1,1,2,3,3,-1,2,-3,2]: brind[3]:=4: > #bw[12]:= [1,1,1,1,2,-1,2,2]: brind[12]:=3: > #bw[13]:= [1,-2,-1,-1,3,2,2,2,3]: brind[13]:=4: > #bw[14] > bw[4]:= [1,-3,2,-3,2,-1,2,-3,2]: brind[4]:=4: #7_7 > #bw[15]:= [-1,2,3,-2,-1,4,4,3,2,-4]: brind[15]:=5: #8_1 > #bw[16]:= [-1,2,2,2,2,2,-1,2]: brind[16]:=3: > #bw[17]:= [-1,-1,-2,1,4,4,3,-4,-2,3]: brind[17]:=5: > #bw[18]:= [1,1,1,3,-2,-3,-3,1,-2]: brind[18]:=4: > #bw[19] > bw[5]:= [1,1,1,-2,1,1,1,-2]: brind[5]:=3: #8_5 > #bw[20]:= [-1,2,-1,-3,2,2,2,3,3]: brind[20]:=4: > #bw[21]:= [1,1,1,1,-2,-2,1,-2]: brind[21]:=3: > #bw[22]:= [-1,2,1,1,-3,2,2,-3,-3]: brind[22]:=4: > #bw[23]:= [-1,2,-1,-1,-1,2,2,2]: brind[23]:=3: > #bw[24] > bw[6]:= [-1,2,2,-1,-1,2,2,2]: brind[6]:=3: #8_10 > #bw[25] > bw[7]:= [-1,2,2,-3,2,3,3,-1,2]: brind[7]:=4: > #bw[26]:= [1,-2,3,-4,3,-4,2,1,-3,-2]: brind[26]:=5: > #bw[27]:= [1,1,2,-3,2,-1,-3,-3,2]: brind[27]:=4: > #bw[28]:= [1,1,2,2,-1,-3,2,-3,2]: brind[28]:=4: > #bw[29] > bw[8]:= [1,1,-2,1,3,3,2,2,3]: brind[8]:=4: #8_15 > #bw[30]:= [1,1,-2,1,1,-2,1,-2]: brind[30]:=3: > #bw[31]:= [-1,2,-1,2,2,-1,-1,2]: brind[31]:=3: > #bw[32] > bw[9]:= [1,-2,1,-2,1,-2,1,-2]: brind[9]:=3: > #bw[33] > bw[10]:= [1,2,1,2,1,2,2,1]: brind[10]:=3: > #bw[34] > bw[11]:= [1,1,1,2,-1,-1,-1,2]: brind[11]:=3: #8_20 > #bw[35] > bw[12]:= [1,-2,-2,1,1,2,2,2]: brind[12]:=3: #8_21 > #bw[36] > bw[13]:= [1,1,1,1,1,1,1,1,1]: brind[13]:=2: #9_1 > #bw[37] > ##### 5: bw[14]:= [1,2,3,4,4,4,3,-4,2,1,-3,-2]: brind[14]:=5: > #bw[38]:= [1,-2,1,1,1,1,1,1,2,2]: brind[38]:=3: > #bw[39] > bw[14]:= [-1,3,2,1,1,2,3,3,3,3,-2]: brind[14]:=4: > #bw[40]:= [1,1,2,-1,3,-2,3,4,4,3,-4,2]: brind[40]:=5: #9_5 > #bw[41] > bw[15]:= [1,1,2,2,1,1,1,1,1,-2]: brind[15]:=3: > #bw[42]:= [1,1,1,2,3,3,-1,2,2,2,-3]: brind[42]:=4: > #bw[43]:= [1,-2,3,-1,-1,-4,3,-2,3,3,4,3]: brind[43]:=5: > #bw[44]:= [1,1,1,-2,1,1,1,1,2,2]: brind[44]:=3: > #bw[45] > bw[16]:= [-1,2,1,1,2,2,2,-3,2,3,3]: brind[16]:=4: #9_10 > #bw[46] > bw[17]:= [-1,2,-3,2,-1,2,2,2,2,3,2]: brind[17]:=4: > #bw[47]:= [1,-2,-1,-1,3,2,2,2,4,4,3,-4]: brind[47]:=5: > #bw[48]:= [1,1,2,-3,2,-1,3,3,2,2,2]: brind[48]:=4: > #bw[49]:= [1,4,4,-3,2,-3,2,-3,-1,-4,2,2,3,-2]: brind[49]:=5: > #bw[50] > #### 5: bw[19]:= [1,-2,1,3,-2,4,-3,4,4,3]: brind[19]:=5: #9_15 > #bw[51] > bw[18]:= [1,1,-2,1,1,1,2,2,2,2]: brind[18]:=3: > #bw[52] > bw[19]:= [1,1,1,3,-2,1,-2,-3,-2,1,-2]: brind[19]:=4: > #bw[53]:= [1,1,-3,2,-1,2,2,3,3,2,2]: brind[53]:=4: > #bw[54]:= [1,1,2,-1,-3,-4,-3,2,-3,2,4,-3]: brind[54]:=5: > #bw[55]:= [1,2,2,-3,2,-1,2,-3,2,2,2]: brind[55]:=4: #9_20 > #bw[56]:= [-1,-1,3,-4,3,-2,1,3,4,4,2,2]: brind[56]:=5: > #bw[57]:= [1,-2,3,3,3,-2,3,-1,-2,3,-2]: brind[57]:=4: > #bw[58] > bw[20]:= [1,-2,1,1,2,3,3,3,2,-3,2]: brind[20]:=4: > #bw[59] > bw[21]:= [1,3,3,-2,1,3,-2,-2,-2]: brind[21]:=4: > #bw[60]:= [-1,2,-1,-4,-3,2,4,4,3,4,4,2,2,-3]: brind[60]:=5: #9_25 > #bw[61]:= [-1,2,2,2,3,2,-1,2,-1,-3,2]: brind[61]:=4: > #bw[62]:= [-1,2,-1,-1,-3,2,-1,2,2,3,2]: brind[62]:=4: > #bw[63] > bw[22]:= [1,1,3,3,-2,-2,1,3,-2]: brind[22]:=4: > #bw[64] > bw[23]:= [-1,2,-3,2,-1,2,-3,2,2]: brind[23]:=4: > #bw[65]:= [1,-3,-3,2,-3,-1,2,1,1,-3,2]: brind[65]:=4: #9_30 > #bw[66]:= [-1,2,2,-3,2,2,-1,2,3,-1,2]: brind[66]:=4: > #bw[67]:= [-1,2,3,-1,2,-1,3,3,2,-3,2]: brind[67]:=4: > #bw[68]:= [-1,-1,-1,2,-1,2,2,3,1,-2,3]: brind[68]:=4: > #bw[69] > bw[24]:= [1,-2,3,-2,1,-2,3,1,-2]: brind[24]:=4: > #bw[70] > ##### 5: bw[27]:= [1,3,3,-4,-2,1,2,3,3,2,-3,4,-3,2]: brind[27]:=5: #9_35 > #bw[71]:= [-1,2,2,2,-3,2,3,3,-1,2,3]: brind[71]:=4: > #bw[72] > ##### 5: bw[28]:= [1,-2,3,-2,3,-1,4,-3,-2,4,3,-2]: brind[28]:=5: > #bw[73] > bw[25]:= [1,1,2,3,3,2,2,-1,2,-3,2]: brind[25]:=4: > #bw[74]:= [-1,-3,2,4,3,3,-1,2,2,3,4,-2]: brind[74]:=5: > #bw[75] > bw[26]:= [1,3,-2,3,1,-2,1,3,-2]: brind[26]:=4: #9_40 > #bw[76]:= [-1,2,2,-4,3,-4,-2,1,-3,2,3,-4,3,2]: brind[76]:=5: > #bw[77]:= [1,1,1,3,-2,3,-1,-1,-2]: brind[77]:=4: > #bw[78]:= [1,2,1,1,2,2,3,-2,1,-2,-3]: brind[78]:=4: > #bw[79]:= [-1,2,-1,3,-2,3,2,2,-3]: brind[79]:=4: > #bw[80]:= [1,-2,1,3,2,2,2,3,-2]: brind[80]:=4: #9_45 > #bw[81] > bw[27]:= [1,3,2,-1,-3,2,1,3,-2]: brind[27]:=4: > #bw[82] > bw[28]:= [-1,2,3,-1,2,-1,2,3,2]: brind[28]:=4: > #bw[83] > bw[29]:= [1,1,-2,3,2,2,-1,-3,2,-3,2]: brind[29]:=4: > #bw[84]:= [1,1,2,2,3,2,-1,2,2,3,-2]: brind[84]:=4: #9_49 > > > for KT from 1 to 29 do # KT is the number in the Knot Table. Up to 84. > > print(Knot, KT); > > # Setting up the state-sum terms. > #SST:= [ ] : # This is for the multiset version. > SST:=0: # This is for state-sum form. > > # Color vectors. > for jj3 from 1 to (nops(bw[KT])+1) do > Color[jj3]:=array(1..brind[KT]): > preColor[jj3]:=array(1..brind[KT]): > od: > > # Producing all color vectors. > num:=6^(brind[KT]) : > for indx from 0 to (num-1) do # One color at a time. > > for jj5 from 1 to brind[KT] do > preColor[1][jj5]:=iquo(indx,6^(jj5-1)) mod 6: > # This produce all vecs in 0 thru 5, and the below shifts it to 1 thru 6. > Color[1][jj5]:=preColor[1][jj5] + 1: > od: > > # Computing all color vectors. > for jj6 from 1 to nops(bw[KT]) do > > if bw[KT][jj6] > 0 then # If the crossing is positive: > > for jj8 from 1 to brind[KT] do > if jj8 = abs(bw[KT][jj6]) then > Color[jj6+1][jj8]:=Color[jj6][jj8+1]: > fi: > if jj8 = abs(bw[KT][jj6])+1 then > Color[jj6+1][jj8]:=g(Color[jj6][jj8-1],Color[jj6][jj8]) : > fi: > if jj8 < abs(bw[KT][jj6]) then > Color[jj6+1][jj8]:=Color[jj6][jj8]: > fi: > if jj8 > abs(bw[KT][jj6])+1 then > Color[jj6+1][jj8]:=Color[jj6][jj8]: > fi: > od: > > else # If negative: > > for jj8 from 1 to brind[KT] do > if jj8 = abs(bw[KT][jj6]) then > Color[jj6+1][jj8]:=ginv(Color[jj6][jj8+1],Color[jj6][jj8]): > fi: > if jj8 = abs(bw[KT][jj6])+1 then > Color[jj6+1][jj8]:=Color[jj6][jj8-1]: > fi: > if jj8 < abs(bw[KT][jj6]) then > Color[jj6+1][jj8]:=Color[jj6][jj8]: > fi: > if jj8 > abs(bw[KT][jj6])+1 then > Color[jj6+1][jj8]:=Color[jj6][jj8]: > fi: > od: > > > fi: > od: > > > SSTcontri:=0: > # State-sum contributions. > > # Finding if the colors match. > ColorDiff0:=evalm(Color[1]-Color[nops(bw[KT])+1]); > ColDiffMatch0:=sum(abs(ColorDiff0[jj]),jj=1..brind[KT]); > # This is zero iff the top color vec matches the bottom. > > > if ColDiffMatch0 =0 then > > for s from 1 to nops(bw[KT]) do > > if (bw[KT][s])>0 then > > SSTcontri:= SSTcontri + > f[Color[s][abs(bw[KT][s])], Color[s][abs(bw[KT][s])+1] ] : > > else > > SSTcontri:=SSTcontri - > f[Color[s+1][abs(bw[KT][s])], Color[s][abs(bw[KT][s])] ] : > > fi: > > od: # Closing the state-sum term, for s. > > #SST:=[ op(SST), map( z -> z mod 4, subs(Sol, SSTcontri ) )]: > #SST:=[ op(SST), map( z -> z mod 4, SSTcontri )]: > SST:=SST + u^(map( z -> z mod 4, SSTcontri ) ): > #SST:=SST + u^(map( z -> z mod 4, subs(Sol, SSTcontri ) )): > > fi: # Closing the case when it colors. > > > od: # Closing one color here at a time, for indx. > > > print(SST); > > od: # Closing KT. > Knot, 1 6 + 24 u Knot, 2 3 6 + 24 u Knot, 3 3 6 + 24 u Knot, 4 3 6 + 24 u Knot, 5 2 30 + 24 u Knot, 6 2 30 + 24 u Knot, 7 6 + 24 u Knot, 8 2 30 + 24 u Knot, 9 3 6 + 48 u + 48 u Knot, 10 2 30 + 24 u Knot, 11 2 30 + 24 u Knot, 12 2 30 + 24 u Knot, 13 3 6 + 24 u Knot, 14 6 + 24 u Knot, 15 3 6 + 24 u Knot, 16 6 + 24 u Knot, 17 3 6 + 24 u Knot, 18 2 30 + 24 u Knot, 19 3 6 + 24 u Knot, 20 3 6 + 24 u Knot, 21 2 30 + 24 u Knot, 22 2 30 + 24 u Knot, 23 6 + 24 u Knot, 24 6 + 24 u Knot, 25 3 6 + 24 u Knot, 26 2 6 + 48 u Knot, 27 3 54 + 24 u + 48 u Knot, 28 3 6 + 72 u + 24 u Knot, 29 3 2 6 + 72 u + 48 u >