.. _SectGrpPermCoxNew:

.. _subgroups:

Reflection Subgroups
====================

A *reflection subgroup* of a Coxeter group is a subgroup which is generated by a
set of reflections. Note that reflection subgroups are also Coxeter groups. The
most important class of reflection subgroups are the *standard parabolic
subgroups*, which are generated by a subset of the simple roots. Given a set of
indices :math:`J\subseteq \{1,\dots,\hbox{\tt Rank(W)}\}`, the corresponding
standard parabolic is denoted :math:`W_J`. A *parabolic subgroup* is a subgroup
which is conjugate to a standard parabolic subgroup. Note that in a reflection
subgroup, the elements are given as permutations of the roots of the *larger*
group.

Most of the functions in this section are currently only implemented for
permutation Coxeter groups with a root *datum* (rather than a root system).

.. magma:function:: ReflectionSubgroup(W, a)
   :input_types: GrpPermCox, $\{\}$
   :output_types: GrpPermCox
   :label: ReflectionSubgroup_GrpPermCox

   The reflection subgroup of the permutation Coxeter group :math:`W` generated by
   the roots :math:`\alpha_{a_1},\dots,\alpha_{a_k}` where
   :math:`a=\{a_1,\dots,a_k\}` is a set of integers. This only works if :math:`W`
   has an underlying root datum.

.. magma:function:: ReflectionSubgroup(W, s)
   :input_types: GrpPermCox, []
   :output_types: GrpPermCox
   :label: ReflectionSubgroup_GrpPermCox_2

   The reflection subgroup of the permutation Coxeter group :math:`W` generated by
   simple roots :math:`\alpha_{s_1},\dots,\alpha_{s_k}` where
   :math:`s=[s_1,\dots,s_k]` is a *sequence* of integers. In this version the roots
   must be simple in the root subdatum (ie. none of them may be a summand of
   another) otherwise an error is signalled. The simple roots will appear in the
   reflection subgroup in the given order. This only works if :math:`W` has an
   underlying root datum.

.. magma:function:: StandardParabolicSubgroup(W, J)
   :input_types: GrpPermCox, $\{\}$
   :output_types: GrpPermCox
   :label: StandardParabolicSubgroup_GrpPermCox

   The standard parabolic subgroup of the Coxeter group :math:`W` generated by the
   simple roots :math:`\alpha_{j_1},\dots,\alpha_{j_k}` where
   :math:`J=\{j_1,\dots,j_k\}\subseteq\{1,\dots,\hbox{\tt Rank(W)}\}`. This
   function works for both finitely presented and permutation Coxeter groups.

.. magma:function:: IsReflectionSubgroup(W, H)
   :input_types: GrpPermCox, GrpPermCox
   :output_types: BoolElt
   :label: IsReflectionSubgroup_GrpPermCox_GrpPermCox

   Returns ``true`` if, and only if, :math:`H` is a reflection subgroup of the
   permutation Coxeter group :math:`W`.

.. magma:function:: IsParabolicSubgroup(W, H)
   :input_types: GrpPermCox, GrpPermCox
   :output_types: BoolElt
   :label: IsParabolicSubgroup_GrpPermCox_GrpPermCox

   Returns ``true`` if, and only if, :math:`H` is a parabolic subgroup of the
   permutation Coxeter group :math:`W`.

.. magma:function:: IsStandardParabolicSubgroup(W, H)
   :input_types: GrpPermCox, GrpPermCox
   :output_types: BoolElt
   :label: IsStandardParabolicSubgroup_GrpPermCox_GrpPermCox

   Returns ``true`` if, and only if, :math:`H` is a standard parabolic subgroup of
   the permutation Coxeter group :math:`W`.

.. magma:function:: Overgroup(H)
   :input_types: GrpPermCox
   :output_types: GrpPermCox
   :label: Overgroup_GrpPermCox

   The overgroup of :math:`H`, ie. the Coxeter group whose roots are permuted by
   the elements of the permutation Coxeter subgroup :math:`H`.

