Ideals of numerical semigroups
Let S be a numerical semigroup. A set I of integers is an ideal relative to a numerical semigroup S provided that I+S\subseteq I and that there exists d\in S such that d+I\subseteq S.

If \{i_1,\ldots,i_k\} is a subset of {\mathbb Z}, then the set I=\{i_1,\ldots,i_k\}+S=\bigcup_{n=1}^k i_n+S is an ideal relative to S, and \{i_1,\ldots, i_k\} is a system of generators of I. A system of generators M is minimal if no proper subset of M 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 ).

S is a numerical semigroup and l a list of integers.

The output is the ideal of S generated by l

There are several shortcuts for this function, as shown in the example. gap> IdealOfNumericalSemigroup([3,5],NumericalSemigroup(9,11)); <Ideal of numerical semigroup> gap> [3,5]+NumericalSemigroup(9,11); <Ideal of numerical semigroup> gap> last=last2; true gap> 3+NumericalSemigroup(5,9); <Ideal of numerical semigroup>
Tests if the object Obj is an ideal of a numerical semigroup.

gap> I:=[1..7]+NumericalSemigroup(7,19); <Ideal of numerical semigroup> gap> IsIdealOfNumericalSemigroup(I); true gap> IsIdealOfNumericalSemigroup(2); false
I is an ideal of a numerical semigroup.

The output is the minimal system of generators of I.

gap> I:=[3,5,9]+NumericalSemigroup(2,11); <Ideal of numerical semigroup> gap> MinimalGeneratingSystemOfIdealOfNumericalSemigroup(I); [ 3 ]
I is an ideal of a numerical semigroup.

The output of GeneratorsOfIdealOfNumericalSemigroup is a system of generators of the ideal. If the minimal system of generators is known, then it is used as output. GeneratorsOfIdealOfNumericalSemigroupNC always returns the set of generators stored in I!.generators.

gap> I:=[3,5,9]+NumericalSemigroup(2,11); <Ideal of numerical semigroup> gap> GeneratorsOfIdealOfNumericalSemigroup(I); [ 3, 5, 9 ] gap> MinimalGeneratingSystemOfIdealOfNumericalSemigroup(I); [ 3 ] gap> GeneratorsOfIdealOfNumericalSemigroup(I); [ 3 ] gap> GeneratorsOfIdealOfNumericalSemigroupNC(I); [ 3, 5, 9 ]
I is an ideal of a numerical semigroup, say S.

The output is S.

gap> I:=[3,5,9]+NumericalSemigroup(2,11); <Ideal of numerical semigroup> gap> AmbientNumericalSemigroupOfIdeal(I); <Numerical semigroup with 2 generators>
I is an ideal of a numerical semigroup.

The output is a list with the elements in I that are less than or equal to the greatest integer not belonging to the ideal plus one.

gap> I:=[3,5,9]+NumericalSemigroup(2,11); <Ideal of numerical semigroup> gap> SmallElementsOfIdealOfNumericalSemigroup(I); [ 3, 5, 7, 9, 11, 13 ] gap> J:=[2,11]+NumericalSemigroup(2,11); <Ideal of numerical semigroup> gap> SmallElementsOfIdealOfNumericalSemigroup(J); [ 2, 4, 6, 8, 10 ]
I is an ideal of a numerical semigroup, n is an integer.

The output is true if n belongs to I.

n in I can be used for short.

gap> J:=[2,11]+NumericalSemigroup(2,11); <Ideal of numerical semigroup> gap> BelongsToIdealOfNumericalSemigroup(9,J); false gap> 9 in J; false gap> BelongsToIdealOfNumericalSemigroup(10,J); true gap> 10 in J; true
I, J are ideals of a numerical semigroup.

The output is the sum of both ideals \{ i+j \ |\ i\in I, j\in J\}.

I + J is a synonym of this function.

