Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 6aae6bf

Browse files
Travis ScrimshawTravis Scrimshaw
Travis Scrimshaw
authored and
Travis Scrimshaw
committed
Trac #13872 - Implemented RC<->KR tableaux bijections for non-exceptional types
1 parent f2491f1 commit 6aae6bf

21 files changed

+6115
-1581
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Rigged Configuration Bijections
2+
===============================
3+
4+
.. toctree::
5+
:maxdepth: 1
6+
7+
../sage/combinat/rigged_configurations/bijection
8+
../sage/combinat/rigged_configurations/bij_abstract_class
9+
../sage/combinat/rigged_configurations/bij_type_A
10+
../sage/combinat/rigged_configurations/bij_type_B
11+
../sage/combinat/rigged_configurations/bij_type_C
12+
../sage/combinat/rigged_configurations/bij_type_D
13+
../sage/combinat/rigged_configurations/bij_type_A2_odd
14+
../sage/combinat/rigged_configurations/bij_type_A2_even
15+
../sage/combinat/rigged_configurations/bij_type_A2_dual
16+
../sage/combinat/rigged_configurations/bij_type_D_twisted
17+

src/doc/en/reference/combinat/rigged_configurations.rst

+2-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Rigged Configurations
22
=====================
33

44
.. toctree::
5-
:maxdepth: 2
5+
:maxdepth: 1
66

77
../sage/combinat/rigged_configurations/rigged_configurations
88
../sage/combinat/rigged_configurations/rigged_configuration_element
@@ -15,8 +15,5 @@ Rigged Configurations
1515

1616
../sage/combinat/rigged_configurations/rigged_partition
1717

18-
../sage/combinat/rigged_configurations/bijection
19-
../sage/combinat/rigged_configurations/bij_abstract_class
20-
../sage/combinat/rigged_configurations/bij_type_A
21-
../sage/combinat/rigged_configurations/bij_type_D
18+
rc_bijections
2219

src/sage/combinat/crystals/kirillov_reshetikhin.py

