
(*This file defines the group elements used in Ch 5 of the paper.
We define everything in terms of 16 digit numerical
approximations. After defining the elements A0,B0,A1,
we define everything else using conjugation by K*)


a0= 1.04089513419341888394 + 0.29367056890017413779 I
b0= -1.17056359766375053197 + 0.11471366227894184414 I
a1= 1.07764793661677308510 - 0.11418655404355694261 I
Z=-0.339650525469147956078290 + 1.03111131757904071611487 I

(**********************************)
(**********************************)
(**********************************)
(*the group elements*)

A0={{a0,-1},{1,-a0}}
B0={{b0,-1},{1,-b0}}
A1={{a1,-Z},{1/Z,-a1}}
K={{Z,0},{0,1/Z}}

(**********************************)
PositiveEvenA[k_]:=(n=k/2;
M=A0;
Do[{h=h+1;M=K.M.Inverse[K];},{h,1,n}];
M)

PositiveOddA[k_]:=(n=(k-1)/2;
M=A1;
Do[{h=h+1;M=K.M.Inverse[K];},{h,1,n}];
M)

PositiveEvenB[k_]:=(n=k/2;
M=B0;
Do[{h=h+1;M=K.M.Inverse[K];},{h,1,n}];
M)

PositiveOddB[k_]:=IdentityMatrix[2];


NegativeEvenA[k_]:=(n=k/2;
M=A0;
Do[{h=h+1;M=Inverse[K].M.K;},{h,1,n}];
M)

NegativeOddA[k_]:=(n=(k+1)/2;
M=A1;
Do[{h=h+1;M=Inverse[K].M.K;},{h,1,n}];
M)

NegativeEvenB[k_]:=(n=k/2;
M=B0;
Do[{h=h+1;M=Inverse[K].M.K;},{h,1,n}];
M)

(*This case never arises*)
NegativeOddB[k_]:=IdentityMatrix[2];
(********************************)




(********************************)
A[n_]:=(m=Mod[n,2]; 
If[(n>=0)&&(m==0),PositiveEvenA[n],
If[(n>=0)&&(m==1),PositiveOddA[n],
If[m==0,NegativeEvenA[-n],
NegativeOddA[-n]]]])

B[n_]:=(m=Mod[n,2]; 
If[(n>=0)&&(m==0),PositiveEvenB[n],
If[(n>=0)&&(m==1),PositiveOddB[n],
If[m==0,NegativeEvenB[-n],
NegativeOddB[-n]]]])
(********************************)
(**********************************)
(**********************************)







(**********************************)
(**********************************)
(**********************************)
(*each group element commutes with a halfturn whose
axis intersects the (0,infty) axis.  Here we construct
these halfturns *)

HA0={{0,I},{I,0}}
HB0={{0,I},{I,0}}
HA1={{0,Z I},{I/Z,0}}

(**********************************)
PositiveEvenHA[k_]:=(n=k/2;
M=HA0;
Do[{h=h+1;M=K.M.Inverse[K];},{h,1,n}];
M)

PositiveOddHA[k_]:=(n=(k-1)/2;
M=HA1;
Do[{h=h+1;M=K.M.Inverse[K];},{h,1,n}];
M)

PositiveEvenHB[k_]:=(n=k/2;
M=HB0;
Do[{h=h+1;M=K.M.Inverse[K];},{h,1,n}];
M)

PositiveOddHB[k_]:=IdentityMatrix[2];


NegativeEvenHA[k_]:=(n=k/2;
M=HA0;
Do[{h=h+1;M=Inverse[K].M.K;},{h,1,n}];
M)

NegativeOddHA[k_]:=(n=(k+1)/2;
M=HA1;
Do[{h=h+1;M=Inverse[K].M.K;},{h,1,n}];
M)

NegativeEvenHB[k_]:=(n=k/2;
M=HB0;
Do[{h=h+1;M=Inverse[K].M.K;},{h,1,n}];
M)

(*this case never arises*)
NegativeOddHB[k_]:=IdentityMatrix[2];
(**********************************)


HA[n_]:=(m=Mod[n,2]; 
If[(n>=0)&&(m==0),PositiveEvenHA[n],
If[(n>=0)&&(m==1),PositiveOddHA[n],
If[m==0,NegativeEvenHA[-n],
NegativeOddHA[-n]]]])

HB[n_]:=(m=Mod[n,2]; 
If[(n>=0)&&(m==0),PositiveEvenHB[n],
If[(n>=0)&&(m==1),PositiveOddHB[n],
If[m==0,NegativeEvenHB[-n],
NegativeOddHB[-n]]]])
(**********************************)
(**********************************)
(**********************************)
