Macaulay2 » Documentation
Packages » Complexes :: freeResolution
next | previous | forward | backward | up | index | toc

# freeResolution -- compute a free resolution of a module or ideal

- Usage:
    `freeResolution M`
    `freeResolution I`
- Inputs:
  - M, a module,
  - I, an ideal, in the ring $R$, treated as the quotient module $R^1/I$
- Optional inputs:
  - LengthLimit => an integer, default value infinity, this is used to limit somehow the computation where resolutions might be too long or infinite
  - DegreeLimit => a list, default value infinity, or an integer, an option that specifies that the computation stops at the given (slanted) degree
  - HardDegreeLimit => a list, default value {}, unused
  - PairLimit => an integer, default value infinity, or infinity, an internal option which specifies that the computation should stop after a certain number of s-pairs have computed
  - SortStrategy => an integer, default value 0, an internal option that specifies the strategy to be used for sorting S-pairs
  - StopBeforeComputation => a Boolean value, default value false, whether to start the computation. This can be useful when you want to obtain the partially computed resolution contained in an interrupted computation.
  - Strategy => an integer, default value null, one of the integers 0,1,2,3, one of the symbols Engine, Homogenization, Syzygies, Nonminimal, OverField, OverZZ, or null
  - SyzygyLimit => an integer, default value infinity, or infinity, an internal option which specifies that the computation should stop after a certain number of syzygies have computed
  - ParallelizeByDegree => a Boolean value, default value false, Use additional parallelism to compute different (homological degree, internal degree) pairs in parallel when possible. To control parallelism, see "parallelism in engine computations"
- Outputs:
  - a complex, a free resolution of the module $M$ or of the quotient module $R^1/I$

## Description

A free resolution of a module $M$ is a complex

$\phantom{WWWW} F_0 \leftarrow F_1 \leftarrow F_2 \leftarrow \dotsb $

of free modules, whose homology is concentrated in homological degree zero and is isomorphic to the module $M$. Equivalently, the augmented complex

$\phantom{WWWW} 0 \leftarrow M \leftarrow F_0 \leftarrow F_1 \leftarrow F_2 \leftarrow \dotsb $

is exact.

This function lies at the heart of many computations in commutative algebra and algebraic geometry. As a consequence, this is one of the most used functions in Macaulay2.

As a first example, we construct the free resolution of the twisted cubic curve, and extract its basic numerical invariants via length(Complex) and betti(Complex).

    i1 : R = QQ[a..d];

    i2 : I = ideal(c^2-b*d, b*c-a*d, b^2-a*c)

                 2                    2
    o2 = ideal (c  - b*d, b*c - a*d, b  - a*c)

    o2 : Ideal of R

    i3 : M = R^1/I

    o3 = cokernel | c2-bd bc-ad b2-ac |

                                1
    o3 : R-module, quotient of R

    i4 : C = freeResolution M

          1      3      2
    o4 = R  <-- R  <-- R

         0      1      2

    o4 : Complex

    i5 : length C

    o5 = 2

    i6 : betti C

                0 1 2
    o6 = total: 1 3 2
             0: 1 . .
             1: . 3 2

    o6 : BettiTally

    i7 : dd^C

              1                             3
    o7 = 0 : R  <------------------------- R  : 1
                   | b2-ac bc-ad c2-bd |

              3                     2
         1 : R  <----------------- R  : 2
                   {2} | -c d  |
                   {2} | b  -c |
                   {2} | -a b  |

    o7 : ComplexMap

    i8 : assert isWellDefined C

We verify in two ways that $C$ is a free resolution of $M$.

    i9 : assert(prune HH C == complex M)

    i10 : assert(length HH C == 0)

    i11 : f = augmentationMap C

                                                         1
    o11 = 0 : cokernel | c2-bd bc-ad b2-ac | <--------- R  : 0
                                                | 1 |

    o11 : ComplexMap

    i12 : assert isWellDefined f

    i13 : assert(source f === C)

    i14 : assert(target f == complex M)

    i15 : aC = cone f

                 1      3      2
    o15 = M <-- R  <-- R  <-- R

          0     1      2      3

    o15 : Complex

    i16 : assert(HH aC == 0)

Giving an ideal as the input produces a free resolution not of the module $I$, but of the comodule $R^1/I$.

    i17 : assert(freeResolution I == C)

    i18 : assert(resolution complex M == freeResolution M)