+51-16
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,9 @@ def _repr_(self):
397397
"""
398398
return "Kirillov-Reshetikhin crystal of type %s with (r,s)=(%d,%d)" % (self.cartan_type(), self.r(), self.s())
399399

400-
def _element_constructor_(self, *value, **options):
400+
def _element_constructor_(self, *args, **options):
401401
"""
402-
Construct an element of ``self`` from ``elt``.
402+
Construct an element of ``self`` from the input.
403403
404404
EXAMPLES::
405405
@@ -408,10 +408,10 @@ def _element_constructor_(self, *value, **options):
408408
[[1], [2]]
409409
"""
410410
from sage.combinat.rigged_configurations.kr_tableaux import KirillovReshetikhinTableauxElement
411-
if isinstance(value[0], KirillovReshetikhinTableauxElement):
412-
elt = value[0]
411+
if isinstance(args[0], KirillovReshetikhinTableauxElement):
412+
elt = args[0]
413413
# Check to make sure it can be converted
414-
if elt.cartan_type().affine() != self.cartan_type() \
414+
if elt.cartan_type() != self.cartan_type() \
415415
or elt.parent().r() != self._r or elt.parent().s() != self._s:
416416
raise ValueError("The Kirillov-Reshetikhin tableau must have the same Cartan type and shape")
417417

@@ -424,7 +424,7 @@ def _element_constructor_(self, *value, **options):
424424
hw_elt = self(rows=rows)
425425
f_str = reversed(to_hw[1])
426426
return hw_elt.f_string(f_str)
427-
return AffineCrystalFromClassical._element_constructor_(self, *value, **options)
427+
return AffineCrystalFromClassical._element_constructor_(self, *args, **options)
428428

429429
@abstract_method
430430
def classical_decomposition(self):
@@ -614,6 +614,7 @@ def R_matrix(self, K):
614614
g = { gen1 : gen2 }
615615
return T1.crystal_morphism(g, acyclic = False)
616616

617+
@cached_method
617618
def Kirillov_Reshetikhin_tableaux(self):
618619
"""
619620
Return the corresponding set of :class:`KirillovReshetikhinTableaux`.
@@ -631,6 +632,7 @@ class KirillovReshetikhinGenericCrystalElement(AffineCrystalFromClassicalElement
631632
"""
632633
Abstract class for all Kirillov-Reshetikhin crystal elements.
633634
"""
635+
@cached_method
634636
def to_Kirillov_Reshetikhin_tableau(self):
635637
r"""
636638
Construct the corresponding
@@ -1638,7 +1640,7 @@ def from_ambient_crystal(self):
16381640
return self.crystal_morphism( pdict_inv, index_set = [j+1 for j in self.cartan_type().classical().index_set()],
16391641
automorphism = lambda i : i-1 )
16401642

1641-
class KR_type_A2Element(AffineCrystalFromClassicalElement):
1643+
class KR_type_A2Element(KirillovReshetikhinGenericCrystalElement):
16421644
r"""
16431645
Class for the elements in the Kirillov-Reshetikhin crystals `B^{r,s}` of type `A_{2n}^{(2)}` for `r<n`
16441646
with underlying classcial algebra `B_n`.
@@ -1985,6 +1987,39 @@ class KR_type_Bn(KirillovReshetikhinGenericCrystal):
19851987
sage: [b.weight() for b in K if b.is_highest_weight([0,2,3])]
19861988
[Lambda[0] - Lambda[1], -2*Lambda[1] + 2*Lambda[3]]
19871989
"""
1990+
def _element_constructor_(self, *args, **options):
1991+
"""
1992+
Construct an element of ``self``.
1993+
1994+
TESTS::
1995+
1996+
sage: KRC = KirillovReshetikhinCrystal(['B',3,1], 3, 3)
1997+
sage: KRT = KirillovReshetikhinTableaux(['B',3,1], 3, 3)
1998+
sage: elt = KRC.module_generators[1].f_string([3,2,3,1,3,3]); elt
1999+
[++-, [[2], [0], [-3]]]
2000+
sage: ret = KRT(elt); ret
2001+
[[1, 1, 2], [2, 2, -3], [-3, -3, -1]]
2002+
sage: test = KRC(ret); test
2003+
[++-, [[2], [0], [-3]]]
2004+
sage: test == elt
2005+
True
2006+
"""
2007+
from sage.combinat.rigged_configurations.kr_tableaux import KirillovReshetikhinTableauxElement
2008+
if isinstance(args[0], KirillovReshetikhinTableauxElement):
2009+
elt = args[0]
2010+
# Check to make sure it can be converted
2011+
if elt.cartan_type() != self.cartan_type() \
2012+
or elt.parent().r() != self._r or elt.parent().s() != self._s:
2013+
raise ValueError("The Kirillov-Reshetikhin tableau must have the same Cartan type and shape")
2014+
2015+
to_hw = elt.to_classical_highest_weight()
2016+
wt = to_hw[0].classical_weight() / 2
2017+
f_str = reversed(to_hw[1])
2018+
for x in self.module_generators:
2019+
if x.classical_weight() == wt:
2020+
return x.f_string(f_str)
2021+
raise ValueError("No matching highest weight element found")
2022+
return KirillovReshetikhinGenericCrystal._element_constructor_(self, *args, **options)
19882023

19892024
def classical_decomposition(self):
19902025
r"""
@@ -2276,7 +2311,7 @@ def from_pm_diagram_to_highest_weight_vector(self, pm):
22762311
u = u.f(i)
22772312
return u
22782313

2279-
class KR_type_CnElement(AffineCrystalFromClassicalElement):
2314+
class KR_type_CnElement(KirillovReshetikhinGenericCrystalElement):
22802315
r"""
22812316
Class for the elements in the Kirillov-Reshetikhin crystals `B^{n,s}` of type `C_n^{(1)}`.
22822317
@@ -2519,7 +2554,7 @@ def from_pm_diagram_to_highest_weight_vector(self, pm):
25192554
u = u.f(i)
25202555
return u
25212556

2522-
class KR_type_Dn_twistedElement(AffineCrystalFromClassicalElement):
2557+
class KR_type_Dn_twistedElement(KirillovReshetikhinGenericCrystalElement):
25232558
r"""
25242559
Class for the elements in the Kirillov-Reshetikhin crystals `B^{n,s}` of type `D_{n+1}^{(2)}`.
25252560
@@ -2679,15 +2714,15 @@ class KR_type_spin(KirillovReshetikhinCrystalFromPromotion):
26792714
sage: all(b.f(0).e(0) == b for b in K if b.phi(0)>0)
26802715
True
26812716
"""
2682-
def _element_constructor_(self, *value, **options):
2717+
def _element_constructor_(self, *args, **options):
26832718
"""
2684-
Construct an element of ``self`` from ``elt``.
2719+
Construct an element of ``self`` from the input.
26852720
26862721
EXAMPLES::
26872722
26882723
sage: KRT = KirillovReshetikhinTableaux(['D',4,1], 4, 3)
26892724
sage: KRC = KirillovReshetikhinCrystal(['D',4,1], 4, 3)
2690-
sage: elt = KRT([-3,-4,2,1,-3,-4,2,1,-2,-4,3,1]); elt
2725+
sage: elt = KRT(-3,-4,2,1,-3,-4,2,1,-2,-4,3,1); elt
26912726
[[1, 1, 1], [2, 2, 3], [-4, -4, -4], [-3, -3, -2]]
26922727
sage: KRC(elt) # indirect doctest
26932728
[++--, [[1], [3], [-4], [-3]]]
@@ -2708,17 +2743,17 @@ def _element_constructor_(self, *value, **options):
27082743
True
27092744
"""
27102745
from sage.combinat.rigged_configurations.kr_tableaux import KirillovReshetikhinTableauxElement
2711-
if isinstance(value[0], KirillovReshetikhinTableauxElement):
2712-
elt = value[0]
2746+
if isinstance(args[0], KirillovReshetikhinTableauxElement):
2747+
elt = args[0]
27132748
# Check to make sure it can be converted
2714-
if elt.cartan_type().affine() != self.cartan_type() \
2749+
if elt.cartan_type() != self.cartan_type() \
27152750
or elt.parent().r() != self._r or elt.parent().s() != self._s:
27162751
raise ValueError("The Kirillov-Reshetikhin tableau must have the same Cartan type and shape")
27172752

27182753
to_hw = elt.to_classical_highest_weight()
27192754
f_str = reversed(to_hw[1])
27202755
return self.module_generator().f_string(f_str)
2721-
KirillovReshetikhinCrystalFromPromotion._element_constructor_(self, *value, **options)
2756+
return KirillovReshetikhinCrystalFromPromotion._element_constructor_(self, *args, **options)
27222757

27232758
def classical_decomposition(self):
27242759
r"""

src/sage/combinat/crystals/letters.pyx

+82-3
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,24 @@ cdef class Letter(Element):
442442
True
443443
sage: C(4) == C(4)
444444
True
445+
446+
TESTS::
447+
448+
sage: C = CrystalOfLetters(['C', 3])
449+
sage: C('E') == C(2)
450+
False
451+
sage: C(2) == C('E')
452+
False
453+
sage: C('E') == C('E')
454+
True
445455
"""
456+
# Special case for the empty letter
457+
if isinstance(left, EmptyLetter):
458+
return isinstance(right, EmptyLetter) \
459+
and (op == Py_EQ or op == Py_LE or op == Py_GE)
460+
if isinstance(right, EmptyLetter):
461+
return op == Py_NE
462+
446463
cdef Letter self, x
447464
self = left
448465
x = right
@@ -462,11 +479,42 @@ cdef class Letter(Element):
462479

463480
cdef class EmptyLetter(Element):
464481
"""
465-
The (affine) letter `\emptyset` thought of as a classical crystal letter
482+
The affine)letter `\emptyset` thought of as a classical crystal letter
466483
in classical type `B_n` and `C_n`.
467484
485+
.. WARNING::
486+
487+
This is not a classical letter.
488+
468489
Used in the rigged configuration bijections.
469490
"""
491+
cdef readonly str value
492+
493+
def __init__(self, parent):
494+
"""
495+
Initialize ``xelf``.
496+
497+
EXAMPLES::
498+
499+
sage: C = CrystalOfLetters(['C', 3])
500+
sage: TestSuite(C('E')).run()
501+
"""
502+
self.value = 'E'
503+
Element.__init__(self, parent)
504+
505+
def __reduce__(self):
506+
r"""
507+
Used in pickling crystal of letters elements.
508+
509+
EXAMPLES::
510+
511+
sage: C = CrystalOfLetters(['C',3])
512+
sage: a = C('E')
513+
sage: a.__reduce__()
514+
(The crystal of letters for type ['C', 3], ('E',))
515+
"""
516+
return (self._parent, ('E',))
517+
470518
def _repr_(self):
471519
"""
472520
Return a string representation of ``self``.
@@ -491,6 +539,18 @@ cdef class EmptyLetter(Element):
491539
"""
492540
return "\\emptyset"
493541

542+
def __hash__(self):
543+
"""
544+
Return the hash value of ``self``.
545+
546+
EXAMPLES::
547+
548+
sage: C = CrystalOfLetters(['D', 4])
549+
sage: hash(C('E')) == hash('E')
550+
True
551+
"""
552+
return hash(self.value)
553+
494554
def weight(self):
495555
"""
496556
Return the weight of ``self``.
@@ -514,7 +574,16 @@ cdef class EmptyLetter(Element):
514574
"""
515575
return None
516576

517-
f = e
577+
cpdef f(self, int i):
578+
"""
579+
Return `f_i` of ``self`` which is ``None``.
580+
581+
EXAMPLES::
582+
583+
sage: C = CrystalOfLetters(['C', 3])
584+
sage: C('E').f(1)
585+
"""
586+
return None
518587

519588
cpdef int epsilon(self, int i):
520589
r"""
@@ -528,7 +597,17 @@ cdef class EmptyLetter(Element):
528597
"""
529598
return 0
530599

531-
phi = epsilon
600+
cpdef int phi(self, int i):
601+
r"""
602+
Return `\varphi_i` of ``self``.
603+
604+
EXAMPLES::
605+
606+
sage: C = CrystalOfLetters(['C', 3])
607+
sage: C('E').phi(1)
608+
0
609+
"""
610+
return 0
532611

533612
#########################
534613
# Type A
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
from rigged_configurations import HighestWeightRiggedConfigurations
21
from rigged_configurations import RiggedConfigurations
3-
from tensor_product_kr_tableaux import HighestWeightTensorProductOfKirillovReshetikhinTableaux
42
from tensor_product_kr_tableaux import TensorProductOfKirillovReshetikhinTableaux
53
from kr_tableaux import KirillovReshetikhinTableaux
64

0 commit comments

Comments
 (0)