"Source: Text/Group/GrpFP.text";
"Line: 7400";
"Date: Thu Sep 25 14:47:45 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Group/GrpFP.text, line: 7400
// Example: H80E56 ()
print "Example: H80E56";
ei := GetEchoInput();
SetEchoInput(true);
function MyIsInfinite(F)

 // ...

 // quotient approach: check whether an obviously infinite
 //    normal subgroup can be found in reasonable time.
 S := [ Alt(5), PSL(2,7), PSL(2,9), PSL(2,11) ];
 for G in S do
    P := HomomorphismsProcess(F, G : Surjective := false,
                                     TimeLimit := 5);
    while IsValid(P) and not IsEmpty(P) do
      if DefinesHomomorphism(P) then
         f := Homomorphism(P);
         if 0 in AQInvariants(Kernel(f)) then
            print "found infinite normal subgroup";
            print "Hence group is infinite";
            return true;
         end if;
      end if;
      if IsValid(P) then
         NextElement(~P);
      end if;
   end while;
 end for;
 print "quotient approach failed; trying other strategies";

 // ...

end function;
F := FPGroup< a,b |
   a*b^-1*a^-1*b*a^-1*b^-1*a*b*b,
   a*b^-1*a^-1*b*a*a*b*a^-1*b^-1*a*b^-1*a^-1*b*a*b*a^-1*b^-1 >;
MyIsInfinite(F);
SetEchoInput(ei);
