4.1.1 categories.categories - Categories

AUTHORS: David Kohel and William Stein

Every SAGE object lies in a category. Categories in SAGE are modeled on the mathematical idea of category, and are distinct from Python classes, which are a programming construct.

In most cases, typing x.category() returns the category to which $ x$ belongs. If $ C$ is a category and $ x$ is any object, $ C(x)$ tries to make an object in $ C$ from $ x$ .

We create a couple of categories.

sage: Sets()
Category of sets
sage: GSets()
Category of G-sets
sage: Semigroups()
Category of semigroups
sage: VectorSpaces(FiniteField(11))
Category of vector spaces over Finite field of size 11
sage: Ideals(IntegerRing())
Category of ring ideals in Integer Ring

The default category for elements $ x$ of an objects $ O$ is the category of all objects of $ O$ . For example,

sage: V = VectorSpace(RationalField(), 3)
sage: x = V.gen(1)
sage: x.category()
Category of elements of Vector space of dimension 3 over Rational Field

The module categories.categories defines the following methods:

is_Category( x)

Returns True if x is a category.

The module categories.categories defines the following classes:

class AbelianCategory

class AbelianGroups
The category of all abelian groups.

class AbelianMonoids
The category of all monoids.

class AbelianSemigroups
The category of all abelian semigroups.

class AlgebraIdeals
The category of ideals in a fixed algebra $ A$ .

class AlgebraModules
The category of modules over a fixed algebra $ A$ .

class Algebras
The category of algebras over a fixed base ring.

class Category_ideal

class CommutativeAlgebraIdeals
The category of ideals in a fixed commutative algebra $ A$ .

class CommutativeAlgebras
The category of commutative algebras over a given base ring.

class CommutativeRingIdeals
The category of ideals in a fixed commutative ring.

class CommutativeRings
The category of commutative rings.

class Elements
The category of all elements of a given object.

class Fields
The category of fields.

class FiniteFields
The category of all finite fields.

class FreeModules
The category of free modules over a base ring.

class GroupAlgebras
EXAMPLES: sage: GroupAlgebras(IntegerRing()) Category of group algebras over Integer Ring

class Groups
The category of groups.

class GSets
The category of $ G$ -sets, for a group $ G$ .

class HeckeModules
The category of Hecke modules.

class Ideals
The category of all ideals in a fixed ring.

class MatrixAlgebras
The category of matrix algebras over a field.

class Modules
The category of all modules over a base ring.

class MonoidAlgebras
The category of all monoid algebras over a given base ring.

class Monoids
The category of monoids.

class NumberFields
The category of number fields.

class Objects
The category of all SAGE objects.

class RingIdeals
The category of all ideals in a fixed ring.

class RingModules
The category of all modules over a base ring.

class Rings
The category of all rings.

class Semigroups
The category of all semigroups.

class Sets
The category of sets.

class VectorSpaces
The category of vector spaces over a specified field, with an emedding in an ambient vector space.



Subsections
See About this document... for information on suggesting changes.