I have a permutation group given in terms of its generators, such as
G := Group((2, 3), (1, 4), (1, 3)(2, 4));
I can iterate through the group and get all elements in cycle form. How can I get each element in terms of the generators? I imagine GAP has these expressions once it generates each element or not?
Section 39.5 of the GAP manual, "Expressing Elements as Words in Generators":
http://www.gap-system.org/Manuals/doc/ref/chap39.html#X7E19F92284F6684E
describes the two ways how this can be done:
Factorizationguarantees a word of minimum length (but is more memory/time intensive).PreImagesRepresentative, when applied toEpimorphismFromFreeGroup, is faster but does not attempt to obtain minimum length.