Re: [sage-combinat-devel] Re: tickets 10632 and 10485

2011-02-02 Thread Nicolas M. Thiery
On Wed, Feb 02, 2011 at 11:51:54PM -0800, Anne Schilling wrote: > > sage: K = KirillovReshetikhinCrystal(['A',3,1], 1,1) > > sage: G = K.digraph() > > sage: G.set_latex_options(some further option) > > sage: view(G, pdflatex=True, tightpage=True) > > The second option actually

Re: [sage-combinat-devel] Re: tickets 10632 and 10485

2011-02-02 Thread Anne Schilling
Hi! Note: for consistency with other Sage objects, you may want to use the occasion to rename that method to _latex_, and set latex=_latex_ (it's currently the converse). Done! However, I have a question: How can I now pass along the **options to the view command in this setting? Be

Re: [sage-combinat-devel] Re: tickets 10632 and 10485

2011-02-02 Thread Daniel Bump
I'm looking at #10632. Comment 1. After the patch, I observe the following. Line 757 of tensor_product.py contains: shapes = tuple( tuple(shape) for shape in shapes ) I think here the making of a tuple is important because a tuple is immutable, a list is not. To illustrate, suppose take th

Re: [sage-combinat-devel] Re: tickets 10632 and 10485

2011-02-02 Thread Nicolas M. Thiery
Hi! On Wed, Feb 02, 2011 at 03:14:27PM -0800, Anne Schilling wrote: > I have now implemented the method > > def latex(self, **options): > r"""Returns the crystal graph as a latex string. This can be > exported > to a file with self.latex_file('filename').

Re: [sage-combinat-devel] Re: tickets 10632 and 10485

2011-02-02 Thread Anne Schilling
Hi Nicolas! Just reimplement Crystals.ParentMethods._latex_ to basically do the above: G=self.digraph() G.set_latex_options(format="dot2tex") return latex(G) At this occasion, it could provide some more options to set_latex_options, like the missing edge labels. And possibly

[sage-combinat-devel] Re: wrong behaviour of Set

2011-02-02 Thread Frédéric Chapoton
Yes, Mike, you are certainly right in saying that this is a hash problem. Here are the types of my objects sage: type(kiki[0]) sage: type(kiki[0].support()[0]) sage: type(kiki[0].support()[0].element) I suspect that there may be some kind of conflict between the CombinatorialFreeModule settin

Re: [sage-combinat-devel] Re: wrong behaviour of Set

2011-02-02 Thread Mike Hansen
Hello, 2011/2/2 Frédéric Chapoton : > Here is a little more detail, a reduced example, coming from the > problem above. > > sage: kiki > {B[[1, 0, 1, 1, 0, 1, 0, 1, 0, 0]] + B[[1, 0, 1, 1, 1, 0, 0, 1, 0, 0]] > + B[[1, 0, 1, 1, 0, 1, 1, 0, 0, 0]] + B[[1, 0, 1, 1, 1, 0, 1, 0, 0, > 0]] + B[[1, 0, 1,

[sage-combinat-devel] Re: wrong behaviour of Set

2011-02-02 Thread Frédéric Chapoton
Salut, it will take a lot of place to give here all the procedures needed to enable you to run this example. This is ok for me, but this is maybe not the place for this ? Here is a little more detail, a reduced example, coming from the problem above. sage: kiki {B[[1, 0, 1, 1, 0, 1, 0, 1, 0, 0]]

Re: [sage-combinat-devel] wrong behaviour of Set

2011-02-02 Thread Nicolas M. Thiery
Salut Frédéric, On Wed, Feb 02, 2011 at 02:51:51AM -0800, Frédéric Chapoton wrote: > I have found the following problem. > > sage: Set([len([v for v in mySet if v==u]) for u in mySet]) > {1, 2} > sage: type(mySet) > > > So we have here a *set with repetitions*. This happens for a very >

[sage-combinat-devel] wrong behaviour of Set

2011-02-02 Thread Frédéric Chapoton
I have found the following problem. sage: Set([len([v for v in mySet if v==u]) for u in mySet]) {1, 2} sage: type(mySet) So we have here a *set with repetitions*. This happens for a very specific set mySet which contains linear combinations of elements of a rather big poset. sage: type(mySet[0]