---
title: "Homomorphisms"
canonical: "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/homomorphism.html"
source: "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/homomorphism.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": "Operations on the Set of Group Elements", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/Set.md"}
next: {"title": "Conversion to a Finitely Presented Group", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsDefinedByRewriteSystems/conversion.md"}
intrinsics:
  - {"name": "hom", "signature": "hom< R -> G | S >: Struct, Struct -> Map"}
---

# Homomorphisms

For a general description of homomorphisms, we refer to chapter [Mappings](https://docs.magma-maths.org/v2.30-1/SetsSequencesMappings/Mappings/index-mappings.md#chapmap). This section describes some special aspects of homomorphisms whose domain or codomain is a rewrite group.

## General Remarks

Groups in the category `GrpRWS` currently are accepted as codomains only in some special situations. The most important cases in which a rewrite group can be used as a codomain are group homomorphisms whose domain is in one of the categories [`GrpFP`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/FPGroups/index-fpgroups.md#chapgrpfp), [`GrpGPC`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/PolycyclicGroups/index-polycyclic-groups.md#chapgrpgpc), `GrpRWS`, or [`GrpAtc`](https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/AutomaticAndHyperbolicGroups/index-automatic-and-hyperbolic-groups.md#chapgrpatc).

## Construction of Homomorphisms

<a id="constructor-constructor-hom-struct-struct-map"></a>
### `hom< R -> G | S >: Struct, Struct -> Map`

Returns the homomorphism from the rewrite group $R$ to the group $G$ defined by the expression $S$ which can be the one of the following:

**(i)**
A list, sequence, or indexed set containing the images of the $n$ generators $R.1,\ldots,R.n$ of $R$. Here, the $i$-th element of $S$ is interpreted as the image of $R.i$, i.e. the order of the elements in $S$ is important.

**(ii)**
A list, sequence, enumerated set, or indexed set, containing $n$ tuples $<x_i,y_i>$ or arrow pairs $x_i \ar y_i$, where $x_i$ is a generator of $R$ and $y_i\in G$ ($i=1,\ldots,n$) and the set $\{x_1,\ldots,x_n\}$ is the full set of generators of $R$. In this case, $y_i$ is assigned as the image of $x_i$, hence the order of the elements in $S$ is not important.

It is the user’s responsibility to ensure that the provided generator images actually give rise to a well-defined homomorphism. No checking is performed by the constructor.

Note that it is currently not possible to define a homomorphism by assigning images to the elements of an arbitrary generating set of $R$.
