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

KustinMiller -- Unprojection and the Kustin-Miller complex construction
***********************************************************************

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

This package implements the construction of the Kustin-Miller complex [1]. This
is the fundamental construction of resolutions in unprojection theory [2]. For
details on the computation of the Kustin-Miller complex see [3].

Gorenstein rings with an embedding codimension at most 2 are known to be
complete intersections, and those with embedding codimension 3 are described by
the theorem of Buchsbaum and Eisenbud as Pfaffians of a skew-symmetric matrix;
general structure theorems in higher codimension are lacking and the main goal
of unprojection theory is to provide a substitute for a structure theorem.

Unprojection theory has been applied in various cases to construct new
varieties, for example, in [4] in the case of Campedelli surfaces and [5] in
the case of Calabi-Yau varieties.

We provide a general command kustinMillerComplex,
for the Kustin-Miller complex construction and demonstrate it on several
examples connecting unprojection theory and combinatorics such as stellar
subdivisions of simplicial complexes [6], minimal resolutions of
Stanley-Reisner rings of boundary complexes $\Delta(d,m)$ of cyclic polytopes
of dimension d on m vertices [7], and the classical (non-monomial) Tom example
of unprojection [2].

This package requires the package SimplicialComplexes.m2 (see
http://www.math.uni-sb.de/ag/schreyer/jb/Macaulay2/SimplicialComplexes/
SimplicialComplexes.m2 ) version 1.2 or higher, so install this first.

References:

For the Kustin-Miller complex see:

[1] A. Kustin and M. Miller, Constructing big Gorenstein ideals from small
ones, J. Algebra 85 (1983), 303-322.

[2] S. Papadakis, Kustin-Miller unprojection with complexes,  J. Algebraic
Geometry 13 (2004) 249-268, http://arxiv.org/abs/math/0111195

[3] J. Boehm, S. Papadakis: Implementing the Kustin-Miller complex
construction, http://arxiv.org/abs/1103.2314

For constructing new varieties see for example:

[4] J. Neves and S. Papadakis, A construction of numerical Campedelli surfaces
with ZZ/6 torsion, Trans. Amer. Math. Soc. 361 (2009), 4999-5021.

[5] J. Neves and S. Papadakis, Parallel Kustin-Miller unprojection with an
application to Calabi-Yau geometry, preprint, 2009, 23 pp,
http://arxiv.org/abs/0903.1335

For the stellar subdivision case see:

[6] J. Boehm, S. Papadakis: Stellar subdivisions and Stanley-Reisner rings of
Gorenstein complexes, http://arxiv.org/abs/0912.2151

For the case of cyclic polytopes see:

[7] J. Boehm, S. Papadakis: On the structure of Stanley-Reisner rings
associated to cyclic polytopes, http://arxiv.org/abs/0912.2152, to appear in
Osaka J. Math.

Examples:

Cyclic Polytopes,  -- Minimal resolutions of
Stanley-Reisner rings of boundary complexes of cyclic polytopes

See Stellar Subdivisions,  -- Stellar subdivisions and
unprojection

See Tom,  -- The Tom example of unprojection

See Jerry,  -- The Jerry example of unprojection

Key user functions:

The central function of the package is:

kustinMillerComplex,  -- The Kustin-Miller complex
construction

Also important is the function to represent the unprojection data as a
homomorphism:

unprojectionHomomorphism, -- Compute the
homomorphism associated to an unprojection pair

Functions used in the examples to compare with the combinatorics:

delta,  --  The boundary complex of a cyclic polytope

See stellarSubdivision (Polyhedra),  -- Compute the
stellar subdivision of a simplicial complex

