Objects¶
-
class
sage.categories.objects.
Objects
(s=None)¶ Bases:
sage.categories.category_singleton.Category_singleton
The category of all objects the basic category
EXAMPLES:
sage: Objects() Category of objects sage: Objects().super_categories() []
TESTS:
sage: TestSuite(Objects()).run()
-
class
ParentMethods
¶ Methods for all category objects
-
class
Objects.
SubcategoryMethods
¶ -
Endsets
()¶ Return the category of endsets between objects of this category.
EXAMPLES:
sage: Sets().Endsets() Category of endsets of sets sage: Rings().Endsets() Category of endsets of unital magmas and additive unital additive magmas
See also
-
Homsets
()¶ Return the category of homsets between objects of this category.
EXAMPLES:
sage: Sets().Homsets() Category of homsets of sets sage: Rings().Homsets() Category of homsets of unital magmas and additive unital additive magmas
This used to be called
hom_category
:sage: Sets().hom_category() doctest:...: DeprecationWarning: hom_category is deprecated. Please use Homsets instead. See http://trac.sagemath.org/10668 for details. Category of homsets of sets
Note
Background
Information, code, documentation, and tests about the category of homsets of a category
Cs
should go in the nested classCs.Homsets
. They will then be made available to homsets of any subcategory ofCs
.Assume, for example, that homsets of
Cs
areCs
themselves. This information can be implemented in the methodCs.Homsets.extra_super_categories
to makeCs.Homsets()
a subcategory ofCs()
.Methods about the homsets themselves should go in the nested class
Cs.Homsets.ParentMethods
.Methods about the morphisms can go in the nested class
Cs.Homsets.ElementMethods
. However it’s generally preferable to put them in the nested classCs.MorphimMethods
; indeed they will then apply to morphisms of all subcategories ofCs
, and not only full subcategories.See also
FunctorialConstruction
Todo
- Design a mechanism to specify that an axiom is
compatible with taking subsets. Examples:
Finite
,Associative
,Commutative
(when meaningful), but notInfinite
norUnital
. - Design a mechanism to specify that, when \(B\) is a subcategory of \(A\), a \(B\)-homset is a subset of the corresponding \(A\) homset. And use it to recover all the relevant axioms from homsets in super categories.
- For instances of redundant code due to this missing
feature, see:
AdditiveMonoids.Homsets.extra_super_categories()
HomsetsCategory.extra_super_categories()
(slightly different nature)- plus plenty of spots where this is not implemented.
- Design a mechanism to specify that an axiom is
compatible with taking subsets. Examples:
-
hom_category
(*args, **kwds)¶ Deprecated: Use
Homsets()
instead. See trac ticket #10668 for details.
-
-
Objects.
additional_structure
()¶ Return
None
Indeed, by convention, the category of objects defines no additional structure.
See also
EXAMPLES:
sage: Objects().additional_structure()
-
Objects.
super_categories
()¶ EXAMPLES:
sage: Objects().super_categories() []
-
class