Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 A B C D E F G H I Bib Ind
 Top of Book   Previous Chapter   Next Chapter 

16 Functors
 16.1 Functors: Category and Representations
  16.1-1 IsHomalgFunctor

  16.1-2 IsHomalgFunctorRep
 16.2 Functors: Constructors
  16.2-1 CreateHomalgFunctor

  16.2-2 InsertObjectInMultiFunctor

  16.2-3 RightSatelliteOfCofunctor

  16.2-4 LeftSatelliteOfFunctor

  16.2-5 RightDerivedCofunctor

  16.2-6 LeftDerivedFunctor

  16.2-7 ComposeFunctors
 16.3 Functors: Attributes
  16.3-1 Genesis
 16.4 Basic Functors
  16.4-1 functor_Cokernel

  16.4-2 Cokernel

  16.4-3 functor_ImageModule

  16.4-4 ImageModule

  16.4-5 functor_Kernel

  16.4-6 Kernel

  16.4-7 functor_DefectOfExactness

  16.4-8 DefectOfExactness

  16.4-9 Functor_Hom

  16.4-10 Hom

  16.4-11 Functor_TensorProduct

  16.4-12 TensorProduct

  16.4-13 Functor_Ext

  16.4-14 Ext

  16.4-15 Functor_Tor

  16.4-16 Tor

  16.4-17 Functor_RHom

  16.4-18 RHom

  16.4-19 Functor_LTensorProduct

  16.4-20 LTensorProduct

  16.4-21 Functor_HomHom

  16.4-22 Functor_LHomHom
 16.5 Tool Functors
 16.6 Other Functors
 16.7 Functors: Operations and Functions
  16.7-1 NameOfFunctor

  16.7-2 InstallFunctor

  16.7-3 InstallDeltaFunctor

16 Functors

Functors and their natural transformations form the heart of the homalg package. Usually, a functor is realized in computer algebra systems as a procedure which can be applied to a certain type of objects. In [BR08] it was explained how to implement a functor of abelian categories -- by itself -- as an object which can be further manipulated (composed, derived, ...). So in addition to the constructor CreateHomalgFunctor (16.2-1) which is used to create functors from scratch, homalg provides further easy-to-use constructors to create new functors out of existing ones:

In homalg each functor is implemented as a GAP4 object.

So-called installers (--> InstallFunctor (16.7-2) and InstallDeltaFunctor (16.7-3)) take such a functor object and create operations in order to apply the functor on objects, morphisms, complexes (of objects or again of complexes), and chain maps. The installer InstallDeltaFunctor (16.7-3) creates additional operations for delta-functors in order to compute connecting homomorphisms, exact triangles, and associated long exact sequences by starting with a short exact sequence.

In homalg special emphasis is laid on the action of functors on morphisms, as an essential part of the very definition of a functor. This is for no obvious reason often neglected in computer algebra systems. Starting from a functor where the action on morphisms is also defined, all the above constructors again create functors with actions both on objects and on morphisms (and hence on chain complexes and chain maps).

It turned out that in a variety of situations a caching mechanism for functors is not only extremely useful (e.g. to avoid repeated expensive computations) but also an absolute necessity for the coherence of data. Functors in homalg are therefore endowed with a caching mechanism.

If R is a homalg ring in which the component R!.ByASmallerPresentation is set to true

R!.ByASmallerPresentation := true;

any functor which returns an object over R will first apply ByASmallerPresentation (9.5-2) to its result before returning it.

One of the highlights in homalg is the computation of Grothendieck's spectral sequences connecting the composition of the derivations of two functors with the derived functor of their composite.

16.1 Functors: Category and Representations

16.1-1 IsHomalgFunctor
> IsHomalgFunctor( F )( category )

Returns: true or false

The GAP category of homalg (multi-)functors.

16.1-2 IsHomalgFunctorRep
> IsHomalgFunctorRep( E )( representation )

Returns: true or false

The GAP representation of homalg (multi-)functors.

(It is a representation of the GAP category IsHomalgFunctor (16.1-1).)

16.2 Functors: Constructors

16.2-1 CreateHomalgFunctor
> CreateHomalgFunctor( list1, list2, ... )( function )

Returns: a homalg functor

This constructor is used to create functors for homalg from scratch. listN is of the form listN = [ stringN, valueN ]. stringN will be the name of a component of the created functor and valueN will be its value. This constructor is listed here for the sake of completeness. Its documentation is rather better placed in a homalg programmers guide. The remaining constructors create new functors out of existing ones and are probably more interesting for end users.

