Need some help in generating the group element by generator using GAP system

119 Views Asked by At

I am new to GAP system. I would like to generate group using presentation of group. For example, dihedral group D_{2n} with generator . Can anyone familiar with GAP system help me out with this?

1

There are 1 best solutions below

2
On

Here is a way to construct a group from a presentation.

n := 4;;
F := FreeGroup(2);         # Free group of rank two
a := F.1;; b := F.2;;      # Name generators
R := [a^2, b^2, (a*b)^n];; # Relations for D_2n
G := F/R;;

StructureDescription(G);   # This should yield "D8"

You may also want names for the generators to play with.

a := G.1;; b := G.2;;      # Rename
List([a, b, a*b], Order);  # This should yield [2, 2, 4]


Added. Here is another—more clean—way to do the same, which I learned from Hulpke's talk. (See https://www.icts.res.in/program/GTACM16/talks for his videos and slides.)

F := FreeGroup("a", "b");
R := ParseRelators(F, "a2, b2, (ab)4");
G := F/R;
IsomorphismGroups(G, DihedralGroup(8)) <> fail;
AssignGeneratorVariables(G);
List([a, b, a*b], Order);