This is MacaulayPosets.info, produced by Macaulay2, version 1.26.05

MacaulayPosets -- a package for working with Macaulay posets and Macaulay rings
*******************************************************************************

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

This package contains a few methods for working with posets, rings, and the
Macaulay property.

Two boolean methods for ranked posets are implemented.

  * isAdditive
  * isMacaulay, also applicable to rings

Four poset operations and two ring operations are implemented.

  * posetWedgeProduct, analogous to
    ringFiberProduct,
  * posetClosedProduct, analogous to
    ringConnectedSum,
  * posetFiberProduct
  * posetConnectedSum

To define the latter two poset operations, a new data type PosetMap,
was created.

To obtain the monomial poset of a ring, one can use getPoset,
a generalization of standardMonomialPoset (Posets),
from the Posets package (Posets), to ideals which are not necessarily
monomial.

This package was used in some of the work leading to the paper
https://arxiv.org/abs/2502.15166, where many of these operations and properties
are discussed.

Authors
=======

  * Penelope Beall (see https://pbeall.github.io ) <pbeall@ucdavis.edu>
  * Yu Olivier Li <yol1@st-andrews.ac.uk>

Version
=======

This documentation describes version 1.0 of MacaulayPosets, released April 5,
2026.

Citation
========

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

+----------------------------------------------------------------------------+
|@misc{MacaulayPosetsSource,                                                 |
|  title = {{MacaulayPosets: A \emph{Macaulay2} package. Version~1.0}},      |
|  author = {Penelope Beall and Yu Olivier Li},                              |
|  howpublished = {A \emph{Macaulay2} package available at                   |
|    \url{https://github.com/Macaulay2/M2/tree/stable/M2/Macaulay2/packages}}|
|}                                                                           |
|                                                                            |
+----------------------------------------------------------------------------+

Exports
=======

  * Types
      * PosetMap -- the class of all morphisms between posets
  * Functions and commands
      * getMons -- calculates the monomials of a ring
      * getPoset -- calculates the monomial poset of a ring
      * isAdditive -- whether a poset is additive
      * isMacaulay -- whether a poset or ring is Macaulay
      * isRankPreserving -- whether a poset map is
        rank-preserving
      * lowerShadow -- the lower shadow of a subset of a
        poset
      * macaulayOrders -- finds all orders with respect
        to which the poset is Macaulay
      * posetClosedProduct -- constructs the closed
        product of several posets
      * posetConnectedSum -- constructs the connected
        sum of several posets
      * posetFiberProduct -- constructs the fiber
        product of several posets
      * posetWedgeProduct -- constructs the wedge
        product of several posets
      * ringConnectedSum -- constructs the connected
        sum of several rings
      * ringFiberProduct -- constructs the fiber
        product of several rings
      * upperShadow -- the upper shadow of a subset of a
        poset
  * Methods
      * "getMons(Ideal)" -- see getMons, -- calculates the
        monomials of a ring
      * "getMons(PolynomialRing)" -- see getMons, -- calculates
        the monomials of a ring
      * "getMons(PolynomialRing,Ideal)" -- see getMons, --
        calculates the monomials of a ring
      * "getMons(QuotientRing)" -- see getMons, -- calculates
        the monomials of a ring
      * "getPoset(Ideal)" -- see getPoset, -- calculates the
        monomial poset of a ring
      * "getPoset(PolynomialRing)" -- see getPoset, --
        calculates the monomial poset of a ring
      * "getPoset(PolynomialRing,Ideal)" -- see getPoset, --
        calculates the monomial poset of a ring
      * "getPoset(QuotientRing)" -- see getPoset, -- calculates
        the monomial poset of a ring
      * "image(PosetMap)" -- see image(PosetMap,List),
        -- the image of a poset map
      * image(PosetMap,List) -- the image of
        a poset map
      * "isAdditive(Poset)" -- see isAdditive, -- whether a
        poset is additive
      * isInjective(PosetMap)
      * "isMacaulay(Ideal)" -- see isMacaulay, -- whether a
        poset or ring is Macaulay
      * "isMacaulay(Poset)" -- see isMacaulay, -- whether a
        poset or ring is Macaulay
      * "isMacaulay(QuotientRing)" -- see isMacaulay, --
        whether a poset or ring is Macaulay
      * "isRankPreserving(PosetMap)" -- see isRankPreserving,
        -- whether a poset map is rank-preserving
      * isSurjective(PosetMap)
      * "lowerShadow(Poset,List)" -- see lowerShadow, -- the
        lower shadow of a subset of a poset
      * "macaulayOrders(Ideal)" -- see macaulayOrders, --
        finds all orders with respect to which the poset is Macaulay
      * "macaulayOrders(Poset)" -- see macaulayOrders, --
        finds all orders with respect to which the poset is Macaulay
      * "macaulayOrders(QuotientRing)" -- see macaulayOrders,
        -- finds all orders with respect to which the poset is
        Macaulay
      * "map(Poset,Poset,HashTable)" -- see map(Poset,Poset,List),
        -- make a poset map
      * map(Poset,Poset,List) -- make a
        poset map
      * "posetClosedProduct(List)" -- see posetClosedProduct,
        -- constructs the closed product of several posets
      * "posetClosedProduct(Poset,Poset)" -- see posetClosedProduct,
        -- constructs the closed product of several posets
      * "posetConnectedSum(List)" -- see posetConnectedSum,
        -- constructs the connected sum of several posets
      * "posetConnectedSum(PosetMap,PosetMap)" -- see posetConnectedSum,
        -- constructs the connected sum of several posets
      * "posetFiberProduct(List)" -- see posetFiberProduct,
        -- constructs the fiber product of several posets
      * "posetFiberProduct(PosetMap,PosetMap)" -- see posetFiberProduct,
        -- constructs the fiber product of several posets
      * PosetMap * PosetMap -- composition of
        poset maps
      * PosetMap == PosetMap -- whether two poset
        maps are equal
      * PosetMap Thing -- applies a poset map to a poset
        element
      * "posetWedgeProduct(List)" -- see posetWedgeProduct,
        -- constructs the wedge product of several posets
      * "posetWedgeProduct(Poset,Poset)" -- see posetWedgeProduct,
        -- constructs the wedge product of several posets
      * "ringConnectedSum(Ideal,Ideal)" -- see ringConnectedSum,
        -- constructs the connected sum of several rings
      * "ringConnectedSum(List)" -- see ringConnectedSum,
        -- constructs the connected sum of several rings
      * "ringConnectedSum(QuotientRing,QuotientRing)" -- see
        ringConnectedSum, -- constructs the connected sum of
        several rings
      * "ringConnectedSum(Sequence)" -- see ringConnectedSum,
        -- constructs the connected sum of several rings
      * "ringFiberProduct(Ideal,Ideal)" -- see ringFiberProduct,
        -- constructs the fiber product of several rings
      * "ringFiberProduct(List)" -- see ringFiberProduct,
        -- constructs the fiber product of several rings
      * "ringFiberProduct(QuotientRing,QuotientRing)" -- see
        ringFiberProduct, -- constructs the fiber product of
        several rings
      * "ringFiberProduct(Sequence)" -- see ringFiberProduct,
        -- constructs the fiber product of several rings
      * source(PosetMap)
      * target(PosetMap)
      * "upperShadow(Poset,List)" -- see upperShadow, -- the
        upper shadow of a subset of a poset
  * Symbols
      * AllOrders -- whether to return all orders instead of
        at most one order
      * MaxDegree -- the maximum degree of a monomial to
        calculate
      * TikZ -- whether to print TikZ code
      * Visual -- whether to visualize the Macaulay orders

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

The object MacaulayPosets, is a package (Macaulay2Doc),
defined in MacaulayPosets.m2.

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

The source of this document is in MacaulayPosets.m2:1624:0.

AllOrders -- whether to return all orders instead of at most one order
**********************************************************************

  * Usage:
        macaulayOrders(P, AllOrders=>Boolean)

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

With AllOrders=>false, the list returned by the method will have at most one
element.

+-----------------------------------------------+
|i1 : B = booleanLattice 3                      |
|                                               |
|o1 = B                                         |
|                                               |
|o1 : Poset                                     |
+-----------------------------------------------+
|i2 : #(macaulayOrders B)                       |
|                                               |
|o2 = 12                                        |
+-----------------------------------------------+
|i3 : macaulayOrders(B, AllOrders=>false)       |
|                                               |
|o3 = {{000, 001, 010, 100, 011, 101, 110, 111}}|
|                                               |
|o3 : List                                      |
+-----------------------------------------------+

See also
========

  * macaulayOrders -- finds all orders with respect to
    which the poset is Macaulay

Functions with optional argument named AllOrders:
=================================================

  * "macaulayOrders(...,AllOrders=>...)"

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

The object AllOrders, is a symbol (Macaulay2Doc).

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

The source of this document is in MacaulayPosets.m2:1624:0.

getMons -- calculates the monomials of a ring
*********************************************

  * Usage:
        getMons(R, I)
        getMons I
        getMons S
        getMons R
  * Inputs:
      * R, a polynomial ring (Macaulay2Doc),
      * I, an ideal (Macaulay2Doc), a homogeneous ideal of a
        polynomial ring
      * S, a quotient ring (Macaulay2Doc), a quotient of a
        polynomial ring R and a homogeneous ideal I of R
  * Optional inputs (Macaulay2Doc),:
      * MaxDegree, => a number (Macaulay2Doc),
        default value 10, the maximum degree of a monomial to calculate
  * Outputs:
      * a list (Macaulay2Doc),

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

Given a polynomial ring R and a homogeneous ideal of R (an ideal generated by
homogeneous elements of R) called I, the function getMons gets the monomials of
the quotient ring R/I.

+--------------------------------------------------+
|i1 : R = QQ[x,y]                                  |
|                                                  |
|o1 = R                                            |
|                                                  |
|o1 : PolynomialRing                               |
+--------------------------------------------------+
|i2 : I = ideal(x^3, y^3)                          |
|                                                  |
|             3   3                                |
|o2 = ideal (x , y )                               |
|                                                  |
|o2 : Ideal of R                                   |
+--------------------------------------------------+
|i3 : getMons(R, I)                                |
|                                                  |
|             2   2    2 2          2      2       |
|o3 = {1, x, x , x y, x y , x*y, x*y , y, y }      |
|                                                  |
|o3 : List                                         |
+--------------------------------------------------+
|i4 : J = ideal(x*y - y^2, x^4, x^3 * y, x^2 * y^2)|
|                                                  |
|                   2   4   3    2 2               |
|o4 = ideal (x*y - y , x , x y, x y )              |
|                                                  |
|o4 : Ideal of R                                   |
+--------------------------------------------------+
|i5 : getMons(R / J)                               |
|                                                  |
|             2   3      2   3                     |
|o5 = {1, x, x , x , y, y , y }                    |
|                                                  |
|o5 : List                                         |
+--------------------------------------------------+

For quotient rings with infinitely many monomials, the optional argument
MaxDegree can be used to calculate monomials up to a certain degree. If this is
left blank, the default value used will be 10.

+-----------------------------------------------------------------------------+
|i6 : I = ideal(x^2 - y^2)                                                    |
|                                                                             |
|            2    2                                                           |
|o6 = ideal(x  - y )                                                          |
|                                                                             |
|o6 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i7 : getMons(R/I, MaxDegree=>10)                                             |
|Ideal is not finite over the base (quotient ring has infinitely many monomial|
|Monomials up to degree 10 given                                              |
|                                                                             |
|                2          2   3   4     3     4   5   6     5     6   7   8 |
|o7 = {1, x, y, y , x*y, x*y , y , y , x*y , x*y , y , y , x*y , x*y , y , y ,|
|     ------------------------------------------------------------------------|
|        7     8   9   10     9                                               |
|     x*y , x*y , y , y  , x*y }                                              |
|                                                                             |
|o7 : List                                                                    |
|-----------------------------------------------------------------------------|
|s)                                                                           |
+-----------------------------------------------------------------------------+

Caveat
======

The optional argument MaxDegree is only meant to be used for quotient rings
where there are infinitely many monomials. For quotient rings with finitely
many monomials, MaxDegree will be ignored regardless of it's value.

See also
========

  * getPoset -- calculates the monomial poset of a ring

Ways to use getMons:
====================

  * "getMons(Ideal)"
  * "getMons(PolynomialRing)"
  * "getMons(PolynomialRing,Ideal)"
  * "getMons(QuotientRing)"

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

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

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

The source of this document is in MacaulayPosets.m2:1624:0.

getPoset -- calculates the monomial poset of a ring
***************************************************

  * Usage:
        getPoset(R, I)
        getPoset I
        getPoset S
        getPoset R
  * Inputs:
      * R, a polynomial ring (Macaulay2Doc),
      * I, an ideal (Macaulay2Doc), a homogeneous ideal of a
        polynomial ring
      * S, a quotient ring (Macaulay2Doc), a quotient of a
        polynomial ring R and a homogeneous ideal I of R
  * Optional inputs (Macaulay2Doc),:
      * MaxDegree, => a number (Macaulay2Doc),
        default value 10, the maximum degree of a monomial to calculate
  * Outputs:
      * an instance of the type Poset (Posets),

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

Given a polynomial ring R and a homogeneous ideal of R (an ideal generated by
homogeneous elements of R) called I, the monomial poset of R/I  is the
collection of monomials of R/I, equipped with the divisibility
partial order.

+----------------------------------------------+
|i1 : R = QQ[x,y]                              |
|                                              |
|o1 = R                                        |
|                                              |
|o1 : PolynomialRing                           |
+----------------------------------------------+
|i2 : I = ideal(x*y - y^2, x^4, x^3*y, x^2*y^2)|
|                                              |
|                   2   4   3    2 2           |
|o2 = ideal (x*y - y , x , x y, x y )          |
|                                              |
|o2 : Ideal of R                               |
+----------------------------------------------+
|i3 : getPoset(R, I)                           |
|                                              |
|o3 = Relation Matrix: | 1 1 1 1 1 1 1 |       |
|                      | 0 1 1 1 0 1 1 |       |
|                      | 0 0 1 1 0 0 1 |       |
|                      | 0 0 0 1 0 0 0 |       |
|                      | 0 0 0 0 1 1 1 |       |
|                      | 0 0 0 0 0 1 1 |       |
|                      | 0 0 0 0 0 0 1 |       |
|                                              |
|o3 : Poset                                    |
+----------------------------------------------+

For posets with infinitely many monomials, the optional argument MaxDegree can
be used to calculate monomials up to a certain degree to use in the poset. If
this is left blank, the default value used will be 10.

+-----------------------------------------------------------------------------+
|i4 : J = ideal(x^2 - y^2)                                                    |
|                                                                             |
|            2    2                                                           |
|o4 = ideal(x  - y )                                                          |
|                                                                             |
|o4 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i5 : getPoset(R, J, MaxDegree => 15)                                         |
|Ideal is not finite over the base (quotient ring has infinitely              |
|Monomials up to degree 15 given                                              |
|                                                                             |
|o5 = Relation Matrix: | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1              |
|                      | 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1              |
|                      | 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1              |
|                      | 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1              |
|                      | 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1              |
|                      | 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1              |
|                      | 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1              |
|                      | 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1              |
|                      | 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1              |
|                      | 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1              |
|                      | 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0              |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0              |
|                                                                             |
|o5 : Poset                                                                   |
|-----------------------------------------------------------------------------|
|many monomials)                                                              |
|                                                                             |
|                                                                             |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|0 1 1 1 1 1 1 1 1 1 1 |                                                      |
|1 1 1 1 1 1 1 1 1 1 1 |                                                      |
|0 1 0 1 1 1 1 1 1 1 1 |                                                      |
|0 0 1 1 1 1 1 1 1 1 1 |                                                      |
|0 0 0 1 0 1 1 1 1 1 1 |                                                      |
|0 0 0 0 1 1 1 1 1 1 1 |                                                      |
|0 0 0 0 0 1 0 1 1 1 1 |                                                      |
|0 0 0 0 0 0 1 1 1 1 1 |                                                      |
|0 0 0 0 0 0 0 1 0 1 1 |                                                      |
|0 0 0 0 0 0 0 0 1 1 1 |                                                      |
|0 0 0 0 0 0 0 0 0 1 0 |                                                      |
|0 0 0 0 0 0 0 0 0 0 1 |                                                      |
+-----------------------------------------------------------------------------+

Caveat
======

Like the function getMons, the optional argument MaxDegree is only meant to be
used for quotient rings where there are infinitely many monomials. For quotient
rings with finitely many monomials, MaxDegree will be ignored regardless of
it's value.

See also
========

  * getMons -- calculates the monomials of a ring

Ways to use getPoset:
=====================

  * "getPoset(Ideal)"
  * "getPoset(PolynomialRing)"
  * "getPoset(PolynomialRing,Ideal)"
  * "getPoset(QuotientRing)"

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

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

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

The source of this document is in MacaulayPosets.m2:1624:0.

image(PosetMap,List) -- the image of a poset map
************************************************

  * Function: image (Macaulay2Doc),
  * Usage:
        image(f, L)
  * Inputs:
      * f, a map of posets,
      * L, a list (Macaulay2Doc), a subset of vertices source f
  * Outputs:
      * a list (Macaulay2Doc),

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

The image of the map $[3]\rightarrow[10]$ given by $i\mapsto 2i$ is computed
below.

+-----------------------------------------------------------------+
|i1 : f = map(chain 10, chain 3, {1=>2, 2=>4, 3=>6})              |
|                                                                 |
|o1 = PosetMap{1 => 2                                            }|
|              2 => 4                                             |
|              3 => 6                                             |
|              source => Relation Matrix: | 1 1 1 |               |
|                                         | 0 1 1 |               |
|                                         | 0 0 1 |               |
|              target => Relation Matrix: | 1 1 1 1 1 1 1 1 1 1 | |
|                                         | 0 1 1 1 1 1 1 1 1 1 | |
|                                         | 0 0 1 1 1 1 1 1 1 1 | |
|                                         | 0 0 0 1 1 1 1 1 1 1 | |
|                                         | 0 0 0 0 1 1 1 1 1 1 | |
|                                         | 0 0 0 0 0 1 1 1 1 1 | |
|                                         | 0 0 0 0 0 0 1 1 1 1 | |
|                                         | 0 0 0 0 0 0 0 1 1 1 | |
|                                         | 0 0 0 0 0 0 0 0 1 1 | |
|                                         | 0 0 0 0 0 0 0 0 0 1 | |
|                                                                 |
|o1 : PosetMap                                                    |
+-----------------------------------------------------------------+
|i2 : image f                                                     |
|                                                                 |
|o2 = {2, 4, 6}                                                   |
|                                                                 |
|o2 : List                                                        |
+-----------------------------------------------------------------+

The image of ${1,2}$ under this map is computed below.

+--------------------+
|i3 : image(f, {1,2})|
|                    |
|o3 = {2, 4}         |
|                    |
|o3 : List           |
+--------------------+

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

  * "image(PosetMap)"
  * image(PosetMap,List) -- the image of a
    poset map
-------------------------------------------------------------------------------

The source of this document is in MacaulayPosets.m2:1624:0.

isAdditive -- whether a poset is additive
*****************************************

  * Usage:
        isAdditive P
  * Inputs:
      * P, an instance of the type Poset (Posets),
  * Outputs:
      * a Boolean value (Macaulay2Doc),

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

See section 3.2 of https://arxiv.org/pdf/2502.15166 for a definition of
additivity.

Boolean lattices are additive. Therefore, the wedge product,
of a Boolean lattice with itself is Macaulay.

+---------------------------------------+
|i1 : B = booleanLattice 3              |
|                                       |
|o1 = B                                 |
|                                       |
|o1 : Poset                             |
+---------------------------------------+
|i2 : isAdditive B                      |
|                                       |
|o2 = true                              |
+---------------------------------------+
|i3 : isMacaulay posetWedgeProduct(B, B)|
|                                       |
|o3 = true                              |
+---------------------------------------+

Here is a non-additive poset.

+---------------------------------------------------------------------------+
|i4 : isAdditive poset({1,2,3,4,5,6}, {{1,2},{1,3},{2,4},{3,4},{3,5},{3,6}})|
|                                                                           |
|o4 = false                                                                 |
+---------------------------------------------------------------------------+

See also
========

  * isMacaulay -- whether a poset or ring is Macaulay
  * upperShadow -- the upper shadow of a subset of a poset
  * lowerShadow -- the lower shadow of a subset of a poset

Ways to use isAdditive:
=======================

  * "isAdditive(Poset)"

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

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

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

The source of this document is in MacaulayPosets.m2:1624:0.

isInjective(PosetMap)
*********************

  * Function: isInjective (Macaulay2Doc),
  * Usage:
        isInjective f
  * Inputs:
      * f, a map of posets,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

See also
========

  * isSurjective(PosetMap)
  * isRankPreserving -- whether a poset map is
    rank-preserving

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

  * isInjective(PosetMap)
-------------------------------------------------------------------------------

The source of this document is in MacaulayPosets.m2:1624:0.

isMacaulay -- whether a poset or ring is Macaulay
*************************************************

  * Usage:
        isMacaulay P
        isMacaulay S
        isMacaulay I
  * Inputs:
      * P, an instance of the type Poset (Posets),
      * S, a quotient ring (Macaulay2Doc), a homogeneous
        level linearly independent quotient of a polynomial ring over a field
      * I, an ideal (Macaulay2Doc), a homogeneous ideal of a
        polynomial ring such that the quotient is level linearly independent
  * Optional inputs (Macaulay2Doc),:
      * TikZ, => a Boolean value (Macaulay2Doc),
        default value false, whether to print TikZ code
      * Visual, => a Boolean value (Macaulay2Doc),
        default value false, whether to visualize the Macaulay orders
  * Outputs:
      * a Boolean value (Macaulay2Doc),

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

Suppose $P$ is a ranked poset and $<$ is a total order on the ground set of
$P$. Let $\operatorname{Seg}_d n$ denote the largest $n$ elements of rank $d$
with respect to $<$. Suppose that for every integer $d$ between $0$ and the
rank of $P$, and for every subset $A$ of the $d$th level of $P$, we have
$\lvert\nabla_P\operatorname{Seg}_d\lvert A\rvert\rvert \leq
\lvert\nabla_P(A)\rvert$ and $\nabla_P\operatorname{Seg}_d\lvert A\rvert =
\operatorname{Seg}_{d+1}\lvert\nabla_P(A)\rvert$. Then, we say $P$ is Macaulay
with respect to $<$. A Macaulay poset is a poset for which there exists an
order with respect to which it is Macaulay.

There is an analogous property for rings, not to be confused with the
Cohen-Macaulay property.

Products of chains are Macaulay by the Clements-Lindstrom Theorem.

+-------------------------------------+
|i1 : isMacaulay booleanLattice 3     |
|                                     |
|o1 = true                            |
+-------------------------------------+
|i2 : R = (ZZ/2)[x,y,z]               |
|                                     |
|o2 = R                               |
|                                     |
|o2 : PolynomialRing                  |
+-------------------------------------+
|i3 : I = monomialIdeal(x^2, y^3, z^3)|
|                                     |
|                     2   3   3       |
|o3 = monomialIdeal (x , y , z )      |
|                                     |
|o3 : MonomialIdeal of R              |
+-------------------------------------+
|i4 : isMacaulay(R/I)                 |
|                                     |
|o4 = true                            |
+-------------------------------------+

It is possible for a monomial poset to not be Macaulay.

+---------------------------------------------------------+
|i5 : S = (ZZ/2)[w,x,y,z]                                 |
|                                                         |
|o5 = S                                                   |
|                                                         |
|o5 : PolynomialRing                                      |
+---------------------------------------------------------+
|i6 : J = monomialIdeal(w^4, x^2, y^2, z^2, x*w, y*w, z*w)|
|                                                         |
|                     4        2        2        2        |
|o6 = monomialIdeal (w , w*x, x , w*y, y , w*z, z )       |
|                                                         |
|o6 : MonomialIdeal of S                                  |
+---------------------------------------------------------+
|i7 : isMacaulay(S/J)                                     |
|                                                         |
|o7 = false                                               |
+---------------------------------------------------------+

If the poset is Macaulay, the option TikZ, can provide a Hasse
diagram in which the vertices are horizontally ordered according to a Macaulay
order.

+---------------------------------+
|i8 : R = (ZZ/2)[x,y]             |
|                                 |
|o8 = R                           |
|                                 |
|o8 : PolynomialRing              |
+---------------------------------+
|i9 : I = monomialIdeal(x^2, y^3) |
|                                 |
|                     2   3       |
|o9 = monomialIdeal (x , y )      |
|                                 |
|o9 : MonomialIdeal of R          |
+---------------------------------+
|i10 : isMacaulay(R/I, TikZ=>true)|
|                                 |
|        \draw (0) -- (1);        |
|        \draw (0) -- (2);        |
|        \draw (2) -- (4);        |
|        \draw (4) -- (5);        |
|        \draw (1) -- (3);        |
|        \draw (1) -- (4);        |
|        \draw (3) -- (5);        |
|\end{tikzpicture}                |
|                                 |
|o10 = true                       |
+---------------------------------+

Caveat
======

Given a QuotientRing (Macaulay2Doc), or an Ideal (Macaulay2Doc),
this method will not verify level linear independence.

See also
========

  * macaulayOrders -- finds all orders with respect to
    which the poset is Macaulay
  * isAdditive -- whether a poset is additive
  * upperShadow -- the upper shadow of a subset of a poset
  * lowerShadow -- the lower shadow of a subset of a poset

Ways to use isMacaulay:
=======================

  * "isMacaulay(Ideal)"
  * "isMacaulay(Poset)"
  * "isMacaulay(QuotientRing)"

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

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

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

The source of this document is in MacaulayPosets.m2:1624:0.

isRankPreserving -- whether a poset map is rank-preserving
**********************************************************

  * Usage:
        isRankPreserving f
  * Inputs:
      * f, a map of posets,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

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

A poset map, $f: P\rightarrow Q$ between ranked (Posets),
posets is rank-preserving if and only if, for each $p \in P$,
the rank of $p$ is equal to the rank of $f(p)$, assuming both $P$ and $Q$ have
a rank $0$ element.

+------------------------------------------------+
|i1 : isRankPreserving map(chain 2, chain 1, {1})|
|                                                |
|o1 = true                                       |
+------------------------------------------------+
|i2 : isRankPreserving map(chain 2, chain 1, {2})|
|                                                |
|o2 = false                                      |
+------------------------------------------------+

See also
========

  * isInjective(PosetMap)
  * isSurjective(PosetMap)

Ways to use isRankPreserving:
=============================

  * "isRankPreserving(PosetMap)"

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

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

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

The source of this document is in MacaulayPosets.m2:1624:0.

isSurjective(PosetMap)
**********************

  * Function: isSurjective (Macaulay2Doc),
  * Usage:
        isSurjective f
  * Inputs:
      * f, a map of posets,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

See also
========

  * isInjective(PosetMap)
  * isRankPreserving -- whether a poset map is
    rank-preserving

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

  * isSurjective(PosetMap)
-------------------------------------------------------------------------------

The source of this document is in MacaulayPosets.m2:1624:0.

lowerShadow -- the lower shadow of a subset of a poset
******************************************************

  * Usage:
        lowerShadow(P,S)
  * Inputs:
      * P, an instance of the type Poset (Posets),
      * S, a list (Macaulay2Doc), a subset of the ground set of the
        poset
  * Outputs:
      * a list (Macaulay2Doc),

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

If $S$ is a subset of a poset, then the lower shadow of $S$ is the set of all
elements of the poset which cover some element of $S$.

+------------------------------------------+
|i1 : lowerShadow(divisorPoset 12, {12})   |
|                                          |
|o1 = {4, 6}                               |
|                                          |
|o1 : List                                 |
+------------------------------------------+
|i2 : S = QQ[x,y]/(x^4, y^4)               |
|                                          |
|o2 = S                                    |
|                                          |
|o2 : QuotientRing                         |
+------------------------------------------+
|i3 : x = S_0                              |
|                                          |
|o3 = x                                    |
|                                          |
|o3 : S                                    |
+------------------------------------------+
|i4 : y = S_1                              |
|                                          |
|o4 = y                                    |
|                                          |
|o4 : S                                    |
+------------------------------------------+
|i5 : lowerShadow(getPoset S, {x^3, x^2*y})|
|                                          |
|       2                                  |
|o5 = {x , x*y}                            |
|                                          |
|o5 : List                                 |
+------------------------------------------+

See also
========

  * upperShadow -- the upper shadow of a subset of a poset

Ways to use lowerShadow:
========================

  * "lowerShadow(Poset,List)"

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

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

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

The source of this document is in MacaulayPosets.m2:1624:0.

macaulayOrders -- finds all orders with respect to which the poset is Macaulay
******************************************************************************

  * Usage:
        macaulayOrders P
        macaulayOrders S
        macaulayOrders I
  * Inputs:
      * P, an instance of the type Poset (Posets),
      * S, a quotient ring (Macaulay2Doc), a homogeneous
        level linearly independent quotient of a polynomial ring over a field
      * I, an ideal (Macaulay2Doc), a homogeneous ideal of a
        polynomial ring such that the quotient is level linearly independent
  * Optional inputs (Macaulay2Doc),:
      * TikZ, => a Boolean value (Macaulay2Doc),
        default value false, whether to print TikZ code
      * Visual, => a Boolean value (Macaulay2Doc),
        default value false, whether to visualize the Macaulay orders
      * AllOrders, => a Boolean value (Macaulay2Doc),
        default value true, whether to return all
        orders instead of at most one order
  * Outputs:
      * a list (Macaulay2Doc), whose elements are lists
        representing orders with respect to which the poset is Macaulay

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

Given a poset with rank function $r$, this method returns all Macaulay orders
$<$ on the poset such that $r(p) < r(q)$ implies $p < q$.

Given a quotient $S$ of a polynomial ring, this method returns Macaulay orders
on the monomial poset of $S$.

A total order $<$ on a poset $P$ is represented by a list (Macaulay2Doc).
It is the permutation of the of the ground set of $P$ that
is increasing with respect to $<$.

+-----------------------------------------------------------------------------+
|i1 : macaulayOrders(product(chain 3, chain 3))                               |
|                                                                             |
|o1 = {{{1, 1}, {1, 2}, {2, 1}, {1, 3}, {2, 2}, {3, 1}, {2, 3}, {3, 2}, {3,   |
|     ------------------------------------------------------------------------|
|     3}}, {{1, 1}, {2, 1}, {1, 2}, {3, 1}, {2, 2}, {1, 3}, {3, 2}, {2, 3},   |
|     ------------------------------------------------------------------------|
|     {3, 3}}}                                                                |
|                                                                             |
|o1 : List                                                                    |
+-----------------------------------------------------------------------------+

The option TikZ, can print a Hasse diagram of the poset for each
order $<$ such that the vertices in each level are ordered left to right
according to $<$.

+-----------------------------------------------------------------------------+
|i2 : R = (ZZ/2)[x,y]                                                         |
|                                                                             |
|o2 = R                                                                       |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : I = ideal(x^4, x^3-y^3, y^4)                                            |
|                                                                             |
|             4   3    3   4                                                  |
|o3 = ideal (x , x  + y , y )                                                 |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : macaulayOrders(R/I, TikZ=>true)                                         |
|                                                                             |
|        \draw (0) -- (1);                                                    |
|        \draw (0) -- (2);                                                    |
|        \draw (1) -- (4);                                                    |
|        \draw (1) -- (3);                                                    |
|        \draw (3) -- (8);                                                    |
|        \draw (3) -- (6);                                                    |
|        \draw (6) -- (9);                                                    |
|        \draw (4) -- (7);                                                    |
|        \draw (4) -- (6);                                                    |
|        \draw (7) -- (9);                                                    |
|        \draw (2) -- (5);                                                    |
|        \draw (2) -- (4);                                                    |
|        \draw (5) -- (8);                                                    |
|        \draw (5) -- (7);                                                    |
|\end{tikzpicture}                                                            |
|                                                                             |
|        \draw (0) -- (2);                                                    |
|        \draw (0) -- (1);                                                    |
|        \draw (2) -- (4);                                                    |
|        \draw (2) -- (5);                                                    |
|        \draw (5) -- (8);                                                    |
|        \draw (5) -- (7);                                                    |
|        \draw (7) -- (9);                                                    |
|        \draw (4) -- (6);                                                    |
|        \draw (4) -- (7);                                                    |
|        \draw (6) -- (9);                                                    |
|        \draw (1) -- (3);                                                    |
|        \draw (1) -- (4);                                                    |
|        \draw (3) -- (8);                                                    |
|        \draw (3) -- (6);                                                    |
|\end{tikzpicture}                                                            |
|                                                                             |
|                 2        2   2      2   3   2 2              2        2     |
|o4 = {{1, x, y, x , x*y, y , x y, x*y , y , x y }, {1, y, x, y , x*y, x ,    |
|     ------------------------------------------------------------------------|
|        2   2    3   2 2                                                     |
|     x*y , x y, y , x y }}                                                   |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+

Caveat
======

Given a QuotientRing (Macaulay2Doc), or an Ideal (Macaulay2Doc),
this method will not verify level linear independence.

See also
========

  * isMacaulay -- whether a poset or ring is Macaulay

Ways to use macaulayOrders:
===========================

  * "macaulayOrders(Ideal)"
  * "macaulayOrders(Poset)"
  * "macaulayOrders(QuotientRing)"

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

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

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

The source of this document is in MacaulayPosets.m2:1624:0.

map(Poset,Poset,List) -- make a poset map
*****************************************

  * Function: map (Macaulay2Doc),
  * Usage:
        map(Q, P, L)
  * Inputs:
      * P, an instance of the type Poset (Posets), the source
        poset
      * Q, an instance of the type Poset (Posets), the target
        poset
      * L, a list (Macaulay2Doc), of length #(vertices P) and whose
        $i$th entry specifies the image of the $i$th element of P, or a
        List (Macaulay2Doc), of Option (Macaulay2Doc),s whose
        keys are vertices P and whose values are in vertices Q, or a
        HashTable (Macaulay2Doc), whose keys are vertices P and whose
        values are in vertices Q
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), =>
        ..., default value null,
      * DegreeLift (Macaulay2Doc), => ...,
        default value null,
      * DegreeMap (Macaulay2Doc), => ...,
        default value null,
  * Outputs:
      * a map of posets, the poset map from P to Q specified
        by L.

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

A poset map is a monotone function $f: P\rightarrow Q$ from a poset $P$ to a
poset $Q$, so $f(p)\leq f(q)$ whenever $p\leq q$.

Let $P = [2]$ and $Q = [3] \times [3]$. Here are the three ways to obtain the
map $\phi: P \rightarrow Q$ given by $\phi(1) = (1,1)$ and $\phi(2) = (1,2)$.

+--------------------------------------------------+
|i1 : P = chain 2                                  |
|                                                  |
|o1 = P                                            |
|                                                  |
|o1 : Poset                                        |
+--------------------------------------------------+
|i2 : Q = product(chain 3, chain 3)                |
|                                                  |
|o2 = Q                                            |
|                                                  |
|o2 : Poset                                        |
+--------------------------------------------------+
|i3 : f = map(Q, P, {{1,1}, {1,2}})                |
|                                                  |
|o3 = PosetMap{1 => {1, 1}}                        |
|              2 => {1, 2}                         |
|              source => P                         |
|              target => Q                         |
|                                                  |
|o3 : PosetMap                                     |
+--------------------------------------------------+
|i4 : g = map(Q, P, {1=>{1,1}, 2=>{1,2}})          |
|                                                  |
|o4 = PosetMap{1 => {1, 1}}                        |
|              2 => {1, 2}                         |
|              source => P                         |
|              target => Q                         |
|                                                  |
|o4 : PosetMap                                     |
+--------------------------------------------------+
|i5 : h = map(Q, P, hashTable {1=>{1,1}, 2=>{1,2}})|
|                                                  |
|o5 = PosetMap{1 => {1, 1}}                        |
|              2 => {1, 2}                         |
|              source => P                         |
|              target => Q                         |
|                                                  |
|o5 : PosetMap                                     |
+--------------------------------------------------+
|i6 : f == g                                       |
|                                                  |
|o6 = true                                         |
+--------------------------------------------------+
|i7 : g == h                                       |
|                                                  |
|o7 = true                                         |
+--------------------------------------------------+

Potentially, some of the vertices of the target may be options (Macaulay2Doc).
When there is ambiguity, the list elements will be taken
as vertices of the target as in the first of the three ways above.

+--------------------------------------+
|i8 : P = poset({1}, {})               |
|                                      |
|o8 = P                                |
|                                      |
|o8 : Poset                            |
+--------------------------------------+
|i9 : Q = poset({1, 1=>1}, {{1, 1=>1}})|
|                                      |
|o9 = Q                                |
|                                      |
|o9 : Poset                            |
+--------------------------------------+
|i10 : f = map(Q, P, {1=>1})           |
|                                      |
|o10 = PosetMap{1 => 1 => 1}           |
|               source => P            |
|               target => Q            |
|                                      |
|o10 : PosetMap                        |
+--------------------------------------+
|i11 : f 1                             |
|                                      |
|o11 = 1 => 1                          |
|                                      |
|o11 : Option                          |
+--------------------------------------+

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

  * "map(Poset,Poset,HashTable)"
  * map(Poset,Poset,List) -- make a poset
    map
-------------------------------------------------------------------------------

The source of this document is in MacaulayPosets.m2:1624:0.

MaxDegree -- the maximum degree of a monomial to calculate
**********************************************************

  * Usage:
        getMons(R, I, MaxDegree=>Number)
        getPoset(R, I, MaxDegree=>Number)

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

For getMons, the function starts at the lowest degree 0 and starts working out
the monomials of 0, 1, 2, ... until the number given.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x,y]                                                             |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I = ideal(x^2 - y^2)                                                    |
|                                                                             |
|            2    2                                                           |
|o2 = ideal(x  - y )                                                          |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : getMons(R, I, MaxDegree=>15)                                            |
|Ideal is not finite over the base (quotient ring has infinitely many monomial|
|Monomials up to degree 15 given                                              |
|                                                                             |
|                2          2   3   4     3     4   5   6     5     6   7   8 |
|o3 = {1, x, y, y , x*y, x*y , y , y , x*y , x*y , y , y , x*y , x*y , y , y ,|
|     ------------------------------------------------------------------------|
|        7     8   9   10     9     10   11   12     11     12   13   14      |
|     x*y , x*y , y , y  , x*y , x*y  , y  , y  , x*y  , x*y  , y  , y  ,     |
|     ------------------------------------------------------------------------|
|        13     14   15                                                       |
|     x*y  , x*y  , y  }                                                      |
|                                                                             |
|o3 : List                                                                    |
|-----------------------------------------------------------------------------|
|s)                                                                           |
+-----------------------------------------------------------------------------+

See also
========

  * getMons -- calculates the monomials of a ring
  * getPoset -- calculates the monomial poset of a ring

Functions with optional argument named MaxDegree:
=================================================

  * "getMons(...,MaxDegree=>...)"
  * "getPoset(...,MaxDegree=>...)"

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

The object MaxDegree, is a symbol (Macaulay2Doc).

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

The source of this document is in MacaulayPosets.m2:1624:0.

posetClosedProduct -- constructs the closed product of several posets
*********************************************************************

  * Usage:
        posetClosedProduct L
        posetClosedProduct(P, Q)
  * Inputs:
      * L, a list (Macaulay2Doc), a list of posets
      * P, an instance of the type Poset (Posets),
      * Q, an instance of the type Poset (Posets),
  * Outputs:
      * an instance of the type Poset (Posets),

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

Given a list of posets that all have a unique minimal and maximal element, the
function returns the closed product of all the posets. The closed product is
defined as follows: Suppose that for $1 \leq i \leq t$ we have posets $P_i$
with unique least element $\ell_i$ and unique largest element $L_i$. Their
$\bf{closed product}$ is the set: \[ P_1 \diamond P_2 \diamond \cdots \diamond
P_t = \left( \bigsqcup_{i=1}^t P_i \right) / (\ell_1 = \ell_2 = \cdots =
\ell_t, L_1 = L_2 = \cdots = L_t ), \] (meaning that we take the disjoint union
of the sets $P_i$ in which we identify all the $\ell_i$ into one element and
all the $L_i$ elements into one element) with the partial order $a \leq b$ if
and only if $a \leq b$ in $P_i$ for some $i$.

This is the special case of posetConnectedSum, where
the domain of the map is a $1$-vertex poset.

+-----------------------------------------------+
|i1 : R = QQ[x,y]                               |
|                                               |
|o1 = R                                         |
|                                               |
|o1 : PolynomialRing                            |
+-----------------------------------------------+
|i2 : I = ideal(x^2, y^2)                       |
|                                               |
|             2   2                             |
|o2 = ideal (x , y )                            |
|                                               |
|o2 : Ideal of R                                |
+-----------------------------------------------+
|i3 : posetClosedProduct(chain 3, getPoset(R/I))|
|                                               |
|o3 = Relation Matrix: | 1 1 1 1 1 |            |
|                      | 0 1 1 0 0 |            |
|                      | 0 0 1 0 0 |            |
|                      | 0 0 1 1 0 |            |
|                      | 0 0 1 0 1 |            |
|                                               |
|o3 : Poset                                     |
+-----------------------------------------------+

See also
========

  * ringConnectedSum -- constructs the connected sum
    of several rings
  * posetConnectedSum -- constructs the connected sum
    of several posets
  * posetWedgeProduct -- constructs the wedge product
    of several posets

Ways to use posetClosedProduct:
===============================

  * "posetClosedProduct(List)"
  * "posetClosedProduct(Poset,Poset)"

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

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

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

The source of this document is in MacaulayPosets.m2:1624:0.

posetConnectedSum -- constructs the connected sum of several posets
*******************************************************************

  * Usage:
        posetConnectedSum L
        posetConnectedSum(f, g)
  * Inputs:
      * L, a list (Macaulay2Doc), of rank-preserving injective
        PosetMap,s.
      * f, a map of posets,
      * g, a map of posets,
  * Outputs:
      * an instance of the type Poset (Posets),

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

In this construction, several posets are glued together at the top and at the
bottom. Suppose $A,B$ are self-dual posets, $C$ is a poset, and $i_A: C
\rightarrow A$ and $i_B: C \rightarrow B$ are rank-preserving, injective
poset maps. Let $d_A: A \rightarrow A^{\operatorname{op}}$ and $d_B:
B \rightarrow B^{\operatorname{op}}$ be the dual isomorphisms. The connected
sum of $A$ and $B$ with respect to $i_A, i_B$ is the poset obtained by taking
the disjoint union of $A$ and $B$, identifying the image of $i_A$ with the
image of $i_B$, and identifying the image of $d_A \circ i_A$ with the image of
$d_B \circ i_B$. This construction can also be generalized to connected sums of
more than two posets.

This is a generalization of posetClosedProduct.

Here is the connected sum of the chain $[5]$ with itself with respect to the
inclusion map $[2]\hookrightarrow[5]$ with $1 \mapsto 1$ and $2 \mapsto 2$.

+----------------------------------------------------------------------+
|i1 : i = map(chain 5, chain 2, {1=>1, 2=>2})                          |
|                                                                      |
|o1 = PosetMap{1 => 1                                  }               |
|              2 => 2                                                  |
|              source => Relation Matrix: | 1 1 |                      |
|                                         | 0 1 |                      |
|              target => Relation Matrix: | 1 1 1 1 1 |                |
|                                         | 0 1 1 1 1 |                |
|                                         | 0 0 1 1 1 |                |
|                                         | 0 0 0 1 1 |                |
|                                         | 0 0 0 0 1 |                |
|                                                                      |
|o1 : PosetMap                                                         |
+----------------------------------------------------------------------+
|i2 : A = posetConnectedSum(i, i)                                      |
|                                                                      |
|o2 = A                                                                |
|                                                                      |
|o2 : Poset                                                            |
+----------------------------------------------------------------------+
|i3 : areIsomorphic( A, adjoinMin adjoinMax product(chain 2, chain 2) )|
|                                                                      |
|o3 = true                                                             |
+----------------------------------------------------------------------+

Let $P = [2] \times [2]$, let $Q = [2] \times [5]$. There are two different
connected sums over $P$ of $Q$ with itself. The map $f: P \rightarrow Q$ is the
inclusion map with $(1,2) \mapsto (1,2)$ and $(2,1) \mapsto (2,1)$. The map $g:
P \rightarrow Q$ is the other rank-preserving injection, with $(1,2) \mapsto
(2,1)$ and $(2,1) \mapsto (1,2)$.

+------------------------------------------------+
|i4 : P = product(chain 2, chain 2)              |
|                                                |
|o4 = P                                          |
|                                                |
|o4 : Poset                                      |
+------------------------------------------------+
|i5 : Q = product(chain 2, chain 5)              |
|                                                |
|o5 = Q                                          |
|                                                |
|o5 : Poset                                      |
+------------------------------------------------+
|i6 : f = map(Q, P, {{1,1}, {1,2}, {2,1}, {2,2}})|
|                                                |
|o6 = PosetMap{{1, 1} => {1, 1}}                 |
|              {1, 2} => {1, 2}                  |
|              {2, 1} => {2, 1}                  |
|              {2, 2} => {2, 2}                  |
|              source => P                       |
|              target => Q                       |
|                                                |
|o6 : PosetMap                                   |
+------------------------------------------------+
|i7 : g = map(Q, P, {{1,1}, {2,1}, {1,2}, {2,2}})|
|                                                |
|o7 = PosetMap{{1, 1} => {1, 1}}                 |
|              {1, 2} => {2, 1}                  |
|              {2, 1} => {1, 2}                  |
|              {2, 2} => {2, 2}                  |
|              source => P                       |
|              target => Q                       |
|                                                |
|o7 : PosetMap                                   |
+------------------------------------------------+
|i8 : R = posetConnectedSum(f, g)                |
|                                                |
|o8 = R                                          |
|                                                |
|o8 : Poset                                      |
+------------------------------------------------+
|i9 : S = posetConnectedSum(f, f)                |
|                                                |
|o9 = S                                          |
|                                                |
|o9 : Poset                                      |
+------------------------------------------------+
|i10 : areIsomorphic(R, S)                       |
|                                                |
|o10 = false                                     |
+------------------------------------------------+
|i11 : areIsomorphic(S, product(chain 2, A))     |
|                                                |
|o11 = true                                      |
+------------------------------------------------+

Ways to use posetConnectedSum:
==============================

  * "posetConnectedSum(List)"
  * "posetConnectedSum(PosetMap,PosetMap)"

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

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

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

The source of this document is in MacaulayPosets.m2:1624:0.

posetFiberProduct -- constructs the fiber product of several posets
*******************************************************************

  * Usage:
        posetFiberProduct L
        posetFiberProduct(f, g)
  * Inputs:
      * L, a list (Macaulay2Doc), a list of rank-preserving
        injective PosetMap,s.
      * f, a map of posets,
      * g, a map of posets,
  * Outputs:
      * an instance of the type Poset (Posets),

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

In this construction, several posets are glued together along a common
subposet. Suppose $(A, \leq_A), (B, \leq_B), (C, \leq_C)$ are posets and
$\iota_A: C \rightarrow A$ and $\iota_B: C \rightarrow B$ are rank-preserving,
injective, and monotone. Then, we have a fiber product \[A \times_C B = (A
\setminus \iota_A(C)) \sqcup (B \setminus \iota_B(C)) \sqcup C\] with $a \geq
c$ iff $a \geq_A \iota_A(c)$ for $a \in A$ and $c \in C$, and $b \geq c$ iff $b
\geq_B \iota_A(c)$ for $b \in A$ and $c \in C$.

This is a generalization of posetWedgeProduct.

+-----------------------------------------------------------------------------+
|i1 : P = product(chain 2, chain 2)                                           |
|                                                                             |
|o1 = P                                                                       |
|                                                                             |
|o1 : Poset                                                                   |
+-----------------------------------------------------------------------------+
|i2 : Q = product(chain 2, chain 3)                                           |
|                                                                             |
|o2 = Q                                                                       |
|                                                                             |
|o2 : Poset                                                                   |
+-----------------------------------------------------------------------------+
|i3 : f = map(Q, P, {{1,1}, {1,2}, {2,1}, {2,2}})                             |
|                                                                             |
|o3 = PosetMap{{1, 1} => {1, 1}}                                              |
|              {1, 2} => {1, 2}                                               |
|              {2, 1} => {2, 1}                                               |
|              {2, 2} => {2, 2}                                               |
|              source => P                                                    |
|              target => Q                                                    |
|                                                                             |
|o3 : PosetMap                                                                |
+-----------------------------------------------------------------------------+
|i4 : g = map(Q, P, {{1,1}, {2,1}, {1,2}, {2,2}})                             |
|                                                                             |
|o4 = PosetMap{{1, 1} => {1, 1}}                                              |
|              {1, 2} => {2, 1}                                               |
|              {2, 1} => {1, 2}                                               |
|              {2, 2} => {2, 2}                                               |
|              source => P                                                    |
|              target => Q                                                    |
|                                                                             |
|o4 : PosetMap                                                                |
+-----------------------------------------------------------------------------+
|i5 : R = (ZZ/2)[x,y]                                                         |
|                                                                             |
|o5 = R                                                                       |
|                                                                             |
|o5 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i6 : I = monomialIdeal(x^3, x^2 * y^2, y^3)                                  |
|                                                                             |
|                     3   2 2   3                                             |
|o6 = monomialIdeal (x , x y , y )                                            |
|                                                                             |
|o6 : MonomialIdeal of R                                                      |
+-----------------------------------------------------------------------------+
|i7 : areIsomorphic(posetFiberProduct(f, g), getPoset(R/I))                   |
|                                                                             |
|o7 = true                                                                    |
+-----------------------------------------------------------------------------+
|i8 : chainWedgePoset = product(chain 2, adjoinMin posetWedgeProduct(chain 2, |
|                                                                             |
|o8 = chainWedgePoset                                                         |
|                                                                             |
|o8 : Poset                                                                   |
|-----------------------------------------------------------------------------|
|chain 2))                                                                    |
+-----------------------------------------------------------------------------+
|i9 : areIsomorphic(posetFiberProduct(f, f), chainWedgePoset)                 |
|                                                                             |
|o9 = true                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * posetWedgeProduct -- constructs the wedge product
    of several posets
  * posetConnectedSum -- constructs the connected sum
    of several posets

Ways to use posetFiberProduct:
==============================

  * "posetFiberProduct(List)"
  * "posetFiberProduct(PosetMap,PosetMap)"

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

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

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

The source of this document is in MacaulayPosets.m2:1624:0.

PosetMap -- the class of all morphisms between posets
*****************************************************

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

Poset maps are used to obtain fiber products, and
connected sums, of posets (Posets).

See also
========

  * posetFiberProduct -- constructs the fiber product
    of several posets
  * posetConnectedSum -- constructs the connected sum
    of several posets

Functions and methods returning a map of posets:
================================================

  * "map(Poset,Poset,HashTable)" -- see map(Poset,Poset,List),
    -- make a poset map
  * map(Poset,Poset,List) -- make a poset
    map
  * PosetMap * PosetMap -- composition of poset
    maps

Methods that use a map of posets:
=================================

  * "image(PosetMap)" -- see image(PosetMap,List),
    -- the image of a poset map
  * image(PosetMap,List) -- the image of a
    poset map
  * isInjective(PosetMap)
  * "isRankPreserving(PosetMap)" -- see isRankPreserving,
    -- whether a poset map is rank-preserving
  * isSurjective(PosetMap)
  * "posetConnectedSum(PosetMap,PosetMap)" -- see posetConnectedSum,
    -- constructs the connected sum of several posets
  * "posetFiberProduct(PosetMap,PosetMap)" -- see posetFiberProduct,
    -- constructs the fiber product of several posets
  * PosetMap == PosetMap -- whether two poset maps
    are equal
  * PosetMap Thing -- applies a poset map to a poset
    element
  * source(PosetMap)
  * target(PosetMap)

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

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

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

The source of this document is in MacaulayPosets.m2:1624:0.

PosetMap * PosetMap -- composition of poset maps
************************************************

  * Operator: * (Macaulay2Doc),
  * Usage:
        g * f
  * Inputs:
      * f, a map of posets,
      * g, a map of posets,
  * Outputs:
      * a map of posets, the composition $g \circ f$

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

  * PosetMap * PosetMap -- composition of poset
    maps
-------------------------------------------------------------------------------

The source of this document is in MacaulayPosets.m2:1624:0.

PosetMap == PosetMap -- whether two poset maps are equal
********************************************************

  * Operator: == (Macaulay2Doc),
  * Usage:
        P==Q
  * Inputs:
      * P, a map of posets,
      * Q, a map of posets,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

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

  * PosetMap == PosetMap -- whether two poset maps
    are equal
-------------------------------------------------------------------------------

The source of this document is in MacaulayPosets.m2:1624:0.

PosetMap Thing -- applies a poset map to a poset element
********************************************************

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        P p
  * Inputs:
      * P, a map of posets,
      * p, a thing (Macaulay2Doc),
  * Outputs:
      * a thing (Macaulay2Doc),

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

+---------------------------------------------------------------+
|i1 : f = map(product(chain 2, chain 2), chain 2, {{1,1},{1,2}})|
|                                                               |
|o1 = PosetMap{1 => {1, 1}                           }          |
|              2 => {1, 2}                                      |
|              source => Relation Matrix: | 1 1 |               |
|                                         | 0 1 |               |
|              target => Relation Matrix: | 1 1 1 1 |           |
|                                         | 0 1 0 1 |           |
|                                         | 0 0 1 1 |           |
|                                         | 0 0 0 1 |           |
|                                                               |
|o1 : PosetMap                                                  |
+---------------------------------------------------------------+
|i2 : f 1                                                       |
|                                                               |
|o2 = {1, 1}                                                    |
|                                                               |
|o2 : List                                                      |
+---------------------------------------------------------------+
|i3 : f 2                                                       |
|                                                               |
|o3 = {1, 2}                                                    |
|                                                               |
|o3 : List                                                      |
+---------------------------------------------------------------+

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

  * PosetMap Thing -- applies a poset map to a poset
    element
-------------------------------------------------------------------------------

The source of this document is in MacaulayPosets.m2:1624:0.

posetWedgeProduct -- constructs the wedge product of several posets
*******************************************************************

  * Usage:
        posetWedgeProduct L
  * Inputs:
      * L, a list (Macaulay2Doc), a list of posets (Posets),
      * P, an instance of the type Poset (Posets),
      * Q, an instance of the type Poset (Posets),
  * Outputs:
      * an instance of the type Poset (Posets),

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

Given a list L of posets all with unique minimal elements, the function returns
the wedge product of all the posets. The wedge product is defined as follows:
Suppose that for $1\leq i\leq t$ we have posets $P_i$ with unique least element
$\ell_i$. Their $\bf{wedge product}$ is the set: \[ P_1 \vee P_2 \vee \cdots
\vee  P_t = \left(\bigsqcup_{i=1}^t P_i \right)/ (\ell_1=\ell_2=\cdots
=\ell_t), \] (meaning that we take the disjoint union of the sets $P_i$ in
which we identify all the $\ell_i$ into one element) with the partial order $a
\leq b$ if and only if $a\leq b$ in $P_i$ for some $i$.

This is the special case of posetFiberProduct, where
the domain of the map is a $1$-vertex poset.

+-----------------------------------------------------------------+
|i1 : R = QQ[x,y]                                                 |
|                                                                 |
|o1 = R                                                           |
|                                                                 |
|o1 : PolynomialRing                                              |
+-----------------------------------------------------------------+
|i2 : I = ideal(x^3, y^2)                                         |
|                                                                 |
|             3   2                                               |
|o2 = ideal (x , y )                                              |
|                                                                 |
|o2 : Ideal of R                                                  |
+-----------------------------------------------------------------+
|i3 : posetWedgeProduct {booleanLattice 3, chain 4, getPoset(R/I)}|
|                                                                 |
|o3 = Relation Matrix: | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 |        |
|                      | 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 |        |
|                      | 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 |        |
|                      | 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 |        |
|                      | 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 |        |
|                      | 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 |        |
|                      | 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 |        |
|                      | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 |        |
|                      | 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 |        |
|                      | 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 |        |
|                      | 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 |        |
|                      | 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 |        |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 |        |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 |        |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 |        |
|                      | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 |        |
|                                                                 |
|o3 : Poset                                                       |
+-----------------------------------------------------------------+

See also
========

  * ringFiberProduct -- constructs the fiber product
    of several rings
  * posetFiberProduct -- constructs the fiber product
    of several posets
  * posetClosedProduct -- constructs the closed
    product of several posets

Ways to use posetWedgeProduct:
==============================

  * "posetWedgeProduct(List)"
  * "posetWedgeProduct(Poset,Poset)"

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

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

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

The source of this document is in MacaulayPosets.m2:1624:0.

ringConnectedSum -- constructs the connected sum of several rings
*****************************************************************

  * Usage:
        ringConnectedSum(I, J, ...)
        ringConnectedSum(S, T, ...)
  * Inputs:
      * I, an ideal (Macaulay2Doc), a homogeneous ideal of a
        PolynomialRing (Macaulay2Doc).
      * J, an ideal (Macaulay2Doc), a homogeneous ideal of a
        PolynomialRing (Macaulay2Doc).
      * S, a quotient ring (Macaulay2Doc), a quotient of a
        polynomial ring by a homogeneous ideal
      * T, a quotient ring (Macaulay2Doc), a quotient of a
        polynomial ring by a homogeneous ideal
  * Outputs:
      * an ideal (Macaulay2Doc),
      * a quotient ring (Macaulay2Doc),

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

Suppose we have Gorenstein rings $S_1 = R_1/I_1$ and $S_2 = R_2/I_2$ for some
homogeneous ideals $I_1$ of $R_1 = K[x_1, \dots, x_n]$ and $I_2$ of $R_2 =
K[y_1, \dots, y_m]$, where $K$ is a field. Let $m_1, m_2$ be the maximal
elements of the monomial posets, of $S_1, S_2$, respectively.
The connected sum of $S_1$ and $S_2$ is their fiber product,
mod $m_1-m_2$. In symbols, $S_1 \# S_2 = \frac{S_1 \times_K
S_2}{(m_1-m_2)}$.