gap> I:=[3,5,9]+NumericalSemigroup(2,11); <Ideal of numerical semigroup> gap> J:=[2,11]+NumericalSemigroup(2,11); <Ideal of numerical semigroup> gap> I+J; <Ideal of numerical semigroup> gap> MinimalGeneratingSystemOfIdealOfNumericalSemigroup(last); [ 5, 14 ] gap> SumIdealsOfNumericalSemigroup(I,J); <Ideal of numerical semigroup> gap> MinimalGeneratingSystemOfIdealOfNumericalSemigroup(last); [ 5, 14 ]
I is an ideal of a numerical semigroup, n is a non negative integer.

The output is the ideal I+\cdots+I (n times).

n * I can be used for short.

gap> I:=[0,1]+NumericalSemigroup(3,5,7); <Ideal of numerical semigroup> gap> MinimalGeneratingSystemOfIdealOfNumericalSemigroup(2*I); [ 0, 1, 2 ]
I, J are ideals of a numerical semigroup.

The output is the ideal \{ z\in {\mathbb Z}\ |\ z+J\subseteq I\}.

I - J is a synonym of this function.

The following example appears in . gap> S:=NumericalSemigroup(14, 15, 20, 21, 25); <Numerical semigroup with 5 generators> gap> I:=[0,1]+S; <Ideal of numerical semigroup> gap> II:=(0+S)-I; <Ideal of numerical semigroup> gap> MinimalGeneratingSystemOfIdealOfNumericalSemigroup(I); [ 0, 1 ] gap> MinimalGeneratingSystemOfIdealOfNumericalSemigroup(II); [ 14, 20 ] gap> MinimalGeneratingSystemOfIdealOfNumericalSemigroup(I+II); [ 14, 15, 20, 21 ]
I, J are ideals of a numerical semigroup. J must be contained in I.

The output is the set I\setminus J.

gap> S:=NumericalSemigroup(14, 15, 20, 21, 25); <Numerical semigroup with 5 generators> gap> I:=[0,1]+S; <Ideal of numerical semigroup> gap> 2*I-2*I; <Ideal of numerical semigroup> gap> I-I; <Ideal of numerical semigroup> gap> DifferenceOfIdealsOfNumericalSemigroup(last2,last); [ 26, 27, 37, 38 ]
Given an ideal I of a numerical semigroup S and an integer k returns an ideal of the numerical semigroup S generated by \{i_1+k,\ldots,i_n+k\} where \{i_1,\ldots,i_n\} is the system of generators of I.

As a synonym to TranslationOfIdealOfNumericalSemigroup(k, I) the expression k + I may be used.

gap> s:=NumericalSemigroup(13,23); <Numerical semigroup with 2 generators> gap> l:=List([1..6], _ -> Random([8..34])); [ 22, 29, 34, 25, 10, 12 ] gap> I:=IdealOfNumericalSemigroup(l, s); <Ideal of numerical semigroup> gap> It:=TranslationOfIdealOfNumericalSemigroup(7,I); <Ideal of numerical semigroup> gap> It2:=7+I; <Ideal of numerical semigroup> gap> It2=It; true
I is an ideal of a numerical semigroup, n is a non negative integer. I must be contained in its ambient semigroup.

The output is the cardinality of the set n I\setminus (n+1)I.

gap> I:=[6,9,11]+NumericalSemigroup(6,9,11);; gap> List([1..7],n->HilbertFunctionOfIdealOfNumericalSemigroup(n,I)); [ 3, 11, 24, 48, 96, 192, 384 ]
I is an ideal of a numerical semigroup.

The output is the ideal \bigcup_{n\geq 0} nI-nI.

gap> I:=[0,2]+NumericalSemigroup(6,9,11);; gap> BlowUpIdealOfNumericalSemigroup(I);; gap> SmallElementsOfIdealOfNumericalSemigroup(last); [ 0, 2, 4, 6, 8 ]
I is an ideal of a numerical semigroup.

The output is the least integer such that n I + i=(n+1)I, where i=min(I).

gap> I:=[0,2]+NumericalSemigroup(6,9,11);; gap> ReductionNumberIdealNumericalSemigroup(I); 2
Returns the maximal ideal of the numerical semigroup S.

