(* This file solves representation *)
(* we have T_0, T_1, T_2, T_3, T_4 adjacent to standard T_0, vec1,..,vec4 are vertices outside   *)  
vec1:={-1, b1, c1, d1}

vec2 := {a2,-1,c2,d2}

vec3:={a3,b3,-1,d3}

vec4:={2, 2, 2, -1}

(* standard vertices of T_0*)

e1:={1,0,0,0}; e2:={0,1,0,0}; e3:={0,0,1,0}; e4:={0,0,0,1}

(* These matrices send T_0 to T_i *)

PA1:=Transpose[{vec1, e2, e3, e4}]

PA2 :=Transpose[{e1, vec2, e3, e4}]

PA3 :=Transpose[{e1,e2, vec3,e4}]

PA4:=Transpose[{e1,e2,e3, vec4}]

PA1

(* We assign some variables ahead... forcing rotations below to fix the edges e_ij, we solve under this assumption*) 
(* alpha12=1, beta12=1 for e12, alpha13=1, gamma13=1 for e13, alpha14=1, 1/(alpha14 beta14 gamma14)=1, beta23=1,gamma23=1, beta24=1, 1/(alpha24 beta24 gamma24)=1, gamma34=1,  1/(alpha34 beta34 gamma34)=1 *)

Solve[{alpha12==1, beta12==1 , alpha13==1, gamma13==1, alpha14==1, 1/(alpha14 beta14 gamma14)==1, beta23==1,gamma23==1, beta24==1, 1/(alpha24 beta24 gamma24)==1, gamma34==1,  1/(alpha34 beta34 gamma34)==1 },  
{alpha12, beta12, alpha13, gamma13, alpha14, beta14, gamma14, beta23, gamma23, beta24, alpha24, gamma24, gamma34, alpha34}]

(* We assign as above *)

alpha12:=1;beta12:=1;gamma12:=(1/beta34); 
alpha13:=1;gamma13:=1;beta13:=(1/beta34);alpha14:=1;beta14:=(1/beta34);gamma14:=beta34;alpha23:=(1/beta34);beta23:=1;gamma23:=1;alpha24:=(1/beta34);beta24:=1;gamma24:=beta34;alpha34:=(1/beta34);gamma34:=1

(* This sends T_4 to T_0 to T_3, rotate around the edge e_12  We need the trace values to fix its conjugacy classes. Since we gave two eigenvalues already we just need traces of itself and its inverse, I computed the trace of square but not needed. they will be solved in equations.nb*)

A12:=Transpose[{alpha12 e1, beta12 e2, gamma12 vec3,1/(alpha12 beta12 gamma12) e4} ].Inverse[PA4]

MatrixForm[A12]

Det[A12]

Tr[A12]

Tr[Inverse[A12]]

Tr[A12^2]

Det[A12]

(* Rotation for e_13 *)

A13 :=Transpose[{alpha13 e1, beta13 vec2, gamma13 e3, 1/(alpha13 beta13 gamma13) e4}].Inverse[PA4]
A13

Tr[A13]

Tr[Inverse[A13]]

Tr[A13^2]

Det[A13]

(* Rotation for e14 *)

A14:=Transpose[{alpha14 e1, beta14 vec2, gamma14 e3, 1/(alpha14 beta14 gamma14) e4}].Inverse[PA3]

A14

Det[A14]

Tr[A14]

Tr[Inverse[A14]]

Eigenvalues[A14]

Tr[A14^2]

(* rotation for e23 *)

A23:=Transpose[{alpha23 vec1, beta23 e2, gamma23 e3, 1/(alpha23 beta23 gamma23) e4}].Inverse[PA4]

MatrixForm[A23]

Tr[A23]

Tr[Inverse[A23]]

Tr[A23^2]

Det[A23]

(* rotation for e24 *)

A24:=Transpose[{alpha24 vec1, beta24 e2, gamma24 e3, 1/(alpha24 beta24 gamma24) e4}].Inverse[PA3]

MatrixForm[A24]

Tr[A24]

Tr[Inverse[A24]]

Tr[A24.A24]

Det[A24]

(* Rotation for e34 *)

A34:=Transpose[{alpha34 vec1, beta34 e2, gamma34 e3, 1/(alpha34 beta34 gamma34) e4}].Inverse[PA2]

MatrixForm[A34]

Tr[A34]

Tr[Inverse[A34]]

Tr[A34^2]

Det[A34]

(* Disregard below * )

MatrixForm[Inverse[A13].A14.A12]

Eigenvalues[Inverse[A13].A14.A12]

Eigenvalues[Inverse[A23].A24.A12]

Eigenvalues[Inverse[A34].A23.Inverse[A13]]

Eigenvalues[Inverse[A34].A24.Inverse[A14]]