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

2012-04-02 Thread Nicolas M. Thiery
On Fri, Mar 30, 2012 at 03:16:15PM -0700, Anne Schilling wrote: > To me it feels more natural to have the output on the basis of simple roots, > rather than the ambient space. > Is there now a simple way to convert a vector in the ambient space > to the root basis? Not yet implemented. Which is a

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

2012-03-30 Thread mshimo
Anne, > Is there now a simple way to convert > a vector in the ambient space to the root basis? Longish answer: The "domain" of the Weyl group, the space on which it is defined to act, can be at least one of the following: 1. Ambient space 2. Root lattice 3. Coroot lattice 4. Weight lattice 5.

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

2012-03-30 Thread mshimo
Hi all, Nicolas sez: >>I have the feeling that it would be more natural if a method of >> W (or of it's elements) returning some roots would return then as >> elements of L. Anne sez: > To me it feels more natural to have the output on the basis of simple > roots, rather than the ambient space.

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

2012-03-30 Thread Anne Schilling
> On Sat, Mar 24, 2012 at 08:52:04PM -0400, msh...@math.vt.edu wrote: >> Now you should get >> >> sage: W=WeylGroup(['A',2]) >> sage: w=W.from_reduced_word([1,2,1]) >> sage: w.inversions() >> [alpha[1], alpha[1] + alpha[2], alpha[2]] > > Sorry for the slow answer. Here W is a Weyl group implemente

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

2012-03-30 Thread Nicolas M. Thiery
Hi Marc, On Sat, Mar 24, 2012 at 08:52:04PM -0400, msh...@math.vt.edu wrote: > Now you should get > > sage: W=WeylGroup(['A',2]) > sage: w=W.from_reduced_word([1,2,1]) > sage: w.inversions() > [alpha[1], alpha[1] + alpha[2], alpha[2]] Sorry for the slow answer. Here W is a Weyl group imp

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

2012-03-30 Thread Nicolas M. Thiery
Ah, shoot; I had forgotten but there is currently a shortcoming with cached methods which make them rather incompatible with super calls in subclasses: class A(object): @cached_method def f(self): print "I am A.f" class B(A): def f(self): super(B, sel

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

2012-03-30 Thread Nicolas M. Thiery
On Thu, Mar 29, 2012 at 07:50:31PM -0400, msh...@math.vt.edu wrote: > I need to call the Coxeter group method something different > like reflection_inversions (and the solution becomes trivial) alternative name: inversions_as_reflections > or someone needs to tell me how to tell python not to run

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

2012-03-30 Thread Nicolas M. Thiery
On Thu, Mar 29, 2012 at 09:04:41PM -0400, msh...@math.vt.edu wrote: > Is the following a decent way to determine whether "element" is an element > of a Weyl group of a given Cartan type? > > hasattr(element, "domain") and hasattr(element.domain(), "cartan_type") > and element.domain().cartan_type(

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

2012-03-29 Thread mshimo
Christian and Nicolas, I pushed trac_12774-coxeter-ms.patch. I moved it way up the queue and had no problems applying the rest of the queue. I temporarily broke some rules for putting the patch that high on the queue. E.g., I have a trac ticket but haven't put a version of the patch on trac just

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

2012-03-29 Thread mshimo
Christian and Nicolas, Is the following a decent way to determine whether "element" is an element of a Weyl group of a given Cartan type? hasattr(element, "domain") and hasattr(element.domain(), "cartan_type") and element.domain().cartan_type() == cartan_type E.g. is this likely to change or are

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

2012-03-29 Thread mshimo
Arrgh, my previous question obviously didn't make sense. I need to call the Coxeter group method something different like reflection_inversions (and the solution becomes trivial) or someone needs to tell me how to tell python not to run over the Coxeter group method (so the method is actually avai

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

2012-03-29 Thread Anne Schilling
Hi Mark, If I understand correctly, you can you getattr, see getattr(object, name[, default]) -> value Get a named attribute from an object; getattr(x, 'y') is equivalent to x.y. When a default argument is given, it is returned when the attribute doesn't exist; without it, an exc

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

2012-03-29 Thread mshimo
Nicolas, But I want the Weyl group version to use the output of the Coxeter version, which will be cached, and then make the (co)root variants if needed. How do I do that syntactically without running over the Coxeter version? --Mark >> Since WeylGroups has CoxeterGroups as a super category, to

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

2012-03-29 Thread Nicolas M. Thiery
On Thu, Mar 29, 2012 at 09:03:59PM +0200, Christian Stump wrote: > Since WeylGroups has CoxeterGroups as a super category, to me it seems > be perfectly reasonable to name both methods "inversions", The one > from WeylGroups then overwrite the one from CoxeterGroups Indeed. As for usual inheritan

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

2012-03-29 Thread mshimo
Christian, > Since WeylGroups has CoxeterGroups as a super category, to me it seems > be perfectly reasonable to name both methods "inversions", The one > from WeylGroups then overwrite the one from CoxeterGroups (or does it > happen to be the other way round, Nicolas?). To avoid confusion, maybe

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

2012-03-29 Thread Christian Stump
> Indeed, in trac_12774-coxeter-ms.patch, there is already a Coxeter group > element method which returns inversions in reflection form: > > sage: W = WeylGroup(['A',2],prefix="s") > sage: w = W.from_reduced_word([1,2,1]) > sage: w.length_decreasing_reflections_right() > [s1, s1*s2*s1, s2] > > If e

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

2012-03-29 Thread mshimo
Hi all, > Jean Michel wrote: > >> The list of inversions, in my view, should preferably be a list >> of reflections (which does not need the existence of roots and makes >> sense for abstract Coxeter groups). Indeed, in trac_12774-coxeter-ms.patch, there is already a Coxeter group elemen

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

2012-03-29 Thread Christian Stump
> In other words, something like this: > > sage: w.inversions() > [alpha[1], alpha[1] + alpha[2], alpha[2]] > > sage: w.inversions(reflections=True) > [s1,s1*s2*s1,s2] +1 what was again the point of having a list rather than a set? Christian -- You received this message because you are subscri

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

2012-03-29 Thread Daniel Bump
> Frederic, > > I pushed a patch (coxeter_ms.patch) to the sage-combinat server. > > Now you should get > > sage: W=WeylGroup(['A',2]) > sage: w=W.from_reduced_word([1,2,1]) > sage: w.inversions() > [alpha[1], alpha[1] + alpha[2], alpha[2]] > > which is much nicer. > > --Mark Jean Michel wro

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

2012-03-24 Thread mshimo
Frederic, I pushed a patch (coxeter_ms.patch) to the sage-combinat server. Now you should get sage: W=WeylGroup(['A',2]) sage: w=W.from_reduced_word([1,2,1]) sage: w.inversions() [alpha[1], alpha[1] + alpha[2], alpha[2]] which is much nicer. --Mark > Trying to use inversions for elements of W

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

2012-03-23 Thread Nicolas M. Thiery
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/

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

2012-03-23 Thread Frédéric Chapoton
Hello, 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 ? Frederic sage: W=WeylGroup(['A',3]) sage: w=W.from_reduced_word([1,2,1]) sage: w.inversions() AttributeError: 'WeylGroup