#10963: Axioms and more functorial constructions
-------------------------------------+-------------------------------------
Reporter: nthiery | Owner: stumpc5
Type: enhancement | Status: needs_info
Priority: major | Milestone: sage-6.2
Component: categories | Resolution:
Keywords: days54 | Merged in:
Authors: Nicolas M. Thiéry | Reviewers: Simon King, Frédéric
Report Upstream: N/A | Chapoton
Branch: | Work issues: merge with #15801
public/ticket/10963-doc- | once things stabilize
distributive | Commit:
Dependencies: #11224, #8327, | 268345f966b19589088e9b0dc84f183e4f45f545
#10193, #12895, #14516, #14722, | Stopgaps:
#13589, #14471, #15069, #15094, |
#11688, #13394, #15150, #15506, |
#15757, #15759, #15919 |
-------------------------------------+-------------------------------------
Comment (by SimonKing):
Replying to [comment:634 nbruin]:
> > - `sage.structure.CategoryObject` has a method `_refine_category_()`
whose job is exactly to place the object into what we currently call a
subcategory, but what I propose to call refinement.
>
> That's actually a rather bad example. This method mutates category
objects, which are hashable and hence are supposed to be immutable.
`_refine_category_()` is not meant to mutate an object. And in fact it
only does if hash and/or comparison depend on, say, the type of the object
or of course on the category. But I think it is a bug (and even a punch in
Python's face) to make comparison depend on the type of an object.
`_refine_category_()` is not to blame for such bugs.
But it is a bad example for a different reason: I think
`_refine_category_` should only be used for changing the category to a
sub-category '''in the mathematical sense of the word'''. I think using it
to refine an object of `Sets()` to an object of `Groups()` would be wrong!
And I even think it should only be used on a ''full'' sub-category. This
is since coercions are cached, and coercion maps are supposed to be
morphisms: Suppose you have objects O1 and O2 belonging to a category C,
and there is a coercion phi from O1 to O2 in category C. If you then
refine to a non-full sub-category D, then it could be that phi is ''not''
a morphism in D. Hence, it would not be a coercion any longer.
So, as soon as we have a working framework for full subcategories versus
subcategories versus "refinements", `_refine_category_()` is one of the
first applications. And I agree that then a name change will be needed.
Suggestion: `_interprete_in_full_subcategory_()`.
--
Ticket URL: <http://trac.sagemath.org/ticket/10963#comment:635>
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.