This is CompleteIntersectionResolutions.info, produced by Macaulay2, version 1.24.11

CompleteIntersectionResolutions -- "Resolution over a Complete Intersection"
****************************************************************************

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

The resolution of a module over a hypersurface ring (graded or local) is always
periodic of period at most 2 (Eisenbud, "Homological Algebra Over A Complete
Intersection", Trans. Am. Math. Soc. 260 (1980) 35–64), but the asymptotic
structure of minimal resolutions over a complete intersection is a topic of
active research.

Most of our routines for constructing resolutions over complete intersections
work with a polynomial ring S and a complete intersection R = S/(ideal ff),
where $$ ff = matrix\{\{f_1,\dots,f_c\}\} $$ is a 1-rowed matrix whose entries
are (sufficiently general) generators of a complete intersection ideal, usually
all of the same degree.

The new ideas implemented in this package come from the following sources:

"Minimal free resolutions over complete intersections" by David Eisenbud and
Irena Peeva (2016). Lecture Notes in Mathematics, 2152. Springer, Cham, 2016.
x+107 pp. ISBN: 978-3-319-26436-3; 978-3-319-26437-0), arXiv:1306.2615

"Layered Resolutions of Maximal Cohen-Macaulay modules" by David Eisenbud and
Irena Peeva (preprint)

"Tor as a module over an exterior algebra" by David Eisenbud, Irena Peeva, and
Frank-Olaf Schreyer (preprint).

The routines fall into several groups:

Routines to analyze Ext_R(M,k) as a module over the ring of operators
=====================================================================

  * ExtModule
  * evenExtModule
  * oddExtModule
  * ExtModuleData
  * complexity
  * newExt

Representing a module as Ext_R(M,k)
===================================

  * moduleAsExt
  * hfModuleAsExt

Routines Related to Particular Conjectures
==========================================

  * regularitySequence
  * extIsOnePolynomial

Routines that make resolutions of various kinds
===============================================

  * TateResolution
  * Shamash
  * EisenbudShamash
  * EisenbudShamashTotal
  * layeredResolution
  * makeFiniteResolution
  * makeFiniteResolutionCodim2

Tools for construction of higher matrix factorizations
======================================================

  * matrixFactorization
  * highSyzygy
  * koszulExtension
  * makeT

Tools to unpack the info in higher matrix factorizations
========================================================

  * BRanks
  * ARanks
  * bMaps
  * dMaps
  * psiMaps
  * hMaps
  * mfBound
  * finiteBettiNumbers
  * infiniteBettiNumbers

Ext_S(M,k), Tor^S(M,k), homology and linear resolutions as modules over the exterior algebra
============================================================================================

  * exteriorExtModule
  * exteriorTorModule
  * exteriorHomologyModule
  * BGGL
  * extVsCohomology
  * freeExteriorSummand

Routines for general module theory
==================================

  * S2
  * isQuasiRegular
  * stableHom
  * isStablyTrivial
  * makeModule
  * isLinear

Utilities
=========

  * cosyzygyRes
  * dualWithComponents
  * HomWithComponents
  * tensorWithComponents
  * toArray
  * expo

Some families of Examples
=========================

  * twoMonomials
  * sumTwoMonomials

The construction of the matrix factorizations for high syzygies of a module N,
introduced in the paper "Matrix Factorizations in Higher Codimension" by
Eisenbud and Peeva. The routine ``mfBound'' determines which syzygy to take.
The routine matrixFactorization constructs the higher matrix factorization of a
module over R defined by Eisenbud and Peeva in the 2016 Springer Lecture Notes
``Minimal Free Resolutions over Complete Intersections''. The ranks of the
stack of matrices b_p that are used in the construction of the matrix
factorization, and the various matrices themselves, are obtained from the
routines BRanks, ARanks, bMaps, dMaps, psiMaps, hMaps (the notation is
explained in the Lecture Notes).

Here is an example of a matrix factorization in codimension 2:

+-----------------------------------------------------------------------------+
|i1 : setRandomSeed 0                                                         |
|                                                                             |
|o1 = 0                                                                       |
+-----------------------------------------------------------------------------+
|i2 : c = 2;                                                                  |
+-----------------------------------------------------------------------------+
|i3 : S = ZZ/101[x_1..x_c, a_(1,1)..a_(c,c)];                                 |
+-----------------------------------------------------------------------------+
|i4 : X = matrix{{x_1..x_c}};                                                 |
|                                                                             |
|             1      2                                                        |
|o4 : Matrix S  <-- S                                                         |
+-----------------------------------------------------------------------------+
|i5 : ff = X*map(source X, , genericMatrix(S,a_(1,1),c,c));                   |
|                                                                             |
|             1      2                                                        |
|o5 : Matrix S  <-- S                                                         |
+-----------------------------------------------------------------------------+
|i6 : R = S/ideal ff;                                                         |
+-----------------------------------------------------------------------------+
|i7 : mbound = mfBound coker (R**X)                                           |
|                                                                             |
|o7 = 2                                                                       |
+-----------------------------------------------------------------------------+
|i8 : F = res(coker (R**X) , LengthLimit =>mbound+1);                         |
+-----------------------------------------------------------------------------+
|i9 : M = coker F.dd_(mbound+1);                                              |
+-----------------------------------------------------------------------------+
|i10 : MF = matrixFactorization(ff,M)                                         |
|                                                                             |
|o10 = {{2} | a_(1,1) -a_(1,2) a_(2,1) -a_(2,2) |, {3} | x_1  a_(1,2) 0       |
|       {2} | x_2     x_1      0       0        |  {3} | -x_2 a_(1,1) 0       |
|       {2} | 0       0        x_2     x_1      |  {3} | 0    0       x_1     |
|                                                  {3} | 0    0       -x_2    |
|      -----------------------------------------------------------------------|
|      a_(2,2) 0       |, {2} | 0 0 1 |}                                      |
|      a_(2,1) 0       |  {2} | 0 1 0 |                                       |
|      a_(1,2) a_(2,2) |  {2} | 1 0 0 |                                       |
|      a_(1,1) a_(2,1) |                                                      |
|                                                                             |
|o10 : List                                                                   |
+-----------------------------------------------------------------------------+
|i11 : netList BRanks MF                                                      |
|                                                                             |
|      +-+-+                                                                  |
|o11 = |2|2|                                                                  |
|      +-+-+                                                                  |
|      |1|2|                                                                  |
|      +-+-+                                                                  |
+-----------------------------------------------------------------------------+
|i12 : netList ARanks MF                                                      |
|                                                                             |
|      +-+-+                                                                  |
|o12 = |2|2|                                                                  |
|      +-+-+                                                                  |
|      |3|4|                                                                  |
|      +-+-+                                                                  |
+-----------------------------------------------------------------------------+
|i13 : netList bMaps MF                                                       |
|                                                                             |
|      +------------------------+                                             |
|o13 = |{2} | a_(1,1) -a_(1,2) ||                                             |
|      |{2} | x_2     x_1      ||                                             |
|      +------------------------+                                             |
|      |{2} | x_2 x_1 |         |                                             |
|      +------------------------+                                             |
+-----------------------------------------------------------------------------+
|i14 : netList dMaps MF                                                       |
|                                                                             |
|      +-----------------------------------------+                            |
|o14 = |{2} | a_(1,1) -a_(1,2) |                 |                            |
|      |{2} | x_2     x_1      |                 |                            |
|      +-----------------------------------------+                            |
|      |{2} | a_(1,1) -a_(1,2) a_(2,1) -a_(2,2) ||                            |
|      |{2} | x_2     x_1      0       0        ||                            |
|      |{2} | 0       0        x_2     x_1      ||                            |
|      +-----------------------------------------+                            |
+-----------------------------------------------------------------------------+
|i15 : netList psiMaps MF                                                     |
|                                                                             |
|      +------------------------+                                             |
|o15 = |{2} | a_(2,1) -a_(2,2) ||                                             |
|      |{2} | 0       0        ||                                             |
|      +------------------------+                                             |
+-----------------------------------------------------------------------------+
|i16 : netList hMaps MF                                                       |
|                                                                             |
|      +----------------------------+                                         |
|o16 = |{3} | x_1  a_(1,2) |        |                                         |
|      |{3} | -x_2 a_(1,1) |        |                                         |
|      +----------------------------+                                         |
|      |{3} | 0    a_(2,2) 0       ||                                         |
|      |{3} | 0    a_(2,1) 0       ||                                         |
|      |{3} | x_1  a_(1,2) a_(2,2) ||                                         |
|      |{3} | -x_2 a_(1,1) a_(2,1) ||                                         |
|      +----------------------------+                                         |
+-----------------------------------------------------------------------------+

The routines infiniteBettiNumbers and finiteBettiNumbers compute the Betti
numbers of M over R and over S from the BRanks.   The minimal free resolution
of M as a module over R/(f_1..f_s), where s=c-complexity M, is reconstructed
(in a special form) from the matrix factorization MF by the routine
makeFiniteResolution(ff,MF).

+---------------------------------------+
|i17 : betti res M                      |
|                                       |
|             0 1 2 3 4 5 6  7          |
|o17 = total: 3 4 5 6 7 8 9 10          |
|          2: 3 4 5 6 7 8 9 10          |
|                                       |
|o17 : BettiTally                       |
+---------------------------------------+
|i18 : infiniteBettiNumbers(MF,7)       |
|                                       |
|o18 = {3, 4, 5, 6, 7, 8, 9, 10}        |
|                                       |
|o18 : List                             |
+---------------------------------------+
|i19 : betti res pushForward(map(R,S),M)|
|                                       |
|             0 1 2                     |
|o19 = total: 3 5 2                     |
|          2: 3 4 .                     |
|          3: . 1 2                     |
|                                       |
|o19 : BettiTally                       |
+---------------------------------------+
|i20 : finiteBettiNumbers MF            |
|                                       |
|o20 = {3, 5, 2}                        |
|                                       |
|o20 : List                             |
+---------------------------------------+
|i21 : G = makeFiniteResolution (ff,MF) |
|                                       |
|       3      5      2                 |
|o21 = S  <-- S  <-- S                  |
|                                       |
|      0      1      2                  |
|                                       |
|o21 : ChainComplex                     |
+---------------------------------------+
|i22 : G' = res(pushForward(map(R,S),M))|
|                                       |
|       3      5      2                 |
|o22 = S  <-- S  <-- S  <-- 0           |
|                                       |
|      0      1      2      3           |
|                                       |
|o22 : ChainComplex                     |
+---------------------------------------+

The group of routines ExtModule, evenExtModule, oddExtmodule, extModuleData
(which call the routine Ext(M,N) of Avramov-Grayson) are useful for analyzing
the module Ext_R(M,k). TateResolution returns a specified part of the Tate
resolution of a maximal Cohen-Macaulay module M first calling the routine
cosyzygy.

The routines moduleAsExt and hfModuleAsExt give partial converse constructions
(following Avramov-Jorgensen)

The routines twoMonomials and sumTwoMonomials provide some interesting
examples.

The routine makeT constructs CI operators on a resolution over a complete
intersection, while the routine makeHomotopies constructs a set of higher
homotopies on the resolution of a module M for a sequence of elements in the
annihilator of M(makeHomotopies1 constructs just the ordinare ``first''
homotopies).

The routine exteriorTorModule constructs the module $Tor^S(M,k)$ as a module
over the exterior algebra $\wedge(k^n)$.

The routine S2 takes a graded module M and returns the map $$ M ->
\oplus_{-p}^\infty H^0(sheaf M(p)). $$

Caveat
======

Unless the complete intersection is homogeneous AND generated by elements of a
single degree, it may not be possible to choose sufficiently general
HOMOGENEOUS generators for some of our construction routines to work, even when
the ideal of the complete intersection is homogeneous, so our examples in the
routines for are primarily using complete intersections of equal degree. The
theory takes place in the local case, however, where this is not a problem.

Author
======

  * David Eisenbud (see http://www.msri.org/~de ) <de@msri.org>

Version
=======

This documentation describes version 2.2 of CompleteIntersectionResolutions.

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

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

Exports
=======

  * Functions and commands
      * ARanks -- ranks of the modules A_i(d) in a
        matrixFactorization
      * BGGL -- Exterior module to linear complex
      * bMaps -- list the maps  d_p:B_1(p)-->B_0(p) in a
        matrixFactorization
      * BRanks -- ranks of the modules B_i(d) in a
        matrixFactorization
      * complexity -- complexity of a module over a complete
        intersection
      * cosyzygyRes -- cosyzygy chain of a Cohen-Macaulay
        module over a Gorenstein ring
      * dMaps -- list the maps  d(p):A_1(p)--> A_0(p) in a
        matrixFactorization
      * dualWithComponents -- dual module preserving
        direct sum information
      * EisenbudShamash -- Computes the
        Eisenbud-Shamash Complex
      * EisenbudShamashTotal -- Precursor complex
        of total Ext
      * evenExtModule -- even part of Ext^*(M,k) over a
        complete intersection as module over CI operator ring
      * expo -- returns a set corresponding to the basis of a
        divided power
      * exteriorExtModule -- Ext(M,k) or Ext(M,N) as
        a module over an exterior algebra
      * exteriorHomologyModule -- Make the
        homology of a complex into a module over an exterior algebra
      * exteriorTorModule -- Tor as a module over an
        exterior algebra or bigraded algebra
      * extIsOnePolynomial -- check whether the
        Hilbert function of Ext(M,k) is one polynomial
      * ExtModule -- Ext^*(M,k) over a complete intersection
        as module over CI operator ring
      * ExtModuleData -- Even and odd Ext modules and
        their regularity
      * extVsCohomology -- compares Ext_S(M,k) as
        exterior module with coh table of sheaf Ext_R(M,k)
      * finiteBettiNumbers -- betti numbers of
        finite resolution computed from a matrix factorization
      * freeExteriorSummand -- find the free
        summands of a module over an exterior algebra
      * hf -- Computes the hilbert function in a range of degrees
      * hfModuleAsExt -- predict betti numbers of
        moduleAsExt(M,R)
      * highSyzygy -- Returns a syzygy module one beyond the
        regularity of Ext(M,k)
      * hMaps -- list the maps  h(p): A_0(p)--> A_1(p) in a
        matrixFactorization
      * HomWithComponents -- computes Hom, preserving
        direct sum information
      * infiniteBettiNumbers -- betti numbers of
        finite resolution computed from a matrix factorization
      * isLinear -- check whether matrix entries have degree 1
      * isQuasiRegular -- tests a matrix or sequence or
        list for quasi-regularity on a module
      * isStablyTrivial -- returns true if the map goes
        to 0 under stableHom
      * koszulExtension -- creates the Koszul extension
        complex of a map
      * layeredResolution -- layered finite and
        infinite layered resolutions of CM modules
      * makeFiniteResolution -- finite resolution
        of a matrix factorization module M
      * makeFiniteResolutionCodim2 -- Maps
        associated to the finite resolution of a high syzygy module in codim 2
      * makeHomotopies -- returns a system of higher
        homotopies
      * makeHomotopies1 -- returns a system of first
        homotopies
      * makeHomotopiesOnHomology -- Homology
        of a complex as exterior module
      * makeModule -- makes a Module out of a collection of
        modules and maps
      * makeT -- make the CI operators on a complex
      * matrixFactorization -- Maps in a higher
        codimension matrix factorization
      * mfBound -- determines how high a syzygy to take for
        "matrixFactorization"
      * moduleAsExt -- Find a module with given asymptotic
        resolution
      * newExt -- Global Ext for modules over a complete
        Intersection
      * oddExtModule -- odd part of Ext^*(M,k) over a
        complete intersection as module over CI operator ring
      * psiMaps -- list the maps  psi(p): B_1(p) --> A_0(p-1)
        in a matrixFactorization
      * regularitySequence -- regularity of Ext
        modules for a sequence of MCM approximations
      * S2 -- Universal map to a module satisfying Serre's condition
        S2
      * Shamash -- Computes the Shamash Complex
      * splittings -- compute the splittings of a split
        right exact sequence
      * stableHom -- map from Hom(M,N) to the stable Hom
        module
      * sumTwoMonomials -- tally the sequences of
        BRanks for certain examples
      * TateResolution -- TateResolution of a module
        over an exterior algebra
      * tensorWithComponents -- forms the tensor
        product, preserving direct sum information
      * toArray -- makes an array from a List or from a single
        integer
      * twoMonomials -- tally the sequences of BRanks for
        certain examples
  * Methods
      * "ARanks(List)" -- see ARanks, -- ranks of the modules
        A_i(d) in a matrixFactorization
      * "bMaps(List)" -- see bMaps, -- list the maps
        d_p:B_1(p)-->B_0(p) in a matrixFactorization
      * "BRanks(List)" -- see BRanks, -- ranks of the modules
        B_i(d) in a matrixFactorization
      * "complexity(List)" -- see complexity, -- complexity
        of a module over a complete intersection
      * "complexity(Module)" -- see complexity, -- complexity
        of a module over a complete intersection
      * "cosyzygyRes(Module)" -- see cosyzygyRes, --
        cosyzygy chain of a Cohen-Macaulay module over a Gorenstein ring
      * "cosyzygyRes(ZZ,Module)" -- see cosyzygyRes, --
        cosyzygy chain of a Cohen-Macaulay module over a Gorenstein ring
      * "dMaps(List)" -- see dMaps, -- list the maps
        d(p):A_1(p)--> A_0(p) in a matrixFactorization
      * "dualWithComponents(Module)" -- see dualWithComponents,
        -- dual module preserving direct sum information
      * "EisenbudShamash(Matrix,ChainComplex,ZZ)" -- see EisenbudShamash,
        -- Computes the Eisenbud-Shamash Complex
      * "EisenbudShamash(Ring,ChainComplex,ZZ)" -- see EisenbudShamash,
        -- Computes the Eisenbud-Shamash Complex
      * "EisenbudShamashTotal(Module)" -- see EisenbudShamashTotal,
        -- Precursor complex of total Ext
      * "evenExtModule(Module)" -- see evenExtModule, --
        even part of Ext^*(M,k) over a complete intersection as module over CI
        operator ring
      * "expo(ZZ,List)" -- see expo, -- returns a set corresponding
        to the basis of a divided power
      * "expo(ZZ,ZZ)" -- see expo, -- returns a set corresponding
        to the basis of a divided power
      * "exteriorExtModule(Matrix,Module)" -- see exteriorExtModule,
        -- Ext(M,k) or Ext(M,N) as a module over an exterior
        algebra
      * "exteriorExtModule(Matrix,Module,Module)" -- see
        exteriorExtModule, -- Ext(M,k) or Ext(M,N) as a
        module over an exterior algebra
      * "exteriorHomologyModule(Matrix,ChainComplex)" -- see
        exteriorHomologyModule, -- Make the homology of
        a complex into a module over an exterior algebra
      * "exteriorTorModule(Matrix,Module)" -- see exteriorTorModule,
        -- Tor as a module over an exterior algebra or
        bigraded algebra
      * "exteriorTorModule(Matrix,Module,Module)" -- see
        exteriorTorModule, -- Tor as a module over an
        exterior algebra or bigraded algebra
      * "extIsOnePolynomial(Module)" -- see extIsOnePolynomial,
        -- check whether the Hilbert function of Ext(M,k)
        is one polynomial
      * "ExtModule(Module)" -- see ExtModule, -- Ext^*(M,k)
        over a complete intersection as module over CI operator ring
      * "ExtModuleData(Module)" -- see ExtModuleData, --
        Even and odd Ext modules and their regularity
      * "extVsCohomology(Matrix,Module)" -- see extVsCohomology,
        -- compares Ext_S(M,k) as exterior module with coh
        table of sheaf Ext_R(M,k)
      * "finiteBettiNumbers(List)" -- see finiteBettiNumbers,
        -- betti numbers of finite resolution computed from
        a matrix factorization
      * "freeExteriorSummand(Module)" -- see freeExteriorSummand,
        -- find the free summands of a module over an
        exterior algebra
      * "hf(List,Module)" -- see hf, -- Computes the hilbert function
        in a range of degrees
      * "hf(Sequence,Module)" -- see hf, -- Computes the hilbert
        function in a range of degrees
      * "hfModuleAsExt(ZZ,Module,ZZ)" -- see hfModuleAsExt,
        -- predict betti numbers of moduleAsExt(M,R)
      * "highSyzygy(Module)" -- see highSyzygy, -- Returns a
        syzygy module one beyond the regularity of Ext(M,k)
      * "hMaps(List)" -- see hMaps, -- list the maps  h(p):
        A_0(p)--> A_1(p) in a matrixFactorization
      * "HomWithComponents(Module,Module)" -- see HomWithComponents,
        -- computes Hom, preserving direct sum information
      * "infiniteBettiNumbers(List,ZZ)" -- see infiniteBettiNumbers,
        -- betti numbers of finite resolution computed
        from a matrix factorization
      * "isLinear(Matrix)" -- see isLinear, -- check whether
        matrix entries have degree 1
      * "isQuasiRegular(List,Module)" -- see isQuasiRegular,
        -- tests a matrix or sequence or list for
        quasi-regularity on a module
      * "isQuasiRegular(Matrix,Module)" -- see isQuasiRegular,
        -- tests a matrix or sequence or list for
        quasi-regularity on a module
      * "isQuasiRegular(Sequence,Module)" -- see isQuasiRegular,
        -- tests a matrix or sequence or list for
        quasi-regularity on a module
      * "isStablyTrivial(Matrix)" -- see isStablyTrivial,
        -- returns true if the map goes to 0 under stableHom
      * "koszulExtension(ChainComplex,ChainComplex,Matrix,Matrix)" -- see
        koszulExtension, -- creates the Koszul extension
        complex of a map
      * "layeredResolution(Matrix,Module)" -- see layeredResolution,
        -- layered finite and infinite layered resolutions
        of CM modules
      * "layeredResolution(Matrix,Module,ZZ)" -- see layeredResolution,
        -- layered finite and infinite layered resolutions
        of CM modules
      * "makeFiniteResolution(Matrix,List)" -- see makeFiniteResolution,
        -- finite resolution of a matrix factorization
        module M
      * "makeFiniteResolutionCodim2(Matrix,List)" -- see
        makeFiniteResolutionCodim2, -- Maps
        associated to the finite resolution of a high syzygy module in codim 2
      * "makeHomotopies(Matrix,ChainComplex)" -- see makeHomotopies,
        -- returns a system of higher homotopies
      * "makeHomotopies(Matrix,ChainComplex,ZZ)" -- see makeHomotopies,
        -- returns a system of higher homotopies
      * "makeHomotopies1(Matrix,ChainComplex)" -- see makeHomotopies1,
        -- returns a system of first homotopies
      * "makeHomotopies1(Matrix,ChainComplex,ZZ)" -- see makeHomotopies1,
        -- returns a system of first homotopies
      * "makeHomotopiesOnHomology(Matrix,ChainComplex)" -- see
        makeHomotopiesOnHomology, -- Homology of a
        complex as exterior module
      * "makeModule(HashTable,Matrix,HashTable)" -- see makeModule,
        -- makes a Module out of a collection of modules and maps
      * "makeT(Matrix,ChainComplex,ZZ)" -- see makeT, -- make the
        CI operators on a complex
      * "matrixFactorization(Matrix,Module)" -- see matrixFactorization,
        -- Maps in a higher codimension matrix
        factorization
      * "mfBound(Module)" -- see mfBound, -- determines how high
        a syzygy to take for "matrixFactorization"
      * "moduleAsExt(Module,Ring)" -- see moduleAsExt, --
        Find a module with given asymptotic resolution
      * "newExt(Module,Module)" -- see newExt, -- Global Ext for
        modules over a complete Intersection
      * "oddExtModule(Module)" -- see oddExtModule, -- odd
        part of Ext^*(M,k) over a complete intersection as module over CI
        operator ring
      * "psiMaps(List)" -- see psiMaps, -- list the maps
        psi(p): B_1(p) --> A_0(p-1) in a matrixFactorization
      * "regularitySequence(List,Module)" -- see regularitySequence,
        -- regularity of Ext modules for a sequence of MCM
        approximations
      * "S2(ZZ,Module)" -- see S2, -- Universal map to a module
        satisfying Serre's condition S2
      * "Shamash(Matrix,ChainComplex,ZZ)" -- see Shamash, --
        Computes the Shamash Complex
      * "Shamash(Ring,ChainComplex,ZZ)" -- see Shamash, --
        Computes the Shamash Complex
      * "splittings(Matrix,Matrix)" -- see splittings, --
        compute the splittings of a split right exact sequence
      * "stableHom(Module,Module)" -- see stableHom, -- map
        from Hom(M,N) to the stable Hom module
      * "sumTwoMonomials(ZZ,ZZ)" -- see sumTwoMonomials,
        -- tally the sequences of BRanks for certain examples
      * "TateResolution(Module)" -- see TateResolution,
        -- TateResolution of a module over an exterior algebra
      * "TateResolution(Module,ZZ)" -- see TateResolution,
        -- TateResolution of a module over an exterior algebra
      * "TateResolution(Module,ZZ,ZZ)" -- see TateResolution,
        -- TateResolution of a module over an exterior algebra
      * "tensorWithComponents(Module,Module)" -- see
        tensorWithComponents, -- forms the tensor
        product, preserving direct sum information
      * "toArray(List)" -- see toArray, -- makes an array from a
        List or from a single integer
      * "toArray(ZZ)" -- see toArray, -- makes an array from a
        List or from a single integer
      * "twoMonomials(ZZ,ZZ)" -- see twoMonomials, -- tally
        the sequences of BRanks for certain examples
  * Symbols
      * Augmentation -- Option for matrixFactorization
      * Check -- Option for matrixFactorization
      * Grading -- Option for EisenbudShamashTotal, newExt
      * Layered -- Option for matrixFactorization
      * Lift -- Option for newExt
      * Optimism -- Option to highSyzygy
      * OutRing -- Option allowing specification of the ring
        over which the output is defined

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

The object CompleteIntersectionResolutions, is a package (Macaulay2Doc).

ARanks -- ranks of the modules A_i(d) in a matrixFactorization
**************************************************************

Synopsis
========

  * Usage:
        AR = ARanks MF
  * Inputs:
      * MF, a list (Macaulay2Doc), output of a matrixFactorization
        computation
  * Outputs:
      * AR, a list (Macaulay2Doc), list of pairs {rank A_1(p), rank
        A_0(p)}

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

See example in the description of BRanks

See also
========

  * matrixFactorization -- Maps in a higher
    codimension matrix factorization
  * BRanks -- ranks of the modules B_i(d) in a
    matrixFactorization
  * bMaps -- list the maps  d_p:B_1(p)-->B_0(p) in a
    matrixFactorization
  * dMaps -- list the maps  d(p):A_1(p)--> A_0(p) in a
    matrixFactorization
  * psiMaps -- list the maps  psi(p): B_1(p) --> A_0(p-1) in a
    matrixFactorization
  * hMaps -- list the maps  h(p): A_0(p)--> A_1(p) in a
    matrixFactorization

Ways to use ARanks:
===================

  * "ARanks(List)"

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

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

Augmentation -- Option for matrixFactorization
**********************************************

Synopsis
========

  * Usage:
        matrixFactorization(ff,m,Augmentation => true)
  * Inputs:
      * Check, a Boolean value (Macaulay2Doc),

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

Makes matrixFactorization return an augmentation map as well as d,h. Default
value is false

See also
========

  * matrixFactorization -- Maps in a higher
    codimension matrix factorization

Functions with optional argument named Augmentation:
====================================================

  * "matrixFactorization(...,Augmentation=>...)" -- see
    matrixFactorization, -- Maps in a higher codimension
    matrix factorization

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

The object Augmentation, is a symbol (Macaulay2Doc).

BGGL -- Exterior module to linear complex
*****************************************

Synopsis
========

  * Usage:
        L = BGGL(P,S)
  * Inputs:
      * P, a module (Macaulay2Doc), module over an exterior
        algebra
      * S, a ring (Macaulay2Doc), polynomial ring on the same
        number of vars
  * Outputs:
      * L, a chain complex (Macaulay2Doc), linear chain
        complex over S corresponding to P

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

Implements the left adjoint BGG functor. The more primitive function SymExt
does this only for linearly presented exterior modules.

+---------------------------------------------------+
|i1 : E = ZZ/101[a,b,c,d, SkewCommutative => true]  |
|                                                   |
|o1 = E                                             |
|                                                   |
|o1 : PolynomialRing, 4 skew commutative variable(s)|
+---------------------------------------------------+
|i2 : P = E^1/ideal(a*b,c)                          |
|                                                   |
|o2 = cokernel | ab c |                             |
|                                                   |
|                            1                      |
|o2 : E-module, quotient of E                       |
+---------------------------------------------------+
|i3 : betti res P                                   |
|                                                   |
|            0 1 2 3  4  5                          |
|o3 = total: 1 2 4 7 11 16                          |
|         0: 1 1 1 1  1  1                          |
|         1: . 1 3 6 10 15                          |
|                                                   |
|o3 : BettiTally                                    |
+---------------------------------------------------+
|i4 : hf(0..3, P)                                   |
|                                                   |
|o4 = {1, 3, 2, 0}                                  |
|                                                   |
|o4 : List                                          |
+---------------------------------------------------+
|i5 : S = ZZ/101[x,y,z,w]                           |
|                                                   |
|o5 = S                                             |
|                                                   |
|o5 : PolynomialRing                                |
+---------------------------------------------------+
|i6 : betti BGGL(P,S)                               |
|                                                   |
|            -2 -1 0                                |
|o6 = total:  2  3 1                                |
|         0:  2  3 1                                |
|                                                   |
|o6 : BettiTally                                    |
+---------------------------------------------------+

Caveat
======

This script really belongs in the BGG package.

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

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

bMaps -- list the maps  d_p:B_1(p)-->B_0(p) in a matrixFactorization
********************************************************************

Synopsis
========

  * Usage:
        bmaps = bMaps mf
  * Inputs:
      * mf, a list (Macaulay2Doc), output of a matrixFactorization
        computation
  * Outputs:
      * bmaps, a list (Macaulay2Doc), list of matrices $d_p:
        B_1(p)\to B_0(p)$

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

See the documentation for matrixFactorization for an example.

See also
========

  * matrixFactorization -- Maps in a higher
    codimension matrix factorization
  * BRanks -- ranks of the modules B_i(d) in a
    matrixFactorization
  * dMaps -- list the maps  d(p):A_1(p)--> A_0(p) in a
    matrixFactorization
  * psiMaps -- list the maps  psi(p): B_1(p) --> A_0(p-1) in a
    matrixFactorization
  * hMaps -- list the maps  h(p): A_0(p)--> A_1(p) in a
    matrixFactorization

Ways to use bMaps:
==================

  * "bMaps(List)"

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

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

BRanks -- ranks of the modules B_i(d) in a matrixFactorization
**************************************************************

Synopsis
========

  * Usage:
        br = BRanks MF
  * Inputs:
      * MF, a list (Macaulay2Doc), output of a matrixFactorization
        computation
  * Outputs:
      * br, a list (Macaulay2Doc), list of pairs {rank B_1(d), rank
        B_0(d)}

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

+-----------------------------------------------------------------------------+
|i1 : c = 2                                                                   |
|                                                                             |
|o1 = 2                                                                       |
+-----------------------------------------------------------------------------+
|i2 : S = ZZ/32003[x_0..x_(c-1),a_(0,0)..a_(c-1,c-1)];                        |
+-----------------------------------------------------------------------------+
|i3 : A = genericMatrix(S,a_(0,0),c,c);                                       |
|                                                                             |
|             2      2                                                        |
|o3 : Matrix S  <-- S                                                         |
+-----------------------------------------------------------------------------+
|i4 : f = matrix{{x_0..x_(c-1)}}*map(S^{c:-1},S^{c:-2},A)                     |
|                                                                             |
|o4 = | x_0a_(0,0)+x_1a_(0,1) x_0a_(1,0)+x_1a_(1,1) |                         |
|                                                                             |
|             1      2                                                        |
|o4 : Matrix S  <-- S                                                         |
+-----------------------------------------------------------------------------+
|i5 : R = S/ideal f;                                                          |
+-----------------------------------------------------------------------------+
|i6 : kR = R^1/ideal(x_0..x_(c-1))                                            |
|                                                                             |
|o6 = cokernel | x_0 x_1 |                                                    |
|                                                                             |
|                            1                                                |
|o6 : R-module, quotient of R                                                 |
+-----------------------------------------------------------------------------+
|i7 : MF = matrixFactorization(f,highSyzygy kR)                               |
|                                                                             |
|o7 = {{2} | a_(0,0) -a_(0,1) a_(1,0) -a_(1,1) |, {3} | x_0  a_(0,1) 0        |
|      {2} | x_1     x_0      0       0        |  {3} | -x_1 a_(0,0) 0        |
|      {2} | 0       0        x_1     x_0      |  {3} | 0    0       x_0      |
|                                                 {3} | 0    0       -x_1     |
|     ------------------------------------------------------------------------|
|     a_(1,1) 0       |, {2} | 0 0 1 |}                                       |
|     a_(1,0) 0       |  {2} | 0 1 0 |                                        |
|     a_(0,1) a_(1,1) |  {2} | 1 0 0 |                                        |
|     a_(0,0) a_(1,0) |                                                       |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+
|i8 : netList BRanks MF                                                       |
|                                                                             |
|     +-+-+                                                                   |
|o8 = |2|2|                                                                   |
|     +-+-+                                                                   |
|     |1|2|                                                                   |
|     +-+-+                                                                   |
+-----------------------------------------------------------------------------+
|i9 : netList dMaps MF                                                        |
|                                                                             |
|     +-----------------------------------------+                             |
|o9 = |{2} | a_(0,0) -a_(0,1) |                 |                             |
|     |{2} | x_1     x_0      |                 |                             |
|     +-----------------------------------------+                             |
|     |{2} | a_(0,0) -a_(0,1) a_(1,0) -a_(1,1) ||                             |
|     |{2} | x_1     x_0      0       0        ||                             |
|     |{2} | 0       0        x_1     x_0      ||                             |
|     +-----------------------------------------+                             |
+-----------------------------------------------------------------------------+
|i10 : netList bMaps MF                                                       |
|                                                                             |
|      +------------------------+                                             |
|o10 = |{2} | a_(0,0) -a_(0,1) ||                                             |
|      |{2} | x_1     x_0      ||                                             |
|      +------------------------+                                             |
|      |{2} | x_1 x_0 |         |                                             |
|      +------------------------+                                             |
+-----------------------------------------------------------------------------+
|i11 : netList psiMaps MF                                                     |
|                                                                             |
|      +------------------------+                                             |
|o11 = |{2} | a_(1,0) -a_(1,1) ||                                             |
|      |{2} | 0       0        ||                                             |
|      +------------------------+                                             |
+-----------------------------------------------------------------------------+

See also
========

  * matrixFactorization -- Maps in a higher
    codimension matrix factorization
  * bMaps -- list the maps  d_p:B_1(p)-->B_0(p) in a
    matrixFactorization
  * dMaps -- list the maps  d(p):A_1(p)--> A_0(p) in a
    matrixFactorization
  * psiMaps -- list the maps  psi(p): B_1(p) --> A_0(p-1) in a
    matrixFactorization
  * hMaps -- list the maps  h(p): A_0(p)--> A_1(p) in a
    matrixFactorization

Ways to use BRanks:
===================

  * "BRanks(List)"

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

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

Check -- Option for matrixFactorization
***************************************

Synopsis
========

  * Usage:
        matrixFactorization(ff,m,Check => true)
  * Inputs:
      * Check, a Boolean value (Macaulay2Doc),

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

Makes matrixFactorization perform various checks as it computes.

See also
========

  * matrixFactorization -- Maps in a higher
    codimension matrix factorization

Functions with optional argument named Check:
=============================================

  * "EisenbudShamashTotal(...,Check=>...)" -- see EisenbudShamashTotal,
    -- Precursor complex of total Ext
  * "layeredResolution(...,Check=>...)" -- see layeredResolution,
    -- layered finite and infinite layered resolutions of CM
    modules
  * "makeFiniteResolutionCodim2(...,Check=>...)" -- see
    makeFiniteResolutionCodim2, -- Maps associated
    to the finite resolution of a high syzygy module in codim 2
  * "matrixFactorization(...,Check=>...)" -- see matrixFactorization,
    -- Maps in a higher codimension matrix factorization
  * "newExt(...,Check=>...)" -- see newExt, -- Global Ext for
    modules over a complete Intersection

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

The object Check, is a symbol (Macaulay2Doc).

complexity -- complexity of a module over a complete intersection
*****************************************************************

Synopsis
========

  * Usage:
        c = complexity M
        c = complexity mf
  * Inputs:
      * M, a module (Macaulay2Doc), module over a complete
        intersection
      * mf, a list (Macaulay2Doc), output of a matrix factorization
        computation
  * Outputs:
      * c, an integer (Macaulay2Doc), 1+dimension of Ext(M,k) over
        the ring of CI operators

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

The minimal resolution of a module over a complete intersection has betti
numbers that grow as a polynomial of degree at most equal to the codimension-1.
The complexity is one more than the degree of this polynomial.

+-----------------------------------------------------------------------------+
|i1 : setRandomSeed 0                                                         |
|                                                                             |
|o1 = 0                                                                       |
+-----------------------------------------------------------------------------+
|i2 : S = ZZ/101[a,b,c,d];                                                    |
+-----------------------------------------------------------------------------+
|i3 : ff1 = matrix"a3,b3,c3,d3";                                              |
|                                                                             |
|             1      4                                                        |
|o3 : Matrix S  <-- S                                                         |
+-----------------------------------------------------------------------------+
|i4 : ff =ff1*random(source ff1, source ff1);                                 |
|                                                                             |
|             1      4                                                        |
|o4 : Matrix S  <-- S                                                         |
+-----------------------------------------------------------------------------+
|i5 : R = S/ideal ff;                                                         |
+-----------------------------------------------------------------------------+
|i6 : M = highSyzygy (R^1/ideal"a2b2");                                       |
+-----------------------------------------------------------------------------+
|i7 : complexity M                                                            |
|                                                                             |
|o7 = 2                                                                       |
+-----------------------------------------------------------------------------+
|i8 : mf = matrixFactorization (ff, M)                                        |
|                                                                             |
|o8 = {{7} | -a -36b 0 a |, {8} | 35a2  48b  0     -33b 0     |, {6} | 0   36 |
|      {6} | b2 a2   0 0 |  {8} | -35b2 -35a 0     0    0     |  {7} | -36 0  |
|      {7} | 0  0    b a |  {8} | 0     0    33b2  33a  -33b2 |  {7} | 1   0  |
|                           {8} | 0     0    -43a2 -33b 0     |               |
|     ------------------------------------------------------------------------|
|     0  |}                                                                   |
|     36 |                                                                    |
|     0  |                                                                    |
|                                                                             |
|o8 : List                                                                    |
+-----------------------------------------------------------------------------+
|i9 : complexity mf                                                           |
|                                                                             |
|o9 = 2                                                                       |
+-----------------------------------------------------------------------------+
|i10 : betti res (R^1/ideal"a2b2", LengthLimit=>10)                           |
|                                                                             |
|             0 1 2 3 4 5 6 7 8 9 10                                          |
|o10 = total: 1 1 2 3 4 5 6 7 8 9 10                                          |
|          0: 1 . . . . . . . . .  .                                          |
|          1: . . . . . . . . . .  .                                          |
|          2: . . . . . . . . . .  .                                          |
|          3: . 1 2 1 . . . . . .  .                                          |
|          4: . . . 2 4 2 . . . .  .                                          |
|          5: . . . . . 3 6 3 . .  .                                          |
|          6: . . . . . . . 4 8 4  .                                          |
|          7: . . . . . . . . . 5 10                                          |
|                                                                             |
|o10 : BettiTally                                                             |
+-----------------------------------------------------------------------------+

See also
========

  * matrixFactorization -- Maps in a higher
    codimension matrix factorization
  * makeFiniteResolution -- finite resolution of a
    matrix factorization module M

Ways to use complexity:
=======================

  * "complexity(List)"
  * "complexity(Module)"

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

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

cosyzygyRes -- cosyzygy chain of a Cohen-Macaulay module over a Gorenstein ring
*******************************************************************************

Synopsis
========

  * Usage:
        F = cosyzygyRes(len, M)
  * Inputs:
      * len, an integer (Macaulay2Doc), how long a chain of
        cosyzygies
      * M, a module (Macaulay2Doc), Should be a CM module over a
        Gorenstein ring
  * Outputs:
      * F, a chain complex (Macaulay2Doc), last map is
        presentation of M

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

the script returns the dual of the complex F obtained by resolving the cokernel
of the transpose of the presentation of M for len steps. Thus M is the len-th
syzygy of the module resolved by F. When the first argument len is omitted, the
value defaults to len = 2.

+---------------------------------+
|i1 : S = ZZ/101[a,b,c];          |
+---------------------------------+
|i2 : R = S/ideal"a3,b3,c3";      |
+---------------------------------+
|i3 : M = module ideal vars R;    |
+---------------------------------+
|i4 : betti presentation M        |
|                                 |
|            0 1                  |
|o4 = total: 3 6                  |
|         1: 3 3                  |
|         2: . 3                  |
|                                 |
|o4 : BettiTally                  |
+---------------------------------+
|i5 : betti (F = cosyzygyRes(3,M))|
|                                 |
|            0 1 2 3 4            |
|o5 = total: 3 1 1 3 6            |
|        -7: 3 1 . . .            |
|        -6: . . . . .            |
|        -5: . . . . .            |
|        -4: . . . . .            |
|        -3: . . . . .            |
|        -2: . . 1 3 3            |
|        -1: . . . . 3            |
|                                 |
|o5 : BettiTally                  |
+---------------------------------+
|i6 : cosyzygyRes M               |
|                                 |
|      1      1      3      6     |
|o6 = R  <-- R  <-- R  <-- R      |
|                                 |
|     0      1      2      3      |
|                                 |
|o6 : ChainComplex                |
+---------------------------------+

Ways to use cosyzygyRes:
========================

  * "cosyzygyRes(Module)"
  * "cosyzygyRes(ZZ,Module)"

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

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

dMaps -- list the maps  d(p):A_1(p)--> A_0(p) in a matrixFactorization
**********************************************************************

Synopsis
========

  * Usage:
        amaps = dMaps mf
  * Inputs:
      * mf, a list (Macaulay2Doc), output of a matrixFactorization
        computation
  * Outputs:
      * amaps, a list (Macaulay2Doc), list maps $d_p: B_1(p)\to
        B_0(p)$

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

See the documentation for matrixFactorization for an example.

See also
========

  * matrixFactorization -- Maps in a higher
    codimension matrix factorization
  * BRanks -- ranks of the modules B_i(d) in a
    matrixFactorization
  * bMaps -- list the maps  d_p:B_1(p)-->B_0(p) in a
    matrixFactorization
  * psiMaps -- list the maps  psi(p): B_1(p) --> A_0(p-1) in a
    matrixFactorization
  * hMaps -- list the maps  h(p): A_0(p)--> A_1(p) in a
    matrixFactorization

Ways to use dMaps:
==================

  * "dMaps(List)"

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

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

dualWithComponents -- dual module preserving direct sum information
*******************************************************************

Synopsis
========

  * Usage:
        N = dualWithComponents M
  * Inputs:
      * M, a module (Macaulay2Doc),
  * Outputs:
      * N, a module (Macaulay2Doc),

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

If M is a direct sum module (isDirectSum M == true) then N is the direct sum of
the duals of the components (and this is done recursively). This SHOULD be
built into dual M, but isn't as of M2, v. 1.7

See also
========

  * HomWithComponents -- computes Hom, preserving
    direct sum information
  * tensorWithComponents -- forms the tensor
    product, preserving direct sum information

Ways to use dualWithComponents:
===============================

  * "dualWithComponents(Module)"

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

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

EisenbudShamash -- Computes the Eisenbud-Shamash Complex
********************************************************

Synopsis
========

  * Usage:
        FF = Shamash(ff,F,len)
        FF = Shamash(Rbar,F,len)
  * Inputs:
      * ff, a matrix (Macaulay2Doc), 1 x c Matrix over ring F.
      * Rbar, a ring (Macaulay2Doc), ring F mod ideal ff
      * F, a chain complex (Macaulay2Doc), starting from
        F_0, defined over the same ring as ff
      * len, an integer (Macaulay2Doc),
  * Outputs:
      * FF, a chain complex (Macaulay2Doc), chain complex
        over (ring F)/(ideal ff)

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

Let R = ring F = ring ff, and Rbar = R/(ideal ff). The complex F should admit a
system of higher homotopies for the entries of ff, returned by the call
makeHomotopies(ff,F).

When the entries of ff form a regular sequence on ring F, the Shamash complex
is a resolution.

+-----------------------------------------------------------------------------+
|i1 : x = symbol x                                                            |
|                                                                             |
|o1 = x                                                                       |
|                                                                             |
|o1 : Symbol                                                                  |
+-----------------------------------------------------------------------------+
|i2 : S = ZZ/101[x_0..x_4]                                                    |
|                                                                             |
|o2 = S                                                                       |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : F = res coker vars S                                                    |
|                                                                             |
|      1      5      10      10      5      1                                 |
|o3 = S  <-- S  <-- S   <-- S   <-- S  <-- S  <-- 0                           |
|                                                                             |
|     0      1      2       3       4      5      6                           |
|                                                                             |
|o3 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i4 : ff = matrix{{x_0^2,x_1^3}}                                              |
|                                                                             |
|o4 = | x_0^2 x_1^3 |                                                         |
|                                                                             |
|             1      2                                                        |
|o4 : Matrix S  <-- S                                                         |
+-----------------------------------------------------------------------------+
|i5 : R = S/(ideal ff)                                                        |
|                                                                             |
|o5 = R                                                                       |
|                                                                             |
|o5 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i6 : len = 10                                                                |
|                                                                             |
|o6 = 10                                                                      |
+-----------------------------------------------------------------------------+
|i7 : time G = EisenbudShamash(ff,F,len)                                      |
| -- used 6.98343s (cpu); 4.66166s (thread); 0s (gc)                          |
|                                                                             |
|     /    S   \1     /    S   \5     /    S   \12     /    S   \20           |
|o7 = |--------|  <-- |--------|  <-- |--------|   <-- |--------|   <--       |
|     |  2   3 |      |  2   3 |      |  2   3 |       |  2   3 |             |
|     |(x , x )|      |(x , x )|      |(x , x )|       |(x , x )|             |
|     \  0   1 /      \  0   1 /      \  0   1 /       \  0   1 /             |
|                                                                             |
|     0               1               2                3                      |
|                                                                             |
|o7 : ChainComplex                                                            |
|-----------------------------------------------------------------------------|
|/    S   \28     /    S   \36     /    S   \44     /    S   \52              |
||--------|   <-- |--------|   <-- |--------|   <-- |--------|   <--          |
||  2   3 |       |  2   3 |       |  2   3 |       |  2   3 |                |
||(x , x )|       |(x , x )|       |(x , x )|       |(x , x )|                |
|\  0   1 /       \  0   1 /       \  0   1 /       \  0   1 /                |
|                                                                             |
|4                5                6                7                         |
|-----------------------------------------------------------------------------|
|/    S   \60     /    S   \68     /    S   \76                               |
||--------|   <-- |--------|   <-- |--------|                                 |
||  2   3 |       |  2   3 |       |  2   3 |                                 |
||(x , x )|       |(x , x )|       |(x , x )|                                 |
|\  0   1 /       \  0   1 /       \  0   1 /                                 |
|                                                                             |
|8                9                10                                         |
+-----------------------------------------------------------------------------+
|i8 : apply(length G -1, i->prune HH_(i+1) G)                                 |
|                                                                             |
|o8 = {0, 0, 0, 0, 0, 0, 0, 0, 0}                                             |
|                                                                             |
|o8 : List                                                                    |
+-----------------------------------------------------------------------------+

The complex G has terms that are abstractly G_i = F_i ++ D_1**F_{i-2} ++
D_2**F_{i-4}... where D_i is the i-th divided power of the free module source
ff. In fact the term D_i**F_j is the direct sum of copies of F_j, indexed by
the basis t^{e} of the divided power, each twisted by the degree of t^{e}. This
basis is in 1-1 correspondence with the partitions of c = numcols ff, with i
parts, produced by the function expo(c,i), as can be seen in the following:

+-----------------------------------------------+
|i9 : betti F                                   |
|                                               |
|            0 1  2  3 4 5                      |
|o9 = total: 1 5 10 10 5 1                      |
|         0: 1 5 10 10 5 1                      |
|                                               |
|o9 : BettiTally                                |
+-----------------------------------------------+
|i10 : G5 = (G_5).cache.components              |
|                                               |
|       /    S   \1  /    S   \20  /    S   \15 |
|o10 = {|--------| , |--------|  , |--------|  }|
|       |  2   3 |   |  2   3 |    |  2   3 |   |
|       |(x , x )|   |(x , x )|    |(x , x )|   |
|       \  0   1 /   \  0   1 /    \  0   1 /   |
|                                               |
|o10 : List                                     |
+-----------------------------------------------+

Thus, c = 2, so D_i = R^{i+1}, and G5 is the direct sum F_5 ++ R^2**F_3 ++
R^3**F_1. Moreover, D_1 has two exponents,

+-------------------------+
|i11 : expo(numcols ff, 1)|
|                         |
|o11 = {{1, 0}, {0, 1}}   |
|                         |
|o11 : List               |
+-------------------------+

So G5_1 will have two components, both isomorphic to R**F_3 = R^{10}:

+-----------------------------------+
|i12 : G51 = (G5_1).cache.components|
|                                   |
|       /    S   \10  /    S   \10  |
|o12 = {|--------|  , |--------|  } |
|       |  2   3 |    |  2   3 |    |
|       |(x , x )|    |(x , x )|    |
|       \  0   1 /    \  0   1 /    |
|                                   |
|o12 : List                         |
+-----------------------------------+

All the decompositions seem to impose a certain overhead, and in the case where
it applies, namely c=1, the routine Shamash is faster:

+---------------------------------------------------------------+
|i13 : S = ZZ/101[a..f]                                         |
|                                                               |
|o13 = S                                                        |
|                                                               |
|o13 : PolynomialRing                                           |
+---------------------------------------------------------------+
|i14 : R = S/ideal"a3,b3"                                       |
|                                                               |
|o14 = R                                                        |
|                                                               |
|o14 : QuotientRing                                             |
+---------------------------------------------------------------+
|i15 : M = coker vars R                                         |
|                                                               |
|o15 = cokernel | a b c d e f |                                 |
|                                                               |
|                             1                                 |
|o15 : R-module, quotient of R                                  |
+---------------------------------------------------------------+
|i16 : F = res M                                                |
|                                                               |
|       1      6      17      32      48      64      80      96|
|o16 = R  <-- R  <-- R   <-- R   <-- R   <-- R   <-- R   <-- R  |
|                                                               |
|      0      1      2       3       4       5       6       7  |
|                                                               |
|o16 : ChainComplex                                             |
+---------------------------------------------------------------+
|i17 : betti F                                                  |
|                                                               |
|             0 1  2  3  4  5  6  7                             |
|o17 = total: 1 6 17 32 48 64 80 96                             |
|          0: 1 6 15 20 15  6  1  .                             |
|          1: . .  2 12 30 40 30 12                             |
|          2: . .  .  .  3 18 45 60                             |
|          3: . .  .  .  .  .  4 24                             |
|                                                               |
|o17 : BettiTally                                               |
+---------------------------------------------------------------+
|i18 : ff = matrix"c3"                                          |
|                                                               |
|o18 = | c3 |                                                   |
|                                                               |
|              1      1                                         |
|o18 : Matrix R  <-- R                                          |
+---------------------------------------------------------------+
|i19 : R1 = R/ideal ff                                          |
|                                                               |
|o19 = R1                                                       |
|                                                               |
|o19 : QuotientRing                                             |
+---------------------------------------------------------------+
|i20 : FF = time Shamash(R1,F,4)                                |
| -- used 0.116054s (cpu); 0.0787666s (thread); 0s (gc)         |
|                                                               |
|        1       6       18       38       66                   |
|o20 = R1  <-- R1  <-- R1   <-- R1   <-- R1                     |
|                                                               |
|      0       1       2        3        4                      |
|                                                               |
|o20 : ChainComplex                                             |
+---------------------------------------------------------------+
|i21 : GG = time EisenbudShamash(ff,F,4)                        |
| -- used 1.10557s (cpu); 0.723461s (thread); 0s (gc)           |
|                                                               |
|      / R\1     / R\6     / R\18     / R\38     / R\66         |
|o21 = |--|  <-- |--|  <-- |--|   <-- |--|   <-- |--|           |
|      | 3|      | 3|      | 3|       | 3|       | 3|           |
|      \c /      \c /      \c /       \c /       \c /           |
|                                                               |
|      0         1         2          3          4              |
|                                                               |
|o21 : ChainComplex                                             |
+---------------------------------------------------------------+

The function also deals correctly with complexes F where min F is not 0:

+----------------------------------------------------+
|i22 : GG = time EisenbudShamash(R1,F[2],4)          |
| -- used 1.11986s (cpu); 0.714673s (thread); 0s (gc)|
|                                                    |
|        1       6       18       38       66        |
|o22 = R1  <-- R1  <-- R1   <-- R1   <-- R1          |
|                                                    |
|      -2      -1      0        1        2           |
|                                                    |
|o22 : ChainComplex                                  |
+----------------------------------------------------+

See also
========

  * makeHomotopies -- returns a system of higher
    homotopies
  * Shamash -- Computes the Shamash Complex
  * expo -- returns a set corresponding to the basis of a divided
    power

Ways to use EisenbudShamash:
============================

  * "EisenbudShamash(Matrix,ChainComplex,ZZ)"
  * "EisenbudShamash(Ring,ChainComplex,ZZ)"

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

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

EisenbudShamashTotal -- Precursor complex of total Ext
******************************************************

Synopsis
========

  * Usage:
        (d0,d1) =  EisenbudShamashTotal M
  * Inputs:
      * M, a module (Macaulay2Doc), over a complete intersection
  * Optional inputs (Macaulay2Doc),:
      * Check => ..., default value false
      * Grading => ..., default value 2
      * Variables => ..., default value s
  * Outputs:
      * d0, a matrix (Macaulay2Doc), map of free modules over an
        enlarged ring
      * d1, a matrix (Macaulay2Doc), map of free modules over an
        enlarged ring

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

Assume that M is defined over a ring of the form Rbar = R/(f_0..f_{c-1}), a
complete intersection, and that M has a finite free resolution G over R. In
this case M has a free resolution F over Rbar whose dual, F^* is a finitely
generated, Z-graded free module over a ring Sbar\cong kk[s_0..s_{c-1},gens
Rbar], where the degrees of the s_i are {-2, -degree f_i}. This resolution is
is constructed from the dual of G, together with the duals of the higher
homotopies on G defined by Eisenbud.

The function returns the differentials d0:F^*_{even} \to F^*_{odd} and
d1:F^*_{odd}\to F^*_{even}.

The maps d0,d1 form a matrix factorization of sum(c, i->s_i*f_i). The have the
property that for any Rbar module N,

HH_1 chainComplex \{d0**N, d1**N\} = Ext^{even}_{Rbar}(M,N)

S^{{1,0}}**HH_1 chainComplex \{S^{{-2,0}}**d1**N, d0**N\} =
Ext^{odd}_{Rbar}(M,N)

This is encoded in the script newExt

Option defaults: Check=>false Variables=>getSymbol "s", Grading =>2}

