[sage-combinat-devel] Re: trac_13762

2012-11-30 Thread Travis Scrimshaw
And now sage actually starts and creates the partitions and k-bounded 
partitions.

Best,
Travis


On Friday, November 30, 2012 5:22:26 PM UTC-8, Travis Scrimshaw wrote:
>
> Hey everyone,
>#13605 has now been rebased and the queue applies cleanly for me.
>
> Best,
> Travis
>
>
> On Friday, November 30, 2012 4:56:20 PM UTC-8, Anne Schilling wrote:
>>
>> Hi Sage-combinat Folks, 
>>
>> I have just added Chris Berg's patch 13762 to the sage-combinat queue. 
>> Unfortunately, it has a conflict with Travis' partition partition patch, 
>> so the queue is currently broken. But Travis knows about it and 
>> will try to resolve the conflict. 
>>
>> Thanks! 
>>
>> Anne 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/EACWWL7ZFz4J.
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.



[sage-combinat-devel] Re: trac_13762

2012-11-30 Thread Travis Scrimshaw
Hey everyone,
   #13605 has now been rebased and the queue applies cleanly for me.

Best,
Travis


On Friday, November 30, 2012 4:56:20 PM UTC-8, Anne Schilling wrote:
>
> Hi Sage-combinat Folks, 
>
> I have just added Chris Berg's patch 13762 to the sage-combinat queue. 
> Unfortunately, it has a conflict with Travis' partition partition patch, 
> so the queue is currently broken. But Travis knows about it and 
> will try to resolve the conflict. 
>
> Thanks! 
>
> Anne 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/gBr7OWFl0YEJ.
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.



[sage-combinat-devel] trac_13762

2012-11-30 Thread Anne Schilling
Hi Sage-combinat Folks,

I have just added Chris Berg's patch 13762 to the sage-combinat queue.
Unfortunately, it has a conflict with Travis' partition partition patch,
so the queue is currently broken. But Travis knows about it and
will try to resolve the conflict.

Thanks!

Anne

-- 
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.



Re: [sage-combinat-devel] Silent failure in CartanType

2012-11-30 Thread Nicolas M. Thiery
On Thu, Nov 29, 2012 at 09:22:57AM -0800, Jesus Torrado wrote:
>Sorry, I missunderstood the question. Exactly, what I was doing is the
>following: I have all the roots of E8, apply a projection condition and,
>with some code, identify from the surviving roots the irreducible Cartan
>types, returning a list of them. Some times (e.g. trivial projection
>condition), the list has just one member (in the example, [["E",8]]). In
>order to test my identification of the Cartan types, I would find the
>simple roots in the surviving root system, compute the Cartan matrix and
>compare it with the one from CartanType[], where  is the
>list of types identified. But things like
>CartanType([["E",8]]).cartan_matrix() just fail, as we know. What I did is
>of course fix it on my side, using the same two lines as in the patch.
>Anyway, as it is a mathematically wrong answer, I decided to report a bug.

Thanks much for the detailed use case!

>So, let me dare to say that we disagree with the first two
>possibilities and look at the last two:

Sounds good. I was also uncomfortable with them, and your use case
definitely rule them out.

>  - Return the underlying CartanType A (that's what the current patch
>implements). That's mathematically correct. However, having a non
>uniform behavior in corner cases typically forces any caller code to
>handle explicitly the special cases. For example, in the case at
>hand, the nodes of the Dynkin diagram would not get relabeled; also
>the ambient space would not have an inject_weights method, etc.
> 
>Maybe it is a naA-ve question, but why would we want the relabelling or
>the weight injection if we actually have an irreducible type?

It's a good question. So let's decide for now that CartanType([A])
returns A. Suppose you want to code a function f that builds some list
L=[C1,...,Cn] of Cartan types. Then, it builds the ambient space for
C, and does some calculations that requires to build some weights for
C from weights from the Ci's:

