INPUT:
- cartan_type – a cartan type (or coercible into; see CartanType)
- implementation – “permutation”, “matrix”, “coxeter3”, or None (default: None)
Returns an implementation of the Coxeter group of type cartan_type.
EXAMPLES:
If implementation is not specified, a permutation representation is returned whenever possible (finite irreducible Cartan type, with the GAP3 Chevie package available):
sage: W = CoxeterGroup(["A",2])
sage: W # optional - chevie
Permutation Group with generators [(1,3)(2,5)(4,6), (1,4)(2,3)(5,6)]
Otherwise, a Weyl group is returned:
sage: W = CoxeterGroup(["A",3,1])
sage: W
Weyl Group of type ['A', 3, 1] (as a matrix group acting on the root space)
We now use the implementation option:
sage: W = CoxeterGroup(["A",2], implementation = "permutation") # optional - chevie
sage: W # optional - chevie
Permutation Group with generators [(1,3)(2,5)(4,6), (1,4)(2,3)(5,6)]
sage: W.category() # optional - chevie
Join of Category of finite permutation groups and Category of finite coxeter 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")
Traceback (most recent call last):
...
NotImplementedError: Coxeter group of type ['H', 3] as matrix group not implemented
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
Bases: sage.structure.unique_representation.UniqueRepresentation, sage.groups.perm_gps.permgroup.PermutationGroup_generic
Construct this Coxeter group as a Sage permutation group, by fetching the permutation representation of the generators from Chevie’s database.
TESTS:
sage: from sage.combinat.root_system.coxeter_group import CoxeterGroupAsPermutationGroup
sage: W = CoxeterGroupAsPermutationGroup(CartanType(["H",3])) # optional - chevie
sage: TestSuite(W).run() # optional - chevie
Bases: sage.groups.perm_gps.permgroup_element.PermutationGroupElement
Create element of a permutation group.
There are several ways to define a permutation group element:
INPUT:
EXAMPLES: We illustrate construction of permutation using several different methods.
First we construct elements by multiplying together generators for a group.
sage: G = PermutationGroup(['(1,2)(3,4)', '(3,4,5,6)'], canonicalize=False)
sage: s = G.gens()
sage: s[0]
(1,2)(3,4)
sage: s[1]
(3,4,5,6)
sage: s[0]*s[1]
(1,2)(3,5,6)
sage: (s[0]*s[1]).parent()
Permutation Group with generators [(1,2)(3,4), (3,4,5,6)]
Next we illustrate creation of a permutation using coercion into an already-created group.
sage: g = G([(1,2),(3,5,6)])
sage: g
(1,2)(3,5,6)
sage: g.parent()
Permutation Group with generators [(1,2)(3,4), (3,4,5,6)]
sage: g == s[0]*s[1]
True
We can also use a string instead of a list to specify the permutation.
sage: h = G('(1,2)(3,5,6)')
sage: g == h
True
We can also make a permutation group element directly using the
PermutationGroupElement command. Note that the
parent is then the full symmetric group , where
is the largest integer that is moved by the
permutation.
sage: k = PermutationGroupElement('(1,2)(3,5,6)')
sage: k
(1,2)(3,5,6)
sage: k.parent()
Symmetric group of order 6! as a permutation group
Note the comparison of permutations doesn’t require that the parent groups are the same.
sage: k == g
True
Arithmetic with permutations having different parents is also defined:
sage: k*g
(3,6,5)
sage: (k*g).parent()
Symmetric group of order 6! as a permutation group
sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]])
sage: loads(dumps(G.0)) == G.0
True
EXAMPLES:
sage: k = PermutationGroupElement('(1,2)(3,5,6)')
sage: k._gap_()
(1,2)(3,5,6)
sage: k._gap_().parent()
Gap
List notation:
sage: PermutationGroupElement([1,2,4,3,5])
(3,4)
TESTS:
sage: PermutationGroupElement(())
()
sage: PermutationGroupElement([()])
()
Returns whether 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
currently redefines abusively
has_descent() as if the group was the full symmetric
group.
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 - chevie
sage: s = W.simple_reflections() # optional - chevie
sage: (s[1]*s[2]).has_left_descent(1) # optional - chevie
True
sage: (s[1]*s[2]).has_left_descent(2) # optional - chevie
False
Returns the index set of this Coxeter group
EXAMPLES:
sage: W = CoxeterGroup(["H",3], implementation = "permutation") # optional - chevie
sage: W.index_set() # optional - chevie
[1, 2, 3]
Returns the -th reflection of self.
For in
, this gives the
-th simple
reflection of self.
EXAMPLES:
sage: W = CoxeterGroup(["H",3], implementation = "permutation") # optional - chevie
sage: W.simple_reflection(1) # optional - chevie
(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 - chevie
(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 - chevie
(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 - chevie
(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 - chevie
(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 - chevie
(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)
Returns the -th reflection of self.
For in
, this gives the
-th simple
reflection of self.
EXAMPLES:
sage: W = CoxeterGroup(["H",3], implementation = "permutation") # optional - chevie
sage: W.simple_reflection(1) # optional - chevie
(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 - chevie
(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 - chevie
(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 - chevie
(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 - chevie
(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 - chevie
(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)
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