Loop Crystals

class sage.categories.loop_crystals.KirillovReshetikhinCrystals[source]

Bases: Category_singleton

Category of Kirillov-Reshetikhin crystals.

class ElementMethods[source]

Bases: object

energy_function()[source]

Return the energy function of self.

Let \(B\) be a KR crystal. Let \(b^{\sharp}\) denote the unique element such that \(\varphi(b^{\sharp}) = \ell \Lambda_0\) with \(\ell = \min \{ \langle c, \varphi(b) \mid b \in B \}\). Let \(u_B\) denote the maximal element of \(B\). The energy of \(b \in B\) is given by

\[D(b) = H(b \otimes b^{\sharp}) - H(u_B \otimes b^{\sharp}),\]

where \(H\) is the local energy function.

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['D',4,1], 2,1)
sage: for x in K.classically_highest_weight_vectors():
....:    x, x.energy_function()
([], 1)
([[1], [2]], 0)

sage: K = crystals.KirillovReshetikhin(['D',4,3], 1,2)
sage: for x in K.classically_highest_weight_vectors():
....:    x, x.energy_function()
([], 2)
([[1]], 1)
([[1, 1]], 0)
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['D',Integer(4),Integer(1)], Integer(2),Integer(1))
>>> for x in K.classically_highest_weight_vectors():
...    x, x.energy_function()
([], 1)
([[1], [2]], 0)

>>> K = crystals.KirillovReshetikhin(['D',Integer(4),Integer(3)], Integer(1),Integer(2))
>>> for x in K.classically_highest_weight_vectors():
...    x, x.energy_function()
([], 2)
([[1]], 1)
([[1, 1]], 0)
lusztig_involution()[source]

Return the result of the classical Lusztig involution on self.

EXAMPLES:

sage: KRT = crystals.KirillovReshetikhin(['D',4,1], 2, 3, model='KR')
sage: mg = KRT.module_generators[1]
sage: mg.lusztig_involution()
[[-2, -2, 1], [-1, -1, 2]]
sage: elt = mg.f_string([2,1,3,2]); elt
[[3, -2, 1], [4, -1, 2]]
sage: elt.lusztig_involution()
[[-4, -2, 1], [-3, -1, 2]]
>>> from sage.all import *
>>> KRT = crystals.KirillovReshetikhin(['D',Integer(4),Integer(1)], Integer(2), Integer(3), model='KR')
>>> mg = KRT.module_generators[Integer(1)]
>>> mg.lusztig_involution()
[[-2, -2, 1], [-1, -1, 2]]
>>> elt = mg.f_string([Integer(2),Integer(1),Integer(3),Integer(2)]); elt
[[3, -2, 1], [4, -1, 2]]
>>> elt.lusztig_involution()
[[-4, -2, 1], [-3, -1, 2]]
class ParentMethods[source]

Bases: object

R_matrix(K)[source]

Return the combinatorial \(R\)-matrix of self to K.

The combinatorial \(R\)-matrix is the affine crystal isomorphism \(R : L \otimes K \to K \otimes L\) which maps \(u_{L} \otimes u_K\) to \(u_K \otimes u_{L}\), where \(u_K\) is the unique element in \(K = B^{r,s}\) of weight \(s\Lambda_r - s c \Lambda_0\) (see maximal_vector()).

INPUT:

  • self – a crystal \(L\)

  • K – a Kirillov-Reshetikhin crystal of the same type as \(L\)

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['A',2,1],1,1)
sage: L = crystals.KirillovReshetikhin(['A',2,1],1,2)
sage: f = K.R_matrix(L)
sage: [[b,f(b)] for b in crystals.TensorProduct(K,L)]
[[[[[1]], [[1, 1]]], [[[1, 1]], [[1]]]],
 [[[[1]], [[1, 2]]], [[[1, 1]], [[2]]]],
 [[[[1]], [[2, 2]]], [[[1, 2]], [[2]]]],
 [[[[1]], [[1, 3]]], [[[1, 1]], [[3]]]],
 [[[[1]], [[2, 3]]], [[[1, 2]], [[3]]]],
 [[[[1]], [[3, 3]]], [[[1, 3]], [[3]]]],
 [[[[2]], [[1, 1]]], [[[1, 2]], [[1]]]],
 [[[[2]], [[1, 2]]], [[[2, 2]], [[1]]]],
 [[[[2]], [[2, 2]]], [[[2, 2]], [[2]]]],
 [[[[2]], [[1, 3]]], [[[2, 3]], [[1]]]],
 [[[[2]], [[2, 3]]], [[[2, 2]], [[3]]]],
 [[[[2]], [[3, 3]]], [[[2, 3]], [[3]]]],
 [[[[3]], [[1, 1]]], [[[1, 3]], [[1]]]],
 [[[[3]], [[1, 2]]], [[[1, 3]], [[2]]]],
 [[[[3]], [[2, 2]]], [[[2, 3]], [[2]]]],
 [[[[3]], [[1, 3]]], [[[3, 3]], [[1]]]],
 [[[[3]], [[2, 3]]], [[[3, 3]], [[2]]]],
 [[[[3]], [[3, 3]]], [[[3, 3]], [[3]]]]]

