Changes between Version 19 and Version 22 of Ticket #10668
 Timestamp:
 06/22/14 22:24:50 (8 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Ticket #10668

Property
Status
changed from
new
toneeds_review

Property
Commit
changed from
to
ad87027e6ad2cabfc1bdaab2de061374403c9939

Property
Branch
changed from
to
u/nthiery/categories/morphismmethods10668

Property
Status
changed from

Ticket #10668 – Description
v19 v22 1 Hom is currently implemented as a covariant functorial 2 construction: 1 Before this ticket, Hom was implemented as a covariant functorial construction: 3 2 4 3 {{{ … … 22 21 morphisms, and still get that huge chunk of category code done. 23 22 24 Here are some thoughts for a properimplementation:23 Status of the current reimplementation: 25 24 26 27 28 29 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: 30 29 31 32 33 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). 34 33 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`. 37 38 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, ... 40 41 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 52 Potential further desirable features for a later ticket: 48 53 49 54  If CatA is a subcategory of CatB, add automatic coercion (or just 50 55 conversion?) from Hom(A,B, CatA) to Hom(A, B, CatB), modeling the 51 56 appropriate forgetful functor. There are too many such coercions 52 for them to be registered explicitly. So this probably need to be57 for them to be registered explicitly. So this probably needs to be 53 58 implemented through a specific CatB._has_coerce_map_from(A) for 54 59 homsets. … … 57 62 arithmetic (e.g. having the sum of an algebra morphism and a 58 63 coalgebra morphism return a vector space morphism). 59 60  Remove HomCategory from the global namespace61 62  Possibly: rename both HomCategory and hom_category to Homsets.63 This would be consistent with CartesianProducts, ...