Categories are the main GAP objects in CAP. They are used to associate GAP objects which represent objects and morphisms with their category. By associating a GAP object to the category, one of two filters belonging to the category (ObjectFilter/MorphismFilter) are set to true. Via Add methods, functions for specific existential quantifiers can be associated to the category and after that can be applied to GAP objects in the category. A GAP category object also knows which constructions are currently possible in this category.
‣ IsCapCategory ( object ) | ( filter ) |
Returns: true
or false
The GAP category of CAP categories. Objects of this type handle the CAP category information, the caching, and filters for objects in the CAP category. Please note that the object itself is not related to methods, you only need it as a handler and a presentation of the CAP category.
‣ IsCapCategoryCell ( object ) | ( filter ) |
Returns: true
or false
The GAP category of CAP category cells. Every object, morphism, and 2-cell of a CAP category lies in this GAP category.
‣ IsCapCategoryObject ( object ) | ( filter ) |
Returns: true
or false
The GAP category of CAP category objects. Every object of a CAP category lies in this GAP category.
‣ IsCapCategoryMorphism ( object ) | ( filter ) |
Returns: true
or false
The GAP category of CAP category morphisms. Every morphism of a CAP category lies in this GAP category.
‣ IsCapCategoryTwoCell ( object ) | ( filter ) |
Returns: true
or false
The GAP category of CAP category 2-cells. Every 2-cell of a CAP category lies in this GAP category.
‣ AddCategoricalProperty ( list ) | ( function ) |
Adds a categorical property to the list of CAP categorical properties. list must be a list containing one entry, if the property is self dual, or two, if the dual property has a different name. If the first entry of the list is empty and the second is a property name, the property is assumed to have no dual.
‣ CreateCapCategory ( ) | ( operation ) |
Returns: a category
Creates a new CAP category from scratch. It gets a generic name.
‣ CreateCapCategory ( s ) | ( operation ) |
Returns: a category
The argument is a string s. This operation creates a new CAP category from scratch. Its name is set to s.
Each category C stores various filters. They are used to apply the right functions in the method selection.
‣ CategoryFilter ( C ) | ( attribute ) |
Returns: a filter
The argument is a category C. The output is a filter in which C lies.
‣ CellFilter ( C ) | ( attribute ) |
Returns: a filter
The argument is a category C. The output is a filter in which all cells of C shall lie.
‣ ObjectFilter ( C ) | ( attribute ) |
Returns: a filter
The argument is a category C. The output is a filter in which all objects of C shall lie.
‣ MorphismFilter ( C ) | ( attribute ) |
Returns: a filter
The argument is a category C. The output is a filter in which all morphisms of C shall lie.
‣ TwoCellFilter ( C ) | ( attribute ) |
Returns: a filter
The argument is a category C. The output is a filter in which all 2-cells of C shall lie.
‣ CommutativeRingOfLinearCategory ( C ) | ( attribute ) |
Returns: a ring
The argument is a category C which is expected to lie in the filter IsLinearCategoryOverCommutativeRing
. The output is a commutative ring over which the category is linear.
‣ CapCategorySwitchLogicPropagationForObjectsOn ( C ) | ( function ) |
Activates the predicate logic propagation between equal objects for the category C.
‣ CapCategorySwitchLogicPropagationForObjectsOff ( C ) | ( function ) |
Deactivates the predicate logic propagation between equal objects for the category C.
‣ CapCategorySwitchLogicPropagationForMorphismsOn ( C ) | ( function ) |
Activates the predicate logic propagation between equal morphisms for the category C.
‣ CapCategorySwitchLogicPropagationForMorphismsOff ( C ) | ( function ) |
Deactivates the predicate logic propagation between equal morphisms for the category C.
‣ CapCategorySwitchLogicPropagationOn ( C ) | ( function ) |
Activates the predicate logic propagation between equal cells for the category C.
‣ CapCategorySwitchLogicPropagationOff ( C ) | ( function ) |
Deactivates the predicate logic propagation between equal cells for the category C.
‣ CapCategorySwitchLogicOn ( C ) | ( function ) |
Activates the predicate implication logic for the category C.
‣ CapCategorySwitchLogicOff ( C ) | ( function ) |
Deactivates the predicate implication logic for the category C.
‣ CanCompute ( C, s ) | ( operation ) |
Returns: true
or false
The argument is a category C and a string s, which should be the name of a basic operation, e.g., PreCompose. If applying this method is possible in C, the method returns true
, false
otherwise. If the string is not the name of a basic operation, an error is raised.
‣ CheckConstructivenessOfCategory ( C, s ) | ( operation ) |
Returns: a list
The arguments are a category C and a string s. If s is a categorical property (e.g. "IsAbelianCategory"
), the output is a list of strings with basic operations which are missing in C to have the categorical property constructively. If s is not a categorical property, an error is raised.
‣ IsWellDefined ( c ) | ( property ) |
Returns: a boolean
The argument is a cell c. The output is true
if c is well-defined, otherwise the output is false
.
‣ Down ( x ) | ( attribute ) |
Returns: a GAP object
The argument is a GAP object x. If x is an object in a CAP category, the output consists of data which are needed to reconstruct x (e.g., by passing them to an appropriate constructor). If x is a morphism in a CAP category, the output consists of a triple whose first entry is the source of x, the third entry is the range of x, and the second entry consists of data which are needed to reconstruct x (e.g., by passing them to an appropriate constructor, possibly together with the source and range of x).
‣ DownOnlyMorphismData ( x ) | ( attribute ) |
Returns: a GAP object
The argument is a morphism in a CAP category, the output consists of data which are needed to reconstruct x (e.g., by passing it to an appropriate constructor, possibly together with its source and range).
‣ DownToBottom ( x ) | ( attribute ) |
Returns: a GAP object
The argument is a GAP object x. This function iteratively calls Down
until it becomes stable.
‣ SetCachingOfCategory ( category, type ) | ( function ) |
Sets the caching of category to type.
‣ SetCachingOfCategoryWeak ( category ) | ( function ) |
‣ SetCachingOfCategoryCrisp ( category ) | ( function ) |
‣ DeactivateCachingOfCategory ( category ) | ( function ) |
Sets the caching of category to weak
, crisp
or none
, respectively.
‣ SetDefaultCaching ( type ) | ( function ) |
‣ SetDefaultCachingWeak ( ) | ( function ) |
‣ SetDefaultCachingCrisp ( ) | ( function ) |
‣ DeactivateDefaultCaching ( ) | ( function ) |
Sets the default caching behaviour, all new categories will have their caching set to either weak
, crisp
, or none
. The default at startup is weak
.
‣ DisableInputSanityChecks ( category ) | ( function ) |
‣ DisableOutputSanityChecks ( category ) | ( function ) |
‣ EnablePartialInputSanityChecks ( category ) | ( function ) |
‣ EnablePartialOutputSanityChecks ( category ) | ( function ) |
‣ EnableFullInputSanityChecks ( category ) | ( function ) |
‣ EnableFullOutputSanityChecks ( category ) | ( function ) |
‣ DisableSanityChecks ( category ) | ( function ) |
‣ EnablePartialSanityChecks ( category ) | ( function ) |
‣ EnableFullSanityChecks ( category ) | ( function ) |
Most operations can perform optional sanity checks on their arguments and results. The checks can either be partial (set by default), full, or disabled. With the following commands you can either enable the full checks, the partial checks or, for performance, disable the checks altogether. You can do this for input checks, output checks or for both at once.
Add
‣ EnableAddForCategoricalOperations ( C ) | ( function ) |
‣ DisableAddForCategoricalOperations ( C ) | ( function ) |
Enables/disables the automatic call of Add
for the output of primitively added functions for the category C. If the automatic call of Add
is disabled (default), the output of primitively added functions must belong to the correct category. If the automatic call of Add
is enabled, the output of primitively added functions only has to be a GAP object lying in IsAttributeStoringRep
(with suitable attributes Source
and Range
if the output should be a morphism or a twocell).
CAP has several settings which can improve the performance. In the following some of these are listed.
DeactivateCachingOfCategory
or DeactivateDefaultCaching
: see 1.8. This can either improve or degrade the performance depending on the concrete example.
CapCategorySwitchLogicOff
(on by default) or CapCategorySwitchLogicPropagationOff
(off by default): see 1.4. This can either improve or degrade the performance depending on the concrete example.
DisableSanityChecks
: see 1.9.
DisableAddForCategoricalOperations
: see 1.10.
DeactivateToDoList
: see the package ToolsForHomalg
.
Use ObjectifyObjectForCAPWithAttributes
(2.6) instead of AddObject
and ObjectifyMorphismWithSourceAndRangeForCAPWithAttributes
(3.5) instead of AddMorphism
.
Add all attribute testers (Has...
) of your objects resp. morphisms to the filters passed to AddObjectRepresentation
(2.6) resp. AddMorphismRepresentation
(3.5).
Pass the option overhead := false
to CreateCapCategory
. Note: this may have unintended effects. Use with care!
‣ LaTeXOutput ( c ) | ( operation ) |
Returns: a string
The argument is a cell c. The output is a LaTeX string s (without enclosing dollar signs) that may be used to print out c nicely.
‣ LaTeXOutput ( C ) | ( operation ) |
Returns: a string
The argument is a category C. The output is a LaTeX string s (without enclosing dollar signs) that may be used to print out C nicely.
generated by GAPDoc2HTML