#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-pending
      Component:  categories                                                    
        |    Resolution:              
       Keywords:  categories, Hom                                               
        |   Work issues:              
Report Upstream:  N/A                                                           
        |     Reviewers:  Simon King  
        Authors:  Nicolas M. ThiƩry                                             
        |     Merged in:              
   Dependencies:  #715, #11521, #12215, #12313, #13412, #13145, #14159, #13184, 
#14287  |      Stopgaps:              
----------------------------------------------------------------------------------------+

Comment (by SimonKing):

 I have
 {{{
 > hg qa
 trac_14159_weak_value_triple_dict.patch
 trac_14159_use_cdef_get.patch
 trac_13184_sage_5.9.beta.patch
 trac_14287-rebased.patch
 trac_12876_category_abstract_classes_for_hom.patch
 trac_12876_r_test.patch
 }}}
 on top of sage-5.9.rc0, and the relevant lines in
 sage/categories/schemes.py are
 {{{
             """
             return []

         class ParentMethods:

             def __new__(cls, R, S, category):
                 """
                 TESTS::

                     sage: E = EllipticCurve('37a1')
                     sage: Hom(E, E).__class__
                     <class
 'sage.schemes.generic.homset.SchemeHomset_generic_with_category'>

                 If both schemes R and S are actually specs, we want
                 the parent for Hom(R, S) to be in a different class::

                     sage: Hom(Spec(ZZ), Spec(ZZ)).__class__
                     <class
 'sage.schemes.generic.homset.SchemeHomset_points_spec_with_category'>

                 Currently, and to minimize the changes, this is done
                 by delegating the job to SchemeHomset. This is not
                 very robust: for example, only one category can do
                 this hack.

                 FIXME: this might be better handled by an extra Spec
 category
                 """
                 from sage.schemes.generic.homset import SchemeHomset
                 return SchemeHomset(R, S, category=category)


 #############################################################
 }}}

 However, the patch expects
 {{{
              """
              return []

 -        class ParentMethods:
 -
 -            def __new__(cls, R, S, category):
 -                """
 -                TESTS::
 -
 -                    sage: E = EllipticCurve('37a1')
 -                    sage: Hom(E, E).__class__
 -                    <class
 'sage.schemes.generic.homset.SchemeHomset_generic_with_category'>
 -
 -                If both schemes R and S are actually specs, we want
 -                the parent for Hom(R, S) to be in a different class::
 -
 -                    sage: Hom(Spec(ZZ), Spec(ZZ)).__class__
 -                    <class
 'sage.schemes.affine.affine_homset.SchemeHomset_points_spec_with_category'>
 -
 -                Currently, and to minimize the changes, this is done
 -                by delegating the job to SchemeHomset. This is not
 -                very robust: for example, only one category can do
 -                this hack.
 -
 -                FIXME: this might be better handled by an extra Spec
 category
 -                """
 -                from sage.schemes.generic.homset import SchemeHomset
 -                return SchemeHomset(R, S, category=category)


  #############################################################
 }}}

 So, what tickect changed
 `sage.schemes.generic.homset.SchemeHomset_points_spec` into
 `sage.schemes.affine.affine_homset.SchemeHomset_points_spec`?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12876#comment:126>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to