Re: [sage-combinat-devel] Re: problem with inversions for Weyl group in 5.0 beta8

2012-03-23 Thread mshimo
Nicolas, >> 1. I want to have a version of bruhat_lower_covers >> and bruhat_upper_covers which returns pairs >> (weyl_group_element, coroot) where the coroot >> tells you which reflection you used. > > Ok; then the output would probably be a dictionary > > {root: group_element} Why is this p

Re: [sage-combinat-devel] Re: problem with inversions for Weyl group in 5.0 beta8

2012-03-23 Thread Nicolas M. Thiery
On Fri, Mar 23, 2012 at 09:09:23AM -0400, msh...@math.vt.edu wrote: > I can do it. Cool. > Can I sneak in a few other things while I'm at it? > > 1. I want to have a version of bruhat_lower_covers > and bruhat_upper_covers which returns pairs > (weyl_group_element, coroot) where the coroot > tel

Re: [sage-combinat-devel] Re: problem with inversions for Weyl group in 5.0 beta8

2012-03-23 Thread mshimo
I can do it. Can I sneak in a few other things while I'm at it? 1. I want to have a version of bruhat_lower_covers and bruhat_upper_covers which returns pairs (weyl_group_element, coroot) where the coroot tells you which reflection you used. 2. A method that, given a (co)root, returns the associ

Re: [sage-combinat-devel] Re: problem with inversions for Weyl group in 5.0 beta8

2012-03-23 Thread Nicolas M. Thiery
On Fri, Mar 23, 2012 at 08:24:06AM -0400, msh...@math.vt.edu wrote: > It is easy to get the inversion set directly from any reduced word of the > Weyl group element. > > If w = s_{i_l} ... s_{i_2} s_{i_1} > > then the set of positive roots alpha such that w alpha is negative, is > > \alpha_{i_1}

Re: [sage-combinat-devel] Re: problem with inversions for Weyl group in 5.0 beta8

2012-03-23 Thread mshimo
It is easy to get the inversion set directly from any reduced word of the Weyl group element. If w = s_{i_l} ... s_{i_2} s_{i_1} then the set of positive roots alpha such that w alpha is negative, is \alpha_{i_1}, s_{i_1} \alpha_{i_2}, s_{i_1} s_{i_2} \alpha_{i_3},... This produces "right inver

Re: [sage-combinat-devel] Re: problem with inversions for Weyl group in 5.0 beta8

2012-03-23 Thread Nicolas M. Thiery
On Fri, Mar 23, 2012 at 03:37:11AM -0700, Frédéric Chapoton wrote: >Here is a correct version. I am not currently able to post patches (still >working with 4.7.1 here..) I extracted the method from Mike's patch, and put it in weyl_group_inversions-fc.patch. I wrote it as: return [

[sage-combinat-devel] Re: problem with inversions for Weyl group in 5.0 beta8

2012-03-23 Thread Frédéric Chapoton
Here is a correct version. I am not currently able to post patches (still working with 4.7.1 here..) def inversions(self): """ EXAMPLES:: sage: W = WeylGroup(['A',3]) sage: w = W.from_reduced_word([1,2,1]) sage: w.inversions() [(0, 1, -1, 0, 0, 0), (1