# Elementary Properties of a Group

## Accessing Group Information

The functions in this group provide access to basic information stored for a permutation group $G$.

### `G . i: GrpPerm, RngIntElt -> GrpPermElt`

The $i$-th defining generator for $G$. A negative subscript indicates that the inverse of the generator is to be created. The identity element of $G$ will be created by `G.0`.

### `Degree(G): GrpPermElt -> RngIntElt`

The degree of the permutation group $G$.

### `Generators(G): GrpPerm -> { GrpPermElt }`

A set of elements of $G$ that generate $G$.

### `GeneratorsSequence(G): GrpPerm -> [ GrpPermElt ]`

The sequence of elements used to define the group $G$. Any occurrences of the identity element or any repetitions of a generator, as removed by `Generators(G)`, are retained in this sequence. This function has the same effect as the expression `[G.i : i in [1..Ngens(G)]] `.

### `NumberOfGenerators(G): GrpPerm -> RngIntElt`

### `Ngens(G): GrpPerm -> RngIntElt`

The number of defining generators for $G$.

### `FewGenerators(G): GrpPerm -> [GrpPermElt]`

A typically short sequence of random elements generating the group. Especially when groups are generated as subgroups, the result of `FewGenerators` is a much shorter sequence than returned by [`GeneratorsSequence`](#function-grpperm-generatorssequence).

### `Generic(G): GrpPerm -> GrpPerm`

The generic group containing $G$, i.e. the symmetric group in which $G$ is naturally embedded.

### `Parent(g): GrpPermElt -> GrpPerm`

The parent group $G$ for the permutation $g$.

### `GSet(G): GrpPerm -> GSet`

The natural $G$-set for the permutation group $G$.

### `Example: Basic Access (ex-e70b28)`

Consider the group $G$ of order $648$ generated by the permutations (1,6,7)(2,5,8,3,4,9)(11,12) and (1,3)(4,9,12)(5,8,10,6,7,11).

```magma
> G := PermutationGroup< 12 | (1,6,7)(2,5,8,3,4,9)(11,12),
>                             (1,3)(4,9,12)(5,8,10,6,7,11) >;
> G;
Permutation group G acting on a set of cardinality 12
    (1, 6, 7)(2, 5, 8, 3, 4, 9)(11, 12)
    (1, 3)(4, 9, 12)(5, 8, 10, 6, 7, 11)
> G.1;
(1, 6, 7)(2, 5, 8, 3, 4, 9)(11, 12)
> G.1*G.2;
(1, 7, 3, 9, 2, 8)(4, 12, 5, 10, 6, 11)
> Degree(G);
12
> GSet(G);
GSet{@ 1 .. 12 @}
> Generic(G);
Symmetric group acting on a set of cardinality 12
Order = 479001600 = 2^10 * 3^5 * 5^2 * 7 * 11
> Generators(G);
{
    (1, 6, 7)(2, 5, 8, 3, 4, 9)(11, 12),
    (1, 3)(4, 9, 12)(5, 8, 10, 6, 7, 11)
}
> Ngens(G);
2
> x := G ! (1,6,7)(2,5,8,3,4,9)(11,12);
> x;
(1, 6, 7)(2, 5, 8, 3, 4, 9)(11, 12)
> Parent(x);
Permutation group G acting on a set of cardinality 12
Order = 648 = 2^3 * 3^4
    (1, 6, 7)(2, 5, 8, 3, 4, 9)(11, 12)
    (1, 3)(4, 9, 12)(5, 8, 10, 6, 7, 11)
]

```

## Group Order

Unless the order is already known, each of the functions in this family will create a base and strong generating set for the group if one does not already exist.

### `Order(G): GrpPerm -> RngIntElt`

### `# G: GrpPerm -> RngIntElt`

The order of the group $G$ as an integer. If the order is not currently known, a base and strong generating set will be constructed for $G$.

### `FactoredOrder(G): GrpPerm -> [ <RngIntElt, RngIntElt> ]`

The order of the group $G$ returned as a factored integer. The factorization is returned in the form of a sequence $Q$ which is defined as follows: If $\# G = p_1^{e_1}\ldots p_n^{e_n}, \quad e_i \neq 0$, then $Q$ will be the integer sequence $[ <p_1, e_1>, \ldots, <p_n, e_n> ]$. If the order of $G$ is not known, it will be computed.

## Abstract Properties of a Group

### `IsAbelian(G): GrpPerm -> BoolElt`

Returns `true` if the group $G$ is abelian, `false` otherwise.

### `IsCyclic(G): GrpPerm -> BoolElt`

Returns `true` if the group $G$ is cyclic, `false` otherwise.

### `IsElementaryAbelian(G): GrpPerm -> BoolElt`

Returns `true` if the group $G$ is elementary abelian, `false` otherwise.

### `IsSpecial(G): GrpPerm -> BoolElt`

Given a $p$-group $G$, return `true` if $G$ is special, `false` otherwise.

### `IsExtraSpecial(G): GrpPerm -> BoolElt`

Given a group $G$ is a $p$-group $G$, return `true` if $G$ is extra-special, `false` otherwise.

### `IsNilpotent(G): GrpPerm -> BoolElt`

Returns `true` if the group $G$ is nilpotent, `false` otherwise.

### `IsSoluble(G): GrpPerm -> BoolElt`

### `IsSolvable(G): GrpPerm -> BoolElt`

Returns `true` if the group $G$ is soluble, `false` otherwise. Uses the algorithm of Sims [[Sims, 1990](../../references.md#cite-sol-schreier)].

### `IsPerfect(G): GrpPerm -> BoolElt`

Returns `true` if the group $G$ is perfect, `false` otherwise.

### `IsSimple(G): GrpPerm -> BoolElt`

Returns `true` if the group $G$ is simple, `false` otherwise.

### `IsWreathProduct(G): GrpPerm -> BoolElt, GrpPerm, GrpPerm, GrpPerm`

Returns `true` if the group $G$ is isomorphic to a wreath product $A \wr B$, where $B$ is transitive, and `false` otherwise. If true, then three subgroups of $G$, call them $A$, $B$, $C$, are also returned. In this case we have $G$ isomorphic to `WreathProduct(A, CosetImage(B, C))`.

### `Example: Basic Properties (ex-c8fc8b)`

We determine the orders of those subgroups of the Mathieu group $M_{24}$ which are perfect but not simple. We use the function `PerfectSubgroups` which returns a representative from each conjugacy class of perfect subgroups.

```magma
> load m24;
Loading "/home/magma/libs/pergps/m24"
M24 - Mathieu group on 24 letters - degree 24
Order 244 823 040 = 2^10 * 3^3 * 5 * 7 * 11 * 23;  Base 1,2,3,4,5,6,7
Group: G
> time S := PerfectSubgroups(G);
Time: 29.460
> [ Order(H) : R in S | not IsSimple(H) where H := R`subgroup ];
[ 120, 120, 120, 180, 180, 240, 240, 336, 336, 336, 336, 504, 720, 1008, 1080,
  960, 960, 960, 1344, 1344, 1344, 1920, 2688, 2688, 2688, 2688, 2688, 2880,
  3840, 3840, 5760, 10752, 11520, 11520, 40320, 21504, 21504, 32256, 64512,
  69120, 322560 ]

```
