Changes between Initial Version and Version 2 of Ticket #10668

01/21/11 15:26:00 (11 years ago)

Replying to SimonKing:

Replying to nthiery:

The intention was to model the fact that a morphism in a category is also a morphism in any super category, via the forgetful functor. With the example above, if A and B are rings, then a ring morphism phi: A->B is also a set morphism. However, at the level of parents, and as noted in the documentation of sage.category.HomCategory?, this is mathematically plain wrong: if A and B are rings, then Hom(A,B) in the category of rings does not coincide with Hom(A,B) in the category of sets.

I don't see why this should be wrong: Any ring homomorphism is a set homomorphism. Hence, Hom_Rings()(A,B) is a subset of Hom_Sets()(A,B) -- nobody claims that they coincide.

Very short answer for now: here the question is whether Hom_Rings()(A,B) is an object of Hom_Sets(). It's not. The point of VectorSpaces?().HomCategory?() is to encode mathematical information about the homsets, like the fact that Hom(A,B) is itself a vector space. We don't want this information to be applied to a homset of a subcategory (a homset in Algebras() being certainly not a vector space).


  • Ticket #10668 – Description

    initial v2  
    2626 - Add support for a HomMethods subclass, similar to ElementMethods
    27    and ParentMethods. If Cat is a category, then Cat.ElementMethods
     27   and ParentMethods. If Cat is a category, then Cat.HomMethods
    2828   will provide generic methods for morphisms in Cat and any
    2929   subcategory. This will require to implement the building of a