# Cosets

## Coset Tables and Transversals

### `Transversal(G, H): GrpPC, GrpPC -> { @ GrpPCElt  @}, Map`

### `RightTransversal(G, H): GrpPC, GrpPC -> { @ GrpPCElt  @}, Map`

Given a group $G$ and a subgroup $H$ of $G$, this function returns

**(a)**
An indexed set of elements $T$ of $G$ forming a right transversal for $G$ over $H$; and

**(b)**
The corresponding transversal mapping $\phi: G \rightarrow T$. If $T = [t_1, \ldots, t_r]$ and $g$ in $G$, $\phi$ is defined by $\phi(g) = t_i$, where $g\in H*t_i$.

### `CosetTable(G, H): GrpPC, GrpPC -> Map`

Given a group $G$ and a subgroup $H$ of $G$ of index $r$, return a mapping $M:\langle\{1..r\},G\rangle\rightarrow\{1..r\}$ describing the action of $G$ on the (right) cosets of $H$.

### `Transversal(G, H, K): GrpPC, GrpPC, GrpPC -> { @ GrpPCElt  @}, Map`

An indexed set of representatives for the double cosets $HuK$ in $G$, and the corresponding transversal mapping. The algorithm used is described in [[Slattery, 2001](../../references.md#cite-slat-cosets)].

### `ShortCosets(p, H, G): GrpPCElt, GrpPC, GrpPC -> [GrpPCElt]`

Computes a set of representatives for the transversal of $G$ modulo $H$ of all cosets that contain $p$. This computation does not do a full transversal of $G$ modulo $H$ and may therefore be used even if the index of $(G:H)$ is very large.

## Action on a Coset Space

### `CosetAction(G, H): Grp, Grp -> Hom(Grp), GrpPerm, GrpPC`

Given a subgroup $H$ of the group $G$, construct the permutation representation of $G$ given by the action of $G$ on the set of (right) cosets of $H$ in $G$. The function returns:

**(a)**
The natural homomorphism $f: G \rightarrow  L$;

**(b)**
The induced group $L$;

**(c)**
The kernel $K$ of the action (a subgroup of $G$).

### `CosetImage(G, H): Grp, Grp -> GrpPerm`

Given a subgroup $H$ of the group $G$, construct the image $L$ of $G$ given by the action of $G$ on the set of (right) cosets of $H$ in $G$. $L$ is returned as a permutation group.

### `CosetKernel(G, H): Grp, Grp -> Grp`

Given a subgroup $H$ of the group $G$, construct the kernel of the action of $G$ on the set of (right) cosets of $H$ in $G$.
