Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 A B C Bib Ind

### 10 Functors

#### 10.4 Basic Functors

##### 10.4-1 functor_Cokernel
 ‣ functor_Cokernel ( global variable )

The functor that associates to a map its cokernel.

InstallValue( functor_Cokernel_for_fp_modules,
CreateHomalgFunctor(
[ "name", "Cokernel" ],
[ "category", HOMALG_MODULES.category ],
[ "operation", "Cokernel" ],
[ "natural_transformation", "CokernelEpi" ],
[ "special", true ],
[ "number_of_arguments", 1 ],
[ "1", [ [ "covariant" ],
[ IsMapOfFinitelyGeneratedModulesRep,
[ IsHomalgChainMorphism, IsImageSquare ] ] ] ],
[ "OnObjects", _Functor_Cokernel_OnModules ]
)
);


##### 10.4-2 Cokernel
 ‣ Cokernel( phi ) ( operation )

The following example also makes use of the natural transformation CokernelEpi.

gap> ZZ := HomalgRingOfIntegers( );
Z
gap> M := HomalgMatrix( "[ 2, 3, 4,   5, 6, 7 ]", 2, 3, ZZ );;
gap> M := LeftPresentation( M );
<A non-torsion left module presented by 2 relations for 3 generators>
gap> N := HomalgMatrix( "[ 2, 3, 4, 5,   6, 7, 8, 9 ]", 2, 4, ZZ );;
gap> N := LeftPresentation( N );
<A non-torsion left module presented by 2 relations for 4 generators>
gap> mat := HomalgMatrix( "[ \
> 1, 0, -3, -6, \
> 0, 1,  6, 11, \
> 1, 0, -3, -6  \
> ]", 3, 4, ZZ );;
gap> phi := HomalgMap( mat, M, N );;
gap> IsMorphism( phi );
true
gap> phi;
<A homomorphism of left modules>
gap> coker := Cokernel( phi );
<A left module presented by 5 relations for 4 generators>
gap> ByASmallerPresentation( coker );
<A rank 1 left module presented by 1 relation for 2 generators>
gap> Display( coker );
Z/< 8 > + Z^(1 x 1)
gap> nu := CokernelEpi( phi );
<An epimorphism of left modules>
gap> Display( nu );
[ [  -5,   0 ],
[  -6,   1 ],
[   1,  -2 ],
[   0,   1 ] ]

the map is currently represented by the above 4 x 2 matrix
gap> DefectOfExactness( phi, nu );
<A zero left module>
gap> ByASmallerPresentation( nu );
<A non-zero epimorphism of left modules>
gap> Display( nu );
[ [   2,   0 ],
[   1,  -2 ],
[   0,   1 ] ]

the map is currently represented by the above 3 x 2 matrix
gap> PreInverse( nu );
false


##### 10.4-3 functor_ImageObject
 ‣ functor_ImageObject ( global variable )

The functor that associates to a map its image.

InstallValue( functor_ImageObject_for_fp_modules,
CreateHomalgFunctor(
[ "name", "ImageObject for modules" ],
[ "category", HOMALG_MODULES.category ],
[ "operation", "ImageObject" ],
[ "natural_transformation", "ImageObjectEmb" ],
[ "number_of_arguments", 1 ],
[ "1", [ [ "covariant" ],
[ IsMapOfFinitelyGeneratedModulesRep and
AdmissibleInputForHomalgFunctors ] ] ],
[ "OnObjects", _Functor_ImageObject_OnModules ]
)
);


##### 10.4-4 ImageObject
 ‣ ImageObject( phi ) ( operation )

The following example also makes use of the natural transformations ImageObjectEpi and ImageObjectEmb.

gap> ZZ := HomalgRingOfIntegers( );
Z
gap> M := HomalgMatrix( "[ 2, 3, 4,   5, 6, 7 ]", 2, 3, ZZ );;
gap> M := LeftPresentation( M );
<A non-torsion left module presented by 2 relations for 3 generators>
gap> N := HomalgMatrix( "[ 2, 3, 4, 5,   6, 7, 8, 9 ]", 2, 4, ZZ );;
gap> N := LeftPresentation( N );
<A non-torsion left module presented by 2 relations for 4 generators>
gap> mat := HomalgMatrix( "[ \
> 1, 0, -3, -6, \
> 0, 1,  6, 11, \
> 1, 0, -3, -6  \
> ]", 3, 4, ZZ );;
gap> phi := HomalgMap( mat, M, N );;
gap> IsMorphism( phi );
true
gap> phi;
<A homomorphism of left modules>
gap> im := ImageObject( phi );
<A left module presented by yet unknown relations for 3 generators>
gap> ByASmallerPresentation( im );
<A free left module of rank 1 on a free generator>
gap> pi := ImageObjectEpi( phi );
<A non-zero split epimorphism of left modules>
gap> epsilon := ImageObjectEmb( phi );
<A monomorphism of left modules>
gap> phi = pi * epsilon;
true