+-----------------------------------------------------------------------------+
|i1 : R = (ZZ/2)[u,v,w]                                                       |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I = ideal(u^4, v^2-w^2, w^2-v*u)                                        |
|                                                                             |
|             4   2    2         2                                            |
|o2 = ideal (u , v  + w , u*v + w )                                           |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : S = R/I                                                                 |
|                                                                             |
|o3 = S                                                                       |
|                                                                             |
|o3 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i4 : T = newRing(S, Variables=>{x,y,z})                                      |
|                                                                             |
|o4 = T                                                                       |
|                                                                             |
|o4 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i5 : U = ringConnectedSum(S, T)                                              |
|                                                                             |
|o5 = U                                                                       |
|                                                                             |
|o5 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i6 : ideal U                                                                 |
|                                                                             |
|             4   2    2         2   4   2    2         2                     |
|o6 = ideal (u , v  + w , u*v + w , x , y  + z , x*y + z , u*x, u*y, u*z, v*x,|
|     ------------------------------------------------------------------------|
|                               5    5                                        |
|     v*y, v*z, w*x, w*y, w*z, w  + z )                                       |
|                                                                             |
|              ZZ                                                             |
|o6 : Ideal of --[u..z]                                                       |
|               2                                                             |
+-----------------------------------------------------------------------------+
|i7 : isMacaulay S                                                            |
|                                                                             |
|o7 = true                                                                    |
+-----------------------------------------------------------------------------+
|i8 : isMacaulay U                                                            |
|                                                                             |
|o8 = false                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * posetClosedProduct -- constructs the closed
    product of several posets
  * ringFiberProduct -- constructs the fiber product
    of several rings

