#11900: Serious regression caused by #9138
-----------------------------------------------------------------+----------
   Reporter:  SimonKing                                          |          
Owner:  tbd                  
       Type:  defect                                             |         
Status:  needs_work           
   Priority:  major                                              |      
Milestone:  sage-4.7.3           
  Component:  performance                                        |       
Keywords:  categories regression
Work_issues:  fiy doctests, fix categories for polynomial rings  |       
Upstream:  N/A                  
   Reviewer:                                                     |         
Author:  Simon King           
     Merged:                                                     |   
Dependencies:  #9138                
-----------------------------------------------------------------+----------

Comment(by SimonKing):

 In order to keep patches small, my plan is to provide two patches. The
 first will be an update of the "polynomial categories and coercion" patch.
 The second shall deal with parent/element classes of categories, which is
 a separate issue.

 '''Concerning the "polynomial categories and coercion":'''

 __Choice of category__

 Replying to [comment:37 SimonKing]:
 > I suggest to add a function somewhere (perhaps in
 sage/rings/polynomial/multi_polynomial_ring.py) that takes the category of
 the base ring and the number of generators as arguments, and returns the
 appropriate category of the polynomial ring.

 That seems to work fine. Since I directly construct a `JoinCategory`
 rather than calling `Category.join`, it is a little faster, and it is
 certainly easier to maintain than the current approach.

 __Easier detection of ring structures__

 Currently, if one wants to test whether a parent is a Euclidean domain,
 one has to do `P in EuclideanDomains()`, which boils down to
 `P.category().is_subcategory(EuclideanDomains())`. That implies the
 construction of all super-categories of `P.category()` and is thus rather
 slow.

 I guess it would be ''much'' faster to add parent methods that tell
 whether the ring has a certain structure, and to simply ask
 `P.is_euclidean_domain()`.

 Similar parent methods should exist for `Fields()`, `Rings()`,
 `CommutativeRings()` and `IntegralDomains()`.

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