  
  [1X5 [33X[0;0YCategory of Categories[133X[101X
  
  [33X[0;0YCategories  itself  with  functors  as morphisms form a category Cat. So the
  data structure of [10XCapCategory[110Xs is designed to be objects in a category. This
  category  is  implemented  in  [10XCapCat[110X. For every category, the corresponding
  object  in  Cat  can  be  obtained via [10XAsCatObject[110X. 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 [10XApplyFunctor[110X).[133X
  
  
  [1X5.1 [33X[0;0YThe Category Cat[133X[101X
  
  [1X5.1-1 CapCat[101X
  
  [33X[1;0Y[29X[2XCapCat[102X [32X global variable[133X
  
  [33X[0;0YThis  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.[133X
  
  
  [1X5.2 [33X[0;0YCategories[133X[101X
  
  [1X5.2-1 IsCapCategoryAsCatObject[101X
  
  [33X[1;0Y[29X[2XIsCapCategoryAsCatObject[102X( [3Xobject[103X ) [32X filter[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X[133X
  
  [33X[0;0YThe GAP category of CAP categories seen as object in Cat.[133X
  
  [1X5.2-2 IsCapFunctor[101X
  
  [33X[1;0Y[29X[2XIsCapFunctor[102X( [3Xobject[103X ) [32X filter[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X[133X
  
  [33X[0;0YThe GAP category of functors.[133X
  
  [1X5.2-3 IsCapNaturalTransformation[101X
  
  [33X[1;0Y[29X[2XIsCapNaturalTransformation[102X( [3Xobject[103X ) [32X filter[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X[133X
  
  [33X[0;0YThe GAP category of natural transformations.[133X
  
  
  [1X5.3 [33X[0;0YConstructors[133X[101X
  
  [1X5.3-1 AsCatObject[101X
  
  [33X[1;0Y[29X[2XAsCatObject[102X( [3XC[103X ) [32X attribute[133X
  
  [33X[0;0YGiven a CAP category [23XC[123X, this method returns the corresponding object in Cat.
  For  technical  reasons,  the filter [10XIsCapCategory[110X must not imply the filter
  [10XIsCapCategoryObject[110X.  For example, if [10XInitialObject[110X 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 [10XAsCapCategory[110X.[133X
  
  [1X5.3-2 AsCapCategory[101X
  
  [33X[1;0Y[29X[2XAsCapCategory[102X( [3XC[103X ) [32X attribute[133X
  
  [33X[0;0YFor  an  object  [23XC[123X  in Cat, this method returns the underlying CAP category.
  This  method is inverse to [10XAsCatObject[110X, i.e. AsCapCategory( AsCatObject( A )
  ) = A.[133X
  
  
  [1X5.4 [33X[0;0YFunctors[133X[101X
  
  [33X[0;0YFunctors  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.
  However,  the  user can explicitly decide the arity of a functor (which will
  only  have  technical  implications).  Thus,  it  is for example possible to
  consider  a  functor [23XA \times B \rightarrow C[123X either as a unary functor with
  source category [23XA \times B[123X or as a binary functor. Moreover, an object and a
  morphism  function  can  be  added  to  a functor, to apply it to objects or
  morphisms in the source category.[133X
  
  [1X5.4-1 CapFunctor[101X
  
  [33X[1;0Y[29X[2XCapFunctor[102X( [3Xname[103X, [3XA[103X, [3XB[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XCapFunctor[102X( [3Xname[103X, [3XA[103X, [3XB[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XCapFunctor[102X( [3Xname[103X, [3XA[103X, [3XB[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XCapFunctor[102X( [3Xname[103X, [3XA[103X, [3XB[103X ) [32X operation[133X
  
  [33X[0;0YThese  methods construct a unary CAP functor. The first argument is a string
  for  the  functor's  name. [3XA[103X and [3XB[103X are the source and target of the functor,
  and they can be given as objects in [10XCapCat[110X or as a CAP-category.[133X
  
  [1X5.4-2 CapFunctor[101X
  
  [33X[1;0Y[29X[2XCapFunctor[102X( [3Xname[103X, [3Xlist[103X, [3XB[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XCapFunctor[102X( [3Xname[103X, [3Xlist[103X, [3XB[103X ) [32X operation[133X
  
  [33X[0;0YThese  methods  construct  a  possible  multivariate  CAP functor. The first
  argument  is  a string for the functor's name. The second argument is a list
  encoding  the  input  signature of the functor. It can be given as a list of
  pairs  [23X[  [  A_1,  b_1  ],  \dots, [ A_n, b_n ] ][123X where a pair consists of a
  category  [23XA_i[123X  (given  as  an  object  in [10XCapCat[110X or as a CAP-category) and a
  boolean  [23Xb_i[123X  for  [23Xi  = 1, \dots, n[123X. Instead of a pair [23X[ A_i, b_i ][123X, you can
  also  give  simply  [23XA_i[123X,  which  will  be  interpreted  as  the  pair [23X[ A_i,
  \mathtt{false}  ][123X. The third argument is the target [3XB[103X of the functor, and it
  can  be  given  as an object in [10XCapCat[110X or as a CAP-category. The output is a
  functor with source given by the product category [23XD_1 \times ... \times D_n[123X,
  where  [23XD_i  =  A_i[123X  if  [23Xb_i  =  \mathtt{false}[123X,  and [23XD_i = A_i^{\mathrm{op}}[123X
  otherwise.[133X
  
  [1X5.4-3 SourceOfFunctor[101X
  
  [33X[1;0Y[29X[2XSourceOfFunctor[102X( [3XF[103X ) [32X attribute[133X
  
  [33X[0;0YThe argument is a functor [23XF[123X. The output is its source as CAP category.[133X
  
  [1X5.4-4 RangeOfFunctor[101X
  
  [33X[1;0Y[29X[2XRangeOfFunctor[102X( [3XF[103X ) [32X attribute[133X
  
  [33X[0;0YThe argument is a functor [23XF[123X. The output is its range as CAP category.[133X
  
  [1X5.4-5 AddObjectFunction[101X
  
  [33X[1;0Y[29X[2XAddObjectFunction[102X( [3XF[103X, [3Xf[103X ) [32X operation[133X
  
  [33X[0;0YThis  operation adds a function [23Xf[123X to the functor [23XF[123X which can then be applied
  to  objects  in  the  source.  The  given  function  [23Xf[123X has to take arguments
  according  to the [10XInputSignature[110X of [23XF[123X, i.e., if the input signature is given
  by [23X[ [A_1, b_1], \dots, [A_n,b_n] ][123X, then [23Xf[123X must take [23Xn[123X arguments, where the
  [23Xi[123X-th argument is an object in the category [23XA_i[123X (the boolean [23Xb_i[123X is ignored).
  The  function  should  return  an object in the range of the functor, except
  when    the    automatic    call    of    [10XAddObject[110X    was    enabled    via
  [10XEnableAddForCategoricalOperations[110X.  In this case the output only has to be a
  GAP object in [10XIsAttributeStoringRep[110X, which will be automatically added as an
  object to the range of the functor.[133X
  
  [1X5.4-6 FunctorObjectOperation[101X
  
  [33X[1;0Y[29X[2XFunctorObjectOperation[102X( [3XF[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ya GAP operation[133X
  
  [33X[0;0YThe  argument  is a functor [23XF[123X. The output is the GAP operation realizing the
  action of [23XF[123X on objects.[133X
  
  [1X5.4-7 AddMorphismFunction[101X
  
  [33X[1;0Y[29X[2XAddMorphismFunction[102X( [3XF[103X, [3Xf[103X ) [32X operation[133X
  
  [33X[0;0YThis  operation adds a function [23Xf[123X to the functor [23XF[123X which can then be applied
  to  morphisms  in  the source. The given function [23Xf[123X has to take as its first
  argument  an object [23Xs[123X that is equal (via [10XIsEqualForObjects[110X) to the source of
  the  result  of  applying  [23XF[123X to the input morphisms. The next arguments of [23Xf[123X
  have  to  morphisms according to the [10XInputSignature[110X of [23XF[123X, i.e., if the input
  signature  is  given by [23X[ [A_1, b_1], \dots, [A_n,b_n] ][123X, then [23Xf[123X must take [23Xn[123X
  arguments,  where  the  [23Xi[123X-th argument is a morphism in the category [23XA_i[123X (the
  boolean  [23Xb_i[123X is ignored). The last argument of [23Xf[123X must be an object [23Xr[123X that is
  equal  (via  [10XIsEqualForObjects[110X)  to the range of the result of applying [23XF[123X to
  the  input  morphisms. The function should return a morphism in the range of
  the  functor,  except when the automatic call of [10XAddMorphism[110X was enabled via
  [10XEnableAddForCategoricalOperations[110X.  In this case the output only has to be a
  GAP  object  in  [10XIsAttributeStoringRep[110X  (with  attributes  [10XSource[110X  and [10XRange[110X
  containing  also  GAP  objects  in  [10XIsAttributeStoringRep[110X),  which  will  be
  automatically added as a morphism to the range of the functor.[133X
  
  [1X5.4-8 FunctorMorphismOperation[101X
  
  [33X[1;0Y[29X[2XFunctorMorphismOperation[102X( [3XF[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ya GAP operation[133X
  
  [33X[0;0YThe  argument  is a functor [23XF[123X. The output is the GAP operation realizing the
  action of [23XF[123X on morphisms.[133X
  
  [1X5.4-9 ApplyFunctor[101X
  
  [33X[1;0Y[29X[2XApplyFunctor[102X( [3Xfunc[103X, [3XA[103X[, [3XB[103X, [3X...[103X] ) [32X function[133X
  [6XReturns:[106X  [33X[0;10YIsCapCategoryCell[133X
  
  [33X[0;0YApplies the functor [3Xfunc[103X either to[133X
  
  [30X    [33X[0;6Yan object or morphism [3XA[103X in the source of [3Xfunc[103X or[133X
  
  [30X    [33X[0;6Yto  objects  or  morphisms  belonging  to  the categories in the input
        signature of [3Xfunc[103X.[133X
  
  [1X5.4-10 InputSignature[101X
  
  [33X[1;0Y[29X[2XInputSignature[102X( [3XF[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10YIsList[133X
  
  [33X[0;0YThe  argument  is a functor [23XF[123X. The output is a list of pairs [23X[ [ A_1, b_1 ],
  \dots,  [  A_n,  b_n  ]  ][123X where a pair consists of a CAP-category [23XA_i[123X and a
  boolean  [23Xb_i[123X  for  [23Xi  = 1, \dots, n[123X. The source of [23XF[123X is given by the product
  category [23XD_1 \times ... \times D_n[123X, where [23XD_i = A_i[123X if [23Xb_i = \mathtt{false}[123X,
  and [23XD_i = A_i^{\mathrm{op}}[123X otherwise.[133X
  
  [1X5.4-11 InstallFunctor[101X
  
  [33X[1;0Y[29X[2XInstallFunctor[102X( [3XF[103X, [3Xs[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Ynothing[133X
  
  [33X[0;0YThe arguments are a functor [23XF[123X and a string [23Xs[123X. To simplify the description of
  this  operation,  we  let  [23X[  [ A_1, b_1 ], \dots, [ A_n, b_n ] ][123X denote the
  input  signature  of  [23XF[123X.  This  method  tries  to  install  [23X3[123X operations: an
  operation  [23X\omega_1[123X  with  the  name  [23Xs[123X, an operation [23X\omega_2[123X with the name
  [23Xs\mathtt{OnObjects}[123X,    and    an   operation   [23X\omega_3[123X   with   the   name
  [23Xs\mathtt{OnMorphisms}[123X.  The  operation  [23X\omega_1[123X  takes  as  input either [23Xn[123X-
  objects/morphisms in [23XA_i[123X or a single object/morphism in the source of [23XF[123X, and
  outputs  the  result  of applying [23XF[123X to this input. [23X\omega_2[123X and [23X\omega_3[123X are
  the  corresponding variants for objects or morphisms only. This function can
  only be called once for each functor, every further call will be ignored.[133X
  
  [1X5.4-12 IdentityFunctor[101X
  
  [33X[1;0Y[29X[2XIdentityFunctor[102X( [3Xcat[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ya functor[133X
  
  [33X[0;0YReturns  the identity functor of the category [3Xcat[103X viewed as an object in the
  category of categories.[133X
  
  [1X5.4-13 FunctorCanonicalizeZeroObjects[101X
  
  [33X[1;0Y[29X[2XFunctorCanonicalizeZeroObjects[102X( [3Xcat[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ya functor[133X
  
  [33X[0;0YReturns  the  endofunctor  of  the  category  [3Xcat[103X  with zero which maps each
  (object  isomorphic  to  the)  zero  object to [10XZeroObject[110X([3Xcat[103X) and to itself
  otherwise. This functor is equivalent to the identity functor.[133X
  
  [1X5.4-14 NaturalIsomorphismFromIdentityToCanonicalizeZeroObjects[101X
  
  [33X[1;0Y[29X[2XNaturalIsomorphismFromIdentityToCanonicalizeZeroObjects[102X( [3Xcat[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ya natural transformation[133X
  
  [33X[0;0YReturns   the   natural   isomorphism   from   the   identity   functor   to
  [10XFunctorCanonicalizeZeroObjects[110X([3Xcat[103X).[133X
  
  [1X5.4-15 FunctorCanonicalizeZeroMorphisms[101X
  
  [33X[1;0Y[29X[2XFunctorCanonicalizeZeroMorphisms[102X( [3Xcat[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ya functor[133X
  
  [33X[0;0YReturns the endofunctor of the category [3Xcat[103X with zero which maps each object
  to  itself,  each  morphism  [22Xϕ[122X to itself, unless it is congruent to the zero
  morphism;  in  this  case it is mapped to [10XZeroMorphism[110X([10XSource[110X([22Xϕ[122X), [10XRange[110X([22Xϕ[122X)).
  This functor is equivalent to the identity functor.[133X
  
  [1X5.4-16 NaturalIsomorphismFromIdentityToCanonicalizeZeroMorphisms[101X
  
  [33X[1;0Y[29X[2XNaturalIsomorphismFromIdentityToCanonicalizeZeroMorphisms[102X( [3Xcat[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ya natural transformation[133X
  
  [33X[0;0YReturns   the   natural   isomorphism   from   the   identity   functor   to
  [10XFunctorCanonicalizeZeroMorphisms[110X([3Xcat[103X).[133X
  
  
  [1X5.5 [33X[0;0YNatural transformations[133X[101X
  
  [33X[0;0YNatural  transformations form the [23X2[123X-cells of Cat. As such, it is possible to
  compose them vertically and horizontally, see Section [14X4.2[114X.[133X
  
  [1X5.5-1 Name[101X
  
  [33X[1;0Y[29X[2XName[102X( [3Xarg[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ya string[133X
  
  [33X[0;0YAs  every functor, every natural transformation has a name attribute. It has
  to be a string and will be set by the Constructor.[133X
  
  [1X5.5-2 NaturalTransformation[101X
  
  [33X[1;0Y[29X[2XNaturalTransformation[102X( [[3Xname[103X, ][3XF[103X, [3XG[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Ya natural transformation[133X
  
  [33X[0;0YConstructs  a  natural transformation between the functors [3XF[103X[23X:A \rightarrow B[123X
  and  [3XG[103X[23X:A  \rightarrow B[123X. The string [3Xname[103X is optional, and, if not given, set
  automatically from the names of the functors[133X
  
  [1X5.5-3 AddNaturalTransformationFunction[101X
  
  [33X[1;0Y[29X[2XAddNaturalTransformationFunction[102X( [3XN[103X, [3Xfunc[103X ) [32X operation[133X
  
  [33X[0;0YAdds  the function (or list of functions) [3Xfunc[103X to the natural transformation
  [3XN[103X. The function or each function in the list should take three arguments. If
  [23XN:  F  \rightarrow  G[123X,  the  arguments  should be [23XF(A), A, G(A)[123X. The ouptput
  should be a morphism, [23XF(A) \rightarrow G(A)[123X.[133X
  
  [1X5.5-4 ApplyNaturalTransformation[101X
  
  [33X[1;0Y[29X[2XApplyNaturalTransformation[102X( [3XN[103X, [3XA[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya morphism[133X
  
  [33X[0;0YGiven  a  natural  transformation  [3XN[103X[23X:F  \rightarrow  G[123X and an object [3XA[103X, this
  function  should return the morphism [23XF(A) \rightarrow G(A)[123X, corresponding to
  [3XN[103X.[133X
  
  [1X5.5-5 InstallNaturalTransformation[101X
  
  [33X[1;0Y[29X[2XInstallNaturalTransformation[102X( [3XN[103X, [3Xname[103X ) [32X operation[133X
  
  [33X[0;0YInstalls  the  natural  transformation  [3XN[103X  as  operation with the name [3Xname[103X.
  Argument for this operation is an object, output is a morphism.[133X
  
  [1X5.5-6 HorizontalPreComposeNaturalTransformationWithFunctor[101X
  
  [33X[1;0Y[29X[2XHorizontalPreComposeNaturalTransformationWithFunctor[102X( [3XN[103X, [3XF[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Ya natural transformation[133X
  
  [33X[0;0YComputes  the horizontal composition of the natural transformation [3XN[103X and the
  functor [3XF[103X.[133X
  
  [1X5.5-7 HorizontalPreComposeFunctorWithNaturalTransformation[101X
  
  [33X[1;0Y[29X[2XHorizontalPreComposeFunctorWithNaturalTransformation[102X( [3XF[103X, [3XN[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Ya natural transformation[133X
  
  [33X[0;0YComputes  the  horizontal  composition  of  the  functor  [3XF[103X  and the natural
  transformation [3XN[103X.[133X
  