The constructor does not invoke InstallFunctor (16.7-2). This has to be done manually!

16.2-2 InsertObjectInMultiFunctor
> InsertObjectInMultiFunctor( F, p, obj, H )( operation )

Returns: a homalg functor

Given a homalg multi-functor F with multiplicity m and a string H return the functor Functor_H := F(...,obj,...), where obj is inserted at the p-th position. Of course obj must be an object (e.g. ring, module, ...) that can be inserted at this particular position. The string H becomes the name of the returned functor (--> NameOfFunctor (16.7-1)). The variable Functor_H will automatically be assigned if free, otherwise a warning is issued.

The constructor automatically invokes InstallFunctor (16.7-2) which installs several necessary operations under the name H.

gap> ZZ := HomalgRingOfIntegers( );;
gap> ZZ * 1;
<The free right module of rank 1 on a free generator>
gap> InsertObjectInMultiFunctor( Functor_Hom, 2, ZZ * 1, "Hom_ZZ" );
<The functor Hom_ZZ>
gap> Functor_Hom_ZZ;	## got automatically defined
<The functor Hom_ZZ>
gap> Hom_ZZ;		## got automatically defined
<Operation "Hom_ZZ">

16.2-3 RightSatelliteOfCofunctor
> RightSatelliteOfCofunctor( F[, p][, H] )( operation )

Returns: a homalg functor

Given a homalg (multi-)functor F and a string H return the right satellite of F with respect to its p-th argument. F is assumed contravariant in its p-th argument. The string H becomes the name of the returned functor (--> NameOfFunctor (16.7-1)). The variable Functor_H will automatically be assigned if free, otherwise a warning is issued.

If p is not specified it is assumed 1. If the string H is not specified the letter 'S' is added to the left of the name of F (--> NameOfFunctor (16.7-1)).

The constructor automatically invokes InstallFunctor (16.7-2) which installs several necessary operations under the name H.

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

RightSatelliteOfCofunctor( Functor_Hom, "Ext" );

16.2-4 LeftSatelliteOfFunctor
> LeftSatelliteOfFunctor( F[, p][, H] )( operation )

Returns: a homalg functor

Given a homalg (multi-)functor F and a string H return the left satellite of F with respect to its p-th argument. F is assumed covariant in its p-th argument. The string H becomes the name of the returned functor (--> NameOfFunctor (16.7-1)). The variable Functor_H will automatically be assigned if free, otherwise a warning is issued.

If p is not specified it is assumed 1. If the string H is not specified the string "S_" is added to the left of the name of F (--> NameOfFunctor (16.7-1)).

The constructor automatically invokes InstallFunctor (16.7-2) which installs several necessary operations under the name H.

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

LeftSatelliteOfFunctor( Functor_TensorProduct, "Tor" );

16.2-5 RightDerivedCofunctor
> RightDerivedCofunctor( F[, p][, H] )( operation )

Returns: a homalg functor

Given a homalg (multi-)functor F and a string H return the right derived functor of F with respect to its p-th argument. F is assumed contravariant in its p-th argument. The string H becomes the name of the returned functor (--> NameOfFunctor (16.7-1)). The variable Functor_H will automatically be assigned if free, otherwise a warning is issued.

If p is not specified it is assumed 1. If the string H is not specified the letter 'R' is added to the left of the name of F (--> NameOfFunctor (16.7-1)).

The constructor automatically invokes InstallFunctor (16.7-2) and InstallDeltaFunctor (16.7-3) which install several necessary operations under the name H.

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

RightDerivedCofunctor( Functor_Hom );

16.2-6 LeftDerivedFunctor
> LeftDerivedFunctor( F[, p][, H] )( operation )

Returns: a homalg functor

Given a homalg (multi-)functor F and a string H return the left derived functor of F with respect to its p-th argument. F is assumed covariant in its p-th argument. The string H becomes the name of the returned functor (--> NameOfFunctor (16.7-1)). The variable Functor_H will automatically be assigned if free, otherwise a warning is issued.

If p is not specified it is assumed 1. If the string H is not specified the letter "S_" is added to the left of the name of F (--> NameOfFunctor (16.7-1)).

The constructor automatically invokes InstallFunctor (16.7-2) and InstallDeltaFunctor (16.7-3) which install several necessary operations under the name H.

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

LeftDerivedFunctor( Functor_TensorProduct );

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

LeftDerivedFunctor( Functor_HomHom );

