#11935: Make parent/element classes independent of base rings
----------------------------------------------------------+-----------------
       Reporter:  SimonKing                               |         Owner:      
        
           Type:  enhancement                             |        Status:  
needs_review
       Priority:  major                                   |     Milestone:  
sage-5.10   
      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,  #12877  |      Stopgaps:      
        
----------------------------------------------------------+-----------------
Description changed by nthiery:

Old description:

> At #11900 and [http://groups.google.com/group/sage-combinat-
> devel/browse_thread/thread/99c74827d704e677 sage-combinat-devel], as well
> as in some comments in sage/categories/category.py, the idea was
> discussed to make, for example,
> `Algebras(GF(3)).parent_class==Algebras(GF(5)).parent_class` - hence,
> make the parent/element classes as independent from the base of a
> category as possible.
>
> This is implemented in this patch by introducing an abstract class
> CategoryWithParameters which uses pickling by "weak construction" for
> its element and parent classes. In the process, this patch also:
>
> - Adds a method Category._make_named_class providing a unified way to
>   create parent and element classes (and later on morphism classes)
> - Extends the interface of dynamic_class to customize caching and
> pickling
>

>
> __Apply__
>
>  * [attachment:trac11935_weak_pickling_by_construction_rel11943-nt.patch]

New description:

 At #11900 and [http://groups.google.com/group/sage-combinat-
 devel/browse_thread/thread/99c74827d704e677 sage-combinat-devel], as well
 as in some comments in sage/categories/category.py, the idea was discussed
 to make, for example,
 `Algebras(GF(3)).parent_class==Algebras(GF(5)).parent_class` - hence, make
 the parent/element classes as independent from the base of a category as
 possible.

 This is implemented in this patch by introducing an abstract class
 CategoryWithParameters which uses pickling by "weak construction" for
 its element and parent classes. Now:

 - For a join category, the parent/element class depend only on the
   parent/element class of its super categories.
 - For a Category_over_base (e.g. Modules, Algebras, Schemes, ...), the
   parent/element class depend only on the category of the base.
 - For a bimodule, the parent/element class depend only on the category
   of the left and right bases.

 In the process, this patch also:

 - Adds a method Category._make_named_class providing a unified way to
   create parent and element classes (and later on morphism classes)
 - Extends the interface of dynamic_class to customize caching and pickling
 - Rename the experimental class IdempotentSemigroups.ElementMethods
   and remove its super class, and discards unused code there.


 __Apply__

  * [attachment:trac11935_weak_pickling_by_construction-nt.patch]

--

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