StringPresentation( G )
Let G be a finitely presented group. StringPresentation( G ) will return the presentation of G as a list of strings. The first string lists the string generators of G, the second string the relators as words in the generators.
gap> F2 := FreeGroup( "A", "B" ); Group( A, B ) gap> A5 := F2 / [ F2.1^2, F2.2^3, (F2.1*F2.2)^5 ]; Group( A, B ) gap> StringPresentation( A5 ); [ "A,B", "AA,BBB,ABABABABAB" ]