Conversion to a Finitely Presented Group

There is a standard way to convert a rewrite group into a finitely presented group using the functions Relations and Simplify. This is shown in the following example.

Example GrpRWS_Conversion (H81E10)

We construct a two generator free abelian group as a rewrite group and then convert it into a finitely presented group.
> FG<a,b> := FreeGroup(2);
> F := quo< FG | b^-1*a*b=a >;
> G := RWSGroup(F);
> print G;
A confluent rewrite group.
Generator Ordering = [ a, a^-1, b, b^-1 ]
Ordering = ShortLex.
The reduction machine has 5 states.
The rewrite relations are:
    a * a^-1 = Id(FG)
    a^-1 * a = Id(FG)
    b * b^-1 = Id(FG)
    b^-1 * b = Id(FG)
    b^-1 * a = a * b^-1
    b * a = a * b
    b^-1 * a^-1 = a^-1 * b^-1
    b * a^-1 = a^-1 * b
> P<x,y> := Simplify(quo< FG | Relations(G)>);
> print P;
Finitely presented group P on 2 generators
Generators as words
    x = $.1
    y = $.2
Relations
    (y, x^-1) = Id(P)
V2.28, 13 July 2023