sage: K = crystals.KirillovReshetikhin(['D',4,1],1,1)
sage: L = crystals.KirillovReshetikhin(['D',4,1],2,1)
sage: f = K.R_matrix(L)
sage: T = crystals.TensorProduct(K,L)
sage: b = T( K(rows=[[1]]), L(rows=[]) )
sage: f(b)
[[[2], [-2]], [[1]]]
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['A',Integer(2),Integer(1)],Integer(1),Integer(1))
>>> L = crystals.KirillovReshetikhin(['A',Integer(2),Integer(1)],Integer(1),Integer(2))
>>> f = K.R_matrix(L)
>>> [[b,f(b)] for b in crystals.TensorProduct(K,L)]
[[[[[1]], [[1, 1]]], [[[1, 1]], [[1]]]],
 [[[[1]], [[1, 2]]], [[[1, 1]], [[2]]]],
 [[[[1]], [[2, 2]]], [[[1, 2]], [[2]]]],
 [[[[1]], [[1, 3]]], [[[1, 1]], [[3]]]],
 [[[[1]], [[2, 3]]], [[[1, 2]], [[3]]]],
 [[[[1]], [[3, 3]]], [[[1, 3]], [[3]]]],
 [[[[2]], [[1, 1]]], [[[1, 2]], [[1]]]],
 [[[[2]], [[1, 2]]], [[[2, 2]], [[1]]]],
 [[[[2]], [[2, 2]]], [[[2, 2]], [[2]]]],
 [[[[2]], [[1, 3]]], [[[2, 3]], [[1]]]],
 [[[[2]], [[2, 3]]], [[[2, 2]], [[3]]]],
 [[[[2]], [[3, 3]]], [[[2, 3]], [[3]]]],
 [[[[3]], [[1, 1]]], [[[1, 3]], [[1]]]],
 [[[[3]], [[1, 2]]], [[[1, 3]], [[2]]]],
 [[[[3]], [[2, 2]]], [[[2, 3]], [[2]]]],
 [[[[3]], [[1, 3]]], [[[3, 3]], [[1]]]],
 [[[[3]], [[2, 3]]], [[[3, 3]], [[2]]]],
 [[[[3]], [[3, 3]]], [[[3, 3]], [[3]]]]]

>>> K = crystals.KirillovReshetikhin(['D',Integer(4),Integer(1)],Integer(1),Integer(1))
>>> L = crystals.KirillovReshetikhin(['D',Integer(4),Integer(1)],Integer(2),Integer(1))
>>> f = K.R_matrix(L)
>>> T = crystals.TensorProduct(K,L)
>>> b = T( K(rows=[[Integer(1)]]), L(rows=[]) )
>>> f(b)
[[[2], [-2]], [[1]]]

Alternatively, one can compute the combinatorial \(R\)-matrix using the isomorphism method of digraphs:

sage: K1 = crystals.KirillovReshetikhin(['A',2,1],1,1)
sage: K2 = crystals.KirillovReshetikhin(['A',2,1],2,1)
sage: T1 = crystals.TensorProduct(K1,K2)
sage: T2 = crystals.TensorProduct(K2,K1)
sage: T1.digraph().is_isomorphic(T2.digraph(), edge_labels=True,  # todo: not implemented (see #10904 and #10549)
....:                            certificate=True)
(True, {[[[1]], [[2], [3]]]: [[[1], [3]], [[2]]],
        [[[3]], [[2], [3]]]: [[[2], [3]], [[3]]],
        [[[3]], [[1], [3]]]: [[[1], [3]], [[3]]],
        [[[1]], [[1], [3]]]: [[[1], [3]], [[1]]], [[[1]],
        [[1], [2]]]: [[[1], [2]], [[1]]],
        [[[2]], [[1], [2]]]: [[[1], [2]], [[2]]], [[[3]],
        [[1], [2]]]: [[[2], [3]], [[1]]],
        [[[2]], [[1], [3]]]: [[[1], [2]], [[3]]],
        [[[2]], [[2], [3]]]: [[[2], [3]], [[2]]]})
>>> from sage.all import *
>>> K1 = crystals.KirillovReshetikhin(['A',Integer(2),Integer(1)],Integer(1),Integer(1))
>>> K2 = crystals.KirillovReshetikhin(['A',Integer(2),Integer(1)],Integer(2),Integer(1))
>>> T1 = crystals.TensorProduct(K1,K2)
>>> T2 = crystals.TensorProduct(K2,K1)
>>> T1.digraph().is_isomorphic(T2.digraph(), edge_labels=True,  # todo: not implemented (see #10904 and #10549)
...                            certificate=True)
(True, {[[[1]], [[2], [3]]]: [[[1], [3]], [[2]]],
        [[[3]], [[2], [3]]]: [[[2], [3]], [[3]]],
        [[[3]], [[1], [3]]]: [[[1], [3]], [[3]]],
        [[[1]], [[1], [3]]]: [[[1], [3]], [[1]]], [[[1]],
        [[1], [2]]]: [[[1], [2]], [[1]]],
        [[[2]], [[1], [2]]]: [[[1], [2]], [[2]]], [[[3]],
        [[1], [2]]]: [[[2], [3]], [[1]]],
        [[[2]], [[1], [3]]]: [[[1], [2]], [[3]]],
        [[[2]], [[2], [3]]]: [[[2], [3]], [[2]]]})
affinization()[source]

Return the corresponding affinization crystal of self.

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['A',2,1], 1, 1)
sage: K.affinization()
Affinization of Kirillov-Reshetikhin crystal of type ['A', 2, 1] with (r,s)=(1,1)

sage: K = crystals.KirillovReshetikhin(['A',2,1], 1, 1, model='KR')
sage: K.affinization()
Affinization of Kirillov-Reshetikhin tableaux of type ['A', 2, 1] and shape (1, 1)
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['A',Integer(2),Integer(1)], Integer(1), Integer(1))
>>> K.affinization()
Affinization of Kirillov-Reshetikhin crystal of type ['A', 2, 1] with (r,s)=(1,1)

>>> K = crystals.KirillovReshetikhin(['A',Integer(2),Integer(1)], Integer(1), Integer(1), model='KR')
>>> K.affinization()
Affinization of Kirillov-Reshetikhin tableaux of type ['A', 2, 1] and shape (1, 1)
b_sharp()[source]

