This is Depth.info, produced by Macaulay2, version 1.20

Depth -- Finds the depth of a module or ideal, and systems of parameters in an ideal
************************************************************************************

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

There are two major groups of routines: one for finding the depth of an ideal
or module or ring,or the depth of an ideal on a module; and the other for
finding relatively sparse systems of homogeneous parameters in an ideal (there
is an inhomogeneous version too.)

The depth of an ideal on a module is a fundamental invariant, a kind of
arithmetic version of codimension. In many local or graded cases one is
interested in the depth of the maximal ideal on the module, and then we speak
just of the depth of the module (or, when the module is the ring itself, the
depth of the ring.) Over a regular ring, depth is most efficiently computed
using the Auslander-Buchsbaum formula depth M = dim R - pdim M, where pdim is
the projective dimension. In general, depth(I,M) = min {i | Ext^i(R/I,M) != 0}.
Both these methods are incorporated.

Depth can be computed from regular sequences, which are systems of parameters.
The other routines in this package try probabilistically to find relatively
sparse systems of parameters; the maximum length of such a system is equal to
the codimension of the ideal, so (inhomogeneousSystemOfParameters,Ideal) and
(systemOfParameters, Ideal), without further arguments, look for regular
sequences of length codim I.

To find such sequences, one can simply take an appropriate number of random
linear combinations of the generators of the ideal, and this is what's done by
inhomogeneousSystemOfParameters. Since being a system of parameters is a matter
of certain elements not being in certain prime ideals, this succeeds with very
high probability over any field of reasonable size. But it produces
inhomogeneous elements. When the ideal is homogeneous, one generally wants a
homogeneous system of parameters; this is provided, again probabilistically, by
the routine systemOfParameters.

