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

MonomialIntegerPrograms -- A package for fast monomial ideal computations using constraint integer programming
**************************************************************************************************************

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

Installation and licensing information.

This package relies on the constraint integer program solver SCIP, which is
available at https://scip.zib.de/. This software is free for for academic,
non-commercial purposes. Notice that SCIP is not distributed under GPL, but
under the ZIB Academic License (https://scip.zib.de/academic.txt).

To install SCIP, click the Download tab on the left-hand side of the SCIP home
page. The easiest method is to install prebuilt binaries (look for the heading
Installers (install the scipoptsuite in your computer, without source files).
Choose the appropriate Linux, Windows, or MacOS file. The download is free, but
you will be asked to submit your name and academic institution, to conform to
the ZIB Academic License requirements, before the download begins.

Under the heading Source Code, you can find the files for building from source.
If building from source, you MUST include the source files for the modeling
language Zimpl in order to use the Monomial Integer Programs package. This will
be included if you choose the download named SCIP Optimization Suite, rather
than the one named SCIP. Alternatively, download SCIP and then follow the ZIMPL
link at the top of the home page to download the source files for Zimpl. When
building SCIP, you will have to set a flag indicating that Zimpl should be
built as well. For more information about building SCIP visit their online
documentation (https://scip.zib.de/doc-6.0.0/html/) and click on Overview ->
Getting started -> Installing SCIP.

An excellent user guide to using Zimpl can be found at
https://zimpl.zib.de/download/zimpl.pdf. The author, Thorsten Koch, requests
that research making use of this software please cite his 2004 PhD thesis,
Rapid Mathematical Programming. The appropriate BibTeX entry can be found here:
https://zimpl.zib.de/download/zimpl.bib. Zimpl is distributed under GPL.

Additionally, any research that uses SCIP needs a proper citation. See the How
to Cite tab on their home page.

Finally, because this package relies on temporary files, Windows users must
ensure the directory /tmp exists as stated in the documentation of
temporaryFileName (Macaulay2Doc).

Behavior of package on load.

The value of ScipPrintLevel, determines the verbosity. It
is set to 0 when the package is loaded.

The functions codim (Macaulay2Doc), and degree (Macaulay2Doc),
are overwritten for inputs with type MonomialIdeal (Macaulay2Doc).
Specifically, see loadSCIPCodimAndDegree,
is run when the package is loaded.

Caveat
======

These methods are designed and tested for ideals and polynomial rings with a
field as the coefficients ring. For other rings, the behavior of these methods
is unspecified.

See also
========

  * codimensionIP -- compute the codimension of a
    monomial ideal using integer programming
  * degreeIP -- compute the degree of a monomial ideal using
    integer programming
  * dimensionIP -- compute the dimension of a monomial
    ideal using integer programming
  * monomialIdealsWithHilbertFunction,
    -- find all monomial ideals in a polynomial ring with a particular (partial
    or complete) Hilbert function
  * topMinimalPrimesIP -- compute the minimal primes
    of maximum dimension using integer programming
  * ScipPrintLevel -- adjust how much solving
    information is displayed in MonomialIntegerPrograms

Authors
=======

  * Lily Silverstein (see https://cpp.edu/faculty/lsilverstein )
    <lsilverstein@cpp.edu>
  * Jay White (see https://math.as.uky.edu/users/jwh245 ) <jay.white@uky.edu>

Version
=======

This documentation describes version 1.0 of MonomialIntegerPrograms.

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

The source code from which this documentation is derived is in the file
MonomialIntegerPrograms.m2 (see
common/share/Macaulay2/MonomialIntegerPrograms.m2 ). The auxiliary files
accompanying it are in the directory MonomialIntegerPrograms/ (see
common/share/Macaulay2/MonomialIntegerPrograms/ ).

Exports
=======

  * Functions and commands
      * bettiTablesWithHilbertFunction,
        -- list or tally all Betti tables that can be obtained from monomial
        ideals with a particular (partial or complete) Hilbert function
      * codimensionIP -- compute the codimension of a
        monomial ideal using integer programming
      * degreeIP -- compute the degree of a monomial ideal
        using integer programming
      * dimensionIP -- compute the dimension of a monomial
        ideal using integer programming
      * loadBuiltinCodimAndDegree -- change
        codim and degree to use the default, built-in methods.
      * loadSCIPCodimAndDegree -- change codim
        and degree to use the default, built-in methods.
      * minimalPrimesIP -- one line description if
        different from minimalPrimesIP
      * monomialIdealsWithHilbertFunction
        -- find all monomial ideals in a
        polynomial ring with a particular (partial or complete) Hilbert
        function
      * topMinimalPrimesIP -- compute the minimal
        primes of maximum dimension using integer programming
  * Methods
      * "bettiTablesWithHilbertFunction(List,PolynomialRing)" -- see
        bettiTablesWithHilbertFunction, -- list
        or tally all Betti tables that can be obtained from monomial ideals
        with a particular (partial or complete) Hilbert function
      * "codimensionIP(MonomialIdeal)" -- see codimensionIP,
        -- compute the codimension of a monomial ideal using
        integer programming
      * "degreeIP(MonomialIdeal)" -- see degreeIP, -- compute
        the degree of a monomial ideal using integer programming
      * "dimensionIP(MonomialIdeal)" -- see dimensionIP, --
        compute the dimension of a monomial ideal using integer programming
      * "minimalPrimesIP(MonomialIdeal)" -- see minimalPrimesIP,
        -- one line description if different from
        minimalPrimesIP
      * "minimalPrimesIP(MonomialIdeal,ZZ)" -- see minimalPrimesIP,
        -- one line description if different from
        minimalPrimesIP
      * "monomialIdealsWithHilbertFunction(List,PolynomialRing)" -- see
        monomialIdealsWithHilbertFunction,
        -- find all monomial ideals in a polynomial ring with a particular
        (partial or complete) Hilbert function
      * "topMinimalPrimesIP(MonomialIdeal)" -- see topMinimalPrimesIP,
        -- compute the minimal primes of maximum dimension
        using integer programming
  * Symbols
      * BoundGenerators
      * Count
      * FirstBetti
      * GradedBettis
      * IgnorePrimes -- Ignores certain primes when
        computing top minimal primes.
      * SquareFree
      * "KnownDim" -- see topMinimalPrimesIP, --
        compute the minimal primes of maximum dimension using integer
        programming
  * Other things
      * ScipPrintLevel -- adjust how much solving
        information is displayed in MonomialIntegerPrograms

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

The object MonomialIntegerPrograms, is a package (Macaulay2Doc).

bettiTablesWithHilbertFunction -- list or tally all Betti tables that can be obtained from monomial ideals with a particular (partial or complete) Hilbert function
*******************************************************************************************************************************************************************

Synopsis
========

  * Usage:
        bettiTablesWithHilbertFunction(L, R)
        bettiTablesWithHilbertFunction(L, R, BoundGenerators => a)
        bettiTablesWithHilbertFunction(L, R, FirstBetti => b)
        bettiTablesWithHilbertFunction(L, R, GradedBettis => B)
        bettiTablesWithHilbertFunction(L, R, SquareFree => x)
        bettiTablesWithHilbertFunction(L, R, Count => y)
  * Inputs:
      * L, a list (Macaulay2Doc), $\{h(0), h(1), \ldots, h(d)\}$,
        the values of a valid Hilbert function for $R$ for degrees $0\ldots d$.
      * R, a polynomial ring (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * BoundGenerators => an integer (Macaulay2Doc), default value
        -1, a degree bound on the monomial generators
      * FirstBetti => an integer (Macaulay2Doc), default value null,
        a specified first total Betti number
      * GradedBettis => a list (Macaulay2Doc), default value null,
        if the form $\{b_0, b_1, \ldots, b_d\}$, where $b_i$ is the first
        graded Betti numbers with degree $i$.
      * SquareFree => a Boolean value (Macaulay2Doc), default
        value false, whether or not to consider squarefree monomial ideals only
      * Count => a Boolean value (Macaulay2Doc), default value
        false, whether or not to return the count of unique tables instead of
        all values
  * Outputs:
      * a list (Macaulay2Doc), all unique Betti tables that can be
        obtained from monomial ideals of $R$ with Hilbert function beginning
        with $L$, or
      * a tally (Macaulay2Doc), the same set of Betti tables, with
        the number of unique monomial ideals producing each one

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

This function calls monomialIdealsWithHilbertFunction,
with the specified options, determines the
Betti table of each feasible monomial ideal, then lists or tallies the Betti
tables encountered. The Count option does not fundamentally change how the
computation is performed, only how the results are reported.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x,y,z]; L = {1, 3, 5, 5, 4};                                     |
+-----------------------------------------------------------------------------+
|i3 : bettiTablesWithHilbertFunction(L, R) --outputs unique tables matching th|
|                                                                             |
|             0 1 2 3         0 1 2 3         0 1 2 3         0 1 2 3         |
|o3 = {total: 1 4 4 1, total: 1 4 4 1, total: 1 4 4 1, total: 1 3 3 1, total: |
|          0: 1 . . .      0: 1 . . .      0: 1 . . .      0: 1 . . .      0: |
|          1: . 1 . .      1: . 1 . .      1: . 1 . .      1: . 1 . .      1: |
|          2: . 2 2 .      2: . 2 2 .      2: . 2 2 .      2: . 2 1 .      2: |
|          3: . 1 2 1      3: . 1 1 .      3: . 1 . .      3: . . 2 1      3: |
|                          4: . . 1 1      4: . . 2 .                      4: |
|                                          5: . . . 1                         |
|                                                                             |
|     ------------------------------------------------------------------------|
|     0 1 2 3         0 1 2 3         0 1 2 3         0 1 2 3         0 1 2 3 |
|     1 4 5 2, total: 1 4 5 2, total: 1 3 3 1, total: 1 5 6 2, total: 1 5 6 2,|
|     1 . . .      0: 1 . . .      0: 1 . . .      0: 1 . . .      0: 1 . . . |
|     . 1 . .      1: . 1 . .      1: . 1 . .      1: . 1 . .      1: . 1 . . |
|     . 2 2 .      2: . 2 2 .      2: . 2 1 .      2: . 2 3 1      2: . 2 3 1 |
|     . 1 . .      3: . 1 . .      3: . . 1 .      3: . 2 3 1      3: . 2 2 . |
|     . . 3 2      4: . . 1 .      4: . . 1 1                      4: . . 1 1 |
|                  5: . . 2 2                                                 |
|                                                                             |
|     ------------------------------------------------------------------------|
|            0 1 2 3         0 1 2 3         0 1 2 3         0 1 2 3         0|
|     total: 1 5 6 2, total: 1 5 7 3, total: 1 5 7 3, total: 1 5 7 3, total: 1|
|         0: 1 . . .      0: 1 . . .      0: 1 . . .      0: 1 . . .      0: 1|
|         1: . 1 . .      1: . 1 . .      1: . 1 . .      1: . 1 . .      1: .|
|         2: . 2 3 1      2: . 2 3 1      2: . 2 3 1      2: . 2 3 1      2: .|
|         3: . 2 2 .      3: . 2 1 .      3: . 2 1 .      3: . 2 1 .      3: .|
|         4: . . . .      4: . . 2 1      4: . . 3 2      4: . . 2 1      4: .|
|         5: . . 1 1      5: . . 1 1                      5: . . . .      5: .|
|                                                         6: . . 1 1          |
|     ------------------------------------------------------------------------|
|     1 2 3         0 1 2 3         0 1 2 3                                   |
|     4 5 2, total: 1 5 6 2, total: 1 4 4 1}                                  |
|     . . .      0: 1 . . .      0: 1 . . .                                   |
|     1 . .      1: . 1 . .      1: . 1 . .                                   |
|     2 2 .      2: . 2 3 1      2: . 2 2 .                                   |
|     1 . .      3: . 2 2 .      3: . 1 1 .                                   |
|     . 2 1      4: . . . .      4: . . . .                                   |
|     . 1 1      5: . . . .      5: . . 1 1                                   |
|                6: . . 1 1                                                   |
|                                                                             |
|o3 : List                                                                    |
|-----------------------------------------------------------------------------|
|e criteria                                                                   |
+-----------------------------------------------------------------------------+
|i4 : bettiTablesWithHilbertFunction(L, R, Count => true) --tallies distinct  |
|                                                                             |
|                  0 1 2 3                                                    |
|o4 = Tally{total: 1 3 3 1 => 12 }                                            |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 1 .                                                    |
|               3: . . 1 .                                                    |
|               4: . . 1 1                                                    |
|                  0 1 2 3                                                    |
|           total: 1 3 3 1 => 27                                              |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 1 .                                                    |
|               3: . . 2 1                                                    |
|                  0 1 2 3                                                    |
|           total: 1 4 4 1 => 6                                               |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 2 .                                                    |
|               3: . 1 . .                                                    |
|               4: . . 2 .                                                    |
|               5: . . . 1                                                    |
|                  0 1 2 3                                                    |
|           total: 1 4 4 1 => 12                                              |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 2 .                                                    |
|               3: . 1 1 .                                                    |
|               4: . . . .                                                    |
|               5: . . 1 1                                                    |
|                  0 1 2 3                                                    |
|           total: 1 4 4 1 => 78                                              |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 2 .                                                    |
|               3: . 1 1 .                                                    |
|               4: . . 1 1                                                    |
|                  0 1 2 3                                                    |
|           total: 1 4 4 1 => 174                                             |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 2 .                                                    |
|               3: . 1 2 1                                                    |
|                  0 1 2 3                                                    |
|           total: 1 4 5 2 => 6                                               |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 2 .                                                    |
|               3: . 1 . .                                                    |
|               4: . . 2 1                                                    |
|               5: . . 1 1                                                    |
|                  0 1 2 3                                                    |
|           total: 1 4 5 2 => 9                                               |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 2 .                                                    |
|               3: . 1 . .                                                    |
|               4: . . 1 .                                                    |
|               5: . . 2 2                                                    |
|                  0 1 2 3                                                    |
|           total: 1 4 5 2 => 15                                              |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 2 .                                                    |
|               3: . 1 . .                                                    |
|               4: . . 3 2                                                    |
|                  0 1 2 3                                                    |
|           total: 1 5 6 2 => 6                                               |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 3 1                                                    |
|               3: . 2 2 .                                                    |
|               4: . . . .                                                    |
|               5: . . . .                                                    |
|               6: . . 1 1                                                    |
|                  0 1 2 3                                                    |
|           total: 1 5 6 2 => 24                                              |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 3 1                                                    |
|               3: . 2 2 .                                                    |
|               4: . . . .                                                    |
|               5: . . 1 1                                                    |
|                  0 1 2 3                                                    |
|           total: 1 5 6 2 => 54                                              |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 3 1                                                    |
|               3: . 2 2 .                                                    |
|               4: . . 1 1                                                    |
|                  0 1 2 3                                                    |
|           total: 1 5 6 2 => 150                                             |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 3 1                                                    |
|               3: . 2 3 1                                                    |
|                  0 1 2 3                                                    |
|           total: 1 5 7 3 => 12                                              |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 3 1                                                    |
|               3: . 2 1 .                                                    |
|               4: . . 2 1                                                    |
|               5: . . . .                                                    |
|               6: . . 1 1                                                    |
|                  0 1 2 3                                                    |
|           total: 1 5 7 3 => 12                                              |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 3 1                                                    |
|               3: . 2 1 .                                                    |
|               4: . . 2 1                                                    |
|               5: . . 1 1                                                    |
|                  0 1 2 3                                                    |
|           total: 1 5 7 3 => 12                                              |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 3 1                                                    |
|               3: . 2 1 .                                                    |
|               4: . . 3 2                                                    |
|                                                                             |
|o4 : Tally                                                                   |
|-----------------------------------------------------------------------------|
|ideals giving each table                                                     |
+-----------------------------------------------------------------------------+
|i5 : bettiTablesWithHilbertFunction(L, R, FirstBetti => 5) --only returns tab|
|                                                                             |
|             0 1 2 3         0 1 2 3         0 1 2 3         0 1 2 3         |
|o5 = {total: 1 5 6 2, total: 1 5 6 2, total: 1 5 6 2, total: 1 5 6 2, total: |
|          0: 1 . . .      0: 1 . . .      0: 1 . . .      0: 1 . . .      0: |
|          1: . 1 . .      1: . 1 . .      1: . 1 . .      1: . 1 . .      1: |
|          2: . 2 3 1      2: . 2 3 1      2: . 2 3 1      2: . 2 3 1      2: |
|          3: . 2 3 1      3: . 2 2 .      3: . 2 2 .      3: . 2 2 .      3: |
|                          4: . . 1 1      4: . . . .      4: . . . .      4: |
|                                          5: . . 1 1      5: . . . .         |
|                                                          6: . . 1 1         |
|     ------------------------------------------------------------------------|
|     0 1 2 3         0 1 2 3         0 1 2 3                                 |
|     1 5 7 3, total: 1 5 7 3, total: 1 5 7 3}                                |
|     1 . . .      0: 1 . . .      0: 1 . . .                                 |
|     . 1 . .      1: . 1 . .      1: . 1 . .                                 |
|     . 2 3 1      2: . 2 3 1      2: . 2 3 1                                 |
|     . 2 1 .      3: . 2 1 .      3: . 2 1 .                                 |
|     . . 3 2      4: . . 2 1      4: . . 2 1                                 |
|                  5: . . . .      5: . . 1 1                                 |
|                  6: . . 1 1                                                 |
|                                                                             |
|o5 : List                                                                    |
|-----------------------------------------------------------------------------|
|les whose first total betti number is 5                                      |
+-----------------------------------------------------------------------------+
|i6 : bettiTablesWithHilbertFunction(L, R, GradedBettis => {0, 0, 2, 2, 1})   |
|                                                                             |
|o6 = {}                                                                      |
|                                                                             |
|o6 : List                                                                    |
|-----------------------------------------------------------------------------|
|--only returns tables whose first graded betti numbers match a given sequence|
+-----------------------------------------------------------------------------+
|i7 : bettiTablesWithHilbertFunction(L, R, BoundGenerators => 3)              |
|                                                                             |
|             0 1 2 3         0 1 2 3                                         |
|o7 = {total: 1 3 3 1, total: 1 3 3 1}                                        |
|          0: 1 . . .      0: 1 . . .                                         |
|          1: . 1 . .      1: . 1 . .                                         |
|          2: . 2 1 .      2: . 2 1 .                                         |
|          3: . . 2 1      3: . . 1 .                                         |
|                          4: . . 1 1                                         |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+
|i8 : bettiTablesWithHilbertFunction(L, R, BoundGenerators => 3, Count =>     |
|                                                                             |
|                  0 1 2 3                                                    |
|o8 = Tally{total: 1 3 3 1 => 12}                                             |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 1 .                                                    |
|               3: . . 1 .                                                    |
|               4: . . 1 1                                                    |
|                  0 1 2 3                                                    |
|           total: 1 3 3 1 => 27                                              |
|               0: 1 . . .                                                    |
|               1: . 1 . .                                                    |
|               2: . 2 1 .                                                    |
|               3: . . 2 1                                                    |
|                                                                             |
|o8 : Tally                                                                   |
|-----------------------------------------------------------------------------|
|true)                                                                        |
+-----------------------------------------------------------------------------+

These methods also work for squarefree ideals

+-----------------------------------------------------------------------------+
|i9 : S = QQ[a..f]                                                            |
|                                                                             |
|o9 = S                                                                       |
|                                                                             |
|o9 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i10 : bettiTablesWithHilbertFunction({1, 6, 19, 45, 86}, S, SquareFree =>    |
|                                                                             |
|              0 1 2 3                                                        |
|o10 = {total: 1 6 8 3}                                                       |
|           0: 1 . . .                                                        |
|           1: . 2 1 .                                                        |
|           2: . . . .                                                        |
|           3: . 4 7 3                                                        |
|                                                                             |
|o10 : List                                                                   |
|-----------------------------------------------------------------------------|
|true)                                                                        |
+-----------------------------------------------------------------------------+

The next examples show that options can be combined in many ways

+-----------------------------------------------------------------------------+
|i11 : bettiTablesWithHilbertFunction({1, 3, 6, 7, 6, 5, 4, 4, 4}, R,         |
|                                                                             |
|                   0 1 2 3                                                   |
|o11 = Tally{total: 1 6 7 2 => 48 }                                           |
|                0: 1 . . .                                                   |
|                1: . . . .                                                   |
|                2: . 3 3 1                                                   |
|                3: . 3 3 .                                                   |
|                4: . . . .                                                   |
|                5: . . 1 1                                                   |
|                   0 1 2 3                                                   |
|            total: 1 6 7 2 => 522                                            |
|                0: 1 . . .                                                   |
|                1: . . . .                                                   |
|                2: . 3 2 .                                                   |
|                3: . 2 3 1                                                   |
|                4: . 1 1 .                                                   |
|                5: . . 1 1                                                   |
|                   0 1 2 3                                                   |
|            total: 1 6 8 3 => 12                                             |
|                0: 1 . . .                                                   |
|                1: . . . .                                                   |
|                2: . 3 3 1                                                   |
|                3: . 3 3 1                                                   |
|                4: . . 1 .                                                   |
|                5: . . 1 1                                                   |
|                   0 1 2 3                                                   |
|            total: 1 6 8 3 => 72                                             |
|                0: 1 . . .                                                   |
|                1: . . . .                                                   |
|                2: . 3 1 .                                                   |
|                3: . 1 4 2                                                   |
|                4: . 2 2 .                                                   |
|                5: . . 1 1                                                   |
|                                                                             |
|o11 : Tally                                                                  |
|-----------------------------------------------------------------------------|
|FirstBetti => 6, BoundGenerators => 5, Count => true)                        |
+-----------------------------------------------------------------------------+
|i12 : bettiTablesWithHilbertFunction({1, 4, 7, 10, 13}, S, SquareFree =>     |
|                                                                             |
|              0 1 2 3 4                                                      |
|o12 = {total: 1 5 9 7 2}                                                     |
|           0: 1 2 1 . .                                                      |
|           1: . 3 8 7 2                                                      |
|                                                                             |
|o12 : List                                                                   |
|-----------------------------------------------------------------------------|
|true, FirstBetti => 5)                                                       |
+-----------------------------------------------------------------------------+
|i13 : bettiTablesWithHilbertFunction({1, 4, 7, 10, 13}, S, SquareFree =>     |
|                                                                             |
|              0 1  2  3 4 5                                                  |
|o13 = {total: 1 6 13 13 6 1}                                                 |
|           0: 1 2  1  . . .                                                  |
|           1: . 3  9 10 5 1                                                  |
|           2: . 1  3  3 1 .                                                  |
|                                                                             |
|o13 : List                                                                   |
|-----------------------------------------------------------------------------|
|true, GradedBettis => {0, 2, 3, 1, 0})                                       |
+-----------------------------------------------------------------------------+

See also
========

  * monomialIdealsWithHilbertFunction,
    -- find all monomial ideals in a polynomial ring with a particular (partial
    or complete) Hilbert function
  * betti(GradedModule) (Macaulay2Doc) -- display or modify a
    Betti diagram
  * BettiTally (Macaulay2Doc) -- the class of all Betti
    tallies
  * HashTable (Macaulay2Doc) -- the class of all hash tables
  * tally (Macaulay2Doc) -- tally the elements of a list,
    sequence, array, or string
  * hilbertFunct (LexIdeals) -- return the Hilbert function
    of a polynomial ring mod a homogeneous ideal as a list
  * isHF (LexIdeals) -- is a finite list a Hilbert function of a
    polynomial ring mod a homogeneous ideal
  * isSquareFree (Macaulay2Doc) -- whether something is
    square free monomial ideal
  * LexIdeals -- a package for working with lex ideals

Ways to use bettiTablesWithHilbertFunction :
============================================

  * "bettiTablesWithHilbertFunction(List,PolynomialRing)"

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

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

BoundGenerators
***************

See also
========

  * monomialIdealsWithHilbertFunction(...,BoundGenerators=>...)
    -- find all monomial ideals in a
    polynomial ring with a particular (partial or complete) Hilbert function

Functions with optional argument named BoundGenerators :
========================================================

  * "bettiTablesWithHilbertFunction(...,BoundGenerators=>...)" -- see
    bettiTablesWithHilbertFunction, -- list or
    tally all Betti tables that can be obtained from monomial ideals with a
    particular (partial or complete) Hilbert function
  * "monomialIdealsWithHilbertFunction(...,BoundGenerators=>...)" -- see
    monomialIdealsWithHilbertFunction, --
    find all monomial ideals in a polynomial ring with a particular (partial or
    complete) Hilbert function

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

The object BoundGenerators, is a symbol (Macaulay2Doc).

codimensionIP -- compute the codimension of a monomial ideal using integer programming
**************************************************************************************

Synopsis
========

  * Usage:
        c = codimensionIP(I)
  * Inputs:
      * I, a monomial ideal (Macaulay2Doc),
  * Outputs:
      * c, an integer (Macaulay2Doc), the codimension of $I$

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

The integer programming input and output files created are named "codim.zpl",
"codim.errors", etc., and saved to a temporary directory. By default the
location of the temporary directory is printed to the screen.

+-------------------------------------------------+
|i1 : R = QQ[x,y,z,w,v];                          |
+-------------------------------------------------+
|i2 : I = monomialIdeal(x*y*w, x*z*v, y*x, y*z*v);|
|                                                 |
|o2 : MonomialIdeal of R                          |
+-------------------------------------------------+
|i3 : codimensionIP(I)                            |
|Codim files saved in directory: /tmp/M2-8538-0/0 |
|                                                 |
|o3 = 2                                           |
+-------------------------------------------------+

The verbosity of every function in the MonomialIntegerPrograms package is
controlled with ScipPrintLevel. For example, to suppress
printing the name of the directory or any other information and simply return
the answer, set ScipPrintLevel to 0.

+--------------------------------------------------------------------------+
|i4 : ScipPrintLevel = 0;                                                  |
+--------------------------------------------------------------------------+
|i5 : J = monomialIdeal(x*y^3*z^7, y^4*w*v, z^2*v^8, x*w^3*v^3, y^10, z^10)|
|                                                                          |
|                     10     3 7   10   4        3 3   2 8                 |
|o5 = monomialIdeal (y  , x*y z , z  , y w*v, x*w v , z v )                |
|                                                                          |
|o5 : MonomialIdeal of R                                                   |
+--------------------------------------------------------------------------+
|i6 : codimensionIP(J)                                                     |
|                                                                          |
|o6 = 3                                                                    |
+--------------------------------------------------------------------------+

The codimension of a monomial ideal is equal to the codimension of its radical.
Therefore, when looking at the IP formulation written to the temporary file
"codim.zpl", you will see that exponents are ignored.

See also
========

  * codim(MonomialIdeal) (Macaulay2Doc), --
    compute the codimension
  * dimensionIP -- compute the dimension of a monomial
    ideal using integer programming
  * MonomialIntegerPrograms -- A package for fast monomial ideal
    computations using constraint integer programming
  * ScipPrintLevel -- adjust how much solving
    information is displayed in MonomialIntegerPrograms

Ways to use codimensionIP :
===========================

  * "codimensionIP(MonomialIdeal)"

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

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

Count
*****

See also
========

  * bettiTablesWithHilbertFunction(...,SquareFree=>...)
    -- list or tally all Betti tables that can
    be obtained from monomial ideals with a particular (partial or complete)
    Hilbert function

Functions with optional argument named Count :
==============================================

  * "bettiTablesWithHilbertFunction(...,Count=>...)" -- see
    bettiTablesWithHilbertFunction, -- list or
    tally all Betti tables that can be obtained from monomial ideals with a
    particular (partial or complete) Hilbert function

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

The object Count, is a symbol (Macaulay2Doc).

degreeIP -- compute the degree of a monomial ideal using integer programming
****************************************************************************

Synopsis
========

  * Usage:
        d = degreeIP(I)
        d = degreeIP(I, KnownDim => k)
  * Inputs:
      * I, a monomial ideal (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * KnownDim => an integer (Macaulay2Doc), default value -1, the
        dimension, k, of the ideal
  * Outputs:
      * d, an integer (Macaulay2Doc), the degree of I. That is, if k
        is the maximum dimension of a coordinate subspace in the variety of I,
        then degree(I) is the number of k-dimensional subspaces in the variety.

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

If a KnownDim is not provided, degreeIP will first call dimensionIP,
to compute the dimension. Additionally, before doing any
computation, the cache of cokernel generators I is checked to see if the degree
has been previously computed.

An integer programming formulation of the degree problem is written to a
temporary file directory, then the SCIP Optimization Suite is used to solve the
IP. Solving details are written to a second file in the temporary directory,
before outputting the answer.

+-------------------------------------------------+
|i1 : R = QQ[x,y,z,w,v];                          |
+-------------------------------------------------+
|i2 : I = monomialIdeal(x*y*w, x*z*v, y*x, y*z*v);|
|                                                 |
|o2 : MonomialIdeal of R                          |
+-------------------------------------------------+
|i3 : degreeIP(I, KnownDim => 3)                  |
|Degree files saved in directory: /tmp/M2-8573-0/0|
|                                                 |
|o3 = 5                                           |
+-------------------------------------------------+
|i4 : degreeIP(I)                                 |
|Codim files saved in directory: /tmp/M2-8573-0/1 |
|Degree files saved in directory: /tmp/M2-8573-0/2|
|                                                 |
|o4 = 5                                           |
+-------------------------------------------------+

The location of the temporary directory is printed to the screen.

For more information about the SCIP warning messages, and related info on how
SCIP counts solutions, see the very end of the ScipPrintLevel,
info page.

Caveat
======

degreeIP does not verify that a provided KnownDim is correct. Providing the
wrong dimension will result in an incorrect degree count (and possibly an
infeasible program).

See also
========

  * degree(Ideal) (Macaulay2Doc)
  * dimensionIP -- compute the dimension of a monomial
    ideal using integer programming
  * MonomialIntegerPrograms -- A package for fast monomial ideal
    computations using constraint integer programming
  * ScipPrintLevel -- adjust how much solving
    information is displayed in MonomialIntegerPrograms

Ways to use degreeIP :
======================

  * "degreeIP(MonomialIdeal)"

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

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

dimensionIP -- compute the dimension of a monomial ideal using integer programming
**********************************************************************************

Synopsis
========

  * Usage:
        k = dimensionIP(I)
  * Inputs:
      * I, a monomial ideal (Macaulay2Doc),
  * Outputs:
      * k, an integer (Macaulay2Doc), the dimension of $I$. That is,
        $k$ is the maximum dimension of a coordinate subspace in the variety of
        $I$.

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

This function calls codimensionIP, and then returns
$n$-codimensionIP($I$), where $n$ is the number of variables in the polynomial
ring where $I$ is defined. The integer programming input and output files
created will therefore be named "codim.zpl", "codim.errors", etc. as with
codimensionIP.

+-------------------------------------------------+
|i1 : R = QQ[x,y,z,w,v];                          |
+-------------------------------------------------+
|i2 : I = monomialIdeal(x*y*w, x*z*v, y*x, y*z*v);|
|                                                 |
|o2 : MonomialIdeal of R                          |
+-------------------------------------------------+
|i3 : dimensionIP(I)                              |
|Codim files saved in directory: /tmp/M2-9918-0/0 |
|                                                 |
|o3 = 3                                           |
+-------------------------------------------------+

The location of input/output files for SCIP solving is printed to the screen by
default. To change this, see ScipPrintLevel.

+--------------------------------------------------------------------------+
|i4 : ScipPrintLevel = 0;                                                  |
+--------------------------------------------------------------------------+
|i5 : J = monomialIdeal(x*y^3*z^7, y^4*w*v, z^2*v^8, x*w^3*v^3, y^10, z^10)|
|                                                                          |
|                     10     3 7   10   4        3 3   2 8                 |
|o5 = monomialIdeal (y  , x*y z , z  , y w*v, x*w v , z v )                |
|                                                                          |
|o5 : MonomialIdeal of R                                                   |
+--------------------------------------------------------------------------+
|i6 : dimensionIP(J)                                                       |
|                                                                          |
|o6 = 2                                                                    |
+--------------------------------------------------------------------------+

The dimension of a monomial ideal is equal to the dimension of its radical.
Therefore, when looking at the IP formulation written to the temporary file
"codim.zpl", you will see that exponents are ignored.

See also
========

  * dim(MonomialIdeal) (Macaulay2Doc) -- compute the
    Krull dimension
  * codimensionIP -- compute the codimension of a
    monomial ideal using integer programming
  * MonomialIntegerPrograms -- A package for fast monomial ideal
    computations using constraint integer programming
  * ScipPrintLevel -- adjust how much solving
    information is displayed in MonomialIntegerPrograms

Ways to use dimensionIP :
=========================

  * "dimensionIP(MonomialIdeal)"

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

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

FirstBetti
**********

See also
========

  * monomialIdealsWithHilbertFunction(...,FirstBetti=>...)
    -- find all monomial ideals in a
    polynomial ring with a particular (partial or complete) Hilbert function

Functions with optional argument named FirstBetti :
===================================================

  * "bettiTablesWithHilbertFunction(...,FirstBetti=>...)" -- see
    bettiTablesWithHilbertFunction, -- list or
    tally all Betti tables that can be obtained from monomial ideals with a
    particular (partial or complete) Hilbert function
  * "monomialIdealsWithHilbertFunction(...,FirstBetti=>...)" -- see
    monomialIdealsWithHilbertFunction, --
    find all monomial ideals in a polynomial ring with a particular (partial or
    complete) Hilbert function

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

The object FirstBetti, is a symbol (Macaulay2Doc).

GradedBettis
************

See also
========

  * monomialIdealsWithHilbertFunction(...,GradedBettis=>...)
    -- find all monomial ideals in a
    polynomial ring with a particular (partial or complete) Hilbert function

Functions with optional argument named GradedBettis :
=====================================================

  * "bettiTablesWithHilbertFunction(...,GradedBettis=>...)" -- see
    bettiTablesWithHilbertFunction, -- list or
    tally all Betti tables that can be obtained from monomial ideals with a
    particular (partial or complete) Hilbert function
  * "monomialIdealsWithHilbertFunction(...,GradedBettis=>...)" -- see
    monomialIdealsWithHilbertFunction, --
    find all monomial ideals in a polynomial ring with a particular (partial or
    complete) Hilbert function

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

The object GradedBettis, is a symbol (Macaulay2Doc).

IgnorePrimes -- Ignores certain primes when computing top minimal primes.
*************************************************************************

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

The option IgnorePrimes, should be a list of prime ideals.
If a IgnorePrimes, is provided, see topMinimalPrimesIP,
will not include any primes containing those ideals in the
computation and will find the minimal primes with maximal dimension other than
the ignored ones.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x,y,z,w,v];                                                      |
+-----------------------------------------------------------------------------+
|i2 : I = monomialIdeal(y^12, x*y^3, z*w^3, z*v*y^10, z*x^10, v*z^10, w*v^10, |
|                                                                             |
|o2 : MonomialIdeal of R                                                      |
|-----------------------------------------------------------------------------|
|y*v*x*z*w);                                                                  |
+-----------------------------------------------------------------------------+
|i3 : ScipPrintLevel = 0;                                                     |
+-----------------------------------------------------------------------------+
|i4 : L1 = topMinimalPrimesIP I                                               |
|                                                                             |
|o4 = {monomialIdeal (y, z, v), monomialIdeal (y, z, w)}                      |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+
|i5 : L2 = topMinimalPrimesIP(I, IgnorePrimes=>L1)                            |
|                                                                             |
|o5 = {monomialIdeal (x, y, w, v)}                                            |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : minimalPrimes I                                                         |
|                                                                             |
|o6 = {monomialIdeal (y, z, w), monomialIdeal (y, z, v), monomialIdeal (x, y, |
|     ------------------------------------------------------------------------|
|     w, v)}                                                                  |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+

Caveat
======

This may not be faster than simply using minimalPrimes (MinimalPrimes),
and counting generators.

Functions with optional argument named IgnorePrimes :
=====================================================

  * "topMinimalPrimesIP(...,IgnorePrimes=>...)"

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

The object IgnorePrimes, is a symbol (Macaulay2Doc).

loadBuiltinCodimAndDegree -- change codim and degree to use the default, built-in methods.
******************************************************************************************

Synopsis
========

  * Usage:
        loadBuiltinCodimAndDegree()

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

When the package gets loaded, codim and degree are replaced with codimensionIP
and degreeIP respectively for a MonomialIdeal. loadBuiltinCodimAndDegree
reloads the built-in methods.

+-------------------------------------------------+
|i1 : R = QQ[a,b,c];                              |
+-------------------------------------------------+
|i2 : ScipPrintLevel = 1;                         |
+-------------------------------------------------+
|i3 : codim(monomialIdeal(a^2, b*a, c*b))         |
|Codim files saved in directory: /tmp/M2-8647-0/0 |
|                                                 |
|o3 = 2                                           |
+-------------------------------------------------+
|i4 : degree(monomialIdeal(a^2, b*a, c*b))        |
|Codim files saved in directory: /tmp/M2-8647-0/1 |
|Degree files saved in directory: /tmp/M2-8647-0/2|
|                                                 |
|o4 = 3                                           |
+-------------------------------------------------+
|i5 : loadBuiltinCodimAndDegree();                |
+-------------------------------------------------+
|i6 : codim(monomialIdeal(a^2, b*a, c*b))         |
|                                                 |
|o6 = 2                                           |
+-------------------------------------------------+
|i7 : degree(monomialIdeal(a^2, b*a, c*b))        |
|                                                 |
|o7 = 3                                           |
+-------------------------------------------------+

See also
========

  * loadSCIPCodimAndDegree -- change codim and
    degree to use the default, built-in methods.
  * codimensionIP -- compute the codimension of a
    monomial ideal using integer programming
  * degreeIP -- compute the degree of a monomial ideal using
    integer programming

Ways to use loadBuiltinCodimAndDegree :
=======================================

  * loadBuiltinCodimAndDegree() (missing documentation)

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

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

loadSCIPCodimAndDegree -- change codim and degree to use the default, built-in methods.
***************************************************************************************

Synopsis
========

  * Usage:
        loadBuiltinCodimAndDegree()

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

When the package gets loaded, codim and degree are replaced with codimensionIP
and degreeIP respectively for a MonomialIdeal. loadSCIPCodimAndDegree can be
used to reload the the SCIP methods in the event that
loadBuiltinCodimAndDegree, was called.

+-------------------------------------------------+
|i1 : R = QQ[a,b,c];                              |
+-------------------------------------------------+
|i2 : ScipPrintLevel = 1;                         |
+-------------------------------------------------+
|i3 : loadBuiltinCodimAndDegree();                |
+-------------------------------------------------+
|i4 : codim(monomialIdeal(a^2, b*a, c*b))         |
|                                                 |
|o4 = 2                                           |
+-------------------------------------------------+
|i5 : degree(monomialIdeal(a^2, b*a, c*b))        |
|                                                 |
|o5 = 3                                           |
+-------------------------------------------------+
|i6 : loadSCIPCodimAndDegree();                   |
+-------------------------------------------------+
|i7 : codim(monomialIdeal(a^2, b*a, c*b))         |
|Codim files saved in directory: /tmp/M2-8610-0/0 |
|                                                 |
|o7 = 2                                           |
+-------------------------------------------------+
|i8 : degree(monomialIdeal(a^2, b*a, c*b))        |
|Codim files saved in directory: /tmp/M2-8610-0/1 |
|Degree files saved in directory: /tmp/M2-8610-0/2|
|                                                 |
|o8 = 3                                           |
+-------------------------------------------------+

See also
========

  * loadBuiltinCodimAndDegree -- change codim
    and degree to use the default, built-in methods.
  * codimensionIP -- compute the codimension of a
    monomial ideal using integer programming
  * degreeIP -- compute the degree of a monomial ideal using
    integer programming

Ways to use loadSCIPCodimAndDegree :
====================================

  * loadSCIPCodimAndDegree() (missing documentation)

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

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

minimalPrimesIP -- one line description if different from minimalPrimesIP
*************************************************************************

Synopsis
========

  * Usage:
        minimalPrimesIP I
        minimalPrimesIP (I, iterations)
  * Inputs:
      * I, a monomial ideal (Macaulay2Doc),
      * iterations, an integer (Macaulay2Doc), how many iterations of
        topMinimalPrimesIP should be called
  * Outputs:
      * a list (Macaulay2Doc), the minimal primes of I

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

This is basically an alternative version of minimalPrimes (MinimalPrimes).

This function calls topMinimalPrimesIP, repeatedly,
collecting the primes and passing them in with IgnorePrimes.
This is repeated iterations many times or until there are no
primes remaining. If iterations is excluded, all minimal primes are returned.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x,y,z,w,v];                                                      |
+-----------------------------------------------------------------------------+
|i2 : I = monomialIdeal(y^12, x*y^3, z*w^3, z*v*y^10, z*x^10, v*z^10, w*v^10, |
|                                                                             |
|o2 : MonomialIdeal of R                                                      |
|-----------------------------------------------------------------------------|
|y*v*x*z*w);                                                                  |
+-----------------------------------------------------------------------------+
|i3 : ScipPrintLevel = 0;                                                     |
+-----------------------------------------------------------------------------+
|i4 : minimalPrimesIP(I, 1)                                                   |
|                                                                             |
|o4 = {monomialIdeal (y, z, v), monomialIdeal (y, z, w)}                      |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+
|i5 : minimalPrimesIP I                                                       |
|                                                                             |
|o5 = {monomialIdeal (y, z, v), monomialIdeal (y, z, w), monomialIdeal (x, y, |
|     ------------------------------------------------------------------------|
|     w, v)}                                                                  |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : minimalPrimes I                                                         |
|                                                                             |
|o6 = {monomialIdeal (y, z, w), monomialIdeal (y, z, v), monomialIdeal (x, y, |
|     ------------------------------------------------------------------------|
|     w, v)}                                                                  |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+

Caveat
======

Warning: more than likely, this with take longer than minimalPrimes (MinimalPrimes),
to return the same output. It some situations
topMinimalPrimesIP, is much faster than
minimalPrimes (MinimalPrimes), but not all.

See also
========

  * minimalPrimes (MinimalPrimes) -- minimal primes of an
    ideal
  * topMinimalPrimesIP -- compute the minimal primes
    of maximum dimension using integer programming
  * IgnorePrimes -- Ignores certain primes when computing
    top minimal primes.

Ways to use minimalPrimesIP :
=============================

  * "minimalPrimesIP(MonomialIdeal)"
  * "minimalPrimesIP(MonomialIdeal,ZZ)"

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

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

monomialIdealsWithHilbertFunction -- find all monomial ideals in a polynomial ring with a particular (partial or complete) Hilbert function
*******************************************************************************************************************************************

Synopsis
========

  * Usage:
        monomialIdealsWithHilbertFunction(L, R)
        monomialIdealsWithHilbertFunction(L, R, BoundGenerators => a)
        monomialIdealsWithHilbertFunction(L, R, FirstBetti => b)
        monomialIdealsWithHilbertFunction(L, R, GradedBettis => B)
        monomialIdealsWithHilbertFunction(L, R, SquareFree => x)
  * Inputs:
      * L, a list (Macaulay2Doc), $\{h(0), h(1), \ldots, h(d)\}$,
        the values of a valid Hilbert function for $R$ for degrees $0\ldots d$.
      * R, a polynomial ring (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * BoundGenerators => an integer (Macaulay2Doc), default value
        -1, a degree bound on the monomial generators
      * FirstBetti => an integer (Macaulay2Doc), default value null,
        a specified first total Betti number
      * GradedBettis => a list (Macaulay2Doc), default value null,
        if the form $\{b_0, b_1, \ldots, b_d\}$, where $b_i$ is the first
        graded Betti numbers with degree $i$.
      * SquareFree => a Boolean value (Macaulay2Doc), default
        value false, whether or not to consider squarefree monomial ideals only
  * Outputs:
      * a list (Macaulay2Doc), all ideals $I$ of $R$ that satisfy
        $HF(R/I, i) = h(i)$ for all $0\le i\le d$

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

For example, count the monomial ideals in $\mathbb{Q}[x,y,z]$, generated in
degrees up to 5, whose Hilbert function begins with $\{1, 3, 6, 5, 4, 4\}$:

+--------------------------------------------------------+
|i1 : R = QQ[x,y,z]; L = {1, 3, 6, 5, 4, 4};             |
+--------------------------------------------------------+
|i3 : M = monomialIdealsWithHilbertFunction(L, R); #M    |
|                                                        |
|o4 = 306                                                |
+--------------------------------------------------------+
|i5 : netList take(M, 5)                                 |
|                                                        |
|     +-------------------------------------------------+|
|     |                2      2   2      2     2        ||
|o5 = |monomialIdeal (x y, x*y , x z, x*z , y*z )       ||
|     +-------------------------------------------------+|
|     |                2      2   2      2     2        ||
|     |monomialIdeal (x y, x*y , y z, x*z , y*z )       ||
|     +-------------------------------------------------+|
|     |                2      2          3      2     2 ||
|     |monomialIdeal (x y, x*y , x*y*z, y z, x*z , y*z )||
|     +-------------------------------------------------+|
|     |                2      2            2     2   4  ||
|     |monomialIdeal (x y, x*y , x*y*z, x*z , y*z , z ) ||
|     +-------------------------------------------------+|
|     |                2      2     2     2   3         ||
|     |monomialIdeal (x y, x*y , x*z , y*z , z )        ||
|     +-------------------------------------------------+|
+--------------------------------------------------------+

By default, the degrees of generators are bounded by the length of $L$. A lower
bound can be set manually with the BoundGenerators option.

+--------------------------------------------------------------------------+
|i6 : M = monomialIdealsWithHilbertFunction(L, R, BoundGenerators => 3); #M|
|                                                                          |
|o7 = 57                                                                   |
+--------------------------------------------------------------------------+
|i8 : netList take(M, 5)                                                   |
|                                                                          |
|     +----------------------------------------+                           |
|     |                3     2   3          2  |                           |
|o8 = |monomialIdeal (x , x*y , y , x*y*z, y z)|                           |
|     +----------------------------------------+                           |
|     |                3   2    3          2   |                           |
|     |monomialIdeal (x , x y, y , x*y*z, y z) |                           |
|     +----------------------------------------+                           |
|     |                3     2   3   2         |                           |
|     |monomialIdeal (x , x*y , y , x z, x*y*z)|                           |
|     +----------------------------------------+                           |
|     |                3   2    3   2          |                           |
|     |monomialIdeal (x , x y, y , x z, x*y*z) |                           |
|     +----------------------------------------+                           |
|     |                3     2   3   2    2    |                           |
|     |monomialIdeal (x , x*y , y , x z, y z)  |                           |
|     +----------------------------------------+                           |
+--------------------------------------------------------------------------+

There is also an option to enumerate squarefree monomial ideals only.

+-----------------------------------------------------------------------------+
|i9 : S = QQ[a..f]                                                            |
|                                                                             |
|o9 = S                                                                       |
|                                                                             |
|o9 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i10 : I = monomialIdealsWithHilbertFunction({1, 6, 19, 45, 84}, S, SquareFree|
|                                                                             |
|o11 = 60                                                                     |
|-----------------------------------------------------------------------------|
|=> true); #I                                                                 |
+-----------------------------------------------------------------------------+
|i12 : first random I                                                         |
|                                                                             |
|o12 = monomialIdeal (a*b, b*d, a*c*d*e, a*c*d*f, a*c*e*f, b*c*e*f, a*d*e*f,  |
|      -----------------------------------------------------------------------|
|      c*d*e*f)                                                               |
|                                                                             |
|o12 : MonomialIdeal of S                                                     |
+-----------------------------------------------------------------------------+

To specify the total number of minimal generators, use FirstBetti.

+-----------------------------------------------------------------------------+
|i13 : #monomialIdealsWithHilbertFunction({1, 3, 6, 5, 4, 4}, R, FirstBetti =>|
|                                                                             |
|o13 = 57                                                                     |
|-----------------------------------------------------------------------------|
|5)                                                                           |
+-----------------------------------------------------------------------------+
|i14 : #monomialIdealsWithHilbertFunction({1, 3, 6, 5, 4, 4}, R, FirstBetti =>|
|                                                                             |
|o14 = 174                                                                    |
|-----------------------------------------------------------------------------|
|6)                                                                           |
+-----------------------------------------------------------------------------+

Alternatively, specify the number of minimal generators in each degree using
GradedBettis. The length of the list of graded (first) Betti numbers should
match the length of the partial Hilbert function.

+-----------------------------------------------------------------------------+
|i15 : #monomialIdealsWithHilbertFunction({1, 3, 4, 2, 1}, R, GradedBettis => |
|                                                                             |
|o15 = 30                                                                     |
|-----------------------------------------------------------------------------|
|{0, 0, 2, 2, 1})                                                             |
+-----------------------------------------------------------------------------+

Notice that the GradedBettis option totally constrains the degrees of
generators already, so do not use it with the BoundGenerators option.

You can combine BoundGenerators with FirstBetti, however, since FirstBetti does
not constrain degrees.

+-----------------------------------------------------------------------------+
|i16 : #monomialIdealsWithHilbertFunction({1, 3, 6, 7, 6, 5, 4, 4, 4}, R,     |
|                                                                             |
|o16 = 654                                                                    |
|-----------------------------------------------------------------------------|
|FirstBetti => 6, BoundGenerators => 5)                                       |
+-----------------------------------------------------------------------------+
|i17 : #monomialIdealsWithHilbertFunction({1, 3, 6, 7, 6, 5, 4, 4, 4}, R,     |
|                                                                             |
|o17 = 60                                                                     |
|-----------------------------------------------------------------------------|
|FirstBetti => 6, BoundGenerators => 4)                                       |
+-----------------------------------------------------------------------------+