##### 10.4-5 Kernel
 ‣ Kernel( phi ) ( operation )

The following example also makes use of the natural transformation KernelEmb.

gap> ZZ := HomalgRingOfIntegers( );
Z
gap> M := HomalgMatrix( "[ 2, 3, 4,   5, 6, 7 ]", 2, 3, ZZ );;
gap> M := LeftPresentation( M );
<A non-torsion left module presented by 2 relations for 3 generators>
gap> N := HomalgMatrix( "[ 2, 3, 4, 5,   6, 7, 8, 9 ]", 2, 4, ZZ );;
gap> N := LeftPresentation( N );
<A non-torsion left module presented by 2 relations for 4 generators>
gap> mat := HomalgMatrix( "[ \
> 1, 0, -3, -6, \
> 0, 1,  6, 11, \
> 1, 0, -3, -6  \
> ]", 3, 4, ZZ );;
gap> phi := HomalgMap( mat, M, N );;
gap> IsMorphism( phi );
true
gap> phi;
<A homomorphism of left modules>
gap> ker := Kernel( phi );
<A cyclic left module presented by yet unknown relations for a cyclic generato\
r>
gap> Display( ker );
Z/< -3 >
gap> ByASmallerPresentation( last );
<A cyclic torsion left module presented by 1 relation for a cyclic generator>
gap> Display( ker );
Z/< 3 >
gap> iota := KernelEmb( phi );
<A monomorphism of left modules>
gap> Display( iota );
[ [  0,  2,  4 ] ]

the map is currently represented by the above 1 x 3 matrix
gap> DefectOfExactness( iota, phi );
<A zero left module>
gap> ByASmallerPresentation( iota );
<A non-zero monomorphism of left modules>
gap> Display( iota );
[ [  2,  0 ] ]

the map is currently represented by the above 1 x 2 matrix
gap> PostInverse( iota );
fail


##### 10.4-6 DefectOfExactness
 ‣ DefectOfExactness( phi, psi ) ( operation )

We follow the associative convention for applying maps. For left modules phi is applied first and from the right. For right modules psi is applied first and from the left.

The following example also makes use of the natural transformation KernelEmb.

gap> ZZ := HomalgRingOfIntegers( );
Z
gap> M := HomalgMatrix( "[ 2, 3, 4, 0,   5, 6, 7, 0 ]", 2, 4, ZZ );;
gap> M := LeftPresentation( M );
<A non-torsion left module presented by 2 relations for 4 generators>
gap> N := HomalgMatrix( "[ 2, 3, 4, 5,   6, 7, 8, 9 ]", 2, 4, ZZ );;
gap> N := LeftPresentation( N );
<A non-torsion left module presented by 2 relations for 4 generators>
gap> mat := HomalgMatrix( "[ \
> 1, 3,  3,  3, \
> 0, 3, 10, 17, \
> 1, 3,  3,  3, \
> 0, 0,  0,  0  \
> ]", 4, 4, ZZ );;
gap> phi := HomalgMap( mat, M, N );;
gap> IsMorphism( phi );
true
gap> phi;
<A homomorphism of left modules>
gap> iota := KernelEmb( phi );
<A monomorphism of left modules>
gap> DefectOfExactness( iota, phi );
<A zero left module>
gap> hom_iota := Hom( iota );	## a shorthand for Hom( iota, ZZ );
<A homomorphism of right modules>
gap> hom_phi := Hom( phi );	## a shorthand for Hom( phi, ZZ );
<A homomorphism of right modules>
gap> DefectOfExactness( hom_iota, hom_phi );
<A cyclic right module on a cyclic generator satisfying yet unknown relations>
gap> ByASmallerPresentation( last );
<A cyclic torsion right module on a cyclic generator satisfying 1 relation>
gap> Display( last );
Z/< 2 >


##### 10.4-7 Functor_Hom
 ‣ Functor_Hom ( global variable )

The bifunctor Hom.

InstallValue( Functor_Hom_for_fp_modules,
CreateHomalgFunctor(
[ "name", "Hom" ],
[ "category", HOMALG_MODULES.category ],
[ "operation", "Hom" ],
[ "number_of_arguments", 2 ],
[ "1", [ [ "contravariant", "right adjoint", "distinguished" ] ] ],
[ "2", [ [ "covariant", "left exact" ] ] ],
[ "OnObjects", _Functor_Hom_OnModules ],
[ "OnMorphisms", _Functor_Hom_OnMaps ],
[ "MorphismConstructor", HOMALG_MODULES.category.MorphismConstructor ]
)
);