Return the element \(b^{\sharp}\) of self.

Let \(B\) be a KR crystal. The element \(b^{\sharp}\) is the unique element such that \(\varphi(b^{\sharp}) = \ell \Lambda_0\) with \(\ell = \min \{ \langle c, \varphi(b) \rangle \mid b \in B \}\).

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['A',6,2], 2,1)
sage: K.b_sharp()
[]
sage: K.b_sharp().Phi()
Lambda[0]

sage: K = crystals.KirillovReshetikhin(['C',3,1], 1,3)
sage: K.b_sharp()
[[-1]]
sage: K.b_sharp().Phi()
2*Lambda[0]

sage: K = crystals.KirillovReshetikhin(['D',6,2], 2,2)
sage: K.b_sharp() # long time
[]
sage: K.b_sharp().Phi() # long time
2*Lambda[0]
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['A',Integer(6),Integer(2)], Integer(2),Integer(1))
>>> K.b_sharp()
[]
>>> K.b_sharp().Phi()
Lambda[0]

>>> K = crystals.KirillovReshetikhin(['C',Integer(3),Integer(1)], Integer(1),Integer(3))
>>> K.b_sharp()
[[-1]]
>>> K.b_sharp().Phi()
2*Lambda[0]

>>> K = crystals.KirillovReshetikhin(['D',Integer(6),Integer(2)], Integer(2),Integer(2))
>>> K.b_sharp() # long time
[]
>>> K.b_sharp().Phi() # long time
2*Lambda[0]
cardinality()[source]

Return the cardinality of self.

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['E',6,1], 1,1)
sage: K.cardinality()
27
sage: K = crystals.KirillovReshetikhin(['C',6,1], 4,3)
sage: K.cardinality()
4736732
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['E',Integer(6),Integer(1)], Integer(1),Integer(1))
>>> K.cardinality()
27
>>> K = crystals.KirillovReshetikhin(['C',Integer(6),Integer(1)], Integer(4),Integer(3))
>>> K.cardinality()
4736732
classical_decomposition()[source]

Return the classical decomposition of self.

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['A',3,1], 2,2)
sage: K.classical_decomposition()
The crystal of tableaux of type ['A', 3] and shape(s) [[2, 2]]
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['A',Integer(3),Integer(1)], Integer(2),Integer(2))
>>> K.classical_decomposition()
The crystal of tableaux of type ['A', 3] and shape(s) [[2, 2]]
classically_highest_weight_vectors()[source]

Return the classically highest weight elements of self.

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['E',6,1],1,1)
sage: K.classically_highest_weight_vectors()
([(1,)],)
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['E',Integer(6),Integer(1)],Integer(1),Integer(1))
>>> K.classically_highest_weight_vectors()
([(1,)],)
is_perfect(ell=None)[source]

Check if self is a perfect crystal of level ell.

A crystal \(\mathcal{B}\) is perfect of level \(\ell\) if:

  1. \(\mathcal{B}\) is isomorphic to the crystal graph of a finite-dimensional \(U_q'(\mathfrak{g})\)-module.

  2. \(\mathcal{B} \otimes \mathcal{B}\) is connected.

  3. There exists a \(\lambda\in X\), such that \(\mathrm{wt}(\mathcal{B}) \subset \lambda + \sum_{i\in I} \ZZ_{\le 0} \alpha_i\) and there is a unique element in \(\mathcal{B}\) of classical weight \(\lambda\).

  4. For all \(b \in \mathcal{B}\), \(\mathrm{level}(\varepsilon (b)) \geq \ell\).

  5. For all \(\Lambda\) dominant weights of level \(\ell\), there exist unique elements \(b_{\Lambda}, b^{\Lambda} \in \mathcal{B}\), such that \(\varepsilon(b_{\Lambda}) = \Lambda = \varphi(b^{\Lambda})\).

Points (1)-(3) are known to hold. This method checks points (4) and (5).

If self is the Kirillov-Reshetikhin crystal \(B^{r,s}\), then it was proven for non-exceptional types in [FOS2010] that it is perfect if and only if \(s/c_r\) is an integer (where \(c_r\) is a constant related to the type of the crystal).

It is conjectured this is true for all affine types.

INPUT:

  • ell – (default: \(s / c_r\)) integer; the level

REFERENCES:

[FOS2010]

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['A',2,1], 1, 1)
sage: K.is_perfect()
True

sage: K = crystals.KirillovReshetikhin(['C',2,1], 1, 1)
sage: K.is_perfect()
False

sage: K = crystals.KirillovReshetikhin(['C',2,1], 1, 2)
sage: K.is_perfect()
True

sage: K = crystals.KirillovReshetikhin(['E',6,1], 1, 3)
sage: K.is_perfect()
True
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['A',Integer(2),Integer(1)], Integer(1), Integer(1))
>>> K.is_perfect()
True

>>> K = crystals.KirillovReshetikhin(['C',Integer(2),Integer(1)], Integer(1), Integer(1))
>>> K.is_perfect()
False

>>> K = crystals.KirillovReshetikhin(['C',Integer(2),Integer(1)], Integer(1), Integer(2))
>>> K.is_perfect()
True

>>> K = crystals.KirillovReshetikhin(['E',Integer(6),Integer(1)], Integer(1), Integer(3))
>>> K.is_perfect()
True

Todo

Implement a version for tensor products of KR crystals.

level()[source]

Return the level of self when self is a perfect crystal.

See also

is_perfect()

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['A',2,1], 1, 1)
sage: K.level()
1
sage: K = crystals.KirillovReshetikhin(['C',2,1], 1, 2)
sage: K.level()
1
sage: K = crystals.KirillovReshetikhin(['D',4,1], 1, 3)
sage: K.level()
3

