This is NumericalSemigroups.info, produced by Macaulay2, version 1.26.06

NumericalSemigroups -- Invariants of numerical semigroups
*********************************************************

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

Numerical semigroups are cofinite subsets of the natural numbers that are
closed under sums. We generally refer to these simply as semigroups.  A
semigroup S thus includes the empty sum, 0, but we input semigroups by giving
generators, all nonzero. The smallest nonzero element of S is the multiplicity.
The Apery set (really sequence) of a semigroup S is the the list {a_1..a_m-1}
where a_i is the smallest element in S such that a_i = i mod m. The conductor
is 1 plus the largest element not in S. We generally specify a semigroup by
giving a list of positive integers L with gcd = 1, representing the semigroup
of all sums of elements of L.

Combinatorics of Semigroups
===========================

  * apery -- Compute the apery set, multiplicity and conductor
  * gaps -- The gap sequence of a semigroup
  * sums -- sum of two sequences
  * isGapSequence -- test whether a list of integers can
    be the list of gaps of a semigroup
  * isSymmetric -- test whether the semigroup generated by
    L is symmetric
  * weight -- weight of a semigroup
  * effectiveWeight -- Effective weight of a semigroup (Pflueger)

Working with the Kunz cone
==========================

  * aperyConeEquations -- Inequalities defining the
    Kunz cones
  * muConeEquations -- Inequalities defining the
    Kunz cones
  * mu -- Compute the point representing a semigroup in the Kunz
    cone
  * semigroupFromMu -- Inverse of the function mu
  * facetRays -- computes the rays spanning the face in which
    a semigroup lies
  * coneRays -- All the rays of the (homogeneous) Kunz cone
  * allSemigroups -- Compute the Hilbert basis and module
    generators of a cone of semigroups
  * semigroupsFromMatrix -- applies
    semigroupFromMu to the columns of a matrix
  * randomSemigroup -- Random semingroup on a given
    face of the Kunz cone
  * findSemigroups -- Find all semigroups with a given
    number of gaps, multiplicity and/or conductor
  * buchweitzCriterion -- Does L satisfies the
    Buchweitz criterion?
  * buchweitz -- An example of a semigroup that is not a
    Weierstrass semigroup
  * buchweitzSemigroups -- Finds semigroups that
    are not Weierstrass semigroups by the Buchweitz test

Properties of semigroup rings
=============================

  * burchIndex -- Compute the burchIndex of the Burch ring
    of a semigroup
  * semigroupRing -- forms the semigroup ring over
    "BaseField"
  * semigroupIdeal -- The ideal defining the semigroup
    ring
  * socle -- elements of the semigroup that are in the socle mod
    the multiplicity
  * type -- type of the local semigroup ring
  * genus (Macaulay2Doc) -- genus of an object
  * kunzRing -- artinian reduction of a semigroup ring
  * kunzPoset (missing documentation)
  * syzFormat (missing documentation)
  * reduceByList (missing documentation)

Arf Semigroups
==============

  * isArf -- test whether a numerical semigroup is Arf
  * arfIndex -- Computes the Arf index of a numerical
    semigroup
  * arfClosure -- Compute the Arf closure of a numerical
    semigroup
  * fractionalIdeal -- turn a fractional ideal into a
    proper ideal
  * infinitelyNearSemigroups -- The sequence
    of blowup semigroups of a numerical semigroup
  * infinitelyNearModules -- The sequence of
    blowups of a semigroup ring as fractional ideals
  * isMinimalMultiplicity (missing documentation)

