Skip to content

Commit

Permalink
Trac #15560: Add methods to rigged configurations
Browse files Browse the repository at this point in the history
Adds some extra methods to rigged configurations: the action of the left
column splitting and the basic operation in the bijection with tensor
product of KR tableaux.

URL: http://trac.sagemath.org/15560
Reported by: tscrim
Ticket author(s): Travis Scrimshaw
Reviewer(s): Anne Schilling
  • Loading branch information
Release Manager authored and vbraun committed Jul 27, 2014
2 parents 9458319 + 1e15993 commit 3f1c124
Show file tree
Hide file tree
Showing 10 changed files with 744 additions and 81 deletions.
57 changes: 22 additions & 35 deletions src/sage/categories/classical_crystals.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,41 +87,24 @@ def example(self, n = 3):

class ParentMethods:

@cached_method
def opposition_automorphism(self):
r"""
Returns the opposition automorphism
The *opposition automorphism* is the automorphism
`i \mapsto i^*` of the vertices Dynkin diagram such that,
for `w_0` the longest element of the Weyl group, and any
simple root `\alpha_i`, one has `\alpha_{i^*} = -w_0(\alpha_i)`.
The automorphism is returned as a dictionary.
Deprecated in :trac:`15560`. Use the corresponding method in
Cartan type.
EXAMPLES::
sage: T = crystals.Tableaux(['A',5],shape=[1])
sage: T.opposition_automorphism()
{1: 5, 2: 4, 3: 3, 4: 2, 5: 1}
sage: T = crystals.Tableaux(['D',4],shape=[1])
sage: T.opposition_automorphism()
{1: 1, 2: 2, 3: 3, 4: 4}
sage: T = crystals.Tableaux(['D',5],shape=[1])
sage: T.opposition_automorphism()
{1: 1, 2: 2, 3: 3, 4: 5, 5: 4}
sage: T = crystals.Tableaux(['C',4],shape=[1])
sage: T.opposition_automorphism()
{1: 1, 2: 2, 3: 3, 4: 4}
doctest:...: DeprecationWarning: opposition_automorphism is deprecated.
Use opposition_automorphism from the Cartan type instead.
See http://trac.sagemath.org/15560 for details.
Finite family {1: 5, 2: 4, 3: 3, 4: 2, 5: 1}
"""
L = self.cartan_type().root_system().root_lattice()
W = L.weyl_group()
w0 = W.long_element()
alpha = L.simple_roots()
return dict( (i, (w0.action(alpha[i])).leading_support()) for i in self.index_set() )
from sage.misc.superseded import deprecation
deprecation(15560, 'opposition_automorphism is deprecated. Use'
' opposition_automorphism from the Cartan type instead.')
return self.cartan_type().opposition_automorphism()

def demazure_character(self, w, f = None):
r"""
Expand Down Expand Up @@ -423,11 +406,14 @@ class ElementMethods:

def lusztig_involution(self):
r"""
Returns the Lusztig involution on the classical highest weight crystal self.
The Lusztig involution on a finite-dimensional highest weight crystal `B(\lambda)` of highest weight `\lambda`
maps the highest weight vector to the lowest weight vector and the Kashiwara operator `f_i` to
`e_{i^*}`, where `i^*` is defined as `\alpha_{i^*} = -w_0(\alpha_i)`. Here `w_0` is the longest element
Return the Lusztig involution on the classical highest weight
crystal ``self``.
The Lusztig involution on a finite-dimensional highest weight
crystal `B(\lambda)` of highest weight `\lambda` maps the
highest weight vector to the lowest weight vector and the
Kashiwara operator `f_i` to `e_{i^*}`, where `i^*` is defined as
`\alpha_{i^*} = -w_0(\alpha_i)`. Here `w_0` is the longest element
of the Weyl group acting on the `i`-th simple root `\alpha_i`.
EXAMPLES::
Expand All @@ -452,8 +438,8 @@ def lusztig_involution(self):
[[[[1]], [[-1]]], [[[2]], [[-2]]], [[[3]], [[3]]], [[[-3]], [[-3]]],
[[[-2]], [[2]]], [[[-1]], [[1]]]]
sage: C=CartanType(['E',6])
sage: La=C.root_system().weight_lattice().fundamental_weights()
sage: C = CartanType(['E',6])
sage: La = C.root_system().weight_lattice().fundamental_weights()
sage: T = crystals.HighestWeight(La[1])
sage: t = T[3]; t
[(-4, 2, 5)]
Expand All @@ -462,6 +448,7 @@ def lusztig_involution(self):
"""
hw = self.to_highest_weight()[1]
hw.reverse()
hw = [self.parent().opposition_automorphism()[i] for i in hw]
A = self.parent().cartan_type().opposition_automorphism()
hw = [A[i] for i in hw]
return self.to_lowest_weight()[0].e_string(hw)

15 changes: 15 additions & 0 deletions src/sage/combinat/crystals/kirillov_reshetikhin.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,21 @@ def to_kirillov_reshetikhin_tableau(self):
"""
return self.parent().kirillov_reshetikhin_tableaux()(self)