Here is an example computing depths of modules (that is, the depths of the
maximal ideal on the module:

+-------------------------------------------------+
|i1 : S = ZZ/101[a,b,c,d]                         |
|                                                 |
|o1 = S                                           |
|                                                 |
|o1 : PolynomialRing                              |
+-------------------------------------------------+
|i2 : K = koszul vars S                           |
|                                                 |
|      1      4      6      4      1              |
|o2 = S  <-- S  <-- S  <-- S  <-- S               |
|                                                 |
|     0      1      2      3      4               |
|                                                 |
|o2 : ChainComplex                                |
+-------------------------------------------------+
|i3 : apply(numgens S, i-> depth coker K.dd_(i+1))|
|                                                 |
|o3 = {0, 1, 2, 3}                                |
|                                                 |
|o3 : List                                        |
+-------------------------------------------------+

and here is one computing systems of parameters. The "Density" (a number
between 0 and 1) is a measure of the sparseness sought, and "Attempts" bounds
the number of probabilistic attempts.

+----------------------------------------------------------------------------+
|i4 : I = ideal"ab,bc,cd2,da"                                                |
|                                                                            |
|                         2                                                  |
|o4 = ideal (a*b, b*c, c*d , a*d)                                            |
|                                                                            |
|o4 : Ideal of S                                                             |
+----------------------------------------------------------------------------+
|i5 : codim I                                                                |
|                                                                            |
|o5 = 2                                                                      |
+----------------------------------------------------------------------------+
|i6 : setRandomSeed 0                                                        |
|                                                                            |
|o6 = 0                                                                      |
+----------------------------------------------------------------------------+
|i7 : systemOfParameters(I, Density => .1, Attempts => 1000, Verbose => true)|
|Attempts: 1000 Density: .1 Seed: null                                       |
|                                                                            |
|                    2                                                       |
|o7 = ideal (a*b, c*d )                                                      |
|                                                                            |
|o7 : Ideal of S                                                             |
+----------------------------------------------------------------------------+
|i8 : inhomogeneousSystemOfParameters I                                      |
|                                                                            |
|o8 = | cd2+bc bc+ad |                                                       |
|                                                                            |
|             1       2                                                      |
|o8 : Matrix S  <--- S                                                       |
+----------------------------------------------------------------------------+

Caveat
======

The systemOfParameters code could be improved by working one degree at a time,
using a knowledge of the codim of the ideal generated by elements of degrees
<=d for each d.

See also
========

  * depth (Macaulay2Doc) -- depth of a net
  * inhomogeneousSystemOfParameters, --
    generates an inhomogeneous system of parameters
  * systemOfParameters -- finds a relatively sparse
    homogeneous system of parameters of minimal degree in an ideal

Authors
=======

  * Bart Snapp (see http://www.math.ohio-state.edu/~snapp/ )
    <snapp@math.ohio-state.edu>
  * David Eisenbud (see http://www.msri.org/~de ) <de@msri.org>
  * Branden Stone (see http://math.adelphi.edu/~bstone/ ) <bstone@adelphi.edu>

Version
=======

This documentation describes version 1.0 of Depth.

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

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

Exports
=======

  * Functions and commands
      * inhomogeneousSystemOfParameters,
        -- generates an inhomogeneous system of parameters
      * isCM -- whether a ring or module is Cohen-Macaulay
      * isRegularSequence -- whether a list is
        regular over a ring or module
      * regularSequenceCheck -- how much of a list
        is regular
      * systemOfParameters -- finds a relatively
        sparse homogeneous system of parameters of minimal degree in an ideal
  * Methods
      * "depth(Ideal,Ideal)" -- see depth(Ideal,Ring),
        -- computes the depth of a ring
      * "depth(Ideal,Module)" -- see depth(Ideal,Ring),
        -- computes the depth of a ring
      * depth(Ideal,Ring) -- computes the depth
        of a ring
      * "depth(Module)" -- see depth(Ideal,Ring),
        -- computes the depth of a ring
      * "depth(Ring)" -- see depth(Ideal,Ring),
        -- computes the depth of a ring
      * "inhomogeneousSystemOfParameters(Ideal)" -- see
        inhomogeneousSystemOfParameters, --
        generates an inhomogeneous system of parameters
      * "inhomogeneousSystemOfParameters(Ideal,Ring)" -- see
        inhomogeneousSystemOfParameters, --
        generates an inhomogeneous system of parameters
      * "inhomogeneousSystemOfParameters(Ring)" -- see
        inhomogeneousSystemOfParameters, --
        generates an inhomogeneous system of parameters
      * "isCM(Module)" -- see isCM, -- whether a ring or module is
        Cohen-Macaulay
      * "isCM(Ring)" -- see isCM, -- whether a ring or module is
        Cohen-Macaulay
      * "isRegularSequence(List)" -- see isRegularSequence,
        -- whether a list is regular over a ring or module
      * "isRegularSequence(List,Module)" -- see isRegularSequence,
        -- whether a list is regular over a ring or module
      * "isRegularSequence(List,Ring)" -- see isRegularSequence,
        -- whether a list is regular over a ring or module
      * "isRegularSequence(Matrix)" -- see isRegularSequence,
        -- whether a list is regular over a ring or module
      * "isRegularSequence(Matrix,Module)" -- see isRegularSequence,
        -- whether a list is regular over a ring or module
      * "isRegularSequence(Matrix,Ring)" -- see isRegularSequence,
        -- whether a list is regular over a ring or module
      * "regularSequenceCheck(List,Module)" -- see regularSequenceCheck,
        -- how much of a list is regular
      * "regularSequenceCheck(List,Ring)" -- see regularSequenceCheck,
        -- how much of a list is regular
      * "regularSequenceCheck(Matrix,Module)" -- see
        regularSequenceCheck, -- how much of a list is
        regular
      * "regularSequenceCheck(Matrix,Ring)" -- see regularSequenceCheck,
        -- how much of a list is regular
      * "systemOfParameters(Ideal)" -- see systemOfParameters,
        -- finds a relatively sparse homogeneous system of
        parameters of minimal degree in an ideal
      * "systemOfParameters(Ring)" -- see systemOfParameters,
        -- finds a relatively sparse homogeneous system of
        parameters of minimal degree in an ideal
      * "systemOfParameters(ZZ,Ideal)" -- see systemOfParameters,
        -- finds a relatively sparse homogeneous system of
        parameters of minimal degree in an ideal
  * Symbols
      * "Attempts" -- see inhomogeneousSystemOfParameters,
        -- generates an inhomogeneous system
        of parameters
      * "Bound" -- see inhomogeneousSystemOfParameters,
        -- generates an inhomogeneous system
        of parameters
      * "Maximal" -- see inhomogeneousSystemOfParameters,
        -- generates an inhomogeneous system
        of parameters
      * "Sparseness" -- see inhomogeneousSystemOfParameters,
        -- generates an inhomogeneous system
        of parameters
      * "Seed" -- see systemOfParameters, -- finds a
        relatively sparse homogeneous system of parameters of minimal degree in
        an ideal

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

The object Depth, is a package (Macaulay2Doc).

depth(Ideal,Ring) -- computes the depth of a ring
*************************************************

Synopsis
========

  * Function: depth (Macaulay2Doc),
  * Usage:
        d = depth(I,M)
        d = depth(M)
        d = depth(I,I)
  * Inputs:
      * I, an ideal (Macaulay2Doc),
      * M, a ring (Macaulay2Doc), or Module or Ideal
  * Outputs:
      * d, an integer (Macaulay2Doc), the I-depth of a ring, module,
        or ideal

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

The function depth(I,M) computes the I-depth of a ring, module, or ideal. In
the most general setting, it does this by computing Ext^i(A^1/I,M) for an
A-Module M, and noting where it does not vanish. If the ring in question is a
polynomial ring over a field, then it merely computes the codimension of I.

+-------------------------------------------+
|i1 : A = QQ[x_1..x_3]/ideal(x_1^2, x_1*x_2)|
|                                           |
|o1 = A                                     |
|                                           |
|o1 : QuotientRing                          |
+-------------------------------------------+
|i2 : depth A                               |
|                                           |
|o2 = 1                                     |
+-------------------------------------------+

If I contains a unit, then depth(I,A) outputs infinity.

+------------------------+
|i3 : depth(ideal(1_A),A)|
|                        |
|o3 = infinity           |
|                        |
|o3 : InfiniteNumber     |
+------------------------+

This symbol is provided by the package Depth.m2

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

  * "depth(Ideal,Ideal)"
  * "depth(Ideal,Module)"
  * depth(Ideal,Ring) -- computes the depth of
    a ring
  * "depth(Module)"
  * "depth(Ring)"

inhomogeneousSystemOfParameters -- generates an inhomogeneous system of parameters
**********************************************************************************

Synopsis
========

  * Usage:
        inhomogeneousSystemOfParameters(I,A)
  * Inputs:
      * I, an ideal (Macaulay2Doc),
      * A, a ring (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Attempts => an integer (Macaulay2Doc), default value 100,
        number of attempts made to generate an inhomogeneous system of
        parameters
      * Bound => an integer (Macaulay2Doc), default value 1, bound on
        the value of the random coefficients
      * Sparseness => a real number (Macaulay2Doc), default value .5,
        between 0 and 1 giving the frequency of the coefficients being equal to
        zero
      * Maximal => a Boolean value (Macaulay2Doc), default value
        true, whether to insist on searching for a maximal inhomogeneous system
        of parameters
  * Outputs:
      * a matrix (Macaulay2Doc),

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

Given a ring and an ideal, inhomogeneousSystemOfParameters attempts to generate
an inhomogeneous system of parameters contained in I. The algorithm is based on
one found in Chapter 5.5 of W. Vasconcelos' book: Computational Methods in
Commutative Algebra and Algebraic Geometry.
+---------------------------------------------+
|i1 : A = ZZ/5051[x, y, z];                   |
+---------------------------------------------+
|i2 : I = ideal (x, x*y, y*z);                |
|                                             |
|o2 : Ideal of A                              |
+---------------------------------------------+
|i3 : X = inhomogeneousSystemOfParameters(I,A)|
|                                             |
|o3 = | yz+x xy |                             |
|                                             |
|             1       2                       |
|o3 : Matrix A  <--- A                        |
+---------------------------------------------+
|i4 : isRegularSequence(X,A)                  |
|                                             |
|o4 = true                                    |
+---------------------------------------------+
Here are examples with optional inputs:
+-----------------------------------------------------------------------------+
|i5 : A = ZZ/5051[x, y, z];                                                   |
+-----------------------------------------------------------------------------+
|i6 : I = ideal (x, x*y, y*z);                                                |
|                                                                             |
|o6 : Ideal of A                                                              |
+-----------------------------------------------------------------------------+
|i7 : inhomogeneousSystemOfParameters(I,A,Attempts=>1,Bound=>100,Sparseness   |
|--warning: no maximal regular sequence found                                 |
|                                                                             |
|o7 = 0                                                                       |
|                                                                             |
|             1                                                               |
|o7 : Matrix A  <--- 0                                                        |
|-----------------------------------------------------------------------------|
|=>.9)                                                                        |
+-----------------------------------------------------------------------------+
Here are examples with the optional input Maximal => false:
+-----------------------------------------------------------------------------+
|i8 : x = symbol x; y = symbol y;                                             |
+-----------------------------------------------------------------------------+
|i10 : n = 2;                                                                 |
+-----------------------------------------------------------------------------+
|i11 : A = ZZ/101[x_(1,1)..x_(n,n),y_(1,1)..y_(n,n)];                         |
+-----------------------------------------------------------------------------+
|i12 : X = transpose genericMatrix(A,n,n);                                    |
|                                                                             |
|              2       2                                                      |
|o12 : Matrix A  <--- A                                                       |
+-----------------------------------------------------------------------------+
|i13 : Y = transpose genericMatrix(A,y_(1,1),n,n);                            |
|                                                                             |
|              2       2                                                      |
|o13 : Matrix A  <--- A                                                       |
+-----------------------------------------------------------------------------+
|i14 : b = ideal(X*Y - Y*X);                                                  |
|                                                                             |
|o14 : Ideal of A                                                             |
+-----------------------------------------------------------------------------+
|i15 : B = A/b;                                                               |
+-----------------------------------------------------------------------------+
|i16 : inhomogeneousSystemOfParameters(B,Attempts=>1,Maximal=>false)          |
|                                                                             |
|o16 = | -x_(2,1)-y_(1,2)+y_(2,1) x_(1,2)-y_(2,2)                             |
|      -----------------------------------------------------------------------|
|      -x_(2,1)+x_(2,2)-y_(1,1)+y_(1,2) -x_(1,1)+x_(2,1)                      |
|      -----------------------------------------------------------------------|
|      x_(1,1)-x_(2,1)-y_(1,1) x_(1,1)+x_(1,2) |                              |
|                                                                             |
|              1       6                                                      |
|o16 : Matrix B  <--- B                                                       |
+-----------------------------------------------------------------------------+

This symbol is provided by the package Depth.

Ways to use inhomogeneousSystemOfParameters :
=============================================

  * "inhomogeneousSystemOfParameters(Ideal)"
  * "inhomogeneousSystemOfParameters(Ideal,Ring)"
  * "inhomogeneousSystemOfParameters(Ring)"

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

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

isCM -- whether a ring or module is Cohen-Macaulay
**************************************************

Synopsis
========

  * Usage:
        isCM(A)
  * Inputs:
      * A, a Ring (Macaulay2Doc), or Module (Macaulay2Doc),
  * Outputs:
      * Boolean (Macaulay2Doc)

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

This command merely checks if the depth of A equals the Krull dimension of A.
+---------------------------------------------------------------------+
|i1 : A = ZZ/2[x,y,z];                                                |
+---------------------------------------------------------------------+
|i2 : isCM(A)                                                         |
|                                                                     |
|o2 = true                                                            |
+---------------------------------------------------------------------+
|i3 : A = ZZ/2[x,y]/(x^2,x*y);                                        |
+---------------------------------------------------------------------+
|i4 : isCM(A)                                                         |
|                                                                     |
|o4 = false                                                           |
+---------------------------------------------------------------------+
|i5 : A =  ZZ/101[a_1,a_2,b_1,b_2,c_1]/ideal(a_1*b_1,a_2*b_2,b_1*c_1);|
+---------------------------------------------------------------------+
|i6 : isCM(A)                                                         |
|                                                                     |
|o6 = false                                                           |
+---------------------------------------------------------------------+

This symbol is provided by the package Depth.

Caveat
======

Typically when one thinks of a Cohen-Macaulay ring or module, one is in the
local case. Since the local case is not yet implemented into Macaulay 2, we
compute over the ideal generated by by generators(Ring) (Macaulay2Doc).

Ways to use isCM :
==================

  * "isCM(Module)"
  * "isCM(Ring)"

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

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

isRegularSequence -- whether a list is regular over a ring or module
********************************************************************

Synopsis
========

  * Usage:
        isRegularSequence(X,A) or isRegularSequence(X)
  * Inputs:
      * X, a List (Macaulay2Doc), or Matrix (Macaulay2Doc),
      * A, a Ring (Macaulay2Doc), or Module (Macaulay2Doc),
  * Outputs:
      * a Boolean value (Macaulay2Doc),

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

Given a list X, the function isRegularSequence tells if X forms a regular
sequence. If X consists of homogeneous elements, it does this by comparing the
hilbert series of A and the hilbert series of A/XA. Otherwise it checks the
injectivity of the maps defined by multiplication by the elements of X and also
checks if XA = A.
+--------------------------------+
|i1 : A = ZZ/2[x, y, z];         |
+--------------------------------+
|i2 : X1 = {x, y*(x-1), z*(x-1)};|
+--------------------------------+
|i3 : isRegularSequence X1       |
|                                |
|o3 = true                       |
+--------------------------------+
|i4 : X2 = {z*(x-1), y*(x-1), x};|
+--------------------------------+
|i5 : isRegularSequence X2       |
|                                |
|o5 = false                      |
+--------------------------------+
|i6 : X3 = {1_A, x, y};          |
+--------------------------------+
|i7 : isRegularSequence X3       |
|                                |
|o7 = false                      |
+--------------------------------+

This symbol is provided by the package Depth.

Ways to use isRegularSequence :
===============================

  * "isRegularSequence(List)"
  * "isRegularSequence(List,Module)"
  * "isRegularSequence(List,Ring)"
  * "isRegularSequence(Matrix)"
  * "isRegularSequence(Matrix,Module)"
  * "isRegularSequence(Matrix,Ring)"

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

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

regularSequenceCheck -- how much of a list is regular
*****************************************************

Synopsis
========

  * Usage:
        regularSequenceCheck(X,A)
  * Inputs:
      * X, a List (Macaulay2Doc), or Matrix (Macaulay2Doc),
      * A, a Ring (Macaulay2Doc), or Module (Macaulay2Doc),
  * Outputs:
      * an integer (Macaulay2Doc),

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

Given a list X, the function regularSequenceCheck gives an integer indicating
how many initial elements of a List form a regular sequence.
+--------------------------------------------+
|i1 : A = ZZ[x_1..x_4]/(x_4^2)               |
|                                            |
|o1 = A                                      |
|                                            |
|o1 : QuotientRing                           |
+--------------------------------------------+
|i2 : regularSequenceCheck({x_1..x_4},A)     |
|                                            |
|o2 = 3                                      |
+--------------------------------------------+

This symbol is provided by the package Depth.

Caveat
======

regularSequenceCheck merely checks the injectivity of the maps in question. It
does not check to see if XA = A.

Ways to use regularSequenceCheck :
==================================

  * "regularSequenceCheck(List,Module)"
  * "regularSequenceCheck(List,Ring)"
  * "regularSequenceCheck(Matrix,Module)"
  * "regularSequenceCheck(Matrix,Ring)"

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

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

systemOfParameters -- finds a relatively sparse homogeneous system of parameters of minimal degree in an ideal
**************************************************************************************************************

Synopsis
========

  * Usage:
        J = systemOfParameters I
        J = systemOfParameters (i,I)
  * Inputs:
      * I, an ideal (Macaulay2Doc), generated by homogeneous
        elements
      * i, an integer (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Verbose => a Boolean value (Macaulay2Doc), default value
        false
      * Attempts => an integer (Macaulay2Doc), default value 100
      * Density => a real number (Macaulay2Doc), default value 0, or
        QQ or ZZ; will be converted to RR
      * Seed => ..., default value null
      * Seed => an ideal (Macaulay2Doc), default value null
  * Outputs:
      * J, an ideal (Macaulay2Doc), generated by a homogeneous
        system of parameters of length i contained in I

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

First sorts the generators of trim ideal gens gb I by ascending degree,
ascending monomial order. Looks first for as much of a system of parameters
among the generators as possible, then tries up to Attempts sparse random
combinations of given Density. The default value of Density is (1+codim
I)/(numgens trim I).

If the option Seed is not null then it should be an ideal of ring I generated
by a part of a sop in I, and it is used as the beginning of the system of
parameters constructed.

If no sop is found after Attempts tries, and the Density is < 1 then the
Density is increased by .1, and 20 more attempts are made. If the Density is
already == 1, then the program stops with an error.

+----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b,c,d]                                                    |
|                                                                            |
|o1 = S                                                                      |
|                                                                            |
|o1 : PolynomialRing                                                         |
+----------------------------------------------------------------------------+
|i2 : I = ideal"ab,bc,cd,da"                                                 |
|                                                                            |
|o2 = ideal (a*b, b*c, c*d, a*d)                                             |
|                                                                            |
|o2 : Ideal of S                                                             |
+----------------------------------------------------------------------------+
|i3 : codim I                                                                |
|                                                                            |
|o3 = 2                                                                      |
+----------------------------------------------------------------------------+
|i4 : setRandomSeed 0                                                        |
|                                                                            |
|o4 = 0                                                                      |
+----------------------------------------------------------------------------+
|i5 : inhomogeneousSystemOfParameters I                                      |
|                                                                            |
|o5 = | bc+cd bc+ad |                                                        |
|                                                                            |
|             1       2                                                      |
|o5 : Matrix S  <--- S                                                       |
+----------------------------------------------------------------------------+
|i6 : systemOfParameters I                                                   |
|                                                                            |
|o6 = ideal (a*b, c*d)                                                       |
|                                                                            |
|o6 : Ideal of S                                                             |
+----------------------------------------------------------------------------+
|i7 : systemOfParameters(I, Density => .1, Attempts => 1000, Verbose => true)|
|Attempts: 1000 Density: .1 Seed: null                                       |
|                                                                            |
|o7 = ideal (a*b, c*d)                                                       |
|                                                                            |
|o7 : Ideal of S                                                             |
+----------------------------------------------------------------------------+

Caveat
======

Could be rewritten to take into account the codimensions of the sub ideals
generated by the elements of degree up to d for each d.

The routine tries to find generators among linear combinations, with field
coefficients, of generators of I; but over very small fields there may not be
any! For example there is no linear form that is a parameter in the
1-dimensional ring R = ZZ/2[x,y]/intersect(ideal"x", ideal"x+y", ideal"y")

See also
========

  * regularSequenceCheck -- how much of a list is
    regular
  * Depth -- Finds the depth of a module or ideal, and systems of
    parameters in an ideal
  * inhomogeneousSystemOfParameters, --
    generates an inhomogeneous system of parameters

Ways to use systemOfParameters :
================================

  * "systemOfParameters(Ideal)"
  * "systemOfParameters(Ring)"
  * "systemOfParameters(ZZ,Ideal)"

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

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