Page 75 - Ellingham, Mark, Mariusz Meszka, Primož Moravec, Enes Pasalic, 2014. 2014 PhD Summer School in Discrete Mathematics. Koper: University of Primorska Press. Famnit Lectures, 3.
P. 75
mož Moravec: Some Topics in the Theory of Finite Groups 63

For example, one can construct C2 × C4 × C12 in GAP as follows:

gap> G := AbelianGroup( [2, 4, 12 ] );

gap> AbelianInvariants( G );
[ 2, 3, 4, 4 ]

The last command tells us that our group is isomorphic to C2×C3×C4×C4. In general,

AbelianInvariants( G ); returns a cyclic decomposition of G ab.

Symmetric groups

If X is a non-empty set, then the set of all bijections X → X becomes a group under the
operation of composition. It is denoted by Sym X . If X is a finite set, then we can write
X = {1, 2, . . . , n }, and we use the abbreviation Sn for Sym X in this case. The group Sn
is called the symmetric group on n letters. Its elements are permutations that can be
written as products of cycles of the form (x1 x2 . . . xk ) that represents the map x1 → x2 →
· · · → xk → x1, and all other elements are fixed. The order of Sn is n !. If n > 2, then Sn is
clearly a non-abelian group.

Let us use GAP to play around with S4 and its elements:

gap> S4 := SymmetricGroup( 4 );
Sym( [ 1 .. 4 ] )
gap> Order( S4 );
24
gap> el := Elements( S4 );
[ (), (3,4), (2,3), (2,3,4), (2,4,3), (2,4), (1,2), (1,2)(3,4), (1,2,3),

(1,2,3,4), (1,2,4,3), (1,2,4), (1,3,2), (1,3,4,2), (1,3), (1,3,4),
(1,3)(2,4), (1,3,2,4), (1,4,3,2), (1,4,2), (1,4,3), (1,4), (1,4,2,3),
(1,4)(2,3) ]
gap> a := el[ 4 ];
(2,3,4)
gap> b := el[ 7 ];
(1,2)
gap> a * b;
(1,2,3,4)
gap> a^(-1);
(2,4,3)
gap> a^b;
(1,3,4)
gap> Order( a );
3

We can also present symmetric groups in terms of generators and relations. Here is
an example:
   70   71   72   73   74   75   76   77   78   79   80