sage: K = crystals.KirillovReshetikhin(['C',2,1], 1, 1)
sage: K.level()
Traceback (most recent call last):
...
ValueError: this crystal is not perfect
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['A',Integer(2),Integer(1)], Integer(1), Integer(1))
>>> K.level()
1
>>> K = crystals.KirillovReshetikhin(['C',Integer(2),Integer(1)], Integer(1), Integer(2))
>>> K.level()
1
>>> K = crystals.KirillovReshetikhin(['D',Integer(4),Integer(1)], Integer(1), Integer(3))
>>> K.level()
3

>>> K = crystals.KirillovReshetikhin(['C',Integer(2),Integer(1)], Integer(1), Integer(1))
>>> K.level()
Traceback (most recent call last):
...
ValueError: this crystal is not perfect
local_energy_function(B)[source]

Return the local energy function of self and B.

See LocalEnergyFunction for a definition.

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['A',6,2], 2,1)
sage: Kp = crystals.KirillovReshetikhin(['A',6,2], 1,1)
sage: H = K.local_energy_function(Kp); H
Local energy function of
 Kirillov-Reshetikhin crystal of type ['BC', 3, 2] with (r,s)=(2,1)
tensor
 Kirillov-Reshetikhin crystal of type ['BC', 3, 2] with (r,s)=(1,1)
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['A',Integer(6),Integer(2)], Integer(2),Integer(1))
>>> Kp = crystals.KirillovReshetikhin(['A',Integer(6),Integer(2)], Integer(1),Integer(1))
>>> H = K.local_energy_function(Kp); H
Local energy function of
 Kirillov-Reshetikhin crystal of type ['BC', 3, 2] with (r,s)=(2,1)
tensor
 Kirillov-Reshetikhin crystal of type ['BC', 3, 2] with (r,s)=(1,1)
maximal_vector()[source]

Return the unique element of classical weight \(s \Lambda_r\) in self.

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['C',2,1],1,2)
sage: K.maximal_vector()
[[1, 1]]
sage: K = crystals.KirillovReshetikhin(['E',6,1],1,1)
sage: K.maximal_vector()
[(1,)]

sage: K = crystals.KirillovReshetikhin(['D',4,1],2,1)
sage: K.maximal_vector()
[[1], [2]]
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['C',Integer(2),Integer(1)],Integer(1),Integer(2))
>>> K.maximal_vector()
[[1, 1]]
>>> K = crystals.KirillovReshetikhin(['E',Integer(6),Integer(1)],Integer(1),Integer(1))
>>> K.maximal_vector()
[(1,)]

>>> K = crystals.KirillovReshetikhin(['D',Integer(4),Integer(1)],Integer(2),Integer(1))
>>> K.maximal_vector()
[[1], [2]]
module_generator()[source]

Return the unique module generator of classical weight \(s \Lambda_r\) of the Kirillov-Reshetikhin crystal \(B^{r,s}\).

EXAMPLES:

sage: La = RootSystem(['G',2,1]).weight_space().fundamental_weights()
sage: K = crystals.ProjectedLevelZeroLSPaths(La[1])
sage: K.module_generator()
(-Lambda[0] + Lambda[1],)
>>> from sage.all import *
>>> La = RootSystem(['G',Integer(2),Integer(1)]).weight_space().fundamental_weights()
>>> K = crystals.ProjectedLevelZeroLSPaths(La[Integer(1)])
>>> K.module_generator()
(-Lambda[0] + Lambda[1],)
q_dimension(q=None, prec=None, use_product=False)[source]

Return the \(q\)-dimension of self.

The \(q\)-dimension of a KR crystal is defined as the \(q\)-dimension of the underlying classical crystal.

EXAMPLES:

sage: KRC = crystals.KirillovReshetikhin(['A',2,1], 2,2)
sage: KRC.q_dimension()
q^4 + q^3 + 2*q^2 + q + 1
sage: KRC = crystals.KirillovReshetikhin(['D',4,1], 2,1)
sage: KRC.q_dimension()
q^10 + q^9 + 3*q^8 + 3*q^7 + 4*q^6 + 4*q^5 + 4*q^4 + 3*q^3 + 3*q^2 + q + 2
>>> from sage.all import *
>>> KRC = crystals.KirillovReshetikhin(['A',Integer(2),Integer(1)], Integer(2),Integer(2))
>>> KRC.q_dimension()
q^4 + q^3 + 2*q^2 + q + 1
>>> KRC = crystals.KirillovReshetikhin(['D',Integer(4),Integer(1)], Integer(2),Integer(1))
>>> KRC.q_dimension()
q^10 + q^9 + 3*q^8 + 3*q^7 + 4*q^6 + 4*q^5 + 4*q^4 + 3*q^3 + 3*q^2 + q + 2
r()[source]

Return the value \(r\) in self written as \(B^{r,s}\).

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['A',3,1], 2,4)
sage: K.r()
2
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['A',Integer(3),Integer(1)], Integer(2),Integer(4))
>>> K.r()
2
s()[source]

Return the value \(s\) in self written as \(B^{r,s}\).

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['A',3,1], 2,4)
sage: K.s()
4
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['A',Integer(3),Integer(1)], Integer(2),Integer(4))
>>> K.s()
4
class TensorProducts(category, *args)[source]

Bases: TensorProductsCategory

The category of tensor products of Kirillov-Reshetikhin crystals.

class ElementMethods[source]

Bases: object

affine_grading()[source]

Return the affine grading of self.

The affine grading is calculated by finding a path from self to a ground state path (using the helper method e_string_to_ground_state()) and counting the number of affine Kashiwara operators \(e_0\) applied on the way.

