Defining good semigroups Good semigroups can be constructed with numerical duplications, amalgamations, cartesian products, or by giving some of its generators and a candidate for conductor. Not every set determines a good semigroup; this is because the intersection of good semigroups might not be a good semigroup. So the terminology "good semigroup generated" by a set is a bit fragile. Detects if S is an object of type good semigroup. S is a numerical semigroup and E is an ideal of S with E\subseteq S. The output is S\bowtie E= D\cup (E\times E)\cup\{ a\wedge b\mid a\in D, b\in E\times E\}, where D=\{(s,s)\mid s\in S\}.
gap> s:=NumericalSemigroup(3,5,7);; gap> e:=6+s;; gap> dup:=NumericalSemigroupDuplication(s,e); <Good semigroup> gap> l:=Cartesian([1..11],[1..11]);; gap> Intersection(dup,l); [ [ 3, 3 ], [ 5, 5 ], [ 6, 6 ], [ 6, 7 ], [ 6, 8 ], [ 6, 9 ], [ 6, 10 ], [ 6, 11 ], [ 7, 6 ], [ 7, 7 ], [ 8, 6 ], [ 8, 8 ], [ 9, 6 ], [ 9, 9 ], [ 9, 10 ], [ 9, 11 ], [ 10, 6 ], [ 10, 9 ], [ 10, 10 ], [ 11, 6 ], [ 11, 9 ], [ 11, 11 ] ] gap> [384938749837,349823749827] in dup; true
S is a numerical semigroup, E is an ideal of a numerical semigroup T with E\subseteq T, and b is an integer such that multiplication by b is a morphism from S to T, say g. The output is S\bowtie^g E= D\cup(g^{-1}(E)\times E)\cup \{a\wedge b\mid a\in D, b\in g^{-1}(E)\times E\}, where D=\{(s,b s)\mid s\in S\}.
gap> s:=NumericalSemigroup(2,3);; gap> t:=NumericalSemigroup(3,4);; gap> e:=3+t;; gap> dup:=AmalgamationOfNumericalSemigroups(s,e,2);; gap> [2,3] in dup; true
S and T are numerical semigroups. The output is S\times T, which is a good semigroup.
gap> s:=NumericalSemigroup(2,3);; gap> t:=NumericalSemigroup(3,4);; gap> IsGoodSemigroup(CartesianProductOfNumericalSemigroups(s,t)); true
X is a list of points with nonnegative integer coordinates and C is a pair of nonnegative integers (a list with two elements). If M is the affine and infimum closure of X, decides if it is a good semigroup, and if so, outputs it.
gap> G:=[[4,3],[7,13],[11,17],[14,27],[15,27],[16,20],[25,12],[25,16]]; [ [ 4, 3 ], [ 7, 13 ], [ 11, 17 ], [ 14, 27 ], [ 15, 27 ], [ 16, 20 ], [ 25, 12 ], [ 25, 16 ] ] gap> C:=[25,27]; [ 25, 27 ] gap> GoodSemigroup(G,C); <Good semigroup>
Notable elements Good semigroups are a natural extension of numerical semigroups, and so some of their notable elements are called in the same way as in the one dimensional case. S is a good semigroup and v is a pair of integers. The output is true if v is in S, and false otherwise. Other ways to use this operation are \in(v,S) and v in S.
gap> s:=NumericalSemigroup(2,3);; gap> e:=6+s;; gap> dup:=NumericalSemigroupDuplication(s,e);; gap> BelongsToGoodSemigroup([2,2],dup); true gap> [2,2] in dup; true gap> [3,2] in dup; false
S is a good semigroup. The output is its conductor.
gap> s:=NumericalSemigroup(3,5,7);; gap> e:=6+s;; gap> dup:=NumericalSemigroupDuplication(s,e); <Good semigroup> gap> Conductor(dup); [ 11, 11 ] gap> ConductorOfGoodSemigroup(dup); [ 11, 11 ]
S is a good semigroup. The output is its set of small elements, that is, the elements smaller than its conductor with respect to the usual partial ordering.
gap> s:=NumericalSemigroup(3,5,7);; gap> e:=6+s;; gap> dup:=NumericalSemigroupDuplication(s,e); <Good semigroup> gap> SmallElementsOfGoodSemigroup(dup); [ [ 0, 0 ], [ 3, 3 ], [ 5, 5 ], [ 6, 6 ], [ 6, 7 ], [ 6, 8 ], [ 6, 9 ], [ 6, 10 ], [ 6, 11 ], [ 7, 6 ], [ 7, 7 ], [ 8, 6 ], [ 8, 8 ], [ 9, 6 ], [ 9, 9 ], [ 9, 10 ], [ 9, 11 ], [ 10, 6 ], [ 10, 9 ], [ 10, 10 ], [ 11, 6 ], [ 11, 9 ], [ 11, 11 ] ]
X is a list of points in the nonnegative orthant of the plane with integer coordinates. Determines if it represents the set of small elements of a good semigroup.
gap> s:=NumericalSemigroup(3,5,7);; gap> e:=6+s;; gap> dup:=NumericalSemigroupDuplication(s,e); <Good semigroup> gap> SmallElementsOfGoodSemigroup(dup); [ [ 0, 0 ], [ 3, 3 ], [ 5, 5 ], [ 6, 6 ], [ 6, 7 ], [ 6, 8 ], [ 6, 9 ], [ 6, 10 ], [ 6, 11 ], [ 7, 6 ], [ 7, 7 ], [ 8, 6 ], [ 8, 8 ], [ 9, 6 ], [ 9, 9 ], [ 9, 10 ], [ 9, 11 ], [ 10, 6 ], [ 10, 9 ], [ 10, 10 ], [ 11, 6 ], [ 11, 9 ], [ 11, 11 ] ] gap> RepresentsSmallElementsOfGoodSemigroup(last); true
X is a list of points in the nonnegative orthant of the plane with integer coordinates. Determines if it represents the set of small elements of a good semigroup, and then outputs the good semigroup having X as set of small elements.
gap> s:=NumericalSemigroup(3,5,7);; gap> e:=6+s;; gap> dup:=NumericalSemigroupDuplication(s,e); <Good semigroup> gap> SmallElementsOfGoodSemigroup(dup); [ [ 0, 0 ], [ 3, 3 ], [ 5, 5 ], [ 6, 6 ], [ 6, 7 ], [ 6, 8 ], [ 6, 9 ], [ 6, 10 ], [ 6, 11 ], [ 7, 6 ], [ 7, 7 ], [ 8, 6 ], [ 8, 8 ], [ 9, 6 ], [ 9, 9 ], [ 9, 10 ], [ 9, 11 ], [ 10, 6 ], [ 10, 9 ], [ 10, 10 ], [ 11, 6 ], [ 11, 9 ], [ 11, 11 ] ] gap> G:=GoodSemigroupBySmallElements(last); <Good semigroup> gap> dup=G; true
S is a good semigroup. The output is the set of elements (x,y) of S with the following property: there is no other element (x',y') in S with (x,y)\le (x',y') sharing a coordinate with (x,y).
gap> G:=[[4,3],[7,13],[11,17]];; gap> g:=GoodSemigroup(G,[11,17]);; gap> mx:=MaximalElementsOfGoodSemigroup(g); [ [ 0, 0 ], [ 4, 3 ], [ 7, 13 ], [ 8, 6 ] ]
S is a good semigroup. The output is the set of elements nonzero maximal elements that cannot be expressed as a sum of two nonzero maximal elements of the good semigroup.
gap> G:=[[4,3],[7,13],[11,17]];; gap> g:=GoodSemigroup(G,[11,17]);; gap> IrreducibleMaximalElementsOfGoodSemigroup(g); [ [ 4, 3 ], [ 7, 13 ] ]
S and T are numerical semigroups, M is a list of pairs in S\times T. C is the conductor, and thus a pair of nonnegative integers. The output is the set of elements of S\times T that are not above an element in M, that is, if they share a coordinate with an element in M, then they must be smaller or equal to that element with respect to the usual partial ordering. The output is a good semigroup, if M is an correct set of maximal elements.
gap> G:=[[4,3],[7,13],[11,17]];; gap> g:=GoodSemigroup(G,[11,17]);; gap> sm:=SmallElements(g);; gap> mx:=MaximalElementsOfGoodSemigroup(g);; gap> s:=NumericalSemigroupBySmallElements(Set(sm,x->x[1]));; gap> t:=NumericalSemigroupBySmallElements(Set(sm,x->x[2]));; gap> Conductor(g); [ 11, 15 ] gap> gg:=GoodSemigroupByMaximalElements(s,t,mx,[11,15]); <Good semigroup> gap> gg=g; true
S is a good semigroup. The output is its minimal good generating system (which is unique in the local case).