If Grading =>1, then a singly graded result is returned (just forgetting the
homological grading.)

+-----------------------------------------------------------------------------+
|i1 : n = 3                                                                   |
|                                                                             |
|o1 = 3                                                                       |
+-----------------------------------------------------------------------------+
|i2 : c = 2                                                                   |
|                                                                             |
|o2 = 2                                                                       |
+-----------------------------------------------------------------------------+
|i3 : kk = ZZ/101                                                             |
|                                                                             |
|o3 = kk                                                                      |
|                                                                             |
|o3 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i4 : R = kk[x_0..x_(n-1)]                                                    |
|                                                                             |
|o4 = R                                                                       |
|                                                                             |
|o4 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i5 : I = ideal(x_0^2, x_2^3)                                                 |
|                                                                             |
|             2   3                                                           |
|o5 = ideal (x , x )                                                          |
|             0   2                                                           |
|                                                                             |
|o5 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i6 : ff = gens I                                                             |
|                                                                             |
|o6 = | x_0^2 x_2^3 |                                                         |
|                                                                             |
|             1      2                                                        |
|o6 : Matrix R  <-- R                                                         |
+-----------------------------------------------------------------------------+
|i7 : Rbar = R/I                                                              |
|                                                                             |
|o7 = Rbar                                                                    |
|                                                                             |
|o7 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i8 : bar = map(Rbar, R)                                                      |
|                                                                             |
|o8 = map (Rbar, R, {x , x , x })                                             |
|                     0   1   2                                               |
|                                                                             |
|o8 : RingMap Rbar <-- R                                                      |
+-----------------------------------------------------------------------------+
|i9 : Mbar = prune coker random(Rbar^1, Rbar^{-2})                            |
|                                                                             |
|o9 = cokernel | x_0x_1+24x_1^2+49x_0x_2+3x_1x_2+5x_2^2 |                     |
|                                                                             |
|                                  1                                          |
|o9 : Rbar-module, quotient of Rbar                                           |
+-----------------------------------------------------------------------------+
|i10 : (d0,d1) = EisenbudShamashTotal(Mbar,Grading =>1)                       |
|                                                                             |
|o10 = ({-2} | x_0^2                                  0                       |
|       {-2} | x_0x_1+24x_1^2+49x_0x_2+3x_1x_2+5x_2^2 30s_0                   |
|       {-3} | x_2^3                                  0                       |
|       {-7} | 0                                      x_2^3                   |
|      -----------------------------------------------------------------------|
|      -s_1                                      0        |, {0}  |           |
|      0                                         -s_1     |  {-4} |           |
|      s_0                                       0        |  {-5} |           |
|      37x_0x_1-21x_1^2-5x_0x_2+10x_1x_2-17x_2^2 -37x_0^2 |  {-5} |           |
|      -----------------------------------------------------------------------|
|      s_0                                       0                            |
|      37x_0x_1-21x_1^2-5x_0x_2+10x_1x_2-17x_2^2 -37x_0^2                     |
|      -x_2^3                                    0                            |
|      0                                         -x_2^3                       |
|      -----------------------------------------------------------------------|
|      s_1                                    0     |)                        |
|      0                                      s_1   |                         |
|      x_0^2                                  0     |                         |
|      x_0x_1+24x_1^2+49x_0x_2+3x_1x_2+5x_2^2 30s_0 |                         |
|                                                                             |
|o10 : Sequence                                                               |
+-----------------------------------------------------------------------------+
|i11 : d0*d1                                                                  |
|                                                                             |
|o11 = {-2} | s_1x_2^3+s_0x_0^2 0                 0                           |
|      {-2} | 0                 s_1x_2^3+s_0x_0^2 0                           |
|      {-3} | 0                 0                 s_1x_2^3+s_0x_0^2           |
|      {-7} | 0                 0                 0                           |
|      -----------------------------------------------------------------------|
|      0                 |                                                    |
|      0                 |                                                    |
|      0                 |                                                    |
|      s_1x_2^3+s_0x_0^2 |                                                    |
|                                                                             |
|                                 4                         4                 |
|o11 : Matrix (kk[s ..s , x ..x ])  <-- (kk[s ..s , x ..x ])                  |
|                  0   1   0   2             0   1   0   2                    |
+-----------------------------------------------------------------------------+
|i12 : d1*d0                                                                  |
|                                                                             |
|o12 = {0}  | s_1x_2^3+s_0x_0^2 0                 0                           |
|      {-4} | 0                 s_1x_2^3+s_0x_0^2 0                           |
|      {-5} | 0                 0                 s_1x_2^3+s_0x_0^2           |
|      {-5} | 0                 0                 0                           |
|      -----------------------------------------------------------------------|
|      0                 |                                                    |
|      0                 |                                                    |
|      0                 |                                                    |
|      s_1x_2^3+s_0x_0^2 |                                                    |
|                                                                             |
|                                 4                         4                 |
|o12 : Matrix (kk[s ..s , x ..x ])  <-- (kk[s ..s , x ..x ])                  |
|                  0   1   0   2             0   1   0   2                    |
+-----------------------------------------------------------------------------+
|i13 : S = ring d0                                                            |
|                                                                             |
|o13 = S                                                                      |
|                                                                             |
|o13 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i14 : phi = map(S,R)                                                         |
|                                                                             |
|o14 = map (S, R, {x , x , x })                                               |
|                   0   1   2                                                 |
|                                                                             |
|o14 : RingMap S <-- R                                                        |
+-----------------------------------------------------------------------------+
|i15 : IS = phi I                                                             |
|                                                                             |
|              2   3                                                          |
|o15 = ideal (x , x )                                                         |
|              0   2                                                          |
|                                                                             |
|o15 : Ideal of S                                                             |
+-----------------------------------------------------------------------------+
|i16 : Sbar = S/IS                                                            |
|                                                                             |
|o16 = Sbar                                                                   |
|                                                                             |
|o16 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i17 : SMbar = Sbar**Mbar                                                     |
|                                                                             |
|o17 = cokernel | x_0x_1+24x_1^2+49x_0x_2+3x_1x_2+5x_2^2 |                    |
|                                                                             |
|                                   1                                         |
|o17 : Sbar-module, quotient of Sbar                                          |
+-----------------------------------------------------------------------------+

Hom(d0,Sbar) and Hom(d1,Sbar) together form the resolution of Mbar; thus the
homology of one composition is 0, while the other is Mbar

+-----------------------------------------------------------------------------+
|i18 : prune HH_1 chainComplex{dual (Sbar**d0), dual(Sbar**d1)} == 0          |
|                                                                             |
|o18 = true                                                                   |
+-----------------------------------------------------------------------------+
|i19 : Mbar' = Sbar^1/(Sbar_0, Sbar_1)**SMbar                                 |
|                                                                             |
|o19 = cokernel | x_0x_1+24x_1^2+49x_0x_2+3x_1x_2+5x_2^2 s_0 s_1 |            |
|                                                                             |
|                                   1                                         |
|o19 : Sbar-module, quotient of Sbar                                          |
+-----------------------------------------------------------------------------+
|i20 : ideal presentation prune HH_1 chainComplex{dual (Sbar**d1),            |
|                                                                             |
|o20 = true                                                                   |
|-----------------------------------------------------------------------------|
|dual(Sbar**d0)} == ideal presentation Mbar'                                  |
+-----------------------------------------------------------------------------+

See also
========

  * Ext (Macaulay2Doc) -- compute an Ext module
  * newExt -- Global Ext for modules over a complete
    Intersection
  * makeHomotopies -- returns a system of higher
    homotopies

Ways to use EisenbudShamashTotal:
=================================

  * "EisenbudShamashTotal(Module)"

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

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

evenExtModule -- even part of Ext^*(M,k) over a complete intersection as module over CI operator ring
*****************************************************************************************************

Synopsis
========

  * Usage:
        E = evenExtModule M
  * Inputs:
      * M, a module (Macaulay2Doc), over a complete intersection
        ring
  * Optional inputs (Macaulay2Doc),:
      * OutRing => ..., default value 0
  * Outputs:
      * E, a module (Macaulay2Doc), over a polynomial ring with
        gens in degree 1

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

Extracts the even degree part from ExtModule M If the optional argument OutRing
=> T is given, and class T === PolynomialRing, then the output will be a module
over T.

+---------------------------------------------------------+
|i1 : kk= ZZ/101                                          |
|                                                         |
|o1 = kk                                                  |
|                                                         |
|o1 : QuotientRing                                        |
+---------------------------------------------------------+
|i2 : S = kk[x,y,z]                                       |
|                                                         |
|o2 = S                                                   |
|                                                         |
|o2 : PolynomialRing                                      |
+---------------------------------------------------------+
|i3 : I2 = ideal"x3,yz"                                   |
|                                                         |
|             3                                           |
|o3 = ideal (x , y*z)                                     |
|                                                         |
|o3 : Ideal of S                                          |
+---------------------------------------------------------+
|i4 : R2 = S/I2                                           |
|                                                         |
|o4 = R2                                                  |
|                                                         |
|o4 : QuotientRing                                        |
+---------------------------------------------------------+
|i5 : M2 = R2^1/ideal"x2,y,z"                             |
|                                                         |
|o5 = cokernel | x2 y z |                                 |
|                                                         |
|                              1                          |
|o5 : R2-module, quotient of R2                           |
+---------------------------------------------------------+
|i6 : betti res (M2, LengthLimit =>10)                    |
|                                                         |
|            0 1 2 3 4  5  6  7  8  9 10                  |
|o6 = total: 1 3 5 7 9 11 13 15 17 19 21                  |
|         0: 1 2 2 2 2  2  2  2  2  2  2                  |
|         1: . 1 3 4 4  4  4  4  4  4  4                  |
|         2: . . . 1 3  4  4  4  4  4  4                  |
|         3: . . . . .  1  3  4  4  4  4                  |
|         4: . . . . .  .  .  1  3  4  4                  |
|         5: . . . . .  .  .  .  .  1  3                  |
|                                                         |
|o6 : BettiTally                                          |
+---------------------------------------------------------+
|i7 : E = ExtModule M2                                    |
|                                                         |
|                 8                                       |
|o7 = (kk[X ..X ])                                        |
|          0   1                                          |
|                                                         |
|o7 : kk[X ..X ]-module, free, degrees {0..1, 2:1, 3:2, 3}|
|         0   1                                           |
+---------------------------------------------------------+
|i8 : apply(toList(0..10), i->hilbertFunction(i, E))      |
|                                                         |
|o8 = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21}             |
|                                                         |
|o8 : List                                                |
+---------------------------------------------------------+
|i9 : Eeven = evenExtModule M2                            |
|                                                         |
|                 4                                       |
|o9 = (kk[X ..X ])                                        |
|          0   1                                          |
|                                                         |
|o9 : kk[X ..X ]-module, free, degrees {0..1, 2:1}        |
|         0   1                                           |
+---------------------------------------------------------+
|i10 : apply(toList(0..5), i->hilbertFunction(i, Eeven))  |
|                                                         |
|o10 = {1, 5, 9, 13, 17, 21}                              |
|                                                         |
|o10 : List                                               |
+---------------------------------------------------------+

See also
========

  * ExtModule -- Ext^*(M,k) over a complete intersection as
    module over CI operator ring
  * oddExtModule -- odd part of Ext^*(M,k) over a complete
    intersection as module over CI operator ring
  * OutRing -- Option allowing specification of the ring over
    which the output is defined

Ways to use evenExtModule:
==========================

  * "evenExtModule(Module)"

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

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

expo -- returns a set corresponding to the basis of a divided power
*******************************************************************

Synopsis
========

  * Usage:
        B = expo(c,N)
        B = expo(c,L)
  * Inputs:
      * N, an integer (Macaulay2Doc),
      * c, an integer (Macaulay2Doc),
      * L, a list (Macaulay2Doc), of c non-negative integers
  * Outputs:
      * B, a list (Macaulay2Doc), partitions with c non-negative
        parts

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

The form expo(c,N) returns partitions of N with c non-negative parts. The form
expo(c, L) returns partitions with non-negative parts that are componentwise <=
L (and any sum <= sum L).

The list expo(c,N)  may be thought of as the list of exponent vectors of the
monomials of degree N in c variables. This is used in the construction of the
Eisenbud-Shamash resolution.

The list expo(c, L), on the other hand, may be thought of as the list of
divisors of e^L = e_0^{L_0} ... e_c^{L_c}. This is used in the construction of
the higher homotopies on a complex.