OUTPUT: integer

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['A',2,1],1,1)
sage: T = crystals.TensorProduct(K,K)
sage: t = T.module_generators[0]
sage: t.affine_grading()
1

sage: K = crystals.KirillovReshetikhin(['A',2,1],1,1)
sage: T = crystals.TensorProduct(K,K,K)
sage: hw = T.classically_highest_weight_vectors()
sage: for b in hw:
....:     print("{} {}".format(b, b.affine_grading()))
[[[1]], [[1]], [[1]]] 3
[[[2]], [[1]], [[1]]] 2
[[[1]], [[2]], [[1]]] 1
[[[3]], [[2]], [[1]]] 0

sage: K = crystals.KirillovReshetikhin(['C',2,1],1,1)
sage: T = crystals.TensorProduct(K,K,K)
sage: hw = T.classically_highest_weight_vectors()
sage: for b in hw:
....:     print("{} {}".format(b, b.affine_grading()))
[[[1]], [[1]], [[1]]] 2
[[[2]], [[1]], [[1]]] 1
[[[-1]], [[1]], [[1]]] 1
[[[1]], [[2]], [[1]]] 1
[[[-2]], [[2]], [[1]]] 0
[[[1]], [[-1]], [[1]]] 0
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['A',Integer(2),Integer(1)],Integer(1),Integer(1))
>>> T = crystals.TensorProduct(K,K)
>>> t = T.module_generators[Integer(0)]
>>> t.affine_grading()
1

>>> K = crystals.KirillovReshetikhin(['A',Integer(2),Integer(1)],Integer(1),Integer(1))
>>> T = crystals.TensorProduct(K,K,K)
>>> hw = T.classically_highest_weight_vectors()
>>> for b in hw:
...     print("{} {}".format(b, b.affine_grading()))
[[[1]], [[1]], [[1]]] 3
[[[2]], [[1]], [[1]]] 2
[[[1]], [[2]], [[1]]] 1
[[[3]], [[2]], [[1]]] 0

>>> K = crystals.KirillovReshetikhin(['C',Integer(2),Integer(1)],Integer(1),Integer(1))
>>> T = crystals.TensorProduct(K,K,K)
>>> hw = T.classically_highest_weight_vectors()
>>> for b in hw:
...     print("{} {}".format(b, b.affine_grading()))
[[[1]], [[1]], [[1]]] 2
[[[2]], [[1]], [[1]]] 1
[[[-1]], [[1]], [[1]]] 1
[[[1]], [[2]], [[1]]] 1
[[[-2]], [[2]], [[1]]] 0
[[[1]], [[-1]], [[1]]] 0
e_string_to_ground_state()[source]

Return a string of integers in the index set \((i_1, \ldots, i_k)\) such that \(e_{i_k} \cdots e_{i_1}\) of self is the ground state.

This method calculates a path from self to a ground state path using Demazure arrows as defined in Lemma 7.3 in [ST2011].

OUTPUT: a tuple of integers \((i_1, \ldots, i_k)\)

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['A',2,1],1,1)
sage: T = crystals.TensorProduct(K,K)
sage: t = T.module_generators[0]
sage: t.e_string_to_ground_state()
(0, 2)

sage: K = crystals.KirillovReshetikhin(['C',2,1],1,1)
sage: T = crystals.TensorProduct(K,K)
sage: t = T.module_generators[0]; t
[[[1]], [[1]]]
sage: t.e_string_to_ground_state()
(0,)
sage: x = t.e(0)
sage: x.e_string_to_ground_state()
()
sage: y = t.f_string([1,2,1,1,0]); y
[[[2]], [[1]]]
sage: y.e_string_to_ground_state()
()
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['A',Integer(2),Integer(1)],Integer(1),Integer(1))
>>> T = crystals.TensorProduct(K,K)
>>> t = T.module_generators[Integer(0)]
>>> t.e_string_to_ground_state()
(0, 2)

>>> K = crystals.KirillovReshetikhin(['C',Integer(2),Integer(1)],Integer(1),Integer(1))
>>> T = crystals.TensorProduct(K,K)
>>> t = T.module_generators[Integer(0)]; t
[[[1]], [[1]]]
>>> t.e_string_to_ground_state()
(0,)
>>> x = t.e(Integer(0))
>>> x.e_string_to_ground_state()
()
>>> y = t.f_string([Integer(1),Integer(2),Integer(1),Integer(1),Integer(0)]); y
[[[2]], [[1]]]
>>> y.e_string_to_ground_state()
()
energy_function(algorithm=None)[source]

Return the energy function of self.

ALGORITHM:

definition

Let \(T\) be a tensor product of Kirillov-Reshetikhin crystals. Let \(R_i\) and \(H_i\) be the combinatorial \(R\)-matrix and local energy functions, respectively, acting on the \(i\) and \(i+1\) factors. Let \(D_B\) be the energy function of a single Kirillov-Reshetikhin crystal. The energy function is given by

\[D = \sum_{j > i} H_i R_{i+1} R_{i+2} \cdots R_{j-1} + \sum_j D_B R_1 R_2 \cdots R_{j-1},\]

where \(D_B\) acts on the rightmost factor.

grading

If self is an element of \(T\), a tensor product of perfect crystals of the same level, then use the affine grading to determine the energy. Specifically, let \(g\) denote the affine grading of self and \(d\) the affine grading of the maximal vector in \(T\). Then the energy of self is given by \(d - g\).

For more details, see Theorem 7.5 in [ST2011].

INPUT:

  • algorithm – (default: None) use one of the following algorithms to determine the energy function:

    • 'definition' – use the definition of the energy function;

    • 'grading' – use the affine grading;

    if not specified, then this uses 'grading' if all factors are perfect of the same level and otherwise this uses 'definition'