def lusztig_involution(self):
"""
Return the classical Lusztig involution on ``self``.
EXAMPLES::
sage: KRC = crystals.KirillovReshetikhin(['D',4,1], 2,2)
sage: elt = KRC(-1,2); elt
[[2], [-1]]
sage: elt.lusztig_involution()
[[1], [-2]]
"""
li = self.lift().lusztig_involution()
return self.parent().retract(li)

KirillovReshetikhinGenericCrystal.Element = KirillovReshetikhinGenericCrystalElement

class KirillovReshetikhinCrystalFromPromotion(KirillovReshetikhinGenericCrystal,
Expand Down
39 changes: 34 additions & 5 deletions src/sage/combinat/rigged_configurations/bij_abstract_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,11 @@ def __init__(self, RC_element):
# TODO: Convert from cur_partitions to rigged_con
self.cur_partitions = deepcopy(list(self.rigged_con)[:])

# This is a dummy edge to start the process
cp = RC_element.__copy__()
cp.set_immutable()
self._graph = [ [[], (cp, 0)] ]

# Compute the current L matrix
# self.L = {}
# for dim in self.rigged_con.parent().dims:
Expand Down Expand Up @@ -341,22 +346,30 @@ def __eq__(self, rhs):
"""
return isinstance(rhs, RCToKRTBijectionAbstract)

def run(self, verbose=False):
def run(self, verbose=False, build_graph=False):
"""
Run the bijection from rigged configurations to tensor product of KR
tableaux.
INPUT:
- ``verbose`` -- (Default: ``False``) Display each step in the
- ``verbose`` -- (default: ``False``) display each step in the
bijection
- ``build_graph`` -- (default: ``False``) build the graph of each
step of the bijection
EXAMPLES::
sage: RC = RiggedConfigurations(['A', 4, 1], [[2, 1]])
sage: x = RC(partition_list=[[1],[1],[1],[1]])
sage: from sage.combinat.rigged_configurations.bij_type_A import RCToKRTBijectionTypeA
sage: RCToKRTBijectionTypeA(RC(partition_list=[[1],[1],[1],[1]])).run()
sage: RCToKRTBijectionTypeA(x).run()
[[2], [5]]
sage: bij = RCToKRTBijectionTypeA(x)
sage: bij.run(build_graph=True)
[[2], [5]]
sage: bij._graph
Digraph on 3 vertices
"""
from sage.combinat.crystals.letters import CrystalOfLetters
letters = CrystalOfLetters(self.rigged_con.parent()._cartan_type.classical())
Expand All @@ -376,7 +389,7 @@ def run(self, verbose=False):
if self.cur_dims[0][1] > 1:
if verbose:
print("====================")
print(repr(self.rigged_con.parent()(*self.cur_partitions)))
print(repr(self.rigged_con.parent()(*self.cur_partitions, use_vacancy_numbers=True)))
print("--------------------")
print(ret_crystal_path)
print("--------------------\n")
Expand All @@ -390,10 +403,14 @@ def run(self, verbose=False):
for a in range(self.n):
self._update_vacancy_numbers(a)

if build_graph:
y = self.rigged_con.parent()(*[x._clone() for x in self.cur_partitions], use_vacancy_numbers=True)
self._graph.append([self._graph[-1][1], (y, len(self._graph)), 'ls'])

while self.cur_dims[0][0] > 0:
if verbose:
print("====================")
print(repr(self.rigged_con.parent()(*self.cur_partitions)))
print(repr(self.rigged_con.parent()(*self.cur_partitions, use_vacancy_numbers=True)))
print("--------------------")
print(ret_crystal_path)
print("--------------------\n")
Expand All @@ -404,8 +421,20 @@ def run(self, verbose=False):
# Make sure we have a crystal letter
ret_crystal_path[-1].append(letters(b)) # Append the rank

if build_graph:
y = self.rigged_con.parent()(*[x._clone() for x in self.cur_partitions], use_vacancy_numbers=True)
self._graph.append([self._graph[-1][1], (y, len(self._graph)), letters(b)])

self.cur_dims.pop(0) # Pop off the leading column

if build_graph:
self._graph.pop(0) # Remove the dummy at the start
from sage.graphs.digraph import DiGraph
from sage.graphs.dot2tex_utils import have_dot2tex
self._graph = DiGraph(self._graph)
if have_dot2tex():
self._graph.set_latex_options(format="dot2tex", edge_labels=True)

# Basic check to make sure we end with the empty configuration
#tot_len = sum([len(rp) for rp in self.cur_partitions])
#if tot_len != 0:
Expand Down
62 changes: 51 additions & 11 deletions src/sage/combinat/rigged_configurations/bij_type_B.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def run(self, verbose=False):
self.ret_rig_con[-1].rigging,
self.ret_rig_con[-1].vacancy_numbers)
bij = KRTToRCBijectionTypeA2Odd(KRT.module_generators[0]) # Placeholder element
bij.ret_rig_con = KRT.rigged_configurations()(*self.ret_rig_con)
bij.ret_rig_con = KRT.rigged_configurations()(*self.ret_rig_con, use_vacancy_numbers=True)
bij.cur_path = self.cur_path
bij.cur_dims = self.cur_dims
for i in range(len(self.cur_dims)):
Expand Down Expand Up @@ -524,26 +524,34 @@ class RCToKRTBijectionTypeB(RCToKRTBijectionTypeC):
Specific implementation of the bijection from rigged configurations to
tensor products of KR tableaux for type `B_n^{(1)}`.
"""
def run(self, verbose=False):
def run(self, verbose=False, build_graph=False):
"""
Run the bijection from rigged configurations to tensor product of KR
tableaux for type `B_n^{(1)}`.
INPUT:
- ``verbose`` -- (Default: ``False``) Display each step in the
- ``verbose`` -- (default: ``False``) display each step in the
bijection
- ``build_graph`` -- (default: ``False``) build the graph of each
step of the bijection
EXAMPLES::
sage: RC = RiggedConfigurations(['B', 3, 1], [[2, 1]])
sage: from sage.combinat.rigged_configurations.bij_type_B import RCToKRTBijectionTypeB
sage: RCToKRTBijectionTypeB(RC(partition_list=[[1],[1,1],[1]])).run()
[[3], [0]]
sage: RC = RiggedConfigurations(['B', 3, 1], [[3, 1]])
sage: from sage.combinat.rigged_configurations.bij_type_B import RCToKRTBijectionTypeB
sage: RCToKRTBijectionTypeB(RC(partition_list=[[],[1],[1]])).run()
sage: x = RC(partition_list=[[],[1],[1]])
sage: RCToKRTBijectionTypeB(x).run()
[[1], [3], [-2]]
sage: bij = RCToKRTBijectionTypeB(x)
sage: bij.run(build_graph=True)
[[1], [3], [-2]]
sage: bij._graph
Digraph on 6 vertices
"""
from sage.combinat.crystals.letters import CrystalOfLetters
letters = CrystalOfLetters(self.rigged_con.parent()._cartan_type.classical())
Expand All @@ -570,7 +578,7 @@ def run(self, verbose=False):
RC = RiggedConfigurations(['A', 2*self.n-1, 2], self.cur_dims)
if verbose:
print("====================")
print(repr(RC(*self.cur_partitions)))
print(repr(RC(*self.cur_partitions, use_vacancy_numbers=True)))
print("--------------------")
print(ret_crystal_path)
print("--------------------\n")
Expand All @@ -580,7 +588,7 @@ def run(self, verbose=False):
self.cur_partitions[-1].rigging,
self.cur_partitions[-1].vacancy_numbers)

