
(*This is a Mathematica file.*)


(*These are the linear functionals from the
  Diophantine Lemma in the monograph*)

G[{m_,n_}]:={(q-p)/(p+q),-2 q/(p+q)}.{m,n}

H[{m_,n_}]:=1/(p+q)/(p+q) {-p p + 4 p q + q q,2 q (q-p)}.{m,n}


(* These are the vertices of the arithmetic kite*)

v1={0,0};
v2={0,(p+q)/2};
v3={p,((p+q) (p+q)-2 p p)/2/q};
v4 = 1/2/(p+q) {4 p q,(p+q) (p+q) - 4 p p};
v5={p q/(p+q),p q/(p+q) + (q-p)/2}; 
v6={-q,p}
v7={q,-p};

W=v5;
V=v7;

