/* maximal subgroup list production */ ListMaximals := function (G, ParentName, L) X := []; Names := []; Orders := []; Index := []; for i in [1..#L] do if assigned L[i]`Parent and L[i]`Parent eq ParentName and #L[i]`generators gt 0 then F := Parent (L[i]`generators[1]); a := F.1; b := F.2; f := hom G | [G.1, G.2]>; images := [f (w): w in L[i]`generators]; X[#X + 1] := sub ; Names[#Names + 1] := L[i]`Name; Orders[#Orders + 1] := L[i]`Order; Index[#Index + 1] := L[i]`Index; end if; end for; return X, Names, Orders, Index; end function;