---
title: "Conversion to a Finitely Presented Monoid"
canonical: "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/MonoidsGivenByRewriteSystems/conversion.html"
source: "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/MonoidsGivenByRewriteSystems/conversion.md"
part: "Finitely Presented Groups"
chapter: "Monoids Given by Rewrite Systems"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Finitely Presented Groups", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/index-finitely-presented-groups.md"}
  - {"title": "Monoids Given by Rewrite Systems", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/MonoidsGivenByRewriteSystems/index-monoids-given-by-rewrite-systems.md"}
prev: {"title": "Set Operations", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/MonoidsGivenByRewriteSystems/Set.md"}
next: {"title": "Bibliography", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/MonoidsGivenByRewriteSystems/bibliography.md"}
examples:
  - "ex-c939dc"
---

# 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`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/MonoidsGivenByRewriteSystems/operation.md#function-monrws-relations). This is shown in the following example.

<a id="example-ex-c939dc"></a>
## `Example: Converting a Rewrite Monoid to an FP-Monoid (ex-c939dc)`

We construct the Fibonacci monoid $FM(2,4)$ as a rewrite monoid, and then convert it into a finitely presented monoid.

```magma
> 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
```
