  
  [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
  
  [33X[0;0YWe  describe  in  this  section  the  basic  functions to create and compute
  notable  elements  of  ideals  of  numerical  semigroups.  We  also  include
  iterators and functions to treat ideals as lists, which easies the access to
  its elements.[133X
  
  [1X7.1-1 IdealOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XIdealOfNumericalSemigroup[102X( [3Xl[103X, [3XS[103X ) [32X function[133X
  [33X[1;0Y[29X[2X+[102X( [3Xl[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup and [3Xl[103X a list of integers. The 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
  
  [33X[1;0Y[29X[2XIsIdealOfNumericalSemigroup[102X( [3XObj[103X ) [32X function[133X
  
  [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 MinimalGenerators[101X
  
  [33X[1;0Y[29X[2XMinimalGenerators[102X( [3XI[103X ) [32X attribute[133X
  [33X[1;0Y[29X[2XMinimalGeneratingSystem[102X( [3XI[103X ) [32X attribute[133X
  [33X[1;0Y[29X[2XMinimalGeneratingSystemOfIdealOfNumericalSemigroup[102X( [3XI[103X ) [32X attribute[133X
  
  [33X[0;0Y[3XI[103X  is an ideal of a numerical semigroup. The output is the minimal system of
  generators of [3XI[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XMinimalGenerators([3,5]+NumericalSemigroup(2,11));[127X[104X
    [4X[28X[ 3 ][128X[104X
    [4X[25Xgap>[125X [27XI:=[3,5,9]+NumericalSemigroup(2,11);;[127X[104X
    [4X[25Xgap>[125X [27XMinimalGeneratingSystem(I);[127X[104X
    [4X[28X[ 3 ][128X[104X
    [4X[25Xgap>[125X [27XMinimalGeneratingSystemOfIdealOfNumericalSemigroup(I);[127X[104X
    [4X[28X[ 3 ][128X[104X
  [4X[32X[104X
  
  [1X7.1-4 Generators[101X
  
  [33X[1;0Y[29X[2XGenerators[102X( [3XI[103X ) [32X attribute[133X
  [33X[1;0Y[29X[2XGeneratorsOfIdealOfNumericalSemigroup[102X( [3XI[103X ) [32X attribute[133X
  
  [33X[0;0Y[3XI[103X is an ideal of a numerical semigroup. The output is a system of generators
  of the ideal.[133X
  
  [33X[0;0YRemark: from Version 1.0.1 on, this value does not change even when a set of
  minimal generators is computed.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI:=[3,5,9]+NumericalSemigroup(2,11);;[127X[104X
    [4X[25Xgap>[125X [27XGenerators(I);[127X[104X
    [4X[28X[ 3, 5, 9 ][128X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfIdealOfNumericalSemigroup(I);[127X[104X
    [4X[28X[ 3, 5, 9 ][128X[104X
    [4X[25Xgap>[125X [27XMinimalGenerators(I);[127X[104X
    [4X[28X[ 3 ][128X[104X
  [4X[32X[104X
  
  [1X7.1-5 AmbientNumericalSemigroupOfIdeal[101X
  
  [33X[1;0Y[29X[2XAmbientNumericalSemigroupOfIdeal[102X( [3XI[103X ) [32X function[133X
  
  [33X[0;0Y[3XI[103X is an ideal of a numerical semigroup, say [22XS[122X. The 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<Numerical semigroup with 2 generators>[128X[104X
  [4X[32X[104X
  
  [1X7.1-6 IsIntegral[101X
  
  [33X[1;0Y[29X[2XIsIntegral[102X( [3XI[103X ) [32X property[133X
  [33X[1;0Y[29X[2XIsIntegralIdealOfNumericalSemigroup[102X( [3XI[103X ) [32X property[133X
  
  [33X[0;0Y[3XI[103X is an ideal of a numerical semigroup, say [22XS[122X. Detects if [22XI⊆ S[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,7,5);;[127X[104X
    [4X[25Xgap>[125X [27XIsIntegral(10+s);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsIntegral(4+s);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsIntegralIdealOfNumericalSemigroup(10+s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.1-7 SmallElements[101X
  
  [33X[1;0Y[29X[2XSmallElements[102X( [3XI[103X ) [32X function[133X
  [33X[1;0Y[29X[2XSmallElementsOfIdealOfNumericalSemigroup[102X( [3XI[103X ) [32X function[133X
  
  [33X[0;0Y[3XI[103X  is  an  ideal  of  a  numerical  semigroup. The 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 [27XSmallElements(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 [27XSmallElements(J);[127X[104X
    [4X[28X[ 2, 4, 6, 8, 10 ][128X[104X
  [4X[32X[104X
  
  [1X7.1-8 Conductor[101X
  
  [33X[1;0Y[29X[2XConductor[102X( [3XNS[103X ) [32X attribute[133X
  [33X[1;0Y[29X[2XConductorOfIdealOfNumericalSemigroup[102X( [3XI[103X ) [32X function[133X
  
  [33X[0;0Y[3XI[103X is an ideal of a numerical semigroup. The output is the largest element in
  [3XSmallElements(I)[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,7,5);;[127X[104X
    [4X[25Xgap>[125X [27XConductor(10+s);[127X[104X
    [4X[28X15[128X[104X
    [4X[25Xgap>[125X [27XConductorOfIdealOfNumericalSemigroup(10+s);[127X[104X
    [4X[28X15[128X[104X
  [4X[32X[104X
  
  [1X7.1-9 Minimum[101X
  
  [33X[1;0Y[29X[2XMinimum[102X( [3XI[103X ) [32X operation[133X
  
  [33X[0;0Y[3XI[103X is an ideal of a numerical semigroup. The output is the minimum of [3XI[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XJ:=[2,11]+NumericalSemigroup(2,11);;[127X[104X
    [4X[25Xgap>[125X [27XMinimum(J);[127X[104X
    [4X[28X2[128X[104X
  [4X[32X[104X
  
  [1X7.1-10 BelongsToIdealOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XBelongsToIdealOfNumericalSemigroup[102X( [3Xn[103X, [3XI[103X ) [32X function[133X
  [33X[1;0Y[29X[2X\in[102X( [3Xn[103X, [3XI[103X ) [32X operation[133X
  
  [33X[0;0Y[3XI[103X  is an ideal of a numerical semigroup, [3Xn[103X is an integer. The output is [10Xtrue[110X
  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-11 ElementNumber_IdealOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XElementNumber_IdealOfNumericalSemigroup[102X( [3XI[103X, [3Xr[103X ) [32X function[133X
  
  [33X[0;0Y[3XI[103X  is  an ideal of a numerical semigroup and [3Xr[103X is an integer. It returns the
  [3Xr[103X-th element of [3XI[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI := [2,5]+ NumericalSemigroup(7,8,17);;[127X[104X
    [4X[25Xgap>[125X [27XElementNumber_IdealOfNumericalSemigroup(I,10);[127X[104X
    [4X[28X19[128X[104X
  [4X[32X[104X
  
  [1X7.1-12 NumberElement_IdealOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XNumberElement_IdealOfNumericalSemigroup[102X( [3XI[103X, [3Xr[103X ) [32X function[133X
  
  [33X[0;0Y[3XI[103X  is  an ideal of a numerical semigroup and [3Xr[103X is an integer. It returns the
  position of [3Xr[103X in [3XI[103X (and [10Xfail[110X if the integer is not in the ideal).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI := [2,5]+ NumericalSemigroup(7,8,17);;[127X[104X
    [4X[25Xgap>[125X [27XNumberElement_IdealOfNumericalSemigroup(I,19);[127X[104X
    [4X[28X10[128X[104X
  [4X[32X[104X
  
  [1X7.1-13 \[ \][101X
  
  [33X[1;0Y[29X[2X\[ \][102X( [3XI[103X, [3Xr[103X ) [32X operation[133X
  
  [33X[0;0Y[3XI[103X  is  an ideal of a numerical semigroup and [3Xr[103X is an integer. It returns the
  [3Xr[103X-th element of [3XI[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI := [2,5]+ NumericalSemigroup(7,8,17);;[127X[104X
    [4X[25Xgap>[125X [27XI[10];[127X[104X
    [4X[28X19[128X[104X
  [4X[32X[104X
  
  [1X7.1-14 \{ \}[101X
  
  [33X[1;0Y[29X[2X\{ \}[102X( [3XI[103X, [3Xls[103X ) [32X operation[133X
  
  [33X[0;0Y[3XI[103X  is  an  ideal  of  a numerical semigroup and [3Xls[103X is a list of integers. It
  returns the list [3X[I[r] : r in ls][103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI := [2,5]+ NumericalSemigroup(7,8,17);;[127X[104X
    [4X[25Xgap>[125X [27XI{[10..13]};[127X[104X
    [4X[28X[ 19, 20, 21, 22 ][128X[104X
  [4X[32X[104X
  
  [1X7.1-15 Iterator[101X
  
  [33X[1;0Y[29X[2XIterator[102X( [3XI[103X ) [32X operation[133X
  
  [33X[0;0Y[3XI[103X is an ideal of a numerical semigroup. It returns an iterator over [3XI[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(4,10,11);;[127X[104X
    [4X[25Xgap>[125X [27Xi:=[2,3]+s;;[127X[104X
    [4X[25Xgap>[125X [27Xiter:=Iterator(i);[127X[104X
    [4X[28X<iterator>[128X[104X
    [4X[25Xgap>[125X [27XNextIterator(iter);[127X[104X
    [4X[28X2[128X[104X
    [4X[25Xgap>[125X [27XNextIterator(iter);[127X[104X
    [4X[28X3[128X[104X
    [4X[25Xgap>[125X [27XNextIterator(iter);[127X[104X
    [4X[28X6[128X[104X
    [4X[25Xgap>[125X [27XSmallElements(i);[127X[104X
    [4X[28X[ 2, 3, 6, 7, 10 ][128X[104X
  [4X[32X[104X
  
  [1X7.1-16 SumIdealsOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XSumIdealsOfNumericalSemigroup[102X( [3XI[103X, [3XJ[103X ) [32X function[133X
  [33X[1;0Y[29X[2X+[102X( [3XI[103X, [3XJ[103X ) [32X function[133X
  
  [33X[0;0Y[3XI,  J[103X  are  ideals  of  a numerical semigroup. The output is the sum of both
  ideals [22X{ i+j | i∈ [3XI[103X, j∈ [3XJ[103X}[122X.[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-17 MultipleOfIdealOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XMultipleOfIdealOfNumericalSemigroup[102X( [3Xn[103X, [3XI[103X ) [32X function[133X
  [33X[1;0Y[29X[2X*[102X( [3Xn[103X, [3XI[103X ) [32X function[133X
  
  [33X[0;0Y[3XI[103X  is  an  ideal  of a numerical semigroup, [3Xn[103X is a non negative integer. The
  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 [27XMultipleOfIdealOfNumericalSemigroup(2,I) = 2*I;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XMinimalGeneratingSystemOfIdealOfNumericalSemigroup(2*I);[127X[104X
    [4X[28X[ 0, 1, 2 ][128X[104X
  [4X[32X[104X
  
  [1X7.1-18 SubtractIdealsOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XSubtractIdealsOfNumericalSemigroup[102X( [3XI[103X, [3XJ[103X ) [32X function[133X
  [33X[1;0Y[29X[2X-[102X( [3XI[103X, [3XJ[103X ) [32X function[133X
  
  [33X[0;0Y[3XI,  J[103X  are ideals of a numerical semigroup. The output is the ideal [22X{ z∈ Z |
  z+[3XJ[103X⊆ [3XI[103X}[122X.[133X
  
  [33X[0;0Y[22XI - J[122X can be used as a short for [10XSubtractIdealsOfNumericalSemigroup(I,J)[110X.[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 [27XMinimalGenerators(I);[127X[104X
    [4X[28X[ 0, 1 ][128X[104X
    [4X[25Xgap>[125X [27XMinimalGenerators(II);[127X[104X
    [4X[28X[ 14, 20 ][128X[104X
    [4X[25Xgap>[125X [27XMinimalGenerators(I+II);[127X[104X
    [4X[28X[ 14, 15, 20, 21 ][128X[104X
  [4X[32X[104X
  
  [1X7.1-19 Difference[101X
  
  [33X[1;0Y[29X[2XDifference[102X( [3XI[103X, [3XJ[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XDifferenceOfIdealsOfNumericalSemigroup[102X( [3XI[103X, [3XJ[103X ) [32X function[133X
  
  [33X[0;0Y[3XI,  J[103X  are  ideals  of  a numerical semigroup. [3XJ[103X must be contained in [3XI[103X. The
  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 [27Xii := 2*I-2*I;[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27Xi := I-I;[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27X Difference(last2,last);[127X[104X
    [4X[28X[ 26, 27, 37, 38 ][128X[104X
    [4X[25Xgap>[125X [27XDifferenceOfIdealsOfNumericalSemigroup(ii,i);[127X[104X
    [4X[28X[ 26, 27, 37, 38 ][128X[104X
    [4X[25Xgap>[125X [27XDifference(i,ii);[127X[104X
    [4X[28X[  ][128X[104X
  [4X[32X[104X
  
  [1X7.1-20 TranslationOfIdealOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XTranslationOfIdealOfNumericalSemigroup[102X( [3Xk[103X, [3XI[103X ) [32X function[133X
  [33X[1;0Y[29X[2X+[102X( [3Xk[103X, [3XI[103X ) [32X function[133X
  
  [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-21 Intersection[101X
  
  [33X[1;0Y[29X[2XIntersection[102X( [3XI[103X, [3XJ[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XIntersectionIdealsOfNumericalSemigroup[102X( [3XI[103X, [3XJ[103X ) [32X function[133X
  
  [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 [27XIntersection(i,j);[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27XIntersectionIdealsOfNumericalSemigroup(i,j) = Intersection(i,j);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.1-22 MaximalIdeal[101X
  
  [33X[1;0Y[29X[2XMaximalIdeal[102X( [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XMaximalIdealOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0YReturns the maximal ideal of the numerical semigroup [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs := NumericalSemigroup(3,7);;                   [127X[104X
    [4X[25Xgap>[125X [27XMaximalIdeal(s);[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27XMaximalIdealOfNumericalSemigroup(s) = MaximalIdeal(s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.1-23 CanonicalIdeal[101X
  
  [33X[1;0Y[29X[2XCanonicalIdeal[102X( [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XCanonicalIdealOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a  numerical  semigroup. Computes the (standard) canonical ideal of [3XS[103X
  ([BF97]): [22X{ x ∈ Z | g-x not ∈ S}[122X, where [22Xg[122X is the Frobenius number of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(4,6,11);;[127X[104X
    [4X[25Xgap>[125X [27Xm:=MaximalIdeal(s);;[127X[104X
    [4X[25Xgap>[125X [27Xc:=CanonicalIdeal(s);[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27Xc-(c-m)=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 [27Xc-(c-id)=id;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XCanonicalIdealOfNumericalSemigroup(s) = c;[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.1-24 IsCanonicalIdeal[101X
  
  [33X[1;0Y[29X[2XIsCanonicalIdeal[102X( [3XE[103X ) [32X property[133X
  [33X[1;0Y[29X[2XIsCanonicalIdealOfNumericalSemigroup[102X( [3XE[103X ) [32X property[133X
  
  [33X[0;0Y[3XE[103X  is  an  ideal  of  a  numerical  semigroup,  say  [22XS[122X. Determines if [3XE[103X is a
  translation of the canonical ideal of [22XS[122X, or equivalently, for every ideal [22XJ[122X,
  [22XE-(E-J)=J[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27Xc:=3+CanonicalIdeal(s);;[127X[104X
    [4X[25Xgap>[125X [27Xc-(c-(3+s))=3+s;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCanonicalIdeal(c);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCanonicalIdealOfNumericalSemigroup(c);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.1-25 TypeSequence[101X
  
  [33X[1;0Y[29X[2XTypeSequence[102X( [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XTypeSequenceOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YComputes  the  type sequence of a numerical semigroup. That is, the secuence
  [22Xt_i([3XS[103X)=♯([3XS[103X(i)∖  [3XS[103X(i-1))[122X,  with [22X[3XS[103X(i)={ s∈ S∣ sge s_i}[122X and [22Xs_i[122X the [22Xi[122Xth element
  of [3XS[103X.[133X
  
  [33X[0;0YThis function is the implementation of the algorithm given in [BDF97].[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 [27XTypeSequence(s);[127X[104X
    [4X[28X[ 13, 3, 4, 4, 7, 3, 3, 3, 2, 2, 2, 3, 3, 2, 4, 3, 2, 1, 3, 2, 1, 1, 2, 2, 1,[128X[104X
    [4X[28X  1, 1, 2, 2, 1, 3, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1,[128X[104X
    [4X[28X  1, 1, 1 ][128X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(4,6,11);;[127X[104X
    [4X[25Xgap>[125X [27XTypeSequenceOfNumericalSemigroup(s);[127X[104X
    [4X[28X[ 1, 1, 1, 1, 1, 1, 1 ][128X[104X
  [4X[32X[104X
  
  
  [1X7.2 [33X[0;0YBlow ups and closures[133X[101X
  
  [33X[0;0YThe  blow  up  of  an  ideal  [22XI[122X of a numerical semigroup is the ideal [22X⋃_n≥ 0
  n[3XI[103X-n[3XI[103X[122X.  In  this  section  we  provide  functions to compute the blow up and
  related invariants.[133X
  
  [1X7.2-1 HilbertFunctionOfIdealOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XHilbertFunctionOfIdealOfNumericalSemigroup[102X( [3Xn[103X, [3XI[103X ) [32X function[133X
  
  [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. The 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 HilbertFunction[101X
  
  [33X[1;0Y[29X[2XHilbertFunction[102X( [3XI[103X ) [32X attribute[133X
  
  [33X[0;0Y[3XI[103X  is  an ideal of a numerical semigroup. [3XI[103X must be contained in its ambient
  semigroup (integral ideal). The output is a function that maps to each [22Xn[122X the
  cardinality of the set [22Xn[3XI[103X∖ (n+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->HilbertFunction(I)(n));[127X[104X
    [4X[28X[ 3, 5, 6, 6, 6, 6, 6 ][128X[104X
  [4X[32X[104X
  
  [1X7.2-3 BlowUp[101X
  
  [33X[1;0Y[29X[2XBlowUp[102X( [3XI[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XBlowUpIdealOfNumericalSemigroup[102X( [3XI[103X ) [32X function[133X
  
  [33X[0;0Y[3XI[103X  is  an  ideal  of  a  numerical semigroup. The 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 [27XBlowUp(I);[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27XSmallElements(last);[127X[104X
    [4X[28X[ 0, 2, 4, 6, 8 ][128X[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-4 ReductionNumber[101X
  
  [33X[1;0Y[29X[2XReductionNumber[102X( [3XI[103X ) [32X attribute[133X
  [33X[1;0Y[29X[2XReductionNumberIdealNumericalSemigroup[102X( [3XI[103X ) [32X attribute[133X
  
  [33X[0;0Y[3XI[103X is an ideal of a numerical semigroup. The 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 [27XReductionNumber(I);[127X[104X
    [4X[28X2[128X[104X
    [4X[25Xgap>[125X [27XReductionNumberIdealNumericalSemigroup(I);[127X[104X
    [4X[28X2[128X[104X
  [4X[32X[104X
  
  [1X7.2-5 BlowUp[101X
  
  [33X[1;0Y[29X[2XBlowUp[102X( [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XBlowUpOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a  numerical  semigroup.  If  [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 [27XBlowUp(s);[127X[104X
    [4X[28X<Numerical semigroup with 10 generators>[128X[104X
    [4X[25Xgap>[125X [27XSmallElements(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 [27XBlowUpOfNumericalSemigroup(s);;[127X[104X
    [4X[25Xgap>[125X [27XSmallElements(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:=MaximalIdeal(s);[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27XBlowUp(m);[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27XSmallElements(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-6 LipmanSemigroup[101X
  
  [33X[1;0Y[29X[2XLipmanSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0YThis is just a synonym of [2XBlowUpOfNumericalSemigroup[102X ([14X7.2-5[114X).[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 [27XLipmanSemigroup(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[32X[104X
  
  [1X7.2-7 RatliffRushNumber[101X
  
  [33X[1;0Y[29X[2XRatliffRushNumber[102X( [3XI[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XRatliffRushNumberOfIdealOfNumericalSemigroup[102X( [3XI[103X ) [32X function[133X
  
  [33X[0;0Y[3XI[103X is an ideal of a numerical semigroup. The output is the least integer such
  that [22X(n+1)[3XI[103X-n[3XI[103X[122X is the Ratliff-Rush closure of [3XI[103X (see [DGH01]).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI:=[0,2]+NumericalSemigroup(6,9,11);;[127X[104X
    [4X[25Xgap>[125X [27XRatliffRushNumber(I);[127X[104X
    [4X[28X1[128X[104X
    [4X[25Xgap>[125X [27XRatliffRushNumberOfIdealOfNumericalSemigroup(I);[127X[104X
    [4X[28X1[128X[104X
  [4X[32X[104X
  
  [1X7.2-8 RatliffRushClosure[101X
  
  [33X[1;0Y[29X[2XRatliffRushClosure[102X( [3XI[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XRatliffRushClosureOfIdealOfNumericalSemigroup[102X( [3XI[103X ) [32X function[133X
  
  [33X[0;0Y[3XI[103X  is  an  ideal  of  a  numerical semigroup. The output is the Ratliff-Rush
  closure of [3XI[103X: [22X⋃_n∈ N}(n+1)[3XI[103X-n[3XI[103X[122X (see [DGH01]).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI:=[0,2]+NumericalSemigroup(6,9,11);;[127X[104X
    [4X[25Xgap>[125X [27XRatliffRushClosure(I);[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
    [4X[25Xgap>[125X [27XMinimalGenerators(last);[127X[104X
    [4X[28X[ 0, 2, 4 ][128X[104X
    [4X[25Xgap>[125X [27XRatliffRushClosureOfIdealOfNumericalSemigroup(I) = RatliffRushClosure(I);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.2-9 AsymptoticRatliffRushNumber[101X
  
  [33X[1;0Y[29X[2XAsymptoticRatliffRushNumber[102X( [3XI[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XAsymptoticRatliffRushNumberOfIdealOfNumericalSemigroup[102X( [3XI[103X ) [32X function[133X
  
  [33X[0;0Y[3XI[103X  is an ideal of a numerical semigroup. The output is the least [22Xn[122X such that
  the Ratliff-Rush closure of [22Xm[3XI[103X[122X equals [22Xm[3XI[103X[122X for all [22Xmge n[122X (see [DGH01]).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XI:=[0,2]+NumericalSemigroup(6,9,11);;[127X[104X
    [4X[25Xgap>[125X [27XAsymptoticRatliffRushNumber(I);[127X[104X
    [4X[28X2[128X[104X
    [4X[25Xgap>[125X [27XAsymptoticRatliffRushNumberOfIdealOfNumericalSemigroup(I);[127X[104X
    [4X[28X2[128X[104X
  [4X[32X[104X
  
  [1X7.2-10 MultiplicitySequence[101X
  
  [33X[1;0Y[29X[2XMultiplicitySequence[102X( [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XMultiplicitySequenceOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is a numerical semigroup. The output is a list with the multiplicities of
  the sequence [22XS⊆ L(S)⊆ ⋯ ⊆ N[122X, where [22XL(⋅)[122X means [2XLipmanSemigroup[102X ([14X7.2-6[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5);;[127X[104X
    [4X[25Xgap>[125X [27XMultiplicitySequence(s);[127X[104X
    [4X[28X[ 3, 2, 1 ][128X[104X
    [4X[25Xgap>[125X [27XMultiplicitySequenceOfNumericalSemigroup(s);[127X[104X
    [4X[28X[ 3, 2, 1 ][128X[104X
  [4X[32X[104X
  
  [1X7.2-11 MicroInvariants[101X
  
  [33X[1;0Y[29X[2XMicroInvariants[102X( [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XMicroInvariantsOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [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éry
  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 [27XMicroInvariants(s)=last;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XMicroInvariantsOfNumericalSemigroup(s)=MicroInvariants(s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.2-12 AperyList[101X
  
  [33X[1;0Y[29X[2XAperyList[102X( [3XI[103X, [3Xn[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XAperyListOfIdealOfNumericalSemigroupWRTElement[102X( [3XI[103X, [3Xn[103X ) [32X function[133X
  
  [33X[0;0Y[3XI[103X  is an ideal and [3Xn[103X is an integer. Computes the set of elements [22Xx[122X of [3XI[103X such
  that  [22Xx-[122X[3Xn[103X  is  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 [27XAperyList(i,10);[127X[104X
    [4X[28X[ 40, 51, 12, 23, 14, 25, 36, 27, 38, 49 ][128X[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-13 AperyTable[101X
  
  [33X[1;0Y[29X[2XAperyTable[102X( [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XAperyTableOfNumericalSemigroup[102X( [3Xs[103X ) [32X function[133X
  
  [33X[0;0YComputes  the  Apéry  table  associated  to  the  numerical  semigroup  [3Xs[103X as
  explained  in [CBJZA13], 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 [2XReductionNumberIdealNumericalSemigroup[102X
  ([14X7.2-4[114X)).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(10,11,13);;[127X[104X
    [4X[25Xgap>[125X [27XAperyTable(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[25Xgap>[125X [27XAperyTableOfNumericalSemigroup(s) = AperyTable(s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.2-14 StarClosureOfIdealOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XStarClosureOfIdealOfNumericalSemigroup[102X( [3Xi[103X, [3Xis[103X ) [32X function[133X
  
  [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 [Spi15].[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 [27XMinimalGenerators(last);[127X[104X
    [4X[28X[ 0, 2, 4 ][128X[104X
  [4X[32X[104X
  
  
  [1X7.3 [33X[0;0YPatterns for ideals[133X[101X
  
  [33X[0;0YIn  this  section we document the functions implemented by K. Stokes related
  to  patterns  of  ideals  in  numerical  semigroups.  The correctness of the
  algorithms can be found in [Sto15].[133X
  
  [1X7.3-1 IsAdmissiblePattern[101X
  
  [33X[1;0Y[29X[2XIsAdmissiblePattern[102X( [3Xp[103X ) [32X function[133X
  
  [33X[0;0Y[3Xp[103X is the list of integers that are the coefficients of a pattern.[133X
  
  [33X[0;0YReturns  [10Xtrue[110X  or  [10Xfalse[110X  depending if the pattern is admissible or not (see
  [BAGS06]).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XIsAdmissiblePattern([1,1,-1]);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsAdmissiblePattern([1,-2]);[127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  [1X7.3-2 IsStronglyAdmissiblePattern[101X
  
  [33X[1;0Y[29X[2XIsStronglyAdmissiblePattern[102X( [3Xp[103X ) [32X function[133X
  
  [33X[0;0Y[3Xp[103X is the list of integers that are the coefficients of a pattern.[133X
  
  [33X[0;0YReturns [10Xtrue[110X or [10Xfalse[110X depending if the pattern is strongly admissible or not
  (see [BAGS06]).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XIsAdmissiblePattern([1,-1]);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsStronglyAdmissiblePattern([1,-1]);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsStronglyAdmissiblePattern([1,1,-1]);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.3-3 AsIdealOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XAsIdealOfNumericalSemigroup[102X( [3XI[103X, [3XT[103X ) [32X function[133X
  
  [33X[0;0Y[3XI[103X  is  an  ideal of a numerical semigroup [22XS[122X, and [3XT[103X is a numerical semigroup.
  Detects  if  [3XI[103X  is an ideal of [3XT[103X and contained in [3XT[103X (integral ideal), and if
  so,  returns  [3XI[103X  as  an ideal of [3XT[103X. It returns [10Xfail[110X if [3XI[103X is an ideal of some
  semigroup but not an integral ideal of [3XT[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,7,5);;[127X[104X
    [4X[25Xgap>[125X [27Xt:=NumericalSemigroup(10,11,14);;[127X[104X
    [4X[25Xgap>[125X [27XAsIdealOfNumericalSemigroup(10+s,t);[127X[104X
    [4X[28Xfail[128X[104X
    [4X[25Xgap>[125X [27XAsIdealOfNumericalSemigroup(100+s,t);[127X[104X
    [4X[28X<Ideal of numerical semigroup>[128X[104X
  [4X[32X[104X
  
  [1X7.3-4 BoundForConductorOfImageOfPattern[101X
  
  [33X[1;0Y[29X[2XBoundForConductorOfImageOfPattern[102X( [3Xp[103X, [3XC[103X ) [32X function[133X
  
  [33X[0;0Y[3Xp[103X  is  the  list  of  integers  that  are  the coefficients of an admissible
  pattern.  [3XC[103X is a positive integer. Calculates an upper bound of the smallest
  element [22XK[122X in [22Xp(I)[122X such that all integers larger than [22XK[122X belong to [22Xp(I)[122X, where
  [22XI[122X  is  an  ideal of a numerical semigroup. Instead of taking [22XI[122X as parameter,
  the function takes [22XC[122X, which is assumed to be the conductor of [22XI[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XBoundForConductorOfImageOfPattern([1,1,-1],10);[127X[104X
    [4X[28X10[128X[104X
  [4X[32X[104X
  
  [1X7.3-5 ApplyPatternToIdeal[101X
  
  [33X[1;0Y[29X[2XApplyPatternToIdeal[102X( [3Xp[103X, [3XI[103X ) [32X function[133X
  
  [33X[0;0Y[3Xp[103X is the list of integers that are the coefficients of a strongly admissible
  pattern. [3XI[103X is an ideal of a numerical semigroup.[133X
  
  [33X[0;0YOutputs  [22Xp(I)[122X,  represented  as  [10X[d,p(I)/d][110X,  where  [10Xd[110X  is  the  gcd  of the
  coefficients of [3Xp[103X. All elements of [22Xp(I)[122X are divisible by [22Xd[122X, and [22Xp(I)/d[122X is an
  ideal  of  some  numerical semigroup. It is returned as the maximal ideal of
  the  numerical  semigroup  [22Xp(I)/d ∪ {0}[122X. The ambient numerical semigroup can
  later be changed with the function [10XAsIdealOfNumericalSemigroup[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,7,5);;[127X[104X
    [4X[25Xgap>[125X [27Xi:=10+s;;[127X[104X
    [4X[25Xgap>[125X [27XApplyPatternToIdeal([1,1,-1],i);[127X[104X
    [4X[28X[ 1, <Ideal of numerical semigroup> ][128X[104X
  [4X[32X[104X
  
  [1X7.3-6 ApplyPatternToNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XApplyPatternToNumericalSemigroup[102X( [3Xp[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3Xp[103X is the list of integers that are the coefficients of a strongly admissible
  pattern. [3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YOutputs [10XApplyPatternToIdeal(p,0+S)[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,7,5);;[127X[104X
    [4X[25Xgap>[125X [27XApplyPatternToNumericalSemigroup([1,1,-1],s);[127X[104X
    [4X[28X[ 1, <Ideal of numerical semigroup> ][128X[104X
    [4X[25Xgap>[125X [27XSmallElements(last[2]);[127X[104X
    [4X[28X[ 0, 3, 5 ][128X[104X
  [4X[32X[104X
  
  [1X7.3-7 IsAdmittedPatternByIdeal[101X
  
  [33X[1;0Y[29X[2XIsAdmittedPatternByIdeal[102X( [3Xp[103X, [3XI[103X, [3XJ[103X ) [32X function[133X
  
  [33X[0;0Y[3Xp[103X is the list of integers that are the coefficients of a strongly admissible
  pattern. [3XI[103X and [3XJ[103X are ideals of certain numerical semigroups.[133X
  
  [33X[0;0YTests whether or not [22Xp(I)[122X is contained in [3XJ[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,7,5);;[127X[104X
    [4X[25Xgap>[125X [27Xi:=[3,5]+s;;[127X[104X
    [4X[25Xgap>[125X [27XIsAdmittedPatternByIdeal([1,1,-1],i,i);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsAdmittedPatternByIdeal([1,1,-1],i,0+s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.3-8 IsAdmittedPatternByNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XIsAdmittedPatternByNumericalSemigroup[102X( [3Xp[103X, [3XS[103X, [3XT[103X ) [32X function[133X
  
  [33X[0;0Y[3Xp[103X is the list of integers that are the coefficients of a strongly admissible
  pattern. [3XS[103X and [3XT[103X are numerical semigroups.[133X
  
  [33X[0;0YTests whether or not [22Xp(S)[122X is contained in [3XT[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,7,5);;[127X[104X
    [4X[25Xgap>[125X [27XIsAdmittedPatternByNumericalSemigroup([1,1,-1],s,s);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsArfNumericalSemigroup(s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X7.4 [33X[0;0YGraded associated ring of numerical semigroup[133X[101X
  
  [33X[0;0YThis  section  contains  several  functions to test properties of the graded
  (with  respect  to  the  maximal  ideal)  semigroup  ring  [22XK[[S]][122X  (with [22XS[122X a
  numerical semigroup).[133X
  
  [1X7.4-1 IsGradedAssociatedRingNumericalSemigroupCM[101X
  
  [33X[1;0Y[29X[2XIsGradedAssociatedRingNumericalSemigroupCM[102X( [3XS[103X ) [32X property[133X
  
  [33X[0;0Y[3XS[103X  is  a  numerical semigroup. Returns [10Xtrue[110X if the graded ring associated to
  [22XK[[[3XS[103X]][122X   is   Cohen-Macaulay,   and   [10Xfalse[110X  otherwise.  This  test  is  the
  implementation of the algorithm given in [BF06].[133X
  
  [33X[0;0YThis    filter   implies   [2XIsGradedAssociatedRingNumericalSemigroupBuchsbaum[102X
  ([14X7.4-2[114X).[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[28X  [128X[104X
  [4X[32X[104X
  
  [1X7.4-2 IsGradedAssociatedRingNumericalSemigroupBuchsbaum[101X
  
  [33X[1;0Y[29X[2XIsGradedAssociatedRingNumericalSemigroupBuchsbaum[102X( [3XS[103X ) [32X property[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YReturns [10Xtrue[110X if the graded ring associated to [22XK[[[3XS[103X]][122X is Buchsbaum, and [10Xfalse[110X
  otherwise.  This  test  is  the  implementation  of  the  algorithm given in
  [DMV09].[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 [27XIsGradedAssociatedRingNumericalSemigroupBuchsbaum(s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.4-3 TorsionOfAssociatedGradedRingNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XTorsionOfAssociatedGradedRingNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YThis  function  returns  the  set  of  elements in the numerical semigroup [3XS[103X
  corresponding to a [22XK[122X-basis of the torsion submodule of the associated graded
  ring  of  the  numerical  semigroup  ring [22XK[[S]][122X. It uses the Apery table as
  explained in [CBJZA13].[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 [27XTorsionOfAssociatedGradedRingNumericalSemigroup(s);[127X[104X
    [4X[28X[ 181, 153, 157, 193, 169, 148 ][128X[104X
  [4X[32X[104X
  
  [1X7.4-4 BuchsbaumNumberOfAssociatedGradedRingNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XBuchsbaumNumberOfAssociatedGradedRingNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YThis  function  returns  the  smallest  non-negative integer [22Xk[122X for which the
  associated graded ring [22XG[122X of a given numerical semigroup ring is [22Xk[122X-Buchsbaum,
  that  is, the least [22Xk[122X for which the torsion submodule of [22XG[122X is annihilated by
  the [22Xk[122X-th power of the homogeneous maximal ideal of [22XG[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 [27XBuchsbaumNumberOfAssociatedGradedRingNumericalSemigroup(s);[127X[104X
    [4X[28X1[128X[104X
    [4X[25Xgap>[125X [27XIsGradedAssociatedRingNumericalSemigroupBuchsbaum(s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.4-5 IsMpure[101X
  
  [33X[1;0Y[29X[2XIsMpure[102X( [3XS[103X ) [32X property[133X
  [33X[1;0Y[29X[2XIsMpureNumericalSemigroup[102X( [3XS[103X ) [32X property[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YTest  for the M-Purity of the numerical semigroup S [3XS[103X. This test is based on
  [Bry10].[133X
  
  [33X[0;0YThis filter implies [2XIsPureNumericalSemigroup[102X ([14X7.4-6[114X).[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 [27XIsMpure(s);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(4,6,11);;[127X[104X
    [4X[25Xgap>[125X [27XIsMpureNumericalSemigroup(s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.4-6 IsPure[101X
  
  [33X[1;0Y[29X[2XIsPure[102X( [3XS[103X ) [32X property[133X
  [33X[1;0Y[29X[2XIsPureNumericalSemigroup[102X( [3XS[103X ) [32X property[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YTest  for  the  purity of the numerical semigroup S [3XS[103X. This test is based on
  [Bry10].[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 [27XIsPure(s);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(4,6,11);;[127X[104X
    [4X[25Xgap>[125X [27XIsPureNumericalSemigroup(s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.4-7 IsGradedAssociatedRingNumericalSemigroupGorenstein[101X
  
  [33X[1;0Y[29X[2XIsGradedAssociatedRingNumericalSemigroupGorenstein[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YReturns  [10Xtrue[110X  if  the  graded  ring associated to [22XK[[[3XS[103X]][122X is Gorenstein, and
  [10Xfalse[110X  otherwise.  This test is the implementation of the algorithm given in
  [DMS11].[133X
  
  [33X[0;0YThis   filter  implies  [2XIsGradedAssociatedRingNumericalSemigroupCM[102X  ([14X7.4-1[114X),
  [2XIsMpureNumericalSemigroup[102X    ([14X7.4-5[114X),    and   [2XIsSymmetricNumericalSemigroup[102X
  ([14X6.1-2[114X).[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 [27XIsGradedAssociatedRingNumericalSemigroupGorenstein(s);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(4,6,11);;[127X[104X
    [4X[25Xgap>[125X [27XIsGradedAssociatedRingNumericalSemigroupGorenstein(s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X7.4-8 IsGradedAssociatedRingNumericalSemigroupCI[101X
  
  [33X[1;0Y[29X[2XIsGradedAssociatedRingNumericalSemigroupCI[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YReturns  [10Xtrue[110X if the Complete Intersection property of the associated graded
  ring  of  a  numerical  semigroup  ring  associated  to  [22XK[[[3XS[103X]][122X,  and  [10Xfalse[110X
  otherwise.  This  test  is  the  implementation  of  the  algorithm given in
  [DMS13].[133X
  
  [33X[0;0YThis   filter   implies   [2XIsGradedAssociatedRingNumericalSemigroupGorenstein[102X
  ([14X7.4-7[114X) and [2XIsAperySetGammaRectangular[102X ([14X6.2-10[114X).[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 [27XIsGradedAssociatedRingNumericalSemigroupCI(s);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(4,6,11);;[127X[104X
    [4X[25Xgap>[125X [27XIsGradedAssociatedRingNumericalSemigroupCI(s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
