GAP (CAP) - Chapter 12: Create wrapper hulls of a category

Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Ind
[Top of Book] [Contents] [Previous Chapter] [Next Chapter]

[MathJax off]

12 Create wrapper hulls of a category
12.1 GAP categories
12.1-1 WasCreatedAsWrapperCapCategory
12.1-2 IsWrapperCapCategory
12.1-3 IsWrapperCapCategoryCell
12.1-4 IsWrapperCapCategoryObject
12.1-5 IsWrapperCapCategoryMorphism
12.2 Attributes
12.2-1 ModelingCategory
12.2-2 UnderlyingCell
12.3 Constructors
12.3-1 AsObjectInWrapperCategory
12.3-2 AsMorphismInWrapperCategory
12.3-3 AsMorphismInWrapperCategory
`12.3-4 \/`
12.3-5 WrapperCategory
12.3-6 WrappingFunctor
12.3-7 ModelingObject
12.3-8 ModeledObject
12.3-9 ModelingMorphism
12.3-10 ModeledMorphism

### 12 Create wrapper hulls of a category

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.

Table: A tower of categories modeling the category `W`
`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.

#### 12.1 GAP categories

##### 12.1-1 WasCreatedAsWrapperCapCategory

`‣ WasCreatedAsWrapperCapCategory`( arg ) | ( filter )

Returns: `true` or `false`

The GAP category of CAP categories that have been created using `WrapperCategory` (12.3-5) but not necessarily use the default data structure.

##### 12.1-2 IsWrapperCapCategory

`‣ IsWrapperCapCategory`( arg ) | ( filter )

Returns: `true` or `false`

The GAP category of a wrapper CAP category (using the default data structure).

##### 12.1-3 IsWrapperCapCategoryCell

`‣ IsWrapperCapCategoryCell`( arg ) | ( filter )

Returns: `true` or `false`

The GAP category of cells in a wrapper CAP category.

##### 12.1-4 IsWrapperCapCategoryObject

`‣ IsWrapperCapCategoryObject`( arg ) | ( filter )

Returns: `true` or `false`

The GAP category of objects in a wrapper CAP category.

##### 12.1-5 IsWrapperCapCategoryMorphism

`‣ IsWrapperCapCategoryMorphism`( arg ) | ( filter )

Returns: `true` or `false`

The GAP category of morphisms in a wrapper CAP category.

#### 12.2 Attributes

##### 12.2-1 ModelingCategory

`‣ ModelingCategory`( category ) | ( attribute )

Returns: a category

The category used to model the wrapper category category.

##### 12.2-2 UnderlyingCell

`‣ UnderlyingCell`( cell ) | ( attribute )

Returns: a category cell

The cell underlying the wrapper category cell cell.

#### 12.3 Constructors

##### 12.3-1 AsObjectInWrapperCategory

`‣ 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.

##### 12.3-2 AsMorphismInWrapperCategory

`‣ 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.

##### 12.3-3 AsMorphismInWrapperCategory

`‣ 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.

##### `12.3-4 \/`

`‣ \/`( cell, category ) | ( operation )

Convenience method for `AsObjectInWrapperCategory` (12.3-1) and `AsMorphismInWrapperCategory` (12.3-3).

##### 12.3-5 WrapperCategory

`‣ 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`),

##### 12.3-6 WrappingFunctor

`‣ 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.

##### 12.3-7 ModelingObject

`‣ 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).

##### 12.3-8 ModeledObject

`‣ 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).

##### 12.3-9 ModelingMorphism

`‣ 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).

##### 12.3-10 ModeledMorphism

`‣ 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).

[Top of Book] [Contents] [Previous Chapter] [Next Chapter]
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Ind

generated by GAPDoc2HTML