#17364: Homset categories should be subcategories of the category of all homsets
-------------------------------------+-------------------------------------
       Reporter:  nthiery            |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.5
      Component:  categories         |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Nicolas M. ThiƩry  |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  
u/nthiery/all_homsets_category_should_be_subcategories_of_the_category_of_all_homsets|
  0925390c0d1eacabd75bb24c815d30124c8e8a2b
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Old description:

> All homsets category should be subcategories of the category of all
> homsets. For example, we want:
> {{{
> sage: from sage.categories.homsets import Homsets
> sage: Schemes().Homsets().is_subcategory(Homsets())
> True
> sage: AdditiveMagmas().Homsets().is_subcategory(Homsets())
> True
> sage:
> AdditiveMagmas().AdditiveUnital().Homsets().is_subcategory(Homsets())
> True
> }}}
>
> The inheritance of an homset category ``C.Homsets()`` from
> ``Homsets()`` used to be implemented in
> ``HomsetsCategory.extra_super_categories``; this meant that any custom
> implementation of ``C.Homsets.extra_super_categories`` would overwrite
> it, which broke all the above examples.
>
> This ticket fixes this, and uses the occasion to refactor the logic,
> getting rid along the way of the custom ``category_of`` method which
> almost duplicated that of functorial constructions. Hopefully the
> logic and its the documentation, are clearer now.

New description:

 All homset categories should be subcategories of the category of all
 homsets. For example, we want:
 {{{
 sage: from sage.categories.homsets import Homsets
 sage: Schemes().Homsets().is_subcategory(Homsets())
 True
 sage: AdditiveMagmas().Homsets().is_subcategory(Homsets())
 True
 sage:
 AdditiveMagmas().AdditiveUnital().Homsets().is_subcategory(Homsets())
 True
 }}}

 The inheritance of a homset category `C.Homsets()` from `Homsets()` used
 to be implemented in `HomsetsCategory.extra_super_categories`; this meant
 that any custom implementation of `C.Homsets.extra_super_categories` would
 overwrite it, which broke all the above examples.

 This ticket fixes this, and uses the occasion to refactor the logic,
 getting rid along the way of the custom `category_of` method which almost
 duplicated that of functorial constructions. Hopefully the logic and its
 documentation are clearer now.

--

Comment (by pbruin):

 (just fixing some typos in the description and summary)

 Replying to [comment:4 nthiery]:
 > There remains one thing: what to do with `Schemes.Homsets` and
 `HeckeModules.Homsets`? Probably fine as they are without
 `extra_super_categories`. My tiny changes there are likely to conflict
 with those in #17359. Please take over, and feel free too edit that part,
 and make either ticket depend on the other.
 In that case I propose using #17359 to finish the two `TODO` items from
 this ticket (for Hecke modules and schemes).

--
Ticket URL: <http://trac.sagemath.org/ticket/17364#comment:6>
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to