Bases: sage.structure.unique_representation.UniqueRepresentation, sage.structure.parent.Parent
An example of finite Coxeter group: the -th dihedral group of order .
The purpose of this class is to provide a minimal template for implementing finite Coxeter groups. See DihedralGroup for a full featured and optimized implementation.
EXAMPLES:
sage: G = FiniteCoxeterGroups().example()
This group is generated by two simple reflections and subject to the relation :
sage: G.simple_reflections()
Finite family {1: (1,), 2: (2,)}
sage: s1, s2 = G.simple_reflections()
sage: (s1*s2)^5 == G.one()
True
An element is represented by its reduced word (a tuple of elements of ):
sage: G.an_element()
(1, 2)
sage: list(G)
[(),
(1,),
(1, 2),
(1, 2, 1),
(1, 2, 1, 2),
(1, 2, 1, 2, 1),
(2,),
(2, 1),
(2, 1, 2),
(2, 1, 2, 1)]
This reduced word is unique, except for the longest element where the choosen reduced word is :
sage: G.long_element()
(1, 2, 1, 2, 1)
TESTS:
sage: TestSuite(G).run(verbose = True)
running ._test_an_element() . . . pass
running ._test_associativity() . . . pass
running ._test_category() . . . pass
running ._test_elements() . . .
Running the test suite of self.an_element()
running ._test_category() . . . pass
running ._test_eq() . . . pass
running ._test_not_implemented_methods() . . . pass
running ._test_pickling() . . . pass
pass
running ._test_elements_eq() . . . pass
running ._test_enumerated_set_contains() . . . pass
running ._test_enumerated_set_iter_cardinality() . . . pass
running ._test_enumerated_set_iter_list() . . . pass
running ._test_eq() . . . pass
running ._test_has_descent() . . . pass
running ._test_inverse() . . . pass
running ._test_not_implemented_methods() . . . pass
running ._test_one() . . . pass
running ._test_pickling() . . . pass
running ._test_prod() . . . pass
running ._test_reduced_word() . . . pass
running ._test_simple_projections() . . . pass
running ._test_some_elements() . . . pass
sage: c = FiniteCoxeterGroups().example(3).cayley_graph()
sage: sorted(c.edges())
[((), (1,), 1),
((), (2,), 2),
((1,), (), 1),
((1,), (1, 2), 2),
((1, 2), (1,), 2),
((1, 2), (1, 2, 1), 1),
((1, 2, 1), (1, 2), 1),
((1, 2, 1), (2, 1), 2),
((2,), (), 2),
((2,), (2, 1), 1),
((2, 1), (1, 2, 1), 2),
((2, 1), (2,), 1)]
Bases: sage.structure.element_wrapper.ElementWrapper
Implements CoxeterGroups.ElementMethods.apply_simple_reflection().
EXEMPLES:
sage: D5 = FiniteCoxeterGroups().example(5)
sage: [i^2 for i in D5]
[(), (), (1, 2, 1, 2), (), (2, 1), (), (), (2, 1, 2, 1), (), (1, 2)]
sage: [i^5 for i in D5]
[(), (1,), (), (1, 2, 1), (), (1, 2, 1, 2, 1), (2,), (), (2, 1, 2), ()]
Implements SemiGroups.ElementMethods.has_right_descent().
EXAMPLES:
sage: D6 = FiniteCoxeterGroups().example(6)
sage: s = D6.simple_reflections()
sage: s[1].has_descent(1)
True
sage: s[1].has_descent(1)
True
sage: s[1].has_descent(2)
False
sage: D6.one().has_descent(1)
False
sage: D6.one().has_descent(2)
False
sage: D6.long_element().has_descent(1)
True
sage: D6.long_element().has_descent(2)
True
TESTS:
sage: D6._test_has_descent()
Implements: Sets.ParentMethods.an_element() by returning the product of the simple reflections (a Coxeter element).
EXAMPLES:
sage: W=CoxeterGroups().example()
sage: W
The symmetric group on {0, ..., 3}
sage: W.an_element()
(1, 2, 3, 0)
Implements CoxeterGroups.ParentMethods.index_set().
EXAMPLES:
sage: D4 = FiniteCoxeterGroups().example(4)
sage: D4.index_set()
[1, 2]
Implements Monoids.ParentMethods.one().
EXAMPLES:
sage: D6 = FiniteCoxeterGroups().example(6)
sage: D6.one()
()