OUTPUT: integer

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['A',2,1], 1, 1)
sage: T = crystals.TensorProduct(K,K,K)
sage: hw = T.classically_highest_weight_vectors()
sage: for b in hw:
....:     print("{} {}".format(b, b.energy_function()))
[[[1]], [[1]], [[1]]] 0
[[[2]], [[1]], [[1]]] 1
[[[1]], [[2]], [[1]]] 2
[[[3]], [[2]], [[1]]] 3

sage: K = crystals.KirillovReshetikhin(['C',2,1], 1, 2)
sage: T = crystals.TensorProduct(K,K)
sage: hw = T.classically_highest_weight_vectors()
sage: for b in hw:
....:     print("{} {}".format(b, b.energy_function()))
[[], []] 4
[[[1, 1]], []] 3
[[], [[1, 1]]] 1
[[[1, 1]], [[1, 1]]] 0
[[[1, 2]], [[1, 1]]] 1
[[[2, 2]], [[1, 1]]] 2
[[[-1, -1]], [[1, 1]]] 2
[[[1, -1]], [[1, 1]]] 2
[[[2, -1]], [[1, 1]]] 2

sage: K = crystals.KirillovReshetikhin(['C',2,1], 1, 1)
sage: T = crystals.TensorProduct(K)
sage: t = T.module_generators[0]
sage: t.energy_function('grading')
Traceback (most recent call last):
...
NotImplementedError: all crystals in the tensor product
 need to be perfect of the same level
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['A',Integer(2),Integer(1)], Integer(1), Integer(1))
>>> T = crystals.TensorProduct(K,K,K)
>>> hw = T.classically_highest_weight_vectors()
>>> for b in hw:
...     print("{} {}".format(b, b.energy_function()))
[[[1]], [[1]], [[1]]] 0
[[[2]], [[1]], [[1]]] 1
[[[1]], [[2]], [[1]]] 2
[[[3]], [[2]], [[1]]] 3

>>> K = crystals.KirillovReshetikhin(['C',Integer(2),Integer(1)], Integer(1), Integer(2))
>>> T = crystals.TensorProduct(K,K)
>>> hw = T.classically_highest_weight_vectors()
>>> for b in hw:
...     print("{} {}".format(b, b.energy_function()))
[[], []] 4
[[[1, 1]], []] 3
[[], [[1, 1]]] 1
[[[1, 1]], [[1, 1]]] 0
[[[1, 2]], [[1, 1]]] 1
[[[2, 2]], [[1, 1]]] 2
[[[-1, -1]], [[1, 1]]] 2
[[[1, -1]], [[1, 1]]] 2
[[[2, -1]], [[1, 1]]] 2

>>> K = crystals.KirillovReshetikhin(['C',Integer(2),Integer(1)], Integer(1), Integer(1))
>>> T = crystals.TensorProduct(K)
>>> t = T.module_generators[Integer(0)]
>>> t.energy_function('grading')
Traceback (most recent call last):
...
NotImplementedError: all crystals in the tensor product
 need to be perfect of the same level
class ParentMethods[source]

Bases: object

cardinality()[source]

Return the cardinality of self.

EXAMPLES:

sage: RC = RiggedConfigurations(['A', 3, 1], [[3, 2], [1, 2]])
sage: RC.cardinality()
100
sage: len(RC.list())
100

sage: RC = RiggedConfigurations(['E', 7, 1], [[1,1]])
sage: RC.cardinality()
134
sage: len(RC.list())
134

sage: RC = RiggedConfigurations(['B', 3, 1], [[2,2],[1,2]])
sage: RC.cardinality()
5130
>>> from sage.all import *
>>> RC = RiggedConfigurations(['A', Integer(3), Integer(1)], [[Integer(3), Integer(2)], [Integer(1), Integer(2)]])
>>> RC.cardinality()
100
>>> len(RC.list())
100

>>> RC = RiggedConfigurations(['E', Integer(7), Integer(1)], [[Integer(1),Integer(1)]])
>>> RC.cardinality()
134
>>> len(RC.list())
134

>>> RC = RiggedConfigurations(['B', Integer(3), Integer(1)], [[Integer(2),Integer(2)],[Integer(1),Integer(2)]])
>>> RC.cardinality()
5130
classically_highest_weight_vectors()[source]

Return the classically highest weight elements of self.

This works by using a backtracking algorithm since if \(b_2 \otimes b_1\) is classically highest weight then \(b_1\) is classically highest weight.

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['A',2,1],1,1)
sage: T = crystals.TensorProduct(K,K,K)
sage: T.classically_highest_weight_vectors()
([[[1]], [[1]], [[1]]],
 [[[2]], [[1]], [[1]]],
 [[[1]], [[2]], [[1]]],
 [[[3]], [[2]], [[1]]])
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['A',Integer(2),Integer(1)],Integer(1),Integer(1))
>>> T = crystals.TensorProduct(K,K,K)
>>> T.classically_highest_weight_vectors()
([[[1]], [[1]], [[1]]],
 [[[2]], [[1]], [[1]]],
 [[[1]], [[2]], [[1]]],
 [[[3]], [[2]], [[1]]])
maximal_vector()[source]

Return the maximal vector of self.

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['A',2,1],1,1)
sage: T = crystals.TensorProduct(K,K,K)
sage: T.maximal_vector()
[[[1]], [[1]], [[1]]]
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['A',Integer(2),Integer(1)],Integer(1),Integer(1))
>>> T = crystals.TensorProduct(K,K,K)
>>> T.maximal_vector()
[[[1]], [[1]], [[1]]]
one_dimensional_configuration_sum(q=None, group_components=True)[source]

Compute the one-dimensional configuration sum of self.