The SquareFree option can be used with any of the other options.

+-----------------------------------------------------------------------------+
|i18 : #monomialIdealsWithHilbertFunction({1, 4, 7, 10, 13}, S, SquareFree => |
|                                                                             |
|o18 = 240                                                                    |
|-----------------------------------------------------------------------------|
|true, FirstBetti => 5)                                                       |
+-----------------------------------------------------------------------------+
|i19 : #monomialIdealsWithHilbertFunction({1, 4, 7, 10, 13}, S, SquareFree => |
|                                                                             |
|o19 = 300                                                                    |
|-----------------------------------------------------------------------------|
|true, BoundGenerators => 3)                                                  |
+-----------------------------------------------------------------------------+
|i20 : #monomialIdealsWithHilbertFunction({1, 4, 7, 10, 13}, S, SquareFree => |
|                                                                             |
|o20 = 60                                                                     |
|-----------------------------------------------------------------------------|
|true, GradedBettis => {0, 2, 3, 1, 0})                                       |
+-----------------------------------------------------------------------------+

See also
========

  * bettiTablesWithHilbertFunction, --
    list or tally all Betti tables that can be obtained from monomial ideals
    with a particular (partial or complete) Hilbert function
  * hilbertFunct (LexIdeals) -- return the Hilbert function
    of a polynomial ring mod a homogeneous ideal as a list
  * isHF (LexIdeals) -- is a finite list a Hilbert function of a
    polynomial ring mod a homogeneous ideal
  * isSquareFree (Macaulay2Doc) -- whether something is
    square free monomial ideal
  * LexIdeals -- a package for working with lex ideals

