---
title: "Conversion to a Finitely Presented Group"
canonical: "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/conversion.html"
source: "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/conversion.md"
part: "Finitely Presented Groups"
chapter: "Groups Defined 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": "Groups Defined by Rewrite Systems", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/index-groups-defined-by-rewrite-systems.md"}
prev: {"title": "Homomorphisms", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/homomorphism.md"}
next: {"title": "Bibliography", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/bibliography.md"}
examples:
  - "ex-c2fddd"
---

# 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`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#function-grprws-relations) and [`Simplify`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/FPGroups/simplification.md#function-grpfp-1-simplify). This is shown in the following example.

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

We construct a two generator free abelian group as a rewrite group and then convert it into a finitely presented group.

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