Module: sage.combinat.crystals.letters
Crystals of letters
Module-level Functions
| cartan_type) |
Returns the crystal of letters of the given type.
For classical types, this is a combinatorial model for the crystal with highest weight Lambda_1 (the first fundamental weight).
Any irreducible classical crystal appears as the irreducible component
of the tensor product of several copies of this crystal (plus
possibly one copy of the spin crystal, see CrystalOfSpins).
See M. Kashiwara, T. Nakashima, Crystal graphs for representations of
the
-analogue of classical Lie algebras, J. Algebra 165 (1994), no. 2, 295-345.
Elements of this irreducible component have a fixed shape, and can
be fit inside a tableau shape. Otherwise said, any irreducible
classical crystal is isomorphic to a crystal of tableaux with
cells filled by elements of the crystal of letters (possibly
tensored with the crystal of spins).
Input:
sage: C = CrystalOfLetters(['A',5]) sage: C.list() [1, 2, 3, 4, 5, 6]
Class: ClassicalCrystalOfLetters
All classical crystals of letters should be instances of this class or of subclasses. To define a new crystal of letters, one only needs to implement a class for the elements (which subclasses Letter and CrystalElement), with appropriate e and f operations. If the module generator is not 1, one also needs to define the subclass ClassicalCrystalOfLetters for the crystal itself.
The basic assumption is that crystals of letters are small, but used intensively as building blocks. Therefore, we explicitly build in memory the list of all elements, the crystal graph and its transitive closure, so as to make the following operations constant time: list, cmp, (todo: phi, epsilon, e, f with caching)
| self, cartan_type, element_class) |
sage: C = CrystalOfLetters(['A',5]) sage: C == loads(dumps(C)) True
Functions: cmp_elements,
digraph,
list
| self, x, y) |
Returns True if and only if there is a path from x to y in the crystal graph.
Because the crystal graph is classical, it is a directed acyclic graph which can be interpreted as a poset. This function implements the comparison function of this poset.
sage: C = CrystalOfLetters(['A', 5]) sage: x = C(1) sage: y = C(2) sage: C.cmp_elements(x,y) -1 sage: C.cmp_elements(y,x) 1 sage: C.cmp_elements(x,x) 0
| self) |
Returns the directed graph associated to self.
sage: CrystalOfLetters(['A',5]).digraph() Digraph on 6 vertices
| self) |
Returns a list of the elements of self.
sage: C = CrystalOfLetters(['A',5]) sage: C.list() [1, 2, 3, 4, 5, 6]
Special Functions: __call__,
__contains__,
__init__
| self, value) |
Coerces value into self.
sage: C = CrystalOfLetters(['A',5]) sage: c = C(1); c 1 sage: c.parent() The crystal of letters for type ['A', 5] sage: c is C(c) True
| self, x) |
sage: C = CrystalOfLetters(['A',5]) sage: 1 in C False sage: C(1) in C True
Class: Crystal_of_letters_type_A_element
TESTS:
sage: C = CrystalOfLetters (['A',3]) sage: C.list() [1, 2, 3, 4] sage: [ [x < y for y in C] for x in C ] [[False, True, True, True], [False, False, True, True], [False, False, False, True], [False, False, False, False]]
sage: C = CrystalOfLetters(['A',5]) sage: C(1) < C(1), C(1) < C(2), C(1) < C(3), C(2) < C(1) (False, True, True, False)
sage: C.check() True
Functions: e,
f,
weight
| self, i) |
Returns the action of
on self.
sage: C = CrystalOfLetters(['A',4]) sage: [[c,i,c.e(i)] for i in C.index_set for c in C if c.e(i) is not None] [[2, 1, 1], [3, 2, 2], [4, 3, 3], [5, 4, 4]]
| self, i) |
Returns the action of
on self.
sage: C = CrystalOfLetters(['A',4]) sage: [[c,i,c.f(i)] for i in C.index_set for c in C if c.f(i) is not None] [[1, 1, 2], [2, 2, 3], [3, 3, 4], [4, 4, 5]]
| self) |
Returns the weight of self.
sage: [v.weight() for v in CrystalOfLetters(['A',3])] [(1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1)]
Class: Crystal_of_letters_type_B_element
TESTS:
sage: C = CrystalOfLetters (['B',3]) sage: C.check() True
Functions: e,
f,
weight
| self, i) |
Returns the action of
on self.
sage: C = CrystalOfLetters(['B',4]) sage: [[c,i,c.e(i)] for i in C.index_set for c in C if c.e(i) is not None] [[2, 1, 1], [-1, 1, -2], [3, 2, 2], [-2, 2, -3], [4, 3, 3], [-3, 3, -4], [0, 4, 4], [-4, 4, 0]]
| self, i) |
Returns the actions of
on self.
sage: C = CrystalOfLetters(['B',4]) sage: [[c,i,c.f(i)] for i in C.index_set for c in C if c.f(i) is not None] [[1, 1, 2], [-2, 1, -1], [2, 2, 3], [-3, 2, -2], [3, 3, 4], [-4, 3, -3], [4, 4, 0], [0, 4, -4]]
| self) |
Returns the weight of self.
sage: [v.weight() for v in CrystalOfLetters(['B',3])] [(1, 0, 0), (0, 1, 0), (0, 0, 1), (0, 0, 0), (0, 0, -1), (0, -1, 0), (-1, 0, 0)]
Class: Crystal_of_letters_type_C_element
TESTS:
sage: C = CrystalOfLetters (['C',3]) sage: C.list() [1, 2, 3, -3, -2, -1] sage: [ [x < y for y in C] for x in C ] [[False, True, True, True, True, True], [False, False, True, True, True, True], [False, False, False, True, True, True], [False, False, False, False, True, True], [False, False, False, False, False, True], [False, False, False, False, False, False]] sage: C.check() True
Functions: e,
f,
weight
| self, i) |
Returns the action of
on self.
sage: C = CrystalOfLetters(['C',4]) sage: [[c,i,c.e(i)] for i in C.index_set for c in C if c.e(i) is not None] [[2, 1, 1], [-1, 1, -2], [3, 2, 2], [-2, 2, -3], [4, 3, 3], [-3, 3, -4], [-4, 4, 4]]
| self, i) |
Retursn the action of
on self.
sage: C = CrystalOfLetters(['C',4]) sage: [[c,i,c.f(i)] for i in C.index_set for c in C if c.f(i) is not None] [[1, 1, 2], [-2, 1, -1], [2, 2, 3], [-3, 2, -2], [3, 3, 4], [-4, 3, -3], [4, 4, -4]]
| self) |
Returns the weight of self.
sage: [v.weight() for v in CrystalOfLetters(['C',3])] [(1, 0, 0), (0, 1, 0), (0, 0, 1), (0, 0, -1), (0, -1, 0), (-1, 0, 0)]
Class: Crystal_of_letters_type_D_element
TESTS:
sage: C = CrystalOfLetters(['D',4]) sage: C.list() [1, 2, 3, 4, -4, -3, -2, -1] sage: C.check() True
Functions: e,
f,
weight
| self, i) |
Returns the action of
on self.
sage: C = CrystalOfLetters(['D',5]) sage: [[c,i,c.e(i)] for i in C.index_set for c in C if c.e(i) is not None] [[2, 1, 1], [-1, 1, -2], [3, 2, 2], [-2, 2, -3], [4, 3, 3], [-3, 3, -4], [5, 4, 4], [-4, 4, -5], [-5, 5, 4], [-4, 5, 5]]
| self, i) |
Returns the action of
on self.
sage: C = CrystalOfLetters(['D',5]) sage: [[c,i,c.f(i)] for i in C.index_set for c in C if c.f(i) is not None] [[1, 1, 2], [-2, 1, -1], [2, 2, 3], [-3, 2, -2], [3, 3, 4], [-4, 3, -3], [4, 4, 5], [-5, 4, -4], [4, 5, -5], [5, 5, -4]]
| self) |
Returns the weight of self.
sage: [v.weight() for v in CrystalOfLetters(['D',4])] [(1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1), (0, 0, 0, -1), (0, 0, -1, 0), (0, -1, 0, 0), (-1, 0, 0, 0)]
Class: Crystal_of_letters_type_G_element
TESTS:
sage: C = CrystalOfLetters(['G',2]) sage: C.list() [1, 2, 3, 0, -3, -2, -1] sage: C.check() True
Functions: e,
f,
weight
| self, i) |
Returns the action of
on self.
sage: C = CrystalOfLetters(['G',2]) sage: [[c,i,c.e(i)] for i in C.index_set for c in C if c.e(i) is not None] [[2, 1, 1], [0, 1, 3], [-3, 1, 0], [-1, 1, -2], [3, 2, 2], [-2, 2, -3]]
| self, i) |
Returns the action of
on self.
sage: C = CrystalOfLetters(['G',2]) sage: [[c,i,c.f(i)] for i in C.index_set for c in C if c.f(i) is not None] [[1, 1, 2], [3, 1, 0], [0, 1, -3], [-2, 1, -1], [2, 2, 3], [-3, 2, -2]]
| self) |
Returns the weight of self.
sage: [v.weight() for v in CrystalOfLetters(['G',2])] [(1, 0, -1), (1, -1, 0), (0, 1, -1), (0, 0, 0), (0, -1, 1), (-1, 1, 0), (-1, 0, 1)]
Class: Letter
| self, parent, value) |
sage: from sage.combinat.crystals.letters import Letter sage: a = Letter(ZZ, 1) sage: a == loads(dumps(a)) True
Functions: parent
| self) |
Returns the parent of self.
sage: from sage.combinat.crystals.letters import Letter sage: Letter(ZZ, 1).parent() Integer Ring
Special Functions: __cmp__,
__eq__,
__init__,
__repr__
| self, other) |
sage: C = CrystalOfLetters(['A', 5]) sage: C(1) < C(2) True sage: C(2) < C(1) False sage: C(2) > C(1) True sage: C(1) <= C(1) True
| self, other) |
sage: from sage.combinat.crystals.letters import Letter sage: parent1 = 1 # Any fake value ... sage: parent2 = 2 # Any fake value ... sage: l11 = Letter(parent1, 1) sage: l12 = Letter(parent1, 2) sage: l21 = Letter(parent2, 1) sage: l22 = Letter(parent2, 2) sage: l11 == l11 True sage: l11 == l12 False sage: l11 == l21 False
| self) |
sage: from sage.combinat.crystals.letters import Letter sage: Letter(ZZ, 1).__repr__() '1'