[sage-combinat-devel] CartanTypes

2016-07-05 Thread Andrew
Sorry if I should post this to sage-support ...

Does CartanType currently support A_\infty? I checked the docs and it seems 
not but I wanted to check because I need this. Well, actually, I only need 
some very rudimentary combinatorial data from the Cartan type, that I can 
easily manufacture myself, but thematically I really should index the 
objects that I am playing with by the appropriate Cartan types as I am 
hoping that what I am doing will work in types A^{(1)}_l, A^{(2)}_{2l}, 
C^{(1)}_l, D^{(2)}_l and A_\infty.

Whilst looking for this I came across the following, which I guess are 
syntax errors on my part rather than bugs:

sage: CartanType(['A',4,1])  # works
['A', 4, 1]
sage: CartanType(['A',infinity])
  File "", line unknown

^
SyntaxError: unexpected EOF while parsing

sage: CartanType(['A',-1])
  File "", line unknown

^
SyntaxError: unexpected EOF while parsing

sage: CartanType(['A',0])
['A', 0]



Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] CartanTypes

2016-07-06 Thread Nicolas M. Thiery
Dear Andrew,

On Tue, Jul 05, 2016 at 11:10:46AM -0700, Andrew wrote:
>Sorry if I should post this to sage-support ...

This sounds like the right place to discuss it!

>Does CartanType currently support A_\infty? I checked the docs and it
>seems not but I wanted to check because I need this. Well, actually, I
>only need some very rudimentary combinatorial data from the Cartan
>type, that I can easily manufacture myself, but thematically I really
>should index the objects that I am playing with by the appropriate
>Cartan types as I am hoping that what I am doing will work in types
>A^{(1)}_l, A^{(2)}_{2l}, C^{(1)}_l, D^{(2)}_l and A_\infty.

Currently, there is no support for `A_\infty`. This is mostly because
most of the interesting stuff that a cartan type provides in Sage
(e.g. the Cartan matrix, ...) is returned as a non lazy object.

Could you provide a couple examples of use that you have in mind?

In the simplest form, returning a formal object with very few methods
implemented (maybe just `is_crystalographic` and friends) would be
straightforward: add a file type_A_infinity.py with a CartanType class
and whatever you want inside it, and update CartanType.__call__ to use
it as appropriate.

>Whilst looking for this I came across the following, which I guess are
>syntax errors on my part rather than bugs:
>sage: CartanType(['A',4,1])  # works
>['A', 4, 1]
>sage: CartanType(['A',infinity])
>  File "", line unknown
>^
>SyntaxError: unexpected EOF while parsing
>sage: CartanType(['A',-1])
>  File "", line unknown
>^
>SyntaxError: unexpected EOF while parsing
>sage: CartanType(['A',0])
>['A', 0]

What's happening here is that the above does not fit within the
standard input formats that Cartan type accepts; and then it gets
confused and tries to parse the string in search of one of our
shortcuts like CartanType("A3*xA2~"). Yeah, this is a bug: it should
instead return a proper not implemented error.

Cheers,
Nicolas
--
Nicolas M. ThiƩry "Isil" 
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] CartanTypes

2016-07-06 Thread Andrew
On Wednesday, 6 July 2016 16:20:12 UTC+1, Nicolas M. Thiery wrote:
>
> Dear Andrew, 
>
> Currently, there is no support for `A_\infty`. This is mostly because 
> most of the interesting stuff that a cartan type provides in Sage 
> (e.g. the Cartan matrix, ...) is returned as a non lazy object. 
>
> Could you provide a couple examples of use that you have in mind? 
>

Thanks Nicolas!

At this point I only need the rank and to be able differentiate A_oo from 
other types. Down the track it might be useful to have the weight and root 
lattices but again I don't really need them. Mostly I'd like CartanType() 
to support A_oo for compatibility with the other types that I am playing it.

>
> In the simplest form, returning a formal object with very few methods 
> implemented (maybe just `is_crystalographic` and friends) would be 
> straightforward: add a file type_A_infinity.py with a CartanType class 
> and whatever you want inside it, and update CartanType.__call__ to use 
> it as appropriate. 
>

Thanks for the description of what needs to be done. I'll throw something 
together and sort out the bug below.

Andrew
 

> >Whilst looking for this I came across the following, which I guess 
> are 
> >syntax errors on my part rather than bugs: 
> >sage: CartanType(['A',4,1])  # works 
> >['A', 4, 1] 
> >sage: CartanType(['A',infinity]) 
> >  File "", line unknown 
> >^ 
> >SyntaxError: unexpected EOF while parsing 
> >sage: CartanType(['A',-1]) 
> >  File "", line unknown 
> >^ 
> >SyntaxError: unexpected EOF while parsing 
> >sage: CartanType(['A',0]) 
> >['A', 0] 
>
> What's happening here is that the above does not fit within the 
> standard input formats that Cartan type accepts; and then it gets 
> confused and tries to parse the string in search of one of our 
> shortcuts like CartanType("A3*xA2~"). Yeah, this is a bug: it should 
> instead return a proper not implemented error. 
>
> Cheers, 
> Nicolas 
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.