C = CartanType(L)
A = C.ambient_space()
c = < some list of weights for C1, ... Cn respectively >
weight = A.inject_weights( c )

Problem: this code will break whenever L will turn out to have a
single element. Therefore you need to pollute the code of f with the
handling of a special case:

C = CartanType(L)
A = C.ambient_space()
if len(L) == 1:
 weight = c[0]
else:
 weight = A.inject_weights( [c1, ..., cn] )



>Btw: if we go in this direction, we should add tests, in particular
>for the corner-corner case: CartanType([[A]]).
> 
>I disagree there: this is not a corner-corner case, but plain wrong input,
>which do not fit in any of the examples given in the docstring.

Why wrong? Granted, it's currently unspecified. However, in order to
accept:

CartanType([["A",2], ["A",3]])

one more or less wants to specify that «CartanType accepts as input a
list of objects each of which can be made into a CartanType». And then
this naturally extends recursively to more nested lists of lists.

Well, this also opens another can of worms: would we want the direct
product of cartan types to be associative. I would argue for not, for
similar reasons: (A x B) x C is certainly isomorphic to A x (B x C),
but the isomorphism is not completely trivial due to the potential node
relabelling. However that's another question which we can leave
aside for now.

>Still, it could be easily incorporated by changing the "if" in
>the patch for a "while".

Certainly. I am just saying that, whichever option we choose, there
should be a test illustrating the choice.

>  - Rename type_reducible to type_direct_product, and fix is_irreducible
>and friends to handle the special case properly. But it's a bit more
>work. I guess it would be enough to remove the definition of
>is_irreducible, and use a trick in the initialization like for
>type_relabel, to make the result inherit from CartanType_simple when
>relevant.
> 
>That seems to me innecesarily complicated,

Yes, arguably more complicated than adding a single `if`. But still
pretty minimal: renaming a class, removing a method, and doing a
little adjustment in the init. We could even be lazy and not rename
the class, though calling "type_reducible" something that, in some
cases, is not would be the ugly.

>maybe because I am missing your point, maybe because I don't see
>"my" corner case as an special case, but as a normal case which
>is handled wrongly. Could you, please, elaborate on this point a
>little more?

Again: corner cases are normal cases in the sense that they certainly
should be handled correctly. And as uniformly as possible, so that
callers code need not do a special case.

What do you think?

>Whichever option is chosen, I volu

[sage-combinat-devel] Re: tableaux in 5.4.1

2012-11-30 Thread Travis Scrimshaw
Hey Anne, Darij,
   I missed one of the *length_tableau() functions when I was removing it. 
It should work now.

Best,
Travis