16.2-7 ComposeFunctors
> ComposeFunctors( F[, p], G[, H] )( operation )

Returns: a homalg functor

Given two homalg (multi-)functors F and G and a string H return the composed functor Functor_H := F(...,G(...),...), where G is inserted at the p-th position. Of course G must be a functor that can be inserted at this particular position. The string H becomes the name of the returned functor (--> NameOfFunctor (16.7-1)). The variable Functor_H will automatically be assigned if free, otherwise a warning is issued.

If p is not specified it is assumed 1. If the string H is not specified the names of F and G are concatenated in this order (--> NameOfFunctor (16.7-1)).

F * G is a shortcut for ComposeFunctors(F,1,G).

The constructor automatically invokes InstallFunctor (16.7-2) which installs several necessary operations under the name H.

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

Functor_Hom * Functor_Hom;

Check this:

gap> Functor_Hom * Functor_TensorProduct;
<The functor HomTensorProduct>
gap> Functor_HomTensorProduct;	## got automatically defined
<The functor HomTensorProduct>
gap> HomTensorProduct;		## got automatically defined
<Operation "HomTensorProduct">

16.3 Functors: Attributes

16.3-1 Genesis
> Genesis( F )( attribute )

Returns: a list

The first entry of the returned list is the name of the constructor used to create the functor F. The reset of the list contains arguments that were passed to this constructor for creating F.

These are examples of different functors created using the different constructors:

16.4 Basic Functors

16.4-1 functor_Cokernel
> functor_Cokernel( global variable )

The functor that associates to a map its cokernel.

InstallValue( functor_Cokernel,
        CreateHomalgFunctor(
                [ "name", "Cokernel" ],
                [ "natural_transformation", "CokernelEpi" ],
                [ "special", true ],
                [ "number_of_arguments", 1 ],
                [ "1", [ [ "covariant" ],
                        [ IsMapOfFinitelyGeneratedModulesRep,
                          [ IsHomalgChainMap, IsImageSquare ] ] ] ],
                [ "OnObjects", _Functor_Cokernel_OnObjects ]
                )
        );

16.4-2 Cokernel
> Cokernel( phi )( operation )

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

gap> ZZ := HomalgRingOfIntegers( );;
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 );
<An 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

16.4-3 functor_ImageModule
> functor_ImageModule( global variable )

The functor that associates to a map its image.

InstallValue( functor_ImageModule,
        CreateHomalgFunctor(
                [ "name", "ImageModule" ],
                [ "natural_transformation", "ImageModuleEmb" ],
                [ "number_of_arguments", 1 ],
                [ "1", [ [ "covariant" ],
                        [ IsMapOfFinitelyGeneratedModulesRep ] ] ],
                [ "OnObjects", _Functor_ImageModule_OnObjects ]
                )
        );

16.4-4 ImageModule
> ImageModule( phi )( operation )

The following example also makes use of the natural transformations ImageModuleEpi and ImageModuleEmb.