Ways to use ringConnectedSum:
=============================

  * "ringConnectedSum(Ideal,Ideal)"
  * "ringConnectedSum(List)"
  * "ringConnectedSum(QuotientRing,QuotientRing)"
  * "ringConnectedSum(Sequence)"

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

The object ringConnectedSum, is an associative binary method function (Macaulay2Doc).

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

The source of this document is in MacaulayPosets.m2:1624:0.

ringFiberProduct -- constructs the fiber product of several rings
*****************************************************************

  * Usage:
        ringFiberProduct(I, J)
        ringFiberProduct(S, T)
  * Inputs:
      * I, an ideal (Macaulay2Doc), a homogeneous ideal of a
        PolynomialRing (Macaulay2Doc).
      * J, an ideal (Macaulay2Doc), a homogeneous ideal of a
        PolynomialRing (Macaulay2Doc).
      * S, a quotient ring (Macaulay2Doc), a quotient of a
        polynomial ring by a homogeneous ideal
      * T, a quotient ring (Macaulay2Doc), a quotient of a
        polynomial ring by a homogeneous ideal
  * Outputs:
      * an ideal (Macaulay2Doc),
      * a quotient ring (Macaulay2Doc),

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

Suppose we have rings $S_1 = R_1/I_1$ and $S_2 = R_2/I_2$ for some homogeneous
ideals $I_1$ of $R_1 = K[x_1, \dots, x_n]$ and $I_2$ of $R_2 = K[y_1, \dots,
y_m]$, where $K$ is a field. Their fiber product over $K$ is the ring: \[ S_1
\times_K S_2 = K[x_1, \dots, x_n, y_1, \dots, y_m] / (I_1 + I_2 + (x_i y_j : 1
\leq i \leq n, 1 \leq j \leq m )) \]