On Friday, November 30, 2012 12:10:15 AM UTC-8, Andrew Mathas wrote:
>
> Hi Anne,
>
> The problem appears after trac_13605-partition_options-ts.patch is applied.
>
> Andrew
>
> --
>
> --
> | Sage Version 5.4.1, Release Date: 2012-11-15   |
> | Type "notebook()" for the browser-based notebook interface.|
> | Type "help()" for help.|
> --
> Loading Sage library. Current Mercurial branch is: combinat
> sage: StandardTableaux(3).list() 
> [[[1, 2, 3]], [[1, 3], [2]], [[1, 2], [3]], [[1], [2], [3]]]
> sage: 
> Exiting Sage (CPU time 0m0.03s, Wall time 0m25.64s).
> combinat: sage -hg qpush
> applying trac_13605-partition_options-ts.patch
> now at: trac_13605-partition_options-ts.patch
> combinat: sage -br
> ...
> --
> | Sage Version 5.4.1, Release Date: 2012-11-15   |
> | Type "notebook()" for the browser-based notebook interface.|
> | Type "help()" for help.|
> --
> Loading Sage library. Current Mercurial branch is: combinat
> sage: StandardTableaux(3).list() 
> ERROR: An unexpected error occurred while tokenizing input
> The following traceback may be corrupted or invalid
> The error message is: ('EOF in multi-line statement', (505, 0))
>
> ---
> NotImplementedError   Traceback (most recent call last)
>
> /usr/local/src/sage/sage-5.4.1/devel/sage-combinat/sage/combinat/ console> in ()
>
> /usr/local/src/sage/sage-5.4.1/local/lib/python2.7/site-packages/sage/combinat/tableau.pyc
>  
> in list(self)
>2566 NotImplementedError
>2567 """
> -> 2568 raise NotImplementedError
>2569 
>2570 def __iter__(self):
>
> NotImplementedError: 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/8m0ac7CQO6AJ.
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.



Re: [sage-combinat-devel] Re: tableaux in 5.4.1

2012-11-30 Thread Nicolas M. Thiery
On Fri, Nov 30, 2012 at 12:44:15AM -0800, Andrew Mathas wrote:
>  * finite_semigroup-nt.patch is causing the weakref warnings. (In fact,
>sage won't run when the queue is applied up to this patch but applying
>the next patch in the queue fixes this.)

Ok, I'll look at this now.

>Btw, rebuilding sage after moving up and down the queue is taking a huge
>amount of time now. Does anyone know why?

Yup:

On Fri, Nov 23, 2012 at 03:38:29PM +0100, Nicolas M. Thiery wrote:
> Note: to make the rebase easier, I had to backport 715 for Sage
> <5.5.beta0. The inconvenient is that this patch triggers the
> recompilation of most of the Sage library. So everyone doing regular
> development will probably want to switch to 5.5.rc0.

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 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.



[sage-combinat-devel] Re: tableaux in 5.4.1

2012-11-30 Thread Andrew Mathas
Sorry, correction: there are currently two problems with the queue:

   - trac_13605-partition_options-ts.patch causes StandardTableaux() and 
   friends to die.
   - finite_semigroup-nt.patch is causing the weakref warnings. (In fact, 
   sage won't run when the queue is applied up to this patch but applying the 
   next patch in the queue fixes this.)

Btw, rebuilding sage after moving up and down the queue is taking a huge 
amount of time now. Does anyone know why?

Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/2utdr9B9giQJ.
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.



[sage-combinat-devel] Re: tableaux in 5.4.1

2012-11-30 Thread Andrew Mathas
Hi Anne,

The problem appears after trac_13605-partition_options-ts.patch is applied.

Andrew

--

--
| Sage Version 5.4.1, Release Date: 2012-11-15   |
| Type "notebook()" for the browser-based notebook interface.|
| Type "help()" for help.|
--
Loading Sage library. Current Mercurial branch is: combinat
sage: StandardTableaux(3).list() 
[[[1, 2, 3]], [[1, 3], [2]], [[1, 2], [3]], [[1], [2], [3]]]
sage: 
Exiting Sage (CPU time 0m0.03s, Wall time 0m25.64s).
combinat: sage -hg qpush
applying trac_13605-partition_options-ts.patch
now at: trac_13605-partition_options-ts.patch
combinat: sage -br
...
--
| Sage Version 5.4.1, Release Date: 2012-11-15   |
| Type "notebook()" for the browser-based notebook interface.|
| Type "help()" for help.|
--
Loading Sage library. Current Mercurial branch is: combinat
sage: StandardTableaux(3).list() 
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (505, 0))

---
NotImplementedError   Traceback (most recent call last)

/usr/local/src/sage/sage-5.4.1/devel/sage-combinat/sage/combinat/ in ()

/usr/local/src/sage/sage-5.4.1/local/lib/python2.7/site-packages/sage/combinat/tableau.pyc
 
in list(self)
   2566 NotImplementedError
   2567 """
-> 2568 raise NotImplementedError
   2569 
   2570 def __iter__(self):

NotImplementedError: 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/k-UpGbWMyOoJ.
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.