gap> ZZ := HomalgRingOfIntegers( );;
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 := ImageModule( 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 := ImageModuleEpi( phi );
<A split epimorphism of left modules>
gap> epsilon := ImageModuleEmb( phi );
<A monomorphism of left modules>
gap> phi = pi * epsilon;
true

16.4-5 functor_Kernel
> functor_Kernel( global variable )

The functor that associates to a map its kernel.

InstallValue( functor_Kernel,
        CreateHomalgFunctor(
                [ "name", "Kernel" ],
                [ "natural_transformation", "KernelEmb" ],
                [ "special", true ],
                [ "number_of_arguments", 1 ],
                [ "1", [ [ "covariant" ],
                        [ IsMapOfFinitelyGeneratedModulesRep,
                          [ IsHomalgChainMap, IsKernelSquare ] ] ] ],
                [ "OnObjects", _Functor_Kernel_OnObjects ]
                )
        );

16.4-6 Kernel
> Kernel( phi )( operation )

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

gap> ZZ := HomalgRingOfIntegers( );;
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 monomorphism of left modules>
gap> Display( iota );
[ [  2,  0 ] ]

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

16.4-7 functor_DefectOfExactness
> functor_DefectOfExactness( global variable )

The functor that associates to a pair of composable maps with a zero compositum the defect of exactness, i.e. the kernel of the outer map modulo the image of the inner map.

InstallValue( functor_DefectOfExactness,
        CreateHomalgFunctor(
                [ "name", "DefectOfExactness" ],
                [ "special", true ],
                [ "number_of_arguments", 1 ],
                [ "1", [ [ "covariant" ],
                        [ IsHomalgComplex and IsATwoSequence,
                          [ IsHomalgChainMap, IsLambekPairOfSquares ] ] ] ],
                [ "OnObjects", _Functor_DefectOfExactness_OnObjects ]
                )
        );

16.4-8 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( );;
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 >

16.4-9 Functor_Hom
> Functor_Hom( global variable )

The bifunctor Hom.

InstallValue( Functor_Hom,
        CreateHomalgFunctor(
                [ "name", "Hom" ],
                [ "number_of_arguments", 2 ],
                [ "1", [ [ "contravariant", "right adjoint", "distinguished" ] ] ],
                [ "2", [ [ "covariant", "left exact" ] ] ],
                [ "OnObjects", _Functor_Hom_OnObjects ],
                [ "OnMorphisms", _Functor_Hom_OnMorphisms ]
                )
        );

16.4-10 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 map.

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

gap> ZZ := HomalgRingOfIntegers( );;
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 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 non-torsion right module on 4 generators satisfying 2 relations>
gap> IsIdenticalObj( homNM, Hom( N, M ) );	## the caching at work
true
gap> homMM := Range( psi );
<A non-torsion 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 ] ]

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

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

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 ] ]

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

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

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

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 ] ]

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

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

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

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 );
<An acyclic cocomplex containing a single morphism of right complexes at degre\
es [ 0 .. 1 ]>
gap> BMM := HomalgBicomplex( hMM );
<A 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 
1 relation>
   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 non-torsion 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)

16.4-11 Functor_TensorProduct
> Functor_TensorProduct( global variable )

The tensor product bifunctor.

InstallValue( Functor_TensorProduct,
        CreateHomalgFunctor(
                [ "name", "TensorProduct" ],
                [ "number_of_arguments", 2 ],
                [ "1", [ [ "covariant", "left adjoint", "distinguished" ] ] ],
                [ "2", [ [ "covariant", "left adjoint" ] ] ],
                [ "OnObjects", _Functor_TensorProduct_OnObjects ],
                [ "OnMorphisms", _Functor_TensorProduct_OnMorphisms ]
                )
        );

16.4-12 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 map.

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

gap> ZZ := HomalgRingOfIntegers( );;
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> L := Hom( ZZ, M );
<A 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;	## the display method found out further information about the module 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 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 non-torsion right module on 4 generators satisfying 3 relations>
gap> IsIdenticalObj( ML, M * L );	## the caching at work
true
gap> NL := Range( psi );
<A non-torsion 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 );
<An 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 );
<An acyclic complex containing a single morphism of left cocomplexes at degree\
s [ 0 .. 1 ]>
gap> BC := HomalgBicomplex( FCE );
<A 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 non-torsion 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 left module presented by 2 relations for 2 generators>
of
<A non-torsion 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)

16.4-13 Functor_Ext
> Functor_Ext( global variable )

The bifunctor Ext.

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

RightSatelliteOfCofunctor( Functor_Hom, "Ext" );

16.4-14 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 map. 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( );;
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 := TorsionSubmodule( M );
<A cyclic torsion left module presented by yet unknown relations for a cyclic \
generator>
gap> iota := TorsionSubmoduleEmb( M );
<A monomorphism of left modules>
gap> psi := Ext( 1, iota, N );
<A homomorphism of right modules>
gap> ByASmallerPresentation( psi );
<A 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 cyclic right module on a cyclic generator satisfying 1 relation>
gap> IsIdenticalObj( extNN, Ext( 1, N, N ) );	## the caching at work
true
gap> extMN := Source( psi );
<A cyclic torsion right module on a cyclic generator satisfying 1 relation>
gap> IsIdenticalObj( extMN, Ext( 1, M, N ) );	## the caching at work
true
gap> Display( extNN );
Z/< 3 >
gap> Display( extMN );
Z/< 3 >

16.4-15 Functor_Tor
> Functor_Tor( global variable )

The bifunctor Tor.

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

LeftSatelliteOfFunctor( Functor_TensorProduct, "Tor" );

