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

MultigradedBGG -- Package for working with Multigraded BGG and Differential Modules
***********************************************************************************

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

This package implements the multigraded BGG correspondence, as described, for
instance, in Section 2.2 of the paper "Tate resolutions on toric varieties" by
Brown-Erman. Applying the BGG functor to a module over a multigraded polynomial
ring gives a differential E-module, rather than a complex of E-modules; this
package therefore also implements differential modules. Highlights of the
package include methods for building free resolutions of differential modules;
implementations of the multigraded BGG functors; and a method for computing the
strongly linear strand of the minimal free resolution of a module over a
multigraded polynomial ring, in the sense of the paper "Linear strands of
multigraded free resolutions" by Brown-Erman.

See also
========

  * DifferentialModule -- The class of differential
    modules.
  * resDM -- uses a "killing cycles"-style construction to find a
    free resolution of a differential module
  * toricRR -- computes the BGG functor of a module over a
    multigraded polynomial ring.
  * toricLL -- computes the BGG functor of a module over the
    Koszul dual exterior algebra of a multigraded polynomial ring
  * stronglyLinearStrand -- computes the strongly
    linear strand of the minimal free resolution of a finitely generated graded
    module over a multigraded polynomial ring, provided the module is generated
    in a single degree.

Authors
=======

  * Maya Banks (see https://sites.google.com/wisc.edu/mayabanks )
    <mdbanks@wisc.edu>
  * Michael K. Brown (see http://webhome.auburn.edu/~mkb0096/ )
    <mkb0096@auburn.edu>
  * Tara Gomes (see https://cse.umn.edu/math/tara-gomes ) <gomes072@umn.edu>
  * Prashanth Sridhar (see https://sites.google.com/view/prashanthsridhar/home
    ) <pzs0094@auburn.edu>
  * Eduardo Torres Davila (see https://etdavila10.github.io/ )
    <torre680@umn.edu>
  * Sasha   Zotine (see https://sites.google.com/view/szotine/home )
    <18az45@queensu.ca>

Version
=======

This documentation describes version 1.1 of MultigradedBGG.

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

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

Exports
=======

  * Types
      * DifferentialModule -- The class of
        differential modules.
  * Functions and commands
      * differential -- returns the differential of a
        differential module
      * differentialModule -- converts a square zero
        matrix into a differential module
      * dualRingToric -- computes the Koszul dual of a
        multigraded polynomial ring or exterior algebra
      * foldComplex -- converts a chain complex into a
        differential module
      * minimizeDM -- minimizes a square matrix or a
        differential module
      * resDM -- uses a "killing cycles"-style construction to
        find a free resolution of a differential module
      * resMinFlag -- gives a minimal free flag resolution
        of a differential module of degree 0
      * stronglyLinearStrand -- computes the
        strongly linear strand of the minimal free resolution of a finitely
        generated graded module over a multigraded polynomial ring, provided
        the module is generated in a single degree.
      * toricLL -- computes the BGG functor of a module over
        the Koszul dual exterior algebra of a multigraded polynomial ring
      * toricRR -- computes the BGG functor of a module over a
        multigraded polynomial ring.
      * unfold -- converts a differential module into a
        1-periodic complex
  * Methods
      * degree(DifferentialModule), --
        returns the degree of the differential
      * "differential(DifferentialModule)" -- see differential,
        -- returns the differential of a differential module
      * "differentialModule(Matrix)" -- see differentialModule,
        -- converts a square zero matrix into a
        differential module
      * differentialModule(Complex), --
        converts a complex into a differential module
      * "dualRingToric(PolynomialRing)" -- see dualRingToric,
        -- computes the Koszul dual of a multigraded polynomial
        ring or exterior algebra
      * "foldComplex(Complex,ZZ)" -- see foldComplex, --
        converts a chain complex into a differential module
      * HH DifferentialModule -- computes the
        homology of a differential module
      * image(DifferentialModule), --
        computes the image of the differential of a differential module
      * kernel(DifferentialModule), --
        computes the kernel of the differential in a differential module.
      * "minimizeDM(DifferentialModule)" -- see minimizeDM,
        -- minimizes a square matrix or a differential module
      * module(DifferentialModule), --
        computes the underlying module of a differential module.
      * "resDM(DifferentialModule)" -- see resDM, -- uses a
        "killing cycles"-style construction to find a free resolution of a
        differential module
      * "resDM(DifferentialModule,ZZ)" -- see resDM, -- uses a
        "killing cycles"-style construction to find a free resolution of a
        differential module
      * "resMinFlag(DifferentialModule,ZZ)" -- see resMinFlag,
        -- gives a minimal free flag resolution of a differential
        module of degree 0
      * ring(DifferentialModule), --
        returns the ring of a differential module.
      * "stronglyLinearStrand(Module)" -- see stronglyLinearStrand,
        -- computes the strongly linear strand of the
        minimal free resolution of a finitely generated graded module over a
        multigraded polynomial ring, provided the module is generated in a
        single degree.
      * "toricLL(Module)" -- see toricLL, -- computes the BGG
        functor of a module over the Koszul dual exterior algebra of a
        multigraded polynomial ring
      * "toricRR(Module)" -- see toricRR, -- computes the BGG
        functor of a module over a multigraded polynomial ring.
      * "toricRR(Module,List)" -- see toricRR, -- computes the
        BGG functor of a module over a multigraded polynomial ring.
      * "unfold(DifferentialModule,ZZ,ZZ)" -- see unfold, --
        converts a differential module into a 1-periodic complex
  * Symbols

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

The object MultigradedBGG, is a package (Macaulay2Doc).

degree(DifferentialModule) -- returns the degree of the differential
********************************************************************

Synopsis
========

  * Function: degree (Macaulay2Doc),
  * Usage:
        degree D
  * Inputs:
      * D, a differential module,
  * Outputs:
      * a list (Macaulay2Doc),

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

This method returns the degree of the differential of a differential module. In
more detail: since the source and target of the differential are required to be
equal, we must specify the degree of the differential in order for the
differential to be homogeneous; this method returns that degree.

+----------------------------------------+
|i1 : R = QQ[x]/(x^3)                    |
|                                        |
|o1 = R                                  |
|                                        |
|o1 : QuotientRing                       |
+----------------------------------------+
|i2 : phi = map(R^1, R^1, x^2, Degree=>2)|
|                                        |
|o2 = | x2 |                             |
|                                        |
|             1      1                   |
|o2 : Matrix R  <-- R                    |
+----------------------------------------+
|i3 : D = differentialModule phi         |
|                                        |
|      1      1      1                   |
|o3 = R  <-- R  <-- R                    |
|                                        |
|     -1     0      1                    |
|                                        |
|o3 : DifferentialModule                 |
+----------------------------------------+
|i4 : degree D == {2}                    |
|                                        |
|o4 = true                               |
+----------------------------------------+

See also
========

  * differential(DifferentialModule) -- returns the
    differential of a differential module

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

  * degree(DifferentialModule), --
    returns the degree of the differential

differential -- returns the differential of a differential module
*****************************************************************

Synopsis
========

  * Usage:
        differential D
  * Inputs:
      * D, a differential module,
  * Outputs:
      * a matrix (Macaulay2Doc),

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

This method returns the differential of a differential module.

+----------------------------------------+
|i1 : R = QQ[x]/(x^3)                    |
|                                        |
|o1 = R                                  |
|                                        |
|o1 : QuotientRing                       |
+----------------------------------------+
|i2 : phi = map(R^1, R^1, x^2, Degree=>2)|
|                                        |
|o2 = | x2 |                             |
|                                        |
|             1      1                   |
|o2 : Matrix R  <-- R                    |
+----------------------------------------+
|i3 : D = differentialModule phi         |
|                                        |
|      1      1      1                   |
|o3 = R  <-- R  <-- R                    |
|                                        |
|     -1     0      1                    |
|                                        |
|o3 : DifferentialModule                 |
+----------------------------------------+
|i4 : differential D                     |
|                                        |
|o4 = | x2 |                             |
|                                        |
|             1      1                   |
|o4 : Matrix R  <-- R                    |
+----------------------------------------+

See also
========

  * degree(DifferentialModule), --
    returns the degree of the differential
  * image(DifferentialModule) -- computes
    the image of the differential of a differential module
  * kernel(DifferentialModule), --
    computes the kernel of the differential in a differential module.
  * HH DifferentialModule -- computes the
    homology of a differential module

Ways to use differential:
=========================

  * "differential(DifferentialModule)"

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

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

DifferentialModule -- The class of differential modules.
********************************************************

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

A differential module is just a module with a square zero endomorphism. Given a
module map $f: M \rightarrow M$ of degree $a$, we represent a differential
module from $f$ as a 3-term chain complex in homological degrees $-1, 0$, and
$1$. If $a \neq 0$, then since the source and target of $f$ are required to be
equal, we must specify the degree of the differential to be $a$ in order for
the differential to be homogeneous.

See also
========

  * MultigradedBGG -- Package for working with Multigraded BGG and
    Differential Modules
  * differentialModule -- converts a square zero
    matrix into a differential module
  * differentialModule(Matrix) -- converts a square
    zero matrix into a differential module
  * differentialModule(Complex), --
    converts a complex into a differential module

Functions and methods returning a differential module:
======================================================

  * differentialModule -- converts a square zero
    matrix into a differential module
  * "foldComplex(Complex,ZZ)" -- see foldComplex, --
    converts a chain complex into a differential module

Methods that use a differential module:
=======================================

  * degree(DifferentialModule), --
    returns the degree of the differential
  * "differential(DifferentialModule)" -- see differential,
    -- returns the differential of a differential module
  * HH DifferentialModule -- computes the
    homology of a differential module
  * image(DifferentialModule) -- computes
    the image of the differential of a differential module
  * kernel(DifferentialModule), --
    computes the kernel of the differential in a differential module.
  * "minimizeDM(DifferentialModule)" -- see minimizeDM, --
    minimizes a square matrix or a differential module
  * module(DifferentialModule), --
    computes the underlying module of a differential module.
  * "resDM(DifferentialModule)" -- see resDM, -- uses a "killing
    cycles"-style construction to find a free resolution of a differential
    module
  * "resDM(DifferentialModule,ZZ)" -- see resDM, -- uses a
    "killing cycles"-style construction to find a free resolution of a
    differential module
  * "resMinFlag(DifferentialModule,ZZ)" -- see resMinFlag, --
    gives a minimal free flag resolution of a differential module of degree 0
  * ring(DifferentialModule) -- returns
    the ring of a differential module.
  * "unfold(DifferentialModule,ZZ,ZZ)" -- see unfold, -- converts
    a differential module into a 1-periodic complex

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

The object DifferentialModule, is a type (Macaulay2Doc),
with ancestor classes Complex (Complexes), <
MutableHashTable (Macaulay2Doc) < HashTable (Macaulay2Doc)
< Thing (Macaulay2Doc).

differentialModule -- converts a square zero matrix into a differential module
******************************************************************************

Synopsis
========

  * Usage:
        differentialModule(f)cczx
  * Inputs:
      * f, a matrix (Macaulay2Doc), representing a module map
        with the same source and target
  * Outputs:
      * a differential module,

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

Given a module map $f: M \rightarrow M$ of degree $a$ this creates a degree $a$
differential module from $f$ represented as a 3-term chain complex in
homological degrees $-1, 0$, and $1$. If $a \neq 0$, then since the source and
target of $f$ are required to be equal, we must specify the degree of the
differential to be $a$ in order for the differential to be homogeneous.

+------------------------------------------------------------+
|i1 : R = QQ[x]                                              |
|                                                            |
|o1 = R                                                      |
|                                                            |
|o1 : PolynomialRing                                         |
+------------------------------------------------------------+
|i2 : phi = map(R^1/(x^2),R^1/(x^2), x, Degree=>1)           |
|                                                            |
|o2 = | x |                                                  |
|                                                            |
|o2 : Matrix                                                 |
+------------------------------------------------------------+
|i3 : differentialModule(phi)                                |
|                                                            |
|o3 = cokernel | x2 | <-- cokernel | x2 | <-- cokernel | x2 ||
|                                                            |
|     -1                  0                   1              |
|                                                            |
|o3 : DifferentialModule                                     |
+------------------------------------------------------------+

See also
========

  * differentialModule(Complex), --
    converts a complex into a differential module
  * differential(DifferentialModule) -- returns the
    differential of a differential module

Ways to use differentialModule:
===============================

  * "differentialModule(Matrix)"
  * differentialModule(Complex), --
    converts a complex into a differential module

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

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

differentialModule(Complex) -- converts a complex into a differential module
****************************************************************************

Synopsis
========

  * Function: differentialModule,
  * Usage:
        differentialModule C
  * Inputs:
      * C, a complex (Complexes), a complex concentrated in
        homological degrees -1, 0, 1
  * Outputs:
      * a differential module,

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

Given a complex of modules in homological degrees $-1, 0$, and $1$, with the
differentials being identical, this method produces the corresponding
DifferentialModule.

+-----------------------------------------------------------------------------+
|i1 : S = QQ[x,y]                                                             |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : del = map(S^{-1,0,0,1},S^{-1,0,0,1},matrix{{0,y,x,-1},{0,0,0,x},{0,0,0,-|
|                                                                             |
|o2 = {1}  | 0 y x -1 |                                                       |
|     {0}  | 0 0 0 x  |                                                       |
|     {0}  | 0 0 0 -y |                                                       |
|     {-1} | 0 0 0 0  |                                                       |
|                                                                             |
|             4      4                                                        |
|o2 : Matrix S  <-- S                                                         |
|-----------------------------------------------------------------------------|
|y},{0,0,0,0}}, Degree=>2)                                                    |
+-----------------------------------------------------------------------------+
|i3 : C = complex{-del, -del}[1]                                              |
|                                                                             |
|      4      4      4                                                        |
|o3 = S  <-- S  <-- S                                                         |
|                                                                             |
|     -1     0      1                                                         |
|                                                                             |
|o3 : Complex                                                                 |
+-----------------------------------------------------------------------------+
|i4 : D = differentialModule C                                                |
|                                                                             |
|      4      4      4                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     -1     0      1                                                         |
|                                                                             |
|o4 : DifferentialModule                                                      |
+-----------------------------------------------------------------------------+
|i5 : D.dd                                                                    |
|                                                                             |
|           4                         4                                       |
|o5 = -1 : S  <--------------------- S  : 0                                   |
|                {1}  | 0 y x -1 |                                            |
|                {0}  | 0 0 0 x  |                                            |
|                {0}  | 0 0 0 -y |                                            |
|                {-1} | 0 0 0 0  |                                            |
|                                                                             |
|          4                         4                                        |
|     0 : S  <--------------------- S  : 1                                    |
|               {1}  | 0 y x -1 |                                             |
|               {0}  | 0 0 0 x  |                                             |
|               {0}  | 0 0 0 -y |                                             |
|               {-1} | 0 0 0 0  |                                             |
|                                                                             |
|o5 : ComplexMap                                                              |
+-----------------------------------------------------------------------------+

See also
========

  * differentialModule(Complex), --
    converts a complex into a differential module
  * differential(DifferentialModule) -- returns the
    differential of a differential module

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

  * differentialModule(Complex), --
    converts a complex into a differential module

dualRingToric -- computes the Koszul dual of a multigraded polynomial ring or exterior algebra
**********************************************************************************************

Synopsis
========

  * Usage:
        dualRingToric R
  * Inputs:
      * R, a polynomial ring (Macaulay2Doc), either a
        standard polynomial ring, or an exterior algebra
  * Optional inputs (Macaulay2Doc),:
      * Variable => a symbol (Macaulay2Doc), default value x
      * SkewVariable => a symbol (Macaulay2Doc), default value e
  * Outputs:
      * a polynomial ring (Macaulay2Doc), which is the
        Koszul dual of R

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

This method computes the Koszul dual of a polynomial ring or exterior algebra.
In particular, if $S = k[x_0, \ldots, x_n]$ is a $\mathbb{Z}^m$-graded ring for
some $m$, and $\operatorname{deg}(x_i) = d_i$, then the output of dualRingToric
is the $\mathbb{Z}^{m+1}$-graded exterior algebra on variables $e_0, \ldots,
e_n$ with degrees $(-d_i, -1)$.

+---------------------------------------------------+
|i1 : R = ring(hirzebruchSurface(2, Variable => y)) |
|                                                   |
|o1 = R                                             |
|                                                   |
|o1 : PolynomialRing                                |
+---------------------------------------------------+
|i2 : E = dualRingToric(R, SkewVariable => f)       |
|                                                   |
|o2 = E                                             |
|                                                   |
|o2 : PolynomialRing, 4 skew commutative variable(s)|
+---------------------------------------------------+

On the other hand, if $E$ is a $\mathbb{Z}^{m+1}$-graded exterior algebra on
$n+1$ variables $e_0, \ldots, e_n$ with $\operatorname{deg}(e_i) = (-d_i, -1)$,
then dualRingToric E is the $\mathbb{Z}^m$-graded polynomial ring $k[x_0,
\ldots, x_n]$ with $\operatorname{deg}(x_i) = d_i$.

+----------------------------+
|i3 : RY = dualRingToric E   |
|                            |
|o3 = RY                     |
|                            |
|o3 : PolynomialRing         |
+----------------------------+
|i4 : degrees RY == degrees R|
|                            |
|o4 = true                   |
+----------------------------+

This method preserves the coefficient ring of the input ring.

+---------------------------------------------------+
|i5 : S = ZZ/101[x,y,z, Degrees => {1,1,2}]         |
|                                                   |
|o5 = S                                             |
|                                                   |
|o5 : PolynomialRing                                |
+---------------------------------------------------+
|i6 : E' = dualRingToric S                          |
|                                                   |
|o6 = E'                                            |
|                                                   |
|o6 : PolynomialRing, 3 skew commutative variable(s)|
+---------------------------------------------------+
|i7 : coefficientRing E' === coefficientRing S      |
|                                                   |
|o7 = true                                          |
+---------------------------------------------------+

See also
========

  * toricRR -- computes the BGG functor of a module over a
    multigraded polynomial ring.
  * toricLL -- computes the BGG functor of a module over the
    Koszul dual exterior algebra of a multigraded polynomial ring
  * stronglyLinearStrand -- computes the strongly
    linear strand of the minimal free resolution of a finitely generated graded
    module over a multigraded polynomial ring, provided the module is generated
    in a single degree.

Ways to use dualRingToric:
==========================

  * "dualRingToric(PolynomialRing)"

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

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

foldComplex -- converts a chain complex into a differential module
******************************************************************

Synopsis
========

  * Usage:
        foldComplex(C)
  * Inputs:
      * C, a complex (Complexes),
      * d, an integer (Macaulay2Doc),
  * Outputs:
      * a differential module,

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

Given a chain complex C and integer d it creates the corresponding (flag)
differential module of degree d.

+-------------------------------+
|i1 : R = QQ[x,y];              |
+-------------------------------+
|i2 : C = complex res ideal(x,y)|
|                               |
|      1      2      1          |
|o2 = R  <-- R  <-- R           |
|                               |
|     0      1      2           |
|                               |
|o2 : Complex                   |
+-------------------------------+
|i3 : D = foldComplex(C,0);     |
+-------------------------------+
|i4 : D.dd_1                    |
|                               |
|o4 = {0} | 0 x y 0  |          |
|     {1} | 0 0 0 -y |          |
|     {1} | 0 0 0 x  |          |
|     {2} | 0 0 0 0  |          |
|                               |
|             4      4          |
|o4 : Matrix R  <-- R           |
+-------------------------------+

See also
========

  * differentialModule(Complex), --
    converts a complex into a differential module
  * unfold -- converts a differential module into a 1-periodic
    complex
  * resDM -- uses a "killing cycles"-style construction to find a
    free resolution of a differential module
  * resMinFlag -- gives a minimal free flag resolution of a
    differential module of degree 0

Ways to use foldComplex:
========================

  * "foldComplex(Complex,ZZ)"

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

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

HH DifferentialModule -- computes the homology of a differential module
***********************************************************************

Synopsis
========

  * Function: homology (Macaulay2Doc),
  * Usage:
        HH D
  * Inputs:
      * D, a differential module,
  * Outputs:
      * a module (Macaulay2Doc),

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

This computes the homology of a differential module. More specifically: since
we interpret differential modules as 3-term complexes, this returns the zeroth
homology module.

+-----------------------------------------+
|i1 : R = QQ[x,y]                         |
|                                         |
|o1 = R                                   |
|                                         |
|o1 : PolynomialRing                      |
+-----------------------------------------+
|i2 : M = R^1/ideal(x^2,y^2)              |
|                                         |
|o2 = cokernel | x2 y2 |                  |
|                                         |
|                            1            |
|o2 : R-module, quotient of R             |
+-----------------------------------------+
|i3 : phi = map(M,M,x*y)                  |
|                                         |
|o3 = | xy |                              |
|                                         |
|o3 : Matrix M <-- M                      |
+-----------------------------------------+
|i4 : D = differentialModule phi          |
|                                         |
|o4 = M  <-- M <-- M                      |
|                                         |
|     -1     0     1                      |
|                                         |
|o4 : DifferentialModule                  |
+-----------------------------------------+
|i5 : HH D                                |
|                                         |
|o5 = subquotient (| y -x |, | xy x2 y2 |)|
|                                         |
|                               1         |
|o5 : R-module, subquotient of R          |
+-----------------------------------------+

See also
========

  * image(DifferentialModule) -- computes
    the image of the differential of a differential module
  * kernel(DifferentialModule), --
    computes the kernel of the differential in a differential module.

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

  * HH DifferentialModule -- computes the
    homology of a differential module

image(DifferentialModule) -- computes the image of the differential of a differential module
********************************************************************************************

Synopsis
========

  * Function: image (Macaulay2Doc),
  * Usage:
        image D
  * Inputs:
      * D, a differential module,
  * Outputs:
      * a module (Macaulay2Doc),

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

This method computes the image of the differential of $D$, as a submodule of
$D$.

+------------------------------------+
|i1 : R = QQ[x,y]                    |
|                                    |
|o1 = R                              |
|                                    |
|o1 : PolynomialRing                 |
+------------------------------------+
|i2 : M = R^1/ideal(x^2,y^2)         |
|                                    |
|o2 = cokernel | x2 y2 |             |
|                                    |
|                            1       |
|o2 : R-module, quotient of R        |
+------------------------------------+
|i3 : phi = map(M,M,x*y, Degree => 2)|
|                                    |
|o3 = | xy |                         |
|                                    |
|o3 : Matrix M <-- M                 |
+------------------------------------+
|i4 : D = differentialModule phi     |
|                                    |
|o4 = M  <-- M <-- M                 |
|                                    |
|     -1     0     1                 |
|                                    |
|o4 : DifferentialModule             |
+------------------------------------+
|i5 : D' = image D                   |
|                                    |
|o5 = subquotient (| xy |, | x2 y2 |)|
|                                    |
|                               1    |
|o5 : R-module, subquotient of R     |
+------------------------------------+

See also
========

  * differential(DifferentialModule) -- returns the
    differential of a differential module
  * image(DifferentialModule) -- computes
    the image of the differential of a differential module
  * kernel(DifferentialModule), --
    computes the kernel of the differential in a differential module.

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

  * image(DifferentialModule) -- computes
    the image of the differential of a differential module

kernel(DifferentialModule) -- computes the kernel of the differential in a differential module.
***********************************************************************************************

Synopsis
========

  * Function: kernel (Macaulay2Doc),

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

Computes the kernel of the differential in a differential module.

See also
========

  * differential(DifferentialModule) -- returns the
    differential of a differential module
  * image(DifferentialModule) -- computes
    the image of the differential of a differential module
  * HH DifferentialModule -- computes the
    homology of a differential module

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

  * kernel(DifferentialModule), --
    computes the kernel of the differential in a differential module.

minimizeDM -- minimizes a square matrix or a differential module
****************************************************************

Synopsis
========

  * Usage:
        minimizeDM(D)
  * Inputs:
      * D, a differential module,
  * Outputs:
      * a differential module,

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

Given a differential module D, this code breaks off trivial blocks, producing a
quasi-isomorphic differential module D' with a minimal differential.

+-----------------------------------+
|i1 : R = QQ[x,y];                  |
+-----------------------------------+
|i2 : M = R^1/ideal(x^2,y^2);       |
+-----------------------------------+
|i3 : phi = map(M,M,x*y, Degree=>2);|
|                                   |
|o3 : Matrix M <-- M                |
+-----------------------------------+
|i4 : D = differentialModule phi;   |
+-----------------------------------+
|i5 : r = resDM(D)                  |
|                                   |
|      8      8      8              |
|o5 = R  <-- R  <-- R               |
|                                   |
|     -1     0      1               |
|                                   |
|o5 : DifferentialModule            |
+-----------------------------------+
|i6 : r.dd_1                        |
|                                   |
|o6 = {1}  | 0 0 y x 0 0 -1 0  |    |
|     {1}  | 0 0 0 0 y x 0  1  |    |
|     {0}  | 0 0 0 0 0 0 x  0  |    |
|     {0}  | 0 0 0 0 0 0 -y 0  |    |
|     {0}  | 0 0 0 0 0 0 0  x  |    |
|     {0}  | 0 0 0 0 0 0 0  -y |    |
|     {-1} | 0 0 0 0 0 0 0  0  |    |
|     {-1} | 0 0 0 0 0 0 0  0  |    |
|                                   |
|             8      8              |
|o6 : Matrix R  <-- R               |
+-----------------------------------+
|i7 : mr = minimizeDM(r)            |
|                                   |
|      4      4      4              |
|o7 = R  <-- R  <-- R               |
|                                   |
|     -1     0      1               |
|                                   |
|o7 : DifferentialModule            |
+-----------------------------------+
|i8 : mr.dd_1                       |
|                                   |
|o8 = | xy  x2  0   0   |           |
|     | -y2 -xy 0   0   |           |
|     | 0   0   -xy -x2 |           |
|     | 0   0   y2  xy  |           |
|                                   |
|             4      4              |
|o8 : Matrix R  <-- R               |
+-----------------------------------+

See also
========

  * differentialModule(Complex), --
    converts a complex into a differential module
  * resMinFlag -- gives a minimal free flag resolution of a
    differential module of degree 0
  * unfold -- converts a differential module into a 1-periodic
    complex
  * foldComplex -- converts a chain complex into a
    differential module
  * resDM -- uses a "killing cycles"-style construction to find a
    free resolution of a differential module

Ways to use minimizeDM:
=======================

  * "minimizeDM(DifferentialModule)"

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

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

module(DifferentialModule) -- computes the underlying module of a differential module.
**************************************************************************************

Synopsis
========

  * Function: module (Macaulay2Doc),

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

Returns the underlying module of a differential module.

See also
========

  * ring(DifferentialModule) -- returns
    the ring of a differential module.
  * image(DifferentialModule) -- computes
    the image of the differential of a differential module
  * differential(DifferentialModule) -- returns the
    differential of a differential module

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

  * module(DifferentialModule), --
    computes the underlying module of a differential module.

resDM -- uses a "killing cycles"-style construction to find a free resolution of a differential module
******************************************************************************************************

Synopsis
========

  * Usage:
        resDM(D)
        resDM(D,k)
  * Inputs:
      * D, a differential module,
      * k, an integer (Macaulay2Doc),
  * Outputs:
      * a differential module,

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

Given a differential module D, this method creates a free flag resolution of D,
using Algorithm 2.7 from the accompanying paper "The multigraded BGG
correspondence in Macaulay2". The default resDM(D) runs the algorithm for the
number of steps determined by the dimension of the ambient ring. Alternatively,
resDM(D,k) iterates k steps of the algorithm.

+-----------------------------------+
|i1 : R = QQ[x,y];                  |
+-----------------------------------+
|i2 : M = R^1/ideal(x^2,y^2);       |
+-----------------------------------+
|i3 : phi = map(M,M,x*y, Degree=>2);|
|                                   |
|o3 : Matrix M <-- M                |
+-----------------------------------+
|i4 : D = differentialModule phi;   |
+-----------------------------------+
|i5 : r = resDM(D)                  |
|                                   |
|      8      8      8              |
|o5 = R  <-- R  <-- R               |
|                                   |
|     -1     0      1               |
|                                   |
|o5 : DifferentialModule            |
+-----------------------------------+
|i6 : r.dd_1                        |
|                                   |
|o6 = {1}  | 0 0 y x 0 0 -1 0  |    |
|     {1}  | 0 0 0 0 y x 0  1  |    |
|     {0}  | 0 0 0 0 0 0 x  0  |    |
|     {0}  | 0 0 0 0 0 0 -y 0  |    |
|     {0}  | 0 0 0 0 0 0 0  x  |    |
|     {0}  | 0 0 0 0 0 0 0  -y |    |
|     {-1} | 0 0 0 0 0 0 0  0  |    |
|     {-1} | 0 0 0 0 0 0 0  0  |    |
|                                   |
|             8      8              |
|o6 : Matrix R  <-- R               |
+-----------------------------------+

The default algorithm runs for dim R + 1 steps. Adding the number of steps as a
second argument is like adding a LengthLimit.

+---------------------------------------+
|i7 : R = QQ[x]/(x^3);                  |
+---------------------------------------+
|i8 : phi = map(R^1,R^1,x^2, Degree=>2);|
|                                       |
|             1      1                  |
|o8 : Matrix R  <-- R                   |
+---------------------------------------+
|i9 : D = differentialModule phi;       |
+---------------------------------------+
|i10 : r = resDM(D)                     |
|                                       |
|       1      1      1                 |
|o10 = R  <-- R  <-- R                  |
|                                       |
|      -1     0      1                  |
|                                       |
|o10 : DifferentialModule               |
+---------------------------------------+
|i11 : r.dd_1                           |
|                                       |
|o11 = 0                                |
|                                       |
|              1      1                 |
|o11 : Matrix R  <-- R                  |
+---------------------------------------+
|i12 : r = resDM(D,6)                   |
|                                       |
|       6      6      6                 |
|o12 = R  <-- R  <-- R                  |
|                                       |
|      -1     0      1                  |
|                                       |
|o12 : DifferentialModule               |
+---------------------------------------+
|i13 : r.dd_1                           |
|                                       |
|o13 = {1}  | 0 x 0  -1 1  0  |         |
|      {0}  | 0 0 x2 0  x  -1 |         |
|      {0}  | 0 0 0  x  0  -1 |         |
|      {-1} | 0 0 0  0  x2 0  |         |
|      {-1} | 0 0 0  0  0  x  |         |
|      {-2} | 0 0 0  0  0  0  |         |
|                                       |
|              6      6                 |
|o13 : Matrix R  <-- R                  |
+---------------------------------------+

See also
========

  * differentialModule(Complex), --
    converts a complex into a differential module
  * resMinFlag -- gives a minimal free flag resolution of a
    differential module of degree 0
  * unfold -- converts a differential module into a 1-periodic
    complex
  * foldComplex -- converts a chain complex into a
    differential module
  * minimizeDM -- minimizes a square matrix or a
    differential module

Ways to use resDM:
==================

  * "resDM(DifferentialModule)"
  * "resDM(DifferentialModule,ZZ)"

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

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

resMinFlag -- gives a minimal free flag resolution of a differential module of degree 0
***************************************************************************************

Synopsis
========

  * Usage:
        resMinFlag(D, k)
  * Inputs:
      * D, a differential module,
      * k, an integer (Macaulay2Doc),
  * Outputs:
      * a differential module,

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

Let $R$ be a positively graded ring with $R_0$ a field. Given a differential
module $D$ of degree 0 with finitely generated homology, this method gives a
portion of the minimal free flag resolution of $D$, using Algorithm 2.11 from
the accompanying paper for this package, "The multigraded BGG correspondence in
Macaulay2". As this resolution will often be infinite, the integer $k$
indicates how many steps of this algorithm will be applied.

+-------------------------------+
|i1 : R = ZZ/101[x, y];         |
+-------------------------------+
|i2 : k = coker vars R;         |
+-------------------------------+
|i3 : f = map(k, k, 0);         |
|                               |
|o3 : Matrix k <-- k            |
+-------------------------------+
|i4 : D = differentialModule(f);|
+-------------------------------+
|i5 : F = resMinFlag(D, 3);     |
+-------------------------------+
|i6 : F.dd_0                    |
|                               |
|o6 = {0} | 0 y x 0  |          |
|     {1} | 0 0 0 x  |          |
|     {1} | 0 0 0 -y |          |
|     {2} | 0 0 0 0  |          |
|                               |
|             4      4          |
|o6 : Matrix R  <-- R           |
+-------------------------------+

See also
========

  * differentialModule(Complex), --
    converts a complex into a differential module
  * unfold -- converts a differential module into a 1-periodic
    complex
  * resDM -- uses a "killing cycles"-style construction to find a
    free resolution of a differential module
  * foldComplex -- converts a chain complex into a
    differential module
  * minimizeDM -- minimizes a square matrix or a
    differential module

Ways to use resMinFlag:
=======================

  * "resMinFlag(DifferentialModule,ZZ)"

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

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

ring(DifferentialModule) -- returns the ring of a differential module.
**********************************************************************

Synopsis
========

  * Function: ring (Macaulay2Doc),

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

Returns the ring of a differential module.

See also
========

  * module(DifferentialModule), --
    computes the underlying module of a differential module.
  * differential(DifferentialModule) -- returns the
    differential of a differential module

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

  * ring(DifferentialModule) -- returns
    the ring of a differential module.

stronglyLinearStrand -- computes the strongly linear strand of the minimal free resolution of a finitely generated graded module over a multigraded polynomial ring, provided the module is generated in a single degree.
*************************************************************************************************************************************************************************************************************************

Synopsis
========

  * Usage:
        stronglyLinearStrand M
  * Inputs:
      * M, a module (Macaulay2Doc), a finitely generated graded
        module over a multigraded polynomial ring that is generated in a single
        degree
  * Outputs:
      * a complex (Complexes), the strongly linear strand of the
        minimal free resolution of M

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

The strongly linear strand of the minimal free resolution of a multigraded
module $M$ is defined in the paper "Linear strands of multigraded free
resolutions" by Brown-Erman. It is, roughly speaking,the largest subcomplex of
the minimal free resolution of $M$ that is linear, in the sense that its
differentials are matrices of linear forms. The method we use for computing the
strongly linear strand uses BGG, mirroring Corollary 7.11 in Eisenbud's
textbook "The geometry of syzygies".

+--------------------------------------------------+
|i1 : S = ZZ/101[x_0, x_1, x_2, Degrees => {1,1,2}]|
|                                                  |
|o1 = S                                            |
|                                                  |
|o1 : PolynomialRing                               |
+--------------------------------------------------+
|i2 : M = coker matrix{{x_0, x_2 - x_1^2}}         |
|                                                  |
|o2 = cokernel | x_0 -x_1^2+x_2 |                  |
|                                                  |
|                            1                     |
|o2 : S-module, quotient of S                      |
+--------------------------------------------------+
|i3 : L = stronglyLinearStrand(M)                  |
|                                                  |
|       ZZ         1       ZZ         1            |
|o3 = (---[x ..x ])  <-- (---[x ..x ])             |
|      101  0   2         101  0   2               |
|                                                  |
|     0                  1                         |
|                                                  |
|o3 : Complex                                      |
+--------------------------------------------------+
|i4 : L == koszulComplex {x_0}                     |
|                                                  |
|o4 = true                                         |
+--------------------------------------------------+

See also
========

  * toricRR -- computes the BGG functor of a module over a
    multigraded polynomial ring.
  * toricLL -- computes the BGG functor of a module over the
    Koszul dual exterior algebra of a multigraded polynomial ring
  * dualRingToric -- computes the Koszul dual of a
    multigraded polynomial ring or exterior algebra

Ways to use stronglyLinearStrand:
=================================

  * "stronglyLinearStrand(Module)"

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

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

toricLL -- computes the BGG functor of a module over the Koszul dual exterior algebra of a multigraded polynomial ring
**********************************************************************************************************************

Synopsis
========

  * Usage:
        toricLL N
  * Inputs:
      * N, a module (Macaulay2Doc), a module over the Koszul dual
        exterior algebra of a multigraded polynomial ring
  * Outputs:
      * a complex (Complexes), a complex of modules over a
        multigraded polynomial ring, the result of applying the BGG functor L
        to N

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

Given a multigraded polynomial ring $S$ with Koszul dual exterior algebra E,
the BGG functor $\mathbf{L}$ sends an $E$-module to a linear complex of
$S$-modules.

+------------------------------------------------------+
|i1 : S = ring hirzebruchSurface 3                     |
|                                                      |
|o1 = S                                                |
|                                                      |
|o1 : PolynomialRing                                   |
+------------------------------------------------------+
|i2 : E = dualRingToric S                              |
|                                                      |
|o2 = E                                                |
|                                                      |
|o2 : PolynomialRing, 4 skew commutative variable(s)   |
+------------------------------------------------------+
|i3 : C = toricLL(coker matrix{{e_0, e_1}})            |
|                                                      |
|                 1                 2                 1|
|o3 = (QQ[x ..x ])  <-- (QQ[x ..x ])  <-- (QQ[x ..x ]) |
|          0   3             0   3             0   3   |
|                                                      |
|     -2                -1                0            |
|                                                      |
|o3 : Complex                                          |
+------------------------------------------------------+

See also
========

  * dualRingToric -- computes the Koszul dual of a
    multigraded polynomial ring or exterior algebra
  * toricRR -- computes the BGG functor of a module over a
    multigraded polynomial ring.
  * stronglyLinearStrand -- computes the strongly
    linear strand of the minimal free resolution of a finitely generated graded
    module over a multigraded polynomial ring, provided the module is generated
    in a single degree.

Ways to use toricLL:
====================

  * "toricLL(Module)"

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

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

toricRR -- computes the BGG functor of a module over a multigraded polynomial ring.
***********************************************************************************

Synopsis
========

  * Usage:
        toricRR M
        toricRR(M,L)
  * Inputs:
      * M, a module (Macaulay2Doc), a module over a multigraded
        polynomial ring
      * L, a list (Macaulay2Doc), a list of multidegrees of the
        polynomial ring
  * Outputs:
      * a differential module, a quotient of the
        differential module obtained by applying the multigraded BGG functor R
        to M. The size of this quotient is determined by the list L.

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

Let $A$ be a finitely generated free abelian group. Given an $A$-graded
polynomial ring $S$ with $A \oplus \mathbb{Z}$-graded Koszul dual exterior
algebra E, the BGG functor $\mathbf{R}$ sends an $S$-module $M$ to a free
differential $E$-module with linear differential: see Section 3 of the paper
accompanying this package for details. The free $E$-module underlying
$\mathbf{R}(M)$ is $\bigoplus_{d \in A} M_d \otimes_k E^*(-d, 0)$, where $E^*$
denotes the dual of $E$ over the ground field $k$. This module has rank given
by the dimension of $M$ as a $k$-vector space, which is typically infinite.
Thus, this method usually only computes a finite rank quotient of
$\mathbf{R}(M)$. Specifically: toricRR(M) is the quotient of $\mathbf{R}(M)$
given by those summands $M_d \otimes_k E^*(-d, 0)$ such that $d = e + a
\operatorname{deg}(x_i)$, where $e$ is a generating degree of $M$, $a \in
\{0,1\}$, and $0 \le i \le n$.

+---------------------------------------------------------+
|i1 : S = ring weightedProjectiveSpace {1,1,2}            |
|                                                         |
|o1 = S                                                   |
|                                                         |
|o1 : PolynomialRing                                      |
+---------------------------------------------------------+
|i2 : M = coker random(S^2, S^{3:{-5}});                  |
+---------------------------------------------------------+
|i3 : toricRR M                                           |
|                                                         |
|                 14                 14                 14|
|o3 = (QQ[e ..e ])   <-- (QQ[e ..e ])   <-- (QQ[e ..e ])  |
|          0   2              0   2              0   2    |
|                                                         |
|     -1                 0                  1             |
|                                                         |
|o3 : DifferentialModule                                  |
+---------------------------------------------------------+
|i4 : T = ring hirzebruchSurface 3;                       |
+---------------------------------------------------------+
|i5 : M' = coker matrix{{x_0}}                            |
|                                                         |
|o5 = cokernel | x_0 |                                    |
|                                                         |
|                            1                            |
|o5 : T-module, quotient of T                             |
+---------------------------------------------------------+
|i6 : toricRR M'                                          |
|                                                         |
|                 9                 9                 9   |
|o6 = (QQ[e ..e ])  <-- (QQ[e ..e ])  <-- (QQ[e ..e ])    |
|          0   3             0   3             0   3      |
|                                                         |
|     -1                0                 1               |
|                                                         |
|o6 : DifferentialModule                                  |
+---------------------------------------------------------+

There is also an optional input for a list L of degrees in $A$: toricRR(M, L)
is the quotient $\bigoplus_{a \in L} M_d \otimes_k E^*(-d, 0)$ of
$\mathbf{R}(M)$.

+------------------------------------------------------+
|i7 : L = {{0,0}, {1,0}}                               |
|                                                      |
|o7 = {{0, 0}, {1, 0}}                                 |
|                                                      |
|o7 : List                                             |
+------------------------------------------------------+
|i8 : toricRR(M',L)                                    |
|                                                      |
|                 2                 2                 2|
|o8 = (QQ[e ..e ])  <-- (QQ[e ..e ])  <-- (QQ[e ..e ]) |
|          0   3             0   3             0   3   |
|                                                      |
|     -1                0                 1            |
|                                                      |
|o8 : DifferentialModule                               |
+------------------------------------------------------+

For some lists of degrees L, the denominator of the quotient is not a
differential module. Hence, the method sometimes enlarges the list of degrees
in order to have a well-defined quotient. We demonstrate that phenomenon with
the following example.

+----------------------------------------------------+
|i9 : S = ring hirzebruchSurface 1                   |
|                                                    |
|o9 = S                                              |
|                                                    |
|o9 : PolynomialRing                                 |
+----------------------------------------------------+
|i10 : L1 = {{0,0}, {1,0}, {0,1}}                    |
|                                                    |
|o10 = {{0, 0}, {1, 0}, {0, 1}}                      |
|                                                    |
|o10 : List                                          |
+----------------------------------------------------+
|i11 : L2 = {{0,0}, {1,0}, {0,1}, {-1,1}};           |
+----------------------------------------------------+
|i12 : N1 = toricRR(S^1, L1);                        |
+----------------------------------------------------+
|i13 : N2 = toricRR(S^1, L2);                        |
+----------------------------------------------------+
|i14 : phi = map(ring N2, ring N1, gens ring N2)     |
|                                                    |
|o14 = map (QQ[e ..e ], QQ[e ..e ], {e , e , e , e })|
|               0   3       0   3     0   1   2   3  |
|                                                    |
|o14 : RingMap QQ[e ..e ] <-- QQ[e ..e ]             |
|                  0   3          0   3              |
+----------------------------------------------------+
|i15 : assert(phi N1.dd_0 - N2.dd_0 == 0)            |
+----------------------------------------------------+

Caveat
======

A heft vector is necessary for the computation to produce a well-defined
differential module.

See also
========

  * dualRingToric -- computes the Koszul dual of a
    multigraded polynomial ring or exterior algebra
  * toricLL -- computes the BGG functor of a module over the
    Koszul dual exterior algebra of a multigraded polynomial ring
  * stronglyLinearStrand -- computes the strongly
    linear strand of the minimal free resolution of a finitely generated graded
    module over a multigraded polynomial ring, provided the module is generated
    in a single degree.

Ways to use toricRR:
====================

  * "toricRR(Module)"
  * "toricRR(Module,List)"

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

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

unfold -- converts a differential module into a 1-periodic complex
******************************************************************

Synopsis
========

  * Usage:
        unfold(D,a,b)
  * Inputs:
      * D, a differential module,
      * a, an integer (Macaulay2Doc),
      * b, an integer (Macaulay2Doc),
  * Outputs:
      * a complex (Complexes),

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

Given a differential module D and integers a and b, this method produces a
chain complex with the module D in homological degrees a through b, where all
maps are the differential of D.

+------------------------------------------------------------------------+
|i1 : phi = matrix{{0,1},{0,0}};                                         |
|                                                                        |
|              2       2                                                 |
|o1 : Matrix ZZ  <-- ZZ                                                  |
+------------------------------------------------------------------------+
|i2 : D = differentialModule(phi);                                       |
+------------------------------------------------------------------------+
|i3 : unfold(D,-3,4)                                                     |
|                                                                        |
|       2       2       2       2       2       2       2       2       2|
|o3 = ZZ  <-- ZZ  <-- ZZ  <-- ZZ  <-- ZZ  <-- ZZ  <-- ZZ  <-- ZZ  <-- ZZ |
|                                                                        |
|     -3      -2      -1      0       1       2       3       4       5  |
|                                                                        |
|o3 : ChainComplex                                                       |
+------------------------------------------------------------------------+

See also
========

  * differentialModule(Complex), --
    converts a complex into a differential module
  * resMinFlag -- gives a minimal free flag resolution of a
    differential module of degree 0
  * resDM -- uses a "killing cycles"-style construction to find a
    free resolution of a differential module
  * foldComplex -- converts a chain complex into a
    differential module

Ways to use unfold:
===================

  * "unfold(DifferentialModule,ZZ,ZZ)"

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

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