Functors

AUTHORS:

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

Construct the forgetful function from one category to another.

EXAMPLES:

sage: rings = Rings()
sage: abgrps = CommutativeAdditiveGroups()
sage: F = ForgetfulFunctor(rings, abgrps)
sage: F
The forgetful functor from Category of rings to Category of commutative additive groups
class sage.categories.functor.ForgetfulFunctor_generic
Bases: sage.categories.functor.Functor
class sage.categories.functor.Functor

Bases: sage.structure.sage_object.SageObject

EXAMPLES:

sage: rings  = Rings()
sage: abgrps = CommutativeAdditiveGroups()
sage: F = ForgetfulFunctor(rings, abgrps)
sage: F.domain()
Category of rings
sage: F.codomain()
Category of commutative additive groups
sage: from sage.categories.functor import is_Functor
sage: is_Functor(F)
True
sage: I = IdentityFunctor(abgrps)
sage: I
The identity functor on Category of commutative additive groups
sage: I.domain()
Category of commutative additive groups
sage: is_Functor(I)
True
codomain()
domain()
sage.categories.functor.IdentityFunctor(C)
class sage.categories.functor.IdentityFunctor_generic
Bases: sage.categories.functor.ForgetfulFunctor_generic
sage.categories.functor.is_Functor(x)

Previous topic

Morphisms

Next topic

Covariant Functorial Constructions

This Page