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

2 Objects
 2.1 Attributes for the Type of Objects
 2.2 Adding Objects to a Category
 2.3 Equalities for Objects
 2.4 Categorical Properties of Objects
 2.5 Random Objects
 2.6 Tool functions for caches
 2.7 Object constructors
 2.8 Well-Definedness of Objects
 2.9 Projectives
 2.10 Injectives
 2.11 Simplified Objects
 2.12 Dimensions

2 Objects

Any GAP object which is IsCapCategoryObject can be added to a category and then becomes an object in this category. Any object can belong to one or no category. After a GAP object is added to the category, it knows which things can be computed in its category and to which category it belongs. It knows categorial properties and attributes, and the functions for existential quantifiers can be applied to the object.

2.1 Attributes for the Type of Objects

2.1-1 CapCategory
‣ CapCategory( a )( attribute )

Returns: a category

The argument is an object \(a\). The output is the category \(\mathbf{C}\) to which \(a\) was added.

2.2 Adding Objects to a Category

2.2-1 Add
‣ Add( category, object )( operation )

Adds object as an object to category.

2.2-2 AddObject
‣ AddObject( category, object )( operation )

Adds object as an object to category. If object already lies in the filter IsCapCategoryObject, the operation Add (2.2-1) can be used instead.

2.2-3 CreateCapCategoryObjectWithAttributes
‣ CreateCapCategoryObjectWithAttributes( category[, attribute1, value1, ...] )( function )

Returns: an object

Creates an object in category with the given attributes.

2.2-4 AsCapCategoryObject
‣ AsCapCategoryObject( category, value )( function )

Returns: an object

EXPERIMENTAL: This specification might change any time without prior notice. Views value as an object in category.

2.2-5 AsPrimitiveValue
‣ AsPrimitiveValue( object )( attribute )
‣ AsInteger( object )( attribute )
‣ AsHomalgMatrix( object )( attribute )

Returns: a value

EXPERIMENTAL: This specification might change any time without prior notice. Views an object obtained via AsCapCategoryObject (2.2-4) as a primitive value again. Here, the word primitive means primitive from the perspective of the category. For example, from the perspective of an opposite category, objects of the underlying category are primitive values. The attribute is chosen according to the object datum type:

In all other cases or if no object datum type is given, the attribute AsPrimitiveValue is used.

2.3 Equalities for Objects

2.3-1 IsEqualForObjects
‣ IsEqualForObjects( a, b )( operation )

Returns: a boolean

The arguments are two objects \(a\) and \(b\). The output is true if \(a = b\), otherwise the output is false.

2.3-2 IsIsomorphicForObjects
‣ IsIsomorphicForObjects( a, b )( operation )

Returns: a boolean

The arguments are two objects \(a\) and \(b\). The output is true if \(a\) and \(b\) are isomorphic, that is, if there exists an isomorphism \(a \to b\), otherwise the output is false.

2.3-3 SomeIsomorphismBetweenObjects
‣ SomeIsomorphismBetweenObjects( a, b )( operation )

Returns: an isomorphism in \(\mathrm{Hom}(a,b)\)

The arguments are two isomorphic objects \(a\) and \(b\). The output is an isomorphism \(a \to b\).

2.4 Categorical Properties of Objects

2.4-1 IsBijectiveObject
‣ IsBijectiveObject( a )( property )

Returns: a boolean

The argument is an object \(a\). The output is true if \(a\) is a bijective object, otherwise the output is false.

2.4-2 IsProjective
‣ IsProjective( a )( property )

Returns: a boolean

The argument is an object \(a\). The output is true if \(a\) is a projective object, otherwise the output is false.

2.4-3 IsInjective
‣ IsInjective( a )( property )

Returns: a boolean

The argument is an object \(a\). The output is true if \(a\) is an injective object, otherwise the output is false.

2.4-4 IsTerminal
‣ IsTerminal( a )( property )

Returns: a boolean

The argument is an object \(a\) of a category \(\mathbf{C}\). The output is true if \(a\) is isomorphic to the terminal object of \(\mathbf{C}\), otherwise the output is false.

2.4-5 IsInitial
‣ IsInitial( a )( property )

Returns: a boolean

The argument is an object \(a\) of a category \(\mathbf{C}\). The output is true if \(a\) is isomorphic to the initial object of \(\mathbf{C}\), otherwise the output is false.

2.4-6 IsZeroForObjects
‣ IsZeroForObjects( a )( property )