bij = RCToKRTBijectionTypeA2Odd(RC(*self.cur_partitions))
bij = RCToKRTBijectionTypeA2Odd(RC(*self.cur_partitions, use_vacancy_numbers=True))
for i in range(len(self.cur_dims)):
if bij.cur_dims[i][0] != self.n:
bij.cur_dims[i][1] *= 2
Expand All @@ -589,6 +597,10 @@ def run(self, verbose=False):
bij.cur_partitions[i]._list[j] *= 2
bij.cur_partitions[i].rigging[j] *= 2
bij.cur_partitions[i].vacancy_numbers[j] *= 2

if build_graph:
y = self.rigged_con.parent()(*[x._clone() for x in self.cur_partitions], use_vacancy_numbers=True)
self._graph.append([self._graph[-1][1], (y, len(self._graph)), '2x'])

# Perform the type A_{2n-1}^{(2)} bijection

Expand All @@ -603,11 +615,15 @@ def run(self, verbose=False):
# All it does is update the vacancy numbers on the RC side
for a in range(self.n):
bij._update_vacancy_numbers(a)

if build_graph:
y = self.rigged_con.parent()(*[x._clone() for x in self.cur_partitions], use_vacancy_numbers=True)
self._graph.append([self._graph[-1][1], (y, len(self._graph)), 'ls'])

