#8807: Adding support for morphisms to the category framework
---------------------------+------------------------------------------------
Reporter: SimonKing | Owner: Simon King
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.6
Component: categories | Keywords: morphisms functors categories
Author: Simon King | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
---------------------------+------------------------------------------------
Comment(by SimonKing):
Hi John!
Replying to [comment:9 cremona]:
> Review:
>
> Just a few trivial comments, after which I could give this a positive
review. The patch applies fine to 4.6.rc0 (though the related one at
#8800 does not then apply cleanly) and all tests pass. There is no time
regression (long tests took 667s before and 642s after, using -tp 20).
That's good news! As my patch only adds functionality, without changing
the method resolution order of existing classes and without replacing
existing algorithms, it is no surprise that the speed remains fine.
> Here are the minor issues in docstrings:
>
> line 44: "one should implement two methods" -- do you mean three?
You know, there are three types of mathematicians: Some can count, and
others can't.
But isn't it pythonesque? Recall the Holy Hand Grenade of Antioch from the
movie "Monty Python and the Holy Grail"... :)
> _apply_functor_to_morphism: first line of docstring is a copy from the
previous function but should presumably be "Apply the functor to a
morphism between ... something"
Right.
> In the new {{{__call__}}} function, I would like to see a test of the
branch which raises a {{{TypeError}}} ""%s is ill-defined, ..."
OK, but I hope such example needs to be constructed on purpose. It used to
happen with the matrix constructor, for example: The functor was supposed
to take a ring R into the ring(!!) of m by n matrices over R. But if the
matrix constructor does not produce square matrices, the result is of
course not a ring. This bug existed before and is fixed in my patch (now,
the functor's codomain is only expected to be the category of rings if m
equals n). However, this is exactly the situation that is covered by the
{{{TypeError}}}.
> Is the spelling of "{{{CompositConstructionFunctor}}}" intentional?
Should it not be "{{{CompositeConstructionFunctor}}}"?
This wasn't my idea. {{{CompositConstructionFunctor}}} existed earlier
(see pushout.py).
As I mentioned on the other ticket, I will be unable to do any programming
work at least until next week. But it should be one of the first things
I'll do once I'm settled in Jena.
Best regards,
Simon
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8807#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 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.