# Creation of Automorphism Groups

An automorphism group of the finite group $G$ may be created in one of two ways. Firstly, the full automorphism group of $G$ may be constructed by invoking an appropriate lifting algorithm. Secondly, an arbitrary group of automorphisms $A$ of $G$ may be created by giving a set of generators for $A$ defined in terms of their action on a set of generators for $G$.

## `AutomorphismGroup(G): Grp -> GrpAuto`

```magma
SmallOuterAutGroup: RngIntElt                    Default: 20000
Print             : RngIntElt                    Default: 0
PrintSearchCount  : RngIntElt                    Default: 1000
```

Given a finite group $G$, construct the full automorphism group $F$ of $G$. The group $G$ may be a permutation group, a (finite) matrix group or a finite soluble group given by a pc-presentation. The function returns the full automorphism group of $G$ as a group of mappings (i.e., as a group of type `GrpAuto`). If $G$ is a permutation or matrix group, then the automorphism group $F$ is also computed as a finitely presented group and can be accessed via the function `FPGroup(F)`. A function `PermutationRepresentation` is provided that when applied to $F$ attempts to construct a faithful permutation representation of reasonable degree (see below).

`SmallOuterAutGroup := t`: Specify the strategy for the backtrack search when testing an automorphism for lifting to the next layer. If the outer automorphism group $O$ at the previous level has order at most $t$, then the regular representation of $O$ is used, otherwise the program tries to find a smaller degree permutation representation of $O$.

The level of verbose printing. The possible values are 0, 1, 2 or 3.

`PrintSearchCount := s`: If `Print := 3`, then a message is printed at each $s$-th iteration during the backtrack search for lifting automorphisms.

In the case of a non-soluble group, the algorithm described in Cannon and Holt [[Cannon and Holt, 2003](../../references.md#cite-autos-permg)] is used. If $G$ is a $p$-group of type `GrpPC` the algorithm described in Eick, Leedham-Green and O’Brien [[Eick *et al.*, 2002](../../references.md#cite-elo-auts)] is used. For more details see Section [$p$-group](../FiniteSolubleGroups/automorphism-group.md#pgrp-auto). If $G$ is of type `GrpPC` but is not a $p$-group, the algorithm of Smith [[Smith, 1994](../../references.md#cite-smith-thesis)], as extended by Smith and Slattery, is used. For more details see Section [Automorphism Group](../FiniteSolubleGroups/automorphism-group.md#solgrp-auto).

When $G$ is a non-soluble permutation or matrix group, the algorithm relies on a database of automorphism groups for the non-cyclic simple factors of $G$, hence the non-abelian composition factors of $G$ must belong to a restricted list. In V2.11 this list includes all simple groups of order at most $1.6\times10^7$, the alternating groups of degree at most $1000$, all groups from several generic families, including $PSL(2, q)$, $PSL(3, q)$, $PSL(4, p)$, $PSL(5, p)$, $PSU(3, p)$ and $PSp(4, p)$ and the sporadic groups $M_{11}$, $M_{12}$, $M_{22}$, $M_{23}$, $M_{24}$, $J_1$, $J_2$, $J_3$, $HS$, $McL$, $Co3$, $He$ and others. The list is being extended regularly.

## `Example: Autogp Full (ex-1ac639)`

We create a non-soluble group $G$ of $4 \times 4$ matrices defined over the field of $8$-th roots of unity and construct its automorphism group.

```magma
> L<zeta_8> := CyclotomicField(8);
> i := -zeta_8^2;
> t := zeta_8^3;
> G := MatrixGroup< 4, L |
>            [ 1/2, 1/2, 1/2, 1/2,
>              1/2,-1/2, 1/2,-1/2,
>              1/2, 1/2,-1/2,-1/2,
>              1/2,-1/2,-1/2, 1/2 ],
>            DiagonalMatrix( [1,1,1,-1] ),
>            DiagonalMatrix( [1,i,1,i] ),
>            DiagonalMatrix( [t,t,t,t] ) >;
> Order(G);
92160
> CompositionFactors(G);
    G
    |  Cyclic(2)
    *
    |  Alternating(6)
    *
    |  Cyclic(2)
    *
    |  Cyclic(2)
    *
    |  Cyclic(2)
    *
    |  Cyclic(2)
    *
    |  Cyclic(2)
    *
    |  Cyclic(2)
    *
    |  Cyclic(2)
    1
> A := AutomorphismGroup(G);
> Order(A);
92160

```

## `AutomorphismGroup(G, Q, I): Grp, SeqEnum[GrpElt], SeqEnum[SeqEnum[GrpElt]] -> GrpAuto`

Let $G$ be a finite group and let $Q$ be a sequence of elements which generate $G$. Let $\phi_1, \ldots, \phi_r$ be a sequence of automorphisms of $G$ that generate the group of automorphisms $A$. The group $A$ is specified by a sequence $I$ of length $r$ where the $i$-th term of $I$ defines $\phi_i$ in terms of a sequence containing the images of the elements of $Q$ under the action of $\phi_i$. The function returns the group of automorphisms $A$ of $G$.