while bij.cur_dims[0][0] > 0:
if verbose:
print("====================")
print(repr(RC(*bij.cur_partitions)))
print(repr(RC(*bij.cur_partitions, use_vacancy_numbers=True)))
print("--------------------")
print(ret_crystal_path)
print("--------------------\n")
Expand All @@ -617,6 +633,10 @@ def run(self, verbose=False):
# Make sure we have a crystal letter
ret_crystal_path[-1].append(letters(b)) # Append the rank

if build_graph:
y = self.rigged_con.parent()(*[x._clone() for x in self.cur_partitions], use_vacancy_numbers=True)
self._graph.append([self._graph[-1][1], (y, len(self._graph)), letters(b)])

bij.cur_dims.pop(0) # Pop off the leading column

self.cur_dims.pop(0) # Pop off the spin rectangle
Expand All @@ -628,7 +648,7 @@ def run(self, verbose=False):
# Convert back to a type B_n^{(1)}
if verbose:
print("====================")
print(repr(self.rigged_con.parent()(*bij.cur_partitions)))
print(repr(self.rigged_con.parent()(*bij.cur_partitions, use_vacancy_numbers=True)))
print("--------------------")
print(ret_crystal_path)
print("--------------------\n")
Expand All @@ -639,6 +659,10 @@ def run(self, verbose=False):
self.cur_partitions[i]._list[j] //= 2
self.cur_partitions[i].rigging[j] //= 2
self.cur_partitions[i].vacancy_numbers[j] //= 2

if build_graph:
y = self.rigged_con.parent()(*[x._clone() for x in self.cur_partitions], use_vacancy_numbers=True)
self._graph.append([self._graph[-1][1], (y, len(self._graph)), '1/2x'])
else:
# Perform the regular type B_n^{(1)} bijection

Expand All @@ -648,7 +672,7 @@ def run(self, verbose=False):
if self.cur_dims[0][1] > 1:
if verbose:
print("====================")
print(repr(self.rigged_con.parent()(*self.cur_partitions)))
print(repr(self.rigged_con.parent()(*self.cur_partitions, use_vacancy_numbers=True)))
print("--------------------")
print(ret_crystal_path)
print("--------------------\n")
Expand All @@ -662,10 +686,14 @@ def run(self, verbose=False):
for a in range(self.n):
self._update_vacancy_numbers(a)

if build_graph:
y = self.rigged_con.parent()(*[x._clone() for x in self.cur_partitions], use_vacancy_numbers=True)
self._graph.append([self._graph[-1][1], (y, len(self._graph)), '2x'])

while self.cur_dims[0][0] > 0:
if verbose:
print("====================")
print(repr(self.rigged_con.parent()(*self.cur_partitions)))
print(repr(self.rigged_con.parent()(*self.cur_partitions, use_vacancy_numbers=True)))
print("--------------------")
print(ret_crystal_path)
print("--------------------\n")
Expand All @@ -676,8 +704,20 @@ def run(self, verbose=False):
# Make sure we have a crystal letter
ret_crystal_path[-1].append(letters(b)) # Append the rank

if build_graph:
y = self.rigged_con.parent()(*[x._clone() for x in self.cur_partitions], use_vacancy_numbers=True)
self._graph.append([self._graph[-1][1], (y, len(self._graph)), letters(b)])

self.cur_dims.pop(0) # Pop off the leading column

if build_graph:
self._graph.pop(0) # Remove the dummy at the start
from sage.graphs.digraph import DiGraph
from sage.graphs.dot2tex_utils import have_dot2tex
self._graph = DiGraph(self._graph)
if have_dot2tex():
self._graph.set_latex_options(format="dot2tex", edge_labels=True)

return self.KRT(pathlist=ret_crystal_path)

def next_state(self, height):
Expand Down
Loading

0 comments on commit 3f1c124

Please sign in to comment.