Returns: a boolean

The argument is an object \(a\) of a category \(\mathbf{C}\). The output is true if \(a\) is isomorphic to the zero object of \(\mathbf{C}\), otherwise the output is false.

2.4-7 IsZero
‣ IsZero( a )( property )

Returns: a boolean

The argument is an object \(a\) of a category \(\mathbf{C}\). The output is true if \(a\) is isomorphic to the zero object of \(\mathbf{C}\), otherwise the output is false.

2.5 Random Objects

CAP provides two principal methods to generate random objects:

2.5-1 RandomObjectByInteger
‣ RandomObjectByInteger( C, n )( operation )

Returns: an object in \(C\)

The arguments are a category \(C\) and an integer \(n\). The output is a random object in \(C\).

2.5-2 RandomObjectByList
‣ RandomObjectByList( C, L )( operation )

Returns: an object in \(C\)

The arguments are a category \(C\) and a list \(L\). The output is a random object in \(C\).

2.5-3 RandomObject
‣ RandomObject( C, n )( operation )

These are convenient methods and they, depending on the input, delegate to one of the above methods.

2.5-4 RandomObject
‣ RandomObject( C, L )( operation )

2.6 Tool functions for caches

2.6-1 IsEqualForCacheForObjects
‣ IsEqualForCacheForObjects( phi, psi )( operation )

Returns: true or false

By default, CAP uses caches to store the values of Categorical operations. To get a value out of the cache, one needs to compare the input of a basic operation with its previous input. To compare objects in the category, IsEqualForCacheForObjects is used. By default, IsEqualForCacheForObjects falls back to IsEqualForCache (see ToolsForHomalg), which in turn defaults to recursive comparison for lists and IsIdenticalObj in all other cases. If you add a function via AddIsEqualForCacheForObjects, that function is used instead. A function \(F: a,b \mapsto bool\) is expected there. The output has to be true or false. Fail is not allowed in this context.

2.7 Object constructors

2.7-1 ObjectConstructor
‣ ObjectConstructor( C, a )( operation )

Returns: an object

The arguments are a category \(C\) and an object datum \(a\) (type and semantics of the object datum depend on the category). The output is an object of \(C\) defined by \(a\). Note that by default this CAP operation is not cached. You can change this behaviour by calling SetCachingToWeak( C, "ObjectConstructor" ) resp. SetCachingToCrisp( C, "ObjectConstructor" ).

2.7-2 /
‣ /( a, C )( operation )

Returns: an object

Shorthand for ObjectConstructor( C, a ).

2.7-3 ObjectDatum
‣ ObjectDatum( obj )( attribute )

Returns: depends on the category

The argument is a CAP category object obj. The output is a datum which can be used to construct obj, that is, IsEqualForObjects( obj, ObjectConstructor( CapCategory( obj ), ObjectDatum( obj ) ) ). Note that by default this CAP operation is not cached. You can change this behaviour by calling SetCachingToWeak( C, "ObjectDatum" ) resp. SetCachingToCrisp( C, "ObjectDatum" ).

2.8 Well-Definedness of Objects

2.8-1 IsWellDefinedForObjects
‣ IsWellDefinedForObjects( a )( operation )

Returns: a boolean

The argument is an object \(a\). The output is true if \(a\) is well-defined, otherwise the output is false.

2.9 Projectives

For a given object \(A\) in an abelian category having enough projectives, the following commands allow us to compute some projective object \(P\) together with an epimorphism \(\pi: P \rightarrow A\).

2.9-1 SomeProjectiveObject
‣ SomeProjectiveObject( A )( attribute )

Returns: an object

The argument is an object \(A\). The output is some projective object \(P\) for which there exists an epimorphism \(\pi: P \rightarrow A\).

2.9-2 EpimorphismFromSomeProjectiveObject
‣ EpimorphismFromSomeProjectiveObject( A )( attribute )

Returns: a morphism in \(\mathrm{Hom}(P,A)\)

The argument is an object \(A\). The output is an epimorphism \(\pi: P \rightarrow A\) with \(P\) a projective object that equals the output of \(\mathrm{SomeProjectiveObject}(A)\).

2.9-3 EpimorphismFromSomeProjectiveObjectWithGivenSomeProjectiveObject
‣ EpimorphismFromSomeProjectiveObjectWithGivenSomeProjectiveObject( A, P )( operation )

Returns: a morphism in \(\mathrm{Hom}(P,A)\)

