#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:  add commit message 
to one patch
Report Upstream:  N/A                     |     Reviewers:  Simon King          
           
        Authors:  Nicolas M. ThiƩry       |     Merged in:                      
           
   Dependencies:  #11521, #12215, #12313  |      Stopgaps:                      
           
------------------------------------------+---------------------------------

Comment (by nthiery):

 Hi Simon,

 Sorry, I am slow answering; I was immersed all afternoon in tracking
 down a nasty bug where UniqueRepresentation was violated. It turned
 out that the UniqueRepresentation dict had to equal entries in its
 keys (gasp), and that was due to a tricky mro order for a non trivial
 inheritance involving Category_singleton and FastHash which got the
 hash to change over time ... Anyway ...

 Replying to [comment:68 SimonKing]:
 > {{{
 > 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)
 > }}}
 > Why are X and Y renamed? There is yet another location where things are
 renamed, namely
 > Here, I also wonder about the "key" argument.

 I do this fairly systematically in the tests in modules_with_basis. It
 makes it immediate to check that the domain and codomain are set
 properly when looking at the repr of a morphism or homset. They key is
 to force the domain and codomain to be distinct (otherwise, and this
 happened to me, if the code accidently interchanges the two it will
 get unnoticed).

 Well, and for good or bad, once you rename a given parent in a
 doctest, you have to rename consistently this parent in all other
 doctests in the same file. Or to call X.rename() at the end of the
 doctest.

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