On Mar 11, 2009, at 1:21 PM, Florent Hivert wrote:

>
>> How many places is this used?  In my (fairly fresh) Sage session,
>> there are only 9 actions in the action cache (on matrices, number
>> fields, and polynomials).  I'd be willing to write the _get_action_
>> methods for these cases, if it would help kill off some of the excess
>> error catching in coercion (I'm really not very fond of the idea "try
>> it to see if it will work", anyway).
>
> +1 to remove the try if it's work.

Matrices are already implemented via the _get_action_ path. For  
polynomials and number fields, I think it's actually cleaner to just  
provide _rmul_ and _lmul_ than create an actions (especially in terms  
of subclassing).

> The very purpose of the category framework it to declare in a  
> mathematical
> way, this that have a matematical meaning. In the case of a right  
> action of A
> on B, on declare that B is a A-RightModule. It is much more  
> informative by all
> respect than testing if a random element of A accept to be  
> multiplied by a
> random element of B.

_rmul_ and _lmul_ are only tried if B is an A-module. (We don't (yet)  
have the distinction between right and left modules, this is part of  
where the "try it out" comes into play).

However, not all actions are module actions, e.g. a permutation  
acting on an ordered list, or a matrix acting on a quadratic form (to  
take two examples that I've been thinking about lately).

- Robert




--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to