##### 10.4-8 Hom
 ‣ Hom( o1, o2 ) ( operation )

o1 resp. o2 could be a module, a map, a complex (of modules or of again of complexes), or a chain morphism.

Each generator of a module of homomorphisms is displayed as a matrix of appropriate dimensions.

gap> ZZ := HomalgRingOfIntegers( );
Z
gap> M := HomalgMatrix( "[ 2, 3, 4,   5, 6, 7 ]", 2, 3, ZZ );;
gap> M := LeftPresentation( M );
<A non-torsion left module presented by 2 relations for 3 generators>
gap> N := HomalgMatrix( "[ 2, 3, 4, 5,   6, 7, 8, 9 ]", 2, 4, ZZ );;
gap> N := LeftPresentation( N );
<A non-torsion left module presented by 2 relations for 4 generators>
gap> mat := HomalgMatrix( "[ \
> 1, 0, -3, -6, \
> 0, 1,  6, 11, \
> 1, 0, -3, -6  \
> ]", 3, 4, ZZ );;
gap> phi := HomalgMap( mat, M, N );;
gap> IsMorphism( phi );
true
gap> phi;
<A homomorphism of left modules>
gap> psi := Hom( phi, M );
<A homomorphism of right modules>
gap> ByASmallerPresentation( psi );
<A non-zero homomorphism of right modules>
gap> Display( psi );
[ [   1,   1,   0,   1 ],
[   2,   2,   0,   0 ],
[   0,   0,   6,  10 ] ]

the map is currently represented by the above 3 x 4 matrix
gap> homNM := Source( psi );
<A rank 2 right module on 4 generators satisfying 2 relations>
gap> IsIdenticalObj( homNM, Hom( N, M ) );	## the caching at work
true
gap> homMM := Range( psi );
<A rank 1 right module on 3 generators satisfying 2 relations>
gap> IsIdenticalObj( homMM, Hom( M, M ) );	## the caching at work
true
gap> Display( homNM );
Z/< 3 > + Z/< 3 > + Z^(2 x 1)
gap> Display( homMM );
Z/< 3 > + Z/< 3 > + Z^(1 x 1)
gap> IsMonomorphism( psi );
false
gap> IsEpimorphism( psi );
false
gap> GeneratorsOfModule( homMM );
<A set of 3 generators of a homalg right module>
gap> Display( last );
[ [  0,  0,  0 ],
[  0,  1,  2 ],
[  0,  0,  0 ] ]

the map is currently represented by the above 3 x 3 matrix

[ [  0,  2,  4 ],
[  0,  0,  0 ],
[  0,  2,  4 ] ]

the map is currently represented by the above 3 x 3 matrix

[ [   0,   1,   3 ],
[   0,   0,  -2 ],
[   0,   1,   3 ] ]

the map is currently represented by the above 3 x 3 matrix

a set of 3 generators given by the the above matrices
gap> GeneratorsOfModule( homNM );
<A set of 4 generators of a homalg right module>
gap> Display( last );
[ [  0,  1,  2 ],
[  0,  1,  2 ],
[  0,  1,  2 ],
[  0,  0,  0 ] ]

the map is currently represented by the above 4 x 3 matrix

[ [  0,  1,  2 ],
[  0,  0,  0 ],
[  0,  0,  0 ],
[  0,  2,  4 ] ]

the map is currently represented by the above 4 x 3 matrix

[ [   0,   0,  -3 ],
[   0,   0,   7 ],
[   0,   0,  -5 ],
[   0,   0,   1 ] ]

the map is currently represented by the above 4 x 3 matrix

[ [   0,   1,  -3 ],
[   0,   0,  12 ],
[   0,   0,  -9 ],
[   0,   2,   6 ] ]

the map is currently represented by the above 4 x 3 matrix

a set of 4 generators given by the the above matrices


If for example the source N gets a new presentation, you will see the effect on the generators:

gap> ByASmallerPresentation( N );
<A rank 2 left module presented by 1 relation for 3 generators>
gap> GeneratorsOfModule( homNM );
<A set of 4 generators of a homalg right module>
gap> Display( last );
[ [  0,  3,  6 ],
[  0,  1,  2 ],
[  0,  0,  0 ] ]

the map is currently represented by the above 3 x 3 matrix

[ [   0,   9,  18 ],
[   0,   0,   0 ],
[   0,   2,   4 ] ]

the map is currently represented by the above 3 x 3 matrix

[ [   0,   0,   0 ],
[   0,   0,  -5 ],
[   0,   0,   1 ] ]

the map is currently represented by the above 3 x 3 matrix

[ [   0,   9,  18 ],
[   0,   0,  -9 ],
[   0,   2,   6 ] ]

the map is currently represented by the above 3 x 3 matrix

