GAP:FreeGroup
This article is about a GAP function.
Definition
Function type
The function takes as input either a nonnegative integer or a set of symbols and outputs a group.
Behavior
If given a nonnegative integer, the function returns the free group of that rank, i.e., the free group generated by that many elements. If given a set of symbols, the function returns the free group with those symbols as generators.
Examples of usage
Here is the example of the free group on zero generators, which turns out to be the trivial group:
gap> F := FreeGroup(0); <free group on the generators [ ]> gap> IsTrivial(F); true
Here is the example of the free group on one generator, which turns out to be the group of integers:
gap> G := FreeGroup(1); <free group on the generators [ f1 ]> gap> IsCyclic(G); true
Here is the example of the free group on two generators, which is non-abelian:
gap> H := FreeGroup(2); <free group on the generators [ f1, f2 ]> gap> IsAbelian(H); false
We can refer to the specific elements of a free group using for the generator index. Here is an example where we construct a group with the presentation :
gap> F := FreeGroup(2); <free group on the generators [ f1, f2 ]> gap> G := F/[F.1^2, F.2^2, F.1 * F.2 * (F.2 * F.1)^(-1)]; <fp group on the generators [ f1, f2 ]> gap> IdGroup(G); [ 4, 2 ]