# Coset Spaces

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

The (right) coset table for $G$ over the subgroup $H$ of finite index, relative to the polycyclic generators. This is defined to be a map

$$
\{1,\ldots,|G:H|\}\times G \rightarrow \{1,\ldots,|G:H|\}
$$

describing the action of $G$ on the enumerated set of right cosets of $H$ in $G$ by right multiplication.

The underlying set of right coset representatives is identical to the right transversal returned by [`Transversal`](#function-grpgpc-transversal) and [`RightTransversal`](#function-grpgpc-righttransversal) and the same enumeration of the elements is used.

## `Transversal(G, H): GrpGPC, GrpGPC -> { @ GrpGPCElt  @}, Map`

## `RightTransversal(G, H): GrpGPC, GrpGPC -> { @ GrpGPCElt  @}, 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$. The right transversal and its enumeration are identical to those internally used by the function [`CosetTable`](#function-grpgpc-cosettable).

**(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$.

## `Example: Coset Table (ex-fcfe92)`

We compute a right transversal of a subgroup $H$ of the infinite dihedral group $G$.

```magma
> G<a,b> := DihedralGroup(GrpGPC, 0);
> H := sub<G|a*b, b^10>;
> Index(G, H);
10
> RT, transmap := Transversal(G, H);
> RT;
{@ Id(G), b^-1, b^-2, b^-3, b^-4, b^-5, b^-6, b^-7, b^-8, b^-9 @}
> transmap;
Mapping from: GrpGPC: G to SetIndx: RT

```

From this a left transversal is easily obtained:

```magma
> LT := {@ x^-1 : x in RT @};
> LT;
{@ Id(G), b, b^2, b^3, b^4, b^5, b^6, b^7, b^8, b^9 @}

```

We construct the coset table and define a function $RT\times G \rightarrow RT$, describing the action of $G$ on the set of right cosets of $H$ in $G$.

```magma
> ct := CosetTable(G, H);
> action := func< r, g | RT[ct(Index(RT, r), g)] >;
> action(Id(G), b);
b^-9

```

i.e. $H*b = Hb^{-9}$.

```magma
> action(b^-4, a*b);
b^-6

```

i.e. $Hb^{-4}*(ab) = Hb^{-6}$.

Note that the definition of the function `action` relies on the fact that the computed right transversal and its enumeration are identical to those internally used by the function [`CosetTable`](#function-grpgpc-cosettable).

## `CosetAction(G, H): GrpGPC, GrpGPC -> Map, GrpPerm, GrpGPC`

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

**(a)**
The permutation representation $f: G \rightarrow L \leq {\rm Sym}(|G\!:\!H|)$, induced by the action of $G$ on the set of (right) cosets of $H$ in $G$;

**(b)**
The epimorphic image $L$ of $G$ under the representation $f$;

**(c)**
The kernel $K$ of the representation $f$.

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

Given a subgroup $H$ of the group $G$ of finite index, construct the permutation group, induced by the action of $G$ on the set of (right) cosets of $H$ in $G$. The returned group is the epimorphic image $L$ of $G$ under the permutation representation $f: G \rightarrow L \leq {\rm Sym}(|G\!:\!H|)$, induced by the action of $G$ on the set of (right) cosets of $H$ in $G$.

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

Given a subgroup $H$ of the group $G$ of finite index, construct the kernel of the permutation representation $f: G \rightarrow L \leq {\rm Sym}(|G\!:\!H|)$, induced by the action of $G$ on the set of (right) cosets of $H$ in $G$.

## `Example: Coset Action (ex-bf9acf)`

We use the function [`CosetAction`](#function-grpgpc-cosetaction) to construct a (non-faithful) permutation representation of the group $G$ defined by the polycyclic presentation

$$
< a, b, c\  |\ b^a = b*c, (a,c), (b,c) >.
$$

```magma
> F<a,b,c> := FreeGroup(3);
> rels := [ b^a=b*c, b^(a^-1)=b*c^-1 ];
> G<a,b,c> := quo<GrpGPC: F | rels>;
>
> S := sub<G|(a*b)^3, c^7, b^21>;
> Index(G, S);
441
> pi, P, K := CosetAction(G, S);
> P;
Permutation group P acting on a set of cardinality 441
> K;
GrpGPC : K of infinite order on 3 PC-generators
PC-Relations:
    K.2^K.1 = K.2 * K.3^63,
    K.2^(K.-1) = K.2 * K.-3^63
> Index(G, K);
3087

```

We express the generators of the kernel $K$ in terms of the generators of $G$:

```magma
> {@ G!x : x in PCGenerators(K) @};
{@ a^21, b^21, c^7 @}

```

$pi(S)$ is a point stabiliser in the transitive permutation group $P$ of degree 441 and hence should have index 441 in P:

```magma
> pi(S);
Permutation group acting on a set of cardinality 441
> Index(P, pi(S));
441

```