Ways to use monomialIdealsWithHilbertFunction :
===============================================

  * "monomialIdealsWithHilbertFunction(List,PolynomialRing)"

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

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

ScipPrintLevel -- adjust how much solving information is displayed in MonomialIntegerPrograms
*********************************************************************************************

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

ScipPrintLevel is a global symbol defined in Monomial Integer Programs using
exportMutable (Macaulay2Doc). After the package has been
loaded, the user can change the value of ScipPrintLevel at any time, and the
specified behavior will immediately apply to all methods implemented in the
package.

Meaningful options for ScipPrintLevel are:

0 return the answers to computations only,  suppressing all other printing

1 return the answer, and print to screen the location of the temporary
directory which contains all the files related to the computation. By default
this is a subdirectory of /tmp/, see temporaryFileName (Macaulay2Doc).

2 all the above, plus display any error or warning messages generated by SCIP
during the computation, i.e. anything sent by SCIP to stderr. See note below
about warning messages.

3 all the above, plus print the problem file generated with this package, used
as the input to SCIP

4 all the above, plus print the solution file generated by SCIP after solving
the IP

5 all the above, plus print any other information sent by SCIP to stdout during
the solve, if any

The default value of ScipPrintLevel is 0. To load the package with a different
default value for ScipPrintLevel, imitate the following example.

