Functors

AUTHORS:

  • David Kohel and William Stein
  • David Joyner (2005-12-17): examples
  • Robert Bradshaw (2007-06-23): Pyrexify
sage.categories.functor.ForgetfulFunctor()

Construct the forgetful function from one category to another.

EXAMPLES:

sage: rings = Rings()
sage: abgrps = AbelianGroups()
sage: F = ForgetfulFunctor(rings, abgrps)
sage: F
The forgetful functor from Rings to AbelianGroups
class sage.categories.functor.ForgetfulFunctor_generic
__cmp__()
__reduce__()

EXAMPLES:

sage: F = ForgetfulFunctor(Groups(), Sets())
sage: loads(F.dumps()) == F
True
__repr__()
__weakref__
list of weak references to the object (if defined)
_apply_functor()
class sage.categories.functor.Functor

EXAMPLES:

sage: rings  = Rings()
sage: abgrps = AbelianGroups()
sage: F = ForgetfulFunctor(rings, abgrps)
sage: F.domain()
Category of rings
sage: F.codomain()
Category of abelian groups
sage: from sage.categories.functor import is_Functor
sage: is_Functor(F)
True
sage: I = IdentityFunctor(abgrps)
sage: I
The identity functor on AbelianGroups
sage: I.domain()
Category of abelian groups
sage: is_Functor(I)
True
__call__()
__init__()
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
static __new__()
T.__new__(S, ...) -> a new object with type S, a subtype of T
__repr__()
codomain()
domain()
sage.categories.functor.IdentityFunctor()
class sage.categories.functor.IdentityFunctor_generic
__call__()
__init__()
__reduce__()

EXAMPLES:

sage: F = IdentityFunctor(Groups())
sage: loads(F.dumps()) == F
True
__repr__()
_apply_functor()
sage.categories.functor.is_Functor()

Previous topic

Morphisms

Next topic

Monoids

This Page