Examples of finite Coxeter groups

class sage.categories.examples.finite_coxeter_groups.DihedralGroup(n=5)

Bases: sage.structure.unique_representation.UniqueRepresentation, sage.structure.parent.Parent

An example of finite Coxeter group: the \(n\)-th dihedral group of order \(2n\).

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 \(s_1\) and \(s_2\) subject to the relation \((s_1s_2)^n = 1\):

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 \(self.index_set()\)):

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 \((1,2,1,2\dots)\):

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_reflexive() . . . pass
running ._test_elements_eq_symmetric() . . . pass
running ._test_elements_eq_transitive() . . . pass
running ._test_elements_neq() . . . 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)]
class Element

Bases: sage.structure.element_wrapper.ElementWrapper

EXAMPLES:

sage: from sage.structure.element_wrapper import DummyParent
sage: a = ElementWrapper(DummyParent("A parent"), 1)

TESTS:

sage: TestSuite(a).run(skip = "_test_category")

sage: a = ElementWrapper(1, DummyParent("A parent"))
doctest:...: DeprecationWarning: the first argument must be a parent
See http://trac.sagemath.org/14519 for details.

Note

ElementWrapper is not intended to be used directly, hence the failing category test.

apply_simple_reflection_right(i)

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), ()]
has_right_descent(i, positive=False, side='right')

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()
DihedralGroup.index_set()

Implements CoxeterGroups.ParentMethods.index_set().

EXAMPLES:

sage: D4 = FiniteCoxeterGroups().example(4)
sage: D4.index_set()
[1, 2]
DihedralGroup.one()

Implements Monoids.ParentMethods.one().

EXAMPLES:

sage: D6 = FiniteCoxeterGroups().example(6)
sage: D6.one()
()
sage.categories.examples.finite_coxeter_groups.Example

alias of DihedralGroup

Previous topic

Example of facade set

Next topic

Examples of finite enumerated sets

This Page