Pensieve header: Alexander Experiments: Modifying the A Matrix.

SetDirectory["C:\\drorbn\\AcademicPensieve\\Projects\\APAI"];

Once[<<KnotTheory`; <<Rot.m];

As[K_]:=Module[{Cs,φ,n,A,A1,A2,A3,A4,A5,s,i,j,Δ},
{Cs,φ}=Rot[K]; n=Length[Cs];
A5=A4=A3=A2=A1=A=IdentityMatrix[2n+1];
Cases[Cs,{s_,i_,j_}:>(
A[[{i,j},{i+1,j+1}]]+=(({{-(T^s), (T^s)-1}, {0, -1}}));
A1[[{i,j},{i+1,j+1}]]+=(({{-1, (T^s)-1}, {0, -(T^s)}}));
A2[[{i,j},{i+1,j+1}]]+=(({{-1, 0}, {(T^s)-1, -(T^s)}}));
A3[[{i,j},{i+1,j+1}]]+=(({{-1, 0}, {(T^(-s))-1, -(T^(-s))}}));
A4[[{i,j},{i+1,j+1}]]+=(T^(-s))(({{-(T^s), (T^s)-1}, {0, -1}}));
A5[[{i,j},{i+1,j+1}]]+=(({{-(T^s), (T^s)-1}, {0, -1}}));
)];
Δ=(T^((-Total[φ]-Total[Cs[[All,1]]])/2))Det[A];
Factor@{Δ,(Δ^(-1))Det[A1],(Δ^(-1))Det[A2],(Δ^(-1))Det[A3],(Δ^(-1))Det[A4]}
];

As/@AllKnots[{3,6}]//MatrixForm

Eigenvalues[(({{-(T^s), (T^s)-1}, {0, -1}}))]

PAQ[K_]:=Module[{Cs,φ,n,P,A,Q,s,i,j,Δ},
{Cs,φ}=Rot[K]; n=Length[Cs];
P=A=Q=IdentityMatrix[2n+1];
Cases[Cs,{s_,i_,j_}:>(
P[[{i,j},{i,j}]]=(({{-(T^(-s)), (T^(-s))-1}, {0, -1}}));
A[[{i,j},{i+1,j+1}]]+=(({{-(T^s), (T^s)-1}, {0, -1}}));
Q[[{i+1,j+1},{i+1,j+1}]]=(({{1, 0}, {0, 1}}));
)];
Δ=(T^((-Total[φ]-Total[Cs[[All,1]]])/2))Det[A];
Expand@{P,A,Q,P.A.Q}
];

MatrixForm/@PAQ[PD[X[4,2,5,1],X[2,6,3,5],X[6,4,7,3]]]
MatrixForm/@PAQ[Knot[4,1]]

AAs[K_]:=Module[{Cs,φ,n,A,A1,A2,s,i,j,Δ},
{Cs,φ}=Rot[K]; n=Length[Cs];
A2=A1=A=Table[0,{2n+1},{2n+1}];
Cases[Cs,{s_,i_,j_}:>(
A[[{i,j},{i,j,i+1,j+1}]]+=(({{1, 0, -(T^s), (T^s)-1}, {0, 1, 0, -1}})); (* Original *)
A1[[{i,j},{i,j,i+1,j+1}]]+=(({{1, 0, -(T^(-s)), (T^(-s))-1}, {0, 1, 0, -1}})); (* Horizontal mirror *)
A2[[{i,j},{i,j,i+1,j+1}]]+=(({{1, 0, -1, 0}, {0, 1, (T^(-s))-1, -(T^(-s))}})); (* Vertical mirror *)
)];
A2[[2n+1,2n+1]]=A1[[2n+1,2n+1]]=A[[2n+1,2n+1]]=1;
Δ=(T^((-Total[φ]-Total[Cs[[All,1]]])/2))Det[A];
Factor@{Δ,(Δ^(-1))Det[A1],(Δ^(-1))Det[A2]}
];
AAs/@AllKnots[{3,6}]//MatrixForm

(({{-(T^s), (T^s)-1}, {0, -1}}))//Inverse//Simplify//MatrixForm