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).
The Category Cat 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.
Categories true or false The GAP category of CAP categories seen as object in Cat. true or false The GAP category of functors. true or false The GAP category of natural transformations.
Constructors 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. 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.
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. 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.
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. a GAP operation The argument is a functor F. The output is the GAP operation realizing the action of F on objects. 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. a GAP operation The argument is a functor F. The output is the GAP operation realizing the action of F on morphisms. IsCapCategoryCell Applies the functor func to the object or morphism A. TODO
Natural transformations 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. 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 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). 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. Installs the natural transformation N as operation with the name name. Argument for this operation is an object, output is a morphism. a natural transformation Computes the horizontal composition of the natural transformation N and a natural transformation Computes the horizontal composition of the functor F and the natural transformation N.