+-----------------------------------------------------------------------------+
|i1 : expo(3,5)                                                               |
|                                                                             |
|o1 = {{5, 0, 0}, {4, 1, 0}, {4, 0, 1}, {3, 2, 0}, {3, 1, 1}, {3, 0, 2}, {2,  |
|     ------------------------------------------------------------------------|
|     3, 0}, {2, 2, 1}, {2, 1, 2}, {2, 0, 3}, {1, 4, 0}, {1, 3, 1}, {1, 2, 2},|
|     ------------------------------------------------------------------------|
|     {1, 1, 3}, {1, 0, 4}, {0, 5, 0}, {0, 4, 1}, {0, 3, 2}, {0, 2, 3}, {0, 1,|
|     ------------------------------------------------------------------------|
|     4}, {0, 0, 5}}                                                          |
|                                                                             |
|o1 : List                                                                    |
+-----------------------------------------------------------------------------+
|i2 : expo(3, {3,2,1})                                                        |
|                                                                             |
|o2 = {{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {2, 0, 0}, {1, 1, 0}, {1,  |
|     ------------------------------------------------------------------------|
|     0, 1}, {0, 2, 0}, {0, 1, 1}, {3, 0, 0}, {2, 1, 0}, {2, 0, 1}, {1, 2, 0},|
|     ------------------------------------------------------------------------|
|     {1, 1, 1}, {0, 2, 1}, {3, 1, 0}, {3, 0, 1}, {2, 2, 0}, {2, 1, 1}, {1, 2,|
|     ------------------------------------------------------------------------|
|     1}, {3, 2, 0}, {3, 1, 1}, {2, 2, 1}}                                    |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * EisenbudShamash -- Computes the Eisenbud-Shamash
    Complex
  * makeHomotopies -- returns a system of higher
    homotopies

Ways to use expo:
=================

  * "expo(ZZ,List)"
  * "expo(ZZ,ZZ)"

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

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

exteriorExtModule -- Ext(M,k) or Ext(M,N) as a module over an exterior algebra
******************************************************************************

Synopsis
========

  * Usage:
        E = exteriorExtModule(f,M)
  * Inputs:
      * f, a matrix (Macaulay2Doc), 1 x c, entries must be
        homotopic to 0 on F
      * M, a module (Macaulay2Doc), annihilated by the elements
        of ff
      * N, a module (Macaulay2Doc), annihilated by the elements
        of ff
  * Outputs:
      * E, a module (Macaulay2Doc), Module over an exterior
        algebra with variables corresponding to elements of f

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

If M,N are S-modules annihilated by the elements of the matrix ff = (f_1..f_c),
and k is the residue field of S, then the script exteriorExtModule(f,M) returns
Ext_S(M, k) as a module over an exterior algebra E = k<e_1,...,e_c>, where the
e_i have degree 1. It is computed as the E-dual of exteriorTorModule.

The script exteriorTorModule(f,M,N) returns Ext_S(M,N) as a module over a
bigraded ring SE = S<e_1,..,e_c>, where the e_i have degrees {d_i,1}, where d_i
is the degree of f_i. The module structure, in either case, is defined by the
homotopies for the f_i on the resolution of M, computed by the script
makeHomotopies1.The script calls makeModule to compute a (non-minimal)
presentation of this module.

+------------------------------------------------------+
|i1 : kk = ZZ/101                                      |
|                                                      |
|o1 = kk                                               |
|                                                      |
|o1 : QuotientRing                                     |
+------------------------------------------------------+
|i2 : S = kk[a,b,c]                                    |
|                                                      |
|o2 = S                                                |
|                                                      |
|o2 : PolynomialRing                                   |
+------------------------------------------------------+
|i3 : f = matrix"a4,b4,c4"                             |
|                                                      |
|o3 = | a4 b4 c4 |                                     |
|                                                      |
|             1      3                                 |
|o3 : Matrix S  <-- S                                  |
+------------------------------------------------------+
|i4 : R = S/ideal f                                    |
|                                                      |
|o4 = R                                                |
|                                                      |
|o4 : QuotientRing                                     |
+------------------------------------------------------+
|i5 : p = map(R,S)                                     |
|                                                      |
|o5 = map (R, S, {a, b, c})                            |
|                                                      |
|o5 : RingMap R <-- S                                  |
+------------------------------------------------------+
|i6 : M = coker map(R^2, R^{3:-1}, {{a,b,c},{b,c,a}})  |
|                                                      |
|o6 = cokernel | a b c |                               |
|              | b c a |                               |
|                                                      |
|                            2                         |
|o6 : R-module, quotient of R                          |
+------------------------------------------------------+
|i7 : betti (FF =res( M, LengthLimit =>6))             |
|                                                      |
|            0 1 2 3 4  5  6                           |
|o7 = total: 2 3 4 6 9 13 18                           |
|         0: 2 3 . . .  .  .                           |
|         1: . . 1 . .  .  .                           |
|         2: . . 3 3 .  .  .                           |
|         3: . . . 3 3  .  .                           |
|         4: . . . . 3  3  .                           |
|         5: . . . . 3  9  6                           |
|         6: . . . . .  .  3                           |
|         7: . . . . .  1  9                           |
|                                                      |
|o7 : BettiTally                                       |
+------------------------------------------------------+
|i8 : MS = prune pushForward(p, coker FF.dd_6);        |
+------------------------------------------------------+
|i9 : resFld := pushForward(p, coker vars R);          |
+------------------------------------------------------+
|i10 : T = exteriorTorModule(f,MS);                    |
+------------------------------------------------------+
|i11 : E = exteriorExtModule(f,MS);                    |
+------------------------------------------------------+
|i12 : hf(-4..0,E)                                     |
|                                                      |
|o12 = {0, 9, 29, 33, 13}                              |
|                                                      |
|o12 : List                                            |
+------------------------------------------------------+
|i13 : betti res MS                                    |
|                                                      |
|              0  1  2 3                               |
|o13 = total: 13 33 29 9                               |
|          9:  3  .  . .                               |
|         10:  9  6  . .                               |
|         11:  .  3  . .                               |
|         12:  1 15  . .                               |
|         13:  .  9  8 .                               |
|         14:  .  .  6 .                               |
|         15:  .  . 12 .                               |
|         16:  .  .  3 3                               |
|         17:  .  .  . 3                               |
|         18:  .  .  . 3                               |
|                                                      |
|o13 : BettiTally                                      |
+------------------------------------------------------+
|i14 : betti res (PE = prune E)                        |
|                                                      |
|              0  1  2  3  4                           |
|o14 = total: 16 13 25 49 81                           |
|         -3:  9  4  3  3  3                           |
|         -2:  6  3  .  .  .                           |
|         -1:  .  .  7 18 33                           |
|          0:  1  6 15 28 45                           |
|                                                      |
|o14 : BettiTally                                      |
+------------------------------------------------------+
|i15 : betti res (PT = prune T)                        |
|                                                      |
|              0  1  2   3   4                         |
|o15 = total: 31 55 87 127 175                         |
|          0: 13 24 39  58  81                         |
|          1: 18 31 48  69  94                         |
|                                                      |
|o15 : BettiTally                                      |
+------------------------------------------------------+
|i16 : E1 = prune exteriorExtModule(f, MS, resFld);    |
+------------------------------------------------------+
|i17 : ring E1                                         |
|                                                      |
|o17 = kk[X ..X , e ..e ]                              |
|          0   2   0   2                               |
|                                                      |
|o17 : PolynomialRing, 3 skew commutative variable(s)  |
+------------------------------------------------------+
|i18 : exRing = kk[e_0,e_1,e_2, SkewCommutative =>true]|
|                                                      |
|o18 = exRing                                          |
|                                                      |
|o18 : PolynomialRing, 3 skew commutative variable(s)  |
+------------------------------------------------------+

We can also construct the exteriorExtModule as a bigraded module, over a ring
SE that has both polynomial variables like S and exterior variables like E. The
polynomial variables have degrees {1,0}. The exterior variables have degrees
{deg ff_i, 1}.

+------------------------------------------------------+
|i19 : E1 = prune exteriorExtModule(f, MS, resFld);    |
+------------------------------------------------------+
|i20 : ring E1                                         |
|                                                      |
|o20 = kk[X ..X , e ..e ]                              |
|          0   2   0   2                               |
|                                                      |
|o20 : PolynomialRing, 3 skew commutative variable(s)  |
+------------------------------------------------------+
|i21 : exRing = kk[e_0,e_1,e_2, SkewCommutative =>true]|
|                                                      |
|o21 = exRing                                          |
|                                                      |
|o21 : PolynomialRing, 3 skew commutative variable(s)  |
+------------------------------------------------------+

To see that this is really the same module, with a more complex grading, we can
bring it over to a pure exterior algebra. Note that the necessary map of rings
must contain a DegreeMap option. In general we could only take the degrees of
the generators of the exterior algebra to be the gcd of  the deg ff_i ; in the
example above this is 1.

+--------------------------------------------------------------------------+
|i22 : q = map(exRing, ring E1, {3:0,e_0,e_1,e_2}, DegreeMap => d -> {d_1})|
|                                                                          |
|o22 = map (exRing, kk[X ..X , e ..e ], {0, 0, 0, e , e , e })             |
|                       0   2   0   2              0   1   2               |
|                                                                          |
|o22 : RingMap exRing <-- kk[X ..X , e ..e ]                               |
|                             0   2   0   2                                |
+--------------------------------------------------------------------------+
|i23 : E2 = coker q presentation E1;                                       |
+--------------------------------------------------------------------------+
|i24 : hf(-5..5,E2) == hf(-5..5,E)                                         |
|                                                                          |
|o24 = true                                                                |
+--------------------------------------------------------------------------+

See also
========

  * exteriorTorModule -- Tor as a module over an
    exterior algebra or bigraded algebra
  * makeModule -- makes a Module out of a collection of
    modules and maps

Ways to use exteriorExtModule:
==============================

  * "exteriorExtModule(Matrix,Module)"
  * "exteriorExtModule(Matrix,Module,Module)"

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

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

exteriorHomologyModule -- Make the homology of a complex into a module over an exterior algebra
***********************************************************************************************

Synopsis
========

  * Usage:
        M = exteriorHomologyModule(ff, C)
  * Inputs:
      * ff, a matrix (Macaulay2Doc), Matrix of elements that are
        homotopic to 0 on C
      * C, a chain complex (Macaulay2Doc),
  * Outputs:
      * M, a module (Macaulay2Doc),

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

Assuming that the elements of the 1xc matrix ff are null-homotopic on C, the
script returns the direct sum of the homology of C as a module over a new ring,
consisting of ring C with c exterior variables adjoined. The script is the main
component of exteriorTorModule

See also
========

  * exteriorTorModule -- Tor as a module over an
    exterior algebra or bigraded algebra
  * makeHomotopiesOnHomology -- Homology of a
    complex as exterior module

Ways to use exteriorHomologyModule:
===================================

  * "exteriorHomologyModule(Matrix,ChainComplex)"

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

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

exteriorTorModule -- Tor as a module over an exterior algebra or bigraded algebra
*********************************************************************************

Synopsis
========

  * Usage:
        T = exteriorTorModule(f,F)
        T = exteriorTorModule(f,M,N)
  * Inputs:
      * f, a matrix (Macaulay2Doc), 1 x c, entries must be
        homotopic to 0 on F
      * M, a module (Macaulay2Doc), S-module annihilated by ideal
        f
      * N, a module (Macaulay2Doc), S-module annihilated by ideal
        f
  * Outputs:
      * T, a module (Macaulay2Doc), Tor^S(M,N) as a Module over
        an exterior algebra

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

If M,N are S-modules annihilated by the elements of the matrix ff = (f_1..f_c),
and k is the residue field of S, then the script exteriorTorModule(f,M) returns
Tor^S(M, k) as a module over an exterior algebra k<e_1,...,e_c>, where the e_i
have degree 1, while exteriorTorModule(f,M,N) returns Tor^S(M,N) as a module
over a bigraded ring SE = S<e_1,..,e_c>, where the e_i have degrees {d_i,1},
where d_i is the degree of f_i. The module structure, in either case, is
defined by the homotopies for the f_i on the resolution of M, computed by the
script makeHomotopies1.

The scripts call makeModule to compute a (non-minimal) presentation of this
module.

From the description by matrix factorizations and the paper "Tor as a module
over an exterior algebra" of Eisenbud, Peeva and Schreyer it follows that when
M is a high syzygy and F is its resolution, then the presentation of
Tor(M,S^1/mm) always has generators in degrees 0,1, corresponding to the
targets and sources of the stack of maps B(i), and that the resolution is
componentwise linear in a suitable sense. In the following example, these facts
are verified. The Tor module does NOT split into the direct sum of the
submodules generated in degrees 0 and 1, however.

+-------------------------------------------------------------------+
|i1 : kk = ZZ/101                                                   |
|                                                                   |
|o1 = kk                                                            |
|                                                                   |
|o1 : QuotientRing                                                  |
+-------------------------------------------------------------------+
|i2 : S = kk[a,b,c]                                                 |
|                                                                   |
|o2 = S                                                             |
|                                                                   |
|o2 : PolynomialRing                                                |
+-------------------------------------------------------------------+
|i3 : f = matrix"a4,b4,c4"                                          |
|                                                                   |
|o3 = | a4 b4 c4 |                                                  |
|                                                                   |
|             1      3                                              |
|o3 : Matrix S  <-- S                                               |
+-------------------------------------------------------------------+
|i4 : R = S/ideal f                                                 |
|                                                                   |
|o4 = R                                                             |
|                                                                   |
|o4 : QuotientRing                                                  |
+-------------------------------------------------------------------+
|i5 : p = map(R,S)                                                  |
|                                                                   |
|o5 = map (R, S, {a, b, c})                                         |
|                                                                   |
|o5 : RingMap R <-- S                                               |
+-------------------------------------------------------------------+
|i6 : M = coker map(R^2, R^{3:-1}, {{a,b,c},{b,c,a}})               |
|                                                                   |
|o6 = cokernel | a b c |                                            |
|              | b c a |                                            |
|                                                                   |
|                            2                                      |
|o6 : R-module, quotient of R                                       |
+-------------------------------------------------------------------+
|i7 : betti (FF =res( M, LengthLimit =>6))                          |
|                                                                   |
|            0 1 2 3 4  5  6                                        |
|o7 = total: 2 3 4 6 9 13 18                                        |
|         0: 2 3 . . .  .  .                                        |
|         1: . . 1 . .  .  .                                        |
|         2: . . 3 3 .  .  .                                        |
|         3: . . . 3 3  .  .                                        |
|         4: . . . . 3  3  .                                        |
|         5: . . . . 3  9  6                                        |
|         6: . . . . .  .  3                                        |
|         7: . . . . .  1  9                                        |
|                                                                   |
|o7 : BettiTally                                                    |
+-------------------------------------------------------------------+
|i8 : MS = prune pushForward(p, coker FF.dd_6);                     |
+-------------------------------------------------------------------+
|i9 : T = exteriorTorModule(f,MS);                                  |
+-------------------------------------------------------------------+
|i10 : betti T                                                      |
|                                                                   |
|              0   1                                                |
|o10 = total: 84 252                                                |
|          0: 13  39                                                |
|          1: 33  99                                                |
|          2: 29  87                                                |
|          3:  9  27                                                |
|                                                                   |
|o10 : BettiTally                                                   |
+-------------------------------------------------------------------+
|i11 : betti res (PT = prune T)                                     |
|                                                                   |
|              0  1  2   3   4                                      |
|o11 = total: 31 55 87 127 175                                      |
|          0: 13 24 39  58  81                                      |
|          1: 18 31 48  69  94                                      |
|                                                                   |
|o11 : BettiTally                                                   |
+-------------------------------------------------------------------+
|i12 : ann PT                                                       |
|                                                                   |
|o12 = ideal(e e e )                                                |
|             0 1 2                                                 |
|                                                                   |
|o12 : Ideal of kk[e ..e ]                                          |
|                   0   2                                           |
+-------------------------------------------------------------------+
|i13 : PT0 = image (inducedMap(PT,cover PT)* ((cover PT)_{0..12})); |
+-------------------------------------------------------------------+
|i14 : PT1 = image (inducedMap(PT,cover PT)* ((cover PT)_{13..30}));|
+-------------------------------------------------------------------+
|i15 : betti res prune PT0                                          |
|                                                                   |
|              0  1  2  3  4                                        |
|o15 = total: 13 24 39 58 81                                        |
|          0: 13 24 39 58 81                                        |
|                                                                   |
|o15 : BettiTally                                                   |
+-------------------------------------------------------------------+
|i16 : betti res prune PT1                                          |
|                                                                   |
|              0  1  2  3  4                                        |
|o16 = total: 18 28 39 51 64                                        |
|          1: 18 28 39 51 64                                        |
|                                                                   |
|o16 : BettiTally                                                   |
+-------------------------------------------------------------------+
|i17 : betti res prune PT                                           |
|                                                                   |
|              0  1  2   3   4                                      |
|o17 = total: 31 55 87 127 175                                      |
|          0: 13 24 39  58  81                                      |
|          1: 18 31 48  69  94                                      |
|                                                                   |
|o17 : BettiTally                                                   |
+-------------------------------------------------------------------+

See also
========

  * makeModule -- makes a Module out of a collection of
    modules and maps

Ways to use exteriorTorModule:
==============================

  * "exteriorTorModule(Matrix,Module)"
  * "exteriorTorModule(Matrix,Module,Module)"

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

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

extIsOnePolynomial -- check whether the Hilbert function of Ext(M,k) is one polynomial
**************************************************************************************

Synopsis
========

  * Usage:
        (p,t) = extIsOnePolynomial M
  * Inputs:
      * M, a module (Macaulay2Doc), module over a complete
        intersection
  * Outputs:
      * p, a ring element (Macaulay2Doc), p(z)=pe(z/2),
        where pe is the Hilbert poly of Ext^{even}(M,k)
      * t, a Boolean value (Macaulay2Doc), true if the even and
        odd polynomials match to form one polynomial

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

Computes the Hilbert polynomials pe(z), po(z) of evenExtModule and
oddExtModule. It returns pe(z/2), and compares to see whether this is equal to
po(z/2-1/2). Avramov, Seceleanu and Zheng have proven that if the ideal of
quadratic leading forms of a complete intersection of codimension c generate an
ideal of codimension at least c-1, then the Betti numbers of any module grow,
eventually, as a single polynomial (instead of requiring separate polynomials
for even and odd terms.) This script checks the result in the homogeneous case
(in which case the condition is necessary and sufficient.)

+--------------------------------------------------------+
|i1 : R1=ZZ/101[a,b,c]/ideal(a^2,b^2,c^5)                |
|                                                        |
|o1 = R1                                                 |
|                                                        |
|o1 : QuotientRing                                       |
+--------------------------------------------------------+
|i2 : R2=ZZ/101[a,b,c]/ideal(a^3,b^3)                    |
|                                                        |
|o2 = R2                                                 |
|                                                        |
|o2 : QuotientRing                                       |
+--------------------------------------------------------+
|i3 : extIsOnePolynomial coker random(R1^{0,1},R1^{3:-1})|
|                                                        |
|      1 2   1                                           |
|o3 = (-z  - -z + 3, true)                               |
|      2     2                                           |
|                                                        |
|o3 : Sequence                                           |
+--------------------------------------------------------+
|i4 : extIsOnePolynomial coker random(R2^{0,1},R2^{3:-1})|
|                                                        |
|o4 = (3z - 2, false)                                    |
|                                                        |
|o4 : Sequence                                           |
+--------------------------------------------------------+

See also
========

  * evenExtModule -- even part of Ext^*(M,k) over a
    complete intersection as module over CI operator ring
  * oddExtModule -- odd part of Ext^*(M,k) over a complete
    intersection as module over CI operator ring

Ways to use extIsOnePolynomial:
===============================

  * "extIsOnePolynomial(Module)"

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

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

ExtModule -- Ext^*(M,k) over a complete intersection as module over CI operator ring
************************************************************************************

Synopsis
========

  * Usage:
        E = ExtModule M
  * Inputs:
      * M, a module (Macaulay2Doc), over a complete intersection
        ring
  * Outputs:
      * E, a module (Macaulay2Doc), over a polynomial ring with
        gens in even degree

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

Uses code of Avramov-Grayson described in Macaulay2 book

+----------------------------------------------------------+
|i1 : kk= ZZ/101                                           |
|                                                          |
|o1 = kk                                                   |
|                                                          |
|o1 : QuotientRing                                         |
+----------------------------------------------------------+
|i2 : S = kk[x,y,z]                                        |
|                                                          |
|o2 = S                                                    |
|                                                          |
|o2 : PolynomialRing                                       |
+----------------------------------------------------------+
|i3 : I1 = ideal "x3y"                                     |
|                                                          |
|            3                                             |
|o3 = ideal(x y)                                           |
|                                                          |
|o3 : Ideal of S                                           |
+----------------------------------------------------------+
|i4 : R1 = S/I1                                            |
|                                                          |
|o4 = R1                                                   |
|                                                          |
|o4 : QuotientRing                                         |
+----------------------------------------------------------+
|i5 : M1 = R1^1/ideal(x^2)                                 |
|                                                          |
|o5 = cokernel | x2 |                                      |
|                                                          |
|                              1                           |
|o5 : R1-module, quotient of R1                            |
+----------------------------------------------------------+
|i6 : betti res (M1, LengthLimit =>5)                      |
|                                                          |
|            0 1 2 3 4 5                                   |
|o6 = total: 1 1 1 1 1 1                                   |
|         0: 1 . . . . .                                   |
|         1: . 1 . . . .                                   |
|         2: . . 1 . . .                                   |
|         3: . . . 1 . .                                   |
|         4: . . . . 1 .                                   |
|         5: . . . . . 1                                   |
|                                                          |
|o6 : BettiTally                                           |
+----------------------------------------------------------+
|i7 : E = ExtModule M1                                     |
|                                                          |
|             2                                            |
|o7 = (kk[X ])                                             |
|          0                                               |
|                                                          |
|o7 : kk[X ]-module, free, degrees {0..1}                  |
|         0                                                |
+----------------------------------------------------------+
|i8 : apply(toList(0..10), i->hilbertFunction(i, E))       |
|                                                          |
|o8 = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}                    |
|                                                          |
|o8 : List                                                 |
+----------------------------------------------------------+
|i9 : Eeven = evenExtModule(M1)                            |
|                                                          |
|             1                                            |
|o9 = (kk[X ])                                             |
|          0                                               |
|                                                          |
|o9 : kk[X ]-module, free                                  |
|         0                                                |
+----------------------------------------------------------+
|i10 : apply(toList(0..5), i->hilbertFunction(i, Eeven))   |
|                                                          |
|o10 = {1, 1, 1, 1, 1, 1}                                  |
|                                                          |
|o10 : List                                                |
+----------------------------------------------------------+
|i11 : Eodd = oddExtModule(M1)                             |
|                                                          |
|              1                                           |
|o11 = (kk[X ])                                            |
|           0                                              |
|                                                          |
|o11 : kk[X ]-module, free                                 |
|          0                                               |
+----------------------------------------------------------+
|i12 : apply(toList(0..5), i->hilbertFunction(i, Eodd))    |
|                                                          |
|o12 = {1, 1, 1, 1, 1, 1}                                  |
|                                                          |
|o12 : List                                                |
+----------------------------------------------------------+
|i13 : use S                                               |
|                                                          |
|o13 = S                                                   |
|                                                          |
|o13 : PolynomialRing                                      |
+----------------------------------------------------------+
|i14 : I2 = ideal"x3,yz"                                   |
|                                                          |
|              3                                           |
|o14 = ideal (x , y*z)                                     |
|                                                          |
|o14 : Ideal of S                                          |
+----------------------------------------------------------+
|i15 : R2 = S/I2                                           |
|                                                          |
|o15 = R2                                                  |
|                                                          |
|o15 : QuotientRing                                        |
+----------------------------------------------------------+
|i16 : M2 = R2^1/ideal"x2,y,z"                             |
|                                                          |
|o16 = cokernel | x2 y z |                                 |
|                                                          |
|                               1                          |
|o16 : R2-module, quotient of R2                           |
+----------------------------------------------------------+
|i17 : betti res (M2, LengthLimit =>10)                    |
|                                                          |
|             0 1 2 3 4  5  6  7  8  9 10                  |
|o17 = total: 1 3 5 7 9 11 13 15 17 19 21                  |
|          0: 1 2 2 2 2  2  2  2  2  2  2                  |
|          1: . 1 3 4 4  4  4  4  4  4  4                  |
|          2: . . . 1 3  4  4  4  4  4  4                  |
|          3: . . . . .  1  3  4  4  4  4                  |
|          4: . . . . .  .  .  1  3  4  4                  |
|          5: . . . . .  .  .  .  .  1  3                  |
|                                                          |
|o17 : BettiTally                                          |
+----------------------------------------------------------+
|i18 : E = ExtModule M2                                    |
|                                                          |
|                  8                                       |
|o18 = (kk[X ..X ])                                        |
|           0   1                                          |
|                                                          |
|o18 : kk[X ..X ]-module, free, degrees {0..1, 2:1, 3:2, 3}|
|          0   1                                           |
+----------------------------------------------------------+
|i19 : apply(toList(0..10), i->hilbertFunction(i, E))      |
|                                                          |
|o19 = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21}             |
|                                                          |
|o19 : List                                                |
+----------------------------------------------------------+
|i20 : Eeven = evenExtModule M2                            |
|                                                          |
|                  4                                       |
|o20 = (kk[X ..X ])                                        |
|           0   1                                          |
|                                                          |
|o20 : kk[X ..X ]-module, free, degrees {0..1, 2:1}        |
|          0   1                                           |
+----------------------------------------------------------+
|i21 : apply(toList(0..5), i->hilbertFunction(i, Eeven))   |
|                                                          |
|o21 = {1, 5, 9, 13, 17, 21}                               |
|                                                          |
|o21 : List                                                |
+----------------------------------------------------------+
|i22 : Eodd = oddExtModule M2                              |
|                                                          |
|                  4                                       |
|o22 = (kk[X ..X ])                                        |
|           0   1                                          |
|                                                          |
|o22 : kk[X ..X ]-module, free, degrees {3:0, 1}           |
|          0   1                                           |
+----------------------------------------------------------+
|i23 : apply(toList(0..5), i->hilbertFunction(i, Eodd))    |
|                                                          |
|o23 = {3, 7, 11, 15, 19, 23}                              |
|                                                          |
|o23 : List                                                |
+----------------------------------------------------------+

See also
========

  * evenExtModule -- even part of Ext^*(M,k) over a
    complete intersection as module over CI operator ring
  * oddExtModule -- odd part of Ext^*(M,k) over a complete
    intersection as module over CI operator ring

Ways to use ExtModule:
======================

  * "ExtModule(Module)"

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

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

ExtModuleData -- Even and odd Ext modules and their regularity
**************************************************************

Synopsis
========

  * Usage:
        L = ExtModuleData M
  * Inputs:
      * M, a module (Macaulay2Doc), Module over a complete
        intersection S
  * Outputs:
      * L, a list (Macaulay2Doc), L = \{evenExtModule,
        oddExtModule, reg0, reg1\}

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

Suppose that M is a module over a complete intersection R so that

E := ExtModule M

is a module generated in degrees >=0 over a polynomial ring T' generated in
degree 2, and

E0 := evenExtModule M and E1 := oddExtModule M

are modules generated in degree >= 0 over a polynomial ring T with generators
in degree 1.

The script returns

L = \{E0,E1, regularity E0, regularity E1\}

and prints a message if |reg0-reg1|>1.

If we set r = max(2*reg0, 1+2*reg1), and F is a resolution of M, then coker
F.dd_{(r+1)} is the first szygy module of M such that regularity evenExtModule
M =0 AND regularity oddExtModule M =0

We have been using regularity ExtModule M as a substitute for r, but that's not
always the same.

The regularities of the even and odd Ext modules *can* differ by more than 1.
An example can be produced with setRandomSeed 0 S = ZZ/101[a,b,c,d] ff
=matrix"a4,b4,c4,d4" R = S/ideal ff N = coker random(R^{0,1}, R^{ -1,-2,-3,-4})
--gives reg Ext^even = 4, reg Ext^odd = 3 L = ExtModuleData N; but takes some
time to compute.

+------------------------------------------------+
|i1 : setRandomSeed 100                          |
|                                                |
|o1 = 100                                        |
+------------------------------------------------+
|i2 : S = ZZ/101[a,b,c,d];                       |
+------------------------------------------------+
|i3 : f = map(S^1, S^4, (i,j) -> S_j^3)          |
|                                                |
|o3 = | a3 b3 c3 d3 |                            |
|                                                |
|             1      4                           |
|o3 : Matrix S  <-- S                            |
+------------------------------------------------+
|i4 : R = S/ideal f;                             |
+------------------------------------------------+
|i5 : M = R^1/ideal"ab2+cd2";                    |
+------------------------------------------------+
|i6 : betti (F = res(M, LengthLimit => 5))       |
|                                                |
|            0 1 2  3  4  5                      |
|o6 = total: 1 1 5 16 35 64                      |
|         0: 1 . .  .  .  .                      |
|         1: . . .  .  .  .                      |
|         2: . 1 .  .  .  .                      |
|         3: . . 1  .  .  .                      |
|         4: . . 3  8  5  .                      |
|         5: . . 1  8 25 32                      |
|         6: . . .  .  5 32                      |
|                                                |
|o6 : BettiTally                                 |
+------------------------------------------------+
|i7 : E = ExtModuleData M;                       |
+------------------------------------------------+
|i8 : E_2                                        |
|                                                |
|o8 = 2                                          |
+------------------------------------------------+
|i9 : E_3                                        |
|                                                |
|o9 = 1                                          |
+------------------------------------------------+
|i10 : r = max(2*E_2,2*E_3+1)                    |
|                                                |
|o10 = 4                                         |
+------------------------------------------------+
|i11 : Er = ExtModuleData coker F.dd_r;          |
+------------------------------------------------+
|i12 : regularity Er_0                           |
|                                                |
|o12 = 0                                         |
+------------------------------------------------+
|i13 : regularity Er_1                           |
|                                                |
|o13 = 0                                         |
+------------------------------------------------+
|i14 : regularity evenExtModule(coker F.dd_(r-1))|
|                                                |
|o14 = 1                                         |
+------------------------------------------------+
|i15 : ff = f*random(source f, source f);        |
|                                                |
|              1      4                          |
|o15 : Matrix S  <-- S                           |
+------------------------------------------------+
|i16 : matrixFactorization(ff, coker F.dd_(r+1));|
+------------------------------------------------+

This succeeds, but we could get an error from

matrixFactorization(ff, coker F.dd_r)

if one of the CI operators were not surjective.

Caveat
======

ExtModule creates a ring inside the script, so if it's run twice you get
modules over different rings. This should be changed.

See also
========

  * ExtModule -- Ext^*(M,k) over a complete intersection as
    module over CI operator ring
  * evenExtModule -- even part of Ext^*(M,k) over a
    complete intersection as module over CI operator ring
  * oddExtModule -- odd part of Ext^*(M,k) over a complete
    intersection as module over CI operator ring

Ways to use ExtModuleData:
==========================

  * "ExtModuleData(Module)"

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

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

extVsCohomology -- compares Ext_S(M,k) as exterior module with coh table of sheaf Ext_R(M,k)
********************************************************************************************

Synopsis
========

  * Usage:
        (E,T) = extVsCohomology(ff,N)
  * Inputs:
      * ff, a matrix (Macaulay2Doc), regular sequence in a
        regular ring S
      * N, a module (Macaulay2Doc), graded module over R =
        S/ideal(ff) (usually a high syzygy)
  * Outputs:
      * E, a module (Macaulay2Doc),
      * T, a module (Macaulay2Doc), Ext and Tor as exterior
        modules

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

Given a matrix ff containing a regular sequence in a polynomial ring S over k,
set R = S/(ideal ff). If N is a graded R-module, and M is the module N regarded
as an S-module, the script returns E = Ext_S(M,k) and T = Tor^S(M,k) as modules
over an exterior algebra.

The script prints the Tate resolution of E; and the cohomology table of the
sheaf associated to Ext_R(N,k) over the ring of CI operators, which is a
polynomial ring over k on c variables.