gap> MaximalIdealOfNumericalSemigroup(NumericalSemigroup(3,7)); <Ideal of numerical semigroup>
If M is the maximal ideal of the numerical semigroup, then the output is the numerical semigroup \bigcup_{n\geq 0} nM-nM.

gap> s:=NumericalSemigroup(30, 35, 42, 47, 148, 153, 157, 169, 181, 193); <Numerical semigroup with 10 generators> gap> BlowUpOfNumericalSemigroup(s); <Numerical semigroup with 10 generators> gap> SmallElementsOfNumericalSemigroup(last); [ 0, 5, 10, 12, 15, 17, 20, 22, 24, 25, 27, 29, 30, 32, 34, 35, 36, 37, 39, 40, 41, 42, 44 ] gap> m:=MaximalIdealOfNumericalSemigroup(s); <Ideal of numerical semigroup> gap> BlowUpIdealOfNumericalSemigroup(m); <Ideal of numerical semigroup> gap> SmallElementsOfIdealOfNumericalSemigroup(last); [ 0, 5, 10, 12, 15, 17, 20, 22, 24, 25, 27, 29, 30, 32, 34, 35, 36, 37, 39, 40, 41, 42, 44 ]
Returns the microinvariants of the numerical semigroup S defined in . For their computation we have used the formula given in . The Ap\'ery set of S and its blow up are involved in this computation.

gap> s:=NumericalSemigroup(30, 35, 42, 47, 148, 153, 157, 169, 181, 193); <Numerical semigroup with 10 generators> gap> bu:=BlowUpOfNumericalSemigroup(s); <Numerical semigroup with 10 generators> gap> ap:=AperyListOfNumericalSemigroupWRTElement(s,30);; gap> apbu:=AperyListOfNumericalSemigroupWRTElement(bu,30);; gap> (ap-apbu)/30; [ 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, 5, 4, 3, 3, 2 ] gap> MicroInvariantsOfNumericalSemigroup(s)=last; true
Returns true if the graded ring associated to K[[S]] is Cohen-Macaulay, and false otherwise. This test is the implementation of the algorithm given in .

gap> s:=NumericalSemigroup(30, 35, 42, 47, 148, 153, 157, 169, 181, 193); <Numerical semigroup with 10 generators> gap> IsGradedAssociatedRingNumericalSemigroupCM(s); false gap> MicroInvariantsOfNumericalSemigroup(s); [ 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, 5, 4, 3, 3, 2 ] gap> List(AperyListOfNumericalSemigroupWRTElement(s,30), > w->MaximumDegreeOfElementWRTNumericalSemigroup (w,s)); [ 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, 5, 4, 3, 1, 2 ] gap> last=last2; false gap> s:=NumericalSemigroup(4,6,11); <Numerical semigroup with 3 generators> gap> IsGradedAssociatedRingNumericalSemigroupCM(s); true gap> MicroInvariantsOfNumericalSemigroup(s); [ 0, 2, 1, 1 ] gap> List(AperyListOfNumericalSemigroupWRTElement(s,4), > w->MaximumDegreeOfElementWRTNumericalSemigroup(w,s)); [ 0, 2, 1, 1 ]
Computes a canonical ideal of S (): { x in Z | g-x not in S} .

gap> s:=NumericalSemigroup(4,6,11); <Numerical semigroup with 3 generators> gap> m:=MaximalIdealOfNumericalSemigroup(s); <Ideal of numerical semigroup> gap> c:=CanonicalIdealOfNumericalSemigroup(s); <Ideal of numerical semigroup> gap> (m-c)-c=m; true gap> id:=3+s; <Ideal of numerical semigroup> gap> (id-c)-c=id; true
Given two ideals I and J of a numerical semigroup S returns the ideal of the numerical semigroup S which is the intersection of the ideals I and J.

gap> i:=IdealOfNumericalSemigroup([75,89],s); <Ideal of numerical semigroup> gap> j:=IdealOfNumericalSemigroup([115,289],s); <Ideal of numerical semigroup> gap> IntersectionIdealsOfNumericalSemigroup(i,j); <Ideal of numerical semigroup>