+-----------------------------------------+
|i1 : R = QQ[x,y]                         |
|                                         |
|o1 = R                                   |
|                                         |
|o1 : PolynomialRing                      |
+-----------------------------------------+
|i2 : I = ideal(x^2, y^2)                 |
|                                         |
|             2   2                       |
|o2 = ideal (x , y )                      |
|                                         |
|o2 : Ideal of R                          |
+-----------------------------------------+
|i3 : S = QQ[a,b]                         |
|                                         |
|o3 = S                                   |
|                                         |
|o3 : PolynomialRing                      |
+-----------------------------------------+
|i4 : J = ideal(a^4, b^4)                 |
|                                         |
|             4   4                       |
|o4 = ideal (a , b )                      |
|                                         |
|o4 : Ideal of S                          |
+-----------------------------------------+
|i5 : ringFiberProduct(R/I, S/J)          |
|                                         |
|                QQ[x..y, a..b]           |
|o5 = ------------------------------------|
|       2   2   4   4                     |
|     (x , y , a , b , x*a, x*b, y*a, y*b)|
|                                         |
|o5 : QuotientRing                        |
+-----------------------------------------+
+--------------------------------------------------------------------------+
|i6 : R = (ZZ/7)[x,y,z]                                                    |
|                                                                          |
|o6 = R                                                                    |
|                                                                          |
|o6 : PolynomialRing                                                       |
+--------------------------------------------------------------------------+
|i7 : I = ideal(x^2, y^3, z^4)                                             |
|                                                                          |
|             2   3   4                                                    |
|o7 = ideal (x , y , z )                                                   |
|                                                                          |
|o7 : Ideal of R                                                           |
+--------------------------------------------------------------------------+
|i8 : S = (ZZ/7)[a,b,c]                                                    |
|                                                                          |
|o8 = S                                                                    |
|                                                                          |
|o8 : PolynomialRing                                                       |
+--------------------------------------------------------------------------+
|i9 : J = ideal(a, b^3, c^3)                                               |
|                                                                          |
|                3   3                                                     |
|o9 = ideal (a, b , c )                                                    |
|                                                                          |
|o9 : Ideal of S                                                           |
+--------------------------------------------------------------------------+
|i10 : ringFiberProduct(R/I, S/J)                                          |
|                                                                          |
|                                 ZZ                                       |
|                                 --[x..z, a..c]                           |
|                                  7                                       |
|o10 = --------------------------------------------------------------------|
|        2   3   4      3   3                                              |
|      (x , y , z , a, b , c , x*a, x*b, x*c, y*a, y*b, y*c, z*a, z*b, z*c)|
|                                                                          |
|o10 : QuotientRing                                                        |
+--------------------------------------------------------------------------+

