Module: sage.categories.category
Categories
Author: 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
belongs. If
is a category and
is any object,
tries to make an object in
from
.
We create a couple of categories.
sage: Sets() Category of sets sage: GSets(AbelianGroup([2,4,9])) Category of G-sets for Multiplicative Abelian Group isomorphic to C2 x C4 x C9 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
of an objects
is the
category of all objects of
. 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
Module-level Functions
x) |
Returns True if x is a category.
See About this document... for information on suggesting changes.