#10667: Morphisms and Objects of Categories
---------------------------+------------------------------------------------
   Reporter:  SimonKing    |       Owner:  nthiery                      
       Type:  enhancement  |      Status:  new                          
   Priority:  major        |   Milestone:                               
  Component:  categories   |    Keywords:  objects morphisms containment
     Author:               |    Upstream:  N/A                          
   Reviewer:               |      Merged:                               
Work_issues:               |  
---------------------------+------------------------------------------------
 '''__Purpose__'''

 Introduce a framework for testing whether or not something is a morphism
 in a category. See the discussion on [http://groups.google.com/group/sage-
 algebra/browse_thread/thread/3e2ca2a8be1a3a23 sage-algebra]. Here is a
 summary of the discussion.

 __Methods for categories__

 Categories `C` should have a method `C.has_morphism(f)` answering whether
 `f` is a morphism in `C`. By symmetry, we want a method `C.has_object(X)`,
 answering whether `X` is an object in `C`.

 Note that we want `X in C` to be true if and only if `X` is an object of
 `C` (so, it is synonymous to `C.has_object(X)`). This currently is not
 always the case:
 {{{
 sage: P.<x,y> = QQ[]
 sage: f = P.hom(reversed(P.gens()))
 sage: f in Rings().hom_category()
 True
 }}}
 but of course `f` is not an ''object'' of the hom-category (it is only
 ''contained'' in an object of the hom-category).

 __Class/Set of objects and morphisms__

 It would be nice to have container classes for the objects and for the
 morphisms of a category. Then, `f in C.morphisms()` would be a very
 natural notation for `C.has_morphism(f)`, and `X in C.objects()` would be
 another way of saying `X in C`.

 Of course, since `f in C.morphisms()` and `f in C.objects()` are nice
 notations, they should be as fast as possible -- otherwise, people
 wouldn't use them.

 Further discussion should be put in comments to this ticket.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10667>
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.

Reply via email to