INPUT:

  • q – (default: None) a variable or None; if None, a variable \(q\) is set in the code

  • group_components – boolean (default: True); if True, then the terms are grouped by classical component

The one-dimensional configuration sum is the sum of the weights of all elements in the crystal weighted by the energy function.

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['A',2,1],1,1)
sage: T = crystals.TensorProduct(K,K)
sage: T.one_dimensional_configuration_sum()
B[-2*Lambda[1] + 2*Lambda[2]] + (q+1)*B[-Lambda[1]]
 + (q+1)*B[Lambda[1] - Lambda[2]] + B[2*Lambda[1]]
 + B[-2*Lambda[2]] + (q+1)*B[Lambda[2]]
sage: R.<t> = ZZ[]
sage: T.one_dimensional_configuration_sum(t, False)
B[-2*Lambda[1] + 2*Lambda[2]] + (t+1)*B[-Lambda[1]]
 + (t+1)*B[Lambda[1] - Lambda[2]] + B[2*Lambda[1]]
 + B[-2*Lambda[2]] + (t+1)*B[Lambda[2]]

sage: R = RootSystem(['A',2,1])
sage: La = R.weight_space().basis()
sage: LS = crystals.ProjectedLevelZeroLSPaths(2*La[1])
sage: (LS.one_dimensional_configuration_sum()  # long time
....:  == T.one_dimensional_configuration_sum())
True
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['A',Integer(2),Integer(1)],Integer(1),Integer(1))
>>> T = crystals.TensorProduct(K,K)
>>> T.one_dimensional_configuration_sum()
B[-2*Lambda[1] + 2*Lambda[2]] + (q+1)*B[-Lambda[1]]
 + (q+1)*B[Lambda[1] - Lambda[2]] + B[2*Lambda[1]]
 + B[-2*Lambda[2]] + (q+1)*B[Lambda[2]]
>>> R = ZZ['t']; (t,) = R._first_ngens(1)
>>> T.one_dimensional_configuration_sum(t, False)
B[-2*Lambda[1] + 2*Lambda[2]] + (t+1)*B[-Lambda[1]]
 + (t+1)*B[Lambda[1] - Lambda[2]] + B[2*Lambda[1]]
 + B[-2*Lambda[2]] + (t+1)*B[Lambda[2]]

>>> R = RootSystem(['A',Integer(2),Integer(1)])
>>> La = R.weight_space().basis()
>>> LS = crystals.ProjectedLevelZeroLSPaths(Integer(2)*La[Integer(1)])
>>> (LS.one_dimensional_configuration_sum()  # long time
...  == T.one_dimensional_configuration_sum())
True
extra_super_categories()[source]

EXAMPLES:

sage: from sage.categories.loop_crystals import KirillovReshetikhinCrystals
sage: KirillovReshetikhinCrystals().TensorProducts().extra_super_categories()
[Category of finite regular loop crystals]
>>> from sage.all import *
>>> from sage.categories.loop_crystals import KirillovReshetikhinCrystals
>>> KirillovReshetikhinCrystals().TensorProducts().extra_super_categories()
[Category of finite regular loop crystals]
super_categories()[source]

EXAMPLES:

sage: from sage.categories.loop_crystals import KirillovReshetikhinCrystals
sage: KirillovReshetikhinCrystals().super_categories()
[Category of finite regular loop crystals]
>>> from sage.all import *
>>> from sage.categories.loop_crystals import KirillovReshetikhinCrystals
>>> KirillovReshetikhinCrystals().super_categories()
[Category of finite regular loop crystals]
class sage.categories.loop_crystals.LocalEnergyFunction(B, Bp, normalization=0)[source]

Bases: Map

The local energy function.

