# Coxeter Groups¶

sage.combinat.root_system.coxeter_group.CoxeterGroup(data, implementation='reflection', base_ring=None, index_set=None)

Return an implementation of the Coxeter group given by data.

INPUT:

• data – a Cartan type (or coercible into; see CartanType) or a Coxeter matrix or graph
• implementation – (default: 'reflection') can be one of the following:
• 'permutation' - as a permutation representation
• 'matrix' - as a Weyl group (as a matrix group acting on the root space); if this is not implemented, this uses the “reflection” implementation
• 'coxeter3' - using the coxeter3 package
• 'reflection' - as elements in the reflection representation; see CoxeterMatrixGroup
• base_ring – (optional) the base ring for the 'reflection' implementation
• index_set – (optional) the index set for the 'reflection' implementation

EXAMPLES:

Now assume that data represents a Cartan type. If implementation is not specified, the reflection representation is returned:

sage: W = CoxeterGroup(["A",2])
sage: W
Finite Coxeter group over Integer Ring with Coxeter matrix:
[1 3]
[3 1]

sage: W = CoxeterGroup(["A",3,1]); W
Coxeter group over Integer Ring with Coxeter matrix:
[1 3 2 3]
[3 1 3 2]
[2 3 1 3]
[3 2 3 1]

sage: W = CoxeterGroup(['H',3]); W
Finite Coxeter group over Number Field in a with
defining polynomial x^2 - 5 with Coxeter matrix:
[1 3 2]
[3 1 5]
[2 5 1]


We now use the implementation option:

sage: W = CoxeterGroup(["A",2], implementation = "permutation") # optional - gap3
sage: W                                                         # optional - gap3
Permutation Group with generators [(1,3)(2,5)(4,6), (1,4)(2,3)(5,6)]
sage: W.category()                       # optional - gap3
Join of Category of finite permutation groups
and Category of finite coxeter groups
and Category of well generated finite irreducible complex reflection groups

sage: W = CoxeterGroup(["A",2], implementation="matrix")
sage: W
Weyl Group of type ['A', 2] (as a matrix group acting on the ambient space)

sage: W = CoxeterGroup(["H",3], implementation="matrix")
sage: W
Finite Coxeter group over Number Field in a with
defining polynomial x^2 - 5 with Coxeter matrix:
[1 3 2]
[3 1 5]
[2 5 1]

sage: W = CoxeterGroup(["H",3], implementation="reflection")
sage: W
Finite Coxeter group over Number Field in a with
defining polynomial x^2 - 5 with Coxeter matrix:
[1 3 2]
[3 1 5]
[2 5 1]

sage: W = CoxeterGroup(["A",4,1], implementation="permutation")
Traceback (most recent call last):
...
NotImplementedError: Coxeter group of type ['A', 4, 1] as permutation group not implemented

sage: W = CoxeterGroup(["A",4], implementation="chevie"); W     # optional - gap3
Irreducible real reflection group of rank 4 and type A4


We use the different options for the “reflection” implementation:

sage: W = CoxeterGroup(["H",3], implementation="reflection", base_ring=RR)
sage: W
Finite Coxeter group over Real Field with 53 bits of precision with Coxeter matrix:
[1 3 2]
[3 1 5]
[2 5 1]
sage: W = CoxeterGroup([[1,10],[10,1]], implementation="reflection", index_set=['a','b'], base_ring=SR)
sage: W
Finite Coxeter group over Symbolic Ring with Coxeter matrix:
[ 1 10]
[10  1]

class sage.combinat.root_system.coxeter_group.CoxeterGroupAsPermutationGroup(cartan_type)

Construct this Coxeter group as a Sage permutation group, by fetching the permutation representation of the generators from Chevie’s database.

class Element
has_descent(i, side='right', positive=False)

Returns whether $$i$$ is a (left/right) descent of self.

See sage.categories.coxeter_groups.CoxeterGroups.ElementMethods.descents() for a description of the options.

EXAMPLES:

sage: W = CoxeterGroup(["A",3])
sage: s = W.simple_reflections()
sage: w = s[1] * s[2] * s[3]
sage: w.has_descent(3)
True
sage: [ w.has_descent(i)                  for i in [1,2,3] ]
[False, False, True]
sage: [ w.has_descent(i, side = 'left')   for i in [1,2,3] ]
[True, False, False]
sage: [ w.has_descent(i, positive = True) for i in [1,2,3] ]
[True, True, False]


This implementation is a plain copy of that of CoxeterGroups. It is there as a workaround since $$PermutationGroupElement$$ currently redefines abusively has_descent() as if the group was the full symmetric group.

has_left_descent(i)

Returns whether i is a descent of self by testing whether i is mapped to a negative root.

EXAMPLES:

