  
  [1X7 [33X[0;0YIdeals of numerical semigroups[133X[101X
  
  [33X[0;0YLet  [22XS[122X be a numerical semigroup. A set [22XI[122X of integers is an [13Xideal relative[113X to
  a numerical semigroup [22XS[122X provided that [22XI+S⊆ I[122X and that there exists [22Xd∈ S[122X such
  that [22Xd+I⊆ S[122X.[133X
  
  [33X[0;0YIf  [22X{i_1,...,i_k}[122X  is  a subset of [22XZ[122X, then the set [22XI={i_1,...,i_k}+S=⋃_n=1^k
  i_n+S[122X  is  an  ideal  relative  to  [22XS[122X,  and  [22X{i_1,...,  i_k}[122X  is a system of
  generators  of [22XI[122X. A system of generators [22XM[122X is minimal if no proper subset of
  [22XM[122X  generates  the  same ideal. Usually, ideals are specified by means of its
  generators and the ambient numerical semigroup to which they are ideals (for
  more information see for instance [BDF97]).[133X
  
  
  [1X7.1 [33X[0;0YDefinitions and basic operations[133X[101X
  
  [1X7.1-1 IdealOfNumericalSemigroup[101X
  
  [29X[2XIdealOfNumericalSemigroup[102X( [3Xl[103X, [3XS[103X ) [32X function
  
  [33X[0;0Y[3XS[103X is a numerical semigroup and [3Xl[103X a list of integers.[133X
  
  [33X[0;0YThe output is the ideal of [3XS[103X generated by [3Xl[103X[133X
  
  [33X[0;0YThere are several shortcuts for this function, as shown in the example.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XIdealOfNumericalSemigroup([3,5],NumericalSemigroup(9,11));[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27X[3,5]+NumericalSemigroup(9,11);[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27Xlast=last2;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27X3+NumericalSemigroup(5,9);[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
  [4X[32X[104X
  
  [1X7.1-2 IsIdealOfNumericalSemigroup[101X
  
  [29X[2XIsIdealOfNumericalSemigroup[102X( [3XObj[103X ) [32X function
  
  [33X[0;0YTests if the object [3XObj[103X is an ideal of a numerical semigroup.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI:=[1..7]+NumericalSemigroup(7,19);;[127X[104X
    [4X[25Xgap>[125X [27XIsIdealOfNumericalSemigroup(I);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsIdealOfNumericalSemigroup(2);[127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  [1X7.1-3 MinimalGeneratingSystemOfIdealOfNumericalSemigroup[101X
  
  [29X[2XMinimalGeneratingSystemOfIdealOfNumericalSemigroup[102X( [3XI[103X ) [32X function
  [29X[2XMinimalGeneratingSystem[102X( [3XI[103X ) [32X function
  
  [33X[0;0Y[3XI[103X is an ideal of a numerical semigroup.[133X
  
  [33X[0;0YThe output is the minimal system of generators of [3XI[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI:=[3,5,9]+NumericalSemigroup(2,11);;[127X[104X
    [4X[25Xgap>[125X [27XMinimalGeneratingSystemOfIdealOfNumericalSemigroup(I);[127X[104X
    [4X[28X[ 3 ][128X[104X
    [4X[25Xgap>[125X [27XMinimalGeneratingSystem(I);                           [127X[104X
    [4X[28X[ 3 ][128X[104X
  [4X[32X[104X
  
  [1X7.1-4 GeneratorsOfIdealOfNumericalSemigroup[101X
  
  [29X[2XGeneratorsOfIdealOfNumericalSemigroup[102X( [3XI[103X ) [32X function
  [29X[2XGeneratorsOfIdealOfNumericalSemigroupNC[102X( [3XI[103X ) [32X function
  
  [33X[0;0Y[3XI[103X is an ideal of a numerical semigroup.[133X
  
  [33X[0;0YThe   output   of   [10XGeneratorsOfIdealOfNumericalSemigroup[110X  is  a  system  of
  generators  of the ideal. If the minimal system of generators is known, then
  it is used as output. [10XGeneratorsOfIdealOfNumericalSemigroupNC[110X always returns
  the set of generators stored in [3XI!.generators[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI:=[3,5,9]+NumericalSemigroup(2,11);;[127X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfIdealOfNumericalSemigroup(I);[127X[104X
    [4X[28X[ 3, 5, 9 ][128X[104X
    [4X[25Xgap>[125X [27XMinimalGeneratingSystemOfIdealOfNumericalSemigroup(I);[127X[104X
    [4X[28X[ 3 ][128X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfIdealOfNumericalSemigroup(I);[127X[104X
    [4X[28X[ 3 ][128X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfIdealOfNumericalSemigroupNC(I);[127X[104X
    [4X[28X[ 3, 5, 9 ][128X[104X
  [4X[32X[104X
  
  [1X7.1-5 AmbientNumericalSemigroupOfIdeal[101X
  
  [29X[2XAmbientNumericalSemigroupOfIdeal[102X( [3XI[103X ) [32X function
  
  [33X[0;0Y[3XI[103X is an ideal of a numerical semigroup, say [22XS[122X.[133X
  
  [33X[0;0YThe output is [22XS[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI:=[3,5,9]+NumericalSemigroup(2,11);;[127X[104X
    [4X[25Xgap>[125X [27XAmbientNumericalSemigroupOfIdeal(I);[127X[104X
    [4X[28X<Modular numerical semigroup satisfying 11x mod 22 <= x >[128X[104X
  [4X[32X[104X
  
  [1X7.1-6 SmallElementsOfIdealOfNumericalSemigroup[101X
  
  [29X[2XSmallElementsOfIdealOfNumericalSemigroup[102X( [3XI[103X ) [32X function
  [29X[2XSmallElements[102X( [3XI[103X ) [32X function
  
  [33X[0;0Y[3XI[103X is an ideal of a numerical semigroup.[133X
  
  [33X[0;0YThe  output  is a list with the elements in [3XI[103X that are less than or equal to
  the greatest integer not belonging to the ideal plus one.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI:=[3,5,9]+NumericalSemigroup(2,11);;[127X[104X
    [4X[25Xgap>[125X [27XSmallElementsOfIdealOfNumericalSemigroup(I);[127X[104X
    [4X[28X[ 3, 5, 7, 9, 11, 13 ][128X[104X
    [4X[25Xgap>[125X [27XSmallElements(I) = SmallElementsOfIdealOfNumericalSemigroup(I);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XJ:=[2,11]+NumericalSemigroup(2,11);;[127X[104X
    [4X[25Xgap>[125X [27XSmallElementsOfIdealOfNumericalSemigroup(J);[127X[104X
    [4X[28X[ 2, 4, 6, 8, 10 ][128X[104X
  [4X[32X[104X
  
  [1X7.1-7 BelongsToIdealOfNumericalSemigroup[101X
  
  [29X[2XBelongsToIdealOfNumericalSemigroup[102X( [3Xn[103X, [3XI[103X ) [32X function
  
  [33X[0;0Y[3XI[103X is an ideal of a numerical semigroup, [3Xn[103X is an integer.[133X
  
  [33X[0;0YThe output is true if [3Xn[103X belongs to [3XI[103X.[133X
  
  [33X[0;0Y[3X n in I[103X can be used for short.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XJ:=[2,11]+NumericalSemigroup(2,11);;[127X[104X
    [4X[25Xgap>[125X [27XBelongsToIdealOfNumericalSemigroup(9,J);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27X9 in J;[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XBelongsToIdealOfNumericalSemigroup(10,J);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27X10 in J;[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.1-8 SumIdealsOfNumericalSemigroup[101X
  
  [29X[2XSumIdealsOfNumericalSemigroup[102X( [3XI[103X, [3XJ[103X ) [32X function
  
  [33X[0;0Y[3XI, J[103X are ideals of a numerical semigroup.[133X
  
  [33X[0;0YThe output is the sum of both ideals [22X{ i+j | i∈ [3XI[103X, j∈ [3XJ[103X}[122X.[133X
  
  [33X[0;0Y[3XI + J[103X is a synonym of this function.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI:=[3,5,9]+NumericalSemigroup(2,11);;[127X[104X
    [4X[25Xgap>[125X [27XJ:=[2,11]+NumericalSemigroup(2,11);;[127X[104X
    [4X[25Xgap>[125X [27XI+J;[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27XMinimalGeneratingSystemOfIdealOfNumericalSemigroup(last);[127X[104X
    [4X[28X[ 5, 14 ][128X[104X
    [4X[25Xgap>[125X [27XSumIdealsOfNumericalSemigroup(I,J);[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27XMinimalGeneratingSystemOfIdealOfNumericalSemigroup(last);[127X[104X
    [4X[28X[ 5, 14 ][128X[104X
  [4X[32X[104X
  
  [1X7.1-9 MultipleOfIdealOfNumericalSemigroup[101X
  
  [29X[2XMultipleOfIdealOfNumericalSemigroup[102X( [3Xn[103X, [3XI[103X ) [32X function
  
  [33X[0;0Y[3XI[103X is an ideal of a numerical semigroup, [3Xn[103X is a non negative integer.[133X
  
  [33X[0;0YThe output is the ideal [22X[3XI[103X+⋯+[3XI[103X[122X ([3Xn[103X times).[133X
  
  [33X[0;0Y[3X n * I[103X can be used for short.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI:=[0,1]+NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27XMinimalGeneratingSystemOfIdealOfNumericalSemigroup(2*I);[127X[104X
    [4X[28X[ 0, 1, 2 ][128X[104X
  [4X[32X[104X
  
  [1X7.1-10 SubtractIdealsOfNumericalSemigroup[101X
  
  [29X[2XSubtractIdealsOfNumericalSemigroup[102X( [3XI[103X, [3XJ[103X ) [32X function
  
  [33X[0;0Y[3XI, J[103X are ideals of a numerical semigroup.[133X
  
  [33X[0;0YThe output is the ideal [22X{ z∈ Z | z+[3XJ[103X⊆ [3XI[103X}[122X.[133X
  
  [33X[0;0Y[3XI - J[103X is a synonym of this function.[133X
  
  [33X[0;0Y[22XS-[122X[3XJ[103X  is  a synonym of [22X(0+S)-[122X[3XJ[103X, if [22XS[122X is the ambient semigroup of [3XI[103X and [3XJ[103X. The
  following example appears in [HS04].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=NumericalSemigroup(14, 15, 20, 21, 25);;[127X[104X
    [4X[25Xgap>[125X [27XI:=[0,1]+S;;[127X[104X
    [4X[25Xgap>[125X [27XII:=S-I;;[127X[104X
    [4X[25Xgap>[125X [27XMinimalGeneratingSystemOfIdealOfNumericalSemigroup(I);[127X[104X
    [4X[28X[ 0, 1 ][128X[104X
    [4X[25Xgap>[125X [27XMinimalGeneratingSystemOfIdealOfNumericalSemigroup(II);[127X[104X
    [4X[28X[ 14, 20 ][128X[104X
    [4X[25Xgap>[125X [27XMinimalGeneratingSystemOfIdealOfNumericalSemigroup(I+II);[127X[104X
    [4X[28X[ 14, 15, 20, 21 ][128X[104X
  [4X[32X[104X
  
  [1X7.1-11 DifferenceOfIdealsOfNumericalSemigroup[101X
  
  [29X[2XDifferenceOfIdealsOfNumericalSemigroup[102X( [3XI[103X, [3XJ[103X ) [32X function
  
  [33X[0;0Y[3XI, J[103X are ideals of a numerical semigroup. [3XJ[103X must be contained in [3XI[103X.[133X
  
  [33X[0;0YThe output is the set [22X[3XI[103X∖ [3XJ[103X[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=NumericalSemigroup(14, 15, 20, 21, 25);;[127X[104X
    [4X[25Xgap>[125X [27XI:=[0,1]+S;[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27X2*I-2*I;[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27XI-I;[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27XDifferenceOfIdealsOfNumericalSemigroup(last2,last);[127X[104X
    [4X[28X[ 26, 27, 37, 38 ][128X[104X
  [4X[32X[104X
  
  [1X7.1-12 TranslationOfIdealOfNumericalSemigroup[101X
  
  [29X[2XTranslationOfIdealOfNumericalSemigroup[102X( [3Xk[103X, [3XI[103X ) [32X function
  
  [33X[0;0YGiven  an  ideal  [3XI[103X  of  a numerical semigroup S and an integer [3Xk[103X returns an
  ideal  of  the  numerical  semigroup  S generated by [22X{i_1+k,...,i_n+k}[122X where
  [22X{i_1,...,i_n}[122X is the system of generators of [3XI[103X.[133X
  
  [33X[0;0YAs  a synonym to [10XTranslationOfIdealOfNumericalSemigroup(k, I)[110X the expression
  [10Xk + I[110X may be used.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(13,23);;[127X[104X
    [4X[25Xgap>[125X [27Xl:=List([1..6], _ -> Random([8..34]));[127X[104X
    [4X[28X[ 22, 29, 34, 25, 10, 12 ][128X[104X
    [4X[25Xgap>[125X [27XI:=IdealOfNumericalSemigroup(l, s);;[127X[104X
    [4X[25Xgap>[125X [27XIt:=TranslationOfIdealOfNumericalSemigroup(7,I);[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27XIt2:=7+I;[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27XIt2=It;[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.1-13 IntersectionIdealsOfNumericalSemigroup[101X
  
  [29X[2XIntersectionIdealsOfNumericalSemigroup[102X( [3XI[103X, [3XJ[103X ) [32X function
  
  [33X[0;0YGiven two ideals [3XI[103X and [3XJ[103X of a numerical semigroup [3XS[103X returns the ideal of the
  numerical semigroup [3XS[103X which is the intersection of the ideals [3XI[103X and [3XJ[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xi:=IdealOfNumericalSemigroup([75,89],s);;[127X[104X
    [4X[25Xgap>[125X [27Xj:=IdealOfNumericalSemigroup([115,289],s);;[127X[104X
    [4X[25Xgap>[125X [27XIntersectionIdealsOfNumericalSemigroup(i,j);[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
  [4X[32X[104X
  
  [1X7.1-14 MaximalIdealOfNumericalSemigroup[101X
  
  [29X[2XMaximalIdealOfNumericalSemigroup[102X( [3XS[103X ) [32X function
  
  [33X[0;0YReturns the maximal ideal of the numerical semigroup [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XMaximalIdealOfNumericalSemigroup(NumericalSemigroup(3,7));[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
  [4X[32X[104X
  
  [1X7.1-15 CanonicalIdealOfNumericalSemigroup[101X
  
  [29X[2XCanonicalIdealOfNumericalSemigroup[102X( [3XS[103X ) [32X function
  
  [33X[0;0YComputes a canonical ideal of [3XS[103X ([BF06]): [22X{ x ∈ Z | g-x not ∈ S}[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(4,6,11);;[127X[104X
    [4X[25Xgap>[125X [27Xm:=MaximalIdealOfNumericalSemigroup(s);;[127X[104X
    [4X[25Xgap>[125X [27Xc:=CanonicalIdealOfNumericalSemigroup(s);[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27X(m-c)-c=m;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xid:=3+s;[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27X(id-c)-c=id;[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X7.2 [33X[0;0YOther functions for ideals[133X[101X
  
  [1X7.2-1 HilbertFunctionOfIdealOfNumericalSemigroup[101X
  
  [29X[2XHilbertFunctionOfIdealOfNumericalSemigroup[102X( [3Xn[103X, [3XI[103X ) [32X function
  
  [33X[0;0Y[3XI[103X  is an ideal of a numerical semigroup, [3Xn[103X is a non negative integer. [3XI[103X must
  be contained in its ambient semigroup.[133X
  
  [33X[0;0YThe output is the cardinality of the set [22X[3Xn[103X[3XI[103X∖ ([3Xn[103X+1)[3XI[103X[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI:=[6,9,11]+NumericalSemigroup(6,9,11);;[127X[104X
    [4X[25Xgap>[125X [27XList([1..7],n->HilbertFunctionOfIdealOfNumericalSemigroup(n,I));[127X[104X
    [4X[28X[ 3, 5, 6, 6, 6, 6, 6 ][128X[104X
  [4X[32X[104X
  
  [1X7.2-2 BlowUpIdealOfNumericalSemigroup[101X
  
  [29X[2XBlowUpIdealOfNumericalSemigroup[102X( [3XI[103X ) [32X function
  
  [33X[0;0Y[3XI[103X is an ideal of a numerical semigroup.[133X
  
  [33X[0;0YThe output is the ideal [22X⋃_n≥ 0 n[3XI[103X-n[3XI[103X[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI:=[0,2]+NumericalSemigroup(6,9,11);;[127X[104X
    [4X[25Xgap>[125X [27XBlowUpIdealOfNumericalSemigroup(I);;[127X[104X
    [4X[25Xgap>[125X [27XSmallElementsOfIdealOfNumericalSemigroup(last);[127X[104X
    [4X[28X[ 0, 2, 4, 6, 8 ][128X[104X
  [4X[32X[104X
  
  [1X7.2-3 ReductionNumberIdealNumericalSemigroup[101X
  
  [29X[2XReductionNumberIdealNumericalSemigroup[102X( [3XI[103X ) [32X function
  
  [33X[0;0Y[3XI[103X is an ideal of a numerical semigroup.[133X
  
  [33X[0;0YThe output is the least integer such that [22Xn [3XI[103X + i=(n+1)[3XI[103X[122X, where [22Xi=min([3XI[103X)[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI:=[0,2]+NumericalSemigroup(6,9,11);;[127X[104X
    [4X[25Xgap>[125X [27XReductionNumberIdealNumericalSemigroup(I);[127X[104X
    [4X[28X2[128X[104X
  [4X[32X[104X
  
  [1X7.2-4 BlowUpOfNumericalSemigroup[101X
  
  [29X[2XBlowUpOfNumericalSemigroup[102X( [3XS[103X ) [32X function
  
  [33X[0;0YIf [3XM[103X is the maximal ideal of the numerical semigroup, then the output is the
  numerical semigroup [22X⋃_n≥ 0 n[3XM[103X-n[3XM[103X[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(30, 35, 42, 47, 148, 153, 157, 169, 181, 193);;[127X[104X
    [4X[25Xgap>[125X [27XBlowUpOfNumericalSemigroup(s);[127X[104X
    [4X[28X<Numerical semigroup with 10 generators>[128X[104X
    [4X[25Xgap>[125X [27XSmallElementsOfNumericalSemigroup(last);[127X[104X
    [4X[28X[ 0, 5, 10, 12, 15, 17, 20, 22, 24, 25, 27, 29, 30, 32, 34, 35, 36, 37, 39,[128X[104X
    [4X[28X  40, 41, 42, 44 ][128X[104X
    [4X[25Xgap>[125X [27Xm:=MaximalIdealOfNumericalSemigroup(s);[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27XBlowUpIdealOfNumericalSemigroup(m);[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27XSmallElementsOfIdealOfNumericalSemigroup(last);[127X[104X
    [4X[28X[ 0, 5, 10, 12, 15, 17, 20, 22, 24, 25, 27, 29, 30, 32, 34, 35, 36, 37, 39,[128X[104X
    [4X[28X  40, 41, 42, 44 ][128X[104X
  [4X[32X[104X
  
  [1X7.2-5 MicroInvariantsOfNumericalSemigroup[101X
  
  [29X[2XMicroInvariantsOfNumericalSemigroup[102X( [3XS[103X ) [32X function
  
  [33X[0;0YReturns the microinvariants of the numerical semigroup [3XS[103X defined in [Eli01].
  For  their computation we have used the formula given in [BF06]. The Ap\'ery
  set of [3XS[103X and its blow up are involved in this computation.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(30, 35, 42, 47, 148, 153, 157, 169, 181, 193);;[127X[104X
    [4X[25Xgap>[125X [27Xbu:=BlowUpOfNumericalSemigroup(s);;[127X[104X
    [4X[25Xgap>[125X [27Xap:=AperyListOfNumericalSemigroupWRTElement(s,30);;[127X[104X
    [4X[25Xgap>[125X [27Xapbu:=AperyListOfNumericalSemigroupWRTElement(bu,30);;[127X[104X
    [4X[25Xgap>[125X [27X(ap-apbu)/30;[127X[104X
    [4X[28X[ 0, 4, 4, 3, 2, 1, 3, 4, 4, 3, 2, 3, 1, 4, 4, 3, 3, 1, 4, 4, 4, 3, 2, 4, 2,[128X[104X
    [4X[28X  5, 4, 3, 3, 2 ][128X[104X
    [4X[25Xgap>[125X [27XMicroInvariantsOfNumericalSemigroup(s)=last;[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.2-6 IsGradedAssociatedRingNumericalSemigroupCM[101X
  
  [29X[2XIsGradedAssociatedRingNumericalSemigroupCM[102X( [3XS[103X ) [32X function
  
  [33X[0;0YReturns  true if the graded ring associated to [22XK[[[3XS[103X]][122X is Cohen-Macaulay, and
  false  otherwise.  This test is the implementation of the algorithm given in
  [BF06].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(30, 35, 42, 47, 148, 153, 157, 169, 181, 193);;[127X[104X
    [4X[25Xgap>[125X [27XIsGradedAssociatedRingNumericalSemigroupCM(s);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XMicroInvariantsOfNumericalSemigroup(s);[127X[104X
    [4X[28X[ 0, 4, 4, 3, 2, 1, 3, 4, 4, 3, 2, 3, 1, 4, 4, 3, 3, 1, 4, 4, 4, 3, 2, 4, 2,[128X[104X
    [4X[28X  5, 4, 3, 3, 2 ][128X[104X
    [4X[25Xgap>[125X [27XList(AperyListOfNumericalSemigroupWRTElement(s,30),[127X[104X
    [4X[25X>[125X [27Xw->MaximumDegreeOfElementWRTNumericalSemigroup (w,s));[127X[104X
    [4X[28X[ 0, 1, 4, 1, 2, 1, 3, 1, 4, 3, 2, 3, 1, 1, 4, 3, 3, 1, 4, 1, 4, 3, 2, 4, 2,[128X[104X
    [4X[28X  5, 4, 3, 1, 2 ][128X[104X
    [4X[25Xgap>[125X [27Xlast=last2;[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(4,6,11);;[127X[104X
    [4X[25Xgap>[125X [27XIsGradedAssociatedRingNumericalSemigroupCM(s);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XMicroInvariantsOfNumericalSemigroup(s);[127X[104X
    [4X[28X[ 0, 2, 1, 1 ][128X[104X
    [4X[25Xgap>[125X [27XList(AperyListOfNumericalSemigroupWRTElement(s,4),[127X[104X
    [4X[25X>[125X [27Xw->MaximumDegreeOfElementWRTNumericalSemigroup(w,s));[127X[104X
    [4X[28X[ 0, 2, 1, 1 ][128X[104X
  [4X[32X[104X
  
  [1X7.2-7 IsMonomialNumericalSemigroup[101X
  
  [29X[2XIsMonomialNumericalSemigroup[102X( [3XS[103X ) [32X function
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YTests 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
  
  [1X7.2-8 AperyListOfIdealOfNumericalSemigroupWRTElement[101X
  
  [29X[2XAperyListOfIdealOfNumericalSemigroupWRTElement[102X( [3XI[103X, [3Xn[103X ) [32X function
  
  [33X[0;0YComputes the sets of elements [22Xx[122X of [3XI[103X such that [22Xx-[122X[3Xn[103X not in the ideal [3XI[103X, where
  [3Xn[103X  is  supposed  to be in the ambient semigroup of [3XI[103X. The element in the [22Xi[122Xth
  position of the output list (starting in 0) is congruent with [22Xi[122X modulo [3Xn[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(10,11,13);;[127X[104X
    [4X[25Xgap>[125X [27Xi:=[12,14]+s;;[127X[104X
    [4X[25Xgap>[125X [27XAperyListOfIdealOfNumericalSemigroupWRTElement(i,10);[127X[104X
    [4X[28X[ 40, 51, 12, 23, 14, 25, 36, 27, 38, 49 ][128X[104X
  [4X[32X[104X
  
  [1X7.2-9 AperyTableOfNumericalSemigroup[101X
  
  [29X[2XAperyTableOfNumericalSemigroup[102X( [3Xs[103X ) [32X function
  
  [33X[0;0YComputes  the  Apéry  table  associated  to  the  numerical  semigroup  [3Xs[103X as
  explained  in  [BJA13],  that is, a list containing the Apéry list of [3Xs[103X with
  respect  to  its  multiplicity and the Apéry lists of [22XkM[122X (with [22XM[122X the maximal
  ideal  of [3Xs[103X) with respect to the multiplicity of [3Xs[103X, for [22Xk∈{1,...,r}[122X, where [22Xr[122X
  is the reduction number of [22XM[122X (see ReductionNumberIdealNumericalSemigroup).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(10,11,13);;[127X[104X
    [4X[25Xgap>[125X [27XAperyTableOfNumericalSemigroup(s);[127X[104X
    [4X[28X[ [ 0, 11, 22, 13, 24, 35, 26, 37, 48, 39 ], [128X[104X
    [4X[28X  [ 10, 11, 22, 13, 24, 35, 26, 37, 48, 39 ], [128X[104X
    [4X[28X  [ 20, 21, 22, 23, 24, 35, 26, 37, 48, 39 ], [128X[104X
    [4X[28X  [ 30, 31, 32, 33, 34, 35, 36, 37, 48, 39 ], [128X[104X
    [4X[28X  [ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ] ][128X[104X
  [4X[32X[104X
  
  [1X7.2-10 StarClosureOfIdealOfNumericalSemigroup[101X
  
  [29X[2XStarClosureOfIdealOfNumericalSemigroup[102X( [3Xi[103X, [3Xis[103X ) [32X function
  
  [33X[0;0Y[3Xi[103X  is  an  ideal  and  [3Xis[103X  is  a  set of ideals (all from the same numerical
  semigroup[22Xs[122X).  The  output  is  [22Xi^*_is[122X,  where  [22X*_is[122X  is  the  star operation
  generated by [3Xis[103X: [22X(s-(s-i))⋂_k∈ is (k-(k-i))[122X. The implementation uses Section
  3 of [Spi14].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27XStarClosureOfIdealOfNumericalSemigroup([0,2]+s,[[0,4]+s]);;[127X[104X
    [4X[25Xgap>[125X [27XMinimalGeneratingSystemOfIdealOfNumericalSemigroup(last);[127X[104X
    [4X[28X[ 0, 2, 4 ][128X[104X
    [4X[28X						[128X[104X
  [4X[32X[104X
  
