  
  [1X4 [33X[0;0YPresentations of Numerical Semigroups[133X[101X
  
  [33X[0;0YIn  this  chapter  we  explain  how  to  compute a minimal presentation of a
  numerical  semigroup.  Recall  that  a  minimal  presentation  is  a minimal
  generating  system  of the kernel congruence of the factorization map of the
  numerical  semigroup.  If  [22XS[122X is a numerical semigroup minimally generated by
  [22X{n_1,...,n_e}[122X,  then  the  factorization  map is the epimorphism [22Xφ: N^e-> S[122X,
  [22X(x_1,...,x_e)↦  x_1n_1+dots+  x_en_e[122X; its kernel is the congruence [22X{ (a,b) ∣
  φ(a)=φ(b)}[122X.[133X
  
  [33X[0;0YThe  set  of  minimal  generators  is  stored in a set, and so it may not be
  arranged  as  the  user  gave  them.  This may affect the arrangement of the
  coordinates  of  the pairs in a minimal presentation, since every coordinate
  is associated to a minimal generator.[133X
  
  
  [1X4.1 [33X[0;0YPresentations of Numerical Semigroups[133X[101X
  
  [33X[0;0YIn  this  section  we  provide  a  way to compute minimal presentations of a
  numerical  semigroup.  These presentations are constructed from some special
  elelements  in  the semigroup (Betti elemenents) whose associated graphs are
  nonconnected.  A generalization of these graphs are the simplicial complexes
  called shaded sets of an element.[133X
  
  [33X[0;0YIf the variable [3XNumSgpsUseEliminationForMinimalPresentations[103X is set to true,
  then minimal presentations are computed via binomial ideals and elimination.[133X
  
  [1X4.1-1 MinimalPresentation[101X
  
  [33X[1;0Y[29X[2XMinimalPresentation[102X( [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XMinimalPresentationOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup. The output is a list of lists with two elements.
  Each  list  of  two  elements  represents  a  relation  between  the minimal
  generators  of the numerical semigroup. If [22X{ {x_1,y_1},...,{x_k,y_k}}[122X is the
  output  and  [22X{m_1,...,m_n}[122X  is  the  minimal  system  of  generators  of the
  numerical  semigroup,  then  [22X{x_i,y_i}={{a_i_1,...,a_i_n},{b_i_1,...,b_i_n}}[122X
  and [22Xa_i_1m_1+⋯+a_i_nm_n= b_i_1m_1+ ⋯ +b_i_nm_n.[122X[133X
  
  [33X[0;0YAny  other  relation  among  the  minimal generators of the semigroup can be
  deduced from the ones given in the output.[133X
  
  [33X[0;0YThe algorithm implemented is described in [Ros96a] (see also [RG99b]).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27XMinimalPresentation(s);[127X[104X
    [4X[28X[ [ [ 0, 0, 2 ], [ 3, 1, 0 ] ], [ [ 0, 1, 1 ], [ 4, 0, 0 ] ], [128X[104X
    [4X[28X  [ [ 0, 2, 0 ], [ 1, 0, 1 ] ] ][128X[104X
    [4X[25Xgap>[125X [27XMinimalPresentationOfNumericalSemigroup(s);[127X[104X
    [4X[28X[ [ [ 0, 0, 2 ], [ 3, 1, 0 ] ], [ [ 0, 1, 1 ], [ 4, 0, 0 ] ], [128X[104X
    [4X[28X  [ [ 0, 2, 0 ], [ 1, 0, 1 ] ] ][128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe first element in the list means that [22X1× 3+1× 7=2× 5[122X, and the others have
  similar meanings.[133X
  
  [1X4.1-2 GraphAssociatedToElementInNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XGraphAssociatedToElementInNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup and [3Xn[103X is an element in [3XS[103X.[133X
  
  [33X[0;0YThe  output  is a pair. If [22X{m_1,...,m_n}[122X is the set of minimal generators of
  [3XS[103X,  then  the first component is the set of vertices of the graph associated
  to  [3Xn[103X  in [3XS[103X, that is, the set [22X{ m_i | n-m_i∈ S}[122X, and the second component is
  the set of edges of this graph, that is, [22X{ {m_i,m_j} | n-(m_i+m_j)∈ S}.[122X[133X
  
  [33X[0;0YThis  function  is  used  to compute a minimal presentation of the numerical
  semigroup [3XS[103X, as explained in [Ros96a].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27XGraphAssociatedToElementInNumericalSemigroup(10,s);[127X[104X
    [4X[28X[ [ 3, 5, 7 ], [ [ 3, 7 ] ] ][128X[104X
  [4X[32X[104X
  
  [1X4.1-3 BettiElements[101X
  
  [33X[1;0Y[29X[2XBettiElements[102X( [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XBettiElementsOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YThe  output  is  the  set  of  elements  in  [3XS[103X  whose  associated  graph  is
  nonconnected [GO10].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27XBettiElementsOfNumericalSemigroup(s);[127X[104X
    [4X[28X[ 10, 12, 14 ][128X[104X
    [4X[25Xgap>[125X [27XBettiElements(s);[127X[104X
    [4X[28X[ 10, 12, 14 ][128X[104X
  [4X[32X[104X
  
  [1X4.1-4 IsMinimalRelationOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XIsMinimalRelationOfNumericalSemigroup[102X( [3Xp[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a  numerical  semigroup  and  [3Xp[103X  is  a  pair (a relation) of lists of
  integers.  Determines  if  the  pair  [3Xp[103X  is  a minimal relation in a minimal
  presentation of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(4,6,9);;[127X[104X
    [4X[25Xgap>[125X [27XMinimalPresentation(s);[127X[104X
    [4X[28X[ [ [ 0, 0, 2 ], [ 0, 3, 0 ] ], [ [ 0, 2, 0 ], [ 3, 0, 0 ] ] ][128X[104X
    [4X[25Xgap>[125X [27XIsMinimalRelationOfNumericalSemigroup([[2,1,0],[0,0,2]],s);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsMinimalRelationOfNumericalSemigroup([[3,1,0],[0,0,2]],s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.1-5 AllMinimalRelationsOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XAllMinimalRelationsOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a  numerical  semigroup.  The  output  is  the  union  of all minimal
  presentations  of  [3XS[103X. Notice that if [x,y] is a minimal relator, then either
  [x,y] or [y,x] will be in the output, but not both.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(4,6,9);;[127X[104X
    [4X[25Xgap>[125X [27XMinimalPresentation(s);[127X[104X
    [4X[28X[ [ [ 0, 0, 2 ], [ 0, 3, 0 ] ], [ [ 0, 2, 0 ], [ 3, 0, 0 ] ] ][128X[104X
    [4X[25Xgap>[125X [27XAllMinimalRelationsOfNumericalSemigroup(s);[127X[104X
    [4X[28X[ [ [ 0, 3, 0 ], [ 0, 0, 2 ] ], [ [ 3, 0, 0 ], [ 0, 2, 0 ] ], [ [ 3, 1, 0 ], [ 0, 0, 2 ] ] ][128X[104X
  [4X[32X[104X
  
  [1X4.1-6 DegreesOfPrimitiveElementsOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XDegreesOfPrimitiveElementsOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YThe  output  is  the set of elements [22Xs[122X in [3XS[103X such that there exists a minimal
  solution  to  [22Xmsg⋅  x-msg⋅ y = 0[122X, such that [22Xx,y[122X are factorizations of [22Xs[122X, and
  [22Xmsg[122X is the minimal generating system of [3XS[103X. Betti elements are primitive, but
  not the way around in general.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27XDegreesOfPrimitiveElementsOfNumericalSemigroup(s);[127X[104X
    [4X[28X[ 3, 5, 7, 10, 12, 14, 15, 21, 28, 35 ][128X[104X
  [4X[32X[104X
  
  [1X4.1-7 ShadedSetOfElementInNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XShadedSetOfElementInNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup and [3Xn[103X is an element in [3XS[103X.[133X
  
  [33X[0;0YThe output is a simplicial complex [22XC[122X. If [22X{m_1,...,m_n}[122X is the set of minimal
  generators of [3XS[103X, then [22XL ∈ C[122X if [22Xn-∑_i∈ L m_i∈ S[122X ([SW86]).[133X
  
  [33X[0;0YThis function is a generalization of the graph associated to [3Xn[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27XShadedSetOfElementInNumericalSemigroup(10,s);[127X[104X
    [4X[28X[ [  ], [ 3 ], [ 3, 7 ], [ 5 ], [ 7 ] ][128X[104X
  [4X[32X[104X
  
  
  [1X4.2 [33X[0;0YBinomial ideals associated to numerical semigroups[133X[101X
  
  [33X[0;0YLet  [22XS[122X be a numerical semigroup, and let [22XK[122X be a field. Let [22X{n_1,dots,n_e}[122X be
  a  set  of  minimal  generators of [22XS[122X, and let [22XK[x_1,dots,x_e][122X be the ring of
  polynomial  in  the  indeterminates [22Xx_1,dots,x_e[122X and with coefficients in [22XK[122X.
  Let [22XK[t][122X be the ring of polynomials in [22Xt[122X with coefficients in [22XK[122X.[133X
  
  [33X[0;0YLet  [22Xφ:  K[x_1,dots,x_e]  ->  K[t][122X  be  the  ring homomorphism determined by
  [22Xφ(x_i)=t^n_i[122X  for  all [22Xi[122X. The image of this morphism is usually known as the
  [13Xsemigroup  ring  associated[113X  to  [22XS[122X.  The  kernel  is  the  [13X(binomial)  ideal
  associated[113X  to  [22XS[122X. According to [Her70], from the exponents of the binomials
  in this ideal we can recover a presentation of [22XS[122X and viceversa.[133X
  
  [1X4.2-1 BinomialIdealOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XBinomialIdealOfNumericalSemigroup[102X( [[3XK[103X, ][3XS[103X ) [32X operation[133X
  
  [33X[0;0YThe  argument  [3XK[103X is optional; when it is not supplied, the field of rational
  numbers  is  taken  as base field. [3XS[103X is a numerical semigroup. The output is
  the binomial ideal associated to [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27XBinomialIdealOfNumericalSemigroup(GF(2),s);[127X[104X
    [4X[28X<two-sided ideal in GF(2)[x_1,x_2,x_3], (3 generators)>[128X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfTwoSidedIdeal(last);[127X[104X
    [4X[28X[ x_1^3*x_2+x_3^2, x_1^4+x_2*x_3, x_1*x_3+x_2^2 ][128X[104X
    [4X[25Xgap>[125X [27XBinomialIdealOfNumericalSemigroup(s);[127X[104X
    [4X[28X<two-sided ideal in Rationals[x_1,x_2,x_3], (3 generators)>[128X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfTwoSidedIdeal(last);[127X[104X
    [4X[28X[ -x_1^3*x_2+x_3^2, -x_1^4+x_2*x_3, -x_1*x_3+x_2^2 ][128X[104X
    [4X[25Xgap>[125X [27XMinimalPresentation(s);[127X[104X
    [4X[28X[ [ [ 0, 0, 2 ], [ 3, 1, 0 ] ], [ [ 0, 1, 1 ], [ 4, 0, 0 ] ], [128X[104X
    [4X[28X[ [ 0, 2, 0 ], [ 1, 0, 1 ] ] ][128X[104X
  [4X[32X[104X
  
  
  [1X4.3 [33X[0;0YUniquely Presented Numerical Semigroups[133X[101X
  
  [33X[0;0YA  numerical  semigroup  [22XS[122X  is  uniquely  presented  if  for any two minimal
  presentations  [22Xσ[122X  and  [22Xτ[122X and any [22X(a,b)∈ σ[122X, either [22X(a,b)∈ τ[122X or [22X(b,a)∈ τ[122X, that
  is, there is essentially a unique minimal presentation (up to arrangement of
  the components of the pairs in it).[133X
  
  [1X4.3-1 IsUniquelyPresented[101X
  
  [33X[1;0Y[29X[2XIsUniquelyPresented[102X( [3XS[103X ) [32X property[133X
  [33X[1;0Y[29X[2XIsUniquelyPresentedNumericalSemigroup[102X( [3XS[103X ) [32X property[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YThe  output is true if [3XS[103X has uniquely presented. The implementation is based
  on [GO10].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27XIsUniquelyPresented(s);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsUniquelyPresentedNumericalSemigroup(s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.3-2 IsGeneric[101X
  
  [33X[1;0Y[29X[2XIsGeneric[102X( [3XS[103X ) [32X property[133X
  [33X[1;0Y[29X[2XIsGenericNumericalSemigroup[102X( [3XS[103X ) [32X property[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YThe  output  is  true  if  [3XS[103X  has  a generic presentation, that is, in every
  minimal  relation  all  generators  occur.  These  semigroups  are  uniquely
  presented (see [BGG11]).[133X
  
  [33X[0;0YThis filter implies [2XIsUniquelyPresentedNumericalSemigroup[102X ([14X4.3-1[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27XIsGeneric(s);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsGenericNumericalSemigroup(s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
