# Sylow Subgroups

We present here the functionality which allows to compute the Sylow subgroups of finite groups of Lie type.

## `PrintSylowSubgroupStructure(G): GrpLie`

This procedure prints out a list of all primes $p$ dividing the order of the group of Lie type $G$ along with the “goodness” of $p$, the exponent of $p$ in the factorisation of $|G|$ and a sequence of integers. The positive integers give the orders of the decomposition of a torus $T_w$ into cyclic groups such that the Sylow subgroup is contained in $\langle T_w, C_W(w) \rangle$. The negative number indicates the $p$-part coming from $C_W(w)$. If more than one such torus exists, then one line is printed for each of them.

A prime is said to be “GOOD” if it is equal to the characteristic of the base field $k$ of $G$, “good” if the Sylow subgroup is abelian, thus contained in a torus, and “bad” if it is not abelian and thus not contained in a torus. See [[Haller, 2005](../../references.md#cite-sh)] for the algorithm used.

## `SylowSubgroup(G, p): GrpLie, RngIntElt -> List`

Compute a $p$-Sylow subgroup $S$ of the group of Lie type $G$. Returned is a list of a two sequences. The second sequence contains generators of $S$. The first one is a sequence of integers giving the orders of the respective generator if the generator is a torus element and the negative of the order of $\langle g \rangle/(\langle g \rangle \cap T_w)$ in case the generator $g$ is not a torus element. See [[Haller, 2005](../../references.md#cite-sh)] for the algorithm used.

## `Example: Grp Lie Sylow (ex-dd465e)`

Compute

```magma
> G := GroupOfLieType("G2", 5);
> PrintSylowSubgroupStructure(G);
G: Group of Lie type G2 over Finite field of size 5
Order(G) is  2^6 * 3^3 * 5^6 * 7^1 * 31^1
Order(W) is  2^2 * 3^1
...compute tori...
...compute sylows...
   2 (bad)  : 6 [ 4, 4, -4 ]
   3 (bad)  : 3 [ 6, 6, -3 ]
   5 (GOOD) : The unipotent subgroup of G
   7 (good) : 1 [ 21 ]
   31 (good) : 1 [ 31 ]
> SylowSubgroup(G,2);
[*
    [ 4, 4, -2, -2 ],
    [ (2 1) , (1 2) , n2 , n1 n2 n1 n2 n1 n2  ]
*]

```

note that the orders of the non-toral elements is not necessarily the corresponding integer in the first sequence:

```magma
> gens := $1[2];
> [ Order(g) : g in gens ];
[ 4, 4, 4, 4 ]

```

but, in this example, their squares are contained in the torus:

```magma
> gens[3]^2 eq gens[2]^2, gens[4]^2 eq gens[2]^2;
true true

```