a set of 4 generators given by the the above matrices


Now we compute a certain natural filtration on Hom(M,M):

gap> dM := Resolution( M );
<A non-zero right acyclic complex containing a single morphism of left modules\
at degrees [ 0 .. 1 ]>
gap> hMM := Hom( dM, dM );
<A non-zero acyclic cocomplex containing a single morphism of right complexes \
at degrees [ 0 .. 1 ]>
gap> BMM := HomalgBicomplex( hMM );
<A non-zero bicocomplex containing right modules at bidegrees [ 0 .. 1 ]x
[ -1 .. 0 ]>
gap> II_E := SecondSpectralSequenceWithFiltration( BMM );
<A stable cohomological spectral sequence with sheets at levels
[ 0 .. 2 ] each consisting of right modules at bidegrees [ -1 .. 0 ]x
[ 0 .. 1 ]>
gap> Display( II_E );
The associated transposed spectral sequence:

a cohomological spectral sequence at bidegrees
[ [ 0 .. 1 ], [ -1 .. 0 ] ]
---------
Level 0:

* *
* *
---------
Level 1:

* *
. .
---------
Level 2:

s s
. .

Now the spectral sequence of the bicomplex:

a cohomological spectral sequence at bidegrees
[ [ -1 .. 0 ], [ 0 .. 1 ] ]
---------
Level 0:

* *
* *
---------
Level 1:

* *
* *
---------
Level 2:

s s
. s
gap> filt := FiltrationBySpectralSequence( II_E );
<A descending filtration with degrees [ -1 .. 0 ] and graded parts:

-1:	<A non-zero cyclic torsion right module on a cyclic generator satisfying
yet unknown relations>
0:	<A rank 1 right module on 3 generators satisfying 2 relations>
of
<A right module on 4 generators satisfying yet unknown relations>>
gap> ByASmallerPresentation( filt );
<A descending filtration with degrees [ -1 .. 0 ] and graded parts:

-1:	<A non-zero cyclic torsion right module on a cyclic generator satisfying 1\
relation>
0:	<A rank 1 right module on 2 generators satisfying 1 relation>
of
<A rank 1 right module on 3 generators satisfying 2 relations>>
gap> Display( filt );
Degree -1:

Z/< 3 >
----------
Degree 0:

Z/< 3 > + Z^(1 x 1)
gap> Display( homMM );
Z/< 3 > + Z/< 3 > + Z^(1 x 1)


##### 10.4-9 Functor_TensorProduct
 ‣ Functor_TensorProduct ( global variable )

The tensor product bifunctor.

InstallValue( Functor_TensorProduct_for_fp_modules,
CreateHomalgFunctor(
[ "name", "TensorProduct" ],
[ "category", HOMALG_MODULES.category ],
[ "operation", "TensorProductOp" ],
[ "number_of_arguments", 2 ],
[ "1", [ [ "covariant", "left adjoint", "distinguished" ] ] ],
[ "2", [ [ "covariant", "left adjoint" ] ] ],
[ "OnObjects", _Functor_TensorProduct_OnModules ],
[ "OnMorphisms", _Functor_TensorProduct_OnMaps ],
[ "MorphismConstructor", HOMALG_MODULES.category.MorphismConstructor ]
)
);


##### 10.4-10 TensorProduct
 ‣ TensorProduct( o1, o2 ) ( operation )
 ‣ \*( o1, o2 ) ( operation )

o1 resp. o2 could be a module, a map, a complex (of modules or of again of complexes), or a chain morphism.

The symbol * is a shorthand for several operations associated with the functor Functor_TensorProduct_for_fp_modules installed under the name TensorProduct.

gap> ZZ := HomalgRingOfIntegers( );
Z
gap> M := HomalgMatrix( "[ 2, 3, 4,   5, 6, 7 ]", 2, 3, ZZ );
<A 2 x 3 matrix over an internal ring>
gap> M := LeftPresentation( M );
<A non-torsion left module presented by 2 relations for 3 generators>
gap> N := HomalgMatrix( "[ 2, 3, 4, 5,   6, 7, 8, 9 ]", 2, 4, ZZ );
<A 2 x 4 matrix over an internal ring>
gap> N := LeftPresentation( N );
<A non-torsion left module presented by 2 relations for 4 generators>
gap> mat := HomalgMatrix( "[ \
> 1, 0, -3, -6, \
> 0, 1,  6, 11, \
> 1, 0, -3, -6  \
> ]", 3, 4, ZZ );
<A 3 x 4 matrix over an internal ring>
gap> phi := HomalgMap( mat, M, N );
<A "homomorphism" of left modules>
gap> IsMorphism( phi );
true
gap> phi;
<A homomorphism of left modules>
gap> L := Hom( ZZ, M );
<A rank 1 right module on 3 generators satisfying yet unknown relations>
gap> ByASmallerPresentation( L );
<A rank 1 right module on 2 generators satisfying 1 relation>
gap> Display( L );
Z/< 3 > + Z^(1 x 1)
gap> L;
<A rank 1 right module on 2 generators satisfying 1 relation>
gap> psi := phi * L;
<A homomorphism of right modules>
gap> ByASmallerPresentation( psi );
<A non-zero homomorphism of right modules>
gap> Display( psi );
[ [   0,   0,   1,   1 ],
[   0,   0,   8,   1 ],
[   0,   0,   0,  -2 ],
[   0,   0,   0,   2 ] ]