Let \(B\) and \(B'\) be Kirillov-Reshetikhin crystals with maximal vectors \(u_B\) and \(u_{B'}\) respectively. The local energy function \(H : B \otimes B' \to \ZZ\) is the function which satisfies

\[\begin{split}H(e_0(b \otimes b')) = H(b \otimes b') + \begin{cases} 1 & \text{if } i = 0 \text{ and LL}, \\ -1 & \text{if } i = 0 \text{ and RR}, \\ 0 & \text{otherwise,} \end{cases}\end{split}\]

where LL (resp. RR) denote \(e_0\) acts on the left (resp. right) on both \(b \otimes b'\) and \(R(b \otimes b')\), and normalized by \(H(u_B \otimes u_{B'}) = 0\).

INPUT:

  • B – a Kirillov-Reshetikhin crystal

  • Bp – a Kirillov-Reshetikhin crystal

  • normalization – (default: 0) the normalization value

EXAMPLES:

sage: K = crystals.KirillovReshetikhin(['C',2,1], 1,2)
sage: K2 = crystals.KirillovReshetikhin(['C',2,1], 2,1)
sage: H = K.local_energy_function(K2)
sage: T = tensor([K, K2])
sage: hw = T.classically_highest_weight_vectors()
sage: for b in hw:
....:     b, H(b)
([[], [[1], [2]]], 1)
([[[1, 1]], [[1], [2]]], 0)
([[[2, -2]], [[1], [2]]], 1)
([[[1, -2]], [[1], [2]]], 1)
>>> from sage.all import *
>>> K = crystals.KirillovReshetikhin(['C',Integer(2),Integer(1)], Integer(1),Integer(2))
>>> K2 = crystals.KirillovReshetikhin(['C',Integer(2),Integer(1)], Integer(2),Integer(1))
>>> H = K.local_energy_function(K2)
>>> T = tensor([K, K2])
>>> hw = T.classically_highest_weight_vectors()
>>> for b in hw:
...     b, H(b)
([[], [[1], [2]]], 1)
([[[1, 1]], [[1], [2]]], 0)
([[[2, -2]], [[1], [2]]], 1)
([[[1, -2]], [[1], [2]]], 1)

REFERENCES:

[KKMMNN1992]

class sage.categories.loop_crystals.LoopCrystals[source]

Bases: Category_singleton

The category of \(U_q'(\mathfrak{g})\)-crystals, where \(\mathfrak{g}\) is of affine type.

The category is called loop crystals as we can also consider them as crystals corresponding to the loop algebra \(\mathfrak{g}_0[t]\), where \(\mathfrak{g}_0\) is the corresponding classical type.

EXAMPLES:

sage: from sage.categories.loop_crystals import LoopCrystals
sage: C = LoopCrystals()
sage: C
Category of loop crystals
sage: C.super_categories()
[Category of crystals]
sage: C.example()
Kirillov-Reshetikhin crystal of type ['A', 3, 1] with (r,s)=(1,1)
>>> from sage.all import *
>>> from sage.categories.loop_crystals import LoopCrystals
>>> C = LoopCrystals()
>>> C
Category of loop crystals
>>> C.super_categories()
[Category of crystals]
>>> C.example()
Kirillov-Reshetikhin crystal of type ['A', 3, 1] with (r,s)=(1,1)
class ParentMethods[source]

Bases: object

digraph(subset=None, index_set=None)[source]

Return the DiGraph associated to self.

INPUT:

  • subset – (optional) a subset of vertices for which the digraph should be constructed

  • index_set – (optional) the index set to draw arrows

EXAMPLES:

sage: C = crystals.KirillovReshetikhin(['D',4,1], 2, 1)
sage: G = C.digraph()
sage: G.latex_options()  # optional - dot2tex
LaTeX options for Digraph on 29 vertices:
{...'edge_options': <function ... at ...>...}
sage: view(G, tightpage=True)  # optional - dot2tex graphviz, not tested (opens external window)
>>> from sage.all import *
>>> C = crystals.KirillovReshetikhin(['D',Integer(4),Integer(1)], Integer(2), Integer(1))
>>> G = C.digraph()
>>> G.latex_options()  # optional - dot2tex
LaTeX options for Digraph on 29 vertices:
{...'edge_options': <function ... at ...>...}
>>> view(G, tightpage=True)  # optional - dot2tex graphviz, not tested (opens external window)
weight_lattice_realization()[source]

Return the weight lattice realization used to express weights of elements in self.

The default is to use the non-extended affine weight lattice.

EXAMPLES:

sage: C = crystals.Letters(['A', 5])
sage: C.weight_lattice_realization()
Ambient space of the Root system of type ['A', 5]
sage: K = crystals.KirillovReshetikhin(['A',2,1], 1, 1)
sage: K.weight_lattice_realization()
Weight lattice of the Root system of type ['A', 2, 1]
>>> from sage.all import *
>>> C = crystals.Letters(['A', Integer(5)])
>>> C.weight_lattice_realization()
Ambient space of the Root system of type ['A', 5]
>>> K = crystals.KirillovReshetikhin(['A',Integer(2),Integer(1)], Integer(1), Integer(1))
>>> K.weight_lattice_realization()
Weight lattice of the Root system of type ['A', 2, 1]
example(n=3)[source]

Return an example of Kirillov-Reshetikhin crystals, as per Category.example().

EXAMPLES:

sage: from sage.categories.loop_crystals import LoopCrystals
sage: B = LoopCrystals().example(); B
Kirillov-Reshetikhin crystal of type ['A', 3, 1] with (r,s)=(1,1)
>>> from sage.all import *
>>> from sage.categories.loop_crystals import LoopCrystals
>>> B = LoopCrystals().example(); B
Kirillov-Reshetikhin crystal of type ['A', 3, 1] with (r,s)=(1,1)
super_categories()[source]

EXAMPLES:

sage: from sage.categories.loop_crystals import LoopCrystals
sage: LoopCrystals().super_categories()
[Category of crystals]
>>> from sage.all import *
>>> from sage.categories.loop_crystals import LoopCrystals
>>> LoopCrystals().super_categories()
[Category of crystals]
class sage.categories.loop_crystals.RegularLoopCrystals[source]

Bases: Category_singleton

The category of regular \(U_q'(\mathfrak{g})\)-crystals, where \(\mathfrak{g}\) is of affine type.

class ElementMethods[source]

Bases: object

classical_weight()[source]

Return the classical weight of self.

EXAMPLES:

sage: R = RootSystem(['A',2,1])
sage: La = R.weight_space().basis()
sage: LS = crystals.ProjectedLevelZeroLSPaths(2*La[1])
sage: hw = LS.classically_highest_weight_vectors()
sage: [(v.weight(), v.classical_weight()) for v in hw]
[(-2*Lambda[0] + 2*Lambda[1], (2, 0, 0)),
 (-Lambda[0] + Lambda[2], (1, 1, 0))]
>>> from sage.all import *
>>> R = RootSystem(['A',Integer(2),Integer(1)])
>>> La = R.weight_space().basis()
>>> LS = crystals.ProjectedLevelZeroLSPaths(Integer(2)*La[Integer(1)])
>>> hw = LS.classically_highest_weight_vectors()
>>> [(v.weight(), v.classical_weight()) for v in hw]
[(-2*Lambda[0] + 2*Lambda[1], (2, 0, 0)),
 (-Lambda[0] + Lambda[2], (1, 1, 0))]
super_categories()[source]

EXAMPLES:

sage: from sage.categories.loop_crystals import RegularLoopCrystals
sage: RegularLoopCrystals().super_categories()
[Category of regular crystals,
 Category of loop crystals]
>>> from sage.all import *
>>> from sage.categories.loop_crystals import RegularLoopCrystals
>>> RegularLoopCrystals().super_categories()
[Category of regular crystals,
 Category of loop crystals]