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 ]
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 ]
Returns the maximal ideal of the numerical semigroup S.

gap> MaximalIdealOfNumericalSemigroup(NumericalSemigroup(3,7)); <Ideal of numerical semigroup>