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.Category

Initializes this category.

INPUT:

  • s – (Default: None) A string giving the name of this category. If None, the name is determined from the name of the class.

EXAMPLES:

sage: class SemiprimitiveRings(Category):
...       def super_categories(self):
...           return [Rings()]
...
...       class ParentMethods:
...           def jacobson_radical(self):
...               return self.ideal(0)
...
sage: C = SemiprimitiveRings("SPR")
sage: C
Category of SPR
sage: C.__class__
<class '__main__.SemiprimitiveRings_with_category'>
is_abelian()

x.__init__(...) initializes x; see help(type(x)) for signature

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()

x.__init__(...) initializes x; see help(type(x)) for signature

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_ring

class sage.categories.category_types.Category_over_base(base, name=None)

Bases: sage.categories.category.CategoryWithParameters

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_base

base_ring()

Return the base ring over which elements of this category are defined.

class sage.categories.category_types.ChainComplexes(base, name=None)

Bases: sage.categories.category_types.Category_module

The 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

TESTS::

   sage: TestSuite(ChainComplexes(RationalField())).run()
super_categories()

EXAMPLES:

sage: ChainComplexes(Integers(9)).super_categories()
[Category of modules with basis over Ring of integers modulo 9]
class sage.categories.category_types.Elements(object)

Bases: sage.categories.category.Category

The 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()

x.__init__(...) initializes x; see help(type(x)) for signature

super_categories()

EXAMPLES:

sage: Elements(ZZ).super_categories()
[Category of objects]

TODO:

check that this is what we want.

class sage.categories.category_types.Sequences(object)

Bases: sage.categories.category.Category

The category of sequences of elements of a given object.

This category is deprecated.

EXAMPLES:

sage: v = Sequence([1,2,3]); v
[1, 2, 3]
sage: C = v.category(); C
Category of sequences in Integer Ring
sage: loads(C.dumps()) == C
True
sage: Sequences(ZZ) is C
True

True
sage: Sequences(ZZ).category()
Category of objects
classmethod an_instance()

Returns an instance of this class

EXAMPLES:

sage: Elements(ZZ)
Category of elements of Integer Ring
object()

x.__init__(...) initializes x; see help(type(x)) for signature

super_categories()

EXAMPLES:

sage: Sequences(ZZ).super_categories()
[Category of objects]
class sage.categories.category_types.SimplicialComplexes(s=None)

Bases: sage.categories.category.Category

The category of simplicial complexes.

EXAMPLES:

sage: SimplicialComplexes()
Category of simplicial complexes

TESTS:

sage: TestSuite(SimplicialComplexes()).run()
super_categories()

EXAMPLES:

sage: SimplicialComplexes().super_categories()
[Category of objects]

Previous topic

Categories

Next topic

Base class for maps

This Page