Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

2 Category of Categories
 2.1 The Category Cat
 2.2 Categories
 2.3 Constructors
 2.4 Functors
 2.5 Natural transformations

2 Category of Categories

Categories itself with functors as morphisms form a category. So the data structure of CapCategorys is designed to be objects in a category. This category is implemented in CapCat. For every category, the corresponding object in Cat can be obtained via AsCatObject. The implemetation of the category of categories offers a data structure for functors. Those are implemented as morphisms in this category, so functors can be handled like morphisms in a category. Also convenience functions to install functors as methods are implemented (in order to avoid ApplyFunctor).

2.1 The Category Cat

2.1-1 CapCat
‣ CapCat( global variable )

This variable stores the category of categories. Every category object is constructed as an object in this category, so Cat is constructed when loading the package.

2.2 Categories

2.2-1 IsCapCategoryAsCatObject
‣ IsCapCategoryAsCatObject( object )( filter )

Returns: true or false

The GAP category of CAP categories seen as object in Cat.

2.2-2 IsCapFunctor
‣ IsCapFunctor( object )( filter )

Returns: true or false

The GAP category of functors.

2.2-3 IsCapNaturalTransformation
‣ IsCapNaturalTransformation( object )( filter )

Returns: true or false

The GAP category of natural transformations.

2.3 Constructors

2.3-1 AsCatObject
‣ AsCatObject( C )( attribute )

Given a CAP category C, this method returns the corresponding object in Cat. For technical reasons, the filter IsCapCategory must not imply the filter IsCapCategoryObject. For example, if InitialObject is applied to an object, it returns the initial object of its category. If it is applied to a category, it returns the initial object of the category. If a CAP category would be a category object itself, this would be ambiguous. So categories must be wrapped in a CatObject to be an object in Cat. This method returns the wrapper object. The category can be reobtained by AsCapCategory.

2.3-2 AsCapCategory
‣ AsCapCategory( C )( attribute )

For an object C in Cat, this method returns the underlying CAP category. This method is inverse to AsCatObject, i.e. AsCapCategory( AsCatObject( A ) ) = A.

2.4 Functors

Functors are morphisms in Cat, thus they have source and target which are categories. A multivariate functor can be constructed via a product category as source, a presheaf is constructed via the opposite category as source. Moreover, an object and a morphism function can be added to a functor, to apply it to objects or morphisms in the source category.

2.4-1 CapFunctor
‣ CapFunctor( name, A, B )( operation )
‣ CapFunctor( name, A, B )( operation )
‣ CapFunctor( name, A, B )( operation )
‣ CapFunctor( name, A, B )( operation )
‣ CapFunctor( name, A, B )( operation )
‣ CapFunctor( name, A, B )( operation )

These methods construct a CAP functor, i.e. a morphism in Cat. Name should be an unique name for the functor, it is also used when the functor is installed as a method. A and B are source and target. Both can be given as object in Cat or as category itself.

2.4-2 AddObjectFunction
‣ AddObjectFunction( functor, function )( operation )

This operation adds a function to the functor which can then be applied to objects in the source. The given function function has to take one argument which must be an object in the source category and should return a CapCategoryObject. The object is automatically added to the range of the functor when it is applied to the object.

2.4-3 FunctorObjectOperation
‣ FunctorObjectOperation( F )( attribute )

Returns: a GAP operation

The argument is a functor F. The output is the GAP operation realizing the action of F on objects.

2.4-4 AddMorphismFunction
‣ AddMorphismFunction( functor, function )( operation )

This operation adds a function to the functor which can then be applied to morphisms in the source. The given function function has to take three arguments A, \tau, B. When the funtor functor is applied to the morphism \tau, A is the result of functor applied to the source of \tau, B is the result of functor applied to the range.

2.4-5 FunctorMorphismOperation
‣ FunctorMorphismOperation( F )( attribute )

Returns: a GAP operation

The argument is a functor F. The output is the GAP operation realizing the action of F on morphisms.

2.4-6 ApplyFunctor
‣ ApplyFunctor( func, A )( function )

Returns: IsCapCategoryCell

Applies the functor func to the object or morphism A.

2.4-7 InstallFunctor
‣ InstallFunctor( functor, method_name )( operation )

TODO

2.4-8 IdentityFunctor
‣ IdentityFunctor( category )( attribute )

Returns: a functor

Returns the identity functor of the category cat viewed as an object in the category of categories.

2.4-9 FunctorCanonicalizeZeroObjects
‣ FunctorCanonicalizeZeroObjects( category )( attribute )

Returns: a functor

Returns the endofunctor of the category cat with zero which maps each (object isomorphic to the) zero object to ZeroObject(cat) and to itself otherwise. This functor is equivalent to the identity functor.

2.4-10 NaturalIsomorophismFromIdentityToCanonicalizeZeroObjects
‣ NaturalIsomorophismFromIdentityToCanonicalizeZeroObjects( category )( attribute )

Returns: a natural transformation

Returns the natural isomorphism from the identity functor to FunctorCanonicalizeZeroObjects(cat).

2.4-11 FunctorCanonicalizeZeroMorphisms
‣ FunctorCanonicalizeZeroMorphisms( category )( attribute )

Returns: a functor

Returns the endofunctor of the category cat with zero which maps each object to itself, each morphism ϕ to itself, unless it is congruent to the zero morphism; in this case it is mapped to ZeroMorphism(Source(ϕ), Range(ϕ)). This functor is equivalent to the identity functor.

2.4-12 NaturalIsomorophismFromIdentityToCanonicalizeZeroMorphisms
‣ NaturalIsomorophismFromIdentityToCanonicalizeZeroMorphisms( category )( attribute )

Returns: a natural transformation

Returns the natural isomorphism from the identity functor to FunctorCanonicalizeZeroMorphisms(cat).

2.5 Natural transformations

2.5-1 Name
‣ Name( arg )( attribute )

Returns: a string

As every functor, every natural transformation has a name attribute. It has to be a string and will be set by the Constructor.

2.5-2 NaturalTransformation
‣ NaturalTransformation( [name, ]F, G )( operation )

Returns: a natural transformation

Constructs a natural transformation between the functors F:A \rightarrow B and G:A \rightarrow B. The string name is optional, and, if not given, set automatically from the names of the functors

2.5-3 AddNaturalTransformationFunction
‣ AddNaturalTransformationFunction( N, func )( operation )

Adds the function (or list of functions) func to the natural transformation N. The function or each function in the list should take three arguments. If N: F \rightarrow G, the arguments should be F(A), A, G(A). The ouptput should be a morphism, F(A) \rightarrow G(A).

2.5-4 ApplyNaturalTransformation
‣ ApplyNaturalTransformation( N, A )( function )

Returns: a morphism

Given a natural transformation N:F \rightarrow G and an object A, this function should return the morphism F(A) \rightarrow G(A), corresponding to N.

2.5-5 InstallNaturalTransformation
‣ InstallNaturalTransformation( N, name )( operation )

Installs the natural transformation N as operation with the name name. Argument for this operation is an object, output is a morphism.

2.5-6 HorizontalPreComposeNaturalTransformationWithFunctor
‣ HorizontalPreComposeNaturalTransformationWithFunctor( N, F )( operation )

Returns: a natural transformation

Computes the horizontal composition of the natural transformation N and

2.5-7 HorizontalPreComposeFunctorWithNaturalTransformation
‣ HorizontalPreComposeFunctorWithNaturalTransformation( F, N )( operation )

Returns: a natural transformation

Computes the horizontal composition of the functor F and the natural transformation N.

 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 Ind

generated by GAPDoc2HTML