# Presentations

The functions described in this section apply only to finite groups for which a base and strong generating set may be constructed.

## Presentations

### `FPGroup(G): GrpMat -> GrpFP, Hom(Grp)`

Construct a presentation for the matrix group $G$ on the set of defining generators and return the presentation in the form of a finitely presented group $F$ that is isomorphic to $G$. The presentation is obtained by first computing the regular representation of $G$ and then using the Todd-Coxeter Schreier algorithm to construct a presentation on the strong generators. In this situation the strong generators are identical to the defining generators.

A group homomorphism $\phi: F \rightarrow G$, defining $G$ as a matrix representation of $F$, is also returned.

### `FPGroupStrong(G): GrpMat -> GrpFP, Hom(Grp)`

Construct a presentation for the matrix group $G$ on a set of strong generators and return the presentation in the form of a finitely presented group $F$ that is isomorphic to $G$. In Magma, the Todd-Coxeter Schreier algorithm is used to construct the presentation. If strong generators are not already known for $G$, they will be constructed. In the case in which strong generators are already known for $G$, the presentation will be on these strong generators.

The presentation will have the property that it contains presentations for all stabilizer subgroups defined by the BSGS.

The group homomorphism $f: F \rightarrow G$, defining $G$ as a matrix representation of $F$, is also returned.

## Matrices as Words

Consider a matrix group $G$ defined on $d$ generators. The *word group* of $G$ is a free group $W$ of rank $d$. Then we regard $G$ as a homomorphic image of $F$ with associated homomorphism $\phi: W \rightarrow G$. All operations involving words in the generators of $G$ will be performed in $W$.

### `WordGroup(G): GrpMat -> GrpSLP, Map`

Given a matrix group $G$ defined on $d$ generators, return (a) a free group $W$ on $d$ generators as an SLP-group, and (b) the homomorphism $\phi$ from $W$ to $G$ such that $W.i \rightarrow G.i$, for $i = 1, \ldots, d$. The group $W$ associated with $G$ by this function will be referred to as the *word group* for $G$.

### `InverseWordMap(G): GrpMat -> Map`

Given a matrix group $G$ and its associated word group $W$ with canonical homomorphism $\phi:W \rightarrow G$, construct the inverse mapping $\rho$. Thus, given a matrix $g$ of $G$, $g@\rho$ returns an element in the preimage of $g$ under $\phi$. If the word group $W$ does not already exist, it will be created.

### `WordInGenerators(G, g : parameters): GrpMat, GrpMatElt -> GrpFPElt`

```magma
RegLimit: RngIntElt                    Default: 1000000
Print   : RngIntElt                    Default: 0
```

Compute a word in a free group with generators corresponding to those of the group $G$ that evaluates to the element $g \in G$.

If $G$ has order at most `RegLimit` then the word will be computed using the regular permutation representation of $G$, and will be guaranteed to be a shortest word representing $g$. Otherwise an algorithm of Minkwitz [] is used, which will find a reasonably short word for $g$ but not necessarily a shortest word. The optional parameter `Print` controls the printing of diagnostics.

The first call of this function for an element $g$ of the group $G$ will take longer than subsequent calls for elements of the same group, because some necessary data is calculated with the first call.
