Pensieve header: Knot Signatures as in KnotTheory`. Continues pensieve://Projects/KnotTheory/Testing/.

SetDirectory["C:\\drorbn\\AcademicPensieve\\Projects\\Signatures"];
<< Common.m

Knot Signatures as in KnotTheory`

{\def\nbpdfText#1{\[\includegraphics[width=\linewidth]{#1}\]}

}

KS1[K_]:=Module[{spd,x,a,s=0,c,cs,A,is},
spd=(Times@@PD[K])/.x_X:>If[PositiveQ@x,Xp@@x,Xm@@x];
cs=spd/.{
Xp[i_,j_,k_,l_]:>a[j,++s,i]a[k,++s,-j]a[-l,++s,-k]a[-i,++s,l],Xm[i_,j_,k_,l_]:>a[-j,++s,i]a[k,++s,j]a[l,++s,-k]a[-i,++s,-l]
}//.a[i_,x__,j_]a[j_,y__,k_]:>a[i,x,y,k]/.a[i_,x__,j_]:>a[x];
A=Table[0,{Length[cs]},{Length[cs]}];
Do[is=Position[cs,#][[1,1]]&/@(4i-{3,2,1,0});
A[[is,is]]+=If[Head[spd[[i]]]===Xp,(({{0, 0, 0, 0}, {1, -1, 0, 0}, {0, -1, 0, 1}, {-1, 2, 0, -1}})),(({{1, -1, 0, 0}, {0, 0, 0, 0}, {-2, 1, 1, 0}, {1, 0, -1, 0}}))],
{i,Length[spd]} ];
MatrixSignature[A+A\[Transpose]] ];

KS1[PD@Knot[3,1]]

Total[(KS1[#]==-KnotSignature[#])&/@AllKnots[{3,10}]]

Tristram-Levine

TLS1[K_,ω_]:=Module[{spd,a,s=0,c,cs,A,is},
spd=Times@@PD[K]/.x_X:>If[PositiveQ@x,Xp,Xm]@@x;
cs=spd/.{
Xp[i_,j_,k_,l_]:>(Subscript[a, j,i])[++s](Subscript[a, k,-j])[++s](Subscript[a, -l,-k])[++s](Subscript[a, -i,l])[++s],Xm[i_,j_,k_,l_]:>(Subscript[a, -j,i])[++s](Subscript[a, k,j])[++s](Subscript[a, l,-k])[++s](Subscript[a, -i,-l])[++s]
}//.(Subscript[a, i_,j_])[x__](Subscript[a, j_,k_])[y__]:>(Subscript[a, i,k])[x,y]/.(Subscript[a, __])[x__]:>a[x];
A=Table[0,Length@cs,Length@cs];
Do[is=Position[cs,4i-#][[1,1]]&/@{3,2,1,0};
A[[is,is]]+=If[spd[[i,0]]===Xp,(({{0, 0, 0, 0}, {1, -1, 0, 0}, {0, -1, 0, 1}, {-1, 2, 0, -1}})),(({{1, -1, 0, 0}, {0, 0, 0, 0}, {-2, 1, 1, 0}, {1, 0, -1, 0}}))],
{i,Length[spd]} ];
Total[Sign[Select[
Eigenvalues[(1-ω)A+(1-ω\[Conjugate])A\[Transpose]],Abs[#]>(10^(-6))&]]] ];

Plot[TLS1[Knot@"K12a422",(E^(I t))], {t,0,2π}]

Total[(TLS1[#,-1]==-KnotSignature[#])&/@AllKnots[{3,10}]]

{\red\bf To do.} Alexander in this language.

Done in {\tt AlexanderAsFxF.nb}.