the map is currently represented by the above 4 x 4 matrix
gap> ML := Source( psi );
<A rank 1 right module on 4 generators satisfying 3 relations>
gap> IsIdenticalObj( ML, M * L );	## the caching at work
true
gap> NL := Range( psi );
<A rank 2 right module on 4 generators satisfying 2 relations>
gap> IsIdenticalObj( NL, N * L );	## the caching at work
true
gap> Display( ML );
Z/< 3 > + Z/< 3 > + Z/< 3 > + Z^(1 x 1)
gap> Display( NL );
Z/< 3 > + Z/< 12 > + Z^(2 x 1)


Now we compute a certain natural filtration on the tensor product M*L:

gap> P := Resolution( M );
<A non-zero right acyclic complex containing a single morphism of left modules\
at degrees [ 0 .. 1 ]>
gap> GP := Hom( P );
<A non-zero acyclic cocomplex containing a single morphism of right modules at\
degrees [ 0 .. 1 ]>
gap> CE := Resolution( GP );
<An acyclic cocomplex containing a single morphism of right complexes at degre\
es [ 0 .. 1 ]>
gap> FCE := Hom( CE, L );
<A non-zero acyclic complex containing a single morphism of left cocomplexes a\
t degrees [ 0 .. 1 ]>
gap> BC := HomalgBicomplex( FCE );
<A non-zero bicomplex containing left modules at bidegrees [ 0 .. 1 ]x
[ -1 .. 0 ]>
gap> II_E := SecondSpectralSequenceWithFiltration( BC );
<A stable homological spectral sequence with sheets at levels
[ 0 .. 2 ] each consisting of left modules at bidegrees [ -1 .. 0 ]x
[ 0 .. 1 ]>
gap> Display( II_E );
The associated transposed spectral sequence:

a homological spectral sequence at bidegrees
[ [ 0 .. 1 ], [ -1 .. 0 ] ]
---------
Level 0:

* *
* *
---------
Level 1:

* *
. .
---------
Level 2:

s s
. .

Now the spectral sequence of the bicomplex:

a homological spectral sequence at bidegrees
[ [ -1 .. 0 ], [ 0 .. 1 ] ]
---------
Level 0:

* *
* *
---------
Level 1:

* *
. s
---------
Level 2:

s s
. s
gap> filt := FiltrationBySpectralSequence( II_E );
<An ascending filtration with degrees [ -1 .. 0 ] and graded parts:
0:	<A rank 1 left module presented by 1 relation for 2 generators>
-1:	<A non-zero left module presented by 2 relations for 2 generators>
of
<A non-zero left module presented by 10 relations for 6 generators>>
gap> ByASmallerPresentation( filt );
<An ascending filtration with degrees [ -1 .. 0 ] and graded parts:
0:	<A rank 1 left module presented by 1 relation for 2 generators>
-1:	<A non-zero torsion left module presented by 2 relations
for 2 generators>
of
<A rank 1 left module presented by 3 relations for 4 generators>>
gap> Display( filt );
Degree 0:

Z/< 3 > + Z^(1 x 1)
----------
Degree -1:

Z/< 3 > + Z/< 3 >
gap> Display( ML );
Z/< 3 > + Z/< 3 > + Z/< 3 > + Z^(1 x 1)


##### 10.4-11 Functor_Ext
 ‣ Functor_Ext ( global variable )

The bifunctor Ext.

Below is the only specific line of code used to define Functor_Ext_for_fp_modules and all the different operations Ext in homalg.

RightSatelliteOfCofunctor( Functor_Hom_for_fp_modules, "Ext" );


##### 10.4-12 Ext
 ‣ Ext( [c, ]o1, o2[, str] ) ( operation )

Compute the c-th extension object of o1 with o2 where c is a nonnegative integer and o1 resp. o2 could be a module, a map, a complex (of modules or of again of complexes), or a chain morphism. If str="a" then the (cohomologically) graded object Ext^i(o1,o2) for 0 ≤ i ≤c is computed. If neither c nor str is specified then the cohomologically graded object Ext^i(o1,o2) for 0 ≤ i ≤ d is computed, where d is the length of the internally computed free resolution of o1.

