Hi Mike!
On 6 Dez., 18:08, Mike Hansen <[email protected]> wrote:
[...]
> If you want this, it's not the _r_action_ and _l_action_ that does
> this. What allows Sage to find the new parent is the following:
[...]
Thanks!
But still, I don't see why my code snipped doesn't work.
The reference manual tells:
"""
Suppose one wants R to act on S. Some examples of this could be R =
\QQ, S = \QQ[x] or R = {\rm Gal}(S/\QQ) where S is a number field.
There are several ways to implement this:
* If R is the base of S (as in the first example), simply
implement _rmul_ and/or _lmul_ on the Elements of S. In this case r *
s gets handled as s._rmul_(r) and s * r as s._lmul_(r). The argument
to _rmul_ and _lmul_ are guaranteed to be Elements of the base of S
(with coercion happening beforehand if necessary).
* If R acts on S, one can alternatively define the methods
_r_action_ and/or _l_action_ on the Elements of R. There is no
constraint on the type or parents of objects passed to these methods;
raise a TypeError or ValueError if the wrong kind of object is passed
in to indicate the action is not appropriate here.
"""
Later it is said that non-multiplicative actions must be implemented
by providing a _get_action_ method.
So, according to this, _r_action_ and _l_action_ should work. But they
don't.
Is it really needed to provide constructions? If so: What is needed
to implement it? Can you please give me a pointer to the manual pages?
Cheers,
Simon
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org