Presentations of Numerical Semigroups In this section we provide a way to compute minimal presentations of a numerical semigroup. These presentations are constructed from some special elelements in the semigroup (Betti elemenents) whose associated graphs are nonconnected. A generalization of these graphs are the simplicial complexes called shaded sets of an element.

If the variable NumSgpsUseEliminationForMinimalPresentations is set to true, then minimal presentations are computed via binomial ideals and elimination. S is a numerical semigroup. The output is a list of lists with two elements. Each list of two elements represents a relation between the minimal generators of the numerical semigroup. If \{ \{x_1,y_1\},\ldots,\{x_k,y_k\}\} is the output and \{m_1,\ldots,m_n\} is the minimal system of generators of the numerical semigroup, then \{x_i,y_i\}=\{\{a_{i_1},\ldots,a_{i_n}\},\{b_{i_1},\ldots,b_{i_n}\}\} and a_{i_1}m_1+\cdots+a_{i_n}m_n= b_{i_1}m_1+ \cdots +b_{i_n}m_n.

Any other relation among the minimal generators of the semigroup can be deduced from the ones given in the output.

The algorithm implemented is described in (see also ).
gap> s:=NumericalSemigroup(3,5,7);; gap> MinimalPresentation(s); [ [ [ 0, 0, 2 ], [ 3, 1, 0 ] ], [ [ 0, 1, 1 ], [ 4, 0, 0 ] ], [ [ 0, 2, 0 ], [ 1, 0, 1 ] ] ] gap> MinimalPresentationOfNumericalSemigroup(s); [ [ [ 0, 0, 2 ], [ 3, 1, 0 ] ], [ [ 0, 1, 1 ], [ 4, 0, 0 ] ], [ [ 0, 2, 0 ], [ 1, 0, 1 ] ] ]
The first element in the list means that 1\times 3+1\times 7=2\times 5 , and the others have similar meanings. S is a numerical semigroup and n is an element in S.

The output is a pair. If \{m_1,\ldots,m_n\} is the set of minimal generators of S, then the first component is the set of vertices of the graph associated to n in S, that is, the set \{ m_i \ |\ n-m_i\in S\} , and the second component is the set of edges of this graph, that is, \{ \{m_i,m_j\} \ |\ n-(m_i+m_j)\in S\}.

This function is used to compute a minimal presentation of the numerical semigroup S, as explained in .
gap> s:=NumericalSemigroup(3,5,7);; gap> GraphAssociatedToElementInNumericalSemigroup(10,s); [ [ 3, 5, 7 ], [ [ 3, 7 ] ] ]
S is a numerical semigroup.

The output is the set of elements in S whose associated graph is nonconnected .
gap> s:=NumericalSemigroup(3,5,7);; gap> BettiElementsOfNumericalSemigroup(s); [ 10, 12, 14 ] gap> BettiElements(s); [ 10, 12, 14 ]
S is a numerical semigroup and p is a pair (a relation) of lists of integers. Determines if the pair p is a minimal relation in a minimal presentation of S.

gap> s:=NumericalSemigroup(4,6,9);; gap> MinimalPresentation(s); [ [ [ 0, 0, 2 ], [ 0, 3, 0 ] ], [ [ 0, 2, 0 ], [ 3, 0, 0 ] ] ] gap> IsMinimalRelationOfNumericalSemigroup([[2,1,0],[0,0,2]],s); false gap> IsMinimalRelationOfNumericalSemigroup([[3,1,0],[0,0,2]],s); true
S is a numerical semigroup. The output is the union of all minimal presentations of S. Notice that if [x,y] is a minimal relator, then either [x,y] or [y,x] will be in the output, but not both.
gap> s:=NumericalSemigroup(4,6,9);; gap> MinimalPresentation(s); [ [ [ 0, 0, 2 ], [ 0, 3, 0 ] ], [ [ 0, 2, 0 ], [ 3, 0, 0 ] ] ] gap> AllMinimalRelationsOfNumericalSemigroup(s); [ [ [ 0, 3, 0 ], [ 0, 0, 2 ] ], [ [ 3, 0, 0 ], [ 0, 2, 0 ] ], [ [ 3, 1, 0 ], [ 0, 0, 2 ] ] ]
S is a numerical semigroup.

