[sage-combinat-devel] Partition Algebras

2014-03-19 Thread Bruce
I have found a bug in the definition of composition in Partition Algebras. This bug shows up in the composition of two set partitions when the first partition has a part of size 1. This is sufficiently basic that it makes me wonder why this has not been noticed before. I have also created a tic

[sage-combinat-devel] partition code breaks k-Schur functions

2013-03-05 Thread Anne Schilling
Hi! I noticed today that some patch between the beginning and trac_14102 in the sage-combinat queue breaks k-Schur functions. Perhaps the partition patches? This needs to be fixed!!! Best, Anne - sage: Sym = SymmetricFunctions(QQ) sage: s = Sym.schur() sage: ks = Sym.kschur(3,1) sage: s[2,

Re: [sage-combinat-devel] Partition and tableau options in #13605

2013-01-30 Thread Anne Schilling
Hi Andrew, Travis, Nicolas and I are all at ICERM and talked about this. At the moment it indeed seems better to just leave the structure as is and put the partition options into the partitions file itself (since there are several projects on partition). Best, Anne On 1/29/13 9:03 PM, Andrew Ma

Re: [sage-combinat-devel] Partition and tableau options in #13605

2013-01-29 Thread Andrew Mathas
Hi Anne, Thanks for your comments! Wouldn't it suffice to have a deprecation for sage.combinat.partition in > /combinat/partition.py and have an alias there to > sage.combinat.partition.partition. > That would hopefully not be too much deprecation work at all since the UI > does > not change

Re: [sage-combinat-devel] Partition and tableau options in #13605

2013-01-26 Thread Anne Schilling
Hi Travis, >This would change the import statements from `sage.combinat.partition` to > `sage.combinat.partitions.partition`, thus I would think we would need some > sort of deprecation for this for a user's .sage > files. For the deprecation, I think what we would need to do is import all o

Re: [sage-combinat-devel] Partition and tableau options in #13605

2013-01-25 Thread Travis Scrimshaw
Hey Anne, Thanks for your work on this! XD I say Andrew is doing the hard work on this. > > I am reviewing Travis' patch #13605 which is great as it implements some > needed improvements. I have a few minor issues which I think shouldn't be > decided between just the two of us -- apologie

Re: [sage-combinat-devel] Partition and tableau options in #13605

2013-01-25 Thread Anne Schilling
Hi Andrew and Travis, Thanks for your work on this! > I am reviewing Travis' patch #13605 which is great as it implements some > needed improvements. I have a few minor issues which I think shouldn't be > decided between just the two of us -- apologies if I > am being too precious here! > > On

[sage-combinat-devel] Partition and tableau options in #13605

2013-01-24 Thread Andrew Mathas
Hi Everyone, I am reviewing Travis' patch #13605 which is great as it implements some needed improvements. I have a few minor issues which I think shouldn't be decided between just the two of us -- apologies if I am being too precious here! Only fans of partitions are likely to be interested

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-12-14 Thread Nicolas M. Thiery
Hi Andrew, On Tue, Dec 11, 2012 at 01:31:28AM -0800, Andrew Mathas wrote: >AH, I guess that "reverse lexicographic" is ambiguous as it could mean >either reading the words in the reverse order or simply reversing the >partial order. FWIW, In commutative algebra, and about ter

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-12-11 Thread Travis Scrimshaw
> Ah I see. I will implement a (naive) __reversed__() method for the > partitions (see http://docs.python.org/2/library/functions.html#reversed) > since we've removed __len__() from the partition parents. That way you can > just call `reversed(Partitions(5))` to iterate through in reverse. Exp

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-12-11 Thread Travis Scrimshaw
Hey Andrew, > I will do "reverse lex" (lex order read from right to left) and "reverse >> dominance" (which I presume is partial sums from right to left). However >> what is reverse containment? >> > > AH, I guess that "reverse lexicographic" is ambiguous as it could mean > either reading th

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-12-11 Thread Andrew Mathas
> > I will do "reverse lex" (lex order read from right to left) and "reverse > dominance" (which I presume is partial sums from right to left). However > what is reverse containment? > AH, I guess that "reverse lexicographic" is ambiguous as it could mean either reading the words in the reve

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-12-11 Thread Travis Scrimshaw
Hey Andrew, > > The easy one first: should the reverse ordering also exist? That is, > "reverse lex", "reverse dominance", "reverse containment"? If people agree > that it is worth including these explicitly it would be good if there was a > systematic way to organise all of the orderings...w

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-12-10 Thread Andrew Mathas
> Basically you would like the iterator to return a linear extension of the > ordering? That might be possible if by considering the poset given by > the partial order. > > Yes, that's right. This is most sensible for total orderings, but for partial orders the iterator could return a non-can

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-12-10 Thread Anne Schilling
Hi Andrew and Travis, > The easy one first: should the reverse ordering also exist? That is, "reverse > lex", "reverse dominance", "reverse containment"? If people agree that it is > worth including these explicitly it would be > good if there was a systematic way to organise all of the ordering

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-12-10 Thread Andrew Mathas
Hi Travis, I have twos questions about the order options that have appeared in your partition clean-ups. The easy one first: should the reverse ordering also exist? That is, "reverse lex", "reverse dominance", "reverse containment"? If people agree that it is worth including these explicitly i

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-27 Thread Travis Scrimshaw
Hey everyone, Here's the current update of the options patch #13605: - I've added "containment" as an additional order option which are set in the parent objects - I've had to leave `Partitions_all` alone for the most part, deprecating it caused pickling/TestSuite errors I couldn't figure ou

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-13 Thread Travis Scrimshaw
Thanks Andrew! Travis On Tuesday, November 13, 2012 4:29:37 PM UTC-8, Andrew Mathas wrote: > > On 14/11/12 6:24 AM, Travis Scrimshaw wrote: > > Also in regard to the partition options patch, I can't seem to find the > Partitions_all_cache when the queue is applied up to there (I'm running > 5

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-13 Thread Andrew Mathas
On 14/11/12 6:24 AM, Travis Scrimshaw wrote: Also in regard to the partition options patch, I can't seem to find the Partitions_all_cache when the queue is applied up to there (I'm running 5.4.beta1). Hi Travis, I had a look at the patch queue and Partitions_all_cache was added by partition

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-13 Thread Hugh Thomas
Hi! FYI, further rebasing of tableaux-combinatorics-am.patch seems to be needed. I'm going to disable it temporarily so the queue applies. cheers, Hugh -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To view this discussion on the

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-12 Thread Andrew Mathas
Hi Travis, You should probably also deprecate sage.combinat.partition.Partitions_all_cache. Currently, this causing issues for skew_partition.py which calls this once. Andrew -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To view thi

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-12 Thread Travis Scrimshaw
Hey Hugh, No problem. Sorry this has been such a hassle. Also, I've rebased concrete_combinatorial_statistics_and_maps-cs.patch (with Christian's approval), so the whole queue should (at present) apply cleanly. Best, Travis On Sunday, November 11, 2012 11:54:20 PM UTC-8, Hugh Thomas wrote:

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-11 Thread Hugh Thomas
Thanks, Travis and Andrew, for the rebasing and the explanations. cheers, Hugh -- 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/-/Sc6RpTfMtY

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-11 Thread Travis Scrimshaw
Hey Nicolas, This could be a good candidate for a lazy_import. > > I'll give it a try. Hey Hugh, What Andrew said was correct, it's because we are removing Partition_class. I will setup an alias with a deprecation warning. Best, Travis -- You received this message because you are subscrib

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-11 Thread Nicolas M. Thiery
On Fri, Nov 09, 2012 at 10:35:34AM -0800, Travis Scrimshaw wrote: > In cleaning up the import statements (in my definition of cleanup, and >if I shouldn't touch import statements, please let me know), I noticed an >interesting quirk, partition.py needs to import skew_partition.py, >

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-11 Thread Nicolas M. Thiery
On Fri, Nov 09, 2012 at 05:49:47PM -0800, Travis Scrimshaw wrote: > In all honesty, I almost feel like any comparison should do a coercion >into a common parent and check there, and if not possible, then raise an >exception. However this is likely to be a major overhaul and break a fe

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-10 Thread Andrew Mathas
> The patch kshape-om.py now produces an import error at Sage startup > ("cannot import name Partition_class"). I'm guessing this has to do with > Travis's work on partitions. > Yes, it's because kshape.py imports Partition_class rather than Partition. I've rebased my patch and uploadded

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-10 Thread Hugh Thomas
Hi-- The patch kshape-om.py now produces an import error at Sage startup ("cannot import name Partition_class"). I'm guessing this has to do with Travis's work on partitions. I have disabled it for now. cheers, Hugh -- You received this message because you are subscribed to the Google

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-09 Thread Travis Scrimshaw
Hey Nicolas, If it was just for me, I would forbid to compare with '<' two objects > with different parents (possibly with some well chosen exceptions like > 1/2 < 1). > > In other words: if you get into a situation where you have a serious > doubt about the semantic (and thus probably even mo

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-09 Thread Travis Scrimshaw
Hey Hugh, Florent, and Andrew, - I rebased the partition_leg_speedup-fh.patch since noone has seems to have touched it in awhile and I making partitions.py Python 3 compliant. - I disabled partitions_speedup_jb.patch since I wanted to ask if it is okay that I remove this since I ended up incorp

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-09 Thread Hugh Thomas
Hi! tableaux-combinatorics-am.patch needs to be rebased on top of Travis's patch trac_13605-partition_options-ts.patch. (Andrew's patch edits some doctests that Travis has removed, and there are some changes to import statements -- nothing looks very complicated.) cheers, Hugh -- You rece

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-09 Thread Hugh Thomas
Hi Travis-- Also, you seem to have incorporated the (unique, small) change from partition_speedup_jb.patch, so it doesn't apply either. cheers, Hugh -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To view this discussion on the web v

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-09 Thread Hugh Thomas
Hi! Florent's patch partition_leg_length_speedup-fh.patch no longer applies over trac_13605-partition_options-ts.patch. The relevant change is just to the format of a raise ValueError, so it would be easy enough either not to make the change in 13605, or to rebase Florent's patch. cheers,

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-08 Thread Nicolas M. Thiery
On Thu, Nov 08, 2012 at 10:04:17AM -0800, Travis Scrimshaw wrote: > For doing the ordering option, how do we want to compare two elements >with different ordering on parents? In particular if we do ordering using >the left argument, we'd have (this is not yet in the queue): > sa

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-08 Thread Travis Scrimshaw
Hey everyone, Just checking since I haven't followed seriously sage-combinat-devel > lately; for the semantic-changing options: > > +1 on Partitions(order=...) > -1 on Partitions().options(order=...) > For doing the ordering option, how do we want to compare two elements with differen

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-05 Thread Anne Schilling
On 11/5/12 6:50 AM, Nicolas M. Thiery wrote: > On Mon, Nov 05, 2012 at 03:15:35PM +0100, Vincent Delecroix wrote: >>> Granted: there should be an abstract class for word-like objects (or >>> more possibly generally objects with labels), and this method should >>> be implemented there. But in the me

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-05 Thread Nicolas M. Thiery
On Mon, Nov 05, 2012 at 03:15:35PM +0100, Vincent Delecroix wrote: > > Granted: there should be an abstract class for word-like objects (or > > more possibly generally objects with labels), and this method should > > be implemented there. But in the mean time just leave it there. > > Note that the

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-05 Thread Vincent Delecroix
> Granted: there should be an abstract class for word-like objects (or > more possibly generally objects with labels), and this method should > be implemented there. But in the mean time just leave it there. Note that the terminology is not uniform. Among others * evaluation * Parikh vector * A

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-05 Thread Nicolas M. Thiery
Hi Travis! On Fri, Nov 02, 2012 at 07:45:35PM -0700, Travis Scrimshaw wrote: >+1 on Partitions(order=...) >-1 on Partitions().options(order=...) > >I'm currently planning on changing it to the first way. Thanks! > >- Deprecating the following methods and cla

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-02 Thread Travis Scrimshaw
Hey Nicolas, > >- IntegerListsLex no longer inherits from CombinatorialClass, but > instead > >from Parent with elements of ClonableArray > > Have you made some timings to measure the improvement? > No I haven't. I just remove the (deprecated-ish) CombinatorialClass and made sure I

Re: [sage-combinat-devel] Partition options and cleanup patch

2012-11-02 Thread Nicolas M. Thiery
Hi Travis! On Tue, Oct 30, 2012 at 04:02:08PM -0700, Travis Scrimshaw wrote: > Here's the state of the #13605 patch and what it currently is doing: Thanks for all your hard work! Yippee in particular for long desired things like: >- IntegerListsLex no longer inherits from Combi

[sage-combinat-devel] Partition options and cleanup patch

2012-10-30 Thread Travis Scrimshaw
Hey everyone, Here's the state of the #13605 patch and what it currently is doing: - Added partition options which can do French/English, latex outputs, Ferrers' diagram characters, some ordering - Deprecating the following methods and classes: * evaluation() * dominate() -- Changed n

Re: [sage-combinat-devel] Partition

2012-02-17 Thread Paul-Olivier Dehaye
Hi Rishi, It is a bug, I saw it reported on trac.sagemath.org previously, but can't find it anymore. Paul On Wed, Feb 15, 2012 at 6:46 PM, r Rishikesh wrote: > In sage, the following succeeds. > > sage: Partition([2,0,1]) > > > I would expect this not to succeed. Is this a bug or there is a reaso

[sage-combinat-devel] Partition

2012-02-16 Thread r Rishikesh
In sage, the following succeeds. sage: Partition([2,0,1]) I would expect this not to succeed. Is this a bug or there is a reason for this construction to work. Rishi -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To post to this grou

Re: [sage-combinat-devel] partition parents/keys

2011-06-08 Thread Nicolas M. Thiery
Hi Anne, On Tue, Jun 07, 2011 at 09:43:52PM -0700, Anne Schilling wrote: > Trying to get to coefficients of certain terms in symmetric functions, I am > running > into trouble: > > sage: ks = kSchurFunctions(QQ,3,t=1) > sage: f=ks([3,2])+ks([2]) > sage: f.monomial_coefficients() > {[3, 2

[sage-combinat-devel] partition parents/keys

2011-06-07 Thread Anne Schilling
Hi! Trying to get to coefficients of certain terms in symmetric functions, I am running into trouble: sage: ks = kSchurFunctions(QQ,3,t=1) sage: f=ks([3,2])+ks([2]) sage: f.monomial_coefficients() {[3, 2]: 1, [2]: 1} sage: f.monomial_coefficients().keys()[1].parent() Partitions of the integer 2

Re: [sage-combinat-devel] Partition bug?

2010-05-03 Thread Martin Rubey
Mike Hansen writes: > On Mon, May 3, 2010 at 11:42 AM, Martin Rubey > wrote: >> m = l >> while not m and m[-1] == 0: >>    del m[-1] >> >> is destructive on l. > > "m = l" just makes m point to the same object that l is pointing to. > This would work and should be the fastest of the bunch. > > d

Re: [sage-combinat-devel] Partition bug?

2010-05-03 Thread Mike Hansen
On Mon, May 3, 2010 at 11:42 AM, Martin Rubey wrote: > m = l > while not m and m[-1] == 0: >    del m[-1] > > is destructive on l. "m = l" just makes m point to the same object that l is pointing to. This would work and should be the fastest of the bunch. def f4(l): m = l[:] while not

Re: [sage-combinat-devel] Partition bug?

2010-05-03 Thread Martin Rubey
Sorry for the amount of spam... I checked the following: def f1(l): m = copy(l) while not len(m) == 0 and m[-1] == 0: m.pop() return m def f2(l): m = [] for e in l: if e == 0: m.reverse() return m m.insert(0, e) m.reverse()

Re: [sage-combinat-devel] Partition bug?

2010-05-03 Thread Martin Rubey
Martin Rubey writes: > Florent Hivert writes: > >>> > Otherwise probably >>> > >>> > l.reverse() >>> > m = l >>> > while m[0] == 0: >>> > m = m[1:] >>> > l.reverse() >>> > m.reverse() >>> > return m >>> >>> You can do that better with >>> >>> while not m and m[-1] == 0: >>> m.pop() >>

Re: [sage-combinat-devel] Partition bug?

2010-05-03 Thread Martin Rubey
Florent Hivert writes: >> > Otherwise probably >> > >> > l.reverse() >> > m = l >> > while m[0] == 0: >> > m = m[1:] >> > l.reverse() >> > m.reverse() >> > return m >> >> You can do that better with >> >> while not m and m[-1] == 0: >> m.pop() > > Sorry for being stupid: > > while not

Re: [sage-combinat-devel] Partition bug?

2010-05-03 Thread Florent Hivert
> > Otherwise probably > > > > l.reverse() > > m = l > > while m[0] == 0: > > m = m[1:] > > l.reverse() > > m.reverse() > > return m > > You can do that better with > > while not m and m[-1] == 0: > m.pop() Sorry for being stupid: while not m and m[-1] == 0: del m[-1] is probab

Re: [sage-combinat-devel] Partition bug?

2010-05-03 Thread Florent Hivert
> Otherwise probably > > l.reverse() > m = l > while m[0] == 0: > m = m[1:] > l.reverse() > m.reverse() > return m You can do that better with while not m and m[-1] == 0: m.pop() Cheers, Florent -- You received this message because you are subscribed to the Google Groups "sage-combi

Re: [sage-combinat-devel] Partition bug?

2010-05-03 Thread Florent Hivert
Hi Martin, > >> Doesn't python support things like > > [i for i in [1,1,0,0,1,1,0,0] while i > 0] > > [1,1] The following is not very pretty but works: sage: import itertools sage: list(itertools.takewhile(lambda i:i>0, (i for i in [1,1,0,0,1,1,0,0]))) [1, 1] Cheers, Florent -- You

Re: [sage-combinat-devel] Partition bug?

2010-05-03 Thread Martin Rubey
Alex Ghitza writes: > On Mon, 03 May 2010 10:09:13 +0200, Martin Rubey > wrote: >> Doesn't python support things like >> >> [i for i in [3,2,1,0,0] while i>0] > > sage: [i for i in [3,2,1,0,0] if i>0] > [3, 2, 1] > >> (I hate python) > > That's too bad :) Please follow the thread before posti

Re: [sage-combinat-devel] Partition bug?

2010-05-03 Thread Alex Ghitza
On Mon, 03 May 2010 10:09:13 +0200, Martin Rubey wrote: > Doesn't python support things like > > [i for i in [3,2,1,0,0] while i>0] sage: [i for i in [3,2,1,0,0] if i>0] [3, 2, 1] > (I hate python) That's too bad :) Best, Alex -- Alex Ghitza -- http://aghitza.org/ Lecturer in Mathematics

Re: [sage-combinat-devel] Partition bug?

2010-05-03 Thread Martin Rubey
"Nicolas M. Thiery" writes: > On Tue, Apr 27, 2010 at 04:28:43PM -0700, Anne Schilling wrote: >> This looks like a bug. You should probably open a ticket! >> >> Anne >> >> Martin Rubey wrote: >> >Is this intentional? >> > >> >sage: Partition([1,1,1,0,1,1]) >> >[1, 1, 1, 1, 1] > > The documentat

Re: [sage-combinat-devel] Partition bug?

2010-05-01 Thread Nicolas M. Thiery
On Tue, Apr 27, 2010 at 04:28:43PM -0700, Anne Schilling wrote: > This looks like a bug. You should probably open a ticket! > > Anne > > Martin Rubey wrote: > >Is this intentional? > > > >sage: Partition([1,1,1,0,1,1]) > >[1, 1, 1, 1, 1] The documentation of Partition specifies that trailing zer

Re: [sage-combinat-devel] Partition bug?

2010-04-27 Thread Anne Schilling
Hi Martin, This looks like a bug. You should probably open a ticket! Anne Martin Rubey wrote: Is this intentional? sage: Partition([1,1,1,0,1,1]) [1, 1, 1, 1, 1] Martin -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To post to thi

[sage-combinat-devel] Partition bug?

2010-04-27 Thread Martin Rubey
Is this intentional? sage: Partition([1,1,1,0,1,1]) [1, 1, 1, 1, 1] Martin -- 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-de...@googlegroups.com. To unsubscribe from this group, send e