Re: [sage-combinat-devel] bug in poset

2012-05-23 Thread Anne Schilling
One more question: the algorithm only works for finite posets. Shall this be specified in the documentation? Anne On 5/23/12 11:40 AM, Anne Schilling wrote: > Hello Darij, > > Thank you for your work on this. I modified your code slightly and > added some additional documentation (indicating wha

Re: [sage-combinat-devel] bug in poset

2012-05-23 Thread Anne Schilling
Hello Darij, Thank you for your work on this. I modified your code slightly and added some additional documentation (indicating what happens when there are several components). The patch is now on the sage-combinat queue and on http://trac.sagemath.org/sage_trac/ticket/12993 Franco or Christian

Re: [sage-combinat-devel] bug in poset

2012-05-23 Thread Darij Grinberg
Hello all, Thanks for the comments, Franco and Anne. I've updated http://mit.edu/~darij/www/rf.txt (all of Franco's comments implemented). What I still don't like about my code is that it recomputes the whole function every time I call it. I assume caching the rank_function method wouldn't be of

Re: [sage-combinat-devel] bug in poset

2012-05-23 Thread Franco Saliola
On Wed, May 23, 2012 at 9:32 AM, Anne Schilling wrote: > Hi Franco and Darij and ..., > Hello Anne, Darij, On Tue, May 22, 2012 at 2:50 PM, Darij Grinberg >>> > wrote:     Hi Anne,     > For a finite poset perhaps the easiest would

Re: [sage-combinat-devel] bug in poset

2012-05-23 Thread Anne Schilling
Hi Franco and Darij and ..., >>> Hello Anne, Darij, >>> >>> On Tue, May 22, 2012 at 2:50 PM, Darij Grinberg >> > wrote: >>> >>> Hi Anne, >>> >>> > For a finite poset perhaps the easiest would be to >>> > >>> > - start with a random element in the pos

Re: [sage-combinat-devel] bug in poset

2012-05-23 Thread Franco Saliola
Hello Anne, On Wed, May 23, 2012 at 1:43 AM, Anne Schilling wrote: > > On 5/22/12 6:17 PM, Franco Saliola wrote: > > > > Hello Anne, Darij, > > > > On Tue, May 22, 2012 at 2:50 PM, Darij Grinberg > > wrote: > > > >     Hi Anne, > > > >     > For a finite poset per

Re: [sage-combinat-devel] bug in poset

2012-05-22 Thread Anne Schilling
On 5/22/12 6:17 PM, Franco Saliola wrote: > > Hello Anne, Darij, > > On Tue, May 22, 2012 at 2:50 PM, Darij Grinberg > wrote: > > Hi Anne, > > > For a finite poset perhaps the easiest would be to > > > > - start with a random element in the poset

Re: [sage-combinat-devel] bug in poset

2012-05-22 Thread Anne Schilling
Hi Darij, >> Did you make the changes in the source code? Then you can just do >> >> sage -br > > Thanks - I got that wrong (thought this is what upgrade would do)! >> >> and test your function. >> >> If you are happy with your changes and want to put them under mercurial >> "supervision" >> do

Re: [sage-combinat-devel] bug in poset

2012-05-22 Thread Hugh Thomas
Hi Darij-- I think this means that the version of hg which you are using is too old. Sage includes an installation of hg, which you can access via "sage -hg". (So the easiest thing to do is to replace "hg" with "sage -hg" each time in Anne's instructions. Or you could install a more recent v

Re: [sage-combinat-devel] bug in poset

2012-05-22 Thread Franco Saliola
Hello Anne, Darij, On Tue, May 22, 2012 at 2:50 PM, Darij Grinberg wrote: > Hi Anne, > > > For a finite poset perhaps the easiest would be to > > > > - start with a random element in the poset, assign rank 0 > > - look at all covers and cocovers and assign the rank according to the > > recurrenc

Re: [sage-combinat-devel] bug in poset

2012-05-22 Thread Darij Grinberg
Hi Anne, > Did you make the changes in the source code? Then you can just do > > sage -br Thanks - I got that wrong (thought this is what upgrade would do)! > > and test your function. > > If you are happy with your changes and want to put them under mercurial > "supervision" > do > > hg qnew ra

Re: [sage-combinat-devel] bug in poset

2012-05-22 Thread Anne Schilling
Hi Darij, >> For a finite poset perhaps the easiest would be to >> >> - start with a random element in the poset, assign rank 0 >> - look at all covers and cocovers and assign the rank according to the >> recurrence rank(x) = rank(y) + 1 if x covers y. >> - repeat with the new elements >> - if at

Re: [sage-combinat-devel] bug in poset

2012-05-22 Thread Darij Grinberg
Hi Anne, > For a finite poset perhaps the easiest would be to > > - start with a random element in the poset, assign rank 0 > - look at all covers and cocovers and assign the rank according to the >  recurrence rank(x) = rank(y) + 1 if x covers y. > - repeat with the new elements > - if at any poi

Re: [sage-combinat-devel] bug in poset

2012-05-21 Thread Anne Schilling
On 5/21/12 8:09 AM, Darij Grinberg wrote: > Hi Anne, > >> Isn't the following a big bug in posets in sage: >> >> sage: P = Poset(([1,2,3,4],[[1,4],[2,3],[3,4]]), facade = True) >> sage: P.is_graded() >> False >> >> The definition of grading is that all maximal chains of every interval >> have the

Re: [sage-combinat-devel] bug in poset

2012-05-21 Thread Darij Grinberg
Hi Anne, > Isn't the following a big bug in posets in sage: > > sage: P = Poset(([1,2,3,4],[[1,4],[2,3],[3,4]]), facade = True) > sage: P.is_graded() > False > > The definition of grading is that all maximal chains of every interval > have the same length. This is given in the above poset, but sag

Re: [sage-combinat-devel] bug in poset

2012-05-21 Thread Anne Schilling
On 5/21/12 8:11 AM, Christian Stump wrote: >> The definition of grading is that all maximal chains of every interval >> have the same length. This is given in the above poset, but sage says >> it is not graded. > > The problem here is what people consider a "rank function" on a poset. > Do we want

Re: [sage-combinat-devel] bug in poset

2012-05-21 Thread Christian Stump
> The definition of grading is that all maximal chains of every interval > have the same length. This is given in the above poset, but sage says > it is not graded. The problem here is what people consider a "rank function" on a poset. Do we want that all minimal elements have value 0 ? Then your