#11935: Make parent/element classes independent of base rings
-----------------------------------------------------------------+----------
       Reporter:  SimonKing                                      |         
Owner:              
           Type:  enhancement                                    |        
Status:  needs_review
       Priority:  major                                          |     
Milestone:  sage-5.0    
      Component:  categories                                     |    
Resolution:              
       Keywords:  parent class, element class, category          |   Work 
issues:              
Report Upstream:  N/A                                            |     
Reviewers:              
        Authors:  Simon King                                     |     Merged 
in:              
   Dependencies:  #9138, #11900, #11943, #12875, #12876, #12877  |      
Stopgaps:              
-----------------------------------------------------------------+----------

Comment (by nthiery):

 Replying to [comment:55 SimonKing]:
 > I was thinking of that, too. But it would only work if we rely on
 > the assumption that the list of super_categories of a category with
 > base ''only'' depends on the category of the base. Can we?

 I am indeed not sure about making that assumption for any
 Category_over_base (it is not clearly defined what a base is!). On the
 other hand, this seems quite reasonable to me for
 Category_over_base_ring. This makes e.g. Algebras(...) consistent with
 the other functorial constructions categories which depend only on the
 base category.

 This also goes in the direction of what we had discussed that we could
 actually make Algebras(...) be a functorial construction, so that we
 could define C=Algebras(Fields()), and have Algebras(R) be basically
 an alias for C for every field. And similarly for
 PolynomialRings(Fields()), ...

 Note that we could possibly change this ticket to leave
 Category_over_base alone, and have only Category_over_base_ring derive
 from CategoryWithParameters. Do you foresee examples of a plain
 Category_over_base where sharing parent classes would be important
 performance wise?

 > Then, to the very least, that assumption must be clearly stated
 > somewhere.

 YES

 > > For our typical benchmark:
 > > {{{
 > > %time L = EllipticCurve('960d1').prove_BSD()
 > > }}}
 > > the time on my machine goes from 4s down to 3.5s. With the subcategory
 patch, the times goes down from 7s to 3.75s. This makes the subcategory
 patch acceptable.
 >
 > I am a bit confused. What is the "subcategory patch"?

 I meant #12895.

 > And what patches are applied for the four different timings?

 With and without share_on_base_category and with and without #12895.

 Cheers,
                                 Nicolas

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