The output can be used to (sometimes) check whether the submodule of Ext_S(M,k)
generated in degree 0 splits (as an exterior module

+-------------------------------------------------------------+
|i1 : S = ZZ/101[a,b,c]                                       |
|                                                             |
|o1 = S                                                       |
|                                                             |
|o1 : PolynomialRing                                          |
+-------------------------------------------------------------+
|i2 : ff = matrix "a2,b2,c2"                                  |
|                                                             |
|o2 = | a2 b2 c2 |                                            |
|                                                             |
|             1      3                                        |
|o2 : Matrix S  <-- S                                         |
+-------------------------------------------------------------+
|i3 : R = S/(ideal ff)                                        |
|                                                             |
|o3 = R                                                       |
|                                                             |
|o3 : QuotientRing                                            |
+-------------------------------------------------------------+
|i4 : N = highSyzygy(R^1/ideal(a*b,c))                        |
|                                                             |
|o4 = cokernel {4} | c -ab 0 0 0  0  0  0 0 0 0  0 0  0  0 0 ||
|              {5} | 0 c   b a 0  0  0  0 0 0 0  0 0  0  0 0 ||
|              {5} | 0 0   c 0 -b a  0  0 0 0 0  0 0  0  0 0 ||
|              {5} | 0 0   0 c 0  -b -a 0 0 0 0  0 0  0  0 0 ||
|              {5} | 0 0   0 0 c  0  0  b a 0 0  0 0  0  0 0 ||
|              {5} | 0 0   0 0 0  c  0  0 b 0 0  0 -a 0  0 0 ||
|              {5} | 0 0   0 0 0  0  c  0 0 0 0  0 b  0  a 0 ||
|              {5} | 0 0   0 0 0  0  0  c 0 b -a 0 0  0  0 0 ||
|              {5} | 0 0   0 0 0  0  0  0 c 0 b  a 0  0  0 0 ||
|              {5} | 0 0   0 0 0  0  0  0 0 0 0  b c  -a 0 0 ||
|              {5} | 0 0   0 0 0  0  0  0 0 0 0  0 0  b  c a ||
|                                                             |
|                            11                               |
|o4 : R-module, quotient of R                                 |
+-------------------------------------------------------------+
|i5 : E = extVsCohomology(ff,highSyzygy N);                   |
|Tate Resolution of Ext_S(M,k) as exterior module:            |
|Note that maps go left to right                              |
|       -11 -10  -9 -8 -7 -6 -5 -4 -3 -2  -1                  |
|total: 198 146 102 66 38 18  9 16 36 64 100                  |
|    8: 106  79  56 37 22 11  4  1  1  1   1                  |
|    9:  92  67  46 29 16  7  2  .  .  .   .                  |
|   10:   .   .   .  .  .  .  .  5 14 27  44                  |
|   11:   .   .   .  .  .  .  3 10 21 36  55                  |
|---                                                          |
|Cohomology table of evenExtModule M:                         |
|   -5 -4 -3 -2 -1  0  1  2  3  4   5                         |
|2: 36 21 10  3  .  .  .  .  .  .   .                         |
|1:  .  .  .  .  .  .  .  .  .  .   .                         |
|0:  1  1  1  2  7 16 29 46 67 92 121                         |
|---                                                          |
|Cohomology table of oddExtModule M:                          |
|   -5 -4 -3 -2 -1  0  1  2  3   4   5                        |
|2: 28 15  6  1  .  .  .  .  .   .   .                        |
|1:  .  .  .  .  .  .  .  .  .   .   .                        |
|0:  1  1  1  4 11 22 37 56 79 106 137                        |
+-------------------------------------------------------------+

See also
========

  * highSyzygy -- Returns a syzygy module one beyond the
    regularity of Ext(M,k)
  * exteriorExtModule -- Ext(M,k) or Ext(M,N) as a
    module over an exterior algebra

Ways to use extVsCohomology:
============================

  * "extVsCohomology(Matrix,Module)"

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

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

finiteBettiNumbers -- betti numbers of finite resolution computed from a matrix factorization
*********************************************************************************************

Synopsis
========

  * Usage:
        L = finiteBettiNumbers MF
  * Inputs:
      * MF, a list (Macaulay2Doc), List of HashTables as computed
        by "matrixFactorization"
  * Outputs:
      * L, a list (Macaulay2Doc), List of betti numbers

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

Uses the ranks of the B matrices in a matrix factorization for a module M over
S/(f_1,..,f_c) to compute the betti numbers of the minimal resolution of M over
S, which is the sum of the Koszul complexes K(f_1..f_{j-1}) tensored with B(j)

+---------------------------------------+
|i1 : setRandomSeed 0                   |
|                                       |
|o1 = 0                                 |
+---------------------------------------+
|i2 : kk = ZZ/101                       |
|                                       |
|o2 = kk                                |
|                                       |
|o2 : QuotientRing                      |
+---------------------------------------+
|i3 : S = kk[a,b,u,v]                   |
|                                       |
|o3 = S                                 |
|                                       |
|o3 : PolynomialRing                    |
+---------------------------------------+
|i4 : ff = matrix"au,bv"                |
|                                       |
|o4 = | au bv |                         |
|                                       |
|             1      2                  |
|o4 : Matrix S  <-- S                   |
+---------------------------------------+
|i5 : R = S/ideal ff                    |
|                                       |
|o5 = R                                 |
|                                       |
|o5 : QuotientRing                      |
+---------------------------------------+
|i6 : M0 = R^1/ideal"a,b"               |
|                                       |
|o6 = cokernel | a b |                  |
|                                       |
|                            1          |
|o6 : R-module, quotient of R           |
+---------------------------------------+
|i7 : F = res(M0, LengthLimit =>3)      |
|                                       |
|      1      2      3      4           |
|o7 = R  <-- R  <-- R  <-- R            |
|                                       |
|     0      1      2      3            |
|                                       |
|o7 : ChainComplex                      |
+---------------------------------------+
|i8 : M = coker F.dd_3;                 |
+---------------------------------------+
|i9 : MF = matrixFactorization(ff,M);   |
+---------------------------------------+
|i10 : betti res pushForward(map(R,S),M)|
|                                       |
|             0 1 2                     |
|o10 = total: 3 5 2                     |
|          2: 3 4 .                     |
|          3: . 1 2                     |
|                                       |
|o10 : BettiTally                       |
+---------------------------------------+
|i11 : finiteBettiNumbers MF            |
|                                       |
|o11 = {3, 5, 2}                        |
|                                       |
|o11 : List                             |
+---------------------------------------+
|i12 : infiniteBettiNumbers(MF,5)       |
|                                       |
|o12 = {3, 4, 5, 6, 7, 8}               |
|                                       |
|o12 : List                             |
+---------------------------------------+
|i13 : betti res (M, LengthLimit => 5)  |
|                                       |
|             0 1 2 3 4 5               |
|o13 = total: 3 4 5 6 7 8               |
|          2: 3 4 5 6 7 8               |
|                                       |
|o13 : BettiTally                       |
+---------------------------------------+

See also
========

  * matrixFactorization -- Maps in a higher
    codimension matrix factorization
  * infiniteBettiNumbers -- betti numbers of
    finite resolution computed from a matrix factorization

Ways to use finiteBettiNumbers:
===============================

  * "finiteBettiNumbers(List)"

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

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

freeExteriorSummand -- find the free summands of a module over an exterior algebra
**********************************************************************************

Synopsis
========

  * Usage:
        F = freeExteriorSummand M
  * Inputs:
      * M, a module (Macaulay2Doc), over an exterior algebra
  * Outputs:
      * F, a matrix (Macaulay2Doc), Map from a free module to M.
        Image is the largest free summand

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

+---------------------------------------------------+
|i1 : kk= ZZ/101                                    |
|                                                   |
|o1 = kk                                            |
|                                                   |
|o1 : QuotientRing                                  |
+---------------------------------------------------+
|i2 : E = kk[e,f,g, SkewCommutative => true]        |
|                                                   |
|o2 = E                                             |
|                                                   |
|o2 : PolynomialRing, 3 skew commutative variable(s)|
+---------------------------------------------------+
|i3 : M = E^1++module ideal vars E++E^{-1}          |
|                                                   |
|o3 = image {0} | 1 0 0 0 0 |                       |
|           {0} | 0 e f g 0 |                       |
|           {1} | 0 0 0 0 1 |                       |
|                                                   |
|                             3                     |
|o3 : E-module, submodule of E                      |
+---------------------------------------------------+
|i4 : freeExteriorSummand M                         |
|                                                   |
|o4 = {0} | 1 0 |                                   |
|     {1} | 0 0 |                                   |
|     {1} | 0 0 |                                   |
|     {1} | 0 0 |                                   |
|     {1} | 0 1 |                                   |
|                                                   |
|                   2                               |
|o4 : Matrix M <-- E                                |
+---------------------------------------------------+

Ways to use freeExteriorSummand:
================================

  * "freeExteriorSummand(Module)"

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

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

Grading -- Option for EisenbudShamashTotal, newExt
**************************************************

Synopsis
========

  * Usage:
        EisenbudShamashTotal(Mbar,Grading => 2)
  * Inputs:
      * Check, an integer (Macaulay2Doc),

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

if Grading =>1, then the output is converted to single-grading, useful in the
package Clifford

See also
========

  * EisenbudShamashTotal -- Precursor complex of
    total Ext
  * newExt -- Global Ext for modules over a complete
    Intersection

Functions with optional argument named Grading:
===============================================

  * "EisenbudShamashTotal(...,Grading=>...)" -- see EisenbudShamashTotal,
    -- Precursor complex of total Ext
  * "newExt(...,Grading=>...)" -- see newExt, -- Global Ext for
    modules over a complete Intersection

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

The object Grading, is a symbol (Macaulay2Doc).

hf -- Computes the hilbert function in a range of degrees
*********************************************************

Synopsis
========

  * Usage:
        H = hf(s,P)
  * Inputs:
      * s, a sequence (Macaulay2Doc), or List
      * P, a module (Macaulay2Doc), graded module
  * Outputs:
      * H, a list (Macaulay2Doc),

Ways to use hf:
===============

  * "hf(List,Module)"
  * "hf(Sequence,Module)"

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

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

hfModuleAsExt -- predict betti numbers of moduleAsExt(M,R)
**********************************************************

Synopsis
========

  * Usage:
        seq = hfModuleAsExt(numValues,M,numgensR)
  * Inputs:
      * numValues, an integer (Macaulay2Doc), number of values to
        compute
      * M, a module (Macaulay2Doc), module over the ring of
        operators
      * numgensR, an integer (Macaulay2Doc), number of generators of
        the target ring
  * Outputs:
      * seq, a sequence (Macaulay2Doc), sequence of numValues
        integers, the expected total Betti numbers

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

Given a module M over the ring of operators $k[x_1..x_c]$, the call $N =
moduleAsExt(M,R)$ produces a module N over the ring R whose ext module is the
exterior algebra on n=numgensR generators tensored with M. This script computes
numValues values of the Hilbert function of $$ M \otimes \wedge k^n, $$ which
should be equal to the total betti numbers of N.

+---------------------------------------------+
|i1 : kk = ZZ/101;                            |
+---------------------------------------------+
|i2 : S = kk[a,b,c];                          |
+---------------------------------------------+
|i3 : ff = matrix{{a^4, b^4,c^4}};            |
|                                             |
|             1      3                        |
|o3 : Matrix S  <-- S                         |
+---------------------------------------------+
|i4 : R = S/ideal ff;                         |
+---------------------------------------------+
|i5 : Ops = kk[x_1,x_2,x_3];                  |
+---------------------------------------------+
|i6 : MM = Ops^1/(x_1*ideal(x_2^2,x_3));      |
+---------------------------------------------+
|i7 : N = moduleAsExt(MM,R);                  |
+---------------------------------------------+
|i8 : betti res( N, LengthLimit => 10)        |
|                                             |
|             0  1  2  3  4  5  6  7  8  9 10 |
|o8 = total: 36 27 29 31 33 35 37 39 41 43 45 |
|        -6: 18  6  .  .  .  .  .  .  .  .  . |
|        -5:  .  .  .  .  .  .  .  .  .  .  . |
|        -4: 18 21 21  7  .  .  .  .  .  .  . |
|        -3:  .  .  .  .  .  .  .  .  .  .  . |
|        -2:  .  .  8 24 24  8  .  .  .  .  . |
|        -1:  .  .  .  .  .  .  .  .  .  .  . |
|         0:  .  .  .  .  9 27 27  9  .  .  . |
|         1:  .  .  .  .  .  .  .  .  .  .  . |
|         2:  .  .  .  .  .  . 10 30 30 10  . |
|         3:  .  .  .  .  .  .  .  .  .  .  . |
|         4:  .  .  .  .  .  .  .  . 11 33 33 |
|         5:  .  .  .  .  .  .  .  .  .  .  . |
|         6:  .  .  .  .  .  .  .  .  .  . 12 |
|                                             |
|o8 : BettiTally                              |
+---------------------------------------------+
|i9 : hfModuleAsExt(12,MM,3)                  |
|                                             |
|o9 = (23, 25, 27, 29, 31, 33, 35, 37, 39, 41)|
|                                             |
|o9 : Sequence                                |
+---------------------------------------------+

See also
========

  * moduleAsExt -- Find a module with given asymptotic
    resolution

Ways to use hfModuleAsExt:
==========================

  * "hfModuleAsExt(ZZ,Module,ZZ)"

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

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

highSyzygy -- Returns a syzygy module one beyond the regularity of Ext(M,k)
***************************************************************************

Synopsis
========

  * Usage:
        M = highSyzygy M0
  * Inputs:
      * M0, a module (Macaulay2Doc), over a complete intersection
        ring
  * Optional inputs (Macaulay2Doc),:
      * Optimism => ..., default value 0
  * Outputs:
      * M, a module (Macaulay2Doc), a syzygy module of M0

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

A "high syzygy" over a complete intersection is one such that general
ci-operators have split kernels when applied recursively on cosyzygy chains of
previous kernels.

If p = mfBound M0, then highSyzygy M0 returns the p-th syzygy of M0. (if F is a
resolution of M this is the cokernel of F.dd_{p+1}). Optimism => r as optional
argument, highSyzygy(M0,Optimism=>r) returns the (p-r)-th syzygy. The script is
useful with matrixFactorization(ff, highSyzygy M0).

+-----------------------------------------------------------+
|i1 : setRandomSeed 100                                     |
|                                                           |
|o1 = 100                                                   |
+-----------------------------------------------------------+
|i2 : S = ZZ/101[x,y,z]                                     |
|                                                           |
|o2 = S                                                     |
|                                                           |
|o2 : PolynomialRing                                        |
+-----------------------------------------------------------+
|i3 : f = matrix"x3,y3+x3,z3+x3+y3"                         |
|                                                           |
|o3 = | x3 x3+y3 x3+y3+z3 |                                 |
|                                                           |
|             1      3                                      |
|o3 : Matrix S  <-- S                                       |
+-----------------------------------------------------------+
|i4 : ff = f*random(source f, source f)                     |
|                                                           |
|o4 = | 10x3-22y3-4z3 -20x3-20y3-6z3 -27x3-41y3+z3 |        |
|                                                           |
|             1      3                                      |
|o4 : Matrix S  <-- S                                       |
+-----------------------------------------------------------+
|i5 : R = S/ideal f                                         |
|                                                           |
|o5 = R                                                     |
|                                                           |
|o5 : QuotientRing                                          |
+-----------------------------------------------------------+
|i6 : M0 = R^1/ideal"x2z2,xyz"                              |
|                                                           |
|o6 = cokernel | x2z2 xyz |                                 |
|                                                           |
|                            1                              |
|o6 : R-module, quotient of R                               |
+-----------------------------------------------------------+
|i7 : betti res (M0, LengthLimit => 7)                      |
|                                                           |
|            0 1 2  3  4  5  6  7                           |
|o7 = total: 1 2 6 11 18 26 36 47                           |
|         0: 1 . .  .  .  .  .  .                           |
|         1: . . .  .  .  .  .  .                           |
|         2: . 1 .  .  .  .  .  .                           |
|         3: . 1 6  6  .  .  .  .                           |
|         4: . . .  5 18 14  .  .                           |
|         5: . . .  .  . 12 36 25                           |
|         6: . . .  .  .  .  . 22                           |
|                                                           |
|o7 : BettiTally                                            |
+-----------------------------------------------------------+
|i8 : mfBound M0                                            |
|                                                           |
|o8 = 3                                                     |
+-----------------------------------------------------------+
|i9 : M = betti res highSyzygy M0                           |
|                                                           |
|             0  1  2  3  4                                 |
|o9 = total: 11 18 26 36 47                                 |
|         6:  6  .  .  .  .                                 |
|         7:  5 18 14  .  .                                 |
|         8:  .  . 12 36 25                                 |
|         9:  .  .  .  . 22                                 |
|                                                           |
|o9 : BettiTally                                            |
+-----------------------------------------------------------+
|i10 : netList BRanks matrixFactorization(ff, highSyzygy M0)|
|                                                           |
|      +-+-+                                                |
|o10 = |6|6|                                                |
|      +-+-+                                                |
|      |3|6|                                                |
|      +-+-+                                                |
|      |2|6|                                                |
|      +-+-+                                                |
+-----------------------------------------------------------+

In this case as in all others we have examined, greater "Optimism" is not
justified, and thus matrixFactorization(ff, highSyzygy(M0, Optimism=>1)); would
produce an error.

Caveat
======

A bug in the total Ext script means that the oddExtModule is sometimes zero,
and this can cause a wrong value to be returned.

See also
========

  * evenExtModule -- even part of Ext^*(M,k) over a
    complete intersection as module over CI operator ring
  * oddExtModule -- odd part of Ext^*(M,k) over a complete
    intersection as module over CI operator ring
  * mfBound -- determines how high a syzygy to take for
    "matrixFactorization"
  * matrixFactorization -- Maps in a higher
    codimension matrix factorization

Ways to use highSyzygy:
=======================

  * "highSyzygy(Module)"

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

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

hMaps -- list the maps  h(p): A_0(p)--> A_1(p) in a matrixFactorization
***********************************************************************

Synopsis
========

  * Usage:
        hMaps = hMaps mf
  * Inputs:
      * mf, a list (Macaulay2Doc), output of a matrixFactorization
        computation
  * Outputs:
      * hMaps, a list (Macaulay2Doc), list matrices $h_p: A_0(p)\to
        A_1(p)$. The sources and targets of these maps have the components
        B_s(p).

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

See the documentation for matrixFactorization for an example.

See also
========

  * matrixFactorization -- Maps in a higher
    codimension matrix factorization
  * dMaps -- list the maps  d(p):A_1(p)--> A_0(p) in a
    matrixFactorization
  * BRanks -- ranks of the modules B_i(d) in a
    matrixFactorization
  * bMaps -- list the maps  d_p:B_1(p)-->B_0(p) in a
    matrixFactorization
  * psiMaps -- list the maps  psi(p): B_1(p) --> A_0(p-1) in a
    matrixFactorization

Ways to use hMaps:
==================

  * "hMaps(List)"

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

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

HomWithComponents -- computes Hom, preserving direct sum information
********************************************************************

Synopsis
========

  * Usage:
        H = Hom(M,N)
  * Inputs:
      * M, a module (Macaulay2Doc),
      * N, a module (Macaulay2Doc),
  * Outputs:
      * H, a module (Macaulay2Doc),

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

If M and/or N are direct sum modules (isDirectSum M == true) then H is the
direct sum of the Homs between the components. This SHOULD be built into
Hom(M,N), but isn't as of M2, v. 1.7

See also
========

  * tensorWithComponents -- forms the tensor
    product, preserving direct sum information
  * dualWithComponents -- dual module preserving
    direct sum information

Ways to use HomWithComponents:
==============================

  * "HomWithComponents(Module,Module)"

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

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

infiniteBettiNumbers -- betti numbers of finite resolution computed from a matrix factorization
***********************************************************************************************

Synopsis
========

  * Usage:
        L = finiteBettiNumbers (MF,len)
  * Inputs:
      * MF, a list (Macaulay2Doc), List of HashTables as computed
        by "matrixFactorization"
      * len, an integer (Macaulay2Doc), length of betti number
        sequence to produce
  * Outputs:
      * L, a list (Macaulay2Doc), List of betti numbers

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

Uses the ranks of the B matrices in a matrix factorization for a module M over
S/(f_1,..,f_c) to compute the betti numbers of the minimal resolution of M over
R, which is the sum of the divided power algebras on c-j+1 variables tensored
with B(j).

+---------------------------------------+
|i1 : setRandomSeed 0                   |
|                                       |
|o1 = 0                                 |
+---------------------------------------+
|i2 : kk = ZZ/101                       |
|                                       |
|o2 = kk                                |
|                                       |
|o2 : QuotientRing                      |
+---------------------------------------+
|i3 : S = kk[a,b,u,v]                   |
|                                       |
|o3 = S                                 |
|                                       |
|o3 : PolynomialRing                    |
+---------------------------------------+
|i4 : ff = matrix"au,bv"                |
|                                       |
|o4 = | au bv |                         |
|                                       |
|             1      2                  |
|o4 : Matrix S  <-- S                   |
+---------------------------------------+
|i5 : R = S/ideal ff                    |
|                                       |
|o5 = R                                 |
|                                       |
|o5 : QuotientRing                      |
+---------------------------------------+
|i6 : M0 = R^1/ideal"a,b"               |
|                                       |
|o6 = cokernel | a b |                  |
|                                       |
|                            1          |
|o6 : R-module, quotient of R           |
+---------------------------------------+
|i7 : F = res(M0, LengthLimit =>3)      |
|                                       |
|      1      2      3      4           |
|o7 = R  <-- R  <-- R  <-- R            |
|                                       |
|     0      1      2      3            |
|                                       |
|o7 : ChainComplex                      |
+---------------------------------------+
|i8 : M = coker F.dd_3;                 |
+---------------------------------------+
|i9 : MF = matrixFactorization(ff,M);   |
+---------------------------------------+
|i10 : betti res pushForward(map(R,S),M)|
|                                       |
|             0 1 2                     |
|o10 = total: 3 5 2                     |
|          2: 3 4 .                     |
|          3: . 1 2                     |
|                                       |
|o10 : BettiTally                       |
+---------------------------------------+
|i11 : finiteBettiNumbers MF            |
|                                       |
|o11 = {3, 5, 2}                        |
|                                       |
|o11 : List                             |
+---------------------------------------+
|i12 : infiniteBettiNumbers(MF,5)       |
|                                       |
|o12 = {3, 4, 5, 6, 7, 8}               |
|                                       |
|o12 : List                             |
+---------------------------------------+
|i13 : betti res (M, LengthLimit => 5)  |
|                                       |
|             0 1 2 3 4 5               |
|o13 = total: 3 4 5 6 7 8               |
|          2: 3 4 5 6 7 8               |
|                                       |
|o13 : BettiTally                       |
+---------------------------------------+

See also
========

  * matrixFactorization -- Maps in a higher
    codimension matrix factorization
  * finiteBettiNumbers -- betti numbers of finite
    resolution computed from a matrix factorization

Ways to use infiniteBettiNumbers:
=================================

  * "infiniteBettiNumbers(List,ZZ)"

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

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

isLinear -- check whether matrix entries have degree 1
******************************************************

Synopsis
========

  * Usage:
        b = isLinear M
  * Inputs:
      * M, a matrix (Macaulay2Doc),
  * Outputs:
      * b, a Boolean value (Macaulay2Doc),

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

Note that a linear matrix, in this sense, can still have different target
degrees (in which case the cokernel decomposes into a direct sum by generator
degree.)

Ways to use isLinear:
=====================

  * "isLinear(Matrix)"

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

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

isQuasiRegular -- tests a matrix or sequence or list for quasi-regularity on a module
*************************************************************************************

Synopsis
========

  * Usage:
        t = isQuasiRegular(ff,M)
  * Inputs:
      * ff, a matrix (Macaulay2Doc),
      * ff, a list (Macaulay2Doc),
      * ff, a sequence (Macaulay2Doc),
      * M, a module (Macaulay2Doc),
  * Outputs:
      * t, a Boolean value (Macaulay2Doc),

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

ff is quasi-regular if the length of ff is <= dim M and the annihilator of ff_i
on M/(ff_0..ff_{(i-1))}M has finite length for all i=0..(length ff)-1.

+-----------------------------------------+
|i1 : kk=ZZ/101;                          |
+-----------------------------------------+
|i2 : S = kk[a,b,c];                      |
+-----------------------------------------+
|i3 : E = S^1/ideal"ab"++S^1/ideal vars S;|
+-----------------------------------------+
|i4 : f1 =matrix"a";                      |
|                                         |
|             1      1                    |
|o4 : Matrix S  <-- S                     |
+-----------------------------------------+
|i5 : f2 =matrix"a+b,c";                  |
|                                         |
|             1      2                    |
|o5 : Matrix S  <-- S                     |
+-----------------------------------------+
|i6 : f3 = matrix"a+b";                   |
|                                         |
|             1      1                    |
|o6 : Matrix S  <-- S                     |
+-----------------------------------------+
|i7 : f4 = matrix"a+b, a2+b";             |
|                                         |
|             1      2                    |
|o7 : Matrix S  <-- S                     |
+-----------------------------------------+
|i8 : isQuasiRegular(f1,E)                |
|                                         |
|o8 = false                               |
+-----------------------------------------+
|i9 : isQuasiRegular(f2,E)                |
|                                         |
|o9 = true                                |
+-----------------------------------------+
|i10 : isQuasiRegular(f3,E)               |
|                                         |
|o10 = true                               |
+-----------------------------------------+
|i11 : isQuasiRegular(f4,E)               |
|                                         |
|o11 = false                              |
+-----------------------------------------+

Ways to use isQuasiRegular:
===========================

  * "isQuasiRegular(List,Module)"
  * "isQuasiRegular(Matrix,Module)"
  * "isQuasiRegular(Sequence,Module)"

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

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

isStablyTrivial -- returns true if the map goes to 0 under stableHom
********************************************************************

Synopsis
========

  * Usage:
        b = isStablyTrivial f
  * Inputs:
      * f, a matrix (Macaulay2Doc), map M to N
  * Outputs:
      * b, a Boolean value (Macaulay2Doc), true iff f factors
        through a projective

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

A possible obstruction to the commutativity of the CI operators in codim c,
even asymptotically, would be the non-triviality of the map M_{(k+4)} --> M_k
\otimes \wedge^2(S^c) in the stable category of maximal Cohen-Macaulay modules.

In the following example, studied in the paper "Tor as a module over an
exterior algebra" of Eisenbud, Peeva and Schreyer, the map is non-trivial...but
it is stably trivial. The same goes for higher values of k (which take longer
to compute). (note that in this case, with c = 3, two of the three alternating
products are actually equal to 0, so we test only the third.)

Note that T is well-defined up to homotopy; so T^2 is well-defined mod mm^2.

+-----------------------------------------------------------------------------+
|i1 : kk = ZZ/101                                                             |
|                                                                             |
|o1 = kk                                                                      |
|                                                                             |
|o1 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i2 : S = kk[a,b,c]                                                           |
|                                                                             |
|o2 = S                                                                       |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : ff = matrix"a2,b2,c2"                                                   |
|                                                                             |
|o3 = | a2 b2 c2 |                                                            |
|                                                                             |
|             1      3                                                        |
|o3 : Matrix S  <-- S                                                         |
+-----------------------------------------------------------------------------+
|i4 : R = S/ideal ff                                                          |
|                                                                             |
|o4 = R                                                                       |
|                                                                             |
|o4 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i5 : M = R^1/ideal"a,bc"                                                     |
|                                                                             |
|o5 = cokernel | a bc |                                                       |
|                                                                             |
|                            1                                                |
|o5 : R-module, quotient of R                                                 |
+-----------------------------------------------------------------------------+
|i6 : k = 1                                                                   |
|                                                                             |
|o6 = 1                                                                       |
+-----------------------------------------------------------------------------+
|i7 : m = k+5                                                                 |
|                                                                             |
|o7 = 6                                                                       |
+-----------------------------------------------------------------------------+
|i8 : F = res(M, LengthLimit => m)                                            |
|                                                                             |
|      1      2      4      7      11      16      22                         |
|o8 = R  <-- R  <-- R  <-- R  <-- R   <-- R   <-- R                           |
|                                                                             |
|     0      1      2      3      4       5       6                           |
|                                                                             |
|o8 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i9 : syzygies = apply(1..m, i->coker F.dd_i);                                |
+-----------------------------------------------------------------------------+
|i10 : t1 = makeT(ff,F,k+4);                                                  |
+-----------------------------------------------------------------------------+
|i11 : t2 = makeT(ff,F,k+2);                                                  |
+-----------------------------------------------------------------------------+
|i12 : T2Components = flatten for i from 0 to 1 list(for j from i+1 to 2 list |
|-----------------------------------------------------------------------------|
|map(F_k, F_(k+4), t2_i*t1_j-t2_j*t1_i));                                     |
+-----------------------------------------------------------------------------+
|i13 : g = map(syzygies_k, syzygies_(k+4), T2Components_2)                    |
|                                                                             |
|o13 = {1} | 0 0 0 0 0 -c 0 0 b 0 0 0 0 0 0 0 |                               |
|      {2} | 0 0 0 0 0 0  0 0 0 0 0 0 0 0 0 0 |                               |
|                                                                             |
|o13 : Matrix                                                                 |
+-----------------------------------------------------------------------------+
|i14 : isStablyTrivial g                                                      |
|                                                                             |
|o14 = true                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * stableHom -- map from Hom(M,N) to the stable Hom module

Ways to use isStablyTrivial:
============================

  * "isStablyTrivial(Matrix)"

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

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

koszulExtension -- creates the Koszul extension complex of a map
****************************************************************

Synopsis
========

  * Usage:
        MM = koszulExtension(FF,BB,psi1,ff)
  * Inputs:
      * FF, a chain complex (Macaulay2Doc), resolution over
        S
      * BB, a chain complex (Macaulay2Doc), two-term
        complex BB_1-->BB_0
      * psi1, a matrix (Macaulay2Doc), from BB_1 to FF_0
      * ff, a matrix (Macaulay2Doc), regular sequence
        annihilating the module resolved by FF
  * Outputs:
      * MM, a chain complex (Macaulay2Doc), the mapping
        cone of the induced map B[-1]\otimes KK(ff) to W extending psi

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

Implements the construction in the paper "Matrix Factorizations in Higher
Codimension" by Eisenbud and Peeva.

See also
========

  * makeFiniteResolution -- finite resolution of a
    matrix factorization module M

Ways to use koszulExtension:
============================

  * "koszulExtension(ChainComplex,ChainComplex,Matrix,Matrix)"

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

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

Layered -- Option for matrixFactorization
*****************************************

Synopsis
========

  * Usage:
        matrixFactorization(ff,m,Layered => true)
  * Inputs:
      * Check, a Boolean value (Macaulay2Doc),

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

Makes matrixFactorization use the "layered" algorithm, which works for any MCM
module, but returns something non-minimal if the module is not a "high syzygy"
in a suitable sense. Default is "true". Note that when the module is a high
syzygy, Layered=> false is much faster.

See also
========

  * matrixFactorization -- Maps in a higher
    codimension matrix factorization

Functions with optional argument named Layered:
===============================================

  * "matrixFactorization(...,Layered=>...)" -- see matrixFactorization,
    -- Maps in a higher codimension matrix factorization

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

The object Layered, is a symbol (Macaulay2Doc).

layeredResolution -- layered finite and infinite layered resolutions of CM modules
**********************************************************************************

Synopsis
========

  * Usage:
        (FF, aug) = layeredResolution(ff,M)
        (FF, aug) = layeredResolution(ff,M,len)
  * Inputs:
      * ff, a matrix (Macaulay2Doc), 1 x c matrix whose entries
        are a regular sequence in the Gorenstein ring S
      * M, a module (Macaulay2Doc), MCM module over R,
        represented as an S-module in the first case and as an R-module in the
        second
      * len, an integer (Macaulay2Doc), length of the segment of the
        resolution to be computed over R, in the second form.
  * Optional inputs (Macaulay2Doc),:
      * Check => ..., default value false
      * Verbose => ..., default value false
  * Outputs:
      * FF, a chain complex (Macaulay2Doc), resolution of M
        over S in the first case; length len segment of the resolution over R
        in the second.

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

The resolutions computed are those described in the paper "Layered Resolutions
of Cohen-Macaulay modules" by Eisenbud and Peeva. They are both minimal when M
is a sufficiently high syzygy of a module N. If the option Verbose=>true is
set, then (in the case of the resolution over S) the ranks of the modules B_s
in the resolution are output.

Here is an example computing 5 terms of an infinite resolution:

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b,c]                                                       |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : ff = matrix"a3, b3, c3"                                                 |
|                                                                             |
|o2 = | a3 b3 c3 |                                                            |
|                                                                             |
|             1      3                                                        |
|o2 : Matrix S  <-- S                                                         |
+-----------------------------------------------------------------------------+
|i3 : R = S/ideal ff                                                          |
|                                                                             |
|o3 = R                                                                       |
|                                                                             |
|o3 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i4 : M = syzygyModule(2,coker vars R)                                        |
|                                                                             |
|o4 = cokernel {2} | a  0 -c2 0   b2 0 0   0  0  0 |                          |
|              {2} | -b 0 0   -c2 0  0 0   a2 0  0 |                          |
|              {2} | c  0 0   0   0  0 -b2 0  a2 0 |                          |
|              {3} | 0  c b   a   0  0 0   0  0  0 |                          |
|              {3} | 0  0 0   0   c  b a   0  0  0 |                          |
|              {3} | 0  0 0   0   0  0 0   c  b  a |                          |
|                                                                             |
|                            6                                                |
|o4 : R-module, quotient of R                                                 |
+-----------------------------------------------------------------------------+
|i5 : (FF, aug) = layeredResolution(ff,M,5)                                   |
|       0 1 2 3 4 5                                                           |
|total: 4 4 4 4 4 4                                                           |
|    2: 3 1 . . . .                                                           |
|    3: 1 3 3 1 . .                                                           |
|    4: . . 1 3 3 1                                                           |
|    5: . . . . 1 3                                                           |
|       0 1 2  3  4  5                                                        |
|total: 5 7 9 11 13 15                                                        |
|    2: 3 1 .  .  .  .                                                        |
|    3: 2 6 6  2  .  .                                                        |
|    4: . . 3  9  9  3                                                        |
|    5: . . .  .  4 12                                                        |
|       0  1  2  3  4  5                                                      |
|total: 6 10 15 21 28 36                                                      |
|    2: 3  1  .  .  .  .                                                      |
|    3: 3  9  9  3  .  .                                                      |
|    4: .  .  6 18 18  6                                                      |
|    5: .  .  .  . 10 30                                                      |
|                                                                             |
|       6      10      15      21      28      36                             |
|o5 = (R  <-- R   <-- R   <-- R   <-- R   <-- R  , {2} | 0 0  0  1 0 0 |)     |
|                                                  {2} | 0 -1 0  0 0 0 |      |
|      0      1       2       3       4       5    {2} | 0 0  -1 0 0 0 |      |
|                                                  {3} | 0 0  0  0 0 1 |      |
|                                                  {3} | 0 0  0  0 1 0 |      |
|                                                  {3} | 1 0  0  0 0 0 |      |
|                                                                             |
|o5 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i6 : betti FF                                                                |
|                                                                             |
|            0  1  2  3  4  5                                                 |
|o6 = total: 6 10 15 21 28 36                                                 |
|         2: 3  1  .  .  .  .                                                 |
|         3: 3  9  9  3  .  .                                                 |
|         4: .  .  6 18 18  6                                                 |
|         5: .  .  .  . 10 30                                                 |
|                                                                             |
|o6 : BettiTally                                                              |
+-----------------------------------------------------------------------------+
|i7 : betti res(M, LengthLimit=>5)                                            |
|                                                                             |
|            0  1  2  3  4  5                                                 |
|o7 = total: 6 10 15 21 28 36                                                 |
|         2: 3  1  .  .  .  .                                                 |
|         3: 3  9  9  3  .  .                                                 |
|         4: .  .  6 18 18  6                                                 |
|         5: .  .  .  . 10 30                                                 |
|                                                                             |
|o7 : BettiTally                                                              |
+-----------------------------------------------------------------------------+
|i8 : C = chainComplex flatten {{aug} |apply(4, i-> FF.dd_(i+1))}             |
|                                                                             |
|            6      10      15      21      28                                |
|o8 = M <-- R  <-- R   <-- R   <-- R   <-- R                                  |
|                                                                             |
|     0     1      2       3       4       5                                  |
|                                                                             |
|o8 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i9 : apply(4, i ->FF.dd_(i+1))                                               |
|                                                                             |
|o9 = {{3} | 0  a -c -b 0  0 0  0 0  0  |, {3} | 0   0  -c2 0 0   0  0   b2 0 |
|      {2} | b  0 a2 0  0  0 0  0 0  c2 |  {4} | 0   0  0   0 0   0  0   0  0 |
|      {2} | -c 0 0  a2 0  0 b2 0 0  0  |  {4} | -c2 0  0   0 0   0  0   0  0 |
|      {2} | a  0 0  0  b2 0 0  0 c2 0  |  {4} | 0   0  0   0 0   0  -b2 0  0 |
|      {3} | 0  0 0  0  c  b a  0 0  0  |  {4} | 0   0  0   0 c2  0  0   -a 0 |
|      {3} | 0  0 0  0  0  0 0  c -b a  |  {4} | 0   0  0   0 0   0  0   0  -a|
|                                          {4} | 0   0  0   0 0   0  a2  c  b |
|                                          {4} | 0   -a 0   b 0   c2 0   0  0 |
|                                          {4} | 0   0  a   c -b2 0  0   0  0 |
|                                          {4} | a2  c  b   0 0   0  0   0  0 |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|     ------------------------------------------------------------------------|
|     0  0  0  0 0 a2 |, {6} | 0  a  -c -b 0  0   0  0 0  0  0  0  0   0  0  0|
|     0  0  a2 c b 0  |  {5} | b  0  a2 0  0  0   0  0 0  c2 0  0  0   0  0  0|
|     0  0  0  a 0 -b |  {5} | -c 0  0  a2 0  0   b2 0 0  0  0  0  0   0  0  0|
|     0  0  0  0 a c  |  {5} | a  0  0  0  b2 0   0  0 c2 0  0  0  0   0  0  0|
|     b  0  0  0 0 0  |  {6} | 0  0  0  0  c  b   a  0 0  0  0  0  0   0  0  0|
|     -c b2 0  0 0 0  |  {6} | 0  0  0  0  0  0   0  c -b a  0  0  0   0  0  0|
|     0  0  0  0 0 0  |  {6} | 0  0  0  0  0  0   0  0 0  0  0  a  -c  -b 0  0|
|     0  0  0  0 0 0  |  {5} | 0  0  0  0  0  0   c2 0 0  0  b  0  a2  0  0  0|
|     0  0  0  0 0 0  |  {5} | 0  0  0  0  0  0   0  0 0  0  -c 0  0   a2 0  0|
|     0  0  0  0 0 0  |  {5} | 0  0  0  0  0  -c2 0  0 0  0  a  0  0   0  b2 0|
|                        {6} | 0  0  0  0  0  0   0  0 0  0  0  0  0   0  c  b|
|                        {6} | 0  0  0  0  0  0   0  0 0  0  0  0  0   0  0  0|
|                        {5} | 0  c2 0  0  0  0   0  0 0  0  0  0  0   0  0  0|
|                        {5} | 0  0  0  0  0  0   0  0 0  0  0  b2 0   0  0  0|
|                        {5} | 0  0  0  c2 0  0   0  0 0  0  0  0  -b2 0  0  0|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|     ------------------------------------------------------------------------|
|     0  0  0 0  0  |, {6} | 0   0  -c2 0 0   0  0   b2 0   0  0  0   0 0   a2|
|     0  0  0 0  0  |  {7} | 0   0  0   0 0   0  0   0  0   0  0  a2  c b   0 |
|     0  0  0 0  0  |  {7} | -c2 0  0   0 0   0  0   0  0   0  0  0   a 0   -b|
|     0  0  0 0  0  |  {7} | 0   0  0   0 0   0  -b2 0  0   0  0  0   0 a   c |
|     0  0  0 0  0  |  {7} | 0   0  0   0 c2  0  0   -a 0   b  0  0   0 0   0 |
|     0  0  0 0  0  |  {7} | 0   0  0   0 0   0  0   0  -a  -c b2 0   0 0   0 |
|     0  0  0 0  0  |  {7} | 0   0  0   0 0   0  a2  c  b   0  0  0   0 0   0 |
|     0  0  0 0  0  |  {7} | 0   -a 0   b 0   c2 0   0  0   0  0  0   0 0   0 |
|     b2 0  0 0  0  |  {7} | 0   0  a   c -b2 0  0   0  0   0  0  0   0 0   0 |
|     0  0  0 0  0  |  {7} | a2  c  b   0 0   0  0   0  0   0  0  0   0 0   0 |
|     a  0  0 0  0  |  {6} | 0   0  0   0 0   0  0   0  -c2 0  0  0   0 0   0 |
|     0  0  a -c -b |  {7} | 0   0  0   0 0   0  0   0  0   0  0  0   0 0   0 |
|     0  b  0 a2 0  |  {7} | 0   0  0   0 0   0  -c2 0  0   0  0  0   0 0   0 |
|     0  -c 0 0  a2 |  {7} | 0   0  0   0 0   0  0   0  0   0  0  0   0 0   0 |
|     0  a  0 0  0  |  {7} | 0   0  0   0 0   0  0   0  0   0  c2 0   0 0   0 |
|                      {7} | 0   0  0   0 0   0  0   0  0   0  0  0   0 0   0 |
|                      {7} | 0   0  0   0 0   0  0   0  0   0  0  0   0 0   0 |
|                      {6} | 0   0  0   0 0   0  0   0  0   0  0  0   0 -c2 0 |
|                      {7} | 0   0  0   0 0   0  0   0  0   0  0  0   0 0   0 |
|                      {7} | 0   0  0   0 0   0  0   0  0   0  0  -c2 0 0   0 |
|                      {7} | 0   0  0   0 0   0  0   0  0   0  0  0   0 0   0 |
|     ------------------------------------------------------------------------|
|     0   0  0  0  0  0   0  0 0  0  0 0 0  |}                                |
|     0   0  0  0  0  0   0  0 0  0  0 0 0  |                                 |
|     0   0  0  0  0  0   0  0 0  0  0 0 0  |                                 |
|     0   0  0  0  0  0   0  0 0  0  0 0 0  |                                 |
|     0   0  0  0  0  0   0  0 0  0  0 0 0  |                                 |
|     0   0  0  0  0  0   0  0 0  0  0 0 0  |                                 |
|     0   0  0  0  0  0   0  0 0  0  0 0 0  |                                 |
|     0   0  0  0  0  0   0  0 0  0  0 0 0  |                                 |
|     0   0  0  0  0  0   0  0 0  0  0 0 0  |                                 |
|     0   0  0  0  0  0   0  0 0  0  0 0 0  |                                 |
|     0   b2 0  0  0  0   0  0 a2 0  0 0 0  |                                 |
|     0   0  0  0  0  a2  c  b 0  0  0 0 0  |                                 |
|     0   0  0  0  0  0   a  0 -b 0  0 0 0  |                                 |
|     -b2 0  0  0  0  0   0  a c  0  0 0 0  |                                 |
|     0   -a 0  b  0  0   0  0 0  0  0 0 0  |                                 |
|     0   0  -a -c b2 0   0  0 0  0  0 0 0  |                                 |
|     a2  c  b  0  0  0   0  0 0  0  0 0 0  |                                 |
|     0   0  0  0  0  0   b2 0 0  0  0 0 a2 |                                 |
|     0   0  0  0  0  0   0  0 0  a2 c b 0  |                                 |
|     0   0  0  0  0  0   0  0 0  0  a 0 -b |                                 |
|     0   0  0  0  0  -b2 0  0 0  0  0 a c  |                                 |
|                                                                             |
|o9 : List                                                                    |
+-----------------------------------------------------------------------------+
|i10 : apply(5, j-> prune HH_j C == 0)                                        |
|                                                                             |
|o10 = {true, true, true, true, true}                                         |
|                                                                             |
|o10 : List                                                                   |
+-----------------------------------------------------------------------------+