.. magma:function:: Overdatum(H)
   :input_types: GrpPermCox
   :output_types: RootDtm
   :label: Overdatum_GrpPermCox

   The root datum whose roots are permuted by the elements of the permutation
   Coxeter subgroup :math:`H`.

.. magma:function:: LocalCoxeterGroup(H)
   :input_types: GrpPermCox
   :output_types: GrpPermCox, Map
   :label: LocalCoxeterGroup_GrpPermCox

   Given a Coxeter subgroup :math:`H` this returns the Coxeter group :math:`L`
   isomorphic to :math:`H` but acting on the roots of :math:`H` itself rather than
   the roots of its overgroup, together with the isomorphism :math:`L\to H`.

.. magma:example:: Example: Reflection Subgroups
   :label: ReflectionSubgroups

   .. code-block:: magma

      > W := CoxeterGroup("A4");
      > P := StandardParabolicSubgroup(W, {1,2});
      > Overgroup(P) eq W;
      true
      %%a> assert $1;
      > L, h := LocalCoxeterGroup(P);
      > hinv := Inverse(h);
      > L.1;   
      (1, 4)(2, 3)(5, 6)
      > h(L.1);
      (1, 11)(2, 5)(6, 8)(9, 10)(12, 15)(16, 18)(19, 20)
      > hinv(h(L.1));
      (1, 4)(2, 3)(5, 6)

.. magma:function:: Transversal(W, H)
   :input_types: GrpPermCox, GrpPermCox
   :output_types: {@ @}
   :label: Transversal_GrpPermCox_GrpPermCox

   The indexed set of (right) coset representatives of the reflection subgroup
   :math:`H` of the Coxeter group :math:`W`. This contains the unique element of
   shortest length in each coset. The algorithm is due to Don Taylor (personal
   communication).

.. magma:function:: TransversalWords(W, H)
   :input_types: GrpPermCox, GrpPermCox
   :output_types: {@ @}
   :label: TransversalWords_GrpPermCox_GrpPermCox

   The indexed set of words of (right) coset representatives of the reflection
   subgroup :math:`H` of the Coxeter group :math:`W`. The algorithm is due to Don
   Taylor (personal communication).

.. magma:function:: TransversalElt(W, H, x)
   :input_types: GrpPermCox, GrpPermCox, GrpPermElt
   :output_types: GrpPermElt
   :label: TransversalElt_GrpPermCox_GrpPermCox_GrpPermElt

   The representative of the coset :math:`Hx` in the Coxeter group :math:`W`. This
   is the unique element of :math:`Hx` of shortest length in :math:`W` and also the
   unique element of :math:`Hx` which sends every positive root of :math:`H` to
   another positive root. The algorithm is due to Don Taylor (personal
   communication).

.. magma:example:: Example: Transversals
   :label: Transversals

   .. code-block:: magma

      > W := CoxeterGroup("A4");
      > P := StandardParabolicSubgroup(W, {1,2});
      > x := W.1 * W.2 * W.3;
      > x := TransversalElt(W, P, x);
      > x eq W.3;
      true
      %%a> assert $1;
      > x in Transversal(W, P);
      true
      %%a> assert $1;

.. magma:function:: TransversalElt(W, x, H)
   :input_types: GrpPermCox, GrpPermElt, GrpPermCox
   :output_types: GrpPermElt
   :label: TransversalElt_GrpPermCox_GrpPermElt_GrpPermCox

   The representative of the coset :math:`xH` in the Coxeter group :math:`W`. This
   is the unique element of :math:`xH` of shortest length in :math:`W` and also the
   unique element of :math:`xH` which sends every positive root of :math:`H` to
   another positive root.

