#18758: Allow actions of a parent on itself
---------------------------+-------------------------------------
Reporter: SimonKing | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.8
Component: coercion | Keywords: actions on itself
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
---------------------------+-------------------------------------
Currently, `ModuleElement.__mul__` raises an error when both elements have
the same parent. Hence, in order to define a ring structure, one must not
start with `ModuleElement`, which is bad, since sometimes the concrete
structure only depends on the category (see !CombinatorialFreeModule).
The approach to be implemented here: `ModuleElement.__mul__` and
`RingElement.__mul__` should provide short-cuts in cases where there is an
obvious way to be faster than calling the coercion model, and otherwise it
is the job of the coercion model (NOT of `ModuleElement.__mul__`) to
complain if the two elements come from the same parent without an action
being defined.
Hence, it should be possible to start with `ModuleElement` and get a ring
structure on top of it by an appropriate action of the parent on itself.
Moreover, it should be possible to define the actions using !ParentMethods
in the category framework. I.e., `_get_action_` should be moved from
Parent to Sets.!ParentMethods.
This is motivated by the discussion on #18756
--
Ticket URL: <http://trac.sagemath.org/ticket/18758>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.