#12876: Fix element and parent classes of Hom categories to be abstract, and
simplify the Hom logic.
------------------------------------------+---------------------------------
       Reporter:  nthiery                 |         Owner:  nthiery             
      
           Type:  enhancement             |        Status:  needs_review        
      
       Priority:  major                   |     Milestone:  sage-5.4            
      
      Component:  categories              |    Resolution:                      
      
       Keywords:  categories, Hom         |   Work issues:  fix doctests and 
segfaults
Report Upstream:  N/A                     |     Reviewers:  Simon King          
      
        Authors:  Nicolas M. ThiƩry       |     Merged in:                      
      
   Dependencies:  #11521, #12215, #12313  |      Stopgaps:                      
      
------------------------------------------+---------------------------------

Comment (by SimonKing):

 One question, Nicolas:

 The first patch contains
 {{{
 sage: category = FiniteDimensionalModulesWithBasis(QQ)
 sage: X = CombinatorialFreeModule(QQ, [1,2,3], category = category);
 X.rename("X")
 sage: Y = CombinatorialFreeModule(QQ, [1,2,3,4], category = category);
 Y.rename("Y")
 sage: H = Hom(X, Y)
 sage: H.zero().category_for()
 Category of finite dimensional modules with basis over Rational Field
 }}}
 Why are X and Y renamed? There is yet another location where things are
 renamed, namely
 {{{
 Diagonal functions can be constructed using the ``diagonal`` option::

     sage: X = CombinatorialFreeModule(QQ, [1,2,3,4]); X.rename("X")
     sage: Y = CombinatorialFreeModule(QQ, [1,2,3,4], key="Y");
 Y.rename("Y")
     sage: H = Hom(X, Y)
 }}}
 Here, I also wonder about the "key" argument.

 In sage.rings.ring.pyx, you state:
 {{{
     """
     This temporary alias is here for those instances of :class:`Ring`
     that are not yet properly in the :class:`Rings`() category.

     TESTS::

         sage: A = Ring(ZZ)
         sage: A._Hom_.__module__
         'sage.categories.rings'
         sage: Hom(A,A).__class__
         <class 'sage.rings.homset.RingHomset_generic_with_category'>
     """
     _Hom_ = Rings.ParentMethods.__dict__['_Hom_']
 }}}
 Are there any rings that do not initialise the category, after #9138?
 Hence, what would happen without that alias? Perhaps I'll test it, after
 finishing the tests for the original patches.

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