---
title: "Groups Defined by Rewrite Systems"
canonical: "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/index-groups-defined-by-rewrite-systems.html"
source: "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/index-groups-defined-by-rewrite-systems.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"}
prev: {"title": "Bibliography", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/BraidGroups/bibliography.md"}
next: {"title": "Introduction", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/introduction.md"}
---

<a id="rewrite-system"></a>
<a id="chapgrprws"></a>
# Groups Defined by Rewrite Systems

- [Introduction](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/introduction.md)
  - [Terminology](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/introduction.md#terminology)
  - [The Category of Rewrite Groups](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/introduction.md#the-category-of-rewrite-groups)
  - [The Construction of a Rewrite Group](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/introduction.md#the-construction-of-a-rewrite-group)
- [Constructing Confluent Presentations](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md)
  - [The Knuth-Bendix Procedure](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#the-knuth-bendix-procedure)
    - [`RWSGroup(F: parameters): MonFP → MonRWS`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#function-grprws-rwsgroup)
    - [Example: Rewrite Group for the Von Dyck (2,3,5) Group](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#example-ex-8622c9)
  - [Defining Orderings](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#defining-orderings)
    - [`RWSGroup(F: parameters): MonFP → MonRWS`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#function-rwsgroup-monfp)
    - [Example: Recursive Ordering for a Non-Hopfian Group](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#example-ex-e4565e)
    - [Example: Rewrite System for a Free Nilpotent Group](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#example-ex-8d0d83)
  - [Setting Limits](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#setting-limits)
    - [`RWSMonoid(F: parameters): MonFP → MonRWS`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#function-rwsmonoid-monfp)
    - [`SetVerbose("KBMAG", v): MonStgElt, RngIntElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#procedure-setverbose-monstgelt-rngintelt-kbmag)
  - [Accessing Group Information](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#accessing-group-information)
    - [`G . i: GrpRWS, RngIntElt → GrpRWSElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#operation-operation-grprws-rngintelt-grprwselt)
    - [`Generators(G): GrpRWS → [GrpRWSElt]`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#function-generators-grprws)
    - [`NumberOfGenerators(G): GrpRWS → RngIntElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#function-numberofgenerators-grprws)
    - [`Ngens(G): GrpRWS → RngIntElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#function-ngens-grprws)
    - [`Relations(G): GrpRWS → [GrpFPRel]`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#function-grprws-relations)
    - [`NumberOfRelations(G): GrpRWS → RngIntElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#function-numberofrelations-grprws)
    - [`Nrels(G): GrpRWS → RngIntElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#function-nrels-grprws)
    - [`Ordering(G): GrpRWS → String`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#function-ordering-grprws)
    - [Example: Accessing Rewrite Group Information](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/creation.md#example-ex-13860e)
- [Properties of a Rewrite Group](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/properties.md)
  - [`IsConfluent(G): GrpRWS → BoolElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/properties.md#function-isconfluent-grprws)
  - [`IsFinite(G): GrpRWS → BoolElt, RngIntElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/properties.md#function-isfinite-grprws)
  - [`Order(G): GrpRWS → RngIntElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/properties.md#function-order-grprws)
  - [`# G: GrpRWS → RngIntElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/properties.md#operation-operation-grprws-rngintelt)
  - [Example: Confluence of the Weyl Group E8](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/properties.md#example-ex-40c60a)
  - [Example: Order of an Infinite Rewrite Group](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/properties.md#example-ex-174016)
- [Arithmetic with Words](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md)
  - [Construction of a Word](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#construction-of-a-word)
    - [`Identity(G): GrpRWS → GrpRWSElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#function-identity-grprws)
    - [`Id(G): GrpRWS → GrpRWSElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#function-id-grprws)
    - [`G ! 1: GrpRWS, RngIntElt → GrpRWSElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#operation-op-grprws-rngintelt)
    - [`G ! [ i₁, ..., iₛ ]: GrpRWS, [ RngIntElt ] → GrpRWSElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#operation-op-grprws-rngintelt-2)
    - [`Parent(w): GrpRWSElt → GrpRWS`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#function-parent-grprwselt)
    - [Example: Constructing Words in a Rewrite Group](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#example-ex-6e6f68)
  - [Element Operations](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#element-operations)
    - [`u * v: GrpRWSElt, GrpRWSElt → GrpRWSElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#operation-op-times-grprwselt-grprwselt)
    - [`u / v: GrpRWSElt, GrpRWSElt → GrpRWSElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#operation-op-div-grprwselt-grprwselt)
    - [`u ^ n: GrpRWSElt, RngIntElt → GrpRWSElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#operation-op-pow-grprwselt-rngintelt)
    - [`u ^ v: GrpRWSElt, GrpRWSElt → GrpRWSElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#operation-op-pow-grprwselt-grprwselt)
    - [`Inverse(w): GrpRWSElt → GrpRWSElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#function-inverse-grprwselt)
    - [`(u, v): GrpRWSElt, GrpRWSElt → GrpRWSElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#literal-literal-u-v-grprwselt-grprwselt-grprwselt)
    - [`(u₁, ..., uᵣ): GrpRWSElt, ..., GrpRWSElt → GrpRWSElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#literal-literal-u1-ur-grprwselt-grprwselt-grprwselt)
    - [`u eq v: GrpRWSElt, GrpRWSElt → BoolElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#operation-op-eq-grprwselt-grprwselt)
    - [`u ne v: GrpRWSElt, GrpRWSElt → BoolElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#operation-op-ne-grprwselt-grprwselt)
    - [`IsId(w): GrpRWSElt → BoolElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#function-isid-grprwselt)
    - [`IsIdentity(w): GrpRWSElt → BoolElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#function-isidentity-grprwselt)
    - [`# u: GrpRWSElt → RngIntElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#operation-operation-grprwselt-rngintelt)
    - [`ElementToSequence(u): GrpRWSElt → [ RngIntElt ]`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#function-elementtosequence-grprwselt)
    - [`Eltseq(u): GrpRWSElt → [ RngIntElt ]`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#function-eltseq-grprwselt)
    - [Example: Word Arithmetic in a Fibonacci Group](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/arithmetic.md#example-ex-0eba9a)
- [Operations on the Set of Group Elements](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/Set.md)
  - [`Random(G, n): GrpRWS, RngIntElt → GrpRWSElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/Set.md#function-random-grprws-rngintelt)
  - [`Random(G): GrpRWS → GrpRWSElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/Set.md#function-random-grprws)
  - [`Representative(G): GrpRWS → GrpRWSElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/Set.md#function-representative-grprws)
  - [`Rep(G): GrpRWS → GrpRWSElt`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/Set.md#function-rep-grprws)
  - [`Set(G, a, b): GrpRWS, RngIntElt, RngIntElt → SetEnum`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/Set.md#function-set-grprws-rngintelt-rngintelt)
  - [`Set(G): GrpRWS → SetEnum`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/Set.md#function-set-grprws)
  - [`Seq(G, a, b): GrpRWS, RngIntElt, RngIntElt → SeqEnum`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/Set.md#function-seq-grprws-rngintelt-rngintelt)
  - [`Seq(G): GrpRWS → SeqEnum`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/Set.md#function-seq-grprws)
  - [Example: Element Sets of a Rewrite Group](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/Set.md#example-ex-6fc61b)
- [Homomorphisms](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/homomorphism.md)
  - [General Remarks](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/homomorphism.md#general-remarks)
  - [Construction of Homomorphisms](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/homomorphism.md#construction-of-homomorphisms)
    - [`hom< R -> G | S >: Struct, Struct → Map`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/homomorphism.md#constructor-constructor-hom-struct-struct-map)
- [Conversion to a Finitely Presented Group](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/conversion.md)
  - [Example: Converting a Rewrite Group to an FP-Group](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/conversion.md#example-ex-c2fddd)
- [Bibliography](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/bibliography.md)
