Module: sage.categories.functor
Author Log:
Module-level Functions
domain, codomain) |
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
x) |
Class: ForgetfulFunctor_generic
Special Functions: __cmp__,
__reduce__,
__repr__,
_apply_functor
self) |
sage: F = ForgetfulFunctor(Groups(), Sets()) sage: loads(F.dumps()) == F True
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
self, domain, codomain) |
Functions: codomain,
domain
Special Functions: __call__,
__repr__
Class: IdentityFunctor
self, C) |
Special Functions: __call__,
__reduce__,
__repr__,
_apply_functor
self) |
sage: F = IdentityFunctor(Groups()) sage: loads(F.dumps()) == F True
See About this document... for information on suggesting changes.