See also
========

  * posetWedgeProduct -- constructs the wedge product
    of several posets
  * ringConnectedSum -- constructs the connected sum
    of several rings

Ways to use ringFiberProduct:
=============================

  * "ringFiberProduct(Ideal,Ideal)"
  * "ringFiberProduct(List)"
  * "ringFiberProduct(QuotientRing,QuotientRing)"
  * "ringFiberProduct(Sequence)"

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

The object ringFiberProduct, is an associative binary method function (Macaulay2Doc).

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

The source of this document is in MacaulayPosets.m2:1624:0.

source(PosetMap)
****************

  * Function: source (Macaulay2Doc),
  * Usage:
        source f
  * Inputs:
      * f, a map of posets,
  * Outputs:
      * an instance of the type Poset (Posets),

See also
========

  * PosetMap -- the class of all morphisms between posets
  * target(PosetMap)

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

  * source(PosetMap)
-------------------------------------------------------------------------------

The source of this document is in MacaulayPosets.m2:1624:0.

target(PosetMap)
****************

  * Function: target (Macaulay2Doc),
  * Usage:
        target f
  * Inputs:
      * f, a map of posets,
  * Outputs:
      * an instance of the type Poset (Posets),

See also
========

  * PosetMap -- the class of all morphisms between posets
  * source(PosetMap)

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

  * target(PosetMap)
