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
10 Technical Details
3
4
5
10.1 The Category Cat
6
7
10.1-1 ObjectCache
8
9
ObjectCache( functor )  attribute
10
Returns: IsCachingObject
11
12
Retuns the caching object which stores the results of the functor functor
13
applied to objects.
14
15
10.1-2 MorphismCache
16
17
MorphismCache( functor )  attribute
18
Returns: IsCachingObject
19
20
Retuns the caching object which stores the results of the functor functor
21
applied to morphisms.
22
23
24
10.2 Install Functions for IsWellDefined
25
26
10.2-1 InstallMethodWithToDoForIsWellDefined
27
28
InstallMethodWithToDoForIsWellDefined( arg )  function
29
30
The IsWellDefined filter is a basic function of CAP. For every categorial
31
construction the outcome is well defined if and only if every input object
32
or morphism of the construction is well defined. So for every implementation
33
of a categorial construction a ToDoListEntry needs to be defined which
34
propagates well definedness from the input cells to the output. For not
35
writing this construction in every method, this function can be used to
36
install a method which then installs the correct ToDoListEntries for the
37
output. The input syntax works exactly like InstallMethod, with one
38
extension: The method creates an auxilliary function which computes the
39
output from the function given to InstallMethodWithToDoForIsWellDefined,
40
then installs the ToDoListEntries, and then installs the auxilliary function
41
instead of the original one. This is normally done with InstallMethod.
42
However, one can change this via the option InstallMethod, which can be set
43
to any other function which is then used instead of InstallMethod. This is
44
used for the caching functions.
45
46
10.2-2 InstallSetWithToDoForIsWellDefined
47
48
InstallSetWithToDoForIsWellDefined( arg1, arg2, arg3 )  operation
49
50
For the caching one needs the possibility to install setters for functions
51
with multiple arguments. This is a setter function which automatically adds
52
ToDoListEntries for IsWellDefined like described above for the manually
53
setted result of a method.
54
55
10.2-3 DeclareAttributeWithToDoForIsWellDefined
56
57
DeclareAttributeWithToDoForIsWellDefined( arg )  function
58
59
Since attributes install their setters themselfes, one needs to declare
60
attributes in another way to ensure ToDoListEntries for IsWellDefined in the
61
setter of an attribute. This function works like DeclareAttribute, but
62
installs ToDoListEntries for the setter of the attribute. Please note that
63
implementations still need to be done with
64
InstallMethodWithToDoForIsWellDefined.
65
66
10.2-4 DeclareFamilyProperty
67
68
DeclareFamilyProperty( arg )  function
69
70
10.2-5 CAP_INTERNAL_REPLACE_STRINGS_WITH_FILTERS
71
72
CAP_INTERNAL_REPLACE_STRINGS_WITH_FILTERS( list, category )  function
73
Returns: Replaced list
74
75
The function takes a list (of lists) of filters or strings, where the
76
strings can be category, cell, object, morphism, or twocell. The strings are
77
then recursively replaced by the corresponding filters of the category. The
78
replaced list is returned.
79
80
10.2-6 CAP_INTERNAL_MERGE_FILTER_LISTS
81
82
CAP_INTERNAL_MERGE_FILTER_LISTS( list, additional, list )  function
83
Returns: merged lists
84
85
The first argument should be a dense list with filters, the second a sparse
86
list containing filters not longer then the first one. The filters of the
87
second list are then appended (via and) to the filters in the first list at
88
the corresponding position, and the resulting list is returned.
89
90
10.2-7 CAP_INTERNAL_RETURN_OPTION_OR_DEFAULT
91
92
CAP_INTERNAL_RETURN_OPTION_OR_DEFAULT( string, value )  function
93
Returns: option value
94
95
Returns the value of the option with name string, or, if this value is fail,
96
the object value.
97
98
10.2-8 CAP_INTERNAL_FIND_APPEARANCE_OF_SYMBOL_IN_FUNCTION
99
100
CAP_INTERNAL_FIND_APPEARANCE_OF_SYMBOL_IN_FUNCTION( function, symbol_list, loop_multiple )  function
101
Returns: a list of symbols with multiples
102
103
The function searches for the appearance of the strings in symbol list on
104
the function function and returns a list of pairs, containing the name of
105
the symbol and the number of appearance. If the symbol appears in a loop,
106
the number of appearance is counted times the loop multiple.
107
108
10.2-9 CAP_INTERNAL_MERGE_PRECONDITIONS_LIST
109
110
CAP_INTERNAL_MERGE_PRECONDITIONS_LIST( list1, list2 )  function
111
Returns: merge list
112
113
The function takes two lists containing pairs of symbols (strings) and
114
multiples. The lists are merged that pairs where the string only appears in
115
one list is then added to the return list, if a pair with a string appears
116
in both lists, the resulting lists only contains this pair once, with the
117
higher multiple from both lists.
118
119
120