#8807: Adding support for morphisms to the category framework
---------------------------+------------------------------------------------
Reporter: SimonKing | Owner: Simon King
Type: enhancement | Status: needs_work
Priority: major | Milestone:
Component: categories | Keywords: morphisms functors categories
Author: Simon King | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
---------------------------+------------------------------------------------
Comment(by SimonKing):
And there it is:
{{{
sage: M = parent(matrix(ZZ, 3,4, [1,2,3,-4,7,2,18,3,4,3,4,5]))
sage: mf = M.construction()[0]
sage: mf.domain()
Category of rings
sage: mf.codomain()
Category of rings
sage: M in Rings()
False
}}}
So, the problem is that I gave the matrix constructor got a wrong
codomain, namely the category {{{Rings()}}} --- and my generic
{{{__call__}}} method checks whether the output belongs to the intended
category. What should be the right choice?
{{{
sage: M.categories()
[Category of modules over Integer Ring, Category of bimodules over Integer
Ring on the left and Integer Ring on the right, Category of left modules
over Integer Ring, Category of right modules over Integer Ring, Category
of commutative additive groups, Category of commutative additive monoids,
Category of commutative additive semigroups, Category of additive magmas,
Category of sets, Category of sets with partial maps, Category of objects]
}}}
Since the construction functor can not know about the base ring, I guess
{{{CommutativeAdditiveGroups()}}} would be the way to go.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8807#comment:5>
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 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-trac?hl=en.