MinimalGoodGeneratingSystemOfGoodSemigroup and MinimalGoodGenerators are synonyms.
gap> s:=NumericalSemigroup(3,5,7);; gap> e:=6+s;; gap> dup:=NumericalSemigroupDuplication(s,e); <Good semigroup> gap> MinimalGoodGenerators(dup); [ [ 3, 3 ], [ 5, 5 ], [ 6, 11 ], [ 7, 7 ], [ 11, 6 ] ] gap> MinimalGoodGeneratingSystemOfGoodSemigroup(dup); [ [ 3, 3 ], [ 5, 5 ], [ 6, 11 ], [ 7, 7 ], [ 11, 6 ] ]
Symmetric good semigroups The concept of symmetry in a numerical semigroup extends to good semigroups. Here we describe a test for symmetry. S is a good semigroup. Determines if S is a symmetric good semigroup.
gap> s:=NumericalSemigroup(3,5,7);; gap> e:=CanonicalIdealOfNumericalSemigroup(s);; gap> e:=15+e;; gap> dup:=NumericalSemigroupDuplication(s,e);; gap> IsSymmetric(dup); true gap> IsSymmetricGoodSemigroup(dup); true
Arf good closure The definition of Arf good semigroup is similar to the definition of Arf numerical semigroup. In this section, we provide a function to compute the Arf good closure of a good semigroup. S is a good semigroup. Determines the Arf good semigroup closure of S.
gap> G:=[[3,3],[4,4],[5,4],[4,6]]; [ [ 3, 3 ], [ 4, 4 ], [ 5, 4 ], [ 4, 6 ] ] gap> C:=[6,6]; [ 6, 6 ] gap> S:=GoodSemigroup(G,C); <Good semigroup> gap> SmallElements(S); [ [ 0, 0 ], [ 3, 3 ], [ 4, 4 ], [ 4, 6 ], [ 5, 4 ], [ 6, 6 ] ] gap> A:=ArfClosure(S); <Good semigroup> gap> SmallElements(A); [ [ 0, 0 ], [ 3, 3 ], [ 4, 4 ] ] gap> ArfGoodSemigroupClosure(S) = ArfClosure(S); true
Good ideals A relative ideal I of a relative good semigroup M is a relative good ideal if I fulfills conditions (G1) and (G2) of the definition of good semigroup. X is a list of points with nonnegative integer coordinates and S is good semigroup. Decides if the closure of X+S under infimums is a relative good ideal of S, and if so, outputs it.
gap> G:=[[4,3],[7,13],[11,17],[14,27],[15,27],[16,20],[25,12],[25,16]]; [ [ 4, 3 ], [ 7, 13 ], [ 11, 17 ], [ 14, 27 ], [ 15, 27 ], [ 16, 20 ], [ 25, 12 ], [ 25, 16 ] ] gap> C:=[25,27]; [ 25, 27 ] gap> g := GoodSemigroup(G,C); <Good semigroup> gap> i:=GoodIdeal([[2,3]],g); <Good ideal of good semigroup>
I is a good ideal of a good semigroup. The output is a good generating system of I.
gap> s:=NumericalSemigroup(3,5,7);; gap> e:=10+s;; gap> d:=NumericalSemigroupDuplication(s,e);; gap> e:=GoodIdeal([[2,3],[3,2],[2,2]],d);; gap> GoodGeneratingSystemOfGoodIdeal(e); [ [ 2, 2 ], [ 2, 3 ], [ 3, 2 ] ]
If I is a good ideal of a good semigroup M, then the output is M. The output is a good generating system of I.
gap> s:=NumericalSemigroup(3,5,7);; gap> e:=10+s;; gap> a:=AmalgamationOfNumericalSemigroups(s,e,5);; gap> e:=GoodIdeal([[2,3],[3,2],[2,2]],a);; gap> a=AmbientGoodSemigroupOfGoodIdeal(e); true
I is a good ideal of a good semigroup. The output is the minimal good generating system of I.
gap> s:=NumericalSemigroup(3,5,7);; gap> e:=10+s;; gap> d:=NumericalSemigroupDuplication(s,e);; gap> e:=GoodIdeal([[2,3],[3,2],[2,2]],d);; gap> MinimalGoodGeneratingSystemOfGoodIdeal(e); [ [ 2, 3 ], [ 3, 2 ] ]
I is a good ideal of a good semigroup and v is a pair of integers. The output is true if v is in I, and false otherwise. Other ways to use this operation are \in(v,I) and v in I.
gap> s:=NumericalSemigroup(3,5,7);; gap> e:=10+s;; gap> d:=NumericalSemigroupDuplication(s,e);; gap> e:=GoodIdeal([[2,3],[3,2]],d);; gap> [1,1] in e; false gap> [2,2] in e; true
I is a good ideal. The output is its set of small elements, that is, the elements smaller than its conductor and larger than its minimum element (with respect to the usual partial ordering).
gap> s:=NumericalSemigroup(3,5,7);; gap> e:=10+s;; gap> d:=NumericalSemigroupDuplication(s,e);; gap> e:=GoodIdeal([[2,3],[3,2]],d);; gap> SmallElements(e); [ [ 2, 2 ], [ 2, 3 ], [ 3, 2 ], [ 5, 5 ], [ 5, 6 ], [ 6, 5 ], [ 7, 7 ] ]
S is a good semigroup. The output is the canonical ideal of S.
gap> s:=NumericalSemigroup(3,5,7);; gap> e:=10+s;; gap> d:=NumericalSemigroupDuplication(s,e);; gap> c:=CanonicalIdealOfGoodSemigroup(d);; gap> MinimalGoodGeneratingSystemOfGoodIdeal(c); [ [ 0, 0 ], [ 2, 2 ] ]