And one computing the whole finite resolution:

+----------------------------------------------------------------------------+
|i11 : MS = pushForward(map(R,S), M);                                        |
+----------------------------------------------------------------------------+
|i12 : (GG, aug) = layeredResolution(ff,MS)                                  |
|                                                                            |
|        6      13      10      3                                            |
|o12 = (S  <-- S   <-- S   <-- S , {2} | 0 0  0  1 0 0 |)                    |
|                                  {2} | 0 -1 0  0 0 0 |                     |
|       0      1       2       3   {2} | 0 0  -1 0 0 0 |                     |
|                                  {3} | 0 0  0  0 0 1 |                     |
|                                  {3} | 0 0  0  0 1 0 |                     |
|                                  {3} | 1 0  0  0 0 0 |                     |
|                                                                            |
|o12 : Sequence                                                              |
+----------------------------------------------------------------------------+
|i13 : (GG, aug) = layeredResolution(ff,MS, Verbose =>true)                  |
|{3, 1} in codimension 3                                                     |
|{3, 1} in codimension 2                                                     |
|                                                                            |
|        6      13      10      3                                            |
|o13 = (S  <-- S   <-- S   <-- S , {2} | 0 0  0  1 0 0 |)                    |
|                                  {2} | 0 -1 0  0 0 0 |                     |
|       0      1       2       3   {2} | 0 0  -1 0 0 0 |                     |
|                                  {3} | 0 0  0  0 0 1 |                     |
|                                  {3} | 0 0  0  0 1 0 |                     |
|                                  {3} | 1 0  0  0 0 0 |                     |
|                                                                            |
|o13 : Sequence                                                              |
+----------------------------------------------------------------------------+
|i14 : betti GG                                                              |
|                                                                            |
|             0  1  2 3                                                      |
|o14 = total: 6 13 10 3                                                      |
|          2: 3  1  . .                                                      |
|          3: 3  9  . .                                                      |
|          4: .  .  . .                                                      |
|          5: .  3  9 .                                                      |
|          6: .  .  . .                                                      |
|          7: .  .  1 3                                                      |
|                                                                            |
|o14 : BettiTally                                                            |
+----------------------------------------------------------------------------+
|i15 : betti res MS                                                          |
|                                                                            |
|             0  1  2 3                                                      |
|o15 = total: 6 13 10 3                                                      |
|          2: 3  1  . .                                                      |
|          3: 3  9  . .                                                      |
|          4: .  .  . .                                                      |
|          5: .  3  9 .                                                      |
|          6: .  .  . .                                                      |
|          7: .  .  1 3                                                      |
|                                                                            |
|o15 : BettiTally                                                            |
+----------------------------------------------------------------------------+
|i16 : C = chainComplex flatten {{aug} |apply(length GG -1, i-> GG.dd_(i+1))}|
|                                                                            |
|              6      13      10                                             |
|o16 = MS <-- S  <-- S   <-- S                                               |
|                                                                            |
|      0      1      2       3                                               |
|                                                                            |
|o16 : ChainComplex                                                          |
+----------------------------------------------------------------------------+
|i17 : apply(length GG +1 , j-> prune HH_j C == 0)                           |
|                                                                            |
|o17 = {true, true, true, false}                                             |
|                                                                            |
|o17 : List                                                                  |
+----------------------------------------------------------------------------+

Ways to use layeredResolution:
==============================

  * "layeredResolution(Matrix,Module)"
  * "layeredResolution(Matrix,Module,ZZ)"

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

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

Lift -- Option for newExt
*************************

Synopsis
========

  * Usage:
        newExt(M,N,Check =>true)
  * Inputs:
      * Check, a Boolean value (Macaulay2Doc),

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

Makes newExt perform various checks as it computes.

See also
========

  * newExt -- Global Ext for modules over a complete
    Intersection

Functions with optional argument named Lift:
============================================

  * "newExt(...,Lift=>...)" -- see newExt, -- Global Ext for
    modules over a complete Intersection

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

The object Lift, is a symbol (Macaulay2Doc).

makeFiniteResolution -- finite resolution of a matrix factorization module M
****************************************************************************

Synopsis
========

  * Usage:
        A = makeFiniteResolution(ff,mf)
  * Inputs:
      * mf, a list (Macaulay2Doc), output of matrixFactorization
      * ff, a matrix (Macaulay2Doc), the regular sequence used
        for the matrixFactorization computation
  * Outputs:
      * A, a chain complex (Macaulay2Doc), A is the minimal
        finite resolution of M over R.

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

