GAP (homalg) - Chapter 11: Functors

Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 A B C D E F Bib Ind
[Top of Book] [Contents] [Previous Chapter] [Next Chapter]

[MathJax on]

11 Functors
11.1 Functors: Category and Representations
11.1-1 IsHomalgFunctor
11.1-2 IsHomalgFunctorRep
11.2 Functors: Constructors
11.2-1 CreateHomalgFunctor
11.2-2 InsertObjectInMultiFunctor
11.2-3 RightSatelliteOfCofunctor
11.2-4 LeftSatelliteOfFunctor
11.2-5 RightDerivedCofunctor
11.2-6 LeftDerivedFunctor
11.2-7 ComposeFunctors
11.3 Functors: Attributes
11.3-1 NameOfFunctor
11.3-2 OperationOfFunctor
11.3-3 Genesis
11.3-4 ProcedureToReadjustGenerators
11.4 Basic Functors
11.4-1 functor_Kernel
11.4-2 functor_DefectOfExactness
11.5 Tool Functors
11.6 Other Functors
11.7 Functors: Operations and Functions
11.7-1 InstallFunctor
11.7-2 InstallDeltaFunctor

### 11 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` (11.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:

- `InsertObjectInMultiFunctor` (11.2-2)

- `RightSatelliteOfCofunctor` (11.2-3)

- `LeftSatelliteOfFunctor` (11.2-4)

- `RightDerivedCofunctor` (11.2-5)

- `LeftDerivedFunctor` (11.2-6)

- `ComposeFunctors` (11.2-7)

In homalg each functor is implemented as a GAP4 object.

So-called installers (--> `InstallFunctor` (11.7-1) and `InstallDeltaFunctor` (11.7-2)) 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 morphisms. The installer `InstallDeltaFunctor` (11.7-2) creates additional operations for δ-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 morphisms).

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

#### 11.1 Functors: Category and Representations

##### 11.1-1 IsHomalgFunctor

`‣ IsHomalgFunctor`( F ) | ( category )

Returns: `true` or `false`

The GAP category of homalg (multi-)functors.

##### 11.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` (11.1-1).)

#### 11.2 Functors: Constructors

##### 11.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` (11.7-1). This has to be done manually!

##### 11.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` (11.3-1)). The variable `Functor_`H will automatically be assigned if free, otherwise a warning is issued.

The constructor automatically invokes `InstallFunctor` (11.7-1) which installs several necessary operations under the name H.

    gap> ZZ := HomalgRingOfIntegers( );
    Z
    gap> ZZ * 1;
    <The free right module of rank 1 on a free generator>
    gap> InsertObjectInMultiFunctor( Functor_Hom_for_fp_modules, 2, ZZ * 1, "Hom_ZZ" );
    <The functor Hom_ZZ for f.p. modules and their maps over computable rings>
    gap> Functor_Hom_ZZ_for_fp_modules; ## got automatically defined
    <The functor Hom_ZZ for f.p. modules and their maps over computable rings>
    gap> Hom_ZZ; ## got automatically defined
    <Operation "Hom_ZZ">

##### 11.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` (11.3-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` (11.3-1)).

The constructor automatically invokes `InstallFunctor` (11.7-1) which installs several necessary operations under the name H.

##### 11.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` (11.3-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` (11.3-1)).

The constructor automatically invokes `InstallFunctor` (11.7-1) which installs several necessary operations under the name H.

##### 11.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` (11.3-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` (11.3-1)).

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

##### 11.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` (11.3-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` (11.3-1)).

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

##### 11.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` (11.3-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` (11.3-1)).

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

The constructor automatically invokes `InstallFunctor` (11.7-1) which installs several necessary operations under the name H.

Check this:

    gap> Functor_Hom_for_fp_modules * Functor_TensorProduct_for_fp_modules;
    <The functor HomTensorProduct for f.p. modules and their maps over computable \
    rings>
    gap> Functor_HomTensorProduct_for_fp_modules; ## got automatically defined
    <The functor HomTensorProduct for f.p. modules and their maps over computable \
    rings>
    gap> HomTensorProduct; ## got automatically defined
    <Operation "HomTensorProduct">

#### 11.3 Functors: Attributes

##### 11.3-1 NameOfFunctor

`‣ NameOfFunctor`( F ) | ( attribute )

Returns: a string

The name of the homalg functor F.

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

##### 11.3-2 OperationOfFunctor

`‣ OperationOfFunctor`( F ) | ( attribute )

Returns: an operation

The operation of the functor F.

    gap> Functor_Ext_for_fp_modules;
    <The functor Ext for f.p. modules and their maps over computable rings>
    gap> OperationOfFunctor( Functor_Ext_for_fp_modules );
    <Operation "Ext">

##### 11.3-3 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:

- `CreateHomalgFunctor`:

      gap> Functor_Hom_for_fp_modules;
      <The functor Hom for f.p. modules and their maps over computable rings>

