Once[<<KnotTheory`]

χ[cond_]:=If[TrueQ[cond],1,0];

ℰ_//m[i_,j_->k_]:=Expand[Expand[ℰ]/.(Subscript[e, r_,s_,t_])[i](Subscript[e, u_,v_,w_])[j]:>χ[t==v](((-1))^(u(s+t)))(Subscript[e, (r+u)~Mod~2,s,w])[k]]

KBasis[{i_}]:={(Subscript[e, 0,0,0])[i],(Subscript[e, 0,0,1])[i],(Subscript[e, 0,1,0])[i],(Subscript[e, 0,1,1])[i],(Subscript[e, 1,0,0])[i],(Subscript[e, 1,0,1])[i],(Subscript[e, 1,1,0])[i],(Subscript[e, 1,1,1])[i]}
KBasis[{i_,is__}]:=Flatten@Outer[Times,KBasis[{i}],KBasis[{is}]]

η[i_]:=(Subscript[e, 0,0,0])[i]+(Subscript[e, 0,1,1])[i];
γ[i_]:=(Subscript[e, 1,0,0])[i]+(Subscript[e, 1,1,1])[i];

KBasis[{3}]

MatrixForm[Table[p q//m[1,2->3],
{p,{η[1]}~Join~KBasis[{1}]},{q,{η[2]}~Join~KBasis[{2}]}
] /. {(Subscript[e, 0,0,0])[3]->a,(Subscript[e, 0,0,1])[3]->b,(Subscript[e, 0,1,0])[3]->c,(Subscript[e, 0,1,1])[3]->d,(Subscript[e, 1,0,0])[3]->ka,(Subscript[e, 1,0,1])[3]->kb,(Subscript[e, 1,1,0])[3]->kc,(Subscript[e, 1,1,1])[3]->kd}]

lhs=η[1]KBasis[{2}]//Expand//m[1,2->1]
lhs==KBasis[{1}]

lhs=η[2]KBasis[{1}]//Expand//m[1,2->1]
lhs==KBasis[{1}]

Short[lhs=KBasis[{1,2,3}]//m[1,2->1]//m[1,3->1]]
rhs=KBasis[{1,2,3}]//m[2,3->2]//m[1,2->1];
lhs==rhs

R[i_,j_]:=(Subscript[e, 0,0,0])[i](Subscript[e, 0,0,0])[j]+(Subscript[e, 0,1,1])[i](Subscript[e, 0,0,0])[j]+T (Subscript[e, 0,0,0])[i](Subscript[e, 0,1,1])[j]-(1- T)(Subscript[e, 1,1,0])[i](Subscript[e, 1,0,1])[j]-T (Subscript[e, 0,1,1])[i](Subscript[e, 0,1,1])[j]

Short[lhs=R[1,2]R[4,3]R[5,6]//Expand//m[1,4->1]//m[2,5->2]//m[3,6->3]]
rhs=R[2,3]R[1,4]R[5,6]//Expand//m[1,5->1]//m[2,6->2]//m[3,4->3];
lhs==rhs

(OverBar[R])[i_,j_]:=(Subscript[e, 0,0,0])[i](Subscript[e, 0,0,0])[j]+(Subscript[e, 0,1,1])[i](Subscript[e, 0,0,0])[j]+(T^(-1))(Subscript[e, 0,0,0])[i](Subscript[e, 0,1,1])[j]-(1-(T^(-1)))(Subscript[e, 1,1,0])[i](Subscript[e, 1,0,1])[j]-(T^(-1)) (Subscript[e, 0,1,1])[i](Subscript[e, 0,1,1])[j]

lhs=R[1,2](OverBar[R])[3,4]//m[1,3->1]//m[2,4->2]
rhs=η[1]η[2]//Expand;
lhs==rhs

lhs=R[1,2](OverBar[R])[3,4]//Expand//m[1,3->1]//m[4,2->2];
rhs=η[1]η[2]//Expand;
Simplify[lhs-rhs]

lhs=R[1,4](OverBar[R])[5,2]γ[3]//Expand//m[2,4->2]//m[1,3->1]//m[1,5->1]
rhs=γ[1]η[2]//Expand;
lhs==rhs

RVK and Z

RVK, rot, Z modified from 2016-09/OneSmidgen.nb. See also in AP/Projects/SL2Invariant/.

Some details of the code below are at http://drorbn.net/bbs/show?shot=Dror-160920-151350.jpg.

RVK::usage="RVK[xs, rots] represents a Rotational Virtual Knot with a list of n Xp/Xm crossings xs and a length 2n list of rotation numbers rots. Crossing sites are indexed 1 through 2n, and rots[[k]] is the rotation between site k-1 and site k. RVK is also a casting operator converting to the RVK presentation from other knot presentations.";

RVK[pd_PD]:=Module[{n,xs,x,rots,front={0},k},
n=Length@pd;rots=Table[0,{2n}];
xs=Cases[pd,x_X:>(Piecewise[{{Xp[x[[4]],x[[1]]], PositiveQ@x}, {Xm[x[[2]],x[[1]]], True}}])];
For[k=0,k<2n,++k,If[k==0∨FreeQ[front,-k],
front=Flatten@Replace[front,k->(xs/.{
Xp[k+1,l_]|Xm[l_,k+1]:>{l,k+1,1-l},
Xp[l_,k+1]|Xm[k+1,l_]:>(++rots[[l]];{1-l,k+1,l}),
_Xp|_Xm:>{}
}), {1}],
Cases[front,k|-k]/.{k,-k}:>--rots[[k+1]];
]];
RVK[xs,rots] ];
RVK[K_]:=RVK[PD[K]];

Kink[i_]:=Kink[i]=R[1,3]γ[2]//m[1,2->1]//m[1,3->i];
(OverBar[Kink])[i_]:=(OverBar[Kink])[i]=(OverBar[R])[1,3]γ[2]//m[1,2->1]//m[1,3->i];

rot[i_,n_]:=(Piecewise[{{η[i], EvenQ[n]}, {γ[i], OddQ[n]}}])

Z[K_] := Z[RVK@K];
Z[rvk_RVK] := Module[{todo,n,rots,ζ,done,st,cx, ζ1, i,j,k,k1,k2,k3},
{todo,rots}=List@@rvk;
AppendTo[rots,0];
n=Length[todo];
ζ=η[0];
done={0};
st=Range[0,2n+1];
While[{}=!=todo,
{cx}=MaximalBy[todo, Length[done⋂{#[[1]], #[[2]], #[[1]]-1,#[[2]]-1}]&,1];
{i,j}=List@@cx;
ζ1=Switch[Head[cx],
 Xp, (R[i,j](OverBar[Kink])[k])//m[j,k->j],
 Xm, ((OverBar[R])[i,j]Kink[k])//m[j,k->j]
];
ζ1=(rot[k,rots[[i]]]ζ1)//m[k,i->i]; rots[[i]]=0;
ζ1=(ζ1 rot[k, rots[[i+1]]])//m[i,k->i]; rots[[i+1]]=0;
ζ1=(rot[k,rots[[j]]]ζ1)//m[k,j->j]; rots[[j]]=0;
ζ1=(ζ1 rot[k, rots[[j+1]]])//m[j,k->j]; rots[[j+1]]=0;
ζ*=ζ1;
If[MemberQ[done, i], ζ=ζ//m[i,i+1->i]; st=st/.st[[i+2]]->st[[i+1]]];
If[MemberQ[done, i-1],  ζ=ζ//m[st[[i]],i->st[[i]]]; st=st/.st[[i+1]]->st[[i]]]; 
If[MemberQ[done, j],  ζ=ζ//m[j,j+1->j]; st=st/.st[[j+2]]->st[[j+1]]]; 
If[MemberQ[done, j-1],  ζ=ζ//m[st[[j]],j->st[[j]]]; st=st/.st[[j+1]]->st[[j]]];
done=done⋃{i-1,i,j-1,j};
todo=DeleteCases[todo, cx]
];
Factor@ζ
]

K=Knot[8,17]; Alexander[K][T]
Z[K]