.. _SectGrpCoxRootAction:

.. _rootrefl:

Reflections
===========

An element of a Coxeter group is called a *reflection* if it is conjugate to one
of the Coxeter generators.

In a permutation Coxeter group, the root :math:`\alpha` acts on the root space
via the reflection :math:`s_\alpha`; the coroot :math:`\alpha^\star` acts on the
coroot space via the coreflection :math:`s_\alpha^\star`.

.. magma:function:: IsReflection(w)
   :input_types: GrpFPElt
   :output_types: BoolElt
   :label: IsReflection_GrpFPElt

.. magma:function:: IsReflection(w)
   :input_types: GrpPermElt
   :output_types: BoolElt, ., ., RngInt
   :label: IsReflection_GrpPermElt

   Returns ``true`` if, and only if, :math:`w` is a reflection, i.e. :math:`w` is
   conjugate to a Coxeter generator. If :math:`w` is in a permutation Coxeter
   group, the root, coroot and root index are also returned.

.. magma:function:: Reflections(W)
   :input_types: GrpFPCox
   :output_types: [GrpFPCoxElt]
   :label: Reflections_GrpFPCox

.. magma:function:: Reflections(W)
   :input_types: GrpPermCox
   :output_types: [GrpPermElt]
   :label: Reflections_GrpPermCox

   The sequence of reflections in the finite Coxeter group :math:`W`. If :math:`W`
   is a permutation Coxeter group, the :math:`r`\ th reflection in the sequence
   corresponds to the :math:`r`\ th (co)root.

.. magma:example:: Example: Reflections
   :label: Reflections

   .. code-block:: magma

      > W<a,b> := CoxeterGroup(GrpFPCox, "A2");
      > Reflections(W);
      [ a, b, a * b * a, a, b, a * b * a ]
      > IsReflection(a*b);
      false
      %%a> assert not $1;

.. magma:function:: SimpleReflections(W)
   :input_types: GrpFPCox
   :output_types: [GrpFPCoxElt]
   :label: SimpleReflections_GrpFPCox

.. magma:function:: SimpleReflections(W)
   :input_types: GrpPermCox
   :output_types: [GrpPermElt]
   :label: SimpleReflections_GrpPermCox

   The sequence of simple reflections in the Coxeter group :math:`W`, ie, the
   generators of :math:`W`.

.. magma:function:: SimpleReflectionPermutations(W)
   :input_types: GrpPermCox
   :output_types: [GrpPermElt]
   :label: SimpleReflectionPermutations_GrpPermCox

   The sequence of simple reflections in the permutation Coxeter group :math:`W`,
   ie, the generators of :math:`W`.

.. magma:function:: Reflection(W, r)
   :input_types: GrpPermCox, RngIntElt
   :output_types: GrpPermElt
   :label: Reflection_GrpPermCox_RngIntElt

.. magma:function:: ReflectionPermutation(W, r)
   :input_types: GrpPermCox, RngIntElt
   :output_types: GrpPermElt
   :label: ReflectionPermutation_GrpPermCox_RngIntElt

   The reflection in permutation Coxeter group :math:`W` corresponding to the
   :math:`r`\ th (co)root. If :math:`r=1,\dots,n`, this is a generator of
   :math:`W`.

.. magma:function:: SimpleReflectionMatrices(W)
   :input_types: GrpPermCox
   :output_types: []
   :label: SimpleReflectionMatrices_GrpPermCox

.. magma:function:: SimpleCoreflectionMatrices(W)
   :input_types: GrpPermCox
   :output_types: []
   :label: SimpleCoreflectionMatrices_GrpPermCox

Basis : MonStgElt : “Standard"

The matrices giving the action of the simple (co)roots on the (co)root space of
the permutation Coxeter group :math:`W`.

.. magma:function:: ReflectionMatrices(W)
   :input_types: GrpPermCox
   :output_types: []
   :label: ReflectionMatrices_GrpPermCox

.. magma:function:: CoreflectionMatrices(W)
   :input_types: GrpPermCox
   :output_types: []
   :label: CoreflectionMatrices_GrpPermCox

Basis : MonStgElt : “Standard"

The matrices giving the action of the (co)roots on the (co)root space of the
permutation Coxeter group :math:`W`.

.. magma:function:: ReflectionMatrix(W, r)
   :input_types: GrpPermCox, RngIntElt
   :output_types: []
   :label: ReflectionMatrix_GrpPermCox_RngIntElt

.. magma:function:: CoreflectionMatrix(W, r)
   :input_types: GrpPermCox, RngIntElt
   :output_types: []
   :label: CoreflectionMatrix_GrpPermCox_RngIntElt

Basis : MonStgElt : “Standard"

The matrix giving the action of the :math:`r`\ th (co)root on the (co)root space
of the permutation Coxeter group :math:`W`.

.. magma:function:: ReflectionWords(W)
   :input_types: GrpPermCox
   :output_types: []
   :label: ReflectionWords_GrpPermCox

   The sequence of words in the simple reflections for all the reflections of the
   Coxeter group :math:`W`. These words are given as sequences of integers. In
   other words, if :math:`a = [a_1,\dots,a_l] = \hbox{\tt ReflectionWords(W)[r]}`,
   then :math:`s_{\alpha_r} = s_{\alpha_{a_1}} \cdots s_{\alpha_{a_l}}`.

.. magma:function:: ReflectionWord(W, r)
   :input_types: GrpPermCox, RngIntElt
   :output_types: []
   :label: ReflectionWord_GrpPermCox_RngIntElt

   The word in the simple reflections for the :math:`r`\ th reflection of the
   Coxeter group :math:`W`. The word is given as a sequence of integers. In other
   words, if :math:`a = [a_1,\dots,a_l] = \hbox{\tt ReflectionWord(W,r)}`, then
   :math:`s_{\alpha_r} = s_{\alpha_{a_1}} \cdots s_{\alpha_{a_l}}`.

.. magma:example:: Example: Action
   :label: Action

   .. code-block:: magma

      > W := CoxeterGroup("B3");
      > IsReflection(W.1*W.2);
      false
      %%a> assert not $1;
      > mx := ReflectionMatrix(W, 4);
      > perm := Reflection(W, 4);
      > wd := ReflectionWord(W, 4);
      > rt := VectorSpace(Rationals(), 3) ! Root(W,2);
      > RootPosition(W, rt * mx) eq 2^perm;
      true
      %%a> assert $1;
      > perm eq &*[ Reflection(W, r) : r in wd ];
      true
      %%a> assert $1;
      > 
      > mx := CoreflectionMatrix(W, 4);
      > CorootPosition(W, Coroot(W,2) * mx) eq 2^perm;
      true
      %%a> assert $1;
