#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:               |  
---------------------------+------------------------------------------------

Comment(by SimonKing):

 If a category has not its own implementation of a hom-category, currently
 the join of the hom-categories of its super-categories is chosen. Hence,
 we have
 {{{
 sage: CommutativeRings().hom_category()
 Category of hom sets in Category of rings
 sage: WeylGroups().hom_category()
 Category of hom sets in Category of sets
 }}}

 I don't like that. One problem is that, for test suites, one would like to
 have a sample object -- but there is no way to create a sample object for
 a join of arbitrary categories.

 Moreover, the "hom sets in the Category of rings" are simply wrong for the
 category of ''commutative'' rings.

 Instead, I suggest to walk through the list of all super categories of
 `self`, take the first that has the attribute `HomCategory` (i.e., has a
 custom implementation of a hom category), and insert `self` as argument
 for that `HomCategory`:
 {{{
 sage: HopfAlgebrasWithBasis(QQ).hom_category()
 Category of hom sets in Category of hopf algebras with basis over Rational
 Field
 sage: WeylGroups().hom_category()
 Category of hom sets in Category of weyl groups
 sage: type(HopfAlgebrasWithBasis(QQ).hom_category())
 <class 'sage.categories.modules_with_basis.ModulesWithBasis.HomCategory'>
 sage: type(WeylGroups().hom_category())
 <class 'sage.categories.sets_cat.Sets.HomCategory'>
 }}}

 Of course, it may happen that several super categories have different
 custom implementation of hom categories, and we pick just one. But I think
 this should be taken care of manually, as join categories have a serious
 drawback, IMHO.

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