TM1 := Matrix(4, 4, [[1,0,0,0],[1/3*a*3^(1/2)*(2^(1/2)*cos(beta)-sin(beta))/ cos(beta),((Matrix(4, 4, [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]])) . RotZ1 . RotY1)[2 .. 4,2 .. 4][1,1],((Matrix(4, 4, [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0, 0,1]])) . RotZ1 . RotY1)[2 .. 4,2 .. 4][1,2],((Matrix(4, 4, [[1,0,0,0],[0,1,0, 0],[0,0,1,0],[0,0,0,1]])) . RotZ1 . RotY1)[2 .. 4,2 .. 4][1,3]],[-1/6*a*2^(1/2 )*3^(1/2)*(2^(1/2)*sin(beta)+cos(beta))/cos(beta),((Matrix(4, 4, [[1,0,0,0],[0 ,1,0,0],[0,0,1,0],[0,0,0,1]])) . RotZ1 . RotY1)[2 .. 4,2 .. 4][2,1],((Matrix(4 , 4, [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]])) . RotZ1 . RotY1)[2 .. 4,2 .. 4][2,2],((Matrix(4, 4, [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]])) . RotZ1 . RotY1)[2 .. 4,2 .. 4][2,3]],[-1/6*a*2^(1/2)*3^(1/2)*(2^(1/2)*sin(beta)+cos( beta))/cos(beta),((Matrix(4, 4, [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]])) . RotZ1 . RotY1)[2 .. 4,2 .. 4][3,1],((Matrix(4, 4, [[1,0,0,0],[0,1,0,0],[0,0,1, 0],[0,0,0,1]])) . RotZ1 . RotY1)[2 .. 4,2 .. 4][3,2],((Matrix(4, 4, [[1,0,0,0] ,[0,1,0,0],[0,0,1,0],[0,0,0,1]])) . RotZ1 . RotY1)[2 .. 4,2 .. 4][3,3]]]); TM2 := Matrix(4, 4, [[1,0,0,0],[-1/6*a*2^(1/2)*3^(1/2)*(2^(1/2)*sin(beta)+cos( beta))/cos(beta),((Matrix(4, 4, [[1,0,0,0],[0,-1/2,-1/2*3^(1/2),0],[0,1/2*3^(1 /2),-1/2,0],[0,0,0,1]])) . RotZ2 . RotY2)[2 .. 4,2 .. 4][1,1],((Matrix(4, 4, [ [1,0,0,0],[0,-1/2,-1/2*3^(1/2),0],[0,1/2*3^(1/2),-1/2,0],[0,0,0,1]])) . RotZ2 . RotY2)[2 .. 4,2 .. 4][1,2],((Matrix(4, 4, [[1,0,0,0],[0,-1/2,-1/2*3^(1/2),0] ,[0,1/2*3^(1/2),-1/2,0],[0,0,0,1]])) . RotZ2 . RotY2)[2 .. 4,2 .. 4][1,3]],[1/ 3*a*3^(1/2)*(2^(1/2)*cos(beta)-sin(beta))/cos(beta),((Matrix(4, 4, [[1,0,0,0], [0,-1/2,-1/2*3^(1/2),0],[0,1/2*3^(1/2),-1/2,0],[0,0,0,1]])) . RotZ2 . RotY2)[2 .. 4,2 .. 4][2,1],((Matrix(4, 4, [[1,0,0,0],[0,-1/2,-1/2*3^(1/2),0],[0,1/2*3^( 1/2),-1/2,0],[0,0,0,1]])) . RotZ2 . RotY2)[2 .. 4,2 .. 4][2,2],((Matrix(4, 4, [[1,0,0,0],[0,-1/2,-1/2*3^(1/2),0],[0,1/2*3^(1/2),-1/2,0],[0,0,0,1]])) . RotZ2 . RotY2)[2 .. 4,2 .. 4][2,3]],[-1/6*a*2^(1/2)*3^(1/2)*(2^(1/2)*sin(beta)+cos( beta))/cos(beta),((Matrix(4, 4, [[1,0,0,0],[0,-1/2,-1/2*3^(1/2),0],[0,1/2*3^(1 /2),-1/2,0],[0,0,0,1]])) . RotZ2 . RotY2)[2 .. 4,2 .. 4][3,1],((Matrix(4, 4, [ [1,0,0,0],[0,-1/2,-1/2*3^(1/2),0],[0,1/2*3^(1/2),-1/2,0],[0,0,0,1]])) . RotZ2 . RotY2)[2 .. 4,2 .. 4][3,2],((Matrix(4, 4, [[1,0,0,0],[0,-1/2,-1/2*3^(1/2),0] ,[0,1/2*3^(1/2),-1/2,0],[0,0,0,1]])) . RotZ2 . RotY2)[2 .. 4,2 .. 4][3,3]]]); TM3 := Matrix(4, 4, [[1,0,0,0],[-1/6*a*2^(1/2)*3^(1/2)*(2^(1/2)*sin(beta)+cos( beta))/cos(beta),((Matrix(4, 4, [[1,0,0,0],[0,-1/2,1/2*3^(1/2),0],[0,-1/2*3^(1 /2),-1/2,0],[0,0,0,1]])) . RotZ3 . RotY3)[2 .. 4,2 .. 4][1,1],((Matrix(4, 4, [ [1,0,0,0],[0,-1/2,1/2*3^(1/2),0],[0,-1/2*3^(1/2),-1/2,0],[0,0,0,1]])) . RotZ3 . RotY3)[2 .. 4,2 .. 4][1,2],((Matrix(4, 4, [[1,0,0,0],[0,-1/2,1/2*3^(1/2),0], [0,-1/2*3^(1/2),-1/2,0],[0,0,0,1]])) . RotZ3 . RotY3)[2 .. 4,2 .. 4][1,3]],[-1 /6*a*2^(1/2)*3^(1/2)*(2^(1/2)*sin(beta)+cos(beta))/cos(beta),((Matrix(4, 4, [[ 1,0,0,0],[0,-1/2,1/2*3^(1/2),0],[0,-1/2*3^(1/2),-1/2,0],[0,0,0,1]])) . RotZ3 . RotY3)[2 .. 4,2 .. 4][2,1],((Matrix(4, 4, [[1,0,0,0],[0,-1/2,1/2*3^(1/2),0],[0 ,-1/2*3^(1/2),-1/2,0],[0,0,0,1]])) . RotZ3 . RotY3)[2 .. 4,2 .. 4][2,2],(( Matrix(4, 4, [[1,0,0,0],[0,-1/2,1/2*3^(1/2),0],[0,-1/2*3^(1/2),-1/2,0],[0,0,0, 1]])) . RotZ3 . RotY3)[2 .. 4,2 .. 4][2,3]],[1/3*a*3^(1/2)*(2^(1/2)*cos(beta)- sin(beta))/cos(beta),((Matrix(4, 4, [[1,0,0,0],[0,-1/2,1/2*3^(1/2),0],[0,-1/2* 3^(1/2),-1/2,0],[0,0,0,1]])) . RotZ3 . RotY3)[2 .. 4,2 .. 4][3,1],((Matrix(4, 4, [[1,0,0,0],[0,-1/2,1/2*3^(1/2),0],[0,-1/2*3^(1/2),-1/2,0],[0,0,0,1]])) . RotZ3 . RotY3)[2 .. 4,2 .. 4][3,2],((Matrix(4, 4, [[1,0,0,0],[0,-1/2,1/2*3^(1/ 2),0],[0,-1/2*3^(1/2),-1/2,0],[0,0,0,1]])) . RotZ3 . RotY3)[2 .. 4,2 .. 4][3,3 ]]]); RM1 := ((Matrix(4, 4, [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]])) . RotZ1 . RotY1)[2 .. 4,2 .. 4]; RM2 := ((Matrix(4, 4, [[1,0,0,0],[0,-1/2,-1/2*3^(1/2),0],[0,1/2*3^(1/2),-1/2,0 ],[0,0,0,1]])) . RotZ2 . RotY2)[2 .. 4,2 .. 4]; RM3 := ((Matrix(4, 4, [[1,0,0,0],[0,-1/2,1/2*3^(1/2),0],[0,-1/2*3^(1/2),-1/2,0 ],[0,0,0,1]])) . RotZ3 . RotY3)[2 .. 4,2 .. 4];