@@ -397,9 +397,9 @@ def _repr_(self):
397
397
"""
398
398
return "Kirillov-Reshetikhin crystal of type %s with (r,s)=(%d,%d)" % (self .cartan_type (), self .r (), self .s ())
399
399
400
- def _element_constructor_ (self , * value , ** options ):
400
+ def _element_constructor_ (self , * args , ** options ):
401
401
"""
402
- Construct an element of ``self`` from ``elt`` .
402
+ Construct an element of ``self`` from the input .
403
403
404
404
EXAMPLES::
405
405
@@ -408,10 +408,10 @@ def _element_constructor_(self, *value, **options):
408
408
[[1], [2]]
409
409
"""
410
410
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 ]
413
413
# 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 () \
415
415
or elt .parent ().r () != self ._r or elt .parent ().s () != self ._s :
416
416
raise ValueError ("The Kirillov-Reshetikhin tableau must have the same Cartan type and shape" )
417
417
@@ -424,7 +424,7 @@ def _element_constructor_(self, *value, **options):
424
424
hw_elt = self (rows = rows )
425
425
f_str = reversed (to_hw [1 ])
426
426
return hw_elt .f_string (f_str )
427
- return AffineCrystalFromClassical ._element_constructor_ (self , * value , ** options )
427
+ return AffineCrystalFromClassical ._element_constructor_ (self , * args , ** options )
428
428
429
429
@abstract_method
430
430
def classical_decomposition (self ):
@@ -614,6 +614,7 @@ def R_matrix(self, K):
614
614
g = { gen1 : gen2 }
615
615
return T1 .crystal_morphism (g , acyclic = False )
616
616
617
+ @cached_method
617
618
def Kirillov_Reshetikhin_tableaux (self ):
618
619
"""
619
620
Return the corresponding set of :class:`KirillovReshetikhinTableaux`.
@@ -631,6 +632,7 @@ class KirillovReshetikhinGenericCrystalElement(AffineCrystalFromClassicalElement
631
632
"""
632
633
Abstract class for all Kirillov-Reshetikhin crystal elements.
633
634
"""
635
+ @cached_method
634
636
def to_Kirillov_Reshetikhin_tableau (self ):
635
637
r"""
636
638
Construct the corresponding
@@ -1638,7 +1640,7 @@ def from_ambient_crystal(self):
1638
1640
return self .crystal_morphism ( pdict_inv , index_set = [j + 1 for j in self .cartan_type ().classical ().index_set ()],
1639
1641
automorphism = lambda i : i - 1 )
1640
1642
1641
- class KR_type_A2Element (AffineCrystalFromClassicalElement ):
1643
+ class KR_type_A2Element (KirillovReshetikhinGenericCrystalElement ):
1642
1644
r"""
1643
1645
Class for the elements in the Kirillov-Reshetikhin crystals `B^{r,s}` of type `A_{2n}^{(2)}` for `r<n`
1644
1646
with underlying classcial algebra `B_n`.
@@ -1985,6 +1987,39 @@ class KR_type_Bn(KirillovReshetikhinGenericCrystal):
1985
1987
sage: [b.weight() for b in K if b.is_highest_weight([0,2,3])]
1986
1988
[Lambda[0] - Lambda[1], -2*Lambda[1] + 2*Lambda[3]]
1987
1989
"""
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 )
1988
2023
1989
2024
def classical_decomposition (self ):
1990
2025
r"""
@@ -2276,7 +2311,7 @@ def from_pm_diagram_to_highest_weight_vector(self, pm):
2276
2311
u = u .f (i )
2277
2312
return u
2278
2313
2279
- class KR_type_CnElement (AffineCrystalFromClassicalElement ):
2314
+ class KR_type_CnElement (KirillovReshetikhinGenericCrystalElement ):
2280
2315
r"""
2281
2316
Class for the elements in the Kirillov-Reshetikhin crystals `B^{n,s}` of type `C_n^{(1)}`.
2282
2317
@@ -2519,7 +2554,7 @@ def from_pm_diagram_to_highest_weight_vector(self, pm):
2519
2554
u = u .f (i )
2520
2555
return u
2521
2556
2522
- class KR_type_Dn_twistedElement (AffineCrystalFromClassicalElement ):
2557
+ class KR_type_Dn_twistedElement (KirillovReshetikhinGenericCrystalElement ):
2523
2558
r"""
2524
2559
Class for the elements in the Kirillov-Reshetikhin crystals `B^{n,s}` of type `D_{n+1}^{(2)}`.
2525
2560
@@ -2679,15 +2714,15 @@ class KR_type_spin(KirillovReshetikhinCrystalFromPromotion):
2679
2714
sage: all(b.f(0).e(0) == b for b in K if b.phi(0)>0)
2680
2715
True
2681
2716
"""
2682
- def _element_constructor_ (self , * value , ** options ):
2717
+ def _element_constructor_ (self , * args , ** options ):
2683
2718
"""
2684
- Construct an element of ``self`` from ``elt`` .
2719
+ Construct an element of ``self`` from the input .
2685
2720
2686
2721
EXAMPLES::
2687
2722
2688
2723
sage: KRT = KirillovReshetikhinTableaux(['D',4,1], 4, 3)
2689
2724
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
2691
2726
[[1, 1, 1], [2, 2, 3], [-4, -4, -4], [-3, -3, -2]]
2692
2727
sage: KRC(elt) # indirect doctest
2693
2728
[++--, [[1], [3], [-4], [-3]]]
@@ -2708,17 +2743,17 @@ def _element_constructor_(self, *value, **options):
2708
2743
True
2709
2744
"""
2710
2745
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 ]
2713
2748
# 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 () \
2715
2750
or elt .parent ().r () != self ._r or elt .parent ().s () != self ._s :
2716
2751
raise ValueError ("The Kirillov-Reshetikhin tableau must have the same Cartan type and shape" )
2717
2752
2718
2753
to_hw = elt .to_classical_highest_weight ()
2719
2754
f_str = reversed (to_hw [1 ])
2720
2755
return self .module_generator ().f_string (f_str )
2721
- KirillovReshetikhinCrystalFromPromotion ._element_constructor_ (self , * value , ** options )
2756
+ return KirillovReshetikhinCrystalFromPromotion ._element_constructor_ (self , * args , ** options )
2722
2757
2723
2758
def classical_decomposition (self ):
2724
2759
r"""
0 commit comments