William Stein wrote:
> On Fri, 02 Nov 2007 09:24:53 -0700, <[EMAIL PROTECTED]> wrote:
>>> I guess I just don't think permutation (which are functions) should
>>> act on the left.  It's repulsive to me.    I guess there's just
>>> not much more to say than that.
>> Ok.  I don't think that's a very good attitude to enforce, since a lotof 
>> people do use left action.
> 
>> Use __call__ for left, and __pow__ for the right.
> 
> I certainly agree with that.
> 
> I'm OK with the code going in.  I don't like it at all, but that's fine.  I 
> don't have
> to like everything in Sage.

It sounds like the question of notation has already been hashed out 
(satisfactorily to me, anyway).  It might be good to mention here that a 
permutation already acts on a multivariate polynomial with slightly 
different notation than suggested above, as given in the doctests in 
permgroup_element.py (in 2.8.10):

sage: G = PermutationGroup(['(1,2,3)(4,5)', '(1,2,3,4,5)'])
sage: R.<x,y,z,u,v> = MPolynomialRing(QQ,5)
sage: f = x^2 + y^2 - z^2 + 2*u^2
sage: sigma, tau = G.gens()
sage: f*sigma
-x^2 + y^2 + z^2 + 2*v^2
sage: f*tau
y^2 + z^2 - u^2 + 2*v^2
sage: f*(sigma*tau)
2*x^2 - y^2 + z^2 + u^2
sage: (f*sigma)*tau
2*x^2 - y^2 + z^2 + u^2

(notice that it isn't f^sigma, but f*sigma)

-Jason

P.S.  The suggestion originally came up when looking at the graph 
relabel function, which relabels the vertices of a graph according to a 
permutation.


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to