20.4 Functors

Module: sage.categories.functor

Functors

Author: - David Kohel and William Stein - David Joyner (2005-12-17): examples - Robert Bradshaw (2007-06-23): Pyrexify

Module-level Functions

ForgetfulFunctor( )

Construct the forgetful function from one category to another.

sage: rings = Rings()
sage: abgrps = AbelianGroups()
sage: F = ForgetfulFunctor(rings, abgrps)
sage: F
The forgetful functor from Rings to AbelianGroups

IdentityFunctor( )

is_Functor( )

Class: ForgetfulFunctor_generic

class ForgetfulFunctor_generic

Special Functions: __cmp__,$ \,$ __reduce__,$ \,$ __repr__,$ \,$ _apply_functor

__cmp__( )

__reduce__( )

sage: F = ForgetfulFunctor(Groups(), Sets())
sage: loads(F.dumps()) == F
True

__repr__( )

_apply_functor( )

Class: Functor

class Functor

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

Functions: codomain,$ \,$ domain

Special Functions: __call__,$ \,$ __init__,$ \,$ __repr__

__call__( )

__repr__( )

Class: IdentityFunctor_generic

class IdentityFunctor_generic

Special Functions: __call__,$ \,$ __init__,$ \,$ __reduce__,$ \,$ __repr__,$ \,$ _apply_functor

__call__( )

__init__( )

__reduce__( )

sage: F = IdentityFunctor(Groups())
sage: loads(F.dumps()) == F
True

__repr__( )

_apply_functor( )

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