# Examples of finite Weyl groups#

sage.categories.examples.finite_weyl_groups.Example[source]#

alias of SymmetricGroup

class sage.categories.examples.finite_weyl_groups.SymmetricGroup(n=4)[source]#

An example of finite Weyl group: the symmetric group, with elements in list notation.

The purpose of this class is to provide a minimal template for implementing finite Weyl groups. See SymmetricGroup for a full featured and optimized implementation.

EXAMPLES:

sage: S = FiniteWeylGroups().example()
sage: S
The symmetric group on {0, ..., 3}
sage: S.category()
Category of finite irreducible Weyl groups

>>> from sage.all import *
>>> S = FiniteWeylGroups().example()
>>> S
The symmetric group on {0, ..., 3}
>>> S.category()
Category of finite irreducible Weyl groups


The elements of this group are permutations of the set $$\{0,\ldots,3\}$$:

sage: S.one()
(0, 1, 2, 3)
sage: S.an_element()
(1, 2, 3, 0)

>>> from sage.all import *
>>> S.one()
(0, 1, 2, 3)
>>> S.an_element()
(1, 2, 3, 0)


The group itself is generated by the elementary transpositions:

sage: S.simple_reflections()
Finite family {0: (1, 0, 2, 3), 1: (0, 2, 1, 3), 2: (0, 1, 3, 2)}

>>> from sage.all import *
>>> S.simple_reflections()
Finite family {0: (1, 0, 2, 3), 1: (0, 2, 1, 3), 2: (0, 1, 3, 2)}


Only the following basic operations are implemented:

All the other usual Weyl group operations are inherited from the categories:

sage: S.cardinality()
24
sage: S.long_element()
(3, 2, 1, 0)
sage: S.cayley_graph(side="left").plot()                                        # needs sage.graphs sage.plot
Graphics object consisting of 120 graphics primitives

>>> from sage.all import *
>>> S.cardinality()
24
>>> S.long_element()
(3, 2, 1, 0)
>>> S.cayley_graph(side="left").plot()                                        # needs sage.graphs sage.plot
Graphics object consisting of 120 graphics primitives


Alternatively, one could have implemented sage.categories.coxeter_groups.CoxeterGroups.ElementMethods.apply_simple_reflection() instead of simple_reflection() and product(). See CoxeterGroups().example().

class Element[source]#

Bases: ElementWrapper

has_right_descent(i)[source]#

EXAMPLES:

sage: S = FiniteWeylGroups().example()
sage: s = S.simple_reflections()
sage: (s[1] * s[2]).has_descent(2)
True
sage: S._test_has_descent()

>>> from sage.all import *
>>> S = FiniteWeylGroups().example()
>>> s = S.simple_reflections()
>>> (s[Integer(1)] * s[Integer(2)]).has_descent(Integer(2))
True
>>> S._test_has_descent()

cartan_type()[source]#

Return the Cartan type of self.

EXAMPLES:

sage: FiniteWeylGroups().example().cartan_type()                            # needs sage.modules
['A', 3] relabelled by {1: 0, 2: 1, 3: 2}

>>> from sage.all import *
>>> FiniteWeylGroups().example().cartan_type()                            # needs sage.modules
['A', 3] relabelled by {1: 0, 2: 1, 3: 2}

degrees()[source]#

Return the degrees of self.

EXAMPLES:

sage: W = FiniteWeylGroups().example()
sage: W.degrees()
(2, 3, 4)

>>> from sage.all import *
>>> W = FiniteWeylGroups().example()
>>> W.degrees()
(2, 3, 4)

index_set()[source]#

EXAMPLES:

sage: FiniteWeylGroups().example().index_set()
[0, 1, 2]

>>> from sage.all import *
>>> FiniteWeylGroups().example().index_set()
[0, 1, 2]

one()[source]#

Implements Monoids.ParentMethods.one().

EXAMPLES:

sage: FiniteWeylGroups().example().one()
(0, 1, 2, 3)

>>> from sage.all import *
>>> FiniteWeylGroups().example().one()
(0, 1, 2, 3)

product(x, y)[source]#

Implements Semigroups.ParentMethods.product().

EXAMPLES:

sage: s = FiniteWeylGroups().example().simple_reflections()
sage: s[1] * s[2]
(0, 2, 3, 1)

>>> from sage.all import *
>>> s = FiniteWeylGroups().example().simple_reflections()
>>> s[Integer(1)] * s[Integer(2)]
(0, 2, 3, 1)

simple_reflection(i)[source]#

Implement CoxeterGroups.ParentMethods.simple_reflection() by returning the transposition $$(i, i+1)$$.

EXAMPLES:

sage: FiniteWeylGroups().example().simple_reflection(2)
(0, 1, 3, 2)

>>> from sage.all import *
>>> FiniteWeylGroups().example().simple_reflection(Integer(2))
(0, 1, 3, 2)