.. _SectGrpRflGrpRflConstr:

.. _create-group-refl-real:

Construction of Real Reflection Groups
======================================

The only root of unity in the real field is :math:`-1`, hence every
pseudoreflection over the real field is a reflection. We call a reflection group
*real* if it is defined over the reals and its simple roots and simple coroots
are linearly independent. We allow real reflection groups to be defined as
matrix groups over the integer ring (Chapter :ref:`RngInt`), the
rational field (Chapter :ref:`FldRat`), number fields
(Chapter :ref:`FldNum:main`), and cyclotomic fields
(Chapter :ref:`ChapFldCyc`); the real field
(Chapter :ref:`ChapFldRe`) is *not* allowed since it is not infinite
precision.

The real reflection groups are just the reflection representations of the
Coxeter groups (Chapter :ref:`ChapGrpCox`). This allows us to
compute many more properties for these groups than for general reflection
groups. Note that the classification of finite real reflection groups is given
in Section :ref:`SectCartanFinAff`.

.. magma:function:: ReflectionGroup(M)
   :input_types: AlgMatElt
   :output_types: GrpMat
   :label: ReflectionGroup_AlgMatElt

.. magma:function:: ReflectionGroup(G)
   :input_types: GrphUnd
   :output_types: GrpMat
   :label: ReflectionGroup_GrphUnd

.. magma:function:: ReflectionGroup(C)
   :input_types: AlgMatElt
   :output_types: GrpMat
   :label: ReflectionGroup_AlgMatElt_2

.. magma:function:: ReflectionGroup(D)
   :input_types: GrphDir
   :output_types: GrpMat
   :label: ReflectionGroup_GrphDir

   The reflection group with Coxeter matrix :math:`M`, Coxeter graph :math:`G`,
   Cartan matrix :math:`C`, or Dynkin digraph :math:`D` (see
   Chapter :ref:`ChapCartan`).

.. magma:function:: ReflectionGroup(N)
   :input_types: MonStgElt
   :output_types: GrpMat
   :label: ReflectionGroup_MonStgElt

   The finite or affine reflection group with Cartan name given by the string
   :math:`N` (see Section :ref:`SectCartanFinAff`).

.. magma:function:: IrreducibleReflectionGroup(X, n)
   :input_types: MonStgElt,
   :label: IrreducibleReflectionGroup_MonStgElt

RngIntElt -> GrpMat

The finite or affine irreducible reflection group with Cartan name :math:`X_n`
(see Section :ref:`SectCartanFinAff`).

.. magma:example:: Example: Real Reflection Group By Cartan
   :label: RealReflectionGroupByCartan

   .. code-block:: magma

      > C := CartanMatrix("B3" : Symmetric);
      > G := ReflectionGroup(C);
      > G;
      MatrixGroup(3, Number Field with defining polynomial x^2 - 2 over the Rational
      Field) of order 48 = 2^4 * 3
      Generators:
      \    [-1  0  0]
      \    [ 1  1  0]
      \    [ 0  0  1]
      \bln 
      \    [  1   1   0]
      \    [  0  -1   0]
      \    [  0 $.1   1]
      \bln
      \    [  1   0   0]
      \    [  0   1 $.1]
      \    [  0   0  -1]

.. magma:function:: ReflectionGroup(R)
   :input_types: RootSys
   :output_types: GrpMat
   :label: ReflectionGroup_RootSys

.. magma:function:: ReflectionGroup(R)
   :input_types: RootDtm
   :output_types: GrpMat
   :label: ReflectionGroup_RootDtm

   The finite reflection group with root system or root datum :math:`R` (see
   Chapters :ref:`ChapRootSys` and :ref:`ChapRootDtm`).

.. magma:example:: Example: Real Reflection Group By Root Datum
   :label: RealReflectionGroupByRootDatum

   .. code-block:: magma

      > R := RootDatum("B3");
      > ReflectionGroup(R);
      MatrixGroup(3, Integer Ring) of order 48 = 2^4 * 3
      Generators:
          [-1  0  0]
          [ 1  1  0]
          [ 0  0  1]
      \bln 
          [ 1  1  0]
          [ 0 -1  0]
          [ 0  1  1]
      \bln 
          [ 1  0  0]
          [ 0  1  2]
          [ 0  0 -1]

.. magma:function:: ReflectionGroup(W)
   :input_types: GrpFPCox
   :output_types: GrpMat, Map
   :label: ReflectionGroup_GrpFPCox
   :parameters: A : Mtrx : ; B : Mtrx : ; C : Mtrx : 

   A reflection group :math:`W'` of the Coxeter group :math:`W`, together with the
   isomorphism :math:`W\rightarrow W'` (see
   Chapter :ref:`ChapGrpCox`). Since a Coxeter group :math:`W` does
   not come with an in-built reflection representation, the optional parameters
   :math:`A`, :math:`B`, and :math:`C` can be used to specify the representation.
   They are respectively the matrix whose rows are the simple roots, the matrix
   whose rows are the simple coroots, and the Cartan matrix. These must have the
   following properties:

   1. :math:`A` and :math:`B` must have same number of rows and the same number of
   columns; they must be defined over the same field, which must be the rational
   field, a number field, or a cyclotomic field; the entries must be real;

   2. the number of columns must be at least the number of rows; and

   3. :math:`C=AB^\tr` must be a Cartan matrix for :math:`W`.

   It is not necessary to specify all three matrices: any two of them will
   determine the third. If :math:`C` is not determined, it is taken to be the
   standard matrix described in Section :ref:`SectCartanCarMat`.

.. magma:function:: ReflectionGroup(W)
   :input_types: GrpPermCox
   :output_types: GrpMat, Map
   :label: ReflectionGroup_GrpPermCox

   The reflection group :math:`W'` isomorphic to the permutation Coxeter group
   :math:`W`, together with the isomorphism :math:`W\rightarrow W'` (see
   Chapter :ref:`ChapGrpCox`). There are no optional parameters
   :math:`A`, :math:`B`, and :math:`C` in this case because every permutation
   Coxeter group has a root system, and this determines the reflection
   representation.

.. magma:example:: Example: Reflection Group Conversion
   :label: ReflectionGroupConversion

   .. code-block:: magma

      > W<a,b,c> := CoxeterGroup(GrpFPCox, "B3");
      > G, h := CoxeterGroup(GrpMat, W);
      > a*b; h(a*b);
      a * b
      [-1 -1  0]
      [ 1  0  0]
      [ 0  1  1]
