# Stored Attributes of an Automorphism Group

Groups of automorphisms have several attributes that may be stored as part of their data structure. The function `HasAttribute` is used to test if an attribute is stored and to retrieve its value, while the function `AssertAttribute` is used to set attribute values. The user is warned that when using `AssertAttribute` the data given is *not* checked for validity, apart from some simple type checks. *Setting attributes incorrectly will result in errors.*

## `HasAttribute(A, s): GrpAuto, MonStgElt -> BoolElt, .`

## `AssertAttribute(A, s, v): GrpAuto, MonStgElt, .`

The `HasAttribute` function returns whether the group of automorphisms $A$ has the attribute named by the string $s$ defined and, if so, also returns the value of the attribute.

The `AssertAttribute` procedure sets the attribute of the group of automorphisms group named by string $s$ to have value $v$. The possible names are:

`Group`: The base group of the automorphism group. This is always set.

`Order`: The order of the automorphism group. It is an integer and may be set by giving either an integer or a factored integer.

`OuterOrder`: The order of the outer automorphism group associated with $A$. It is an integer and may be set by giving either an integer or a factored integer.

`Soluble`: (also `Solvable`) A boolean value telling whether or not the automorphism group is soluble.

`InnerGenerators`: A sequence of generators of $A$ known to be inner automorphisms.

`InnerMap`: A homomorphism from the base group to the automorphism group taking each base group element to its corresponding inner automorphism.

`ClassAction`: Stores the result of the `PermutationRepresentation` function call.

`ClassImage`: Stores the result of the `PermutationGroup` function call.

`ClassUnion`: Stores the result of the `ClassUnion` function call.

`FpGroup`: Stores the result of the `FPGroup` function call. The attribute is a pair $\langle F, m \rangle$ where $F$ is an fp-group and $m$ is an isomorphism $m:F\to A$. $F$ and $m$ are the two return values of `FPGroup(A)`.

`OuterFpGroup`: Stores the result of the `OuterFPGroup` function call. The attribute is a pair $\langle O, f \rangle$ where $O$ is an fp-group and $f$ is an epimorphism $f:F\to O$, where $F$ is the first component of the `FpGroup` attribute. The kernel of $f$ is the inner automorphism group. $O$ and $f$ are the two return values of `OuterFPGroup(A)`.

`GenWeights`: `WeightSubgroupOrders`: See the section on automorphism groups in the chapter on soluble groups for details.

## `Example: characteristicsubgps (ex-0cc28f)`

We select a group of order 904 from the small groups database and compute its group of automorphisms.

```magma
> G := SmallGroup(904, 4);
> FactoredOrder(G);
[ <2, 3>, <113, 1> ]
> FactoredOrder(Centre(G));
[ <2, 1> ]
> A := AutomorphismGroup(G);
> FactoredOrder(A);
[ <2, 7>, <7, 1>, <113, 1> ]
> HasAttribute(A, "FpGroup");
false
> HasAttribute(A, "OuterFpGroup");
false
> F,m := FPGroup(A);
> AssertAttribute(A, "FpGroup", <F,m>);

```

Note that values for some attributes, such as `FpGroup`, have not been calculated by the original `AutomorphismGroup` call, but they may be calculated and set later if desired. The outer automorphism group has order $2^5\times 7$. We find the characteristic subgroups of `G`.

```magma
> n := NormalSubgroups(G);
> [x`order : x in n];
[ 1, 2, 113, 4, 226, 452, 452, 452, 904 ]
> characteristics := [s : x in n |
>   forall{f: f in Generators(A) | s@f eq s}
>   where s is x`subgroup];
> [#s : s in characteristics];
[ 1, 2, 113, 4, 226, 452, 904 ]

```

Note that two of the normal subgroups of order 452 are not characteristic.

## `Example: Auto Maximals (ex-531b03)`

```magma
> G := AlternatingGroup(6);
> A := AutomorphismGroup(G);
> HasAttribute(A, "OuterFpGroup");
true
> F, f := FPGroup(A);
> O, g := OuterFPGroup(A);
> O;
Finitely presented group O on 2 generators
Relations
  O.1^2 = Id(O)
  O.2^2 = Id(O)
  (O.1 * O.2)^2 = Id(O)
> A`OuterOrder;
4

```

We find the outer automorphism group is elementary abelian of order 4. The direct product of `G` with itself has maximal subgroups isomorphic to `G`, in the form of diagonal subgroups. We can construct four non-conjugate examples using the outer automorphism group. The first example can be constructed without using an outer automorphism.

```magma
> GG, ins := DirectProduct(G, G);
> M := sub<GG|[(x@ins[1])*(x@ins[2]):x in Generators(G)]>;
> IsMaximal(GG, M);
true

```

The subgroup `M` is the first, the obvious diagonal, constructed using just the embeddings returned by the direct product function. We get others by twisting the second factor using an outer automorphism. First we get (representatives of) the outer automorphisms explicitly.

```magma
> outers := {x @@ g @ f : x in [O.1, O.2, O.1*O.2]};
> Representative(outers);
Automorphism of GrpPerm: G, Degree 6, Order 2^3 * 3^2 * 5 which maps:
  (1, 2)(3, 4, 5, 6) |--> (1, 3, 6, 2)(4, 5)
  (1, 2, 3) |--> (1, 4, 2)(3, 5, 6)

```

The set `outers` now contains three distinct outer automorphisms of `G`. We use them to get three more diagonal subgroups.

```magma
> diags := [M] cat
> [sub<GG|[(x @ ins[1])*(x @ f @ ins[2]):x in Generators(G)]>:
>   f in outers];
> [IsMaximal(GG, m) : m in diags];
[ true, true, true, true ]
> IsConjugate(GG, diags[2], diags[4]);
false

```

The other five tests for conjugacy will give similarly negative results.
