I fixed this problem now by implementing a method __lt__ for KR crystals.
The new extended patch (which includes some other functionalities as well)
is posted on trac.

Anne

On 2/14/11 12:00 PM, Anne Schilling wrote:
I just realized a strange error after application of #10632.
Viewing Kirillov-Reshetikhin crystals themselves works fine.
However, viewing their tensor products is broken after the application
of the patch. Without the patch, this is fine. I am not quite sure,
where this error comes from.

Cheers,

Anne

------------------------------------

sage: C = KirillovReshetikhinCrystal(['A',2,1],1,1)
sage: T = TensorProductOfCrystals(C,C)
sage: view(T, pdflatex=True, tightpage=True)
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)

/Applications/sage-4.6.2.alpha4/devel/sage-combinat/sage/combinat/crystals/<ipython 
console> in <module>()

/Applications/sage/local/lib/python2.6/site-packages/sage/misc/latex.pyc in 
view(objects, title, debug, sep, tiny, pdflatex, engine, viewer, tightpage, 
mode, **kwds)
1823 else:
1824 latex_options = {}
-> 1825 s = _latex_file_(objects, title=title, sep=sep, tiny=tiny, debug=debug, 
**latex_options)
1826 # notebook
1827 if EMBEDDED_MODE and viewer is None:

/Applications/sage/local/lib/python2.6/site-packages/sage/misc/latex.pyc in 
_latex_file_(objects, title, debug, sep, tiny, math_left, math_right, 
extra_preamble)
1469 for i in range(len(objects)):
1470 x = objects[i]
-> 1471 L = latex(x)
1472 if not '\\begin{verbatim}' in L:
1473 s += '%s%s%s'%(math_left, L, math_right)

/Applications/sage/local/lib/python2.6/site-packages/sage/misc/latex.pyc in 
__call__(self, x)
711 """
712 if has_latex_attr(x):
--> 713 return LatexExpr(x._latex_())
714
715 try:

/Applications/sage/local/lib/python2.6/site-packages/sage/categories/crystals.pyc
 in _latex_(self, **options)
393 G.set_latex_options(format="dot2tex", edge_labels = True,
394 edge_options = lambda (u,v,label): ({"backward":label ==0}), **options)
--> 395 return G._latex_()
396
397 # def latex(self):

/Applications/sage/local/lib/python2.6/site-packages/sage/graphs/generic_graph.pyc
 in _latex_(self)
334 \end{tikzpicture}
335 """
--> 336 return self.latex_options().latex()
337
338 def _matrix_(self, R=None):

/Applications/sage/local/lib/python2.6/site-packages/sage/graphs/graph_latex.pyc
 in latex(self)
1314 return self.tkz_picture()
1315 elif format == "dot2tex":
-> 1316 return self.dot2tex_picture()
1317
1318 def dot2tex_picture(self):

/Applications/sage/local/lib/python2.6/site-packages/sage/graphs/graph_latex.pyc
 in dot2tex_picture(self)
1350 options = self.__graphlatex_options.copy()
1351 options.update(self._options)
-> 1352 dotdata = self._graph.graphviz_string(labels="latex", **options)
1353 import dot2tex
1354 return dot2tex.dot2tex(

/Applications/sage/local/lib/python2.6/site-packages/sage/misc/decorators.pyc 
in wrapper(*args, **kwds)
430 options['__original_opts'] = kwds
431 options.update(kwds)
--> 432 return func(*args, **options)
433
434

/Applications/sage/local/lib/python2.6/site-packages/sage/graphs/generic_graph.pyc
 in graphviz_string(self, **options)
13726 default_color = None
13727
 > 13728 key = self._keys_for_vertices()
13729
13730 s = '%s {\n' % graph_string

/Applications/sage/local/lib/python2.6/site-packages/sage/graphs/generic_graph.pyc
 in _keys_for_vertices(self)
13387 """
13388 from sage.graphs.dot2tex_utils import key, key_with_hash
 > 13389 if len(set(key(v) for v in self)) < len(self.vertices()):
13390 # There was a collision in the keys; we include a hash to be safe.
13391 return key_with_hash

/Applications/sage/local/lib/python2.6/site-packages/sage/graphs/generic_graph.pyc
 in vertices(self, key, boundary_first)
7202 """
7203 if not boundary_first:
-> 7204 return sorted(list(self.vertex_iterator()), key=key)
7205
7206 bdy_verts = []

/Applications/sage/local/lib/python2.6/site-packages/sage/combinat/crystals/tensor_product.pyc
 in __lt__(self, other)
444 if (self[i] < other[i]) == True:
445 return True
--> 446 if (self[i] > other[i]) == True:
447 return False
448 return False

/Applications/sage/local/lib/python2.6/site-packages/sage/structure/element.so 
in sage.structure.element.Element.__richcmp__ (sage/structure/element.c:7169)()

/Applications/sage/local/lib/python2.6/site-packages/sage/structure/element.so 
in sage.structure.element.Element._richcmp (sage/structure/element.c:7078)()

/Applications/sage/local/lib/python2.6/site-packages/sage/structure/element.so 
in sage.structure.element.Element._richcmp_c_impl 
(sage/structure/element.c:7338)()

/Applications/sage/local/lib/python2.6/site-packages/sage/structure/element.so 
in sage.structure.element.Element._cmp_c_impl (sage/structure/element.c:7388)()

NotImplementedError: BUG: sort algorithm for elements of 'Kirillov-Reshetikhin 
crystal of type ['A', 2, 1] with (r,s)=(1,1)' not implemented

--
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to