.. magma:function:: TransversalElt(W, H, x, J)
   :input_types: GrpPermCox, GrpPermCox, GrpPermElt, GrpPermCox
   :output_types: GrpPermElt
   :label: TransversalElt_GrpPermCox_GrpPermCox_GrpPermElt_GrpPermCox

   The representative of the coset :math:`HxJ` in the Coxeter group :math:`W`. This
   is the unique element of :math:`HxJ` of shortest length in :math:`W` and also
   the unique element of :math:`HxJ` which sends every positive root of :math:`HJ`
   to another positive root.

.. magma:function:: Transversal(W, J)
   :input_types: GrpFPCox, $\{$RngIntElt$\}$
   :output_types: $\{@$ GrpFPCoxElt $@\}$
   :label: Transversal_GrpFPCox_RngIntElt

.. magma:function:: Transversal(W, J, L)
   :input_types: GrpFPCox, $\{$RngIntElt$\}$, RngIntElt
   :output_types: $\{@$ GrpFPCoxElt $@\}$
   :label: Transversal_GrpFPCox_RngIntElt_RngIntElt

   The set of right coset representatives of minimal length for the standard
   parabolic subgroup :math:`W_J \le W`. In the first form :math:`W` must be finite
   and the result is a full transversal. In the second form :math:`W` may be
   infinite, but the transversal produced is limited to words of length at most
   :math:`L`.

.. magma:function:: Transversal(W, J, K)
   :input_types: GrpFPCox, $\{$RngIntElt$\}$, $\{$RngIntElt$\}$
   :output_types: [ GrpFPCoxElt ], [ ]
   :label: Transversal_GrpFPCox_RngIntElt_RngIntElt_2

   The sequence of :math:`W_J,W_K`-double cosets representatives of minimal length
   in :math:`W`. Restricted to :math:`W` finite. The second return value gives the
   generators of the standard parabolic subgroup :math:`W_J\cap W_K^d` for each
   double coset representative :math:`d`.

.. magma:function:: DirectProduct(W1, W2)
   :input_types: GrpPermCox, GrpPermCox
   :output_types: GrpPermCox
   :label: DirectProduct_GrpPermCox_GrpPermCox

   The direct product of the Coxeter groups :math:`W_1` and :math:`W_2`.

.. magma:function:: Dual(W)
   :input_types: GrpPermCox
   :output_types: GrpPermCox
   :label: Dual_GrpPermCox

   The dual of the Coxeter group :math:`W`, obtained by swapping the roots and
   coroots.

.. magma:example:: Example: Sum Dual
   :label: SumDual

   .. code-block:: magma

      > W1 := CoxeterGroup("G2");
      > W2 := CoxeterGroup("C3");
      > DirectProduct(W1, Dual(W2));
      Coxeter group: Permutation group acting on a set of cardinality 30
      Order = 576 = 2^6 * 3^2
          (1, 7)(2, 5)(3, 4)(8, 11)(9, 10)
          (1, 3)(2, 8)(5, 6)(7, 9)(11, 12)
          (13, 22)(14, 16)(17, 20)(19, 21)(23, 25)(26, 29)(28, 30)
          (13, 16)(14, 23)(15, 17)(18, 21)(22, 25)(24, 26)(27, 30)
          (14, 19)(15, 24)(16, 21)(23, 28)(25, 30)
      > W1 := CoxeterGroup(GrpFPCox, "G2");
      > W2 := CoxeterGroup(GrpFPCox, "A2");
      > DirectProduct(W1, W2);
      Coxeter group: Finitely presented group on 4 generators
      Relations
          $.1 * $.2 * $.1 = $.2 * $.1 * $.2
          $.1 * $.3 = $.3 * $.1
          $.1 * $.4 = $.4 * $.1
          $.2 * $.3 = $.3 * $.2
          $.2 * $.4 = $.4 * $.2
          $.3 * $.4 * $.3 = $.4 * $.3 * $.4
          $.1^2 = Id($)
          $.2^2 = Id($)
          $.3^2 = Id($)
          $.4^2 = Id($)