Each generator of a module of extensions is displayed as a matrix of appropriate dimensions.

gap> ZZ := HomalgRingOfIntegers( );
Z
gap> M := HomalgMatrix( "[ 2, 3, 4,   5, 6, 7 ]", 2, 3, ZZ );;
gap> M := LeftPresentation( M );
<A non-torsion left module presented by 2 relations for 3 generators>
gap> N := TorsionObject( M );
<A cyclic torsion left module presented by yet unknown relations for a cyclic \
generator>
gap> iota := TorsionObjectEmb( M );
<A monomorphism of left modules>
gap> psi := Ext( 1, iota, N );
<A homomorphism of right modules>
gap> ByASmallerPresentation( psi );
<A non-zero homomorphism of right modules>
gap> Display( psi );
[ [  2 ] ]

the map is currently represented by the above 1 x 1 matrix
gap> extNN := Range( psi );
<A non-zero cyclic torsion right module on a cyclic generator satisfying 1 rel\
ation>
gap> IsIdenticalObj( extNN, Ext( 1, N, N ) );	## the caching at work
true
gap> extMN := Source( psi );
<A non-zero cyclic torsion right module on a cyclic generator satisfying 1 rel\
ation>
gap> IsIdenticalObj( extMN, Ext( 1, M, N ) );	## the caching at work
true
gap> Display( extNN );
Z/< 3 >
gap> Display( extMN );
Z/< 3 >


##### 10.4-13 Functor_Tor
 ‣ Functor_Tor ( global variable )

The bifunctor Tor.

Below is the only specific line of code used to define Functor_Tor_for_fp_modules and all the different operations Tor in homalg.

LeftSatelliteOfFunctor( Functor_TensorProduct_for_fp_modules, "Tor" );


##### 10.4-14 Tor
 ‣ Tor( [c, ]o1, o2[, str] ) ( operation )

Compute the c-th torsion object of o1 with o2 where c is a nonnegative integer and o1 resp. o2 could be a module, a map, a complex (of modules or of again of complexes), or a chain morphism. If str="a" then the (cohomologically) graded object Tor_i(o1,o2) for 0 ≤ i ≤c is computed. If neither c nor str is specified then the cohomologically graded object Tor_i(o1,o2) for 0 ≤ i ≤ d is computed, where d is the length of the internally computed free resolution of o1.

gap> ZZ := HomalgRingOfIntegers( );
Z
gap> M := HomalgMatrix( "[ 2, 3, 4,   5, 6, 7 ]", 2, 3, ZZ );;
gap> M := LeftPresentation( M );
<A non-torsion left module presented by 2 relations for 3 generators>
gap> N := TorsionObject( M );
<A cyclic torsion left module presented by yet unknown relations for a cyclic \
generator>
gap> iota := TorsionObjectEmb( M );
<A monomorphism of left modules>
gap> psi := Tor( 1, iota, N );
<A homomorphism of left modules>
gap> ByASmallerPresentation( psi );
<A non-zero homomorphism of left modules>
gap> Display( psi );
[ [  1 ] ]

the map is currently represented by the above 1 x 1 matrix
gap> torNN := Source( psi );
<A non-zero cyclic torsion left module presented by 1 relation for a cyclic ge\
nerator>
gap> IsIdenticalObj( torNN, Tor( 1, N, N ) );	## the caching at work
true
gap> torMN := Range( psi );
<A non-zero cyclic torsion left module presented by 1 relation for a cyclic ge\
nerator>
gap> IsIdenticalObj( torMN, Tor( 1, M, N ) );	## the caching at work
true
gap> Display( torNN );
Z/< 3 >
gap> Display( torMN );
Z/< 3 >


##### 10.4-15 Functor_RHom
 ‣ Functor_RHom ( global variable )

The bifunctor RHom.

Below is the only specific line of code used to define Functor_RHom_for_fp_modules and all the different operations RHom in homalg.

RightDerivedCofunctor( Functor_Hom_for_fp_modules );


##### 10.4-16 RHom
 ‣ RHom( [c, ]o1, o2[, str] ) ( operation )

Compute the c-th extension object of o1 with o2 where c is a nonnegative integer and o1 resp. o2 could be a module, a map, a complex (of modules or of again of complexes), or a chain morphism. The string str may take different values:

• If str="a" then R^i Hom(o1,o2) for 0 ≤ i ≤c is computed.

• If str="c" then the c-th connecting homomorphism with respect to the short exact sequence o1 is computed.

• If str="t" then the exact triangle upto cohomological degree c with respect to the short exact sequence o1 is computed.

If neither c nor str is specified then the cohomologically graded object R^i Hom(o1,o2) for 0 ≤ i ≤ d is computed, where d is the length of the internally computed free resolution of o1.

