#14279: Coercion for homsets
--------------------------+-------------------------------------------------
Reporter: SimonKing | Owner: nthiery
Type: defect | Status: new
Priority: major | Milestone: sage-5.9
Component: categories | Keywords:
Work issues: | Report Upstream: N/A
Reviewers: | Authors: Simon King
Merged in: | Dependencies: #11490, #14214, #14249, #14225,
#14278
Stopgaps: |
--------------------------+-------------------------------------------------
Homsets are parents that, up to now, do not use Sage's coercion model and
do not use element classes. Morphisms are elements that, up to now, would
define a custom `__mul__` and `__add__` and so on.
The purpose of this ticket is to use the new framework. As you can
imagine, this involves many changes. One important change: I let
`sage.categories.map.Map` inherit from
`sage.structure.element.ModuleElement`. Not all homsets are modules, of
course, but when they are, then one can simply define single underscore
`_add_`, `_rmul_` and `_composition_` (the latter is for composition of
maps) as usual, so that one does not need to overload `__mul__` so often.
Another important change: Domain and codomain of a morphism used to be
parents, but that's wrong, because parents are `CategoryObject`s that
contain elements, but we can speak of morphisms (purely categorically)
without elements. Hence, I changed domain and codomain into
`CategoryObject`.
In sage.homology, no reasonable base classes were used: Everything was
directly inheriting from `SageObject`. I improved this.
While I was at it, I was fixing some homset related pickling problems, and
I implemented a cache for a parent where that has been previously tried
unsuccessfully.
It is difficult to say what component this ticket belongs to. I try
"categories".
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14279>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.