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

AlgebraicSplines -- a package for working with splines on simplicial complexes, polytopal complexes, and graphs
***************************************************************************************************************

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

This package provides methods for computations with piecewise polynomial
functions (splines) over polytopal complexes.

Let $\Delta$ be a partition (simplicial,polytopal,cellular,rectilinear, etc.)
of a space $\RR^n$. The spline module $S^{r}(\Delta)$ is the module of all
functions $f$ continuously differentiable to order $r$ such that $f$ is a
polynomial when restricted to each facet $\sigma\in\Delta$. The vector space
$S^r_d(\Delta)$ consists of splines whose polynomial restrictions have degree
at most $d$. Its dimension is of particular interest in approximation theory
(see [10]).

The foundations of the algebraic approach to splines (as it applies to
numerical analysis) was developed by Billera and Rose in [1],[2],[3]. In
particular, it is shown in [3] that dim$S^r_d(\Delta)=$dim$S^r(c\Delta)_d$,
where $S^r(c\Delta)_d$ is the vector space of splines of degree exactly $d$ on
the cone $c\Delta$ over $\Delta$.  So the statistic dim$S^r_d(\Delta)$ is the
Hilbert function of $S^r(c\Delta)$.  The functions splineMatrix,
and splineModule, construct the matrix from
[3] whose kernel is $S^r(\Delta)$, and the module $S^r(\Delta)$, respectively.
The functions splineDimensionTable, and
hilbertComparisonTable, display the statistic
dim$S^r_d(\Delta)$ and compare it to the long term dimension formula,
respectively.

In [1], Billera uses a homological approach to solve a conjecture of Strang on
the dimension of the space $S^1_d(\Delta)$.  The chain complex which he defines
in [1] was later modified by Schenck and Stillman in [10]; we will call this
the Billera-Schenck-Stillman chain complex.  It has appeared in many papers due
to its use in finding dim$S^r_d(\Delta)$; perhaps most notable is [11].  In
[10] the chain complex is also used to compute dimension formulas in the
polytopal setting.  The Billera-Schenck-Stillman complex is implemented by the
method splineComplex.  The Billera-Schenck-Stillman chain
complex is a quotient of the cellular chain complex of $\Delta$ (relative to
the boundary of $\Delta$); the latter is computed by cellularComplex.
The kernel of this surjection is given by
idealsComplex.

The functions mentioned thus far are concerned only with the structure of
$S^r(\Delta)$ as a module over the polynomial ring.  The method
ringStructure, constructs $S^r(\Delta)$ as a quotient of a
polynomial ring, thus recovering its ring structure.  In [2], Billera shows
that there is a natural isomorphism between the affine Stanley-Reisner ring
$K_a[\Delta]$ (see explanation in documentation for ringStructure)
of a simplicial complex and the ring $S^0(\Delta)$ of
continuous piecewise polynomials on $\Delta$. The isomorphism identifies the
variable corresponding to a vertex with the Courant function for that vertex.
The method courantFunctions, computes these functions,
and the method stanleyReisner, constructs the isomorphism
identified in [2].  Moreover, the rings $S^r(\Delta)$ live inside $S^0(\Delta)$
- this is of particular interest when $\Delta$ is simplicial due to Billera's
result.  The method stanleyReisnerPresentation,
constructs $S^r(\Delta)$ as a quotient of a ring
map from a polynomial ring into $S^0(\Delta)$; in particular the generators of
$S^r(\Delta)$ are presented in terms of generators of $S^0(\Delta)$.  If
$\Delta$ is simplicial these are selected to be the Courant functions.

In topology, splines arise as equivariant cohomology of spaces with a torus
action via GKM theory - see [14] for a survey of how this relates to splines in
numerical analysis; and [6] for the precise relationship between continuous
splines and the equivariant Chow cohomology of toric varieties.  From this
perspective, the notion of generalized splines on graphs was introduced in [5].
The method generalizedSplines, computes splines in
this more flexible setting.  The relationship to splines in numerical analysis
is via the dual graph described by Rose in [7],[8].

Additionally, there are connections between splines and the module of
multi-derivations of a hyperplane arrangement.  A basic structural connection
was noticed in [3].  For the braid arrangement and its sub-arrangements, the
module of derivations is isomorphic to a ring of splines in a natural way (see
[11] and [4]).

Methods in this package borrow from code written by Hal Schenck.

References:\break [1] Louis J. Billera. Homology of smooth splines: generic
triangulations and a conjecture of Strang. Trans. Amer. Math. Soc.,
310(1):325–340, 1988.\break [2] Louis J. Billera, The Algebra of Continuous
Piecewise Polynomials, Adv. in Math. 76, 170-183 (1989).\break [3] Louis J.
Billera and Lauren L. Rose. A dimension series for multivariate splines.
Discrete Comput. Geom., 6(2):107–128, 1991.\break [4] Michael DiPasquale.
Generalized Splines and Graphic Arrangements. J. Algebraic Combin. 45  (2017),
no. 1, 171-189.\break [5] Simcha Gilbert, Julianna Tymoczko, and Shira Viel.
Generalized splines on arbitrary graphs. Pacific J. Math.  281  (2016),  no. 2,
333-364.\break [6] Sam Payne, Equivariant Chow cohomology of toric varieties,
Math. Res. Lett. 13 (2006), 29-41.\break [7] Lauren Rose, Combinatorial and
topological invariants of modules of piecewise polynomials, Adv. Math. 116
(1995), 34-45.\break [8] Lauren Rose, Graphs, syzygies, and multivariate
splines, Discrete Comput. Geom. 32 (2004), 623-637.\break [9] T. McDonald, H.
Schenck, Piecewise polynomials on polyhedral complexes, Adv. in Appl. Math. 42
(2009), 82-93.\break [10] Hal Schenck and Mike Stillman. Local cohomology of
bivariate splines. J. Pure Appl. Algebra,117/118:535–548, 1997. Algorithms for
algebra (Eindhoven, 1996).\break [11] Hal Schenck, A Spectral Sequence for
Splines, Adv. in Appl. Math. 19, 183-199 (1997).\break [12] Schenck, Hal .
Splines on the Alfeld split of a simplex and type A root systems. J. Approx.
Theory  182  (2014), 1-6.\break [13] Gilbert Strang, Piecewise Polynomials and
the Finite Element Method, Bull. Amer. Math. Soc. 79 (1973) 1128-1137.\break
[14] Julianna Tymoczko. Splines in geometry and topology.  Comput. Aided Geom.
Design  45  (2016), 32-47.

