This is ChainComplexExtras.info, produced by Macaulay2, version 1.21

ChainComplexExtras -- More ChainComplex Functionality.
******************************************************

Authors
=======

  * David Eisenbud (see http://www.msri.org/~de ) <de@msri.org>
  * Frank Moore (see http://www.math.unl.edu/~s-wmoore3 ) <fmoore@math.unl.edu>
  * Frank-Olaf Schreyer (see http://www.math.uni-sb.de/ag/schreyer/ )
    <schreyer@math.uni-sb.de>
  * Gregory G. Smith (see http://www.mast.queensu.ca/~ggsmith )
    <ggsmith@mast.queensu.ca>
  * Lily Silverstein (see https://www.cpp.edu/faculty/lsilverstein/ )
    <lsilverstein@cpp.edu>

Version
=======

This documentation describes version 1.1 of ChainComplexExtras.

Source code
===========

The source code from which this documentation is derived is in the file
ChainComplexExtras.m2 (see common/share/Macaulay2/ChainComplexExtras.m2 ).

Exports
=======

  * Functions and commands
      * appendZeroMap -- append a zero map to chain
        complex
      * cartanEilenbergResolution -- Computes
        free resolution of a ChainComplex
      * chainComplexMap -- Defines a ChainComplexMap
        via a list of matrices.
      * extendFromMiddle -- extends a map between
        ChainComplexes
      * isChainComplex -- tests whether the
        differentials compose to zero
      * isChainComplexMap -- Test to see if the
        ChainComplexMap commutes with the differentials.
      * isExact -- Test to see if the ChainComplex is exact.
      * isMinimalChainComplex -- tests for
        minimality
      * isQuasiIsomorphism -- Test to see if the
        ChainComplexMap is a quasi-isomorphism.
      * koszulComplex -- Gives the Koszul complex on the
        generators of I.
      * minimize -- minimal quotient complex of a free
        ChainComplex
      * nonzeroMax -- computes the homological position of
        the last non-zero module in a ChainComplex
      * nonzeroMin -- computes the homological position of
        the first non-zero module in a ChainComplex
      * prependZeroMap -- prepend a zero map to chain
        complex
      * removeZeroTrailingTerms -- remove
        trailing zero terms of a chain complex
      * resolutionOfChainComplex -- free
        resolution of a chain complex
      * scarfComplex -- constructs the algebraic Scarf
        complex of a monomial ideal
      * taylor -- Gives the nth differential in the Taylor
        resolution of a monomial ideal I.
      * taylorResolution -- Gives the Taylor
        resolution of a monomial ideal I.
      * trivialHomologicalTruncation, --
        return the trivial truncation of a chain complex
  * Methods
      * "appendZeroMap(ChainComplex)" -- see appendZeroMap,
        -- append a zero map to chain complex
      * "cartanEilenbergResolution(ChainComplex)" -- see
        cartanEilenbergResolution, -- Computes free
        resolution of a ChainComplex
      * "chainComplexMap(ChainComplex,ChainComplex,List)" -- see
        chainComplexMap, -- Defines a ChainComplexMap via a
        list of matrices.
      * "extendFromMiddle(ChainComplex,ChainComplex,Matrix,ZZ)" -- see
        extendFromMiddle, -- extends a map between
        ChainComplexes
      * Hom(ChainComplex,ChainComplex)
        -- Create the homomorphism
        complex of a pair of chain complexes.
      * "isChainComplex(ChainComplex)" -- see isChainComplex,
        -- tests whether the differentials compose to zero
      * "isChainComplexMap(ChainComplexMap)" -- see isChainComplexMap,
        -- Test to see if the ChainComplexMap commutes with
        the differentials.
      * "isExact(ChainComplex)" -- see isExact, -- Test to see
        if the ChainComplex is exact.
      * "isQuasiIsomorphism(ChainComplexMap)" -- see isQuasiIsomorphism,
        -- Test to see if the ChainComplexMap is a
        quasi-isomorphism.
      * "koszulComplex(Ideal)" -- see koszulComplex, --
        Gives the Koszul complex on the generators of I.
      * "minimize(ChainComplex)" -- see minimize, -- minimal
        quotient complex of a free ChainComplex
      * "nonzeroMax(ChainComplex)" -- see nonzeroMax, --
        computes the homological position of the last non-zero module in a
        ChainComplex
      * "nonzeroMin(ChainComplex)" -- see nonzeroMin, --
        computes the homological position of the first non-zero module in a
        ChainComplex
      * "prependZeroMap(ChainComplex)" -- see prependZeroMap,
        -- prepend a zero map to chain complex
      * "removeZeroTrailingTerms(ChainComplex)" -- see
        removeZeroTrailingTerms, -- remove trailing
        zero terms of a chain complex
      * resolution(ChainComplex), --
        Resolves a ChainComplex.
      * "resolutionOfChainComplex(ChainComplex)" -- see
        resolutionOfChainComplex, -- free resolution
        of a chain complex
      * "scarfComplex(MonomialIdeal)" -- see scarfComplex,
        -- constructs the algebraic Scarf complex of a monomial ideal
      * substitute(ChainComplex,Ring)
        -- Change the ring over which the
        ChainComplex is defined.
      * "taylor(ZZ,MonomialIdeal)" -- see taylor, -- Gives the
        nth differential in the Taylor resolution of a monomial ideal I.
      * "taylorResolution(MonomialIdeal)" -- see taylorResolution,
        -- Gives the Taylor resolution of a monomial ideal I.
      * "trivialHomologicalTruncation(ChainComplex,ZZ,ZZ)" -- see
        trivialHomologicalTruncation, -- return
        the trivial truncation of a chain complex
  * Symbols
      * InitialDegree -- Used to specify an initial
        degree for chainComplexMap.

For the programmer
==================

The object ChainComplexExtras, is a package (Macaulay2Doc).

appendZeroMap -- append a zero map to chain complex
***************************************************

Synopsis
========

  * Usage:
        appendZeroMap C
  * Inputs:
      * C, a chain complex (Macaulay2Doc),
  * Outputs:
      * a chain complex (Macaulay2Doc),

Description
===========

Add a zero map after the last differential in a chain complex.

+-----------------------------------------------------------------------------+
|i1 : S=ZZ/101[x,y]/ideal(x*y)                                                |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i2 : C=chainComplex(matrix{{x}},matrix{{y}}**S^{ -1},matrix{{x}}**S^{ -2})[1]|
|                                                                             |
|      1      1      1      1                                                 |
|o2 = S  <-- S  <-- S  <-- S                                                  |
|                                                                             |
|     -1     0      1      2                                                  |
|                                                                             |
|o2 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i3 : appendZeroMap C                                                         |
|                                                                             |
|      1      1      1      1                                                 |
|o3 = S  <-- S  <-- S  <-- S  <-- 0                                           |
|                                                                             |
|     -1     0      1      2      3                                           |
|                                                                             |
|o3 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i4 : prependZeroMap C                                                        |
|                                                                             |
|             1      1      1      1                                          |
|o4 = 0  <-- S  <-- S  <-- S  <-- S                                           |
|                                                                             |
|     -2     -1     0      1      2                                           |
|                                                                             |
|o4 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+

Ways to use appendZeroMap :
===========================

  * "appendZeroMap(ChainComplex)"

For the programmer
==================

The object appendZeroMap, is a method function (Macaulay2Doc).

cartanEilenbergResolution -- Computes free resolution of a ChainComplex
***********************************************************************

Synopsis
========

  * Usage:
        m = cartanEilenbergResolution C
  * Inputs:
      * C, a chain complex (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * LengthLimit,
        => ..., default value infinity, How many steps to
        compute
  * Outputs:
      * m, a chain complex map (Macaulay2Doc),
        surjective quasi-isomorphism from a free ChainComplex

Description
===========

Uses a different algorithm than resolutionOfChainComplex, often slower and less
nearly minimal, to compute a free resolution of a chain complex. See
resolutionOfChainComplex for an example.

See also
========

  * resolutionOfChainComplex -- free
    resolution of a chain complex

Ways to use cartanEilenbergResolution :
=======================================

  * "cartanEilenbergResolution(ChainComplex)"

For the programmer
==================

The object cartanEilenbergResolution, is a
method function with options (Macaulay2Doc).

cartanEilenbergResolution(...,LengthLimit=>...) -- How many steps to compute
****************************************************************************

Synopsis
========

  * Usage:
        m = cartanEilenbergResolution(C,LengthLimit => n)
  * Inputs:
      * C, a chain complex (Macaulay2Doc),
      * n, an integer (Macaulay2Doc), non-negative integer or
        infinity
  * Outputs:
      * m, a chain complex map (Macaulay2Doc),

Description
===========

Computes LengthLimit steps beyond the length of C

Further information
===================

  * Default value: infinity (Macaulay2Doc),
  * Function: cartanEilenbergResolution, --
    Computes free resolution of a ChainComplex
  * Option key: LengthLimit (Macaulay2Doc), -- stop when the
    resolution reaches this length

Functions with optional argument named LengthLimit :
====================================================

  * cartanEilenbergResolution(...,LengthLimit=>...)
    -- How
    many steps to compute
  * isExact(...,LengthLimit=>...)
    -- Option to check
    exactness only up to a particular homological degree
  * isQuasiIsomorphism(...,LengthLimit=>...)
    -- Option to
    check quasi-isomorphism only up to a certain point
  * koszulComplex(...,LengthLimit=>...)
    -- How many steps to
    compute
  * "minimalBetti(...,LengthLimit=>...)" -- see minimalBetti (Macaulay2Doc),
    -- minimal betti numbers of (the minimal free
    resolution of) a homogeneous ideal or module
  * resolution(...,LengthLimit=>...) (Macaulay2Doc)
    -- stop
    when the resolution reaches this length
  * resolutionOfChainComplex(...,LengthLimit=>...)
    -- How
    many steps to compute
  * taylorResolution(...,LengthLimit=>...)
    -- How many steps
    to compute

chainComplexMap -- Defines a ChainComplexMap via a list of matrices.
********************************************************************

Synopsis
========

  * Usage:
        chainComplexMap(D,C,mapList)
  * Inputs:
      * D, a chain complex (Macaulay2Doc), target of
        ChainComplexMap
      * C, a chain complex (Macaulay2Doc), source of
        ChainComplexMap
      * mapList, a list (Macaulay2Doc), list of maps defining the
        new ChainComplexMap
  * Optional inputs (Macaulay2Doc),:
      * InitialDegree,
        => ..., default value -infinity, Specify initial degree.
  * Outputs:
      * a chain complex map (Macaulay2Doc), The desired
        ChainComplexMap.

Description
===========

+----------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c]                                    |
|                                                          |
|o1 = R                                                    |
|                                                          |
|o1 : PolynomialRing                                       |
+----------------------------------------------------------+
|i2 : kRes = res coker vars R                              |
|                                                          |
|      1      3      3      1                              |
|o2 = R  <-- R  <-- R  <-- R  <-- 0                        |
|                                                          |
|     0      1      2      3      4                        |
|                                                          |
|o2 : ChainComplex                                         |
+----------------------------------------------------------+
|i3 : multBya = extend(kRes,kRes,matrix{{a}})              |
|                                                          |
|          1             1                                 |
|o3 = 0 : R  <--------- R  : 0                             |
|               | a |                                      |
|                                                          |
|          3                     3                         |
|     1 : R  <----------------- R  : 1                     |
|               {1} | a b c |                              |
|               {1} | 0 0 0 |                              |
|               {1} | 0 0 0 |                              |
|                                                          |
|          3         3                                     |
|     2 : R  <----- R  : 2                                 |
|               0                                          |
|                                                          |
|          1         1                                     |
|     3 : R  <----- R  : 3                                 |
|               0                                          |
|                                                          |
|     4 : 0 <----- 0 : 4                                   |
|              0                                           |
|                                                          |
|o3 : ChainComplexMap                                      |
+----------------------------------------------------------+
|i4 : mapList = apply((min kRes..max kRes), i -> multBya_i)|
|                                                          |
|o4 = (| a |, {1} | a b c |, 0, 0, 0)                      |
|             {1} | 0 0 0 |                                |
|             {1} | 0 0 0 |                                |
|                                                          |
|o4 : Sequence                                             |
+----------------------------------------------------------+
|i5 : multBya2 = chainComplexMap(kRes,kRes,toList mapList) |
|                                                          |
|          1             1                                 |
|o5 = 0 : R  <--------- R  : 0                             |
|               | a |                                      |
|                                                          |
|          3                     3                         |
|     1 : R  <----------------- R  : 1                     |
|               {1} | a b c |                              |
|               {1} | 0 0 0 |                              |
|               {1} | 0 0 0 |                              |
|                                                          |
|          3         3                                     |
|     2 : R  <----- R  : 2                                 |
|               0                                          |
|                                                          |
|          1         1                                     |
|     3 : R  <----- R  : 3                                 |
|               0                                          |
|                                                          |
|     4 : 0 <----- 0 : 4                                   |
|              0                                           |
|                                                          |
|o5 : ChainComplexMap                                      |
+----------------------------------------------------------+
|i6 : multBya2 == multBya                                  |
|                                                          |
|o6 = true                                                 |
+----------------------------------------------------------+

Ways to use chainComplexMap :
=============================

  * "chainComplexMap(ChainComplex,ChainComplex,List)"

For the programmer
==================

The object chainComplexMap, is a method function with options (Macaulay2Doc).

chainComplexMap(...,InitialDegree=>...) -- Specify initial degree.
******************************************************************

Synopsis
========

  * Usage:
        chainComplexMap(...,InitialDegree=>n)
  * Inputs:
      * n, an integer (Macaulay2Doc), The initial degree of the
        ChainComplexMap.
  * Consequences:
      * The ChainComplexMap starts in degree n instead of the start of source.

Further information
===================

  * Default value: -infinity
  * Function: chainComplexMap, -- Defines a
    ChainComplexMap via a list of matrices.
  * Option key: InitialDegree, -- Used to specify an
    initial degree for chainComplexMap.

Functions with optional argument named InitialDegree :
======================================================

  * chainComplexMap(...,InitialDegree=>...)
    -- Specify
    initial degree.

extendFromMiddle -- extends a map between ChainComplexes
********************************************************

Synopsis
========

  * Usage:
        m = extendFromMiddle(F1,F2,f,i)
  * Inputs:
      * F1, a chain complex (Macaulay2Doc),
      * F2, a chain complex (Macaulay2Doc),
      * f, a matrix (Macaulay2Doc), homomorphism from F2_0 to
        F1_i
      * i, an integer (Macaulay2Doc),
  * Outputs:
      * m, a chain complex map (Macaulay2Doc),

Description
===========

If f is a map to F1_i from F2_0, the script computes a ChainComplexMap to F1
from F2e, where F2e is a chain complex obtained from F2 by prepending zeros.

Caveat
======

the process of making a new ChainComplex seems to destroy the direct sum
information in the source and target modules.

Ways to use extendFromMiddle :
==============================

  * "extendFromMiddle(ChainComplex,ChainComplex,Matrix,ZZ)"

For the programmer
==================

The object extendFromMiddle, is a method function (Macaulay2Doc).

Hom(ChainComplex,ChainComplex) -- Create the homomorphism complex of a pair of chain complexes.
***********************************************************************************************

Synopsis
========

  * Function: Hom (Macaulay2Doc),
  * Usage:
        Hom(F,F)
  * Inputs:
      * F, a chain complex (Macaulay2Doc),
      * G, a chain complex (Macaulay2Doc),
  * Outputs:
      * Hom(F,G)

Description
===========

+-----------------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c]                                           |
|                                                                 |
|o1 = R                                                           |
|                                                                 |
|o1 : PolynomialRing                                              |
+-----------------------------------------------------------------+
|i2 : kRes = res coker vars R                                     |
|                                                                 |
|      1      3      3      1                                     |
|o2 = R  <-- R  <-- R  <-- R  <-- 0                               |
|                                                                 |
|     0      1      2      3      4                               |
|                                                                 |
|o2 : ChainComplex                                                |
+-----------------------------------------------------------------+
|i3 : Hom(kRes,kRes)                                              |
|                                                                 |
|             1      6      15      20      15      6      1      |
|o3 = 0  <-- R  <-- R  <-- R   <-- R   <-- R   <-- R  <-- R  <-- 0|
|                                                                 |
|     -4     -3     -2     -1      0       1       2      3      4|
|                                                                 |
|o3 : ChainComplex                                                |
+-----------------------------------------------------------------+

Ways to use this method:
========================

  * Hom(ChainComplex,ChainComplex),
    -- Create the homomorphism complex of a pair of chain complexes.

InitialDegree -- Used to specify an initial degree for chainComplexMap.
***********************************************************************

Description
===========

InitialDegree -- an optional argument for chainComplexMapused to specify the
starting degree of the map.

This symbol is provided by the package ChainComplexExtras.

Functions with optional argument named InitialDegree :
======================================================

  * chainComplexMap(...,InitialDegree=>...)
    -- Specify
    initial degree.

For the programmer
==================

The object InitialDegree, is a symbol (Macaulay2Doc).

isChainComplex -- tests whether the differentials compose to zero
*****************************************************************

Synopsis
========

  * Usage:
        isChainComplex C
  * Inputs:
      * C, a chain complex (Macaulay2Doc),
  * Outputs:
      * a Boolean value (Macaulay2Doc),

Description
===========

tests that the differentials compose to zero.

+-----------------------------------------------------------------+
|i1 : S=ZZ/101[x,y]                                               |
|                                                                 |
|o1 = S                                                           |
|                                                                 |
|o1 : PolynomialRing                                              |
+-----------------------------------------------------------------+
|i2 : C=res ideal vars S, C'=chainComplex(matrix{{x}},matrix{{y}})|
|                                                                 |
|       1      2      1         1      1      1                   |
|o2 = (S  <-- S  <-- S  <-- 0, S  <-- S  <-- S )                  |
|                                                                 |
|      0      1      2      3  0      1      2                    |
|                                                                 |
|o2 : Sequence                                                    |
+-----------------------------------------------------------------+
|i3 : isChainComplex C, isChainComplex C'                         |
|                                                                 |
|o3 = (true, false)                                               |
|                                                                 |
|o3 : Sequence                                                    |
+-----------------------------------------------------------------+

The buildin function dual (Macaulay2Doc), for chainComplexes over
the exterior algebra does not return a complex, because the dual of a left
module is a right module.

+-----------------------------------------------------------------+
|i4 : kk=ZZ/101;n=4;                                              |
+-----------------------------------------------------------------+
|i6 : E=kk[e_0..e_n,SkewCommutative =>true]                       |
|                                                                 |
|o6 = E                                                           |
|                                                                 |
|o6 : PolynomialRing, 5 skew commutative variables                |
+-----------------------------------------------------------------+
|i7 : m=map(E^{0,1},,matrix{{ e_0,e_1*e_2},{e_3*e_4,e_0*e_1*e_4}})|
|                                                                 |
|o7 = {0}  | e_0    e_1e_2    |                                   |
|     {-1} | e_3e_4 e_0e_1e_4 |                                   |
|                                                                 |
|             2       2                                           |
|o7 : Matrix E  <--- E                                            |
+-----------------------------------------------------------------+
|i8 : fm=res coker m                                              |
|                                                                 |
|      2      2      8      27      66      135      246          |
|o8 = E  <-- E  <-- E  <-- E   <-- E   <-- E    <-- E             |
|                                                                 |
|     0      1      2      3       4       5        6             |
|                                                                 |
|o8 : ChainComplex                                                |
+-----------------------------------------------------------------+
|i9 : isChainComplex fm                                           |
|                                                                 |
|o9 = true                                                        |
+-----------------------------------------------------------------+
|i10 : dualfm = dual fm                                           |
|                                                                 |
|       246      135      66      27      8      2      2         |
|o10 = E    <-- E    <-- E   <-- E   <-- E  <-- E  <-- E          |
|                                                                 |
|      -6       -5       -4      -3      -2     -1     0          |
|                                                                 |
|o10 : ChainComplex                                               |
+-----------------------------------------------------------------+
|i11 : isChainComplex dualfm                                      |
|                                                                 |
|o11 = true                                                       |
+-----------------------------------------------------------------+
|i12 : f2=res( coker dualfm.dd_(-5),LengthLimit=> 6)[6]           |
|                                                                 |
|       246      135      66      27      8      2      2         |
|o12 = E    <-- E    <-- E   <-- E   <-- E  <-- E  <-- E          |
|                                                                 |
|      -6       -5       -4      -3      -2     -1     0          |
|                                                                 |
|o12 : ChainComplex                                               |
+-----------------------------------------------------------------+
|i13 : betti f2                                                   |
|                                                                 |
|              -6  -5 -4 -3 -2 -1 0                               |
|o13 = total: 246 135 66 27  8  2 2                               |
|         -2: 225 120 56 21  5  . .                               |
|         -1:  21  15 10  6  3  1 .                               |
|          0:   .   .  .  .  .  1 1                               |
|          1:   .   .  .  .  .  . 1                               |
|                                                                 |
|o13 : BettiTally                                                 |
+-----------------------------------------------------------------+
|i14 : betti dual fm                                              |
|                                                                 |
|              -6  -5 -4 -3 -2 -1 0                               |
|o14 = total: 246 135 66 27  8  2 2                               |
|         -2: 225 120 56 21  5  . .                               |
|         -1:  21  15 10  6  3  1 .                               |
|          0:   .   .  .  .  .  1 1                               |
|          1:   .   .  .  .  .  . 1                               |
|                                                                 |
|o14 : BettiTally                                                 |
+-----------------------------------------------------------------+

Ways to use isChainComplex :
============================

  * "isChainComplex(ChainComplex)"

For the programmer
==================

The object isChainComplex, is a method function (Macaulay2Doc).

isChainComplexMap -- Test to see if the ChainComplexMap commutes with the differentials.
****************************************************************************************

Synopsis
========

  * Usage:
        isChainComplexMap(phi)
  * Inputs:
      * phi,
  * Outputs:
      * Boolean

Description
===========

+-------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b,c]                                                   |
|                                                                         |
|o1 = S                                                                   |
|                                                                         |
|o1 : PolynomialRing                                                      |
+-------------------------------------------------------------------------+
|i2 : kRes = res coker vars S                                             |
|                                                                         |
|      1      3      3      1                                             |
|o2 = S  <-- S  <-- S  <-- S  <-- 0                                       |
|                                                                         |
|     0      1      2      3      4                                       |
|                                                                         |
|o2 : ChainComplex                                                        |
+-------------------------------------------------------------------------+
|i3 : multBya = extend(kRes,kRes,matrix{{a}})                             |
|                                                                         |
|          1             1                                                |
|o3 = 0 : S  <--------- S  : 0                                            |
|               | a |                                                     |
|                                                                         |
|          3                     3                                        |
|     1 : S  <----------------- S  : 1                                    |
|               {1} | a b c |                                             |
|               {1} | 0 0 0 |                                             |
|               {1} | 0 0 0 |                                             |
|                                                                         |
|          3         3                                                    |
|     2 : S  <----- S  : 2                                                |
|               0                                                         |
|                                                                         |
|          1         1                                                    |
|     3 : S  <----- S  : 3                                                |
|               0                                                         |
|                                                                         |
|     4 : 0 <----- 0 : 4                                                  |
|              0                                                          |
|                                                                         |
|o3 : ChainComplexMap                                                     |
+-------------------------------------------------------------------------+
|i4 : isChainComplexMap(multBya)                                          |
|                                                                         |
|o4 = true                                                                |
+-------------------------------------------------------------------------+
|i5 : T = chainComplex(map(S^1,S^1,a))                                    |
|                                                                         |
|      1      1                                                           |
|o5 = S  <-- S                                                            |
|                                                                         |
|     0      1                                                            |
|                                                                         |
|o5 : ChainComplex                                                        |
+-------------------------------------------------------------------------+
|i6 : T' = chainComplex{map(S^1/(ideal a),S^1, 1), map(S^1,S^1, -a)}[1]   |
|                                                                         |
|                         1      1                                        |
|o6 = cokernel | a | <-- S  <-- S                                         |
|                                                                         |
|     -1                 0      1                                         |
|                                                                         |
|o6 : ChainComplex                                                        |
+-------------------------------------------------------------------------+
|i7 : phi = chainComplexMap(T',T,apply(toList(min T..max T), i->id_(T_i)))|
|                                                                         |
|          1             1                                                |
|o7 = 0 : S  <--------- S  : 0                                            |
|               | 1 |                                                     |
|                                                                         |
|          1             1                                                |
|     1 : S  <--------- S  : 1                                            |
|               | 1 |                                                     |
|                                                                         |
|o7 : ChainComplexMap                                                     |
+-------------------------------------------------------------------------+
|i8 : isChainComplexMap phi                                               |
|                                                                         |
|o8 = true                                                                |
+-------------------------------------------------------------------------+

Caveat: The script uses trivialHomologicalTruncation to truncates the source
and target of the map phi to include only the indices for which phi has
matrices. This eliminates the problem of complexes of different lengths seen in
an earlier version, which would have made the last line in the example return
false.

Ways to use isChainComplexMap :
===============================

  * "isChainComplexMap(ChainComplexMap)"

For the programmer
==================

The object isChainComplexMap, is a method function (Macaulay2Doc).

isExact -- Test to see if the ChainComplex is exact.
****************************************************

Synopsis
========

  * Usage:
        isExact(F)
  * Inputs:
      * F,
  * Optional inputs (Macaulay2Doc),:
      * LengthLimit, =>
        ..., default value infinity, Option to check exactness only up to a
        particular homological degree
  * Outputs:
      * Boolean

Description
===========

+--------------------------------------------+
|i1 : R = ZZ/101[a,b,c]                      |
|                                            |
|o1 = R                                      |
|                                            |
|o1 : PolynomialRing                         |
+--------------------------------------------+
|i2 : k = coker vars R                       |
|                                            |
|o2 = cokernel | a b c |                     |
|                                            |
|                            1               |
|o2 : R-module, quotient of R                |
+--------------------------------------------+
|i3 : kRes = res k                           |
|                                            |
|      1      3      3      1                |
|o3 = R  <-- R  <-- R  <-- R  <-- 0          |
|                                            |
|     0      1      2      3      4          |
|                                            |
|o3 : ChainComplex                           |
+--------------------------------------------+
|i4 : isExact kRes                           |
|                                            |
|o4 = false                                  |
+--------------------------------------------+
|i5 : trivialCx = chainComplex matrix {{1_R}}|
|                                            |
|      1      1                              |
|o5 = R  <-- R                               |
|                                            |
|     0      1                               |
|                                            |
|o5 : ChainComplex                           |
+--------------------------------------------+
|i6 : isExact trivialCx                      |
|                                            |
|o6 = true                                   |
+--------------------------------------------+

Ways to use isExact :
=====================

  * "isExact(ChainComplex)"

For the programmer
==================

The object isExact, is a method function with options (Macaulay2Doc).

isExact(...,LengthLimit=>...) -- Option to check exactness only up to a particular homological degree
*****************************************************************************************************

Synopsis
========

  * Usage:
        t = isExact(F, LengthLimit => n)
  * Inputs:
      * F, a chain complex (Macaulay2Doc),
      * n, an integer (Macaulay2Doc),
  * Outputs:
      * t, a Boolean value (Macaulay2Doc),

Description
===========

+-------------------------------------------------------+
|i1 : kk= ZZ/101                                        |
|                                                       |
|o1 = kk                                                |
|                                                       |
|o1 : QuotientRing                                      |
+-------------------------------------------------------+
|i2 : S = kk[a,b,c]                                     |
|                                                       |
|o2 = S                                                 |
|                                                       |
|o2 : PolynomialRing                                    |
+-------------------------------------------------------+
|i3 : R = S/ideal(a^3)                                  |
|                                                       |
|o3 = R                                                 |
|                                                       |
|o3 : QuotientRing                                      |
+-------------------------------------------------------+
|i4 : M = R^1/ideal(a)                                  |
|                                                       |
|o4 = cokernel | a |                                    |
|                                                       |
|                            1                          |
|o4 : R-module, quotient of R                           |
+-------------------------------------------------------+
|i5 : C = chainComplex{map(M,R^0,0)}                    |
|                                                       |
|o5 = cokernel | a | <-- 0                              |
|                                                       |
|     0                  1                              |
|                                                       |
|o5 : ChainComplex                                      |
+-------------------------------------------------------+
|i6 : n =resolutionOfChainComplex (C, LengthLimit => 10)|
|                                                       |
|          1             1                              |
|o6 = 0 : R  <--------- R  : 0                          |
|               | 1 |                                   |
|                                                       |
|                   1                                   |
|     1 : 0 <----- R  : 1                               |
|              0                                        |
|                                                       |
|o6 : ChainComplexMap                                   |
+-------------------------------------------------------+
|i7 : isExact(cone n, LengthLimit=> 10)                 |
|                                                       |
|o7 = true                                              |
+-------------------------------------------------------+
|i8 : isExact(cone n, LengthLimit=> 12)                 |
|                                                       |
|o8 = false                                             |
+-------------------------------------------------------+

Further information
===================

  * Default value: infinity (Macaulay2Doc),
  * Function: isExact, -- Test to see if the ChainComplex is
    exact.
  * Option key: LengthLimit (Macaulay2Doc), -- stop when the
    resolution reaches this length

See also
========

  * isQuasiIsomorphism -- Test to see if the
    ChainComplexMap is a quasi-isomorphism.

Functions with optional argument named LengthLimit :
====================================================

  * cartanEilenbergResolution(...,LengthLimit=>...)
    -- How
    many steps to compute
  * isExact(...,LengthLimit=>...)
    -- Option to check
    exactness only up to a particular homological degree
  * isQuasiIsomorphism(...,LengthLimit=>...)
    -- Option to
    check quasi-isomorphism only up to a certain point
  * koszulComplex(...,LengthLimit=>...)
    -- How many steps to
    compute
  * "minimalBetti(...,LengthLimit=>...)" -- see minimalBetti (Macaulay2Doc),
    -- minimal betti numbers of (the minimal free
    resolution of) a homogeneous ideal or module
  * resolution(...,LengthLimit=>...) (Macaulay2Doc)
    -- stop
    when the resolution reaches this length
  * resolutionOfChainComplex(...,LengthLimit=>...)
    -- How
    many steps to compute
  * taylorResolution(...,LengthLimit=>...)
    -- How many steps
    to compute

isMinimalChainComplex -- tests for minimality
*********************************************

Synopsis
========

  * Usage:
        b = isMinimalChainComplex C
  * Inputs:
      * C, a chain complex (Macaulay2Doc), chain complex of
        free modules
  * Outputs:
      * b, a Boolean value (Macaulay2Doc),

Description
===========

The script tests whether all the differentials of C become zero when we
substitute 0 for each variable of ring C

For the programmer
==================

The object isMinimalChainComplex, is a
function closure (Macaulay2Doc).

isQuasiIsomorphism -- Test to see if the ChainComplexMap is a quasi-isomorphism.
********************************************************************************

Synopsis
========

  * Usage:
        isQuasiIsomorphism(phi)
  * Inputs:
      * phi,
  * Optional inputs (Macaulay2Doc),:
      * LengthLimit,
        => ..., default value infinity, Option to check
        quasi-isomorphism only up to a certain point
  * Outputs:
      * Boolean

Description
===========

A quasi-isomorphism is a chain map that is an isomorphism in homology. Mapping
cones currently do not work properly for complexes concentrated in one degree,
so isQuasiIsomorphism could return bad information in that case.
+--------------------------------------------+
|i1 : R = ZZ/101[a,b,c]                      |
|                                            |
|o1 = R                                      |
|                                            |
|o1 : PolynomialRing                         |
+--------------------------------------------+
|i2 : kRes = res coker vars R                |
|                                            |
|      1      3      3      1                |
|o2 = R  <-- R  <-- R  <-- R  <-- 0          |
|                                            |
|     0      1      2      3      4          |
|                                            |
|o2 : ChainComplex                           |
+--------------------------------------------+
|i3 : multBya = extend(kRes,kRes,matrix{{a}})|
|                                            |
|          1             1                   |
|o3 = 0 : R  <--------- R  : 0               |
|               | a |                        |
|                                            |
|          3                     3           |
|     1 : R  <----------------- R  : 1       |
|               {1} | a b c |                |
|               {1} | 0 0 0 |                |
|               {1} | 0 0 0 |                |
|                                            |
|          3         3                       |
|     2 : R  <----- R  : 2                   |
|               0                            |
|                                            |
|          1         1                       |
|     3 : R  <----- R  : 3                   |
|               0                            |
|                                            |
|     4 : 0 <----- 0 : 4                     |
|              0                             |
|                                            |
|o3 : ChainComplexMap                        |
+--------------------------------------------+
|i4 : isQuasiIsomorphism(multBya)            |
|                                            |
|o4 = false                                  |
+--------------------------------------------+
|i5 : F = extend(kRes,kRes,matrix{{1_R}})    |
|                                            |
|          1             1                   |
|o5 = 0 : R  <--------- R  : 0               |
|               | 1 |                        |
|                                            |
|          3                     3           |
|     1 : R  <----------------- R  : 1       |
|               {1} | 1 0 0 |                |
|               {1} | 0 1 0 |                |
|               {1} | 0 0 1 |                |
|                                            |
|          3                     3           |
|     2 : R  <----------------- R  : 2       |
|               {2} | 1 0 0 |                |
|               {2} | 0 1 0 |                |
|               {2} | 0 0 1 |                |
|                                            |
|          1                 1               |
|     3 : R  <------------- R  : 3           |
|               {3} | 1 |                    |
|                                            |
|     4 : 0 <----- 0 : 4                     |
|              0                             |
|                                            |
|o5 : ChainComplexMap                        |
+--------------------------------------------+
|i6 : isQuasiIsomorphism(F)                  |
|                                            |
|o6 = true                                   |
+--------------------------------------------+

Ways to use isQuasiIsomorphism :
================================

  * "isQuasiIsomorphism(ChainComplexMap)"

For the programmer
==================

The object isQuasiIsomorphism, is a method function with options (Macaulay2Doc).

isQuasiIsomorphism(...,LengthLimit=>...) -- Option to check quasi-isomorphism only up to a certain point
********************************************************************************************************

Synopsis
========

  * Usage:
        t = isQuasiIsomorphism(F, LengthLimit => n)
  * Inputs:
      * F, a chain complex map (Macaulay2Doc),
      * n, an integer (Macaulay2Doc),
  * Outputs:
      * t, a Boolean value (Macaulay2Doc),

Description
===========

Useful, for example, when checking whether a map is a resolution of a complex
in cases where the actual resolution is infinite

+-------------------------------------------------------+
|i1 : kk= ZZ/101                                        |
|                                                       |
|o1 = kk                                                |
|                                                       |
|o1 : QuotientRing                                      |
+-------------------------------------------------------+
|i2 : S = kk[a,b,c]                                     |
|                                                       |
|o2 = S                                                 |
|                                                       |
|o2 : PolynomialRing                                    |
+-------------------------------------------------------+
|i3 : R = S/ideal(a^3)                                  |
|                                                       |
|o3 = R                                                 |
|                                                       |
|o3 : QuotientRing                                      |
+-------------------------------------------------------+
|i4 : M = R^1/ideal(a)                                  |
|                                                       |
|o4 = cokernel | a |                                    |
|                                                       |
|                            1                          |
|o4 : R-module, quotient of R                           |
+-------------------------------------------------------+
|i5 : C = chainComplex{map(M,R^0,0)}                    |
|                                                       |
|o5 = cokernel | a | <-- 0                              |
|                                                       |
|     0                  1                              |
|                                                       |
|o5 : ChainComplex                                      |
+-------------------------------------------------------+
|i6 : m=cartanEilenbergResolution (C, LengthLimit => 10)|
|                                                       |
|                                    1                  |
|o6 = 0 : cokernel | a | <--------- R  : 0              |
|                           | 1 |                       |
|                                                       |
|                   1                                   |
|     1 : 0 <----- R  : 1                               |
|              0                                        |
|                                                       |
|o6 : ChainComplexMap                                   |
+-------------------------------------------------------+
|i7 : isQuasiIsomorphism(m, LengthLimit=> 10)           |
|                                                       |
|o7 = true                                              |
+-------------------------------------------------------+
|i8 : isQuasiIsomorphism(m, LengthLimit => 12)          |
|                                                       |
|o8 = false                                             |
+-------------------------------------------------------+

Further information
===================

  * Default value: infinity (Macaulay2Doc),
  * Function: isQuasiIsomorphism, -- Test to see if
    the ChainComplexMap is a quasi-isomorphism.
  * Option key: LengthLimit (Macaulay2Doc), -- stop when the
    resolution reaches this length

See also
========

  * isExact -- Test to see if the ChainComplex is exact.

Functions with optional argument named LengthLimit :
====================================================

  * cartanEilenbergResolution(...,LengthLimit=>...)
    -- How
    many steps to compute
  * isExact(...,LengthLimit=>...)
    -- Option to check
    exactness only up to a particular homological degree
  * isQuasiIsomorphism(...,LengthLimit=>...)
    -- Option to
    check quasi-isomorphism only up to a certain point
  * koszulComplex(...,LengthLimit=>...)
    -- How many steps to
    compute
  * "minimalBetti(...,LengthLimit=>...)" -- see minimalBetti (Macaulay2Doc),
    -- minimal betti numbers of (the minimal free
    resolution of) a homogeneous ideal or module
  * resolution(...,LengthLimit=>...) (Macaulay2Doc)
    -- stop
    when the resolution reaches this length
  * resolutionOfChainComplex(...,LengthLimit=>...)
    -- How
    many steps to compute
  * taylorResolution(...,LengthLimit=>...)
    -- How many steps
    to compute

koszulComplex -- Gives the Koszul complex on the generators of I.
*****************************************************************

Synopsis
========

  * Usage:
        koszulComplex(I)
  * Inputs:
      * I,
  * Optional inputs (Macaulay2Doc),:
      * LengthLimit,
        => ..., default value 0, How many steps to compute
  * Outputs:
      * ChainComplex

Description
===========

+------------------------------------+
|i1 : R = ZZ/101[a,b,c]              |
|                                    |
|o1 = R                              |
|                                    |
|o1 : PolynomialRing                 |
+------------------------------------+
|i2 : K = koszulComplex(ideal vars R)|
|                                    |
|      1      3      3      1        |
|o2 = R  <-- R  <-- R  <-- R         |
|                                    |
|     0      1      2      3         |
|                                    |
|o2 : ChainComplex                   |
+------------------------------------+

Ways to use koszulComplex :
===========================

  * "koszulComplex(Ideal)"

For the programmer
==================

The object koszulComplex, is a method function with options (Macaulay2Doc).

koszulComplex(...,LengthLimit=>...) -- How many steps to compute
****************************************************************

Synopsis
========

  * Usage:
        m = koszulComplex(C,LengthLimit => n)
  * Inputs:
      * C, a chain complex (Macaulay2Doc),
      * n, an integer (Macaulay2Doc), non-negative integer or
        infinity
  * Outputs:
      * m, a chain complex (Macaulay2Doc),

Description
===========

Computes LengthLimit steps

Further information
===================

  * Default value: 0
  * Function: koszulComplex, -- Gives the Koszul complex
    on the generators of I.
  * Option key: LengthLimit (Macaulay2Doc), -- stop when the
    resolution reaches this length

Functions with optional argument named LengthLimit :
====================================================

  * cartanEilenbergResolution(...,LengthLimit=>...)
    -- How
    many steps to compute
  * isExact(...,LengthLimit=>...)
    -- Option to check
    exactness only up to a particular homological degree
  * isQuasiIsomorphism(...,LengthLimit=>...)
    -- Option to
    check quasi-isomorphism only up to a certain point
  * koszulComplex(...,LengthLimit=>...)
    -- How many steps to
    compute
  * "minimalBetti(...,LengthLimit=>...)" -- see minimalBetti (Macaulay2Doc),
    -- minimal betti numbers of (the minimal free
    resolution of) a homogeneous ideal or module
  * resolution(...,LengthLimit=>...) (Macaulay2Doc)
    -- stop
    when the resolution reaches this length
  * resolutionOfChainComplex(...,LengthLimit=>...)
    -- How
    many steps to compute
  * taylorResolution(...,LengthLimit=>...)
    -- How many steps
    to compute

minimize -- minimal quotient complex of a free ChainComplex
***********************************************************

Synopsis
========

  * Usage:
        m = minimize F
  * Inputs:
      * F, a chain complex (Macaulay2Doc), chain complex of
        free modules
  * Outputs:
      * m, a chain complex map (Macaulay2Doc),
        quasi-isomorphism F -> F', where F' is a minimal free complex

Description
===========

For the quasi-isomorphism from a minimal subcomplex use

dual minimize dual F

To simplify the notation consider the complex C = E[min E] that is shifted so
that the first module is C_0. The algorithm: Set dbar = the reduction of the
differential d mod the maximal ideal. a complement of ker dbar, and compute the
idempotent rho: E -> E. the map rho is not a chain complex map, but the image
of (rho | d*rho): C ++ C[1] --> C is a subcomplex and the minimization of  C is
the complex C/image(rho|d*rho). The script returns the ChainComplexMap from the
minimization to C.

To illustrate we first make a nonminimal complex by adding trivial complexes to
a minimal complex and then mixing things up by conjugating with general
isomorphisms:

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/32003[a,b,c]                                                     |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : red = map(S,S,toList(numgens S:0_S))                                    |
|                                                                             |
|o2 = map (S, S, {0, 0, 0})                                                   |
|                                                                             |
|o2 : RingMap S <--- S                                                        |
+-----------------------------------------------------------------------------+
|i3 : C = koszul gens (ideal vars S)^2                                        |
|                                                                             |
|      1      6      15      20      15      6      1                         |
|o3 = S  <-- S  <-- S   <-- S   <-- S   <-- S  <-- S                          |
|                                                                             |
|     0      1      2       3       4       5      6                          |
|                                                                             |
|o3 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i4 : G = S^{0,-1,-2,-3,-4,-5,-6}                                             |
|                                                                             |
|      7                                                                      |
|o4 = S                                                                       |
|                                                                             |
|o4 : S-module, free, degrees {0..6}                                          |
+-----------------------------------------------------------------------------+
|i5 : D = apply(length C+1, i-> C_i++G++G)                                    |
|                                                                             |
|       15   20   29   34   29   20   15                                      |
|o5 = {S  , S  , S  , S  , S  , S  , S  }                                     |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : zG = map(G,G,0)                                                         |
|                                                                             |
|o6 = 0                                                                       |
|                                                                             |
|             7       7                                                       |
|o6 : Matrix S  <--- S                                                        |
+-----------------------------------------------------------------------------+
|i7 : difs0 = apply(length C, i-> (map(D_i, D_(i+1), matrix{{C.dd_(i+1),      |
|-----------------------------------------------------------------------------|
|map(C_i,G,0), map(C_i,G,0)},{map(G,C_(i+1),0), zG, zG},{map(G,C_(i+1),0),    |
|-----------------------------------------------------------------------------|
|id_G, zG}})));                                                               |
+-----------------------------------------------------------------------------+
|i8 : len = #difs0                                                            |
|                                                                             |
|o8 = 6                                                                       |
+-----------------------------------------------------------------------------+
|i9 : Q = apply(len, i-> random(target difs0_i, target difs0_i))|             |
|       {random(source difs0_(len-1), source difs0_(len-1))};                 |
+-----------------------------------------------------------------------------+
|i10 : difs1 = apply(len, i-> Q_i*difs0_i*Q_(i+1)^(-1));                      |
+-----------------------------------------------------------------------------+
|i11 : E = chainComplex difs1                                                 |
|                                                                             |
|       15      20      29      34      29      20      15                    |
|o11 = S   <-- S   <-- S   <-- S   <-- S   <-- S   <-- S                      |
|                                                                             |
|      0       1       2       3       4       5       6                      |
|                                                                             |
|o11 : ChainComplex                                                           |
+-----------------------------------------------------------------------------+
|i12 : isMinimalChainComplex E                                                |
|                                                                             |
|o12 = false                                                                  |
+-----------------------------------------------------------------------------+

Now we minimize the result. The free summand we added to the end maps to zero,
and thus is part of the minimization.

+-----------------------------------------------------+
|i13 : time m = minimize (E[1]);                      |
|     -- used 0.913312 seconds                        |
+-----------------------------------------------------+
|i14 : isQuasiIsomorphism m                           |
|                                                     |
|o14 = true                                           |
+-----------------------------------------------------+
|i15 : E[1] == source m                               |
|                                                     |
|o15 = true                                           |
+-----------------------------------------------------+
|i16 : E' = target m                                  |
|                                                     |
|       8      6      15      20      15      6      8|
|o16 = S  <-- S  <-- S   <-- S   <-- S   <-- S  <-- S |
|                                                     |
|      -1     0      1       2       3       4      5 |
|                                                     |
|o16 : ChainComplex                                   |
+-----------------------------------------------------+
|i17 : isChainComplex E'                              |
|                                                     |
|o17 = true                                           |
+-----------------------------------------------------+
|i18 : isMinimalChainComplex E'                       |
|                                                     |
|o18 = true                                           |
+-----------------------------------------------------+

Ways to use minimize :
======================

  * "minimize(ChainComplex)"

For the programmer
==================

The object minimize, is a method function (Macaulay2Doc).

nonzeroMax -- computes the homological position of the last non-zero module in a ChainComplex
*********************************************************************************************

Synopsis
========

  * Usage:
        nonzeroMin C
        nonzeroMax C
  * Inputs:
      * C, a chain complex (Macaulay2Doc),
  * Outputs:
      * an integer (Macaulay2Doc),

Description
===========

The function max (Macaulay2Doc), applied to a chain complex returns
the largest position of a defined term in a chain complex, which very well
might be the zero module. The function nonzeroMax returns the largest positions
of a non-zero module.

+-----------------------------------------------------------------------------+
|i1 : S=ZZ/101[x,y]/ideal(x*y)                                                |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i2 : C=chainComplex(matrix{{x}},matrix{{y}}**S^{ -1},matrix{{x}}**S^{ -2})[1]|
|                                                                             |
|      1      1      1      1                                                 |
|o2 = S  <-- S  <-- S  <-- S                                                  |
|                                                                             |
|     -1     0      1      2                                                  |
|                                                                             |
|o2 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i3 : isChainComplex C                                                        |
|                                                                             |
|o3 = true                                                                    |
+-----------------------------------------------------------------------------+
|i4 : C'=prependZeroMap appendZeroMap C                                       |
|                                                                             |
|             1      1      1      1                                          |
|o4 = 0  <-- S  <-- S  <-- S  <-- S  <-- 0                                    |
|                                                                             |
|     -2     -1     0      1      2      3                                    |
|                                                                             |
|o4 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i5 : min C', nonzeroMin C'                                                   |
|                                                                             |
|o5 = (-2, -1)                                                                |
|                                                                             |
|o5 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i6 : max C', nonzeroMax C'                                                   |
|                                                                             |
|o6 = (3, 2)                                                                  |
|                                                                             |
|o6 : Sequence                                                                |
+-----------------------------------------------------------------------------+

Ways to use nonzeroMax :
========================

  * "nonzeroMax(ChainComplex)"

For the programmer
==================

The object nonzeroMax, is a method function (Macaulay2Doc).

nonzeroMin -- computes the homological position of the first non-zero module in a ChainComplex
**********************************************************************************************

Synopsis
========

  * Usage:
        nonzeroMin C
  * Inputs:
      * C, a chain complex (Macaulay2Doc),
  * Outputs:
      * an integer (Macaulay2Doc),

Description
===========

The function min (Macaulay2Doc), applied to a chain complex returns
the smallest position of a defined term in a chain complex, which very well
might be the zero module. The function nonzeroMin return the smallest positions
of a non-zero module.

+-----------------------------------------------------------------------------+
|i1 : S=ZZ/101[x,y]/ideal(x*y)                                                |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i2 : C=chainComplex(matrix{{x}},matrix{{y}}**S^{ -1},matrix{{x}}**S^{ -2})[1]|
|                                                                             |
|      1      1      1      1                                                 |
|o2 = S  <-- S  <-- S  <-- S                                                  |
|                                                                             |
|     -1     0      1      2                                                  |
|                                                                             |
|o2 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i3 : isChainComplex C                                                        |
|                                                                             |
|o3 = true                                                                    |
+-----------------------------------------------------------------------------+
|i4 : C'=prependZeroMap appendZeroMap C                                       |
|                                                                             |
|             1      1      1      1                                          |
|o4 = 0  <-- S  <-- S  <-- S  <-- S  <-- 0                                    |
|                                                                             |
|     -2     -1     0      1      2      3                                    |
|                                                                             |
|o4 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i5 : min C', nonzeroMin C'                                                   |
|                                                                             |
|o5 = (-2, -1)                                                                |
|                                                                             |
|o5 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i6 : max C', nonzeroMax C'                                                   |
|                                                                             |
|o6 = (3, 2)                                                                  |
|                                                                             |
|o6 : Sequence                                                                |
+-----------------------------------------------------------------------------+

Ways to use nonzeroMin :
========================

  * "nonzeroMin(ChainComplex)"

For the programmer
==================

The object nonzeroMin, is a method function (Macaulay2Doc).

prependZeroMap -- prepend a zero map to chain complex
*****************************************************

Synopsis
========

  * Usage:
        prependZeroMap C
  * Inputs:
      * C, a chain complex (Macaulay2Doc),
  * Outputs:
      * a chain complex (Macaulay2Doc),

Description
===========

Add a zero map before the first differential in a chain complex.

+-----------------------------------------------------------------------------+
|i1 : S=ZZ/101[x,y]/ideal(x*y)                                                |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i2 : C=chainComplex(matrix{{x}},matrix{{y}}**S^{ -1},matrix{{x}}**S^{ -2})[1]|
|                                                                             |
|      1      1      1      1                                                 |
|o2 = S  <-- S  <-- S  <-- S                                                  |
|                                                                             |
|     -1     0      1      2                                                  |
|                                                                             |
|o2 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i3 : prependZeroMap C                                                        |
|                                                                             |
|             1      1      1      1                                          |
|o3 = 0  <-- S  <-- S  <-- S  <-- S                                           |
|                                                                             |
|     -2     -1     0      1      2                                           |
|                                                                             |
|o3 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i4 : appendZeroMap C                                                         |
|                                                                             |
|      1      1      1      1                                                 |
|o4 = S  <-- S  <-- S  <-- S  <-- 0                                           |
|                                                                             |
|     -1     0      1      2      3                                           |
|                                                                             |
|o4 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+

Ways to use prependZeroMap :
============================

  * "prependZeroMap(ChainComplex)"

For the programmer
==================

The object prependZeroMap, is a method function (Macaulay2Doc).

removeZeroTrailingTerms -- remove trailing zero terms of a chain complex
************************************************************************

Synopsis
========

  * Usage:
        removeZeroTrailingTerms C
  * Inputs:
      * C, a chain complex (Macaulay2Doc),
  * Outputs:
      * a chain complex (Macaulay2Doc),

Description
===========

Remove trailing zero terms in a complex

+-----------------------------------------------------------------------------+
|i1 : S=ZZ/101[x,y]/ideal(x*y)                                                |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i2 : C=prependZeroMap appendZeroMap chainComplex(matrix{{x}},matrix{{y}}**S^{|
|                                                                             |
|             1      1      1      1                                          |
|o2 = 0  <-- S  <-- S  <-- S  <-- S  <-- 0                                    |
|                                                                             |
|     -2     -1     0      1      2      3                                    |
|                                                                             |
|o2 : ChainComplex                                                            |
|-----------------------------------------------------------------------------|
|-1},matrix{{x}}**S^{ -2})[1]                                                 |
+-----------------------------------------------------------------------------+
|i3 : removeZeroTrailingTerms C                                               |
|                                                                             |
|      1      1      1      1                                                 |
|o3 = S  <-- S  <-- S  <-- S                                                  |
|                                                                             |
|     -1     0      1      2                                                  |
|                                                                             |
|o3 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+

If C has only one nonzero term, then the functions returns two zero maps.

+-------------------------------------------------------+
|i4 : S=ZZ                                              |
|                                                       |
|o4 = ZZ                                                |
|                                                       |
|o4 : Ring                                              |
+-------------------------------------------------------+
|i5 : C=prependZeroMap  chainComplex( map(S^0,S^1,0))[3]|
|                                                       |
|                     1                                 |
|o5 = 0  <-- 0  <-- ZZ                                  |
|                                                       |
|     -4     -3     -2                                  |
|                                                       |
|o5 : ChainComplex                                      |
+-------------------------------------------------------+
|i6 : removeZeroTrailingTerms C                         |
|                                                       |
|              1                                        |
|o6 = 0  <-- ZZ  <-- 0                                  |
|                                                       |
|     -3     -2      -1                                 |
|                                                       |
|o6 : ChainComplex                                      |
+-------------------------------------------------------+

Ways to use removeZeroTrailingTerms :
=====================================

  * "removeZeroTrailingTerms(ChainComplex)"

For the programmer
==================

The object removeZeroTrailingTerms, is a
method function (Macaulay2Doc).

resolution(ChainComplex) -- Resolves a ChainComplex.
****************************************************

Synopsis
========

  * Function: resolution (Macaulay2Doc),
  * Usage:
        resolution C
  * Inputs:
      * C, a chain complex (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit (Macaulay2Doc),
        => ..., default value null, null
      * FastNonminimal (Macaulay2Doc), => ..., default
        value false, null
      * HardDegreeLimit (Macaulay2Doc),
        => ..., default value {}, null
      * LengthLimit (Macaulay2Doc),
        => ..., default value infinity, null
      * PairLimit (Macaulay2Doc),
        => ..., default value infinity, null
      * SortStrategy (Macaulay2Doc),
        => ..., default value 0, null
      * StopBeforeComputation (Macaulay2Doc),
        => ..., default value false, null
      * Strategy (Macaulay2Doc),
        => ..., default value null, null
      * SyzygyLimit (Macaulay2Doc),
        => ..., default value infinity, null
  * Outputs:
      * ChainComplex

Description
===========

Returns a surjective ChainComplexMap that is a quasi-isomorphism from a
(generally non-minimal) ChainComplex of free modules. resolution C is the same
as resolutionOfChainComplex C. The quasi-isomorphism is computed by the method
of iterated mapping cones. (For the computation of the Cartan-Eilenberg
resolution, which is usually slower and results in a larger complex, use
cartanEilenbergResolution C
+------------------------------------------------+
|i1 : R = ZZ/32003[a..d]                         |
|                                                |
|o1 = R                                          |
|                                                |
|o1 : PolynomialRing                             |
+------------------------------------------------+
|i2 : I = monomialCurveIdeal(R,{1,2,3})          |
|                                                |
|             2                    2             |
|o2 = ideal (c  - b*d, b*c - a*d, b  - a*c)      |
|                                                |
|o2 : Ideal of R                                 |
+------------------------------------------------+
|i3 : C = koszulComplex(ideal vars R) ** (R^1/I);|
+------------------------------------------------+
|i4 : m = res C;                                 |
+------------------------------------------------+
|i5 : isQuasiIsomorphism m                       |
|                                                |
|o5 = true                                       |
+------------------------------------------------+
|i6 : betti source m                             |
|                                                |
|            0 1  2  3  4  5 6                   |
|o6 = total: 1 7 20 30 25 11 2                   |
|         0: 1 4  6  4  1  . .                   |
|         1: . 3 14 26 24 11 2                   |
|                                                |
|o6 : BettiTally                                 |
+------------------------------------------------+
|i7 : C == target m                              |
|                                                |
|o7 = true                                       |
+------------------------------------------------+

Ways to use this method:
========================

  * resolution(ChainComplex) -- Resolves a
    ChainComplex.

resolutionOfChainComplex -- free resolution of a chain complex
**************************************************************

Synopsis
========

  * Usage:
        F = resolutionOfChainComplex C
  * Inputs:
      * C, a chain complex (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * LengthLimit,
        => ..., default value infinity, How many steps to
        compute
  * Outputs:
      * F, a chain complex (Macaulay2Doc),

Description
===========

Given a chain complex C, the routine returns a surjective ChainComplexMap
p:F->C from a free complex. The complex F is constructed from minimal free
resolutions of the terms of C by the method of iterated mapping cones.

That is, if C: 0 -> Cn ->...->Cm ->0 is a chain complex, and Gi is a resolution
of Ci, and [G -> F] denotes the mapping cone of a map of complexes G \to F,
then the resolution of C is Gm if n=m; is [Gn->Gm] if n = m+1 and otherwise is
defined inductively  as Fi = [Gi -> F(i-1)] where the map Gi -> F(i-1) is
induced by lifing Gi_0 --> G(i-1)_0 to the kernel of the (i-1)-st differential
of F(i-1).

The complex F = source p is not necessarily minimal, but minimize F returns a
morphism to a minimal free chain complex quasi-isomorphic to F, and dual
minimimize dual F returns a quasi-isomorphism from a minimal free complex, so

p*(dual minimimize dual F)

is the quasi-isomorphism from the minimal free resolution of C.

+-----------------------------------------------------------------------------+
|i1 : kk= ZZ/101                                                              |
|                                                                             |
|o1 = kk                                                                      |
|                                                                             |
|o1 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i2 : S = kk[a,b,c]                                                           |
|                                                                             |
|o2 = S                                                                       |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : R = S/ideal"ab2,a2c3"                                                   |
|                                                                             |
|o3 = R                                                                       |
|                                                                             |
|o3 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i4 : f = map(R,S,vars R)                                                     |
|                                                                             |
|o4 = map (R, S, {a, b, c})                                                   |
|                                                                             |
|o4 : RingMap R <--- S                                                        |
+-----------------------------------------------------------------------------+
|i5 : C = res(R^1/(ideal vars R))**(R^1/(ideal vars R)^5);                    |
+-----------------------------------------------------------------------------+
|i6 : mods = for i from 0 to max C list pushForward(f, C_i);                  |
+-----------------------------------------------------------------------------+
|i7 : C = chainComplex for i from min C+1 to max C list                       |
|-----------------------------------------------------------------------------|
|map(mods_(i-1),mods_i,substitute(matrix C.dd_i,S));                          |
+-----------------------------------------------------------------------------+
|i8 : time m = resolutionOfChainComplex C;                                    |
|     -- used 0.349339 seconds                                                |
+-----------------------------------------------------------------------------+
|i9 : time n = cartanEilenbergResolution C;                                   |
|     -- used 0.489454 seconds                                                |
+-----------------------------------------------------------------------------+
|i10 : betti source m                                                         |
|                                                                             |
|             0  1  2   3   4   5   6   7                                     |
|o10 = total: 1 19 80 181 312 484 447 156                                     |
|          0: 1  3  3   1   .   .   .   .                                     |
|          1: .  .  1   3   3   .   .   .                                     |
|          2: .  1  3   3   2   .   .   .                                     |
|          3: .  .  1   4   6   3   .   .                                     |
|          4: . 15 72 139 137  64  12   .                                     |
|          5: .  .  .  16  75 141 117  36                                     |
|          6: .  .  .   .   2  20  27  12                                     |
|          7: .  .  .  15  72 138 117  36                                     |
|          8: .  .  .   .  15 103 147  60                                     |
|          9: .  .  .   .   .   .   .   .                                     |
|         10: .  .  .   .   .  15  27  12                                     |
|                                                                             |
|o10 : BettiTally                                                             |
+-----------------------------------------------------------------------------+
|i11 : betti source n                                                         |
|                                                                             |
|             0  1   2   3   4   5   6   7                                    |
|o11 = total: 1 38 133 266 450 571 447 156                                    |
|          0: 1  3   6   2   .   .   .   .                                    |
|          1: .  3   3   6   6   1   .   .                                    |
|          2: .  2   6   6   4   3   .   .                                    |
|          3: .  .  16  35  25   4   .   .                                    |
|          4: . 30 102 155 154 100  12   .                                    |
|          5: .  .   .  32 111 142 117  36                                    |
|          6: .  .   .   .  18  50  27  12                                    |
|          7: .  .   .  30 102 153 117  36                                    |
|          8: .  .   .   .  30 103 147  60                                    |
|          9: .  .   .   .   .   .   .   .                                    |
|         10: .  .   .   .   .  15  27  12                                    |
|                                                                             |
|o11 : BettiTally                                                             |
+-----------------------------------------------------------------------------+
|i12 : betti target minimize source n                                         |
|                                                                             |
|             0  1  2   3   4   5   6   7                                     |
|o12 = total: 1 17 72 165 302 484 447 156                                     |
|          0: 1  3  3   1   .   .   .   .                                     |
|          1: .  .  .   .   .   .   .   .                                     |
|          2: .  .  .   .   1   .   .   .                                     |
|          3: .  .  .   .   3   3   .   .                                     |
|          4: . 14 69 136 135  64  12   .                                     |
|          5: .  .  .  14  75 141 117  36                                     |
|          6: .  .  .   .   1  20  27  12                                     |
|          7: .  .  .  14  72 138 117  36                                     |
|          8: .  .  .   .  15 103 147  60                                     |
|          9: .  .  .   .   .   .   .   .                                     |
|         10: .  .  .   .   .  15  27  12                                     |
|                                                                             |
|o12 : BettiTally                                                             |
+-----------------------------------------------------------------------------+

The resolution of a free complex is of course the same complex.
resolutionOfChainComplex returns this minimal object directly, but
cartanEilenbergResolution does not:

+-----------------------------------------------------+
|i13 : C=koszul (gens (ideal vars S)^2)               |
|                                                     |
|       1      6      15      20      15      6      1|
|o13 = S  <-- S  <-- S   <-- S   <-- S   <-- S  <-- S |
|                                                     |
|      0      1      2       3       4       5      6 |
|                                                     |
|o13 : ChainComplex                                   |
+-----------------------------------------------------+
|i14 : betti source resolutionOfChainComplex C        |
|                                                     |
|             0 1  2  3  4 5 6                        |
|o14 = total: 1 6 15 20 15 6 1                        |
|          0: 1 .  .  .  . . .                        |
|          1: . 6  .  .  . . .                        |
|          2: . . 15  .  . . .                        |
|          3: . .  . 20  . . .                        |
|          4: . .  .  . 15 . .                        |
|          5: . .  .  .  . 6 .                        |
|          6: . .  .  .  . . 1                        |
|                                                     |
|o14 : BettiTally                                     |
+-----------------------------------------------------+
|i15 : betti source cartanEilenbergResolution C       |
|                                                     |
|             0  1  2  3  4  5 6                      |
|o15 = total: 1 14 39 54 39 13 2                      |
|          0: 1  .  .  .  .  . .                      |
|          1: .  6  8  .  .  . .                      |
|          2: .  8 15  6  .  . .                      |
|          3: .  .  6 30  .  . .                      |
|          4: .  . 10  . 33  . .                      |
|          5: .  .  . 18  . 12 .                      |
|          6: .  .  .  .  6  . 2                      |
|          7: .  .  .  .  .  1 .                      |
|                                                     |
|o15 : BettiTally                                     |
+-----------------------------------------------------+

See also
========

  * minimize -- minimal quotient complex of a free
    ChainComplex

Ways to use resolutionOfChainComplex :
======================================

  * "resolutionOfChainComplex(ChainComplex)"

For the programmer
==================

The object resolutionOfChainComplex, is a
method function with options (Macaulay2Doc).

resolutionOfChainComplex(...,LengthLimit=>...) -- How many steps to compute
***************************************************************************

Synopsis
========

  * Usage:
        m = resolutionOfChainComplex(C,LengthLimit => n)
  * Inputs:
      * C, a chain complex (Macaulay2Doc),
      * n, an integer (Macaulay2Doc), non-negative integer or
        infinity
  * Outputs:
      * m, a chain complex map (Macaulay2Doc),

Description
===========

Computes LengthLimit steps beyond the length of C

Further information
===================

  * Default value: infinity (Macaulay2Doc),
  * Function: resolutionOfChainComplex, -- free
    resolution of a chain complex
  * Option key: LengthLimit (Macaulay2Doc), -- stop when the
    resolution reaches this length

Functions with optional argument named LengthLimit :
====================================================

  * cartanEilenbergResolution(...,LengthLimit=>...)
    -- How
    many steps to compute
  * isExact(...,LengthLimit=>...)
    -- Option to check
    exactness only up to a particular homological degree
  * isQuasiIsomorphism(...,LengthLimit=>...)
    -- Option to
    check quasi-isomorphism only up to a certain point
  * koszulComplex(...,LengthLimit=>...)
    -- How many steps to
    compute
  * "minimalBetti(...,LengthLimit=>...)" -- see minimalBetti (Macaulay2Doc),
    -- minimal betti numbers of (the minimal free
    resolution of) a homogeneous ideal or module
  * resolution(...,LengthLimit=>...) (Macaulay2Doc)
    -- stop
    when the resolution reaches this length
  * resolutionOfChainComplex(...,LengthLimit=>...)
    -- How
    many steps to compute
  * taylorResolution(...,LengthLimit=>...)
    -- How many steps
    to compute

scarfComplex -- constructs the algebraic Scarf complex of a monomial ideal
**************************************************************************

Synopsis
========

  * Usage:
        C = scarfComplex I
  * Inputs:
      * I, a monomial ideal (Macaulay2Doc),
  * Outputs:
      * C, a chain complex (Macaulay2Doc),

Description
===========

The algebraic Scarf complex of a monomial ideal is the sub-chain complex of the
taylorResolution, supported on subsets of generators
with unique LCMs.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[a,b,c,d,e];                                                      |
+-----------------------------------------------------------------------------+
|i2 : I = monomialIdeal(b^4*c^3, a*b^3*c*d^2*e, a*b^2*c^2*d*e^2, a^2*d^3*e^5, |
|                                                                             |
|o2 : MonomialIdeal of R                                                      |
|-----------------------------------------------------------------------------|
|b*c^2*d^5*e^4);                                                              |
+-----------------------------------------------------------------------------+
|i3 : s = scarfComplex I                                                      |
|                                                                             |
|      1      5      8      3                                                 |
|o3 = R  <-- R  <-- R  <-- R  <-- 0                                           |
|                                                                             |
|     0      1      2      3      4                                           |
|                                                                             |
|o3 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i4 : s.dd                                                                    |
|                                                                             |
|          1                                                5                 |
|o4 = 0 : R  <-------------------------------------------- R  : 1             |
|               | b4c3 ab3cd2e ab2c2de2 bc2d5e4 a2d3e5 |                      |
|                                                                             |
|          5                                                               8  |
|     1 : R  <----------------------------------------------------------- R  :|
|               {7}  | -ad2e -ade2 0   -d5e4 0     0     0      0     |       |
|               {8}  | bc2   0     -ce 0     0     -ade4 0      0     |       |
|               {8}  | 0     b2c   bd  0     -d4e2 0     -ad2e3 0     |       |
|               {12} | 0     0     0   b3c   ab    0     0      -a2e  |       |
|               {10} | 0     0     0   0     0     b3c   b2c2   bc2d2 |       |
|                                                                             |
|          8                            3                                     |
|     2 : R  <------------------------ R  : 3                                 |
|               {11} | e  0    0   |                                          |
|               {11} | -d 0    0   |                                          |
|               {10} | bc ade3 0   |                                          |
|               {16} | 0  0    0   |                                          |
|               {14} | 0  0    ae  |                                          |
|               {14} | 0  -c   0   |                                          |
|               {14} | 0  b    -d2 |                                          |
|               {15} | 0  0    b   |                                          |
|                                                                             |
|          3                                                                  |
|     3 : R  <----- 0 : 4                                                     |
|               0                                                             |
|                                                                             |
|o4 : ChainComplexMap                                                         |
|-----------------------------------------------------------------------------|
|2                                                                            |
+-----------------------------------------------------------------------------+

The Scarf complex of I is always a subcomplex of the minimal free resolution of
I, computed in M2 with the command res I. In this first example the Scarf
complex is strictly smaller.

+-------------------------------------+
|i5 : (betti s, betti res I)          |
|                                     |
|             0 1 2 3         0 1 2 3 |
|o5 = (total: 1 5 8 3, total: 1 5 8 4)|
|          0: 1 . . .      0: 1 . . . |
|          1: . . . .      1: . . . . |
|          2: . . . .      2: . . . . |
|          3: . . . .      3: . . . . |
|          4: . . . .      4: . . . . |
|          5: . . . .      5: . . . . |
|          6: . 1 . .      6: . 1 . . |
|          7: . 2 . .      7: . 2 . . |
|          8: . . 1 .      8: . . 1 . |
|          9: . 1 2 1      9: . 1 2 1 |
|         10: . . . .     10: . . . . |
|         11: . 1 . .     11: . 1 . . |
|         12: . . 3 1     12: . . 3 1 |
|         13: . . 1 1     13: . . 1 1 |
|         14: . . 1 .     14: . . 1 1 |
|                                     |
|o5 : Sequence                        |
+-------------------------------------+

In some cases, such as when I is a generic monomial ideal, the Scarf complex of
I is a minimal free resolution of I. In this case scarfComplex I and res I will
be isomorphic but not necessarily equal.

+-----------------------------------------------------------------------------+
|i6 : I = monomialIdeal(a^2*b^11*c^7*d*e, a^5*b^10*c^2*d^3*e^2,               |
|                                                                             |
|o6 : MonomialIdeal of R                                                      |
|-----------------------------------------------------------------------------|
|a^6*b^8*c^11*d^2*e^3, a^3*b^5*c^3*d^5*e^4, a^8*b^2*c*d^4*e^7);               |
+-----------------------------------------------------------------------------+
|i7 : isExact(prependZeroMap scarfComplex I)                                  |
|                                                                             |
|o7 = true                                                                    |
+-----------------------------------------------------------------------------+
|i8 : isMinimalChainComplex scarfComplex I                                    |
|                                                                             |
|o8 = true                                                                    |
+-----------------------------------------------------------------------------+
|i9 : betti scarfComplex I == betti res I                                     |
|                                                                             |
|o9 = true                                                                    |
+-----------------------------------------------------------------------------+
|i10 : scarfComplex I == res I                                                |
|                                                                             |
|o10 = false                                                                  |
+-----------------------------------------------------------------------------+

See chain complexes (Macaulay2Doc), for an overview of
chain complexes in Macaulay2.

See also
========

  * resolution(Ideal) (Macaulay2Doc) -- compute a
    projective resolution of (the quotient ring corresponding to) an ideal
  * taylorResolution -- Gives the Taylor resolution of
    a monomial ideal I.

Ways to use scarfComplex :
==========================

  * "scarfComplex(MonomialIdeal)"

For the programmer
==================

The object scarfComplex, is a method function (Macaulay2Doc).

substitute(ChainComplex,Ring) -- Change the ring over which the ChainComplex is defined.
****************************************************************************************

Synopsis
========

  * Function: substitute (Macaulay2Doc),
  * Usage:
        substitute(chCx, S)
  * Inputs:
      * chCx, a chain complex (Macaulay2Doc),
      * S, a ring (Macaulay2Doc),
  * Outputs:
      * The ChainComplex chCx over the ring R

Description
===========

+----------------------------------+
|i1 : R = ZZ/101[a,b,c]            |
|                                  |
|o1 = R                            |
|                                  |
|o1 : PolynomialRing               |
+----------------------------------+
|i2 : S = R/ideal{a^2,b^2,c^2}     |
|                                  |
|o2 = S                            |
|                                  |
|o2 : QuotientRing                 |
+----------------------------------+
|i3 : kRes = res coker vars R      |
|                                  |
|      1      3      3      1      |
|o3 = R  <-- R  <-- R  <-- R  <-- 0|
|                                  |
|     0      1      2      3      4|
|                                  |
|o3 : ChainComplex                 |
+----------------------------------+
|i4 : kResS = substitute(kRes, S)  |
|                                  |
|      1      3      3      1      |
|o4 = S  <-- S  <-- S  <-- S  <-- 0|
|                                  |
|     0      1      2      3      4|
|                                  |
|o4 : ChainComplex                 |
+----------------------------------+

Ways to use this method:
========================

  * substitute(ChainComplex,Ring),
    -- Change the ring over which the ChainComplex is defined.

taylor -- Gives the nth differential in the Taylor resolution of a monomial ideal I.
************************************************************************************

Synopsis
========

  * Usage:
        T = taylor(n,I)
  * Inputs:
      * n,
      * I,
  * Outputs:
      * T, the nth differential in the Taylor Resolution of I.

Description
===========

+---------------------------------------+
|i1 : R = ZZ/101[a,b]                   |
|                                       |
|o1 = R                                 |
|                                       |
|o1 : PolynomialRing                    |
+---------------------------------------+
|i2 : I = monomialIdeal (ideal vars R)^3|
|                                       |
|                     3   2      2   3  |
|o2 = monomialIdeal (a , a b, a*b , b ) |
|                                       |
|o2 : MonomialIdeal of R                |
+---------------------------------------+
|i3 : T2 = taylor(2,I)                  |
|                                       |
|o3 = {3} | -b -b2 0  -b3 0   0  |      |
|     {3} | a  0   -b 0   -b2 0  |      |
|     {3} | 0  a2  a  0   0   -b |      |
|     {3} | 0  0   0  a3  a2  a  |      |
|                                       |
|             4       6                 |
|o3 : Matrix R  <--- R                  |
+---------------------------------------+
|i4 : T3 = taylor(3,I)                  |
|                                       |
|o4 = {4} | b  b2 0  0  |               |
|     {5} | -1 0  b  0  |               |
|     {4} | a  0  0  b  |               |
|     {6} | 0  -1 -1 0  |               |
|     {5} | 0  a  0  -1 |               |
|     {4} | 0  0  a2 a  |               |
|                                       |
|             6       4                 |
|o4 : Matrix R  <--- R                  |
+---------------------------------------+

Ways to use taylor :
====================

  * "taylor(ZZ,MonomialIdeal)"

For the programmer
==================

The object taylor, is a method function (Macaulay2Doc).

taylorResolution -- Gives the Taylor resolution of a monomial ideal I.
**********************************************************************

Synopsis
========

  * Usage:
        taylorResolution(I)
  * Inputs:
      * I,
  * Optional inputs (Macaulay2Doc),:
      * LengthLimit,
        => ..., default value 0, How many steps to compute
  * Outputs:
      * ChainComplex

Description
===========

+----------------------------------------------------+
|i1 : R = ZZ/101[a,b]                                |
|                                                    |
|o1 = R                                              |
|                                                    |
|o1 : PolynomialRing                                 |
+----------------------------------------------------+
|i2 : I = monomialIdeal (ideal vars R)^3             |
|                                                    |
|                     3   2      2   3               |
|o2 = monomialIdeal (a , a b, a*b , b )              |
|                                                    |
|o2 : MonomialIdeal of R                             |
+----------------------------------------------------+
|i3 : T = taylorResolution(I)                        |
|                                                    |
|      1      4      6      4      1                 |
|o3 = R  <-- R  <-- R  <-- R  <-- R                  |
|                                                    |
|     0      1      2      3      4                  |
|                                                    |
|o3 : ChainComplex                                   |
+----------------------------------------------------+
|i4 : T.dd                                           |
|                                                    |
|          1                         4               |
|o4 = 0 : R  <--------------------- R  : 1           |
|               | a3 a2b ab2 b3 |                    |
|                                                    |
|          4                                    6    |
|     1 : R  <-------------------------------- R  : 2|
|               {3} | -b -b2 0  -b3 0   0  |         |
|               {3} | a  0   -b 0   -b2 0  |         |
|               {3} | 0  a2  a  0   0   -b |         |
|               {3} | 0  0   0  a3  a2  a  |         |
|                                                    |
|          6                           4             |
|     2 : R  <----------------------- R  : 3         |
|               {4} | b  b2 0  0  |                  |
|               {5} | -1 0  b  0  |                  |
|               {4} | a  0  0  b  |                  |
|               {6} | 0  -1 -1 0  |                  |
|               {5} | 0  a  0  -1 |                  |
|               {4} | 0  0  a2 a  |                  |
|                                                    |
|          4                  1                      |
|     3 : R  <-------------- R  : 4                  |
|               {5} | -b |                           |
|               {6} | 1  |                           |
|               {6} | -1 |                           |
|               {5} | a  |                           |
|                                                    |
|o4 : ChainComplexMap                                |
+----------------------------------------------------+

Ways to use taylorResolution :
==============================

  * "taylorResolution(MonomialIdeal)"

For the programmer
==================

The object taylorResolution, is a method function with options (Macaulay2Doc).

taylorResolution(...,LengthLimit=>...) -- How many steps to compute
*******************************************************************

Synopsis
========

  * Usage:
        m = taylorResolution(C,LengthLimit => n)
  * Inputs:
      * C, a chain complex (Macaulay2Doc),
      * n, an integer (Macaulay2Doc), non-negative integer or
        infinity
  * Outputs:
      * m, a chain complex (Macaulay2Doc),

Description
===========

Computes LengthLimit steps

Further information
===================

  * Default value: 0
  * Function: taylorResolution, -- Gives the Taylor
    resolution of a monomial ideal I.
  * Option key: LengthLimit (Macaulay2Doc), -- stop when the
    resolution reaches this length

Functions with optional argument named LengthLimit :
====================================================

  * cartanEilenbergResolution(...,LengthLimit=>...)
    -- How
    many steps to compute
  * isExact(...,LengthLimit=>...)
    -- Option to check
    exactness only up to a particular homological degree
  * isQuasiIsomorphism(...,LengthLimit=>...)
    -- Option to
    check quasi-isomorphism only up to a certain point
  * koszulComplex(...,LengthLimit=>...)
    -- How many steps to
    compute
  * "minimalBetti(...,LengthLimit=>...)" -- see minimalBetti (Macaulay2Doc),
    -- minimal betti numbers of (the minimal free
    resolution of) a homogeneous ideal or module
  * resolution(...,LengthLimit=>...) (Macaulay2Doc)
    -- stop
    when the resolution reaches this length
  * resolutionOfChainComplex(...,LengthLimit=>...)
    -- How
    many steps to compute
  * taylorResolution(...,LengthLimit=>...)
    -- How many steps
    to compute

trivialHomologicalTruncation -- return the trivial truncation of a chain complex
********************************************************************************

Synopsis
========

  * Usage:
        trivialHomologicalTruncation(ChainComplex,d,e)
  * Inputs:
      * C, a chain complex (Macaulay2Doc),
      * d, an integer (Macaulay2Doc),
      * e, an integer (Macaulay2Doc), homological indices
  * Outputs:
      * a chain complex (Macaulay2Doc),

Description
===========

Given a chain complex

... <- C_{k-1} <- C_k <- C_{k+1} <- ...

return the trivial truncation

0 <- C_d <- C_{d+1} <- ... < C_e <- 0

+----------------------------------------------------------------+
|i1 : E=ZZ/101[e_0,e_1,SkewCommutative=>true];F=res ideal vars E;|
+----------------------------------------------------------------+
|i3 : C=dual res (coker transpose F.dd_3,LengthLimit=>8)[-3]     |
|                                                                |
|      5      4      3      2      1      1      2      3      4 |
|o3 = E  <-- E  <-- E  <-- E  <-- E  <-- E  <-- E  <-- E  <-- E  |
|                                                                |
|     -5     -4     -3     -2     -1     0      1      2      3  |
|                                                                |
|o3 : ChainComplex                                               |
+----------------------------------------------------------------+
|i4 : C1=trivialHomologicalTruncation(C,-2,2)                    |
|                                                                |
|             2      1      1      2      3                      |
|o4 = 0  <-- E  <-- E  <-- E  <-- E  <-- E  <-- 0                |
|                                                                |
|     -3     -2     -1     0      1      2      3                |
|                                                                |
|o4 : ChainComplex                                               |
+----------------------------------------------------------------+
|i5 : C2=trivialHomologicalTruncation(C1,-3,3)                   |
|                                                                |
|                    2      1      1      2      3               |
|o5 = 0  <-- 0  <-- E  <-- E  <-- E  <-- E  <-- E  <-- 0 <-- 0   |
|                                                                |
|     -4     -3     -2     -1     0      1      2      3     4   |
|                                                                |
|o5 : ChainComplex                                               |
+----------------------------------------------------------------+
|i6 : C3=removeZeroTrailingTerms C2                              |
|                                                                |
|      2      1      1      2      3                             |
|o6 = E  <-- E  <-- E  <-- E  <-- E                              |
|                                                                |
|     -2     -1     0      1      2                              |
|                                                                |
|o6 : ChainComplex                                               |
+----------------------------------------------------------------+
|i7 : C4=trivialHomologicalTruncation(C3,2,2)                    |
|                                                                |
|            3                                                   |
|o7 = 0 <-- E  <-- 0                                             |
|                                                                |
|     1     2      3                                             |
|                                                                |
|o7 : ChainComplex                                               |
+----------------------------------------------------------------+

Ways to use trivialHomologicalTruncation :
==========================================

  * "trivialHomologicalTruncation(ChainComplex,ZZ,ZZ)"

For the programmer
==================

The object trivialHomologicalTruncation, is
a method function (Macaulay2Doc).