The arguments are an object \(A\) and a projective object \(P\) that equals the output of \(\mathrm{SomeProjectiveObject}(A)\). The output is an epimorphism \(\pi: P \rightarrow A\).

2.9-4 ProjectiveLift
‣ ProjectiveLift( pi, epsilon )( operation )

Returns: a morphism in \(\mathrm{Hom}(P,B)\)

The arguments are a morphism \(\pi: P \rightarrow A\) with \(P\) a projective, and an epimorphism \(\epsilon: B \rightarrow A\). The output is a morphism \(\lambda: P \rightarrow B\) such that \(\epsilon \circ \lambda = \pi\).

2.10 Injectives

For a given object \(A\) in an abelian category having enough injectives, the following commands allow us to compute some injective object \(I\) together with a monomorphism \(\iota: A \rightarrow I\).

2.10-1 SomeInjectiveObject
‣ SomeInjectiveObject( A )( attribute )

Returns: an object

The argument is an object \(A\). The output is some injective object \(I\) for which there exists a monomorphism \(\iota: A \rightarrow I\).

2.10-2 MonomorphismIntoSomeInjectiveObject
‣ MonomorphismIntoSomeInjectiveObject( A )( attribute )

Returns: a morphism in \(\mathrm{Hom}(I,A)\)

The argument is an object \(A\). The output is a monomorphism \(\iota: A \rightarrow I\) with \(I\) an injective object that equals the output of \(\mathrm{SomeInjectiveObject}(A)\).

2.10-3 MonomorphismIntoSomeInjectiveObjectWithGivenSomeInjectiveObject
‣ MonomorphismIntoSomeInjectiveObjectWithGivenSomeInjectiveObject( A, I )( operation )

Returns: a morphism in \(\mathrm{Hom}(I,A)\)

The arguments are an object \(A\) and an injective object \(I\) that equals the output of \(\mathrm{SomeInjectiveObject}(A)\). The output is a monomorphism \(\iota: A \rightarrow I\).

2.10-4 InjectiveColift
‣ InjectiveColift( iota, beta )( operation )

Returns: a morphism in \(\mathrm{Hom}(A,I)\)

The arguments are a monomorphism \(\iota: B \rightarrow A\) and a morphism \(\beta: B \rightarrow I\) where \(I\) is an injective object. The output is a morphism \(\lambda: A \rightarrow I\) such that \(\lambda \circ \iota = \beta\).

2.11 Simplified Objects

Let \(i\) be a positive integer or \(\infty\). For a given object \(A\), an \(i\)-th simplified object of \(A\) consists of

The idea is that the greater the \(i\), the "simpler" the \(A_i\) (but this could mean the harder the computation) with \(\infty\) as a possible value.

2.11-1 Simplify
‣ Simplify( A )( attribute )

Returns: an object

The argument is an object \(A\). The output is a simplified object \(A_{\infty}\).

2.11-2 SimplifyObject
‣ SimplifyObject( A, i )( operation )

Returns: an object

The arguments are an object \(A\) and a positive integer \(i\) or infinity. The output is a simplified object \(A_i\).

2.11-3 SimplifyObject_IsoFromInputObject
‣ SimplifyObject_IsoFromInputObject( A, i )( operation )

Returns: a morphism in \(\mathrm{Hom}(A,A_i)\)

The arguments are an object \(A\) and a positive integer \(i\) or infinity. The output is an isomorphism to a simplified object \(\iota_A^i: A \rightarrow A_i\).

2.11-4 SimplifyObject_IsoToInputObject
‣ SimplifyObject_IsoToInputObject( A, i )( operation )

Returns: a morphism in \(\mathrm{Hom}(A_i,A)\)

The arguments are an object \(A\) and a positive integer \(i\) or infinity. The output is an isomorphism from a simplified object \((\iota_A^i)^{-1}: A_i \rightarrow A\) which is the inverse of the output of SimplifyObject_IsoFromInputObject.

2.12 Dimensions

2.12-1 ProjectiveDimension
‣ ProjectiveDimension( A )( attribute )

Returns: a nonnegative integer or infinity

The argument is an object \(A\). The output is a the projective dimension of \(A\).

2.12-2 InjectiveDimension
‣ InjectiveDimension( A )( attribute )

Returns: a nonnegative integer or infinity

The argument is an object \(A\). The output is a the injective dimension of \(A\).

 [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 15 16 Ind

generated by GAPDoc2HTML