16.4-16 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 map. 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( );;
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 := TorsionSubmodule( M );
<A cyclic torsion left module presented by yet unknown relations for a cyclic \
generator>
gap> iota := TorsionSubmoduleEmb( M );
<A monomorphism of left modules>
gap> psi := Tor( 1, iota, N );
<A homomorphism of left modules>
gap> ByASmallerPresentation( psi );
<A 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 cyclic torsion left module presented by 1 relation for a cyclic generator>
gap> IsIdenticalObj( torNN, Tor( 1, N, N ) );	## the caching at work
true
gap> torMN := Range( psi );
<A cyclic torsion left module presented by 1 relation for a cyclic generator>
gap> IsIdenticalObj( torMN, Tor( 1, M, N ) );	## the caching at work
true
gap> Display( torNN );
Z/< 3 >
gap> Display( torMN );
Z/< 3 >

16.4-17 Functor_RHom
> Functor_RHom( global variable )

The bifunctor RHom.

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

RightDerivedCofunctor( Functor_Hom );

16.4-18 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 map. The string str may take different values:

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( );;
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> 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 left module presented by yet unknown relations for a cyclic generato\
r>
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 ]>

16.4-19 Functor_LTensorProduct
> Functor_LTensorProduct( global variable )

The bifunctor LTensorProduct.

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

LeftDerivedFunctor( Functor_TensorProduct );

16.4-20 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 map. The string str may take different values:

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( );;
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> 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 left module presented by yet unknown relations for a cyclic generato\
r>
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 ]>

16.4-21 Functor_HomHom
> Functor_HomHom( global variable )

The bifunctor HomHom.

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

Functor_Hom * Functor_Hom;

16.4-22 Functor_LHomHom
> Functor_LHomHom( global variable )

The bifunctor LHomHom.

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

LeftDerivedFunctor( Functor_HomHom );

16.5 Tool Functors

16.6 Other Functors

16.7 Functors: Operations and Functions

16.7-1 NameOfFunctor
> NameOfFunctor( F )( operation )

Returns: a string

The name of the homalg functor F.

gap> NameOfFunctor( Functor_Ext );
"Ext"
gap> Display( Functor_Ext );
Ext

16.7-2 InstallFunctor
> InstallFunctor( F )( operation )

Install several methods for GAP operations that get declared under the name of the homalg (multi-)functor F (--> NameOfFunctor (16.7-1)). These methods are used to apply the functor to objects, morphisms, (co)complexes of objects, and (co)chain maps. The objects in the (co)complexes might again be (co)complexes.

(For purely technical reasons the multiplicity of the functor might at most be three. This restriction should disappear in future versions.)

InstallMethod( InstallFunctor,
        "for homalg functors",
        [ IsHomalgFunctorRep ],
        
  function( Functor )
    
    InstallFunctorOnObjects( Functor );
    
    if IsSpecialFunctor( Functor ) then
        
        InstallSpecialFunctorOnMorphisms( Functor );
        
    else
        
        InstallFunctorOnMorphisms( Functor );
        
        InstallFunctorOnComplexes( Functor );
        
        InstallFunctorOnChainMaps( Functor );
        
    fi;
    
end );

The method does not return anything.

16.7-3 InstallDeltaFunctor
> InstallDeltaFunctor( F )( operation )

In case F is a delta-functor in the sense of Grothendieck the procedure installs several operations under the name of the homalg (multi-)functor F (--> NameOfFunctor (16.7-1)) allowing one to compute connecting homomorphisms, exact triangles, and associated long exact sequences. The input of these operations is a short exact sequence.

(For purely technical reasons the multiplicity of the functor might at most be three. This restriction should disappear in future versions.)

InstallMethod( InstallDeltaFunctor,
        "for homalg functors",
        [ IsHomalgFunctorRep ],
        
  function( Functor )
    local number_of_arguments;
    
    number_of_arguments := MultiplicityOfFunctor( Functor );
    
    if number_of_arguments = 1 then
        
        HelperToInstallUnivariateDeltaFunctor( Functor );
        
    elif number_of_arguments = 2 then
        
        HelperToInstallFirstArgumentOfBivariateDeltaFunctor( Functor );
        HelperToInstallSecondArgumentOfBivariateDeltaFunctor( Functor );
        
    elif number_of_arguments = 3 then
        
        HelperToInstallFirstArgumentOfTrivariateDeltaFunctor( Functor );
        HelperToInstallSecondArgumentOfTrivariateDeltaFunctor( Functor );
        HelperToInstallThirdArgumentOfTrivariateDeltaFunctor( Functor );
        
    fi;
    
end );

The method does not return anything.

 Top of Book   Previous Chapter   Next Chapter 
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 A B C D E F G H I Bib Ind

generated by GAPDoc2HTML