Authors
=======

  * Janko Boehm (see http://www.math.uni-sb.de/ag/schreyer/jb/ )
    <boehm@mathematik.uni-kl.de>
  * Stavros Papadakis (see http://www.math.ist.utl.pt/~papadak/ )
    <papadak@math.ist.utl.pt>

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

Version 1.4 of this package was accepted for publication in volume 4 (see
http://j-sag.org/Volume4/ ) of The Journal of Software for Algebra and
Geometry: Macaulay2 (see http://j-sag.org/ ) on 2012-05-07, in the article
Implementing the Kustin-Miller complex construction (see
http://j-sag.org/Volume4/jsag-2-2012.pdf ). That version can be obtained from
the journal (see http://j-sag.org/Volume4/KustinMiller.m2 ) or from the
Macaulay2 source code repository (see
https://github.com/Macaulay2/M2/blob/a611bb9148103fa0c7908595cc979c66d210bb70/
M2/Macaulay2/packages/KustinMiller.m2 ).

Version
=======

This documentation describes version 1.4 of KustinMiller.

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

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

Exports
=======

  * Types
      * Face -- The class of faces of simplicial complexes.
  * Functions and commands
      * delta -- Boundary complex of cyclic polytope.
      * face -- Generate a face.
      * isExactRes -- Test whether a chain complex is an
        exact resolution.
      * isSubface -- Test whether a face is a subface of
        another face.
      * kustinMillerComplex -- Compute
        Kustin-Miller resolution of the unprojection of I in J
      * resBE -- Buchsbaum-Eisenbud resolution
      * unprojectionHomomorphism -- Compute
        the homomorphism associated to an unprojection pair
  * Methods
      * "delta(ZZ,PolynomialRing)" -- see delta, -- Boundary
        complex of cyclic polytope.
      * dim(Face) -- The dimension of a face.
      * "face(List)" -- see face, -- Generate a face.
      * "face(List,PolynomialRing)" -- see face, -- Generate a
        face.
      * "face(RingElement)" -- see face, -- Generate a face.
      * Face == Face -- Compare two faces.
      * "isExactRes(ChainComplex)" -- see isExactRes, -- Test
        whether a chain complex is an exact resolution.
      * "isSubface(Face,Face)" -- see isSubface, -- Test
        whether a face is a subface of another face.
      * "kustinMillerComplex(ChainComplex,ChainComplex,PolynomialRing)" -- see
        kustinMillerComplex, -- Compute
        Kustin-Miller resolution of the unprojection of I in J
      * "kustinMillerComplex(Ideal,Ideal,PolynomialRing)" -- see
        kustinMillerComplex, -- Compute Kustin-Miller
        resolution of the unprojection of I in J
      * net(Face) -- Printing a face.
      * "resBE(Matrix)" -- see resBE, -- Buchsbaum-Eisenbud
        resolution
      * ring(Face) -- Ring of a face.
      * "stellarSubdivision(SimplicialComplex,Face,PolynomialRing)" -- see
        stellarSubdivision, -- Compute the stellar
        subdivision of a simplicial complex.
      * substitute(ChainComplex,Ring)
        -- Substitute a chain complex to a
        new ring.
      * substitute(Face,PolynomialRing)
        -- Substitute a face to a
        different ring.
      * "unprojectionHomomorphism(Ideal,Ideal)" -- see
        unprojectionHomomorphism, -- Compute the
        homomorphism associated to an unprojection pair
      * vertices(Face) -- The vertices of a face of
        a simplicial complex.
  * Symbols
      * isFaceof (missing documentation)
      * Jerry -- The Kustin-Miller complex for Jerry
      * Tom -- The Kustin-Miller complex for Tom

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

The object KustinMiller, is a package (Macaulay2Doc).

Cyclic Polytopes -- Constructing minimal resolutions for Stanley-Reisner rings of boundary complexes of cyclic polytopes
************************************************************************************************************************

In the following example we construct the minimal resolution of the
Stanley-Reisner ring of the cyclic polytope $\Delta(4,8)$ of embedding
codimension 4 (as a subcomplex of the simplex on 8 vertices) from those of the
cyclic polytopes $\Delta(2,6)$ and $\Delta(4,7)$ (the last one being Pfaffian).

This process can be iterated to give a recursive construction of the
resolutions of all cyclic polytopes, for details see

J. Boehm, S. Papadakis: On the structure of Stanley-Reisner rings associated to
cyclic polytopes, http://arxiv.org/abs/0912.2152, to appear in Osaka J. Math.

+-----------------------------------------------------------------------------+
|i1 : K=QQ;                                                                   |
+-----------------------------------------------------------------------------+
|i2 : C26=delta(2,K[z,x_2..x_6])                                              |
|                                                                             |
|o2 = simplicialComplex | x_5x_6 zx_6 x_4x_5 x_3x_4 x_2x_3 zx_2 |             |
|                                                                             |
|o2 : SimplicialComplex                                                       |
+-----------------------------------------------------------------------------+
|i3 : R=K[z,x_1..x_7]                                                         |
|                                                                             |
|o3 = R                                                                       |
|                                                                             |
|o3 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i4 : J=sub(ideal C26,R)                                                      |
|                                                                             |
|o4 = ideal (z*x , z*x , x x , z*x , x x , x x , x x , x x , x x )            |
|               3     4   2 4     5   2 5   3 5   2 6   3 6   4 6             |
|                                                                             |
|o4 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i5 : c26=res J;                                                              |
+-----------------------------------------------------------------------------+
|i6 : betti c26                                                               |
|                                                                             |
|            0 1  2 3 4                                                       |
|o6 = total: 1 9 16 9 1                                                       |
|         0: 1 .  . . .                                                       |
|         1: . 9 16 9 .                                                       |
|         2: . .  . . 1                                                       |
|                                                                             |
|o6 : BettiTally                                                              |
+-----------------------------------------------------------------------------+
|i7 : C47=delta(4,K[x_1..x_7])                                                |
|                                                                             |
|o7 = simplicialComplex | x_4x_5x_6x_7 x_1x_5x_6x_7 x_3x_4x_6x_7 x_2x_3x_6x_7 |
|                                                                             |
|o7 : SimplicialComplex                                                       |
|-----------------------------------------------------------------------------|
|x_1x_2x_6x_7 x_1x_4x_5x_7 x_1x_3x_4x_7 x_1x_2x_3x_7 x_3x_4x_5x_6 x_2x_3x_5x_6|
|-----------------------------------------------------------------------------|
|x_1x_2x_5x_6 x_2x_3x_4x_5 x_1x_2x_4x_5 x_1x_2x_3x_4 |                        |
+-----------------------------------------------------------------------------+
|i8 : I=sub(ideal C47,R)                                                      |
|                                                                             |
|o8 = ideal (x x x , x x x , x x x , x x x , x x x , x x x , x x x )          |
|             1 3 5   1 3 6   1 4 6   2 4 6   2 4 7   2 5 7   3 5 7           |
|                                                                             |
|o8 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i9 : c47=res I;                                                              |
+-----------------------------------------------------------------------------+
|i10 : betti c47                                                              |
|                                                                             |
|             0 1 2 3                                                         |
|o10 = total: 1 7 7 1                                                         |
|          0: 1 . . .                                                         |
|          1: . . . .                                                         |
|          2: . 7 7 .                                                         |
|          3: . . . .                                                         |
|          4: . . . 1                                                         |
|                                                                             |
|o10 : BettiTally                                                             |
+-----------------------------------------------------------------------------+
|i11 : cc=kustinMillerComplex(c47,c26,K[x_8]);                                |
+-----------------------------------------------------------------------------+
|i12 : betti cc                                                               |
|                                                                             |
|             0  1  2  3 4                                                    |
|o12 = total: 1 16 30 16 1                                                    |
|          0: 1  .  .  . .                                                    |
|          1: .  .  .  . .                                                    |
|          2: . 16 30 16 .                                                    |
|          3: .  .  .  . .                                                    |
|          4: .  .  .  . 1                                                    |
|                                                                             |
|o12 : BettiTally                                                             |
+-----------------------------------------------------------------------------+

We compare with the combinatorics, that is, check that the Kustin-Miller
complex at the special fiber z=0 indeed resolves the Stanley-Reisner ring of
$\Delta(4,8)$.

+-----------------------------------------------------------------------------+
|i13 : R'=K[x_1..x_8];                                                        |
+-----------------------------------------------------------------------------+
|i14 : C48=delta(4,R')                                                        |
|                                                                             |
|o14 = simplicialComplex | x_5x_6x_7x_8 x_1x_6x_7x_8 x_4x_5x_7x_8 x_3x_4x_7x_8|
|                                                                             |
|o14 : SimplicialComplex                                                      |
|-----------------------------------------------------------------------------|
|x_2x_3x_7x_8 x_1x_2x_7x_8 x_1x_5x_6x_8 x_1x_4x_5x_8 x_1x_3x_4x_8 x_1x_2x_3x_8|
|-----------------------------------------------------------------------------|
|x_4x_5x_6x_7 x_3x_4x_6x_7 x_2x_3x_6x_7 x_1x_2x_6x_7 x_3x_4x_5x_6 x_2x_3x_5x_6|
|-----------------------------------------------------------------------------|
|x_1x_2x_5x_6 x_2x_3x_4x_5 x_1x_2x_4x_5 x_1x_2x_3x_4 |                        |
+-----------------------------------------------------------------------------+
|i15 : I48=ideal C48                                                          |
|                                                                             |
|o15 = ideal (x x x , x x x , x x x , x x x , x x x , x x x , x x x , x x x , |
|              1 3 5   1 3 6   1 4 6   2 4 6   1 3 7   1 4 7   2 4 7   1 5 7  |
|      -----------------------------------------------------------------------|
|      x x x , x x x , x x x , x x x , x x x , x x x , x x x , x x x )        |
|       2 5 7   3 5 7   2 4 8   2 5 8   3 5 8   2 6 8   3 6 8   4 6 8         |
|                                                                             |
|o15 : Ideal of R'                                                            |
+-----------------------------------------------------------------------------+
|i16 : betti res I48                                                          |
|                                                                             |
|             0  1  2  3 4                                                    |
|o16 = total: 1 16 30 16 1                                                    |
|          0: 1  .  .  . .                                                    |
|          1: .  .  .  . .                                                    |
|          2: . 16 30 16 .                                                    |
|          3: .  .  .  . .                                                    |
|          4: .  .  .  . 1                                                    |
|                                                                             |
|o16 : BettiTally                                                             |
+-----------------------------------------------------------------------------+
|i17 : I48==sub(ideal cc.dd_1,R')                                             |
|                                                                             |
|o17 = true                                                                   |
+-----------------------------------------------------------------------------+

We finish the example by printing the differentials of the Kustin-Miller
complex:

+-----------------------------------------------------------------------------+
|i18 : print cc.dd_1                                                          |
|| x_1x_3x_5 x_1x_3x_6 x_1x_4x_6 x_2x_4x_6 x_2x_4x_7 x_2x_5x_7 x_3x_5x_7      |
|-----------------------------------------------------------------------------|
|x_8zx_3-x_1x_3x_7 x_8zx_4-x_1x_4x_7 x_8x_2x_4 x_8zx_5-x_1x_5x_7 x_8x_2x_5    |
|-----------------------------------------------------------------------------|
|x_8x_3x_5 x_8x_2x_6 x_8x_3x_6 x_8x_4x_6 |                                    |
+-----------------------------------------------------------------------------+
|i19 : print cc.dd_2                                                          |
|{3} | 0    0    -x_6 -x_7 0    0    0    0   0    0   0    0   0    0    0   |
|{3} | 0    -x_4 x_5  0    0    0    0    0   0    0   0    0   0    0    0   |
|{3} | -x_2 x_3  0    0    0    0    0    0   0    0   0    0   0    0    0   |
|{3} | x_1  0    0    0    0    0    -x_7 0   0    0   0    0   0    0    0   |
|{3} | 0    0    0    0    0    -x_5 x_6  x_1 0    0   0    0   0    0    0   |
|{3} | 0    0    0    0    -x_3 x_4  0    0   0    x_1 0    0   0    0    0   |
|{3} | 0    0    0    x_1  x_2  0    0    0   0    0   0    x_1 0    0    0   |
|{3} | 0    0    0    0    0    0    0    0   x_4  0   x_5  0   0    0    0   |
|{3} | 0    0    0    0    0    0    0    x_2 -x_3 0   0    0   0    x_5  0   |
|{3} | 0    0    0    0    0    0    0    -z  0    0   0    0   0    0    x_5 |
|{3} | 0    0    0    0    0    0    0    0   0    x_2 -x_3 x_3 0    -x_4 0   |
|{3} | 0    0    0    0    0    0    0    0   0    -z  0    0   x_3  0    -x_4|
|{3} | 0    0    0    0    0    0    0    0   0    0   0    -z  -x_2 0    0   |
|{3} | 0    0    0    0    0    0    0    0   0    0   0    0   0    0    0   |
|{3} | 0    0    0    0    0    0    0    0   0    0   0    0   0    0    0   |
|{3} | 0    0    0    0    0    0    0    0   0    0   0    0   0    0    0   |
|-----------------------------------------------------------------------------|
|0   0    0   0    0    0    0    0    x_8  0    0    0    0    0    0    |   |
|x_7 0    0   0    0    0    0    0    0    x_8  0    0    0    0    0    |   |
|0   0    x_7 0    0    0    0    0    0    0    x_8  0    0    0    0    |   |
|0   0    0   0    0    0    0    0    0    0    0    x_8  0    0    0    |   |
|0   0    0   0    0    0    0    0    0    0    0    0    x_8  0    0    |   |
|0   0    0   0    0    0    0    0    0    0    0    0    0    x_8  0    |   |
|0   0    0   0    0    0    0    0    0    0    0    0    0    0    x_8  |   |
|x_6 0    0   0    0    0    0    0    0    0    0    0    0    0    0    |   |
|0   0    x_6 0    0    0    0    0    0    0    0    0    0    0    0    |   |
|0   0    0   x_6  0    0    0    0    0    0    0    -x_6 -x_7 0    0    |   |
|0   0    0   0    0    0    0    0    0    0    0    0    0    0    0    |   |
|0   0    0   0    0    0    x_6  0    0    0    0    0    0    -x_7 0    |   |
|0   0    0   0    0    0    0    x_6  -x_1 0    0    0    0    0    -x_7 |   |
|0   x_3  0   -x_4 x_4  0    -x_5 0    0    0    0    0    0    0    0    |   |
|-z  -x_2 0   0    0    x_4  0    -x_5 0    -x_1 0    0    0    0    0    |   |
|0   0    -z  0    -x_2 -x_3 0    0    0    0    -x_1 0    0    0    0    |   |
+-----------------------------------------------------------------------------+
|i20 : print cc.dd_3                                                          |
|{4} | 0    0    0    x_7  0    0    0    0    0    -x_8 0    0    0    0     |
|{4} | 0    0    0    0    -x_7 0    0    0    0    0    -x_8 0    0    0     |
|{4} | 0    0    0    0    0    0    -x_7 0    0    0    0    -x_8 0    0     |
|{4} | 0    0    0    0    0    0    x_6  0    0    0    0    0    -x_8 0     |
|{4} | -x_1 0    0    0    0    0    0    0    0    0    0    0    0    -x_8  |
|{4} | 0    -x_1 0    0    0    0    0    0    0    0    0    0    0    0     |
|{4} | 0    0    0    x_1  0    0    0    0    0    0    0    0    0    0     |
|{4} | 0    -x_5 0    -x_6 0    0    0    0    0    0    0    0    0    0     |
|{4} | 0    0    -x_5 0    x_6  0    0    0    0    0    0    0    0    0     |
|{4} | -x_3 x_4  0    0    0    0    0    0    0    0    0    0    0    0     |
|{4} | 0    0    x_4  0    0    0    -x_6 0    0    0    0    0    0    0     |
|{4} | x_2  0    0    0    0    0    -x_6 0    0    0    0    0    0    0     |
|{4} | -z   0    0    0    0    0    0    -x_6 0    0    0    0    0    -x_7  |
|{4} | 0    x_2  -x_3 0    0    0    0    0    0    0    0    0    0    0     |
|{4} | 0    -z   0    0    0    0    0    0    -x_6 0    0    0    0    0     |
|{4} | 0    0    0    0    -x_4 0    x_5  0    0    0    0    0    0    0     |
|{4} | 0    0    0    0    0    -x_4 0    x_5  0    0    0    0    0    0     |
|{4} | 0    0    0    x_2  x_3  0    0    0    0    0    0    0    0    0     |
|{4} | 0    0    0    -z   0    0    0    0    x_5  x_1  0    0    0    0     |
|{4} | 0    0    0    -z   0    x_3  0    0    0    x_1  0    0    0    0     |
|{4} | 0    0    0    0    -z   -x_2 0    0    0    0    -x_1 0    0    0     |
|{4} | 0    0    0    0    0    0    0    x_3  -x_4 0    0    0    0    0     |
|{4} | 0    0    0    0    0    0    -z   -x_2 0    0    0    -x_1 0    0     |
|{4} | 0    0    0    0    0    0    0    0    0    0    0    -x_6 -x_7 0     |
|{4} | 0    0    0    0    0    0    0    0    0    0    -x_4 x_5  0    0     |
|{4} | 0    0    0    0    0    0    0    0    0    -x_2 x_3  0    0    0     |
|{4} | 0    0    0    0    0    0    0    0    0    x_1  0    0    0    0     |
|{4} | 0    0    0    0    0    0    0    0    0    0    0    0    0    0     |
|{4} | 0    0    0    0    0    0    0    0    0    0    0    0    0    -x_3  |
|{4} | 0    0    0    0    0    0    0    0    0    0    0    0    x_1  x_2   |
|-----------------------------------------------------------------------------|
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|-x_8 0    |                                                                  |
|0    -x_8 |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|-x_7 0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    -x_7 |                                                                  |
|-x_5 x_6  |                                                                  |
|x_4  0    |                                                                  |
|0    0    |                                                                  |
+-----------------------------------------------------------------------------+

See also
========

  * kustinMillerComplex -- Compute Kustin-Miller
    resolution of the unprojection of I in J
  * resolution (Macaulay2Doc) -- projective resolution
  * betti (Macaulay2Doc) -- display or modify a Betti diagram

delta -- Boundary complex of cyclic polytope.
*********************************************

Synopsis
========

  * Usage:
        delta(d,R)
  * Inputs:
      * d, an integer (Macaulay2Doc), positive
      * R, a polynomial ring (Macaulay2Doc),
  * Outputs:
      * an abstract simplicial complex (SimplicialComplexes),

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

Boundary complex of a cyclic polytope of dimension d on the variables of R as
vertices, i.e., $\Delta(d,m)$ if m is the number of variables of R.

+-----------------------------------------------------------------------------+
|i1 : K=QQ;                                                                   |
+-----------------------------------------------------------------------------+
|i2 : R=K[x_0..x_6];                                                          |
+-----------------------------------------------------------------------------+
|i3 : C=delta(4,R)                                                            |
|                                                                             |
|o3 = simplicialComplex | x_3x_4x_5x_6 x_0x_4x_5x_6 x_2x_3x_5x_6 x_1x_2x_5x_6 |
|                                                                             |
|o3 : SimplicialComplex                                                       |
|-----------------------------------------------------------------------------|
|x_0x_1x_5x_6 x_0x_3x_4x_6 x_0x_2x_3x_6 x_0x_1x_2x_6 x_2x_3x_4x_5 x_1x_2x_4x_5|
|-----------------------------------------------------------------------------|
|x_0x_1x_4x_5 x_1x_2x_3x_4 x_0x_1x_3x_4 x_0x_1x_2x_3 |                        |
+-----------------------------------------------------------------------------+
|i4 : fVector C                                                               |
|                                                                             |
|o4 = {1, 7, 21, 28, 14}                                                      |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+
|i5 : I=ideal C                                                               |
|                                                                             |
|o5 = ideal (x x x , x x x , x x x , x x x , x x x , x x x , x x x )          |
|             0 2 4   0 2 5   0 3 5   1 3 5   1 3 6   1 4 6   2 4 6           |
|                                                                             |
|o5 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i6 : betti res I                                                             |
|                                                                             |
|            0 1 2 3                                                          |
|o6 = total: 1 7 7 1                                                          |
|         0: 1 . . .                                                          |
|         1: . . . .                                                          |
|         2: . 7 7 .                                                          |
|         3: . . . .                                                          |
|         4: . . . 1                                                          |
|                                                                             |
|o6 : BettiTally                                                              |
+-----------------------------------------------------------------------------+

Ways to use delta :
===================

  * "delta(ZZ,PolynomialRing)"

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

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

dim(Face) -- The dimension of a face.
*************************************

Synopsis
========

  * Function: dim (Macaulay2Doc),
  * Usage:
        dim F
  * Inputs:
      * F, an instance of the type Face,
  * Outputs:
      * an integer (Macaulay2Doc), bigger or equal to -1

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

Returns the dimension of a Face, i.e., the number of
vertices (Polyhedra), F minus 1.

+----------------------------------------------------------------+
|i1 : K = QQ;                                                    |
+----------------------------------------------------------------+
|i2 : R = K[x_0..x_4];                                           |
+----------------------------------------------------------------+
|i3 : I = monomialIdeal(x_0*x_1,x_1*x_2,x_2*x_3,x_3*x_4,x_4*x_0);|
|                                                                |
|o3 : MonomialIdeal of R                                         |
+----------------------------------------------------------------+
|i4 : D = simplicialComplex I                                    |
|                                                                |
|o4 = simplicialComplex | x_2x_4 x_1x_4 x_1x_3 x_0x_3 x_0x_2 |   |
|                                                                |
|o4 : SimplicialComplex                                          |
+----------------------------------------------------------------+
|i5 : fc = faces(D)                                              |
|                                                                |
|o5 = HashTable{-1 => {1}                          }             |
|               0 => {x , x , x , x , x }                        |
|                      0   1   2   3   4                         |
|               1 => {x x , x x , x x , x x , x x }              |
|                      0 2   0 3   1 3   1 4   2 4               |
|                                                                |
|o5 : HashTable                                                  |
+----------------------------------------------------------------+

See also
========

  * face -- Generate a face.
  * facets(SimplicialComplex) (SimplicialComplexes)
    -- get the list of
    maximal faces
  * faces(SimplicialComplex) (SimplicialComplexes)
    -- get the list of faces
    for an abstract simplicial complex

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

  * dim(Face) -- The dimension of a face.

Face -- The class of faces of simplicial complexes.
***************************************************

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

The class of faces of simplicial complexes on the variables of a polynomial
ring.  The faces are MutableHashTable (Macaulay2Doc),s F
with two keys (Macaulay2Doc), F.vertices is a List (Macaulay2Doc),
of vertices in the PolynomialRing (Macaulay2Doc),
F.ring

+----------------------------------------------------------------+
|i1 : R=QQ[x_0..x_4];                                            |
+----------------------------------------------------------------+
|i2 : F=face {x_0,x_2}                                           |
|                                                                |
|o2 = x  x                                                       |
|      0  2                                                      |
|                                                                |
|o2 : face with 2 vertices in R                                  |
+----------------------------------------------------------------+
|i3 : vertices F                                                 |
|                                                                |
|o3 = {x , x }                                                   |
|       0   2                                                    |
|                                                                |
|o3 : List                                                       |
+----------------------------------------------------------------+
|i4 : I = monomialIdeal(x_0*x_1,x_1*x_2,x_2*x_3,x_3*x_4,x_4*x_0);|
|                                                                |
|o4 : MonomialIdeal of R                                         |
+----------------------------------------------------------------+
|i5 : D = simplicialComplex I                                    |
|                                                                |
|o5 = simplicialComplex | x_2x_4 x_1x_4 x_1x_3 x_0x_3 x_0x_2 |   |
|                                                                |
|o5 : SimplicialComplex                                          |
+----------------------------------------------------------------+
|i6 : fc = faces(1, D)                                           |
|                                                                |
|o6 = {x x , x x , x x , x x , x x }                             |
|       0 2   0 3   1 3   1 4   2 4                              |
|                                                                |
|o6 : List                                                       |
+----------------------------------------------------------------+

See also
========

  * SimplicialComplex (SimplicialComplexes) -- the
    class of all abstract simplicial complexes
  * faces (Polyhedra) -- computes all faces of a certain
    codimension of a Cone or Polyhedron
  * facets (Polyhedra) -- Giving the facet inequalities of a cone
    or polyhedron.

Functions and methods returning an object of class Face :
=========================================================

  * "face(List)" -- see face, -- Generate a face.
  * "face(List,PolynomialRing)" -- see face, -- Generate a face.

Methods that use an object of class Face :
==========================================

  * dim(Face) -- The dimension of a face.
  * Face == Face -- Compare two faces.
  * "isSubface(Face,Face)" -- see isSubface, -- Test whether a
    face is a subface of another face.
  * net(Face) -- Printing a face.
  * ring(Face) -- Ring of a face.
  * "stellarSubdivision(SimplicialComplex,Face,PolynomialRing)" -- see
    stellarSubdivision, -- Compute the stellar subdivision
    of a simplicial complex.
  * substitute(Face,PolynomialRing)
    -- Substitute a face to a different
    ring.
  * vertices(Face) -- The vertices of a face of a
    simplicial complex.

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

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

face -- Generate a face.
************************

Synopsis
========

  * Usage:
        face(L)
        face(L,R)
        face(m)
  * Inputs:
      * L, a list (Macaulay2Doc),
      * R, a polynomial ring (Macaulay2Doc),
      * m, a ring element (Macaulay2Doc), a monomial
  * Outputs:
      * an instance of the type Face,

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

Generates a face out of a list L or a squarefree monomial. If L is not empty or
a monomial the argument R is not required.

+------------------------------+
|i1 : K=QQ;                    |
+------------------------------+
|i2 : R=K[x_0..x_4];           |
+------------------------------+
|i3 : F=face {x_0,x_1}         |
|                              |
|o3 = x  x                     |
|      0  1                    |
|                              |
|o3 : face with 2 vertices in R|
+------------------------------+

See also
========

  * SimplicialComplex (SimplicialComplexes) -- the
    class of all abstract simplicial complexes
  * faces (Polyhedra) -- computes all faces of a certain
    codimension of a Cone or Polyhedron
  * facets (Polyhedra) -- Giving the facet inequalities of a cone
    or polyhedron.

Ways to use face :
==================

  * "face(List)"
  * "face(List,PolynomialRing)"
  * "face(RingElement)"

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

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

Face == Face -- Compare two faces.
**********************************

Synopsis
========

  * Operator: == (Macaulay2Doc),
  * Usage:
        F==G
  * Inputs:
      * F, an instance of the type Face,
      * G, an instance of the type Face,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

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

Checks whether F and G are equal.

+------------------------------+
|i1 : K=QQ;                    |
+------------------------------+
|i2 : R=K[x_0..x_4];           |
+------------------------------+
|i3 : F=face {x_0,x_1}         |
|                              |
|o3 = x  x                     |
|      0  1                    |
|                              |
|o3 : face with 2 vertices in R|
+------------------------------+
|i4 : G1=face {x_1,x_0}        |
|                              |
|o4 = x  x                     |
|      1  0                    |
|                              |
|o4 : face with 2 vertices in R|
+------------------------------+
|i5 : G2=face {x_1,x_2}        |
|                              |
|o5 = x  x                     |
|      1  2                    |
|                              |
|o5 : face with 2 vertices in R|
+------------------------------+
|i6 : F==G1                    |
|                              |
|o6 = true                     |
+------------------------------+
|i7 : F==G2                    |
|                              |
|o7 = false                    |
+------------------------------+

See also
========

  * Face -- The class of faces of simplicial complexes.
  * face -- Generate a face.

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

  * Face == Face -- Compare two faces.

isExactRes -- Test whether a chain complex is an exact resolution.
******************************************************************

Synopsis
========

  * Usage:
        isExactRes(cc)
  * Inputs:
      * cc, a chain complex (Macaulay2Doc),
  * Outputs:
      * a Boolean value (Macaulay2Doc),

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

Test whether a chain complex is an exact resolution, that is, it is exact
everywhere except at the first non-zero module.

We consider cc as a doubly infinite complex extending it by adding trivial
modules and homomorphisms.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x_1..x_4,z_1..z_4]                                               |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I =  ideal(z_2*z_3-z_1*z_4,x_4*z_3-x_3*z_4,x_2*z_2-x_1*z_4,x_4*z_1-x_3*z|
|                                                                             |
|o2 = ideal (z z  - z z , x z  - x z , x z  - x z , x z  - x z , x z  - x z ) |
|             2 3    1 4   4 3    3 4   2 2    1 4   4 1    3 2   2 1    1 3  |
|                                                                             |
|o2 : Ideal of R                                                              |
|-----------------------------------------------------------------------------|
|_2,x_2*z_1-x_1*z_3)                                                          |
+-----------------------------------------------------------------------------+
|i3 : cc= res I                                                               |
|                                                                             |
|      1      5      5      1                                                 |
|o3 = R  <-- R  <-- R  <-- R  <-- 0                                           |
|                                                                             |
|     0      1      2      3      4                                           |
|                                                                             |
|o3 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i4 : isExactRes cc                                                           |
|                                                                             |
|o4 = true                                                                    |
+-----------------------------------------------------------------------------+
|i5 : isExactRes(cc[1])                                                       |
|                                                                             |
|o5 = true                                                                    |
+-----------------------------------------------------------------------------+
|i6 : isExactRes(cc[-1])                                                      |
|                                                                             |
|o6 = true                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * resolution (Macaulay2Doc) -- projective resolution

Ways to use isExactRes :
========================

  * "isExactRes(ChainComplex)"

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

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

isFaceOf -- Substitute a face to a different ring.
**************************************************

Synopsis
========

  * Usage:
        substitute(F,R)
  * Inputs:
      * F, an instance of the type Face,
      * R, a polynomial ring (Macaulay2Doc),
  * Outputs:
      * an instance of the type Face,

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

Substitute a face to a different ring.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x_1..x_5];                                                       |
+-----------------------------------------------------------------------------+
|i2 : C = simplicialComplex monomialIdeal (x_1*x_2,x_3*x_4*x_5)               |
|                                                                             |
|o2 = simplicialComplex | x_2x_4x_5 x_1x_4x_5 x_2x_3x_5 x_1x_3x_5 x_2x_3x_4   |
|                                                                             |
|o2 : SimplicialComplex                                                       |
|-----------------------------------------------------------------------------|
|x_1x_3x_4 |                                                                  |
+-----------------------------------------------------------------------------+
|i3 : F1 = face {x_1,x_2}                                                     |
|                                                                             |
|o3 = x  x                                                                    |
|      1  2                                                                   |
|                                                                             |
|o3 : face with 2 vertices in R                                               |
+-----------------------------------------------------------------------------+
|i4 : F2 = face {x_1,x_3}                                                     |
|                                                                             |
|o4 = x  x                                                                    |
|      1  3                                                                   |
|                                                                             |
|o4 : face with 2 vertices in R                                               |
+-----------------------------------------------------------------------------+

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

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

isFaceof
********

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

The object isFaceof (missing documentation) is a symbol (Macaulay2Doc).

isSubface -- Test whether a face is a subface of another face.
**************************************************************

Synopsis
========

  * Usage:
        isSubface(F,G)
  * Inputs:
      * F, an instance of the type Face,
      * G, an instance of the type Face,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

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

Test whether F is a subface of G.

+------------------------------+
|i1 : K=QQ;                    |
+------------------------------+
|i2 : R=K[x_0..x_4];           |
+------------------------------+
|i3 : G=face {x_0,x_1,x_2}     |
|                              |
|o3 = x  x  x                  |
|      0  1  2                 |
|                              |
|o3 : face with 3 vertices in R|
+------------------------------+
|i4 : F1=face {x_0,x_2}        |
|                              |
|o4 = x  x                     |
|      0  2                    |
|                              |
|o4 : face with 2 vertices in R|
+------------------------------+
|i5 : F2=face {x_0,x_3}        |
|                              |
|o5 = x  x                     |
|      0  3                    |
|                              |
|o5 : face with 2 vertices in R|
+------------------------------+
|i6 : isSubface(F1,G)          |
|                              |
|o6 = true                     |
+------------------------------+
|i7 : isSubface(F2,G)          |
|                              |
|o7 = false                    |
+------------------------------+

Ways to use isSubface :
=======================

  * "isSubface(Face,Face)"

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

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

Jerry -- The Kustin-Miller complex for Jerry
********************************************

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

The Kustin-Miller complex construction for the Jerry example which can be found
in Section 5.7 of

Papadakis, Kustin-Miller unprojection with complexes,  J. Algebraic Geometry 13
(2004) 249-268, http://arxiv.org/abs/math/0111195

Here we pass from a Pfaffian to a codimension 4 variety.

+-----------------------------------------------------------------------------+
|i1 : R = QQ [x_1..x_3, z_1..z_4]                                             |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I = ideal(-z_2*z_3+z_1*x_1,-z_2*z_4+z_1*x_2,-z_3*z_4+z_1*x_3,-z_3*x_2+z_|
|                                                                             |
|o2 = ideal (x z  - z z , x z  - z z , x z  - z z , x z  - x z , - x z  +     |
|             1 1    2 3   2 1    2 4   3 1    3 4   3 2    2 3     2 3       |
|     ------------------------------------------------------------------------|
|     x z )                                                                   |
|      1 4                                                                    |
|                                                                             |
|o2 : Ideal of R                                                              |
|-----------------------------------------------------------------------------|
|2*x_3,z_4*x_1-z_3*x_2)                                                       |
+-----------------------------------------------------------------------------+
|i3 : cI=res I                                                                |
|                                                                             |
|      1      5      5      1                                                 |
|o3 = R  <-- R  <-- R  <-- R  <-- 0                                           |
|                                                                             |
|     0      1      2      3      4                                           |
|                                                                             |
|o3 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i4 : betti cI                                                                |
|                                                                             |
|            0 1 2 3                                                          |
|o4 = total: 1 5 5 1                                                          |
|         0: 1 . . .                                                          |
|         1: . 5 5 .                                                          |
|         2: . . . 1                                                          |
|                                                                             |
|o4 : BettiTally                                                              |
+-----------------------------------------------------------------------------+
|i5 : J = ideal (z_1..z_4)                                                    |
|                                                                             |
|o5 = ideal (z , z , z , z )                                                  |
|             1   2   3   4                                                   |
|                                                                             |
|o5 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i6 : cJ=res J                                                                |
|                                                                             |
|      1      4      6      4      1                                          |
|o6 = R  <-- R  <-- R  <-- R  <-- R  <-- 0                                    |
|                                                                             |
|     0      1      2      3      4      5                                    |
|                                                                             |
|o6 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i7 : betti cJ                                                                |
|                                                                             |
|            0 1 2 3 4                                                        |
|o7 = total: 1 4 6 4 1                                                        |
|         0: 1 4 6 4 1                                                        |
|                                                                             |
|o7 : BettiTally                                                              |
+-----------------------------------------------------------------------------+
|i8 : cc=kustinMillerComplex(cI,cJ,QQ[T]);                                    |
+-----------------------------------------------------------------------------+
|i9 : S=ring cc                                                               |
|                                                                             |
|o9 = S                                                                       |
|                                                                             |
|o9 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i10 : cc                                                                     |
|                                                                             |
|       1      9      16      9      1                                        |
|o10 = S  <-- S  <-- S   <-- S  <-- S                                         |
|                                                                             |
|      0      1      2       3      4                                         |
|                                                                             |
|o10 : ChainComplex                                                           |
+-----------------------------------------------------------------------------+
|i11 : betti cc                                                               |
|                                                                             |
|             0 1  2 3 4                                                      |
|o11 = total: 1 9 16 9 1                                                      |
|          0: 1 .  . . .                                                      |
|          1: . 9 16 9 .                                                      |
|          2: . .  . . 1                                                      |
|                                                                             |
|o11 : BettiTally                                                             |
+-----------------------------------------------------------------------------+
|i12 : isExactRes cc                                                          |
|                                                                             |
|o12 = true                                                                   |
+-----------------------------------------------------------------------------+
|i13 : print cc.dd_1                                                          |
|| x_1z_1-z_2z_3 x_2z_1-z_2z_4 x_3z_1-z_3z_4 x_3z_2-x_2z_3 x_2z_3-x_1z_4      |
|-----------------------------------------------------------------------------|
|Tz_1-x_1z_4 -x_1x_2+Tz_2 -x_1x_3+Tz_3 -x_2x_3+Tz_4 |                         |
+-----------------------------------------------------------------------------+
|i14 : print cc.dd_2                                                          |
|{2} | -x_2 -x_3 0    0    z_4  0    0    0    0    0    0    T    0    0     |
|{2} | x_1  0    -x_3 z_3  -z_3 -x_1 0    0    0    0    0    0    T    0     |
|{2} | 0    x_1  x_2  -z_2 0    0    -x_1 0    -x_2 0    0    0    0    T     |
|{2} | 0    -z_3 -z_4 z_1  0    0    0    -x_1 0    -x_2 0    0    0    0     |
|{2} | -z_2 -z_3 0    0    z_1  0    0    0    -z_4 -x_2 -x_3 x_1  0    0     |
|{2} | 0    0    0    0    0    z_2  z_3  0    z_4  0    0    -x_1 -x_2 -x_3  |
|{2} | 0    0    0    0    0    -z_1 0    z_3  0    z_4  0    z_3  z_4  0     |
|{2} | 0    0    0    0    0    0    -z_1 -z_2 0    0    z_4  0    0    z_4   |
|{2} | 0    0    0    0    0    0    0    0    -z_1 -z_2 -z_3 0    0    0     |
|-----------------------------------------------------------------------------|
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|T    0    |                                                                  |
|0    T    |                                                                  |
|0    0    |                                                                  |
|-x_3 0    |                                                                  |
|x_2  -x_2 |                                                                  |
|0    x_1  |                                                                  |
+-----------------------------------------------------------------------------+
|i15 : print cc.dd_3                                                          |
|{3} | 0    -z_4 0    x_3  -T   0    0    0    0    |                         |
|{3} | 0    0    -z_4 -x_2 0    -T   0    0    0    |                         |
|{3} | 0    0    z_3  x_1  0    0    -T   x_1  0    |                         |
|{3} | -x_1 -x_2 0    0    0    0    0    -T   0    |                         |
|{3} | 0    -x_2 -x_3 0    0    0    0    0    -T   |                         |
|{3} | -z_3 -z_4 0    0    0    0    0    -x_3 0    |                         |
|{3} | z_2  0    -z_4 0    0    0    0    x_2  -x_2 |                         |
|{3} | -z_1 0    0    -z_4 x_2  0    0    -z_4 0    |                         |
|{3} | 0    z_2  z_3  0    0    0    0    0    x_1  |                         |
|{3} | 0    -z_1 0    z_3  -x_1 0    0    0    0    |                         |
|{3} | 0    0    -z_1 -z_2 0    -x_1 0    0    0    |                         |
|{3} | 0    0    0    0    -x_2 -x_3 0    0    z_4  |                         |
|{3} | 0    0    0    0    x_1  0    -x_3 z_3  -z_3 |                         |
|{3} | 0    0    0    0    0    x_1  x_2  -z_2 0    |                         |
|{3} | 0    0    0    0    0    -z_3 -z_4 z_1  0    |                         |
|{3} | 0    0    0    0    -z_2 -z_3 0    0    z_1  |                         |
+-----------------------------------------------------------------------------+
|i16 : print cc.dd_4                                                          |
|{4} | -x_2x_3+Tz_4   |                                                       |
|{4} | x_1x_3-Tz_3    |                                                       |
|{4} | -x_1x_2+Tz_2   |                                                       |
|{4} | -Tz_1+x_1z_4   |                                                       |
|{4} | -x_3z_1+z_3z_4 |                                                       |
|{4} | x_2z_1-z_2z_4  |                                                       |
|{4} | -x_1z_1+z_2z_3 |                                                       |
|{4} | x_2z_3-x_1z_4  |                                                       |
|{4} | -x_3z_2+x_2z_3 |                                                       |
+-----------------------------------------------------------------------------+

See also
========

  * kustinMillerComplex -- Compute Kustin-Miller
    resolution of the unprojection of I in J
  * resolution (Macaulay2Doc) -- projective resolution
  * betti (Macaulay2Doc) -- display or modify a Betti diagram
  * Tom -- The Kustin-Miller complex for Tom

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

The object Jerry, is a symbol (Macaulay2Doc).

kustinMillerComplex -- Compute Kustin-Miller resolution of the unprojection of I in J
*************************************************************************************

Synopsis
========

  * Usage:
        kustinMillerComplex(I,J,W)
        kustinMillerComplex(cI,cJ,W)
  * Inputs:
      * J, an ideal (Macaulay2Doc), in a positively graded
        polynomial ring R
      * I, an ideal (Macaulay2Doc), contained in J
      * cI, a chain complex (Macaulay2Doc), resolution of I
      * cJ, a chain complex (Macaulay2Doc), resolution of J
      * W, a polynomial ring (Macaulay2Doc), over the
        same coefficientRing (Macaulay2Doc), as R with
        one variable T.
  * Optional inputs (Macaulay2Doc),:
      * Verbose,
        => ..., default value 0, Option to print intermediate data
  * Outputs:
      * a chain complex (Macaulay2Doc),

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

Compute Kustin-Miller resolution of the unprojection of I in J (or equivalently
of the image J' of J in R/I) with unprojection variable T.

We have the following setup:

Assume R is a PolynomialRing (Macaulay2Doc), over a field,
the degrees of all variables positive and $I \subset J \subset R$ two
homogeneous ideals of R such that R/I and R/J are Gorenstein and
dim(R/J)=dim(R/I)-1.

Let R/I(k_1) and R/J(k_2) be the canonical modules of R/I and R/J respectively.
We require k_1 - k_2, that is, the degree of the unprojection variable, to be
positive.

For a description of this resolution and how it is computed see

J. Boehm, S. Papadakis: Implementing the Kustin-Miller complex construction,
http://arxiv.org/abs/1103.2314

It is also possible to specify minimal resolutions of I and J.

The function kustinMillerComplex, returns a chain
complex over a new polynomial ring S with the same coefficientRing (Macaulay2Doc),
as R and the variables of R and W, where
degree(T) = See degree (Macaulay2Doc), unprojectionHomomorphism,
(I,J) = k_1-k_2.

To avoid printing the variables of this ring when printing the chain complex
just give a name to the ring (e.g., do S = See ring (Macaulay2Doc), cc
to call it S).

We illustrate the Kustin-Miller complex construction at the example described
in Section 5.5 of

Papadakis, Kustin-Miller unprojection with complexes,  J. Algebraic Geometry 13
(2004) 249-268, http://arxiv.org/abs/math/0111195

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x_1..x_4,z_1..z_4]                                               |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I =  ideal(z_2*z_3-z_1*z_4,x_4*z_3-x_3*z_4,x_2*z_2-x_1*z_4,x_4*z_1-x_3*z|
|                                                                             |
|o2 = ideal (z z  - z z , x z  - x z , x z  - x z , x z  - x z , x z  - x z ) |
|             2 3    1 4   4 3    3 4   2 2    1 4   4 1    3 2   2 1    1 3  |
|                                                                             |
|o2 : Ideal of R                                                              |
|-----------------------------------------------------------------------------|
|_2,x_2*z_1-x_1*z_3)                                                          |
+-----------------------------------------------------------------------------+
|i3 : betti res I                                                             |
|                                                                             |
|            0 1 2 3                                                          |
|o3 = total: 1 5 5 1                                                          |
|         0: 1 . . .                                                          |
|         1: . 5 5 .                                                          |
|         2: . . . 1                                                          |
|                                                                             |
|o3 : BettiTally                                                              |
+-----------------------------------------------------------------------------+
|i4 : J = ideal (z_1..z_4)                                                    |
|                                                                             |
|o4 = ideal (z , z , z , z )                                                  |
|             1   2   3   4                                                   |
|                                                                             |
|o4 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i5 : betti res J                                                             |
|                                                                             |
|            0 1 2 3 4                                                        |
|o5 = total: 1 4 6 4 1                                                        |
|         0: 1 4 6 4 1                                                        |
|                                                                             |
|o5 : BettiTally                                                              |
+-----------------------------------------------------------------------------+
|i6 : cc=kustinMillerComplex(I,J,QQ[T]);                                      |
+-----------------------------------------------------------------------------+
|i7 : S=ring cc                                                               |
|                                                                             |
|o7 = S                                                                       |
|                                                                             |
|o7 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i8 : cc                                                                      |
|                                                                             |
|      1      9      16      9      1                                         |
|o8 = S  <-- S  <-- S   <-- S  <-- S                                          |
|                                                                             |
|     0      1      2       3      4                                          |
|                                                                             |
|o8 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i9 : betti cc                                                                |
|                                                                             |
|            0 1  2 3 4                                                       |
|o9 = total: 1 9 16 9 1                                                       |
|         0: 1 .  . . .                                                       |
|         1: . 9 16 9 .                                                       |
|         2: . .  . . 1                                                       |
|                                                                             |
|o9 : BettiTally                                                              |
+-----------------------------------------------------------------------------+
|i10 : isExactRes cc                                                          |
|                                                                             |
|o10 = true                                                                   |
+-----------------------------------------------------------------------------+
|i11 : print cc.dd_1                                                          |
|| x_2z_1-x_1z_3 x_4z_1-x_3z_2 x_2z_2-x_1z_4 x_4z_3-x_3z_4 z_2z_3-z_1z_4      |
|-----------------------------------------------------------------------------|
|-x_1x_3+Tz_1 -x_1x_4+Tz_2 -x_2x_3+Tz_3 -x_2x_4+Tz_4 |                        |
+-----------------------------------------------------------------------------+
|i12 : print cc.dd_2                                                          |
|{2} | -x_4 -z_2 0    z_4  0    0    -x_3 0    0    0    0    T    0    0     |
|{2} | x_2  0    -z_3 0    z_4  -x_1 0    0    -x_2 0    0    0    T    0     |
|{2} | x_3  z_1  0    -z_3 0    0    0    -x_3 -x_3 -x_4 0    0    0    T     |
|{2} | -x_1 0    z_1  0    -z_2 0    0    x_1  0    0    -x_2 0    0    0     |
|{2} | 0    -x_1 -x_3 x_2  x_4  0    0    0    0    0    0    0    0    0     |
|{2} | 0    0    0    0    0    z_2  z_3  0    z_4  0    0    -x_2 -x_4 0     |
|{2} | 0    0    0    0    0    -z_1 0    z_3  0    z_4  0    0    x_3  -x_2  |
|{2} | 0    0    0    0    0    0    -z_1 -z_2 0    0    z_4  x_1  0    0     |
|{2} | 0    0    0    0    0    0    0    0    -z_1 -z_2 -z_3 0    0    x_1   |
|-----------------------------------------------------------------------------|
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    -x_3 |                                                                  |
|T    0    |                                                                  |
|0    T    |                                                                  |
|0    z_4  |                                                                  |
|0    0    |                                                                  |
|-x_4 -z_2 |                                                                  |
|x_3  0    |                                                                  |
+-----------------------------------------------------------------------------+
|i13 : print cc.dd_3                                                          |
|{3} | 0    z_2  0    -z_4 -T   0    x_3  0    0    |                         |
|{3} | -x_3 -x_4 0    0    0    -T   0    0    0    |                         |
|{3} | x_1  0    -x_2 0    0    0    -T   0    0    |                         |
|{3} | 0    0    -x_3 -x_4 0    0    0    -T   0    |                         |
|{3} | 0    -x_1 0    x_2  0    0    0    0    -T   |                         |
|{3} | -z_3 -z_4 0    0    0    -x_2 0    0    0    |                         |
|{3} | z_2  0    -z_4 0    0    0    -x_4 0    0    |                         |
|{3} | -z_1 0    0    -z_4 0    0    x_3  -x_2 0    |                         |
|{3} | 0    z_2  z_3  0    0    x_1  x_3  0    0    |                         |
|{3} | 0    -z_1 0    z_3  0    0    0    0    -x_3 |                         |
|{3} | 0    0    -z_1 -z_2 0    0    0    -x_1 0    |                         |
|{3} | 0    0    0    0    -x_4 -z_2 0    z_4  0    |                         |
|{3} | 0    0    0    0    x_2  0    -z_3 0    z_4  |                         |
|{3} | 0    0    0    0    x_3  z_1  0    -z_3 0    |                         |
|{3} | 0    0    0    0    -x_1 0    z_1  0    -z_2 |                         |
|{3} | 0    0    0    0    0    -x_1 -x_3 x_2  x_4  |                         |
+-----------------------------------------------------------------------------+
|i14 : print cc.dd_4                                                          |
|{4} | -x_2x_4+Tz_4   |                                                       |
|{4} | x_2x_3-Tz_3    |                                                       |
|{4} | -x_1x_4+Tz_2   |                                                       |
|{4} | x_1x_3-Tz_1    |                                                       |
|{4} | -z_2z_3+z_1z_4 |                                                       |
|{4} | x_4z_3-x_3z_4  |                                                       |
|{4} | -x_2z_2+x_1z_4 |                                                       |
|{4} | x_4z_1-x_3z_2  |                                                       |
|{4} | -x_2z_1+x_1z_3 |                                                       |
+-----------------------------------------------------------------------------+

See also
========

  * unprojectionHomomorphism -- Compute the
    homomorphism associated to an unprojection pair

Ways to use kustinMillerComplex :
=================================

  * "kustinMillerComplex(ChainComplex,ChainComplex,PolynomialRing)"
  * "kustinMillerComplex(Ideal,Ideal,PolynomialRing)"

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

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

kustinMillerComplex(...,Verbose=>...) -- Option to print intermediate data
**************************************************************************

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

See Option (Macaulay2Doc), to print the intermediate results.

It takes ZZ (Macaulay2Doc), values (standard is 0), increasing the
amount of output with the value.

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

  * Default value: 0
  * Function: kustinMillerComplex, -- Compute
    Kustin-Miller resolution of the unprojection of I in J
  * Option key: Verbose (Macaulay2Doc), -- request verbose
    feedback

Functions with optional argument named Verbose :
================================================

  * "check(...,Verbose=>...)" -- see check (Macaulay2Doc), --
    perform tests of a package
  * "checkDegrees(...,Verbose=>...)" -- see checkDegrees (Isomorphism),
    -- compares the degrees of generators of two
    modules
  * "copyDirectory(...,Verbose=>...)" -- see
    copyDirectory(String,String) (Macaulay2Doc),
  * "copyFile(...,Verbose=>...)" -- see copyFile(String,String) (Macaulay2Doc),
  * "findProgram(...,Verbose=>...)" -- see findProgram (Macaulay2Doc),
    -- load external program
  * "installPackage(...,Verbose=>...)" -- see installPackage (Macaulay2Doc),
    -- load and install a package and its
    documentation
  * "isIsomorphic(...,Verbose=>...)" -- see isIsomorphic (Isomorphism),
    -- Probabilistic test for isomorphism of modules
  * kustinMillerComplex(...,Verbose=>...)
    -- Option to print
    intermediate data
  * "moveFile(...,Verbose=>...)" -- see moveFile(String,String) (Macaulay2Doc),
  * "runProgram(...,Verbose=>...)" -- see runProgram (Macaulay2Doc),
    -- run an external program
  * "symlinkDirectory(...,Verbose=>...)" -- see
    symlinkDirectory(String,String) (Macaulay2Doc),
    -- make symbolic links
    for all files in a directory tree

net(Face) -- Printing a face.
*****************************

Synopsis
========

  * Function: net (Macaulay2Doc),
  * Usage:
        net(F)
  * Inputs:
      * F, an instance of the type Face,
  * Outputs:
      * a net (Macaulay2Doc),

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

Prints a face. The vertices are printed without any brackets and with one space
between them. Also prints the polynomial ring which contains the vertices.

+------------------------------+
|i1 : K=QQ;                    |
+------------------------------+
|i2 : R=K[x_0..x_4];           |
+------------------------------+
|i3 : face {x_0,x_1}           |
|                              |
|o3 = x  x                     |
|      0  1                    |
|                              |
|o3 : face with 2 vertices in R|
+------------------------------+

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

  * net(Face) -- Printing a face.

resBE -- Buchsbaum-Eisenbud resolution
**************************************

Synopsis
========

  * Usage:
        resBE(A)
  * Inputs:
      * A, a matrix (Macaulay2Doc), skew-symmetric
  * Outputs:
      * a chain complex (Macaulay2Doc),

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

Returns the Buchsbaum-Eisenbud resolution of the ideal of submaximal
pfaffians (Macaulay2Doc), of a skew-symmetric matrix A. The syzygy
matrix will be A.

+-----------------------------------------------------------------------------+
|i1 : R=QQ[x_1..x_4,z_1..z_4];                                                |
+-----------------------------------------------------------------------------+
|i2 : A=matrix {{0,x_1,x_2,x_3,x_4},{-x_1,0,0,z_1,z_2},{-x_2,0,0,z_3,z_4},{-x_|
|                                                                             |
|o2 = | 0    x_1  x_2  x_3 x_4 |                                              |
|     | -x_1 0    0    z_1 z_2 |                                              |
|     | -x_2 0    0    z_3 z_4 |                                              |
|     | -x_3 -z_1 -z_3 0   0   |                                              |
|     | -x_4 -z_2 -z_4 0   0   |                                              |
|                                                                             |
|             5       5                                                       |
|o2 : Matrix R  <--- R                                                        |
|-----------------------------------------------------------------------------|
|3,-z_1,-z_3,0,0},{-x_4,-z_2,-z_4,0,0}}                                       |
+-----------------------------------------------------------------------------+
|i3 : resBE A                                                                 |
|                                                                             |
|      1      5      5      1                                                 |
|o3 = R  <-- R  <-- R  <-- R  <-- 0                                           |
|                                                                             |
|     0      1      2      3      4                                           |
|                                                                             |
|o3 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+

See also
========

  * resolution (Macaulay2Doc) -- projective resolution

Ways to use resBE :
===================

  * "resBE(Matrix)"

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

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

ring(Face) -- Ring of a face.
*****************************

Synopsis
========

  * Function: ring (Macaulay2Doc),
  * Usage:
        ring(F)
  * Inputs:
      * F, an instance of the type Face,
  * Outputs:
      * a ring (Macaulay2Doc),

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

Ring of a face.

+------------------------------+
|i1 : K=QQ;                    |
+------------------------------+
|i2 : R=K[x_0..x_4];           |
+------------------------------+
|i3 : F=face {x_0,x_1,x_2}     |
|                              |
|o3 = x  x  x                  |
|      0  1  2                 |
|                              |
|o3 : face with 3 vertices in R|
+------------------------------+
|i4 : ring F                   |
|                              |
|o4 = R                        |
|                              |
|o4 : PolynomialRing           |
+------------------------------+

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

  * ring(Face) -- Ring of a face.

Stellar Subdivisions -- The Kustin-Miller complex for stellar subdivisions
**************************************************************************

We consider a Gorenstein* simplicial complex C and the complex C' obtained by
stellar subdivision (see stellarSubdivision (Polyhedra))
of a face F of C, and the corresponding
Stanley-Reisner ideals I and I'.

We construct a resolution of I' from a resolution of I and from a resolution of
the Stanley-Reisner ideal of the link of F using the Kustin-Miller complex
construction implemented in kustinMillerComplex.
Note that this resolution is not necessarily minimal (for facets it is).

For details see

J. Boehm, S. Papadakis: Stellar subdivisions and Stanley-Reisner rings of
Gorenstein complexes, http://arxiv.org/abs/0912.2151

(1) The simplest example:

Consider the stellar subdivision of the edge \{x_1,x_2\}\  of the triangle with
vertices x_1,x_2,x_3. The new vertex is x_4 and z_1 is the base of the
unprojection deformation.

+-------------------------------------------+
|i1 : K=QQ;                                 |
+-------------------------------------------+
|i2 : R=K[x_1..x_3,z_1];                    |
+-------------------------------------------+
|i3 : I=ideal(x_1*x_2*x_3)                  |
|                                           |
|o3 = ideal(x x x )                         |
|            1 2 3                          |
|                                           |
|o3 : Ideal of R                            |
+-------------------------------------------+
|i4 : Ilink=I:ideal(x_1*x_2)                |
|                                           |
|o4 = ideal x                               |
|            3                              |
|                                           |
|o4 : Ideal of R                            |
+-------------------------------------------+
|i5 : J=Ilink+ideal(z_1)                    |
|                                           |
|o5 = ideal (x , z )                        |
|             3   1                         |
|                                           |
|o5 : Ideal of R                            |
+-------------------------------------------+
|i6 : cI=res I                              |
|                                           |
|      1      1                             |
|o6 = R  <-- R  <-- 0                       |
|                                           |
|     0      1      2                       |
|                                           |
|o6 : ChainComplex                          |
+-------------------------------------------+
|i7 : betti cI                              |
|                                           |
|            0 1                            |
|o7 = total: 1 1                            |
|         0: 1 .                            |
|         1: . .                            |
|         2: . 1                            |
|                                           |
|o7 : BettiTally                            |
+-------------------------------------------+
|i8 : cJ=res J                              |
|                                           |
|      1      2      1                      |
|o8 = R  <-- R  <-- R  <-- 0                |
|                                           |
|     0      1      2      3                |
|                                           |
|o8 : ChainComplex                          |
+-------------------------------------------+
|i9 : betti cJ                              |
|                                           |
|            0 1 2                          |
|o9 = total: 1 2 1                          |
|         0: 1 2 1                          |
|                                           |
|o9 : BettiTally                            |
+-------------------------------------------+
|i10 : cc=kustinMillerComplex(cI,cJ,K[x_4]);|
+-------------------------------------------+
|i11 : S=ring cc                            |
|                                           |
|o11 = S                                    |
|                                           |
|o11 : PolynomialRing                       |
+-------------------------------------------+
|i12 : cc                                   |
|                                           |
|       1      2      1                     |
|o12 = S  <-- S  <-- S                      |
|                                           |
|      0      1      2                      |
|                                           |
|o12 : ChainComplex                         |
+-------------------------------------------+
|i13 : betti cc                             |
|                                           |
|             0 1 2                         |
|o13 = total: 1 2 1                         |
|          0: 1 . .                         |
|          1: . 2 .                         |
|          2: . . 1                         |
|                                           |
|o13 : BettiTally                           |
+-------------------------------------------+
|i14 : isExactRes cc                        |
|                                           |
|o14 = true                                 |
+-------------------------------------------+
|i15 : cc.dd_1                              |
|                                           |
|o15 = | x_4x_3 -x_1x_2+x_4z_1 |            |
|                                           |
|              1       2                    |
|o15 : Matrix S  <--- S                     |
+-------------------------------------------+
|i16 : cc.dd_2                              |
|                                           |
|o16 = {2} | -x_1x_2+x_4z_1 |               |
|      {2} | -x_4x_3        |               |
|                                           |
|              2       1                    |
|o16 : Matrix S  <--- S                     |
+-------------------------------------------+

Obviously the ideal resolved by the Kustin-Miller complex at the special fiber
z_1=0 is the Stanley-Reisner ideal of the stellar subdivision (i.e., of a
4-gon).

(2) Stellar subdivision of the facet \{x_1,x_2,x_4,x_6\}\  of the simplicial
complex associated to the complete intersection (x_1*x_2*x_3, x_4*x_5*x_6). The
result is a Pfaffian:

+---------------------------------------------------------------------+
|i17 : R=K[x_1..x_6,z_1..z_3];                                        |
+---------------------------------------------------------------------+
|i18 : I=ideal(x_1*x_2*x_3,x_4*x_5*x_6)                               |
|                                                                     |
|o18 = ideal (x x x , x x x )                                         |
|              1 2 3   4 5 6                                          |
|                                                                     |
|o18 : Ideal of R                                                     |
+---------------------------------------------------------------------+
|i19 : Ilink=I:ideal(x_1*x_2*x_4*x_6)                                 |
|                                                                     |
|o19 = ideal (x , x )                                                 |
|              5   3                                                  |
|                                                                     |
|o19 : Ideal of R                                                     |
+---------------------------------------------------------------------+
|i20 : J=Ilink+ideal(z_1*z_2*z_3)                                     |
|                                                                     |
|o20 = ideal (x , x , z z z )                                         |
|              5   3   1 2 3                                          |
|                                                                     |
|o20 : Ideal of R                                                     |
+---------------------------------------------------------------------+
|i21 : cI=res I                                                       |
|                                                                     |
|       1      2      1                                               |
|o21 = R  <-- R  <-- R  <-- 0                                         |
|                                                                     |
|      0      1      2      3                                         |
|                                                                     |
|o21 : ChainComplex                                                   |
+---------------------------------------------------------------------+
|i22 : betti cI                                                       |
|                                                                     |
|             0 1 2                                                   |
|o22 = total: 1 2 1                                                   |
|          0: 1 . .                                                   |
|          1: . . .                                                   |
|          2: . 2 .                                                   |
|          3: . . .                                                   |
|          4: . . 1                                                   |
|                                                                     |
|o22 : BettiTally                                                     |
+---------------------------------------------------------------------+
|i23 : cJ=res J                                                       |
|                                                                     |
|       1      3      3      1                                        |
|o23 = R  <-- R  <-- R  <-- R  <-- 0                                  |
|                                                                     |
|      0      1      2      3      4                                  |
|                                                                     |
|o23 : ChainComplex                                                   |
+---------------------------------------------------------------------+
|i24 : betti cJ                                                       |
|                                                                     |
|             0 1 2 3                                                 |
|o24 = total: 1 3 3 1                                                 |
|          0: 1 2 1 .                                                 |
|          1: . . . .                                                 |
|          2: . 1 2 1                                                 |
|                                                                     |
|o24 : BettiTally                                                     |
+---------------------------------------------------------------------+
|i25 : cc=kustinMillerComplex(cI,cJ,K[x_7]);                          |
+---------------------------------------------------------------------+
|i26 : S=ring cc                                                      |
|                                                                     |
|o26 = S                                                              |
|                                                                     |
|o26 : PolynomialRing                                                 |
+---------------------------------------------------------------------+
|i27 : cc                                                             |
|                                                                     |
|       1      5      5      1                                        |
|o27 = S  <-- S  <-- S  <-- S                                         |
|                                                                     |
|      0      1      2      3                                         |
|                                                                     |
|o27 : ChainComplex                                                   |
+---------------------------------------------------------------------+
|i28 : betti cc                                                       |
|                                                                     |
|             0 1 2 3                                                 |
|o28 = total: 1 5 5 1                                                 |
|          0: 1 . . .                                                 |
|          1: . 2 1 .                                                 |
|          2: . 2 2 .                                                 |
|          3: . 1 2 .                                                 |
|          4: . . . 1                                                 |
|                                                                     |
|o28 : BettiTally                                                     |
+---------------------------------------------------------------------+
|i29 : isExactRes cc                                                  |
|                                                                     |
|o29 = true                                                           |
+---------------------------------------------------------------------+
|i30 : cc.dd_1                                                        |
|                                                                     |
|o30 = | x_1x_2x_3 x_4x_5x_6 x_7x_3 x_7x_5 x_1x_2x_4x_6+x_7z_1z_2z_3 ||
|                                                                     |
|              1       5                                              |
|o30 : Matrix S  <--- S                                               |
+---------------------------------------------------------------------+
|i31 : cc.dd_2                                                        |
|                                                                     |
|o31 = {3} | 0    x_4x_6    0         x_7     0       |               |
|      {3} | 0    0         x_1x_2    0       x_7     |               |
|      {2} | x_5  z_1z_2z_3 0         -x_1x_2 0       |               |
|      {2} | -x_3 0         z_1z_2z_3 0       -x_4x_6 |               |
|      {4} | 0    -x_3      -x_5      0       0       |               |
|                                                                     |
|              5       5                                              |
|o31 : Matrix S  <--- S                                               |
+---------------------------------------------------------------------+
|i32 : cc.dd_3                                                        |
|                                                                     |
|o32 = {3} | -x_1x_2x_4x_6-x_7z_1z_2z_3 |                             |
|      {5} | x_7x_5                     |                             |
|      {5} | -x_7x_3                    |                             |
|      {4} | -x_4x_5x_6                 |                             |
|      {4} | x_1x_2x_3                  |                             |
|                                                                     |
|              5       1                                              |
|o32 : Matrix S  <--- S                                               |
+---------------------------------------------------------------------+

We compare with the combinatorics, i.e., check that the ideal resolved by the
Kustin Miller complex at the special fiber is the Stanley-Reisner ideal of the
stellar subdivision:

+-----------------------------------------------------------------------------+
|i33 : R=K[x_1..x_6];                                                         |
+-----------------------------------------------------------------------------+
|i34 : C=simplicialComplex monomialIdeal(x_1*x_2*x_3,x_4*x_5*x_6)             |
|                                                                             |
|o34 = simplicialComplex | x_2x_3x_5x_6 x_1x_3x_5x_6 x_1x_2x_5x_6 x_2x_3x_4x_6|
|                                                                             |
|o34 : SimplicialComplex                                                      |
|-----------------------------------------------------------------------------|
|x_1x_3x_4x_6 x_1x_2x_4x_6 x_2x_3x_4x_5 x_1x_3x_4x_5 x_1x_2x_4x_5 |           |
+-----------------------------------------------------------------------------+
|i35 : fVector C                                                              |
|                                                                             |
|o35 = {1, 6, 15, 18, 9}                                                      |
|                                                                             |
|o35 : List                                                                   |
+-----------------------------------------------------------------------------+
|i36 : F=face {x_1,x_2,x_4,x_6}                                               |
|                                                                             |
|o36 = x  x  x  x                                                             |
|       1  2  4  6                                                            |
|                                                                             |
|o36 : face with 4 vertices in R                                              |
+-----------------------------------------------------------------------------+
|i37 : R'=K[x_1..x_7];                                                        |
+-----------------------------------------------------------------------------+
|i38 : C'=substitute(stellarSubdivision(C,F,K[x_7]),R')                       |
|                                                                             |
|o38 = simplicialComplex | x_2x_4x_6x_7 x_1x_4x_6x_7 x_1x_2x_6x_7 x_1x_2x_4x_7|
|                                                                             |
|o38 : SimplicialComplex                                                      |
|-----------------------------------------------------------------------------|
|x_2x_3x_5x_6 x_1x_3x_5x_6 x_1x_2x_5x_6 x_2x_3x_4x_6 x_1x_3x_4x_6 x_2x_3x_4x_5|
|-----------------------------------------------------------------------------|
|x_1x_3x_4x_5 x_1x_2x_4x_5 |                                                  |
+-----------------------------------------------------------------------------+
|i39 : fVector C'                                                             |
|                                                                             |
|o39 = {1, 7, 19, 24, 12}                                                     |
|                                                                             |
|o39 : List                                                                   |
+-----------------------------------------------------------------------------+
|i40 : I'=monomialIdeal(sub(cc.dd_1,R'))                                      |
|                                                                             |
|o40 = monomialIdeal (x x x , x x x x , x x x , x x , x x )                   |
|                      1 2 3   1 2 4 6   4 5 6   3 7   5 7                    |
|                                                                             |
|o40 : MonomialIdeal of R'                                                    |
+-----------------------------------------------------------------------------+
|i41 : C'===simplicialComplex I'                                              |
|                                                                             |
|o41 = true                                                                   |
+-----------------------------------------------------------------------------+

One observes that in this case the resulting complex is minimal This is always
true for stellars of facets.

(3) Stellar subdivision of an edge:

+-----------------------------------------------------------------------------+
|i42 : R=K[x_1..x_5,z_1];                                                     |
+-----------------------------------------------------------------------------+
|i43 : I=monomialIdeal(x_1*x_2*x_3,x_4*x_5)                                   |
|                                                                             |
|o43 = monomialIdeal (x x x , x x )                                           |
|                      1 2 3   4 5                                            |
|                                                                             |
|o43 : MonomialIdeal of R                                                     |
+-----------------------------------------------------------------------------+
|i44 : C=simplicialComplex I                                                  |
|                                                                             |
|o44 = simplicialComplex | x_2x_3x_5z_1 x_1x_3x_5z_1 x_1x_2x_5z_1 x_2x_3x_4z_1|
|                                                                             |
|o44 : SimplicialComplex                                                      |
|-----------------------------------------------------------------------------|
|x_1x_3x_4z_1 x_1x_2x_4z_1 |                                                  |
+-----------------------------------------------------------------------------+
|i45 : fVector C                                                              |
|                                                                             |
|o45 = {1, 6, 14, 15, 6}                                                      |
|                                                                             |
|o45 : List                                                                   |
+-----------------------------------------------------------------------------+
|i46 : F=face {x_1,x_2}                                                       |
|                                                                             |
|o46 = x  x                                                                   |
|       1  2                                                                  |
|                                                                             |
|o46 : face with 2 vertices in R                                              |
+-----------------------------------------------------------------------------+
|i47 : Ilink=I:ideal(product vertices F)                                      |
|                                                                             |
|o47 = monomialIdeal (x , x x )                                               |
|                      3   4 5                                                |
|                                                                             |
|o47 : MonomialIdeal of R                                                     |
+-----------------------------------------------------------------------------+
|i48 : J=Ilink+ideal(z_1)                                                     |
|                                                                             |
|o48 = ideal (x , x x , z )                                                   |
|              3   4 5   1                                                    |
|                                                                             |
|o48 : Ideal of R                                                             |
+-----------------------------------------------------------------------------+
|i49 : cI=res I                                                               |
|                                                                             |
|       1      2      1                                                       |
|o49 = R  <-- R  <-- R  <-- 0                                                 |
|                                                                             |
|      0      1      2      3                                                 |
|                                                                             |
|o49 : ChainComplex                                                           |
+-----------------------------------------------------------------------------+
|i50 : betti cI                                                               |
|                                                                             |
|             0 1 2                                                           |
|o50 = total: 1 2 1                                                           |
|          0: 1 . .                                                           |
|          1: . 1 .                                                           |
|          2: . 1 .                                                           |
|          3: . . 1                                                           |
|                                                                             |
|o50 : BettiTally                                                             |
+-----------------------------------------------------------------------------+
|i51 : cJ=res J                                                               |
|                                                                             |
|       1      3      3      1                                                |
|o51 = R  <-- R  <-- R  <-- R  <-- 0                                          |
|                                                                             |
|      0      1      2      3      4                                          |
|                                                                             |
|o51 : ChainComplex                                                           |
+-----------------------------------------------------------------------------+
|i52 : betti cJ                                                               |
|                                                                             |
|             0 1 2 3                                                         |
|o52 = total: 1 3 3 1                                                         |
|          0: 1 2 1 .                                                         |
|          1: . 1 2 1                                                         |
|                                                                             |
|o52 : BettiTally                                                             |
+-----------------------------------------------------------------------------+
|i53 : cc=kustinMillerComplex(cI,cJ,K[x_6]);                                  |
+-----------------------------------------------------------------------------+
|i54 : S=ring cc                                                              |
|                                                                             |
|o54 = S                                                                      |
|                                                                             |
|o54 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i55 : cc                                                                     |
|                                                                             |
|       1      5      5      1                                                |
|o55 = S  <-- S  <-- S  <-- S                                                 |
|                                                                             |
|      0      1      2      3                                                 |
|                                                                             |
|o55 : ChainComplex                                                           |
+-----------------------------------------------------------------------------+
|i56 : betti cc                                                               |
|                                                                             |
|             0 1 2 3                                                         |
|o56 = total: 1 5 5 1                                                         |
|          0: 1 . . .                                                         |
|          1: . 3 2 .                                                         |
|          2: . 2 3 .                                                         |
|          3: . . . 1                                                         |
|                                                                             |
|o56 : BettiTally                                                             |
+-----------------------------------------------------------------------------+
|i57 : isExactRes cc                                                          |
|                                                                             |
|o57 = true                                                                   |
+-----------------------------------------------------------------------------+
|i58 : cc.dd_1                                                                |
|                                                                             |
|o58 = | x_4x_5 x_1x_2x_3 x_6x_3 x_1x_2+x_6z_1 x_6x_4x_5 |                    |
|                                                                             |
|              1       5                                                      |
|o58 : Matrix S  <--- S                                                       |
+-----------------------------------------------------------------------------+
|i59 : cc.dd_2                                                                |
|                                                                             |
|o59 = {2} | 0    0      -x_1x_2 x_6 0       |                                |
|      {3} | 1    0      0       0   x_6     |                                |
|      {2} | z_1  x_4x_5 0       0   -x_1x_2 |                                |
|      {2} | -x_3 0      x_4x_5  0   0       |                                |
|      {3} | 0    -x_3   -z_1    -1  0       |                                |
|                                                                             |
|              5       5                                                      |
|o59 : Matrix S  <--- S                                                       |
+-----------------------------------------------------------------------------+
|i60 : cc.dd_3                                                                |
|                                                                             |
|o60 = {3} | -x_6x_4x_5    |                                                  |
|      {4} | x_1x_2+x_6z_1 |                                                  |
|      {4} | -x_6x_3       |                                                  |
|      {3} | -x_1x_2x_3    |                                                  |
|      {4} | x_4x_5        |                                                  |
|                                                                             |
|              5       1                                                      |
|o60 : Matrix S  <--- S                                                       |
+-----------------------------------------------------------------------------+

(4) Starting out with the Pfaffian elliptic curve:

+------------------------------------------------------+
|i61 : R=K[x_1..x_5,z_1];                              |
+------------------------------------------------------+
|i62 : I=ideal(x_1*x_2,x_2*x_3,x_3*x_4,x_4*x_5,x_5*x_1)|
|                                                      |
|o62 = ideal (x x , x x , x x , x x , x x )            |
|              1 2   2 3   3 4   4 5   1 5             |
|                                                      |
|o62 : Ideal of R                                      |
+------------------------------------------------------+
|i63 : Ilink=I:ideal(x_1*x_3)                          |
|                                                      |
|o63 = ideal (x , x , x )                              |
|              5   4   2                               |
|                                                      |
|o63 : Ideal of R                                      |
+------------------------------------------------------+
|i64 : J=Ilink+ideal(z_1)                              |
|                                                      |
|o64 = ideal (x , x , x , z )                          |
|              5   4   2   1                           |
|                                                      |
|o64 : Ideal of R                                      |
+------------------------------------------------------+
|i65 : cI=res I                                        |
|                                                      |
|       1      5      5      1                         |
|o65 = R  <-- R  <-- R  <-- R  <-- 0                   |
|                                                      |
|      0      1      2      3      4                   |
|                                                      |
|o65 : ChainComplex                                    |
+------------------------------------------------------+
|i66 : betti cI                                        |
|                                                      |
|             0 1 2 3                                  |
|o66 = total: 1 5 5 1                                  |
|          0: 1 . . .                                  |
|          1: . 5 5 .                                  |
|          2: . . . 1                                  |
|                                                      |
|o66 : BettiTally                                      |
+------------------------------------------------------+
|i67 : cJ=res J                                        |
|                                                      |
|       1      4      6      4      1                  |
|o67 = R  <-- R  <-- R  <-- R  <-- R  <-- 0            |
|                                                      |
|      0      1      2      3      4      5            |
|                                                      |
|o67 : ChainComplex                                    |
+------------------------------------------------------+
|i68 : betti cJ                                        |
|                                                      |
|             0 1 2 3 4                                |
|o68 = total: 1 4 6 4 1                                |
|          0: 1 4 6 4 1                                |
|                                                      |
|o68 : BettiTally                                      |
+------------------------------------------------------+
|i69 : cc=kustinMillerComplex(cI,cJ,K[x_10]);          |
+------------------------------------------------------+
|i70 : betti cc                                        |
|                                                      |
|             0 1  2 3 4                               |
|o70 = total: 1 9 16 9 1                               |
|          0: 1 .  . . .                               |
|          1: . 9 16 9 .                               |
|          2: . .  . . 1                               |
|                                                      |
|o70 : BettiTally                                      |
+------------------------------------------------------+

(5) One more example of a stellar subdivision of an edge starting with a
codimension 4 complete intersection:

+----------------------------------------------------------+
|i71 : R=K[x_1..x_9,z_1];                                  |
+----------------------------------------------------------+
|i72 : I=monomialIdeal(x_1*x_2,x_3*x_4,x_5*x_6,x_7*x_8*x_9)|
|                                                          |
|o72 = monomialIdeal (x x , x x , x x , x x x )            |
|                      1 2   3 4   5 6   7 8 9             |
|                                                          |
|o72 : MonomialIdeal of R                                  |
+----------------------------------------------------------+
|i73 : Ilink=I:ideal(x_1*x_3)                              |
|                                                          |
|o73 = monomialIdeal (x , x , x x , x x x )                |
|                      2   4   5 6   7 8 9                 |
|                                                          |
|o73 : MonomialIdeal of R                                  |
+----------------------------------------------------------+
|i74 : J=Ilink+ideal(z_1)                                  |
|                                                          |
|o74 = ideal (x , x , x x , x x x , z )                    |
|              2   4   5 6   7 8 9   1                     |
|                                                          |
|o74 : Ideal of R                                          |
+----------------------------------------------------------+
|i75 : cI=res I                                            |
|                                                          |
|       1      4      6      4      1                      |
|o75 = R  <-- R  <-- R  <-- R  <-- R  <-- 0                |
|                                                          |
|      0      1      2      3      4      5                |
|                                                          |
|o75 : ChainComplex                                        |
+----------------------------------------------------------+
|i76 : betti cI                                            |
|                                                          |
|             0 1 2 3 4                                    |
|o76 = total: 1 4 6 4 1                                    |
|          0: 1 . . . .                                    |
|          1: . 3 . . .                                    |
|          2: . 1 3 . .                                    |
|          3: . . 3 1 .                                    |
|          4: . . . 3 .                                    |
|          5: . . . . 1                                    |
|                                                          |
|o76 : BettiTally                                          |
+----------------------------------------------------------+
|i77 : cJ=res J                                            |
|                                                          |
|       1      5      10      10      5      1             |
|o77 = R  <-- R  <-- R   <-- R   <-- R  <-- R  <-- 0       |
|                                                          |
|      0      1      2       3       4      5      6       |
|                                                          |
|o77 : ChainComplex                                        |
+----------------------------------------------------------+
|i78 : betti cJ                                            |
|                                                          |
|             0 1  2  3 4 5                                |
|o78 = total: 1 5 10 10 5 1                                |
|          0: 1 3  3  1 . .                                |
|          1: . 1  3  3 1 .                                |
|          2: . 1  3  3 1 .                                |
|          3: . .  1  3 3 1                                |
|                                                          |
|o78 : BettiTally                                          |
+----------------------------------------------------------+
|i79 : cc=kustinMillerComplex(cI,cJ,K[x_10]);              |
+----------------------------------------------------------+
|i80 : S=ring cc;                                          |
+----------------------------------------------------------+
|i81 : cc                                                  |
|                                                          |
|       1      9      20      20      9      1             |
|o81 = S  <-- S  <-- S   <-- S   <-- S  <-- S              |
|                                                          |
|      0      1      2       3       4      5              |
|                                                          |
|o81 : ChainComplex                                        |
+----------------------------------------------------------+
|i82 : betti cc                                            |
|                                                          |
|             0 1  2  3 4 5                                |
|o82 = total: 1 9 20 20 9 1                                |
|          0: 1 .  .  . . .                                |
|          1: . 6  6  1 . .                                |
|          2: . 2  7  6 1 .                                |
|          3: . 1  6  7 2 .                                |
|          4: . .  1  6 6 .                                |
|          5: . .  .  . . 1                                |
|                                                          |
|o82 : BettiTally                                          |
+----------------------------------------------------------+

We compare again with the combinatorics:

+-----------------------------------------------------------------------------+
|i83 : R=K[x_1..x_9];                                                         |
+-----------------------------------------------------------------------------+
|i84 : C=simplicialComplex monomialIdeal(sub(I,R))                            |
|                                                                             |
|o84 = simplicialComplex | x_2x_4x_6x_8x_9 x_1x_4x_6x_8x_9 x_2x_3x_6x_8x_9    |
|                                                                             |
|o84 : SimplicialComplex                                                      |
|-----------------------------------------------------------------------------|
|x_1x_3x_6x_8x_9 x_2x_4x_5x_8x_9 x_1x_4x_5x_8x_9 x_2x_3x_5x_8x_9              |
|-----------------------------------------------------------------------------|
|x_1x_3x_5x_8x_9 x_2x_4x_6x_7x_9 x_1x_4x_6x_7x_9 x_2x_3x_6x_7x_9              |
|-----------------------------------------------------------------------------|
|x_1x_3x_6x_7x_9 x_2x_4x_5x_7x_9 x_1x_4x_5x_7x_9 x_2x_3x_5x_7x_9              |
|-----------------------------------------------------------------------------|
|x_1x_3x_5x_7x_9 x_2x_4x_6x_7x_8 x_1x_4x_6x_7x_8 x_2x_3x_6x_7x_8              |
|-----------------------------------------------------------------------------|
|x_1x_3x_6x_7x_8 x_2x_4x_5x_7x_8 x_1x_4x_5x_7x_8 x_2x_3x_5x_7x_8              |
|-----------------------------------------------------------------------------|
|x_1x_3x_5x_7x_8 |                                                            |
+-----------------------------------------------------------------------------+
|i85 : fVector C                                                              |
|                                                                             |
|o85 = {1, 9, 33, 62, 60, 24}                                                 |
|                                                                             |
|o85 : List                                                                   |
+-----------------------------------------------------------------------------+
|i86 : F=face {x_1,x_3}                                                       |
|                                                                             |
|o86 = x  x                                                                   |
|       1  3                                                                  |
|                                                                             |
|o86 : face with 2 vertices in R                                              |
+-----------------------------------------------------------------------------+
|i87 : R'=K[x_1..x_10];                                                       |
+-----------------------------------------------------------------------------+
|i88 : C'=substitute(stellarSubdivision(C,F,K[x_10]),R')                      |
|                                                                             |
|o88 = simplicialComplex | x_3x_6x_8x_9x_10 x_1x_6x_8x_9x_10 x_3x_5x_8x_9x_10 |
|                                                                             |
|o88 : SimplicialComplex                                                      |
|-----------------------------------------------------------------------------|
|x_1x_5x_8x_9x_10 x_3x_6x_7x_9x_10 x_1x_6x_7x_9x_10 x_3x_5x_7x_9x_10          |
|-----------------------------------------------------------------------------|
|x_1x_5x_7x_9x_10 x_3x_6x_7x_8x_10 x_1x_6x_7x_8x_10 x_3x_5x_7x_8x_10          |
|-----------------------------------------------------------------------------|
|x_1x_5x_7x_8x_10 x_2x_4x_6x_8x_9 x_1x_4x_6x_8x_9 x_2x_3x_6x_8x_9             |
|-----------------------------------------------------------------------------|
|x_2x_4x_5x_8x_9 x_1x_4x_5x_8x_9 x_2x_3x_5x_8x_9 x_2x_4x_6x_7x_9              |
|-----------------------------------------------------------------------------|
|x_1x_4x_6x_7x_9 x_2x_3x_6x_7x_9 x_2x_4x_5x_7x_9 x_1x_4x_5x_7x_9              |
|-----------------------------------------------------------------------------|
|x_2x_3x_5x_7x_9 x_2x_4x_6x_7x_8 x_1x_4x_6x_7x_8 x_2x_3x_6x_7x_8              |
|-----------------------------------------------------------------------------|
|x_2x_4x_5x_7x_8 x_1x_4x_5x_7x_8 x_2x_3x_5x_7x_8 |                            |
+-----------------------------------------------------------------------------+
|i89 : fVector C'                                                             |
|                                                                             |
|o89 = {1, 10, 39, 76, 75, 30}                                                |
|                                                                             |
|o89 : List                                                                   |
+-----------------------------------------------------------------------------+
|i90 : I'=monomialIdeal(sub(cc.dd_1,R'))                                      |
|                                                                             |
|o90 = monomialIdeal (x x , x x , x x , x x , x x x , x x  , x x  )           |
|                      1 2   1 3   3 4   5 6   7 8 9   2 10   4 10            |
|                                                                             |
|o90 : MonomialIdeal of R'                                                    |
+-----------------------------------------------------------------------------+
|i91 : C'===simplicialComplex I'                                              |
|                                                                             |
|o91 = true                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * kustinMillerComplex -- Compute Kustin-Miller
    resolution of the unprojection of I in J
  * resolution (Macaulay2Doc) -- projective resolution
  * betti (Macaulay2Doc) -- display or modify a Betti diagram

