Finite Complex Reflection Groups - Category Framework

Skip to content
Back to top
View this page
Edit this page

# Finite Complex Reflection Groups

class sage.categories.finite_complex_reflection_groups.FiniteComplexReflectionGroups(base_category)

  Bases: `CategoryWithAxiom`

  The category of finite complex reflection groups.

  See `ComplexReflectionGroups` for the definition of complex reflection group. In the finite case, most of the information about the group can be recovered from its degrees and codegrees, and to a lesser extent to the explicit realization as subgroup of \(GL(V)\). Hence the most important optional methods to implement are:

  - `ComplexReflectionGroups.Finite.ParentMethods.degrees()`,

  - `ComplexReflectionGroups.Finite.ParentMethods.codegrees()`,

  - `ComplexReflectionGroups.Finite.ElementMethods.to_matrix()`.

  Finite complex reflection groups are completely classified. In particular, if the group is irreducible, then it’s uniquely determined by its degrees and codegrees and whether it’s reflection representation is primitive or not (see [LT2009] Chapter 2.1 for the definition of primitive).

  See also

  Wikipedia article Complex_reflection_groups

  EXAMPLES:

  Sage

      sage: from sage.categories.complex_reflection_groups import ComplexReflectionGroups
      sage: ComplexReflectionGroups().Finite()
      Category of finite complex reflection groups
      sage: ComplexReflectionGroups().Finite().super_categories()
      [Category of complex reflection groups,
       Category of finite groups,
       Category of finite finitely generated semigroups]

  Python

      >>> from sage.all import *
      >>> from sage.categories.complex_reflection_groups import ComplexReflectionGroups
      >>> ComplexReflectionGroups().Finite()
      Category of finite complex reflection groups
      >>> ComplexReflectionGroups().Finite().super_categories()
      [Category of complex reflection groups,
       Category of finite groups,
       Category of finite finitely generated semigroups]

  An example of a finite reflection group:

  Sage

      sage: W = ComplexReflectionGroups().Finite().example(); W       # optional - gap3
      Reducible real reflection group of rank 4 and type A2 x B2

      sage: W.reflections()                                           # optional - gap3
      Finite family {1: (1,8)(2,5)(9,12), 2: (1,5)(2,9)(8,12),
                     3: (3,10)(4,7)(11,14), 4: (3,6)(4,11)(10,13),
                     5: (1,9)(2,8)(5,12), 6: (4,14)(6,13)(7,11),
                     7: (3,13)(6,10)(7,14)}

  [Python]

      >>> from sage.all import *
      >>> W = ComplexReflectionGroups().Finite().example(); W       # optional - gap3
      Reducible real reflection group of rank 4 and type A2 x B2

      >>> W.reflections()                                           # optional - gap3
      Finite family {1: (1,8)(2,5)(9,12), 2: (1,5)(2,9)(8,12),
                     3: (3,10)(4,7)(11,14), 4: (3,6)(4,11)(10,13),
                     5: (1,9)(2,8)(5,12), 6: (4,14)(6,13)(7,11),
                     7: (3,13)(6,10)(7,14)}

  `W` is in the category of complex reflection groups:

  Sage

      sage: W in ComplexReflectionGroups().Finite()                   # optional - gap3
      True

  Python

      >>> from sage.all import *
      >>> W in ComplexReflectionGroups().Finite()                   # optional - gap3
      True

  class ElementMethods

    Bases: `object`

    character_value()

      Return the value at `self` of the character of the reflection representation given by `to_matrix()`.

      EXAMPLES:

      Sage

          sage: W = ColoredPermutations(1,3); W                                   # needs sage.combinat
          1-colored permutations of size 3
          sage: [t.character_value() for t in W]                                  # needs sage.combinat sage.groups
          [3, 1, 1, 0, 0, 1]

      Python

          >>> from sage.all import *
          >>> W = ColoredPermutations(Integer(1),Integer(3)); W                                   # needs sage.combinat
          1-colored permutations of size 3
          >>> [t.character_value() for t in W]                                  # needs sage.combinat sage.groups
          [3, 1, 1, 0, 0, 1]

      Note that this could be a different (faithful) representation than that given by the corresponding root system:

      Sage

          sage: W = ReflectionGroup((1,1,3)); W      # optional - gap3
          Irreducible real reflection group of rank 2 and type A2
          sage: [t.character_value() for t in W]     # optional - gap3
          [2, 0, 0, -1, -1, 0]

          sage: W = ColoredPermutations(2,2); W                                   # needs sage.combinat
          2-colored permutations of size 2
          sage: [t.character_value() for t in W]                                  # needs sage.combinat sage.groups
          [2, 0, 0, -2, 0, 0, 0, 0]

          sage: W = ColoredPermutations(3,1); W                                   # needs sage.combinat
          3-colored permutations of size 1
          sage: [t.character_value() for t in W]                                  # needs sage.combinat sage.groups
          [1, zeta3, -zeta3 - 1]

      [Python]

          >>> from sage.all import *
          >>> W = ReflectionGroup((Integer(1),Integer(1),Integer(3))); W      # optional - gap3
          Irreducible real reflection group of rank 2 and type A2
          >>> [t.character_value() for t in W]     # optional - gap3
          [2, 0, 0, -1, -1, 0]

          >>> W = ColoredPermutations(Integer(2),Integer(2)); W                                   # needs sage.combinat
          2-colored permutations of size 2
          >>> [t.character_value() for t in W]                                  # needs sage.combinat sage.groups
          [2, 0, 0, -2, 0, 0, 0, 0]

          >>> W = ColoredPermutations(Integer(3),Integer(1)); W                                   # needs sage.combinat
          3-colored permutations of size 1
          >>> [t.character_value() for t in W]                                  # needs sage.combinat sage.groups
          [1, zeta3, -zeta3 - 1]

    reflection_length(in_unitary_group=False)

      Return the reflection length of `self`.

      This is the minimal numbers of reflections needed to obtain `self`.

      INPUT:

      - `in_unitary_group` – boolean (default: `False`); if `True`, the reflection length is computed in the unitary group which is the dimension of the move space of `self`

      EXAMPLES:

      Sage

          sage: W = ReflectionGroup((1,1,3))                # optional - gap3
          sage: sorted([t.reflection_length() for t in W])  # optional - gap3
          [0, 1, 1, 1, 2, 2]

          sage: W = ReflectionGroup((2,1,2))                # optional - gap3
          sage: sorted([t.reflection_length() for t in W])  # optional - gap3
          [0, 1, 1, 1, 1, 2, 2, 2]

          sage: W = ReflectionGroup((2,2,2))                # optional - gap3
          sage: sorted([t.reflection_length() for t in W])  # optional - gap3
          [0, 1, 1, 2]

          sage: W = ReflectionGroup((3,1,2))                # optional - gap3
          sage: sorted([t.reflection_length() for t in W])  # optional - gap3
          [0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]

      Python

          >>> from sage.all import *
          >>> W = ReflectionGroup((Integer(1),Integer(1),Integer(3)))                # optional - gap3
          >>> sorted([t.reflection_length() for t in W])  # optional - gap3
          [0, 1, 1, 1, 2, 2]

          >>> W = ReflectionGroup((Integer(2),Integer(1),Integer(2)))                # optional - gap3
          >>> sorted([t.reflection_length() for t in W])  # optional - gap3
          [0, 1, 1, 1, 1, 2, 2, 2]

          >>> W = ReflectionGroup((Integer(2),Integer(2),Integer(2)))                # optional - gap3
          >>> sorted([t.reflection_length() for t in W])  # optional - gap3
          [0, 1, 1, 2]

          >>> W = ReflectionGroup((Integer(3),Integer(1),Integer(2)))                # optional - gap3
          >>> sorted([t.reflection_length() for t in W])  # optional - gap3
          [0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]

    to_matrix()

      Return the matrix presentation of `self` acting on a vector space \(V\).

      EXAMPLES:

      Sage

          sage: W = ReflectionGroup((1,1,3))         # optional - gap3
          sage: [t.to_matrix() for t in W]           # optional - gap3
          [
          [1 0]  [ 1  1]  [-1  0]  [-1 -1]  [ 0  1]  [ 0 -1]
          [0 1], [ 0 -1], [ 1  1], [ 1  0], [-1 -1], [-1  0]
          ]

          sage: W = ColoredPermutations(1,3)                                      # needs sage.combinat
          sage: [t.to_matrix() for t in W]                                        # needs sage.combinat sage.groups
          [
          [1 0 0]  [1 0 0]  [0 1 0]  [0 0 1]  [0 1 0]  [0 0 1]
          [0 1 0]  [0 0 1]  [1 0 0]  [1 0 0]  [0 0 1]  [0 1 0]
          [0 0 1], [0 1 0], [0 0 1], [0 1 0], [1 0 0], [1 0 0]
          ]

      Python

          >>> from sage.all import *
          >>> W = ReflectionGroup((Integer(1),Integer(1),Integer(3)))         # optional - gap3
          >>> [t.to_matrix() for t in W]           # optional - gap3
          [
          [1 0]  [ 1  1]  [-1  0]  [-1 -1]  [ 0  1]  [ 0 -1]
          [0 1], [ 0 -1], [ 1  1], [ 1  0], [-1 -1], [-1  0]
          ]

          >>> W = ColoredPermutations(Integer(1),Integer(3))                                      # needs sage.combinat
          >>> [t.to_matrix() for t in W]                                        # needs sage.combinat sage.groups
          [
          [1 0 0]  [1 0 0]  [0 1 0]  [0 0 1]  [0 1 0]  [0 0 1]
          [0 1 0]  [0 0 1]  [1 0 0]  [1 0 0]  [0 0 1]  [0 1 0]
          [0 0 1], [0 1 0], [0 0 1], [0 1 0], [1 0 0], [1 0 0]
          ]

      A different representation is given by the colored permutations:

      Sage

          sage: W = ColoredPermutations(3, 1)                                     # needs sage.combinat
          sage: [t.to_matrix() for t in W]                                        # needs sage.combinat sage.groups
          [[1], [zeta3], [-zeta3 - 1]]

      [Python]

          >>> from sage.all import *
          >>> W = ColoredPermutations(Integer(3), Integer(1))                                     # needs sage.combinat
          >>> [t.to_matrix() for t in W]                                        # needs sage.combinat sage.groups
          [[1], [zeta3], [-zeta3 - 1]]

  class Irreducible(base_category)

    Bases: `CategoryWithAxiom`

    class ParentMethods

      Bases: `object`

      absolute_order_ideal(gens=None, in_unitary_group=True, return_lengths=False)

        Return all elements in `self` below given elements in the absolute order of `self`.

        This order is defined by

        \[\omega \leq_R \tau \Leftrightarrow \ell_R(\omega) + \ell_R(\omega^{-1} \tau) = \ell_R(\tau),\]

        where \(\ell_R\) denotes the reflection length.

        This is, if `in_unitary_group` is `False`, then

        \[\ell_R(w) = \min\{ \ell: w = r_1\cdots r_\ell, r_i \in R \},\]

        and otherwise

        \[\ell_R(w) = \dim\operatorname{im}(w - 1).\]

        Note

        If `gens` are not given, `self` is assumed to be well-generated.

        INPUT:

        - `gens` – (default: `None`) if one or more elements are given, the order ideal in the absolute order generated by `gens` is returned. Otherwise, the standard Coxeter element is used as unique maximal element.

        - `in_unitary_group` – (default: `True`) determines the length function used to compute the order. For real groups, both possible orders coincide, and for complex non-real groups, the order in the unitary group is much faster to compute.

        - `return_lengths` – (default: `False`) whether or not to also return the lengths of the elements

        EXAMPLES:

        Sage

            sage: # optional - gap3
            sage: W = ReflectionGroup((1,1,3))
            sage: sorted(w.reduced_word()
            ....:        for w in W.absolute_order_ideal())
            [[], [1], [1, 2], [1, 2, 1], [2]]
            sage: sorted(w.reduced_word()
            ....:        for w in W.absolute_order_ideal(W.from_reduced_word([2,1])))
            [[], [1], [1, 2, 1], [2], [2, 1]]
            sage: sorted(w.reduced_word()
            ....:        for w in W.absolute_order_ideal(W.from_reduced_word([2])))
            [[], [2]]

            sage: W = CoxeterGroup(['A', 3])                                    # needs sage.combinat sage.groups
            sage: len(list(W.absolute_order_ideal()))                           # needs sage.combinat sage.groups
            14

            sage: W = CoxeterGroup(['A', 2])                                    # needs sage.combinat sage.groups
            sage: for w, l in W.absolute_order_ideal(return_lengths=True):    # needs sage.combinat sage.groups
            ....:     print(w.reduced_word(), l)
            [1, 2] 2
            [1, 2, 1] 1
            [2] 1
            [1] 1
            [] 0

        Python

            >>> from sage.all import *
            >>> # optional - gap3
            >>> W = ReflectionGroup((Integer(1),Integer(1),Integer(3)))
            >>> sorted(w.reduced_word()
            ...        for w in W.absolute_order_ideal())
            [[], [1], [1, 2], [1, 2, 1], [2]]
            >>> sorted(w.reduced_word()
            ...        for w in W.absolute_order_ideal(W.from_reduced_word([Integer(2),Integer(1)])))
            [[], [1], [1, 2, 1], [2], [2, 1]]
            >>> sorted(w.reduced_word()
            ...        for w in W.absolute_order_ideal(W.from_reduced_word([Integer(2)])))
            [[], [2]]

            >>> W = CoxeterGroup(['A', Integer(3)])                                    # needs sage.combinat sage.groups
            >>> len(list(W.absolute_order_ideal()))                           # needs sage.combinat sage.groups
            14

            >>> W = CoxeterGroup(['A', Integer(2)])                                    # needs sage.combinat sage.groups
            >>> for w, l in W.absolute_order_ideal(return_lengths=True):    # needs sage.combinat sage.groups
            ...     print(w.reduced_word(), l)
            [1, 2] 2
            [1, 2, 1] 1
            [2] 1
            [1] 1
            [] 0

      absolute_poset(in_unitary_group=False)

        Return the poset induced by the absolute order of `self` as a finite lattice.

        INPUT:

        - `in_unitary_group` – boolean (default: `False`); if `False`, the relation is given by `\sigma \leq \tau` if \(l_R(\sigma) + l_R(\sigma^{-1}\tau) = l_R(\tau)\) If `True`, the relation is given by \(\sigma \leq \tau\) if \(\dim(\mathrm{Fix}(\sigma)) + \dim(\mathrm{Fix}(\sigma^{-1}\tau)) = \dim(\mathrm{Fix}(\tau))\)

        See also

        `noncrossing_partition_lattice()`

        EXAMPLES:

        Sage

            sage: P = ReflectionGroup((1,1,3)).absolute_poset(); P      # optional - gap3
            Finite poset containing 6 elements

            sage: sorted(w.reduced_word() for w in P)                   # optional - gap3
            [[], [1], [1, 2], [1, 2, 1], [2], [2, 1]]

            sage: W = ReflectionGroup(4); W                             # optional - gap3
            Irreducible complex reflection group of rank 2 and type ST4
            sage: W.absolute_poset()                                    # optional - gap3
            Finite poset containing 24 elements

        Python

            >>> from sage.all import *
            >>> P = ReflectionGroup((Integer(1),Integer(1),Integer(3))).absolute_poset(); P      # optional - gap3
            Finite poset containing 6 elements

            >>> sorted(w.reduced_word() for w in P)                   # optional - gap3
            [[], [1], [1, 2], [1, 2, 1], [2], [2, 1]]

            >>> W = ReflectionGroup(Integer(4)); W                             # optional - gap3
            Irreducible complex reflection group of rank 2 and type ST4
            >>> W.absolute_poset()                                    # optional - gap3
            Finite poset containing 24 elements

      coxeter_number()

        Return the Coxeter number of an irreducible reflection group.

        This is defined as \(\frac{N + N^*}{n}\) where \(N\) is the number of reflections, \(N^*\) is the number of reflection hyperplanes, and \(n\) is the rank of `self`.

        EXAMPLES:

        Sage

            sage: W = ReflectionGroup(31)          # optional - gap3
            sage: W.coxeter_number()               # optional - gap3
            30

        Python

            >>> from sage.all import *
            >>> W = ReflectionGroup(Integer(31))          # optional - gap3
            >>> W.coxeter_number()               # optional - gap3
            30

      generalized_noncrossing_partitions(m, c=None, positive=False)

        Return the set of all chains of length \(m\) in the noncrossing partition lattice of `self`, see `noncrossing_partition_lattice()`.

        Note

        `self` is assumed to be well-generated.

        INPUT:

        - `c` – (default: `None`) if an element \(c\) in `self` is given, it is used as the maximal element in the interval

        - `positive` – boolean (default: `False`); if `True`, only those generalized noncrossing partitions of full support are returned

        EXAMPLES:

        Sage

            sage: W = ReflectionGroup((1,1,3))                          # optional - gap3

            sage: chains = W.generalized_noncrossing_partitions(2)      # optional - gap3
            sage: sorted([w.reduced_word() for w in chain]              # optional - gap3
            ....:        for chain in chains)
            [[[], [], [1, 2]],
             [[], [1], [2]],
             [[], [1, 2], []],
             [[], [1, 2, 1], [1]],
             [[], [2], [1, 2, 1]],
             [[1], [], [2]],
             [[1], [2], []],
             [[1, 2], [], []],
             [[1, 2, 1], [], [1]],
             [[1, 2, 1], [1], []],
             [[2], [], [1, 2, 1]],
             [[2], [1, 2, 1], []]]

            sage: chains = W.generalized_noncrossing_partitions(2,      # optional - gap3
            ....:              positive=True)
            sage: sorted([w.reduced_word() for w in chain]              # optional - gap3
            ....:        for chain in chains)
            [[[], [1, 2], []],
             [[], [1, 2, 1], [1]],
             [[1], [2], []],
             [[1, 2], [], []],
             [[1, 2, 1], [], [1]],
             [[1, 2, 1], [1], []],
             [[2], [1, 2, 1], []]]

        Python

            >>> from sage.all import *
            >>> W = ReflectionGroup((Integer(1),Integer(1),Integer(3)))                          # optional - gap3

            >>> chains = W.generalized_noncrossing_partitions(Integer(2))      # optional - gap3
            >>> sorted([w.reduced_word() for w in chain]              # optional - gap3
            ...        for chain in chains)
            [[[], [], [1, 2]],
             [[], [1], [2]],
             [[], [1, 2], []],
             [[], [1, 2, 1], [1]],
             [[], [2], [1, 2, 1]],
             [[1], [], [2]],
             [[1], [2], []],
             [[1, 2], [], []],
             [[1, 2, 1], [], [1]],
             [[1, 2, 1], [1], []],
             [[2], [], [1, 2, 1]],
             [[2], [1, 2, 1], []]]

            >>> chains = W.generalized_noncrossing_partitions(Integer(2),      # optional - gap3
            ...              positive=True)
            >>> sorted([w.reduced_word() for w in chain]              # optional - gap3
            ...        for chain in chains)
            [[[], [1, 2], []],
             [[], [1, 2, 1], [1]],
             [[1], [2], []],
             [[1, 2], [], []],
             [[1, 2, 1], [], [1]],
             [[1, 2, 1], [1], []],
             [[2], [1, 2, 1], []]]

      noncrossing_partition_lattice(c=None, L=None, in_unitary_group=True)

        Return the interval \([1,c]\) in the absolute order of `self` as a finite lattice.

        See also

        `absolute_order_ideal()`

        INPUT:

        - `c` – (default: `None`) if an element `c` in `self` is given, it is used as the maximal element in the interval

        - `L` – (default: `None`) if a subset `L` (must be hashable!) of `self` is given, it is used as the underlying set (only cover relations are checked).

        - `in_unitary_group` – boolean (default: `False`); if `False`, the relation is given by \(\sigma \leq \tau\) if \(l_R(\sigma) + l_R(\sigma^{-1}\tau) = l_R(\tau)\); if `True`, the relation is given by \(\sigma \leq \tau\) if \(\dim(\mathrm{Fix}(\sigma)) + \dim(\mathrm{Fix}(\sigma^{-1}\tau)) = \dim(\mathrm{Fix}(\tau))\)

        Note

        If `L` is given, the parameter `c` is ignored.

        EXAMPLES:

        Sage

            sage: W = SymmetricGroup(4)                                         # needs sage.groups
            sage: W.noncrossing_partition_lattice()                             # needs sage.combinat sage.groups
            Finite lattice containing 14 elements

            sage: W = WeylGroup(['G', 2])                                       # needs sage.combinat sage.groups
            sage: W.noncrossing_partition_lattice()                             # needs sage.combinat sage.groups
            Finite lattice containing 8 elements

            sage: # optional - gap3
            sage: W = ReflectionGroup((1,1,3))
            sage: sorted(w.reduced_word()
            ....:        for w in W.noncrossing_partition_lattice())
            [[], [1], [1, 2], [1, 2, 1], [2]]
            sage: c21 = W.from_reduced_word([2,1])
            sage: sorted(w.reduced_word()
            ....:        for w in W.noncrossing_partition_lattice(c21))
            [[], [1], [1, 2, 1], [2], [2, 1]]
            sage: c2 = W.from_reduced_word([2])
            sage: sorted(w.reduced_word()
            ....:        for w in W.noncrossing_partition_lattice(c2))
            [[], [2]]

        Python

            >>> from sage.all import *
            >>> W = SymmetricGroup(Integer(4))                                         # needs sage.groups
            >>> W.noncrossing_partition_lattice()                             # needs sage.combinat sage.groups
            Finite lattice containing 14 elements

            >>> W = WeylGroup(['G', Integer(2)])                                       # needs sage.combinat sage.groups
            >>> W.noncrossing_partition_lattice()                             # needs sage.combinat sage.groups
            Finite lattice containing 8 elements

            >>> # optional - gap3
            >>> W = ReflectionGroup((Integer(1),Integer(1),Integer(3)))
            >>> sorted(w.reduced_word()
            ...        for w in W.noncrossing_partition_lattice())
            [[], [1], [1, 2], [1, 2, 1], [2]]
            >>> c21 = W.from_reduced_word([Integer(2),Integer(1)])
            >>> sorted(w.reduced_word()
            ...        for w in W.noncrossing_partition_lattice(c21))
            [[], [1], [1, 2, 1], [2], [2, 1]]
            >>> c2 = W.from_reduced_word([Integer(2)])
            >>> sorted(w.reduced_word()
            ...        for w in W.noncrossing_partition_lattice(c2))
            [[], [2]]

    example()

      Return an example of an irreducible complex reflection group.

      EXAMPLES:

      Sage

          sage: from sage.categories.complex_reflection_groups import ComplexReflectionGroups
          sage: C = ComplexReflectionGroups().Finite().Irreducible()
          sage: C.example()                          # optional - gap3
          Irreducible complex reflection group of rank 3 and type G(4,2,3)

      Python

          >>> from sage.all import *
          >>> from sage.categories.complex_reflection_groups import ComplexReflectionGroups
          >>> C = ComplexReflectionGroups().Finite().Irreducible()
          >>> C.example()                          # optional - gap3
          Irreducible complex reflection group of rank 3 and type G(4,2,3)

  class ParentMethods

    Bases: `object`

    base_change_matrix()

      Return the base change from the standard basis of the vector space of `self` to the basis given by the independent roots of `self`.

      Todo

      For non-well-generated groups there is a conflict with construction of the matrix for an element.

      EXAMPLES:

      Sage

          sage: W = ReflectionGroup((1,1,3))         # optional - gap3
          sage: W.base_change_matrix()               # optional - gap3
          [1 0]
          [0 1]

          sage: W = ReflectionGroup(23)              # optional - gap3
          sage: W.base_change_matrix()               # optional - gap3
          [1 0 0]
          [0 1 0]
          [0 0 1]

          sage: W = ReflectionGroup((3,1,2))         # optional - gap3
          sage: W.base_change_matrix()               # optional - gap3
          [1 0]
          [1 1]

          sage: W = ReflectionGroup((4,2,2))         # optional - gap3
          sage: W.base_change_matrix()               # optional - gap3
          [   1    0]
          [E(4)    1]

      Python

          >>> from sage.all import *
          >>> W = ReflectionGroup((Integer(1),Integer(1),Integer(3)))         # optional - gap3
          >>> W.base_change_matrix()               # optional - gap3
          [1 0]
          [0 1]

          >>> W = ReflectionGroup(Integer(23))              # optional - gap3
          >>> W.base_change_matrix()               # optional - gap3
          [1 0 0]
          [0 1 0]
          [0 0 1]

          >>> W = ReflectionGroup((Integer(3),Integer(1),Integer(2)))         # optional - gap3
          >>> W.base_change_matrix()               # optional - gap3
          [1 0]
          [1 1]

          >>> W = ReflectionGroup((Integer(4),Integer(2),Integer(2)))         # optional - gap3
          >>> W.base_change_matrix()               # optional - gap3
          [   1    0]
          [E(4)    1]

    cardinality()

      Return the cardinality of `self`.

      It is given by the product of the degrees of `self`.

      EXAMPLES:

      Sage

          sage: # needs sage.combinat sage.groups
          sage: W = ColoredPermutations(1,3)
          sage: W.cardinality()
          6
          sage: W = ColoredPermutations(2,3)
          sage: W.cardinality()
          48
          sage: W = ColoredPermutations(4,3)
          sage: W.cardinality()
          384

          sage: # optional - gap3, needs sage.combinat sage.groups
          sage: W = ReflectionGroup((4,2,3))
          sage: W.cardinality()
          192

      Python

          >>> from sage.all import *
          >>> # needs sage.combinat sage.groups
          >>> W = ColoredPermutations(Integer(1),Integer(3))
          >>> W.cardinality()
          6
          >>> W = ColoredPermutations(Integer(2),Integer(3))
          >>> W.cardinality()
          48
          >>> W = ColoredPermutations(Integer(4),Integer(3))
          >>> W.cardinality()
          384

          >>> # optional - gap3, needs sage.combinat sage.groups
          >>> W = ReflectionGroup((Integer(4),Integer(2),Integer(3)))
          >>> W.cardinality()
          192

    codegrees()

      Return the codegrees of `self`.

      OUTPUT: a tuple of Sage integers

      EXAMPLES:

      Sage

          sage: W = ColoredPermutations(1,4)                                      # needs sage.combinat
          sage: W.codegrees()                                                     # needs sage.combinat
          (2, 1, 0)

          sage: W = ColoredPermutations(3,3)                                      # needs sage.combinat
          sage: W.codegrees()                                                     # needs sage.combinat
          (6, 3, 0)

          sage: W = ReflectionGroup(31)              # optional - gap3
          sage: W.codegrees()                        # optional - gap3
          (28, 16, 12, 0)

      Python

          >>> from sage.all import *
          >>> W = ColoredPermutations(Integer(1),Integer(4))                                      # needs sage.combinat
          >>> W.codegrees()                                                     # needs sage.combinat
          (2, 1, 0)

          >>> W = ColoredPermutations(Integer(3),Integer(3))                                      # needs sage.combinat
          >>> W.codegrees()                                                     # needs sage.combinat
          (6, 3, 0)

          >>> W = ReflectionGroup(Integer(31))              # optional - gap3
          >>> W.codegrees()                        # optional - gap3
          (28, 16, 12, 0)

    degrees()

      Return the degrees of `self`.

      OUTPUT: a tuple of Sage integers

      EXAMPLES:

      Sage

          sage: W = ColoredPermutations(1,4)                                      # needs sage.combinat
          sage: W.degrees()                                                       # needs sage.combinat
          (2, 3, 4)

          sage: W = ColoredPermutations(3,3)                                      # needs sage.combinat
          sage: W.degrees()                                                       # needs sage.combinat
          (3, 6, 9)

          sage: W = ReflectionGroup(31)              # optional - gap3
          sage: W.degrees()                          # optional - gap3
          (8, 12, 20, 24)

      Python

          >>> from sage.all import *
          >>> W = ColoredPermutations(Integer(1),Integer(4))                                      # needs sage.combinat
          >>> W.degrees()                                                       # needs sage.combinat
          (2, 3, 4)

          >>> W = ColoredPermutations(Integer(3),Integer(3))                                      # needs sage.combinat
          >>> W.degrees()                                                       # needs sage.combinat
          (3, 6, 9)

          >>> W = ReflectionGroup(Integer(31))              # optional - gap3
          >>> W.degrees()                          # optional - gap3
          (8, 12, 20, 24)

    is_real()

      Return whether `self` is real.

      A complex reflection group is real if it is isomorphic to a reflection group in \(GL(V)\) over a real vector space \(V\). Equivalently its character table has real entries.

      This implementation uses the following statement: an irreducible complex reflection group is real if and only if \(2\) is a degree of `self` with multiplicity one. Hence, in general we just need to compare the number of occurrences of \(2\) as degree of `self` and the number of irreducible components.

      EXAMPLES:

      Sage

          sage: W = ColoredPermutations(1,3)                                      # needs sage.combinat
          sage: W.is_real()                                                       # needs sage.combinat
          True

          sage: W = ColoredPermutations(4,3)                                      # needs sage.combinat
          sage: W.is_real()                                                       # needs sage.combinat sage.graphs
          False

      Python

          >>> from sage.all import *
          >>> W = ColoredPermutations(Integer(1),Integer(3))                                      # needs sage.combinat
          >>> W.is_real()                                                       # needs sage.combinat
          True

          >>> W = ColoredPermutations(Integer(4),Integer(3))                                      # needs sage.combinat
          >>> W.is_real()                                                       # needs sage.combinat sage.graphs
          False

      Todo

      Add an example of non real finite complex reflection group that is generated by order 2 reflections.

    is_well_generated()

      Return whether `self` is well-generated.

      A finite complex reflection group is well generated if the number of its simple reflections coincides with its rank.

      See also

      `ComplexReflectionGroups.Finite.WellGenerated()`

      Note

      - All finite real reflection groups are well generated.

      - The complex reflection groups of type \(G(r,1,n)\) and of type \(G(r,r,n)\) are well generated.

      - The complex reflection groups of type \(G(r,p,n)\) with \(1 < p < r\) are not well generated.

      - The direct product of two well generated finite complex reflection group is still well generated.

      EXAMPLES:

      Sage

          sage: W = ColoredPermutations(1,3)                                      # needs sage.combinat
          sage: W.is_well_generated()                                             # needs sage.combinat
          True

          sage: W = ColoredPermutations(4,3)                                      # needs sage.combinat
          sage: W.is_well_generated()                                             # needs sage.combinat
          True

          sage: # optional - gap3, needs sage.combinat sage.groups
          sage: W = ReflectionGroup((4,2,3))
          sage: W.is_well_generated()
          False
          sage: W = ReflectionGroup((4,4,3))
          sage: W.is_well_generated()
          True

      Python

          >>> from sage.all import *
          >>> W = ColoredPermutations(Integer(1),Integer(3))                                      # needs sage.combinat
          >>> W.is_well_generated()                                             # needs sage.combinat
          True

          >>> W = ColoredPermutations(Integer(4),Integer(3))                                      # needs sage.combinat
          >>> W.is_well_generated()                                             # needs sage.combinat
          True

          >>> # optional - gap3, needs sage.combinat sage.groups
          >>> W = ReflectionGroup((Integer(4),Integer(2),Integer(3)))
          >>> W.is_well_generated()
          False
          >>> W = ReflectionGroup((Integer(4),Integer(4),Integer(3)))
          >>> W.is_well_generated()
          True

    milnor_fiber_poset()

      Return the Milnor fiber poset of `self`.

      The Milnor fiber poset of a finite complex reflection group \(W\) is defined as the poset of (right) standard cosets \(gW_J\), where \(J\) is a subset of the index set \(I\) of \(W\), ordered by reverse inclusion. This is conjecturally a meet semilattice if and only if \(W\) is well-generated.

      EXAMPLES:

      Sage

          sage: # needs sage.combinat
          sage: W = ColoredPermutations(3, 2)
          sage: P = W.milnor_fiber_poset()
          sage: P
          Finite meet-semilattice containing 34 elements
          sage: R.<x> = ZZ[]
          sage: sum(x**P.rank(elt) for elt in P)
          18*x^2 + 15*x + 1

          sage: # optional - gap3
          sage: W = ReflectionGroup(4)
          sage: P = W.milnor_fiber_poset(); P
          Finite meet-semilattice containing 41 elements
          sage: sum(x**P.rank(elt) for elt in P)
          24*x^2 + 16*x + 1

          sage: # optional - gap3
          sage: W = ReflectionGroup([4,2,2])
          sage: W.is_well_generated()
          False
          sage: P = W.milnor_fiber_poset(); P
          Finite poset containing 47 elements
          sage: sum(x**P.rank(elt) for elt in P)
          16*x^3 + 24*x^2 + 6*x + 1
          sage: P.is_meet_semilattice()
          False

      Python

          >>> from sage.all import *
          >>> # needs sage.combinat
          >>> W = ColoredPermutations(Integer(3), Integer(2))
          >>> P = W.milnor_fiber_poset()
          >>> P
          Finite meet-semilattice containing 34 elements
          >>> R = ZZ['x']; (x,) = R._first_ngens(1)
          >>> sum(x**P.rank(elt) for elt in P)
          18*x^2 + 15*x + 1

          >>> # optional - gap3
          >>> W = ReflectionGroup(Integer(4))
          >>> P = W.milnor_fiber_poset(); P
          Finite meet-semilattice containing 41 elements
          >>> sum(x**P.rank(elt) for elt in P)
          24*x^2 + 16*x + 1

          >>> # optional - gap3
          >>> W = ReflectionGroup([Integer(4),Integer(2),Integer(2)])
          >>> W.is_well_generated()
          False
          >>> P = W.milnor_fiber_poset(); P
          Finite poset containing 47 elements
          >>> sum(x**P.rank(elt) for elt in P)
          16*x^3 + 24*x^2 + 6*x + 1
          >>> P.is_meet_semilattice()
          False

    number_of_reflection_hyperplanes()

      Return the number of reflection hyperplanes of `self`.

      This is also the number of distinguished reflections. For real groups, this coincides with the number of reflections.

      This implementation uses that it is given by the sum of the codegrees of `self` plus its rank.

      See also

      `number_of_reflections()`

      EXAMPLES:

      Sage

          sage: # needs sage.combinat
          sage: W = ColoredPermutations(1,3)
          sage: W.number_of_reflection_hyperplanes()
          3
          sage: W = ColoredPermutations(2,3)
          sage: W.number_of_reflection_hyperplanes()
          9
          sage: W = ColoredPermutations(4,3)
          sage: W.number_of_reflection_hyperplanes()
          15

          sage: # optional - gap3, needs sage.combinat
          sage: W = ReflectionGroup((4,2,3))
          sage: W.number_of_reflection_hyperplanes()
          15

      Python

          >>> from sage.all import *
          >>> # needs sage.combinat
          >>> W = ColoredPermutations(Integer(1),Integer(3))
          >>> W.number_of_reflection_hyperplanes()
          3
          >>> W = ColoredPermutations(Integer(2),Integer(3))
          >>> W.number_of_reflection_hyperplanes()
          9
          >>> W = ColoredPermutations(Integer(4),Integer(3))
          >>> W.number_of_reflection_hyperplanes()
          15

          >>> # optional - gap3, needs sage.combinat
          >>> W = ReflectionGroup((Integer(4),Integer(2),Integer(3)))
          >>> W.number_of_reflection_hyperplanes()
          15

    number_of_reflections()

      Return the number of reflections of `self`.

      For real groups, this coincides with the number of reflection hyperplanes.

      This implementation uses that it is given by the sum of the degrees of `self` minus its rank.

      See also

      `number_of_reflection_hyperplanes()`

      EXAMPLES:

      Sage

          sage: [SymmetricGroup(i).number_of_reflections()                        # needs sage.groups sage.rings.number_field
          ....:  for i in range(int(8))]
          [0, 0, 1, 3, 6, 10, 15, 21]

          sage: # needs sage.combinat sage.groups
          sage: W = ColoredPermutations(1,3)
          sage: W.number_of_reflections()
          3
          sage: W = ColoredPermutations(2,3)
          sage: W.number_of_reflections()
          9
          sage: W = ColoredPermutations(4,3)
          sage: W.number_of_reflections()
          21
          sage: W = ReflectionGroup((4,2,3))      # optional - gap3
          sage: W.number_of_reflections()         # optional - gap3
          15

      Python

          >>> from sage.all import *
          >>> [SymmetricGroup(i).number_of_reflections()                        # needs sage.groups sage.rings.number_field
          ...  for i in range(int(Integer(8)))]
          [0, 0, 1, 3, 6, 10, 15, 21]

          >>> # needs sage.combinat sage.groups
          >>> W = ColoredPermutations(Integer(1),Integer(3))
          >>> W.number_of_reflections()
          3
          >>> W = ColoredPermutations(Integer(2),Integer(3))
          >>> W.number_of_reflections()
          9
          >>> W = ColoredPermutations(Integer(4),Integer(3))
          >>> W.number_of_reflections()
          21
          >>> W = ReflectionGroup((Integer(4),Integer(2),Integer(3)))      # optional - gap3
          >>> W.number_of_reflections()         # optional - gap3
          15

    rank()

      Return the rank of `self`.

      The rank of `self` is the dimension of the smallest faithfull reflection representation of `self`.

      This default implementation uses that the rank is the number of `degrees()`.

      See also

      `ComplexReflectionGroups.rank()`

      EXAMPLES:

      Sage

          sage: # needs sage.combinat sage.groups
          sage: W = ColoredPermutations(1,3)
          sage: W.rank()
          2
          sage: W = ColoredPermutations(2,3)
          sage: W.rank()
          3
          sage: W = ColoredPermutations(4,3)
          sage: W.rank()
          3

          sage: # optional - gap3, needs sage.combinat sage.groups
          sage: W = ReflectionGroup((4,2,3))
          sage: W.rank()
          3

      Python

          >>> from sage.all import *
          >>> # needs sage.combinat sage.groups
          >>> W = ColoredPermutations(Integer(1),Integer(3))
          >>> W.rank()
          2
          >>> W = ColoredPermutations(Integer(2),Integer(3))
          >>> W.rank()
          3
          >>> W = ColoredPermutations(Integer(4),Integer(3))
          >>> W.rank()
          3

          >>> # optional - gap3, needs sage.combinat sage.groups
          >>> W = ReflectionGroup((Integer(4),Integer(2),Integer(3)))
          >>> W.rank()
          3

  class SubcategoryMethods

    Bases: `object`

    WellGenerated()

      Return the full subcategory of well-generated objects of `self`.

      A finite complex generated group is well generated if it is isomorphic to a subgroup of the general linear group \(GL_n\) generated by \(n\) reflections.

      See also

      `ComplexReflectionGroups.Finite.ParentMethods.is_well_generated()`

      EXAMPLES:

      Sage

          sage: from sage.categories.complex_reflection_groups import ComplexReflectionGroups
          sage: C = ComplexReflectionGroups().Finite().WellGenerated(); C
          Category of well generated finite complex reflection groups

      Python

          >>> from sage.all import *
          >>> from sage.categories.complex_reflection_groups import ComplexReflectionGroups
          >>> C = ComplexReflectionGroups().Finite().WellGenerated(); C
          Category of well generated finite complex reflection groups

      Here is an example of a finite well-generated complex reflection group:

      Sage

          sage: W = C.example(); W                   # optional - gap3
          Reducible complex reflection group of rank 4 and type A2 x G(3,1,2)

      [Python]

          >>> from sage.all import *
          >>> W = C.example(); W                   # optional - gap3
          Reducible complex reflection group of rank 4 and type A2 x G(3,1,2)

      All finite Coxeter groups are well generated:

      Sage

          sage: CoxeterGroups().Finite().is_subcategory(C)
          True
          sage: SymmetricGroup(3) in C                                            # needs sage.groups
          True

      Python

          >>> from sage.all import *
          >>> CoxeterGroups().Finite().is_subcategory(C)
          True
          >>> SymmetricGroup(Integer(3)) in C                                            # needs sage.groups
          True

      Note

      The category of well generated finite complex reflection groups is currently implemented as an axiom. See discussion on Issue #11187. This may be a bit of overkill. Still it’s nice to have a full subcategory.

  class WellGenerated(base_category)

    Bases: `CategoryWithAxiom`

    class Irreducible(base_category)

      Bases: `CategoryWithAxiom`

      The category of finite irreducible well-generated finite complex reflection groups.

      class ParentMethods

        Bases: `object`

        catalan_number(positive=False, polynomial=False)

          Return the Catalan number associated to `self`.

          It is defined by

          \[\prod_{i = 1}^n \frac{d_i + h}{d_i},\]

          where \(d_1, \ldots, d_n\) are the degrees and where \(h\) is the Coxeter number. See [Ar2006] for further information.

          INPUT:

          - `positive` – boolean (default: `False`); if `True`, return instead the positive Catalan number

          - `polynomial` – boolean (default: `False`); if `True`, return instead the \(q\)-analogue as a polynomial in \(q\)

          Note

          - For the symmetric group \(S_n\), it reduces to the Catalan number \(\frac{1}{n+1} \binom{2n}{n}\).

          - The Catalan numbers for \(G(r,1,n)\) all coincide for \(r > 1\).

          EXAMPLES:

          Sage

              sage: [ColoredPermutations(1,n).catalan_number()                # needs sage.combinat
              ....:  for n in [3,4,5]]
              [5, 14, 42]

              sage: [ColoredPermutations(2,n).catalan_number()                # needs sage.combinat
              ....:  for n in [3,4,5]]
              [20, 70, 252]

              sage: [ReflectionGroup((2,2,n)).catalan_number()  # optional - gap3
              ....:  for n in [3,4,5]]
              [14, 50, 182]

          Python

              >>> from sage.all import *
              >>> [ColoredPermutations(Integer(1),n).catalan_number()                # needs sage.combinat
              ...  for n in [Integer(3),Integer(4),Integer(5)]]
              [5, 14, 42]

              >>> [ColoredPermutations(Integer(2),n).catalan_number()                # needs sage.combinat
              ...  for n in [Integer(3),Integer(4),Integer(5)]]
              [20, 70, 252]

              >>> [ReflectionGroup((Integer(2),Integer(2),n)).catalan_number()  # optional - gap3
              ...  for n in [Integer(3),Integer(4),Integer(5)]]
              [14, 50, 182]

        coxeter_number()

          Return the Coxeter number of a well-generated, irreducible reflection group. This is defined to be the order of a regular element in `self`, and is equal to the highest degree of `self`.

          See also

          `ComplexReflectionGroups.Finite.Irreducible()`

          Note

          This method overwrites the more general method for complex reflection groups since the expression given here is quicker to compute.

          EXAMPLES:

          Sage

              sage: W = ColoredPermutations(1,3)                              # needs sage.combinat
              sage: W.coxeter_number()                                        # needs sage.combinat
              3

              sage: W = ColoredPermutations(4,3)                              # needs sage.combinat
              sage: W.coxeter_number()                                        # needs sage.combinat
              12

              sage: W = ReflectionGroup((4,4,3))  # optional - gap3
              sage: W.coxeter_number()            # optional - gap3
              8

          Python

              >>> from sage.all import *
              >>> W = ColoredPermutations(Integer(1),Integer(3))                              # needs sage.combinat
              >>> W.coxeter_number()                                        # needs sage.combinat
              3

              >>> W = ColoredPermutations(Integer(4),Integer(3))                              # needs sage.combinat
              >>> W.coxeter_number()                                        # needs sage.combinat
              12

              >>> W = ReflectionGroup((Integer(4),Integer(4),Integer(3)))  # optional - gap3
              >>> W.coxeter_number()            # optional - gap3
              8

        fuss_catalan_number(m, positive=False, polynomial=False)

          Return the `m`-th Fuss-Catalan number associated to `self`.

          This is defined by

          \[\prod_{i = 1}^n \frac{d_i + mh}{d_i},\]

          where \(d_1, \ldots, d_n\) are the degrees and \(h\) is the Coxeter number.

          INPUT:

          - `positive` – boolean (default: `False`); if `True`, return instead the positive Fuss-Catalan number

          - `polynomial` – boolean (default: `False`); if `True`, return instead the \(q\)-analogue as a polynomial in \(q\)

          See [Ar2006] for further information.

          Note

          - For the symmetric group \(S_n\), it reduces to the Fuss-Catalan number \(\frac{1}{mn+1}\binom{(m+1)n}{n}\).

          - The Fuss-Catalan numbers for \(G(r, 1, n)\) all coincide for \(r > 1\).

          EXAMPLES:

          Sage

              sage: W = ColoredPermutations(1,3)                              # needs sage.combinat
              sage: [W.fuss_catalan_number(i) for i in [1,2,3]]               # needs sage.combinat
              [5, 12, 22]

              sage: W = ColoredPermutations(1,4)                              # needs sage.combinat
              sage: [W.fuss_catalan_number(i) for i in [1,2,3]]               # needs sage.combinat
              [14, 55, 140]

              sage: W = ColoredPermutations(1,5)                              # needs sage.combinat
              sage: [W.fuss_catalan_number(i) for i in [1,2,3]]               # needs sage.combinat
              [42, 273, 969]

              sage: W = ColoredPermutations(2,2)                              # needs sage.combinat
              sage: [W.fuss_catalan_number(i) for i in [1,2,3]]               # needs sage.combinat
              [6, 15, 28]

              sage: W = ColoredPermutations(2,3)                              # needs sage.combinat
              sage: [W.fuss_catalan_number(i) for i in [1,2,3]]               # needs sage.combinat
              [20, 84, 220]

              sage: W = ColoredPermutations(2,4)                              # needs sage.combinat
              sage: [W.fuss_catalan_number(i) for i in [1,2,3]]               # needs sage.combinat
              [70, 495, 1820]

          Python

              >>> from sage.all import *
              >>> W = ColoredPermutations(Integer(1),Integer(3))                              # needs sage.combinat
              >>> [W.fuss_catalan_number(i) for i in [Integer(1),Integer(2),Integer(3)]]               # needs sage.combinat
              [5, 12, 22]

              >>> W = ColoredPermutations(Integer(1),Integer(4))                              # needs sage.combinat
              >>> [W.fuss_catalan_number(i) for i in [Integer(1),Integer(2),Integer(3)]]               # needs sage.combinat
              [14, 55, 140]

              >>> W = ColoredPermutations(Integer(1),Integer(5))                              # needs sage.combinat
              >>> [W.fuss_catalan_number(i) for i in [Integer(1),Integer(2),Integer(3)]]               # needs sage.combinat
              [42, 273, 969]

              >>> W = ColoredPermutations(Integer(2),Integer(2))                              # needs sage.combinat
              >>> [W.fuss_catalan_number(i) for i in [Integer(1),Integer(2),Integer(3)]]               # needs sage.combinat
              [6, 15, 28]

              >>> W = ColoredPermutations(Integer(2),Integer(3))                              # needs sage.combinat
              >>> [W.fuss_catalan_number(i) for i in [Integer(1),Integer(2),Integer(3)]]               # needs sage.combinat
              [20, 84, 220]

              >>> W = ColoredPermutations(Integer(2),Integer(4))                              # needs sage.combinat
              >>> [W.fuss_catalan_number(i) for i in [Integer(1),Integer(2),Integer(3)]]               # needs sage.combinat
              [70, 495, 1820]

        number_of_reflections_of_full_support()

          Return the number of reflections with full support.

          EXAMPLES:

          Sage

              sage: W = Permutations(4)
              sage: W.number_of_reflections_of_full_support()
              1

              sage: W = ColoredPermutations(1,4)                              # needs sage.combinat
              sage: W.number_of_reflections_of_full_support()
              1

              sage: W = CoxeterGroup("B3")                                    # needs sage.combinat sage.groups
              sage: W.number_of_reflections_of_full_support()                 # needs sage.combinat sage.groups
              3

              sage: W = ColoredPermutations(3,3)                              # needs sage.combinat
              sage: W.number_of_reflections_of_full_support()                 # needs sage.combinat
              3

          Python

              >>> from sage.all import *
              >>> W = Permutations(Integer(4))
              >>> W.number_of_reflections_of_full_support()
              1

              >>> W = ColoredPermutations(Integer(1),Integer(4))                              # needs sage.combinat
              >>> W.number_of_reflections_of_full_support()
              1

              >>> W = CoxeterGroup("B3")                                    # needs sage.combinat sage.groups
              >>> W.number_of_reflections_of_full_support()                 # needs sage.combinat sage.groups
              3

              >>> W = ColoredPermutations(Integer(3),Integer(3))                              # needs sage.combinat
              >>> W.number_of_reflections_of_full_support()                 # needs sage.combinat
              3

        rational_catalan_number(p, polynomial=False)

          Return the `p`-th rational Catalan number associated to `self`.

          It is defined by

          \[\prod_{i = 1}^n \frac{p + (p(d_i-1)) \mod h)}{d_i},\]

          where \(d_1, \ldots, d_n\) are the degrees and \(h\) is the Coxeter number. See [STW2016] for this formula.

          INPUT:

          - `polynomial` – boolean (default: `False`); if `True`, return instead the \(q\)-analogue as a polynomial in \(q\)

          EXAMPLES:

          Sage

              sage: W = ColoredPermutations(1,3)                              # needs sage.combinat
              sage: [W.rational_catalan_number(p) for p in [5,7,8]]           # needs sage.combinat
              [7, 12, 15]

              sage: W = ColoredPermutations(2,2)                              # needs sage.combinat
              sage: [W.rational_catalan_number(p) for p in [7,9,11]]          # needs sage.combinat
              [10, 15, 21]

          Python

              >>> from sage.all import *
              >>> W = ColoredPermutations(Integer(1),Integer(3))                              # needs sage.combinat
              >>> [W.rational_catalan_number(p) for p in [Integer(5),Integer(7),Integer(8)]]           # needs sage.combinat
              [7, 12, 15]

              >>> W = ColoredPermutations(Integer(2),Integer(2))                              # needs sage.combinat
              >>> [W.rational_catalan_number(p) for p in [Integer(7),Integer(9),Integer(11)]]          # needs sage.combinat
              [10, 15, 21]

      example()

        Return an example of an irreducible well-generated complex reflection group.

        EXAMPLES:

        Sage

            sage: from sage.categories.complex_reflection_groups import ComplexReflectionGroups
            sage: C = ComplexReflectionGroups().Finite().WellGenerated().Irreducible()
            sage: C.example()                                                   # needs sage.combinat
            4-colored permutations of size 3

        Python

            >>> from sage.all import *
            >>> from sage.categories.complex_reflection_groups import ComplexReflectionGroups
            >>> C = ComplexReflectionGroups().Finite().WellGenerated().Irreducible()
            >>> C.example()                                                   # needs sage.combinat
            4-colored permutations of size 3

    class ParentMethods

      Bases: `object`

      coxeter_element()

        Return a Coxeter element.

        The result is the product of the simple reflections, in some order.

        Note

        This implementation is shared with well generated complex reflection groups. It would be nicer to put it in some joint super category; however, in the current state of the art, there is none where it is clear that this is the right construction for obtaining a Coxeter element.

        In this context, this is an element having a regular eigenvector (a vector not contained in any reflection hyperplane of `self`).

        EXAMPLES:

        Sage

            sage: # needs sage.combinat sage.groups
            sage: CoxeterGroup(['A', 4]).coxeter_element().reduced_word()
            [1, 2, 3, 4]
            sage: CoxeterGroup(['B', 4]).coxeter_element().reduced_word()
            [1, 2, 3, 4]
            sage: CoxeterGroup(['D', 4]).coxeter_element().reduced_word()
            [1, 2, 4, 3]
            sage: CoxeterGroup(['F', 4]).coxeter_element().reduced_word()
            [1, 2, 3, 4]
            sage: CoxeterGroup(['E', 8]).coxeter_element().reduced_word()
            [1, 3, 2, 4, 5, 6, 7, 8]
            sage: CoxeterGroup(['H', 3]).coxeter_element().reduced_word()
            [1, 2, 3]

        Python

            >>> from sage.all import *
            >>> # needs sage.combinat sage.groups
            >>> CoxeterGroup(['A', Integer(4)]).coxeter_element().reduced_word()
            [1, 2, 3, 4]
            >>> CoxeterGroup(['B', Integer(4)]).coxeter_element().reduced_word()
            [1, 2, 3, 4]
            >>> CoxeterGroup(['D', Integer(4)]).coxeter_element().reduced_word()
            [1, 2, 4, 3]
            >>> CoxeterGroup(['F', Integer(4)]).coxeter_element().reduced_word()
            [1, 2, 3, 4]
            >>> CoxeterGroup(['E', Integer(8)]).coxeter_element().reduced_word()
            [1, 3, 2, 4, 5, 6, 7, 8]
            >>> CoxeterGroup(['H', Integer(3)]).coxeter_element().reduced_word()
            [1, 2, 3]

        This method is also used for well generated finite complex reflection groups:

        Sage

            sage: W = ReflectionGroup((1,1,4))          # optional - gap3
            sage: W.coxeter_element().reduced_word()    # optional - gap3
            [1, 2, 3]

            sage: W = ReflectionGroup((2,1,4))          # optional - gap3
            sage: W.coxeter_element().reduced_word()    # optional - gap3
            [1, 2, 3, 4]

            sage: W = ReflectionGroup((4,1,4))          # optional - gap3
            sage: W.coxeter_element().reduced_word()    # optional - gap3
            [1, 2, 3, 4]

            sage: W = ReflectionGroup((4,4,4))          # optional - gap3
            sage: W.coxeter_element().reduced_word()    # optional - gap3
            [1, 2, 3, 4]

        [Python]

            >>> from sage.all import *
            >>> W = ReflectionGroup((Integer(1),Integer(1),Integer(4)))          # optional - gap3
            >>> W.coxeter_element().reduced_word()    # optional - gap3
            [1, 2, 3]

            >>> W = ReflectionGroup((Integer(2),Integer(1),Integer(4)))          # optional - gap3
            >>> W.coxeter_element().reduced_word()    # optional - gap3
            [1, 2, 3, 4]

            >>> W = ReflectionGroup((Integer(4),Integer(1),Integer(4)))          # optional - gap3
            >>> W.coxeter_element().reduced_word()    # optional - gap3
            [1, 2, 3, 4]

            >>> W = ReflectionGroup((Integer(4),Integer(4),Integer(4)))          # optional - gap3
            >>> W.coxeter_element().reduced_word()    # optional - gap3
            [1, 2, 3, 4]

      coxeter_elements()

        Return the (unique) conjugacy class in `self` containing all Coxeter elements.

        A Coxeter element is an element that has an eigenvalue \(e^{2\pi i/h}\) where \(h\) is the Coxeter number.

        In case of finite Coxeter groups, these are exactly the elements that are conjugate to one (or, equivalently, all) standard Coxeter element, this is, to an element that is the product of the simple generators in some order.

        See also

        `standard_coxeter_elements()`

        EXAMPLES:

        Sage

            sage: W = ReflectionGroup((1,1,3))     # optional - gap3
            sage: sorted(c.reduced_word()          # optional - gap3
            ....:        for c in W.coxeter_elements())
            [[1, 2], [2, 1]]

            sage: W = ReflectionGroup((1,1,4))     # optional - gap3
            sage: sorted(c.reduced_word()          # optional - gap3
            ....:        for c in W.coxeter_elements())
            [[1, 2, 1, 3, 2], [1, 2, 3], [1, 3, 2],
             [2, 1, 3], [2, 1, 3, 2, 1], [3, 2, 1]]

        Python

            >>> from sage.all import *
            >>> W = ReflectionGroup((Integer(1),Integer(1),Integer(3)))     # optional - gap3
            >>> sorted(c.reduced_word()          # optional - gap3
            ...        for c in W.coxeter_elements())
            [[1, 2], [2, 1]]

            >>> W = ReflectionGroup((Integer(1),Integer(1),Integer(4)))     # optional - gap3
            >>> sorted(c.reduced_word()          # optional - gap3
            ...        for c in W.coxeter_elements())
            [[1, 2, 1, 3, 2], [1, 2, 3], [1, 3, 2],
             [2, 1, 3], [2, 1, 3, 2, 1], [3, 2, 1]]

      is_well_generated()

        Return `True` as `self` is well-generated.

        EXAMPLES:

        Sage

            sage: W = ReflectionGroup((3,1,2))     # optional - gap3
            sage: W.is_well_generated()            # optional - gap3
            True

        Python

            >>> from sage.all import *
            >>> W = ReflectionGroup((Integer(3),Integer(1),Integer(2)))     # optional - gap3
            >>> W.is_well_generated()            # optional - gap3
            True

      milnor_fiber_complex()

        Return the Milnor fiber complex of `self`.

        The Milnor fiber complex of a finite well-generated complex reflection group \(W\) is the simplicial complex whose face poset is given by `milnor_fiber_poset()`. When \(W\) is an irreducible Shephard group, it is also an equivariant strong deformation retract of the Milnor fiber \(f_1^{-1}(1)\), where \(f_1: V \to \CC\) is the polynomial invariant of smallest degree acting on the reflection representation \(V\).

        When \(W\) is a Coxeter group, this is isomorphic to the Coxeter complex of \(W\).

        EXAMPLES:

        Sage

            sage: W = ColoredPermutations(3, 2)                                 # needs sage.combinat
            sage: C = W.milnor_fiber_complex()                                  # needs sage.combinat
            sage: C.homology()                                                  # needs sage.combinat
            {0: 0, 1: Z x Z x Z x Z}

            sage: W = ReflectionGroup(5)                  # optional - gap3
            sage: C = W.milnor_fiber_complex()            # optional - gap3
            sage: C.homology()                            # optional - gap3
            {0: 0, 1: Z^25}

        Python

            >>> from sage.all import *
            >>> W = ColoredPermutations(Integer(3), Integer(2))                                 # needs sage.combinat
            >>> C = W.milnor_fiber_complex()                                  # needs sage.combinat
            >>> C.homology()                                                  # needs sage.combinat
            {0: 0, 1: Z x Z x Z x Z}

            >>> W = ReflectionGroup(Integer(5))                  # optional - gap3
            >>> C = W.milnor_fiber_complex()            # optional - gap3
            >>> C.homology()                            # optional - gap3
            {0: 0, 1: Z^25}

      standard_coxeter_elements()

        Return all standard Coxeter elements in `self`.

        This is the set of all elements in `self` obtained from any product of the simple reflections in `self`.

        Note

        - `self` is assumed to be well-generated.

        - This works even beyond real reflection groups, but the conjugacy class is not unique and we only obtain one such class.

        EXAMPLES:

        Sage

            sage: W = ReflectionGroup(4)                 # optional - gap3
            sage: sorted(W.standard_coxeter_elements())  # optional - gap3
            [(1,7,6,12,23,20)(2,8,17,24,9,5)(3,16,10,19,15,21)(4,14,11,22,18,13),
             (1,10,4,12,21,22)(2,11,19,24,13,3)(5,15,7,17,16,23)(6,18,8,20,14,9)]

        Python

            >>> from sage.all import *
            >>> W = ReflectionGroup(Integer(4))                 # optional - gap3
            >>> sorted(W.standard_coxeter_elements())  # optional - gap3
            [(1,7,6,12,23,20)(2,8,17,24,9,5)(3,16,10,19,15,21)(4,14,11,22,18,13),
             (1,10,4,12,21,22)(2,11,19,24,13,3)(5,15,7,17,16,23)(6,18,8,20,14,9)]

    example()

      Return an example of a well-generated complex reflection group.

      EXAMPLES:

      Sage

          sage: from sage.categories.complex_reflection_groups import ComplexReflectionGroups
          sage: C = ComplexReflectionGroups().Finite().WellGenerated()
          sage: C.example()                          # optional - gap3
          Reducible complex reflection group of rank 4 and type A2 x G(3,1,2)

      Python

          >>> from sage.all import *
          >>> from sage.categories.complex_reflection_groups import ComplexReflectionGroups
          >>> C = ComplexReflectionGroups().Finite().WellGenerated()
          >>> C.example()                          # optional - gap3
          Reducible complex reflection group of rank 4 and type A2 x G(3,1,2)

  example()

    Return an example of a complex reflection group.

    EXAMPLES:

    Sage

        sage: from sage.categories.complex_reflection_groups import ComplexReflectionGroups
        sage: ComplexReflectionGroups().Finite().example()          # optional - gap3
        Reducible real reflection group of rank 4 and type A2 x B2

    Python

        >>> from sage.all import *
        >>> from sage.categories.complex_reflection_groups import ComplexReflectionGroups
        >>> ComplexReflectionGroups().Finite().example()          # optional - gap3
        Reducible real reflection group of rank 4 and type A2 x B2