Conversion to a Finitely Presented Monoid

There is a standard way to convert a rewrite monoid into a finitely presented monoid using the function Relations. This is shown in the following example.

Example MonRWS_Conversion (H85E12)

We construct the Fibonacci monoid FM(2, 4) as a rewrite monoid, and then convert it into a finitely presented monoid.
> FM<a,b,c,d> := FreeMonoid(4);
> Q := quo< FM | a*b=c, b*c=d, c*d=a, d*a=b >;
> M := RWSMonoid(Q);
> Order(M);
11
> P<w,x,y,z> := quo < FM | Relations(M) >;
> P;
Finitely presented monoid
Relations
    w * x = y
    x * y = z
    y * z = w
    z * w = x
    y^2 = w * z
    z^2 = x * w
    z * y = x^2
    y * x = w^2
    x * w * z = x^2
    w^3 = w * z
    x * w^2 = x * z
    x^2 * z = x
    w^2 * y = w
    x^3 = x * w
    x^2 * w = z
    z * x = x * z
    y * w = w * y
    w^2 * z = y
    x * w * y = x
V2.28, 13 July 2023