Let $ G $ be finite groups of $ n \times n $ matrices. I am aware of various interesting subgroups of $ G $, which I have verified the existence of using commands like
NormalSubgroups
IsomorphicSubgroups
RepresentativesPerfectSubgroups
RepresentativesSimpleSubgroups
ConjugacyClassesMaximalSubgroups
ConjugacyClassesPerfectSubgroups
How to I find a generating set for a subgroup found this way?
I think this question is clear, but to give a very concrete example: I have a group $ G $ of $ 46080 $ $ 4 \times 4 $ matrices with a subgroup isomorphic to $ SL(2,9) $. How do I find generators for this $ SL(2,9) $ subgroup?
The command
GeneratorsOfGroupcan be used to obtain a generating set of a subgroup:It may also be worth looking at GAP Manual: 39.22 Special Generating Sets. In particular
SmallGeneratingSetcan be very useful, both for effiency and for readability.As for you comment, which I'll treat as a second part of your question: you can take a
PreImagesRepresentativeof theEpimorphismFromFreeGroup. Or you useFactorization, which does the same but tries to find a short word. In both cases you will get a word in the free group with $n$ generators, where $n$ is the size of the generating set of $G$. More information can be found in GAP Manual: 39.5 Expressing Group Elements as Words in Generators.