sage: W = CoxeterGroup(["A",3], implementation = "permutation") # optional - gap3
sage: s = W.simple_reflections() # optional - gap3
sage: (s[1]*s[2]).has_left_descent(1) # optional - gap3
True
sage: (s[1]*s[2]).has_left_descent(2) # optional - gap3
False

CoxeterGroupAsPermutationGroup.degrees()

Return the degrees of self ordered within each irreducible component of self.

EXAMPLES:

sage: from sage.combinat.root_system.coxeter_group import CoxeterGroupAsPermutationGroup
sage: W = CoxeterGroupAsPermutationGroup("A3")    # optional - gap3
sage: W.degrees()                                 # optional - gap3
(2, 3, 4)
sage: W = CoxeterGroupAsPermutationGroup("H3")    # optional - gap3
sage: W.degrees()                                 # optional - gap3
(2, 6, 10)

CoxeterGroupAsPermutationGroup.index_set()

Return the index set of this Coxeter group.

EXAMPLES:

sage: W = CoxeterGroup(["H",3], implementation = "permutation")  # optional - gap3
sage: W.index_set() # optional - gap3
[1, 2, 3]

CoxeterGroupAsPermutationGroup.reflection(i)

Returns the $$i$$-th reflection of self.

For $$i$$ in $$1, \ldots, n$$, this gives the $$i$$-th simple reflection of self.

EXAMPLES:

sage: W = CoxeterGroup(["H",3], implementation="permutation") # optional - gap3
sage: W.simple_reflection(1) # optional - gap3
(1,16)(2,5)(4,7)(6,9)(8,10)(11,13)(12,14)(17,20)(19,22)(21,24)(23,25)(26,28)(27,29)
sage: W.simple_reflection(2) # optional - gap3
(1,4)(2,17)(3,6)(5,7)(9,11)(10,12)(14,15)(16,19)(18,21)(20,22)(24,26)(25,27)(29,30)
sage: W.simple_reflection(3) # optional - gap3
(2,6)(3,18)(4,8)(5,9)(7,10)(11,12)(13,14)(17,21)(19,23)(20,24)(22,25)(26,27)(28,29)
sage: W.reflection(4)        # optional - gap3
(1,5)(2,22)(3,11)(4,19)(7,17)(8,12)(9,13)(10,15)(16,20)(18,26)(23,27)(24,28)(25,30)
sage: W.reflection(5)        # optional - gap3
(1,22)(2,4)(3,9)(5,20)(6,13)(7,16)(8,14)(12,15)(17,19)(18,24)(21,28)(23,29)(27,30)
sage: W.reflection(6)        # optional - gap3
(1,8)(2,18)(3,17)(5,12)(6,21)(7,11)(9,10)(13,15)(16,23)(20,27)(22,26)(24,25)(28,30)

CoxeterGroupAsPermutationGroup.simple_reflection(i)

Returns the $$i$$-th reflection of self.

For $$i$$ in $$1, \ldots, n$$, this gives the $$i$$-th simple reflection of self.

EXAMPLES:

sage: W = CoxeterGroup(["H",3], implementation="permutation") # optional - gap3
sage: W.simple_reflection(1) # optional - gap3
(1,16)(2,5)(4,7)(6,9)(8,10)(11,13)(12,14)(17,20)(19,22)(21,24)(23,25)(26,28)(27,29)
sage: W.simple_reflection(2) # optional - gap3
(1,4)(2,17)(3,6)(5,7)(9,11)(10,12)(14,15)(16,19)(18,21)(20,22)(24,26)(25,27)(29,30)
sage: W.simple_reflection(3) # optional - gap3
(2,6)(3,18)(4,8)(5,9)(7,10)(11,12)(13,14)(17,21)(19,23)(20,24)(22,25)(26,27)(28,29)
sage: W.reflection(4)        # optional - gap3
(1,5)(2,22)(3,11)(4,19)(7,17)(8,12)(9,13)(10,15)(16,20)(18,26)(23,27)(24,28)(25,30)
sage: W.reflection(5)        # optional - gap3
(1,22)(2,4)(3,9)(5,20)(6,13)(7,16)(8,14)(12,15)(17,19)(18,24)(21,28)(23,29)(27,30)
sage: W.reflection(6)        # optional - gap3
(1,8)(2,18)(3,17)(5,12)(6,21)(7,11)(9,10)(13,15)(16,23)(20,27)(22,26)(24,25)(28,30)

sage.combinat.root_system.coxeter_group.is_chevie_available()

Tests whether the GAP3 Chevie package is available

EXAMPLES:

sage: from sage.combinat.root_system.coxeter_group import is_chevie_available
sage: is_chevie_available() # random
False
sage: is_chevie_available() in [True, False]
True