#18756: Use coerce actions in the category framework
-------------------------------------------------+-------------------------
Reporter: SimonKing | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.8
Component: algebra | Resolution:
Keywords: cython, coercion, actions, | Merged in:
categories | Reviewers:
Authors: | Work issues:
Report Upstream: N/A | Commit:
Branch: | Stopgaps:
Dependencies: |
-------------------------------------------------+-------------------------
Changes (by SimonKing):
* keywords: CombinatorialFreeModule, cython, coercion => cython, coercion,
actions, categories
Old description:
> `CombinatorialFreeModule`
> - is written in Python (hence, is too slow at least for my applications),
> - its elements just inherit from `Element` and not from a more
> appropriate base class (`ModuleElement` or even better `RingElement`,
> since the former for some reason raises an error on an inner
> multiplication), and
> - it is not conforming to Sage's coercion model, which really is bad,
> since I have seen many people who would start with
> `CombinatorialFreeModule` when implementing new algebraic stuff.
>
> The aim of this ticket is to fix these issues.
New description:
The starting point of this ticket was:
`CombinatorialFreeModule`
- is written in Python (hence, is too slow at least for my applications),
- its elements just inherit from `Element` and not from a more appropriate
base class (`ModuleElement` or even better `RingElement`, since the former
for some reason raises an error on an inner multiplication), and
- it is not conforming to Sage's coercion model, which really is bad,
since I have seen many people who would start with
`CombinatorialFreeModule` when implementing new algebraic stuff.
Early in the discussion, it was found that using `RingElement` isn't
really a solution. Instead, the aim of this ticket was broadened:
- It should be possible to define a multiplication action of a parent on
itself; this require changing `ModuleElement.__mul__`.
- Instead of overriding `__mul__` and `_mul_` for element classes, the
category framework should instead return
`sage.structure.coerce_actions....` to provide multiplication.
- These actions can be implemented in Cython---while the categories stay
in Python!
--
--
Ticket URL: <http://trac.sagemath.org/ticket/18756#comment:10>
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.