-------------------------------------------------------------------------------

The source of this document is in MacaulayPosets.m2:1624:0.

TikZ -- whether to print TikZ code
**********************************

  * Usage:
        macaulayOrders(P, TikZ=>Boolean)
        isMacaulay(P, TikZ=>Boolean)

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

Suppose the poset is Macaulay with respect to a total order $<$. If two
vertices $p$ and $q$ have the same rank, then $p<q$ if and only if $p$ is to
the left of $q$ in the Hasse diagram drawn with TikZ=>true. For
macaulayOrders, with AllOrders=>true, there is a Hasse diagram
for each order. For isMacaulay, and for macaulayOrders,
with AllOrders=>false, there is at most one Hasse diagram.

+---------------------------------------------------------------------------+
|i1 : R = QQ[x,y]                                                           |
|                                                                           |
|o1 = R                                                                     |
|                                                                           |
|o1 : PolynomialRing                                                        |
+---------------------------------------------------------------------------+
|i2 : I = monomialIdeal(x^3, x^2*y^2, y^3)                                  |
|                                                                           |
|                     3   2 2   3                                           |
|o2 = monomialIdeal (x , x y , y )                                          |
|                                                                           |
|o2 : MonomialIdeal of R                                                    |
+---------------------------------------------------------------------------+
|i3 : macaulayOrders(standardMonomialPoset I, TikZ=>true)                   |
|                                                                           |
|        \draw (0) -- (1);                                                  |
|        \draw (0) -- (2);                                                  |
|        \draw (1) -- (4);                                                  |
|        \draw (1) -- (3);                                                  |
|        \draw (3) -- (6);                                                  |
|        \draw (4) -- (7);                                                  |
|        \draw (4) -- (6);                                                  |
|        \draw (2) -- (4);                                                  |
|        \draw (2) -- (5);                                                  |
|        \draw (5) -- (7);                                                  |
|\end{tikzpicture}                                                          |
|                                                                           |
|        \draw (0) -- (2);                                                  |
|        \draw (0) -- (1);                                                  |
|        \draw (2) -- (4);                                                  |
|        \draw (2) -- (5);                                                  |
|        \draw (5) -- (7);                                                  |
|        \draw (4) -- (6);                                                  |
|        \draw (4) -- (7);                                                  |
|        \draw (1) -- (4);                                                  |
|        \draw (1) -- (3);                                                  |
|        \draw (3) -- (6);                                                  |
|\end{tikzpicture}                                                          |
|                                                                           |
|                 2        2   2      2              2        2     2   2   |
|o3 = {{1, x, y, x , x*y, y , x y, x*y }, {1, y, x, y , x*y, x , x*y , x y}}|
|                                                                           |
|o3 : List                                                                  |
+---------------------------------------------------------------------------+

