On Fri, Mar 23, 2012 at 01:14:00AM -0700, Frédéric Chapoton wrote: > Trying to use inversions for elements of Weyl groups, I found that it > exists, but does not work, and is badly documented and tested. In which > patch is this located ?
sage: w.inversions?? Tells it is in sage/combinat/root_system/weyl_group.py. By investigating: > hg annotate sage/combinat/root_system/weyl_group.py one finds: 16769: def inversions(self): 16769: """ 16769: EXAMPLES: 16769: sage: G = WeylGroup(['A',3]) 16769: sage: w = G.from_reduced_word([1,2,1]) 16769: sage: w.inversions() ... (the revision number might vary depending on the version of Sage, ...) looking in > hg log sage/combinat/root_system/weyl_group.py one finds: changeset: 16769:b178281a23c2 tag: coxeter3-mh.patch I guess ``self.lattice()`` should be replaced by ``self.parent().lattice(). By the way, it should be possible to generalize this method to infinite coxeter groups by running only through the set of inversions and its frontier (in the root poset or something similar; I forgot the details). Cheers, Nicolas -- Nicolas M. Thiéry "Isil" <nthi...@users.sf.net> 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.