Changes between Version 19 and Version 22 of Ticket #10668


Ignore:
Timestamp:
06/22/14 22:24:50 (8 years ago)
Author:
nthiery
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10668

    • Property Status changed from new to needs_review
    • Property Commit changed from to ad87027e6ad2cabfc1bdaab2de061374403c9939
    • Property Branch changed from to u/nthiery/categories/morphism-methods-10668
  • Ticket #10668 – Description

    v19 v22  
    1 Hom is currently implemented as a covariant functorial
    2 construction:
     1Before this ticket, Hom was implemented as a covariant functorial construction:
    32
    43{{{
     
    2221morphisms, and still get that huge chunk of category code done.
    2322
    24 Here are some thoughts for a proper implementation:
     23Status of the current reimplementation:
    2524
    26  - Add support for a MorphismsMethods subclass, similar to
    27    ElementMethods and ParentMethods. If Cat is a category, then
    28    Cat.MorphismMethods will provide generic methods for morphisms in
    29    Cat and in any subcategory. This can be achieved by:
     25- Add support for a MorphismsMethods subclass, similar to
     26  ElementMethods and ParentMethods. If Cat is a category, then
     27  Cat.MorphismMethods will provide generic methods for morphisms in
     28  Cat and in any subcategory. This can be achieved by:
    3029
    31     - Building of a hierarchy of abstract classes Cat.morphism_class,
    32       similar to Cat.element_class and Cat.parent_class (10 lines of
    33       code; see Category.element_class).
     30   - Building of a hierarchy of abstract classes Cat.morphism_class,
     31     similar to Cat.element_class and Cat.parent_class (10 lines of
     32     code; see Category.element_class).
    3433
    35     - Having morphisms in Cat inherit from Cat.morphism_class. This
    36       can be achieved by overiding either:
     34   - Having morphisms in Cat inherit from `Cat.morphism_class`; this
     35     is implemented by overriding `Parent.morphism_class`. An
     36     alternative would have been to override `Category.element_class`
     37     in `HomsetsCategory.element_class`.
    3738
    38        - Parent.element_class in Homset.element_class
    39        - Category.element_class in HomCategory.element_class (my preferred choice at this point)
     39- Rename both HomCategory and hom_category to Homsets, for consistency
     40  with the other constructions like CartesianProducts, ...
    4041
    41  - Fix HomCategory. For Cat a category, the purpose of
    42    Cat.hom_category() shall be to provide mathematical information
    43    about its homsets (e.g. that a homset in the category of vector
    44    spaces is also a vector space). It should ignore the super
    45    categories of C in general, except if is a full subcategory (a
    46    homset in the category of finite groups is also a homset in the
    47    category of groups).
     42- Fix HomCategory: for Cat a category, the purpose of
     43  Cat.hom_category() shall be to provide mathematical information
     44  about its homsets (e.g. that a homset in the category of vector
     45  spaces is also a vector space). It is only a subcategory of the
     46  homsets of the full super categories of Cat (a homset in the
     47  category of finite groups is also a homset in the category of
     48  groups).
     49
     50- Remove HomCategory from the global namespace.
     51
     52Potential further desirable features for a later ticket:
    4853
    4954 - If CatA is a subcategory of CatB, add automatic coercion (or just
    5055   conversion?) from Hom(A,B, CatA) to Hom(A, B, CatB), modeling the
    5156   appropriate forgetful functor. There are too many such coercions
    52    for them to be registered explicitly. So this probably need to be
     57   for them to be registered explicitly. So this probably needs to be
    5358   implemented through a specific CatB._has_coerce_map_from(A) for
    5459   homsets.
     
    5762   arithmetic (e.g. having the sum of an algebra morphism and a
    5863   coalgebra morphism return a vector space morphism).
    59 
    60  - Remove HomCategory from the global namespace
    61 
    62  - Possibly: rename both HomCategory and hom_category to Homsets.
    63    This would be consistent with CartesianProducts, ...