Each generator of a module of derived homomorphisms is displayed as a matrix of appropriate dimensions.

gap> ZZ := HomalgRingOfIntegers( );
Z
gap> m := HomalgMatrix( [ [ 8, 0 ], [ 0, 2 ] ], ZZ );;
gap> M := LeftPresentation( m );
<A left module presented by 2 relations for 2 generators>
gap> Display( M );
Z/< 8 > + Z/< 2 >
gap> M;
<A torsion left module presented by 2 relations for 2 generators>
gap> a := HomalgMatrix( [ [ 2, 0 ] ], ZZ );;
gap> alpha := HomalgMap( a, "free", M );
<A homomorphism of left modules>
gap> pi := CokernelEpi( alpha );
<An epimorphism of left modules>
gap> Display( pi );
[ [  1,  0 ],
[  0,  1 ] ]

the map is currently represented by the above 2 x 2 matrix
gap> iota := KernelEmb( pi );
<A monomorphism of left modules>
gap> Display( iota );
[ [  2,  0 ] ]

the map is currently represented by the above 1 x 2 matrix
gap> N := Kernel( pi );
<A cyclic torsion left module presented by yet unknown relations for a cyclic \
generator>
gap> Display( N );
Z/< 4 >
gap> C := HomalgComplex( pi );
<A left acyclic complex containing a single morphism of left modules at degree\
s [ 0 .. 1 ]>
gap> Add( C, iota );
gap> ByASmallerPresentation( C );
<A non-zero short exact sequence containing
2 morphisms of left modules at degrees [ 0 .. 2 ]>
gap> Display( C );
-------------------------
at homology degree: 2
Z/< 4 >
-------------------------
[ [  0,  6 ] ]

the map is currently represented by the above 1 x 2 matrix
------------v------------
at homology degree: 1
Z/< 2 > + Z/< 8 >
-------------------------
[ [  0,  1 ],
[  1,  1 ] ]

the map is currently represented by the above 2 x 2 matrix
------------v------------
at homology degree: 0
Z/< 2 > + Z/< 2 >
-------------------------
gap> T := RHom( C, N );
<An exact cotriangle containing 3 morphisms of right cocomplexes at degrees
[ 0, 1, 2, 0 ]>
gap> ByASmallerPresentation( T );
<A non-zero exact cotriangle containing
3 morphisms of right cocomplexes at degrees [ 0, 1, 2, 0 ]>
gap> L := LongSequence( T );
<A cosequence containing 5 morphisms of right modules at degrees [ 0 .. 5 ]>
gap> Display( L );
-------------------------
at cohomology degree: 5
Z/< 4 >
------------^------------
[ [  0,  3 ] ]

the map is currently represented by the above 1 x 2 matrix
-------------------------
at cohomology degree: 4
Z/< 2 > + Z/< 4 >
------------^------------
[ [  0,  1 ],
[  0,  0 ] ]

the map is currently represented by the above 2 x 2 matrix
-------------------------
at cohomology degree: 3
Z/< 2 > + Z/< 2 >
------------^------------
[ [  1 ],
[  0 ] ]

the map is currently represented by the above 2 x 1 matrix
-------------------------
at cohomology degree: 2
Z/< 4 >
------------^------------
[ [  0,  2 ] ]

the map is currently represented by the above 1 x 2 matrix
-------------------------
at cohomology degree: 1
Z/< 2 > + Z/< 4 >
------------^------------
[ [  0,  1 ],
[  2,  0 ] ]

the map is currently represented by the above 2 x 2 matrix
-------------------------
at cohomology degree: 0
Z/< 2 > + Z/< 2 >
-------------------------
gap> IsExactSequence( L );
true
gap> L;
<An exact cosequence containing 5 morphisms of right modules at degrees
[ 0 .. 5 ]>


##### 10.4-17 Functor_LTensorProduct
 ‣ Functor_LTensorProduct ( global variable )

The bifunctor LTensorProduct.

Below is the only specific line of code used to define Functor_LTensorProduct_for_fp_modules and all the different operations LTensorProduct in homalg.

LeftDerivedFunctor( Functor_TensorProduct_for_fp_modules );


##### 10.4-18 LTensorProduct
 ‣ LTensorProduct( [c, ]o1, o2[, str] ) ( operation )

Compute the c-th torsion object of o1 with o2 where c is a nonnegative integer and o1 resp. o2 could be a module, a map, a complex (of modules or of again of complexes), or a chain morphism. The string str may take different values:

• If str="a" then L_i TensorProduct(o1,o2) for 0 ≤ i ≤c is computed.

• If str="c" then the c-th connecting homomorphism with respect to the short exact sequence o1 is computed.

