  
  [1X10 [33X[0;0YPolynomials and numerical semigroups[133X[101X
  
  [33X[0;0YPolynomials  appear  related to numerical semigroups in several ways. One of
  them  is  through  their associated generating function (or Hilbert series),
  and  another via value semigroups of a curve; and curves might be defined by
  polynomials.  In  this  chapter  we present several functions to compute the
  polynomial  and  Hilbert  series associated to a numerical semigroup, and to
  calculate  the  respective  numerical  semigroups  given  a  set of defining
  polynomials.[133X
  
  
  [1X10.1 [33X[0;0YGenerating functions or Hilbert series[133X[101X
  
  [33X[0;0YLet  [22XS[122X  be  a numerical semigroup. The Hilbert series or generating function
  associated  to [22XS[122X is [22XH_S(x)=∑_s∈ Sx^s[122X (actually it is the Hilbert function of
  the ring [22XK[S][122X with [22XK[122X a field). See for instance [Mor14].[133X
  
  [1X10.1-1 NumericalSemigroupPolynomial[101X
  
  [33X[1;0Y[29X[2XNumericalSemigroupPolynomial[102X( [3Xs[103X, [3Xx[103X ) [32X function[133X
  
  [33X[0;0Y[3Xs[103X  is  a  numerical semigroups and [3Xx[103X a variable (or a value to evaluate in).
  The output is the polynomial [22X1+(x-1)∑_s∈ N∖ S x^s[122X, which equals [22X(1-x)H_S(x)[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xx:=X(Rationals,"x");;[127X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(5,7,9);;[127X[104X
    [4X[25Xgap>[125X [27XNumericalSemigroupPolynomial(s,x);[127X[104X
    [4X[28Xx^14-x^13+x^12-x^11+x^9-x^8+x^7-x^6+x^5-x+1[128X[104X
  [4X[32X[104X
  
  [1X10.1-2 IsNumericalSemigroupPolynomial[101X
  
  [33X[1;0Y[29X[2XIsNumericalSemigroupPolynomial[102X( [3Xf[103X ) [32X function[133X
  
  [33X[0;0Y[3Xf[103X  is  a  polynomial  in  one variable. The output is true if there exists a
  numerical  semigroup  [22XS[122X  such  that  [3Xf[103X  equals  [22X(1-x)H_S(x)[122X,  that  is,  the
  polynomial associated to [22XS[122X (false otherwise).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xx:=X(Rationals,"x");;[127X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(5,6,7,8);;[127X[104X
    [4X[25Xgap>[125X [27Xf:=NumericalSemigroupPolynomial(s,x);[127X[104X
    [4X[28Xx^10-x^9+x^5-x+1[128X[104X
    [4X[25Xgap>[125X [27XIsNumericalSemigroupPolynomial(f);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X10.1-3 NumericalSemigroupFromNumericalSemigroupPolynomial[101X
  
  [33X[1;0Y[29X[2XNumericalSemigroupFromNumericalSemigroupPolynomial[102X( [3Xf[103X ) [32X function[133X
  
  [33X[0;0Y[3Xf[103X  is  a  polynomial  associated  to a numerical semigroup (otherwise yields
  error).  The  output  is  the  numerical  semigroup  [22XS[122X  such  that  [3Xf[103X equals
  [22X(1-x)H_S(x)[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xx:=X(Rationals,"x");;[127X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(5,6,7,8);;[127X[104X
    [4X[25Xgap>[125X [27Xf:=NumericalSemigroupPolynomial(s,x);[127X[104X
    [4X[28Xx^10-x^9+x^5-x+1[128X[104X
    [4X[25Xgap>[125X [27XNumericalSemigroupFromNumericalSemigroupPolynomial(f)=s;[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X10.1-4 HilbertSeriesOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XHilbertSeriesOfNumericalSemigroup[102X( [3Xs[103X, [3Xx[103X ) [32X function[133X
  
  [33X[0;0Y[3Xs[103X is a numerical semigroup and [3Xx[103X a variable (or a value to evaluate in). The
  output is the series [22X∑_s∈ S x^s[122X. The series is given as a rational function.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xx:=X(Rationals,"x");;[127X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(5,7,9);;[127X[104X
    [4X[25Xgap>[125X [27XHilbertSeriesOfNumericalSemigroup(s,x);[127X[104X
    [4X[28X(x^14-x^13+x^12-x^11+x^9-x^8+x^7-x^6+x^5-x+1)/(-x+1)[128X[104X
  [4X[32X[104X
  
  [1X10.1-5 GraeffePolynomial[101X
  
  [33X[1;0Y[29X[2XGraeffePolynomial[102X( [3Xp[103X ) [32X function[133X
  
  [33X[0;0Y[3Xp[103X is a polynomial. Computes the Graeffe polynomial of [3Xp[103X. Needed to test if [3Xp[103X
  is a cyclotomic polynomial (see [BD89]).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xx:=Indeterminate(Rationals,1);; SetName(x,"x");[127X[104X
    [4X[25Xgap>[125X [27XGraeffePolynomial(x^2-1);[127X[104X
    [4X[28Xx^2-2*x+1[128X[104X
  [4X[32X[104X
  
  [1X10.1-6 IsCyclotomicPolynomial[101X
  
  [33X[1;0Y[29X[2XIsCyclotomicPolynomial[102X( [3Xp[103X ) [32X function[133X
  
  [33X[0;0Y[3Xp[103X  is  a  polynomial.  Detects  if  [3Xp[103X  is  a cyclotomic polynomial using the
  procedure given in [BD89].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XCyclotomicPolynomial(Rationals,3);[127X[104X
    [4X[28Xx^2+x+1[128X[104X
    [4X[25Xgap>[125X [27XIsCyclotomicPolynomial(last);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X10.1-7 IsKroneckerPolynomial[101X
  
  [33X[1;0Y[29X[2XIsKroneckerPolynomial[102X( [3Xp[103X ) [32X function[133X
  
  [33X[0;0Y[3Xp[103X  is a polynomial. Detects if [3Xp[103X is a Kronecker polynomial, that is, a monic
  polynomial  with  integer  coefficients  having  all  its  roots in the unit
  circumference,  or  equivalently,  a  product of cyclotomic polynomials. The
  current  implementation  has  been  done  with A. Herrera-Poyatos, following
  [BD89].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xx:=X(Rationals,"x");;[127X[104X
    [4X[25Xgap>[125X [27X s:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27X t:=NumericalSemigroup(4,6,9);;[127X[104X
    [4X[25Xgap>[125X [27Xp:=NumericalSemigroupPolynomial(s,x);[127X[104X
    [4X[28Xx^5-x^4+x^3-x+1[128X[104X
    [4X[25Xgap>[125X [27Xq:=NumericalSemigroupPolynomial(t,x);[127X[104X
    [4X[28Xx^12-x^11+x^8-x^7+x^6-x^5+x^4-x+1[128X[104X
    [4X[25Xgap>[125X [27XIsKroneckerPolynomial(p);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsKroneckerPolynomial(q);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X10.1-8 IsCyclotomicNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XIsCyclotomicNumericalSemigroup[102X( [3Xs[103X ) [32X function[133X
  
  [33X[0;0Y[3Xs[103X  is  a numerical semigroup. Detects if the polynomial associated to [3Xs[103X is a
  Kronecker polynomial.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xl:=CompleteIntersectionNumericalSemigroupsWithFrobeniusNumber(21);;[127X[104X
    [4X[25Xgap>[125X [27XForAll(l,IsCyclotomicNumericalSemigroup);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X10.1-9 CyclotomicExponentSequence[101X
  
  [33X[1;0Y[29X[2XCyclotomicExponentSequence[102X( [3Xs[103X, [3Xk[103X ) [32X operation[133X
  
  [33X[0;0Y[3Xs[103X  is a numerical semigroup and [3Xk[103X is a positive integer. Outputs the list of
  the  first  [3Xk[103X  elements  of  the  cyclotomic  exponent  sequence  of  s (see
  [CGSM16]).[133X
  
  [33X[0;0YThe  sequence  will  be  truncated  if  the semigroup is cyclotomic and k is
  bigger than the last nonzero element in its sequence.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,4);;[127X[104X
    [4X[25Xgap>[125X [27XCyclotomicExponentSequence(s,20);[127X[104X
    [4X[28X[ 1, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 1 ][128X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27XCyclotomicExponentSequence(s,20);[127X[104X
    [4X[28X[ 1, 0, -1, 0, -1, 0, -1, 0, 0, 1, 0, 1, 0, 1, 0, 0, -1, 0, -1, 0 ][128X[104X
  [4X[32X[104X
  
  [1X10.1-10 WittCoefficients[101X
  
  [33X[1;0Y[29X[2XWittCoefficients[102X( [3Xp[103X, [3Xk[103X ) [32X operation[133X
  
  [33X[0;0Y[3Xp[103X  is  a  univariate  polynomial with integer coefficientas and [22Xp(1)=1[122X. Then
  [22Xp(x)=∏_nge  0(1-x^n)^e_n[122X,  for  some  integers  [22Xe_n[122X.  The output is the list
  [22X[e_1,...,e_k][122X, and it is computed by using [CGSHPM19].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,4);;[127X[104X
    [4X[25Xgap>[125X [27Xx:=Indeterminate(Rationals,"x");;[127X[104X
    [4X[25Xgap>[125X [27Xp:=NumericalSemigroupPolynomial(s,x);;[127X[104X
    [4X[25Xgap>[125X [27XWittCoefficients(p,20);[127X[104X
    [4X[28X[ 1, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 ][128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  difference  with this example and the one in [2XCyclotomicExponentSequence[102X
  ([14X10.1-9[114X)  is  that  in  that case a cyclotomic check is performed that slows
  down the process.[133X
  
  [1X10.1-11 IsSelfReciprocalUnivariatePolynomial[101X
  
  [33X[1;0Y[29X[2XIsSelfReciprocalUnivariatePolynomial[102X( [3Xp[103X ) [32X function[133X
  
  [33X[0;0Y[3Xp[103X  is  a  univariate polynomial. Detects if [3Xp[103X is selfreciprocal. A numerical
  semigroup  is  symmetric  if  and only if it is selfreciprocal, [Mor14]. The
  current implementation is due to A. Herrera-Poyatos.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xl:=IrreducibleNumericalSemigroupsWithFrobeniusNumber(13);;[127X[104X
    [4X[25Xgap>[125X [27Xx:=X(Rationals,"x");;[127X[104X
    [4X[25Xgap>[125X [27XForAll(l, s->[127X[104X
    [4X[25X>[125X [27XIsSelfReciprocalUnivariatePolynomial(NumericalSemigroupPolynomial(s,x)));[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X10.2 [33X[0;0YSemigroup of values of algebraic curves[133X[101X
  
  [33X[0;0YLet  [22Xf(x,y)∈  K[x,y][122X, with [22XK[122X an algebraically closed field of characteristic
  zero.  Let  [22Xf(x,y)=y^n+a_1(x)y^n-1+dots+a_n(x)[122X  be  a  nonzero polynomial of
  [22XK[x][y][122X.  After  possibly  a  change  of variables, we may assume that, that
  [22Xdeg_x(a_i(x))le  i-1[122X  for  all  [22Xi∈{1,...,  n}[122X.  For  [22Xg∈ K[x,y][122X that is not a
  multiple  of  [22Xf[122X, define [22Xmathrmint(f,g)=dim_ K frac K[x,y](f,g)[122X. If [22Xf[122X has one
  place  at  infinity,  then the set [22X{mathrmint(f,g)∣ g∈ K[x,y]∖(f)}[122X is a free
  numerical semigroup (and thus a complete intersection).[133X
  
  [1X10.2-1 SemigroupOfValuesOfPlaneCurveWithSinglePlaceAtInfinity[101X
  
  [33X[1;0Y[29X[2XSemigroupOfValuesOfPlaneCurveWithSinglePlaceAtInfinity[102X( [3Xf[103X ) [32X function[133X
  
  [33X[0;0Y[3Xf[103X  is  a  polynomial  in  the  variables  X(Rationals,1) and X(Rationals,2).
  Computes    the    semigroup    [22X{mathrmint(f,g)∣   g∈   K[x,y]∖(f)}[122X,   where
  [22Xmathrmint(f,g)=dim_  K  (  K[x,y]/(f,g))[122X.  The algorithm checks if [3Xf[103X has one
  place  at infinity. If the extra argument "all" is given, then the output is
  the  [22Xδ[122X-sequence  and  approximate  roots  of  [3Xf[103X.  The method is explained in
  [AGS16a].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xx:=Indeterminate(Rationals,1);; SetName(x,"x");[127X[104X
    [4X[25Xgap>[125X [27Xy:=Indeterminate(Rationals,2);; SetName(y,"y");[127X[104X
    [4X[25Xgap>[125X [27Xf:=((y^3-x^2)^2-x*y^2)^4-(y^3-x^2);;[127X[104X
    [4X[25Xgap>[125X [27XSemigroupOfValuesOfPlaneCurveWithSinglePlaceAtInfinity(f,"all");[127X[104X
    [4X[28X[ [ 24, 16, 28, 7 ], [ y, y^3-x^2, y^6-2*x^2*y^3+x^4-x*y^2 ] ][128X[104X
  [4X[32X[104X
  
  [1X10.2-2 IsDeltaSequence[101X
  
  [33X[1;0Y[29X[2XIsDeltaSequence[102X( [3Xl[103X ) [32X function[133X
  
  [33X[0;0Y[3Xl[103X  is  a  list  of positive integers. Assume that [3Xl[103X equals [22Xa_0,a_1,dots,a_h[122X.
  Then [3Xl[103X is a [22Xδ[122X-sequence if [22Xgcd(a_0,..., a_h)=1[122X, [22X⟨ a_0,⋯, a_s⟩[122X is free, [22Xa_kD_k
  >  a_k+1D_k+1[122X  and  [22Xa_0>  a_1  >  D_2  >  D_3  > ... > D_h+1[122X, where [22XD_1=a_0[122X,
  [22XD_k=gcd(D_k-1,a_k-1)[122X.[133X
  
  [33X[0;0YEvery  [22Xδ[122X-sequence  generates  a numerical semigroup that is the semigroup of
  values of a plane curve with one place at infinity.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XIsDeltaSequence([24,16,28,7]);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X10.2-3 DeltaSequencesWithFrobeniusNumber[101X
  
  [33X[1;0Y[29X[2XDeltaSequencesWithFrobeniusNumber[102X( [3Xf[103X ) [32X function[133X
  
  [33X[0;0Y[3Xf[103X  is  an  integer. Computes the set of all [22Xδ[122X-sequences generating numerical
  semigroups with Frobenius number [3Xf[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XDeltaSequencesWithFrobeniusNumber(21);[127X[104X
    [4X[28X[ [ 8, 6, 11 ], [ 10, 4, 15 ], [ 12, 8, 6, 11 ], [ 14, 4, 11 ],[128X[104X
    [4X[28X  [ 15, 10, 4 ], [ 23, 2 ] ][128X[104X
  [4X[32X[104X
  
  [1X10.2-4 CurveAssociatedToDeltaSequence[101X
  
  [33X[1;0Y[29X[2XCurveAssociatedToDeltaSequence[102X( [3Xl[103X ) [32X function[133X
  
  [33X[0;0Y[3Xl[103X  is  a  [22Xδ[122X-sequence.  Computes  a curve in the variables X(Rationals,1) and
  X(Rationals,2) whose semigroup of values is generated by the [3Xl[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XCurveAssociatedToDeltaSequence([24,16,28,7]);[127X[104X
    [4X[28Xy^24-8*x^2*y^21+28*x^4*y^18-56*x^6*y^15-4*x*y^20+70*x^8*y^12+24*x^3*y^17-56*x^\[128X[104X
    [4X[28X10*y^9-60*x^5*y^14+28*x^12*y^6+80*x^7*y^11+6*x^2*y^16-8*x^14*y^3-60*x^9*y^8-24\[128X[104X
    [4X[28X*x^4*y^13+x^16+24*x^11*y^5+36*x^6*y^10-4*x^13*y^2-24*x^8*y^7-4*x^3*y^12+6*x^10\[128X[104X
    [4X[28X*y^4+8*x^5*y^9-4*x^7*y^6+x^4*y^8-y^3+x^2[128X[104X
    [4X[25Xgap>[125X [27XSemigroupOfValuesOfPlaneCurveWithSinglePlaceAtInfinity(last,"all");[127X[104X
    [4X[28X[ [ 24, 16, 28, 7 ], [ y, y^3-x^2, y^6-2*x^2*y^3+x^4-x*y^2 ] ][128X[104X
  [4X[32X[104X
  
  [1X10.2-5 SemigroupOfValuesOfPlaneCurve[101X
  
  [33X[1;0Y[29X[2XSemigroupOfValuesOfPlaneCurve[102X( [3Xf[103X ) [32X function[133X
  
  [33X[0;0Y[3Xf[103X  is  a  polynomial in the variables X(Rationals,1) and X(Rationals,2). The
  singular  package  is  mandatory.  Either  by  loading it prior to numerical
  semigroups  or  by using [3XNumSgpsUseSingular()[103X. If [22Xf[122X is irreducible, computes
  the semigroup [22X{mathrmint(f,g)∣ g∈ K[x,y]∖(f)}[122X, where [22Xmathrmint(f,g)=dim_ K (
  K[[x,y]]/(f,g))[122X. If it has two components, the output is the value semigroup
  in  two  variables, and thus a good semigroup. If there are more components,
  then the output is that of [3Xsemigroup[103X in the alexpoly singular library.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xx:=X(Rationals,"x");; y:=X(Rationals,"y");;[127X[104X
    [4X[25Xgap>[125X [27Xf:= y^4-2*x^3*y^2-4*x^5*y+x^6-x^7;[127X[104X
    [4X[28X-x^7+x^6-4*x^5*y-2*x^3*y^2+y^4[128X[104X
    [4X[25Xgap>[125X [27XSemigroupOfValuesOfPlaneCurve(f);[127X[104X
    [4X[28X<Numerical semigroup with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XMinimalGenerators(last);[127X[104X
    [4X[28X[ 4, 6, 13 ][128X[104X
    [4X[25Xgap>[125X [27Xf:=(y^4-2*x^3*y^2-4*x^5*y+x^6-x^7)*(y^2-x^3);;[127X[104X
    [4X[25Xgap>[125X [27XSemigroupOfValuesOfPlaneCurve(f);[127X[104X
    [4X[28X<Good semigroup>[128X[104X
    [4X[25Xgap>[125X [27XMinimalGenerators(last);[127X[104X
    [4X[28X[ [ 4, 2 ], [ 6, 3 ], [ 13, 15 ], [ 29, 13 ] ][128X[104X
  [4X[32X[104X
  
  [1X10.2-6 SemigroupOfValuesOfCurve_Local[101X
  
  [33X[1;0Y[29X[2XSemigroupOfValuesOfCurve_Local[102X( [3Xarg[103X ) [32X function[133X
  
  [33X[0;0YThe  function admits one or two parameters. In any case, the first is a list
  of  polynomials [3Xpols[103X. And the second can be the string [3X"basis"[103X or an integer
  [3Xval[103X.[133X
  
  [33X[0;0YIf  only  one argument is given, the output is the semigroup of all possible
  orders of [22XK[[pols]][122X provided that [22XK[[x]]/K[[pols]][122X has finite length. If the
  second  argument  [3X"basis"[103X  is given, then the output is a (reduced) basis of
  the  algebra  [22XK[[pols]][122X  such that the orders of the basis elements generate
  minimally  the  semigroup  of  orders of [22XK[[pols]][122X. If an integer [3Xval[103X is the
  second argument, then the output is a polynomial in [22XK[[pols]][122X with order [3Xval[103X
  ([10Xfail[110X  if  there is no such polynomial, that is, [3Xval[103X is not in the semigroup
  of values).[133X
  
  [33X[0;0YThe method is explained in [AGSM17].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xx:=Indeterminate(Rationals,"x");;[127X[104X
    [4X[25Xgap>[125X [27XSemigroupOfValuesOfCurve_Local([x^4,x^6+x^7,x^13]);[127X[104X
    [4X[28X<Numerical semigroup with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XMinimalGeneratingSystem(last);[127X[104X
    [4X[28X[ 4, 6, 13, 15 ][128X[104X
    [4X[25Xgap>[125X [27XSemigroupOfValuesOfCurve_Local([x^4,x^6+x^7,x^13], "basis");[127X[104X
    [4X[28X[ x^4, x^7+x^6, x^13, x^15 ][128X[104X
    [4X[25Xgap>[125X [27XSemigroupOfValuesOfCurve_Local([x^4,x^6+x^7,x^13], 20);[127X[104X
    [4X[28Xx^20[128X[104X
  [4X[32X[104X
  
  [1X10.2-7 SemigroupOfValuesOfCurve_Global[101X
  
  [33X[1;0Y[29X[2XSemigroupOfValuesOfCurve_Global[102X( [3Xarg[103X ) [32X function[133X
  
  [33X[0;0YThe  function admits one or two parameters. In any case, the first is a list
  of  polynomials [3Xpols[103X. And the second can be the string [3X"basis"[103X or an integer
  [3Xval[103X.[133X
  
  [33X[0;0YIf  only  one argument is given, the output is the semigroup of all possible
  degrees  of  [22XK[pols][122X  provided  that  [22XK[x]/K[pols][122X has finite length. If the
  second  argument  [3X"basis"[103X  is given, then the output is a (reduced) basis of
  the  algebra  [22XK[pols][122X  such  that the degrees of the basis elements generate
  minimally  the  semigroup  of  degrees  of [22XK[pols][122X. If an integer [3Xval[103X is the
  second  argument, then the output is a polynomial in [22XK[pols][122X with degree [3Xval[103X
  ([10Xfail[110X  if  there is no such polynomial, that is, [3Xval[103X is not in the semigroup
  of values).[133X
  
  [33X[0;0YThe method is explained in [AGSM17].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xx:=Indeterminate(Rationals,"x");;[127X[104X
    [4X[25Xgap>[125X [27XSemigroupOfValuesOfCurve_Global([x^4,x^6+x^7,x^13]);[127X[104X
    [4X[28X<Numerical semigroup with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XMinimalGeneratingSystem(last);[127X[104X
    [4X[28X[ 4, 7, 13 ][128X[104X
    [4X[25Xgap>[125X [27XSemigroupOfValuesOfCurve_Global([x^4,x^6+x^7,x^13],"basis");[127X[104X
    [4X[28X[ x^4, x^7+x^6, x^13 ][128X[104X
    [4X[25Xgap>[125X [27XSemigroupOfValuesOfCurve_Global([x^4,x^6+x^7,x^13],12);[127X[104X
    [4X[28Xx^12[128X[104X
    [4X[25Xgap>[125X [27XSemigroupOfValuesOfCurve_Global([x^4,x^6+x^7,x^13],6);[127X[104X
    [4X[28Xfail[128X[104X
  [4X[32X[104X
  
  [1X10.2-8 GeneratorsModule_Global[101X
  
  [33X[1;0Y[29X[2XGeneratorsModule_Global[102X( [3XA[103X, [3XM[103X ) [32X function[133X
  
  [33X[0;0Y[3XA[103X and [3XM[103X are lists of polynomials in the same variable. The output is a basis
  of  the  ideal [22XM K[A][122X, that is, a set [22XF[122X such that [22Xdeg(F)[122X generates the ideal
  [22Xdeg(M  K[A])[122X  of  [22Xdeg(K[A])[122X,  where  [22Xdeg[122X  stands  for  degree. The method is
  explained in [AAGS17].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xt:=Indeterminate(Rationals,"t");;[127X[104X
    [4X[25Xgap>[125X [27XA:=[t^6+t,t^4];;[127X[104X
    [4X[25Xgap>[125X [27XM:=[t^3,t^4];;[127X[104X
    [4X[25Xgap>[125X [27XGeneratorsModule_Global(A,M);[127X[104X
    [4X[28X[ t^3, t^4, t^5, t^6 ][128X[104X
  [4X[32X[104X
  
  [1X10.2-9 GeneratorsKahlerDifferentials[101X
  
  [33X[1;0Y[29X[2XGeneratorsKahlerDifferentials[102X( [3XA[103X, [3XM[103X ) [32X function[133X
  
  [33X[0;0Y[3XA[103X   is   a  list  of  polynomials  in  the  same  variable.  The  output  is
  [3XGeneratorsModule_Global(A,M)[103X,  with [3XM[103X the set of derivatives of the elements
  in [3XA[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xt:=Indeterminate(Rationals,"t");;[127X[104X
    [4X[25Xgap>[125X [27XGeneratorsKahlerDifferentials([t^3,t^4]);[127X[104X
    [4X[28X[ t^2, t^3 ][128X[104X
  [4X[32X[104X
  
  [1X10.2-10 IsMonomialNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XIsMonomialNumericalSemigroup[102X( [3XS[103X ) [32X property[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup. Tests whether [3XS[103X a monomial numerical semigroup.[133X
  
  [33X[0;0YLet  [22XR[122X  a  Noetherian  ring  such  that  [22XK  ⊆  R  ⊆  K[[t]][122X, [22XK[122X is a field of
  characteristic zero, the algebraic closure of [22XR[122X is [22XK[[t]][122X, and the conductor
  [22X(R  :  K[[t]])[122X  is  not zero. If [22Xv : K((t))-> Z[122X is the natural valuation for
  [22XK((t))[122X, then [22Xv(R)[122X is a numerical semigroup.[133X
  
  [33X[0;0YLet  [22XS[122X  be  a  numerical semigroup minimally generated by [22X{n_1,...,n_e}[122X. The
  semigroup  ring  associated  to  [22XS[122X is [22XK[[S]]=K[[t^n_1,...,t^n_e]][122X. A ring is
  called  a  semigroup  ring  if  it is of the form [22XK[[S]][122X, for some numerical
  semigroup [22XS[122X. We say that [22XS[122X is a monomial numerical semigroup if for any [22XR[122X as
  above with [22Xv(R)=S[122X, [22XR[122X is a semigroup ring. See [Mic02] for details.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XIsMonomialNumericalSemigroup(NumericalSemigroup(4,6,7));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsMonomialNumericalSemigroup(NumericalSemigroup(4,6,11));[127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