Authors
=======

  * Michael DiPasquale (see http://math.okstate.edu/people/mdipasq/ )
    <mdipasq@okstate.edu>
  * Gwyn Whieldon (see http://cs.hood.edu/~whieldon ) <whieldon@hood.edu>
  * Eliana Duarte (see https://faculty.math.illinois.edu/~emduart2/ )
    <emduart2@illinois.edu>
  * Daniel Irving Bernstein (see http://www4.ncsu.edu/~dibernst )
    <dibernst@ncsu.edu>

Version
=======

This documentation describes version 0.1.0 of AlgebraicSplines.

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

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

Exports
=======

  * Functions and commands
      * cellularComplex -- create the cellular chain
        complex whose homologies are the singular homologies of the complex
        $\Delta$ relative to its boundary
      * courantFunctions -- returns the Courant
        functions of a simplicial complex
      * formsList -- list of powers of (affine) linear forms
        cutting out a specified list of codimension one faces.
      * generalizedSplines -- the module of
        generalized splines associated to a simple graph with an edge labelling
      * hilbertComparisonTable -- a table to
        compare the values of the hilbertFunction and hilbertPolynomial of a
        graded module
      * idealsComplex -- creates the
        Billera-Schenck-Stillman chain complex of ideals
      * postulationNumber -- computes the largest
        degree at which the Hilbert function of the graded module M is not
        equal to the hilbertPolynomial
      * ringStructure -- given a sub-module of a free
        module (viewed as a ring with direct sum structure) which is also a
        sub-ring, creates a ring map whose image is the module with its ring
        structure
      * splineComplex -- creates the
        Billera-Schenck-Stillman chain complex
      * splineDimensionTable -- a table with the
        dimensions of the graded pieces of a graded module
      * splineMatrix -- compute matrix whose kernel is the
        module of $C^r$ splines on $\Delta$
      * splineModule -- compute the module of all splines
        on partition of a space
      * stanleyReisner -- Creates a ring map whose image
        is the ring of piecewise continuous polynomials on $\Delta$.  If
        $\Delta$ is simplicial, the Stanley Reisner ring of $\Delta$ is
        returned.
      * stanleyReisnerPresentation, --
        creates a ring map whose image is the sub-ring of $C^0(\Delta)$
        generated by $C^r(\Delta)$.  If $\Delta$ is simplicial, $C^0(\Delta)$
        is the Stanley Reisner ring of $\Delta$.
  * Methods
      * "cellularComplex(List)" -- see cellularComplex,
        -- create the cellular chain complex whose homologies are the singular
        homologies of the complex $\Delta$ relative to its boundary
      * "cellularComplex(List,List)" -- see cellularComplex,
        -- create the cellular chain complex whose homologies
        are the singular homologies of the complex $\Delta$ relative to its
        boundary
      * "courantFunctions(List,List)" -- see courantFunctions,
        -- returns the Courant functions of a simplicial
        complex
      * "formsList(List,List,ZZ)" -- see formsList, -- list of
        powers of (affine) linear forms cutting out a specified list of
        codimension one faces.
      * "generalizedSplines(List,List)" -- see generalizedSplines,
        -- the module of generalized splines associated to
        a simple graph with an edge labelling
      * "hilbertComparisonTable(ZZ,ZZ,Module)" -- see
        hilbertComparisonTable, -- a table to compare
        the values of the hilbertFunction and hilbertPolynomial of a graded
        module
      * "idealsComplex(List,List,ZZ)" -- see idealsComplex,
        -- creates the Billera-Schenck-Stillman chain complex of
        ideals
      * "postulationNumber(Module)" -- see postulationNumber,
        -- computes the largest degree at which the Hilbert
        function of the graded module M is not equal to the hilbertPolynomial
      * "ringStructure(Module)" -- see ringStructure, --
        given a sub-module of a free module (viewed as a ring with direct sum
        structure) which is also a sub-ring, creates a ring map whose image is
        the module with its ring structure
      * "splineComplex(List,List,ZZ)" -- see splineComplex,
        -- creates the Billera-Schenck-Stillman chain complex
      * "splineDimensionTable(ZZ,ZZ,List,ZZ)" -- see
        splineDimensionTable, -- a table with the
        dimensions of the graded pieces of a graded module
      * "splineDimensionTable(ZZ,ZZ,Module)" -- see splineDimensionTable,
        -- a table with the dimensions of the graded
        pieces of a graded module
      * "splineMatrix(List,List,List,ZZ)" -- see splineMatrix,
        -- compute matrix whose kernel is the module of $C^r$
        splines on $\Delta$
      * "splineMatrix(List,List,ZZ)" -- see splineMatrix,
        -- compute matrix whose kernel is the module of $C^r$ splines on
        $\Delta$
      * "splineMatrix(List,ZZ)" -- see splineMatrix, --
        compute matrix whose kernel is the module of $C^r$ splines on $\Delta$
      * "splineModule(List,List,List,ZZ)" -- see splineModule,
        -- compute the module of all splines on partition of a
        space
      * "splineModule(List,List,ZZ)" -- see splineModule,
        -- compute the module of all splines on partition of a space
      * "stanleyReisner(List,List)" -- see stanleyReisner,
        -- Creates a ring map whose image is the ring of
        piecewise continuous polynomials on $\Delta$.  If $\Delta$ is
        simplicial, the Stanley Reisner ring of $\Delta$ is returned.
      * "stanleyReisnerPresentation(List,List,ZZ)" -- see
        stanleyReisnerPresentation, -- creates a
        ring map whose image is the sub-ring of $C^0(\Delta)$ generated by
        $C^r(\Delta)$.  If $\Delta$ is simplicial, $C^0(\Delta)$ is the Stanley
        Reisner ring of $\Delta$.
  * Symbols
      * "RingType" -- see generalizedSplines, -- the
        module of generalized splines associated to a simple graph with an edge
        labelling
      * "GenVar" -- see ringStructure, -- given a
        sub-module of a free module (viewed as a ring with direct sum
        structure) which is also a sub-ring, creates a ring map whose image is
        the module with its ring structure
      * "IdempotentVar" -- see ringStructure, -- given a
        sub-module of a free module (viewed as a ring with direct sum
        structure) which is also a sub-ring, creates a ring map whose image is
        the module with its ring structure
      * "Trim" -- see ringStructure, -- given a sub-module
        of a free module (viewed as a ring with direct sum structure) which is
        also a sub-ring, creates a ring map whose image is the module with its
        ring structure
      * "VariableGens" -- see ringStructure, -- given a
        sub-module of a free module (viewed as a ring with direct sum
        structure) which is also a sub-ring, creates a ring map whose image is
        the module with its ring structure
      * "BaseRing" -- see splineMatrix, -- compute matrix
        whose kernel is the module of $C^r$ splines on $\Delta$
      * "ByFacets" -- see splineMatrix, -- compute matrix
        whose kernel is the module of $C^r$ splines on $\Delta$
      * "ByLinearForms" -- see splineMatrix, -- compute
        matrix whose kernel is the module of $C^r$ splines on $\Delta$
      * "Homogenize" -- see splineMatrix, -- compute matrix
        whose kernel is the module of $C^r$ splines on $\Delta$
      * "InputType" -- see splineMatrix, -- compute matrix
        whose kernel is the module of $C^r$ splines on $\Delta$
      * "VariableName" -- see splineMatrix, -- compute
        matrix whose kernel is the module of $C^r$ splines on $\Delta$

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

The object AlgebraicSplines, is a package (Macaulay2Doc).

cellularComplex -- create the cellular chain complex whose homologies are the singular homologies of the complex $\Delta$ relative to its boundary
**************************************************************************************************************************************************

Synopsis
========

  * Usage:
        C = cellularComplex(F,InputType=>Simplicial)  --for use only if $\Delta$ is simplicial
        C = cellularComplex(V,F)
  * Inputs:
      * V, a list (Macaulay2Doc), list of coordinates of vertices
        of $\Delta$
      * F, a list (Macaulay2Doc), list of facets of $\Delta$ (each
        facet is recorded as a list of indices of vertices taken from V)
  * Optional inputs (Macaulay2Doc),:
      * BaseRing (missing documentation) => a ring (Macaulay2Doc),
        default value null,
      * Homogenize (missing documentation) => a Boolean value (Macaulay2Doc),
        default value true,
      * CoefficientRing (missing documentation) => a ring (Macaulay2Doc),
        default value QQ,
      * VariableName (missing documentation) => a symbol (Macaulay2Doc),
        default value t,
      * InputType (missing documentation) => a string (Macaulay2Doc),
        default value "Polyhedral",
  * Outputs:
      * C, a chain complex (Macaulay2Doc), cellular chain
        complex of $\Delta$ relative to its boundary

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

This method returns the cellular chain complex of $\Delta$ relative to its
boundary.  If $\Delta$ is homeomorphic to a disk, the homologies will vanish
except for the top dimension.

+------------------------------------------------------+
|i1 : V = {{0,0},{1,0},{0,1},{-1,-1}};                 |
+------------------------------------------------------+
|i2 : F = {{0,1,2},{0,2,3},{0,1,3}};                   |
+------------------------------------------------------+
|i3 : C = cellularComplex(V,F)                         |
|                                                      |
|                 1                 3                 3|
|o3 = (QQ[t ..t ])  <-- (QQ[t ..t ])  <-- (QQ[t ..t ]) |
|          0   2             0   2             0   2   |
|                                                      |
|     0                 1                 2            |
|                                                      |
|o3 : ChainComplex                                     |
+------------------------------------------------------+
|i4 : prune HH C                                       |
|                                                      |
|o4 = 0 : 0                                            |
|                                                      |
|     1 : 0                                            |
|                                                      |
|                     1                                |
|     2 : (QQ[t ..t ])                                 |
|              0   2                                   |
|                                                      |
|o4 : GradedModule                                     |
+------------------------------------------------------+

If the complex is simplicial, there is no need for a vertex list.

+------------------------------------------------------+
|i5 : F = {{0,1,2},{0,1,3},{0,2,3}};                   |
+------------------------------------------------------+
|i6 : C = cellularComplex(F,InputType=>"Simplicial")   |
|                                                      |
|                 1                 3                 3|
|o6 = (QQ[t ..t ])  <-- (QQ[t ..t ])  <-- (QQ[t ..t ]) |
|          0   2             0   2             0   2   |
|                                                      |
|     0                 1                 2            |
|                                                      |
|o6 : ChainComplex                                     |
+------------------------------------------------------+

Arbitrary dimensions and polyhedral input are allowed.

+-----------------------------------------------------------------------------+
|i7 : V = {{1, 0, 0}, {-1, 0, 0}, {0, 1, 0}, {0, -1, 0}, {0, 0, 1}, {0, 0,    |
|-----------------------------------------------------------------------------|
|-1}, {-2, -2, -2}, {-2, 2, -2}, {2, 2, -2}, {2, -2, -2}, {-2, -2, 2}, {-2, 2,|
|-----------------------------------------------------------------------------|
|2}, {2, 2, 2}, {2, -2, 2}};                                                  |
+-----------------------------------------------------------------------------+
|i8 : F = {{0, 1, 2, 3, 4, 5}, {0, 8, 9, 12, 13}, {1, 6, 7, 10, 11}, {2, 7, 8,|
|-----------------------------------------------------------------------------|
|11, 12}, {3, 6, 9, 10, 13}, {4, 10, 11, 12, 13}, {5, 6, 7, 8, 9}, {0, 2, 8,  |
|-----------------------------------------------------------------------------|
|12}, {0, 3, 9, 13}, {0, 4, 12, 13}, {0, 5, 8, 9}, {1, 2, 7, 11}, {1, 3, 6,   |
|-----------------------------------------------------------------------------|
|10}, {1, 4, 10, 11}, {1, 5, 6, 7}, {2, 4, 11, 12}, {3, 4, 10, 13}, {3, 5, 6, |
|-----------------------------------------------------------------------------|
|9}, {2, 5, 7, 8}, {0, 2, 4, 12}, {0, 2, 5, 8}, {0, 3, 4, 13}, {0, 3, 5, 9},  |
|-----------------------------------------------------------------------------|
|{1, 2, 4, 11}, {1, 2, 5, 7}, {1, 3, 4, 10}, {1, 3, 5, 6}};                   |
+-----------------------------------------------------------------------------+
|i9 : C = cellularComplex(V,F);                                               |
+-----------------------------------------------------------------------------+
|i10 : prune HH C                                                             |
|                                                                             |
|o10 = 0 : 0                                                                  |
|                                                                             |
|      1 : 0                                                                  |
|                                                                             |
|      2 : 0                                                                  |
|                                                                             |
|                      1                                                      |
|      3 : (QQ[t ..t ])                                                       |
|               0   3                                                         |
|                                                                             |
|o10 : GradedModule                                                           |
+-----------------------------------------------------------------------------+

See also
========

  * idealsComplex -- creates the Billera-Schenck-Stillman
    chain complex of ideals
  * splineComplex -- creates the Billera-Schenck-Stillman
    chain complex

Ways to use cellularComplex:
============================

  * "cellularComplex(List)"
  * "cellularComplex(List,List)"

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

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

courantFunctions -- returns the Courant functions of a simplicial complex
*************************************************************************

Synopsis
========

  * Usage:
        M=courantFunctions(V,F)
  * Inputs:
      * V, a list (Macaulay2Doc), a list of vertex coordinates
      * F, a list (Macaulay2Doc), a list of facets, recorded as
        indices of V
  * Optional inputs (Macaulay2Doc),:
      * BaseRing (missing documentation) => a ring (Macaulay2Doc),
        default value null,
      * Homogenize (missing documentation) => a Boolean value (Macaulay2Doc),
        default value true,
      * CoefficientRing (missing documentation) => a ring (Macaulay2Doc),
        default value QQ,
      * VariableName (missing documentation) => a symbol (Macaulay2Doc),
        default value t,
      * InputType (missing documentation) => a string (Macaulay2Doc),
        default value "ByFacets",
  * Outputs:
      * M, a matrix (Macaulay2Doc), a matrix so that column $i$
        is the Courant function corresponding to vertex $V_i$

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

This method returns a matrix with as many rows as facets and as many columns as
vertices.  Column $i$ of the matrix is the Courant function corresponding to
vertex $V_i$.  This is the piecewise linear function which takes the value $1$
at the vertex $V_i$ and $0$ at all other vertices.

+--------------------------------------------+
|i1 : V={{0,0},{0,1},{-1,-1},{1,0}};         |
+--------------------------------------------+
|i2 : F={{0,1,2},{0,2,3},{0,1,3}};           |
+--------------------------------------------+
|i3 : courantFunctions(V,F)                  |
|                                            |
|o3 = | 2t_0-t_1+t_2  -t_0+t_1 -t_0 0       ||
|     | -t_0+2t_1+t_2 0        -t_1 t_0-t_1 ||
|     | -t_0-t_1+t_2  t_1      0    t_0     ||
|                                            |
|                        3                 4 |
|o3 : Matrix (QQ[t ..t ])  <-- (QQ[t ..t ])  |
|                 0   2             0   2    |
+--------------------------------------------+

If the option Homogenize=>false is given, the Courant function corresponding to
a cone vertex (if there is one) will be discarded.

+--------------------------------------------------------+
|i4 : S=QQ[x,y];                                         |
+--------------------------------------------------------+
|i5 : courantFunctions(V,F,Homogenize=>false,BaseRing=>S)|
|                                                        |
|o5 = | -x+y -x 0   |                                    |
|     | 0    -y x-y |                                    |
|     | y    0  x   |                                    |
|                                                        |
|             3      3                                   |
|o5 : Matrix S  <-- S                                    |
+--------------------------------------------------------+

The Courant functions are used to construct the Stanley Reisner ring of a
simplicial complex.  See stanleyReisner.

See also
========

  * stanleyReisner -- Creates a ring map whose image is
    the ring of piecewise continuous polynomials on $\Delta$.  If $\Delta$ is
    simplicial, the Stanley Reisner ring of $\Delta$ is returned.
  * ringStructure -- given a sub-module of a free module
    (viewed as a ring with direct sum structure) which is also a sub-ring,
    creates a ring map whose image is the module with its ring structure
  * stanleyReisnerPresentation -- creates a
    ring map whose image is the sub-ring of $C^0(\Delta)$ generated by
    $C^r(\Delta)$.  If $\Delta$ is simplicial, $C^0(\Delta)$ is the Stanley
    Reisner ring of $\Delta$.

Ways to use courantFunctions:
=============================

  * "courantFunctions(List,List)"

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

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

formsList -- list of powers of (affine) linear forms cutting out a specified list of codimension one faces.
***********************************************************************************************************

Synopsis
========

  * Usage:
        L = formsList(V,E,r)
  * Inputs:
      * V, a list (Macaulay2Doc), list of coordinates of vertices
      * E, a list (Macaulay2Doc), list of codimension 1 faces (each
        codimension 1 face is recorded as a list of indices of vertices taken
        from V)
      * r, an integer (Macaulay2Doc), desired degree of smoothness
  * Optional inputs (Macaulay2Doc),:
      * BaseRing (missing documentation) => a ring (Macaulay2Doc),
        default value null,
      * Homogenize (missing documentation) => a Boolean value (Macaulay2Doc),
        default value true,
      * CoefficientRing (missing documentation) => a ring (Macaulay2Doc),
        default value QQ,
      * VariableName (missing documentation) => a symbol (Macaulay2Doc),
        default value t,
      * InputType (missing documentation) => a string (Macaulay2Doc),
        default value "ByFacets",
  * Outputs:
      * L, a list (Macaulay2Doc), L = list of (affine) linear forms
        cutting out codimension one faces specified by E, raised to the power
        (r+1)

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

This method returns a list of (affine) linear forms cutting out codimension one
faces, raised to the power (r+1).

+-----------------------------------------------------------------------------+
|i1 : V = {{0,0},{1,0},{1,1},{0,1}};                                          |
+-----------------------------------------------------------------------------+
|i2 : E = {{0,1},{0,2},{0,3},{1,2},{2,3}};                                    |
+-----------------------------------------------------------------------------+
|i3 : formsList(V,E,0)                                                        |
|                                                                             |
|o3 = {t , t  - t , t , t  - t , t  - t }                                     |
|       1   0    1   0   0    2   1    2                                      |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
|i4 : S=QQ[x,y];--can specify the polynomial ring to use, and whether to      |
|-----------------------------------------------------------------------------|
|homogenize                                                                   |
+-----------------------------------------------------------------------------+
|i5 : formsList(V,E,0,BaseRing=>S,Homogenize=>false)                          |
|                                                                             |
|o5 = {y, x - y, x, x - 1, y - 1}                                             |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use formsList:
======================

  * "formsList(List,List,ZZ)"

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

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

generalizedSplines -- the module of generalized splines associated to a simple graph with an edge labelling
***********************************************************************************************************

Synopsis
========

  * Usage:
        M = generalizedSplines(E,I)
  * Inputs:
      * E, a list (Macaulay2Doc), list of edges of a graph (an edge
        is represented as a list with two elements)
      * I, a list (Macaulay2Doc), list of ideals in a ring
  * Optional inputs (Macaulay2Doc),:
      * RingType (missing documentation) => an integer (Macaulay2Doc),
        default value "Ambient",
  * Outputs:
      * M, a module (Macaulay2Doc), module of generalized splines
        on the graph with edges E and edge labels I

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

This method returns the module of generalized splines on a graph with edgeset E
on v vertices, whose edges are labelled by ideals of some ring R.  By
definition this is the submodule of $R^v$ consisting of tuples of polynomials
such that the difference of polynomials corresponding to adjacent vertices are
congruent module the ideal labelling the edge between them.

+-----------------------------------------------------------------------------+
|i1 : S = QQ[x_0,x_1,x_2]; --the underlying ring                              |
+-----------------------------------------------------------------------------+
|i2 : E = {{0,1},{1,2},{0,2}} --edges of the graph (in this case a triangle)  |
|                                                                             |
|o2 = {{0, 1}, {1, 2}, {0, 2}}                                                |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+
|i3 : I = {x_0-x_1,x_1-x_2,x_2-x_0} --ideals of S (elements of S are          |
|                                                                             |
|o3 = {x  - x , x  - x , - x  + x }                                           |
|       0    1   1    2     0    2                                            |
|                                                                             |
|o3 : List                                                                    |
|-----------------------------------------------------------------------------|
|interpreted as principal ideals)                                             |
+-----------------------------------------------------------------------------+
|i4 : generalizedSplines(E,I) --in this case this is the module of derivations|
|                                                                             |
|o4 = image | 1 x_0-x_2 0                          |                          |
|           | 1 x_1-x_2 x_0x_1-x_1^2-x_0x_2+x_1x_2 |                          |
|           | 1 0       0                          |                          |
|                                                                             |
|                             3                                               |
|o4 : S-module, submodule of S                                                |
|-----------------------------------------------------------------------------|
|on the $A_2$ arrangement                                                     |
+-----------------------------------------------------------------------------+

If edge labels are integers, generalizedSplines is computed as a ZZ module by
default.

+---------------------------------+
|i5 : E={{0,1},{1,2},{2,3},{0,3}};|
+---------------------------------+
|i6 : I={3,4,5,6};                |
+---------------------------------+
|i7 : generalizedSplines(E,I)     |
|                                 |
|o7 = image | -6  0   0   1 |     |
|           | -24 -12 -15 1 |     |
|           | 0   0   5   1 |     |
|           | 0   0   0   1 |     |
|                                 |
|                               4 |
|o7 : ZZ-module, submodule of ZZ  |
+---------------------------------+

The above splines may also be computed over ZZ modulo some integer.

+-----------------------------------------------------------------------------+
|i8 : E={{0,1},{1,2},{2,3},{0,3}};                                            |
+-----------------------------------------------------------------------------+
|i9 : I={3,4,5,6};                                                            |
+-----------------------------------------------------------------------------+
|i10 : generalizedSplines(E,I,RingType=>9) --computes spline module with      |
|                                                                             |
|o10 = image | 3 0 0 1 |                                                      |
|            | 0 3 0 1 |                                                      |
|            | 0 0 1 0 |                                                      |
|            | 0 0 0 1 |                                                      |
|                                                                             |
|      ZZ[]                       ZZ[] 4                                      |
|o10 : -----module, submodule of (----)                                       |
|        9                          9                                         |
|-----------------------------------------------------------------------------|
|underlying ring ZZ/9                                                         |
+-----------------------------------------------------------------------------+

Arbitrary ideals may also be entered as edge labels.

+--------------------------------------+
|i11 : S=QQ[x,y,z]                     |
|                                      |
|o11 = S                               |
|                                      |
|o11 : PolynomialRing                  |
+--------------------------------------+
|i12 : E={{1,2},{2,3},{3,4}}           |
|                                      |
|o12 = {{1, 2}, {2, 3}, {3, 4}}        |
|                                      |
|o12 : List                            |
+--------------------------------------+
|i13 : I={ideal(x,y),ideal(y),ideal(z)}|
|                                      |
|o13 = {ideal (x, y), ideal y, ideal z}|
|                                      |
|o13 : List                            |
+--------------------------------------+
|i14 : generalizedSplines(E,I)         |
|                                      |
|o14 = image | 1 y x 0 z |             |
|            | 1 0 0 y z |             |
|            | 1 0 0 0 z |             |
|            | 1 0 0 0 0 |             |
|                                      |
|                              4       |
|o14 : S-module, submodule of S        |
+--------------------------------------+

This method can be used to compute splines over non-linear partitions.  The
example below can be found in Exercise 13 of Section 8.3 in the book Using
Algebraic Geometry by Cox,Little, and O'Shea.

+-----------------------------------------------------------------------------+
|i15 : E={{0,1},{1,2},{0,2}};                                                 |
+-----------------------------------------------------------------------------+
|i16 : S=QQ[x,y];                                                             |
+-----------------------------------------------------------------------------+
|i17 : I={y-x^2,x+y^2,y-x^3};--these three curves meet at the origin          |
+-----------------------------------------------------------------------------+
|i18 : generalizedSplines(E,I)--this is the module of C^0 splines on the      |
|                                                                             |
|o18 = image | 1 -x4y-x3y2-x4-x3+xy2+y3+xy+y -x4y+x3y2+x4-x3+xy2-y3-xy+y      |
|            | 1 -xy3-x2y+xy2+x2             xy3+x2y+xy2-2y3+x2-2xy           |
|            | 1 0                           0                                |
|                                                                             |
|                              3                                              |
|o18 : S-module, submodule of S                                               |
|-----------------------------------------------------------------------------|
|partition                                                                    |
|                                                                             |
|-x5-x4y+x3y-x3+x2y+xy2-y2+y -x5+x4y+x3y+x3+x2y-xy2-y2-y |                    |
|-x2y2-x3+xy2+x2             x2y2+x3-xy2-x2              |                    |
|0                           0                           |                    |
+-----------------------------------------------------------------------------+

Ways to use generalizedSplines:
===============================

  * "generalizedSplines(List,List)"

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

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

hilbertComparisonTable -- a table to compare the values of the hilbertFunction and hilbertPolynomial of a graded module
***********************************************************************************************************************

Synopsis
========

  * Usage:
        T = hilbertComparisonTable(a,b,M)
  * Inputs:
      * a, an integer (Macaulay2Doc), lowest degree in the  table
      * b, an integer (Macaulay2Doc), largest degree in the table
      * M, a module (Macaulay2Doc), graded module
  * Outputs:
      * T, a table expression (Macaulay2Doc), table with the
        degrees and values of the hilbertFunction and hilbertPolynomial

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

The first row of the output table contains the degrees, the second row contains
the values of the hilbertFunction, the third row contains the values of the
hilbertPolynomial. In the following example, the hilbertFunction and polynomial
always agree.

+------------------------------------------------------+
|i1 : V = {{0,0},{1,0},{1,1},{0,1}}                    |
|                                                      |
|o1 = {{0, 0}, {1, 0}, {1, 1}, {0, 1}}                 |
|                                                      |
|o1 : List                                             |
+------------------------------------------------------+
|i2 : F = {{0,1,2},{0,2,3}}                            |
|                                                      |
|o2 = {{0, 1, 2}, {0, 2, 3}}                           |
|                                                      |
|o2 : List                                             |
+------------------------------------------------------+
|i3 : E = {{0,1},{0,2},{0,3},{1,2},{2,3}}              |
|                                                      |
|o3 = {{0, 1}, {0, 2}, {0, 3}, {1, 2}, {2, 3}}         |
|                                                      |
|o3 : List                                             |
+------------------------------------------------------+
|i4 : hilbertComparisonTable(0,8,splineModule(V,F,E,1))|
|                                                      |
|     +-----------+-+-+-+--+--+--+--+--+--+            |
|o4 = |Degree     |0|1|2|3 |4 |5 |6 |7 |8 |            |
|     +-----------+-+-+-+--+--+--+--+--+--+            |
|     |Dimension  |1|3|7|13|21|31|43|57|73|            |
|     +-----------+-+-+-+--+--+--+--+--+--+            |
|     |HilbertPoly|1|3|7|13|21|31|43|57|73|            |
|     +-----------+-+-+-+--+--+--+--+--+--+            |
+------------------------------------------------------+

The dimension of splines of degree at most d on a complex $\Delta$ is
eventually given by a polynomial in d, which is the Hilbert polynomial of the
spline module.  Below we illustrate with the Morgan-Scot partition.  Notice
that the Hilbert polynomial for the symmetric Morgan-Scot partition and the
asymmetric Morgan-Scot partition are the same, however the Hilbert functions
disagree in degree 2.

+-----------------------------------------------------------------------------+
|i5 : V = {{-1,-1},{1,-1},{0,1},{10,10},{-10,10},{0,-10}};                    |
+-----------------------------------------------------------------------------+
|i6 : V'= {{-1,-1},{1,-1},{0,1},{10,10},{-10,10},{1,-10}};                    |
+-----------------------------------------------------------------------------+
|i7 : F = {{0,1,2},{2,3,4},{0,4,5},{1,3,5},{1,2,3},{0,2,4},{0,1,5}};          |
+-----------------------------------------------------------------------------+
|i8 : M = splineModule(V,F,1);                                                |
+-----------------------------------------------------------------------------+
|i9 : hilbertPolynomial(M,Projective=>false)                                  |
|                                                                             |
|     7 2   15                                                                |
|o9 = -i  - --i + 7                                                           |
|     2      2                                                                |
|                                                                             |
|o9 : QQ[i]                                                                   |
+-----------------------------------------------------------------------------+
|i10 : M' = splineModule(V',F,1);                                             |
+-----------------------------------------------------------------------------+
|i11 : hilbertPolynomial(M',Projective=>false)                                |
|                                                                             |
|      7 2   15                                                               |
|o11 = -i  - --i + 7                                                          |
|      2      2                                                               |
|                                                                             |
|o11 : QQ[i]                                                                  |
+-----------------------------------------------------------------------------+
|i12 : hilbertComparisonTable(0,4,M)                                          |
|                                                                             |
|      +-----------+-+-+-+--+--+                                              |
|o12 = |Degree     |0|1|2|3 |4 |                                              |
|      +-----------+-+-+-+--+--+                                              |
|      |Dimension  |1|3|7|16|33|                                              |
|      +-----------+-+-+-+--+--+                                              |
|      |HilbertPoly|7|3|6|16|33|                                              |
|      +-----------+-+-+-+--+--+                                              |
+-----------------------------------------------------------------------------+
|i13 : postulationNumber(M) --final integer for which Hilbert function and    |
|                                                                             |
|o13 = 2                                                                      |
|-----------------------------------------------------------------------------|
|polynomial disagree                                                          |
+-----------------------------------------------------------------------------+
|i14 : hilbertComparisonTable(0,4,M')                                         |
|                                                                             |
|      +-----------+-+-+-+--+--+                                              |
|o14 = |Degree     |0|1|2|3 |4 |                                              |
|      +-----------+-+-+-+--+--+                                              |
|      |Dimension  |1|3|6|16|33|                                              |
|      +-----------+-+-+-+--+--+                                              |
|      |HilbertPoly|7|3|6|16|33|                                              |
|      +-----------+-+-+-+--+--+                                              |
+-----------------------------------------------------------------------------+
|i15 : postulationNumber(M')                                                  |
|                                                                             |
|o15 = 0                                                                      |
+-----------------------------------------------------------------------------+

In the following example, we compare the Hilbert polynomial and Hilbert
function of splines over a centrally triangulated octahedron; the behavior is
very similar to the Morgan-Scot partition, except there is an extra degree of
symmetry available which alters the Hilbert polynomials.  Notice the use of the
option Homogenize=>false to consider splines of degree precisely d instead of
splines of degree at most d.

+-----------------------------------------------------------------------------+
|i16 : V={{0,0,0},{1,0,0},{0,1,0},{0,0,1},{-1,0,0},{0,-1,0},{0,0,-1}}; --most |
|-----------------------------------------------------------------------------|
|symmetric variant                                                            |
+-----------------------------------------------------------------------------+
|i17 : V'={{0,0,0},{0,2,-1},{-1,-1,-1},{1,-1,-1},{0,-2,2},{1,1,2},{-1,1,2}};  |
|-----------------------------------------------------------------------------|
|--somewhat symmetric variant                                                 |
+-----------------------------------------------------------------------------+
|i18 : V''={{0,0,0},{10,1,1},{-1,10,1},{-1,1,10},{-10,1,-1},{1,-10,1},{-1,-1,-|
|-----------------------------------------------------------------------------|
|10}}; --asymmetric variant                                                   |
+-----------------------------------------------------------------------------+
|i19 : F={{0,1,2,3},{0,1,2,6},{0,1,3,5},{0,1,5,6},{0,2,3,4},{0,2,4,6},{0,3,4,5|
|-----------------------------------------------------------------------------|
|},{0,4,5,6}};                                                                |
+-----------------------------------------------------------------------------+
|i20 : M=splineModule(V,F,1,Homogenize=>false);                               |
+-----------------------------------------------------------------------------+
|i21 : hilbertPolynomial(M,Projective=>false)                                 |
|                                                                             |
|        2                                                                    |
|o21 = 4i  - 12i + 20                                                         |
|                                                                             |
|o21 : QQ[i]                                                                  |
+-----------------------------------------------------------------------------+
|i22 : M'=splineModule(V',F,1,Homogenize=>false);                             |
+-----------------------------------------------------------------------------+
|i23 : hilbertPolynomial(M',Projective=>false)                                |
|                                                                             |
|        2                                                                    |
|o23 = 4i  - 12i + 14                                                         |
|                                                                             |
|o23 : QQ[i]                                                                  |
+-----------------------------------------------------------------------------+
|i24 : M''=splineModule(V'',F,1,Homogenize=>false);                           |
+-----------------------------------------------------------------------------+
|i25 : hilbertPolynomial(M'',Projective=>false)                               |
|                                                                             |
|        2                                                                    |
|o25 = 4i  - 12i + 14                                                         |
|                                                                             |
|o25 : QQ[i]                                                                  |
+-----------------------------------------------------------------------------+
|i26 : hilbertComparisonTable(0,6,M)                                          |
|                                                                             |
|      +-----------+--+--+--+--+--+--+--+                                     |
|o26 = |Degree     |0 |1 |2 |3 |4 |5 |6 |                                     |
|      +-----------+--+--+--+--+--+--+--+                                     |
|      |Dimension  |1 |3 |9 |19|36|60|92|                                     |
|      +-----------+--+--+--+--+--+--+--+                                     |
|      |HilbertPoly|20|12|12|20|36|60|92|                                     |
|      +-----------+--+--+--+--+--+--+--+                                     |
+-----------------------------------------------------------------------------+
|i27 : postulationNumber(M) --largest integer for which Hilbert function and  |
|                                                                             |
|o27 = 3                                                                      |
|-----------------------------------------------------------------------------|
|polynomial disagree                                                          |
+-----------------------------------------------------------------------------+
|i28 : hilbertComparisonTable(0,6,M')                                         |
|                                                                             |
|      +-----------+--+-+-+--+--+--+--+                                       |
|o28 = |Degree     |0 |1|2|3 |4 |5 |6 |                                       |
|      +-----------+--+-+-+--+--+--+--+                                       |
|      |Dimension  |1 |3|7|14|30|54|86|                                       |
|      +-----------+--+-+-+--+--+--+--+                                       |
|      |HilbertPoly|14|6|6|14|30|54|86|                                       |
|      +-----------+--+-+-+--+--+--+--+                                       |
+-----------------------------------------------------------------------------+
|i29 : postulationNumber(M')                                                  |
|                                                                             |
|o29 = 2                                                                      |
+-----------------------------------------------------------------------------+
|i30 : hilbertComparisonTable(0,6,M'')                                        |
|                                                                             |
|      +-----------+--+-+-+--+--+--+--+                                       |
|o30 = |Degree     |0 |1|2|3 |4 |5 |6 |                                       |
|      +-----------+--+-+-+--+--+--+--+                                       |
|      |Dimension  |1 |3|6|14|30|54|86|                                       |
|      +-----------+--+-+-+--+--+--+--+                                       |
|      |HilbertPoly|14|6|6|14|30|54|86|                                       |
|      +-----------+--+-+-+--+--+--+--+                                       |
+-----------------------------------------------------------------------------+
|i31 : postulationNumber(M'')                                                 |
|                                                                             |
|o31 = 1                                                                      |
+-----------------------------------------------------------------------------+

Ways to use hilbertComparisonTable:
===================================

  * "hilbertComparisonTable(ZZ,ZZ,Module)"

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

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

idealsComplex -- creates the Billera-Schenck-Stillman chain complex of ideals
*****************************************************************************

Synopsis
========

  * Usage:
        C = idealsComplex(V,F,r)
  * Inputs:
      * V, a list (Macaulay2Doc), list of vertex coordinates of
        $\Delta$
      * F, a list (Macaulay2Doc), list of facets of $\Delta$ (each
        facet is recorded as a list of indices of vertices taken from V)
      * r, an integer (Macaulay2Doc), integer, desired degree of
        smoothness
  * Optional inputs (Macaulay2Doc),:
      * BaseRing (missing documentation) => a ring (Macaulay2Doc),
        default value null,
      * Homogenize (missing documentation) => a Boolean value (Macaulay2Doc),
        default value true,
      * CoefficientRing (missing documentation) => a ring (Macaulay2Doc),
        default value QQ,
      * VariableName (missing documentation) => a symbol (Macaulay2Doc),
        default value t,
  * Outputs:
      * C, a chain complex (Macaulay2Doc),
        Billera-Schenck-Stillman chain complex of ideals

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

This method returns the Billera-Schenck-Stillman chain complex of ideals whose
top homology is the module of non-trivial splines on $\Delta$.

+-------------------------------------+
|i1 : V = {{0,0},{1,0},{0,1},{-1,-1}};|
+-------------------------------------+
|i2 : F = {{0,1,2},{0,2,3},{0,1,3}};  |
+-------------------------------------+
|i3 : C = idealsComplex(V,F,1);       |
+-------------------------------------+
|i4 : prune HH C                      |
|                                     |
|o4 = 0 : 0                           |
|                                     |
|                     2               |
|     1 : (QQ[t ..t ])                |
|              0   2                  |
|                                     |
|     2 : 0                           |
|                                     |
|o4 : GradedModule                    |
+-------------------------------------+

The output from the above example shows that there is only one nonvanishing
homology, and it is free as a module over the polynomial ring in three
variables.

+----------------------------------------------------------------------------+
|i5 : V = {{-1,-1},{1,-1},{0,1},{-2,-2},{2,-2},{0,2}};                       |
+----------------------------------------------------------------------------+
|i6 : F = {{0,1,2},{0,1,3,4},{1,2,4,5},{0,2,3,5}};                           |
+----------------------------------------------------------------------------+
|i7 : C = idealsComplex(V,F,1);                                              |
+----------------------------------------------------------------------------+
|i8 : prune HH C                                                             |
|                                                                            |
|o8 = 0 : cokernel {2} | 8t_0 0        8t_1-2t_2 -2t_2    -2t_2    0        ||
|                  {2} | t_2  8t_0+t_2 t_2       8t_1+t_2 t_2      t_2      ||
|                  {2} | -t_2 -t_2     t_2       t_2      8t_1+t_2 8t_0-t_2 ||
|                                                                            |
|                     3                                                      |
|     1 : (QQ[t ..t ])                                                       |
|              0   2                                                         |
|                                                                            |
|     2 : 0                                                                  |
|                                                                            |
|o8 : GradedModule                                                           |
+----------------------------------------------------------------------------+

The output from the above example shows that there are two nonvanishing
homologies, but the spline module, which is (almost) the homology HH_1, is
still free.  This shows that freeness of the spline module does not depend on
vanishing of lower homologies if the underlying complex is polyhedral.

See also
========

  * cellularComplex -- create the cellular chain
    complex whose homologies are the singular homologies of the complex
    $\Delta$ relative to its boundary
  * splineComplex -- creates the Billera-Schenck-Stillman
    chain complex

Ways to use idealsComplex:
==========================

  * "idealsComplex(List,List,ZZ)"

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

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

postulationNumber -- computes the largest degree at which the Hilbert function of the graded module M is not equal to the hilbertPolynomial
*******************************************************************************************************************************************

Synopsis
========

  * Usage:
        v = postulationNumber(M)
  * Inputs:
      * M, a module (Macaulay2Doc), graded module
  * Outputs:
      * v, an integer (Macaulay2Doc), largest degree at which the
        Hilbert function of the graded module M is not equal to the
        hilbertPolynomial

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

This function computes the postulation number of M which is defined as the
largest degree at which the Hilbert function of the graded module M is not
equal to the hilbertPolynomial

+--------------------------------------------------+
|i1 : V = {{0,0},{1,0},{1,1},{0,1}};               |
+--------------------------------------------------+
|i2 : F = {{0,1,2},{0,2,3}};                       |
+--------------------------------------------------+
|i3 : E = {{0,1},{0,2},{0,3},{1,2},{2,3}};         |
+--------------------------------------------------+
|i4 : M = splineModule(V,F,E,2)                    |
|                                                  |
|o4 = image | 1 t_0^3-3t_0^2t_1+3t_0t_1^2-t_1^3 |  |
|           | 1 0                               |  |
|                                                  |
|                                                 2|
|o4 : QQ[t ..t ]-module, submodule of (QQ[t ..t ]) |
|         0   2                            0   2   |
+--------------------------------------------------+
|i5 : postulationNumber(M)                         |
|                                                  |
|o5 = 0                                            |
+--------------------------------------------------+

Ways to use postulationNumber:
==============================

  * "postulationNumber(Module)"

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

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

ringStructure -- given a sub-module of a free module (viewed as a ring with direct sum structure) which is also a sub-ring, creates a ring map whose image is the module with its ring structure
************************************************************************************************************************************************************************************************

Synopsis
========

  * Usage:
        phi=ringStructure(M)
  * Inputs:
      * M, a module (Macaulay2Doc), a sub-module of a free module
        over a polynomial ring which is also a sub-ring
  * Optional inputs (Macaulay2Doc),:
      * GenVar (missing documentation) => a symbol (Macaulay2Doc),
        default value Y,
      * IdempotentVar (missing documentation) => a symbol (Macaulay2Doc),
        default value e,
      * Trim (missing documentation) => a symbol (Macaulay2Doc),
        default value false,
      * VariableGens (missing documentation) => a symbol (Macaulay2Doc),
        default value true,
  * Outputs:
      * phi, a ring map (Macaulay2Doc), map of rings whose image
        is the module M with its ring structure, assuming M contains the
        identity element

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

Let M be a sub-module of the free module $R^k$, where $R=K[x_0,\ldots,x_n]$ for
some field K.  We view $R^k=Re_0+Re_1+\cdots+Re_{k-1}$ as a ring with
component-wise multiplication (i.e. $e_0,\ldots,e_{k-1}$ are idempotents).
Suppose further that the identity element of $R^k$, namely
$e=e_0+\cdots+e_{k-1}$, is an element of M.  Then the M is also a ring; this
method creates a map whose image is M with its ring structure.

+-----------------------------------------------------------------------------+
|i1 : V={{0,1},{1,0},{0,-1},{-1,0}};                                          |
+-----------------------------------------------------------------------------+
|i2 : F={{0,1,2},{0,2,3}};--two triangles meeting along an edge               |
+-----------------------------------------------------------------------------+
|i3 : R=QQ[x,y];                                                              |
+-----------------------------------------------------------------------------+
|i4 : M=splineModule(V,F,1,BaseRing=>R,Homogenize=>false);--create spline     |
|-----------------------------------------------------------------------------|
|module                                                                       |
+-----------------------------------------------------------------------------+
|i5 : phi=ringStructure(M)                                                    |
|                                                                             |
|              QQ[e ..e , x..y]                                               |
|                  0   1                                                   2  |
|o5 = map (------------------------, QQ[Y ..Y ], {e x + e x, e y + e y, e x })|
|                  2        2            0   2     0     1    0     1    0    |
|          (e e , e  - e , e  - e )                                           |
|            0 1   0    0   1    1                                            |
|                                                                             |
|                 QQ[e ..e , x..y]                                            |
|                     0   1                                                   |
|o5 : RingMap ------------------------ <-- QQ[Y ..Y ]                         |
|                     2        2               0   2                          |
|             (e e , e  - e , e  - e )                                        |
|               0 1   0    0   1    1                                         |
+-----------------------------------------------------------------------------+

The target of the map is $R^k$ as a ring.

+-----------------------------------------------------------------------------+
|i6 : T=target phi;                                                           |
+-----------------------------------------------------------------------------+
|i7 : describe T --direct sum of two copies of R, one for each face; e_i      |
|                                                                             |
|         QQ[e ..e , x..y]                                                    |
|             0   1                                                           |
|o7 = ------------------------                                                |
|             2        2                                                      |
|     (e e , e  - e , e  - e )                                                |
|       0 1   0    0   1    1                                                 |
|-----------------------------------------------------------------------------|
|corresponds to the face F_i                                                  |
+-----------------------------------------------------------------------------+

As above, write $e$ for the identity of $R^k$.  Then the generators for $M$ as
a sub-ring of $R^k$ are the generators of $M$ as an $R$-module (other than
$e$), together with the generators $x_0e,x_1e,\ldots,x_ne$.  The source of the
map created by ringStructure(M) is a polynomial ring in variables
$Y_0,\ldots,Y_n,Y_{n+1},\cdots,Y_m$, where $Y_0,\cdots,Y_n$ correspond to the
generators $x_0e,\ldots,x_ne$ and $Y_{n+1},\cdots,Y_m$ correspond to the usual
generators of M (except for e, if it happens to be a generator of M).

+-----------------------------------------------------------------------------+
|i8 : H=source phi;                                                           |
+-----------------------------------------------------------------------------+
|i9 : describe H --polynomial ring in three variables, one for each           |
|                                                                             |
|o9 = QQ[Y ..Y , Degrees => {2:1, 2}, Heft => {1}, MonomialOrder =>           |
|         0   2                                                               |
|                                                                             |
|-----------------------------------------------------------------------------|
|generator of R and each (non-identity) generator of M                        |
|                                                                             |
|{MonomialSize => 32 }]                                                       |
|{GRevLex => {2:1, 2}}                                                        |
|{Position => Up     }                                                        |
+-----------------------------------------------------------------------------+
|i10 : scan(3,i->print phi(H_i))--these are the splines the variables map to  |
|e x + e x                                                                    |
| 0     1                                                                     |
|e y + e y                                                                    |
| 0     1                                                                     |
|   2                                                                         |
|e x                                                                          |
| 0                                                                           |
+-----------------------------------------------------------------------------+

The kernel of the map created by ringStructure(M) is the ideal of relations on
the ring generators.  If M is graded, the grading on the source of the map
matches up with the grading on M.

+-----------------------------------------------------------------------------+
|i11 : degrees H --degrees of variables are same as degrees of generators of M|
|                                                                             |
|o11 = {{1}, {1}, {2}}                                                        |
|                                                                             |
|o11 : List                                                                   |
+-----------------------------------------------------------------------------+
|i12 : I=ker phi--the ideal of relations among generators                     |
|                                                                             |
|             2      2                                                        |
|o12 = ideal(Y Y  - Y )                                                       |
|             0 2    2                                                        |
|                                                                             |
|o12 : Ideal of H                                                             |
+-----------------------------------------------------------------------------+
|i13 : reduceHilbert(hilbertSeries (H/I))--cokernel of phi has the same graded|
|                                                                             |
|            2                                                                |
|       1 + T                                                                 |
|o13 = --------                                                               |
|             2                                                               |
|      (1 - T)                                                                |
|                                                                             |
|o13 : Expression of class Divide                                             |
|-----------------------------------------------------------------------------|
|structure as M                                                               |
+-----------------------------------------------------------------------------+
|i14 : reduceHilbert(hilbertSeries M)                                         |
|                                                                             |
|            2                                                                |
|       1 + T                                                                 |
|o14 = --------                                                               |
|             2                                                               |
|      (1 - T)                                                                |
|                                                                             |
|o14 : Expression of class Divide                                             |
+-----------------------------------------------------------------------------+

It often happens that module generators are redundant as ring generators.
These can be eliminated with the option Trim=>true.  The remaining variables in
the source ring retain their indexing from the output of ringStructure without
the Trim=>true option.

+-----------------------------------------------------------------------------+
|i15 : V={{0,0},{0,1},{-1,-1},{1,0}};                                         |
+-----------------------------------------------------------------------------+
|i16 : F={{0,1,2},{0,2,3},{0,1,3}};--three triangles meeting at (and          |
|-----------------------------------------------------------------------------|
|surrounding) a vertex                                                        |
+-----------------------------------------------------------------------------+
|i17 : R=QQ[x,y];                                                             |
+-----------------------------------------------------------------------------+
|i18 : M=splineModule(V,F,0,BaseRing=>R,Homogenize=>false);                   |
+-----------------------------------------------------------------------------+
|i19 : phi = ringStructure(M);                                                |
|                                                                             |
|                             QQ[e ..e , x..y]                                |
|                                 0   2                                       |
|o19 : RingMap --------------------------------------------- <-- QQ[Y ..Y ]   |
|                                  2        2        2               0   3    |
|              (e e , e e , e e , e  - e , e  - e , e  - e )                  |
|                0 1   0 2   1 2   0    0   1    1   2    2                   |
+-----------------------------------------------------------------------------+
|i20 : ker phi --notice a generator involves an isolated variable             |
|                                                                             |
|                                  2                                          |
|o20 = ideal (Y Y  - Y Y , Y Y  - Y  - Y )                                    |
|              1 3    2 3   0 2    2    3                                     |
|                                                                             |
|o20 : Ideal of QQ[Y ..Y ]                                                    |
|                   0   3                                                     |
+-----------------------------------------------------------------------------+
|i21 : phi' = ringStructure(M,Trim=>true);                                    |
|                                                                             |
|                             QQ[e ..e , x..y]                                |
|                                 0   2                                       |
|o21 : RingMap --------------------------------------------- <-- QQ[Y ..Y ]   |
|                                  2        2        2               0   2    |
|              (e e , e e , e e , e  - e , e  - e , e  - e )                  |
|                0 1   0 2   1 2   0    0   1    1   2    2                   |
+-----------------------------------------------------------------------------+
|i22 : ker phi' --now all variables correspond to irredundant generators      |
|                                                                             |
|                        2      2    3                                        |
|o22 = ideal(Y Y Y  - Y Y  - Y Y  + Y )                                       |
|             0 1 2    0 2    1 2    2                                        |
|                                                                             |
|o22 : Ideal of QQ[Y ..Y ]                                                    |
|                   0   2                                                     |
+-----------------------------------------------------------------------------+

If $\Delta$ is a simplicial complex, write $\Delta_0$ for its vertices and
$K[\Delta]$ for the Stanley-Reisner ring of $\Delta$, which is the quotient of
the polynomial ring $K[X_v:v\in\Delta_0]$ by monomials corresponding to
non-faces.  Then, as a ring, $C^0(\Delta)$ is isomorphic to the so-called
affine Stanley Reisner ring $\frac{K[\Delta]}{(1-\sum_{v} X_v)K[\Delta]}$.  If
$\Delta$ is a cone, as above, then the affine Stanley Reisner ring is just the
Stanley Reisner ring of the decone of $\Delta$.  In the above example the
decone is an empty triangle, so $C^0(\Delta)$ should be isomorphic to a
polynomial ring in three variables modulo the ideal generated by the product of
the variables.  The isomorphism can be seen by the following change of
variables.  Alternatively, the ring structure of $C^0(\Delta)$ with this
preferred set of generators is obtained with the command stanleyReisner.

+-------------------------------------------------+
|i23 : f = (ker phi')_0                           |
|                                                 |
|                  2      2    3                  |
|o23 = Y Y Y  - Y Y  - Y Y  + Y                   |
|       0 1 2    0 2    1 2    2                  |
|                                                 |
|o23 : QQ[Y ..Y ]                                 |
|          0   2                                  |
+-------------------------------------------------+
|i24 : sub(f,{Y_0=>Y_0-Y_1,Y_1=>Y_0-Y_2,Y_2=>Y_0})|
|                                                 |
|o24 = Y Y Y                                      |
|       0 1 2                                     |
|                                                 |
|o24 : QQ[Y ..Y ]                                 |
|          0   2                                  |
+-------------------------------------------------+

To obtain the sub-ring of $R^k$ which is generated by a specific set of module
generators of M, i.e. without adding $x_0e,\ldots,x_ne$ as ring generators, use
the option VariableGens=>false.  This may be done if the user has a particular
choice of ring generators they would like to use - for instance the Courant
functions.  See courantFunctions.

We may also use ringStructure to create the ring of splines for more general
spline modules created using the generalizedSplines,
method.

+-----------------------------------------------------------------------------+
|i25 : E={{0,1},{1,2},{0,2}};                                                 |
+-----------------------------------------------------------------------------+
|i26 : S=QQ[x,y];                                                             |
+-----------------------------------------------------------------------------+
|i27 : I={y-x^2,x+y^2,y-x^3};                                                 |
+-----------------------------------------------------------------------------+
|i28 : C0=generalizedSplines(E,I);--splines on a non-linear partition         |
+-----------------------------------------------------------------------------+
|i29 : ringStructure(C0)                                                      |
|                                                                             |
|                          QQ[e ..e , x..y]                                   |
|                              0   2                                          |
|o29 = map (---------------------------------------------, QQ[Y ..Y ], {e x + |
|                               2        2        2            0   5     0    |
|           (e e , e e , e e , e  - e , e  - e , e  - e )                     |
|             0 1   0 2   1 2   0    0   1    1   2    2                      |
|                                                                             |
|                             QQ[e ..e , x..y]                                |
|                                 0   2                                       |
|o29 : RingMap --------------------------------------------- <-- QQ[Y ..Y ]   |
|                                  2        2        2               0   5    |
|              (e e , e e , e e , e  - e , e  - e , e  - e )                  |
|                0 1   0 2   1 2   0    0   1    1   2    2                   |
|-----------------------------------------------------------------------------|
|                                 4       3 2      4      3        2      3   |
|e x + e x, e y + e y + e y, - e x y - e x y  - e x  - e x  + e x*y  + e y  + |
| 1     2    0     1     2      0       0        0      0      0        0     |
|-----------------------------------------------------------------------------|
|                   3      2         2      2       4       3 2      4      3 |
|e x*y + e y - e x*y  - e x y + e x*y  + e x , - e x y + e x y  + e x  - e x  |
| 0       0     1        1       1        1       0       0        0      0   |
|-----------------------------------------------------------------------------|
|       2      3                      3      2         2       3      2       |
|+ e x*y  - e y  - e x*y + e y + e x*y  + e x y + e x*y  - 2e y  + e x  -     |
|   0        0      0       0     1        1       1         1      1         |
|-----------------------------------------------------------------------------|
|             5      4       3       3      2         2      2            2 2 |
|2e x*y, - e x  - e x y + e x y - e x  + e x y + e x*y  - e y  + e y - e x y  |
|  1        0      0       0       0      0       0        0      0     1     |
|-----------------------------------------------------------------------------|
|     3        2      2       5      4       3       3      2         2      2|
|- e x  + e x*y  + e x , - e x  + e x y + e x y + e x  + e x y - e x*y  - e y |
|   1      1        1       0      0       0       0      0       0        0  |
|-----------------------------------------------------------------------------|
|           2 2      3        2      2                                        |
|- e y + e x y  + e x  - e x*y  - e x })                                      |
|   0     1        1      1        1                                          |
+-----------------------------------------------------------------------------+

Caveat
======

The Trim option will not work for quotients of polynomial rings over ZZ or ZZ
modulo a non-prime integer.

See also
========

  * courantFunctions -- returns the Courant functions
    of a simplicial complex
  * stanleyReisner -- Creates a ring map whose image is
    the ring of piecewise continuous polynomials on $\Delta$.  If $\Delta$ is
    simplicial, the Stanley Reisner ring of $\Delta$ is returned.
  * stanleyReisnerPresentation -- creates a
    ring map whose image is the sub-ring of $C^0(\Delta)$ generated by
    $C^r(\Delta)$.  If $\Delta$ is simplicial, $C^0(\Delta)$ is the Stanley
    Reisner ring of $\Delta$.

Ways to use ringStructure:
==========================

  * "ringStructure(Module)"

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

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

splineComplex -- creates the Billera-Schenck-Stillman chain complex
*******************************************************************

Synopsis
========

  * Usage:
        C = splineComplex(V,F,r)
  * Inputs:
      * V, a list (Macaulay2Doc), list of vertex coordinates of
        $\Delta$
      * F, a list (Macaulay2Doc), list of facets of $\Delta$ (each
        facet is recorded as a list of indices of vertices taken from V)
      * r, an integer (Macaulay2Doc), integer, desired degree of
        smoothness
  * Optional inputs (Macaulay2Doc),:
      * BaseRing (missing documentation) => a ring (Macaulay2Doc),
        default value null,
      * Homogenize (missing documentation) => a Boolean value (Macaulay2Doc),
        default value true,
      * CoefficientRing (missing documentation) => a ring (Macaulay2Doc),
        default value QQ,
      * VariableName (missing documentation) => a symbol (Macaulay2Doc),
        default value t,
  * Outputs:
      * C, a chain complex (Macaulay2Doc),
        Billera-Schenck-Stillman spline complex

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

This method returns the Billera-Schenck-Stillman chain complex whose top
homology is the module of splines on $\Delta$.

+-------------------------------------+
|i1 : V = {{0,0},{1,0},{0,1},{-1,-1}};|
+-------------------------------------+
|i2 : F = {{0,1,2},{0,2,3},{0,1,3}};  |
+-------------------------------------+
|i3 : C = splineComplex(V,F,1);       |
+-------------------------------------+
|i4 : prune HH C                      |
|                                     |
|o4 = 0 : 0                           |
|                                     |
|     1 : 0                           |
|                                     |
|                     3               |
|     2 : (QQ[t ..t ])                |
|              0   2                  |
|                                     |
|o4 : GradedModule                    |
+-------------------------------------+

The output from the above example shows that there is only one nonvanishing
homology, and it is free as a module over the polynomial ring in three
variables. Notice that the rank is one more than the corresponding nonvanishing
homology given by idealsComplex.

+------------------------------------------------------------------+
|i5 : V = {{-1,-1},{1,-1},{0,1},{-2,-2},{2,-2},{0,2}};             |
+------------------------------------------------------------------+
|i6 : F = {{0,1,2},{0,1,3,4},{1,2,4,5},{0,2,3,5}};                 |
+------------------------------------------------------------------+
|i7 : C = splineComplex(V,F,1);                                    |
+------------------------------------------------------------------+
|i8 : prune HH C                                                   |
|                                                                  |
|o8 = 0 : 0                                                        |
|                                                                  |
|     1 : cokernel {2} | t_0+t_2 -t_2    t_2  t_1-t_2 -t_2    t_2 ||
|                  {2} | t_2     t_0-t_2 t_1  0       0       t_2 ||
|                  {2} | 0       0       -t_2 t_2     t_1+t_2 t_0 ||
|                                                                  |
|                     4                                            |
|     2 : (QQ[t ..t ])                                             |
|              0   2                                               |
|                                                                  |
|o8 : GradedModule                                                 |
+------------------------------------------------------------------+

The output from the above example shows that there are two nonvanishing
homologies, but the spline module, which is (almost) the homology HH_1, is
still free.  This shows that freeness of the spline module does not depend on
vanishing of lower homologies if the underlying complex is polyhedral.

+--------------------------------------------------------------------+
|i9 : R = (ZZ/4021)[x,y,z];                                          |
+--------------------------------------------------------------------+
|i10 : V = {{-1,-1},{1,-1},{0,1},{10,10},{-10,10},{0,-10}};          |
+--------------------------------------------------------------------+
|i11 : V'= {{-1,-1},{1,-1},{0,1},{10,10},{-10,10},{1,-10}};          |
+--------------------------------------------------------------------+
|i12 : F = {{0,1,2},{2,3,4},{0,4,5},{1,3,5},{1,2,3},{0,2,4},{0,1,5}};|
+--------------------------------------------------------------------+
|i13 : C = splineComplex(V,F,1,BaseRing=>R);                         |
+--------------------------------------------------------------------+
|i14 : C' = splineComplex(V',F,1,BaseRing=>R);                       |
+--------------------------------------------------------------------+
|i15 : prune HH C                                                    |
|                                                                    |
|o15 = 0 : 0                                                         |
|                                                                    |
|      1 : cokernel {2} | z y x |                                    |
|                                                                    |
|      2 : cokernel {0} | 0                    |                     |
|                   {2} | y3+y2z-yz2-z3        |                     |
|                   {3} | 1978y2-1374yz-604z2  |                     |
|                   {3} | 545y2-545z2          |                     |
|                   {3} | 1123y2+1805yz+1093z2 |                     |
|                   {4} | -535y-1599z          |                     |
|                   {4} | -1978x-545y+545z     |                     |
|                   {4} | 535x                 |                     |
|                                                                    |
|o15 : GradedModule                                                  |
+--------------------------------------------------------------------+
|i16 : prune HH C'                                                   |
|                                                                    |
|o16 = 0 : 0                                                         |
|                                                                    |
|      1 : 0                                                         |
|                                                                    |
|           7                                                        |
|      2 : R                                                         |
|                                                                    |
|o16 : GradedModule                                                  |
+--------------------------------------------------------------------+

The above example is known as the Morgan-Scot partition.  It shows how subtle
spline calculations can be.  Note that the spline module over the symmetric
Morgan-Scot partition above (vertices V) is not free, while the spline module
over the non-symmetric Morgan-Scot partition is free.

+--------------------------------------------------------------------+
|i17 : R = QQ[x,y,z];                                                |
+--------------------------------------------------------------------+
|i18 : V = {{-1,-1},{1,-1},{0,1},{10,10},{-10,10},{0,-10}};          |
+--------------------------------------------------------------------+
|i19 : F = {{0,1,2},{2,3,4},{0,4,5},{1,3,5},{1,2,3},{0,2,4},{0,1,5}};|
+--------------------------------------------------------------------+
|i20 : Id = idealsComplex(V,F,1,BaseRing=>R);                        |
+--------------------------------------------------------------------+
|i21 : C = cellularComplex(V,F,BaseRing=>R);                         |
+--------------------------------------------------------------------+
|i22 : phi = inducedMap(C,Id);                                       |
+--------------------------------------------------------------------+
|i23 : SC = splineComplex(V,F,1,BaseRing=>R);                        |
+--------------------------------------------------------------------+
|i24 : SC == (coker phi)                                             |
|                                                                    |
|o24 = true                                                          |
+--------------------------------------------------------------------+

The above example shows that the Billera-Schenck-Stillman spline complex is the
cokernel of the natural map between the complex of ideals (given by
idealsComplex) and the cellular chain complex of $\Delta$ relative to its
boundary.

+-----------------------------------------------------------------------------+
|i25 : V = {{1, 0, 0}, {-1, 0, 0}, {0, 1, 0}, {0, -1, 0}, {0, 0, 1}, {0, 0,   |
|-----------------------------------------------------------------------------|
|-1}, {-2, -2, -2}, {-2, 2, -2}, {2, 2, -2}, {2, -2, -2}, {-2, -2, 2}, {-2, 2,|
|-----------------------------------------------------------------------------|
|2}, {2, 2, 2}, {2, -2, 2}};                                                  |
+-----------------------------------------------------------------------------+
|i26 : F = {{0, 1, 2, 3, 4, 5}, {0, 8, 9, 12, 13}, {1, 6, 7, 10, 11}, {2, 7,  |
|-----------------------------------------------------------------------------|
|8, 11, 12}, {3, 6, 9, 10, 13}, {4, 10, 11, 12, 13}, {5, 6, 7, 8, 9}, {0, 2,  |
|-----------------------------------------------------------------------------|
|8, 12}, {0, 3, 9, 13}, {0, 4, 12, 13}, {0, 5, 8, 9}, {1, 2, 7, 11}, {1, 3, 6,|
|-----------------------------------------------------------------------------|
|10}, {1, 4, 10, 11}, {1, 5, 6, 7}, {2, 4, 11, 12}, {3, 4, 10, 13}, {3, 5, 6, |
|-----------------------------------------------------------------------------|
|9}, {2, 5, 7, 8}, {0, 2, 4, 12}, {0, 2, 5, 8}, {0, 3, 4, 13}, {0, 3, 5, 9},  |
|-----------------------------------------------------------------------------|
|{1, 2, 4, 11}, {1, 2, 5, 7}, {1, 3, 4, 10}, {1, 3, 5, 6}};                   |
+-----------------------------------------------------------------------------+
|i27 : C = splineComplex(V,F,1);                                              |
+-----------------------------------------------------------------------------+
|i28 : associatedPrimes annihilator HH_2 C                                    |
|                                                                             |
|o28 = {ideal (t , t , t ), ideal (t , t , t ), ideal (t , t , t ), ideal (t ,|
|               3   2   1           3   2   0           3   1   0           2 |
|      -----------------------------------------------------------------------|
|      t , t  - t ), ideal (t , t , t  + t ), ideal (t , t  - t , t ), ideal  |
|       1   0    3           2   1   0    3           2   1    3   0          |
|      -----------------------------------------------------------------------|
|      (t , t  + t , t ), ideal (t  - 2t , t  - 2t , t  - 2t ), ideal (t  -   |
|        2   1    3   0           2     3   1     3   0     3           2     |
|      -----------------------------------------------------------------------|
|      2t , t  - 2t , t  + 2t ), ideal (t  - 2t , t  + 2t , t  - 2t ), ideal  |
|        3   1     3   0     3           2     3   1     3   0     3          |
|      -----------------------------------------------------------------------|
|      (t  - 2t , t  + 2t , t  + 2t ), ideal (t  - t , t , t ), ideal (t  +   |
|        2     3   1     3   0     3           2    3   1   0           2     |
|      -----------------------------------------------------------------------|
|      t , t , t ), ideal (t  + 2t , t  - 2t , t  - 2t ), ideal (t  + 2t , t  |
|       3   1   0           2     3   1     3   0     3           2     3   1 |
|      -----------------------------------------------------------------------|
|      - 2t , t  + 2t ), ideal (t  + 2t , t  + 2t , t  - 2t ), ideal (t  +    |
|          3   0     3           2     3   1     3   0     3           2      |
|      -----------------------------------------------------------------------|
|      2t , t  + 2t , t  + 2t ), ideal (t , t , t , t )}                      |
|        3   1     3   0     3           3   2   1   0                        |
|                                                                             |
|o28 : List                                                                   |
+-----------------------------------------------------------------------------+

The above example showcases a fairly complex three dimensional polyhedral
complex. It is a three-dimensional analog of the Morgan-Scot partition in the
sense that it consists of an octahedron inside of a cube (note these are dual
polytopes).  Its facets consist of the octahedron, twelve tetrahedra coming
from joining dual edges on the cube and the octahedron, and six 'Egyptian
pyramids' coming from joining each vertex of the octahedron to a square face on
the cube. The homologies of this spline complex are quite interesting.  The two
lower homologies vanish (the lowest always does). The top homology (HH_3) is
the spline module.  The second homology is nonzero and illustrates the fact
that the associated primes of the homologies of the spline complex are all
linear. There is an associated prime for every vertex of the complex, plus
three more that lie on the hyperplane at infinity, plus the maximal ideal.

See also
========

  * cellularComplex -- create the cellular chain
    complex whose homologies are the singular homologies of the complex
    $\Delta$ relative to its boundary
  * idealsComplex -- creates the Billera-Schenck-Stillman
    chain complex of ideals

Ways to use splineComplex:
==========================

  * "splineComplex(List,List,ZZ)"

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

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

splineDimensionTable -- a table with the dimensions of the graded pieces of a graded module
*******************************************************************************************

Synopsis
========

  * Usage:
        T=splineDimensionTable(a,b,M)
        T=splineDimensionTable(a,b,L,r)
  * Inputs:
      * a, an integer (Macaulay2Doc), lowest degree in the table
      * b, an integer (Macaulay2Doc), largest degree in the table
      * M, a module (Macaulay2Doc), graded module
      * L, a list (Macaulay2Doc), a list {V,F,E} of the vertices,
        facets and codimension one faces of a polyhedral complex
      * r, an integer (Macaulay2Doc), degree of smoothnes
  * Outputs:
      * T, a table expression (Macaulay2Doc), T= table with the
        dimensions of the graded pieces of M in the range a,b

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

The output table gives you the dimensions of the graded pieces of the module M
where the degree is between a and b.

+-----------------------------------------+
|i1 : V = {{0,0},{1,0},{1,1},{0,1}};      |
+-----------------------------------------+
|i2 : F = {{0,1,2},{0,2,3}};              |
+-----------------------------------------+
|i3 : E = {{0,1},{0,2},{0,3},{1,2},{2,3}};|
+-----------------------------------------+
|i4 : M=splineModule(V,F,E,2);            |
+-----------------------------------------+
|i5 : splineDimensionTable(0,8,M)         |
|                                         |
|     +---------+-+-+-+--+--+--+--+--+--+ |
|o5 = |Degree   |0|1|2|3 |4 |5 |6 |7 |8 | |
|     +---------+-+-+-+--+--+--+--+--+--+ |
|     |Dimension|1|3|6|11|18|27|38|51|66| |
|     +---------+-+-+-+--+--+--+--+--+--+ |
+-----------------------------------------+

The table above records the dimensions dim$S^2_d(\Delta)$ (i.e. splines on
$\Delta$ of smoothness 2 and degree at most d) for $d=$0,..,8.

You may instead input the list L={V,F,E} (or L={V,F}) of the vertices, facets
and codimension one faces of the complex $\Delta$.

+----------------------------------------+
|i6 : V = {{0,0},{1,0},{1,1},{0,1}};     |
+----------------------------------------+
|i7 : F = {{0,1,2},{0,2,3}};             |
+----------------------------------------+
|i8 : L = {V,F,E};                       |
+----------------------------------------+
|i9 : splineDimensionTable(0,8,L,2)      |
|                                        |
|     +---------+-+-+-+--+--+--+--+--+--+|
|o9 = |Degree   |0|1|2|3 |4 |5 |6 |7 |8 ||
|     +---------+-+-+-+--+--+--+--+--+--+|
|     |Dimension|1|3|6|11|18|27|38|51|66||
|     +---------+-+-+-+--+--+--+--+--+--+|
+----------------------------------------+

The following complex, known as the Morgan-Scot partition, illustrates the
subtle changes in dimension of spline spaces which may occur depending on
geometry.

+--------------------------------------------------------------------+
|i10 : V = {{-1,-1},{1,-1},{0,1},{10,10},{-10,10},{0,-10}};          |
+--------------------------------------------------------------------+
|i11 : V'= {{-1,-1},{1,-1},{0,1},{10,10},{-10,10},{1,-10}};          |
+--------------------------------------------------------------------+
|i12 : F = {{0,1,2},{2,3,4},{0,4,5},{1,3,5},{1,2,3},{0,2,4},{0,1,5}};|
+--------------------------------------------------------------------+
|i13 : M = splineModule(V,F,1);                                      |
+--------------------------------------------------------------------+
|i14 : M' = splineModule(V',F,1);                                    |
+--------------------------------------------------------------------+
|i15 : splineDimensionTable(0,4,M)                                   |
|                                                                    |
|      +---------+-+-+-+--+--+                                       |
|o15 = |Degree   |0|1|2|3 |4 |                                       |
|      +---------+-+-+-+--+--+                                       |
|      |Dimension|1|3|7|16|33|                                       |
|      +---------+-+-+-+--+--+                                       |
+--------------------------------------------------------------------+
|i16 : splineDimensionTable(0,4,M')                                  |
|                                                                    |
|      +---------+-+-+-+--+--+                                       |
|o16 = |Degree   |0|1|2|3 |4 |                                       |
|      +---------+-+-+-+--+--+                                       |
|      |Dimension|1|3|6|16|33|                                       |
|      +---------+-+-+-+--+--+                                       |
+--------------------------------------------------------------------+

Notice that the dimension of the space of $C^1$ quadratic splines changes
depending on the geometry of $\Delta$.

Ways to use splineDimensionTable:
=================================

  * "splineDimensionTable(ZZ,ZZ,List,ZZ)"
  * "splineDimensionTable(ZZ,ZZ,Module)"

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

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

splineMatrix -- compute matrix whose kernel is the module of $C^r$ splines on $\Delta$
**************************************************************************************

Synopsis
========

  * Usage:
        S = splineMatrix(V,F,E,r)
        S = splineMatrix(V,F,r)
        S = splineMatrix(L,r)
        S = splineMatrix(B,H,r)
  * Inputs:
      * V, a list (Macaulay2Doc), list of coordinates of vertices
        of $\Delta$
      * F, a list (Macaulay2Doc), list of facets of $\Delta$ (each
        facet is recorded as a list of indices of vertices taken from V)
      * E, a list (Macaulay2Doc), list of codimension one faces of
        $\Delta$ (interior or not); each codimension one face is recorded as a
        list of indices of vertices taken from V
      * r, an integer (Macaulay2Doc), degree of desired continuity
      * L, a list (Macaulay2Doc), list $\{V,F,E\}$ of vertices,
        facets, and codimension one faces of $\Delta$
      * H, a list (Macaulay2Doc), list of forms defining
        codimension one faces of $\Delta$
  * Optional inputs (Macaulay2Doc),:
      * InputType (missing documentation) => a string (Macaulay2Doc),
        default value "ByFacets",
      * BaseRing (missing documentation) => a ring (Macaulay2Doc),
        default value null,
      * Homogenize (missing documentation) => a Boolean value (Macaulay2Doc),
        default value true,
      * CoefficientRing (missing documentation) => a ring (Macaulay2Doc),
        default value QQ,
      * VariableName (missing documentation) => a symbol (Macaulay2Doc),
        default value t,
  * Outputs:
      * S, a matrix (Macaulay2Doc), resulting matrix whose kernel
        is the spline module

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

This creates the basic spline matrix that has splines as its kernel.

+-----------------------------------------------------------------------------+
|i1 : V = {{0,0},{1,0},{1,1},{-1,1},{-2,-1},{0,-1}};-- the coordinates of     |
|-----------------------------------------------------------------------------|
|vertices                                                                     |
+-----------------------------------------------------------------------------+
|i2 : F = {{0,2,1},{0,2,3},{0,3,4},{0,4,5},{0,1,5}};  -- a list of facets     |
|-----------------------------------------------------------------------------|
|(pure complex)                                                               |
+-----------------------------------------------------------------------------+
|i3 : E = {{0,1},{0,2},{0,3},{0,4},{0,5}};   -- list of edges                 |
+-----------------------------------------------------------------------------+
|i4 : splineMatrix(V,F,E,1)                                                   |
|                                                                             |
|o4 = | 1 0  0  0  -1 t_1^2 0                   0                             |
|     | 1 -1 0  0  0  0     t_0^2-2t_0t_1+t_1^2 0                             |
|     | 0 1  -1 0  0  0     0                   t_0^2+2t_0t_1+t_1^2           |
|     | 0 0  1  -1 0  0     0                   0                             |
|     | 0 0  0  1  -1 0     0                   0                             |
|     ------------------------------------------------------------------------|
|     0                    0     |                                            |
|     0                    0     |                                            |
|     0                    0     |                                            |
|     t_0^2-4t_0t_1+4t_1^2 0     |                                            |
|     0                    t_0^2 |                                            |
|                                                                             |
|                        5                 10                                 |
|o4 : Matrix (QQ[t ..t ])  <-- (QQ[t ..t ])                                   |
|                 0   2             0   2                                     |
+-----------------------------------------------------------------------------+

If each codimension one face of $\Delta$ is the intersection of exactly two
facets, then the list of edges is unnecessary.

+-----------------------------------------------------------------------------+
|i5 : V = {{0,0},{1,0},{1,1},{-1,1},{-2,-1},{0,-1}};-- the coordinates of     |
|-----------------------------------------------------------------------------|
|vertices                                                                     |
+-----------------------------------------------------------------------------+
|i6 : F = {{0,2,1},{0,2,3},{0,3,4},{0,4,5},{0,1,5}};  -- a list of facets     |
|-----------------------------------------------------------------------------|
|(pure complex)                                                               |
+-----------------------------------------------------------------------------+
|i7 : splineMatrix(V,F,1)                                                     |
|                                                                             |
|o7 = | 1 0  0  0  -1 t_1^2 0                   0                             |
|     | 1 -1 0  0  0  0     t_0^2-2t_0t_1+t_1^2 0                             |
|     | 0 1  -1 0  0  0     0                   t_0^2+2t_0t_1+t_1^2           |
|     | 0 0  1  -1 0  0     0                   0                             |
|     | 0 0  0  1  -1 0     0                   0                             |
|     ------------------------------------------------------------------------|
|     0                    0     |                                            |
|     0                    0     |                                            |
|     0                    0     |                                            |
|     t_0^2-4t_0t_1+4t_1^2 0     |                                            |
|     0                    t_0^2 |                                            |
|                                                                             |
|                        5                 10                                 |
|o7 : Matrix (QQ[t ..t ])  <-- (QQ[t ..t ])                                   |
|                 0   2             0   2                                     |
+-----------------------------------------------------------------------------+

Splines are automatically computed on the cone over the given complex $\Delta$,
and the last variable of the polynomial ring is always the variable used to
homogenize.  If the user desires splines over $\Delta$, use the option
Homogenize=>false.

+-----------------------------------------------------------------------------+
|i8 : V = {{0,0},{1,0},{1,1},{-1,1},{-2,-1},{0,-1}};-- the coordinates of     |
|-----------------------------------------------------------------------------|
|vertices                                                                     |
+-----------------------------------------------------------------------------+
|i9 : F = {{0,2,1},{0,2,3},{0,3,4},{0,4,5},{0,1,5}};  -- a list of facets     |
|-----------------------------------------------------------------------------|
|(pure complex)                                                               |
+-----------------------------------------------------------------------------+
|i10 : splineMatrix(V,F,1,Homogenize=>false)                                  |
|                                                                             |
|o10 = | 1 0  0  0  -1 t_2^2 0                   0                            |
|      | 1 -1 0  0  0  0     t_1^2-2t_1t_2+t_2^2 0                            |
|      | 0 1  -1 0  0  0     0                   t_1^2+2t_1t_2+t_2^2          |
|      | 0 0  1  -1 0  0     0                   0                            |
|      | 0 0  0  1  -1 0     0                   0                            |
|      -----------------------------------------------------------------------|
|      0                    0     |                                           |
|      0                    0     |                                           |
|      0                    0     |                                           |
|      t_1^2-4t_1t_2+4t_2^2 0     |                                           |
|      0                    t_1^2 |                                           |
|                                                                             |
|                         5                 10                                |
|o10 : Matrix (QQ[t ..t ])  <-- (QQ[t ..t ])                                  |
|                  1   2             1   2                                    |
+-----------------------------------------------------------------------------+

If the user would like to define the underlying ring (e.g. for later
reference), this may be done using the option BaseRing=>R, where R is a
polynomial ring defined by the user.

+-----------------------------------------------------------------------------+
|i11 : V = {{0,0},{1,0},{1,1},{-1,1},{-2,-1},{0,-1}};-- the coordinates of    |
|-----------------------------------------------------------------------------|
|vertices                                                                     |
+-----------------------------------------------------------------------------+
|i12 : F = {{0,2,1},{0,2,3},{0,3,4},{0,4,5},{0,1,5}};  -- a list of facets    |
|-----------------------------------------------------------------------------|
|(pure complex)                                                               |
+-----------------------------------------------------------------------------+
|i13 : R = QQ[x,y] --desired polynomial ring                                  |
|                                                                             |
|o13 = R                                                                      |
|                                                                             |
|o13 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i14 : splineMatrix(V,F,1,Homogenize=>false,BaseRing=>R)                      |
|                                                                             |
|o14 = | 1 0  0  0  -1 y2 0         0         0          0  |                 |
|      | 1 -1 0  0  0  0  x2-2xy+y2 0         0          0  |                 |
|      | 0 1  -1 0  0  0  0         x2+2xy+y2 0          0  |                 |
|      | 0 0  1  -1 0  0  0         0         x2-4xy+4y2 0  |                 |
|      | 0 0  0  1  -1 0  0         0         0          x2 |                 |
|                                                                             |
|              5      10                                                      |
|o14 : Matrix R  <-- R                                                        |
+-----------------------------------------------------------------------------+

Here is an example where the output is homogenized.  Notice that homogenization
occurs with respect to the last variable of the polynomial ring.

+-----------------------------------------------------------------------------+
|i15 : V = {{0,0},{1,0},{1,1},{-1,1},{-2,-1},{0,-1}};-- the coordinates of    |
|-----------------------------------------------------------------------------|
|vertices                                                                     |
+-----------------------------------------------------------------------------+
|i16 : F = {{0,2,1},{0,2,3},{0,3,4},{0,4,5},{0,1,5}};  -- a list of facets    |
|-----------------------------------------------------------------------------|
|(pure complex)                                                               |
+-----------------------------------------------------------------------------+
|i17 : R = QQ[x,y,z] --desired polynomial ring                                |
|                                                                             |
|o17 = R                                                                      |
|                                                                             |
|o17 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i18 : splineMatrix(V,F,1,BaseRing=>R)                                        |
|                                                                             |
|o18 = | 1 0  0  0  -1 y2 0         0         0          0  |                 |
|      | 1 -1 0  0  0  0  x2-2xy+y2 0         0          0  |                 |
|      | 0 1  -1 0  0  0  0         x2+2xy+y2 0          0  |                 |
|      | 0 0  1  -1 0  0  0         0         x2-4xy+4y2 0  |                 |
|      | 0 0  0  1  -1 0  0         0         0          x2 |                 |
|                                                                             |
|              5      10                                                      |
|o18 : Matrix R  <-- R                                                        |
+-----------------------------------------------------------------------------+

Alternately, the spline matrix can be created directly from the dual graph
(with edges labeled by linear forms).  Note: This way of entering data requires
the ambient polynomial ring to be defined.  See also the
generalizedSplines, method.

+-------------------------------------------------------------+
|i19 : R = QQ[x,y]                                            |
|                                                             |
|o19 = R                                                      |
|                                                             |
|o19 : PolynomialRing                                         |
+-------------------------------------------------------------+
|i20 : B = {{0,1},{1,2},{2,3},{3,4},{4,0}}                    |
|                                                             |
|o20 = {{0, 1}, {1, 2}, {2, 3}, {3, 4}, {4, 0}}               |
|                                                             |
|o20 : List                                                   |
+-------------------------------------------------------------+
|i21 : H = {x-y,y,x,y-2*x,x+y}                                |
|                                                             |
|o21 = {x - y, y, x, - 2x + y, x + y}                         |
|                                                             |
|o21 : List                                                   |
+-------------------------------------------------------------+
|i22 : splineMatrix(B,H,1,InputType=>"ByLinearForms")         |
|                                                             |
|o22 = | 1  -1 0  0  0  x2-2xy+y2 0  0  0          0         ||
|      | 0  1  -1 0  0  0         y2 0  0          0         ||
|      | 0  0  1  -1 0  0         0  x2 0          0         ||
|      | 0  0  0  1  -1 0         0  0  4x2-4xy+y2 0         ||
|      | -1 0  0  0  1  0         0  0  0          x2+2xy+y2 ||
|                                                             |
|              5      10                                      |
|o22 : Matrix R  <-- R                                        |
+-------------------------------------------------------------+

Ways to use splineMatrix:
=========================

  * "splineMatrix(List,List,List,ZZ)"
  * "splineMatrix(List,List,ZZ)"
  * "splineMatrix(List,ZZ)"

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

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

splineModule -- compute the module of all splines on partition of a space
*************************************************************************

Synopsis
========

  * Usage:
        M = splineModule(V,F,E,r)
        M = splineModule(V,F,r)
  * Inputs:
      * V, a list (Macaulay2Doc), list of coordinates of vertices
        of $\Delta$
      * F, a list (Macaulay2Doc), list of facets of $\Delta$; each
        facet is recorded as a list of indices of vertices taken from V
      * E, a list (Macaulay2Doc), list of codimension one faces of
        $\Delta$ (interior or not); each codimension one face is recorded as a
        list of indices of vertices taken from V
      * r, an integer (Macaulay2Doc), desired degree of smoothness
  * Optional inputs (Macaulay2Doc),:
      * BaseRing (missing documentation) => a ring (Macaulay2Doc),
        default value null,
      * Homogenize (missing documentation) => a Boolean value (Macaulay2Doc),
        default value true,
      * CoefficientRing (missing documentation) => a ring (Macaulay2Doc),
        default value QQ,
      * VariableName (missing documentation) => a symbol (Macaulay2Doc),
        default value t,
      * InputType (missing documentation) => a string (Macaulay2Doc),
        default value "ByFacets",
  * Outputs:
      * M, a module (Macaulay2Doc), module of splines on $\Delta$

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

This method returns the spline module.  It is presented as the image of a
matrix whose columns generate splines as a module over the polynomial ring.
Each column represents a spline whose entries are the polynomials restricted to
the facets of the complex $\Delta$.

+--------------------------------------------------+
|i1 : V = {{0,0},{1,0},{1,1},{0,1}}                |
|                                                  |
|o1 = {{0, 0}, {1, 0}, {1, 1}, {0, 1}}             |
|                                                  |
|o1 : List                                         |
+--------------------------------------------------+
|i2 : F = {{0,1,2},{0,2,3}}                        |
|                                                  |
|o2 = {{0, 1, 2}, {0, 2, 3}}                       |
|                                                  |
|o2 : List                                         |
+--------------------------------------------------+
|i3 : E = {{0,1},{0,2},{0,3},{1,2},{2,3}}          |
|                                                  |
|o3 = {{0, 1}, {0, 2}, {0, 3}, {1, 2}, {2, 3}}     |
|                                                  |
|o3 : List                                         |
+--------------------------------------------------+
|i4 : splineModule(V,F,E,1)                        |
|                                                  |
|o4 = image | 1 t_0^2-2t_0t_1+t_1^2 |              |
|           | 1 0                   |              |
|                                                  |
|                                                 2|
|o4 : QQ[t ..t ]-module, submodule of (QQ[t ..t ]) |
|         0   2                            0   2   |
+--------------------------------------------------+

See also
========

  * splineMatrix -- compute matrix whose kernel is the
    module of $C^r$ splines on $\Delta$

Ways to use splineModule:
=========================

  * "splineModule(List,List,List,ZZ)"
  * "splineModule(List,List,ZZ)"

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

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

stanleyReisner -- Creates a ring map whose image is the ring of piecewise continuous polynomials on $\Delta$.  If $\Delta$ is simplicial, the Stanley Reisner ring of $\Delta$ is returned.
*******************************************************************************************************************************************************************************************

Synopsis
========

  * Usage:
        phi=stanleyReisner(V,F)
  * Inputs:
      * V, a list (Macaulay2Doc), a list of vertex coordinates
      * F, a list (Macaulay2Doc), a list of facets, recorded as
        indices of V
  * Optional inputs (Macaulay2Doc),:
      * BaseRing (missing documentation) => a ring (Macaulay2Doc),
        default value null,
      * Homogenize (missing documentation) => a Boolean value (Macaulay2Doc),
        default value true,
      * CoefficientRing (missing documentation) => a ring (Macaulay2Doc),
        default value QQ,
      * VariableName (missing documentation) => a symbol (Macaulay2Doc),
        default value t,
      * InputType (missing documentation) => a string (Macaulay2Doc),
        default value "ByFacets",
  * Outputs:
      * phi, a ring map (Macaulay2Doc), a ring map whose image
        is the ring of piecewise polynomials on $\Delta$.

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

This method returns the ring of continuous piecewise polynomials on the complex
$\Delta$ with vertices $V$ and facets $F$.  If $\Delta$ is a simplicial
complex, write $\Delta_0$ for its vertices and $K[\Delta]$ for the
Stanley-Reisner ring of $\Delta$, which is the quotient of the polynomial ring
$K[X_v:v\in\Delta_0]$ by monomials corresponding to non-faces.  Then, as a
ring, $C^0(\Delta)$ is isomorphic to the so-called affine Stanley Reisner ring
$K_a[\Delta]=\frac{K[\Delta]}{(1-\sum_{v} X_v)K[\Delta]}$.  If $\Delta$ is a
cone, then $K_a[\Delta]=K[\Delta_{dc}]$, where $\Delta_{dc}$ is the decone of
$\Delta$.  The map $K_a[\Delta]\rightarrow C^0(\Delta)$ is given by
$X_v\rightarrow C_v$, where $C_v$ is the Courant function at the vertex $v$.
See courantFunctions.

+-----------------------------------------------------------------------------+
|i1 : V={{0,0},{0,1},{-1,-1},{1,0}};                                          |
+-----------------------------------------------------------------------------+
|i2 : F={{0,1,2},{0,2,3},{0,1,3}};                                            |
+-----------------------------------------------------------------------------+
|i3 : phi=stanleyReisner(V,F)                                                 |
|                                                                             |
|                        QQ[e ..e , t ..t ]                                   |
|                            0   2   0   2                                    |
|o3 = map (---------------------------------------------, QQ[X ..X ], {2e t  -|
|                              2        2        2            0   3      0 0  |
|          (e e , e e , e e , e  - e , e  - e , e  - e )                      |
|            0 1   0 2   1 2   0    0   1    1   2    2                       |
|                                                                             |
|                           QQ[e ..e , t ..t ]                                |
|                               0   2   0   2                                 |
|o3 : RingMap --------------------------------------------- <-- QQ[X ..X ]    |
|                                 2        2        2               0   3     |
|             (e e , e e , e e , e  - e , e  - e , e  - e )                   |
|               0 1   0 2   1 2   0    0   1    1   2    2                    |
|-----------------------------------------------------------------------------|
|e t  + e t  - e t  + 2e t  + e t  - e t  - e t  + e t , - e t  + e t  + e t ,|
| 0 1    0 2    1 0     1 1    1 2    2 0    2 1    2 2     0 0    0 1    2 1 |
|-----------------------------------------------------------------------------|
|- e t  - e t , e t  - e t  + e t })                                          |
|   0 0    1 1   1 0    1 1    2 0                                            |
+-----------------------------------------------------------------------------+
|i4 : ker phi--decone of homogenized simplicial complex is three triangles    |
|                                                                             |
|o4 = ideal(X X X )                                                           |
|            1 2 3                                                            |
|                                                                             |
|o4 : Ideal of QQ[X ..X ]                                                     |
|                  0   3                                                      |
|-----------------------------------------------------------------------------|
|meeting at a vertex                                                          |
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i5 : R=QQ[x,y];                                                              |
+-----------------------------------------------------------------------------+
|i6 : phi=stanleyReisner(V,F,BaseRing=>R,Homogenize=>false)                   |
|                                                                             |
|                         QQ[e ..e , x..y]                                    |
|                             0   2                                           |
|o6 = map (---------------------------------------------, QQ[X ..X ], {- e x +|
|                              2        2        2            0   2       0   |
|          (e e , e e , e e , e  - e , e  - e , e  - e )                      |
|            0 1   0 2   1 2   0    0   1    1   2    2                       |
|                                                                             |
|                            QQ[e ..e , x..y]                                 |
|                                0   2                                        |
|o6 : RingMap --------------------------------------------- <-- QQ[X ..X ]    |
|                                 2        2        2               0   2     |
|             (e e , e e , e e , e  - e , e  - e , e  - e )                   |
|               0 1   0 2   1 2   0    0   1    1   2    2                    |
|-----------------------------------------------------------------------------|
|e y + e y, - e x - e y, e x - e y + e x})                                    |
| 0     2      0     1    1     1     2                                       |
+-----------------------------------------------------------------------------+
|i7 : ker phi--decone of simplicial complex is a three-cycle                  |
|                                                                             |
|o7 = ideal(X X X )                                                           |
|            0 1 2                                                            |
|                                                                             |
|o7 : Ideal of QQ[X ..X ]                                                     |
|                  0   2                                                      |
+-----------------------------------------------------------------------------+

The Stanley Reisner ring of a simplicial complex is obtained using the function
ringStructure, where the ring generators are chosen to be
the Courant functions.

+-----------------------------------------------------------------------------+
|i8 : V={{0,0},{0,1},{-1,-1},{1,0}};                                          |
+-----------------------------------------------------------------------------+
|i9 : F={{0,1,2},{0,2,3},{0,1,3}};                                            |
+-----------------------------------------------------------------------------+
|i10 : R=QQ[x,y];                                                             |
+-----------------------------------------------------------------------------+
|i11 : CF = courantFunctions(V,F,Homogenize=>false,BaseRing=>R);              |
|                                                                             |
|              3      3                                                       |
|o11 : Matrix R  <-- R                                                        |
+-----------------------------------------------------------------------------+
|i12 : phi=ringStructure(image CF,VariableGens=>false)                        |
|                                                                             |
|                          QQ[e ..e , x..y]                                   |
|                              0   2                                          |
|o12 = map (---------------------------------------------, QQ[Y ..Y ], {- e x |
|                               2        2        2            0   2       0  |
|           (e e , e e , e e , e  - e , e  - e , e  - e )                     |
|             0 1   0 2   1 2   0    0   1    1   2    2                      |
|                                                                             |
|                             QQ[e ..e , x..y]                                |
|                                 0   2                                       |
|o12 : RingMap --------------------------------------------- <-- QQ[Y ..Y ]   |
|                                  2        2        2               0   2    |
|              (e e , e e , e e , e  - e , e  - e , e  - e )                  |
|                0 1   0 2   1 2   0    0   1    1   2    2                   |
|-----------------------------------------------------------------------------|
|+ e y + e y, - e x - e y, e x - e y + e x})                                  |
|   0     2      0     1    1     1     2                                     |
+-----------------------------------------------------------------------------+
|i13 : ker phi                                                                |
|                                                                             |
|o13 = ideal(Y Y Y )                                                          |
|             0 1 2                                                           |
|                                                                             |
|o13 : Ideal of QQ[Y ..Y ]                                                    |
|                   0   2                                                     |
+-----------------------------------------------------------------------------+

If $\Delta$ is not simplicial, then the image of the map is a minimal set of
generators for the ring $C^0(\Delta)$.  There is no canonical choice of
generators, and $C^0(\Delta)$ is no longer a combinatorial object.

+-----------------------------------------------------------------------------+
|i14 : V={{0,1},{-1,-1},{1,-1},{0,10},{-2,-2},{2,-2}};--symmetric triangular  |
|-----------------------------------------------------------------------------|
|prism                                                                        |
+-----------------------------------------------------------------------------+
|i15 : V'={{0,1},{-1,-1},{1,-1},{1,10},{-2,-2},{2,-2}};--asymmetric triangular|
|-----------------------------------------------------------------------------|
|prism                                                                        |
+-----------------------------------------------------------------------------+
|i16 : F={{0,1,2},{0,1,3,4},{0,2,3,5},{1,2,4,5}};                             |
+-----------------------------------------------------------------------------+
|i17 : S=QQ[x,y,z];                                                           |
+-----------------------------------------------------------------------------+
|i18 : phi=stanleyReisner(V,F,BaseRing=>S) --four generators in degree one    |
|                                                                             |
|                                       QQ[e ..e , x..z]                      |
|                                           0   3                             |
|o18 = map (------------------------------------------------------------------|
|                                                 2        2        2        2|
|           (e e , e e , e e , e e , e e , e e , e  - e , e  - e , e  - e , e |
|             0 1   0 2   1 2   0 3   1 3   2 3   0    0   1    1   2    2   3|
|                                                                             |
|                                          QQ[e ..e , x..z]                   |
|                                              0   3                          |
|o18 : RingMap ---------------------------------------------------------------|
|                                                    2        2        2      |
|              (e e , e e , e e , e e , e e , e e , e  - e , e  - e , e  - e ,|
|                0 1   0 2   1 2   0 3   1 3   2 3   0    0   1    1   2    2 |
|-----------------------------------------------------------------------------|
|------, QQ[X ..X ], {e x + e x + e x + e x, e y + e y + e y + e y, e z + e z |
|            0   3     0     1     2     3    0     1     2     3    0     1  |
| - e )                                                                       |
|    3                                                                        |
|                                                                             |
|                                                                             |
|                                                                             |
|--------- <-- QQ[X ..X ]                                                     |
|  2               0   3                                                      |
| e  - e )                                                                    |
|  3    3                                                                     |
|-----------------------------------------------------------------------------|
|+ e z + e z, e y + e z - 2e x + 2e y + 2e x + 2e y})                         |
|   2     3    0     0      1      1      2      2                            |
+-----------------------------------------------------------------------------+
|i19 : phi'=stanleyReisner(V',F,BaseRing=>S) --six generators in degrees one a|
|                                                                             |
|                                       QQ[e ..e , x..z]                      |
|                                           0   3                             |
|o19 = map (------------------------------------------------------------------|
|                                                 2        2        2        2|
|           (e e , e e , e e , e e , e e , e e , e  - e , e  - e , e  - e , e |
|             0 1   0 2   1 2   0 3   1 3   2 3   0    0   1    1   2    2   3|
|                                                                             |
|                                          QQ[e ..e , x..z]                   |
|                                              0   3                          |
|o19 : RingMap ---------------------------------------------------------------|
|                                                    2        2        2      |
|              (e e , e e , e e , e e , e e , e e , e  - e , e  - e , e  - e ,|
|                0 1   0 2   1 2   0 3   1 3   2 3   0    0   1    1   2    2 |
|-----------------------------------------------------------------------------|
|nd two                                                                       |
|                                                                             |
|                                                                             |
|                                                                             |
|------, QQ[X ..X ], {e x + e x + e x + e x, e y + e y + e y + e y, e z + e z |
|            0   5     0     1     2     3    0     1     2     3    0     1  |
| - e )                                                                       |
|    3                                                                        |
|                                                                             |
|                                                                             |
|                                                                             |
|--------- <-- QQ[X ..X ]                                                     |
|  2               0   5                                                      |
| e  - e )                                                                    |
|  3    3                                                                     |
|-----------------------------------------------------------------------------|
|                             2                 2        2                 2  |
|+ e z + e z, - 14e x*y - 7e y  - 14e x*z + 7e z  + 72e x  - 80e x*y + 8e y  +|
|   2     3        0        0        0        0        1        1        1    |
|-----------------------------------------------------------------------------|
|                              2                                    2         |
|8e x*z - 8e y*z, 2e x*y + 9e y  + 2e x*z + 9e y*z - 20e x*y + 20e y  + 2e x*z|
|  1        1       0        0       0        0         1         1       1   |
|-----------------------------------------------------------------------------|
|                          2                                   2              |
|- 2e y*z + 16e x*y + 16e y  + 2e x*z + 2e y*z, 14e x*y - 47e y  + 14e x*z -  |
|    1         2         2       2        2        0         0        0       |
|-----------------------------------------------------------------------------|
|               2                  2                          2        2      |
|36e y*z + 11e z  + 80e x*y - 80e y  - 8e x*z + 8e y*z + 72e x  - 72e y })    |
|   0         0        1         1       1        1         2        2        |
+-----------------------------------------------------------------------------+
|i20 : ker phi --kernel generated by single polynomial of degree four         |
|                                                                             |
|              2         3       2         2         2 2     2 2         2    |
|o20 = ideal(4X X X  - 4X X  + 4X X X  - 4X X X  - 4X X  + 8X X  + 4X X X  -  |
|              0 1 3     1 3     0 2 3     1 2 3     0 3     1 3     1 2 3    |
|      -----------------------------------------------------------------------|
|          3      3    4                                                      |
|      5X X  - X X  + X )                                                     |
|        1 3    2 3    3                                                      |
|                                                                             |
|o20 : Ideal of QQ[X ..X ]                                                    |
|                   0   3                                                     |
+-----------------------------------------------------------------------------+
|i21 : mingens ker phi' --kernel has six minimal generators of degree four    |
|                                                                             |
|o21 = | 76X_0X_1X_4-428X_1^2X_4-22X_0X_2X_4-22X_1X_2X_4+11X_4^2-16X_0X_1X_5- |
|      -----------------------------------------------------------------------|
|      72X_1^2X_5-2X_0X_2X_5-9X_1X_2X_5+X_4X_5                                |
|      -----------------------------------------------------------------------|
|      67032X_0^2X_4-1663704X_1^2X_4-99792X_0X_2X_4-99792X_1X_2X_4-2299X_3X_4+|
|      -----------------------------------------------------------------------|
|      49896X_4^2-9576X_0^2X_5-110880X_0X_1X_5-278712X_1^2X_5-13860X_0X_2X_5- |
|      -----------------------------------------------------------------------|
|      36036X_1X_2X_5-209X_3X_5+5999X_4X_5+133X_5^2                           |
|      -----------------------------------------------------------------------|
|      14630X_1X_2X_3-1463X_2^2X_3+145152X_1^2X_4+61740X_0X_2X_4-43596X_1X_2X_|
|      -----------------------------------------------------------------------|
|      4+1368X_3X_4-4536X_4^2+10080X_0X_1X_5+26208X_1^2X_5+1260X_0X_2X_5-8428X|
|      -----------------------------------------------------------------------|
|      _1X_2X_5-1463X_2^2X_5+342X_3X_5-630X_4X_5                              |
|      -----------------------------------------------------------------------|
|      146300X_1^2X_3-1463X_2^2X_3+1132992X_1^2X_4+123480X_0X_2X_4+18144X_1X_ |
|      -----------------------------------------------------------------------|
|      2X_4+1368X_3X_4-35406X_4^2+20160X_0X_1X_5+146048X_1^2X_5+2520X_0X_2X_5+|
|      -----------------------------------------------------------------------|
|      6552X_1X_2X_5-1463X_2^2X_5+342X_3X_5-1260X_4X_5                        |
|      -----------------------------------------------------------------------|
|      4180X_0X_1X_3-418X_0X_2X_3+116928X_1^2X_4+7308X_0X_2X_4+7308X_1X_2X_4+ |
|      -----------------------------------------------------------------------|
|      209X_3X_4-3654X_4^2+6448X_0X_1X_5+19440X_1^2X_5+806X_0X_2X_5+2430X_1X_ |
|      -----------------------------------------------------------------------|
|      2X_5-403X_4X_5 2633400X_0^2X_3-26334X_2^2X_3-36575X_3^2+281667456X_1^2X|
|      -----------------------------------------------------------------------|
|      _4+18552240X_0X_2X_4+16656192X_1X_2X_4+640224X_3X_4-8802108X_4^2+      |
|      -----------------------------------------------------------------------|
|      2633400X_0^2X_5+18506880X_0X_1X_5+47169864X_1^2X_5+2313360X_0X_2X_5+   |
|      -----------------------------------------------------------------------|
|      6014736X_1X_2X_5-26334X_2^2X_5+86906X_3X_5-1156680X_4X_5-36575X_5^2 |  |
|                                                                             |
|                         1                 6                                 |
|o21 : Matrix (QQ[X ..X ])  <-- (QQ[X ..X ])                                  |
|                  0   5             0   5                                    |
+-----------------------------------------------------------------------------+

See also
========

  * courantFunctions -- returns the Courant functions
    of a simplicial complex
  * ringStructure -- given a sub-module of a free module
    (viewed as a ring with direct sum structure) which is also a sub-ring,
    creates a ring map whose image is the module with its ring structure
  * stanleyReisnerPresentation -- creates a
    ring map whose image is the sub-ring of $C^0(\Delta)$ generated by
    $C^r(\Delta)$.  If $\Delta$ is simplicial, $C^0(\Delta)$ is the Stanley
    Reisner ring of $\Delta$.

Ways to use stanleyReisner:
===========================

  * "stanleyReisner(List,List)"

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

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

stanleyReisnerPresentation -- creates a ring map whose image is the sub-ring of $C^0(\Delta)$ generated by $C^r(\Delta)$.  If $\Delta$ is simplicial, $C^0(\Delta)$ is the Stanley Reisner ring of $\Delta$.
************************************************************************************************************************************************************************************************************

Synopsis
========

  * Usage:
        phi = stanleyReisnerPresentation(V,F,r)
  * Inputs:
      * V, a list (Macaulay2Doc), list of vertex coordinates of
        $\Delta$
      * F, a list (Macaulay2Doc), list of facets of $\Delta$ (each
        facet is recorded as a list of indices of vertices taken from V)
      * r, an integer (Macaulay2Doc), integer, desired degree of
        smoothness
  * Optional inputs (Macaulay2Doc),:
      * BaseRing (missing documentation) => a ring (Macaulay2Doc),
        default value null,
      * Homogenize (missing documentation) => a Boolean value (Macaulay2Doc),
        default value true,
      * CoefficientRing (missing documentation) => a ring (Macaulay2Doc),
        default value QQ,
      * VariableName (missing documentation) => a symbol (Macaulay2Doc),
        default value t,
      * GenVar (missing documentation) => a symbol (Macaulay2Doc),
        default value Y,
      * IdempotentVar (missing documentation) => a symbol (Macaulay2Doc),
        default value e,
      * Trim (missing documentation) => a symbol (Macaulay2Doc),
        default value false,
      * VariableGens (missing documentation) => a symbol (Macaulay2Doc),
        default value true,
      * InputType (missing documentation) => a string (Macaulay2Doc),
        default value "ByFacets",
  * Outputs:
      * phi, a ring map (Macaulay2Doc), ring map whose image is
        $C^r(\Delta)$ as a sub-ring of $C^0(\Delta)$

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

This method creates a ring map whose image is the sub-ring of $C^r$ splines
expressed in terms of $C^0$ generators.  If $\Delta$ is simplicial,
$C^0(\Delta)$ is expressed as the Stanley Reisner ring.

+-----------------------------------------------------------------------------+
|i1 : V={{0,0},{0,1},{-1,-1},{1,0}};                                          |
+-----------------------------------------------------------------------------+
|i2 : F={{0,1,2},{0,2,3},{0,1,3}};                                            |
+-----------------------------------------------------------------------------+
|i3 : R=QQ[x,y];                                                              |
+-----------------------------------------------------------------------------+
|i4 : phi=stanleyReisnerPresentation(V,F,1,Homogenize=>false,BaseRing=>R)     |
|                                                                             |
|          QQ[X ..X ]                                                         |
|              0   2                                       3     2       2    |
|o4 = map (----------, QQ[Y ..Y ], {- X  + X , X  - X , - X  + 3X X , X X  -  |
|            X X X         0   3       1    2   0    1     1     1 2   0 1    |
|             0 1 2                                                           |
|                                                                             |
|             QQ[X ..X ]                                                      |
|                 0   2                                                       |
|o4 : RingMap ---------- <-- QQ[Y ..Y ]                                       |
|               X X X            0   3                                        |
|                0 1 2                                                        |
|-----------------------------------------------------------------------------|
| 3     2                                                                     |
|X  + 2X X })                                                                 |
| 1     1 2                                                                   |
+-----------------------------------------------------------------------------+
|i5 : H=source phi;                                                           |
+-----------------------------------------------------------------------------+
|i6 : scan(gens H, g->print phi(g))--see the expression of each generator in  |
|- X  + X                                                                     |
|   1    2                                                                    |
|X  - X                                                                       |
| 0    1                                                                      |
|   3     2                                                                   |
|- X  + 3X X                                                                  |
|   1     1 2                                                                 |
|   2    3     2                                                              |
|X X  - X  + 2X X                                                             |
| 0 1    1     1 2                                                            |
|-----------------------------------------------------------------------------|
|the Stanley Reisner ring                                                     |
+-----------------------------------------------------------------------------+

The kernel of the map is the same as the kernel of the map returned by
ringStructure, but the generators are expressed differently.

+-----------------------------------------------------------------------------+
|i7 : M=splineModule(V,F,1,Homogenize=>false,BaseRing=>R);                    |
+-----------------------------------------------------------------------------+
|i8 : phi1=ringStructure(M);                                                  |
|                                                                             |
|                            QQ[e ..e , x..y]                                 |
|                                0   2                                        |
|o8 : RingMap --------------------------------------------- <-- QQ[Y ..Y ]    |
|                                 2        2        2               0   3     |
|             (e e , e e , e e , e  - e , e  - e , e  - e )                   |
|               0 1   0 2   1 2   0    0   1    1   2    2                    |
+-----------------------------------------------------------------------------+
|i9 : H=source phi; H1=source phi1;                                           |
+-----------------------------------------------------------------------------+
|i11 : gens H                                                                 |
|                                                                             |
|o11 = {Y , Y , Y , Y }                                                       |
|        0   1   2   3                                                        |
|                                                                             |
|o11 : List                                                                   |
+-----------------------------------------------------------------------------+
|i12 : gens H1                                                                |
|                                                                             |
|o12 = {Y , Y , Y , Y }                                                       |
|        0   1   2   3                                                        |
|                                                                             |
|o12 : List                                                                   |
+-----------------------------------------------------------------------------+
|i13 : psi=map(H,H1,gens H);--phi1 has "same" source as H, but they are viewed|
|                                                                             |
|o13 : RingMap H <-- H1                                                       |
|-----------------------------------------------------------------------------|
|as different rings by Macaulay2                                              |
+-----------------------------------------------------------------------------+
|i14 : scan(gens H1,g->print {g,phi1(g),phi(psi(g))})--phi expresses          |
|{Y , e x + e x + e x, - X  + X }                                             |
|  0   0     1     2      1    2                                              |
|{Y , e y + e y + e y, X  - X }                                               |
|  1   0     1     2    0    1                                                |
|        3         2       3     3     2                                      |
|{Y , e x  + 3e x*y  - 2e y , - X  + 3X X }                                   |
|  2   0       1         1       1     1 2                                    |
|        2          2      3     2    3     2                                 |
|{Y , e x y + 2e x*y  - e y , X X  - X  + 2X X }                              |
|  3   0        1        1     0 1    1     1 2                               |
|-----------------------------------------------------------------------------|
|generators of M in the Stanley Reisner ring, while phi1 expresses generators |
|-----------------------------------------------------------------------------|
|in the free module R^3                                                       |
+-----------------------------------------------------------------------------+
|i15 : (ker phi)==psi(ker phi1)--the kernels are the same                     |
|                                                                             |
|o15 = true                                                                   |
+-----------------------------------------------------------------------------+

The option Trim=>true may be used to get a minimal number of ring generators.

+-----------------------------------------------------------------------------+
|i16 : V={{0,0,0},{1,0,0},{0,1,0},{0,0,1},{-1,0,0},{0,-1,0},{0,0,-1}};        |
+-----------------------------------------------------------------------------+
|i17 : F={{0,1,2,3},{0,1,2,6},{0,2,3,4},{0,2,4,6},{0,1,3,5},{0,3,4,5},{0,4,5,6|
|-----------------------------------------------------------------------------|
|},{0,1,5,6}};--centrally triangulated octahedron                             |
+-----------------------------------------------------------------------------+
|i18 : S=QQ[x,y,z];                                                           |
+-----------------------------------------------------------------------------+
|i19 : stanleyReisnerPresentation(V,F,1,Homogenize=>false,BaseRing=>S)        |
|                                                                             |
|               QQ[X ..X ]                                                    |
|                   0   5                                                2    |
|o19 = map (------------------, QQ[Y ..Y ], {X  - X , X  - X , X  - X , X ,   |
|           (X X , X X , X X )      0   9     0    3   1    4   2    5   2    |
|             2 5   1 4   0 3                                                 |
|                                                                             |
|                  QQ[X ..X ]                                                 |
|                      0   5                                                  |
|o19 : RingMap ------------------ <-- QQ[Y ..Y ]                              |
|              (X X , X X , X X )         0   9                               |
|                2 5   1 4   0 3                                              |
|-----------------------------------------------------------------------------|
| 2   2   2 2   2 2   2 2   2 2 2                                             |
|X , X , X X , X X , X X , X X X })                                           |
| 1   3   0 1   1 2   0 2   0 1 2                                             |
+-----------------------------------------------------------------------------+
|i20 : stanleyReisnerPresentation(V,F,1,Homogenize=>false,BaseRing=>S,Trim=>  |
|                                                                             |
|               QQ[X ..X ]                                                    |
|                   0   5                                                2    |
|o20 = map (------------------, QQ[Y ..Y ], {X  - X , X  - X , X  - X , X ,   |
|           (X X , X X , X X )      0   5     0    3   1    4   2    5   2    |
|             2 5   1 4   0 3                                                 |
|                                                                             |
|                  QQ[X ..X ]                                                 |
|                      0   5                                                  |
|o20 : RingMap ------------------ <-- QQ[Y ..Y ]                              |
|              (X X , X X , X X )         0   5                               |
|                2 5   1 4   0 3                                              |
|-----------------------------------------------------------------------------|
|true)                                                                        |
|                                                                             |
|                                                                             |
| 2   2                                                                       |
|X , X })                                                                     |
| 1   3                                                                       |
+-----------------------------------------------------------------------------+

The geometry effects $C^1$ simplicial splines, although it doesn't effect $C^0$
simplicial splines.

+-----------------------------------------------------------------------------+
|i21 : V'={{0,0,0},{1,0,0},{0,1,0},{1,1,1},{-1,0,0},{0,-1,0},{0,0,-1}};       |
|-----------------------------------------------------------------------------|
|--centrally triangulated octahedron that has been perturbed                  |
+-----------------------------------------------------------------------------+
|i22 : F={{0,1,2,3},{0,1,2,6},{0,2,3,4},{0,2,4,6},{0,1,3,5},{0,3,4,5},{0,4,5,6|
|-----------------------------------------------------------------------------|
|},{0,1,5,6}};                                                                |
+-----------------------------------------------------------------------------+
|i23 : stanleyReisnerPresentation(V',F,1,Homogenize=>false,BaseRing=>S,Trim=> |
|                                                                             |
|               QQ[X ..X ]                                                    |
|                   0   5                                                     |
|o23 = map (------------------, QQ[Y ..Y ], {X  + X  - X , X  + X  - X , X  - |
|           (X X , X X , X X )      0   8     0    2    3   1    2    4   2   |
|             2 5   1 4   0 3                                                 |
|                                                                             |
|                  QQ[X ..X ]                                                 |
|                      0   5                                                  |
|o23 : RingMap ------------------ <-- QQ[Y ..Y ]                              |
|              (X X , X X , X X )         0   8                               |
|                2 5   1 4   0 3                                              |
|-----------------------------------------------------------------------------|
|true)                                                                        |
|                                                                             |
|                                                                             |
|      2   2      2     3     2        2    3     2        2    2        2    |
| X , X , X X  - X X , X  + 3X X , 2X X  + X  - 2X X  + X X  - X X , 3X X  +  |
|  5   2   1 2    1 5   1     1 2    0 2    2     2 3    2 3    3 5    0 2    |
|-----------------------------------------------------------------------------|
| 3     2         2    3   2 2      2 2                                       |
|X  - 3X X  + 3X X  - X , X X X  - X X X })                                   |
| 2     2 3     2 3    3   0 1 2    0 1 5                                     |
+-----------------------------------------------------------------------------+

If $\Delta$ is not simplicial, $C^0(\Delta)$ does not have the same nice
structure.

+-----------------------------------------------------------------------------+
|i24 : V={{0,1},{-1,-1},{1,-1},{0,2},{-2,-2},{2,-2}};                         |
+-----------------------------------------------------------------------------+
|i25 : F={{0,1,2},{0,1,3,4},{0,2,3,5},{1,2,4,5}}; --symmetric triangular      |
|-----------------------------------------------------------------------------|
|prism--                                                                      |
+-----------------------------------------------------------------------------+
|i26 : S=QQ[x,y,z];                                                           |
+-----------------------------------------------------------------------------+
|i27 : stanleyReisnerPresentation(V,F,1,BaseRing=>S,Trim=>true)               |
|                                                                             |
|                                               QQ[X ..X ]                    |
|                                                   0   3                     |
|o27 = map (------------------------------------------------------------------|
|             2         3       2         2         2 2     2 2         2     |
|           4X X X  - 4X X  + 4X X X  - 4X X X  - 4X X  + 8X X  + 4X X X  - 5X|
|             0 1 3     1 3     0 2 3     1 2 3     0 3     1 3     1 2 3     |
|                                                                             |
|                                                  QQ[X ..X ]                 |
|                                                      0   3                  |
|o27 : RingMap ---------------------------------------------------------------|
|                2         3       2         2         2 2     2 2         2  |
|              4X X X  - 4X X  + 4X X X  - 4X X X  - 4X X  + 8X X  + 4X X X  -|
|                0 1 3     1 3     0 2 3     1 2 3     0 3     1 3     1 2 3  |
|-----------------------------------------------------------------------------|
|                                             2 2          2     2 2          |
|---------------, QQ[Y ..Y ], {X , X , X , 36X X  + 36X X X  - 6X X  +        |
|  3      3    4      0   5     0   1   2     0 3      0 1 3     1 3          |
| X  - X X  + X                                                               |
|1 3    2 3    3                                                              |
|                                                                             |
|                                                                             |
|                                                                             |
|------------------ <-- QQ[Y ..Y ]                                            |
|     3      3    4         0   5                                             |
| 5X X  - X X  + X                                                            |
|   1 3    2 3    3                                                           |
|-----------------------------------------------------------------------------|
|       2          2        3       3        3     4     2 2      2 2         |
|36X X X  + 30X X X  - 24X X  - 6X X  - 10X X  + 3X , 12X X  - 18X X  -       |
|   0 2 3      1 2 3      0 3     1 3      2 3     3     0 3      1 3         |
|-----------------------------------------------------------------------------|
|      2        3       3     4        2 2          2       2 2          2    |
|6X X X  + 14X X  + 2X X  - 3X , - 612X X  - 36X X X  + 966X X  - 36X X X  +  |
|  1 2 3      1 3     2 3     3        0 3      0 1 3       1 3      0 2 3    |
|-----------------------------------------------------------------------------|
|        2        3         3         3       4                               |
|354X X X  + 24X X  - 762X X  - 118X X  + 165X })                             |
|    1 2 3      0 3       1 3       2 3       3                               |
+-----------------------------------------------------------------------------+

See also
========

  * courantFunctions -- returns the Courant functions
    of a simplicial complex
  * stanleyReisner -- Creates a ring map whose image is
    the ring of piecewise continuous polynomials on $\Delta$.  If $\Delta$ is
    simplicial, the Stanley Reisner ring of $\Delta$ is returned.
  * ringStructure -- given a sub-module of a free module
    (viewed as a ring with direct sum structure) which is also a sub-ring,
    creates a ring map whose image is the module with its ring structure

Ways to use stanleyReisnerPresentation:
=======================================

  * "stanleyReisnerPresentation(List,List,ZZ)"

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

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