Package sage :: Package categories :: Module category
[hide private]
[frames] | no frames]

Module category

source code


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 \code{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$.

EXAMPLES:
    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 $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



Classes [hide private]
  Category
The base class for all categories.
  uniq
  uniq1
Functions [hide private]
 
is_Category(x)
Returns True if x is a category.
source code
Variables [hide private]
  __doc_exclude = ['k', 'uniq', 'uniq1', 'latex', 'Category', 'C...
  cache = {<class 'sage.categories.category_types.Objects'>: Cat...
  cache1 = {(<class 'sage.categories.category_types.Groupoid'>, ...
Variables Details [hide private]

__doc_exclude

Value:
['k',
 'uniq',
 'uniq1',
 'latex',
 'Category',
 'Category_ideal',
 'Category_in_ambient',
 'Category_module',
...

cache

Value:
{<class 'sage.categories.category_types.Objects'>: Category of objects\
,
 <class 'sage.categories.category_types.Sets'>: Category of sets,
 <class 'sage.categories.category_types.Groups'>: Category of groups,
 <class 'sage.categories.category_types.Rings'>: Category of rings,
 <class 'sage.categories.category_types.Fields'>: Category of fields,
 <class 'sage.categories.category_types.NumberFields'>: Category of nu\
mber fields,
...

cache1

Value:
{}