+-----------------------------------------------------------------------------+
|i1 : loadPackage("MonomialIntegerPrograms", Configuration =>                 |
|--loading configuration for package "MonomialIntegerPrograms"                |
|Using default executable name "scip".                                        |
|To change this, load package using CustomPath option.                        |
|-----------------------------------------------------------------------------|
|{"CustomScipPrintLevel" => "2"}, Reload => true);                            |
| from file /home/lily/.Macaulay2/init-MonomialIntegerPrograms.m2             |
+-----------------------------------------------------------------------------+

Replace "2" above  with any custom choice. Note that the string "2" is used,
not an integer. You may or may not have to include the "Reload => true" option
depending on if the package is already loaded.

Why am I getting warnings/why does the solver report infeasibility for the
degree count?

This often happens when ScipPrintLevel is set to 2 or above and is not an
error, but a consequence of the normal solving behavior of SCIP. Computing the
degree of a monomial ideal is done by counting the number of feasible solutions
to a certain integer program. SCIP is generally programmed to find a single
optimal or feasible solution and then terminate, so to count them it uses the
following "trick": Every time SCIP encounters a feasible solution or branch, it
is recorded, then a constraint is added to make the new solution/branch
infeasible, so the search can continue. Eventually, all the solutions are
recorded and the entire problem has been made "infeasible." Thus the solving
details for the degree problem print a final result of "problem is infeasible,"
but the correct count has been taken. For more details, see this specific SCIP
documentation page: https://scip.zib.de/doc/html/COUNTER.php.

See also
========

  * MonomialIntegerPrograms -- A package for fast monomial ideal
    computations using constraint integer programming

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

The object ScipPrintLevel, is an integer (Macaulay2Doc).

SquareFree
**********

See also
========

  * monomialIdealsWithHilbertFunction(...,SquareFree=>...)
    -- find all monomial ideals in a
    polynomial ring with a particular (partial or complete) Hilbert function

Functions with optional argument named SquareFree :
===================================================

  * "bettiTablesWithHilbertFunction(...,SquareFree=>...)" -- see
    bettiTablesWithHilbertFunction, -- list or
    tally all Betti tables that can be obtained from monomial ideals with a
    particular (partial or complete) Hilbert function
  * "monomialIdealsWithHilbertFunction(...,SquareFree=>...)" -- see
    monomialIdealsWithHilbertFunction, --
    find all monomial ideals in a polynomial ring with a particular (partial or
    complete) Hilbert function

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

The object SquareFree, is a symbol (Macaulay2Doc).

topMinimalPrimesIP -- compute the minimal primes of maximum dimension using integer programming
***********************************************************************************************

Synopsis
========

  * Usage:
        topMinimalPrimesIP(I)
        topMinimalPrimesIP(I, KnownDim => k)
        topMinimalPrimesIP(I, IgnorePrimes => P)
  * Inputs:
      * I, a monomial ideal (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * KnownDim => an integer (Macaulay2Doc), default value -1, the
        dimension, k, of the ideal
      * IgnorePrimes, => a list (Macaulay2Doc),
        default value {}, a list of primes to not include the the result. See
        IgnorePrimes.
  * Outputs:
      * L, a list (Macaulay2Doc), all minimal associated primes of
        dimension $k$

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

If a KnownDim is not provided, topMinimalPrimesIP will first call {see
dimensionIP,}($I$) to compute the dimension.

The IP for this function is similar to the degreeIP,
formulation, except that rather than count the number of solutions, SCIP uses a
sparse data structure to enumerate all feasible solutions.

The location of input/output files for SCIP solving is printed to the screen by
default. To change this, see ScipPrintLevel.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x,y,z,w,v];                                                      |
+-----------------------------------------------------------------------------+
|i2 : I = monomialIdeal(y^12, x*y^3, z*w^3, z*v*y^10, z*x^10, v*z^10, w*v^10, |
|                                                                             |
|o2 : MonomialIdeal of R                                                      |
|-----------------------------------------------------------------------------|
|y*v*x*z*w);                                                                  |
+-----------------------------------------------------------------------------+
|i3 : ScipPrintLevel = 0;                                                     |
+-----------------------------------------------------------------------------+
|i4 : minimalPrimes(I)                                                        |
|                                                                             |
|o4 = {monomialIdeal (y, z, w), monomialIdeal (y, z, v), monomialIdeal (x, y, |
|     ------------------------------------------------------------------------|
|     w, v)}                                                                  |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+
|i5 : apply(oo, p -> dim p)                                                   |
|                                                                             |
|o5 = {2, 2, 1}                                                               |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : topMinimalPrimesIP(I)                                                   |
|                                                                             |
|o6 = {monomialIdeal (y, z, v), monomialIdeal (y, z, w)}                      |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+

Notice that if the dimension of a monomial ideal is $k$, each of the top
minimal primes is generated by $n-k$ variables, where $n$ is the number of
variables in the polynomial ring.

Caveat
======

topMinimalPrimesIP does not verify that a provided KnownDim is correct.
Providing the wrong dimension will result in an incorrect answer or an error.

See also
========

  * topComponents(Ideal) (PrimaryDecomposition) -- compute
    top dimensional component of an ideal or module
  * degreeIP -- compute the degree of a monomial ideal using
    integer programming
  * MonomialIntegerPrograms -- A package for fast monomial ideal
    computations using constraint integer programming
  * ScipPrintLevel -- adjust how much solving
    information is displayed in MonomialIntegerPrograms

Ways to use topMinimalPrimesIP :
================================

  * "topMinimalPrimesIP(MonomialIdeal)"

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

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