stellarSubdivision -- Compute the stellar subdivision of a simplicial complex.
******************************************************************************

Synopsis
========

  * Usage:
        stellarSubdivision(D,F,S)
  * Inputs:
      * D, an abstract simplicial complex (SimplicialComplexes),
        a simplicial complex on the
        variables of the polynomial ring R.
      * F, an instance of the type Face, a face of D
      * S, a polynomial ring (Macaulay2Doc), a polynomial
        ring in one variable corresponding to the new vertex
  * Outputs:
      * an abstract simplicial complex (SimplicialComplexes),
        the stellar subdivision of D
        with respect to F and S

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

Computes the stellar subdivision of a simplicial complex D by subdividing the
face F with a new vertex corresponding to the variable of S. The result is a
complex on the variables of R \otimes S. It is a subcomplex of the simplex on
the variables of R \otimes S.

+--------------------------------------------------------------------+
|i1 : R=QQ[x_0..x_4];                                                |
+--------------------------------------------------------------------+
|i2 : I=monomialIdeal(x_0*x_1,x_1*x_2,x_2*x_3,x_3*x_4,x_4*x_0);      |
|                                                                    |
|o2 : MonomialIdeal of R                                             |
+--------------------------------------------------------------------+
|i3 : betti res I                                                    |
|                                                                    |
|            0 1 2 3                                                 |
|o3 = total: 1 5 5 1                                                 |
|         0: 1 . . .                                                 |
|         1: . 5 5 .                                                 |
|         2: . . . 1                                                 |
|                                                                    |
|o3 : BettiTally                                                     |
+--------------------------------------------------------------------+
|i4 : D=simplicialComplex I                                          |
|                                                                    |
|o4 = simplicialComplex | x_2x_4 x_1x_4 x_1x_3 x_0x_3 x_0x_2 |       |
|                                                                    |
|o4 : SimplicialComplex                                              |
+--------------------------------------------------------------------+
|i5 : fc=facets(D) / face                                            |
|                                                                    |
|o5 = {x  x  , x  x  , x  x  , x  x  , x  x  }                       |
|       2  4    1  4    1  3    0  3    0  2                         |
|                                                                    |
|o5 : List                                                           |
+--------------------------------------------------------------------+
|i6 : S=QQ[x_5]                                                      |
|                                                                    |
|o6 = S                                                              |
|                                                                    |
|o6 : PolynomialRing                                                 |
+--------------------------------------------------------------------+
|i7 : D5=stellarSubdivision(D,fc#0,S)                                |
|                                                                    |
|o7 = simplicialComplex | x_4x_5 x_2x_5 x_1x_4 x_1x_3 x_0x_3 x_0x_2 ||
|                                                                    |
|o7 : SimplicialComplex                                              |
+--------------------------------------------------------------------+
|i8 : I5=ideal D5                                                    |
|                                                                    |
|o8 = ideal (x x , x x , x x , x x , x x , x x , x x , x x , x x )   |
|             0 1   1 2   2 3   0 4   2 4   3 4   0 5   1 5   3 5    |
|                                                                    |
|o8 : Ideal of QQ[x ..x ]                                            |
|                  0   5                                             |
+--------------------------------------------------------------------+
|i9 : betti res I5                                                   |
|                                                                    |
|            0 1  2 3 4                                              |
|o9 = total: 1 9 16 9 1                                              |
|         0: 1 .  . . .                                              |
|         1: . 9 16 9 .                                              |
|         2: . .  . . 1                                              |
|                                                                    |
|o9 : BettiTally                                                     |
+--------------------------------------------------------------------+

+-----------------------------------------------------------------------------+
|i10 : R=QQ[x_1..x_6]                                                         |
|                                                                             |
|o10 = R                                                                      |
|                                                                             |
|o10 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i11 : I=monomialIdeal product gens R                                         |
|                                                                             |
|o11 = monomialIdeal(x x x x x x )                                            |
|                     1 2 3 4 5 6                                             |
|                                                                             |
|o11 : MonomialIdeal of R                                                     |
+-----------------------------------------------------------------------------+
|i12 : D=simplicialComplex I                                                  |
|                                                                             |
|o12 = simplicialComplex | x_2x_3x_4x_5x_6 x_1x_3x_4x_5x_6 x_1x_2x_4x_5x_6    |
|                                                                             |
|o12 : SimplicialComplex                                                      |
|-----------------------------------------------------------------------------|
|x_1x_2x_3x_5x_6 x_1x_2x_3x_4x_6 x_1x_2x_3x_4x_5 |                            |
+-----------------------------------------------------------------------------+
|i13 : S=QQ[x_7]                                                              |
|                                                                             |
|o13 = S                                                                      |
|                                                                             |
|o13 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i14 : Dsigma=stellarSubdivision(D,face {x_1,x_2,x_3},S)                      |
|                                                                             |
|o14 = simplicialComplex | x_2x_3x_5x_6x_7 x_1x_3x_5x_6x_7 x_1x_2x_5x_6x_7    |
|                                                                             |
|o14 : SimplicialComplex                                                      |
|-----------------------------------------------------------------------------|
|x_2x_3x_4x_6x_7 x_1x_3x_4x_6x_7 x_1x_2x_4x_6x_7 x_2x_3x_4x_5x_7              |
|-----------------------------------------------------------------------------|
|x_1x_3x_4x_5x_7 x_1x_2x_4x_5x_7 x_2x_3x_4x_5x_6 x_1x_3x_4x_5x_6              |
|-----------------------------------------------------------------------------|
|x_1x_2x_4x_5x_6 |                                                            |
+-----------------------------------------------------------------------------+
|i15 : betti res ideal Dsigma                                                 |
|                                                                             |
|             0 1 2                                                           |
|o15 = total: 1 2 1                                                           |
|          0: 1 . .                                                           |
|          1: . . .                                                           |
|          2: . 1 .                                                           |
|          3: . 1 .                                                           |
|          4: . . .                                                           |
|          5: . . 1                                                           |
|                                                                             |
|o15 : BettiTally                                                             |
+-----------------------------------------------------------------------------+

See also
========

  * simplicialComplex (SimplicialComplexes),
    -- make an abstract simplicial complex from a list of faces
  * facets (Polyhedra) -- Giving the facet inequalities of a cone
    or polyhedron.
  * ideal (Macaulay2Doc) -- make an ideal

Ways to use stellarSubdivision :
================================

  * "stellarSubdivision(Fan,Matrix)" -- see stellarSubdivision (Polyhedra),
    -- computes the stellar subdivision of the
    fan by a ray
  * "stellarSubdivision(SimplicialComplex,Face,PolynomialRing)"

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

The object stellarSubdivision (Polyhedra), is a
method function (Macaulay2Doc).

substitute(ChainComplex,Ring) -- Substitute a chain complex to a new ring.
**************************************************************************

Synopsis
========

  * Function: substitute (Macaulay2Doc),
  * Usage:
        substitute(cc,R)
  * Inputs:
      * cc, a chain complex (Macaulay2Doc),
      * R, a ring (Macaulay2Doc),
  * Outputs:
      * a chain complex (Macaulay2Doc),

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

Substitute a chain complex cc to a new ring R.

+------------------------------------------------------------+
|i1 : R=QQ[x_1..x_4,z_1];                                    |
+------------------------------------------------------------+
|i2 : cc=res ideal(x_4*x_3, -x_1*x_2+x_4*z_1);               |
+------------------------------------------------------------+
|i3 : cs=substitute(cc,QQ[x_1..x_4])                         |
|                                                            |
|                 1                 2                 1      |
|o3 = (QQ[x ..x ])  <-- (QQ[x ..x ])  <-- (QQ[x ..x ])  <-- 0|
|          1   4             1   4             1   4         |
|                                                           3|
|     0                 1                 2                  |
|                                                            |
|o3 : ChainComplex                                           |
+------------------------------------------------------------+
|i4 : cs.dd_1                                                |
|                                                            |
|o4 = | x_1x_2 x_3x_4 |                                      |
|                                                            |
|                        1                  2                |
|o4 : Matrix (QQ[x ..x ])  <--- (QQ[x ..x ])                 |
|                 1   4              1   4                   |
+------------------------------------------------------------+

See also
========

  * substitute (Macaulay2Doc) -- substituting values for
    variables

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

  * substitute(ChainComplex,Ring),
    -- Substitute a chain complex to a new ring.

substitute(Face,PolynomialRing) -- Substitute a face to a different ring.
*************************************************************************

Synopsis
========

  * Function: substitute (Macaulay2Doc),
  * Usage:
        substituteFace(F,R)
  * Inputs:
      * F, an instance of the type Face,
      * R, a polynomial ring (Macaulay2Doc),
  * Outputs:
      * an instance of the type Face,

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

Substitute a face to a different ring.

+------------------------------+
|i1 : K=QQ;                    |
+------------------------------+
|i2 : R=K[x_0..x_4];           |
+------------------------------+
|i3 : F=face {x_0,x_1,x_2}     |
|                              |
|o3 = x  x  x                  |
|      0  1  2                 |
|                              |
|o3 : face with 3 vertices in R|
+------------------------------+
|i4 : S=R**K[y]                |
|                              |
|o4 = S                        |
|                              |
|o4 : PolynomialRing           |
+------------------------------+
|i5 : substitute(F,S)          |
|                              |
|o5 = x  x  x                  |
|      0  1  2                 |
|                              |
|o5 : face with 3 vertices in S|
+------------------------------+

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

  * substitute(Face,PolynomialRing)
    -- Substitute a face to a different
    ring.

Tom -- The Kustin-Miller complex for Tom
****************************************

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

The Kustin-Miller complex construction for the Tom example which can be found
in Section 5.5 of

Papadakis, Kustin-Miller unprojection with complexes,  J. Algebraic Geometry 13
(2004) 249-268, http://arxiv.org/abs/math/0111195

Here we pass from a Pfaffian to a codimension 4 variety.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x_1..x_4,z_1..z_4]                                               |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : b2 = matrix {{0,x_1,x_2,x_3,x_4},{-x_1,0,0,z_1,z_2},{-x_2,0,0,z_3,z_4   |
|                                                                             |
|o2 = | 0    x_1  x_2  x_3 x_4 |                                              |
|     | -x_1 0    0    z_1 z_2 |                                              |
|     | -x_2 0    0    z_3 z_4 |                                              |
|     | -x_3 -z_1 -z_3 0   0   |                                              |
|     | -x_4 -z_2 -z_4 0   0   |                                              |
|                                                                             |
|             5       5                                                       |
|o2 : Matrix R  <--- R                                                        |
|-----------------------------------------------------------------------------|
|},{-x_3,-z_1,-z_3,0,0},{-x_4,-z_2,-z_4,0,0}}                                 |
+-----------------------------------------------------------------------------+
|i3 : betti(cI=resBE b2)                                                      |
|                                                                             |
|            0 1 2 3                                                          |
|o3 = total: 1 5 5 1                                                          |
|         0: 1 . . .                                                          |
|         1: . 5 5 .                                                          |
|         2: . . . 1                                                          |
|                                                                             |
|o3 : BettiTally                                                              |
+-----------------------------------------------------------------------------+
|i4 : b1 = cI.dd_1                                                            |
|                                                                             |
|o4 = | z_2z_3-z_1z_4 -x_4z_3+x_3z_4 x_4z_1-x_3z_2 x_2z_2-x_1z_4              |
|     ------------------------------------------------------------------------|
|     -x_2z_1+x_1z_3 |                                                        |
|                                                                             |
|             1       5                                                       |
|o4 : Matrix R  <--- R                                                        |
+-----------------------------------------------------------------------------+
|i5 : J = ideal (z_1..z_4);                                                   |
|                                                                             |
|o5 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i6 : betti(cJ=res J)                                                         |
|                                                                             |
|            0 1 2 3 4                                                        |
|o6 = total: 1 4 6 4 1                                                        |
|         0: 1 4 6 4 1                                                        |
|                                                                             |
|o6 : BettiTally                                                              |
+-----------------------------------------------------------------------------+
|i7 : betti(cU=kustinMillerComplex(cI,cJ,QQ[T]))                              |
|                                                                             |
|            0 1  2 3 4                                                       |
|o7 = total: 1 9 16 9 1                                                       |
|         0: 1 .  . . .                                                       |
|         1: . 9 16 9 .                                                       |
|         2: . .  . . 1                                                       |
|                                                                             |
|o7 : BettiTally                                                              |
+-----------------------------------------------------------------------------+
|i8 : S=ring cU                                                               |
|                                                                             |
|o8 = S                                                                       |
|                                                                             |
|o8 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i9 : isExactRes cU                                                           |
|                                                                             |
|o9 = true                                                                    |
+-----------------------------------------------------------------------------+
|i10 : print cU.dd_1                                                          |
|| z_2z_3-z_1z_4 -x_4z_3+x_3z_4 x_4z_1-x_3z_2 x_2z_2-x_1z_4 -x_2z_1+x_1z_3    |
|-----------------------------------------------------------------------------|
|-x_1x_3+Tz_1 -x_1x_4+Tz_2 -x_2x_3+Tz_3 -x_2x_4+Tz_4 |                        |
+-----------------------------------------------------------------------------+
|i11 : print cU.dd_2                                                          |
|{2} | 0    x_1  x_2  x_3 x_4 0    0    0    0    0    0    T    0    0       |
|{2} | -x_1 0    0    z_1 z_2 0    0    -x_1 0    0    x_2  0    T    0       |
|{2} | -x_2 0    0    z_3 z_4 -x_1 0    0    -x_2 0    0    0    0    T       |
|{2} | -x_3 -z_1 -z_3 0   0   0    0    -x_3 -x_3 -x_4 0    -x_3 0    0       |
|{2} | -x_4 -z_2 -z_4 0   0   0    x_3  0    0    0    0    0    0    0       |
|{2} | 0    0    0    0   0   z_2  z_3  0    z_4  0    0    z_4  0    -x_4    |
|{2} | 0    0    0    0   0   -z_1 0    z_3  0    z_4  0    0    0    x_3     |
|{2} | 0    0    0    0   0   0    -z_1 -z_2 0    0    z_4  -z_2 x_4  0       |
|{2} | 0    0    0    0   0   0    0    0    -z_1 -z_2 -z_3 0    -x_3 0       |
|-----------------------------------------------------------------------------|
|0    0    |                                                                  |
|0    0    |                                                                  |
|0    0    |                                                                  |
|T    0    |                                                                  |
|0    T    |                                                                  |
|0    x_2  |                                                                  |
|-x_2 0    |                                                                  |
|0    -x_1 |                                                                  |
|x_1  0    |                                                                  |
+-----------------------------------------------------------------------------+
|i12 : print cU.dd_3                                                          |
|{3} | 0    -z_2 0    z_4  -T   0    0    x_3  0    |                         |
|{3} | x_3  x_4  0    0    0    -T   0    0    0    |                         |
|{3} | 0    0    -x_3 -x_4 0    0    -T   0    0    |                         |
|{3} | -x_1 0    x_2  0    0    0    0    -T   0    |                         |
|{3} | 0    -x_1 0    x_2  0    0    0    0    -T   |                         |
|{3} | -z_3 -z_4 0    0    0    x_2  0    0    0    |                         |
|{3} | z_2  0    -z_4 0    0    0    0    x_4  0    |                         |
|{3} | -z_1 0    0    -z_4 0    0    -x_2 -x_3 0    |                         |
|{3} | 0    z_2  z_3  0    0    -x_1 0    -x_3 0    |                         |
|{3} | 0    -z_1 0    z_3  0    0    0    0    -x_3 |                         |
|{3} | 0    0    -z_1 -z_2 0    0    -x_1 0    0    |                         |
|{3} | 0    0    0    0    0    x_1  x_2  x_3  x_4  |                         |
|{3} | 0    0    0    0    -x_1 0    0    z_1  z_2  |                         |
|{3} | 0    0    0    0    -x_2 0    0    z_3  z_4  |                         |
|{3} | 0    0    0    0    -x_3 -z_1 -z_3 0    0    |                         |
|{3} | 0    0    0    0    -x_4 -z_2 -z_4 0    0    |                         |
+-----------------------------------------------------------------------------+
|i13 : print cU.dd_4                                                          |
|{4} | -x_2x_4+Tz_4   |                                                       |
|{4} | x_2x_3-Tz_3    |                                                       |
|{4} | -x_1x_4+Tz_2   |                                                       |
|{4} | x_1x_3-Tz_1    |                                                       |
|{4} | z_2z_3-z_1z_4  |                                                       |
|{4} | -x_4z_3+x_3z_4 |                                                       |
|{4} | x_4z_1-x_3z_2  |                                                       |
|{4} | x_2z_2-x_1z_4  |                                                       |
|{4} | -x_2z_1+x_1z_3 |                                                       |
+-----------------------------------------------------------------------------+

