The support for building towers of category constructors is one of the main design features of CAP. Many categories that appear in the various applications can be modeled by towers of multiple category constructors. The wrapper category constructor allows adding one last layer on top which allows expressing the desired (re)interpretation of such a modeling tower. In particular, the wrapper category constructor allows specifying the name of the category together with customized methods for the operations
ObjectConstructor
MorphismConstructor
ObjectDatum
MorphismDatum
in order to reflect the desired interpretation with a user-interface that is independent of the modeling tower. Note that the same tower might have multiple interpretations.
W := WrapperCategory( cat_n ) |
cat_n := CategoryConstructor_n( cat_{n-1} ) |
... |
cat_1 := CategoryConstructor_1( non_categorical_input ) |
The wrapper category W
is by construction equivalent to the top category cat_n
in the tower. In practice, the word "tower" stands more generally for a finite poset with a greatest element.
‣ IsWrapperCapCategory ( arg ) | ( filter ) |
Returns: true
or false
The GAP category of a wrapper CAP category (using the default data structure).
‣ IsWrapperCapCategoryObject ( arg ) | ( filter ) |
Returns: true
or false
The GAP category of objects in a wrapper CAP category.
‣ IsWrapperCapCategoryMorphism ( arg ) | ( filter ) |
Returns: true
or false
The GAP category of morphisms in a wrapper CAP category.
‣ ModelingCategory ( category ) | ( attribute ) |
Returns: a category
The category used to model the wrapper category category.
‣ UnderlyingCell ( object ) | ( attribute ) |
Returns: a category object
The cell underlying the wrapper category object object.
‣ UnderlyingCell ( morphism ) | ( attribute ) |
Returns: a category morphism
The cell underlying the wrapper category morphism morphism.
‣ AsObjectInWrapperCategory ( category, object ) | ( operation ) |
Returns: an object
Wrap an object object (in the category underlying the wrapper category category) to form an object in category.
‣ AsMorphismInWrapperCategory ( source, morphism, range ) | ( operation ) |
Returns: a morphism
Wrap a morphism morphism (in the category underlying the wrapper category CapCategory(
source)
) to form a morphism in CapCategory(
source)
with given source and range.
‣ AsMorphismInWrapperCategory ( category, morphism ) | ( operation ) |
Returns: a morphism
Wrap a morphism morphism (in the category underlying the wrapper category category) to form a morphism in category.
‣ / ( cell, category ) | ( operation ) |
Convenience method for AsObjectInWrapperCategory
(12.3-1) and AsMorphismInWrapperCategory
(12.3-3).
‣ WrapperCategory ( category, options ) | ( operation ) |
Returns: a category
Wraps a category category to form a new category subject to the options given via options, which is a record with the following keys:
name
(optional): the name of the wrapper category
only_primitive_operations
(optional, default false
): whether to only wrap primitive operations or all operations
wrap_range_of_hom_structure
(optional, default false
): whether to wrap the range category of the homomorphism structure
Additionally, the following options of CategoryConstructor
(11.2-1) are supported: category_filter
, category_object_filter
, category_morphism_filter
, object_constructor
, object_datum
, morphism_constructor
, morphism_datum
. To avoid inconsistencies, either all or none of those options should be set. If they are set, also the following options should be set:
modeling_tower_object_constructor
: a function which gets the wrapper category and an object datum (in the sense of object_datum
) and returns the corresponding modeling object in the modeling category,
modeling_tower_object_datum
: a function which gets the wrapper category and an object in the modeling category and returns the corresponding object datum (in the sense of object_datum
),
modeling_tower_morphism_constructor
: a function which gets the wrapper category, a source in the modeling category, a morphism datum (in the sense of morphism_datum
), and a range in the modeling category and returns the corresponding modeling morphism in the modeling category,
modeling_tower_morphism_datum
: a function which gets the wrapper category and a morphism in the modeling category and returns the corresponding morphism datum (in the sense of morphism_datum
),
‣ WrappingFunctor ( W ) | ( attribute ) |
Returns: a functor
Return the functor from the wrapped category ModelingCategory
(W) to the wrapper category W. The functor maps each wrapped object/morphism to its wrapping object/morphism.
‣ ModelingObject ( cat, obj ) | ( operation ) |
Returns: a CAP category object
Returns the object modeling the object obj in cat. cat must be a CAP category which has been created as a wrapper CAP category (but not necessarily uses the default data structure).
‣ ModeledObject ( cat, obj ) | ( operation ) |
Returns: a CAP category object
Returns the object modeled by the object obj in the modeling category of cat. cat must be a CAP category which has been created as a wrapper CAP category (but not necessarily uses the default data structure).
‣ ModelingMorphism ( cat, mor ) | ( operation ) |
Returns: a CAP category morphism
Returns the morphism modeling the morphism mor in cat. cat must be a CAP category which has been created as a wrapper CAP category (but not necessarily uses the default data structure).
‣ ModeledMorphism ( cat, source, obj, range ) | ( operation ) |
Returns: a CAP category morphism
Returns the morphism modeled by the morphism mor in the modeling category of cat with given source and range. cat must be a CAP category which has been created as a wrapper CAP category (but not necessarily uses the default data structure).
generated by GAPDoc2HTML