See also
========

  * macaulayOrders -- finds all orders with respect to
    which the poset is Macaulay
  * isMacaulay -- whether a poset or ring is Macaulay
  * Visual -- whether to visualize the Macaulay orders

Functions with optional argument named TikZ:
============================================

  * "isMacaulay(...,TikZ=>...)"
  * "macaulayOrders(...,TikZ=>...)"

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

The object TikZ, is a symbol (Macaulay2Doc).

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

The source of this document is in MacaulayPosets.m2:1624:0.

upperShadow -- the upper shadow of a subset of a poset
******************************************************

  * Usage:
        upperShadow(P,S)
  * Inputs:
      * P, an instance of the type Poset (Posets),
      * S, a list (Macaulay2Doc), a subset of the ground set of the
        poset
  * Outputs:
      * a list (Macaulay2Doc),

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

If $S$ is a subset of a poset, then the upper shadow of $S$ is the set of all
elements of the poset which cover some element of $S$.

+------------------------------------------+
|i1 : upperShadow(divisorPoset 12, {2,3})  |
|                                          |
|o1 = {4, 6}                               |
|                                          |
|o1 : List                                 |
+------------------------------------------+
|i2 : S = QQ[x,y]/(x^4, y^4)               |
|                                          |
|o2 = S                                    |
|                                          |
|o2 : QuotientRing                         |
+------------------------------------------+
|i3 : x = S_0                              |
|                                          |
|o3 = x                                    |
|                                          |
|o3 : S                                    |
+------------------------------------------+
|i4 : y = S_1                              |
|                                          |
|o4 = y                                    |
|                                          |
|o4 : S                                    |
+------------------------------------------+
|i5 : upperShadow(getPoset S, {x^3, x^2*y})|
|                                          |
|       3    2 2                           |
|o5 = {x y, x y }                          |
|                                          |
|o5 : List                                 |
+------------------------------------------+

See also
========

  * lowerShadow -- the lower shadow of a subset of a poset

Ways to use upperShadow:
========================

  * "upperShadow(Poset,List)"

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

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

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

The source of this document is in MacaulayPosets.m2:1624:0.

Visual -- whether to visualize the Macaulay orders
**************************************************

  * Usage:
        macaulayOrders(P, Visual=>Thing)
        isMacaulay(P, Visual=>Thing)

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

If this option is set to a String (Macaulay2Doc), or to the
Boolean (Macaulay2Doc), true, then the method will use Visualize,
to create a visualization of the poset, and an additional
visualization for each Macaulay order with the vertices labeled with integers
according to the order. If set to a String (Macaulay2Doc), that
port will be used. Otherwise, port "8080" will be used.

See also
========

  * macaulayOrders -- finds all orders with respect to
    which the poset is Macaulay
  * isMacaulay -- whether a poset or ring is Macaulay
  * TikZ -- whether to print TikZ code

Functions with optional argument named Visual:
==============================================

  * "isMacaulay(...,Visual=>...)"
  * "macaulayOrders(...,Visual=>...)"

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

The object Visual, is a symbol (Macaulay2Doc).

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

The source of this document is in MacaulayPosets.m2:1624:0.