See also
========

  * kustinMillerComplex -- Compute Kustin-Miller
    resolution of the unprojection of I in J
  * resolution (Macaulay2Doc) -- projective resolution
  * betti (Macaulay2Doc) -- display or modify a Betti diagram
  * Jerry -- The Kustin-Miller complex for Jerry

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

The object Tom, is a symbol (Macaulay2Doc).

unprojectionHomomorphism -- Compute the homomorphism associated to an unprojection pair
***************************************************************************************

Synopsis
========

  * Usage:
        unprojectionHomomorphism(I,J)
  * Inputs:
      * J, an ideal (Macaulay2Doc), with R/J Gorenstein
      * I, an ideal (Macaulay2Doc), contained in J with R/I
        Gorenstein and dim(R/J)=dim(R/I)-1.
  * Outputs:
      * f, a matrix (Macaulay2Doc),

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

Compute the deformation associated to the unprojection of $I \subset J$ (or
equivalently of $J'\subset R/I$ where $R$ = See ring (Macaulay2Doc), $I$
and $J'=$See substitute (Macaulay2Doc),$(J,R/I)$), i.e., a
homomorphism

$\phi : J' \to R/I$

such that the unprojected ideal $U\subset R[T]$ is the inverse image of

$U' = (T*u - \phi(u)  |  u \in J' ) \subset (R/I)[T]$

under the natural map $R[T]\to(R/I)[T]$.

The result is represented by a matrix $f$ with source (Macaulay2Doc),
$f$ = J' and target (Macaulay2Doc), $f$ =
(R/I)^1.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x_1..x_4,z_1..z_4, T]                                            |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I = ideal(z_2*z_3-z_1*z_4,x_4*z_3-x_3*z_4,x_2*z_2-x_1*z_4,x_4*z_1-x_3*z_|
|                                                                             |
|o2 = ideal (z z  - z z , x z  - x z , x z  - x z , x z  - x z , x z  - x z ) |
|             2 3    1 4   4 3    3 4   2 2    1 4   4 1    3 2   2 1    1 3  |
|                                                                             |
|o2 : Ideal of R                                                              |
|-----------------------------------------------------------------------------|
|2,x_2*z_1-x_1*z_3)                                                           |
+-----------------------------------------------------------------------------+
|i3 : J = ideal (z_1..z_4)                                                    |
|                                                                             |
|o3 = ideal (z , z , z , z )                                                  |
|             1   2   3   4                                                   |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : phi = unprojectionHomomorphism(I,J)                                     |
|                                                                             |
|o4 = | x_2x_4 x_2x_3 x_1x_4 x_1x_3 |                                         |
|                                                                             |
|o4 : Matrix                                                                  |
+-----------------------------------------------------------------------------+
|i5 : S = ring target phi;                                                    |
+-----------------------------------------------------------------------------+
|i6 : I == ideal S                                                            |
|                                                                             |
|o6 = true                                                                    |
+-----------------------------------------------------------------------------+
|i7 : source phi                                                              |
|                                                                             |
|o7 = image | z_4 z_3 z_2 z_1 |                                               |
|                                                                             |
|                             1                                               |
|o7 : S-module, submodule of S                                                |
+-----------------------------------------------------------------------------+
|i8 : target phi                                                              |
|                                                                             |
|      1                                                                      |
|o8 = S                                                                       |
|                                                                             |
|o8 : S-module, free                                                          |
+-----------------------------------------------------------------------------+

See also
========

  * kustinMillerComplex -- Compute Kustin-Miller
    resolution of the unprojection of I in J

Ways to use unprojectionHomomorphism :
======================================

  * "unprojectionHomomorphism(Ideal,Ideal)"

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

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

vertices(Face) -- The vertices of a face of a simplicial complex.
*****************************************************************

Synopsis
========

  * Function: vertices (Polyhedra),
  * Usage:
        vertices(F)
  * Inputs:
      * F, an instance of the type Face,
  * Outputs:
      * a list (Macaulay2Doc),

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

Returns a List (Macaulay2Doc), with the vertices of a Face,
of a simplicial complex.

+----------------------------------------------------------------+
|i1 : R = QQ[x_0..x_4];                                          |
+----------------------------------------------------------------+
|i2 : I = monomialIdeal(x_0*x_1,x_1*x_2,x_2*x_3,x_3*x_4,x_4*x_0);|
|                                                                |
|o2 : MonomialIdeal of R                                         |
+----------------------------------------------------------------+
|i3 : D = simplicialComplex I                                    |
|                                                                |
|o3 = simplicialComplex | x_2x_4 x_1x_4 x_1x_3 x_0x_3 x_0x_2 |   |
|                                                                |
|o3 : SimplicialComplex                                          |
+----------------------------------------------------------------+
|i4 : fc = facets(D)                                             |
|                                                                |
|o4 = {x x , x x , x x , x x , x x }                             |
|       2 4   1 4   1 3   0 3   0 2                              |
|                                                                |
|o4 : List                                                       |
+----------------------------------------------------------------+
|i5 : (faces D)#(1)                                              |
|                                                                |
|o5 = {x x , x x , x x , x x , x x }                             |
|       0 2   0 3   1 3   1 4   2 4                              |
|                                                                |
|o5 : List                                                       |
+----------------------------------------------------------------+

See also
========

  * face -- Generate a face.
  * facets(SimplicialComplex) (SimplicialComplexes)
    -- get the list of
    maximal faces
  * faces(SimplicialComplex) (SimplicialComplexes)
    -- get the list of faces
    for an abstract simplicial complex

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

  * vertices(Face) -- The vertices of a face of a
    simplicial complex.