Suppose that f_1..f_c is a homogeneous regular sequence of forms of the same
degree in a polynomial ring S and M is a high syzygy module over S/(f_1,..,f_c)
= R(c), and mf = (d,h) is the output of matrixFactorization(M,ff). If the
complexity of M is c', then M has a finite free resolution over R =
S/(f_1,..,f_{(c-c')}) (and, more generally, has complexity c-d over
S/(f_1,..,f_{(c-d)}) for d>=c').

The complex A is the minimal finite free resolution of M over A, constructed as
an iterated Koszul extension, made from the maps in bMaps mf and psiMaps mf, as
described in Eisenbud-Peeva.

+-----------------------------------------------------------------------------+
|i1 : setRandomSeed 0                                                         |
|                                                                             |
|o1 = 0                                                                       |
+-----------------------------------------------------------------------------+
|i2 : S = ZZ/101[a,b,c];                                                      |
+-----------------------------------------------------------------------------+
|i3 : ff = matrix"a3,b3";                                                     |
|                                                                             |
|             1      2                                                        |
|o3 : Matrix S  <-- S                                                         |
+-----------------------------------------------------------------------------+
|i4 : R = S/ideal ff;                                                         |
+-----------------------------------------------------------------------------+
|i5 : M = highSyzygy (R^1/ideal vars R);                                      |
+-----------------------------------------------------------------------------+
|i6 : mf = matrixFactorization (ff, M)                                        |
|                                                                             |
|o6 = {{4} | -c b 0  a2 0  0  0  0  0   |, {5} | 0 a2 0  -b 0  0   0   0 0  0 |
|      {4} | a  0 b  0  0  0  0  0  0   |  {5} | 0 0  a2 -c b2 0   0   0 0  0 |
|      {4} | 0  a c  0  0  0  0  0  -b2 |  {5} | 0 0  0  a  0  b2  0   0 0  0 |
|      {3} | 0  0 a2 0  0  b2 0  0  0   |  {6} | a c  -b 0  0  0   0   0 0  0 |
|      {4} | 0  0 0  0  b  -a 0  0  0   |  {5} | 0 0  0  0  0  0   0   a b2 0 |
|      {4} | 0  0 0  0  -c 0  a  b2 0   |  {5} | 0 0  0  0  0  -a2 0   b 0  0 |
|      {4} | 0  0 0  0  0  c  -b 0  a2  |  {5} | 0 0  0  0  0  0   -a2 c 0  0 |
|                                          {6} | 0 0  0  0  0  0   0   0 c  b |
|                                          {6} | 0 0  0  0  a  c   -b  0 0  0 |
|     ------------------------------------------------------------------------|
|     0   |, {3} | 0 0 0  1 0 0 0 |}                                          |
|     0   |  {4} | 0 0 0  0 1 0 0 |                                           |
|     0   |  {4} | 0 0 0  0 0 1 0 |                                           |
|     0   |  {4} | 0 0 0  0 0 0 1 |                                           |
|     0   |  {4} | 0 1 0  0 0 0 0 |                                           |
|     0   |  {4} | 0 0 -1 0 0 0 0 |                                           |
|     -b2 |  {4} | 1 0 0  0 0 0 0 |                                           |
|     a   |                                                                   |
|     0   |                                                                   |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+
|i7 : G = makeFiniteResolution(ff,mf)                                         |
|                                                                             |
|      7      12      5                                                       |
|o7 = S  <-- S   <-- S                                                        |
|                                                                             |
|     0      1       2                                                        |
|                                                                             |
|o7 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i8 : F = res pushForward(map(R,S),M)                                         |
|                                                                             |
|      7      12      5                                                       |
|o8 = S  <-- S   <-- S  <-- 0                                                 |
|                                                                             |
|     0      1       2      3                                                 |
|                                                                             |
|o8 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i9 : G.dd_1                                                                  |
|                                                                             |
|o9 = {4} | -c b 0  a2 0  0  0  0  0   0   0   0   |                          |
|     {4} | a  0 b  0  0  0  0  0  0   0   0   0   |                          |
|     {4} | 0  a c  0  0  0  0  0  -b2 0   0   0   |                          |
|     {3} | 0  0 a2 0  0  b2 0  0  0   0   0   0   |                          |
|     {4} | 0  0 0  0  b  -a 0  0  0   -a3 0   0   |                          |
|     {4} | 0  0 0  0  -c 0  a  b2 0   0   -a3 0   |                          |
|     {4} | 0  0 0  0  0  c  -b 0  a2  0   0   -a3 |                          |
|                                                                             |
|             7      12                                                       |
|o9 : Matrix S  <-- S                                                         |
+-----------------------------------------------------------------------------+
|i10 : F.dd_1                                                                 |
|                                                                             |
|o10 = {3} | a2 b2 0  0  0  0  0  0  0  0  0  0  |                            |
|      {4} | 0  -a 0  0  0  b  0  0  0  0  0  0  |                            |
|      {4} | 0  0  a  0  0  -c 0  0  b2 0  0  0  |                            |
|      {4} | 0  c  -b 0  0  0  a2 0  0  0  0  0  |                            |
|      {4} | b  0  0  a  0  0  0  0  0  b3 0  0  |                            |
|      {4} | -c 0  0  0  a  0  b2 0  0  0  b3 0  |                            |
|      {4} | 0  0  0  -c -b 0  0  a2 0  0  0  b3 |                            |
|                                                                             |
|              7      12                                                      |
|o10 : Matrix S  <-- S                                                        |
+-----------------------------------------------------------------------------+
|i11 : G.dd_2                                                                 |
|                                                                             |
|o11 = {5} | 0   -b3  0   0   0     |                                         |
|      {5} | 0   -b2c 0   0   -a2b2 |                                         |
|      {5} | 0   ab2  0   0   0     |                                         |
|      {6} | 0   0    0   0   b3    |                                         |
|      {5} | -a3 0    0   0   0     |                                         |
|      {5} | 0   -a3  0   0   0     |                                         |
|      {5} | 0   0    -a3 0   0     |                                         |
|      {6} | 0   0    0   -a3 0     |                                         |
|      {6} | 0   0    0   0   -a3   |                                         |
|      {7} | -b  a    0   0   0     |                                         |
|      {7} | c   0    -a  -b2 0     |                                         |
|      {7} | 0   -c   b   0   -a2   |                                         |
|                                                                             |
|              12      5                                                      |
|o11 : Matrix S   <-- S                                                       |
+-----------------------------------------------------------------------------+
|i12 : F.dd_2                                                                 |
|                                                                             |
|o12 = {5} | b3   0   0   0     0   |                                         |
|      {5} | -a2b 0   0   0     0   |                                         |
|      {5} | -a2c 0   0   -a2b2 0   |                                         |
|      {5} | 0    -b3 0   0     0   |                                         |
|      {5} | 0    0   -b3 0     0   |                                         |
|      {5} | -a3  0   0   0     0   |                                         |
|      {6} | 0    0   0   -b3   0   |                                         |
|      {6} | 0    0   0   0     -b3 |                                         |
|      {6} | 0    0   0   a3    0   |                                         |
|      {7} | -b   a   0   0     0   |                                         |
|      {7} | c    0   a   b2    0   |                                         |
|      {7} | 0    -c  -b  0     a2  |                                         |
|                                                                             |
|              12      5                                                      |
|o12 : Matrix S   <-- S                                                       |
+-----------------------------------------------------------------------------+

If the complexity of M is not maximal, then the finite resolution takes place
over an intermediate complete intersection:

+-----------------------------------------------------------------------------+
|i13 : S = ZZ/101[a,b,c,d]                                                    |
|                                                                             |
|o13 = S                                                                      |
|                                                                             |
|o13 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i14 : ff1 = matrix"a3,b3,c3,d3"                                              |
|                                                                             |
|o14 = | a3 b3 c3 d3 |                                                        |
|                                                                             |
|              1      4                                                       |
|o14 : Matrix S  <-- S                                                        |
+-----------------------------------------------------------------------------+
|i15 : ff =ff1*random(source ff1, source ff1)                                 |
|                                                                             |
|o15 = | 24a3-36b3-30c3-29d3 19a3+19b3-10c3-29d3 -8a3-22b3-29c3-24d3          |
|      -----------------------------------------------------------------------|
|      -38a3-16b3+39c3+21d3 |                                                 |
|                                                                             |
|              1      4                                                       |
|o15 : Matrix S  <-- S                                                        |
+-----------------------------------------------------------------------------+
|i16 : R = S/ideal ff                                                         |
|                                                                             |
|o16 = R                                                                      |
|                                                                             |
|o16 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i17 : M = highSyzygy (R^1/ideal"a2b2")                                       |
|                                                                             |
|o17 = cokernel {6} | b2 0 -a2 0 |                                            |
|               {7} | a  b 0   0 |                                            |
|               {7} | 0  0 b   a |                                            |
|                                                                             |
|                             3                                               |
|o17 : R-module, quotient of R                                                |
+-----------------------------------------------------------------------------+
|i18 : complexity M                                                           |
|                                                                             |
|o18 = 2                                                                      |
+-----------------------------------------------------------------------------+
|i19 : mf = matrixFactorization (ff, M)                                       |
|                                                                             |
|o19 = {{7} | -a -36b 0 a |, {8} | 35a2  48b  0     -33b 0     |, {6} | 0   36|
|       {6} | b2 a2   0 0 |  {8} | -35b2 -35a 0     0    0     |  {7} | -36 0 |
|       {7} | 0  0    b a |  {8} | 0     0    33b2  33a  -33b2 |  {7} | 1   0 |
|                            {8} | 0     0    -43a2 -33b 0     |              |
|      -----------------------------------------------------------------------|
|      0  |}                                                                  |
|      36 |                                                                   |
|      0  |                                                                   |
|                                                                             |
|o19 : List                                                                   |
+-----------------------------------------------------------------------------+
|i20 : complexity mf                                                          |
|                                                                             |
|o20 = 2                                                                      |
+-----------------------------------------------------------------------------+
|i21 : BRanks mf                                                              |
|                                                                             |
|o21 = {{2, 2}, {1, 2}}                                                       |
|                                                                             |
|o21 : List                                                                   |
+-----------------------------------------------------------------------------+
|i22 : G = makeFiniteResolution(ff,mf);                                       |
+-----------------------------------------------------------------------------+
|i23 : codim ring G                                                           |
|                                                                             |
|o23 = 2                                                                      |
+-----------------------------------------------------------------------------+
|i24 : R1 = ring G                                                            |
|                                                                             |
|o24 = R1                                                                     |
|                                                                             |
|o24 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i25 : F = res prune pushForward(map(R,R1),M)                                 |
|                                                                             |
|        3       5       2                                                    |
|o25 = R1  <-- R1  <-- R1  <-- 0                                              |
|                                                                             |
|      0       1       2       3                                              |
|                                                                             |
|o25 : ChainComplex                                                           |
+-----------------------------------------------------------------------------+
|i26 : betti F                                                                |
|                                                                             |
|             0 1 2                                                           |
|o26 = total: 3 5 2                                                           |
|          6: 1 . .                                                           |
|          7: 2 4 .                                                           |
|          8: . . .                                                           |
|          9: . 1 2                                                           |
|                                                                             |
|o26 : BettiTally                                                             |
+-----------------------------------------------------------------------------+
|i27 : betti G                                                                |
|                                                                             |
|             0 1 2                                                           |
|o27 = total: 3 5 2                                                           |
|          6: 1 . .                                                           |
|          7: 2 4 .                                                           |
|          8: . . .                                                           |
|          9: . 1 2                                                           |
|                                                                             |
|o27 : BettiTally                                                             |
+-----------------------------------------------------------------------------+

See also
========

  * matrixFactorization -- Maps in a higher
    codimension matrix factorization
  * bMaps -- list the maps  d_p:B_1(p)-->B_0(p) in a
    matrixFactorization
  * psiMaps -- list the maps  psi(p): B_1(p) --> A_0(p-1) in a
    matrixFactorization
  * hMaps -- list the maps  h(p): A_0(p)--> A_1(p) in a
    matrixFactorization
  * complexity -- complexity of a module over a complete
    intersection

Ways to use makeFiniteResolution:
=================================

  * "makeFiniteResolution(Matrix,List)"

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

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

makeFiniteResolutionCodim2 -- Maps associated to the finite resolution of a high syzygy module in codim 2
*********************************************************************************************************

Synopsis
========

  * Usage:
        maps = makeFiniteResolutionCodim2(ff,mf)
  * Inputs:
      * mf, a list (Macaulay2Doc), matrix factorization
      * ff, a matrix (Macaulay2Doc), regular sequence
  * Optional inputs (Macaulay2Doc),:
      * Check => ..., default value false
  * Outputs:
      * maps, a hash table (Macaulay2Doc), many maps

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

Given a codim 2 matrix factorization, makes all the components of the
differential and of the homotopies that are relevant to the finite resolution,
as in 4.2.3 of Eisenbud-Peeva "Minimal Free Resolutions and Higher Matrix
Factorizations"

+----------------------------------------------------------------+
|i1 : kk=ZZ/101                                                  |
|                                                                |
|o1 = kk                                                         |
|                                                                |
|o1 : QuotientRing                                               |
+----------------------------------------------------------------+
|i2 : S = kk[a,b]                                                |
|                                                                |
|o2 = S                                                          |
|                                                                |
|o2 : PolynomialRing                                             |
+----------------------------------------------------------------+
|i3 : ff = matrix"a4,b4"                                         |
|                                                                |
|o3 = | a4 b4 |                                                  |
|                                                                |
|             1      2                                           |
|o3 : Matrix S  <-- S                                            |
+----------------------------------------------------------------+
|i4 : R = S/ideal ff                                             |
|                                                                |
|o4 = R                                                          |
|                                                                |
|o4 : QuotientRing                                               |
+----------------------------------------------------------------+
|i5 : N = R^1/ideal"a2, ab, b3"                                  |
|                                                                |
|o5 = cokernel | a2 ab b3 |                                      |
|                                                                |
|                            1                                   |
|o5 : R-module, quotient of R                                    |
+----------------------------------------------------------------+
|i6 : N = coker vars R                                           |
|                                                                |
|o6 = cokernel | a b |                                           |
|                                                                |
|                            1                                   |
|o6 : R-module, quotient of R                                    |
+----------------------------------------------------------------+
|i7 : M = highSyzygy N                                           |
|                                                                |
|o7 = cokernel {2} | 0 -b3 a3 0 |                                |
|              {4} | b a   0  0 |                                |
|              {4} | 0 0   b  a |                                |
|                                                                |
|                            3                                   |
|o7 : R-module, quotient of R                                    |
+----------------------------------------------------------------+
|i8 : MS = pushForward(map(R,S),M)                               |
|                                                                |
|o8 = cokernel {2} | 0 b3 a3 0 0  |                              |
|              {4} | b -a 0  0 0  |                              |
|              {4} | 0 0  b  a b4 |                              |
|                                                                |
|                            3                                   |
|o8 : S-module, quotient of S                                    |
+----------------------------------------------------------------+
|i9 : mf = matrixFactorization(ff, M)                            |
|                                                                |
|o9 = {{4} | a -b 0 0  |, {5} | a3 b 0   0  0  |, {2} | 0 -1 0 |}|
|      {2} | 0 a3 0 b3 |  {5} | 0  a -b3 0  0  |  {4} | 0 0  1 | |
|      {4} | 0 0  b a  |  {5} | 0  0 0   -a b3 |  {4} | 1 0  0 | |
|                         {5} | 0  0 a3  b  0  |                 |
|                                                                |
|o9 : List                                                       |
+----------------------------------------------------------------+
|i10 : G = makeFiniteResolutionCodim2(ff,mf)                     |
|                                                                |
|o10 = HashTable{"alpha" => {5} | 0   0 |              }         |
|                           {5} | -b3 0 |                        |
|                "b" => {4} | b a |                              |
|                "h1'" => {5} | 0   0  0  |                      |
|                         {5} | -b3 0  0  |                      |
|                         {5} | 0   -a b3 |                      |
|                         {5} | a3  b  0  |                      |
|                "h1" => {5} | 0   0  0  |                       |
|                        {5} | -b3 0  0  |                       |
|                        {5} | 0   -a b3 |                       |
|                        {5} | a3  b  0  |                       |
|                "mu" => {5} | a3 b |                            |
|                        {5} | 0  a |                            |
|                "partial" => {4} | a -b |                       |
|                             {2} | 0 a3 |                       |
|                "psi" => {4} | 0 0  |                           |
|                         {2} | 0 b3 |                           |
|                                 3      5      2                |
|                "resolution" => S  <-- S  <-- S  <-- 0          |
|                                                                |
|                                0      1      2      3          |
|                "sigma" => {5} | b3 |                           |
|                           {5} | 0  |                           |
|                "tau" => 0                                      |
|                "u" => {8} | 1 0 |                              |
|                "v" => {9} | 0 -1 |                             |
|                       {9} | 1 0  |                             |
|                "X" => 0                                        |
|                "Y" => 0                                        |
|                                                                |
|o10 : HashTable                                                 |
+----------------------------------------------------------------+
|i11 : F = G#"resolution"                                        |
|                                                                |
|       3      5      2                                          |
|o11 = S  <-- S  <-- S  <-- 0                                    |
|                                                                |
|      0      1      2      3                                    |
|                                                                |
|o11 : ChainComplex                                              |
+----------------------------------------------------------------+

See also
========

  * makeFiniteResolution -- finite resolution of a
    matrix factorization module M

Ways to use makeFiniteResolutionCodim2:
=======================================

  * "makeFiniteResolutionCodim2(Matrix,List)"

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

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

makeHomotopies -- returns a system of higher homotopies
*******************************************************

Synopsis
========

  * Usage:
        H = makeHomotopies(f,F,b)
  * Inputs:
      * f, a matrix (Macaulay2Doc), 1xn matrix of elements of S
      * F, a chain complex (Macaulay2Doc), admitting
        homotopies for the entries of f
      * b, an integer (Macaulay2Doc), how far back to compute the
        homotopies (defaults to length of F)
  * Outputs:
      * H, a hash table (Macaulay2Doc), gives the higher
        homotopy from F_i corresponding to a monomial with exponent vector L as
        the value $H#\{L,i\}$

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

Given a $1\times n$ matrix f, and a chain complex F, the script attempts to
make a family of higher homotopies on F for the elements of f, in the sense
described, for example, in Eisenbud "Enriched Free Resolutions and Change of
Rings".

The output is a hash table with entries of the form $\{J,i\}=>s$, where J is a
list of non-negative integers, of length n and $H\#\{J,i\}: F_i->F_{i+2|J|-1}$
are maps satisfying the conditions $$ H\#\{e0,i\} = d; $$ and $$
H#\{e0,i+1\}*H#\{e,i\}+H#\{e,i-1\}H#\{e0,i\} = f_i, $$ where $e0 =
\{0,\dots,0\}$ and $e$ is the index of degree 1 with a 1 in the $i$-th place;
and, for each index list I with |I|<=d, $$ sum_{J<I} H#\{I\setminus J, \}
H#\{J, \} = 0. $$

To make the maps homogeneous, $H\#\{J,i\}$ is actually a map from a an
appropriate negative twist of F to a shift of S.

+-----------------------------------------------------------+
|i1 : kk=ZZ/101                                             |
|                                                           |
|o1 = kk                                                    |
|                                                           |
|o1 : QuotientRing                                          |
+-----------------------------------------------------------+
|i2 : S = kk[a,b,c,d]                                       |
|                                                           |
|o2 = S                                                     |
|                                                           |
|o2 : PolynomialRing                                        |
+-----------------------------------------------------------+
|i3 : F = res ideal vars S                                  |
|                                                           |
|      1      4      6      4      1                        |
|o3 = S  <-- S  <-- S  <-- S  <-- S  <-- 0                  |
|                                                           |
|     0      1      2      3      4      5                  |
|                                                           |
|o3 : ChainComplex                                          |
+-----------------------------------------------------------+
|i4 : f = matrix{{a,b,c}}                                   |
|                                                           |
|o4 = | a b c |                                             |
|                                                           |
|             1      3                                      |
|o4 : Matrix S  <-- S                                       |
+-----------------------------------------------------------+
|i5 : homot = makeHomotopies(f,F,2)                         |
|                                                           |
|o5 = HashTable{{{0, 0, 0}, 0} => 0                        }|
|               {{0, 0, 0}, 1} => | a b c d |               |
|               {{0, 0, 0}, 2} => {1} | -b -c 0  -d 0  0  | |
|                                 {1} | a  0  -c 0  -d 0  | |
|                                 {1} | 0  a  b  0  0  -d | |
|                                 {1} | 0  0  0  a  b  c  | |
|               {{0, 0, 0}, 3} => {2} | c  d  0  0  |       |
|                                 {2} | -b 0  d  0  |       |
|                                 {2} | a  0  0  d  |       |
|                                 {2} | 0  -b -c 0  |       |
|                                 {2} | 0  a  0  -c |       |
|                                 {2} | 0  0  a  b  |       |
|               {{0, 0, 1}, -1} => 0                        |
|               {{0, 0, 1}, 0} => {1} | 0 |                 |
|                                 {1} | 0 |                 |
|                                 {1} | 1 |                 |
|                                 {1} | 0 |                 |
|               {{0, 0, 1}, 1} => {2} | 0  0  0 0 |         |
|                                 {2} | -1 0  0 0 |         |
|                                 {2} | 0  -1 0 0 |         |
|                                 {2} | 0  0  0 0 |         |
|                                 {2} | 0  0  0 0 |         |
|                                 {2} | 0  0  0 1 |         |
|               {{0, 0, 1}, 2} => {3} | 1 0 0 0  0  0 |     |
|                                 {3} | 0 0 0 0  0  0 |     |
|                                 {3} | 0 0 0 -1 0  0 |     |
|                                 {3} | 0 0 0 0  -1 0 |     |
|               {{0, 0, 2}, -1} => 0                        |
|               {{0, 1, 0}, -1} => 0                        |
|               {{0, 1, 0}, 0} => {1} | 0 |                 |
|                                 {1} | 1 |                 |
|                                 {1} | 0 |                 |
|                                 {1} | 0 |                 |
|               {{0, 1, 0}, 1} => {2} | -1 0 0 0 |          |
|                                 {2} | 0  0 0 0 |          |
|                                 {2} | 0  0 1 0 |          |
|                                 {2} | 0  0 0 0 |          |
|                                 {2} | 0  0 0 1 |          |
|                                 {2} | 0  0 0 0 |          |
|               {{0, 1, 0}, 2} => {3} | 0 -1 0 0  0 0 |     |
|                                 {3} | 0 0  0 -1 0 0 |     |
|                                 {3} | 0 0  0 0  0 0 |     |
|                                 {3} | 0 0  0 0  0 1 |     |
|               {{0, 1, 1}, -1} => 0                        |
|               {{0, 2, 0}, -1} => 0                        |
|               {{1, 0, 0}, -1} => 0                        |
|               {{1, 0, 0}, 0} => {1} | 1 |                 |
|                                 {1} | 0 |                 |
|                                 {1} | 0 |                 |
|                                 {1} | 0 |                 |
|               {{1, 0, 0}, 1} => {2} | 0 1 0 0 |           |
|                                 {2} | 0 0 1 0 |           |
|                                 {2} | 0 0 0 0 |           |
|                                 {2} | 0 0 0 1 |           |
|                                 {2} | 0 0 0 0 |           |
|                                 {2} | 0 0 0 0 |           |
|               {{1, 0, 0}, 2} => {3} | 0 0 1 0 0 0 |       |
|                                 {3} | 0 0 0 0 1 0 |       |
|                                 {3} | 0 0 0 0 0 1 |       |
|                                 {3} | 0 0 0 0 0 0 |       |
|               {{1, 0, 1}, -1} => 0                        |
|               {{1, 1, 0}, -1} => 0                        |
|               {{2, 0, 0}, -1} => 0                        |
|                                                           |
|o5 : HashTable                                             |
+-----------------------------------------------------------+

In this case the higher homotopies are 0:

+----------------------------------------------------------------+
|i6 : L = sort select(keys homot, k->(homot#k!=0 and sum(k_0)>1))|
|                                                                |
|o6 = {}                                                         |
|                                                                |
|o6 : List                                                       |
+----------------------------------------------------------------+

On the other hand, if we take a complete intersection and something contained
in it in a more complicated situation, the program gives nonzero higher
homotopies:

+-----------------------------------------------------------------------------+
|i7 : kk= ZZ/32003;                                                           |
+-----------------------------------------------------------------------------+
|i8 : S = kk[a,b,c,d];                                                        |
+-----------------------------------------------------------------------------+
|i9 : M = S^1/(ideal"a2,b2,c2,d2");                                           |
+-----------------------------------------------------------------------------+
|i10 : F = res M                                                              |
|                                                                             |
|       1      4      6      4      1                                         |
|o10 = S  <-- S  <-- S  <-- S  <-- S  <-- 0                                   |
|                                                                             |
|      0      1      2      3      4      5                                   |
|                                                                             |
|o10 : ChainComplex                                                           |
+-----------------------------------------------------------------------------+
|i11 : setRandomSeed 0                                                        |
|                                                                             |
|o11 = 0                                                                      |
+-----------------------------------------------------------------------------+
|i12 : f = random(S^1,S^{2:-5});                                              |
|                                                                             |
|              1      2                                                       |
|o12 : Matrix S  <-- S                                                        |
+-----------------------------------------------------------------------------+
|i13 : homot = makeHomotopies(f,F,5)                                          |
|                                                                             |
|o13 = HashTable{{{0, 0}, 0} => 0                                             |
|                {{0, 0}, 1} => | a2                                          |
|                {{0, 0}, 2} => {2} |                                         |
|                               {2} |                                         |
|                               {2} |                                         |
|                               {2} |                                         |
|                {{0, 0}, 3} => {4} |                                         |
|                               {4} |                                         |
|                               {4} |                                         |
|                               {4} |                                         |
|                               {4} |                                         |
|                               {4} |                                         |
|                {{0, 0}, 4} => {6} |                                         |
|                               {6} |                                         |
|                               {6} |                                         |
|                               {6} |                                         |
|                {{0, 0}, 5} => 0                                             |
|                {{0, 0}, 6} => 0                                             |
|                {{0, 1}, -1} => 0                                            |
|                {{0, 1}, 0} => {2} |                                         |
|                               {2} |                                         |
|                               {2} |                                         |
|                               {2} |                                         |
|                {{0, 1}, 1} => {4} |                                         |
|                               {4} |                                         |
|                               {4} |                                         |
|                               {4} |                                         |
|                               {4} |                                         |
|                               {4} |                                         |
|                {{0, 1}, 2} => {6} |                                         |
|                               {6} |                                         |
|                               {6} |                                         |
|                               {6} |                                         |
|                {{0, 1}, 3} => {8} |                                         |
|                {{0, 1}, 4} => 0                                             |
|                {{0, 1}, 5} => 0                                             |
|                {{0, 2}, -1} => 0                                            |
|                {{0, 2}, 0} => {6} |                                         |
|                               {6} |                                         |
|                               {6} |                                         |
|                               {6} |                                         |
|                {{0, 2}, 1} => {8} |                                         |
|                {{0, 2}, 2} => 0                                             |
|                {{0, 3}, -1} => 0                                            |
|                {{0, 3}, 0} => 0                                             |
|                {{0, 4}, -1} => 0                                            |
|                {{0, 5}, -1} => 0                                            |
|                {{1, 0}, -1} => 0                                            |
|                {{1, 0}, 0} => {2} |                                         |
|                               {2} |                                         |
|                               {2} |                                         |
|                               {2} |                                         |
|                {{1, 0}, 1} => {4} |                                         |
|                               {4} |                                         |
|                               {4} |                                         |
|                               {4} |                                         |
|                               {4} |                                         |
|                               {4} |                                         |
|                {{1, 0}, 2} => {6} |                                         |
|                               {6} |                                         |
|                               {6} |                                         |
|                               {6} |                                         |
|                {{1, 0}, 3} => {8} |                                         |
|                {{1, 0}, 4} => 0                                             |
|                {{1, 0}, 5} => 0                                             |
|                {{1, 1}, -1} => 0                                            |
|                {{1, 1}, 0} => {6} |                                         |
|                               {6} |                                         |
|                               {6} |                                         |
|                               {6} |                                         |
|                {{1, 1}, 1} => {8} |                                         |
|                {{1, 1}, 2} => 0                                             |
|                {{1, 2}, -1} => 0                                            |
|                {{1, 2}, 0} => 0                                             |
|                {{1, 3}, -1} => 0                                            |
|                {{1, 4}, -1} => 0                                            |
|                {{2, 0}, -1} => 0                                            |
|                {{2, 0}, 0} => {6} |                                         |
|                               {6} |                                         |
|                               {6} |                                         |
|                               {6} |                                         |
|                {{2, 0}, 1} => {8} |                                         |
|                {{2, 0}, 2} => 0                                             |
|                {{2, 1}, -1} => 0                                            |
|                {{2, 1}, 0} => 0                                             |
|                {{2, 2}, -1} => 0                                            |
|                {{2, 3}, -1} => 0                                            |
|                {{3, 0}, -1} => 0                                            |
|                {{3, 0}, 0} => 0                                             |
|                {{3, 1}, -1} => 0                                            |
|                {{3, 2}, -1} => 0                                            |
|                {{4, 0}, -1} => 0                                            |
|                {{4, 1}, -1} => 0                                            |
|                {{5, 0}, -1} => 0                                            |
|                                                                             |
|o13 : HashTable                                                              |
|-----------------------------------------------------------------------------|
|                                                                             |
|b2 c2 d2 |                                                                   |
| -b2 -c2 0   -d2 0   0   |                                                   |
| a2  0   -c2 0   -d2 0   |                                                   |
| 0   a2  b2  0   0   -d2 |                                                   |
| 0   0   0   a2  b2  c2  |                                                   |
| c2  d2  0   0   |                                                           |
| -b2 0   d2  0   |                                                           |
| a2  0   0   d2  |                                                           |
| 0   -b2 -c2 0   |                                                           |
| 0   a2  0   -c2 |                                                           |
| 0   0   a2  b2  |                                                           |
| -d2 |                                                                       |
| c2  |                                                                       |
| -b2 |                                                                       |
| a2  |                                                                       |
|                                                                             |
|                                                                             |
|                                                                             |
| 1236a3+8922a2b-3589ab2+8971b3-5006a2c-5599abc-14165b2c+8880a2d+4259abd-3002b|
| 10370ab2-7092b3-9702abc-6627b2c+8886abd+4700b2d-15acd+5969bcd               |
| 13707a3+2177a2b-7028ab2+9797b3-7021a2c+6377abc+5874b2c-7600ac2-11726bc2+1140|
| -994a3-1946a2b-6723ab2-5483b3-6453a2c-1192abc-15250b2c-3164ac2+295bc2-7650c3|
| -10370ab2+7092b3+9702abc+6627b2c+7028ac2-9797bc2-5874c3-8886abd-4700b2d+15ac|
| -13707a3-2177a2b+7021a2c-6377abc+7600ac2+11726bc2-1140c3-1206a2d+11435abd+60|
| 7028a3-9797a2b-5874a2c-9074a2d                                              |
| 994a3+1946a2b+6453a2c+1192abc+11045a2d+15333abd+3560acd-2292bcd+7194ad2-6245|
| 6723a3+5483a2b+15250a2c-10567a2d                                            |
| 3164a3-295a2b+7650a2c-14388a2d                                              |
| 13707a3+2177a2b-7021a2c+6377abc-7600ac2-11726bc2+1140c3+1206a2d-11435abd-604|
| -994a3-1946a2b-6453a2c-1192abc-11045a2d-15333abd-3560acd+2292bcd-7194ad2+624|
| 0                                                                           |
| 0                                                                           |
| 994a3+1946a2b+6723ab2+6453a2c+1192abc+11045a2d+15333abd+3560acd-2292bcd+7194|
|                                                                             |
|                                                                             |
|                                                                             |
| -13795a4+2019a3b+13769a2b2+7586ab3+8649b4+6454a3c-10187a2bc-1783ab2c+9219b3c|
| 11152a4-1336a3b+11846a2b2+10264ab3+618b4-11051a3c+12129a2bc+5927ab2c+489b3c-|
| -6338a4+10025a3b+14987a3c-9959a2bc-11691a2c2+12336abc2-7786a3d-1156a2bd+4960|
| 2275a4-239a3b+14594a2b2-8153ab3-11945b4-8416a3c+6251a2bc-3023ab2c+5933b3c+92|
| -9576a4-9957a3b+9804a2b2+14091a3c+13144a2bc+13899a2c2-10509abc2+15503ac3+121|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
| 107a3+4376a2b+3783ab2+10359b3-5570a2c-5307abc-7464b2c+3187a2d+8570abd-8251b2|
| 8231ab2+13177b3+5864abc+13990b2c+5026abd-11521b2d-7501acd-1779bcd           |
| -15344a3+2653a2b+10259ab2-1309b3+12365a2c-7216abc+5398b2c+6230ac2-5326bc2+10|
| -10480a3-6203a2b+9534ab2+10866b3-9480a2c+7256abc-7061b2c+5107ac2+5679bc2-632|
| -8231ab2-13177b3-5864abc-13990b2c-10259ac2+1309bc2-5398c3-5026abd+11521b2d+7|
| 15344a3-2653a2b-12365a2c+7216abc-6230ac2+5326bc2-1031c3+13508a2d+10125abd-90|
| -10259a3+1309a2b-5398a2c-5549a2d                                            |
| 10480a3+6203a2b+9480a2c-7256abc+11950a2d+5321abd+3996acd+7152bcd-9398ad2-153|
| -9534a3-10866a2b+7061a2c-2627a2d                                            |
| -5107a3-5679a2b+6325a2c+11740a2d                                            |
| -15344a3+2653a2b+12365a2c-7216abc+6230ac2-5326bc2+1031c3-13508a2d-10125abd+9|
| -10480a3-6203a2b-9480a2c+7256abc-11950a2d-5321abd-3996acd-7152bcd+9398ad2+15|
| 0                                                                           |
| 0                                                                           |
| 10480a3+6203a2b-9534ab2+9480a2c-7256abc+11950a2d+5321abd+3996acd+7152bcd-939|
|                                                                             |
|                                                                             |
|                                                                             |
| -8991a4+8982a3b+13320a2b2-7229ab3+7672b4-13689a3c+10065a2bc-8787ab2c-1726b3c|
| -8375a4-225a3b-11039a2b2-10196ab3+4676b4+2695a3c-8977a2bc-15950ab2c-7421b3c-|
| -10857a4+14166a3b-858a3c+5335a2bc-5513a2c2+5100abc2-10723a3d-1870a2bd-9822a2|
| -5508a4+13660a3b+15336a2b2-13943ab3-842b4+1910a3c+12230a2bc-9252ab2c-6448b3c|
| 5224a4-8330a3b-13153a2b2+12206a3c+13138a2bc+4498a2c2+13864abc2-978ac3-4062a3|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
| 9611a4+13127a3b-9489a2b2-464ab3+9341b4-15743a3c-9530a2bc+14935ab2c-13901b3c+|
| -3958a4-574a3b-7101a2b2+15674ab3+6343b4+1142a3c+9820a2bc-4821ab2c+5737b3c+50|
| 2398a4+9734a3b-35a3c-4979a2bc-5053a2c2-4372abc2+10422a3d-5261a2bd-2750a2cd-9|
| 6945a4+12098a3b-8978a2b2+12099ab3+9169b4-15936a3c-1975a2bc+10573ab2c+9051b3c|
| 12798a4-6040a3b-7247a2b2-3128a3c-14165a2bc-4627a2c2-10677abc2-4633ac3+3338a3|
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|2d-13892acd-10521bcd                                                         |
|                                                                             |
|c3+1206a2d-11435abd+9074b2d-6040acd+8022bcd+3968c2d                          |
|-11045a2d-15333abd+10567b2d-3560acd+2292bcd+14388c2d-7194ad2+6245bd2-8639cd2+|
|d-5969bcd-9074c2d+6723ad2+5483bd2+15250cd2-10567d3   1236a3+8922a2b-3589ab2+8|
|40acd-8022bcd-3968c2d+3164ad2-295bd2+7650cd2-14388d3 0                       |
|                                                     -13707a3-2177a2b+7028ab2|
|bd2+8639cd2-9426d3                                   0                       |
|                                                     994a3+1946a2b+6723ab2+54|
|                                                     3164ab2-295b3+7650b2c-14|
|0acd+8022bcd+3968c2d-3164ad2+295bd2-7650cd2+14388d3 -10370ab2+7092b3+9702abc+|
|5bd2-8639cd2+9426d3                                 6723ac2                  |
|                                                    -994a3-1946a2b-6723ab2-64|
|                                                    -5483a2b-15250a2c+10567a2|
|ad2-6245bd2+8639cd2-9426d3 13707a3+2177a2b-7028ab2-7021a2c+6377abc-7600ac2-11|
|                                                                             |
|                                                                             |
|                                                                             |
|+5513a2c2+10558abc2+2590b2c2+11624a3d-5603a2bd+14058ab2d-12615b3d+7869a2cd-20|
|15383a2c2+507abc2-13804b2c2-8416ac3+92c4-11057a3d-5113a2bd-2762ab2d+14095b3d-|
|a2cd-5589abcd-8163ac2d-1895bc2d+9464a2d2-7253abd2+12642acd2-1958bcd2         |
|a2c2+5343abc2+3798b2c2-15968a3d+473a2bd+13293ab2d-3761b3d-7717a2cd-7389abcd+4|
|29a3d+14784a2bd-10608a2cd-3816abcd-13638ac2d-6159a2d2-14648abd2+3072acd2-1426|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|d+8444acd+5071bcd                                                            |
|                                                                             |
|31c3-13508a2d-10125abd+5549b2d+9033acd+2998bcd-2036c2d                       |
|5c3-11950a2d-5321abd+2627b2d-3996acd-7152bcd-11740c2d+9398ad2+15317bd2-6922cd|
|501acd+1779bcd-5549c2d-9534ad2-10866bd2+7061cd2-2627d3 107a3+4376a2b+3783ab2+|
|33acd-2998bcd+2036c2d-5107ad2-5679bd2+6325cd2+11740d3  0                     |
|                                                       15344a3-2653a2b-10259a|
|17bd2+6922cd2+5080d3                                   0                     |
|                                                       10480a3+6203a2b-9534ab|
|                                                       -5107ab2-5679b3+6325b2|
|033acd+2998bcd-2036c2d+5107ad2+5679bd2-6325cd2-11740d3 -8231ab2-13177b3-5864a|
|317bd2-6922cd2-5080d3                                  -9534ac2              |
|                                                       -10480a3-6203a2b+9534a|
|                                                       10866a2b-7061a2c+2627a|
|8ad2-15317bd2+6922cd2+5080d3 -15344a3+2653a2b+10259ab2+12365a2c-7216abc+6230a|
|                                                                             |
|                                                                             |
|                                                                             |
|+9033a2c2-14966abc2-6929b2c2+11993a3d+13593a2bd+8103ab2d-14054b3d-4240a2cd-91|
|14919a2c2-11346abc2+14172b2c2+1910ac3+11656bc3-8527c4-8979a3d-8104a2bd+8734ab|
|cd+2760abcd+4119ac2d+5574bc2d+8831a2d2-14373abd2+13676acd2+11671bcd2         |
|-8527a2c2-7998abc2-13623b2c2-5942a3d-11150a2bd-12791ab2d-12401b3d+6638a2cd+13|
|d+11982a2bd+9472a2cd+10055abcd+5890ac2d-9307a2d2+11737abd2+1337acd2-11793ad3 |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|15960a2c2-4501abc2+1105b2c2+6056a3d-11857a2bd+13748ab2d-11752b3d-12345a2cd-14|
|28a2c2+9312abc2+1610b2c2-15936ac3+5385bc3+5375c4+7073a3d+12092a2bd+8241ab2d-4|
|680abcd+4707ac2d-7069bc2d-3873a2d2+5632abd2+12734acd2-7960bcd2               |
|+5375a2c2+1677abc2+1545b2c2+10305a3d-6921a2bd-3135ab2d-9105b3d-10679a2cd-1406|
|d-4025a2bd+10993a2cd+6258abcd-14597ac2d+13812a2d2+7863abd2+10757acd2-167ad3 -|
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|       |                                                                     |
|       |                                                                     |
|       |                                                                     |
|9426d3 |                                                                     |
|971b3-5006a2c-5599abc-14165b2c+8880a2d+4259abd-3002b2d-13892acd-10521bcd     |
|                                                                             |
|-9797b3+7021a2c-6377abc-5874b2c+7600ac2+11726bc2-1140c3-1206a2d+11435abd-9074|
|                                                                             |
|83b3+6453a2c+1192abc+15250b2c+11045a2d+15333abd-10567b2d+3560acd-2292bcd+7194|
|388b2d                                                                       |
|6627b2c+7028ac2-9797bc2-5874c3-8886abd-4700b2d+15acd-5969bcd-9074c2d+5483bd2+|
|                                                                             |
|53a2c-1192abc-11045a2d-15333abd-3560acd+2292bcd-7194ad2+6245bd2-8639cd2+9426d|
|d                                                                            |
|726bc2+1140c3+1206a2d-11435abd-6040acd+8022bcd+3968c2d-3164ad2+295bd2-7650cd2|
|                                                                             |
|                                                                             |
|                                                                             |
|52abcd-1831b2cd+6042ac2d-2561bc2d-8709a2d2-13219abd2+4209b2d2+12225acd2-2605b|
|1588a2cd+2000abcd-2080b2cd+9175ac2d-649bc2d+8829c3d+2164a2d2+8635abd2-7161b2d|
|                                                                             |
|723b2cd-13262ac2d+5431bc2d+11274a2d2-217abd2+1261b2d2+8201acd2-14080bcd2     |
|3ad3 -2275a2b2+239ab3+9804b4+8416ab2c-92b2c2+15968ab2d+14860b3d-8829b2cd-1127|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|         |                                                                   |
|         |                                                                   |
|         |                                                                   |
|2-5080d3 |                                                                   |
|10359b3-5570a2c-5307abc-7464b2c+3187a2d+8570abd-8251b2d+8444acd+5071bcd      |
|                                                                             |
|b2+1309b3-12365a2c+7216abc-5398b2c-6230ac2+5326bc2-1031c3+13508a2d+10125abd-5|
|                                                                             |
|2-10866b3+9480a2c-7256abc+7061b2c+11950a2d+5321abd-2627b2d+3996acd+7152bcd-93|
|c+11740b2d                                                                   |
|bc-13990b2c-10259ac2+1309bc2-5398c3-5026abd+11521b2d+7501acd+1779bcd-5549c2d-|
|                                                                             |
|b2-9480a2c+7256abc-11950a2d-5321abd-3996acd-7152bcd+9398ad2+15317bd2-6922cd2-|
|2d                                                                           |
|c2-5326bc2+1031c3-13508a2d-10125abd+9033acd+2998bcd-2036c2d+5107ad2+5679bd2-6|
|                                                                             |
|                                                                             |
|                                                                             |
|87abcd-14685b2cd-10581ac2d+5228bc2d-15866a2d2-1793abd2-12245b2d2+12283acd2+67|
|2d+5218b3d-12802a2cd-12618abcd-5728b2cd+5347ac2d+13394bc2d+296c3d+7446a2d2+10|
|                                                                             |
|439abcd-12371b2cd+137ac2d-14313bc2d-8084a2d2-4552abd2+6564b2d2+5813acd2-15345|
|5508a2b2-13660ab3-13153b4-1910ab2c-11656b3c+8527b2c2+5942ab2d+14925b3d-296b2c|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|908abcd-9894b2cd+8440ac2d+10693bc2d+12062a2d2-13626abd2+4247b2d2-12703acd2+29|
|420b3d+5234a2cd+7006abcd-14921b2cd+8810ac2d-3271bc2d-10663c3d-12537a2d2+15281|
|                                                                             |
|5abcd+6297b2cd+15379ac2d-12881bc2d-6341a2d2+8292abd2+11862b2d2-10516acd2-1249|
|6945a2b2-12098ab3-7247b4+15936ab2c-5385b3c-5375b2c2-10305ab2d+8297b3d+10663b2|
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                           0                 |
|                                                           1236a3+8922a2b-358|
|b2d+6040acd-8022bcd-3968c2d+3164ad2-295bd2+7650cd2-14388d3 10370ab2-7092b3-97|
|                                                           0                 |
|ad2-6245bd2+8639cd2-9426d3                                 0                 |
|                                                           994a3+1946a2b+6723|
|15250cd2-10567d3 1236a3+8922a2b-3589ab2+8971b3-5006a2c-5599abc-14165b2c+8880a|
|                 0                                                           |
|3                0                                                           |
|                 -994a3-1946a2b-6723ab2-5483b3-6453a2c-1192abc-15250b2c-11045|
|+14388d3 -10370ab2+7092b3+9702abc+6627b2c-9797bc2-5874c3-8886abd-4700b2d+15ac|
|                                                                             |
|                                                                             |
|                                                                             |
|cd2-92c2d2+15968ad3+14860bd3-8829cd3-11274d4 |                               |
|2+997acd2+3015bcd2+11274c2d2                 |                               |
|                                             |                               |
|                                             |                               |
|4b2d2 -7648a3b-13261a2b2+3358ab3-618b4-767a3c-5580a2bc-15560ab2c-489b3c+15383|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                               0             |
|                                                               107a3+4376a2b+|
|549b2d-9033acd-2998bcd+2036c2d-5107ad2-5679bd2+6325cd2+11740d3 8231ab2+13177b|
|                                                               0             |
|98ad2-15317bd2+6922cd2+5080d3                                  0             |
|                                                               10480a3+6203a2|
|10866bd2+7061cd2-2627d3 107a3+4376a2b+3783ab2+10359b3-5570a2c-5307abc-7464b2c|
|                        0                                                    |
|5080d3                  0                                                    |
|                        -10480a3-6203a2b+9534ab2+10866b3-9480a2c+7256abc-7061|
|325cd2-11740d3 -8231ab2-13177b3-5864abc-13990b2c+1309bc2-5398c3-5026abd+11521|
|                                                                             |
|                                                                             |
|                                                                             |
|30bcd2+8527c2d2+5942ad3+14925bd3-296cd3+8084d4 |                             |
|046abd2+6342b2d2-7480acd2-7843bcd2-8084c2d2    |                             |
|                                               |                             |
|bcd2                                           |                             |
|d+8084b2d2 -10492a3b+13996a2b2-9338ab3-4676b4-9826a3c+4731a2bc-12735ab2c+7421|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|57bcd2-5375c2d2-10305ad3+8297bd3+10663cd3+6341d4 |                           |
|abd2-9346b2d2+4309acd2+8269bcd2-6341c2d2         |                           |
|                                                 |                           |
|9bcd2                                            |                           |
|cd+6341b2d2 -10554a3b+6842a2b2-14226ab3-6343b4-12545a3c-10015a2bc-14286ab2c-5|
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|9ab2+8971b3-5006a2c-5599abc-14165b2c+8880a2d+4259abd-3002b2d-13892acd-10521bc|
|02abc-6627b2c+8886abd+4700b2d-15acd+5969bcd                                  |
|                                                                             |
|                                                                             |
|ab2+5483b3+6453a2c+1192abc+15250b2c+3164ac2-295bc2+7650c3+11045a2d+15333abd-1|
|2d+4259abd-3002b2d-13892acd-10521bcd                                 7028ad2 |
|                                                                     -10370ab|
|                                                                     -13707a3|
|a2d-15333abd+10567b2d-3560acd+2292bcd-7194ad2+6245bd2-8639cd2+9426d3 -9797a2b|
|d-5969bcd-9074c2d+5483bd2+15250cd2-10567d3 1236a3+8922a2b-3589ab2+8971b3-5006|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|a2c2-507abc2+13804b2c2+8416ac3-92c4-3588a3d+14541a2bd-8685ab2d-14095b3d+12750|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|3783ab2+10359b3-5570a2c-5307abc-7464b2c+3187a2d+8570abd-8251b2d+8444acd+5071b|
|3+5864abc+13990b2c+5026abd-11521b2d-7501acd-1779bcd                          |
|                                                                             |
|                                                                             |
|b-9534ab2-10866b3+9480a2c-7256abc+7061b2c-5107ac2-5679bc2+6325c3+11950a2d+532|
|+3187a2d+8570abd-8251b2d+8444acd+5071bcd                                     |
|                                                                             |
|                                                                             |
|b2c-11950a2d-5321abd+2627b2d-3996acd-7152bcd+9398ad2+15317bd2-6922cd2-5080d3 |
|b2d+7501acd+1779bcd-5549c2d-10866bd2+7061cd2-2627d3 107a3+4376a2b+3783ab2+103|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|b3c+14919a2c2+11346abc2-14172b2c2-1910ac3-11656bc3+8527c4+6770a3d-9107a2bd-88|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|737b3c-5028a2c2-9312abc2-1610b2c2+15936ac3-5385bc3-5375c4+6938a3d-9371a2bd-99|
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                0            |
|d                                                               0            |
|                                                                0            |
|                                                                1236a3+8922a2|
|                                                                10370ab2-7092|
|0567b2d+3560acd-2292bcd-14388c2d+7194ad2-6245bd2+8639cd2-9426d3 13707a3+2177a|
|                                                                             |
|2+7092b3+9702abc+6627b2c-9797bc2-5874c3-8886abd-4700b2d+15acd-5969bcd-9074c2d|
|-2177a2b+7028ab2+7021a2c-6377abc+7600ac2+11726bc2-1140c3-1206a2d+11435abd+604|
|-5874a2c-9074a2d                                                             |
|a2c-5599abc-14165b2c+8880a2d+4259abd-3002b2d-13892acd-10521bcd |             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|a2cd+4053abcd+2080b2cd-9175ac2d+649bc2d-8829c3d-2164a2d2-8635abd2+7161b2d2-99|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                      0      |
|cd                                                                    0      |
|                                                                      0      |
|                                                                      107a3+4|
|                                                                      8231ab2|
|1abd-2627b2d+3996acd+7152bcd+11740c2d-9398ad2-15317bd2+6922cd2+5080d3 -15344a|
|-10259ad2                                                                    |
|-8231ab2-13177b3-5864abc-13990b2c+1309bc2-5398c3-5026abd+11521b2d+7501acd+177|
|15344a3-2653a2b-10259ab2-12365a2c+7216abc-6230ac2+5326bc2-1031c3+13508a2d+101|
|1309a2b-5398a2c-5549a2d                                                      |
|59b3-5570a2c-5307abc-7464b2c+3187a2d+8570abd-8251b2d+8444acd+5071bcd |       |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|46ab2d-5218b3d-802a2cd-6332abcd+5728b2cd-5347ac2d-13394bc2d-296c3d-7446a2d2-1|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|01ab2d+4420b3d+12317a2cd+15378abcd+14921b2cd-8810ac2d+3271bc2d+10663c3d+12537|
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|b-3589ab2+8971b3-5006a2c-5599abc-14165b2c+8880a2d+4259abd-3002b2d-13892acd-10|
|b3-9702abc-6627b2c+8886abd+4700b2d-15acd+5969bcd                             |
|2b-7028ab2+9797b3-7021a2c+6377abc+5874b2c-7600ac2-11726bc2+1140c3+1206a2d-114|
|                                                    0                        |
|+6723ad2+5483bd2+15250cd2-10567d3                   1236a3+8922a2b-3589ab2+89|
|0acd-8022bcd-3968c2d+3164ad2-295bd2+7650cd2-14388d3 0                        |
|                                                    -13707a3-2177a2b+7028ab2-|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|7acd2-3015bcd2-11274c2d2 11958a3b+8641a2b2+9864ab3+8649b4-4417a3c+3731a2bc+79|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|376a2b+3783ab2+10359b3-5570a2c-5307abc-7464b2c+3187a2d+8570abd-8251b2d+8444ac|
|+13177b3+5864abc+13990b2c+5026abd-11521b2d-7501acd-1779bcd                   |
|3+2653a2b+10259ab2-1309b3+12365a2c-7216abc+5398b2c+6230ac2-5326bc2+1031c3-135|
|                                                              0              |
|9bcd-5549c2d-9534ad2-10866bd2+7061cd2-2627d3                  107a3+4376a2b+3|
|25abd-9033acd-2998bcd+2036c2d-5107ad2-5679bd2+6325cd2+11740d3 0              |
|                                                              15344a3-2653a2b|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|0046abd2-6342b2d2+7480acd2+7843bcd2+8084c2d2 6409a3b-10151a2b2-3863ab3+7672b4|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|a2d2-15281abd2+9346b2d2-4309acd2-8269bcd2+6341c2d2 -12051a3b+353a2b2+8518ab3+|
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                      |                                      |
|                                      |                                      |
|                                      |                                      |
|521bcd                                |                                      |
|                                      |                                      |
|35abd+9074b2d-6040acd+8022bcd+3968c2d |                                      |
|                                                                             |
|71b3-5006a2c-5599abc-14165b2c+8880a2d+4259abd-3002b2d-13892acd-10521bcd      |
|                                                                             |
|9797b3+7021a2c-6377abc-5874b2c+7600ac2+11726bc2-1140c3-1206a2d+11435abd-9074b|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|30ab2c+9219b3c+5513a2c2+10558abc2+2590b2c2+14414a3d+3844a2bd+5979ab2d-12615b3|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                               |                             |
|                                               |                             |
|                                               |                             |
|d+5071bcd                                      |                             |
|                                               |                             |
|08a2d-10125abd+5549b2d+9033acd+2998bcd-2036c2d |                             |
|                                                                             |
|783ab2+10359b3-5570a2c-5307abc-7464b2c+3187a2d+8570abd-8251b2d+8444acd+5071bc|
|                                                                             |
|-10259ab2+1309b3-12365a2c+7216abc-5398b2c-6230ac2+5326bc2-1031c3+13508a2d+101|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|+3762a3c-9280a2bc+12253ab2c-1726b3c+9033a2c2-14966abc2-6929b2c2-11253a3d+4921|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|9341b4+1532a3c-2120a2bc+4932ab2c-13901b3c+15960a2c2-4501abc2+1105b2c2-14314a3|
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                          0                  |
|                                                          0                  |
|                                                          1236a3+8922a2b-3589|
|2d+6040acd-8022bcd-3968c2d+3164ad2-295bd2+7650cd2-14388d3 10370ab2-7092b3-970|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|d-15957a2cd+15293abcd-1831b2cd+6042ac2d-2561bc2d-8709a2d2-13219abd2+4209b2d2+|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                      0      |
|d                                                                     0      |
|                                                                      107a3+4|
|25abd-5549b2d-9033acd-2998bcd+2036c2d-5107ad2-5679bd2+6325cd2+11740d3 8231ab2|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|a2bd-11860ab2d-14054b3d+15299a2cd-718abcd-14685b2cd-10581ac2d+5228bc2d-15866a|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|d+12757a2bd+12822ab2d-11752b3d-7220a2cd-1419abcd-9894b2cd+8440ac2d+10693bc2d+|
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|ab2+8971b3-5006a2c-5599abc-14165b2c+8880a2d+4259abd-3002b2d-13892acd-10521bcd|
|2abc-6627b2c+8886abd+4700b2d-15acd+5969bcd                                   |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|12225acd2-2605bcd2-92c2d2+15968ad3+14860bd3-8829cd3-11274d4 |                |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|376a2b+3783ab2+10359b3-5570a2c-5307abc-7464b2c+3187a2d+8570abd-8251b2d+8444ac|
|+13177b3+5864abc+13990b2c+5026abd-11521b2d-7501acd-1779bcd                   |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|2d2-1793abd2-12245b2d2+12283acd2+6730bcd2+8527c2d2+5942ad3+14925bd3-296cd3+80|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|12062a2d2-13626abd2+4247b2d2-12703acd2+2957bcd2-5375c2d2-10305ad3+8297bd3+106|
|-----------------------------------------------------------------------------|
|              }                                                              |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
| |                                                                           |
| |                                                                           |
| |                                                                           |
| |                                                                           |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|          |                                                                  |
|          |                                                                  |
|d+5071bcd |                                                                  |
|          |                                                                  |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|84d4 |                                                                       |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|63cd3+6341d4 |                                                               |
+-----------------------------------------------------------------------------+

We can see that all 6 potential higher homotopies are nontrivial:

+-----------------------------------------------------------------------------+
|i14 : L = sort select(keys homot, k->(homot#k!=0 and sum(k_0)>1))            |
|                                                                             |
|o14 = {{{0, 2}, 0}, {{0, 2}, 1}, {{1, 1}, 0}, {{1, 1}, 1}, {{2, 0}, 0}, {{2, |
|      -----------------------------------------------------------------------|
|      0}, 1}}                                                                |
|                                                                             |
|o14 : List                                                                   |
+-----------------------------------------------------------------------------+
|i15 : #L                                                                     |
|                                                                             |
|o15 = 6                                                                      |
+-----------------------------------------------------------------------------+
|i16 : netList L                                                              |
|                                                                             |
|      +------+-+                                                             |
|o16 = |{0, 2}|0|                                                             |
|      +------+-+                                                             |
|      |{0, 2}|1|                                                             |
|      +------+-+                                                             |
|      |{1, 1}|0|                                                             |
|      +------+-+                                                             |
|      |{1, 1}|1|                                                             |
|      +------+-+                                                             |
|      |{2, 0}|0|                                                             |
|      +------+-+                                                             |
|      |{2, 0}|1|                                                             |
|      +------+-+                                                             |
+-----------------------------------------------------------------------------+

For example we have:

+-----------------------------------------------------------------------------+
|i17 : homot#(L_0)                                                            |
|                                                                             |
|o17 = {6} | -13795a4+2019a3b+13769a2b2+7586ab3+8649b4+6454a3c-10187a2bc-1783a|
|      {6} | 11152a4-1336a3b+11846a2b2+10264ab3+618b4-11051a3c+12129a2bc+5927a|
|      {6} | -6338a4+10025a3b+14987a3c-9959a2bc-11691a2c2+12336abc2-7786a3d-11|
|      {6} | 2275a4-239a3b+14594a2b2-8153ab3-11945b4-8416a3c+6251a2bc-3023ab2c|
|      -----------------------------------------------------------------------|
|      b2c+9219b3c+5513a2c2+10558abc2+2590b2c2+11624a3d-5603a2bd+14058ab2d-126|
|      b2c+489b3c-15383a2c2+507abc2-13804b2c2-8416ac3+92c4-11057a3d-5113a2bd-2|
|      56a2bd+4960a2cd-5589abcd-8163ac2d-1895bc2d+9464a2d2-7253abd2+12642acd2-|
|      +5933b3c+92a2c2+5343abc2+3798b2c2-15968a3d+473a2bd+13293ab2d-3761b3d-77|
|      -----------------------------------------------------------------------|
|      15b3d+7869a2cd-2052abcd-1831b2cd+6042ac2d-2561bc2d-8709a2d2-13219abd2+4|
|      762ab2d+14095b3d-1588a2cd+2000abcd-2080b2cd+9175ac2d-649bc2d+8829c3d+21|
|      1958bcd2                                                               |
|      17a2cd-7389abcd+4723b2cd-13262ac2d+5431bc2d+11274a2d2-217abd2+1261b2d2+|
|      -----------------------------------------------------------------------|
|      209b2d2+12225acd2-2605bcd2-92c2d2+15968ad3+14860bd3-8829cd3-11274d4 |  |
|      64a2d2+8635abd2-7161b2d2+997acd2+3015bcd2+11274c2d2                 |  |
|                                                                          |  |
|      8201acd2-14080bcd2                                                  |  |
|                                                                             |
|              4      1                                                       |
|o17 : Matrix S  <-- S                                                        |
+-----------------------------------------------------------------------------+

But all the homotopies are minimal in this case:

+--------------------------------------------+
|i18 : k1 = S^1/(ideal vars S);              |
+--------------------------------------------+
|i19 : select(keys homot,k->(k1**homot#k)!=0)|
|                                            |
|o19 = {}                                    |
|                                            |
|o19 : List                                  |
+--------------------------------------------+

See also
========

  * makeHomotopies1 -- returns a system of first
    homotopies

Ways to use makeHomotopies:
===========================

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

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

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

makeHomotopies1 -- returns a system of first homotopies
*******************************************************

Synopsis
========

  * Usage:
        H = makeHomotopies1(f,F,d)
  * Inputs:
      * f, a matrix (Macaulay2Doc), 1xn matrix of elements of S
      * F, a chain complex (Macaulay2Doc), admitting
        homotopies for the entries of f
      * d, an integer (Macaulay2Doc), how far back to compute the
        homotopies (defaults to length of F)
  * Outputs:
      * H, a hash table (Macaulay2Doc), gives the homotopy
        from F_i corresponding to f_j as the value $H#\{j,i\}$

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

Same as makeHomotopies, but only computes the ordinary homotopies, not the
higher ones. Used in exteriorTorModule

See also
========

  * makeHomotopies -- returns a system of higher
    homotopies
  * exteriorTorModule -- Tor as a module over an
    exterior algebra or bigraded algebra

Ways to use makeHomotopies1:
============================

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

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

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

makeHomotopiesOnHomology -- Homology of a complex as exterior module
********************************************************************

Synopsis
========

  * Usage:
        (H,h) = makeHomotopiesOnHomology(ff, C)
  * Inputs:
      * ff, a matrix (Macaulay2Doc), matrix of elements homotopic
        to 0 on C
      * C, a chain complex (Macaulay2Doc),
  * Outputs:
      * H, a hash table (Macaulay2Doc), Homology of C, indexed
        by places in the C
      * h, a hash table (Macaulay2Doc), homotopies for
        elements of f on the homology of C

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

The script calls makeHomotopies1 to produce homotopies for the ff_i on C, and
then computes their action on the Homology of C.

See also
========

  * exteriorTorModule -- Tor as a module over an
    exterior algebra or bigraded algebra
  * exteriorExtModule -- Ext(M,k) or Ext(M,N) as a
    module over an exterior algebra

Ways to use makeHomotopiesOnHomology:
=====================================

  * "makeHomotopiesOnHomology(Matrix,ChainComplex)"

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

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

makeModule -- makes a Module out of a collection of modules and maps
********************************************************************

Synopsis
========

  * Usage:
        M = makeModule(H,E,phi)
  * Inputs:
      * H, a hash table (Macaulay2Doc), graded components that
        are modules, to make into as single module
      * E, a matrix (Macaulay2Doc), Matrix of variables whose
        action will defined
      * phi, a hash table (Macaulay2Doc), maps between the
        graded components that will be the action of the variables in E
  * Outputs:
      * M, a module (Macaulay2Doc), graded modules whose
        components are given by H

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

The Hashtable H should have consecutive integer keys i_0..i_0, say, with values
H#i that are modules over a ring SE whose variables include the elements of E.
E: \oplus SE^{d_i} \to SE^1 is a matrix of c variables from SE H is a hashTable
of m pairs {i, t_i}, where the t_i are RE-modules, and the i are consecutive
integer. phi is a hash-table of homogeneous maps phi#{j,i}: H#i**F_j\to H#(i+1)
where F_j = source (E_{j} = matrix {{e_j}}). Thus the maps p#{j,i} = (E_j ||
-phi#{j,i}): t_i**F_j \to t_i++t_{(i+1)}, are homogeneous. The script returns M
= \oplus_i T_ as an SE-module, computed as the quotient of P := \oplus T_i
obtained by factoring out the sum of the images of the maps p#{j,i}

The Hashtable phi has keys of the form {j,i} where j runs from 0 to c-1, i and
i+1 are keys of H, and phi#{j,i} is the map from (source E_{i})**H#i to H#(i+1)
that will be identified with the action of E_{j}.

The script is used in both the singly graded case, for example in
exteriorTorModule(ff,M) and in the bigraded case, for example in
exteriorTorModule(ff,M,N).

In the following we use makeModule to construct by hand a free module of rank 1
over the exterior algebra on x,y, starting with the construction of a module
over a bihomogeneous ring.

+-----------------------------------------------------------------------------+
|i1 : SE = ZZ/101[a,b,c,x,y,Degrees=>toList(3:{1,0})|toList(2:{1,1}),         |
|                                                                             |
|o1 = SE                                                                      |
|                                                                             |
|o1 : PolynomialRing, 2 skew commutative variable(s)                          |
|-----------------------------------------------------------------------------|
|SkewCommutative=>{x,y}]                                                      |
+-----------------------------------------------------------------------------+
|i2 : RE = SE/ideal"a2,b2,c2"                                                 |
|                                                                             |
|o2 = RE                                                                      |
|                                                                             |
|o2 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i3 : T = hashTable {{0,RE^1},{1,RE^{2:{ -1,-1}}}, {2,RE^{{ -2,-2}}}}         |
|                                                                             |
|                      1                                                      |
|o3 = HashTable{0 => RE }                                                     |
|                      2                                                      |
|               1 => RE                                                       |
|                      1                                                      |
|               2 => RE                                                       |
|                                                                             |
|o3 : HashTable                                                               |
+-----------------------------------------------------------------------------+
|i4 : E = matrix{{x,y}}                                                       |
|                                                                             |
|o4 = | x y |                                                                 |
|                                                                             |
|              1       2                                                      |
|o4 : Matrix RE  <-- RE                                                       |
+-----------------------------------------------------------------------------+
|i5 : F=apply(2, j-> source E_{j})                                            |
|                                                                             |
|        1    1                                                               |
|o5 = {RE , RE }                                                              |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : phi = hashTable{ {{0,0}, map(T#1, F_0**T#0, T#1_{0})},{{1,0}, map(T#1,  |
|                                                                             |
|o6 = HashTable{{0, 0} => {1, 1} | 1 |   }                                    |
|                         {1, 1} | 0 |                                        |
|               {0, 1} => {2, 2} | 0 1 |                                      |
|               {1, 0} => {1, 1} | 0 |                                        |
|                         {1, 1} | 1 |                                        |
|               {1, 1} => {2, 2} | -1 0 |                                     |
|                                                                             |
|o6 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|F_1**T#0, T#1_{1})},{{0,1}, map(T#2, F_0**T#1, T#1^{1})}, {{1,1}, -map(T#2,  |
|-----------------------------------------------------------------------------|
|F_1**T#1, T#1^{0})}}                                                         |
+-----------------------------------------------------------------------------+
|i7 : apply(keys phi, k->isHomogeneous phi#k)                                 |
|                                                                             |
|o7 = {true, true, true, true}                                                |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+
|i8 : X = makeModule(T,E,phi)                                                 |
|                                                                             |
|o8 = cokernel {0, 0} | -x 0  0  -y 0  0  |                                   |
|              {1, 1} | 1  -x 0  0  -y 0  |                                   |
|              {1, 1} | 0  0  -x 1  0  -y |                                   |
|              {2, 2} | 0  0  1  0  -1 0  |                                   |
|                                                                             |
|                              4                                              |
|o8 : RE-module, quotient of RE                                               |
+-----------------------------------------------------------------------------+
|i9 : isHomogeneous X                                                         |
|                                                                             |
|o9 = true                                                                    |
+-----------------------------------------------------------------------------+
|i10 : q = map(ZZ/101[x,y, SkewCommutative => true, DegreeMap => d->{d_1}],   |
|                                                                             |
|            ZZ                                                               |
|o10 = map (---[x..y], RE, {0, 0, 0, x, y})                                   |
|           101                                                               |
|                                                                             |
|               ZZ                                                            |
|o10 : RingMap ---[x..y] <-- RE                                               |
|              101                                                            |
|-----------------------------------------------------------------------------|
|ring X, {3:0,x,y})                                                           |
+-----------------------------------------------------------------------------+
|i11 : prune coker q presentation X                                           |
|                                                                             |
|        ZZ       1                                                           |
|o11 = (---[x..y])                                                            |
|       101                                                                   |
|                                                                             |
|       ZZ                                                                    |
|o11 : ---[x..y]-module, free                                                 |
|      101                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * exteriorHomologyModule -- Make the homology
    of a complex into a module over an exterior algebra
  * exteriorTorModule -- Tor as a module over an
    exterior algebra or bigraded algebra
  * exteriorExtModule -- Ext(M,k) or Ext(M,N) as a
    module over an exterior algebra

Ways to use makeModule:
=======================

  * "makeModule(HashTable,Matrix,HashTable)"

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

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

makeT -- make the CI operators on a complex
*******************************************

Synopsis
========

  * Usage:
        T = makeT(ff,F,i)
        T = makeT(ff,F,t0,i)
  * Inputs:
      * ff, a matrix (Macaulay2Doc), 1xc matrix whose entries are
        a complete intersection in S
      * F, a chain complex (Macaulay2Doc), over S/ideal ff
      * t0, a matrix (Macaulay2Doc), CI-operator on F for ff_0 to
        be preserved
      * i, an integer (Macaulay2Doc), define CI operators from F_i
        \to F_{i-2}
  * Outputs:
      * L, a list (Macaulay2Doc), of CI operators F_i \to F_{i-2}
        corresponding to entries of ff

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

substitute matrices of two differentials of F into S = ring ff, compose them,
and divide by entries of ff, in order. If the second Matrix argument t0 is
present, use it as the first CI operator.

The degrees of the targets of the T_j are changed by the degrees of the f_j to
make the T_j homogeneous.

+-----------------------------------+
|i1 : S = ZZ/101[x,y,z];            |
+-----------------------------------+
|i2 : ff = matrix"x3,y3,z3";        |
|                                   |
|             1      3              |
|o2 : Matrix S  <-- S               |
+-----------------------------------+
|i3 : R = S/ideal ff;               |
+-----------------------------------+
|i4 : M = coker matrix"x,y,z;y,z,x";|
+-----------------------------------+
|i5 : betti (F = res M)             |
|                                   |
|            0 1 2 3 4              |
|o5 = total: 2 3 5 6 8              |
|         0: 2 3 . . .              |
|         1: . . 5 6 .              |
|         2: . . . . 8              |
|                                   |
|o5 : BettiTally                    |
+-----------------------------------+
|i6 : T = makeT(ff,F,3);            |
+-----------------------------------+
|i7 : netList T                     |
|                                   |
|     +------------------------+    |
|o7 = |{4} | 0 0 0 0  1 0 |    |    |
|     |{4} | 0 0 0 -1 0 0 |    |    |
|     |{4} | 0 0 0 0  0 1 |    |    |
|     +------------------------+    |
|     |{4} | 0 1 0 0 0 0 |     |    |
|     |{4} | 1 0 0 0 0 0 |     |    |
|     |{4} | 0 0 1 0 0 0 |     |    |
|     +------------------------+    |
|     |{4} | 0  -1 0  0 -1 0  ||    |
|     |{4} | -1 0  0  1 0  0  ||    |
|     |{4} | 0  0  -1 0 0  -1 ||    |
|     +------------------------+    |
+-----------------------------------+
|i8 : isHomogeneous T_2             |
|                                   |
|o8 = true                          |
+-----------------------------------+

Caveat
======

Script assumes that ring F == (ring ff)/(ideal ff). It might be more useful to
return the operators as matrices over S rather than over R, since this is what
we'd need for things like matrixFactorization (where this process currently
done on the fly, not calling makeT)

Ways to use makeT:
==================

  * "makeT(Matrix,ChainComplex,ZZ)"

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

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

matrixFactorization -- Maps in a higher codimension matrix factorization
************************************************************************

Synopsis
========

  * Usage:
        MF = matrixFactorization(ff,M)
  * Inputs:
      * ff, a matrix (Macaulay2Doc), a sufficiently general
        regular sequence in a ring S
      * M, a module (Macaulay2Doc), a maximal Cohen-Macaulay
        module over S/ideal ff
  * Optional inputs (Macaulay2Doc),:
      * Augmentation => ..., default value true
      * Check => ..., default value false
      * Layered => ..., default value true
      * Verbose => ..., default value false
  * Outputs:
      * MF, a list (Macaulay2Doc), \{d,h,gamma\}, where d:A_1 \to
        A_0 and h: \oplus A_0(p) \to A_1 is the direct sum of partial
        homotopies, and gamma: A_0 ->M is the augmentation (returned only if
        Augmentation =>true)

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

The input module M should be a maximal Cohen-Macaulay module over R = S/ideal
ff.  If M is in fact a "high syzygy", then the function
matrixFactorization(ff,M,Layered=>false) uses a different, faster algorithm
which only works in the high syzygy case.

In all examples we know, M can be considered a "high syzygy" as long as
Ext^{even}_R(M,k) and Ext^{odd}_R(M,k) have negative regularity over the ring
of CI operators (regraded with variables of degree 1. However, the best result
we can prove is that it suffices to have regularity < -(2*dim R+1).

When the optional input Check==true (the default is Check==false), the
properties in the definition of Matrix Factorization are verified

The output is a list of maps \{d,h\} or \{d,h,gamma\}, where gamma is an
augmentation, that is, a map from target d to M.

The map d is a special lifting to S of a presentation of M over R. To explain
the contents, we introduce some notation (from Eisenbud and Peeva, "Minimal
free resolutions over complete intersections" Lecture Notes in Mathematics,
2152. Springer, Cham, 2016. x+107 pp. ISBN: 978-3-319-26436-3;
978-3-319-26437-0).

R(i) = S/(ff_0,..,ff_{i-1}). Here 0<= i <= c, and R = R(c) and S = R(0).

B(i) = the matrix (over S) representing d_i: B_1(i) \to B_0(i)

d(i): A_1(i) \to A_0(i) the restriction of d = d(c). where A(i) =
\oplus_{i=1}^p B(i)

The map h is a direct sum of maps target d(p) \to source d(p) that are
homotopies for ff_p on the restriction d(p): over the ring R#(p-1) =
S/(ff#1..ff#(p-1), so d(p) * h#p = ff#p mod (ff#1..ff#(p-1).

In addition, h#p * d(p) induces ff#p on B1#p mod (ff#1..ff#(p-1).

Here is a simple example:

+---------------------------------------+
|i1 : setRandomSeed 0                   |
|                                       |
|o1 = 0                                 |
+---------------------------------------+
|i2 : kk = ZZ/101                       |
|                                       |
|o2 = kk                                |
|                                       |
|o2 : QuotientRing                      |
+---------------------------------------+
|i3 : S = kk[a,b,u,v]                   |
|                                       |
|o3 = S                                 |
|                                       |
|o3 : PolynomialRing                    |
+---------------------------------------+
|i4 : ff = matrix"au,bv"                |
|                                       |
|o4 = | au bv |                         |
|                                       |
|             1      2                  |
|o4 : Matrix S  <-- S                   |
+---------------------------------------+
|i5 : R = S/ideal ff                    |
|                                       |
|o5 = R                                 |
|                                       |
|o5 : QuotientRing                      |
+---------------------------------------+
|i6 : M0 = R^1/ideal"a,b"               |
|                                       |
|o6 = cokernel | a b |                  |
|                                       |
|                            1          |
|o6 : R-module, quotient of R           |
+---------------------------------------+
|i7 : M = highSyzygy M0                 |
|                                       |
|o7 = cokernel {2} | b -a 0 0 |         |
|              {2} | 0 0  a b |         |
|              {2} | 0 v  0 u |         |
|                                       |
|                            3          |
|o7 : R-module, quotient of R           |
+---------------------------------------+
|i8 : MF = matrixFactorization(ff,M);   |
+---------------------------------------+
|i9 : netList BRanks MF                 |
|                                       |
|     +-+-+                             |
|o9 = |2|2|                             |
|     +-+-+                             |
|     |1|2|                             |
|     +-+-+                             |
+---------------------------------------+
|i10 : netList bMaps MF                 |
|                                       |
|      +-----------+                    |
|o10 = |{2} | a b ||                    |
|      |{2} | 0 u ||                    |
|      +-----------+                    |
|      |{2} | b a ||                    |
|      +-----------+                    |
+---------------------------------------+
|i11 : betti res(M, LengthLimit => 7)   |
|                                       |
|             0 1 2 3 4 5 6  7          |
|o11 = total: 3 4 5 6 7 8 9 10          |
|          2: 3 4 5 6 7 8 9 10          |
|                                       |
|o11 : BettiTally                       |
+---------------------------------------+
|i12 : infiniteBettiNumbers (MF,7)      |
|                                       |
|o12 = {3, 4, 5, 6, 7, 8, 9, 10}        |
|                                       |
|o12 : List                             |
+---------------------------------------+
|i13 : betti res pushForward(map(R,S),M)|
|                                       |
|             0 1 2                     |
|o13 = total: 3 5 2                     |
|          2: 3 4 .                     |
|          3: . 1 2                     |
|                                       |
|o13 : BettiTally                       |
+---------------------------------------+
|i14 : finiteBettiNumbers MF            |
|                                       |
|o14 = {3, 5, 2}                        |
|                                       |
|o14 : List                             |
+---------------------------------------+

See also
========

  * finiteBettiNumbers -- betti numbers of finite
    resolution computed from a matrix factorization
  * infiniteBettiNumbers -- betti numbers of
    finite resolution computed from a matrix factorization
  * highSyzygy -- Returns a syzygy module one beyond the
    regularity of Ext(M,k)
  * bMaps -- list the maps  d_p:B_1(p)-->B_0(p) in a
    matrixFactorization
  * BRanks -- ranks of the modules B_i(d) in a
    matrixFactorization

Ways to use matrixFactorization:
================================

  * "matrixFactorization(Matrix,Module)"

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

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

mfBound -- determines how high a syzygy to take for "matrixFactorization"
*************************************************************************

Synopsis
========

  * Usage:
        p = mfBound M
  * Inputs:
      * M, a module (Macaulay2Doc), over a complete intersection
  * Outputs:
      * p, an integer (Macaulay2Doc),

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

If p = mfBound M, then the p-th syzygy of M, which is computed by
highSyzygy(M), should (this is a conjecture) be a "high Syzygy" in the sense
required for matrixFactorization. In examples, the estimate seems sharp (except
when M is already a high syzygy).

The actual formula used is:

mfBound M = max(2*r_{even}, 1+2*r_{odd})

where r_{even} = regularity evenExtModule M and r_{odd} = regularity
oddExtModule M. Here evenExtModule M is the even degree part of Ext(M, (residue
class field)).

See also
========

  * highSyzygy -- Returns a syzygy module one beyond the
    regularity of Ext(M,k)
  * evenExtModule -- even part of Ext^*(M,k) over a
    complete intersection as module over CI operator ring
  * oddExtModule -- odd part of Ext^*(M,k) over a complete
    intersection as module over CI operator ring
  * matrixFactorization -- Maps in a higher
    codimension matrix factorization

Ways to use mfBound:
====================

  * "mfBound(Module)"

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

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

moduleAsExt -- Find a module with given asymptotic resolution
*************************************************************

Synopsis
========

  * Usage:
        M = moduleAsExt(MM,R)
  * Inputs:
      * M, a module (Macaulay2Doc), module over polynomial ring
        with c variables
      * R, a ring (Macaulay2Doc), (graded) complete intersection
        ring of codimension c, embedding dimension n
  * Outputs:
      * N, a module (Macaulay2Doc), module over R such that
        Ext_R(N,k) = M\otimes \wedge(k^n) in large homological degree.

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

The routine ``moduleAsExt'' is a partial inverse to the routine ExtModule,
computed following ideas of Avramov and Jorgensen: given a module E over a
polynomial ring k[x_1..x_c], it provides a module N over a specified polynomial
ring in n variables such that Ext(N,k) agrees with $E'=E\otimes \wedge(k^n)$
after truncation. Here the grading on E is taken to be even, while
$\wedge(k^n)$ has generators in degree 1. The routine hfModuleAsExt computes
the resulting hilbert function for E'. This uses ideas of Avramov and
Jorgensen. Note that the module Ext(N,k) (truncated) will automatically be free
over the exterior algebra $\wedge(k^n)$ generated by Ext^1(k,k); not a typical
Ext module.

More precisely:

Suppose that $R = k[a_1,\dots, a_n]/(f_1,\dots,f_c)$ let $KK =
k[x_1,\dots,x_c]$, and let $\Lambda = \wedge k^n$. $E = KK\otimes\Lambda$, so
that the minimal $R$-free resolution of $k$ has underlying module $R\otimes
E^*$, where $E^*$ is the graded vector space dual of $E$.

Let MM be the result of truncating M at its regularity and shifting it so that
it is generated in degree 0. Let $F$ be a $KK$-free resolution of $MM$, and
write $F_i = KK\otimes V_i.$ Since linear forms over $KK$ correspond to CI
operators of degree -2 on the resolution G of k over R, we may form a map $$
d_1+d_2: \sum_{i=0}^m G_{i+1}\otimes V_{m-i}^* \to \sum_{i=0}^m G_i\otimes
V_{m-i}^* $$ where $d_1$ is the direct sum of the differentials $(G_{i+1}\to
G_i)\otimes V_i^*$ and $d_2$ is the direct sum of the maps $\phi_i$ defined
from the differentials of $F$ by substituting CI operators for linear forms,
$\phi_i: G_{i+1}\otimes V_i \to G_{i-1}\otimes V_{i-1}$. The script returns the
module N that is the cokernel of $d_1+d_2$.

The module $Ext_R(N,k)$ agrees, after a few steps, with the module derived from
$MM$ by tensoring it with $\Lambda$, that is, with the moduleß $$ MM' = \sum_j
(MM'(j)\otimes \Lambda_j) $$ so that $MM'_p = (MM_p\otimes Lambda_0) \oplus
(MM_{p-1}\otimes Lambda_1) \oplus\cdots$.

The function hfModuleAsExt computes the Hilbert function of MM' numerically
from that of MM.

+---------------------------------------------+
|i1 : kk = ZZ/101;                            |
+---------------------------------------------+
|i2 : S = kk[a,b,c];                          |
+---------------------------------------------+
|i3 : ff = matrix{{a^4, b^4,c^4}};            |
|                                             |
|             1      3                        |
|o3 : Matrix S  <-- S                         |
+---------------------------------------------+
|i4 : R = S/ideal ff;                         |
+---------------------------------------------+
|i5 : Ops = kk[x_1,x_2,x_3];                  |
+---------------------------------------------+
|i6 : MM = Ops^1/(x_1*ideal(x_2^2,x_3));      |
+---------------------------------------------+
|i7 : N = moduleAsExt(MM,R);                  |
+---------------------------------------------+
|i8 : betti res( N, LengthLimit => 10)        |
|                                             |
|             0  1  2  3  4  5  6  7  8  9 10 |
|o8 = total: 36 27 29 31 33 35 37 39 41 43 45 |
|        -6: 18  6  .  .  .  .  .  .  .  .  . |
|        -5:  .  .  .  .  .  .  .  .  .  .  . |
|        -4: 18 21 21  7  .  .  .  .  .  .  . |
|        -3:  .  .  .  .  .  .  .  .  .  .  . |
|        -2:  .  .  8 24 24  8  .  .  .  .  . |
|        -1:  .  .  .  .  .  .  .  .  .  .  . |
|         0:  .  .  .  .  9 27 27  9  .  .  . |
|         1:  .  .  .  .  .  .  .  .  .  .  . |
|         2:  .  .  .  .  .  . 10 30 30 10  . |
|         3:  .  .  .  .  .  .  .  .  .  .  . |
|         4:  .  .  .  .  .  .  .  . 11 33 33 |
|         5:  .  .  .  .  .  .  .  .  .  .  . |
|         6:  .  .  .  .  .  .  .  .  .  . 12 |
|                                             |
|o8 : BettiTally                              |
+---------------------------------------------+
|i9 : hfModuleAsExt(12,MM,3)                  |
|                                             |
|o9 = (23, 25, 27, 29, 31, 33, 35, 37, 39, 41)|
|                                             |
|o9 : Sequence                                |
+---------------------------------------------+

Caveat
======

The elements f_1..f_c must be homogeneous of the same degree. The script could
be rewritten to accommodate different degrees, but only by going to the local
category

See also
========

  * ExtModule -- Ext^*(M,k) over a complete intersection as
    module over CI operator ring
  * evenExtModule -- even part of Ext^*(M,k) over a
    complete intersection as module over CI operator ring
  * oddExtModule -- odd part of Ext^*(M,k) over a complete
    intersection as module over CI operator ring
  * ExtModuleData -- Even and odd Ext modules and their
    regularity
  * hfModuleAsExt -- predict betti numbers of
    moduleAsExt(M,R)

Ways to use moduleAsExt:
========================

  * "moduleAsExt(Module,Ring)"

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

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

newExt -- Global Ext for modules over a complete Intersection
*************************************************************

Synopsis
========

  * Usage:
        E = newExt(M,N)
  * Inputs:
      * M, a module (Macaulay2Doc), over a complete intersection
        Rbar
      * N, a module (Macaulay2Doc), over Rbar
  * Optional inputs (Macaulay2Doc),:
      * Check => ..., default value false
      * Grading => ..., default value 2
      * Lift => ..., default value false
      * Variables => ..., default value s
  * Outputs:
      * E, a module (Macaulay2Doc), over a ring S made from ring
        presentation Rbar with codim Rbar new variables

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

Let Rbar = R/(f1..fc), a complete intersection of codimension c, and let M,N be
Rbar-modules. We assume that the pushForward of M to R has finite free
resolution. The script then computes the total Ext(M,N) as a module over S =
kk(s_1..s_c,gens R), using EisenbudShamashTotal.

If Check => true, then the result is compared with the built-in global Ext
written by Avramov and Grayson (but note the difference, explained below).

If Lift => false the result is returned over and extension of Rbar; if Lift =>
true the result is returned over and extension of R.

If Grading => 2, the default, then the result is bigraded (this is necessary
when Check=>true

The default Variables => symbol "s" gives the new variables the name s_i,
i=0..c-1. (note that the builtin Ext uses X_1..X_c.

On Some examples newExt is faster than Ext; on others it's slower.

A simple example: if R = k[x_1..x_n] and I is contained in the cube of the
maximal ideal, then Ext(k,k) is a free S/(x_1..x_n) = k[s_0..s_(c-1)]- module
with binomial(n,i) generators in degree i

+-----------------------------------------------------------------------------+
|i1 : n = 3;c=2;                                                              |
+-----------------------------------------------------------------------------+
|i3 : R = ZZ/101[x_0..x_(n-1)]                                                |
|                                                                             |
|o3 = R                                                                       |
|                                                                             |
|o3 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i4 : Rbar = R/(ideal apply(c, i-> R_i^3))                                    |
|                                                                             |
|o4 = Rbar                                                                    |
|                                                                             |
|o4 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i5 : Mbar = Nbar = coker vars Rbar                                           |
|                                                                             |
|o5 = cokernel | x_0 x_1 x_2 |                                                |
|                                                                             |
|                                  1                                          |
|o5 : Rbar-module, quotient of Rbar                                           |
+-----------------------------------------------------------------------------+
|i6 : E = newExt(Mbar,Nbar)                                                   |
|                                                                             |
|o6 = cokernel {0, 0}   | x_2 x_1 x_0 0   0   0   0   0   0   0   0   0   0   |
|              {-2, -2} | 0   0   0   0   0   0   0   0   0   0   0   0   x_2 |
|              {-2, -2} | 0   0   0   0   0   0   0   0   0   0   0   0   0   |
|              {-2, -2} | 0   0   0   0   0   0   0   0   0   0   0   0   0   |
|              {-1, -1} | 0   0   0   x_2 x_1 x_0 0   0   0   0   0   0   0   |
|              {-1, -1} | 0   0   0   0   0   0   x_2 x_1 x_0 0   0   0   0   |
|              {-1, -1} | 0   0   0   0   0   0   0   0   0   x_2 x_1 x_0 0   |
|              {-3, -3} | 0   0   0   0   0   0   0   0   0   0   0   0   0   |
|                                                                             |
|      ZZ                                     / ZZ                \           |
|     ---[s ..s , x ..x ]                     |---[s ..s , x ..x ]|           |
|     101  0   1   0   2                      |101  0   1   0   2 |8          |
|o6 : --------------------module, quotient of |-------------------|           |
|             3   3                           |        3   3      |           |
|           (x , x )                          |      (x , x )     |           |
|             0   1                           \        0   1      /           |
|-----------------------------------------------------------------------------|
|0   0   0   0   0   0   0   0   0   0   0   |                                |
|x_1 x_0 0   0   0   0   0   0   0   0   0   |                                |
|0   0   x_2 x_1 x_0 0   0   0   0   0   0   |                                |
|0   0   0   0   0   x_2 x_1 x_0 0   0   0   |                                |
|0   0   0   0   0   0   0   0   0   0   0   |                                |
|0   0   0   0   0   0   0   0   0   0   0   |                                |
|0   0   0   0   0   0   0   0   0   0   0   |                                |
|0   0   0   0   0   0   0   0   x_2 x_1 x_0 |                                |
+-----------------------------------------------------------------------------+
|i7 : tally degrees E                                                         |
|                                                                             |
|o7 = Tally{{-1, -1} => 3}                                                    |
|           {-2, -2} => 3                                                     |
|           {-3, -3} => 1                                                     |
|           {0, 0} => 1                                                       |
|                                                                             |
|o7 : Tally                                                                   |
+-----------------------------------------------------------------------------+
|i8 : annihilator E                                                           |
|                                                                             |
|o8 = ideal (x , x , x )                                                      |
|             2   1   0                                                       |
|                                                                             |
|               ZZ                                                            |
|              ---[s ..s , x ..x ]                                            |
|              101  0   1   0   2                                             |
|o8 : Ideal of -------------------                                            |
|                      3   3                                                  |
|                    (x , x )                                                 |
|                      0   1                                                  |
+-----------------------------------------------------------------------------+

An example where the built-in global Ext is hard to compare directly with our
method of computation: I *guess* that the sign choices in the built-in amount
essentially to a change of variable in the new variables, and spoil an easy
comparison. But for example the bi-graded Betti numbers are equal. this seems
to start with c=3.

+-----------------------------------------------------------------------------+
|i9 : setRandomSeed 0                                                         |
|                                                                             |
|o9 = 0                                                                       |
+-----------------------------------------------------------------------------+
|i10 : n = 3                                                                  |
|                                                                             |
|o10 = 3                                                                      |
+-----------------------------------------------------------------------------+
|i11 : c = 3                                                                  |
|                                                                             |
|o11 = 3                                                                      |
+-----------------------------------------------------------------------------+
|i12 : kk = ZZ/101                                                            |
|                                                                             |
|o12 = kk                                                                     |
|                                                                             |
|o12 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i13 : R = kk[x_0..x_(n-1)]                                                   |
|                                                                             |
|o13 = R                                                                      |
|                                                                             |
|o13 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i14 : I = ideal apply(c, i->R_i^2)                                           |
|                                                                             |
|              2   2   2                                                      |
|o14 = ideal (x , x , x )                                                     |
|              0   1   2                                                      |
|                                                                             |
|o14 : Ideal of R                                                             |
+-----------------------------------------------------------------------------+
|i15 : ff = gens I                                                            |
|                                                                             |
|o15 = | x_0^2 x_1^2 x_2^2 |                                                  |
|                                                                             |
|              1      3                                                       |
|o15 : Matrix R  <-- R                                                        |
+-----------------------------------------------------------------------------+
|i16 : Rbar = R/I                                                             |
|                                                                             |
|o16 = Rbar                                                                   |
|                                                                             |
|o16 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i17 : bar = map(Rbar, R)                                                     |
|                                                                             |
|o17 = map (Rbar, R, {x , x , x })                                            |
|                      0   1   2                                              |
|                                                                             |
|o17 : RingMap Rbar <-- R                                                     |
+-----------------------------------------------------------------------------+
|i18 : K = coker vars Rbar                                                    |
|                                                                             |
|o18 = cokernel | x_0 x_1 x_2 |                                               |
|                                                                             |
|                                   1                                         |
|o18 : Rbar-module, quotient of Rbar                                          |
+-----------------------------------------------------------------------------+
|i19 : Mbar = prune coker random(Rbar^2, Rbar^{-2,-2})                        |
|                                                                             |
|o19 = cokernel | x_0x_1+15x_0x_2+38x_1x_2 45x_0x_2+29x_1x_2        |         |
|               | 35x_0x_2-30x_1x_2        x_0x_1-10x_0x_2-22x_1x_2 |         |
|                                                                             |
|                                   2                                         |
|o19 : Rbar-module, quotient of Rbar                                          |
+-----------------------------------------------------------------------------+
|i20 : ES = newExt(Mbar,K,Lift => true)                                       |
|                                                                             |
|o20 = cokernel {0, 0}   | x_2 x_1 x_0 0   0   0   0   0   0   0   0   0   s_2|
|               {0, 0}   | 0   0   0   x_2 x_1 x_0 0   0   0   0   0   0   0  |
|               {-2, -3} | 0   0   0   0   0   0   0   0   0   0   0   0   0  |
|               {-2, -3} | 0   0   0   0   0   0   0   0   0   0   0   0   0  |
|               {-2, -3} | 0   0   0   0   0   0   0   0   0   0   0   0   0  |
|               {-2, -3} | 0   0   0   0   0   0   0   0   0   0   0   0   0  |
|               {-1, -2} | 0   0   0   0   0   0   x_2 x_1 x_0 0   0   0   0  |
|               {-1, -2} | 0   0   0   0   0   0   0   0   0   x_2 x_1 x_0 0  |
|                                                                             |
|                                                                 8           |
|o20 : kk[s ..s , x ..x ]-module, quotient of (kk[s ..s , x ..x ])            |
|          0   2   0   2                           0   2   0   2              |
|-----------------------------------------------------------------------------|
|s_1 s_0 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0            |
|0   0   s_2 s_1 s_0 0   0   0   0   0   0   0   0   0   0   0   0            |
|0   0   0   0   0   x_2 x_1 x_0 0   0   0   0   0   0   0   0   0            |
|0   0   0   0   0   0   0   0   x_2 x_1 x_0 0   0   0   0   0   0            |
|0   0   0   0   0   0   0   0   0   0   0   x_2 x_1 x_0 0   0   0            |
|0   0   0   0   0   0   0   0   0   0   0   0   0   0   x_2 x_1 x_0          |
|0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0            |
|0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0            |
|-----------------------------------------------------------------------------|
|0               0               0              0                             |
|0               0               0              0                             |
|s_0-11s_1-40s_2 -s_1            9s_1-23s_2     17s_1                         |
|45s_1-35s_2     38s_1           s_0-7s_1+15s_2 s_1                           |
|-10s_1-26s_2    s_0+49s_1-40s_2 34s_1+4s_2     9s_1-23s_2                    |
|50s_1-s_2       45s_1-35s_2     10s_1+26s_2    s_0-48s_1+15s_2               |
|0               0               0              0                             |
|0               0               0              0                             |
|-----------------------------------------------------------------------------|
|0                                                                            |
|0                                                                            |
|0                                                                            |
|0                                                                            |
|0                                                                            |
|0                                                                            |
|s_0^2+42s_0s_1-30s_1^2-25s_0s_2-35s_1s_2+9s_2^2                              |
|0                                                                            |
|-----------------------------------------------------------------------------|
|0                                               |                            |
|0                                               |                            |
|0                                               |                            |
|0                                               |                            |
|0                                               |                            |
|0                                               |                            |
|0                                               |                            |
|s_0^2+42s_0s_1-30s_1^2-25s_0s_2-35s_1s_2+9s_2^2 |                            |
+-----------------------------------------------------------------------------+
|i21 : S = ring ES                                                            |
|                                                                             |
|o21 = S                                                                      |
|                                                                             |
|o21 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+

compare with the built-in Ext

+---------------------------------------------------------+
|i22 : EE = Ext(Mbar,K);                                  |
+---------------------------------------------------------+
|i23 : S' = ring EE -- note that S' is the polynomial ring|
|                                                         |
|o23 = S'                                                 |
|                                                         |
|o23 : PolynomialRing                                     |
+---------------------------------------------------------+

The two versions of Ext appear to be the same up to change of variables:

+--------------------------------------------------------------------+
|i24 : A = res ES                                                    |
|                                                                    |
|       8      36      66      64      36      12      2             |
|o24 = S  <-- S   <-- S   <-- S   <-- S   <-- S   <-- S  <-- 0       |
|                                                                    |
|      0      1       2       3       4       5       6      7       |
|                                                                    |
|o24 : ChainComplex                                                  |
+--------------------------------------------------------------------+
|i25 : B = res EE                                                    |
|                                                                    |
|        8       36       66       64       36       12       2      |
|o25 = S'  <-- S'   <-- S'   <-- S'   <-- S'   <-- S'   <-- S'  <-- 0|
|                                                                    |
|      0       1        2        3        4        5        6       7|
|                                                                    |
|o25 : ChainComplex                                                  |
+--------------------------------------------------------------------+
|i26 : all(length A+1, i-> sort degrees A_i == sort degrees B_i)     |
|                                                                    |
|o26 = true                                                          |
+--------------------------------------------------------------------+

but they have apparently different annihilators

+---------------------------------------------------------------------+
|i27 : ann EE                                                         |
|                                                                     |
|                          2               2                        2 |
|o27 = ideal (x , x , x , X  + 41X X  - 37X  - 14X X  - 29X X  + 45X )|
|              2   1   0   1      1 2      2      1 3      2 3      3 |
|                                                                     |
|o27 : Ideal of S'                                                    |
+---------------------------------------------------------------------+
|i28 : ann ES                                                         |
|                                                                     |
|                          2               2                       2  |
|o28 = ideal (x , x , x , s  + 42s s  - 30s  - 25s s  - 35s s  + 9s ) |
|              2   1   0   0      0 1      1      0 2      1 2     2  |
|                                                                     |
|o28 : Ideal of S                                                     |
+---------------------------------------------------------------------+

and in fact they are not isomorphic:

+-----------------------------------------------------------------------------+
|i29 : EEtoES = map(ring ES,ring EE, gens ring ES)                            |
|                                                                             |
|o29 = map (S, S', {s , s , s , x , x , x })                                  |
|                    0   1   2   0   1   2                                    |
|                                                                             |
|o29 : RingMap S <-- S'                                                       |
+-----------------------------------------------------------------------------+
|i30 : EE' = coker EEtoES presentation EE                                     |
|                                                                             |
|o30 = cokernel {0, 0}   | x_2 x_1 x_0 0   0   0   0   0   0   0   0   0   s_2|
|               {0, 0}   | 0   0   0   x_2 x_1 x_0 0   0   0   0   0   0   0  |
|               {-1, -2} | 0   0   0   0   0   0   x_2 x_1 x_0 0   0   0   0  |
|               {-1, -2} | 0   0   0   0   0   0   0   0   0   x_2 x_1 x_0 0  |
|               {-2, -3} | 0   0   0   0   0   0   0   0   0   0   0   0   0  |
|               {-2, -3} | 0   0   0   0   0   0   0   0   0   0   0   0   0  |
|               {-2, -3} | 0   0   0   0   0   0   0   0   0   0   0   0   0  |
|               {-2, -3} | 0   0   0   0   0   0   0   0   0   0   0   0   0  |
|                                                                             |
|                             8                                               |
|o30 : S-module, quotient of S                                                |
|-----------------------------------------------------------------------------|
|s_1 s_0 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0            |
|0   0   s_2 s_1 s_0 0   0   0   0   0   0   0   0   0   0   0   0            |
|0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0            |
|0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0            |
|0   0   0   0   0   x_2 x_1 x_0 0   0   0   0   0   0   0   0   0            |
|0   0   0   0   0   0   0   0   x_2 x_1 x_0 0   0   0   0   0   0            |
|0   0   0   0   0   0   0   0   0   0   0   x_2 x_1 x_0 0   0   0            |
|0   0   0   0   0   0   0   0   0   0   0   0   0   0   x_2 x_1 x_0          |
|-----------------------------------------------------------------------------|
|0               0               0               0                            |
|0               0               0               0                            |
|0               0               0               0                            |
|0               0               0               0                            |
|s_0-18s_1-32s_2 -27s_1+25s_2    42s_1           -22s_1                       |
|23s_1-41s_2     s_0-42s_1+18s_2 -45s_1          -42s_1                       |
|-42s_2          22s_2           s_0-18s_1-32s_2 -27s_1+25s_2                 |
|45s_2           42s_2           23s_1-41s_2     s_0-42s_1+18s_2              |
|-----------------------------------------------------------------------------|
|0                                                                            |
|0                                                                            |
|s_0^2+41s_0s_1-37s_1^2-14s_0s_2-29s_1s_2+45s_2^2                             |
|0                                                                            |
|0                                                                            |
|0                                                                            |
|0                                                                            |
|0                                                                            |
|-----------------------------------------------------------------------------|
|0                                                |                           |
|0                                                |                           |
|0                                                |                           |
|s_0^2+41s_0s_1-37s_1^2-14s_0s_2-29s_1s_2+45s_2^2 |                           |
|0                                                |                           |
|0                                                |                           |
|0                                                |                           |
|0                                                |                           |
+-----------------------------------------------------------------------------+
|i31 : H = Hom(EE',ES);                                                       |
+-----------------------------------------------------------------------------+
|i32 : Q = positions(degrees target presentation H, i-> i == {0,0})           |
|                                                                             |
|o32 = {8, 9, 10, 11}                                                         |
|                                                                             |
|o32 : List                                                                   |
+-----------------------------------------------------------------------------+
|i33 : f = sum(Q, p-> random (S^1, S^1)**homomorphism H_{p})                  |
|                                                                             |
|o33 = {0, 0}   | -38 39 0 0 0 0 0 0 |                                        |
|      {0, 0}   | -16 21 0 0 0 0 0 0 |                                        |
|      {-2, -3} | 0   0  0 0 0 0 0 0 |                                        |
|      {-2, -3} | 0   0  0 0 0 0 0 0 |                                        |
|      {-2, -3} | 0   0  0 0 0 0 0 0 |                                        |
|      {-2, -3} | 0   0  0 0 0 0 0 0 |                                        |
|      {-1, -2} | 0   0  0 0 0 0 0 0 |                                        |
|      {-1, -2} | 0   0  0 0 0 0 0 0 |                                        |
|                                                                             |
|o33 : Matrix ES <-- EE'                                                      |
+-----------------------------------------------------------------------------+

If EE and ES were isomorphic, we would expect coker f to be 0, and it's not.
prune coker f

See also
========

  * Ext (Macaulay2Doc) -- compute an Ext module
  * EisenbudShamashTotal -- Precursor complex of
    total Ext

Ways to use newExt:
===================

  * "newExt(Module,Module)"

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

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

oddExtModule -- odd part of Ext^*(M,k) over a complete intersection as module over CI operator ring
***************************************************************************************************

Synopsis
========

  * Usage:
        E = oddExtModule M
  * Inputs:
      * M, a module (Macaulay2Doc), over a complete intersection
        ring
  * Optional inputs (Macaulay2Doc),:
      * OutRing => ..., default value 0
  * Outputs:
      * E, a module (Macaulay2Doc), over a polynomial ring with
        gens in degree 1

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

Extracts the odd degree part from ExtModule M. If the optional argument OutRing
=> T is given, and class T === PolynomialRing, then the output will be a module
over T.

+---------------------------------------------------------+
|i1 : kk= ZZ/101                                          |
|                                                         |
|o1 = kk                                                  |
|                                                         |
|o1 : QuotientRing                                        |
+---------------------------------------------------------+
|i2 : S = kk[x,y,z]                                       |
|                                                         |
|o2 = S                                                   |
|                                                         |
|o2 : PolynomialRing                                      |
+---------------------------------------------------------+
|i3 : I2 = ideal"x3,yz"                                   |
|                                                         |
|             3                                           |
|o3 = ideal (x , y*z)                                     |
|                                                         |
|o3 : Ideal of S                                          |
+---------------------------------------------------------+
|i4 : R2 = S/I2                                           |
|                                                         |
|o4 = R2                                                  |
|                                                         |
|o4 : QuotientRing                                        |
+---------------------------------------------------------+
|i5 : M2 = R2^1/ideal"x2,y,z"                             |
|                                                         |
|o5 = cokernel | x2 y z |                                 |
|                                                         |
|                              1                          |
|o5 : R2-module, quotient of R2                           |
+---------------------------------------------------------+
|i6 : betti res (M2, LengthLimit =>10)                    |
|                                                         |
|            0 1 2 3 4  5  6  7  8  9 10                  |
|o6 = total: 1 3 5 7 9 11 13 15 17 19 21                  |
|         0: 1 2 2 2 2  2  2  2  2  2  2                  |
|         1: . 1 3 4 4  4  4  4  4  4  4                  |
|         2: . . . 1 3  4  4  4  4  4  4                  |
|         3: . . . . .  1  3  4  4  4  4                  |
|         4: . . . . .  .  .  1  3  4  4                  |
|         5: . . . . .  .  .  .  .  1  3                  |
|                                                         |
|o6 : BettiTally                                          |
+---------------------------------------------------------+
|i7 : E = ExtModule M2                                    |
|                                                         |
|                 8                                       |
|o7 = (kk[X ..X ])                                        |
|          0   1                                          |
|                                                         |
|o7 : kk[X ..X ]-module, free, degrees {0..1, 2:1, 3:2, 3}|
|         0   1                                           |
+---------------------------------------------------------+
|i8 : apply(toList(0..10), i->hilbertFunction(i, E))      |
|                                                         |
|o8 = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21}             |
|                                                         |
|o8 : List                                                |
+---------------------------------------------------------+
|i9 : Eodd = oddExtModule M2                              |
|                                                         |
|                 4                                       |
|o9 = (kk[X ..X ])                                        |
|          0   1                                          |
|                                                         |
|o9 : kk[X ..X ]-module, free, degrees {3:0, 1}           |
|         0   1                                           |
+---------------------------------------------------------+
|i10 : apply(toList(0..5), i->hilbertFunction(i, Eodd))   |
|                                                         |
|o10 = {3, 7, 11, 15, 19, 23}                             |
|                                                         |
|o10 : List                                               |
+---------------------------------------------------------+

See also
========

  * ExtModule -- Ext^*(M,k) over a complete intersection as
    module over CI operator ring
  * evenExtModule -- even part of Ext^*(M,k) over a
    complete intersection as module over CI operator ring
  * OutRing -- Option allowing specification of the ring over
    which the output is defined

Ways to use oddExtModule:
=========================

  * "oddExtModule(Module)"

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

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

Optimism -- Option to highSyzygy
********************************

Synopsis
========

  * Usage:
        highSyzygy(M, Optimism => 1)
  * Inputs:
      * Optimism, an integer (Macaulay2Doc),

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

If highSyzygy(M) chooses the p-th syzygy, then highSyzygy(M,Optimism=>r)
chooses the (p-r)-th syzygy. (Positive Optimism chooses a lower "high" syzygy,
negative Optimism a higher "high" syzygy.

Caveat
======

Are there cases when positive Optimism is justified?

See also
========

  * mfBound -- determines how high a syzygy to take for
    "matrixFactorization"
  * highSyzygy -- Returns a syzygy module one beyond the
    regularity of Ext(M,k)

Functions with optional argument named Optimism:
================================================

  * "highSyzygy(...,Optimism=>...)" -- see highSyzygy, --
    Returns a syzygy module one beyond the regularity of Ext(M,k)
  * "twoMonomials(...,Optimism=>...)" -- see twoMonomials,
    -- tally the sequences of BRanks for certain examples

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

The object Optimism, is a symbol (Macaulay2Doc).

OutRing -- Option allowing specification of the ring over which the output is defined
*************************************************************************************

See also
========

  * evenExtModule -- even part of Ext^*(M,k) over a
    complete intersection as module over CI operator ring
  * oddExtModule -- odd part of Ext^*(M,k) over a complete
    intersection as module over CI operator ring

Functions with optional argument named OutRing:
===============================================

  * "evenExtModule(...,OutRing=>...)" -- see evenExtModule,
    -- even part of Ext^*(M,k) over a complete intersection as
    module over CI operator ring
  * "oddExtModule(...,OutRing=>...)" -- see oddExtModule,
    -- odd part of Ext^*(M,k) over a complete intersection as module over CI
    operator ring

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

The object OutRing, is a symbol (Macaulay2Doc).

psiMaps -- list the maps  psi(p): B_1(p) --> A_0(p-1) in a matrixFactorization
******************************************************************************

Synopsis
========

  * Usage:
        psmaps = psiMaps mf
  * Inputs:
      * mf, a list (Macaulay2Doc), output of a matrixFactorization
        computation
  * Outputs:
      * psmaps, a list (Macaulay2Doc), list matrices $d_p:
        B_1(p)\to A_0(p-1)$

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

See the documentation for matrixFactorization for an example.

See also
========

  * matrixFactorization -- Maps in a higher
    codimension matrix factorization
  * BRanks -- ranks of the modules B_i(d) in a
    matrixFactorization
  * bMaps -- list the maps  d_p:B_1(p)-->B_0(p) in a
    matrixFactorization
  * dMaps -- list the maps  d(p):A_1(p)--> A_0(p) in a
    matrixFactorization
  * hMaps -- list the maps  h(p): A_0(p)--> A_1(p) in a
    matrixFactorization

Ways to use psiMaps:
====================

  * "psiMaps(List)"

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

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

regularitySequence -- regularity of Ext modules for a sequence of MCM approximations
************************************************************************************

Synopsis
========

  * Usage:
        L = regularitySequence (R,M)
  * Inputs:
      * R, a list (Macaulay2Doc), list of rings R_i =
        S/(f_0..f_{(i-1)}), complete intersections
      * M, a module (Macaulay2Doc), module over R_c where c =
        length R - 1.
  * Outputs:
      * L, a list (Macaulay2Doc), List of pairs {regularity
        evenExtModule M_i, regularity oddExtModule M_i)

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

Computes the non-free parts M_i of the MCM approximation to M over R_i,
stopping when M_i becomes free, and returns the list whose elements are the
pairs of regularities, starting with M_{(c-1)} Note that the first pair is for
the

+--------------------------------------------------------------+
|i1 : c = 3;d=2                                                |
|                                                              |
|o2 = 2                                                        |
+--------------------------------------------------------------+
|i3 : R = setupRings(c,d);                                     |
+--------------------------------------------------------------+
|i4 : Rc = R_c                                                 |
|                                                              |
|o4 = Rc                                                       |
|                                                              |
|o4 : QuotientRing                                             |
+--------------------------------------------------------------+
|i5 : M = coker matrix{{Rc_0,Rc_1,Rc_2},{Rc_1,Rc_2,Rc_0}}      |
|                                                              |
|o5 = cokernel | x_0 x_1 x_2 |                                 |
|              | x_1 x_2 x_0 |                                 |
|                                                              |
|                              2                               |
|o5 : Rc-module, quotient of Rc                                |
+--------------------------------------------------------------+
|i6 : regularitySequence(R,M)                                  |
|reg even ext, soc degs even ext, reg odd ext, soc degs odd ext|
|                                                              |
|{3, {1, 1, 1}, 2, {1, 1}}                                     |
|{2, {0, 0, 0, 1}, 2, {0, 0, 0}}                               |
|{0, {}, 0, {}}                                                |
+--------------------------------------------------------------+

See also
========

  * approximation (MCMApproximations) -- returns pair of
    components of the map from the MCM approximation
  * auslanderInvariant (MCMApproximations), --
    measures failure of surjectivity of the essential MCM approximation

Ways to use regularitySequence:
===============================

  * "regularitySequence(List,Module)"

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

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

S2 -- Universal map to a module satisfying Serre's condition S2
***************************************************************

Synopsis
========

  * Usage:
        f = S2(b,M)
  * Inputs:
      * b, an integer (Macaulay2Doc), degree bound to which to carry
        the computation
      * M, a module (Macaulay2Doc),
  * Outputs:
      * f, a matrix (Macaulay2Doc), defining a map M-->M' that
        agrees with the S2-ification of M in degrees $\geq b$

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

If M is a graded module over a ring S, then the S2-ification of M is \sum_{d
\in ZZ} H^0((sheaf M)(d)), which may be computed as lim_{d->\infty} Hom(I_d,M),
where I_d is any sequence of ideals contained in higher and higher powers of
S_+. There is a natural restriction map f: M = Hom(S,M) \to Hom(I_d,M). We
compute all this using the ideals I_d generated by the d-th powers of the
variables in S.

Since the result may not be finitely generated (this happens if and only if M
has an associated prime of dimension 1), we compute only up to a specified
degree bound b. For the result to be correct down to degree b, it is sufficient
to compute Hom(I,M) where I \subset (S_+)^{r-b}.

+-----------------------------------------------------------------------------+
|i1 : kk=ZZ/101                                                               |
|                                                                             |
|o1 = kk                                                                      |
|                                                                             |
|o1 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i2 : S = kk[a,b,c,d]                                                         |
|                                                                             |
|o2 = S                                                                       |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : M = truncate(3,S^1)                                                     |
|                                                                             |
|o3 = image | d3 cd2 bd2 ad2 c2d bcd acd b2d abd a2d c3 bc2 ac2 b2c abc a2c b3|
|                                                                             |
|                             1                                               |
|o3 : S-module, submodule of S                                                |
|-----------------------------------------------------------------------------|
|ab2 a2b a3 |                                                                 |
+-----------------------------------------------------------------------------+
|i4 : betti matrix S2(0,M)                                                    |
|                                                                             |
|            0  1                                                             |
|o4 = total: 1 20                                                             |
|         0: 1  .                                                             |
|         1: .  .                                                             |
|         2: . 20                                                             |
|                                                                             |
|o4 : BettiTally                                                              |
+-----------------------------------------------------------------------------+
|i5 : betti matrix S2(1,M)                                                    |
|                                                                             |
|            0  1                                                             |
|o5 = total: 1 20                                                             |
|         0: 1  .                                                             |
|         1: .  .                                                             |
|         2: . 20                                                             |
|                                                                             |
|o5 : BettiTally                                                              |
+-----------------------------------------------------------------------------+
|i6 : M = S^1/intersect(ideal"a,b,c", ideal"b,c,d",ideal"c,d,a",ideal"d,a,b") |
|                                                                             |
|o6 = cokernel | cd bd ad bc ac ab |                                          |
|                                                                             |
|                            1                                                |
|o6 : S-module, quotient of S                                                 |
+-----------------------------------------------------------------------------+
|i7 : prune source S2(0,M)                                                    |
|                                                                             |
|o7 = cokernel | cd bd ad bc ac ab |                                          |
|                                                                             |
|                            1                                                |
|o7 : S-module, quotient of S                                                 |
+-----------------------------------------------------------------------------+
|i8 : prune target S2(0,M)                                                    |
|                                                                             |
|o8 = cokernel {-1} | d c b 0 0 0 0 0 0 0 0 0 |                               |
|              {-1} | 0 0 0 d c a 0 0 0 0 0 0 |                               |
|              {-1} | 0 0 0 0 0 0 d b a 0 0 0 |                               |
|              {-1} | 0 0 0 0 0 0 0 0 0 c b a |                               |
|                                                                             |
|                            4                                                |
|o8 : S-module, quotient of S                                                 |
+-----------------------------------------------------------------------------+

At one time DE hoped that, if M were a module over the complete intersection R
with residue field k, then the natural map from "complete" Ext module "(widehat
Ext)_R(M,k)" to the S2-ification of Ext_R(M,k) would be surjective;
equivalently, if N were a sufficiently negative syzygy of M, then the first
local cohomology module of Ext_R(M,k) would be zero. This is false, as shown by
the following example:

+----------------------------------------------+
|i9 : S = ZZ/101[x_0..x_2];                    |
+----------------------------------------------+
|i10 : ff = apply(3, i->x_i^2);                |
+----------------------------------------------+
|i11 : R = S/ideal ff;                         |
+----------------------------------------------+
|i12 : M = cokernel matrix {{x_0, x_1*x_2}};   |
+----------------------------------------------+
|i13 : b = 5;                                  |
+----------------------------------------------+
|i14 : Mb = prune syzygyModule(-b,M);          |
+----------------------------------------------+
|i15 : E = prune evenExtModule Mb;             |
+----------------------------------------------+
|i16 : S2map = S2(0,E);                        |
|                                              |
|o16 : Matrix                                  |
+----------------------------------------------+
|i17 : SE = prune target S2map;                |
+----------------------------------------------+
|i18 : extra = prune coker S2map;              |
+----------------------------------------------+
|i19 : KE = prune ker S2map;                   |
+----------------------------------------------+
|i20 : betti res(Mb, LengthLimit => 10)        |
|                                              |
|              0  1 2 3 4 5 6 7 8  9 10        |
|o20 = total: 20 14 9 5 2 1 2 4 7 11 16        |
|         -6: 20 14 9 5 2 . . . .  .  .        |
|         -5:  .  . . . . 1 1 1 1  1  1        |
|         -4:  .  . . . . . 1 3 6 10 15        |
|                                              |
|o20 : BettiTally                              |
+----------------------------------------------+
|i21 : apply (5, i-> hilbertFunction(i, KE))   |
|                                              |
|o21 = {20, 9, 2, 0, 0}                        |
|                                              |
|o21 : List                                    |
+----------------------------------------------+
|i22 : apply (5, i-> hilbertFunction(i, E))    |
|                                              |
|o22 = {20, 9, 2, 2, 7}                        |
|                                              |
|o22 : List                                    |
+----------------------------------------------+
|i23 : apply (5, i-> hilbertFunction(i, SE))   |
|                                              |
|o23 = {1, 1, 1, 2, 7}                         |
|                                              |
|o23 : List                                    |
+----------------------------------------------+
|i24 : apply (5, i-> hilbertFunction(i, extra))|
|                                              |
|o24 = {1, 1, 1, 0, 0}                         |
|                                              |
|o24 : List                                    |
+----------------------------------------------+

Caveat
======

Text S2-ification is related to computing cohomology and to computing integral
closure; there are scripts in those packages that produce an S2-ification, but
one takes a ring as argument and the other doesn't produce the comparison map.

See also
========

  * IntegralClosure -- routines for integral
    closure of affine domains and ideals
  * makeS2 (IntegralClosure) -- compute the S2ification of a
    reduced ring
  * BGG -- Bernstein-Gel'fand-Gel'fand correspondence
  * cohomology (Macaulay2Doc) -- general cohomology functor
  * HH^ZZ SumOfTwists (missing documentation)

Ways to use S2:
===============

  * "S2(ZZ,Module)"

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

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

Shamash -- Computes the Shamash Complex
***************************************

Synopsis
========

  * Usage:
        FF = Shamash(ff,F,len)
        FF = Shamash(Rbar,F,len)
  * Inputs:
      * ff, a matrix (Macaulay2Doc), 1 x 1 Matrix over ring F.
      * Rbar, a ring (Macaulay2Doc), ring F mod ideal ff
      * F, a chain complex (Macaulay2Doc), defined over
        ring ff
      * len, an integer (Macaulay2Doc),
  * Outputs:
      * FF, a chain complex (Macaulay2Doc), chain complex
        over (ring F)/(ideal ff)

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

Let R = ring F = ring ff, and Rbar = R/(ideal f), where ff = matrix{{f}} is a
1x1 matrix whose entry is a nonzerodivisor in R. The complex F should admit a
system of higher homotopies for the entry of ff, returned by the call
makeHomotopies(ff,F).

The complex FF has terms

FF_{2*i} = Rbar**(F_0 ++ F_2 ++ .. ++ F_i)

FF_{2*i+1} = Rbar**(F_1 ++ F_3 ++..++F_{2*i+1})

and maps made from the higher homotopies.

For the case of a complete intersection of higher codimension, or to see the
components of the resolution as summands of FF_j, use the routine
EisenbudShamash instead.

+----------------------------------------------------+
|i1 : S = ZZ/101[x,y,z]                              |
|                                                    |
|o1 = S                                              |
|                                                    |
|o1 : PolynomialRing                                 |
+----------------------------------------------------+
|i2 : R = S/ideal"x3,y3"                             |
|                                                    |
|o2 = R                                              |
|                                                    |
|o2 : QuotientRing                                   |
+----------------------------------------------------+
|i3 : M = R^1/ideal(x,y,z)                           |
|                                                    |
|o3 = cokernel | x y z |                             |
|                                                    |
|                            1                       |
|o3 : R-module, quotient of R                        |
+----------------------------------------------------+
|i4 : F = res M                                      |
|                                                    |
|      1      3      5      7      9                 |
|o4 = R  <-- R  <-- R  <-- R  <-- R                  |
|                                                    |
|     0      1      2      3      4                  |
|                                                    |
|o4 : ChainComplex                                   |
+----------------------------------------------------+
|i5 : ff = matrix{{z^3}}                             |
|                                                    |
|o5 = | z3 |                                         |
|                                                    |
|             1      1                               |
|o5 : Matrix R  <-- R                                |
+----------------------------------------------------+
|i6 : R1 = R/ideal ff                                |
|                                                    |
|o6 = R1                                             |
|                                                    |
|o6 : QuotientRing                                   |
+----------------------------------------------------+
|i7 : betti F                                        |
|                                                    |
|            0 1 2 3 4                               |
|o7 = total: 1 3 5 7 9                               |
|         0: 1 3 3 1 .                               |
|         1: . . 2 6 6                               |
|         2: . . . . 3                               |
|                                                    |
|o7 : BettiTally                                     |
+----------------------------------------------------+
|i8 : FF = Shamash(ff,F,4)                           |
|                                                    |
|     / R\1     / R\3     / R\6     / R\10     / R\15|
|o8 = |--|  <-- |--|  <-- |--|  <-- |--|   <-- |--|  |
|     | 3|      | 3|      | 3|      | 3|       | 3|  |
|     \z /      \z /      \z /      \z /       \z /  |
|                                                    |
|     0         1         2         3          4     |
|                                                    |
|o8 : ChainComplex                                   |
+----------------------------------------------------+
|i9 : GG = Shamash(R1,F,4)                           |
|                                                    |
|       1       3       6       10       15          |
|o9 = R1  <-- R1  <-- R1  <-- R1   <-- R1            |
|                                                    |
|     0       1       2       3        4             |
|                                                    |
|o9 : ChainComplex                                   |
+----------------------------------------------------+
|i10 : betti FF                                      |
|                                                    |
|             0 1 2  3  4                            |
|o10 = total: 1 3 6 10 15                            |
|          0: 1 3 3  1  .                            |
|          1: . . 3  9  9                            |
|          2: . . .  .  6                            |
|                                                    |
|o10 : BettiTally                                    |
+----------------------------------------------------+
|i11 : betti GG                                      |
|                                                    |
|             0 1 2  3  4                            |
|o11 = total: 1 3 6 10 15                            |
|          0: 1 3 3  1  .                            |
|          1: . . 3  9  9                            |
|          2: . . .  .  6                            |
|                                                    |
|o11 : BettiTally                                    |
+----------------------------------------------------+
|i12 : ring GG                                       |
|                                                    |
|o12 = R1                                            |
|                                                    |
|o12 : QuotientRing                                  |
+----------------------------------------------------+
|i13 : apply(length GG, i->prune HH_i FF)            |
|                                                    |
|o13 = {cokernel | z y x |, 0, 0, 0}                 |
|                                                    |
|o13 : List                                          |
+----------------------------------------------------+

Caveat
======

F is assumed to be a homological complex starting from F_0. The matrix ff must
be 1x1.

See also
========

  * EisenbudShamash -- Computes the Eisenbud-Shamash
    Complex
  * makeHomotopies -- returns a system of higher
    homotopies

Ways to use Shamash:
====================

  * "Shamash(Matrix,ChainComplex,ZZ)"
  * "Shamash(Ring,ChainComplex,ZZ)"

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

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

splittings -- compute the splittings of a split right exact sequence
********************************************************************

Synopsis
========

  * Usage:
        x = splittings(a,b)
  * Inputs:
      * a, a matrix (Macaulay2Doc), maps into the kernel of b
      * b, a matrix (Macaulay2Doc), representing a surjection
        from target a to a free module
  * Outputs:
      * L, a list (Macaulay2Doc), L = \{sigma,tau\}, splittings of
        a,b respectively

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

Assuming that (a,b) are the maps of a right exact sequence

$0\to A\to B\to C \to 0$

with B, C free, the script produces a pair of maps sigma, tau with $tau: C \to
B$ a splitting of b and $sigma: B \to A$ a splitting of a; that is,

$a*sigma+tau*b = 1_B$

$sigma*a = 1_A$

$b*tau = 1_C$

+--------------------------------------------------------------------------+
|i1 : kk= ZZ/101                                                           |
|                                                                          |
|o1 = kk                                                                   |
|                                                                          |
|o1 : QuotientRing                                                         |
+--------------------------------------------------------------------------+
|i2 : S = kk[x,y,z]                                                        |
|                                                                          |
|o2 = S                                                                    |
|                                                                          |
|o2 : PolynomialRing                                                       |
+--------------------------------------------------------------------------+
|i3 : setRandomSeed 0                                                      |
|                                                                          |
|o3 = 0                                                                    |
+--------------------------------------------------------------------------+
|i4 : t = random(S^{2:-1,2:-2}, S^{3:-1,4:-2})                             |
|                                                                          |
|o4 = {1} | 24  -36 -30 39x-43y+45z  21x-15y-34z 34x-28y-48z  19x-47y-47z ||
|     {1} | -29 19  19  -47x+38y+47z -39x+2y+19z -18x+16y-16z -13x+22y+7z ||
|     {2} | 0   0   0   -10          -29         -8           -22         ||
|     {2} | 0   0   0   -29          -24         -38          -16         ||
|                                                                          |
|             4      7                                                     |
|o4 : Matrix S  <-- S                                                      |
+--------------------------------------------------------------------------+
|i5 : ss = splittings(syz t, t)                                            |
|                                                                          |
|o5 = {{1} | 0 0 1 0 0 0   0  |, {1} | -27 2  13x-10y+43z 50x-34y-50z |}   |
|      {2} | 0 0 0 0 0 -31 -6 |  {1} | -4  35 22x+32y+43z -7x-8y-27z  |    |
|      {2} | 0 0 0 0 0 29  9  |  {1} | 0   0  0           0           |    |
|                                {2} | 0   0  -25         26          |    |
|                                {2} | 0   0  26          -2          |    |
|                                {2} | 0   0  0           0           |    |
|                                {2} | 0   0  0           0           |    |
|                                                                          |
|o5 : List                                                                 |
+--------------------------------------------------------------------------+
|i6 : ss/betti                                                             |
|                                                                          |
|             0 1         0 1                                              |
|o6 = {total: 3 7, total: 7 4}                                             |
|          0: . 3      0: . 2                                              |
|          1: 1 4      1: 3 2                                              |
|          2: 2 .      2: 4 .                                              |
|                                                                          |
|o6 : List                                                                 |
+--------------------------------------------------------------------------+

Ways to use splittings:
=======================

  * "splittings(Matrix,Matrix)"

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

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

stableHom -- map from Hom(M,N) to the stable Hom module
*******************************************************

Synopsis
========

  * Usage:
        p = stableHom(M,N)
  * Inputs:
      * M, a module (Macaulay2Doc),
      * N, a module (Macaulay2Doc),
  * Outputs:
      * p, a matrix (Macaulay2Doc), projection from Hom(M,N) to
        the stable Hom

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

The stable Hom is Hom(M,N)/T where T is the submodule of homomorphisms that
factor through a free cover of N (or, equivalently, through any projective)

See also
========

  * isStablyTrivial -- returns true if the map goes to
    0 under stableHom

Ways to use stableHom:
======================

  * "stableHom(Module,Module)"

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

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

sumTwoMonomials -- tally the sequences of BRanks for certain examples
*********************************************************************

Synopsis
========

  * Usage:
        sumTwoMonomials(c,d)
  * Inputs:
      * c, an integer (Macaulay2Doc), codimension in which to work
      * d, an integer (Macaulay2Doc), degree of the monomials to take
  * Outputs:
      * T, a tally (Macaulay2Doc),

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

tallies the sequences of B-ranks that occur for sums of pairs of monomials in R
= S/(d-th powers of the variables), with full complexity (=c); that is, for an
appropriate syzygy M of M0 = R/(m1+m2) where m1 and m2 are monomials of the
same degree.

+--------------------------------------------------------+
|i1 : setRandomSeed 0                                    |
|                                                        |
|o1 = 0                                                  |
+--------------------------------------------------------+
|i2 : sumTwoMonomials(2,3)                               |
| -- used 0.505714s (cpu); 0.340609s (thread); 0s (gc)   |
| -- used 0.183512s (cpu); 0.118262s (thread); 0s (gc)   |
| -- used 9.8837e-05s (cpu); 1.789e-06s (thread); 0s (gc)|
|2                                                       |
|Tally{{{2, 2}, {1, 2}} => 3}                            |
|                                                        |
|3                                                       |
|Tally{{{2, 2}, {1, 2}} => 1}                            |
|                                                        |
|4                                                       |
|Tally{}                                                 |
+--------------------------------------------------------+

See also
========

  * twoMonomials -- tally the sequences of BRanks for
    certain examples

Ways to use sumTwoMonomials:
============================

  * "sumTwoMonomials(ZZ,ZZ)"

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

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

TateResolution -- TateResolution of a module over an exterior algebra
*********************************************************************

Synopsis
========

  * Usage:
        F = TateResolution(M,lower,upper)
  * Inputs:
      * M, a module (Macaulay2Doc),
      * lower, an integer (Macaulay2Doc),
      * upper, an integer (Macaulay2Doc), lower and upper bounds for
        the resolution
  * Outputs:
      * F, a chain complex (Macaulay2Doc),

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

Forms an interval, lower..upper, of a doubly infinite free resolution of a a
Cohen-Macaulay module over a Gorenstein ring, such as any module over an
exterior algebra (actually, any module over any ring.)

+-----------------------------------------------------------------------------+
|i1 : E = ZZ/101[a,b,c, SkewCommutative=>true]                                |
|                                                                             |
|o1 = E                                                                       |
|                                                                             |
|o1 : PolynomialRing, 3 skew commutative variable(s)                          |
+-----------------------------------------------------------------------------+
|i2 : M = coker map(E^2, E^{-1}, matrix"ab;bc")                               |
|                                                                             |
|o2 = cokernel | ab |                                                         |
|              | bc |                                                         |
|                                                                             |
|                            2                                                |
|o2 : E-module, quotient of E                                                 |
+-----------------------------------------------------------------------------+
|i3 : presentation M                                                          |
|                                                                             |
|o3 = | ab |                                                                  |
|     | bc |                                                                  |
|                                                                             |
|             2      1                                                        |
|o3 : Matrix E  <-- E                                                         |
+-----------------------------------------------------------------------------+
|i4 : TateResolution(M,-2,7)                                                  |
|                                                                             |
|      9      5      2      1      2      4      7      11      16      22    |
|o4 = E  <-- E  <-- E  <-- E  <-- E  <-- E  <-- E  <-- E   <-- E   <-- E   <--|
|                                                                             |
|     -2     -1     0      1      2      3      4      5       6       7      |
|                                                                             |
|o4 : ChainComplex                                                            |
|-----------------------------------------------------------------------------|
|0                                                                            |
|                                                                             |
|8                                                                            |
+-----------------------------------------------------------------------------+

Caveat
======

In a previous version of this script, this command returned a betti table; now
use "betti TateResolution" instead.

Ways to use TateResolution:
===========================

  * "TateResolution(Module)"
  * "TateResolution(Module,ZZ)"
  * "TateResolution(Module,ZZ,ZZ)"

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

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

tensorWithComponents -- forms the tensor product, preserving direct sum information
***********************************************************************************

Synopsis
========

  * Usage:
        T = tensor(M,N)
  * Inputs:
      * M, a module (Macaulay2Doc),
      * N, a module (Macaulay2Doc),
  * Outputs:
      * T, a module (Macaulay2Doc),

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

If M and/or N are direct sum modules (isDirectSum M == true) then T is the
direct sum of the tensor products between the components. This SHOULD be built
into M**N, but isn't as of M2, v. 1.7

See also
========

  * HomWithComponents -- computes Hom, preserving
    direct sum information
  * dualWithComponents -- dual module preserving
    direct sum information

Ways to use tensorWithComponents:
=================================

  * "tensorWithComponents(Module,Module)"

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

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

toArray -- makes an array from a List or from a single integer
**************************************************************

Synopsis
========

  * Usage:
        arr = toArray L
        arr = toArray n
  * Inputs:
      * L, a list (Macaulay2Doc),
      * n, an integer (Macaulay2Doc),
  * Outputs:
      * arr, an array (Macaulay2Doc),

Ways to use toArray:
====================

  * "toArray(List)"
  * "toArray(ZZ)"

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

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

twoMonomials -- tally the sequences of BRanks for certain examples
******************************************************************

Synopsis
========

  * Usage:
        T = TwoMonomials(c,d)
  * Inputs:
      * c, an integer (Macaulay2Doc), codimension in which to work
      * d, an integer (Macaulay2Doc), degree of the monomials to take
  * Optional inputs (Macaulay2Doc),:
      * Optimism => ..., default value 0
  * Outputs:
      * T, a tally (Macaulay2Doc),

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

tallies the sequences of B-ranks that occur for ideals generated by pairs of
monomials in R = S/(d-th powers of the variables), with full complexity (=c);
that is, for an appropriate syzygy M of M0 = R/(m1, m2) where m1 and m2 are
monomials of the same degree.

+-----------------------------------------------------+
|i1 : setRandomSeed 0                                 |
|                                                     |
|o1 = 0                                               |
+-----------------------------------------------------+
|i2 : twoMonomials(2,3)                               |
| -- used 0.884059s (cpu); 0.588255s (thread); 0s (gc)|
|2                                                    |
|Tally{{{1, 1}} => 2        }                         |
|      {{2, 2}, {1, 2}} => 4                          |
|                                                     |
| -- used 0.511581s (cpu); 0.339984s (thread); 0s (gc)|
|3                                                    |
|Tally{{{2, 2}, {1, 2}} => 2}                         |
|      {{3, 3}, {2, 3}} => 1                          |
|                                                     |
| -- used 0.183989s (cpu); 0.118546s (thread); 0s (gc)|
|4                                                    |
|Tally{{{2, 2}, {1, 2}} => 1}                         |
+-----------------------------------------------------+

See also
========

  * twoMonomials -- tally the sequences of BRanks for
    certain examples

Ways to use twoMonomials:
=========================

  * "twoMonomials(ZZ,ZZ)"

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

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