- `InsertObjectInMultiFunctor`:

      gap> ZZ := HomalgRingOfIntegers( );
      Z
      gap> LeftDualizingFunctor( ZZ, "ZZ_Hom" );
      <The functor ZZ_Hom for f.p. modules and their maps over computable rings>
      gap> Functor_ZZ_Hom_for_fp_modules; ## got automatically defined
      <The functor ZZ_Hom for f.p. modules and their maps over computable rings>
      gap> ZZ_Hom; ## got automatically defined
      <Operation "ZZ_Hom">
      gap> Genesis( Functor_ZZ_Hom_for_fp_modules );
      [ "InsertObjectInMultiFunctor",
        <The functor Hom for f.p. modules and their maps over computable rings>, 2,
        <The free left module of rank 1 on a free generator> ]
      gap> 1 * ZZ;
      <The free left module of rank 1 on a free generator>

- `LeftDerivedFunctor`:

      gap> Functor_TensorProduct_for_fp_modules;
      <The functor TensorProduct for f.p. modules and their maps over computable rin\
      gs>
      gap> Genesis( Functor_LTensorProduct_for_fp_modules );
      [ "LeftDerivedFunctor",
        <The functor TensorProduct for f.p. modules and their maps over computable r\
      ings>, 1 ]

- `RightDerivedCofunctor`:

      gap> Genesis( Functor_RHom_for_fp_modules );
      [ "RightDerivedCofunctor",
        <The functor Hom for f.p. modules and their maps over computable rings>, 1 ]

- `LeftSatelliteOfFunctor`:

      gap> Genesis( Functor_Tor_for_fp_modules );
      [ "LeftSatelliteOfFunctor",
        <The functor TensorProduct for f.p. modules and their maps over computable r\
      ings>, 1 ]

- `RightSatelliteOfCofunctor`:

      gap> Genesis( Functor_Ext_for_fp_modules );
      [ "RightSatelliteOfCofunctor",
        <The functor Hom for f.p. modules and their maps over computable rings>, 1 ]

- `ComposeFunctors`:

      gap> Genesis( Functor_HomHom_for_fp_modules );
      [ "ComposeFunctors",
        [ <The functor Hom for f.p. modules and their maps over computable rings>,
            <The functor Hom for f.p. modules and their maps over computable rings>
           ], 1 ]
      gap> ValueGlobal( "ComposeFunctors" );
      <Operation "ComposeFunctors">

##### 11.3-4 ProcedureToReadjustGenerators

`‣ ProcedureToReadjustGenerators`( Functor ) | ( attribute )

Returns: a function

#### 11.4 Basic Functors

##### 11.4-1 functor_Kernel

`‣ functor_Kernel` | ( global variable )

The functor that associates to a map its kernel.

    InstallValue( functor_Kernel,
            CreateHomalgFunctor(
                    [ "name", "Kernel" ],
                    [ "category", HOMALG.category ],
                    [ "operation", "Kernel" ],
                    [ "natural_transformation", "KernelEmb" ],
                    [ "special", true ],
                    [ "number_of_arguments", 1 ],
                    [ "1", [ [ "covariant" ],
                            [ IsStaticMorphismOfFinitelyGeneratedObjectsRep,
                              [ IsHomalgChainMorphism, IsKernelSquare ] ] ] ],
                    [ "OnObjects", _Functor_Kernel_OnObjects ]
                    )
            );

##### 11.4-2 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" ],
                    [ "category", HOMALG.category ],
                    [ "operation", "DefectOfExactness" ],
                    [ "special", true ],
                    [ "number_of_arguments", 2 ],
                    [ "1", [ [ "covariant" ],
                            [ IsStaticMorphismOfFinitelyGeneratedObjectsRep,
                              [ IsHomalgChainMorphism, IsLambekPairOfSquares ] ] ] ],
                    [ "2", [ [ "covariant" ],
                            [ IsStaticMorphismOfFinitelyGeneratedObjectsRep ] ] ],
                    [ "OnObjects", _Functor_DefectOfExactness_OnObjects ]
                    )
            );

#### 11.5 Tool Functors

#### 11.6 Other Functors

#### 11.7 Functors: Operations and Functions

##### 11.7-1 InstallFunctor

`‣ InstallFunctor`( F ) | ( operation )

Install several methods for GAP operations that get declared under the name of the homalg (multi-)functor F (--> `NameOfFunctor` (11.3-1)). These methods are used to apply the functor to objects, morphisms, (co)complexes of objects, and (co)chain morphisms. 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 );

            InstallFunctorOnChainMorphisms( Functor );

        fi;

    end );

The method does not return anything.

##### 11.7-2 InstallDeltaFunctor

`‣ InstallDeltaFunctor`( F ) | ( operation )

In case F is a δ-functor in the sense of Grothendieck the procedure installs several operations under the name of the homalg (multi-)functor F (--> `NameOfFunctor` (11.3-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] [Contents] [Previous Chapter] [Next Chapter]
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 A B C D E F Bib Ind

generated by GAPDoc2HTML