Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
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
Project: cocalc-sagemath-dev-slelievre
Views: 4183461[1X10 [33X[0;0YTechnical Details[133X[101X234[1X10.1 [33X[0;0YThe Category Cat[133X[101X56[1X10.1-1 ObjectCache[101X78[29X[2XObjectCache[102X( [3Xfunctor[103X ) [32X attribute9[6XReturns:[106X [33X[0;10YIsCachingObject[133X1011[33X[0;0YRetuns the caching object which stores the results of the functor [3Xfunctor[103X12applied to objects.[133X1314[1X10.1-2 MorphismCache[101X1516[29X[2XMorphismCache[102X( [3Xfunctor[103X ) [32X attribute17[6XReturns:[106X [33X[0;10YIsCachingObject[133X1819[33X[0;0YRetuns the caching object which stores the results of the functor [3Xfunctor[103X20applied to morphisms.[133X212223[1X10.2 [33X[0;0YInstall Functions for IsWellDefined[133X[101X2425[1X10.2-1 InstallMethodWithToDoForIsWellDefined[101X2627[29X[2XInstallMethodWithToDoForIsWellDefined[102X( [3Xarg[103X ) [32X function2829[33X[0;0YThe IsWellDefined filter is a basic function of CAP. For every categorial30construction the outcome is well defined if and only if every input object31or morphism of the construction is well defined. So for every implementation32of a categorial construction a ToDoListEntry needs to be defined which33propagates well definedness from the input cells to the output. For not34writing this construction in every method, this function can be used to35install a method which then installs the correct ToDoListEntries for the36output. The input syntax works exactly like InstallMethod, with one37extension: The method creates an auxilliary function which computes the38output from the function given to InstallMethodWithToDoForIsWellDefined,39then installs the ToDoListEntries, and then installs the auxilliary function40instead of the original one. This is normally done with InstallMethod.41However, one can change this via the option InstallMethod, which can be set42to any other function which is then used instead of InstallMethod. This is43used for the caching functions.[133X4445[1X10.2-2 InstallSetWithToDoForIsWellDefined[101X4647[29X[2XInstallSetWithToDoForIsWellDefined[102X( [3Xarg1[103X, [3Xarg2[103X, [3Xarg3[103X ) [32X operation4849[33X[0;0YFor the caching one needs the possibility to install setters for functions50with multiple arguments. This is a setter function which automatically adds51ToDoListEntries for IsWellDefined like described above for the manually52setted result of a method.[133X5354[1X10.2-3 DeclareAttributeWithToDoForIsWellDefined[101X5556[29X[2XDeclareAttributeWithToDoForIsWellDefined[102X( [3Xarg[103X ) [32X function5758[33X[0;0YSince attributes install their setters themselfes, one needs to declare59attributes in another way to ensure ToDoListEntries for IsWellDefined in the60setter of an attribute. This function works like DeclareAttribute, but61installs ToDoListEntries for the setter of the attribute. Please note that62implementations still need to be done with63InstallMethodWithToDoForIsWellDefined.[133X6465[1X10.2-4 DeclareFamilyProperty[101X6667[29X[2XDeclareFamilyProperty[102X( [3Xarg[103X ) [32X function6869[1X10.2-5 CAP_INTERNAL_REPLACE_STRINGS_WITH_FILTERS[101X7071[29X[2XCAP_INTERNAL_REPLACE_STRINGS_WITH_FILTERS[102X( [3Xlist[103X, [3Xcategory[103X ) [32X function72[6XReturns:[106X [33X[0;10YReplaced list[133X7374[33X[0;0YThe function takes a list (of lists) of filters or strings, where the75strings can be category, cell, object, morphism, or twocell. The strings are76then recursively replaced by the corresponding filters of the category. The77replaced list is returned.[133X7879[1X10.2-6 CAP_INTERNAL_MERGE_FILTER_LISTS[101X8081[29X[2XCAP_INTERNAL_MERGE_FILTER_LISTS[102X( [3Xlist[103X, [3Xadditional[103X, [3Xlist[103X ) [32X function82[6XReturns:[106X [33X[0;10Ymerged lists[133X8384[33X[0;0YThe first argument should be a dense list with filters, the second a sparse85list containing filters not longer then the first one. The filters of the86second list are then appended (via and) to the filters in the first list at87the corresponding position, and the resulting list is returned.[133X8889[1X10.2-7 CAP_INTERNAL_RETURN_OPTION_OR_DEFAULT[101X9091[29X[2XCAP_INTERNAL_RETURN_OPTION_OR_DEFAULT[102X( [3Xstring[103X, [3Xvalue[103X ) [32X function92[6XReturns:[106X [33X[0;10Yoption value[133X9394[33X[0;0YReturns the value of the option with name string, or, if this value is fail,95the object value.[133X9697[1X10.2-8 CAP_INTERNAL_FIND_APPEARANCE_OF_SYMBOL_IN_FUNCTION[101X9899[29X[2XCAP_INTERNAL_FIND_APPEARANCE_OF_SYMBOL_IN_FUNCTION[102X( [3Xfunction[103X, [3Xsymbol_list[103X, [3Xloop_multiple[103X ) [32X function100[6XReturns:[106X [33X[0;10Ya list of symbols with multiples[133X101102[33X[0;0YThe function searches for the appearance of the strings in symbol list on103the function function and returns a list of pairs, containing the name of104the symbol and the number of appearance. If the symbol appears in a loop,105the number of appearance is counted times the loop multiple.[133X106107[1X10.2-9 CAP_INTERNAL_MERGE_PRECONDITIONS_LIST[101X108109[29X[2XCAP_INTERNAL_MERGE_PRECONDITIONS_LIST[102X( [3Xlist1[103X, [3Xlist2[103X ) [32X function110[6XReturns:[106X [33X[0;10Ymerge list[133X111112[33X[0;0YThe function takes two lists containing pairs of symbols (strings) and113multiples. The lists are merged that pairs where the string only appears in114one list is then added to the return list, if a pair with a string appears115in both lists, the resulting lists only contains this pair once, with the116higher multiple from both lists.[133X117118119120