Specific category classes¶
This is placed in a separate file from categories.py to avoid circular imports (as morphisms must be very low in the hierarchy with the new coercion model).
-
class
sage.categories.category_types.AbelianCategory(s=None)¶ Bases:
sage.categories.category.CategoryInitializes this category.
EXAMPLES:
sage: class SemiprimitiveRings(Category): ....: def super_categories(self): ....: return [Rings()] ....: ....: class ParentMethods: ....: def jacobson_radical(self): ....: return self.ideal(0) ....: sage: C = SemiprimitiveRings() sage: C Category of semiprimitive rings sage: C.__class__ <class '__main__.SemiprimitiveRings_with_category'>
Note
Specifying the name of this category by passing a string is deprecated. If the default name (built from the name of the class) is not adequate, please use
_repr_object_names()to customize it.-
is_abelian()¶
-
-
class
sage.categories.category_types.Category_ideal(ambient, name=None)¶ Bases:
sage.categories.category_types.Category_in_ambient-
classmethod
an_instance()¶ Returns an instance of this class
EXAMPLES:
sage: AlgebraIdeals.an_instance() Category of algebra ideals in Univariate Polynomial Ring in x over Rational Field
-
ring()¶
-
classmethod
-
class
sage.categories.category_types.Category_in_ambient(ambient, name=None)¶ Bases:
sage.categories.category.Category-
ambient()¶ Return the ambient object in which objects of this category are embedded.
-
-
class
sage.categories.category_types.Category_module(base, name=None)¶ Bases:
sage.categories.category_types.AbelianCategory,sage.categories.category_types.Category_over_base_ringInitialize
self.EXAMPLES:
sage: C = Algebras(GF(2)); C Category of algebras over Finite Field of size 2 sage: TestSuite(C).run()
-
class
sage.categories.category_types.Category_over_base(base, name=None)¶ Bases:
sage.categories.category.CategoryWithParametersA base class for categories over some base object
INPUT:
base– a category \(C\) or an object of such a category
Assumption: the classes for the parents, elements, morphisms, of
selfshould only depend on \(C\). See trac ticket #11935 for details.EXAMPLES:
sage: Algebras(GF(2)).element_class is Algebras(GF(3)).element_class True sage: C = GF(2).category() sage: Algebras(GF(2)).parent_class is Algebras(C).parent_class True sage: C = ZZ.category() sage: Algebras(ZZ).element_class is Algebras(C).element_class True
-
classmethod
an_instance()¶ Returns an instance of this class
EXAMPLES:
sage: Algebras.an_instance() Category of algebras over Rational Field
-
base()¶ Return the base over which elements of this category are defined.
-
class
sage.categories.category_types.Category_over_base_ring(base, name=None)¶ Bases:
sage.categories.category_types.Category_over_baseInitialize
self.EXAMPLES:
sage: C = Algebras(GF(2)); C Category of algebras over Finite Field of size 2 sage: TestSuite(C).run()
-
base_ring()¶ Return the base ring over which elements of this category are defined.
EXAMPLES:
sage: C = Algebras(GF(2)) sage: C.base_ring() Finite Field of size 2
-
-
class
sage.categories.category_types.ChainComplexes(base, name=None)¶ Bases:
sage.categories.category_types.Category_moduleThe category of all chain complexes over a base ring.
EXAMPLES:
sage: ChainComplexes(RationalField()) Category of chain complexes over Rational Field sage: ChainComplexes(Integers(9)) Category of chain complexes over Ring of integers modulo 9
-
super_categories()¶ EXAMPLES:
sage: ChainComplexes(Integers(9)).super_categories() [Category of modules over Ring of integers modulo 9]
-
-
class
sage.categories.category_types.Elements(object)¶ Bases:
sage.categories.category.CategoryThe category of all elements of a given parent.
EXAMPLES:
sage: a = IntegerRing()(5) sage: C = a.category(); C Category of elements of Integer Ring sage: a in C True sage: 2/3 in C False sage: loads(C.dumps()) == C True
-
classmethod
an_instance()¶ Returns an instance of this class
EXAMPLES:
sage: Elements(ZZ) Category of elements of Integer Ring
-
object()¶
-
super_categories()¶ EXAMPLES:
sage: Elements(ZZ).super_categories() [Category of objects]
Todo
Check that this is what we want.
-
classmethod