How do I find hyperbolic generating triples for a group using GAP? Let $G$ be a finite group and $x, y, z \in G$.  A hyperbolic generating triple for $G$ is a triple $(x, y, z) \in G\times G\times G$ such that

*

*$\frac{1}{o(x)}+\frac{1}{o(y)}+\frac{1}{o(z)} <1$,

*$\langle x,y,z \rangle =G$, and

*$xyz=1$.

The type of a hyperbolic generating triple $(x, y, z)$ is the triple $(o(x), o(y), o(z))$.
My question is, how can I use GAP to determine these triples for a group and therefore their type?  Take $PSL(2, 7)$ as an example.
I thought this might work, but I cannot seem to print the triples.
g:=Size(G);;
cl:=ConjugacyClasses(G);; n:=Size(cl);;
class:=[];; GenTrips:=[];;
for i in [1..n] do
  Add(class ,AsList(cl[i]));;
od;

for i in [1..n] do
  catch:=[];
  x:=class[i][1];;
  for j in [i..n] do
    for j2 in [1..Size(class[j])] do
      y:=class[j][j2];;
      z:=Inverse(x*y);;
      for k in [j..n] do
        if z in class[k] then
          trip:=[i,j,k];;
          if not trip in GenTrips then
          if g=Size(Group(x,y)) then
              Add(GenTrips ,trip);; Add(catch ,k);
            fi;
          fi; 
          break;
        fi;
        if Difference([j..n],catch)=[] then
          catch:=[]; break;
        fi;
      od;
    od;
  od;
od;

Thanks
 A: First get the possible types:
gap> o:=Set(List(ConjugacyClasses(G),x->Order(Representative(x))));
[ 1, 2, 3, 4, 7 ]
gap> t:=Filtered(UnorderedTuples(o,3),x->1/x[1]+1/x[2]+1/x[3]<1);
[ [ 2, 3, 7 ], [ 2, 4, 7 ], [ 2, 7, 7 ], [ 3, 3, 4 ], [ 3, 3, 7 ],
  [ 3, 4, 4 ], [ 3, 4, 7 ], [ 3, 7, 7 ], [ 4, 4, 4 ], [ 4, 4, 7 ],
  [ 4, 7, 7 ], [ 7, 7, 7 ] ]

Now for each type, the possible generators of these orders are described by epimorphisms from the group
$$\langle x,y\mid x^{o(x)},y^{o(y)},(xy)^{o(z)}\rangle
$$
We can find these as follows (here done for the first order tuple, one would have to run a loop to get over all):
gap> mytup:=t[1];
[ 2, 3, 7 ]
gap> fp:=f/[f.1^mytup[1],f.2^mytup[2],(f.1*f.2)^mytup[3]];
<fp group on the generators [ x, y ]>
gap> q:=GQuotients(fp,G);
[ [ x, y ] -> [ (1,3)(2,5)(4,7)(6,8), (3,5,7)(4,6,8) ] ]
gap> trip:=List(q,x->List([fp.1,fp.2,(fp.1*fp.2)^-1],
> y->ImagesRepresentative(x,y)));
[ [ (1,3)(2,5)(4,7)(6,8), (3,5,7)(4,6,8) ] ]

Finally we must make sure the element orders are as prescribed (and not smaller)
gap> trip:=Filtered(trip,x->List(x,Order)=mytup);
[ [ (1,3)(2,5)(4,7)(6,8), (3,5,7)(4,6,8), (1,3,4,6,7,2,5) ] ]

These are the triples for the selected type, up to conjugacy in $G$. A loop over t will give you all.
The advantage of this approach over the plain loops is that GQuotients takes care of which classes for which orders, and rund over the second class only up to conjugation by the centralizer of the first element, thus reducing the number of tests required.