• If str="t" then the exact triangle upto cohomological degree c with respect to the short exact sequence o1 is computed.

If neither c nor str is specified then the cohomologically graded object L_i TensorProduct(o1,o2) for 0 ≤ i ≤ d is computed, where d is the length of the internally computed free resolution of o1.

Each generator of a module of derived homomorphisms is displayed as a matrix of appropriate dimensions.

gap> ZZ := HomalgRingOfIntegers( );
Z
gap> m := HomalgMatrix( [ [ 8, 0 ], [ 0, 2 ] ], ZZ );;
gap> M := LeftPresentation( m );
<A left module presented by 2 relations for 2 generators>
gap> Display( M );
Z/< 8 > + Z/< 2 >
gap> M;
<A torsion left module presented by 2 relations for 2 generators>
gap> a := HomalgMatrix( [ [ 2, 0 ] ], ZZ );;
gap> alpha := HomalgMap( a, "free", M );
<A homomorphism of left modules>
gap> pi := CokernelEpi( alpha );
<An epimorphism of left modules>
gap> Display( pi );
[ [  1,  0 ],
[  0,  1 ] ]

the map is currently represented by the above 2 x 2 matrix
gap> iota := KernelEmb( pi );
<A monomorphism of left modules>
gap> Display( iota );
[ [  2,  0 ] ]

the map is currently represented by the above 1 x 2 matrix
gap> N := Kernel( pi );
<A cyclic torsion left module presented by yet unknown relations for a cyclic \
generator>
gap> Display( N );
Z/< 4 >
gap> C := HomalgComplex( pi );
<A left acyclic complex containing a single morphism of left modules at degree\
s [ 0 .. 1 ]>
gap> Add( C, iota );
gap> ByASmallerPresentation( C );
<A non-zero short exact sequence containing
2 morphisms of left modules at degrees [ 0 .. 2 ]>
gap> Display( C );
-------------------------
at homology degree: 2
Z/< 4 >
-------------------------
[ [  0,  6 ] ]

the map is currently represented by the above 1 x 2 matrix
------------v------------
at homology degree: 1
Z/< 2 > + Z/< 8 >
-------------------------
[ [  0,  1 ],
[  1,  1 ] ]

the map is currently represented by the above 2 x 2 matrix
------------v------------
at homology degree: 0
Z/< 2 > + Z/< 2 >
-------------------------
gap> T := LTensorProduct( C, N );
<An exact triangle containing 3 morphisms of left complexes at degrees
[ 1, 2, 3, 1 ]>
gap> ByASmallerPresentation( T );
<A non-zero exact triangle containing
3 morphisms of left complexes at degrees [ 1, 2, 3, 1 ]>
gap> L := LongSequence( T );
<A sequence containing 5 morphisms of left modules at degrees [ 0 .. 5 ]>
gap> Display( L );
-------------------------
at homology degree: 5
Z/< 4 >
-------------------------
[ [  1,  3 ] ]

the map is currently represented by the above 1 x 2 matrix
------------v------------
at homology degree: 4
Z/< 2 > + Z/< 4 >
-------------------------
[ [  0,  1 ],
[  0,  1 ] ]

the map is currently represented by the above 2 x 2 matrix
------------v------------
at homology degree: 3
Z/< 2 > + Z/< 2 >
-------------------------
[ [  2 ],
[  0 ] ]

the map is currently represented by the above 2 x 1 matrix
------------v------------
at homology degree: 2
Z/< 4 >
-------------------------
[ [  0,  2 ] ]

the map is currently represented by the above 1 x 2 matrix
------------v------------
at homology degree: 1
Z/< 2 > + Z/< 4 >
-------------------------
[ [  0,  1 ],
[  1,  1 ] ]

the map is currently represented by the above 2 x 2 matrix
------------v------------
at homology degree: 0
Z/< 2 > + Z/< 2 >
-------------------------
gap> IsExactSequence( L );
true
gap> L;
<An exact sequence containing 5 morphisms of left modules at degrees
[ 0 .. 5 ]>


##### 10.4-19 Functor_HomHom
 ‣ Functor_HomHom ( global variable )

The bifunctor HomHom.

Below is the only specific line of code used to define Functor_HomHom_for_fp_modules and all the different operations HomHom in homalg.

Functor_Hom_for_fp_modules * Functor_Hom_for_fp_modules;


##### 10.4-20 Functor_LHomHom
 ‣ Functor_LHomHom ( global variable )

The bifunctor LHomHom.

Below is the only specific line of code used to define Functor_LHomHom_for_fp_modules and all the different operations LHomHom in homalg.

LeftDerivedFunctor( Functor_HomHom_for_fp_modules );


#### 10.7 Functors: Operations and Functions

Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 A B C Bib Ind

generated by GAPDoc2HTML