-
-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coercion for homsets #14279
Comments
Attachment: trac_14279-new_coercion_for_homsets.patch.gz Main patch, needs better documentation of the changes |
comment:1
I change it into "needs review", in order to let the patchbot do some work. However, it will need a second patch, that improves documentation. But I certainly would like to get some input at that point. |
Composition action |
comment:2
Attachment: trac_14279-composition_action.patch.gz I think it makes sense to introduce a new type of action (i.e., a subclass of sage.categories.action.Action) for multiplying maps by composition. The advantages:
The disadvantage:
Solution of this problem: Drop Ring. Instead, implement the ring properties of These timings show the advantage of using actions (in each example, the first timing is with both patches, the second timing is with the first patch only):
Only first patch:
Only first patch:
First patch only:
TODO Provide another patch, namely for documentation. |
Work Issues: documentation |
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 fromsage.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 intoCategoryObject
.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".
Depends on #11490
Depends on #14214
Depends on #14249
Depends on #14225
Depends on #14278
Component: categories
Work Issues: documentation
Author: Simon King
Issue created by migration from https://trac.sagemath.org/ticket/14279
The text was updated successfully, but these errors were encountered: