This is CellularResolutions.info, produced by Macaulay2, version 1.25.11

CellularResolutions -- A package for cellular resolutions of monomial ideals
****************************************************************************

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

This package aims to make working with cellular resolutions of monomial ideals
possible. Although the focus is on those constructs needed to work with
cellular resolutions, the package additionally provides basic functions to work
with cell complexes. For some direct ways to construct common cellular
resolutions for monomial ideals, see taylorComplex, and
hullComplex.

More generally, cell complexes can be constructed by creating cells using
newCell, or newSimplexCell, and then the
maximal cells can be provided to cellComplex, to construct a
cell complex

Authors
=======

  * Jay Yang <jayy@wustl.edu>
  * Aleksandra Sobieska <asobieska@math.wisc.edu>

Version
=======

This documentation describes version 1.0 of CellularResolutions, released May
17, 2023.

Citation
========

If you have used this package in your research, please cite it as follows:

+-----------------------------------------------------------------------------+
|@misc{CellularResolutionsSource,                                             |
|  title = {{CellularResolutions: cellular resolutions of monomial ideals.    |
|  author = {Jay Yang and Aleksandra Sobieska},                               |
|  howpublished = {A \emph{Macaulay2} package available at                    |
|    \url{https://github.com/Macaulay2/M2/tree/stable/M2/Macaulay2/packages   |
|}                                                                            |
|-----------------------------------------------------------------------------|
|Version~1.0}},                                                               |
|                                                                             |
|                                                                             |
|}}                                                                           |
+-----------------------------------------------------------------------------+

Exports
=======

  * Types
      * Cell -- the class of all cells in cell complexes
      * CellComplex -- the class of all cell complexes
  * Functions and commands
      * boundary -- returns the boundary cells along with
        relative orientations
      * boundaryCells -- returns the boundary cells of
        the given cell
      * cellComplex -- create a cell complex
      * cellComplexRPn -- gives a $RP^n$ as a cell
        complex
      * cellComplexSphere -- gives a sphere as a cell
        complex
      * cellComplexTorus -- gives a torus as a cell
        complex
      * cellLabel -- return the label of a cell
      * cells -- return the cells of a cell complex as a
        hashtable whose keys are cell dimensions
      * hullComplex -- gives the hull complex of a monomial
        ideal
      * isCycle -- checks if a list of cells with orientation
        make a cycle
      * isMinimal -- check if a labeled cell complex supports
        a minimal resolution
      * isSimplex -- check if a cell is a simplex
      * maxCells -- gives the maximal cells of a cell complex
      * newCell -- creates a new cell
      * newSimplexCell -- create a new cell
      * relabelCellComplex -- relabels a cell
        complex
      * scarfComplex -- gives the hull complex of a
        monomial ideal
      * subcomplex -- the subcomplex induced by a degree or
        monomial
      * taylorComplex -- gives the Taylor complex of a
        monomial ideal
  * Methods
      * "boundary(Cell)" -- see boundary, -- returns the
        boundary cells along with relative orientations
      * "boundaryCells(Cell)" -- see boundaryCells, --
        returns the boundary cells of the given cell
      * boundaryMap(ZZ,CellComplex),
        -- compute the boundary map of a cell complex from r-faces to
        (r-1)-faces
      * "cellComplex(Ring,List)" -- see cellComplex, --
        create a cell complex
      * cellComplex(Ring,PolyhedralComplex)
        -- creates cell complex from
        given polyhedral complex
      * cellComplex(Ring,Polyhedron),
        -- creates cell complex from given polyhedron
      * cellComplex(Ring,SimplicialComplex)
        -- Creates a cell complex
        from a given simplicial complex
      * "cellComplexRPn(Ring,ZZ)" -- see cellComplexRPn,
        -- gives a $RP^n$ as a cell complex
      * "cellComplexSphere(Ring,ZZ)" -- see cellComplexSphere,
        -- gives a sphere as a cell complex
      * "cellComplexTorus(Ring,ZZ)" -- see cellComplexTorus,
        -- gives a torus as a cell complex
      * "cellLabel(Cell)" -- see cellLabel, -- return the
        label of a cell
      * "cells(CellComplex)" -- see cells, -- return the cells of
        a cell complex as a hashtable whose keys are cell dimensions
      * cells(ZZ,CellComplex) -- return the
        cells of a cell complex
      * complex(CellComplex) -- compute the
        cellular chain complex for a cell complex
      * dim(Cell) -- compute the dimension of a cell
      * dim(CellComplex) -- compute the dimension
        of a cell complex
      * facePoset(CellComplex) -- generates
        the face poset of a cell complex
      * HH CellComplex -- compute the homology modules
        of a cell complex
      * HH^ZZ CellComplex -- cohomology of a cell
        complex
      * HH_ZZ CellComplex -- compute the homology
        modules of a cell complex
      * "hullComplex(MonomialIdeal)" -- see hullComplex, --
        gives the hull complex of a monomial ideal
      * "hullComplex(QQ,MonomialIdeal)" -- see hullComplex,
        -- gives the hull complex of a monomial ideal
      * "hullComplex(ZZ,MonomialIdeal)" -- see hullComplex,
        -- gives the hull complex of a monomial ideal
      * "isCycle(List)" -- see isCycle, -- checks if a list of
        cells with orientation make a cycle
      * isFree(CellComplex) -- checks if the
        labels of a cell complex are free modules
      * "isMinimal(CellComplex)" -- see isMinimal, -- check if
        a labeled cell complex supports a minimal resolution
      * "isSimplex(Cell)" -- see isSimplex, -- check if a cell
        is a simplex
      * isWellDefined(Cell) -- checks if a cell
        is well defined
      * isWellDefined(CellComplex), --
        checks if a cell complex is well defined
      * "maxCells(CellComplex)" -- see maxCells, -- gives the
        maximal cells of a cell complex
      * net(Cell) (missing documentation)
      * net(CellComplex) (missing documentation)
      * "newCell(List)" -- see newCell, -- creates a new cell
      * "newCell(List,Ideal)" -- see newCell, -- creates a new
        cell
      * "newCell(List,Module)" -- see newCell, -- creates a new
        cell
      * "newCell(List,Number)" -- see newCell, -- creates a new
        cell
      * "newCell(List,RingElement)" -- see newCell, -- creates a
        new cell
      * "newSimplexCell(List)" -- see newSimplexCell, --
        create a new cell
      * "newSimplexCell(List,Ideal)" -- see newSimplexCell,
        -- create a new cell
      * "newSimplexCell(List,Module)" -- see newSimplexCell,
        -- create a new cell
      * "newSimplexCell(List,Number)" -- see newSimplexCell,
        -- create a new cell
      * "newSimplexCell(List,RingElement)" -- see newSimplexCell,
        -- create a new cell
      * "relabelCellComplex(CellComplex,HashTable)" -- see
        relabelCellComplex, -- relabels a cell complex
      * ring(CellComplex) -- return the base ring
        of a cell complex
      * RingMap ** CellComplex -- tensors
        labels via a ring map
      * "scarfComplex(MonomialIdeal)" -- see scarfComplex,
        -- gives the hull complex of a monomial ideal
      * skeleton(ZZ,CellComplex), --
        computes the $r$-skeleton of a cell complex
      * "CellComplex _ List" -- see subcomplex, -- the
        subcomplex induced by a degree or monomial
      * "CellComplex _ RingElement" -- see subcomplex, -- the
        subcomplex induced by a degree or monomial
      * "CellComplex _ ZZ" -- see subcomplex, -- the
        subcomplex induced by a degree or monomial
      * "subcomplex(CellComplex,List)" -- see subcomplex, --
        the subcomplex induced by a degree or monomial
      * "subcomplex(CellComplex,RingElement)" -- see subcomplex,
        -- the subcomplex induced by a degree or monomial
      * "subcomplex(CellComplex,ZZ)" -- see subcomplex, --
        the subcomplex induced by a degree or monomial
      * "taylorComplex(MonomialIdeal)" -- see taylorComplex,
        -- gives the Taylor complex of a monomial ideal
  * Symbols
      * "Reduced" -- see complex(CellComplex),
        -- compute the cellular chain complex for a cell complex
      * "CellDimension" -- see newCell, -- creates a new cell
      * "InferLabels" -- see relabelCellComplex, --
        relabels a cell complex
      * "LabelRing" -- see subcomplex, -- the subcomplex
        induced by a degree or monomial

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

The object CellularResolutions, is a package (Macaulay2Doc),
defined in CellularResolutions.m2, with auxiliary files
in CellularResolutions/.

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:24:0.

boundary -- returns the boundary cells along with relative orientations
***********************************************************************

  * Usage:
        boundary(C)
  * Inputs:
      * C, a cell,
  * Outputs:
      * a list (Macaulay2Doc), of two-element sequences where the
        first element is the boundary cell and the second element is an integer
        representing the orientation of the boundary cell relative to C

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

Given a cell C, this command returns a list whose elements are two-element
sequences. The first element of each tuple is a boundary cell of C and the
second element is the attaching degree of that boundary cell relative to C.
This differs from boundaryCells, in that it returns the
boundary cells and their corresponding attaching degree, whereas boundaryCells
returns only the boundary cells.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x,y,z];                                                          |
+-----------------------------------------------------------------------------+
|i2 : vx = newSimplexCell({},x);                                              |
+-----------------------------------------------------------------------------+
|i3 : vy = newSimplexCell({},y);                                              |
+-----------------------------------------------------------------------------+
|i4 : vz = newSimplexCell({},z);                                              |
+-----------------------------------------------------------------------------+
|i5 : exy = newSimplexCell {vx,vy};                                           |
+-----------------------------------------------------------------------------+
|i6 : C = cellComplex(R,{exy,vz});                                            |
+-----------------------------------------------------------------------------+
|i7 : boundary(exy)                                                           |
|                                                                             |
|o7 = {(Cell of dimension 0 with label x, 1), (Cell of dimension 0 with label |
|     ------------------------------------------------------------------------|
|     y, -1)}                                                                 |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+
|i8 : boundary(vz)                                                            |
|                                                                             |
|o8 = {}                                                                      |
|                                                                             |
|o8 : List                                                                    |
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i9 : R = QQ;                                                                 |
+-----------------------------------------------------------------------------+
|i10 : P = convexHull matrix {{1,1,-1,-1},{1,-1,1,-1}};                       |
+-----------------------------------------------------------------------------+
|i11 : C = cellComplex(R,P);                                                  |
+-----------------------------------------------------------------------------+
|i12 : f = (cells(2,C))#0;                                                    |
+-----------------------------------------------------------------------------+
|i13 : boundary(f)                                                            |
|                                                                             |
|o13 = {(Cell of dimension 1 with label 1, 1), (Cell of dimension 1 with label|
|      -----------------------------------------------------------------------|
|      1, 1), (Cell of dimension 1 with label 1, -1), (Cell of dimension 1    |
|      -----------------------------------------------------------------------|
|      with label 1, -1)}                                                     |
|                                                                             |
|o13 : List                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * boundaryCells(Cell) -- returns the boundary cells of
    the given cell

Ways to use boundary:
=====================

  * "boundary(Cell)"

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:469:0.

boundaryCells -- returns the boundary cells of the given cell
*************************************************************

  * Usage:
        boundaryCells(C)
  * Inputs:
      * C, a cell, whose boundary is to be returned
  * Outputs:
      * a list (Macaulay2Doc), of the cells in the boundary of C

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

Given a cell C, this command returns a list whose elements are the boundary
cells of C. This differs from boundary, in that it returns only
the boundary cells of C, whereas boundaryCells returns a list of two-element
sequences of the boundary cells and their corresponding orientation.

+-------------------------------------------------------------------------+
|i1 : R = QQ[x,y,z];                                                      |
+-------------------------------------------------------------------------+
|i2 : vx = newSimplexCell({},x);                                          |
+-------------------------------------------------------------------------+
|i3 : vy = newSimplexCell({},y);                                          |
+-------------------------------------------------------------------------+
|i4 : vz = newSimplexCell({},z);                                          |
+-------------------------------------------------------------------------+
|i5 : exy = newSimplexCell {vx,vy};                                       |
+-------------------------------------------------------------------------+
|i6 : C = cellComplex(R,{exy,vz});                                        |
+-------------------------------------------------------------------------+
|i7 : boundaryCells(exy)                                                  |
|                                                                         |
|o7 = {Cell of dimension 0 with label x, Cell of dimension 0 with label y}|
|                                                                         |
|o7 : List                                                                |
+-------------------------------------------------------------------------+
|i8 : boundaryCells(vz)                                                   |
|                                                                         |
|o8 = {}                                                                  |
|                                                                         |
|o8 : List                                                                |
+-------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i9 : R = QQ;                                                                 |
+-----------------------------------------------------------------------------+
|i10 : P = convexHull matrix {{1,1,-1,-1},{1,-1,1,-1}};                       |
+-----------------------------------------------------------------------------+
|i11 : C = cellComplex(R,P);                                                  |
+-----------------------------------------------------------------------------+
|i12 : f = (cells(2,C))#0;                                                    |
+-----------------------------------------------------------------------------+
|i13 : boundaryCells(f)                                                       |
|                                                                             |
|o13 = {Cell of dimension 1 with label 1, Cell of dimension 1 with label 1,   |
|      -----------------------------------------------------------------------|
|      Cell of dimension 1 with label 1, Cell of dimension 1 with label 1}    |
|                                                                             |
|o13 : List                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * boundaryMap(ZZ,CellComplex), --
    compute the boundary map of a cell complex from r-faces to (r-1)-faces

Ways to use boundaryCells:
==========================

  * "boundaryCells(Cell)"

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:508:0.

boundaryMap(ZZ,CellComplex) -- compute the boundary map of a cell complex from r-faces to (r-1)-faces
*****************************************************************************************************

  * Function: boundaryMap (SimplicialComplexes),
  * Usage:
        boundaryMap(ZZ,CellComplex)
  * Inputs:
      * r, an integer (Macaulay2Doc), the source cell-dimension
      * C, a cell complex, the CellComplex
  * Optional inputs (Macaulay2Doc),:
      * Labels (SimplicialComplexes),
        => ..., default value {},
  * Outputs:
      * a matrix (Macaulay2Doc), the boundary map from r-faces to
        (r-1)-faces of C

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

This function returns the map in the chain complex from the r-th homological
degree to the (r-1)-th homological degree.

For example, below we construct the Taylor complex for the monomial ideal
$\langle x,y,z\rangle$

+--------------------------------------+
|i1 : R = QQ[x,y,z];                   |
+--------------------------------------+
|i2 : vx = newSimplexCell({},x);       |
+--------------------------------------+
|i3 : vy = newSimplexCell({},y);       |
+--------------------------------------+
|i4 : vz = newSimplexCell({},z);       |
+--------------------------------------+
|i5 : exy = newSimplexCell {vx,vy};    |
+--------------------------------------+
|i6 : exz = newSimplexCell {vx,vz};    |
+--------------------------------------+
|i7 : eyz = newSimplexCell {vy,vz};    |
+--------------------------------------+
|i8 : f = newSimplexCell {exy,exz,eyz};|
+--------------------------------------+
|i9 : C = cellComplex(R,{f});          |
+--------------------------------------+
|i10 : d1 = boundaryMap_1 C            |
|                                      |
|o10 = {1} | y  0  z  |                |
|      {1} | -x z  0  |                |
|      {1} | 0  -y -x |                |
|                                      |
|o10 : Matrix                          |
+--------------------------------------+
|i11 : d2 = boundaryMap_2 C            |
|                                      |
|o11 = {2} | z  |                      |
|      {2} | x  |                      |
|      {2} | -y |                      |
|                                      |
|o11 : Matrix                          |
+--------------------------------------+
|i12 : assert(d1*d2==0)                |
+--------------------------------------+

See also
========

  * complex(CellComplex) -- compute the
    cellular chain complex for a cell complex
  * complex(SimplicialComplex) (SimplicialComplexes)
    -- create the chain
    complex associated to a simplicial complex.

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

  * boundaryMap(ZZ,CellComplex), --
    compute the boundary map of a cell complex from r-faces to (r-1)-faces
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:547:0.

Cell -- the class of all cells in cell complexes
************************************************

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

This class represents a single cell in a cell complex. A cell has a boundary, a
dimension, and a label. In most cases, the label should be a monomial. But the
cells in this package may be anything. However for functions such as
complex (Complexes), to work, the labels should be either
monomials, ideals, or modules. In the monomial case, we can view the label as a
module by taking the submodule generated by the monomial in the ring. There
should be canonical inclusions maps from the label on any cell to the labels of
the cells in its boundary.

See also
========

  * CellComplex -- the class of all cell complexes

Functions and methods returning a cell:
=======================================

  * newCell -- creates a new cell
  * newSimplexCell -- create a new cell

Methods that use a cell:
========================

  * "boundary(Cell)" -- see boundary, -- returns the boundary
    cells along with relative orientations
  * "boundaryCells(Cell)" -- see boundaryCells, -- returns
    the boundary cells of the given cell
  * "cellLabel(Cell)" -- see cellLabel, -- return the label of
    a cell
  * dim(Cell) -- compute the dimension of a cell
  * "isSimplex(Cell)" -- see isSimplex, -- check if a cell is
    a simplex
  * isWellDefined(Cell) -- checks if a cell is
    well defined
  * net(Cell) (missing documentation)

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:63:0.

CellComplex -- the class of all cell complexes
**********************************************

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

A cell complex in this context is the combinatorial data of a CW-complex, i.e.
a collection of cells in various dimensions along with their boundary expressed
as a sequence of cells along with an orientation such that the boundary is a
cycle.

Caveat
======

Not every object represented by a CellComplex object corresponds to a
topological cell complex. In general there is no way to check that such a
topological realization exists.

See also
========

  * Cell -- the class of all cells in cell complexes

Functions and methods returning a cell complex:
===============================================

  * cellComplex -- create a cell complex
  * cellComplexRPn -- gives a $RP^n$ as a cell complex
  * cellComplexSphere -- gives a sphere as a cell
    complex
  * cellComplexTorus -- gives a torus as a cell
    complex
  * hullComplex -- gives the hull complex of a monomial
    ideal
  * relabelCellComplex -- relabels a cell complex
  * scarfComplex -- gives the hull complex of a monomial
    ideal
  * skeleton(ZZ,CellComplex) -- computes
    the $r$-skeleton of a cell complex
  * subcomplex -- the subcomplex induced by a degree or
    monomial
  * taylorComplex -- gives the Taylor complex of a
    monomial ideal

Methods that use a cell complex:
================================

  * boundaryMap(ZZ,CellComplex), --
    compute the boundary map of a cell complex from r-faces to (r-1)-faces
  * "cells(CellComplex)" -- see cells, -- return the cells of a
    cell complex as a hashtable whose keys are cell dimensions
  * cells(ZZ,CellComplex) -- return the
    cells of a cell complex
  * complex(CellComplex) -- compute the
    cellular chain complex for a cell complex
  * dim(CellComplex) -- compute the dimension of a
    cell complex
  * facePoset(CellComplex) -- generates the
    face poset of a cell complex
  * HH CellComplex -- compute the homology modules of a
    cell complex
  * HH^ZZ CellComplex -- cohomology of a cell complex
  * HH_ZZ CellComplex -- compute the homology
    modules of a cell complex
  * isFree(CellComplex) -- checks if the labels
    of a cell complex are free modules
  * "isMinimal(CellComplex)" -- see isMinimal, -- check if a
    labeled cell complex supports a minimal resolution
  * isWellDefined(CellComplex) -- checks
    if a cell complex is well defined
  * "maxCells(CellComplex)" -- see maxCells, -- gives the
    maximal cells of a cell complex
  * net(CellComplex) (missing documentation)
  * "relabelCellComplex(CellComplex,HashTable)" -- see
    relabelCellComplex, -- relabels a cell complex
  * ring(CellComplex) -- return the base ring of
    a cell complex
  * RingMap ** CellComplex -- tensors labels
    via a ring map
  * "CellComplex _ List" -- see subcomplex, -- the subcomplex
    induced by a degree or monomial
  * "CellComplex _ RingElement" -- see subcomplex, -- the
    subcomplex induced by a degree or monomial
  * "CellComplex _ ZZ" -- see subcomplex, -- the subcomplex
    induced by a degree or monomial
  * "subcomplex(CellComplex,List)" -- see subcomplex, -- the
    subcomplex induced by a degree or monomial
  * "subcomplex(CellComplex,RingElement)" -- see subcomplex,
    -- the subcomplex induced by a degree or monomial
  * "subcomplex(CellComplex,ZZ)" -- see subcomplex, -- the
    subcomplex induced by a degree or monomial

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:43:0.

cellComplex -- create a cell complex
************************************

  * Usage:
        cellComplex(R,maxCells)
  * Inputs:
      * R, a ring (Macaulay2Doc), that specifies the base ring for
        interpreting the labels
      * maxCells, a list (Macaulay2Doc), that specifies the maximal
        cells for the complex
  * Outputs:
      * a cell complex,

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

The method cellComplex takes a ring R and a list of maximal cells and
constructs the corresponding cell complex. While the intent is for the supplied
cells to be maximal, including non-maximal cells is not forbidden and will
generate valid cell complexes.

The ring R is the ring over which the labels are interpreted. This function
does not directly check that the labels are in the correct ring.

+-------------------------------------+
|i1 : c = newCell {}                  |
|                                     |
|o1 = Cell of dimension 0 with label 1|
|                                     |
|o1 : Cell                            |
+-------------------------------------+
|i2 : C = cellComplex(QQ,{c});        |
+-------------------------------------+
|i3 : R = QQ[x,y];                    |
+-------------------------------------+
|i4 : C = cellComplex(R,{c});         |
+-------------------------------------+

See also
========

  * newCell -- creates a new cell
  * newSimplexCell -- create a new cell
  * isWellDefined (Macaulay2Doc) -- whether a map is well
    defined

Ways to use cellComplex:
========================

  * "cellComplex(Ring,List)"
  * cellComplex(Ring,PolyhedralComplex)
    -- creates cell complex from
    given polyhedral complex
  * cellComplex(Ring,Polyhedron), --
    creates cell complex from given polyhedron
  * cellComplex(Ring,SimplicialComplex)
    -- Creates a cell complex from a
    given simplicial complex

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:97:0.

cellComplex(Ring,PolyhedralComplex) -- creates cell complex from given polyhedral complex
*****************************************************************************************

  * Function: cellComplex,
  * Usage:
        cellComplex(Ring,PolyhedralComplex)
  * Inputs:
      * R, a ring (Macaulay2Doc), that specifies the base ring
      * P, an instance of the type PolyhedralComplex (Polyhedra),
  * Optional inputs (Macaulay2Doc),:
      * Labels => a hash table (Macaulay2Doc), default value
        null, that maps vertices in the polyhedron to labels
  * Outputs:
      * a cell complex, whose cells are the faces of the
        given polyhedral complex

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

Given a polyhedral complex, this command returns the cell complex whose cells
correspond to the faces of the polyhedral complex. The faces have the default
label 1.

+-----------------------------------------------------------+
|i1 : R = QQ[x];                                            |
+-----------------------------------------------------------+
|i2 : P1 = convexHull matrix {{2,2,0},{1,-1,0}};            |
+-----------------------------------------------------------+
|i3 : P2 = convexHull matrix {{2,-2,0},{1,1,0}};            |
+-----------------------------------------------------------+
|i4 : P3 = convexHull matrix {{-2,-2,0},{1,-1,0}};          |
+-----------------------------------------------------------+
|i5 : P4 = convexHull matrix {{-2,2,0},{-1,-1,0}};          |
+-----------------------------------------------------------+
|i6 : F = polyhedralComplex {P1,P2,P3,P4};                  |
+-----------------------------------------------------------+
|i7 : C = cellComplex(R,F);                                 |
+-----------------------------------------------------------+
|i8 : facePoset C                                           |
|                                                           |
|o8 = Relation Matrix: | 1 0 0 0 0 0 1 0 1 1 1 0 0 1 1 1 1 ||
|                      | 0 1 0 0 0 0 1 0 0 0 0 1 1 1 1 0 0 ||
|                      | 0 0 1 0 0 1 0 0 1 0 0 1 0 1 0 1 0 ||
|                      | 0 0 0 1 0 0 0 1 0 1 0 0 1 0 1 0 1 ||
|                      | 0 0 0 0 1 1 0 1 0 0 1 0 0 0 0 1 1 ||
|                      | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 ||
|                      | 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 ||
|                      | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 ||
|                      | 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 ||
|                      | 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 ||
|                      | 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 ||
|                      | 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 ||
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 ||
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 ||
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ||
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 ||
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 ||
|                                                           |
|o8 : Poset                                                 |
+-----------------------------------------------------------+

The labels on the vertices can be controlled via the optional parameter Labels
This parameter expects a hash table whose keys are vectors corresponding to the
vertices of the polyhedron with desired labels as corresponding values.

See also
========

  * cellComplex(Ring,Polyhedron), --
    creates cell complex from given polyhedron

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

  * cellComplex(Ring,PolyhedralComplex)
    -- creates cell complex from
    given polyhedral complex
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:1032:0.

cellComplex(Ring,Polyhedron) -- creates cell complex from given polyhedron
**************************************************************************

  * Function: cellComplex,
  * Usage:
        cellComplex(Ring,Polyhedron)
  * Inputs:
      * R, a ring (Macaulay2Doc), that specifies the base ring
      * P, a convex polyhedron (Polyhedra),
  * Optional inputs (Macaulay2Doc),:
      * Labels => a hash table (Macaulay2Doc), default value
        null, that maps vertices in the polyhedron to labels
  * Outputs:
      * a cell complex, whose cells are the faces of the
        given polyhedron P

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

Given a polyhedron, this command returns the cell complex whose cells
correspond to the faces of the polyhedron. The faces have the default label 1.

+-----------------------------------------------------------------------------+
|i1 : R = QQ;                                                                 |
+-----------------------------------------------------------------------------+
|i2 : P = convexHull matrix {{1,1,-1,-1},{1,-1,1,-1}};                        |
+-----------------------------------------------------------------------------+
|i3 : faces P                                                                 |
|                                                                             |
|o3 = HashTable{0 => {({0, 1, 2, 3}, {})}                                    }|
|               1 => {({0, 2}, {}), ({1, 3}, {}), ({0, 1}, {}), ({2, 3}, {})} |
|               2 => {({0}, {}), ({2}, {}), ({1}, {}), ({3}, {})}             |
|               3 => {}                                                       |
|                                                                             |
|o3 : HashTable                                                               |
+-----------------------------------------------------------------------------+
|i4 : C = cellComplex(R,P);                                                   |
+-----------------------------------------------------------------------------+
|i5 : cells C                                                                 |
|                                                                             |
|o5 = HashTable{0 => {Cell of dimension 0 with label 1, Cell of dimension 0   |
|               1 => {Cell of dimension 1 with label 1, Cell of dimension 1   |
|               2 => {Cell of dimension 2 with label 1}                       |
|                                                                             |
|o5 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|with label 1, Cell of dimension 0 with label 1, Cell of dimension 0 with     |
|with label 1, Cell of dimension 1 with label 1, Cell of dimension 1 with     |
|-----------------------------------------------------------------------------|
|label 1}}                                                                    |
|label 1}                                                                     |
+-----------------------------------------------------------------------------+

The labels on the vertices can be controlled via the optional parameter Labels
This parameter expects a hash table whose keys are vectors corresponding to the
vertices of the polyhedron with desired labels as corresponding values.

+---------------------------------------------------------------------+
|i6 : S = QQ[x,y,z,w];                                                |
+---------------------------------------------------------------------+
|i7 : v = vertices P;                                                 |
|                                                                     |
|              2       4                                              |
|o7 : Matrix QQ  <-- QQ                                               |
+---------------------------------------------------------------------+
|i8 : H = hashTable {v_0 => x*y, v_1 => y*z, v_2 => x*w, v_3 => y*z}; |
+---------------------------------------------------------------------+
|i9 : labeledC = cellComplex(S, P, Labels => H);                      |
+---------------------------------------------------------------------+
|i10 : for i to dim labeledC list cells(i,labeledC)/cellLabel         |
|                                                                     |
|o10 = {{x*w, x*y, y*z, y*z}, {y*z, x*y*z, x*y*z*w, x*y*w}, {x*y*z*w}}|
|                                                                     |
|o10 : List                                                           |
+---------------------------------------------------------------------+

See also
========

  * cellComplex(Ring,PolyhedralComplex)
    -- creates cell complex from
    given polyhedral complex

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

  * cellComplex(Ring,Polyhedron), --
    creates cell complex from given polyhedron
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:994:0.

cellComplex(Ring,SimplicialComplex) -- Creates a cell complex from a given simplicial complex
*********************************************************************************************

  * Function: cellComplex,
  * Usage:
        cellComplex(S,D)
  * Inputs:
      * S, a ring (Macaulay2Doc),
      * D, an abstract simplicial complex (SimplicialComplexes),
        from which the cell complex is
        created
  * Optional inputs (Macaulay2Doc),:
      * Labels => a hash table (Macaulay2Doc), default value
        null, that maps simplices represented by monomials to labels
  * Outputs:
      * a cell complex, that matches those of the given
        simplicial complex

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

This returns a cellular complex whose faces are those of the given simplicial
complex.

+--------------------------------------+
|i1 : R = QQ[a..f];                    |
+--------------------------------------+
|i2 : I = monomialIdeal(a*f, b*d, c*e);|
|                                      |
|o2 : MonomialIdeal of R               |
+--------------------------------------+
|i3 : Delta = simplicialComplex I;     |
+--------------------------------------+
|i4 : C = cellComplex(QQ,Delta)        |
|                                      |
|o4 = C                                |
|                                      |
|o4 : CellComplex                      |
+--------------------------------------+

The optional parameter Label can be used to provide labels to the resulting
cell complex. By default all cells get a label of 1.

+-----------------------------------------------------------------------------+
|i5 : S = QQ[x,y];                                                            |
+-----------------------------------------------------------------------------+
|i6 : H = hashTable {a => x^5, b => y*x^4, c=>y^2*x^3, d => y^3*x^2, e =>     |
|-----------------------------------------------------------------------------|
|y^4*x, f => x^5};                                                            |
+-----------------------------------------------------------------------------+
|i7 : C = cellComplex(S,Delta,Labels=>H)                                      |
|                                                                             |
|o7 = C                                                                       |
|                                                                             |
|o7 : CellComplex                                                             |
+-----------------------------------------------------------------------------+
|i8 : applyValues(cells C, l -> apply(l,cellLabel))                           |
|                                                                             |
|                      5   4    3 2   2 3     4   5                           |
|o8 = HashTable{0 => {x , x y, x y , x y , x*y , x }                          |
|                      5 2   2 4   5 3   5 4   5    5 2   5 3   5 4   4 2     |
|               1 => {x y , x y , x y , x y , x y, x y , x y , x y , x y ,    |
|                      5 2   5 4   5 3   5 4   5 2   5 4   5 3   5 4          |
|               2 => {x y , x y , x y , x y , x y , x y , x y , x y }         |
|                                                                             |
|o8 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|                }                                                            |
| 4 4   5    3 3                                                              |
|x y , x y, x y }                                                             |
+-----------------------------------------------------------------------------+

See also
========

  * cellComplex -- create a cell complex

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

  * cellComplex(Ring,SimplicialComplex)
    -- Creates a cell complex from a
    given simplicial complex
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:236:0.

cellComplexRPn -- gives a $RP^n$ as a cell complex
**************************************************

  * Usage:
        cellComplexRPn(R,n)
  * Inputs:
      * R, a ring (Macaulay2Doc), that specifies the base ring
      * n, an integer (Macaulay2Doc), that specifies the dimension of
        the projective space
  * Outputs:
      * a cell complex, representing n-dimensional
        projective space

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

This function constructs n-dimensional projective space as a cell complex with
the typical CW-structure: a single cell of each dimension, where each r-cell is
attached as a 2-sheeted covering to the (r-1)-cell.

+---------------------------------------------------------------------+
|i1 : QP5 = cellComplexRPn(QQ,5)                                      |
|                                                                     |
|o1 = QP5                                                             |
|                                                                     |
|o1 : CellComplex                                                     |
+---------------------------------------------------------------------+
|i2 : prune homology QP5                                              |
|                                                                     |
|       1                                                             |
|o2 = QQ                                                              |
|                                                                     |
|     5                                                               |
|                                                                     |
|o2 : Complex                                                         |
+---------------------------------------------------------------------+
|i3 : ZP6 = cellComplexRPn(ZZ,6)                                      |
|                                                                     |
|o3 = ZP6                                                             |
|                                                                     |
|o3 : CellComplex                                                     |
+---------------------------------------------------------------------+
|i4 : prune homology ZP6                                              |
|                                                                     |
|o4 = cokernel | 2 | <-- 0 <-- cokernel | 2 | <-- 0 <-- cokernel | 2 ||
|                                                                     |
|     1                  2     3                  4     5             |
|                                                                     |
|o4 : Complex                                                         |
+---------------------------------------------------------------------+

See also
========

  * cellComplexSphere -- gives a sphere as a cell
    complex
  * cellComplexTorus -- gives a torus as a cell
    complex

Ways to use cellComplexRPn:
===========================

  * "cellComplexRPn(Ring,ZZ)"

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:1172:0.

cellComplexSphere -- gives a sphere as a cell complex
*****************************************************

  * Usage:
        cellComplexSphere(R,n)
  * Inputs:
      * R, a ring (Macaulay2Doc), that specifies the base ring
      * n, an integer (Macaulay2Doc), that specifies the dimension of
        the sphere
  * Outputs:
      * a cell complex, an n-dimensional sphere

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

This function constructs an n-dimensional sphere in the typical way for a
CW-complex: a single n-dimensional cell attached to a single 0-dimensional
cell.

+-------------------------------------------------------+
|i1 : S = cellComplexSphere(QQ,3)                       |
|                                                       |
|o1 = S                                                 |
|                                                       |
|o1 : CellComplex                                       |
+-------------------------------------------------------+
|i2 : cells(S)                                          |
|                                                       |
|o2 = HashTable{0 => {Cell of dimension 0 with label 1}}|
|               3 => {Cell of dimension 3 with label 1} |
|                                                       |
|o2 : HashTable                                         |
+-------------------------------------------------------+
|i3 : complex S                                         |
|                                                       |
|       1       1                   1                   |
|o3 = QQ  <-- QQ  <-- 0 <-- 0 <-- QQ                    |
|                                                       |
|     -1      0       1     2     3                     |
|                                                       |
|o3 : Complex                                           |
+-------------------------------------------------------+
|i4 : prune homology S                                  |
|                                                       |
|       1                                               |
|o4 = QQ                                                |
|                                                       |
|     3                                                 |
|                                                       |
|o4 : Complex                                           |
+-------------------------------------------------------+

See also
========

  * cellComplexRPn -- gives a $RP^n$ as a cell complex
  * cellComplexTorus -- gives a torus as a cell
    complex

Ways to use cellComplexSphere:
==============================

  * "cellComplexSphere(Ring,ZZ)"

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:1141:0.

cellComplexTorus -- gives a torus as a cell complex
***************************************************

  * Usage:
        cellComplexTorus(R,n)
  * Inputs:
      * R, a ring (Macaulay2Doc), that specifies the base ring
      * n, an integer (Macaulay2Doc), that specifies the dimension of
        the torus
  * Outputs:
      * a cell complex, the n-dimensional torus

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

This function returns the n-dimensional torus as a cell complex in the usual
way: the product of n copies of $S^1$.

+-----------------------------------------------------------------------------+
|i1 : T3 = cellComplexTorus(QQ,3)                                             |
|                                                                             |
|o1 = T3                                                                      |
|                                                                             |
|o1 : CellComplex                                                             |
+-----------------------------------------------------------------------------+
|i2 : cells(T3)                                                               |
|                                                                             |
|o2 = HashTable{0 => {Cell of dimension 0 with label 1}                       |
|               1 => {Cell of dimension 1 with label 1, Cell of dimension 1   |
|               2 => {Cell of dimension 2 with label 1, Cell of dimension 2   |
|               3 => {Cell of dimension 3 with label 1}                       |
|                                                                             |
|o2 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|                                               }                             |
|with label 1, Cell of dimension 1 with label 1}                              |
|with label 1, Cell of dimension 2 with label 1}                              |
+-----------------------------------------------------------------------------+
|i3 : prune homology T3                                                       |
|                                                                             |
|       3       3       1                                                     |
|o3 = QQ  <-- QQ  <-- QQ                                                      |
|                                                                             |
|     1       2       3                                                       |
|                                                                             |
|o3 : Complex                                                                 |
+-----------------------------------------------------------------------------+

See also
========

  * cellComplexSphere -- gives a sphere as a cell
    complex
  * cellComplexRPn -- gives a $RP^n$ as a cell complex

Ways to use cellComplexTorus:
=============================

  * "cellComplexTorus(Ring,ZZ)"

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:1201:0.

cellLabel -- return the label of a cell
***************************************

  * Usage:
        cellLabel C
  * Inputs:
      * C, a cell,
  * Outputs:
      * a thing (Macaulay2Doc), the label of the cell

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

The label is provided at the creation of the cell and cannot be modified,
neither this function nor any of the cell creation functions attempt to
interpret the label and while the labels generally should be monomials, this
package makes no attempt to enforce such a requirement.

+-----------------------------------+
|i1 : R = QQ[x,y];                  |
+-----------------------------------+
|i2 : v1 = newSimplexCell({},x^2);  |
+-----------------------------------+
|i3 : v2 = newSimplexCell({},x*y^2);|
+-----------------------------------+
|i4 : v3 = newSimplexCell {};       |
+-----------------------------------+
|i5 : e = newSimplexCell {v1,v2};   |
+-----------------------------------+
|i6 : C = cellComplex(R,{e,v3});    |
+-----------------------------------+
|i7 : cellLabel v1                  |
|                                   |
|      2                            |
|o7 = x                             |
|                                   |
|o7 : R                             |
+-----------------------------------+
|i8 : cellLabel e                   |
|                                   |
|      2 2                          |
|o8 = x y                           |
|                                   |
|o8 : R                             |
+-----------------------------------+
|i9 : cellLabel v3                  |
|                                   |
|o9 = 1                             |
+-----------------------------------+

See also
========

  * Cell -- the class of all cells in cell complexes
  * newSimplexCell -- create a new cell
  * newCell -- creates a new cell

Ways to use cellLabel:
======================

  * "cellLabel(Cell)"

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:297:0.

cells -- return the cells of a cell complex as a hashtable whose keys are cell dimensions
*****************************************************************************************

  * Usage:
        cells(C)
  * Inputs:
      * C, a cell complex, the CellComplex whose cells are
        to be returned
  * Outputs:
      * a hash table (Macaulay2Doc), the cells of C

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

Given a cell complex, this function will return all the cells in that cell
complex, index by dimension. The order of the cells in each dimension is
arbitrary.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x,y,z];                                                          |
+-----------------------------------------------------------------------------+
|i2 : vx = newSimplexCell({},x);                                              |
+-----------------------------------------------------------------------------+
|i3 : vy = newSimplexCell({},y);                                              |
+-----------------------------------------------------------------------------+
|i4 : vz = newSimplexCell({},z);                                              |
+-----------------------------------------------------------------------------+
|i5 : exy = newSimplexCell {vx,vy};                                           |
+-----------------------------------------------------------------------------+
|i6 : C = cellComplex(R,{exy,vz});                                            |
+-----------------------------------------------------------------------------+
|i7 : cells(C)                                                                |
|                                                                             |
|o7 = HashTable{0 => {Cell of dimension 0 with label z, Cell of dimension 0   |
|               1 => {Cell of dimension 1 with label x*y}                     |
|                                                                             |
|o7 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|with label x, Cell of dimension 0 with label y}}                             |
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i8 : R = QQ;                                                                 |
+-----------------------------------------------------------------------------+
|i9 : P = convexHull matrix {{1,1,-1,-1},{1,-1,1,-1}};                        |
+-----------------------------------------------------------------------------+
|i10 : C = cellComplex(R,P);                                                  |
+-----------------------------------------------------------------------------+
|i11 : cells C                                                                |
|                                                                             |
|o11 = HashTable{0 => {Cell of dimension 0 with label 1, Cell of dimension 0  |
|                1 => {Cell of dimension 1 with label 1, Cell of dimension 1  |
|                2 => {Cell of dimension 2 with label 1}                      |
|                                                                             |
|o11 : HashTable                                                              |
|-----------------------------------------------------------------------------|
|with label 1, Cell of dimension 0 with label 1, Cell of dimension 0 with     |
|with label 1, Cell of dimension 1 with label 1, Cell of dimension 1 with     |
|-----------------------------------------------------------------------------|
|label 1}}                                                                    |
|label 1}                                                                     |
+-----------------------------------------------------------------------------+

See also
========

  * cells(ZZ,CellComplex) -- return the
    cells of a cell complex

Ways to use cells:
==================

  * "cells(CellComplex)"
  * cells(ZZ,CellComplex) -- return the
    cells of a cell complex

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:395:0.

cells(ZZ,CellComplex) -- return the cells of a cell complex
***********************************************************

  * Function: cells,
  * Usage:
        cells(ZZ,C)
  * Inputs:
      * r, an integer (Macaulay2Doc), the dimension of the cells to
        be returned
      * C, a cell complex, whose r-cells are to be returned
  * Outputs:
      * a list (Macaulay2Doc), the r-cells of C

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

Given a dimension r and a cell complex C, cells returns a list of all the cells
of dimension r in C. The order of the returned cells is arbitrary.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x,y,z];                                                          |
+-----------------------------------------------------------------------------+
|i2 : vx = newSimplexCell({},x);                                              |
+-----------------------------------------------------------------------------+
|i3 : vy = newSimplexCell({},y);                                              |
+-----------------------------------------------------------------------------+
|i4 : vz = newSimplexCell({},z);                                              |
+-----------------------------------------------------------------------------+
|i5 : exy = newSimplexCell {vx,vy};                                           |
+-----------------------------------------------------------------------------+
|i6 : C = cellComplex(R,{exy,vz});                                            |
+-----------------------------------------------------------------------------+
|i7 : cells(0,C)                                                              |
|                                                                             |
|o7 = {Cell of dimension 0 with label x, Cell of dimension 0 with label z,    |
|     ------------------------------------------------------------------------|
|     Cell of dimension 0 with label y}                                       |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+
|i8 : cells(1,C)                                                              |
|                                                                             |
|o8 = {Cell of dimension 1 with label x*y}                                    |
|                                                                             |
|o8 : List                                                                    |
+-----------------------------------------------------------------------------+
|i9 : cells(2,C)                                                              |
|                                                                             |
|o9 = {}                                                                      |
|                                                                             |
|o9 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * cells(CellComplex) -- return the cells of a cell complex as a
    hashtable whose keys are cell dimensions

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

  * cells(ZZ,CellComplex) -- return the
    cells of a cell complex
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:428:0.

complex(CellComplex) -- compute the cellular chain complex for a cell complex
*****************************************************************************

  * Function: complex (Complexes),
  * Usage:
        complex C
  * Inputs:
      * C, a cell complex, the cell complex for which to
        compute the chain complex
  * Optional inputs (Macaulay2Doc),:
      * Reduced => a Boolean value (Macaulay2Doc), default value
        true, that controls whether the augmented chain complexes is used
      * Prune => a Boolean value (Macaulay2Doc), default value
        true, that controls whether the modules in the chain complex are pruned
  * Outputs:
      * a complex (Complexes), the dimension of the complex

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

This constructs the cellular chain complex for a cell complex, taking into
account the labels on the cells. The resulting cell complex will be a complex
of modules over the ring associated to the cell complex. By default, the option
"Reduced" is set to true, so the resulting Complex has a rank 1 free module in
homological degree -1.

+--------------------------------+
|i1 : R = QQ[x]                  |
|                                |
|o1 = R                          |
|                                |
|o1 : PolynomialRing             |
+--------------------------------+
|i2 : a = newSimplexCell({},x);  |
+--------------------------------+
|i3 : b1 = newCell {a,a};        |
+--------------------------------+
|i4 : b2 = newCell {a,a};        |
+--------------------------------+
|i5 : C = cellComplex(R,{b1,b2});|
+--------------------------------+
|i6 : complex C                  |
|                                |
|      1      1      2           |
|o6 = R  <-- R  <-- R            |
|                                |
|     -1     0      1            |
|                                |
|o6 : Complex                    |
+--------------------------------+
|i7 : complex(C,Reduced=>false)  |
|                                |
|      1      2                  |
|o7 = R  <-- R                   |
|                                |
|     0      1                   |
|                                |
|o7 : Complex                    |
+--------------------------------+

For details see Combinatorial Commutative Algebra Section 4.1. If we restrict
to the case of monomial labels, then, subject to some acyclicity conditions,
the resulting complex will be (up to a shift by 1 in homological degree) a
resolution of $S/I$ where $I$ is the ideal generated by the labels of the
vertices. With the "Reduced" option set to false, the resulting complex will be
a resolution of the ideal $I$ as a module.

+--------------------------------------------------+
|i8 : R = QQ[x,y,z];                               |
+--------------------------------------------------+
|i9 : I = ideal(x,y,z);                            |
|                                                  |
|o9 : Ideal of R                                   |
+--------------------------------------------------+
|i10 : vx = newSimplexCell({},x);                  |
+--------------------------------------------------+
|i11 : vy = newSimplexCell({},y);                  |
+--------------------------------------------------+
|i12 : vz = newSimplexCell({},z);                  |
+--------------------------------------------------+
|i13 : exy = newSimplexCell({vx,vy});              |
+--------------------------------------------------+
|i14 : exz = newSimplexCell({vx,vz});              |
+--------------------------------------------------+
|i15 : eyz = newSimplexCell({vy,vz});              |
+--------------------------------------------------+
|i16 : f = newSimplexCell({exy,exz,eyz});          |
+--------------------------------------------------+
|i17 : C = cellComplex(R,{f});                     |
+--------------------------------------------------+
|i18 : betti complex(C)[-1]                        |
|                                                  |
|             0 1 2 3                              |
|o18 = total: 1 3 3 1                              |
|          0: 1 3 3 1                              |
|                                                  |
|o18 : BettiTally                                  |
+--------------------------------------------------+
|i19 : assert(betti complex(C)[-1] == betti res I);|
+--------------------------------------------------+

The option "Prune," also defaulted to true, controls whether the modules in the
complex are pruned before being returned. With the "Prune" option set to the
default of true, the resulting complex is visually nicer. However, unless the
labeling ring is fine graded, some of the structure will be lost.

+-------------------------------------------+
|i20 : R = QQ[x,y]                          |
|                                           |
|o20 = R                                    |
|                                           |
|o20 : PolynomialRing                       |
+-------------------------------------------+
|i21 : a = newSimplexCell({},x);            |
+-------------------------------------------+
|i22 : b = newSimplexCell({},y);            |
+-------------------------------------------+
|i23 : e = newCell {a,b};                   |
+-------------------------------------------+
|i24 : C = cellComplex(R,{e});              |
+-------------------------------------------+
|i25 : complex C                            |
|                                           |
|       1      2      1                     |
|o25 = R  <-- R  <-- R                      |
|                                           |
|      -1     0      1                      |
|                                           |
|o25 : Complex                              |
+-------------------------------------------+
|i26 : complex(C,Prune=>false)              |
|                                           |
|       1                                   |
|o26 = R  <-- image | x 0 | <-- image | xy ||
|                   | 0 y |                 |
|      -1                       1           |
|             0                             |
|                                           |
|o26 : Complex                              |
+-------------------------------------------+

See also
========

  * boundaryMap(ZZ,CellComplex), --
    compute the boundary map of a cell complex from r-faces to (r-1)-faces
  * complex(SimplicialComplex) (SimplicialComplexes)
    -- create the chain
    complex associated to a simplicial complex.
  * HH CellComplex -- compute the homology modules of a
    cell complex
  * HH_ZZ CellComplex -- compute the homology
    modules of a cell complex
  * HH^ZZ CellComplex -- cohomology of a cell complex

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

  * complex(CellComplex) -- compute the
    cellular chain complex for a cell complex
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:625:0.

dim(Cell) -- compute the dimension of a cell
********************************************

  * Function: dim (Macaulay2Doc),
  * Usage:
        dim C
  * Inputs:
      * C, a cell, the cell to compute the dimension of
  * Outputs:
      * an integer (Macaulay2Doc), the dimension of the cell

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

Given a cell C, dim returns its dimension. In general the dimension of the cell
is inferred from the dimension of its boundary. However, this can be overridden
if the cell is created using newCell, with the
CellDimension, option.

+----------------------------------+
|i1 : R = QQ[x,y,z];               |
+----------------------------------+
|i2 : vx = newSimplexCell({},x);   |
+----------------------------------+
|i3 : vy = newSimplexCell({},y);   |
+----------------------------------+
|i4 : vz = newSimplexCell({},z);   |
+----------------------------------+
|i5 : exy = newSimplexCell {vx,vy};|
+----------------------------------+
|i6 : C = cellComplex(R,{exy,vz}); |
+----------------------------------+
|i7 : dim(vz)                      |
|                                  |
|o7 = 0                            |
+----------------------------------+
|i8 : dim(exy)                     |
|                                  |
|o8 = 1                            |
+----------------------------------+

See also
========

  * dim(CellComplex) -- compute the dimension of a
    cell complex

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

  * dim(Cell) -- compute the dimension of a cell
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:359:0.

dim(CellComplex) -- compute the dimension of a cell complex
***********************************************************

  * Function: dim (Macaulay2Doc),
  * Usage:
        dim C
  * Inputs:
      * C, a cell complex, the complex to compute the
        dimension of
  * Outputs:
      * an integer (Macaulay2Doc), the dimension of the complex

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

Given a cell complex C, dim returns its dimension. The dimension is equal to
the largest dimension of a cell in C.

+----------------------------------+
|i1 : R = QQ[x,y,z];               |
+----------------------------------+
|i2 : vx = newSimplexCell({},x);   |
+----------------------------------+
|i3 : vy = newSimplexCell({},y);   |
+----------------------------------+
|i4 : vz = newSimplexCell({},z);   |
+----------------------------------+
|i5 : exy = newSimplexCell {vx,vy};|
+----------------------------------+
|i6 : C = cellComplex(R,{exy,vz}); |
+----------------------------------+
|i7 : dim C                        |
|                                  |
|o7 = 1                            |
+----------------------------------+

See also
========

  * dim(Cell) -- compute the dimension of a cell

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

  * dim(CellComplex) -- compute the dimension of a
    cell complex
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:326:0.

facePoset(CellComplex) -- generates the face poset of a cell complex
********************************************************************

  * Function: facePoset (Posets),
  * Usage:
        facePoset C
  * Inputs:
      * C, a cell complex,
  * Outputs:
      * an instance of the type Poset (Posets), the face poset of
        C

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

The face poset of a cell complex is the poset of cells with partial ordering
given by inclusion. The example below constructs the square as a cellular
complex and returns the face poset.

+--------------------------------------------+
|i1 : R = QQ;                                |
+--------------------------------------------+
|i2 : v1 = newCell {};                       |
+--------------------------------------------+
|i3 : v2 = newCell {};                       |
+--------------------------------------------+
|i4 : v3 = newCell {};                       |
+--------------------------------------------+
|i5 : v4 = newCell {};                       |
+--------------------------------------------+
|i6 : e12 = newCell({v1,v2});                |
+--------------------------------------------+
|i7 : e23 = newCell({v2,v3});                |
+--------------------------------------------+
|i8 : e34 = newCell({v3,v4});                |
+--------------------------------------------+
|i9 : e41 = newCell({v4,v1});                |
+--------------------------------------------+
|i10 : f = newCell({e12,e23,e34,e41});       |
+--------------------------------------------+
|i11 : C = cellComplex(R,{f});               |
+--------------------------------------------+
|i12 : facePoset C                           |
|                                            |
|o12 = Relation Matrix: | 1 0 0 0 1 0 1 0 1 ||
|                       | 0 1 0 0 0 0 1 1 1 ||
|                       | 0 0 1 0 0 1 0 1 1 ||
|                       | 0 0 0 1 1 1 0 0 1 ||
|                       | 0 0 0 0 1 0 0 0 1 ||
|                       | 0 0 0 0 0 1 0 0 1 ||
|                       | 0 0 0 0 0 0 1 0 1 ||
|                       | 0 0 0 0 0 0 0 1 1 ||
|                       | 0 0 0 0 0 0 0 0 1 ||
|                                            |
|o12 : Poset                                 |
+--------------------------------------------+

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

  * facePoset(CellComplex) -- generates the
    face poset of a cell complex
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:890:0.

HH CellComplex -- compute the homology modules of a cell complex
****************************************************************

  * Function: homology (Macaulay2Doc),
  * Usage:
        homology(C)
  * Inputs:
      * C, a cell complex, with labels in ring(C)
  * Outputs:
      * a complex (Complexes), the graded module, the homology
        of C with coefficients in ring(C)

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

This computes the reduced homology of the cellular complex arising from the
labeled cell complex C.

If the labels are all 1, then this will be the standard homology of the cell
complex over the label ring, as in the following example.

+---------------------------------------+
|i1 : R = QQ[x]                         |
|                                       |
|o1 = R                                 |
|                                       |
|o1 : PolynomialRing                    |
+---------------------------------------+
|i2 : a = newSimplexCell({},1);         |
+---------------------------------------+
|i3 : b1 = newCell {a,a};               |
+---------------------------------------+
|i4 : b2 = newCell {a,a};               |
+---------------------------------------+
|i5 : C = cellComplex(R,{b1,b2});       |
+---------------------------------------+
|i6 : HH C                              |
|                                       |
|                                      2|
|o6 = cokernel | -1 | <-- image 0 <-- R |
|                                       |
|     -1                  0           1 |
|                                       |
|o6 : Complex                           |
+---------------------------------------+
|i7 : prune oo                          |
|                                       |
|      2                                |
|o7 = R                                 |
|                                       |
|     1                                 |
|                                       |
|o7 : Complex                           |
+---------------------------------------+

However if the cells instead labeled with monomials (or monomial ideals) from
the ring the homology of the corresponding complex of R modules is given.

+----------------------------------------+
|i8 : R = QQ[x]                          |
|                                        |
|o8 = R                                  |
|                                        |
|o8 : PolynomialRing                     |
+----------------------------------------+
|i9 : a = newSimplexCell({},x);          |
+----------------------------------------+
|i10 : b1 = newCell {a,a};               |
+----------------------------------------+
|i11 : b2 = newCell {a,a};               |
+----------------------------------------+
|i12 : C = cellComplex(R,{b1,b2});       |
+----------------------------------------+
|i13 : HH C                              |
|                                        |
|                                       2|
|o13 = cokernel | -x | <-- image 0 <-- R |
|                                        |
|      -1                  0           1 |
|                                        |
|o13 : Complex                           |
+----------------------------------------+
|i14 : prune oo                          |
|                                        |
|                                2       |
|o14 = cokernel | x | <-- 0 <-- R        |
|                                        |
|      -1                 0     1        |
|                                        |
|o14 : Complex                           |
+----------------------------------------+

See also
========

  * HH_ZZ CellComplex -- compute the homology
    modules of a cell complex
  * complex(CellComplex) -- compute the
    cellular chain complex for a cell complex

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

  * HH CellComplex -- compute the homology modules of a
    cell complex
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:668:0.

HH^ZZ CellComplex -- cohomology of a cell complex
*************************************************

  * Function: cohomology (Macaulay2Doc),
  * Usage:
        cohomology(r,C)
  * Inputs:
      * r, an integer (Macaulay2Doc), a non-negative integer
      * C, a cell complex,
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value 0,
  * Outputs:
      * a module (Macaulay2Doc), the r-th cohomology module of C

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

This computes the reduced cohomology in degree r of the labeled cell complex.
In particular, it constructs the co-chain complex by dualizing by the label
ring, and takes the homology of that chain complex. As an example we can
compute the cohomology of the wedge of two circles.

+-----------------------------------+
|i1 : R = QQ[x]                     |
|                                   |
|o1 = R                             |
|                                   |
|o1 : PolynomialRing                |
+-----------------------------------+
|i2 : a = newSimplexCell({},x);     |
+-----------------------------------+
|i3 : b1 = newCell {a,a};           |
+-----------------------------------+
|i4 : b2 = newCell {a,a};           |
+-----------------------------------+
|i5 : C = cellComplex(R,{b1,b2});   |
+-----------------------------------+
|i6 : cohomology(-1,C)              |
|                                   |
|o6 = image 0                       |
|                                   |
|                             1     |
|o6 : R-module, submodule of R      |
+-----------------------------------+
|i7 : cohomology(0,C)               |
|                                   |
|o7 = cokernel {-1} | -x |          |
|                                   |
|                            1      |
|o7 : R-module, quotient of R       |
+-----------------------------------+
|i8 : cohomology(1,C)               |
|                                   |
|      2                            |
|o8 = R                             |
|                                   |
|o8 : R-module, free, degrees {2:-1}|
+-----------------------------------+

Or in a more interesting case, we have the cohomology over the integers of
$\mathbb{RP}^3$.

+---------------------------------+
|i9 : C = cellComplexRPn(ZZ,3);   |
+---------------------------------+
|i10 : cohomology(0,C)            |
|                                 |
|o10 = cokernel | -1 |            |
|                                 |
|                               1 |
|o10 : ZZ-module, quotient of ZZ  |
+---------------------------------+
|i11 : cohomology(1,C)            |
|                                 |
|o11 = image 0                    |
|                                 |
|                                1|
|o11 : ZZ-module, submodule of ZZ |
+---------------------------------+
|i12 : cohomology(2,C)            |
|                                 |
|o12 = cokernel | -2 |            |
|                                 |
|                               1 |
|o12 : ZZ-module, quotient of ZZ  |
+---------------------------------+
|i13 : cohomology(3,C)            |
|                                 |
|        1                        |
|o13 = ZZ                         |
|                                 |
|o13 : ZZ-module, free            |
+---------------------------------+

See also
========

  * HH CellComplex -- compute the homology modules of a
    cell complex
  * HH_ZZ CellComplex -- compute the homology
    modules of a cell complex
  * complex(CellComplex) -- compute the
    cellular chain complex for a cell complex

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

  * HH^ZZ CellComplex -- cohomology of a cell complex
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:760:0.

HH_ZZ CellComplex -- compute the homology modules of a cell complex
*******************************************************************

  * Function: homology (Macaulay2Doc),
  * Usage:
        homology(r,C)
  * Inputs:
      * r, an integer (Macaulay2Doc), an integer
      * C, a cell complex, with labels in ring(C)
  * Outputs:
      * a module (Macaulay2Doc), the r-th homology module of C
        with coefficients in ring(C)

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

This computes the reduced homology in degree r of the cellular complex arising
from the cell complex C. For more details on the labels, see HH CellComplex.
As an example, we can compute the 0-th and 1st
homology of a wedge of two circles.

+--------------------------------+
|i1 : R = QQ                     |
|                                |
|o1 = QQ                         |
|                                |
|o1 : Ring                       |
+--------------------------------+
|i2 : a = newSimplexCell({},1);  |
+--------------------------------+
|i3 : b1 = newCell {a,a};        |
+--------------------------------+
|i4 : b2 = newCell {a,a};        |
+--------------------------------+
|i5 : C = cellComplex(R,{b1,b2});|
+--------------------------------+
|i6 : homology(0,C)              |
|                                |
|o6 = image 0                    |
|                                |
|                               1|
|o6 : QQ-module, submodule of QQ |
+--------------------------------+
|i7 : homology(1,C)              |
|                                |
|       2                        |
|o7 = QQ                         |
|                                |
|o7 : QQ-module, free            |
+--------------------------------+
|i8 : prune oo                   |
|                                |
|       2                        |
|o8 = QQ                         |
|                                |
|o8 : QQ-module, free            |
+--------------------------------+

We can make this example slightly more interesting by changing the label ring
and adding a non-unit label. Note in particular that this has a non-zero 0-th
homology.

+-----------------------------------+
|i9 : R = QQ[x]                     |
|                                   |
|o9 = R                             |
|                                   |
|o9 : PolynomialRing                |
+-----------------------------------+
|i10 : a = newSimplexCell({},x);    |
+-----------------------------------+
|i11 : b1 = newCell {a,a};          |
+-----------------------------------+
|i12 : b2 = newCell {a,a};          |
+-----------------------------------+
|i13 : C = cellComplex(R,{b1,b2});  |
+-----------------------------------+
|i14 : homology(0,C)                |
|                                   |
|o14 = image 0                      |
|                                   |
|                              1    |
|o14 : R-module, submodule of R     |
+-----------------------------------+
|i15 : prune oo                     |
|                                   |
|o15 = 0                            |
|                                   |
|o15 : R-module                     |
+-----------------------------------+
|i16 : homology(1,C)                |
|                                   |
|       2                           |
|o16 = R                            |
|                                   |
|o16 : R-module, free, degrees {2:1}|
+-----------------------------------+
|i17 : prune oo                     |
|                                   |
|       2                           |
|o17 = R                            |
|                                   |
|o17 : R-module, free, degrees {2:1}|
+-----------------------------------+

See also
========

  * HH CellComplex -- compute the homology modules of a
    cell complex
  * HH^ZZ CellComplex -- cohomology of a cell complex
  * complex(CellComplex) -- compute the
    cellular chain complex for a cell complex

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

  * HH_ZZ CellComplex -- compute the homology
    modules of a cell complex
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:716:0.

hullComplex -- gives the hull complex of a monomial ideal
*********************************************************

  * Usage:
        hullComplex I
        hullComplex(t,I)
  * Inputs:
      * t, a rational number (Macaulay2Doc), or an integer (Macaulay2Doc),
      * I, a monomial ideal (Macaulay2Doc),
  * Outputs:
      * a cell complex, the hull complex of $I$ as
        described in Bayer-Sturmfels' ``Cellular Resolutions of Monomial
        Modules''

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

Given a monomial ideal $I$, this function returns the hull complex of that
ideal. If an rational number $t$ is provided, this will set the base used in
the exponents used to construct the polytope as described in ``Combinatorial
Commutative Algebra.'' The resulting complex is only a resolution for $t\gg 0$.
In particular $t > (n+1)!$ is sufficient where $n$ is the number of variables
in the ring. If t is not provided, $(n+1)!+1$ will be used.

The example given below can be found as Example 4.23 in Miller-Sturmfels'
``Combinatorial Commutative Algebra.'' In this example, the resolution
supported on the hull complex is minimal, but this is not always the case. We
also see that for $t=3/2$ the resulting complex is no longer a resolution.

+------------------------------------------------------------------------+
|i1 : S = QQ[x,y,z];                                                     |
+------------------------------------------------------------------------+
|i2 : I = monomialIdeal (x^2*z, x*y*z, y^2*z, x^3*y^5, x^4*y^4, x^5*y^3);|
|                                                                        |
|o2 : MonomialIdeal of S                                                 |
+------------------------------------------------------------------------+
|i3 : H = hullComplex I                                                  |
|                                                                        |
|o3 = H                                                                  |
|                                                                        |
|o3 : CellComplex                                                        |
+------------------------------------------------------------------------+
|i4 : complex H                                                          |
|                                                                        |
|      1      6      7      2                                            |
|o4 = S  <-- S  <-- S  <-- S                                             |
|                                                                        |
|     -1     0      1      2                                             |
|                                                                        |
|o4 : Complex                                                            |
+------------------------------------------------------------------------+
|i5 : cells(1,H)/cellLabel                                               |
|                                                                        |
|       3 5    4 5   2        2    4 4    5 3    5 4                     |
|o5 = {x y z, x y , x y*z, x*y z, x y z, x y z, x y }                    |
|                                                                        |
|o5 : List                                                               |
+------------------------------------------------------------------------+
|i6 : cells(2,H)/cellLabel                                               |
|                                                                        |
|       5 4    4 5                                                       |
|o6 = {x y z, x y z}                                                     |
|                                                                        |
|o6 : List                                                               |
+------------------------------------------------------------------------+
|i7 : isMinimal H                                                        |
|                                                                        |
|o7 = true                                                               |
+------------------------------------------------------------------------+
|i8 : H2 = hullComplex (3/2,I)                                           |
|                                                                        |
|o8 = H2                                                                 |
|                                                                        |
|o8 : CellComplex                                                        |
+------------------------------------------------------------------------+
|i9 : prune HH complex H2                                                |
|                                                                        |
|o9 = cokernel | y2z xyz x2z x3y5 x4y4 x5y3 | <-- cokernel {4} | x 0 0 | |
|                                                          {9} | 0 z x | |
|     -1                                                                 |
|                                                 0                      |
|                                                                        |
|o9 : Complex                                                            |
+------------------------------------------------------------------------+

See also
========

  * taylorComplex(MonomialIdeal) -- gives the Taylor
    complex of a monomial ideal

Ways to use hullComplex:
========================

  * "hullComplex(MonomialIdeal)"
  * "hullComplex(QQ,MonomialIdeal)"
  * "hullComplex(ZZ,MonomialIdeal)"

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:1248:0.

isCycle -- checks if a list of cells with orientation make a cycle
******************************************************************

  * Usage:
        isCycle L
  * Inputs:
      * L, a list (Macaulay2Doc), whose entries are pairs, whose
        first entry is a cell and whose second entry is a degree
  * Outputs:
      * a Boolean value (Macaulay2Doc), true if the given
        cell-degree pairs form a cycle false otherwise

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

This determines whether the given pairs, whose first entry is a cell and whose
second entry is its multiplicity, form a cycle in the homological sense.

+---------------------------------------------------------+
|i1 : R = QQ[x,y,z];                                      |
+---------------------------------------------------------+
|i2 : vx = newSimplexCell({},x);                          |
+---------------------------------------------------------+
|i3 : vy = newSimplexCell({},y);                          |
+---------------------------------------------------------+
|i4 : vz = newSimplexCell({},z);                          |
+---------------------------------------------------------+
|i5 : lxy = newSimplexCell({vx,vy});                      |
+---------------------------------------------------------+
|i6 : lyz = newSimplexCell({vy,vz});                      |
+---------------------------------------------------------+
|i7 : lxz = newSimplexCell({vx,vz});                      |
+---------------------------------------------------------+
|i8 : assert(isCycle {(lxy,1)} == false);                 |
+---------------------------------------------------------+
|i9 : assert(isCycle {{lxy,1},{lyz,1},{lxz,-1}} == true); |
+---------------------------------------------------------+
|i10 : assert(isCycle {{lxy,1},{lyz,1},{lxz,1}} == false);|
+---------------------------------------------------------+

Ways to use isCycle:
====================

  * "isCycle(List)"

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:859:0.

isFree(CellComplex) -- checks if the labels of a cell complex are free modules
******************************************************************************

  * Function: isFree (Complexes),
  * Usage:
        isFree(CellComplex)
  * Inputs:
      * C, a cell complex,
  * Outputs:
      * a Boolean value (Macaulay2Doc), true if all modules
        associated to the cell labels are free

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

This command checks if the modules associated to the labels in the cell complex
are all free, which is necessary for the complex to give a free resolution.

A monomial label always gives a free module, since the module for a monomial
label is the free module generated by that monomial.

Additionally, this function does not simply apply isFreeModule(Module) (Macaulay2Doc),
to every label, as in general, the labels are given
as submodules, and so isFreeModule(Module) (Macaulay2Doc),
would return false in nearly all cases. Instead the labels are first pruned
prior to calling isFreeModule(Module) (Macaulay2Doc).

+---------------------------------+
|i1 : R = QQ[x,y,z];              |
+---------------------------------+
|i2 : v1 = newCell({},ideal(x,y));|
+---------------------------------+
|i3 : C1 = cellComplex(R,{v1});   |
+---------------------------------+
|i4 : isFree C1                   |
|                                 |
|o4 = false                       |
+---------------------------------+
|i5 : v2 = newCell({},x*y);       |
+---------------------------------+
|i6 : C2 = cellComplex(R,{v2});   |
+---------------------------------+
|i7 : isFree C2                   |
|                                 |
|o7 = true                        |
+---------------------------------+

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

  * isFree(CellComplex) -- checks if the labels
    of a cell complex are free modules
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:953:0.

isMinimal -- check if a labeled cell complex supports a minimal resolution
**************************************************************************

  * Usage:
        isMinimal C
  * Inputs:
      * C, a cell complex,
  * Outputs:
      * a Boolean value (Macaulay2Doc), true if the cellular
        resolution supported on C is minimal false otherwise

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

This determines whether the cell complex C supports a minimal free resolution
of the monomialIdeal I generated by the labels of the vertices of C. Note: we
assume the cell complex is free.

+-----------------------------------+
|i1 : R = QQ[x,y,z];                |
+-----------------------------------+
|i2 : v1 = newCell({},x^2*y);       |
+-----------------------------------+
|i3 : v2 = newCell({},y*z);         |
+-----------------------------------+
|i4 : v3 = newCell({},z^3);         |
+-----------------------------------+
|i5 : e12 = newCell({v1,v2});       |
+-----------------------------------+
|i6 : e13 = newCell({v1,v3});       |
+-----------------------------------+
|i7 : e23 = newCell({v2,v3});       |
+-----------------------------------+
|i8 : f123 = newCell({e12,e13,e23});|
+-----------------------------------+
|i9 : C = cellComplex(R,{e12,e23}); |
+-----------------------------------+
|i10 : isMinimal C                  |
|                                   |
|o10 = true                         |
+-----------------------------------+
|i11 : D = cellComplex(R,{f123});   |
+-----------------------------------+
|i12 : isMinimal D                  |
|                                   |
|o12 = false                        |
+-----------------------------------+

Caveat
======

This function makes no attempt to check that the cell complex gives a
resolution or that the complex is a complex of free modules.

See also
========

  * isFree(CellComplex) -- checks if the labels
    of a cell complex are free modules

Ways to use isMinimal:
======================

  * "isMinimal(CellComplex)"

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:798:0.

isSimplex -- check if a cell is a simplex
*****************************************

  * Usage:
        isSimplex C
  * Inputs:
      * C, a cell, a cell
  * Outputs:
      * a Boolean value (Macaulay2Doc), true if the cell C is a
        simplex false otherwise

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

This determines whether a cell C is a simplex. A simplex in this context is a
cell of dimension $d$ with a boundary containing exactly $d+1$ dimension $d-1$
cells

+--------------------------+
|i1 : v1 = newCell {};     |
+--------------------------+
|i2 : v2 = newCell {};     |
+--------------------------+
|i3 : e1 = newCell {v1,v2};|
+--------------------------+
|i4 : isSimplex e1         |
|                          |
|o4 = true                 |
+--------------------------+
|i5 : e2 = newCell {v1,v1};|
+--------------------------+
|i6 : isSimplex e2         |
|                          |
|o6 = false                |
+--------------------------+

Ways to use isSimplex:
======================

  * "isSimplex(Cell)"

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:827:0.

isWellDefined(Cell) -- checks if a cell is well defined
*******************************************************

  * Function: isWellDefined (Macaulay2Doc),
  * Usage:
        isWellDefined C
  * Inputs:
      * C, a cell,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

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

This function checks if a cell is well defined in the following sense. First,
the boundary must form a cycle in homology. Second, the labels on the boundary
cells when interpreted as modules must be submodules of the label of the input
cell, again interpreted as a module. Finally the label itself must be a
submodule (not necessarily proper).

Ring element labels are interpreted as the module of the principal ideal
generated by the element in the ring. Importantly, if all labels are ring
elements then the condition is simply that the labels on the boundary should
divide the labels on the current cell.

In the following example, the cell is not well defined because the labels of
the cells in the boundary of e do not all divide the label on e. Each of the
vertices v1 and v2 are well defined.

+-----------------------------------+
|i1 : R = QQ[x,y];                  |
+-----------------------------------+
|i2 : v1 = newSimplexCell({},x);    |
+-----------------------------------+
|i3 : v2 = newSimplexCell({},y);    |
+-----------------------------------+
|i4 : e = newSimplexCell({v1,v2},x);|
+-----------------------------------+
|i5 : isWellDefined v1              |
|                                   |
|o5 = true                          |
+-----------------------------------+
|i6 : isWellDefined v2              |
|                                   |
|o6 = true                          |
+-----------------------------------+
|i7 : isWellDefined e               |
|                                   |
|o7 = false                         |
+-----------------------------------+

Note however that extending this example, this function does not check if the
cells in the boundary are themselves well defined.

+----------------------------------------+
|i8 : R = QQ[x,y];                       |
+----------------------------------------+
|i9 : v1 = newSimplexCell({},x);         |
+----------------------------------------+
|i10 : v2 = newSimplexCell({},y);        |
+----------------------------------------+
|i11 : e1 = newSimplexCell({v1,v2},x);   |
+----------------------------------------+
|i12 : e2 = newSimplexCell({v1,v2},y);   |
+----------------------------------------+
|i13 : f = newCell({(e1,1),(e2,-1)},x*y);|
+----------------------------------------+
|i14 : isWellDefined e1                  |
|                                        |
|o14 = false                             |
+----------------------------------------+
|i15 : isWellDefined e2                  |
|                                        |
|o15 = false                             |
+----------------------------------------+
|i16 : isWellDefined f                   |
|                                        |
|o16 = true                              |
+----------------------------------------+

Caveat
======

Text This function does not check that the cells contained in the boundary are
themselves well defined. For checking if a whole cell complex is well defined,
see isWellDefined(CellComplex).

See also
========

  * isWellDefined(CellComplex) -- checks
    if a cell complex is well defined

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

  * isWellDefined(Cell) -- checks if a cell is
    well defined
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:1397:0.

isWellDefined(CellComplex) -- checks if a cell complex is well defined
**********************************************************************

  * Function: isWellDefined (Macaulay2Doc),
  * Usage:
        isWellDefined C
  * Inputs:
      * C, a cell complex,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

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

This function checks two conditions. First, it checks that all cells in the
cell complex are well defined in the sense of isWellDefined(Cell).
Second, it checks that all of the labels in the cell
complex are in a common ambient module.

The following example demonstrates that unlike isWellDefined(Cell),
cells at all dimensions are checked, and not just the
cells in the boundary. The cell complex in the example is not well defined
since the edges have labels that aren't divisible by the vertices in their
boundary.

+---------------------------------------+
|i1 : R = QQ[x,y];                      |
+---------------------------------------+
|i2 : v1 = newSimplexCell({},x);        |
+---------------------------------------+
|i3 : v2 = newSimplexCell({},y);        |
+---------------------------------------+
|i4 : e1 = newSimplexCell({v1,v2},x);   |
+---------------------------------------+
|i5 : e2 = newSimplexCell({v1,v2},y);   |
+---------------------------------------+
|i6 : f = newCell({(e1,1),(e2,-1)},x*y);|
+---------------------------------------+
|i7 : isWellDefined f                   |
|                                       |
|o7 = true                              |
+---------------------------------------+
|i8 : isWellDefined cellComplex(R,{f})  |
|                                       |
|o8 = false                             |
+---------------------------------------+

Another important way that cell complexes can fail to be well defined is if
they have labels from different rings

+------------------------------------------+
|i9 : R = QQ[x,y];                         |
+------------------------------------------+
|i10 : S = ZZ[a,b];                        |
+------------------------------------------+
|i11 : v1 = newSimplexCell({},x);          |
+------------------------------------------+
|i12 : v2 = newSimplexCell({},a);          |
+------------------------------------------+
|i13 : isWellDefined cellComplex(R,{v1,v2})|
|                                          |
|o13 = false                               |
+------------------------------------------+

Caveat
======

This function does not check that the cell complex corresponds to a
topologically realizable cell complex.

See also
========

  * isWellDefined(Cell) -- checks if a cell is
    well defined

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

  * isWellDefined(CellComplex) -- checks
    if a cell complex is well defined
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:1444:0.

maxCells -- gives the maximal cells of a cell complex
*****************************************************

  * Usage:
        maxCells C
  * Inputs:
      * C, a cell complex,
  * Outputs:
      * a hash table (Macaulay2Doc), whose keys are the
        dimensions of the maximal cells of C and whose respective values are a
        list of the maximal cells of that dimension

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

Given a cell complex C, this function returns a hash table containing the
maximal cells with respect to containment, sorted by dimension

+---------------------------------------------------------+
|i1 : S = QQ[x,y,z];                                      |
+---------------------------------------------------------+
|i2 : v1 = newCell({},x);                                 |
+---------------------------------------------------------+
|i3 : v2 = newCell({},y);                                 |
+---------------------------------------------------------+
|i4 : v3 = newCell({},z);                                 |
+---------------------------------------------------------+
|i5 : e = newCell({v1,v2});                               |
+---------------------------------------------------------+
|i6 : C = cellComplex(S,{e,v3});                          |
+---------------------------------------------------------+
|i7 : maxCells C                                          |
|                                                         |
|o7 = HashTable{0 => {Cell of dimension 0 with label z}  }|
|               1 => {Cell of dimension 1 with label x*y} |
|                                                         |
|o7 : HashTable                                           |
+---------------------------------------------------------+

See also
========

  * cells(CellComplex) -- return the cells of a cell complex as a
    hashtable whose keys are cell dimensions

Ways to use maxCells:
=====================

  * "maxCells(CellComplex)"

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:1340:0.

newCell -- creates a new cell
*****************************

  * Usage:
        newCell(boundary,label)
        newCell(boundary)
  * Inputs:
      * boundary, a list (Macaulay2Doc), that gives the boundary of
        the new cell either as a list of pairs of cells and their orientation,
        or a list of cells.
      * label, a number (Macaulay2Doc), a ring element (Macaulay2Doc),
        a module (Macaulay2Doc), or
        an ideal (Macaulay2Doc), that gives a label to associate
        to the cell, otherwise attempt to infer it based on the labels on the
        boundary
  * Optional inputs (Macaulay2Doc),:
      * CellDimension => an integer (Macaulay2Doc), default value
        null, that gives an explicit dimension to the cell
  * Outputs:
      * a cell, that was created

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

This function creates a new cell, to be added to a cell complex, if given a
list of cells without any orientation information, it attempts to infer the
orientation.

If given an empty list for the boundary, the function creates a 0-cell (a
vertex).

If not given a label, and the labels on the boundary are monomials or monomial
ideals from the same ring, then the label is the lcm of the labels of the
boundary.

If the dimension cannot be directly inferred from the boundary, CellDimension
can be used to specify the true dimension

+-----------------------------------+
|i1 : R = QQ[x,y]                   |
|                                   |
|o1 = R                             |
|                                   |
|o1 : PolynomialRing                |
+-----------------------------------+
|i2 : a = newCell({},x);            |
+-----------------------------------+
|i3 : b = newCell({},y);            |
+-----------------------------------+
|i4 : c1 = newCell {(a,1),(a,-1)};  |
+-----------------------------------+
|i5 : c2 = newCell {a,a};           |
+-----------------------------------+
|i6 : c3 = newCell {a,b};           |
+-----------------------------------+
|i7 : C = cellComplex(R,{c1,c2,c3});|
+-----------------------------------+

Caveat
======

This function does not check that there is a valid map from the boundary of an
n-cell to the given boundary. It only checks that the boundary forms a cycle in
homology.

See also
========

  * cellComplex -- create a cell complex
  * newSimplexCell -- create a new cell

Ways to use newCell:
====================

  * "newCell(List)"
  * "newCell(List,Ideal)"
  * "newCell(List,Module)"
  * "newCell(List,Number)"
  * "newCell(List,RingElement)"

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:156:0.

newSimplexCell -- create a new cell
***********************************

  * Usage:
        newSimplexCell(boundary,label)
        newSimplexCell(boundary)
  * Inputs:
      * boundary, a list (Macaulay2Doc), that gives the boundary of
        the new cell either as a list of pairs of cells and their orientation,
        or a list of cells.
      * label, a number (Macaulay2Doc), a ring element (Macaulay2Doc),
        a module (Macaulay2Doc), or
        an ideal (Macaulay2Doc), that gives a label to associate
        to the cell, otherwise attempt to infer it based on the labels on the
        boundary
  * Outputs:
      * a cell, that was created

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

This function will only create simplices, and it will verify that the new cell
is a simplex, as such does not have the caveat of newCell.
Otherwise it has the same behavior. This is particularly useful in constructing
$\Delta$-complexes.

+------------------------------------------+
|i1 : v1 = newSimplexCell {};              |
+------------------------------------------+
|i2 : v2 = newSimplexCell {};              |
+------------------------------------------+
|i3 : e1 = newSimplexCell {v1,v2};         |
+------------------------------------------+
|i4 : e2 = newSimplexCell {(v1,1),(v2,-1)};|
+------------------------------------------+
|i5 : C = cellComplex(ZZ, {e1,e2});        |
+------------------------------------------+

One cannot use this command to create cells that are not simplices.

See also
========

  * cellComplex -- create a cell complex
  * newCell -- creates a new cell
  * isSimplex -- check if a cell is a simplex

Ways to use newSimplexCell:
===========================

  * "newSimplexCell(List)"
  * "newSimplexCell(List,Ideal)"
  * "newSimplexCell(List,Module)"
  * "newSimplexCell(List,Number)"
  * "newSimplexCell(List,RingElement)"

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:199:0.

relabelCellComplex -- relabels a cell complex
*********************************************

  * Usage:
        relabelCellComplex(C,H)
  * Inputs:
      * C, a cell complex,
      * H, a hash table (Macaulay2Doc), whose keys are cells
        of C and whose corresponding value is the cell's new label
  * Optional inputs (Macaulay2Doc),:
      * InferLabels => a Boolean value (Macaulay2Doc), default
        value true
  * Outputs:
      * a cell complex, whose cells are relabeled by the
        values in the hashtable H

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

Given a cell complex C and a hashtable, whose key-value pairs are a cell from C
and a new label for that cell, this command relabels C accordingly. Labels for
cells not provided in the hashtable are inferred to be the least common
multiple of the labels of their boundary cells, unless the option InferLabels
is set to false.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[a,b,c];                                                          |
+-----------------------------------------------------------------------------+
|i2 : P1 = convexHull matrix {{0,1,0},{0,0,1}};                               |
+-----------------------------------------------------------------------------+
|i3 : P2 = convexHull matrix {{1,0,1},{0,1,1}};                               |
+-----------------------------------------------------------------------------+
|i4 : P = polyhedralComplex {P1,P2};                                          |
+-----------------------------------------------------------------------------+
|i5 : C = cellComplex(R,P);                                                   |
+-----------------------------------------------------------------------------+
|i6 : verts = cells(0,C);                                                     |
+-----------------------------------------------------------------------------+
|i7 : v0 = verts#0;                                                           |
+-----------------------------------------------------------------------------+
|i8 : v1 = verts#1;                                                           |
+-----------------------------------------------------------------------------+
|i9 : v2 = verts#2;                                                           |
+-----------------------------------------------------------------------------+
|i10 : v3 = verts#3;                                                          |
+-----------------------------------------------------------------------------+
|i11 : T = new HashTable from {v0 => a^2*b, v1 => b*c^2, v2 => b^2, v3 =>     |
|-----------------------------------------------------------------------------|
|a*c};                                                                        |
+-----------------------------------------------------------------------------+
|i12 : relabeledC = relabelCellComplex(C,T);                                  |
+-----------------------------------------------------------------------------+
|i13 : for c in cells(0,relabeledC) list cellLabel(c)                         |
|                                                                             |
|        2      2   2                                                         |
|o13 = {a b, b*c , b , a*c}                                                   |
|                                                                             |
|o13 : List                                                                   |
+-----------------------------------------------------------------------------+
|i14 : for c in cells(1,relabeledC) list cellLabel(c)                         |
|                                                                             |
|            2   2 2   2   2     2    2 2                                     |
|o14 = {a*b*c , b c , a b*c , a*b c, a b }                                    |
|                                                                             |
|o14 : List                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * cellLabel -- return the label of a cell
  * RingMap ** CellComplex -- tensors labels
    via a ring map

Ways to use relabelCellComplex:
===============================

  * "relabelCellComplex(CellComplex,HashTable)"

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:1077:0.

ring(CellComplex) -- return the base ring of a cell complex
***********************************************************

  * Function: ring (Macaulay2Doc),
  * Usage:
        ring C
  * Inputs:
      * C, a cell complex,
  * Outputs:
      * a ring (Macaulay2Doc), the base ring of the cell complex C

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

This returns the base ring associated to a cell complex C, which is used to
interpret labels.

+---------------------------------+
|i1 : R = QQ[x,y];                |
+---------------------------------+
|i2 : vx = newSimplexCell({},x);  |
+---------------------------------+
|i3 : vy = newSimplexCell({},y^2);|
+---------------------------------+
|i4 : e = newSimplexCell {vx,vy}; |
+---------------------------------+
|i5 : C = cellComplex(R,{e});     |
+---------------------------------+
|i6 : ring(C)                     |
|                                 |
|o6 = R                           |
|                                 |
|o6 : PolynomialRing              |
+---------------------------------+

See also
========

  * cellComplex -- create a cell complex

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

  * ring(CellComplex) -- return the base ring of
    a cell complex
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:262:0.

RingMap ** CellComplex -- tensors labels via a ring map
*******************************************************

  * Operator: ** (Macaulay2Doc),
  * Usage:
        f ** C
  * Inputs:
      * f, a ring map (Macaulay2Doc),
      * C, a cell complex,
  * Outputs:
      * a cell complex, whose cells labels are given by
        taking the tensor product by the ring map f

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

Given a ring map f and a cell complex C, then for each label, viewed as a
module M, this function constructs a cell complex whose new labels are f ** M

+------------------------------------+
|i1 : S = QQ[x,y,z];                 |
+------------------------------------+
|i2 : R = QQ[a,b,c];                 |
+------------------------------------+
|i3 : f = map(R,S,matrix{{a,b,c^2}});|
|                                    |
|o3 : RingMap R <-- S                |
+------------------------------------+
|i4 : v1 = newCell({},x);            |
+------------------------------------+
|i5 : v2 = newCell({},y);            |
+------------------------------------+
|i6 : v3 = newCell({},z);            |
+------------------------------------+
|i7 : e12 = newCell({v1,v2});        |
+------------------------------------+
|i8 : e23 = newCell({v2,v3});        |
+------------------------------------+
|i9 : C = cellComplex(S,{e12,e23});  |
+------------------------------------+
|i10 : cells(1,C)/cellLabel          |
|                                    |
|o10 = {y*z, x*y}                    |
|                                    |
|o10 : List                          |
+------------------------------------+
|i11 : D = f ** C;                   |
+------------------------------------+
|i12 : cells(1,D)/cellLabel          |
|                                    |
|          2                         |
|o12 = {b*c , a*b}                   |
|                                    |
|o12 : List                          |
+------------------------------------+

See also
========

  * relabelCellComplex -- relabels a cell complex

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

  * RingMap ** CellComplex -- tensors labels
    via a ring map
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:1111:0.

scarfComplex -- gives the hull complex of a monomial ideal
**********************************************************

  * Usage:
        scarfComplex I
  * Inputs:
      * I, a monomial ideal (Macaulay2Doc),
  * Outputs:
      * a cell complex, the scarf complex of $I$

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

Given a monomial ideal $I$, this function returns the Scarf complex of that
ideal. This complex, which is a subcomplex of the Taylor complex, if it is a
resolution is always minimal, but it need not be a resolution in general.

+------------------------------------------------------------------------+
|i1 : S = QQ[x,y,z];                                                     |
+------------------------------------------------------------------------+
|i2 : I = monomialIdeal (x^2*z, x*y*z, y^2*z, x^3*y^5, x^4*y^4, x^5*y^3);|
|                                                                        |
|o2 : MonomialIdeal of S                                                 |
+------------------------------------------------------------------------+
|i3 : C = scarfComplex I                                                 |
|                                                                        |
|o3 = C                                                                  |
|                                                                        |
|o3 : CellComplex                                                        |
+------------------------------------------------------------------------+
|i4 : complex C                                                          |
|                                                                        |
|      1      6      4                                                   |
|o4 = S  <-- S  <-- S                                                    |
|                                                                        |
|     -1     0      1                                                    |
|                                                                        |
|o4 : Complex                                                            |
+------------------------------------------------------------------------+
|i5 : cells(1,C)/cellLabel                                               |
|                                                                        |
|       4 5     2    5 4   2                                             |
|o5 = {x y , x*y z, x y , x y*z}                                         |
|                                                                        |
|o5 : List                                                               |
+------------------------------------------------------------------------+
|i6 : cells(2,C)/cellLabel                                               |
|                                                                        |
|o6 = {}                                                                 |
|                                                                        |
|o6 : List                                                               |
+------------------------------------------------------------------------+
|i7 : isMinimal C                                                        |
|                                                                        |
|o7 = true                                                               |
+------------------------------------------------------------------------+

See also
========

  * taylorComplex(MonomialIdeal) -- gives the Taylor
    complex of a monomial ideal
  * hullComplex(MonomialIdeal) -- gives the hull complex of
    a monomial ideal

Ways to use scarfComplex:
=========================

  * "scarfComplex(MonomialIdeal)"

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:1309:0.

skeleton(ZZ,CellComplex) -- computes the $r$-skeleton of a cell complex
***********************************************************************

  * Function: skeleton (Polyhedra),
  * Usage:
        skeleton(ZZ,CellComplex)
  * Inputs:
      * r, an integer (Macaulay2Doc), the dimension of the skeleton
      * C, a cell complex, which to take the skeleton of
  * Outputs:
      * a cell complex, the $r$-skeleton of the cell
        complex $C$

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

The $r$-skeleton of a cell complex is the union of its cells whose dimension is
at most $r$.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x];                                                              |
+-----------------------------------------------------------------------------+
|i2 : P = hypercube 3;                                                        |
+-----------------------------------------------------------------------------+
|i3 : C = cellComplex(R,P);                                                   |
+-----------------------------------------------------------------------------+
|i4 : dim C                                                                   |
|                                                                             |
|o4 = 3                                                                       |
+-----------------------------------------------------------------------------+
|i5 : cells C                                                                 |
|                                                                             |
|o5 = HashTable{0 => {Cell of dimension 0 with label 1, Cell of dimension 0   |
|               1 => {Cell of dimension 1 with label 1, Cell of dimension 1   |
|               2 => {Cell of dimension 2 with label 1, Cell of dimension 2   |
|               3 => {Cell of dimension 3 with label 1}                       |
|                                                                             |
|o5 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|with label 1, Cell of dimension 0 with label 1, Cell of dimension 0 with     |
|with label 1, Cell of dimension 1 with label 1, Cell of dimension 1 with     |
|with label 1, Cell of dimension 2 with label 1, Cell of dimension 2 with     |
|-----------------------------------------------------------------------------|
|label 1, Cell of dimension 0 with label 1, Cell of dimension 0 with label 1, |
|label 1, Cell of dimension 1 with label 1, Cell of dimension 1 with label 1, |
|label 1, Cell of dimension 2 with label 1, Cell of dimension 2 with label 1} |
|-----------------------------------------------------------------------------|
|Cell of dimension 0 with label 1, Cell of dimension 0 with label 1}          |
|Cell of dimension 1 with label 1, Cell of dimension 1 with label 1, Cell of  |
|-----------------------------------------------------------------------------|
|                                                                             |
|dimension 1 with label 1, Cell of dimension 1 with label 1, Cell of dimension|
|-----------------------------------------------------------------------------|
|                                                 }                           |
|1 with label 1, Cell of dimension 1 with label 1}                            |
+-----------------------------------------------------------------------------+
|i6 : S = skeleton(2,C);                                                      |
+-----------------------------------------------------------------------------+
|i7 : dim S                                                                   |
|                                                                             |
|o7 = 2                                                                       |
+-----------------------------------------------------------------------------+
|i8 : cells S                                                                 |
|                                                                             |
|o8 = HashTable{0 => {Cell of dimension 0 with label 1, Cell of dimension 0   |
|               1 => {Cell of dimension 1 with label 1, Cell of dimension 1   |
|               2 => {Cell of dimension 2 with label 1, Cell of dimension 2   |
|                                                                             |
|o8 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|with label 1, Cell of dimension 0 with label 1, Cell of dimension 0 with     |
|with label 1, Cell of dimension 1 with label 1, Cell of dimension 1 with     |
|with label 1, Cell of dimension 2 with label 1, Cell of dimension 2 with     |
|-----------------------------------------------------------------------------|
|label 1, Cell of dimension 0 with label 1, Cell of dimension 0 with label 1, |
|label 1, Cell of dimension 1 with label 1, Cell of dimension 1 with label 1, |
|label 1, Cell of dimension 2 with label 1, Cell of dimension 2 with label 1} |
|-----------------------------------------------------------------------------|
|Cell of dimension 0 with label 1, Cell of dimension 0 with label 1}          |
|Cell of dimension 1 with label 1, Cell of dimension 1 with label 1, Cell of  |
|-----------------------------------------------------------------------------|
|                                                                             |
|dimension 1 with label 1, Cell of dimension 1 with label 1, Cell of dimension|
|-----------------------------------------------------------------------------|
|                                                 }                           |
|1 with label 1, Cell of dimension 1 with label 1}                            |
+-----------------------------------------------------------------------------+

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

  * skeleton(ZZ,CellComplex) -- computes
    the $r$-skeleton of a cell complex
-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:919:0.

subcomplex -- the subcomplex induced by a degree or monomial
************************************************************

  * Usage:
        subcomplex(C,m)
        subcomplex(C,d)
        C_m
        C_d
  * Inputs:
      * C, a cell complex,
      * m, a ring element (Macaulay2Doc), a monomial
      * d, an integer (Macaulay2Doc), or a list (Macaulay2Doc),
        a degree
  * Optional inputs (Macaulay2Doc),:
      * LabelRing => a ring (Macaulay2Doc), default value null, for
        the labels on the output
  * Outputs:
      * a cell complex,

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

This function computes the subcomplex of the input cell complex induced by a
monomial or a degree. The returned cell complex will be labeled over the
coefficient ring of the label ring of the original cell complex, or the ring
given by the LabelRing optional parameter if provided.

When given a monomial, the function expects all labels to be monomials, ideals,
or submodules of the ring associated to the cell complex. In that case, the
returned cell complex will be the subcomplex of the original complex containing
the cells whose labels either divide or contain the provided monomial. The
labels on the cells in the returned cell complexes will be 1.

+-------------------------------------------------------------------------+
|i1 : R = QQ[x,y,z];                                                      |
+-------------------------------------------------------------------------+
|i2 : C = taylorComplex monomialIdeal {x,y,z}                             |
|                                                                         |
|o2 = C                                                                   |
|                                                                         |
|o2 : CellComplex                                                         |
+-------------------------------------------------------------------------+
|i3 : subcomplex(C,x*y)                                                   |
|                                                                         |
|o3 = CellComplex over QQ of dimension 1 with 3 total cells               |
|     {Cell of dimension 0 with label 1, Cell of dimension 0 with label 1}|
|     {Cell of dimension 1 with label 1}                                  |
|                                                                         |
|o3 : CellComplex                                                         |
+-------------------------------------------------------------------------+
|i4 : subcomplex(C,x*y,LabelRing=>R)                                      |
|                                                                         |
|o4 = CellComplex over R of dimension 1 with 3 total cells                |
|     {Cell of dimension 0 with label 1, Cell of dimension 0 with label 1}|
|     {Cell of dimension 1 with label 1}                                  |
|                                                                         |
|o4 : CellComplex                                                         |
+-------------------------------------------------------------------------+

When given a degree, the function will use basis to find the appropriate free
module over the new label ring representing the elements of that degree in the
module associated to the label

+-----------------------------------------------------------------------------+
|i5 : subcomplex(C,1)                                                         |
|                                                                             |
|o5 = CellComplex over R of dimension 0 with 3 total cells                    |
|                                       1                                   1 |
|     {Cell of dimension 0 with label QQ , Cell of dimension 0 with label QQ ,|
|                                                                             |
|o5 : CellComplex                                                             |
|-----------------------------------------------------------------------------|
|                                 1                                           |
|Cell of dimension 0 with label QQ }                                          |
+-----------------------------------------------------------------------------+

In general, the degree version is intended to be used with fine-graded
polynomial rings

+-----------------------------------------------------------------------------+
|i6 : S = QQ[a,b,c,DegreeRank=>3];                                            |
+-----------------------------------------------------------------------------+
|i7 : D = taylorComplex monomialIdeal {a,b,c}                                 |
|                                                                             |
|o7 = D                                                                       |
|                                                                             |
|o7 : CellComplex                                                             |
+-----------------------------------------------------------------------------+
|i8 : subcomplex(D,{1,1,0})                                                   |
|                                                                             |
|o8 = CellComplex over S of dimension 1 with 3 total cells                    |
|                                       1                                   1 |
|     {Cell of dimension 0 with label QQ , Cell of dimension 0 with label QQ }|
|                                       1                                     |
|     {Cell of dimension 1 with label QQ }                                    |
|                                                                             |
|o8 : CellComplex                                                             |
+-----------------------------------------------------------------------------+

Ways to use subcomplex:
=======================

  * "subcomplex(CellComplex,List)"
  * "subcomplex(CellComplex,RingElement)"
  * "subcomplex(CellComplex,ZZ)"

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:1504:0.

taylorComplex -- gives the Taylor complex of a monomial ideal
*************************************************************

  * Usage:
        taylorComplex I
  * Inputs:
      * I, a monomial ideal (Macaulay2Doc),
  * Outputs:
      * a cell complex, the Taylor complex of $I$

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

Given a monomial ideal I, this function returns the Taylor complex of that
ideal. Recall that the Taylor complex is a simplex with vertices labeled by the
generators of the ideal.

+-------------------------------------------+
|i1 : S = QQ[x,y,z];                        |
+-------------------------------------------+
|i2 : I = monomialIdeal (x^2, y^2, z^2);    |
|                                           |
|o2 : MonomialIdeal of S                    |
+-------------------------------------------+
|i3 : T = taylorComplex I                   |
|                                           |
|o3 = T                                     |
|                                           |
|o3 : CellComplex                           |
+-------------------------------------------+
|i4 : C = complex T                         |
|                                           |
|      1      3      3      1               |
|o4 = S  <-- S  <-- S  <-- S                |
|                                           |
|     -1     0      1      2                |
|                                           |
|o4 : Complex                               |
+-------------------------------------------+
|i5 : C.dd                                  |
|                                           |
|           1                       3       |
|o5 = -1 : S  <------------------- S  : 0   |
|                | -x2 -y2 -z2 |            |
|                                           |
|          3                           3    |
|     0 : S  <----------------------- S  : 1|
|               {2} | -y2 0   -z2 |         |
|               {2} | x2  -z2 0   |         |
|               {2} | 0   y2  x2  |         |
|                                           |
|          3                   1            |
|     1 : S  <--------------- S  : 2        |
|               {4} | -z2 |                 |
|               {4} | -x2 |                 |
|               {4} | y2  |                 |
|                                           |
|o5 : ComplexMap                            |
+-------------------------------------------+

See also
========

  * hullComplex(MonomialIdeal) -- gives the hull complex of
    a monomial ideal

Ways to use taylorComplex:
==========================

  * "taylorComplex(MonomialIdeal)"

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

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

-------------------------------------------------------------------------------

The source of this document is in CellularResolutions/doc.m2:1277:0.