def __init__(self, parent, list, **options): r""" Initialize ``self``. EXAMPLES:: sage: KRT = KirillovReshetikhinTableaux(['A', 4, 1], 2, 1) sage: elt = KRT([4, 3]); elt [[3], [4]] sage: TestSuite(elt).run() """ # Make sure we are a list of letters if list != [] and type(list[0]) is not CrystalOfLetters: list = [parent.letters(x) for x in list] TensorProductOfCrystalsElement.__init__(self, parent, list)
def __init__(self, parent, *path, **options): r""" Construct a TensorProductOfKirillovReshetikhinTableauxElement. INPUT: - ``parent`` -- Parent for this element - ``path`` -- The list of KR tableaux elements EXAMPLES:: sage: KRT = TensorProductOfKirillovReshetikhinTableaux(['A', 3, 1], [[1, 1], [2, 1], [1, 1], [2, 1], [2, 1], [2, 1]]) sage: T = KRT(pathlist=[[2], [4, 1], [3], [4, 2], [3, 1], [2, 1]]) sage: T [[2]] (X) [[1], [4]] (X) [[3]] (X) [[2], [4]] (X) [[1], [3]] (X) [[1], [2]] sage: KRT = TensorProductOfKirillovReshetikhinTableaux(['A', 3, 1], [[3,3], [2,1]]) sage: T = KRT(pathlist=[[3, 2, 1, 4, 2, 1, 4, 3, 1], [2, 1]]) sage: T [[1, 1, 1], [2, 2, 3], [3, 4, 4]] (X) [[1], [2]] sage: KRT = TensorProductOfKirillovReshetikhinTableaux(['D', 4, 1], [[2, 1], [1, 1], [1, 1], [1, 1]]) sage: T = KRT(pathlist=[[3,2], [1], [-1], [1]]) sage: T [[2], [3]] (X) [[1]] (X) [[-1]] (X) [[1]] sage: TestSuite(T).run() """ if "pathlist" in options: pathlist = options["pathlist"] TensorProductOfCrystalsElement.__init__(self, parent, [ parent.crystals[i](list(tab)) for i, tab in enumerate(pathlist) ]) elif "list" in options: TensorProductOfCrystalsElement.__init__(self, parent, **options) else: TensorProductOfCrystalsElement.__init__(self, parent, list(path))
def __init__(self, parent, *path, **options): r""" Construct a TensorProductOfKirillovReshetikhinTableauxElement. INPUT: - ``parent`` -- Parent for this element - ``path`` -- The list of KR tableaux elements EXAMPLES:: sage: KRT = TensorProductOfKirillovReshetikhinTableaux(['A', 3, 1], [[1, 1], [2, 1], [1, 1], [2, 1], [2, 1], [2, 1]]) sage: T = KRT(pathlist=[[2], [4, 1], [3], [4, 2], [3, 1], [2, 1]]) sage: T [[2]] (X) [[1], [4]] (X) [[3]] (X) [[2], [4]] (X) [[1], [3]] (X) [[1], [2]] sage: KRT = TensorProductOfKirillovReshetikhinTableaux(['A', 3, 1], [[3,3], [2,1]]) sage: T = KRT(pathlist=[[3, 2, 1, 4, 2, 1, 4, 3, 1], [2, 1]]) sage: T [[1, 1, 1], [2, 2, 3], [3, 4, 4]] (X) [[1], [2]] sage: KRT = TensorProductOfKirillovReshetikhinTableaux(['D', 4, 1], [[2, 1], [1, 1], [1, 1], [1, 1]]) sage: T = KRT(pathlist=[[3,2], [1], [-1], [1]]) sage: T [[2], [3]] (X) [[1]] (X) [[-1]] (X) [[1]] sage: TestSuite(T).run() """ if "pathlist" in options: pathlist = options["pathlist"] TensorProductOfCrystalsElement.__init__(self, parent, [parent.crystals[i](list(tab)) for i, tab in enumerate(pathlist)]) elif "list" in options: TensorProductOfCrystalsElement.__init__(self, parent, **options) else: TensorProductOfCrystalsElement.__init__(self, parent, list(path))