# Finding Elements with Prescribed Properties

## `RandomElementOfOrder(G, n : parameters): GrpMat, RngIntElt -> BoolElt, GrpMatElt, GrpSLPElt, BoolElt`

```magma
Central   : BoolElt                        Default: false
Proof     : BoolElt                        Default: true
Randomiser: GrpRandProc                    Default: 
MaxTries  : RngIntElt                      Default: 100
```

Given a finite matrix group $G$, this intrinsic attempts to locate an element $x$ of order $n$ in $G$ by random search. If such an element is found, then the return values are the boolean value `true`, the element $x$, and an SLP for this element.

If `Central` is `true`, then an element is sought which has order $n$ modulo the centre of $G$. If `Proof` is `false`, then the element returned may have order a multiple of $n$. In either case, the final return value indicates whether the element returned is known to have the precise order. The parameter `MaxTries` specifies the maximum number of random elements that are chosen. The parameter `Randomiser` specifies the random process that is to be used to construct the element and the SLP returned for the element is in the word group associated with this process. The default value of `Randomiser` is the process `RandomProcessWithWords(G)`.

## `RandomElementOfNormalClosure(G, N): Grp -> GrpElt`

Given a group $G$ and a subgroup $N$ of $G$, this intrinsic returns a random element of the normal closure of $N$ in $G$. Note that $G$ may be a permutation or matrix group. The algorithm is due to Leedham-Green and O’Brien [[Leedham-Green and O'Brien, 2002](../../references.md#cite-crlg-eaob)].

## `InvolutionClassicalGroupEven(G : parameters): GrpMat[FldFin] -> GrpMatElt[FldFin], GrpSLPElt, RngIntElt`

```magma
SmallCorank: BoolElt                      Default: false
Case       : MonStgElt                    Default: "unknown"
```

Let $G$ be a quasisimple classical group in its natural representation and in even characteristic. If $G$ is of type $\Omega^+$ or $\Omega^-$ then it must have even degree at least $4$ and be defined over a field with at least $4$ elements. The corank of an involution $I$ is the rank of $I-$`Identity`$(G)$. This function returns an involution $I$ of corank in $[d/4, \ldots, d/2]$, the SLP for $I$ in `WordGroup`$(G)$, and the corank of the involution. The parameter `Case` should be one of `"SL"`, `"Sp"`, `"SU"`, `"Omega-"`, or `"Omega+"`. If `SmallCorank` is `true`, then accept involution of small corank. The algorithm used to construct the involution is described in [[Dietrich *et al.*, 2013](../../references.md#cite-dlgo-even)]; it was implemented by Heiko Dietrich.
