Categories itself with functors as morphisms form a category Cat. So the data structure of CapCategory
s 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
).
‣ 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.
‣ IsCapCategoryAsCatObject ( object ) | ( filter ) |
Returns: true
or false
The GAP category of CAP categories seen as object in Cat.
‣ IsCapFunctor ( object ) | ( filter ) |
Returns: true
or false
The GAP category of functors.
‣ IsCapNaturalTransformation ( object ) | ( filter ) |
Returns: true
or false
The GAP category of natural transformations.
‣ 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
.
‣ 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.
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. 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 A \times B \rightarrow C either as a unary functor with source category A \times B 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.
‣ CapFunctor ( name, A, B ) | ( operation ) |
‣ CapFunctor ( name, A, B ) | ( operation ) |
‣ CapFunctor ( name, A, B ) | ( operation ) |
‣ CapFunctor ( name, A, B ) | ( operation ) |
These methods construct a unary CAP functor. The first argument is a string for the functor's name. A and B are the source and target of the functor, and they can be given as objects in CapCat
or as a CAP-category.
‣ CapFunctor ( name, list, B ) | ( operation ) |
‣ CapFunctor ( name, list, B ) | ( operation ) |
These 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 [ [ A_1, b_1 ], \dots, [ A_n, b_n ] ] where a pair consists of a category A_i (given as an object in CapCat
or as a CAP-category) and a boolean b_i for i = 1, \dots, n. Instead of a pair [ A_i, b_i ], you can also give simply A_i, which will be interpreted as the pair [ A_i, \mathtt{false} ]. The third argument is the target B of the functor, and it can be given as an object in CapCat
or as a CAP-category. The output is a functor with source given by the product category D_1 \times ... \times D_n, where D_i = A_i if b_i = \mathtt{false}, and D_i = A_i^{\mathrm{op}} otherwise.
‣ SourceOfFunctor ( F ) | ( attribute ) |
The argument is a functor F. The output is its source as CAP category.
‣ RangeOfFunctor ( F ) | ( attribute ) |
The argument is a functor F. The output is its range as CAP category.
‣ AddObjectFunction ( F, f ) | ( operation ) |
This operation adds a function f to the functor F which can then be applied to objects in the source. The given function f has to take arguments according to the InputSignature
of F, i.e., if the input signature is given by [ [A_1, b_1], \dots, [A_n,b_n] ], then f must take n arguments, where the i-th argument is an object in the category A_i (the boolean b_i is ignored). The function should return an object in the range of the functor, except when the automatic call of AddObject
was enabled via EnableAddForCategoricalOperations
. In this case the output only has to be a GAP object in IsAttributeStoringRep
, which will be automatically added as an object to the range of the functor.
‣ 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.
‣ AddMorphismFunction ( F, f ) | ( operation ) |
This operation adds a function f to the functor F which can then be applied to morphisms in the source. The given function f has to take as its first argument an object s that is equal (via IsEqualForObjects
) to the source of the result of applying F to the input morphisms. The next arguments of f have to morphisms according to the InputSignature
of F, i.e., if the input signature is given by [ [A_1, b_1], \dots, [A_n,b_n] ], then f must take n arguments, where the i-th argument is a morphism in the category A_i (the boolean b_i is ignored). The last argument of f must be an object r that is equal (via IsEqualForObjects
) to the range of the result of applying F to the input morphisms. The function should return a morphism in the range of the functor, except when the automatic call of AddMorphism
was enabled via EnableAddForCategoricalOperations
. In this case the output only has to be a GAP object in IsAttributeStoringRep
(with attributes Source
and Range
containing also GAP objects in IsAttributeStoringRep
), which will be automatically added as a morphism to the range of the functor.
‣ 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.
‣ ApplyFunctor ( func, A[, B, ...] ) | ( function ) |
Returns: IsCapCategoryCell
Applies the functor func either to
an object or morphism A in the source of func or
to objects or morphisms belonging to the categories in the input signature of func.
‣ InputSignature ( F ) | ( attribute ) |
Returns: IsList
The argument is a functor F. The output is a list of pairs [ [ A_1, b_1 ], \dots, [ A_n, b_n ] ] where a pair consists of a CAP-category A_i and a boolean b_i for i = 1, \dots, n. The source of F is given by the product category D_1 \times ... \times D_n, where D_i = A_i if b_i = \mathtt{false}, and D_i = A_i^{\mathrm{op}} otherwise.
‣ InstallFunctor ( F, s ) | ( operation ) |
Returns: nothing
The arguments are a functor F and a string s. To simplify the description of this operation, we let [ [ A_1, b_1 ], \dots, [ A_n, b_n ] ] denote the input signature of F. This method tries to install 3 operations: an operation \omega_1 with the name s, an operation \omega_2 with the name s\mathtt{OnObjects}, and an operation \omega_3 with the name s\mathtt{OnMorphisms}. The operation \omega_1 takes as input either n- objects/morphisms in A_i or a single object/morphism in the source of F, and outputs the result of applying F to this input. \omega_2 and \omega_3 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.
‣ IdentityFunctor ( cat ) | ( attribute ) |
Returns: a functor
Returns the identity functor of the category cat viewed as an object in the category of categories.
‣ FunctorCanonicalizeZeroObjects ( cat ) | ( 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.
‣ NaturalIsomorphismFromIdentityToCanonicalizeZeroObjects ( cat ) | ( attribute ) |
Returns: a natural transformation
Returns the natural isomorphism from the identity functor to FunctorCanonicalizeZeroObjects
(cat).
‣ FunctorCanonicalizeZeroMorphisms ( cat ) | ( 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.
‣ NaturalIsomorphismFromIdentityToCanonicalizeZeroMorphisms ( cat ) | ( attribute ) |
Returns: a natural transformation
Returns the natural isomorphism from the identity functor to FunctorCanonicalizeZeroMorphisms
(cat).
Natural transformations form the 2-cells of Cat. As such, it is possible to compose them vertically and horizontally, see Section 4.3.
‣ 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.
‣ 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
‣ AddNaturalTransformationFunction ( N, func ) | ( operation ) |
Adds the function func to the natural transformation N. The function 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).
‣ 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.
‣ 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.
‣ HorizontalPreComposeNaturalTransformationWithFunctor ( N, F ) | ( operation ) |
Returns: a natural transformation
Computes the horizontal composition of the natural transformation N and the functor F.
‣ HorizontalPreComposeFunctorWithNaturalTransformation ( F, N ) | ( operation ) |
Returns: a natural transformation
Computes the horizontal composition of the functor F and the natural transformation N.
generated by GAPDoc2HTML