10 Functors 10.1 Functors: Category and Representations 10.2 Functors: Constructors 10.3 Functors: Attributes 10.4 Basic Functors 10.4-1 functor_Cokernel functor_Cokernel global variable The functor that associates to a map its cokernel.  Code  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.  Example  gap> ZZ := HomalgRingOfIntegers( ); Z gap> M := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );; gap> M := LeftPresentation( M );  gap> N := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );; gap> N := LeftPresentation( N );  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;  gap> coker := Cokernel( phi );  gap> ByASmallerPresentation( coker );  gap> Display( coker ); Z/< 8 > + Z^(1 x 1) gap> nu := CokernelEpi( phi );  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 );  gap> ByASmallerPresentation( nu );  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.  Code  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.  Example  gap> ZZ := HomalgRingOfIntegers( ); Z gap> M := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );; gap> M := LeftPresentation( M );  gap> N := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );; gap> N := LeftPresentation( N );  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;  gap> im := ImageObject( phi );  gap> ByASmallerPresentation( im );  gap> pi := ImageObjectEpi( phi );  gap> epsilon := ImageObjectEmb( phi );  gap> phi = pi * epsilon; true  10.4-5 Kernel Kernel( phi )  operation The following example also makes use of the natural transformation KernelEmb.  Example  gap> ZZ := HomalgRingOfIntegers( ); Z gap> M := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );; gap> M := LeftPresentation( M );  gap> N := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );; gap> N := LeftPresentation( N );  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;  gap> ker := Kernel( phi );  gap> Display( ker ); Z/< -3 > gap> ByASmallerPresentation( last );  gap> Display( ker ); Z/< 3 > gap> iota := KernelEmb( phi );  gap> Display( iota ); [ [ 0, 2, 4 ] ]  the map is currently represented by the above 1 x 3 matrix gap> DefectOfExactness( iota, phi );  gap> ByASmallerPresentation( iota );  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.  Example  gap> ZZ := HomalgRingOfIntegers( ); Z gap> M := HomalgMatrix( "[ 2, 3, 4, 0, 5, 6, 7, 0 ]", 2, 4, ZZ );; gap> M := LeftPresentation( M );  gap> N := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );; gap> N := LeftPresentation( N );  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;  gap> iota := KernelEmb( phi );  gap> DefectOfExactness( iota, phi );  gap> hom_iota := Hom( iota ); ## a shorthand for Hom( iota, ZZ );  gap> hom_phi := Hom( phi ); ## a shorthand for Hom( phi, ZZ );  gap> DefectOfExactness( hom_iota, hom_phi );  gap> ByASmallerPresentation( last );  gap> Display( last ); Z/< 2 >  10.4-7 Functor_Hom Functor_Hom global variable The bifunctor Hom.  Code  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.  Example  gap> ZZ := HomalgRingOfIntegers( ); Z gap> M := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );; gap> M := LeftPresentation( M );  gap> N := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );; gap> N := LeftPresentation( N );  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;  gap> psi := Hom( phi, M );  gap> ByASmallerPresentation( psi );  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 );  gap> IsIdenticalObj( homNM, Hom( N, M ) ); ## the caching at work true gap> homMM := Range( psi );  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 );  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 );  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:  Example  gap> ByASmallerPresentation( N );  gap> GeneratorsOfModule( homNM );  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):  Example  gap> dM := Resolution( M );  gap> hMM := Hom( dM, dM );  gap> BMM := HomalgBicomplex( hMM );  gap> II_E := SecondSpectralSequenceWithFiltration( BMM );  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 );   0:  of > gap> ByASmallerPresentation( filt );   0:  of > 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.  Code  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.  Example  gap> ZZ := HomalgRingOfIntegers( ); Z gap> M := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );  gap> M := LeftPresentation( M );  gap> N := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );  gap> N := LeftPresentation( N );  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;  gap> L := Hom( ZZ, M );  gap> ByASmallerPresentation( L );  gap> Display( L ); Z/< 3 > + Z^(1 x 1) gap> L;  gap> psi := phi * L;  gap> ByASmallerPresentation( psi );  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 );  gap> IsIdenticalObj( ML, M * L ); ## the caching at work true gap> NL := Range( psi );  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:  Example  gap> P := Resolution( M );  gap> GP := Hom( P );  gap> CE := Resolution( GP );  gap> FCE := Hom( CE, L );  gap> BC := HomalgBicomplex( FCE );  gap> II_E := SecondSpectralSequenceWithFiltration( BC );  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 );   -1:  of > gap> ByASmallerPresentation( filt );   -1:  of > 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.  Code  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.  Example  gap> ZZ := HomalgRingOfIntegers( ); Z gap> M := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );; gap> M := LeftPresentation( M );  gap> N := TorsionObject( M );  gap> iota := TorsionObjectEmb( M );  gap> psi := Ext( 1, iota, N );  gap> ByASmallerPresentation( psi );  gap> Display( psi ); [ [ 2 ] ]  the map is currently represented by the above 1 x 1 matrix gap> extNN := Range( psi );  gap> IsIdenticalObj( extNN, Ext( 1, N, N ) ); ## the caching at work true gap> extMN := Source( psi );  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.  Code  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.  Example  gap> ZZ := HomalgRingOfIntegers( ); Z gap> M := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );; gap> M := LeftPresentation( M );  gap> N := TorsionObject( M );  gap> iota := TorsionObjectEmb( M );  gap> psi := Tor( 1, iota, N );  gap> ByASmallerPresentation( psi );  gap> Display( psi ); [ [ 1 ] ]  the map is currently represented by the above 1 x 1 matrix gap> torNN := Source( psi );  gap> IsIdenticalObj( torNN, Tor( 1, N, N ) ); ## the caching at work true gap> torMN := Range( psi );  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.  Code  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.  Example  gap> ZZ := HomalgRingOfIntegers( ); Z gap> m := HomalgMatrix( [ [ 8, 0 ], [ 0, 2 ] ], ZZ );; gap> M := LeftPresentation( m );  gap> Display( M ); Z/< 8 > + Z/< 2 > gap> M;  gap> a := HomalgMatrix( [ [ 2, 0 ] ], ZZ );; gap> alpha := HomalgMap( a, "free", M );  gap> pi := CokernelEpi( alpha );  gap> Display( pi ); [ [ 1, 0 ],  [ 0, 1 ] ]  the map is currently represented by the above 2 x 2 matrix gap> iota := KernelEmb( pi );  gap> Display( iota ); [ [ 2, 0 ] ]  the map is currently represented by the above 1 x 2 matrix gap> N := Kernel( pi );  gap> Display( N ); Z/< 4 > gap> C := HomalgComplex( pi );  gap> Add( C, iota ); gap> ByASmallerPresentation( C );  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 );  gap> ByASmallerPresentation( T );  gap> L := LongSequence( T );  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;   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.  Code  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.  Example  gap> ZZ := HomalgRingOfIntegers( ); Z gap> m := HomalgMatrix( [ [ 8, 0 ], [ 0, 2 ] ], ZZ );; gap> M := LeftPresentation( m );  gap> Display( M ); Z/< 8 > + Z/< 2 > gap> M;  gap> a := HomalgMatrix( [ [ 2, 0 ] ], ZZ );; gap> alpha := HomalgMap( a, "free", M );  gap> pi := CokernelEpi( alpha );  gap> Display( pi ); [ [ 1, 0 ],  [ 0, 1 ] ]  the map is currently represented by the above 2 x 2 matrix gap> iota := KernelEmb( pi );  gap> Display( iota ); [ [ 2, 0 ] ]  the map is currently represented by the above 1 x 2 matrix gap> N := Kernel( pi );  gap> Display( N ); Z/< 4 > gap> C := HomalgComplex( pi );  gap> Add( C, iota ); gap> ByASmallerPresentation( C );  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 );  gap> ByASmallerPresentation( T );  gap> L := LongSequence( T );  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;   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.  Code  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.  Code  LeftDerivedFunctor( Functor_HomHom_for_fp_modules );  10.5 Tool Functors 10.6 Other Functors 10.7 Functors: Operations and Functions