CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Views: 418346
1
2
2 Category of Categories
3
4
Categories itself with functors as morphisms form a category. So the data
5
structure of CapCategorys is designed to be objects in a category. This
6
category is implemented in CapCat. For every category, the corresponding
7
object in Cat can be obtained via AsCatObject. The implemetation of the
8
category of categories offers a data structure for functors. Those are
9
implemented as morphisms in this category, so functors can be handled like
10
morphisms in a category. Also convenience functions to install functors as
11
methods are implemented (in order to avoid ApplyFunctor).
12
13
14
2.1 The Category Cat
15
16
2.1-1 CapCat
17
18
CapCat global variable
19
20
This variable stores the category of categories. Every category object is
21
constructed as an object in this category, so Cat is constructed when
22
loading the package.
23
24
25
2.2 Categories
26
27
2.2-1 IsCapCategoryAsCatObject
28
29
IsCapCategoryAsCatObject( object )  filter
30
Returns: true or false
31
32
The GAP category of CAP categories seen as object in Cat.
33
34
2.2-2 IsCapFunctor
35
36
IsCapFunctor( object )  filter
37
Returns: true or false
38
39
The GAP category of functors.
40
41
2.2-3 IsCapNaturalTransformation
42
43
IsCapNaturalTransformation( object )  filter
44
Returns: true or false
45
46
The GAP category of natural transformations.
47
48
49
2.3 Constructors
50
51
2.3-1 AsCatObject
52
53
AsCatObject( C )  attribute
54
55
Given a CAP category C, this method returns the corresponding object in Cat.
56
For technical reasons, the filter IsCapCategory must not imply the filter
57
IsCapCategoryObject. For example, if InitialObject is applied to an object,
58
it returns the initial object of its category. If it is applied to a
59
category, it returns the initial object of the category. If a CAP category
60
would be a category object itself, this would be ambiguous. So categories
61
must be wrapped in a CatObject to be an object in Cat. This method returns
62
the wrapper object. The category can be reobtained by AsCapCategory.
63
64
2.3-2 AsCapCategory
65
66
AsCapCategory( C )  attribute
67
68
For an object C in Cat, this method returns the underlying CAP category.
69
This method is inverse to AsCatObject, i.e. AsCapCategory( AsCatObject( A )
70
) = A.
71
72
73
2.4 Functors
74
75
Functors are morphisms in Cat, thus they have source and target which are
76
categories. A multivariate functor can be constructed via a product category
77
as source, a presheaf is constructed via the opposite category as source.
78
Moreover, an object and a morphism function can be added to a functor, to
79
apply it to objects or morphisms in the source category.
80
81
2.4-1 CapFunctor
82
83
CapFunctor( name, A, B )  operation
84
CapFunctor( name, A, B )  operation
85
CapFunctor( name, A, B )  operation
86
CapFunctor( name, A, B )  operation
87
CapFunctor( name, A, B )  operation
88
CapFunctor( name, A, B )  operation
89
90
These methods construct a CAP functor, i.e. a morphism in Cat. Name should
91
be an unique name for the functor, it is also used when the functor is
92
installed as a method. A and B are source and target. Both can be given as
93
object in Cat or as category itself.
94
95
2.4-2 AddObjectFunction
96
97
AddObjectFunction( functor, function )  operation
98
99
This operation adds a function to the functor which can then be applied to
100
objects in the source. The given function function has to take one argument
101
which must be an object in the source category and should return a
102
CapCategoryObject. The object is automatically added to the range of the
103
functor when it is applied to the object.
104
105
2.4-3 FunctorObjectOperation
106
107
FunctorObjectOperation( F )  attribute
108
Returns: a GAP operation
109
110
The argument is a functor F. The output is the GAP operation realizing the
111
action of F on objects.
112
113
2.4-4 AddMorphismFunction
114
115
AddMorphismFunction( functor, function )  operation
116
117
This operation adds a function to the functor which can then be applied to
118
morphisms in the source. The given function function has to take three
119
arguments A, \tau, B. When the funtor functor is applied to the morphism
120
\tau, A is the result of functor applied to the source of \tau, B is the
121
result of functor applied to the range.
122
123
2.4-5 FunctorMorphismOperation
124
125
FunctorMorphismOperation( F )  attribute
126
Returns: a GAP operation
127
128
The argument is a functor F. The output is the GAP operation realizing the
129
action of F on morphisms.
130
131
2.4-6 ApplyFunctor
132
133
ApplyFunctor( func, A )  function
134
Returns: IsCapCategoryCell
135
136
Applies the functor func to the object or morphism A.
137
138
2.4-7 InstallFunctor
139
140
InstallFunctor( functor, method_name )  operation
141
142
TODO
143
144
2.4-8 IdentityFunctor
145
146
IdentityFunctor( category )  attribute
147
Returns: a functor
148
149
Returns the identity functor of the category cat viewed as an object in the
150
category of categories.
151
152
2.4-9 FunctorCanonicalizeZeroObjects
153
154
FunctorCanonicalizeZeroObjects( category )  attribute
155
Returns: a functor
156
157
Returns the endofunctor of the category cat with zero which maps each
158
(object isomorphic to the) zero object to ZeroObject(cat) and to itself
159
otherwise. This functor is equivalent to the identity functor.
160
161
2.4-10 NaturalIsomorophismFromIdentityToCanonicalizeZeroObjects
162
163
NaturalIsomorophismFromIdentityToCanonicalizeZeroObjects( category )  attribute
164
Returns: a natural transformation
165
166
Returns the natural isomorphism from the identity functor to
167
FunctorCanonicalizeZeroObjects(cat).
168
169
2.4-11 FunctorCanonicalizeZeroMorphisms
170
171
FunctorCanonicalizeZeroMorphisms( category )  attribute
172
Returns: a functor
173
174
Returns the endofunctor of the category cat with zero which maps each object
175
to itself, each morphism ϕ to itself, unless it is congruent to the zero
176
morphism; in this case it is mapped to ZeroMorphism(Source(ϕ), Range(ϕ)).
177
This functor is equivalent to the identity functor.
178
179
2.4-12 NaturalIsomorophismFromIdentityToCanonicalizeZeroMorphisms
180
181
NaturalIsomorophismFromIdentityToCanonicalizeZeroMorphisms( category )  attribute
182
Returns: a natural transformation
183
184
Returns the natural isomorphism from the identity functor to
185
FunctorCanonicalizeZeroMorphisms(cat).
186
187
188
2.5 Natural transformations
189
190
2.5-1 Name
191
192
Name( arg )  attribute
193
Returns: a string
194
195
As every functor, every natural transformation has a name attribute. It has
196
to be a string and will be set by the Constructor.
197
198
2.5-2 NaturalTransformation
199
200
NaturalTransformation( [name, ]F, G )  operation
201
Returns: a natural transformation
202
203
Constructs a natural transformation between the functors F:A \rightarrow B
204
and G:A \rightarrow B. The string name is optional, and, if not given, set
205
automatically from the names of the functors
206
207
2.5-3 AddNaturalTransformationFunction
208
209
AddNaturalTransformationFunction( N, func )  operation
210
211
Adds the function (or list of functions) func to the natural transformation
212
N. The function or each function in the list should take three arguments. If
213
N: F \rightarrow G, the arguments should be F(A), A, G(A). The ouptput
214
should be a morphism, F(A) \rightarrow G(A).
215
216
2.5-4 ApplyNaturalTransformation
217
218
ApplyNaturalTransformation( N, A )  function
219
Returns: a morphism
220
221
Given a natural transformation N:F \rightarrow G and an object A, this
222
function should return the morphism F(A) \rightarrow G(A), corresponding to
223
N.
224
225
2.5-5 InstallNaturalTransformation
226
227
InstallNaturalTransformation( N, name )  operation
228
229
Installs the natural transformation N as operation with the name name.
230
Argument for this operation is an object, output is a morphism.
231
232
2.5-6 HorizontalPreComposeNaturalTransformationWithFunctor
233
234
HorizontalPreComposeNaturalTransformationWithFunctor( N, F )  operation
235
Returns: a natural transformation
236
237
Computes the horizontal composition of the natural transformation N and
238
239
2.5-7 HorizontalPreComposeFunctorWithNaturalTransformation
240
241
HorizontalPreComposeFunctorWithNaturalTransformation( F, N )  operation
242
Returns: a natural transformation
243
244
Computes the horizontal composition of the functor F and the natural
245
transformation N.
246
247
248