The output is the set of elements s in S such that there exists a minimal solution to msg\cdot x-msg\cdot y = 0, such that x,y are factorizations of s, and msg is the minimal generating system of S. Betti elements are primitive, but not the way around in general.
gap> s:=NumericalSemigroup(3,5,7);; gap> DegreesOfPrimitiveElementsOfNumericalSemigroup(s); [ 3, 5, 7, 10, 12, 14, 15, 21, 28, 35 ]
S is a numerical semigroup and n is an element in S.

The output is a simplicial complex C. If \{m_1,\ldots,m_n\} is the set of minimal generators of S, then L \in C if n-\sum_{i\in L} m_i\in S ().

This function is a generalization of the graph associated to n.
gap> s:=NumericalSemigroup(3,5,7);; gap> ShadedSetOfElementInNumericalSemigroup(10,s); [ [ ], [ 3 ], [ 3, 7 ], [ 5 ], [ 7 ] ]
Binomial ideals associated to numerical semigroups Let S be a numerical semigroup, and let K be a field. Let \{n_1,\dots,n_e\} be a set of minimal generators of S, and let K[x_1,\dots,x_e] be the ring of polynomial in the indeterminates x_1,\dots,x_e and with coefficients in K. Let K[t] be the ring of polynomials in t with coefficients in K.

Let \varphi: K[x_1,\dots,x_e] \to K[t] be the ring homomorphism determined by \varphi(x_i)=t^{n_i} for all i. The image of this morphism is usually known as the semigroup ring associated to S. The kernel is the (binomial) ideal associated to S. According to , from the exponents of the binomials in this ideal we can recover a presentation of S and viceversa. The argument K is optional; when it is not supplied, the field of rational numbers is taken as base field. S is a numerical semigroup. The output is the binomial ideal associated to S.
gap> s:=NumericalSemigroup(3,5,7);; gap> BinomialIdealOfNumericalSemigroup(GF(2),s); <two-sided ideal in GF(2)[x_1,x_2,x_3], (3 generators)> gap> GeneratorsOfTwoSidedIdeal(last); [ x_1^3*x_2+x_3^2, x_1^4+x_2*x_3, x_1*x_3+x_2^2 ] gap> BinomialIdealOfNumericalSemigroup(s); <two-sided ideal in Rationals[x_1,x_2,x_3], (3 generators)> gap> GeneratorsOfTwoSidedIdeal(last); [ -x_1^3*x_2+x_3^2, -x_1^4+x_2*x_3, -x_1*x_3+x_2^2 ] gap> MinimalPresentation(s); [ [ [ 0, 0, 2 ], [ 3, 1, 0 ] ], [ [ 0, 1, 1 ], [ 4, 0, 0 ] ], [ [ 0, 2, 0 ], [ 1, 0, 1 ] ] ]
Uniquely Presented Numerical Semigroups A numerical semigroup S is uniquely presented if for any two minimal presentations \sigma and \tau and any (a,b)\in \sigma, either (a,b)\in \tau or (b,a)\in \tau, that is, there is essentially a unique minimal presentation (up to arrangement of the components of the pairs in it). S is a numerical semigroup.

The output is true if S has uniquely presented. The implementation is based on .
gap> s:=NumericalSemigroup(3,5,7);; gap> IsUniquelyPresented(s); true gap> IsUniquelyPresentedNumericalSemigroup(s); true
S is a numerical semigroup.

The output is true if S has a generic presentation, that is, in every minimal relation all generators occur. These semigroups are uniquely presented (see ).

This filter implies .
gap> s:=NumericalSemigroup(3,5,7);; gap> IsGeneric(s); true gap> IsGenericNumericalSemigroup(s); true