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

VirtualResolutions -- a package for computing virtual resolutions
*****************************************************************

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

While graded minimal free resolutions are useful for studying quasicoherent
sheaves over projective space, when working over a product of projective spaces
or, more generally, over smooth projective toric varieties, graded minimal free
resolutions over the Cox ring seem too restricted by algebraic structure that
is in some sense unimportant geometrically. By allowing a limited amount of
homology, virtual resolutions offer a more flexible alternative for studying
toric subvarieties when compared to minimal graded free resolutions.

Introduced by Berkesch, Erman, and Smith in Virtual resolutions for a product
of projective spaces (see [BES20, arXiv:1703.07631 (see
https://arxiv.org/abs/1703.07631 )]) if $X$ is a smooth toric variety, $S$ is
the Cox ring of $X$ graded by the Picard group of $X$, and $B\subset S$ is the
irrelevant ideal of $X$, then a virtual resolution of a graded $S$-module $M$
is a complex of graded free $S$-modules, which sheafifies to a resolution of
the associated sheaf of $M$.

This package provides tools for constructing and studying virtual resolutions
for products of projective spaces. In particular, it implements a number of the
methods for constructing virtual resolutions for products of projective spaces
as introduced by Berkesch, Erman, and Smith. This package also contains methods
for constructing curves in $\PP^1\times\PP^2$, as these are a natural source
for interesting virtual resolutions.

As a running example, consider three points $([1:1],[1:4])$, $([1:2],[1:5])$,
and $([1:3],[1:6])$ in $\PP^1 \times \PP^1$.

+----------------------------------------------------------+
|i1 : X = toricProjectiveSpace(1)**toricProjectiveSpace(1);|
+----------------------------------------------------------+
|i2 : S = ring X;                                          |
+----------------------------------------------------------+
|i3 : B = ideal X;                                         |
|                                                          |
|o3 : Ideal of S                                           |
+----------------------------------------------------------+
|i4 : J = saturate(intersect(                              |
|         ideal(x_1 - x_0, x_3 - 4*x_2),                   |
|         ideal(x_1 - 2*x_0, x_3 - 5*x_2),                 |
|         ideal(x_1 - 3*x_0, x_3 - 6*x_2)), B);            |
|                                                          |
|o4 : Ideal of S                                           |
+----------------------------------------------------------+
|i5 : minres = res J;                                      |
+----------------------------------------------------------+
|i6 : multigraded betti minres                             |
|                                                          |
|        0             1               2         3         |
|o6 = 0: 1             .               .         .         |
|     2: .            ab               .         .         |
|     3: . a3+a2b+ab2+b3               .         .         |
|     4: .             . 2a3b+2a2b2+2ab3         .         |
|     5: .             .               . a3b2+a2b3         |
|                                                          |
|o6 : MultigradedBettiTally                                |
+----------------------------------------------------------+

As described in Algorithm 3.4 of Berkesch, Erman, and Smith's paper, one may
construct a virtual resolution of a module from its graded minimal free
resolution and an element of the multigraded Castelnuovo-Mumford regularity of
the module. (See Maclagan and Smith's paper Multigraded Castelnuovo-Mumford
Regularity (see [MS04, arXiv:math/0305214 (see
https://arxiv.org/abs/math/0305214 )]) for the definition of multigraded
regularity.) Building on the TateOnProducts, and
LinearTruncations, packages, this package
contains a function allowing one to compute the minimal elements of the
multigraded Castelnuovo-Mumford regularity of a $B$-saturated module.

Continuing the example from above, we see that $(2,0)$ is an element of the
multigraded regularity of $S/J$. From this we can compute a virtual resolution
of $S/J$.

+-------------------------------------+
|i7 : multigradedRegularity(X, J)     |
|                                     |
|o7 = {{0, 2}, {1, 1}, {2, 0}}        |
|                                     |
|o7 : List                            |
+-------------------------------------+
|i8 : vres = virtualOfPair(J, {{3,1}})|
|                                     |
|      1      3      2                |
|o8 = S  <-- S  <-- S  <-- 0 <-- 0    |
|                                     |
|     0      1      2      3     4    |
|                                     |
|o8 : ChainComplex                    |
+-------------------------------------+
|i9 : multigraded betti vres          |
|                                     |
|        0      1    2                |
|o9 = 0: 1      .    .                |
|     2: .     ab    .                |
|     3: . a3+a2b    .                |
|     4: .      . 2a3b                |
|                                     |
|o9 : MultigradedBettiTally           |
+-------------------------------------+

Notice that this virtual resolution of $S/J$ is much shorter and thinner than
the graded minimal free resolution of $S/J$. This is a common theme: virtual
resolutions tend to be much shorter and less wide than graded minimal free
resolutions over the Cox ring, but they still preserve geometric information
about $S/J$.

In addition to the functions highlighted above, the VirtualResolutions package
contains a number of other tools for constructing and studying virtual
resolutions. In particular, there are functions to construct virtual
resolutions for zero dimensional subschemes, to check whether a complex is a
virtual resolution, and to construct curves in $\PP^1\times\PP^2$.

Contributors
============

The following people have generously contributed code or worked on this
package.

  * Daniel Erman (see http://www.math.wisc.edu/~derman/ )
  * Gregory G. Smith (see https://mast.queensu.ca/~ggsmith/ )
  * Lauren Cranton Heller (see https://math.berkeley.edu/~lch/ )

References
==========

  * [BES20]: Berkesch, Erman, and Smith, Virtual resolutions for a product of
    projective spaces (see arXiv:1703.07631 (see
    https://arxiv.org/abs/1703.07631 )).
  * [MS04]: Maclagan and Smith, Multigraded Castelnuovo-Mumford Regularity (see
    arXiv:math/0305214 (see https://arxiv.org/abs/math/0305214 )).

Authors
=======

  * Ayah Almousa (see http://pi.math.cornell.edu/~aalmousa  )
    <aka66@cornell.edu>
  * Christine Berkesch (see http://math.umn.edu/~cberkesc/ ) <cberkesc@umn.edu>
  * Juliette Bruce (see https://juliettebruce.github.io ) <jebruce2@wisc.edu>
  * David Eisenbud (see http://www.msri.org/~de/ ) <de@msri.org>
  * Michael Loper (see http://math.umn.edu/~loper012/ ) <loper012@umn.edu>
  * Mahrud Sayrafi (see http://math.umn.edu/~mahrud/ ) <mahrud@umn.edu>

Certification a gold star
=========================

Version 1.2 of this package was accepted for publication in volume 10 (see
https://msp.org/jsag/2020/10-1/ ) of The Journal of Software for Algebra and
Geometry (see http://j-sag.org/ ) on 19 May 2020, in the article The virtual
resolutions package for Macaulay2 (see https://msp.org/jsag/2020/10-1/p06.xhtml
). That version can be obtained from the journal (see
https://msp.org/jsag/2020/10-1/jsag-v10-n1-x06-VirtualResolutions.zip ) or from
the Macaulay2 source code repository (see
http://github.com/Macaulay2/M2/blob/28038a52dcc3b0ad7adfd2562a9cd6b6414a6636/M2
/Macaulay2/packages/VirtualResolutions.m2 ).

Version
=======

This documentation describes version 1.4 of VirtualResolutions.

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

The source code from which this documentation is derived is in the file
VirtualResolutions.m2 (see common/share/Macaulay2/VirtualResolutions.m2 ). The
auxiliary files accompanying it are in the directory VirtualResolutions/ (see
common/share/Macaulay2/VirtualResolutions/ ).

Exports
=======

  * Functions and commands
      * curveFromP3toP1P2 -- creates the ideal of a
        curve in P^1xP^2 from the ideal of a curve in P^3
      * idealSheafGens -- creates a list of subsets of
        the minimal generators that generate a given ideal up to saturation
      * isVirtual -- checks whether a chain complex is a
        virtual resolution
      * multigradedRegularity -- computes the
        minimal elements of the multigraded regularity of a module over a
        multigraded ring
      * randomCurveP1P2 -- creates the ideal of a
        random curve in P^1xP^2
      * randomMonomialCurve -- creates the ideal of
        a random monomial curve of degree (d,e) in P^1xP^2
      * randomRationalCurve -- creates the ideal of
        a random rational curve of degree (d,e) in P^1xP^2
      * resolveViaFatPoint -- returns a virtual
        resolution of a zero-dimensional scheme
      * virtualOfPair -- creates a virtual resolution
        from a free resolution by keeping only summands of specified degrees
  * Methods
      * "curveFromP3toP1P2(Ideal)" -- see curveFromP3toP1P2,
        -- creates the ideal of a curve in P^1xP^2 from the
        ideal of a curve in P^3
      * "idealSheafGens(ZZ,Ideal,Ideal)" -- see idealSheafGens,
        -- creates a list of subsets of the minimal generators
        that generate a given ideal up to saturation
      * "idealSheafGens(ZZ,Ideal,NormalToricVariety)" -- see
        idealSheafGens, -- creates a list of subsets of the
        minimal generators that generate a given ideal up to saturation
      * "isVirtual(Ideal,ChainComplex)" -- see isVirtual, --
        checks whether a chain complex is a virtual resolution
      * "isVirtual(NormalToricVariety,ChainComplex)" -- see isVirtual,
        -- checks whether a chain complex is a virtual resolution
      * "multigradedRegularity(NormalToricVariety,Ideal)" -- see
        multigradedRegularity, -- computes the minimal
        elements of the multigraded regularity of a module over a multigraded
        ring
      * "multigradedRegularity(NormalToricVariety,Module)" -- see
        multigradedRegularity, -- computes the minimal
        elements of the multigraded regularity of a module over a multigraded
        ring
      * "multigradedRegularity(Ring,Ideal)" -- see multigradedRegularity,
        -- computes the minimal elements of the
        multigraded regularity of a module over a multigraded ring
      * "multigradedRegularity(Ring,Module)" -- see
        multigradedRegularity, -- computes the minimal
        elements of the multigraded regularity of a module over a multigraded
        ring
      * "randomCurveP1P2(ZZ,ZZ)" -- see randomCurveP1P2,
        -- creates the ideal of a random curve in P^1xP^2
      * "randomCurveP1P2(ZZ,ZZ,Ring)" -- see randomCurveP1P2,
        -- creates the ideal of a random curve in P^1xP^2
      * "randomMonomialCurve(ZZ,ZZ)" -- see randomMonomialCurve,
        -- creates the ideal of a random monomial curve of
        degree (d,e) in P^1xP^2
      * "randomMonomialCurve(ZZ,ZZ,Ring)" -- see randomMonomialCurve,
        -- creates the ideal of a random monomial curve of
        degree (d,e) in P^1xP^2
      * "randomRationalCurve(ZZ,ZZ)" -- see randomRationalCurve,
        -- creates the ideal of a random rational curve of
        degree (d,e) in P^1xP^2
      * "randomRationalCurve(ZZ,ZZ,Ring)" -- see randomRationalCurve,
        -- creates the ideal of a random rational curve of
        degree (d,e) in P^1xP^2
      * "resolveViaFatPoint(Ideal,Ideal,List)" -- see resolveViaFatPoint,
        -- returns a virtual resolution of a
        zero-dimensional scheme
      * "virtualOfPair(ChainComplex,List)" -- see virtualOfPair,
        -- creates a virtual resolution from a free resolution
        by keeping only summands of specified degrees
      * "virtualOfPair(Ideal,List)" -- see virtualOfPair,
        -- creates a virtual resolution from a free resolution by keeping only
        summands of specified degrees
      * "virtualOfPair(Module,List)" -- see virtualOfPair,
        -- creates a virtual resolution from a free resolution by keeping only
        summands of specified degrees
  * Symbols
      * Attempt -- limit number of attempts for randomCurveP1P2
      * GeneralElements -- combines generators of same
        degree into a general linear combination
      * "LowerLimit" -- see multigradedRegularity,
        -- computes the minimal elements of the multigraded regularity of a
        module over a multigraded ring
      * "UpperLimit" -- see multigradedRegularity,
        -- computes the minimal elements of the multigraded regularity of a
        module over a multigraded ring
      * PreserveDegree -- Determines if curve is
        disjoint from base loci

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

The object VirtualResolutions, is a package (Macaulay2Doc).

Attempt -- limit number of attempts for randomCurveP1P2
*******************************************************

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

When randomCurveP1P2, generates a random curve in
$\PP^3$ using the SpaceCurves, package, it is possible
the resulting curve will intersect the base loci of the projections used to
construct the curve in $\PP^1\times\PP^2$. If the curve does intersect the base
locusi it will generate a new random curve in $\PP^3$. The option Attempt
limits the number of attempts to find a curve disjoint from the base loci
before quitting. By default, Attempt is set to 1000.

See also
========

  * randomCurveP1P2 -- creates the ideal of a random
    curve in P^1xP^2

Functions with optional argument named Attempt :
================================================

  * "randomCurveP1P2(...,Attempt=>...)"

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

The object Attempt, is a symbol (Macaulay2Doc).

curveFromP3toP1P2 -- creates the ideal of a curve in P^1xP^2 from the ideal of a curve in P^3
*********************************************************************************************

Synopsis
========

  * Usage:
        I = curveFromP3toP1P2(J)
  * Inputs:
      * J, an ideal (Macaulay2Doc), defining a curve in $\PP^3$.
  * Optional inputs (Macaulay2Doc),:
      * PreserveDegree, => ..., default value true,
        Determines if curve is disjoint from base loci
  * Outputs:
      * I, an ideal (Macaulay2Doc), defining a curve in
        $\PP^1\times\PP^2$.

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

Given an ideal J defining a curve $C$ in $\PP^3$, curveFromP3toP1P2 produces
the ideal of the curve in $\PP^1\times\PP^2$ defined as follows: consider the
projections $\PP^3\to\PP^2$ and $\PP^3\to\PP^1$ from the point [0:0:0:1] and
the line [0:0:s:t], respectively. The product of these defines a map from
$\PP^3$ to $\PP^1\times\PP^2$. The curve produced by curveFromP3toP1P2 is the
image of the input curve under this map.

This computation is done by first constructing the graph in
$\PP^3\times(\PP^1\times\PP^2)$ of the product of the two projections
$\PP^3\to\PP^2$ and $\PP^3\to\PP^1$ defined above. This graph is then
intersected with $C\times(\PP^1\times\PP^2)$. A curve in $\PP^1\times\PP^2$ is
then obtained from this by saturating and then eliminating.

Note the curve in $\PP^1\times\PP^2$ will have degree and genus equal to the
degree and genus of $C$ as long as $C$ does not intersect the base locus of the
projection. If the option curveFromP3toP1P2(...,PreserveDegree=>...),
is set to true, curveFromP3toP1P2 will check whether $C$
intersects the base locus. If it does, the function will return an error. If
PreserveDegree is set to false, this check is not performed and the output
curve in $\PP^1\times\PP^2$ may have degree and genus different from $C$.

+--------------------------------------------------------------------------+
|i1 : R = ZZ/101[z_0,z_1,z_2,z_3];                                         |
+--------------------------------------------------------------------------+
|i2 : J = ideal(z_0*z_2-z_1^2, z_1*z_3-z_2^2, z_0*z_3-z_1*z_2);            |
|                                                                          |
|o2 : Ideal of R                                                           |
+--------------------------------------------------------------------------+
|i3 : curveFromP3toP1P2(J)                                                 |
|                                                                          |
|             2                                                            |
|o3 = ideal (x    - x   x   , - x   x    + x   x   , - x   x    + x   x   )|
|             1,1    1,0 1,2     0,1 1,1    0,0 1,2     0,1 1,0    0,0 1,1 |
|                                                                          |
|               ZZ                                                         |
|o3 : Ideal of ---[x   ..x   , x   ..x   ]                                 |
|              101  0,0   0,1   1,0   1,2                                  |
+--------------------------------------------------------------------------+

Caveat
======

This creates a ring $F[x_{0,0},x_{0,1},x_{1,0},x_{1,1},x_{1,2}]$ in which the
resulting ideal is defined.

Ways to use curveFromP3toP1P2 :
===============================

  * "curveFromP3toP1P2(Ideal)"

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

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

GeneralElements -- combines generators of same degree into a general linear combination
***************************************************************************************

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

If GeneralElements is set to true, see idealSheafGens, will
replace all generators of I of the same degree with a new generator of the that
degree which is a general linear combination of those generators, then run
idealSheafGens on the new ideal.

See also
========

  * idealSheafGens -- creates a list of subsets of the
    minimal generators that generate a given ideal up to saturation

Functions with optional argument named GeneralElements :
========================================================

  * "idealSheafGens(...,GeneralElements=>...)"

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

The object GeneralElements, is a symbol (Macaulay2Doc).

idealSheafGens -- creates a list of subsets of the minimal generators that generate a given ideal up to saturation
******************************************************************************************************************

Synopsis
========

  * Usage:
        idealSheafGens(n,I,irr)
        idealSheafGens(n,I,X)
  * Inputs:
      * I, an ideal (Macaulay2Doc),
      * n, an integer (Macaulay2Doc), size of subset of minimal
        generators of I that may generate I up to saturation with irr
      * irr, an ideal (Macaulay2Doc), irrelevant ideal
      * X, a normal toric variety (NormalToricVarieties),
        normal toric variety whose
        Cox ring contains I
  * Optional inputs (Macaulay2Doc),:
      * GeneralElements, => ..., default value false,
        combines generators of same degree into a general linear combination
  * Outputs:
      * a list (Macaulay2Doc), all ideals generated by subsets of
        size n of generators of I that generate I up to saturation with irr

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

Given an ideal I, integer n, and irrelevant ideal irr, idealSheafGens searches
through all n-subsets of the generators of I. If a subset generates the same
irr-saturated ideal as the irr-saturation of I, then the ideal generated by
that subset is added to a list. After running through all subsets, the list is
returned.

+-----------------------------------------------------------------------------+
|i1 : R = ZZ/101[x_0,x_1,x_2,x_3,x_4,Degrees=>{2:{1,0},3:{0,1}}];             |
+-----------------------------------------------------------------------------+
|i2 : B = intersect(ideal(x_0,x_1),ideal(x_2,x_3,x_4));                       |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : I = ideal(x_0^2*x_2^2+x_1^2*x_3^2+x_0*x_1*x_4^2,                        |
|                                                                             |
|o3 : Ideal of R                                                              |
|-----------------------------------------------------------------------------|
|x_0^3*x_4+x_1^3*(x_2+x_3));                                                  |
+-----------------------------------------------------------------------------+
|i4 : idealSheafGens(2,I,B)                                                   |
|                                                                             |
|              2 2    2 2        2   3      3      3                          |
|o4 = {ideal (x x  + x x  + x x x , x x  + x x  + x x )}                      |
|              0 2    1 3    0 1 4   1 2    1 3    0 4                        |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use idealSheafGens :
============================

  * "idealSheafGens(ZZ,Ideal,Ideal)"
  * "idealSheafGens(ZZ,Ideal,NormalToricVariety)"

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

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

isVirtual -- checks whether a chain complex is a virtual resolution
*******************************************************************

Synopsis
========

  * Usage:
        isVirtual(irr,C)
        isVirtual(X,C)
  * Inputs:
      * irr, an ideal (Macaulay2Doc), irrelevant ideal of the ring
      * X, a normal toric variety (NormalToricVarieties),
        normal toric variety
      * C, a chain complex (Macaulay2Doc), chain complex we
        want to check if is a virtual resolution
  * Optional inputs (Macaulay2Doc),:
      * Strategy, => ...,
        default value null, changes strategy from computing homology to
        computing minors of boundary maps
  * Outputs:
      * a Boolean value (Macaulay2Doc), true if Cis a virtual
        resolution of I false if not

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

Given the irrelevant ideal irr of a NormalToricVariety and a chain complex C,
isVirtual returns true if C is a virtual resolution of some module. If not, it
returns false. This is done by checking that the higher homology groups of Care
supported on the irrelevant ideal.

If debugLevel (Macaulay2Doc), is larger than zero, the
homological degree where isVirtual fails is printed.

+---------------------------------------+
|i1 : R = ZZ/101[s,t];                  |
+---------------------------------------+
|i2 : isVirtual(ideal(s,t),res ideal(t))|
|                                       |
|o2 = true                              |
+---------------------------------------+

Continuing our running example of three points $([1:1],[1:4])$,
$([1:2],[1:5])$, and $([1:3],[1:6])$ in $\PP^1 \times \PP^1$, we can check
whether the virtual complex we compute below and in other places is in fact
virtual.

+----------------------------------------------------------+
|i3 : Y = toricProjectiveSpace(1)**toricProjectiveSpace(1);|
+----------------------------------------------------------+
|i4 : S = ring Y;                                          |
+----------------------------------------------------------+
|i5 : B = ideal Y;                                         |
|                                                          |
|o5 : Ideal of S                                           |
+----------------------------------------------------------+
|i6 : J = saturate(intersect(                              |
|        ideal(x_1 - x_0, x_3 - 4*x_2),                    |
|        ideal(x_1 - 2*x_0, x_3 - 5*x_2),                  |
|        ideal(x_1 - 3*x_0, x_3 - 6*x_2)), B);             |
|                                                          |
|o6 : Ideal of S                                           |
+----------------------------------------------------------+
|i7 : minres = res J;                                      |
+----------------------------------------------------------+
|i8 : vres = virtualOfPair(J,{{3,1}});                     |
+----------------------------------------------------------+
|i9 : isVirtual(B,vres)                                    |
|                                                          |
|o9 = true                                                 |
+----------------------------------------------------------+

Finally, we can also use the Determinantal strategy, which implements Theorem
1.3 of [Loper, arXiv:1904.05994 (see https://arxiv.org/abs/1904.05994 )].

+-----------------------------------------------+
|i10 : isVirtual(B,vres,Strategy=>Determinantal)|
|                                               |
|o10 = true                                     |
+-----------------------------------------------+

Ways to use isVirtual :
=======================

  * "isVirtual(Ideal,ChainComplex)"
  * "isVirtual(NormalToricVariety,ChainComplex)"

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

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

isVirtual(...,Strategy=>...) -- changes strategy from computing homology to computing minors of boundary maps
*************************************************************************************************************

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

If Strategy is set to Determinantal, isVirtual will check whether the given
chain complex is a virtual resolution by checking the depth of the saturation
of the ideals of maximal rank from the boundary maps. See Theorem 1.3 of
[Loper, arXiv:1904.05994 (see https://arxiv.org/abs/1904.05994 )].

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

  * Default value: null
  * Function: isVirtual, -- checks whether a chain complex is
    a virtual resolution
  * Option key: Strategy (Macaulay2Doc), -- an optional argument

See also
========

  * isVirtual -- checks whether a chain complex is a virtual
    resolution

Functions with optional argument named Strategy :
=================================================

  * "addHook(...,Strategy=>...)" -- see addHook (Macaulay2Doc),
    -- add a hook function to an object for later processing
  * "annihilator(...,Strategy=>...)" -- see annihilator (Saturation),
    -- the annihilator ideal
  * "associatedPrimes(...,Strategy=>...)" -- see associatedPrimes (PrimaryDecomposition),
    -- find associated primes
  * "basis(...,Strategy=>...)" -- see basis (Macaulay2Doc), --
    basis or generating set of all or part of a ring, ideal or module
  * "coarseMultigradedRegularity(...,Strategy=>...)" -- see
    coarseMultigradedRegularity (TateOnProducts),
    -- A truncation that has linear resolution
  * "mingens(...,Strategy=>...)" -- see Complement (Macaulay2Doc),
    -- a Strategy option value
  * "trim(...,Strategy=>...)" -- see Complement (Macaulay2Doc),
    -- a Strategy option value
  * determinant(...,Strategy=>...) (Macaulay2Doc)
    -- choose
    between Bareiss, Cofactor and Dynamic algorithms
  * "dual(MonomialIdeal,List,Strategy=>...)" -- see
    dual(MonomialIdeal,Strategy=>...) (Macaulay2Doc),
  * "dual(MonomialIdeal,RingElement,Strategy=>...)" -- see
    dual(MonomialIdeal,Strategy=>...) (Macaulay2Doc),
  * dual(MonomialIdeal,Strategy=>...) (Macaulay2Doc)
  * exteriorPower(...,Strategy=>...) (Macaulay2Doc)
    -- choose
    between Bareiss, Cofactor and Dynamic algorithms
  * "gb(...,Strategy=>...)" -- see gb (Macaulay2Doc), -- compute a
    Gröbner basis
  * gcdLLL(...,Strategy=>...) (missing documentation)
  * "GF(...,Strategy=>...)" -- see GF (Macaulay2Doc), -- make a finite
    field
  * "groebnerBasis(...,Strategy=>...)" -- see groebnerBasis (Macaulay2Doc),
    -- Gröbner basis, as a matrix
  * hermite(...,Strategy=>...) (missing documentation)
  * "hooks(...,Strategy=>...)" -- see hooks (Macaulay2Doc), -- list
    hooks attached to a key
  * "idealizer(...,Strategy=>...)" -- see idealizer (IntegralClosure),
    -- compute Hom(I,I) as a quotient ring
  * integralClosure(...,Strategy=>...) (IntegralClosure),
    --
    control the algorithm used
  * "intersect(Ideal,Ideal,Strategy=>...)" -- see intersect(Ideal,Ideal) (Macaulay2Doc),
    -- compute an intersection of a
    sequence of ideals or modules
  * "intersect(Module,Module,Strategy=>...)" -- see
    intersect(Ideal,Ideal) (Macaulay2Doc), --
    compute an intersection of a sequence of ideals or modules
  * "intersectInP(...,Strategy=>...)" -- see
    intersectInP(...,BasisElementLimit=>...) (ReesAlgebra),
    --
    Option for intersectInP
  * "isPrimary(...,Strategy=>...)" -- see isPrimary (PrimaryDecomposition),
    -- determine whether a submodule is
    primary
  * "isPrime(Ideal,Strategy=>...)" -- see isPrime(Ideal) (MinimalPrimes),
    -- whether an ideal is prime
  * isVirtual(...,Strategy=>...)
    -- changes strategy from
    computing homology to computing minors of boundary maps
  * LLL(...,Strategy=>...) (LLLBases)
    -- choose among
    different algorithms
  * "localize(...,Strategy=>...)" -- see localize (PrimaryDecomposition),
    -- localize an ideal at a prime ideal
  * "makeSimplicial(...,Strategy=>...)" -- see
    makeSimplicial(NormalToricVariety) (NormalToricVarieties),
    -- make a
    birational simplicial toric variety
  * "makeSmooth(...,Strategy=>...)" -- see
    makeSmooth(NormalToricVariety) (NormalToricVarieties),
    -- make a
    birational smooth toric variety
  * "match(...,Strategy=>...)" -- see match (Macaulay2Doc), --
    regular expression matching
  * "decompose(Ideal,Strategy=>...)" -- see minimalPrimes (MinimalPrimes),
    -- minimal primes of an ideal
  * "minimalPrimes(...,Strategy=>...)" -- see minimalPrimes (MinimalPrimes),
    -- minimal primes of an ideal
  * minors(...,Strategy=>...) (Macaulay2Doc)
    -- choose
    between Bareiss, Cofactor and Dynamic algorithms
  * "multigradedRegularity(...,Strategy=>...)" -- see
    multigradedRegularity, -- computes the minimal
    elements of the multigraded regularity of a module over a multigraded ring
  * "primaryComponent(...,Strategy=>...)" -- see primaryComponent (PrimaryDecomposition),
    -- find a primary component
    corresponding to an associated prime
  * pseudoInverse(...,Strategy=>...) (missing documentation)
  * pushForward(...,Strategy=>...) (missing documentation)
  * quotient(...,Strategy=>...) (Saturation)
  * "radical(...,Strategy=>...)" -- see radical (MinimalPrimes),
    -- the radical of an ideal
  * "radicalContainment(...,Strategy=>...)" -- see radicalContainment (MinimalPrimes),
    -- whether an element is contained in
    the radical of an ideal
  * "analyticSpread(...,Strategy=>...)" -- see
    reesIdeal(...,Strategy=>...) (ReesAlgebra),
    -- Choose a
    strategy for the saturation step
  * "distinguished(...,Strategy=>...)" -- see
    reesIdeal(...,Strategy=>...) (ReesAlgebra),
    -- Choose a
    strategy for the saturation step
  * "isLinearType(...,Strategy=>...)" -- see
    reesIdeal(...,Strategy=>...) (ReesAlgebra),
    -- Choose a
    strategy for the saturation step
  * "isReduction(...,Strategy=>...)" -- see reesIdeal(...,Strategy=>...) (ReesAlgebra),
    -- Choose a
    strategy for the saturation step
  * "minimalReduction(...,Strategy=>...)" -- see
    reesIdeal(...,Strategy=>...) (ReesAlgebra),
    -- Choose a
    strategy for the saturation step
  * "multiplicity(...,Strategy=>...)" -- see
    reesIdeal(...,Strategy=>...) (ReesAlgebra),
    -- Choose a
    strategy for the saturation step
  * "normalCone(...,Strategy=>...)" -- see reesIdeal(...,Strategy=>...) (ReesAlgebra),
    -- Choose a
    strategy for the saturation step
  * "reesAlgebra(...,Strategy=>...)" -- see reesIdeal(...,Strategy=>...) (ReesAlgebra),
    -- Choose a
    strategy for the saturation step
  * reesIdeal(...,Strategy=>...) (ReesAlgebra)
    -- Choose a
    strategy for the saturation step
  * "specialFiber(...,Strategy=>...)" -- see
    reesIdeal(...,Strategy=>...) (ReesAlgebra),
    -- Choose a
    strategy for the saturation step
  * "specialFiberIdeal(...,Strategy=>...)" -- see
    reesIdeal(...,Strategy=>...) (ReesAlgebra),
    -- Choose a
    strategy for the saturation step
  * "regSeqInIdeal(...,Strategy=>...)" -- see regSeqInIdeal (PrimaryDecomposition),
    -- a regular sequence contained in an
    ideal
  * resolution(...,Strategy=>...) (Macaulay2Doc)
  * saturate(...,Strategy=>...) (Saturation)
  * "primaryDecomposition(...,Strategy=>...)" -- see strategies for computing primary decomposition (PrimaryDecomposition),
  * "SVDComplex(...,Strategy=>...)" -- see SVDComplex (SVDComplexes),
    -- Compute the SVD decomposition of a
    chainComplex over RR
  * "SVDHomology(...,Strategy=>...)" -- see SVDHomology (SVDComplexes),
    -- Estimate the homology of a chainComplex over
    RR with the SVD decomposition
  * "syz(...,Strategy=>...)" -- see syz(Matrix) (Macaulay2Doc),
    -- compute the syzygy matrix
  * "tangentCone(...,Strategy=>...)" -- see tangentCone(Ideal) (TangentCone),

multigradedRegularity -- computes the minimal elements of the multigraded regularity of a module over a multigraded ring
************************************************************************************************************************

Synopsis
========

  * Usage:
        multigradedRegularity(S,I)
        multigradedRegularity(S,M)
        multigradedRegularity(X,I)
        multigradedRegularity(X,M)
  * Inputs:
      * S, a ring (Macaulay2Doc), a multigraded Cox ring
      * X, a normal toric variety (NormalToricVarieties),
        a product of normal toric
        varieties
      * I, an ideal (Macaulay2Doc), an ideal over a multigraded
        ring
      * M, a module (Macaulay2Doc), a module over a multigraded
        ring
  * Optional inputs (Macaulay2Doc),:
      * UpperLimit => a list (Macaulay2Doc), default value null,
        largest twist to compute cohomology for
      * LowerLimit => a list (Macaulay2Doc), default value null,
        smallest twist to compute cohomology for
      * Strategy => a string (Macaulay2Doc), default value null,
        implemented strategies are "CohomologySearch" and "TruncationSearch"
        (default)
  * Outputs:
      * a list (Macaulay2Doc), a list of multidegrees

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

Given a module M over a multigraded ring S or a product of toric varieties X,
this method finds the minimal elements of the multigraded Castelnuovo-Mumford
regularity of M as defined in Definition 1.1 of [MS04] (see arXiv:math/0305214
(see https://arxiv.org/abs/math/0305214 )). If the input is an ideal,
multigraded regularity of $S^1/I$ is computed.

There are two strategies implemented and run using hooks (Macaulay2Doc),:

Strategy => "CohomologySearch"
------------------------------

  * This strategy calls the cohomologyHashTable (TateOnProducts),
    method from TateOnProducts,
    and checks for the multidegrees where the Hilbert
    polynomial and Hilbert function match and where the higher sheaf cohomology
    vanishes.

Strategy => "TruncationSearch" (default)
----------------------------------------

  * This strategy uses isQuasiLinear (LinearTruncations),
    method from LinearTruncations, to search for
    the multidegrees where the module is regular by checking the Betti numbers
    of the truncation of the module. See Theorem 4.6 of arXiv:2110.10705 (see
    https://arxiv.org/abs/2110.10705 ). This strategy is much faster.

Note that both strategies require the module or ideal to be saturated by the
irrelevant ideal of the Cox ring.

As an example, here we compute the minimal elements of the multigraded
regularity for Example 1.4 of [BES20] (see arXiv:1703.07631 (see
https://arxiv.org/abs/1703.07631 )). We consider the example of a hyperelliptic
curve of genus 4 in $\PP^1\times\PP^2$.

+-----------------------------------------------------------------------------+
|i1 : X = toricProjectiveSpace(1)**toricProjectiveSpace(2)                    |
|                                                                             |
|o1 = X                                                                       |
|                                                                             |
|o1 : NormalToricVariety                                                      |
+-----------------------------------------------------------------------------+
|i2 : S = ring X; B = ideal X;                                                |
|                                                                             |
|o3 : Ideal of S                                                              |
+-----------------------------------------------------------------------------+
|i4 : I = ideal(x_0^2*x_2^2+x_1^2*x_3^2+x_0*x_1*x_4^2,                        |
|                                                                             |
|             2 2    2 2        2   3      3      3                           |
|o4 = ideal (x x  + x x  + x x x , x x  + x x  + x x )                        |
|             0 2    1 3    0 1 4   1 2    1 3    0 4                         |
|                                                                             |
|o4 : Ideal of S                                                              |
|-----------------------------------------------------------------------------|
|x_0^3*x_4+x_1^3*(x_2+x_3))                                                   |
+-----------------------------------------------------------------------------+

After saturating the defining ideal by the irrelevant ideal we may compute its
multigraded regularity.

+------------------------------------+
|i5 : J = saturate(I,B);             |
|                                    |
|o5 : Ideal of S                     |
+------------------------------------+
|i6 : L = multigradedRegularity(X, J)|
|                                    |
|o6 = {{2, 2}, {4, 1}, {1, 5}}       |
|                                    |
|o6 : List                           |
+------------------------------------+

If debugLevel (Macaulay2Doc), is larger than zero, additional
information about the degree search is printed.

This method also accepts the ring provided by productOfProjectiveSpaces (TateOnProducts),
from the TateOnProducts,
package.

Contributors
============

Lauren Cranton Heller contributed to the code for this method.

Caveat
======

The input is assumed to be saturated. Moreover, if the input is a module
generated in non-positive degrees, then the output may be incorrect. In that
case, adding the optional argument

LowerLimit => apply(n, i -> min(degrees M / (deg -> deg_i))) - dim X

where M is the module and X is the toric variety, may be a sufficient solution.

Ways to use multigradedRegularity :
===================================

  * "multigradedRegularity(NormalToricVariety,Ideal)"
  * "multigradedRegularity(NormalToricVariety,Module)"
  * "multigradedRegularity(Ring,Ideal)"
  * "multigradedRegularity(Ring,Module)"

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

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

PreserveDegree -- Determines if curve is disjoint from base loci
****************************************************************

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

When set to true, see curveFromP3toP1P2, will check
whether or not the given curve in $\PP^3$ intersects the base locus of the
projections maps used in this function. If this option is set to true and the
given curve does intersect the base locus, an error is returned.

See also
========

  * curveFromP3toP1P2 -- creates the ideal of a curve
    in P^1xP^2 from the ideal of a curve in P^3

Functions with optional argument named PreserveDegree :
=======================================================

  * "curveFromP3toP1P2(...,PreserveDegree=>...)"

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

The object PreserveDegree, is a symbol (Macaulay2Doc).

randomCurveP1P2 -- creates the ideal of a random curve in P^1xP^2
*****************************************************************

Synopsis
========

  * Usage:
        randomCurveP1P2(d,g,F)
        randomCurveP1P2(d,g)
  * Inputs:
      * d, an integer (Macaulay2Doc), degree of the curve.
      * g, an integer (Macaulay2Doc), genus of the curve.
      * F, a ring (Macaulay2Doc), base ring.
  * Optional inputs (Macaulay2Doc),:
      * Attempt, => ..., default value 1000, limit number of
        attempts for randomCurveP1P2
  * Outputs:
      * an ideal (Macaulay2Doc), defining random curve
        $\PP^1\times\PP^2$ from a curve of degree d and genus g in $\PP^3$ over
        F.

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

Given a positive integer d, a non-negative integer g, and a ring F,
randomCurveP1P2 produces a random curve of bi-degree (d,d) and genus g in
$\PP^1\times\PP^2$. This is done by using the curve (SpaceCurves),
function from the SpaceCurves, package to first
generate a random curve of degree d and genus g in $\PP^1\times\PP^2$, and then
applying curveFromP3toP1P2, to produce a curve in
$\PP^1\times\PP^2$.

Since curveFromP3toP1P2, relies on projecting from the
point $[0:0:0:1]$ and the line $[0:0:s:t]$, randomCurveP1P2 attempts to find a
curve in $\PP^3$, which does not intersect the base locus of these projections.
If the curve did intersect the base locus the resulting curve in
$\PP^1\times\PP^2$ would not have degree (d,d). The number of attempts used to
try to find such curves is controlled by the
randomCurveP1P2(...,Attempt=>...), option, which by default is set to
1000.

+-----------------------------------------+
|i1 : randomCurveP1P2(3,0);               |
|                                         |
|               ZZ                        |
|o1 : Ideal of ---[x   ..x   , x   ..x   ]|
|              101  0,0   0,1   1,0   1,2 |
+-----------------------------------------+
|i2 : randomCurveP1P2(3,0,QQ);            |
|                                         |
|o2 : Ideal of QQ[x   ..x   , x   ..x   ] |
|                  0,0   0,1   1,0   1,2  |
+-----------------------------------------+

Caveat
======

This creates a ring $F[x_{0,0},x_{0,1},x_{1,0},x_{1,1},x_{1,2}]$ in which the
resulting ideal is defined.

Ways to use randomCurveP1P2 :
=============================

  * "randomCurveP1P2(ZZ,ZZ)"
  * "randomCurveP1P2(ZZ,ZZ,Ring)"

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

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

randomMonomialCurve -- creates the ideal of a random monomial curve of degree (d,e) in P^1xP^2
**********************************************************************************************

Synopsis
========

  * Usage:
        randomMonomialCurve(d,e,F)
        randomMonomialCurve(d,e)
  * Inputs:
      * d, an integer (Macaulay2Doc), degree of curve on the $\PP^1$
        factor of $\PP^1\times\PP^2$
      * e, an integer (Macaulay2Doc), degree of curve on the $\PP^2$
        factor of $\PP^1\times\PP^2$
      * F, a ring (Macaulay2Doc), base ring
  * Outputs:
      * an ideal (Macaulay2Doc), defining random monomial curve in
        $\PP^1\times\PP^2$ of degree (d,e) over F.

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

Given two positive integers d,e and a ring F, randomMonomialCurve returns the
ideal of a random curve in $\PP^1\times\PP^2$ of degree (d,e) defined over the
base ring F.

This is done by randomly generating a monomial $m$ of degree $e$ in $F[s,t]$,
which is not $s^e$ or $t^e$. This allows one to define two maps $\PP^1\to\PP^1$
and $\PP^1\to\PP^2$ given by {s^d,t^d} and {s^e,m,t^e}, respectively. The graph
of the product of these two maps in $\PP^1\times(\PP^1\times\PP^2)$ is
computed, from which a curve of bi-degree (d,e) in $\PP^1\times\PP^2$ over F is
obtained by saturating and then eliminating.

If no base ring is specified, the computations are performed over ZZ/101.

+----------------------------------------+
|i1 : randomMonomialCurve(2,3,QQ);       |
|                                        |
|o1 : Ideal of QQ[x   ..x   , x   ..x   ]|
|                  0,0   0,1   1,0   1,2 |
+----------------------------------------+

Caveat
======

This creates a ring $F[x_{0,0},x_{0,1},x_{1,0},x_{1,1},x_{1,2}]$ in which the
resulting ideal is defined.

Ways to use randomMonomialCurve :
=================================

  * "randomMonomialCurve(ZZ,ZZ)"
  * "randomMonomialCurve(ZZ,ZZ,Ring)"

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

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

randomRationalCurve -- creates the ideal of a random rational curve of degree (d,e) in P^1xP^2
**********************************************************************************************

Synopsis
========

  * Usage:
        randomRationalCurve(d,e,F)
        randomRationalCurve(d,e)
  * Inputs:
      * d, an integer (Macaulay2Doc), degree of curve on the $\PP^1$
        factor of $\PP^1\times\PP^2$
      * e, an integer (Macaulay2Doc), degree of curve on the $\PP^2$
        factor of $\PP^1\times\PP^2$
      * F, a ring (Macaulay2Doc), base ring
  * Outputs:
      * an ideal (Macaulay2Doc), defining random rational curve in
        $\PP^1\times\PP^2$ of degree (d,e) over F.

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

Given two positive integers d,e and a ring F, randomRationalCurve returns the
ideal of a random curve in $\PP^1\times\PP^2$ of degree (d,e) defined over the
base ring F.

This is done by randomly generating two homogeneous polynomials of degree d and
three homogeneous polynomials of degree three in $F[s,t]$ defining maps
$\PP^1\to\PP^1$ and $\PP^1\to\PP^2$, respectively. The graph of the product of
these two maps in $\PP^1\times(\PP^1\times\PP^2)$ is computed, from which a
curve of bi-degree (d,e) in $\PP^1\times\PP^2$ over F is obtained by saturating
and then eliminating.

If no base ring is specified, the computations are performed over ZZ/101.

+-----------------------------------------+
|i1 : randomRationalCurve(2,3,QQ);        |
|                                         |
|o1 : Ideal of QQ[x   ..x   , x   ..x   ] |
|                  0,0   0,1   1,0   1,2  |
+-----------------------------------------+
|i2 : randomRationalCurve(2,3);           |
|                                         |
|               ZZ                        |
|o2 : Ideal of ---[x   ..x   , x   ..x   ]|
|              101  0,0   0,1   1,0   1,2 |
+-----------------------------------------+

Caveat
======

This creates a ring $F[x_{0,0},x_{0,1},x_{1,0},x_{1,1},x_{1,2}]$ in which the
resulting ideal is defined.

Ways to use randomRationalCurve :
=================================

  * "randomRationalCurve(ZZ,ZZ)"
  * "randomRationalCurve(ZZ,ZZ,Ring)"

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

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

resolveViaFatPoint -- returns a virtual resolution of a zero-dimensional scheme
*******************************************************************************

Synopsis
========

  * Usage:
        resolveViaFatPoint(I, irr, A)
  * Inputs:
      * J, an ideal (Macaulay2Doc), saturated ideal corresponding
        to a zero-dimensional scheme
      * irr, an ideal (Macaulay2Doc), the irrelevant ideal
      * A, a list (Macaulay2Doc), power you want to take the
        irrelevant ideal to
  * Outputs:
      * a chain complex (Macaulay2Doc), virtual resolution
        of our ideal

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

Given a saturated ideal J of a zero-dimensional subscheme, irrelevant ideal
irr, and a tuple A, resolveViaFatPoint computes a free resolution of J
intersected with A-th power of the irrelevant ideal. See Theorem 4.1 of [BES20,
arXiv:1703.07631 (see https://arxiv.org/abs/1703.07631 )].

Below we follow example 4.7 of [BES20,arXiv:1703.07631 (see
https://arxiv.org/abs/1703.07631 )] and compute the virtual resolution of 6
points in $\PP^1\times\PP^1\times\PP^2$.

+-----------------------------------------------------------------+
|i1 : N = {1,1,2}                                                 |
|                                                                 |
|o1 = {1, 1, 2}                                                   |
|                                                                 |
|o1 : List                                                        |
+-----------------------------------------------------------------+
|i2 : pts = 6                                                     |
|                                                                 |
|o2 = 6                                                           |
+-----------------------------------------------------------------+
|i3 : (S, E) = productOfProjectiveSpaces N                        |
|                                                                 |
|o3 = (S, E)                                                      |
|                                                                 |
|o3 : Sequence                                                    |
+-----------------------------------------------------------------+
|i4 : irr = intersect for n to #N-1 list (                        |
|         ideal select(gens S, i -> (degree i)#n == 1)            |
|         );                                                      |
|                                                                 |
|o4 : Ideal of S                                                  |
+-----------------------------------------------------------------+
|i5 : I = saturate intersect for i to pts - 1 list (              |
|         P := sum for n to N#0 - 1 list ideal random({1,0,0}, S);|
|         Q := sum for n to N#1 - 1 list ideal random({0,1,0}, S);|
|         R := sum for n to N#2 - 1 list ideal random({0,0,1}, S);|
|         P + Q + R                                               |
|         );                                                      |
|                                                                 |
|o5 : Ideal of S                                                  |
+-----------------------------------------------------------------+
|i6 : C = resolveViaFatPoint (I, irr, {2,1,0})                    |
|                                                                 |
|      1      17      34      24      6                           |
|o6 = S  <-- S   <-- S   <-- S   <-- S  <-- 0                     |
|                                                                 |
|     0      1       2       3       4      5                     |
|                                                                 |
|o6 : ChainComplex                                                |
+-----------------------------------------------------------------+
|i7 : isVirtual(irr, C)                                           |
|                                                                 |
|o7 = true                                                        |
+-----------------------------------------------------------------+

Ways to use resolveViaFatPoint :
================================

  * "resolveViaFatPoint(Ideal,Ideal,List)"

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

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

virtualOfPair -- creates a virtual resolution from a free resolution by keeping only summands of specified degrees
******************************************************************************************************************

Synopsis
========

  * Usage:
        virtualOfPair(I, L)
        virtualOfPair(M, L)
        virtualOfPair(C, L)
  * Inputs:
      * I, an ideal (Macaulay2Doc), ideal over multigraded ring
      * M, a module (Macaulay2Doc), module over multigraded ring
      * C, a chain complex (Macaulay2Doc), free resolution
        of a module
      * L, a list (Macaulay2Doc), multidegrees of summands to keep
  * Optional inputs (Macaulay2Doc),:
      * LengthLimit,
        => ..., default value infinity, stop when the virtual resolution
        reaches this length
  * Outputs:
      * a chain complex (Macaulay2Doc),

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

Given an ideal I or module M and a list of multidegrees L, this function
produces a chain complex by iteratively computing syzygies in degrees in L. In
particular, if the list L contains only one element which is in the multigraded
regularity of M plus the dimension vector, the output will be the virtual
resolution of a pair as defined in Section 1 of [BES20]. See Algorithm 3.4 of
[BES20, arXiv:1703.07631 (see https://arxiv.org/abs/1703.07631 )] for further
details.

If a resolution for the object exists in the cache or when the input is a chain
complex C, virtualOfPair uses this information by simply removing the summands
in degrees not in L. This option is useful when a minimal free resolution of M
can be more efficiently computed in the engine or is already known. Otherwise,
induced Schreyer orders are used to speed up the computation of syzygies. Note
that this speedup is often very significant.

When L contains more than one multidegree, summands with degrees in at least
one member of L are kept.

For example, consider the ideal of three points in $\PP^1\times\PP^1$.

+-----------------------------------------------------------------------------+
|i1 : X = toricProjectiveSpace(1) ** toricProjectiveSpace(1);                 |
+-----------------------------------------------------------------------------+
|i2 : S = ring X; B = ideal X;                                                |
|                                                                             |
|o3 : Ideal of S                                                              |
+-----------------------------------------------------------------------------+
|i4 : J = saturate(intersect(                                                 |
|           ideal(x_1 - 1*x_0, x_3 - 4*x_2),                                  |
|           ideal(x_1 - 2*x_0, x_3 - 5*x_2),                                  |
|           ideal(x_1 - 3*x_0, x_3 - 6*x_2)),                                 |
|           B)                                                                |
|                                                                             |
|                                     3      2          2    3        2       |
|o4 = ideal (3x x  + x x  - x x , 120x  - 74x x  + 15x x  - x , 120x x  -     |
|              0 2    1 2    0 3      2      2 3      2 3    3      1 2       |
|     ------------------------------------------------------------------------|
|                    2       2     2       2                  2      3        |
|     34x x x  - 2x x  + 3x x , 40x x  + 6x x  - 13x x x  - 3x x , 6x  -      |
|        1 2 3     0 3     1 3     1 2     0 3      0 1 3     1 3    0        |
|     ------------------------------------------------------------------------|
|        2         2    3                                                     |
|     11x x  + 6x x  - x )                                                    |
|        0 1     0 1    1                                                     |
|                                                                             |
|o4 : Ideal of S                                                              |
+-----------------------------------------------------------------------------+

We can now compute its minimal free resolution and a virtual resolution. One
can show that $(2,0)$ is in the multigraded regularity of this example. Thus,
since we want to compute a virtual resolution we apply virtualOfPair to the
element $(3,1)$ since $(3,1)=(2,0)+(1,1)$ and $(1,1)$ is the dimension vector
for $\PP^1\times\PP^1$.

+-------------------------------------------------------------+
|i5 : minres = res J                                          |
|                                                             |
|      1      5      6      2                                 |
|o5 = S  <-- S  <-- S  <-- S  <-- 0                           |
|                                                             |
|     0      1      2      3      4                           |
|                                                             |
|o5 : ChainComplex                                            |
+-------------------------------------------------------------+
|i6 : vres = virtualOfPair(J, {{3,1}}) --(3,1) = (2,0) + (1,1)|
|                                                             |
|      1      3      2                                        |
|o6 = S  <-- S  <-- S  <-- 0 <-- 0                            |
|                                                             |
|     0      1      2      3     4                            |
|                                                             |
|o6 : ChainComplex                                            |
+-------------------------------------------------------------+

Notice that the virtual resolution of the pair $(S^1/J, (2,0))$ is shorter and
thinner than the graded minimal free resolution of $S^1/J$.

Finally, we check that the result is indeed virtual.

+-----------------------+
|i7 : isVirtual(B, vres)|
|                       |
|o7 = true              |
+-----------------------+

Caveat
======

Given an element of the multigraded regularity, one must add the dimension
vector of the product of projective spaces for this to return a virtual
resolution.

Ways to use virtualOfPair :
===========================

  * "virtualOfPair(ChainComplex,List)"
  * "virtualOfPair(Ideal,List)"
  * "virtualOfPair(Module,List)"

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

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

virtualOfPair(...,LengthLimit=>...) -- stop when the virtual resolution reaches this length
*******************************************************************************************

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

When the optional argument LengthLimit is specified virtualOfPair will stop
computing syzygies after the given length is reached, otherwise computation
continues until the resolution terminates.

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

  * Default value: infinity (Macaulay2Doc),
  * Function: virtualOfPair, -- creates a virtual
    resolution from a free resolution by keeping only summands of specified
    degrees
  * Option key: LengthLimit (Macaulay2Doc), -- stop when the
    resolution reaches this length

See also
========

  * virtualOfPair -- creates a virtual resolution from a
    free resolution by keeping only summands of specified degrees

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

  * "bgg(...,LengthLimit=>...)" -- see bgg (TateOnProducts), -- make
    a linear free complex from a module over an exterior algebra or a symmetric
    algebra
  * "minimalBetti(...,LengthLimit=>...)" -- see minimalBetti (Macaulay2Doc),
    -- minimal betti numbers of (the minimal free
    resolution of) a homogeneous ideal or module
  * resolution(...,LengthLimit=>...) (Macaulay2Doc)
    -- stop
    when the resolution reaches this length
  * virtualOfPair(...,LengthLimit=>...)
    -- stop when the
    virtual resolution reaches this length