# All Subgroups and Intermediate Subgroups

If you want a complete list of all subgroups of the (moderately small) finite group $G$ rather than a list of representatives of the conjugacy classes, then you can use the following function. There are also functions that output lists of minimal and of all overgroups of a given subgroup.

## `AllSubgroups(G): GrpFin -> [ SeqEnum ]`

A list of all subgroups of the finite group $G$.

## `MinimalOvergroups(G, H): GrpFin, GrpFin -> [ SeqEnum ]`

A list of all minimal overgroups in $G$ of the subgroup $H$ of the finite group $G$.

## `IntermediateSubgroups(G, H: parameters): GrpFin, GrpFin -> [ SeqEnum ]`

```magma
AllSubgroups: BoolElt                      Default: 
Print       : RngIntElt                    Default: 0
```

A list of all subgroups of $G$ that strictly contain the subgroup $H$ and are strictly contained in $G$.

There are two methods implemented for this. The first is to start by finding all subgroups of order divisible by $|H|$ and then to test which of these properly contain $H$. The second is to recursively call `MinimalOvergroups`.

`AllSubgroups`: If this is set to `true`, then the method involving finding all subgroups of order divisible by $|H|$ is used. If it is set to `false`, then the recursive method is used. If it is not set by the user, then Magma tries to choose which method will be faster, but this can be difficult to get right!

`Print:=0`: If this is nonzero then the method used is printed.
