.. _SectGrpLieSylow:

.. _sylow-subgroups:

Sylow Subgroups
===============

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

.. magma:function:: PrintSylowSubgroupStructure(G)
   :input_types: GrpLie
   :label: PrintSylowSubgroupStructure_GrpLie

   This procedure prints out a list of all primes :math:`p` dividing the order of
   the group of Lie type :math:`G` along with the “goodness” of :math:`p`, the
   exponent of :math:`p` in the factorisation of :math:`|G|` and a sequence of
   integers. The positive integers give the orders of the decomposition of a torus
   :math:`T_w` into cyclic groups such that the Sylow subgroup is contained in
   :math:`\langle T_w, C_W(w) \rangle`. The negative number indicates the
   :math:`p`-part coming from :math:`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 :math:`k` of :math:`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 :cite:`SH` for the algorithm used.

.. magma:function:: SylowSubgroup(G, p)
   :input_types: GrpLie, RngIntElt
   :output_types: List
   :label: SylowSubgroup_GrpLie_RngIntElt

   Compute a :math:`p`-Sylow subgroup :math:`S` of the group of Lie type :math:`G`.
   Returned is a list of a two sequences. The second sequence contains generators
   of :math:`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 :math:`\langle g \rangle/(\langle g \rangle \cap T_w)` in case the
   generator :math:`g` is not a torus element. See :cite:`SH` for the
   algorithm used.

.. magma:example:: Example: Grp Lie Sylow
   :label: GrpLieSylow

   Compute note that the orders of the non-toral elements is not necessarily the
   corresponding integer in the first sequence: but, in this example, their squares
   are contained in the torus:

   .. code-block:: 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  ]
      *]
      > gens := $1[2];
      > [ Order(g) : g in gens ];
      [ 4, 4, 4, 4 ]
      > gens[3]^2 eq gens[2]^2, gens[4]^2 eq gens[2]^2;
      true true