We obtain the resolution of the module $I$, rather than the comodule $R^1/I$, as follows.

    i19 : C' = freeResolution module I

           3      2
    o19 = R  <-- R

          0      1

    o19 : Complex

    i20 : assert isWellDefined C'

    i21 : assert(C' != C)

    i22 : assert(betti naiveTruncation(C, 1, infinity) == betti C'[-1])

Over a quotient ring, free resolutions are typically infinite. To specify a finite part of the resolution, one needs to use the optional argument LengthLimit.

    i23 : S = ZZ/101[a,b];

    i24 : R = S/(a^3+b^3);

    i25 : C = freeResolution (coker vars R, LengthLimit => 7)

           1      2      2      2      2      2      2      2
    o25 = R  <-- R  <-- R  <-- R  <-- R  <-- R  <-- R  <-- R

          0      1      2      3      4      5      6      7

    o25 : Complex

    i26 : length C

    o26 = 7

    i27 : betti C

                 0 1 2 3 4 5 6 7
    o27 = total: 1 2 2 2 2 2 2 2
              0: 1 2 1 . . . . .
              1: . . 1 2 1 . . .
              2: . . . . 1 2 1 .
              3: . . . . . . 1 2

    o27 : BettiTally

    i28 : dd^C

               1               2
    o28 = 0 : R  <----------- R  : 1
                    | a b |

               2                     2
          1 : R  <----------------- R  : 2
                    {1} | -b a2 |
                    {1} | a  b2 |

               2                      2
          2 : R  <------------------ R  : 3
                    {2} | a2 -b2 |
                    {3} | b  a   |

               2                     2
          3 : R  <----------------- R  : 4
                    {4} | -a b2 |
                    {4} | b  a2 |

               2                      2
          4 : R  <------------------ R  : 5
                    {5} | -a2 b2 |
                    {6} | b   a  |

               2                     2
          5 : R  <----------------- R  : 6
                    {7} | -a b2 |
                    {7} | b  a2 |

               2                      2
          6 : R  <------------------ R  : 7
                    {8} | -a2 b2 |
                    {9} | b   a  |

    o28 : ComplexMap

Over an exterior algebra, free resolutions are again typically infinite, so one needs to specify the LengthLimit.

    i29 : E = ZZ/101[e_1..e_6, SkewCommutative => true];

    i30 : I = ideal(e_4*e_5-e_4*e_6+e_5*e_6,
              e_2*e_3-e_2*e_6+e_3*e_6,
              e_1*e_3-e_1*e_5+e_3*e_5,
              e_1*e_2-e_1*e_4+e_2*e_4)

    o30 = ideal (e e  - e e  + e e , e e  - e e  + e e , e e  - e e  + e e , e e
                  4 5    4 6    5 6   2 3    2 6    3 6   1 3    1 5    3 5   1 2
          -----------------------------------------------------------------------
          - e e  + e e )
             1 4    2 4

    o30 : Ideal of E

    i31 : F = freeResolution(I, LengthLimit => 5)

           1      4      10      21      45      91
    o31 = E  <-- E  <-- E   <-- E   <-- E   <-- E

          0      1      2       3       4       5

    o31 : Complex

    i32 : assert isWellDefined F

    i33 : assert isHomogeneous F

    i34 : betti F

                 0 1  2  3  4  5
    o34 = total: 1 4 10 21 45 91
              0: 1 .  .  .  .  .
              1: . 4 10 15 20 25
              2: . .  .  6 25 66

    o34 : BettiTally

Over a Weyl algebra, free resolutions have finite length, so one does not need to specific the LengthLimit.

    i35 : S = QQ[x,y,Dx,Dy, WeylAlgebra => {{x,Dx}, {y,Dy}}];

    i36 : I = ideal(x*Dy, y*Dx)

    o36 = ideal (x*Dy, y*Dx)

    o36 : Ideal of S

    i37 : F = freeResolution comodule I

           1      2      4      4      1
    o37 = S  <-- S  <-- S  <-- S  <-- S

          0      1      2      3      4

    o37 : Complex

    i38 : assert isWellDefined F

    i39 : dd^F

               1                   2
    o39 = 0 : S  <--------------- S  : 1
                    | xDy yDx |

               2                                                                             4
          1 : S  <------------------------------------------------------------------------- S  : 2
                    {2} | yDx^2Dy+2Dx^2  xyDxDy+2xDx-yDy-2 y2Dx^2             xy2Dx-y2  |
                    {2} | -xDxDy^2-2Dy^2 -x2Dy^2           -xyDxDy+xDx-2yDy+2 -x2yDy+x2 |

               4                               4
          2 : S  <--------------------------- S  : 3
                    {6} | x   y   0   0   |
                    {6} | -Dx 0   y   0   |
                    {6} | 0   -Dy 0   x   |
                    {6} | 0   0   -Dy -Dx |

               4                   1
          3 : S  <--------------- S  : 4
                    {7} | y   |
                    {7} | -x  |
                    {7} | Dx  |
                    {7} | -Dy |

    o39 : ComplexMap

Todo: we will add pointers to more advanced nodes and usage information (e.g. Strategies, Optional arguments, and seeing partial results).

## See also

- Making chain complexes -- information about the basic constructors
- augmentationMap(Complex) -- map from a free resolution to a module regarded as a complex
- cone(ComplexMap) -- make the mapping cone of a morphism of chain complexes
- freeResolution(Complex) -- minimal free resolution of a complex
- resolutionMap(Complex) -- map from a free resolution to the given complex
- betti(Complex) -- display of degrees in a complex

## Ways to use freeResolution:

- `freeResolution(Ideal)`
- `freeResolution(Module)`
- `freeResolution(MonomialIdeal)`
- freeResolution(Complex) -- minimal free resolution of a complex
- freeResolution(Matrix) -- compute the induced map between free resolutions

## For the programmer

The object freeResolution is a method function with options.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Complexes/ChainComplexDoc.m2:1114:0.