id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
12876 Fix element and parent classes of Hom categories to be abstract, and simplify the Hom logic. nthiery nthiery "This patch fixes the parent and element classes for Hom categories to
be purely abstract, and simplifies the Hom logic:
- Unified the logic for selecting the class when building a Homset
(e.g. Homset, RingHomset, HeckeModuleHomspace, ...). This is now
systematically done through the _Hom_ hook. The logic still has a
fundamental flaw, but that's for the later #10668.
- The cache for Hom is handled at a single point in Hom
In particular, homsets created via the _Hom_ hook are now unique.
- If category is None, Hom simply calls itself with the meet of the
categories of the parent, which removes a cache handling duplication
in the code
- Parent.Hom calls Hom directly (removes duplicate _Hom_ logic).
- ParentWithBase.Hom was redundant and is gone.
- Reduce the footprint of the current trick to delegate
Hom(F,F)(on_basis=...) to module_morphism, allow for the diagonal
option too, an make sure the homset category is set properly.
- Update a doctest in sage.modules.vector_space_homspace to take into
account that homsets created via _Hom_ are now unique.
- Scheme is (apparently) an abstract base class; so it should not be
instantiated. I changed some doctests in
sage.schemes.generic.SchemeMorphism to use instead the concrete
Spec(ZZ). Those doctests were breaking because Scheme does not
implement equality, which is required for Hom caching.
As a byproduct, the HeckeModules category does not import any more
HeckeModulesHomspace, which was a recurrent source of import loops.
#11935 depends on this ticket
Apply:
* [attachment:trac_12876_category_abstract_classes_for_hom.patch]
" enhancement closed major sage-5.11 categories fixed categories, Hom sage-combinat SimonKing sage-5.11.beta0 Nicolas M. Thiéry Simon King N/A #715, #11521, #12215, #12313, #13412, #13145, #14159, #13184, #14287, #14217