# Unipotent Matrix Groups

The *power-conjugate presentation* is a very efficient way of representing a unipotent group; see Chapter [Finite Soluble Groups](../FiniteSolubleGroups/index-finite-soluble-groups.md#chapgrppc) for more information. In this section we describe a number of functions for finding such a *PC-presentation* for a unipotent matrix group defined over a finite field.

The algorithm used is a straightforward echelonisation-like procedure.

## `UnipotentMatrixGroup(G): GrpMat -> GrpMatUnip`

Given a matrix group $G$ defined over a finite field, the intrinsic constructs a known unipotent matrix group from $G$. Note that Magma does not at this stage check that $G$ is in fact unipotent.

## `WordMap(G): GrpMatUnip -> Map`

Given a unipotent matrix group $G$ defined over a finite field, the intrinsic constructs the *word map* for $G$. The word map is a map from $G$ to the group of straight-line programs on $n$ generators, where $n$ is the number of generators of $G$. More information on SLP-groups may be found in Chapter [Groups of Straight-Line Programs](../../FinitelyPresentedGroups/GroupsOfStraightLinePrograms/index-groups-of-straight-line-programs.md#chapgrpslp).

## `Example: Unip PC Word Map (ex-30af78)`

We construct a unipotent matrix group, and use the word map.

```magma
> G := MatrixGroup<4, GF(5) | [1,1,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1],
>       [1,-1,0,0, 0,1,1,0, 0,0,1,0, 0,0,0,1]>;
> G;
MatrixGroup(4, GF(5))
Generators:
    [1 1 0 0]
    [0 1 0 0]
    [0 0 1 0]
    [0 0 0 1]

    [1 4 0 0]
    [0 1 1 0]
    [0 0 1 0]
    [0 0 0 1]
> IsUnipotent(G);
true
>
> G := UnipotentMatrixGroup(G);
> g := GL(4,5)![1,4,4,0, 0,1,3,0, 0,0,1,0, 0,0,0,1];
> g in G;
true
> phi := WordMap(G);
> phi;
Mapping from: GL(4, GF(5)) to SLPGroup(2) given by a rule [no inverse]
>
> assert g in G;
> wg := phi(g); wg;
function(G)
    w6 := G.1^4; w1 := G.1^-4; w2 := G.2 * w1; w7 := w2^3; w8 := w6 *
    w7; w3 := G.1^-1; w4 := G.1^w2; w5 := w3 * w4; w9 := w5^2; w10 :=
    w8 * w9; return w10;
end function
> Evaluate(wg, G);
[1 4 4 0]
[0 1 3 0]
[0 0 1 0]
[0 0 0 1]
> Evaluate(wg, G) eq g;
true

```

## `PCPresentation(G): GrpMatUnip -> GrpPC, Map, Map`

Given a unipotent matrix group $G$ defined over a finite field, the intrinsic constructs a PC-presentation for $G$. It returns a finite soluble group $H$ as first return value, a map from $G$ to $H$ as the second value, and a map from $H$ to $G$ as the third.

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

## `# G: GrpMatUnip -> RngIntElt`

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

Given a unipotent matrix group $G$ defined over a finite field, this intrinsic returns the order of $G$ as an integer or as a factored integer (depending upon the choice of intrinsic). It is faster than the standard matrix group order intrinsic because of the use of the PC-presentation of $G$.

## `g in G: GrpMatElt, GrpMatUnip -> BoolElt`

Given a matrix $g$ and a unipotent matrix group $G$ defined over a finite field, the intrinsic returns `true` if $g$ is an element of $G$, and `false` otherwise. It is faster than the standard matrix group membership intrinsic because of the use of the PC-presentation of $G$.

## `Example: Unip PC Pres (ex-f568e8)`

We construct the PC-presentation of some Sylow subgroup and demonstrate the use of the `FactoredOrder` function.

```magma
> G := UnipotentMatrixGroup(ClassicalSylow(GL(9,7), 7));
> H,phi,psi := PCPresentation(G);
> phi;
Mapping from: GrpMatUnip: G to GrpPC: H given by a rule [no inverse]
> psi;
Mapping from: GrpPC: H to GrpMatUnip: G
> phi(G.2);
H.9
> psi(H.3);
[1 0 0 0 0 0 0 0 0]
[0 1 0 0 0 0 0 0 0]
[0 0 1 1 0 0 0 0 0]
[0 0 0 1 0 0 0 0 0]
[0 0 0 0 1 0 0 0 0]
[0 0 0 0 0 1 0 0 0]
[0 0 0 0 0 0 1 0 0]
[0 0 0 0 0 0 0 1 0]
[0 0 0 0 0 0 0 0 1]
> FactoredOrder(G);
[ <7, 36> ]

```