Authors
=======

  * David Eisenbud (see https://eisenbud.github.io ) <de@berkeley.edu>
  * Frank-Olaf Schreyer (see
    https://www.math.uni-sb.de/ag/schreyer/index.php/publications/publications-
    frank-olaf-schreyer ) <schreyer@math.uni-sb.de>
  * Theodore Wittmer Lysek <tlysek44@gmail.com>

Version
=======

This documentation describes version 1.0 of NumericalSemigroups, released June
8, 2026.

Citation
========

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

+-----------------------------------------------------------------------------+
|@misc{NumericalSemigroupsSource,                                             |
|  title = {{NumericalSemigroups: A \emph{Macaulay2} package. Version~1.0}},  |
|  author = {David Eisenbud and Frank-Olaf Schreyer and Theodore Wittmer Lysek|
|  howpublished = {A \emph{Macaulay2} package available at                    |
|    \url{https://github.com/Macaulay2/M2/tree/stable/M2/Macaulay2/packages}} |
|}                                                                            |
|-----------------------------------------------------------------------------|
|},                                                                           |
+-----------------------------------------------------------------------------+

Exports
=======

  * Functions and commands
      * allSemigroups -- Compute the Hilbert basis and
        module generators of a cone of semigroups
      * apery -- Compute the apery set, multiplicity and
        conductor
      * aperyConeEquations -- Inequalities defining
        the Kunz cones
      * "muConeEquations" -- see aperyConeEquations,
        -- Inequalities defining the Kunz cones
      * aperyFacetRays (missing documentation)
      * aperySemigroupRing -- computes the semigroup
        ring using both the multiplicity and the full Apery set
      * aperySet -- Compute the apery set of a numerical
        semigroup
      * arfClosure -- Compute the Arf closure of a numerical
        semigroup
      * arfIndex -- Computes the Arf index of a numerical
        semigroup
      * buchweitz -- An example of a semigroup that is not a
        Weierstrass semigroup
      * buchweitzCriterion -- Does L satisfies the
        Buchweitz criterion?
      * buchweitzSemigroups -- Finds semigroups
        that are not Weierstrass semigroups by the Buchweitz test
      * burchIndex -- Compute the burchIndex of the Burch
        ring of a semigroup
      * coneRays -- All the rays of the (homogeneous) Kunz
        cone
      * def1 -- degrees of a basis of T^1
      * "effectiveWeight" -- see ewt, -- Effective weight of a
        semigroup (Pflueger)
      * ewt -- Effective weight of a semigroup (Pflueger)
      * facetRays -- computes the rays spanning the face in
        which a semigroup lies
      * findSemigroups -- Find all semigroups with a
        given number of gaps, multiplicity and/or conductor
      * fractionalIdeal -- turn a fractional ideal into
        a proper ideal
      * gaps -- The gap sequence of a semigroup
      * infinitelyNearModules -- The sequence of
        blowups of a semigroup ring as fractional ideals
      * infinitelyNearSemigroups -- The
        sequence of blowup semigroups of a numerical semigroup
      * isArf -- test whether a numerical semigroup is Arf
      * isGapSequence -- test whether a list of integers
        can be the list of gaps of a semigroup
      * isKnownExample -- Is L a known Weierstrass
        semigroup?
      * isMinimalMultiplicity (missing documentation)
      * isSymmetric -- test whether the semigroup generated
        by L is symmetric
      * kunzMatrix -- determine the set of facet equations
        satisfied by a semigroup
      * kunzPoset (missing documentation)
      * kunzRing -- artinian reduction of a semigroup ring
      * mu -- Compute the point representing a semigroup in the Kunz
        cone
      * randomSemigroup -- Random semingroup on a given
        face of the Kunz cone
      * semigroup -- Compute the semigroup generated by a
        list of positive integers
      * semigroupFromMu -- Inverse of the function mu
      * semigroupIdeal -- The ideal defining the
        semigroup ring
      * semigroupRing -- forms the semigroup ring over
        "BaseField"
      * semigroupsFromMatrix -- applies
        semigroupFromMu to the columns of a matrix
      * socle -- elements of the semigroup that are in the socle
        mod the multiplicity
      * sums -- sum of two sequences
      * syzFormat (missing documentation)
      * type -- type of the local semigroup ring
      * weight -- weight of a semigroup
  * Methods
      * "allSemigroups(List)" -- see allSemigroups, --
        Compute the Hilbert basis and module generators of a cone of semigroups
      * "allSemigroups(ZZ)" -- see allSemigroups, --
        Compute the Hilbert basis and module generators of a cone of semigroups
      * "apery(List)" -- see apery, -- Compute the apery set,
        multiplicity and conductor
      * "aperyConeEquations(List)" -- see aperyConeEquations,
        -- Inequalities defining the Kunz cones
      * "aperyConeEquations(ZZ)" -- see aperyConeEquations,
        -- Inequalities defining the Kunz cones
      * "muConeEquations(List)" -- see aperyConeEquations,
        -- Inequalities defining the Kunz cones
      * "muConeEquations(ZZ)" -- see aperyConeEquations,
        -- Inequalities defining the Kunz cones
      * aperyFacetRays(List) (missing documentation)
      * "aperySemigroupRing(List)" -- see aperySemigroupRing,
        -- computes the semigroup ring using both the
        multiplicity and the full Apery set
      * "aperySet(HashTable)" -- see aperySet, -- Compute the
        apery set of a numerical semigroup
      * "aperySet(List)" -- see aperySet, -- Compute the apery
        set of a numerical semigroup
      * "arfClosure(List)" -- see arfClosure, -- Compute the
        Arf closure of a numerical semigroup
      * "arfIndex(List)" -- see arfIndex, -- Computes the Arf
        index of a numerical semigroup
      * "buchweitz(ZZ)" -- see buchweitz, -- An example of a
        semigroup that is not a Weierstrass semigroup
      * "buchweitzCriterion(List)" -- see buchweitzCriterion,
        -- Does L satisfies the Buchweitz criterion?
      * "buchweitzCriterion(ZZ,List)" -- see buchweitzCriterion,
        -- Does L satisfies the Buchweitz criterion?
      * "buchweitzSemigroups(ZZ)" -- see buchweitzSemigroups,
        -- Finds semigroups that are not Weierstrass
        semigroups by the Buchweitz test
      * "buchweitzSemigroups(ZZ,ZZ)" -- see buchweitzSemigroups,
        -- Finds semigroups that are not Weierstrass
        semigroups by the Buchweitz test
      * "buchweitzSemigroups(ZZ,ZZ,ZZ)" -- see buchweitzSemigroups,
        -- Finds semigroups that are not Weierstrass
        semigroups by the Buchweitz test
      * "burchIndex(List)" -- see burchIndex, -- Compute the
        burchIndex of the Burch ring of a semigroup
      * conductor(List) -- conductor of a semigroup
      * "coneRays(ZZ)" -- see coneRays, -- All the rays of the
        (homogeneous) Kunz cone
      * "def1(List)" -- see def1, -- degrees of a basis of T^1
      * "effectiveWeight(List)" -- see ewt, -- Effective weight of a
        semigroup (Pflueger)
      * "ewt(List)" -- see ewt, -- Effective weight of a semigroup
        (Pflueger)
      * "facetRays(List)" -- see facetRays, -- computes the
        rays spanning the face in which a semigroup lies
      * "findSemigroups(ZZ)" -- see findSemigroups, --
        Find all semigroups with a given number of gaps, multiplicity and/or
        conductor
      * "findSemigroups(ZZ,ZZ)" -- see findSemigroups, --
        Find all semigroups with a given number of gaps, multiplicity and/or
        conductor
      * "findSemigroups(ZZ,ZZ,ZZ)" -- see findSemigroups,
        -- Find all semigroups with a given number of gaps, multiplicity and/or
        conductor
      * "fractionalIdeal(List,List)" -- see fractionalIdeal,
        -- turn a fractional ideal into a proper ideal
      * fractionalIdeal(Ring,List) (missing documentation)
      * "gaps(List)" -- see gaps, -- The gap sequence of a
        semigroup
      * genus(List) -- Compute the number of gaps
        (genus) of a semigroup
      * "infinitelyNearModules(Ring)" -- see infinitelyNearModules,
        -- The sequence of blowups of a semigroup ring
        as fractional ideals
      * "infinitelyNearSemigroups(List)" -- see infinitelyNearSemigroups,
        -- The sequence of blowup semigroups of a
        numerical semigroup
      * "isArf(List)" -- see isArf, -- test whether a numerical
        semigroup is Arf
      * "isGapSequence(List)" -- see isGapSequence, --
        test whether a list of integers can be the list of gaps of a semigroup
      * "isKnownExample(List)" -- see isKnownExample, --
        Is L a known Weierstrass semigroup?
      * "isSymmetric(List)" -- see isSymmetric, -- test
        whether the semigroup generated by L is symmetric
      * "kunzMatrix(HashTable)" -- see kunzMatrix, --
        determine the set of facet equations satisfied by a semigroup
      * "kunzMatrix(List)" -- see kunzMatrix, -- determine
        the set of facet equations satisfied by a semigroup
      * kunzPoset(List) (missing documentation)
      * "kunzRing(List)" -- see kunzRing, -- artinian reduction
        of a semigroup ring
      * mingens(List) -- Find a mininmal set of
        semigroup generators
      * "mu(HashTable)" -- see mu, -- Compute the point representing
        a semigroup in the Kunz cone
      * "mu(List)" -- see mu, -- Compute the point representing a
        semigroup in the Kunz cone
      * "randomSemigroup(List,ZZ)" -- see randomSemigroup,
        -- Random semingroup on a given face of the Kunz cone
      * "randomSemigroup(ZZ,ZZ)" -- see randomSemigroup,
        -- Random semingroup on a given face of the Kunz cone
      * "semigroup(List)" -- see semigroup, -- Compute the
        semigroup generated by a list of positive integers
      * "semigroupFromMu(List)" -- see semigroupFromMu,
        -- Inverse of the function mu
      * "semigroupIdeal(List)" -- see semigroupIdeal, --
        The ideal defining the semigroup ring
      * "semigroupRing(List)" -- see semigroupRing, --
        forms the semigroup ring over "BaseField"
      * "semigroupsFromMatrix(Matrix)" -- see semigroupsFromMatrix,
        -- applies semigroupFromMu to the columns of a
        matrix
      * "socle(List)" -- see socle, -- elements of the semigroup
        that are in the socle mod the multiplicity
      * "sums(List,List)" -- see sums, -- sum of two sequences
      * "sums(ZZ,List)" -- see sums, -- sum of two sequences
      * syzFormat(List) (missing documentation)
      * "type(List)" -- see type, -- type of the local semigroup
        ring
      * "weight(List)" -- see weight, -- weight of a semigroup
  * Symbols
      * muFacetRays (missing documentation)
      * reduceByList (missing documentation)

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

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

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

The source of this document is in NumericalSemigroups.m2:1545:0.

allSemigroups -- Compute the Hilbert basis and module generators of a cone of semigroups
****************************************************************************************

  * Usage:
        (H,M) = allSemigroups L
        (H,M) = allSemigroups m
  * Inputs:
      * L, a list (Macaulay2Doc), of generators of a semigroup
      * m, an integer (Macaulay2Doc), the multiplicity of the
        semigroups
  * Outputs:
      * H, a matrix (Macaulay2Doc), of integers; the rows form
        the Hilbert basis  of the cone;
      * M, a matrix (Macaulay2Doc), of module generators of the
        cone

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

Using Normaliz we compute the face of the Kunz cone containing L (or of the
cone of semigroups of multiplicity m).

Every semigroup of multiplicity m has Apery set of the form m, mu_1*m+1,
mu_2*m+2..mu_(m-1)*m+(m-1). The sequence of mu_i for a semigroup L is the value
of mu(L).

+----------------------------+
|i1 : (H,M) = allSemigroups 3|
|                            |
|o1 = (| 3 3 |, | 4  5 |)    |
|      | 3 6 |  | 4  8 |     |
|      | 6 3 |  | 7  5 |     |
|               | 10 5 |     |
|                            |
|o1 : Sequence               |
+----------------------------+
|i2 : H == matrix{           |
|               {3,3},       |
|               {3,6},       |
|               {6,3}        |
|               }            |
|                            |
|o2 = true                   |
+----------------------------+
|i3 : M == matrix{           |
|               {4,5},       |
|               {4,8},       |
|               {7,5},       |
|               {10,5}       |
|               }            |
|                            |
|o3 = true                   |
+----------------------------+

Here the rows of the first matrix, H, form a Hilbert basis, that is, a set of
semigroup generators, of the semigroup of the possible mu(L) as L runs over the
semigroups of multiplicity 3. The rows of the the second matrix, M, when
prepened by the multiplicity 3, are Apery sets of some semigroups such that
every semigroup of multiplicity 3 has Apery set equal to a linear combination
of the rows of H added to one of the rows of M.

+------------------------------+
|i4 : allSemigroups {4,7,9}    |
|                              |
|o4 = (| 4  8 4 |, | 9  14 7 |)|
|      | 8  8 4 |  | 13 14 7 | |
|      | 12 8 4 |  | 17 14 7 | |
|                  | 21 14 7 | |
|                              |
|o4 : Sequence                 |
+------------------------------+

This means that all the semigroups on the same (open) face of the Kunz cone as
{4,7,9} can be obtained by taking a linear combination of the rows of H, adding
one of the rows of M, and prepending the multiplicity 4.

On the face with the buchweitz, example there are two facet
rays:

+-----------------------------------------------------------------------------+
|i5 : (H,M) = allSemigroups buchweitz 0                                       |
|                                                                             |
|o5 = (| 13 13 13 13 13 26 13 26  13  13  26  26  |, | 14 15 16 17 18 32 20   |
|      | 13 26 39 52 65 78 91 104 117 130 143 156 |  | 14 28 42 56 70 84 98   |
|     ------------------------------------------------------------------------|
|     34  22  23  37  38  |)                                                  |
|     112 126 140 154 168 |                                                   |
|                                                                             |
|o5 : Sequence                                                                |
+-----------------------------------------------------------------------------+

The first row of H is 13*(mu buchweitz 0), the mu vector of the Buchweitz
example. Adding multiples of the first row to the Weierstrass semigroups of an
ordinary point on a curve of genus 12, we eventually reach a semigroup that
fails the Buchweitz test to be a Weierstrass semigroup:

+-----------------------------------------------------------+
|i6 : b = {0}|flatten (entries H)_0                         |
|                                                           |
|o6 = {0, 13, 13, 13, 13, 13, 26, 13, 26, 13, 13, 26, 26}   |
|                                                           |
|o6 : List                                                  |
+-----------------------------------------------------------+
|i7 : L = toList (13..25)                                   |
|                                                           |
|o7 = {13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25}  |
|                                                           |
|o7 : List                                                  |
+-----------------------------------------------------------+
|i8 : for i from 0 to 15 list (                             |
|         L' = L+i*b;                                       |
|         G = gaps L';                                      |
|         3*(genus L' -1)-#sums(G,G)                        |
|         )                                                 |
|                                                           |
|o8 = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5}|
|                                                           |
|o8 : List                                                  |
+-----------------------------------------------------------+

By Riemann-Roch the quantity 3*(genus L' -1)-#sums(G,G) is non-negative for
Weierstrass semigroups. We conjecture that the same thing is true for any
semigroup L0 of multiplicity 13 in place of L. Here is a "random" example:

+-----------------------------------------------------------------------------+
|i9 : setRandomSeed 0                                                         |
| -- setting random seed to 0                                                 |
|                                                                             |
|o9 = 0                                                                       |
+-----------------------------------------------------------------------------+
|i10 : L0 = {13}|aperySet ({13}|apply(1 + random 10, i->13+random 10))        |
|                                                                             |
|o10 = {13, 14, 28, 16, 30, 44, 32, 20, 21, 35, 36, 37, 51}                   |
|                                                                             |
|o10 : List                                                                   |
+-----------------------------------------------------------------------------+
|i11 : for i from 0 to 20 list (                                              |
|         L' = L0+i*b;                                                        |
|         G = gaps L';                                                        |
|         3*(genus L' -1)-#sums(G,G)                                          |
|         )                                                                   |
|                                                                             |
|o11 = {3, 8, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6,   |
|      -----------------------------------------------------------------------|
|      -7}                                                                    |
|                                                                             |
|o11 : List                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * aperySet -- Compute the apery set of a numerical semigroup
  * aperyConeEquations -- Inequalities defining the
    Kunz cones
  * buchweitzCriterion -- Does L satisfies the
    Buchweitz criterion?

Ways to use allSemigroups:
==========================

  * "allSemigroups(List)"
  * "allSemigroups(ZZ)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2246:0.

apery -- Compute the apery set, multiplicity and conductor
**********************************************************

  * Usage:
        A = apery L
  * Inputs:
      * L, a list (Macaulay2Doc), of positive integers
  * Optional inputs (Macaulay2Doc),:
      * UpperBound
  * Outputs:
      * A, a hash table (Macaulay2Doc),

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

The smallest nonzero element of s is the \emph{multiplicity}. The Apery set
(really sequence) of a semigroup S is the the list {a_1..a_m-1} where a_i is
the smallest element in s such that a_i = i mod m. The \emph{conductor} is 1
plus the largest element \emph{not} in S. We generally specify a semigroup by
giving a list of positive integers L with gcd = 1, representing the semigroup
of all sums of elements of L.

+-----------------------------------------------------+
|i1 : L = {3,5}                                       |
|                                                     |
|o1 = {3, 5}                                          |
|                                                     |
|o1 : List                                            |
+-----------------------------------------------------+
|i2 : apery L                                         |
|                                                     |
|o2 = HashTable{1 => 10                              }|
|               2 => 5                                |
|               "conductor" => 8                      |
|               "multiplicity" => 3                   |
|               "semigroup" => {0, 3, 5, 6, 8, 9, 10} |
|                                                     |
|o2 : HashTable                                       |
+-----------------------------------------------------+

See also
========

  * aperySet -- Compute the apery set of a numerical semigroup

Ways to use apery:
==================

  * "apery(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:1612:0.

aperyConeEquations -- Inequalities defining the Kunz cones
**********************************************************

  * Usage:
        M =  aperyConeEquations m
        M = aperyConeEquations sgrp
        M =  muConeEquations m
        M = muConeEquations sgrp
  * Inputs:
      * m, an integer (Macaulay2Doc), multiplicity
      * sgrp, a list (Macaulay2Doc), generators of a semigroup
  * Outputs:
      * M, a matrix (Macaulay2Doc), m-1 x d matrix whose columns
        represent inequalities defining the Kunz cone

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

Let S be the numerical semigroup defined by a list sgrp, have multiplicity m
and apery set a_1,\dots,a_(m-1) and set mu_i = (a_i -i)//m. The homogeneous
Kunz cone of semigroups of multiplity m is the convex polyhedral cone defined
by the inequalities of the form

a_i + a_j - a_(i+j) \geq 0.

where 1\leq i,j\leq m-1 and i+j\neq m is interpreted mod m.

On the other hand, the inHomogeneous Kunz cone is given by the equations

mu_i + m_j - mu_(i+j) \geq 0 if i+j<m mu_i + m_j - mu_(i+j) -1  \geq 0 if i+j>
m

The output of the function is the pair (E,c), where, if L is a semigroup, then

matrix {Apery L} * E

is a non-negative matrix with entries divisible by m, and

matrix {mu L} *E - c

is a non-negative matrix. The columns of E and c are indexed by the
lexicographically ordered pairs {i,j} with 1<= i<=j<=m-1 and i+j != m.

The function aperyConeEquations m returns an m-1 x d matrix of ZZ whose columns
are the coefficients of the left hand sides of these inequalities. The function
aperyConeEquations sgrp does the same, with additional columns representing the
additional inequalities of this type that are satisfied by the Apery set
apery(sgrp). For m = 3, the semigroup {3,4,5} is interior (and thus satisfies
no further equations), while the semigroups {3,4} and {3,5} are on the two
extremal rays of the cone.

+-------------------------------+
|i1 : aperyConeEquations 3      |
|                               |
|o1 = | 2  -1 |                 |
|     | -1 2  |                 |
|                               |
|              2       2        |
|o1 : Matrix ZZ  <-- ZZ         |
+-------------------------------+
|i2 : aperyConeEquations {3,4,5}|
|                               |
|o2 = | 2  -1 |                 |
|     | -1 2  |                 |
|                               |
|              2       2        |
|o2 : Matrix ZZ  <-- ZZ         |
+-------------------------------+
|i3 : aperyConeEquations {3,4}  |
|                               |
|o3 = | 2  -1 -2 |              |
|     | -1 2  1  |              |
|                               |
|              2       3        |
|o3 : Matrix ZZ  <-- ZZ         |
+-------------------------------+
|i4 : aperyConeEquations {3,5}  |
|                               |
|o4 = | 2  -1 1  |              |
|     | -1 2  -2 |              |
|                               |
|              2       3        |
|o4 : Matrix ZZ  <-- ZZ         |
+-------------------------------+
|i5 : allSemigroups 3           |
|                               |
|o5 = (| 3 3 |, | 4  5 |)       |
|      | 3 6 |  | 4  8 |        |
|      | 6 3 |  | 7  5 |        |
|               | 10 5 |        |
|                               |
|o5 : Sequence                  |
+-------------------------------+

The inhomogeneous Kunz cone does the same, but for the numbers mu_i instead of
a_i. Thus when i+j > m the inequality mu_i+mu_j-mu_(i+j) \geq 0 is replaced by
the inequality

mu_i+mu_j - mu_(i+j) -1.

The function muConeEquations m, returns the matrix aperyConeEquations m with
one more row, where the last row represents the constant terms of this
inquality:

+-----------------------------------------------+
|i6 : eq=muConeEquations 3                      |
|                                               |
|o6 = | 2  -1 |                                 |
|     | -1 2  |                                 |
|     | 0  1  |                                 |
|                                               |
|              3       2                        |
|o6 : Matrix ZZ  <-- ZZ                         |
+-----------------------------------------------+
|i7 : muConeEquations {3,4,5}                   |
|                                               |
|o7 = | 2  -1 |                                 |
|     | -1 2  |                                 |
|     | 0  1  |                                 |
|                                               |
|              3       2                        |
|o7 : Matrix ZZ  <-- ZZ                         |
+-----------------------------------------------+
|i8 : muConeEquations {3,4}                     |
|                                               |
|o8 = | 2  -1 -2 |                              |
|     | -1 2  1  |                              |
|     | 0  1  0  |                              |
|                                               |
|              3       3                        |
|o8 : Matrix ZZ  <-- ZZ                         |
+-----------------------------------------------+
|i9 : muConeEquations {3,5}                     |
|                                               |
|o9 = | 2  -1 1  |                              |
|     | -1 2  -2 |                              |
|     | 0  1  0  |                              |
|                                               |
|              3       3                        |
|o9 : Matrix ZZ  <-- ZZ                         |
+-----------------------------------------------+
|i10 : (H,M)=allSemigroups 3                    |
|                                               |
|o10 = (| 3 3 |, | 4  5 |)                      |
|       | 3 6 |  | 4  8 |                       |
|       | 6 3 |  | 7  5 |                       |
|                | 10 5 |                       |
|                                               |
|o10 : Sequence                                 |
+-----------------------------------------------+
|i11 : (H,M)=allSemigroups 4                    |
|                                               |
|o11 = (| 4  0 4  |, | 5  6  7  |)              |
|       | 4  4 4  |  | 5  6  11 |               |
|       | 4  4 8  |  | 5  10 7  |               |
|       | 4  8 4  |  | 5  10 11 |               |
|       | 4  8 8  |  | 5  10 15 |               |
|       | 4  8 12 |  | 9  6  7  |               |
|       | 8  4 4  |  | 9  10 7  |               |
|       | 8  8 4  |  | 9  14 7  |               |
|       | 12 8 4  |  | 13 6  7  |               |
|                    | 13 10 7  |               |
|                    | 13 14 7  |               |
|                    | 17 10 7  |               |
|                    | 17 14 7  |               |
|                    | 21 14 7  |               |
|                                               |
|o11 : Sequence                                 |
+-----------------------------------------------+
|i12 : M1=(M|matrix apply(rank target M,i->{1}))|
|                                               |
|o12 = | 5  6  7  1 |                           |
|      | 5  6  11 1 |                           |
|      | 5  10 7  1 |                           |
|      | 5  10 11 1 |                           |
|      | 5  10 15 1 |                           |
|      | 9  6  7  1 |                           |
|      | 9  10 7  1 |                           |
|      | 9  14 7  1 |                           |
|      | 13 6  7  1 |                           |
|      | 13 10 7  1 |                           |
|      | 13 14 7  1 |                           |
|      | 17 10 7  1 |                           |
|      | 17 14 7  1 |                           |
|      | 21 14 7  1 |                           |
|                                               |
|               14       4                      |
|o12 : Matrix ZZ   <-- ZZ                       |
+-----------------------------------------------+
|i13 : eqInh=muConeEquations 4                  |
|                                               |
|o13 = | 2  1  -1 0  |                          |
|      | -1 1  1  -1 |                          |
|      | 0  -1 1  2  |                          |
|      | 0  0  1  1  |                          |
|                                               |
|               4       4                       |
|o13 : Matrix ZZ  <-- ZZ                        |
+-----------------------------------------------+
|i14 : eqh=aperyConeEquations 4                 |
|                                               |
|o14 = | 2  1  -1 0  |                          |
|      | -1 1  1  -1 |                          |
|      | 0  -1 1  2  |                          |
|                                               |
|               3       4                       |
|o14 : Matrix ZZ  <-- ZZ                        |
+-----------------------------------------------+
|i15 : M1*eqInh                                 |
|                                               |
|o15 = | 4  4  9  9  |                          |
|      | 4  0  13 17 |                          |
|      | 0  8  13 5  |                          |
|      | 0  4  17 13 |                          |
|      | 0  0  21 21 |                          |
|      | 12 8  5  9  |                          |
|      | 8  12 9  5  |                          |
|      | 4  16 13 1  |                          |
|      | 20 12 1  9  |                          |
|      | 16 16 5  5  |                          |
|      | 12 20 9  1  |                          |
|      | 24 20 1  5  |                          |
|      | 20 24 5  1  |                          |
|      | 28 28 1  1  |                          |
|                                               |
|               14       4                      |
|o15 : Matrix ZZ   <-- ZZ                       |
+-----------------------------------------------+
|i16 : H*eqh                                    |
|                                               |
|o16 = | 8  0  0  8  |                          |
|      | 4  4  4  4  |                          |
|      | 4  0  8  12 |                          |
|      | 0  8  8  0  |                          |
|      | 0  4  12 8  |                          |
|      | 0  0  16 16 |                          |
|      | 12 8  0  4  |                          |
|      | 8  12 4  0  |                          |
|      | 16 16 0  0  |                          |
|                                               |
|               9       4                       |
|o16 : Matrix ZZ  <-- ZZ                        |
+-----------------------------------------------+

All entries of M1*eqInh and H*eqh are non-negative as desired.

References
==========

Kunz, Ernst: Klassification numerische Halbgruppen

Caveat
======

See also
========

  * apery -- Compute the apery set, multiplicity and conductor
  * coneRays -- All the rays of the (homogeneous) Kunz cone

Ways to use aperyConeEquations:
===============================

  * "aperyConeEquations(List)"
  * "aperyConeEquations(ZZ)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2945:0.

aperyFacetRays
**************

Ways to use aperyFacetRays:
===========================

  * aperyFacetRays(List) (missing documentation)

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

The object aperyFacetRays (missing documentation) is a method function (Macaulay2Doc).

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

The source of this document is in currentString:1:385.

aperySemigroupRing -- computes the semigroup ring using both the multiplicity and the full Apery set
****************************************************************************************************

  * Usage:
        R = aperySemigroupRing L
  * Inputs:
      * L, a list (Macaulay2Doc),
  * Outputs:
      * R, a ring (Macaulay2Doc),

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

While the function semigroupRing L uses just a minimal set of generators, the
function aperySemigroupRing L uses the larger Apery set, and puts the generator
corresponding to the multiplicity at the end.

+------------------------------+
|i1 : L = {5,6}                |
|                              |
|o1 = {5, 6}                   |
|                              |
|o1 : List                     |
+------------------------------+
|i2 : aperySet L               |
|                              |
|o2 = {6, 12, 18, 24}          |
|                              |
|o2 : List                     |
+------------------------------+
|i3 : gens aperySemigroupRing L|
|                              |
|o3 = {x , x , x , x , x }     |
|       1   2   3   4   0      |
|                              |
|o3 : List                     |
+------------------------------+
|i4 : gens semigroupRing L     |
|                              |
|o4 = {x , x }                 |
|       0   1                  |
|                              |
|o4 : List                     |
+------------------------------+

See also
========

  * semigroupRing -- forms the semigroup ring over
    "BaseField"
  * aperySet -- Compute the apery set of a numerical semigroup
  * mingens (Macaulay2Doc) -- minimal generator matrix

Ways to use aperySemigroupRing:
===============================

  * "aperySemigroupRing(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2616:0.

aperySet -- Compute the apery set of a numerical semigroup
**********************************************************

  * Usage:
        as = aperySet L
        aS = aperySet HL
  * Inputs:
      * L, a list (Macaulay2Doc), of positive integers
      * H, a hash table (Macaulay2Doc), as computed by H =
        apery L
  * Outputs:
      * aS, a list (Macaulay2Doc),

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

L is taken as generators of a numerical semigroup S; should have gcd = 1. The
apery set is then the list aS = {a_1..a_(m-1)} where m is the smallest element
of L, and a_i is the smallest element of S with a_i = i mod m.

+---------------------------+
|i1 : aperySet {3,5}        |
|                           |
|o1 = {10, 5}               |
|                           |
|o1 : List                  |
+---------------------------+
|i2 : semigroup {3,5}       |
|                           |
|o2 = {0, 3, 5, 6, 8, 9, 10}|
|                           |
|o2 : List                  |
+---------------------------+

See also
========

  * apery -- Compute the apery set, multiplicity and conductor

Ways to use aperySet:
=====================

  * "aperySet(HashTable)"
  * "aperySet(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:1641:0.

arfClosure -- Compute the Arf closure of a numerical semigroup
**************************************************************

  * Usage:
        A = arfClosure L
  * Inputs:
      * L, a list (Macaulay2Doc), of positive integers, generating
        a numerical semigroup S
  * Outputs:
      * A, a list (Macaulay2Doc), of minimal generators of the Arf
        closure of S

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

A numerical semigroup S is \emph{Arf} if for every triple of elements x \geq y
\geq z in S, the element x+y-z also lies in S. Equivalently, S is Arf if and
only if every semigroup in the sequence of blowups (the infinitely near
semigroups of S) has minimal multiplicity, that is, has multiplicity equal to
its embedding dimension.

The \emph{Arf closure} Arf(S) is the smallest Arf semigroup containing S. The
function arfClosure returns a list of minimal generators of Arf(S).

The Arf closure is computed from the multiplicities of the infinitely near
semigroups of S: if those multiplicities are m_0, m_1, ..., m_(r-1), then the
partial sums m_0, m_0+m_1, ..., m_0+...+m_(r-1) lie in Arf(S), and together
with the integers immediately above the largest partial sum (up to m_0 - 1 of
them) they generate Arf(S).

+-----------------------------+
|i1 : arfClosure {3,5,7}      |
|                             |
|o1 = {3, 5, 7}               |
|                             |
|o1 : List                    |
+-----------------------------+
|i2 : arfClosure {5,8,9,12}   |
|                             |
|o2 = {5, 8, 9, 11, 12}       |
|                             |
|o2 : List                    |
+-----------------------------+
|i3 : arfClosure {5,8,9,11,12}|
|                             |
|o3 = {5, 8, 9, 11, 12}       |
|                             |
|o3 : List                    |
+-----------------------------+

The third example is already Arf, so the Arf closure equals the input semigroup
(up to choice of minimal generators). The trivial semigroup N (generated by 1)
is its own Arf closure:

+-------------------+
|i4 : arfClosure {1}|
|                   |
|o4 = {1}           |
|                   |
|o4 : List          |
+-------------------+

See also
========

  * isArf -- test whether a numerical semigroup is Arf
  * arfIndex -- Computes the Arf index of a numerical
    semigroup
  * infinitelyNearSemigroups -- The sequence
    of blowup semigroups of a numerical semigroup
  * semigroup -- Compute the semigroup generated by a list of
    positive integers
  * aperySet -- Compute the apery set of a numerical semigroup

Ways to use arfClosure:
=======================

  * "arfClosure(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:3124:0.

arfIndex -- Computes the Arf index of a numerical semigroup
***********************************************************

  * Usage:
        n = arfIndex L
  * Inputs:
      * L, a list (Macaulay2Doc), of positive integers, generating
        a numerical semigroup S
  * Outputs:
      * n, an integer (Macaulay2Doc), the Arf index of S

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

Let A be the operator that sends a numerical semigroup S to the semigroup
obtained by adjoining all elements of the form x+y-z with x \geq y \geq z in S
(and x+y-z still bounded by the conductor region under consideration).
Iterating A eventually stabilizes at the Arf closure of S; see
arfClosure.

The function arfIndex returns the number of times A must be applied to reach
this fixed point. In particular, arfIndex L is 0 exactly when the input
semigroup is already Arf.

+---------------------------+
|i1 : arfIndex {5,8,9,11,12}|
|                           |
|o1 = 0                     |
+---------------------------+
|i2 : arfIndex {5,8,9,12}   |
|                           |
|o2 = 1                     |
+---------------------------+
|i3 : arfIndex {3,5,7}      |
|                           |
|o3 = 0                     |
+---------------------------+

See also
========

  * isArf -- test whether a numerical semigroup is Arf
  * arfClosure -- Compute the Arf closure of a numerical
    semigroup
  * infinitelyNearSemigroups -- The sequence
    of blowup semigroups of a numerical semigroup
  * semigroup -- Compute the semigroup generated by a list of
    positive integers

Ways to use arfIndex:
=====================

  * "arfIndex(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:3160:0.

buchweitz -- An example of a semigroup that is not a Weierstrass semigroup
**************************************************************************

  * Usage:
        L = buchweitz i
  * Inputs:
      * i, an integer (Macaulay2Doc),
  * Outputs:
      * L, a list (Macaulay2Doc), generators of a semigroup

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

For i>=0 this produces a semigroup B with genus 16+i, conductor 26+2i, and
#sums(2, gaps buchweitz i) = 3*(genus B -1)+1). This implies that these
semigroups are NOT Weierstrass semigroups by the following argument, first
employed by Buchweitz:

If L generates the Weierstrass semigroup of a point x on a Riemann surface C,
then the gaps L is the set {1+v | v is the order at p of vanishing of a global
section of \omega_C}. Thus sums(d, #gaps L) <= dim H^0(\omega_C^{d) = d*(2g-1)
- g + 1.

+-----------------------------------------+
|i1 : B = buchweitz 0                     |
|                                         |
|o1 = {13, 14, 15, 16, 17, 18, 20, 22, 23}|
|                                         |
|o1 : List                                |
+-----------------------------------------+
|i2 : g = #gaps B                         |
|                                         |
|o2 = 16                                  |
+-----------------------------------------+
|i3 : m = 3                               |
|                                         |
|o3 = 3                                   |
+-----------------------------------------+
|i4 : 2*(2*g-2) - g + 1                   |
|                                         |
|o4 = 45                                  |
+-----------------------------------------+
|i5 : #sums(2, gaps B)                    |
|                                         |
|o5 = 46                                  |
+-----------------------------------------+

More such semigroups can be found with buchweitzSemigroups,

Acknowledgement
===============

The result was written in Ragnar Buchweitz' These d'Etat, but never otherwise
published by Buchweitz. In the meantime it became famous anyway.

Ways to use buchweitz:
======================

  * "buchweitz(ZZ)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2398:0.

buchweitzCriterion -- Does L satisfies the Buchweitz criterion?
***************************************************************

  * Usage:
        d = buchweitzCriterion L
        d = buchweitzCriterion(m,L)
  * Inputs:
      * L, a list (Macaulay2Doc), generators of a semigroup or the
        aperyset of a semigroup
      * m, an integer (Macaulay2Doc), the multiplicity of the
        semigroup
  * Outputs:
      * d, an integer (Macaulay2Doc),

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

A Weierstrass semigroups L satisfies

3*(genus L-1) -#sums(G,G) >=0.

The function returns this difference.

+-----------------------------------------------------------------------------+
|i1 : L={7,12,13}                                                             |
|                                                                             |
|o1 = {7, 12, 13}                                                             |
|                                                                             |
|o1 : List                                                                    |
+-----------------------------------------------------------------------------+
|i2 : buchweitzCriterion L                                                    |
|                                                                             |
|o2 = 0                                                                       |
+-----------------------------------------------------------------------------+
|i3 : L= buchweitz 0                                                          |
|                                                                             |
|o3 = {13, 14, 15, 16, 17, 18, 20, 22, 23}                                    |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
|i4 : buchweitzCriterion L                                                    |
|                                                                             |
|o4 = -1                                                                      |
+-----------------------------------------------------------------------------+
|i5 : (H,M)=allSemigroups L                                                   |
|                                                                             |
|o5 = (| 13 13 13 13 13 26 13 26  13  13  26  26  |, | 14 15 16 17 18 32 20   |
|      | 13 26 39 52 65 78 91 104 117 130 143 156 |  | 14 28 42 56 70 84 98   |
|     ------------------------------------------------------------------------|
|     34  22  23  37  38  |)                                                  |
|     112 126 140 154 168 |                                                   |
|                                                                             |
|o5 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i6 : b=(entries M)_0                                                         |
|                                                                             |
|o6 = {14, 15, 16, 17, 18, 32, 20, 34, 22, 23, 37, 38}                        |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+
|i7 : g=(entries H)_0                                                         |
|                                                                             |
|o7 = {13, 13, 13, 13, 13, 26, 13, 26, 13, 13, 26, 26}                        |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+
|i8 : apply(3,i->buchweitzCriterion(13,b+i*g))                                |
|                                                                             |
|o8 = {-1, -2, -3}                                                            |
|                                                                             |
|o8 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * buchweitz -- An example of a semigroup that is not a
    Weierstrass semigroup

Ways to use buchweitzCriterion:
===============================

  * "buchweitzCriterion(List)"
  * "buchweitzCriterion(ZZ,List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:1585:0.

buchweitzSemigroups -- Finds semigroups that are not Weierstrass semigroups by the Buchweitz test
*************************************************************************************************

  * Usage:
        LL = buchweitzSemigroups g
        LL = buchweitzSemigroups (m,g)
        LL = buchweitzSemigroups (m,c,g)
  * Inputs:
      * g, an integer (Macaulay2Doc), genus
      * m, an integer (Macaulay2Doc), multiplicity
      * c, an integer (Macaulay2Doc), conductor
  * Outputs:
      * LL, a list (Macaulay2Doc), list of semigroups

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

Uses findSemigroups to produce lists of semigroups with the given invariants,
and then uses the Buchweitz test: the following inequality holds for
Weierstrass semigroups: sums(2, #gaps L) <= dim H^0(\omega_C^{2) = 2*(2g-1) - g
+ 1.

+-----------------------------------------------------------------------------+
|i1 : B = buchweitzSemigroups (13,26,16)                                      |
|                                                                             |
|o1 = {{13, 14, 15, 16, 17, 18, 21, 22, 24}, {13, 14, 15, 16, 17, 18, 20, 22, |
|     ------------------------------------------------------------------------|
|     23}}                                                                    |
|                                                                             |
|o1 : List                                                                    |
+-----------------------------------------------------------------------------+
|i2 : buchweitz 0                                                             |
|                                                                             |
|o2 = {13, 14, 15, 16, 17, 18, 20, 22, 23}                                    |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+
|i3 : B = buchweitzSemigroups (14,28,17)                                      |
|                                                                             |
|o3 = {{14, 15, 16, 17, 18, 19, 20, 23, 24, 26}, {14, 15, 16, 17, 18, 19, 20, |
|     ------------------------------------------------------------------------|
|     22, 24, 25}}                                                            |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+

The second example in these two cases are part of the sequence defined in
buchweitz. As g increases there are many more.

+------------------------------------+
|i4 : #buchweitzSemigroups (15,30,18)|
|                                    |
|o4 = 8                              |
+------------------------------------+

See also
========

  * buchweitz -- An example of a semigroup that is not a
    Weierstrass semigroup
  * findSemigroups -- Find all semigroups with a given
    number of gaps, multiplicity and/or conductor

Ways to use buchweitzSemigroups:
================================

  * "buchweitzSemigroups(ZZ)"
  * "buchweitzSemigroups(ZZ,ZZ)"
  * "buchweitzSemigroups(ZZ,ZZ,ZZ)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2440:0.

burchIndex -- Compute the burchIndex of the Burch ring of a semigroup
*********************************************************************

  * Usage:
        b = burchIndex L
  * Inputs:
      * L, a list (Macaulay2Doc), of generators of a semigroup
  * Outputs:
      * b, an integer (Macaulay2Doc),

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

The Burch index of an artinian local ring A = S/I, where (S,n,k) is regular
local, is dim_k (n/(nI:(I:n))). The number returned by

burchIndex L

where L is a list of integers, is the burch index of the Kunz ring of L, that
is, the semigroup ring of L modulo the lowest degree element.

+-----------------------+
|i1 : burchIndex {3,4,5}|
|                       |
|o1 = 2                 |
+-----------------------+

References
==========

Dao, HL and Eisenbud, D, Burch index, summands of syzygies and linearity in
resolutions. Bull. Iranian Math. Soc. 49 (2023).

See also
========

  * kunzRing -- artinian reduction of a semigroup ring

Ways to use burchIndex:
=======================

  * "burchIndex(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2660:0.

conductor(List) -- conductor of a semigroup
*******************************************

  * Function: conductor (IntegralClosure),
  * Usage:
        c = conductor L
  * Inputs:
      * L, a list (Macaulay2Doc), of generators of a semigroup
  * Outputs:
      * c, an integer (Macaulay2Doc), conductor of the semigroups

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

Semigroups in this package are additively closed cofinite subsets of ZZ_{>= 0}.
The conductor is the smallest element c such that c+i is in the semigroup for
all i >= 0. For a semigroup generated by two elements a,b, the conductor is
(a-1)(b-1), but for semigroups with more generators there is no known formula.

+----------------------------+
|i1 : conductor {3,5}        |
|                            |
|o1 = 8                      |
+----------------------------+
|i2 : conductor {5, 7, 9, 13}|
|                            |
|o2 = 12                     |
+----------------------------+

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

  * conductor(List) -- conductor of a semigroup
-------------------------------------------------------------------------------

The source of this document is in NumericalSemigroups.m2:2084:0.

coneRays -- All the rays of the (homogeneous) Kunz cone
*******************************************************

  * Usage:
        M = coneRays m
  * Inputs:
      * m, an integer (Macaulay2Doc), multiplicity
  * Outputs:
      * M, a matrix (Macaulay2Doc), of ZZ -- columns are vectors
        on the rays of the cone

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

Uses the Fourier-Motzkin algorithm to compute the rays from the list of
supporting hyperplanes, which is given by aperyConeEquations.
The number of rays grows rather quickly with m; the actual
number is unknown. Use facetRays, to determine the rays
bounding the face on which a given semigroup lies.

+-----------------------+
|i1 : coneRays 3        |
|                       |
|o1 = | 1 2 |           |
|     | 2 1 |           |
|                       |
|              2       2|
|o1 : Matrix ZZ  <-- ZZ |
+-----------------------+
|i2 : coneRays 4        |
|                       |
|o2 = | 1 1 3 1 |       |
|     | 2 0 2 2 |       |
|     | 3 1 1 1 |       |
|                       |
|              3       4|
|o2 : Matrix ZZ  <-- ZZ |
+-----------------------+
|i3 : facetRays {4,5,6} |
|                       |
|o3 = | 1 1 |           |
|     | 2 0 |           |
|     | 3 1 |           |
|                       |
|              3       2|
|o3 : Matrix ZZ  <-- ZZ |
+-----------------------+

See also
========

  * aperyConeEquations -- Inequalities defining the
    Kunz cones
  * facetRays -- computes the rays spanning the face in which
    a semigroup lies

Ways to use coneRays:
=====================

  * "coneRays(ZZ)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2975:0.

def1 -- degrees of a basis of T^1
*********************************

  * Usage:
        D = def1 L
  * Inputs:
      * L, a list (Macaulay2Doc), generators of a semigroup
  * Optional inputs (Macaulay2Doc),:
      * BaseField
      * JustDegs
  * Outputs:
      * D, a list (Macaulay2Doc), degrees of a basis of
        T^1(semigroupRing L)

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

T^1(B) is the tangent space to the versal deformaion of the ring B, and is
finite dimensional when B has isolated singularity. If B = S/I is a Cohen
presentation, then T^1(B) = coker Hom(Omega_S, B) -> Hom(I/I^2, B). When B is a
semigroup ring, then Henry Pinkham proved that an open subset of the space of
elements of T1 of negative degree correspond to smoothings of the projective
cone of the semigroup ring to Riemann surfaces

+--------------+
|i1 : def1{2,3}|
|              |
|o1 = {-6, -4} |
|              |
|o1 : List     |
+--------------+

Ways to use def1:
=================

  * "def1(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2057:0.

ewt -- Effective weight of a semigroup (Pflueger)
*************************************************

  * Usage:
        w = ewt L
  * Inputs:
      * L, a list (Macaulay2Doc), generators of a semigroup
  * Outputs:
      * w, an integer (Macaulay2Doc), the effective weight

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

The effective weight of a semigroup S is defined as the number of pairs (a,b)
such that a is a minimal generator of S and b is a gap of S with a<b.

By contrast, the weight, of S (the sum of the ramification
indices of the corresponding Weierstrass point) may be defined as the number of
pairs (a,b) such that a is in S and b is a gap with a<b.

Improving on work of Eisenbud-Harris (who proved that primitive semigroups S
are Weierstrass), and occur in codimension equal to the weight,
of S), Nathan Pflueger introduced the "effective weight" and showed that all
semigroups with genus g and effective weight w<g are Weierstrass, and occur on
a subvariety of M_(g,1) with codimension w.

For example, semigroups generated by two elements are always Weierstrass since
complete intersections are smoothable; they are almost never primitive,

+--------------+
|i1 : L = {6,7}|
|              |
|o1 = {6, 7}   |
|              |
|o1 : List     |
+--------------+
|i2 : genus L  |
|              |
|o2 = 15       |
+--------------+
|i3 : weight L |
|              |
|o3 = 55       |
+--------------+
|i4 : ewt L    |
|              |
|o4 = 20       |
+--------------+

References
==========

Pflueger, Nathan . On nonprimitive Weierstrass points. Algebra Number Theory
12  (2018),  no. 8, 1923–1947.

See also
========

  * weight -- weight of a semigroup
  * genus (Macaulay2Doc) -- genus of an object

Ways to use ewt:
================

  * "ewt(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2517:0.

facetRays -- computes the rays spanning the face in which a semigroup lies
**************************************************************************

  * Usage:
        R = facetRays L
  * Inputs:
      * L, a list (Macaulay2Doc), of generators of a semigroup
  * Outputs:
      * R, a matrix (Macaulay2Doc), of integers; the columns are
        the rays of the face on which semigroup L lies

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

Note that this function computes the rays of the closed face *not facet* on
which L lies. Uses the Fourier-Motzkin algorithm to go from the
aperyConeEquations, satisfied by the semigroup to the rays.
For example, in multiplicity 3, the cone has two rays, occupied by the
semigroups semigroup{3,4} and semigroup{3,5}, with semigroup{3,4,5} in the
interior. The rays are given in reduced form (a vector of positive integers
with gcd 1), and appear as the columns of the output matrix.

+-----------------------+
|i1 : aperySet{3,4}     |
|                       |
|o1 = {4, 8}            |
|                       |
|o1 : List              |
+-----------------------+
|i2 : facetRays{3,4}    |
|                       |
|o2 = | 1 |             |
|     | 2 |             |
|                       |
|              2       1|
|o2 : Matrix ZZ  <-- ZZ |
+-----------------------+
|i3 : facetRays{3,5}    |
|                       |
|o3 = | 2 |             |
|     | 1 |             |
|                       |
|              2       1|
|o3 : Matrix ZZ  <-- ZZ |
+-----------------------+
|i4 : facetRays{3,4,5}  |
|                       |
|o4 = | 1 2 |           |
|     | 2 1 |           |
|                       |
|              2       2|
|o4 : Matrix ZZ  <-- ZZ |
+-----------------------+

On the facet with the buchweitz, example there are two facet
rays:

+------------------------------+
|i5 : F = facetRays buchweitz 0|
|                              |
|o5 = | 1  1 |                 |
|     | 2  1 |                 |
|     | 3  1 |                 |
|     | 4  1 |                 |
|     | 5  1 |                 |
|     | 6  2 |                 |
|     | 7  1 |                 |
|     | 8  2 |                 |
|     | 9  1 |                 |
|     | 10 1 |                 |
|     | 11 2 |                 |
|     | 12 2 |                 |
|                              |
|              12       2      |
|o5 : Matrix ZZ   <-- ZZ       |
+------------------------------+

The second column is mu buchweitz 0, the mu vector of the Buchweitz example.
Adding multiples of it to the Weierstrass semigroups ordinary point of genus
12, we eventually reach a semigroup that fails the Buchweitz test to be a
Weierstrass semigroup:

+-----------------------------------------------------------------------------+
|i6 : b =flatten( {0}| entries(F)_0 ) -- edited for minimal change STILL TO BE|
|                                                                             |
|o6 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}                              |
|                                                                             |
|o6 : List                                                                    |
|-----------------------------------------------------------------------------|
|FIXED                                                                        |
+-----------------------------------------------------------------------------+
|i7 : L = toList (13..25)                                                     |
|                                                                             |
|o7 = {13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25}                    |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+
|i8 : #L,#b                                                                   |
|                                                                             |
|o8 = (13, 13)                                                                |
|                                                                             |
|o8 : Sequence                                                                |
+-----------------------------------------------------------------------------+

We conjecture that the same phenomen  for any semigroup L0 of multiplicity 13
in place of L. Here is a "random" example:

See also
========

  * aperySet -- Compute the apery set of a numerical semigroup
  * aperyConeEquations -- Inequalities defining the
    Kunz cones
  * coneRays -- All the rays of the (homogeneous) Kunz cone

Ways to use facetRays:
======================

  * "facetRays(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2149:0.

findSemigroups -- Find all semigroups with a given number of gaps, multiplicity and/or conductor
************************************************************************************************

  * Usage:
        LL = findSemigroups(mult, cond, numgaps)
        LL = findSemigroups(mult, numgaps)
        LL = findSemigroups(numgaps)
  * Inputs:
      * mult, an integer (Macaulay2Doc), multiplicity
      * cond, an integer (Macaulay2Doc), conductor
      * numgaps, an integer (Macaulay2Doc), number of gaps
  * Outputs:
      * LL, a list (Macaulay2Doc), of sequences of generators of
        semigroups with the given invariants

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

If S is the Weierstrass semigroup of a point p on a Riemann surface X -- that
is, the semigroup of pole orders of rational functions at p, then the genus of
X is the number of gaps of S and there is a differential on X vanishing to
order exactly d iff d+1 is a gap.

+--------------------------------------------------------+
|i1 : findSemigroups(5,14,8)                             |
|                                                        |
|o1 = {{5, 7, 11}, {5, 7, 9}, {5, 6, 14}, {5, 9, 11, 12}}|
|                                                        |
|o1 : List                                               |
+--------------------------------------------------------+
|i2 : G = gaps {5,7,9}                                   |
|                                                        |
|o2 = {1, 2, 3, 4, 6, 8, 11, 13}                         |
|                                                        |
|o2 : List                                               |
+--------------------------------------------------------+
|i3 : #G                                                 |
|                                                        |
|o3 = 8                                                  |
+--------------------------------------------------------+

The number of vanishing orders of quadratic differentials on is h^0(2K) =
(4g-4) - g + 1 = 3g-3, so if s is the semigroup of pole orders of a point on X
and G is the set of gaps, then there can be at most 3g-3 distinct sums of pairs
of elements of G. This gives a nontrivial obstruction to the smoothability of
the semigroup ring of S and thus to the existence of a Weierstrass point with
semigroup s.

The following example, discovered by Ragnar Buchweitz (Thesis) was the first
known example of a non-Weierstrass semigroup.

+------------------------------------------------------------+
|i4 : G=toList(1..12)|{19,21,24,25}                          |
|                                                            |
|o4 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 19, 21, 24, 25}|
|                                                            |
|o4 : List                                                   |
+------------------------------------------------------------+

The function isGapSequence, returns generators for the
semigroups with given gap sequence or returns false if there is no such
semigroup

+-----------------------------------------+
|i5 : L=isGapSequence G                   |
|                                         |
|o5 = {13, 14, 15, 16, 17, 18, 20, 22, 23}|
|                                         |
|o5 : List                                |
+-----------------------------------------+
|i6 : g = #G                              |
|                                         |
|o6 = 16                                  |
+-----------------------------------------+
|i7 : 3*g-3                               |
|                                         |
|o7 = 45                                  |
+-----------------------------------------+
|i8 : #sums(G,G)                          |
|                                         |
|o8 = 46                                  |
+-----------------------------------------+

See also
========

  * isGapSequence -- test whether a list of integers can
    be the list of gaps of a semigroup
  * gaps -- The gap sequence of a semigroup

Ways to use findSemigroups:
===========================

  * "findSemigroups(ZZ)"
  * "findSemigroups(ZZ,ZZ)"
  * "findSemigroups(ZZ,ZZ,ZZ)"

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

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

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

The source of this document is in NumericalSemigroups.m2:1848:0.

fractionalIdeal -- turn a fractional ideal into a proper ideal
**************************************************************

  * Usage:
        I = fractionalIdeal(sgrp,mons)
        L = fractionalIdeal(sgrp,mons)
  * Inputs:
      * sgrp, a list (Macaulay2Doc), of ZZ, representing a
        semigroup
      * mons, a list (Macaulay2Doc), of ZZ representing the degrees
        of generators of a fractional ideal
  * Optional inputs (Macaulay2Doc),:
      * Ideal
  * Outputs:
      * I, an ideal (Macaulay2Doc), ideal in semigroupRing sgrp

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

sgrp is a list of ZZ_{>0}, interpreted as generators of a semigroup; mons is a
list of ZZ interpreted as generating a module in the quotient field of sgrp
with the option "Ideal" => false we get a list of integers belonging to the
semigroup, otherwise a proper ideal of the semigroup ring. of the ring
semigroupRing sgrp. In both cases, the program chooses the generators of least
possible degree.

This is perhaps most useful when regarding a blowup or iterated blowup as a
module over the original ring. For example, the sequence of blowups of the
semigroupRing {5,9} is given by semigroupRing{4,5}, semigroupRing{1}:

+--------------------------------------------------------------------+
|i1 : sgrp = {5,9}                                                   |
|                                                                    |
|o1 = {5, 9}                                                         |
|                                                                    |
|o1 : List                                                           |
+--------------------------------------------------------------------+
|i2 : sgrp1 = {4,5}                                                  |
|                                                                    |
|o2 = {4, 5}                                                         |
|                                                                    |
|o2 : List                                                           |
+--------------------------------------------------------------------+
|i3 : sgrp2 = {1}                                                    |
|                                                                    |
|o3 = {1}                                                            |
|                                                                    |
|o3 : List                                                           |
+--------------------------------------------------------------------+
|i4 : fractionalIdeal(sgrp, sgrp1, "Ideal"=>false)                   |
|                                                                    |
|o4 = {9, 10, 14, 15, 18, 19, 20, 23, 24, 25, 27, 28, 29, 30, 32, 33}|
|                                                                    |
|o4 : List                                                           |
+--------------------------------------------------------------------+
|i5 : fractionalIdeal(sgrp, sgrp2)                                   |
|                                                                    |
|o5 = ideal x                                                        |
|            0                                                       |
|                                                                    |
|                ZZ                                                  |
|              -----[x , x ]                                         |
|              10007  0   4                                          |
|o5 : Ideal of -------------                                         |
|                  9    5                                            |
|                 x  - x                                             |
|                  0    4                                            |
+--------------------------------------------------------------------+

See also
========

  * semigroupRing -- forms the semigroup ring over
    "BaseField"

Ways to use fractionalIdeal:
============================

  * "fractionalIdeal(List,List)"
  * fractionalIdeal(Ring,List) (missing documentation)

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

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

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

The source of this document is in NumericalSemigroups.m2:2739:0.

gaps -- The gap sequence of a semigroup
***************************************

  * Usage:
        G = gaps L
  * Inputs:
      * L, a list (Macaulay2Doc), of semigroup generators
  * Outputs:
      * G, a list (Macaulay2Doc), the gap sequence

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

If semigroup L is the Weierstrass semigroup of a Riemann surface C at a point,
then #gaps L = g = h^0(omega_C), the genus of C. Furthermore, the number of
elements of sums(n, G) is bounded by the dimension of h^0(omega_C^n) =
n*(2g-2)-g+1 = (2n-1)g-2n+1. However, for an arbitrary semigroup the number
#sums(n,G) may be larger; the first such example was found by Ragnar Buchweitz,
and is given below.

The function isGapSequence returns either false or generators of the semigroup
of which the sequence is the gap sequence.

+------------------------------------------------------------+
|i1 : G=toList(1..12)|{19,21,24,25}                          |
|                                                            |
|o1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 19, 21, 24, 25}|
|                                                            |
|o1 : List                                                   |
+------------------------------------------------------------+
|i2 : g = #G                                                 |
|                                                            |
|o2 = 16                                                     |
+------------------------------------------------------------+
|i3 : for n from 1 to 3 list (#sums(n,G),n*(2*g-2) - g + 1)  |
|                                                            |
|o3 = {(16, 15), (46, 45), (73, 75)}                         |
|                                                            |
|o3 : List                                                   |
+------------------------------------------------------------+
|i4 : L=isGapSequence G                                      |
|                                                            |
|o4 = {13, 14, 15, 16, 17, 18, 20, 22, 23}                   |
|                                                            |
|o4 : List                                                   |
+------------------------------------------------------------+
|i5 : G ==gaps L                                             |
|                                                            |
|o5 = true                                                   |
+------------------------------------------------------------+

Caveat
======

See also
========

  * isGapSequence -- test whether a list of integers can
    be the list of gaps of a semigroup
  * findSemigroups -- Find all semigroups with a given
    number of gaps, multiplicity and/or conductor

Ways to use gaps:
=================

  * "gaps(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:1992:0.

genus(List) -- Compute the number of gaps (genus) of a semigroup
****************************************************************

  * Function: genus (Macaulay2Doc),
  * Usage:
        g = genus L
  * Inputs:
      * L, a list (Macaulay2Doc),
  * Outputs:
      * g, an integer (Macaulay2Doc),

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

The gaps S is the list of the finitely many positive integers not in S

+-----------------------------------------------------+
|i1 : genus {4,7}                                     |
|                                                     |
|o1 = 9                                               |
+-----------------------------------------------------+
|i2 : G = gaps {4,7}                                  |
|                                                     |
|o2 = {1, 2, 3, 5, 6, 9, 10, 13, 17}                  |
|                                                     |
|o2 : List                                            |
+-----------------------------------------------------+
|i3 : #G                                              |
|                                                     |
|o3 = 9                                               |
+-----------------------------------------------------+
|i4 : S = semigroup{4,7}                              |
|                                                     |
|o4 = {0, 4, 7, 8, 11, 12, 14, 15, 16, 18, 19, 20, 21}|
|                                                     |
|o4 : List                                            |
+-----------------------------------------------------+
|i5 : set G + set S  == set(0..21)                    |
|                                                     |
|o5 = true                                            |
+-----------------------------------------------------+

See also
========

  * gaps -- The gap sequence of a semigroup
  * semigroup -- Compute the semigroup generated by a list of
    positive integers

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

  * genus(List) -- Compute the number of gaps (genus)
    of a semigroup
-------------------------------------------------------------------------------

The source of this document is in NumericalSemigroups.m2:1753:0.

infinitelyNearModules -- The sequence of blowups of a semigroup ring as fractional ideals
*****************************************************************************************

  * Usage:
        MM = infinitelyNearModules R
  * Inputs:
      * R, a ring (Macaulay2Doc), a semigroup ring, as produced by
        semigroupRing,
  * Outputs:
      * MM, a list (Macaulay2Doc), of R-modules, one for each
        semigroup in infinitelyNearSemigroups,
        applied to the underlying semigroup of R

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

Let R be the semigroup ring of a numerical semigroup S, and let S = S_0
\subseteq S_1 \subseteq \dots \subseteq S_r = N be the sequence of blowups of S
returned by infinitelyNearSemigroups. Each S_i
is a finitely generated R-submodule of the fraction field frac R: namely, the
R-module generated (in frac R) by the monomials t^s for s in a generating set
of S_i.

The function infinitelyNearModules returns the sequence of these R-modules. The
first entry is (an R-module isomorphic to) R itself.

+--------------------------------------------------------------------+
|i1 : R = semigroupRing {3,5,7}                                      |
|                                                                    |
|o1 = R                                                              |
|                                                                    |
|o1 : QuotientRing                                                   |
+--------------------------------------------------------------------+
|i2 : MM = infinitelyNearModules R                                   |
|                                                                    |
|o2 = {image | x_0 |, image | x_0 x_2 x_1 |, image | x_2 x_0^2 x_1 |}|
|                                                                    |
|o2 : List                                                           |
+--------------------------------------------------------------------+
|i3 : MM/numgens                                                     |
|                                                                    |
|o3 = {1, 3, 3}                                                      |
|                                                                    |
|o3 : List                                                           |
+--------------------------------------------------------------------+

Caveat
======

The construction goes through fractionalIdeal, which
clears denominators by multiplying through by a high enough power of the
multiplicity element so as to produce an honest ideal of R. As a result, the
modules returned by infinitelyNearModules are isomorphic to the actual
infinitely near modules sitting inside frac R, but their internal grading is
shifted by the chosen denominator. In other words, what these modules represent
is correct \emph{up to a degree shift}; if you need the natural grading
inherited from frac R, you must compensate for that shift by hand.

See also
========

  * infinitelyNearSemigroups -- The sequence
    of blowup semigroups of a numerical semigroup
  * fractionalIdeal -- turn a fractional ideal into a
    proper ideal
  * semigroupRing -- forms the semigroup ring over
    "BaseField"
  * isArf -- test whether a numerical semigroup is Arf

Ways to use infinitelyNearModules:
==================================

  * "infinitelyNearModules(Ring)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2842:0.

infinitelyNearSemigroups -- The sequence of blowup semigroups of a numerical semigroup
**************************************************************************************

  * Usage:
        N = infinitelyNearSemigroups L
  * Inputs:
      * L, a list (Macaulay2Doc), of positive integers, generating
        a numerical semigroup S
  * Outputs:
      * N, a list (Macaulay2Doc), of lists of minimal generators of
        the successive blowups of S, starting with S itself and ending with the
        trivial semigroup {1}

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

Let R be the semigroup ring of a numerical semigroup S with multiplicity m, and
let \mathfrak{m} = (t^s : s \in S, s > 0) be its maximal ideal. The
\emph{blowup} of R at \mathfrak{m} is the subring R[\mathfrak{m}/t^m] =
R[t^{s-m} : s \in S, s > 0] of the fraction field frac R; this blowup is again
a semigroup ring, namely the semigroup ring of the \emph{blowup semigroup} S',
generated by m together with s-m for every nonzero s in S.

Iterating this construction produces an ascending sequence of semigroup rings R
= R_0 \subseteq R_1 \subseteq R_2 \subseteq \dots, each obtained from the
previous by blowing up at its maximal ideal, and a corresponding ascending
sequence of semigroups S = S_0 \subseteq S_1 \subseteq S_2 \subseteq \dots. The
sequence stabilizes after finitely many steps when S_r becomes the trivial
semigroup N (generated by 1), at which point R_r is the integral closure of R
in frac R.

The function infinitelyNearSemigroups returns this sequence as a list of
minimal generating sets, beginning with mingens S and ending with {1}.

+-------------------------------------+
|i1 : infinitelyNearSemigroups {3,5,7}|
|                                     |
|o1 = {{3, 5, 7}, {2, 3}, {1}}        |
|                                     |
|o1 : List                            |
+-------------------------------------+
|i2 : infinitelyNearSemigroups {5,8}  |
|                                     |
|o2 = {{5, 8}, {3, 5}, {2, 3}, {1}}   |
|                                     |
|o2 : List                            |
+-------------------------------------+

For an Arf semigroup, every blowup in the sequence has minimal multiplicity
(see isArf), and the sequence of multiplicities determines the
Arf closure (see arfClosure):

+-----------------------------------------------+
|i3 : N = infinitelyNearSemigroups {5,8,9,11,12}|
|                                               |
|o3 = {{5, 8, 9, 11, 12}, {3, 4, 5}, {1}}       |
|                                               |
|o3 : List                                      |
+-----------------------------------------------+
|i4 : apply(N, min)                             |
|                                               |
|o4 = {5, 3, 1}                                 |
|                                               |
|o4 : List                                      |
+-----------------------------------------------+

See also
========

  * infinitelyNearModules -- The sequence of
    blowups of a semigroup ring as fractional ideals
  * isArf -- test whether a numerical semigroup is Arf
  * arfClosure -- Compute the Arf closure of a numerical
    semigroup
  * semigroup -- Compute the semigroup generated by a list of
    positive integers

Ways to use infinitelyNearSemigroups:
=====================================

  * "infinitelyNearSemigroups(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2793:0.

isArf -- test whether a numerical semigroup is Arf
**************************************************

  * Usage:
        t = isArf L
  * Inputs:
      * L, a list (Macaulay2Doc), of positive integers, generating
        a numerical semigroup S
  * Outputs:
      * t, a Boolean value (Macaulay2Doc), true if S is Arf

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

A numerical semigroup S is \emph{Arf} if for every triple of elements x \geq y
\geq z in S, the element x+y-z also lies in S. Equivalently, S is Arf if and
only if every semigroup in the sequence of blowups (the infinitely near
semigroups of S) has minimal multiplicity, that is, has multiplicity equal to
its embedding dimension. The latter characterization is what isArf actually
checks.

The input L is interpreted as a generating set of a semigroup; it need not be
the minimal generating set, and isArf works with the semigroup it generates.

+------------------------+
|i1 : isArf {5,8,9,11,12}|
|                        |
|o1 = true               |
+------------------------+
|i2 : isArf {5,8,9,12}   |
|                        |
|o2 = false              |
+------------------------+
|i3 : isArf {3,5,7}      |
|                        |
|o3 = true               |
+------------------------+

The trivial semigroup (all of N) is Arf:

+--------------+
|i4 : isArf {1}|
|              |
|o4 = true     |
+--------------+

See also
========

  * arfClosure -- Compute the Arf closure of a numerical
    semigroup
  * arfIndex -- Computes the Arf index of a numerical
    semigroup
  * infinitelyNearSemigroups -- The sequence
    of blowup semigroups of a numerical semigroup
  * semigroup -- Compute the semigroup generated by a list of
    positive integers

Ways to use isArf:
==================

  * "isArf(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:3076:0.

isGapSequence -- test whether a list of integers can be the list of gaps of a semigroup
***************************************************************************************

  * Usage:
        L = isGapSequence G
  * Inputs:
      * G, a list (Macaulay2Doc),
  * Outputs:
      * L, a Boolean value (Macaulay2Doc),
      * L, a list (Macaulay2Doc),

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

The function isGapSequence returns either false or a list of generators of the
semigroup of which the sequence is the gap sequence. Note that the gap sequence
of a semigroup of multiplicity m begins with 1..m-1, and ends with the
Frobenius number c-1, where c is the conductor.

+-------------------------------+
|i1 : G = {1,2,3,4,6,9,11,14}   |
|                               |
|o1 = {1, 2, 3, 4, 6, 9, 11, 14}|
|                               |
|o1 : List                      |
+-------------------------------+
|i2 : isGapSequence G           |
|                               |
|o2 = false                     |
+-------------------------------+
|i3 : G = {1,2,3,4,6,9,11}      |
|                               |
|o3 = {1, 2, 3, 4, 6, 9, 11}    |
|                               |
|o3 : List                      |
+-------------------------------+
|i4 : S = isGapSequence G       |
|                               |
|o4 = {5, 7, 8}                 |
|                               |
|o4 : List                      |
+-------------------------------+
|i5 : G == gaps S               |
|                               |
|o5 = true                      |
+-------------------------------+

See also
========

  * gaps -- The gap sequence of a semigroup

Ways to use isGapSequence:
==========================

  * "isGapSequence(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2472:0.

isKnownExample -- Is L a known Weierstrass semigroup?
*****************************************************

  * Usage:
        b = isKnownExample L
  * Inputs:
      * L, a list (Macaulay2Doc), generators of the semigroup
  * Outputs:
      * b, a Boolean value (Macaulay2Doc), true if L is a known
        example of a Weierstrass semigroup

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

Certain semigroups are known to be Weierstrass. For example L has 2  or 3
generators only, by work of Pinkham and Sally. Eisenbud-Harris proved that
semigroups L of weight,(L)<genus (Macaulay2Doc),(L)
are smoothable, and Pflueger extended this to show that semigroups L of
ewt,(L)<genus (Macaulay2Doc),(L) are smoothable. Komeda proved
that anysemigroup with min L < 6 is Weierstrass. In "A minimal non-Weierstrass
Semigroup" by Eisenbud and Schreyer it is shown that all semigroups of genus
<13 are Weierstrass but that the semigroup {6,9,13,16}, of genus 13, is not.

+--------------------------------------------------------------------+
|i1 : L={7,12,13}                                                    |
|                                                                    |
|o1 = {7, 12, 13}                                                    |
|                                                                    |
|o1 : List                                                           |
+--------------------------------------------------------------------+
|i2 : isKnownExample L                                               |
|                                                                    |
|o2 = true                                                           |
+--------------------------------------------------------------------+
|i3 : L={7,8,9,11,13}                                                |
|                                                                    |
|o3 = {7, 8, 9, 11, 13}                                              |
|                                                                    |
|o3 : List                                                           |
+--------------------------------------------------------------------+
|i4 : ewt L, genus L                                                 |
|                                                                    |
|o4 = (7, 8)                                                         |
|                                                                    |
|o4 : Sequence                                                       |
+--------------------------------------------------------------------+
|i5 : isKnownExample L                                               |
|                                                                    |
|o5 = true                                                           |
+--------------------------------------------------------------------+
|i6 : LL=findSemigroups(9,10);#LL                                    |
|                                                                    |
|o7 = 29                                                             |
+--------------------------------------------------------------------+
|i8 : LL = flatten apply (11, g->findSemigroups g);#LL               |
|                                                                    |
|o9 = 478                                                            |
+--------------------------------------------------------------------+
|i10 : Lknown = select(LL, s -> isKnownExample s);#Lknown            |
|                                                                    |
|o11 = 362                                                           |
+--------------------------------------------------------------------+
|i12 : tally apply(Lknown, L->(                                      |
|           if #L <= 3 then "Hilbert-Burch" else                     |
|           if #L == 4 and type L == 1 then "Buchsbaum-Eisenbud" else|
|           if weight L < genus L then "Eisenbud-Harris" else        |
|           if ewt L < genus L then "Plueger" else                   |
|           if min L <6 then "Komeda-Low Multiplicity"))             |
|                                                                    |
|o12 = Tally{Buchsbaum-Eisenbud => 9      }                          |
|            Eisenbud-Harris => 198                                  |
|            Hilbert-Burch => 82                                     |
|            Komeda-Low Multiplicity => 21                           |
|            null => 2                                               |
|            Plueger => 50                                           |
|                                                                    |
|o12 : Tally                                                         |
+--------------------------------------------------------------------+

See also
========

  * findSemigroups -- Find all semigroups with a given
    number of gaps, multiplicity and/or conductor

Ways to use isKnownExample:
===========================

  * "isKnownExample(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:3204:0.

isMinimalMultiplicity
*********************

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

The object isMinimalMultiplicity (missing documentation) is a function closure (Macaulay2Doc).

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

The source of this document is in currentString:1:385.

isSymmetric -- test whether the semigroup generated by L is symmetric
*********************************************************************

  * Usage:
        t = isSymmetric L
  * Inputs:
      * L, a list (Macaulay2Doc),
  * Outputs:
      * t, a Boolean value (Macaulay2Doc),

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

Suppose that c = conductor S, so that c-1 is the last gap. If x in S, and x<c
then c-1-x must be a gap, so the number g of gaps <c is at least the number of
semigroup elements e < c. The semigroup is called \emph{symmetric} if g = e, or
equivalently if the semigroup ring is Gorenstein. Thus for example any
semigroup generated by just 2 elements is symmetric.

+-----------------------+
|i1 : isSymmetric{3,4,5}|
|                       |
|o1 = false             |
+-----------------------+
|i2 : isSymmetric{3, 5} |
|                       |
|o2 = true              |
+-----------------------+
|i3 : gaps {3,5}        |
|                       |
|o3 = {1, 2, 4, 7}      |
|                       |
|o3 : List              |
+-----------------------+
|i4 : mu {3,5}          |
|                       |
|o4 = {3, 1}            |
|                       |
|o4 : List              |
+-----------------------+

See also
========

  * apery -- Compute the apery set, multiplicity and conductor
  * semigroup -- Compute the semigroup generated by a list of
    positive integers
  * gaps -- The gap sequence of a semigroup
  * mu -- Compute the point representing a semigroup in the Kunz
    cone

Ways to use isSymmetric:
========================

  * "isSymmetric(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:1694:0.

kunzMatrix -- determine the set of facet equations satisfied by a semigroup
***************************************************************************

  * Usage:
        M = kunzMatrix L
        M = kunzMatrix H
  * Inputs:
      * L, a list (Macaulay2Doc),
      * H, a hash table (Macaulay2Doc), such as produced by
        apery
  * Outputs:
      * M, a matrix (Macaulay2Doc), of 0s and 1s

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

The equations defining the facets of the homogeneous Kunz cone P_m^* are
E_(i,j): a_i+a_j = a_(i+j mod m) for those (i,j) such that  i+j != 0 mod m.

Given a list L generating the semigroups s with Apery set a = {a_1..a_i}, M =
kunzMatrix L has a 1 in the (i,j) position if and only if a satisfies equation
E_(i,j). Thus M = kunzMatrix L is a symmetric matrix of 0s and 1s that
determines the face of the kunz cone P on which it lies.

+-----------------------+
|i1 : L = {4,7}         |
|                       |
|o1 = {4, 7}            |
|                       |
|o1 : List              |
+-----------------------+
|i2 : aperySet L        |
|                       |
|o2 = {21, 14, 7}       |
|                       |
|o2 : List              |
+-----------------------+
|i3 : kunzMatrix L      |
|                       |
|o3 = | 0 0 0 |         |
|     | 0 0 1 |         |
|     | 0 1 1 |         |
|                       |
|              3       3|
|o3 : Matrix ZZ  <-- ZZ |
+-----------------------+

See also
========

  * aperySet -- Compute the apery set of a numerical semigroup

Ways to use kunzMatrix:
=======================

  * "kunzMatrix(HashTable)"
  * "kunzMatrix(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:1789:0.

kunzPoset
*********

Ways to use kunzPoset:
======================

  * kunzPoset(List) (missing documentation)

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

The object kunzPoset (missing documentation) is a method function with options (Macaulay2Doc).

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

The source of this document is in currentString:1:385.

kunzRing -- artinian reduction of a semigroup ring
**************************************************

  * Usage:
        R = kunzRing L
  * Inputs:
      * L, a list (Macaulay2Doc), of ZZ
  * Optional inputs (Macaulay2Doc),:
      * BaseField
      * MinimalGenerators
      * VariableName
  * Outputs:
      * R, a ring (Macaulay2Doc), semigroup ring mod multiplicity
        element

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

Returns the semigroup ring modulo the element of least degree. The kunzRing
shares many properties with the semigroup ring; see semigroupRing,
for explanations of the options.

+-----------------------------------------------------------------------------+
|i1 : semigroupRing {3,5}                                                     |
|                                                                             |
|       ZZ                                                                    |
|     -----[x , x ]                                                           |
|     10007  0   2                                                            |
|o1 = -------------                                                           |
|         5    3                                                              |
|        x  - x                                                               |
|         0    2                                                              |
|                                                                             |
|o1 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i2 : kunzRing {3,5}                                                          |
|                                                                             |
|       ZZ                                                                    |
|     -----[x ]                                                               |
|     10007  2                                                                |
|o2 = ---------                                                               |
|          3                                                                  |
|         x                                                                   |
|          2                                                                  |
|                                                                             |
|o2 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i3 : kunzRing ({3,5,6}, "BaseField" => ZZ/32003, "VariableName" => y,        |
|                                                                             |
|       ZZ                                                                    |
|     -----[y , y   ]                                                         |
|     32003  2   1,0                                                          |
|o3 = ---------------                                                         |
|                3                                                            |
|        (y   , y )                                                           |
|          1,0   2                                                            |
|                                                                             |
|o3 : QuotientRing                                                            |
|-----------------------------------------------------------------------------|
|"MinimalGenerators" => false)                                                |
+-----------------------------------------------------------------------------+

The Kunz ring is an invariant of the face of the Kunz cone which contains L.
For all L in the interior of the corresponding face have isomorphic Kunz rings.

+--------------------------------------------+
|i4 : L=semigroup {4,6,7}                    |
|                                            |
|o4 = {0, 4, 6, 7, 8, 10, 11, 12, 13}        |
|                                            |
|o4 : List                                   |
+--------------------------------------------+
|i5 : (H,M)=allSemigroups {4,6,7}            |
|                                            |
|o5 = (| 4  0 4 |, | 13 6  7 |)              |
|      | 8  4 4 |  | 17 10 7 |               |
|      | 12 8 4 |  | 21 14 7 |               |
|                                            |
|o5 : Sequence                               |
+--------------------------------------------+
|i6 : L1={4}|flatten (entries(M^{2}+3*H^{1}))|
|                                            |
|o6 = {4, 45, 26, 19}                        |
|                                            |
|o6 : List                                   |
+--------------------------------------------+
|i7 : #gaps L1, socle L1                     |
|                                            |
|o7 = (21, {45})                             |
|                                            |
|o7 : Sequence                               |
+--------------------------------------------+
|i8 : kunzRing {4,6,7}                       |
|                                            |
|       ZZ                                   |
|     -----[x ..x ]                          |
|     10007  2   3                           |
|o8 = -------------                          |
|          2   2                             |
|        (x , x )                            |
|          2   3                             |
|                                            |
|o8 : QuotientRing                           |
+--------------------------------------------+
|i9 : kunzRing L1                            |
|                                            |
|       ZZ                                   |
|     -----[x , x ]                          |
|     10007  3   2                           |
|o9 = -------------                          |
|          2   2                             |
|        (x , x )                            |
|          3   2                             |
|                                            |
|o9 : QuotientRing                           |
+--------------------------------------------+

Ways to use kunzRing:
=====================

  * "kunzRing(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2698:0.

mingens(List) -- Find a mininmal set of semigroup generators
************************************************************

  * Function: mingens (Macaulay2Doc),
  * Usage:
        L' = mingens L
  * Inputs:
      * L, a list (Macaulay2Doc), generators of a semigroup
  * Optional inputs (Macaulay2Doc),:
      * Strategy (Macaulay2Doc), => ..., default value null,
  * Outputs:
      * L', a list (Macaulay2Doc), minimal generators of the same
        semigroup

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

The set of generators is minimal if it has empty intersection with the set of
sums of non-zero generators.

It would have been nicer to overload mingens (Macaulay2Doc), to
accept a list.

+------------------------------------+
|i1 : L = semigroup {3,7}            |
|                                    |
|o1 = {0, 3, 6, 7, 9, 10, 12, 13, 14}|
|                                    |
|o1 : List                           |
+------------------------------------+
|i2 : mingens L                      |
|                                    |
|o2 = {3, 7}                         |
|                                    |
|o2 : List                           |
+------------------------------------+

See also
========

  * semigroup -- Compute the semigroup generated by a list of
    positive integers

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

  * mingens(List) -- Find a mininmal set of semigroup
    generators
-------------------------------------------------------------------------------

The source of this document is in NumericalSemigroups.m2:1893:0.

mu -- Compute the point representing a semigroup in the Kunz cone
*****************************************************************

  * Usage:
        K = mu L
        K = mu H
  * Inputs:
      * L, a list (Macaulay2Doc),
      * H, a hash table (Macaulay2Doc), produced by apery L
  * Outputs:
      * K, a list (Macaulay2Doc),

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

The apery set A of a semigroup s with multiplicity m has the form A_i = i+
mu_i*m. The point with coordinates mu(L) represents semigroup L in the Kunz
cone P_m.

+-----------------------------------+
|i1 : m = 3                         |
|                                   |
|o1 = 3                             |
+-----------------------------------+
|i2 : L = {3,7}                     |
|                                   |
|o2 = {3, 7}                        |
|                                   |
|o2 : List                          |
+-----------------------------------+
|i3 : a = aperySet L                |
|                                   |
|o3 = {7, 14}                       |
|                                   |
|o3 : List                          |
+-----------------------------------+
|i4 : b = mu L                      |
|                                   |
|o4 = {2, 4}                        |
|                                   |
|o4 : List                          |
+-----------------------------------+
|i5 : apply (#b, i -> (i+1)+(b_i*m))|
|                                   |
|o5 = {7, 14}                       |
|                                   |
|o5 : List                          |
+-----------------------------------+

See also
========

  * aperySet -- Compute the apery set of a numerical semigroup

Ways to use mu:
===============

  * "mu(HashTable)"
  * "mu(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:1727:0.

muFacetRays
***********

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

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

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

The source of this document is in currentString:1:385.

randomSemigroup -- Random semingroup on a given face of the Kunz cone
*********************************************************************

  * Usage:
        L' = randomSemigroup(L,b)
        L' = randomSemigroup(m,b)
  * Inputs:
      * L, a list (Macaulay2Doc), of generators of a semigroup
      * b, an integer (Macaulay2Doc), bound for the random numbers to
        be used
      * m, an integer (Macaulay2Doc), multiplicity
  * Outputs:
      * L', a list (Macaulay2Doc), Apery set of a semigroup

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

Find a random semigroup within a bounded portiion of the open face of the Kunz
cone containing L (or of the interior of the Kunz cone, if a multiplicity m is
specified instead of a list.

After (H,M) = allSemigroups L, the Apery set of L' is obtained by prepending m
to the sum of a random linear combination of the rows of H (using random
integers 0..b-1) and a random row of M.

Since L' is on the same face as L, it shares many homological properties, such
as the total betti numbers of the resolution of its semigroup ideal.

+-----------------------------------------+
|i1 : L = {6,9,13,16}                     |
|                                         |
|o1 = {6, 9, 13, 16}                      |
|                                         |
|o1 : List                                |
+-----------------------------------------+
|i2 : L' = randomSemigroup({6,9,13,16}, 5)|
|                                         |
|o2 = {6, 121, 242, 255, 226, 347}        |
|                                         |
|o2 : List                                |
+-----------------------------------------+
|i3 : mingens L'                          |
|                                         |
|o3 = {6, 121, 226, 255}                  |
|                                         |
|o3 : List                                |
+-----------------------------------------+
|i4 : F = res semigroupIdeal L;           |
+-----------------------------------------+
|i5 : F'= res semigroupIdeal L';          |
+-----------------------------------------+
|i6 : apply(1+length F, i-> rank F_i)     |
|                                         |
|o6 = {1, 6, 8, 3}                        |
|                                         |
|o6 : List                                |
+-----------------------------------------+
|i7 : apply(1+length F', i-> rank F'_i)   |
|                                         |
|o7 = {1, 6, 8, 3}                        |
|                                         |
|o7 : List                                |
+-----------------------------------------+

Caveat
======

The list L' is an Apery set, so may not be a minimal set of semigroup
generators.

See also
========

  * allSemigroups -- Compute the Hilbert basis and module
    generators of a cone of semigroups
  * mingens (Macaulay2Doc) -- minimal generator matrix

Ways to use randomSemigroup:
============================

  * "randomSemigroup(List,ZZ)"
  * "randomSemigroup(ZZ,ZZ)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2299:0.

reduceByList
************

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

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

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

The source of this document is in currentString:1:385.

semigroup -- Compute the semigroup generated by a list of positive integers
***************************************************************************

  * Usage:
        L = semigroup L0
  * Inputs:
      * L0, a list (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * UpperBound
  * Outputs:
      * L, a list (Macaulay2Doc),

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

The semigroup is actually computed by the function apery, and semigroup L =
(apery L)#"semigroup"

+----------------------------------------+
|i1 : semigroup {5,4}                    |
|                                        |
|o1 = {0, 4, 5, 8, 9, 10, 12, 13, 14, 15}|
|                                        |
|o1 : List                               |
+----------------------------------------+

See also
========

  * apery -- Compute the apery set, multiplicity and conductor

Ways to use semigroup:
======================

  * "semigroup(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:1663:0.

semigroupFromMu -- Inverse of the function mu
*********************************************

  * Usage:
        L = semigroupFromMu mm
  * Inputs:
      * mm, a list (Macaulay2Doc), of m-1 positive integers
  * Outputs:
      * L, a list (Macaulay2Doc), minimal generators of a semigroup

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

if A = {a_1..a_(m-1)} is the Apery set of a semigroup L, then mu L is the
sequence of numbers (a_i -i)/m. semigroupFromMu is the inverse operation.

+-----------------------+
|i1 : L = {6,9,13,16}   |
|                       |
|o1 = {6, 9, 13, 16}    |
|                       |
|o1 : List              |
+-----------------------+
|i2 : mm = mu L         |
|                       |
|o2 = {2, 4, 1, 2, 4}   |
|                       |
|o2 : List              |
+-----------------------+
|i3 : semigroupFromMu mm|
|                       |
|o3 = {6, 9, 13, 16}    |
|                       |
|o3 : List              |
+-----------------------+

See also
========

  * mu -- Compute the point representing a semigroup in the Kunz
    cone

Ways to use semigroupFromMu:
============================

  * "semigroupFromMu(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:3004:0.

semigroupIdeal -- The ideal defining the semigroup ring
*******************************************************

  * Usage:
        I =  semigroupIdeal L
  * Inputs:
      * L, a list (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * BaseField
      * MinimalGenerators
      * VariableName
  * Outputs:
      * I, an ideal (Macaulay2Doc),

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

The semigroup ideal of the semigroup generated by L is the kernel of the map
kk[x_0..x_(#L)] -> kk[t] sending x_i to t^(L_i), where kk is the specified
BaseField, defaulting to ZZ/101 and x is the specified VariableName. If the
option "MinimalGenerators" is set to true, the default, then the program first
computes a minimal set of generators from L; if it is set to false, the program
uses L itself.

+-----------------------------------------------------------+
|i1 : semigroupIdeal {5,7}                                  |
|                                                           |
|            7    5                                         |
|o1 = ideal(x  - x )                                        |
|            0    2                                         |
|                                                           |
|                ZZ                                         |
|o1 : Ideal of -----[x , x ]                                |
|              10007  0   2                                 |
+-----------------------------------------------------------+
|i2 : semigroupIdeal({5,7,10}, "MinimalGenerators" => false)|
|                                                           |
|             2            5        3                       |
|o2 = ideal (x    - x   , x  - x   x   )                    |
|             0,0    1,0   2    0,0 1,0                     |
|                                                           |
|                ZZ                                         |
|o2 : Ideal of -----[x   , x , x   ]                        |
|              10007  0,0   2   1,0                         |
+-----------------------------------------------------------+

See also
========

  * mingens (Macaulay2Doc) -- minimal generator matrix
  * semigroupRing -- forms the semigroup ring over
    "BaseField"

Ways to use semigroupIdeal:
===========================

  * "semigroupIdeal(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2589:0.

semigroupRing -- forms the semigroup ring over "BaseField"
**********************************************************

  * Usage:
        A = semigroupRing L
  * Inputs:
      * L, a list (Macaulay2Doc), of semigroup generators
  * Optional inputs (Macaulay2Doc),:
      * BaseField
      * MinimalGenerators
      * VariableName
  * Outputs:
      * A, a ring (Macaulay2Doc), algebra over "BaseField"

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

If the basering is kk, the semigroup ring is A = kk[x^S] where x^S denotes the
set of monomials in variables x_i with exponent vectors in S, and kk is the
field that is the value of the option "BaseField" (ZZ/101 by default).

If m is the  multiplicity of S, the semigroup ring depends up to an isomorphism
that may change the degrees, only on the face of the Kunz cone in which the
semigroup lies.

Semigroup rings are interesting as examples, and arise as Weierstrass
semigroups of points on algebraic curves: if p in C is such a point, then the
Weierstrass semigroup of C at p is the set of pole orders of rational functions
with poles only at p, and the semigroupRing is the associated graded ring of
the filtered ring $\bigcup_{n >= 0} H^0(O_C(np))$. For non-Weierstrass points
the semigroup is 0,g+1,g+2.., and there are finitely many "Weierstrass" point p
whose semigroup has weight >=2.

For example if C is a smooth plane quartic, then at each ordinary flex point,
the semigroup is 0,3,5,6,7,..

+---------------------------------------------------------------------------+
|i1 : semigroupRing {3,4,5}                                                 |
|                                                                           |
|                 ZZ                                                        |
|               -----[x ..x ]                                               |
|               10007  0   2                                                |
|o1 = ---------------------------------                                     |
|       2          3          2      2                                      |
|     (x  - x x , x  - x x , x x  - x )                                     |
|       1    0 2   0    1 2   0 1    2                                      |
|                                                                           |
|o1 : QuotientRing                                                          |
+---------------------------------------------------------------------------+
|i2 : weight {4,5,6,7}, gaps {4,5,6,7}                                      |
|                                                                           |
|o2 = (0, {1, 2, 3})                                                        |
|                                                                           |
|o2 : Sequence                                                              |
+---------------------------------------------------------------------------+
|i3 : semigroupRing {4,5,6,7}                                               |
|                                                                           |
|                                    ZZ                                     |
|                                  -----[x ..x ]                            |
|                                  10007  0   3                             |
|o3 = ----------------------------------------------------------------------|
|       2                       2          3          2            2      2 |
|     (x  - x x , x x  - x x , x  - x x , x  - x x , x x  - x x , x x  - x )|
|       1    0 2   1 2    0 3   2    1 3   0    1 3   0 1    2 3   0 2    3 |
|                                                                           |
|o3 : QuotientRing                                                          |
+---------------------------------------------------------------------------+
|i4 : weight {3,5,7}, gaps {3,5,7}                                          |
|                                                                           |
|o4 = (1, {1, 2, 4})                                                        |
|                                                                           |
|o4 : Sequence                                                              |
+---------------------------------------------------------------------------+
|i5 : semigroupRing {3,5,7}                                                 |
|                                                                           |
|               ZZ                                                          |
|             -----[x , x , x ]                                             |
|             10007  0   2   1                                              |
|o5 = ---------------------------------                                     |
|       2          4          3      2                                      |
|     (x  - x x , x  - x x , x x  - x )                                     |
|       2    0 1   0    2 1   0 2    1                                      |
|                                                                           |
|o5 : QuotientRing                                                          |
+---------------------------------------------------------------------------+
|i6 : weight {3,4}, gaps {3,4}                                              |
|                                                                           |
|o6 = (2, {1, 2, 5})                                                        |
|                                                                           |
|o6 : Sequence                                                              |
+---------------------------------------------------------------------------+
|i7 : semigroupRing({3,4}, "BaseField" => QQ)                               |
|                                                                           |
|     QQ[x ..x ]                                                            |
|         0   1                                                             |
|o7 = ----------                                                            |
|        4    3                                                             |
|       x  - x                                                              |
|        0    1                                                             |
|                                                                           |
|o7 : QuotientRing                                                          |
+---------------------------------------------------------------------------+

See also
========

  * semigroupIdeal -- The ideal defining the semigroup
    ring
  * weight -- weight of a semigroup

Ways to use semigroupRing:
==========================

  * "semigroupRing(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2358:0.

semigroupsFromMatrix -- applies semigroupFromMu to the columns of a matrix
**************************************************************************

  * Usage:
        ss = semigroupsFromMatrix M
  * Inputs:
      * M, a matrix (Macaulay2Doc), of non-negative integers
  * Outputs:
      * ss, a list (Macaulay2Doc), of minimal generating sets of
        semigroups

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

If M = facetRays L then the columns of M are the values of mu applied to the
first point on each ray of the minimal closed face containing L. In this case
semigroupsFrom M returns the list of semigroups corresponding to the rays,

+------------------------------------+
|i1 : M1 = coneRays 4                |
|                                    |
|o1 = | 1 1 3 1 |                    |
|     | 2 0 2 2 |                    |
|     | 3 1 1 1 |                    |
|                                    |
|              3       4             |
|o1 : Matrix ZZ  <-- ZZ              |
+------------------------------------+
|i2 : netList semigroupsFromMatrix M1|
|                                    |
|     +-+-+--+--+                    |
|o2 = |4|5|  |  |                    |
|     +-+-+--+--+                    |
|     |4|6|9 |11|                    |
|     +-+-+--+--+                    |
|     |4|7|10|13|                    |
|     +-+-+--+--+                    |
|     |4|5|7 |  |                    |
|     +-+-+--+--+                    |
+------------------------------------+
|i3 : (H,M) = allSemigroups 4        |
|                                    |
|o3 = (| 4  0 4  |, | 5  6  7  |)    |
|      | 4  4 4  |  | 5  6  11 |     |
|      | 4  4 8  |  | 5  10 7  |     |
|      | 4  8 4  |  | 5  10 11 |     |
|      | 4  8 8  |  | 5  10 15 |     |
|      | 4  8 12 |  | 9  6  7  |     |
|      | 8  4 4  |  | 9  10 7  |     |
|      | 8  8 4  |  | 9  14 7  |     |
|      | 12 8 4  |  | 13 6  7  |     |
|                   | 13 10 7  |     |
|                   | 13 14 7  |     |
|                   | 17 10 7  |     |
|                   | 17 14 7  |     |
|                   | 21 14 7  |     |
|                                    |
|o3 : Sequence                       |
+------------------------------------+

See also
========

  * coneRays -- All the rays of the (homogeneous) Kunz cone
  * allSemigroups -- Compute the Hilbert basis and module
    generators of a cone of semigroups

Ways to use semigroupsFromMatrix:
=================================

  * "semigroupsFromMatrix(Matrix)"

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

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

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

The source of this document is in NumericalSemigroups.m2:3035:0.

socle -- elements of the semigroup that are in the socle mod the multiplicity
*****************************************************************************

  * Usage:
        socle L
  * Inputs:
      * L, a list (Macaulay2Doc), generators of a semigroup
  * Outputs:
      * L, a list (Macaulay2Doc), subset of the Apery set
        representing the socle mod the multiplicity

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

Let S = semigroup L be a numerical semigroup with minimal non-zero element m,
and consider the artinian ring A(s) = k[{t^i : i in s]/(t^m). The socle of A(s)
is the sum of the minimal nonzero ideals, and socle L is a set of generators of
the socle

+------------------------------------+
|i1 : L = {3,7}                      |
|                                    |
|o1 = {3, 7}                         |
|                                    |
|o1 : List                           |
+------------------------------------+
|i2 : s = semigroup L                |
|                                    |
|o2 = {0, 3, 6, 7, 9, 10, 12, 13, 14}|
|                                    |
|o2 : List                           |
+------------------------------------+
|i3 : socle L                        |
|                                    |
|o3 = {14}                           |
|                                    |
|o3 : List                           |
+------------------------------------+
|i4 : L = {3,4,5}                    |
|                                    |
|o4 = {3, 4, 5}                      |
|                                    |
|o4 : List                           |
+------------------------------------+
|i5 : s = semigroup L                |
|                                    |
|o5 = {0, 3, 4, 5}                   |
|                                    |
|o5 : List                           |
+------------------------------------+
|i6 : socle L                        |
|                                    |
|o6 = {4, 5}                         |
|                                    |
|o6 : List                           |
+------------------------------------+

See also
========

  * semigroup -- Compute the semigroup generated by a list of
    positive integers

Ways to use socle:
==================

  * "socle(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:1926:0.

sums -- sum of two sequences
****************************

  * Usage:
        L = sums(L1, L2)
        L = sums(n,L1)
  * Inputs:
      * L1, a list (Macaulay2Doc),
      * L2, a list (Macaulay2Doc),
      * n, an integer (Macaulay2Doc),
  * Outputs:
      * L, a list (Macaulay2Doc),

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

sums(L1,L2) returns a sorted list of the unique sums of nonzero elements of L1
with L2; sums(n, L1) returns the sorted list of unique sums of n nonzero
elements of L1.

+----------------------+
|i1 : L1 = {2,3}       |
|                      |
|o1 = {2, 3}           |
|                      |
|o1 : List             |
+----------------------+
|i2 : L2 = {4,5}       |
|                      |
|o2 = {4, 5}           |
|                      |
|o2 : List             |
+----------------------+
|i3 : sums(L1, L2)     |
|                      |
|o3 = {6, 7, 8}        |
|                      |
|o3 : List             |
+----------------------+
|i4 : sums(1, L1) == L1|
|                      |
|o4 = true             |
+----------------------+
|i5 : sums(L1, L1)     |
|                      |
|o5 = {4, 5, 6}        |
|                      |
|o5 : List             |
+----------------------+
|i6 : sums(2,L1)       |
|                      |
|o6 = {4, 5, 6}        |
|                      |
|o6 : List             |
+----------------------+

Of course the sequence of arbitrary sums of elements including 0 is essentially
semigroup L. To get just the sums of n elements, one could write:

+----------------------------------------------------------------+
|i7 : n = 3                                                      |
|                                                                |
|o7 = 3                                                          |
+----------------------------------------------------------------+
|i8 : {0}|sort unique flatten (for i from 1 to n list sums(i,L1))|
|                                                                |
|o8 = {0, 2, 3, 4, 5, 6, 7, 8, 9}                                |
|                                                                |
|o8 : List                                                       |
+----------------------------------------------------------------+

Ways to use sums:
=================

  * "sums(List,List)"
  * "sums(ZZ,List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2029:0.

syzFormat
*********

Ways to use syzFormat:
======================

  * syzFormat(List) (missing documentation)

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

The object syzFormat (missing documentation) is a method function (Macaulay2Doc).

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

The source of this document is in currentString:1:385.

type -- type of the local semigroup ring
****************************************

  * Usage:
        r = type L
  * Inputs:
      * L, a list (Macaulay2Doc), of semigroup generators
  * Outputs:
      * r, an integer (Macaulay2Doc), the type

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

The type of a local Cohen-Macaulay ring is the number of generators of the
canonical module, or equivalently the dimension of the socle of an
zero-dimensional reduction.

For example, the type of a complete intersection such as the semigroup ring of
a semigroup generated by 2 elements.

+---------------+
|i1 : type {3,5}|
|               |
|o1 = 1         |
+---------------+

See also
========

  * socle -- elements of the semigroup that are in the socle mod
    the multiplicity

Ways to use type:
=================

  * "type(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:1954:0.

weight -- weight of a semigroup
*******************************

  * Usage:
        w = weight L
  * Inputs:
      * L, a list (Macaulay2Doc),
  * Outputs:
      * w, an integer (Macaulay2Doc),

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

If S is the Weierstrass semigroup S of a point p on a Riemann surface C, then
the vanishing sequence (v_0,\dots, v_(g-1)) of the canonical series at p is the
list of orders of vanishing of differential forms at p, and the ramification
sequence at p is (v_0 - 0, v_1 - 1, .. ,v_(g-1) - (g-1)). The weight of the
Weierstrass point p is the sum of the ramification sequence at p.

The vanishing sequence can be computed from the set G of gaps in S as v_i = G_i
- 1, so the weight is sum(G_i - 1 - i) or as the number of pairs (a,b) such
that a is in S, b is a gap, and a < b.

+----------------------------------------------------------------------+
|i1 : weight {5,7}                                                     |
|                                                                      |
|o1 = 36                                                               |
+----------------------------------------------------------------------+
|i2 : semigroup{5,7}                                                   |
|                                                                      |
|o2 = {0, 5, 7, 10, 12, 14, 15, 17, 19, 20, 21, 22, 24, 25, 26, 27, 28}|
|                                                                      |
|o2 : List                                                             |
+----------------------------------------------------------------------+
|i3 : gaps{5,7}                                                        |
|                                                                      |
|o3 = {1, 2, 3, 4, 6, 8, 9, 11, 13, 16, 18, 23}                        |
|                                                                      |
|o3 : List                                                             |
+----------------------------------------------------------------------+

The effective weight ewt is the number of such pairs where a is a minimal
generator of S; this may be a better measure.

+-----------------+
|i4 : mingens{5,7}|
|                 |
|o4 = {5, 7}      |
|                 |
|o4 : List        |
+-----------------+
|i5 : ewt {5,7}   |
|                 |
|o5 = 15          |
+-----------------+

See also
========

  * gaps -- The gap sequence of a semigroup
  * ewt -- Effective weight of a semigroup (Pflueger)
  * mingens (Macaulay2Doc) -- minimal generator matrix

Ways to use weight:
===================

  * "weight(List)"

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

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

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

The source of this document is in NumericalSemigroups.m2:2557:0.