Pensieve header: Initialization and commons.

Commons

Once[<< KnotTheory`]

MatrixSignature[A_]:=Total[Sign[Select[Eigenvalues[A],Abs[#]>(10^(-12))&]]];
Writhe[K_]:=Sum[If[PositiveQ[x],1,-1], {x,List@@PD@K}];

MatrixSignature/@ {(({{1, 0}, {0, 1}})),(({{1, 0}, {0, -1}})),(({{-1, 0}, {0, -1}}))}