# On the ideals of some sumset semigroups

J. I. García-García111 Departamento de Matemáticas/INDESS (Instituto
Universitario para el Desarrollo Social Sostenible), Universidad de Cádiz,
E-11510 Puerto Real (Cádiz, Spain). E-mail<EMAIL_ADDRESS>
D. Marín-Aragón222 Departamento de Matemáticas, Universidad de Cádiz, E-11510
Puerto Real (Cádiz, Spain). E-mail<EMAIL_ADDRESS>
A. Vigneron-Tenorio333 Departamento de Matemáticas/INDESS (Instituto
Universitario para el Desarrollo Social Sostenible), Universidad de Cádiz,
E-11406 Jerez de la Frontera (Cádiz, Spain). E-mail<EMAIL_ADDRESS>
###### Abstract

A sumset semigroup is a non-cancellative commutative monoid obtained from the
sumset of finite non-negative integer sets. In this work, an algorithm for
computing the ideals associated with some sumset semigroups is provided. Using
these ideals, we study some factorization properties of sumset semigroups and
some additive properties of sumsets. This approach links computational
commutative algebra with additive number theory.

Key words: atomic monoid, elasticity, $h$-fold sumset, non-cancellative
semigroup, power monoid, semigroup ideal, sumset.

2020 Mathematics Subject Classification: 11B13, 11P70, 13P25, 20M12, 20M14.

## Introduction

Additive number theory is the subfield of number theory concerning the study
of subsets of integers and their behaviour under addition. More abstractly,
the field of additive number theory includes the study of abelian groups and
commutative semigroups with an operation of addition. The principal objects of
study are (i) the sumset of two subsets $A$ and $B$ of elements from an
abelian group $G$, $A+B=\\{a+b\mid a\in A,~{}b\in B\\}$, and (ii) to determine
the structure and properties of the $h$-fold sumset $hA$ when the set $A$ is
known. In an inverse problem, we start with the sumset $hA$ and try to deduce
information about the underlying set $A$. An up-to-date reference for inverse
problems can be found in [15, Chapter 5]. There is a beautiful and
straightforward solution of the direct problem of describing the structure of
the $h$-fold sumset $hA$ for any finite set $A$ of integers and for all
sufficiently large $h$ (see [8, Theorem 1.1]). This result has implications
for the study of Weierstrass semigroups, such as is shown in [3].

Here, we consider the commutative semigroup whose elements are the finite
subsets of $\mathbb{N}$, denoted by $(\mathrm{FS}(\mathbb{N}),+)$ with $+$ the
operation defined as before. This semigroup is the power monoid of
$\mathbb{N}$ (see [4], [5] and the references therein). A sumset semigroup is
a semigroup generated by a finite number of elements of
$\mathrm{FS}(\mathbb{N})$. We show that the sumset semigroups are atomic
reduced semigroups with finite elasticity. It is well known that finitely
generated semigroups are finitely presented (see [7]). That is, there exists
$p\in\mathbb{N}$ and a congruence $\sigma$ in
$\mathbb{N}^{p}\times\mathbb{N}^{p}$ such that the semigroup $S$ is isomorphic
to $\mathbb{N}^{p}/\sigma$. Equivalently, there exists a binomial ideal
$I_{S}$ in the polynomial ring $\mathbf{k}[x_{1},\dots,x_{p}]$ such that $S$
is isomorphic to the set of monomials in $\mathbf{k}[x_{1},\dots,x_{p}]/I_{S}$
with the product operation. The presentation of $S$ (or a system of generators
of the semigroup ideal $I_{S}$) provides us with a way to obtain the
expressions of an element of the semigroup in terms of its generators. This
can be done with Gröbner bases and related techniques. For instance, we can
check whether the $h$-fold of any $A\in S$ can be expressed as a sumset of
other elements. By using these techniques, we can build a bridge between
computational commutative algebra and additive number theory.

We also present a new Python library [6] that includes an implementation of
our algorithms and the examples that illustrate it.

In this work, we show some properties of the semigroup
$\mathrm{FS}(\mathbb{N})$ and give the ideals of some types of sumset
semigroups. The work is organized as follows. In Section 1, we present some
definitions and results on Gröbner bases. In Section 2, we introduce the
sumset semigroups and study some of their properties. In Sections 3 and 4, by
using algebraic commutative algebra tools, we study the ideals of some
families of sumset semigroups, thereby allowing us to introduce Algorithm 1
and provide some examples.

##  1 Some results on commutative algebra

For a field $\mathbf{k}$ and a set of indeterminates
$\\{x_{1},\ldots,x_{t}\\}$, the polynomial ring
$\mathbf{k}[x_{1},\ldots,x_{t}]$ (also denoted by $\mathbf{k}[X]$) is the set
of polynomials in $\\{x_{1},\ldots,x_{t}\\}$ with coefficients in
$\mathbf{k}$, that is, the set $\\{\sum_{i=1}^{m}a_{i}x_{1}^{\alpha_{1}}\cdots
x_{t}^{\alpha_{t}}\mid
m\in\mathbb{N},\,a_{i}\in\mathbf{k},\,\alpha_{1},\ldots,\alpha_{t}\in\mathbb{N}\\}$.
We denote by $X^{\alpha}$ the monomial $x_{1}^{\alpha_{1}}\cdots
x_{t}^{\alpha_{t}}$, with
$\alpha=(\alpha_{1},\ldots,\alpha_{t})\in\mathbb{N}^{t}$. In this work, some
results use Gröbner basis theory and the Elimination Theorem. The necessary
background can be found in [2, $\S$2 and $\S$3] but is also provided here so
that the present work is self-contained.

It is well known that any ideal in a polynomial ring is finitely generated. In
particular, there exists a special generating set associated with the ideals,
namely a Gröbner basis. This concept depends on the election of an order on
the monomials. A monomial order $\prec$ on $\mathbf{k}[X]$ is a multiplicative
total order on the set of monomials if for each two monomials
$X^{\alpha},X^{\beta}$ such that $X^{\alpha}\prec X^{\beta}$, then
$X^{\alpha}X^{\gamma}\prec X^{\beta}X^{\gamma}$ for every monomial
$X^{\gamma}$.

For a fixed monomial order $\prec$ on $\mathbf{k}[X]$,
$\mathrm{In}_{\prec}(I)$ denotes the set of leading terms of non-zero elements
of $I$, and $\langle\mathrm{In}_{\prec}(I)\rangle$ the monomial ideal
generated by $\mathrm{In}_{\prec}(I)$. A subset $G$ of $I$ is a Gröbner basis
of $I$ if
$\langle\mathrm{In}_{\prec}(I)\rangle=\langle\\{\mathrm{In}_{\prec}(g)\mid
g\in G\\}\rangle$, where $\mathrm{In}_{\prec}(g)$ is the leading term of $g$.
An algorithm for computing a Gröbner basis for $I$ is given in [2, Chapter 2,
$\S$7]. It is also well known that Gröbner bases of binomial ideals are sets
of binomials.

Given two polynomials $f$ and $g$, their $S$-polynomial is defined by
$S(f,g)=\frac{aX^{\alpha}}{\mathrm{In}_{\prec}(f)}f-\frac{aX^{\alpha}}{\mathrm{In}_{\prec}(g)}g$,
where $aX^{\alpha}$ is the least common multiple of $\mathrm{In}_{\prec}(f)$
and $\mathrm{In}_{\prec}(g)$. Also, for $k$ non-zero polynomials
$f_{1},\ldots,f_{k}$, we say that $S(f_{i},f_{j})=\sum_{l=1}^{k}g_{l}f_{l}$
has an lcm representation if the least common multiple of the monomial leaders
of $f_{i}$ and $f_{j}$ is bigger than $\mathrm{In}_{\prec}(g_{l}f_{l})$
(respect $\prec$) whenever $g_{l}f_{l}\neq 0$. Thus, we obtain another
equivalent definition of a Gröbner basis.

######  Theorem 1.

[2, Chapter 2, $\S$9, Theorem 6] A basis $\\{f_{1},\ldots f_{k}\\}$ of an
ideal $I$ is a Gröbner basis if and only if for every $i\neq j$, the
$S$-polynomial $S(f_{i},f_{j})$ has an lcm representation.

The above theorem allows us to prove the next result. We use this lemma in the
following sections.

######  Lemma 2.

Let $I\subset\mathbf{k}[X,Y]$ and $J\subset\mathbf{k}[Z,X,Y]$ be two binomial
ideals with $J$ generated by $G=\\{z_{1}-M_{1},\ldots,z_{t}-M_{t}\\}$, where
each $M_{i}$ is a monomial in $\mathbf{k}[X,Y]$. Fix $\prec$ a monomial order
on $\mathbf{k}[Z,X,Y]$ such that $x_{j},y_{k}\prec z_{i}$, for every
$x_{j},y_{k}$ and $z_{i}$. Then, the union of $G$ and a Gröbner basis of $I$
respect $\prec$ is a Gröbner basis of $I+J$ respect $\prec$. Moreover, if a
binomial $L-T$ belongs to $(I+J)\cap\mathbf{k}[X,Y]$, then $L-T\in I$.

###### Proof.

Note that $G$ is a Gröbner basis of $J$ respect $\prec$, and consider
$G^{\prime}=\\{g_{1},\ldots,g_{h}\\}\subset\mathbf{k}[X,Y]$ a Gröbner basis of
$I$. Thus, $S(f,f^{\prime})$ and $S(g,g^{\prime})$ have an lcm representation
for every $f,f^{\prime}\in G$ and $g,g^{\prime}\in G^{\prime}$. Let $L-T$ be a
binomial in $G^{\prime}$, $z_{i}-M_{i}\in G$, and assume $L\succ T$. Hence,
$S(z_{i}-M_{i},L-T)=L(z_{i}-M_{i})-z_{i}(L-T)=T(z_{i}-M_{i})-M_{i}(L-T)$; that
is to say, $S(z_{i}-M_{i},L-T)$ has an lcm representation. Therefore, $G\cup
G^{\prime}$ is a Gröbner basis of $I+J$.

Consider any $L-T\in I+J$ with $L-T\in\mathbf{k}[X,Y]$. By [2, Chapter 2,
$\S$3, Theorem 3] and [2, Chapter 2, $\S$6, Corollary 2], we have that
$L-T=\sum_{i=1}^{h}f_{i}g_{i}$, with
$\mathrm{In}_{\prec}(L-T)\succeq\mathrm{In}_{\prec}(f_{i}g_{i})$, for
$i=1,\ldots,h$. Hence, every $f_{i}$ belongs to $\mathbf{k}[X,Y]$. ∎

A method for computing the ideal $I\cap\mathbf{k}[x_{l+1},\ldots,x_{t}]$ (for
$t>l\geq 1$) is called the Elimination Theorem.

######  Theorem 3.

[2, Chapter 3] Let $I\subset\mathbf{k}[x_{1},\ldots,x_{t}]$ be an ideal and
let $G$ be a Gröbner basis of $I$ with respect to lex order where
$x_{1}>x_{2}>\cdots>x_{t}$. Then, for every $0\leq l\leq t$, the set
$G\cap\mathbf{k}[x_{l+1},\ldots,x_{t}]$ is a generating set of the ideal
$I\cap\mathbf{k}[x_{l+1},\ldots,x_{t}]$. Furthermore,
$G\cap\mathbf{k}[x_{l+1},\ldots,x_{t}]$ is a Gröbner basis of
$I\cap\mathbf{k}[x_{l+1},\ldots,x_{t}]$.

We introduce the semigroup ideal as an important object in this work. A
monoid/semigroup is a non-empty set equipped with an associative and
commutative binary operation (denoted by $+$), and an identity element. A
semigroup is finitely generated if there exists a finite set
$A=\\{a_{1},\ldots,a_{t}\\}\subset S$ such that $S=\langle
A\rangle:=\\{\alpha_{1}a_{1}+\cdots+\alpha_{t}a_{t}\mid\alpha_{1},\ldots,\alpha_{t}\in\mathbb{N}\\}$
($\alpha a$ denotes $\sum_{i=1}^{\alpha}a$). For a field $\mathbf{k}$, $S$ has
associated the binomial ideal in $\mathbf{k}[x_{1},\ldots,x_{t}]$,

$I_{S}=\Big{\langle}\Big{\\{}X^{\alpha}-X^{\beta}\mid\sum_{i=1}^{t}\alpha_{i}a_{i}=\sum_{i=1}^{t}\beta_{i}a_{i}\Big{\\}}\Big{\rangle}.$

This ideal is usually called the semigroup ideal of $S$, and it has an
important role in studying some properties of the semigroup. Note that $I_{S}$
codifies the relationships among the elements of $S$. Associated to these
ideals we have the lattice $M$ of $\mathbb{Z}^{t}$ generated by the elements
$\\{\alpha-\beta\mid X^{\alpha}-X^{\beta}\in I_{S}\\}$. We say that $I_{S}$ is
strongly reduced whenever $M\cap\mathbb{N}^{t}=\\{0\\}$ (this concept was
introduced in [14]). Define ${\cal I}_{M}$ the finitely generated cancellative
subsemigroup of $\mathbb{N}^{t}\times\mathbb{N}^{t}$ all of whose elements
$(\alpha,\beta)$ verify $\alpha-\beta\in M$. Let $\mathcal{A}({\cal I}_{M})$
be the minimal system of generators of the subsemigroup ${\cal I}_{M}$. This
minimal generating set can be computed performing the following steps:

  1. 1.

Compute a system of linear homogeneous equations $Ax=0$ of $M$ from its system
of generators [10, Chapter 2].

  2. 2.

The Hilbert basis of $(A|-A)(x,y)=0$ is the set ${\cal A}({\cal I}_{M})$. That
basis can be computed by using [9].

When the semigroup $S$ is a subset of $\mathbb{N}$ such that
$\mathbb{N}\setminus S$ is finite, $S$ is called a numerical semigroup, and it
is finitely generated. In [11], the authors introduce some algorithms for
computing the ideals of numerical semigroups.

##  2 Sumset semigroups

Let us begin this section by recalling some standard definitions in semigroup
theory. Assume $S$ is a commutative semigroup, $S$ is cancellative if
$x+z=y+z$ for some $x,y,z\in S$, implies $x=y$. An element $x\in S$ is a unit
if $x+y=0$ for some $y\in S$. The set of units of $S$ is denoted by
$\mathcal{U}(S)$. When $S\cap(-S)=\\{0\\}$, $S$ is named reduced. An atom in
$S$ is any non-unit $x\in S$ such that there do not exist two non-units
$y,z\in S$ with $x=y+z$. The semigroup is atomic if $S\setminus\mathcal{U}(S)$
is generated by its atoms. The set of atoms of $S$ is denoted by
$\mathcal{A}(S)$.

Let $\mathrm{FS}(\mathbb{N})$ be the set whose elements are the finite non-
empty subsets of $\mathbb{N}$. Recall that on $\mathrm{FS}(\mathbb{N})$, the
binary operation $+$ is defined as $A+B=\\{a+b\mid a\in A,b\in B\\}$ for all
$A,B\in\mathrm{FS}(\mathbb{N})$. The pair $(\mathrm{FS}(\mathbb{N}),+)$ is a
commutative monoid with identity element equal to $\\{0\\}$. Every finitely
generated submonoid of $(\mathrm{FS}(\mathbb{N}),+)$ is called a sumset
semigroup. If $A\in\mathrm{FS}(\mathbb{N})$ and $\alpha\in\mathbb{N}$, denote
by $\alpha\otimes A$ the sumset $\sum_{i=1}^{\alpha}A$.

The monoid $\mathrm{FS}(\mathbb{N})$ satisfies the following interesting
properties:

  * •

since $\\{1,3\\}+\\{1,2,3\\}=\\{1,2,3\\}+\\{1,2,3\\}$, it is non-cancellative;

  * •

it is a reduced monoid;

  * •

since $2\otimes\\{1,2,4,5\\}=2\otimes\\{1,2,3,4,5\\}$, it is not torsion free;

  * •

by Proposition 3.2 of [5], this monoid is atomic.

The operation $\otimes$ has good properties, as shown in the following lemma.

######  Lemma 4.

Let $A$, $B$ be in $\mathrm{FS}(\mathbb{N})$ and $\alpha,\beta\in\mathbb{N}$,
then:

  1. 1.

$\alpha\otimes(\beta\otimes A)=(\alpha\beta)\otimes A$;

  2. 2.

$\alpha\otimes(A+B)=\alpha\otimes A+\alpha\otimes B$.

Let $S$ be a sumset semigroup minimally generated by
$\\{A_{1},\ldots,A_{t}\\}$. By definition, the elasticity of a non-unit $A\in
S$ is $\rho(A)=\sup\big{\\{}m/n\mid\exists
a_{1},\ldots,a_{m},b_{1},\ldots,b_{n}\in\mathcal{A}(S)\text{ with
}A=\sum_{i=1}^{m}a_{i}=\sum_{i=1}^{n}b_{i}\big{\\}}$, and the elasticity of
$S$ is $\rho(S)=\sup\\{\rho(A)\mid A\in S\setminus\\{0\\}\\}$. If there is an
element in the monoid whose elasticity “reaches” that of the whole monoid, we
say that the monoid has acceptable elasticity.

Note that the ideal associated to $S$ is

$I_{S}=\Big{\langle}\Big{\\{}X^{\alpha}-X^{\beta}\mid\sum_{i=1}^{t}\alpha_{i}\otimes
A_{i}=\sum_{i=1}^{t}\beta_{i}\otimes
A_{i}\Big{\\}}\Big{\rangle}\subset\mathbf{k}[x_{1},\ldots,x_{t}].$

Let $\alpha\in M\cap\mathbb{N}^{t}$ be a non-zero element, thus there exists
$\beta\in\mathbb{N}^{t}$ such that
$X^{\alpha+\beta}-X^{\beta}=X^{\beta}(X^{\alpha}-1)\in I_{S}$, and then
$\sum_{i=1}^{t}(\alpha_{i}+\beta_{i})A_{i}=\sum_{i=1}^{t}\beta_{i}A_{i}$.
Therefore,
$\max\sum_{i=1}^{t}(\alpha_{i}+\beta_{i})A_{i}=\sum_{i=1}^{t}\big{(}\alpha_{i}+\beta_{i}\big{)}\max
A_{i}>\sum_{i=1}^{t}\beta_{i}\max A_{i}=\max\sum_{i=1}^{t}\beta_{i}A_{i}$,
which it is not possible. Hence, $M\cap\mathbb{N}^{t}$ is $\\{0\\}$, and the
ideal $I_{S}$ is strongly reduced.

Since $I_{S}$ is strongly reduced, we have that $S$ is an atomic reduced
semigroup with finite elasticity (see Theorem 15 in [13]). Moreover,

$\rho(S)=\max\left\\{\frac{\sum_{i=1}^{t}\alpha_{i}}{\sum_{i=1}^{t}\beta_{i}}\mid(\alpha,\beta)\in\mathcal{A}({\cal
I}_{M})\right\\}.$ (1)

If $A=\\{a_{1}<\dots<a_{n}\\}\in\mathrm{FS}(\mathbb{N})$, then
$A=\\{a_{1}\\}+\\{0,a_{2}-a_{1},\dots,a_{n}-a_{1}\\}$ (denote
$\\{0,a_{2}-a_{1},\dots,a_{n}-a_{1}\\}$ by $\tilde{A}$). The semigroup
$S=\langle A_{1},\dots,A_{t}\rangle$, with
$A_{i}=\\{a_{i1}<\dots<a_{it_{i}}\\}$, is a submonoid of
$\langle\\{a_{11}\\},\dots,\\{a_{1t}\\},\tilde{A}_{1},\dots,\tilde{A}_{t}\rangle$.
Trivially, the sumset semigroup
$\langle\\{a_{11}\\},\dots,\\{a_{1t}\\}\rangle$ is isomorphic to the semigroup
$\langle a_{11},\dots,a_{1t}\rangle$, thus $I_{\langle
a_{1},\ldots,a_{s}\rangle}=I_{\langle\\{a_{11}\\},\dots,\\{a_{1t}\\}\rangle}$.

######  Proposition 5.

For every
$\tilde{S}=\big{\\{}\\{a_{1}\\},\dots,\\{a_{s}\\},\tilde{A}_{1},\dots,\tilde{A}_{t}\big{\\}}$,
with $a_{i}\neq 0$ and $\min\tilde{A}_{i}=0$, we have
$I_{\tilde{S}}=I_{\langle
a_{1},\ldots,a_{s}\rangle}+I_{\langle\tilde{A}_{1},\ldots,\tilde{A}_{t}\rangle}$,
where $I_{\langle
a_{1},\ldots,a_{s}\rangle}\subset\mathbf{k}[x_{1},\ldots,x_{s}]$ and
$I_{\langle\tilde{A}_{1},\ldots,\tilde{A}_{t}\rangle}\subset\mathbf{k}[y_{1},\ldots,y_{t}]$.

###### Proof.

Trivially, $I_{\langle
a_{1},\ldots,a_{s}\rangle},I_{\langle\tilde{A}_{1},\ldots,\tilde{A}_{t}\rangle}\subset
I_{\tilde{S}}$.

Let $X^{\alpha}Y^{\beta}-X^{\gamma}Y^{\delta}\in I_{\tilde{S}}$, then
$\sum_{i=1}^{s}\alpha_{i}\otimes\\{a_{i}\\}+\sum_{i=1}^{t}\beta_{i}\otimes\tilde{A}_{i}=\sum_{i=1}^{s}\gamma_{i}\otimes\\{a_{i}\\}+\sum_{i=1}^{t}\delta_{i}\otimes\tilde{A}_{i}$.
Since $\min\tilde{A}_{i}=0$, we then have
$\sum_{i=1}^{s}\alpha_{i}\otimes\\{a_{i}\\}=\sum_{i=1}^{s}\gamma_{i}\otimes\\{a_{i}\\}$,
and
$\sum_{i=1}^{t}\beta_{i}\otimes\tilde{A}_{i}=\sum_{i=1}^{t}\delta_{i}\otimes\tilde{A}_{i}$.
That is to say, $X^{\alpha}-X^{\gamma}\in I_{\langle
a_{1},\ldots,a_{s}\rangle}$, and $Y^{\beta}-Y^{\delta}\in
I_{\langle\tilde{A}_{1},\ldots,\tilde{A}_{t}\rangle}$. Note that
$X^{\alpha}Y^{\beta}-X^{\gamma}Y^{\delta}=Y^{\beta}(X^{\alpha}-X^{\gamma})+X^{\gamma}(Y^{\beta}-Y^{\delta})\in
I_{\langle
a_{1},\ldots,a_{s}\rangle}+I_{\langle\tilde{A}_{1},\ldots,\tilde{A}_{t}\rangle}\subset\mathbf{k}[x_{1},\ldots
x_{s},y_{1}\ldots,y_{t}]$. ∎

Since the semigroup $\langle a_{1},\ldots,a_{s}\rangle$ is isomorphic to a
numerical semigroup, there exist algorithms for computing $I_{\langle
a_{1},\ldots,a_{s}\rangle}$. Thus, to compute a presentation of $\tilde{S}$ we
need an algorithm to calculate
$I_{\langle\tilde{A}_{1},\ldots,\tilde{A}_{t}\rangle}$. In the next sections,
we provide some algorithms for computing the ideals of some families of sumset
semigroups.

##  3 Ideals of a fundamental family of sumset semigroups

In this section, we give explicitly the ideals associated with the sumset
semigroups generated by the elements $\\{0,k\mathbf{a}\\}$ and
$\\{0,k\mathbf{b}\\}$, where $\mathbf{a}<\mathbf{b}$ are two positive co-prime
integers, and $k\in\mathbb{N}\setminus\\{0\\}$. These semigroups are key to
provide an algorithm to compute the semigroup ideals of more types of sumset
semigroups.

Fix $\mathbf{a}<\mathbf{b}$ as two positive co-prime integers and
$k\in\mathbb{N}\setminus\\{0\\}$, and consider the semigroup
$\overline{S}=\langle k\mathbf{a},k\mathbf{b}\rangle$ and the sumset semigroup
$\widetilde{S}$ minimally generated by $\\{0,k\mathbf{a}\\}$ and
$\\{0,k\mathbf{b}\\}$. We prove that $I_{\widetilde{S}}\subset\mathbf{k}[x,y]$
is a principal ideal providing its generator. Note that
$I_{\widetilde{S}}\subset I_{\overline{S}}=\langle
x^{\mathbf{b}}-y^{\mathbf{a}}\rangle$.

######  Lemma 6.

Set $x^{\alpha}y^{\beta}-x^{\gamma}y^{\delta}\in
I_{\widetilde{S}}\setminus\\{0\\}$. Then, $\alpha\neq\gamma$,
$\beta\neq\delta$ and $\alpha\cdot\beta\cdot\gamma\cdot\delta\geq 1$.

###### Proof.

Note that, since $f=x^{\alpha}y^{\beta}-x^{\gamma}y^{\delta}\in
I_{\widetilde{S}}$,
$\alpha\otimes\\{0,k\mathbf{a}\\}+\beta\otimes\\{0,k\mathbf{b}\\}=\gamma\otimes\\{0,k\mathbf{a}\\}+\delta\otimes\\{0,k\mathbf{b}\\}$.

Suppose $\alpha=\gamma$, then we have $\alpha k\mathbf{a}+\beta
k\mathbf{b}=\max\big{\\{}\alpha\otimes\\{0,k\mathbf{a}\\}+\beta\otimes\\{0,k\mathbf{b}\\}\big{\\}}\
=\max\big{\\{}\alpha\otimes\\{0,k\mathbf{a}\\}+\delta\otimes\\{0,k\mathbf{b}\\}\big{\\}}=\alpha
k\mathbf{a}+\delta k\mathbf{b}$, and $\beta=\delta$. Since $f\neq 0$, this is
not possible, and therefore $\alpha\neq\gamma$. Analogously, it can be proved
that $\beta\neq\delta$.

Suppose $\alpha=0$, then we have
$k\mathbf{b}=\min\big{\\{}\beta\otimes\\{0,k\mathbf{b}\\}\setminus\\{0\\}\big{\\}}=\min\big{\\{}(\gamma\otimes\\{0,k\mathbf{a}\\}+\delta\otimes\\{0,k\mathbf{b}\\})\setminus\\{0\\}\big{\\}}$.
If $\gamma$ is non-zero, then
$k\mathbf{b}=\min\big{\\{}(\gamma\otimes\\{0,k\mathbf{a}\\}+\delta\otimes\\{0,k\mathbf{b}\\})\setminus\\{0\\}\big{\\}}=k\mathbf{a}$.
Therefore, the integers $\gamma$, $\beta$, and $\delta$ are zero and $f=0$.
Similarly, $\beta,\gamma,\delta\geq 1$ can be proved. ∎

In the sequel, we assume $\alpha>\gamma\geq 1$, and
$x^{\alpha}y^{\beta}-x^{\gamma}y^{\delta}\in
I_{\widetilde{S}}\setminus\\{0\\}$. Since $I_{\widetilde{S}}\subset\langle
x^{\mathbf{b}}-y^{\mathbf{a}}\rangle$, $\alpha\geq\mathbf{b}$ and
$\delta\geq\mathbf{a}$.

######  Lemma 7.

If $\alpha>\gamma$, then $\delta>\beta$. Additionally, there exists a positive
integer $n$ such that $\alpha=n\mathbf{b}+\gamma$ and
$\delta=n\mathbf{a}+\beta$.

###### Proof.

Since $x^{\alpha}y^{\beta}-x^{\gamma}y^{\delta}\in I_{\widetilde{S}}$,
$\alpha\otimes\\{0,k\mathbf{a}\\}+\beta\otimes\\{0,k\mathbf{b}\\}=\gamma\otimes\\{0,k\mathbf{a}\\}+\delta\otimes\\{0,k\mathbf{b}\\}$,
and $\alpha k\mathbf{a}+\beta
k\mathbf{b}=\max\big{\\{}\alpha\otimes\\{0,k\mathbf{a}\\}+\beta\otimes\\{0,k\mathbf{b}\\}\big{\\}}\
=\max\big{\\{}\gamma\otimes\\{0,k\mathbf{a}\\}+\delta\otimes\\{0,k\mathbf{b}\\}\big{\\}}=\gamma
k\mathbf{a}+\delta k\mathbf{b}$. So,
$(\delta-\beta)k\mathbf{b}=(\alpha-\gamma)k\mathbf{a}>0$. Furthermore,
$(\alpha-\gamma)/(\delta-\beta)=\mathbf{b}/\mathbf{a}$. Since
$\gcd(\mathbf{a},\mathbf{b})=1$, there exist two positive integers $n$ and $m$
such that $\alpha=n\mathbf{b}+\gamma$ and $\delta=m\mathbf{a}+\beta$. From the
equality $\alpha k\mathbf{a}+\beta k\mathbf{b}=\gamma k\mathbf{a}+\delta
k\mathbf{b}$, we deduce that $n=m$. ∎

######  Lemma 8.

Let $x^{\alpha}y^{\beta}-x^{\gamma}y^{\delta}\in
I_{\widetilde{S}}\setminus\\{0\\}$. Then, $\gamma\geq\mathbf{b}-1$,
$\beta\geq\mathbf{a}-1$, and there is a positive integer $n\in\mathbb{N}$ such
that
$x^{\alpha}y^{\beta}-x^{\gamma}y^{\delta}=x^{\gamma}y^{\beta}(x^{n\mathbf{b}}-y^{n\mathbf{a}})$.

###### Proof.

Assume $\gamma<\mathbf{b}-1$. Take $(\gamma+1)k\mathbf{a}+\beta k\mathbf{b}$
in $\alpha\otimes\\{0,k\mathbf{a}\\}+\beta\otimes\\{0,k\mathbf{b}\\}$ (recall
$\alpha>\gamma$). For that element, there exist two integers $i\in[0,\gamma]$
and $j\in[0,\delta]$ such that $(\gamma+1)k\mathbf{a}+\beta
k\mathbf{b}=(\gamma-i)k\mathbf{a}+(\delta-j)k\mathbf{b}\in\gamma\\{0,k\mathbf{a}\\}+\delta\\{0,k\mathbf{b}\\}$,
hence $(1+i)k\mathbf{a}=(\delta-\beta-j)k\mathbf{b}$. Since
$\gcd(\mathbf{a},\mathbf{b})=1$, $i+1\geq\mathbf{b}$ and
$i\geq\mathbf{b}-1>\gamma$, but $i\leq\gamma$, which is a contradiction.
Analogously, the fact $\beta\geq\mathbf{a}-1$ can be proved.

By Lemma 7, there exists $n\in\mathbb{N}\setminus\\{0\\}$ such that

$x^{\alpha}y^{\beta}-x^{\gamma}y^{\delta}=x^{n\mathbf{b}+\gamma}y^{\beta}-x^{\gamma}y^{n\mathbf{a}+\beta}=x^{\gamma}y^{\beta}(x^{n\mathbf{b}}-y^{n\mathbf{a}}).$

∎

######  Theorem 9.

Let $1\leq\mathbf{a}<\mathbf{b}$ be two co-prime integers,
$k\in\mathbb{N}\setminus\\{0\\}$, and $\widetilde{S}$ be the sumset semigroup
$\langle\\{0,k\mathbf{a}\\},\\{0,k\mathbf{b}\\}\rangle$. The ideal
$I_{\widetilde{S}}\subset\mathbf{k}[x,y]$ is principal and is generated by
$x^{\mathbf{b}-1}y^{\mathbf{a}-1}(x^{\mathbf{b}}-y^{\mathbf{a}})$.

###### Proof.

Observe that
$x^{\mathbf{b}-1}y^{\mathbf{a}-1}(x^{\mathbf{b}}-y^{\mathbf{a}})=x^{2\mathbf{b}-1}y^{\mathbf{a}-1}-x^{\mathbf{b}-1}y^{2\mathbf{a}-1}$.
To prove this theorem, we describe explicitly the sets
$A=(2\mathbf{b}-1)\otimes\\{0,k\mathbf{a}\\}+(\mathbf{a}-1)\otimes\\{0,k\mathbf{b}\\}$
and
$B=(\mathbf{b}-1)\otimes\\{0,k\mathbf{a}\\}+(2\mathbf{a}-1)\otimes\\{0,k\mathbf{b}\\}$
associated with the monomials $x^{2\mathbf{b}-1}y^{\mathbf{a}-1}$ and
$x^{\mathbf{b}-1}y^{2\mathbf{a}-1}$ (respectively), to achieve $A=B$.

Note that the first set
$A=(2\mathbf{b}-1)\otimes\\{0,k\mathbf{a}\\}+(\mathbf{a}-1)\otimes\\{0,k\mathbf{b}\\}$
is equal to

$\begin{split}\\{0,k\mathbf{a},\ldots,(2\mathbf{b}-1)k\mathbf{a}\\}+\\{0,k\mathbf{b},\ldots,(\mathbf{a}-1)k\mathbf{b}\\}=\\\
=k\Big{(}\\{0,\mathbf{a},\ldots,(2\mathbf{b}-1)\mathbf{a}\\}\cup\\{0,\mathbf{b},\ldots,(\mathbf{a}-1)\mathbf{b}\\}\cup\\\
\\{\mathbf{a}+\mathbf{b},\ldots,\mathbf{a}+(\mathbf{a}-1)\mathbf{b}\\}\cup\\{2\mathbf{a}+\mathbf{b},\ldots,2\mathbf{a}+(\mathbf{a}-1)\mathbf{b}\\}\cup\cdots\\\
\cup\\{(2\mathbf{b}-1)\mathbf{a}+\mathbf{b},\ldots,(2\mathbf{b}-1)\mathbf{a}+(\mathbf{a}-1)\mathbf{b}\\}\Big{)}\\\
=k\Big{(}\\{0,\mathbf{a},\ldots,(\mathbf{b}-1)\mathbf{a},\mathbf{b}\mathbf{a},(\mathbf{b}+1)\mathbf{a},\ldots,(2\mathbf{b}-1)\mathbf{a}\\}\cup\\\
\\{0,\mathbf{b},\ldots,(\mathbf{a}-1)\mathbf{b}\\}\cup\\{\mathbf{a}+\mathbf{b},\ldots,\mathbf{a}+(\mathbf{a}-1)\mathbf{b}\\}\cup\cdots\\\
\cup\\{(\mathbf{b}-1)\mathbf{a}+\mathbf{b},\ldots,(\mathbf{b}-1)\mathbf{a}+(\mathbf{a}-1)\mathbf{b}\\}\cup\\\
\\{\mathbf{b}\mathbf{a}+\mathbf{b},\ldots,\mathbf{b}\mathbf{a}+(\mathbf{a}-1)\mathbf{b}\\}\cup\\\
\\{(\mathbf{b}+1)\mathbf{a}+\mathbf{b},\ldots,(\mathbf{b}+1)\mathbf{a}+(\mathbf{a}-1)\mathbf{b}\\}\cup\cdots\\\
\cup\\{(2\mathbf{b}-1)\mathbf{a}+\mathbf{b},\ldots,(2\mathbf{b}-1)\mathbf{a}+(\mathbf{a}-1)\mathbf{b}\\}\Big{)}.\\\
\end{split}$

We denote $C_{1}=\\{0,\mathbf{a},\ldots,(\mathbf{b}-1)\mathbf{a}\\}$,
$C_{2}=\\{0,\mathbf{b},\ldots,(\mathbf{a}-1)\mathbf{b}\\}$,
$C_{3}=\cup_{i=1}^{\mathbf{b}-1}\\{i\mathbf{a}+\mathbf{b},\ldots,i\mathbf{a}+(\mathbf{a}-1)\mathbf{b}\\}$,
$C_{4}=\\{\mathbf{a}\mathbf{b}\\}\cup\\{\mathbf{b}\mathbf{a}+\mathbf{b},\ldots,\mathbf{b}\mathbf{a}+(\mathbf{a}-1)\mathbf{b}\\}$,
$C_{5}=\\{(\mathbf{b}+1)\mathbf{a},\ldots,(2\mathbf{b}-1)\mathbf{a}\\}$, and
$C_{6}=\cup_{i=\mathbf{b}+1}^{2\mathbf{b}-1}\\{i\mathbf{a}+\mathbf{b},\ldots,i\mathbf{a}+(\mathbf{a}-1)\mathbf{b}\\}$.
The set $A$ is the union $\cup_{i=1}^{6}kC_{i}$.

The set
$B=(\mathbf{b}-1)\otimes\\{0,k\mathbf{a}\\}+(2\mathbf{a}-1)\otimes\\{0,k\mathbf{b}\\}$
is

$\\{0,k\mathbf{a},\ldots,(\mathbf{b}-1)k\mathbf{a}\\}+\\{0,k\mathbf{b},\ldots,(2\mathbf{a}-1)k\mathbf{b}\\}=\\\
=k\Big{(}\\{0,\mathbf{a},\ldots,(\mathbf{b}-1)\mathbf{a}\\}\cup\\{0,\mathbf{b},\ldots,(\mathbf{a}-1)\mathbf{b},\mathbf{a}\mathbf{b},\ldots,(2\mathbf{a}-1)\mathbf{b}\\}\cup\\\
\\{\mathbf{a}+\mathbf{b},\ldots,\mathbf{a}+(\mathbf{a}-1)\mathbf{b},\mathbf{a}+\mathbf{a}\mathbf{b},\ldots,\mathbf{a}+(2\mathbf{a}-1)\mathbf{b}\\}\cup\cdots\\\
\cup\\{(\mathbf{b}-1)\mathbf{a}+\mathbf{b},\ldots,(\mathbf{b}-1)\mathbf{a}+(\mathbf{a}-1)\mathbf{b},(\mathbf{b}-1)\mathbf{a}+\mathbf{a}\mathbf{b},\ldots,(\mathbf{b}-1)\mathbf{a}+(2\mathbf{a}-1)\mathbf{b}\\}\Big{)}\\\
=\cup_{i=1}^{6}kC_{i}.$

Thus, $A=B$, and
$x^{\mathbf{b}-1}y^{\mathbf{a}-1}(x^{\mathbf{b}}-y^{\mathbf{a}})\in I_{S}$.

To finish the proof, we use Lemma 8. If $n=1$, then
$x^{\alpha}y^{\beta}-x^{\gamma}y^{\delta}=x^{\gamma-\mathbf{b}+1}y^{\beta-\mathbf{a}+1}x^{\mathbf{b}-1}y^{\mathbf{a}-1}(x^{\mathbf{b}}-y^{\mathbf{a}})$.
In case $n>1$, by factorizing the binomial $x^{n\mathbf{b}}-y^{n\mathbf{a}}$,
we obtain

$x^{\alpha}y^{\beta}-x^{\gamma}y^{\delta}=\\\
x^{\gamma-\mathbf{b}+1}y^{\beta-\mathbf{a}+1}(x^{(n-1)\mathbf{b}}+x^{(n-2)\mathbf{b}}y+\cdots+xy^{(n-2)\mathbf{a}}+y^{(n-1)\mathbf{a}}){x^{\mathbf{b}-1}y^{\mathbf{a}-1}(x^{\mathbf{b}}-y^{\mathbf{a}})}.$

In any case,
$I_{\widetilde{S}}=\big{\langle}x^{\mathbf{b}-1}y^{\mathbf{a}-1}(x^{\mathbf{b}}-y^{\mathbf{a}})\big{\rangle}$.
∎

######  Corollary 10.

Let $a_{1},\ldots,a_{s}$ be positive integers, and $S$ be the sumset semigroup
generated by
$\big{\\{}\\{a_{1}\\},\dots,\\{a_{s}\\},\\{0,k\mathbf{a}\\},\\{0,k\mathbf{b}\\}\big{\\}}$.
Then,

$I_{S}=I_{\langle
a_{1},\ldots,a_{s}\rangle}+\big{\langle}x^{\mathbf{b}-1}y^{\mathbf{a}-1}(x^{\mathbf{b}}-y^{\mathbf{a}})\big{\rangle}\subset\mathbf{k}[x_{1},\ldots,x_{s},x,y].$

###### Proof.

From Proposition 5 and Theorem 9, we obtain the result. ∎

##  4 Computing the ideals of sumset semigroups

The aim of this section is to determine an algorithm for computing the ideals
associated with some families of sumset semigroups. As in the previous
section, we consider two positive co-prime integers $\mathbf{a}<\mathbf{b}$,
$k\in\mathbb{N}\setminus\\{0\\}$, the semigroup $\overline{S}=\langle
k\mathbf{a},k\mathbf{b}\rangle$, and the sumset semigroup
$\widetilde{S}=\langle\\{0,k\mathbf{a}\\},\\{0,k\mathbf{b}\\}\rangle$.

For any two non-negative integers $n$ and $m$, $A_{nm}$ denotes
$\big{\\{}\alpha k\mathbf{a}+\beta
k\mathbf{b}\mid\alpha\in\\{0,\ldots,n\\},\,\beta\in\\{0,\ldots,m\\}\big{\\}}=n\otimes
k\\{0,\mathbf{a}\\}+m\otimes k\\{0,\mathbf{b}\\}$.

######  Theorem 11.

Let $\\{(n_{i},m_{i})\mid
n_{i},m_{i}\in\mathbb{N},\,n_{i}+m_{i}>0,\,i=1,\ldots,t\\}$ be a non-empty
subset of $\mathbb{N}^{2}$,
$b_{1},\ldots,b_{p},a_{1},\ldots,a_{s}\in\mathbb{N}\setminus\\{0\\}$ with
$s\leq t$, and consider $S$ the sumset semigroup generated by

$\big{\\{}\\{b_{1}\\},\ldots,\\{b_{p}\\},\\{a_{1}\\}+A_{n_{1}m_{1}},\ldots,\\{a_{s}\\}+A_{n_{s}m_{s}},A_{n_{s+1}m_{s+1}},\ldots,A_{n_{t}m_{t}}\big{\\}},$

and the sumset semigroup
$S^{\prime}=\big{\langle}\\{b_{1}\\},\ldots,\\{b_{p}\\},\\{a_{1}\\},\ldots,\\{a_{s}\\},\\{0,k\mathbf{a}\\},\\{0,k\mathbf{b}\\}\big{\rangle}$.
Then, $I_{S}\in\mathbf{k}[x_{1},\ldots,x_{p},z_{1},\ldots,z_{t}]$ is

$\Big{(}I_{S^{\prime}}+\big{\langle}z_{1}-w_{1}x^{n_{1}}y^{m_{1}},\ldots,z_{s}-w_{s}x^{n_{s}}y^{m_{s}},z_{s+1}-x^{n_{s+1}}y^{m_{s+1}},\ldots,z_{t}-x^{n_{t}}y^{m_{t}}\big{\rangle}\Big{)}\\\
\bigcap\mathbf{k}[x_{1},\ldots,x_{p},z_{1},\ldots,z_{t}],$

with
$I_{S^{\prime}}\subset\mathbf{k}[x_{1},\ldots,x_{p},w_{1},\ldots,w_{s},x,y]$.

###### Proof.

Denote $J$ to the ideal

$\big{\langle}z_{1}-w_{1}x^{n_{1}}y^{m_{1}},\ldots,z_{s}-w_{s}x^{n_{s}}y^{m_{s}},z_{s+1}-x^{n_{s+1}}y^{m_{s+1}},\ldots,z_{t}-x^{n_{t}}y^{m_{t}}\big{\rangle}.$

Any monomials $Z^{\beta}$ and $Z^{\delta}$ can be rewritten as follows. Denote
$f_{i}=\prod_{k=i}^{t}z_{i}^{\beta_{j}}$,
$\hat{f}_{i}=\prod_{k=i}^{t}z_{i}^{\delta_{j}}$,
$g_{i}^{j}=\prod_{k=i}^{j}(w_{k}x^{n_{k}}y^{m_{k}})^{\beta_{k}}$,
$\hat{g}_{i}^{j}=\prod_{k=i}^{j}(w_{k}x^{n_{k}}y^{m_{k}})^{\delta_{k}}$,
$h_{i}^{j}=\prod_{k=i}^{j}(x^{n_{k}}y^{m_{k}})^{\beta_{k}}$,
$\hat{h}_{i}^{j}=\prod_{k=i}^{j}(x^{n_{k}}y^{m_{k}})^{\delta_{k}}$, and
suppose $\beta_{0}=\delta_{0}=0$, then we have that

$Z^{\beta}=z_{1}^{\beta_{1}}\cdots
z_{t}^{\beta_{t}}=\sum_{i=0}^{s-1}f_{i+2}g_{0}^{i}\big{(}z_{i+1}^{\beta_{i+1}}-g_{i+1}^{i+1}\big{)}+\sum_{i=s+1}^{t}f_{i+1}g_{1}^{s}h_{s+1}^{i-1}\big{(}z_{i}^{\beta_{i}}-h_{i}^{i}\big{)}+g_{1}^{s}h_{s+1}^{t}$

and

$Z^{\delta}=z_{1}^{\delta_{1}}\cdots
z_{t}^{\delta_{t}}=\sum_{i=0}^{s-1}\hat{f}_{i+2}\hat{g}_{0}^{i}\big{(}z_{i+1}^{\delta_{i+1}}-\hat{g}_{i+1}^{i+1}\big{)}+\sum_{i=s+1}^{t}\hat{f}_{i+1}\hat{g}_{1}^{s}\hat{h}_{s+1}^{i-1}\big{(}z_{i}^{\delta_{i}}-\hat{h}_{i}^{i}\big{)}+\hat{g}_{1}^{s}\hat{h}_{s+1}^{t}.$

Denote
$F=X^{\alpha}g_{1}^{s}h_{s+1}^{t}-X^{\gamma}\hat{g}_{1}^{s}\hat{h}_{s+1}^{t}$.

Since any binomial $u^{n}-v^{n}$ is equal to
$(u-v)(u^{n-1}+u^{n-2}v+\cdots+uv^{n-2}+v^{n-1})$, the binomials
$z_{i}^{n}-(w_{i}x^{n_{i}}y^{m_{i}})^{n}$ and
$z_{j}^{n}-(x^{n_{j}}y^{m_{j}})^{n}$ belong to $J$ for every non-negative
integer $n$ and all $i=1,\ldots,s$ and $j=s+1,\ldots,t$.

Let $X^{\alpha}Z^{\beta}-X^{\gamma}Z^{\delta}$ be a binomial belonging to
$I_{S^{\prime}}+J$, so $F=X^{\alpha}Z^{\beta}-X^{\gamma}Z^{\delta}+q\in
I_{S^{\prime}}+J,$ with $q\in J$. By Lemma 2, we have $F\in I_{S^{\prime}}$,
hence

$\sum_{i=1}^{p}\alpha_{i}\otimes\\{b_{i}\\}+\sum_{i=1}^{s}\beta_{i}\otimes\\{a_{i}\\}+\sum_{i=1}^{t}\Big{(}\beta_{i}\otimes\big{(}n_{i}\otimes\\{0,k\mathbf{a}\\}\big{)}+\beta_{i}\otimes\big{(}m_{i}\otimes\\{0,k\mathbf{b}\\}\big{)}\Big{)}=\\\
\sum_{i=1}^{p}\gamma_{i}\otimes\\{b_{i}\\}+\sum_{i=1}^{s}\delta_{i}\otimes\\{a_{i}\\}+\sum_{i=1}^{t}\Big{(}\delta_{i}\otimes\big{(}n_{i}\otimes\\{0,k\mathbf{a}\\}\big{)}+\delta_{i}\otimes\big{(}m_{i}\otimes\\{0,k\mathbf{b}\\}\big{)}\Big{)}.$

Therefore,

$\sum_{i=1}^{p}\alpha_{i}\otimes\\{b_{i}\\}+\sum_{i=1}^{s}\beta_{i}\otimes\big{(}\\{a_{i}\\}+A_{n_{i}m_{i}}\big{)}+\sum_{i=s+1}^{t}\beta_{i}A_{n_{i}m_{i}}=\\\
\sum_{i=1}^{p}\gamma_{i}\otimes\\{b_{i}\\}+\sum_{i=1}^{s}\delta_{i}\otimes\big{(}\\{a_{i}\\}+A_{n_{i}m_{i}}\big{)}+\sum_{i=1}^{t}\delta_{i}A_{n_{i}m_{i}},$

and $X^{\alpha}Z^{\beta}-X^{\gamma}Z^{\delta}\in I_{S}$.

Analogously, if $X^{\alpha}Z^{\beta}-X^{\gamma}Z^{\delta}\in I_{S}$, then
$F\in I_{S^{\prime}}$, and $X^{\alpha}Z^{\beta}-X^{\gamma}Z^{\delta}\in
I_{S^{\prime}}+J$. This completes the proof.

∎

The above proof can also be done by using [12, Proposition 4]. In our proof,
we employ the language of polynomials, ideals and Gröbner bases, avoiding
congruences.

From Theorem 11, we obtain an algorithm (Algorithm 1) for computing the ideal
of the sumset semigroup generated by
$\big{\\{}\\{b_{1}\\},\ldots,\\{b_{p}\\},\\{a_{1}\\}+A_{n_{1}m_{1}},\ldots,\\{a_{s}\\}+A_{n_{s}m_{s}},A_{n_{s+1}m_{s+1}},\ldots,A_{n_{t}m_{t}}\big{\\}}$.

Data:
$\big{\\{}\\{b_{1}\\},\ldots,\\{b_{p}\\},\\{a_{1}\\}+A_{n_{1}m_{1}},\ldots,\\{a_{s}\\}+A_{n_{s}m_{s}},A_{n_{s+1}m_{s+1}},\ldots,A_{n_{t}m_{t}}\big{\\}}$,
the generating set of $S$ .

Result: $\cal G$, a generating set of the semigroup ideal of $S$.

begin

$S^{\prime}\leftarrow\big{\\{}\\{b_{1}\\},\ldots,\\{b_{p}\\},\\{a_{1}\\},\ldots,\\{a_{s}\\},\\{0,k\mathbf{a}\\},\\{0,k\mathbf{b}\\}\big{\\}}$;

$S_{1}\leftarrow\big{\\{}\\{b_{1}\\},\ldots,\\{b_{p}\\},\\{a_{1}\\},\ldots,\\{a_{s}\\}\big{\\}}$;

$G_{1}\leftarrow$ a generating set of $I_{\langle
S_{1}\rangle}\subset\mathbf{k}[X,W]$;

$G^{\prime}\leftarrow
G_{1}\sqcup\\{x^{\mathbf{b}-1}y^{\mathbf{a}-1}(x^{\mathbf{b}}-y^{\mathbf{a}})\\}\subset\mathbf{k}[X,W,x,y]$,
it is a generating set of $I_{\langle S^{\prime}\rangle}$ (Corollary 10);

$G_{2}\leftarrow
G^{\prime}\sqcup\\{z_{1}-w_{1}x^{n_{1}}y^{m_{1}},\ldots,z_{s}-w_{s}x^{n_{s}}y^{m_{s}},z_{s+1}-x^{n_{s+1}}y^{m_{s+1}},\ldots,z_{t}-x^{n_{t}}y^{m_{t}}\\}\subset\mathbf{k}[X,W,x,y,Z]$;

$G_{3}\leftarrow$ a Gröbner basis of $G_{2}$ respect to a monomial order with
$x,y,w_{q}>x_{i}$ and $x,y,w_{q}>z_{j}$ for every $i=1,\ldots,p$,
$j=1,\ldots,t$, and $q=1,\ldots,s$;

${\cal G}\leftarrow\\{X^{\alpha}Z^{\beta}-X^{\gamma}Z^{\delta}\mid
X^{\alpha}Z^{\beta}-X^{\gamma}Z^{\delta}\in G_{3}\\}$, it is a generating set
(Gröbner basis) of $I_{S}$;

return $\cal G$;

Algorithm 1 Computation of $I_{S}$.

We show how this algorithm works with an example.

######  Example 12.

Let $S$ be the sumset semigroup generated by

$\big{\\{}\\{3\\},\\{4\\},\\{6,12\\},\\{7,10,13\\},\\{0,3,6,9\\}\big{\\}}.$

Then, from the first steps of Algorithm 1,

  * •

$S^{\prime}=\big{\\{}\\{3\\},\\{4\\},\\{6\\},\\{7\\},\\{0,3\\},\\{0,6\\}\big{\\}}$,

  * •

$S_{1}=\big{\\{}\\{3\\},\\{4\\},\\{6\\},\\{7\\}\big{\\}}$.

If we compute a generating set of the ideal of $S_{1}$, then we get the
following one,
$G_{1}=\big{\\{}w_{1}^{7}-w_{2}^{6},w_{2}^{2}x_{2}-w_{1}^{3},w_{1}^{4}x_{2}-w_{2}^{4},w_{1}x_{2}^{2}-w_{2}^{2},x_{2}^{3}-w_{1}^{2},w_{2}x_{1}-w_{1}x_{2},w_{1}^{2}x_{1}-w_{2}x_{2}^{2},x_{1}x_{2}-w_{2},x_{1}^{2}-w_{1}\big{\\}}$.
Therefore, $G^{\prime}=G_{1}\cup\big{\\{}x(x^{2}-y)\big{\\}}$ and
$G_{2}=G^{\prime}\cup\big{\\{}z_{1}-w_{1}y,z_{2}-w_{2}x^{2},z_{3}-x^{3}\big{\\}}.$

Now, we compute a Gröbner basis of $G_{2}$ respect to the lexicographical
order where $x>y>w_{i}>x_{j}>z_{k}$ for all $i$, $j$, and $k$, and we obtain

$\begin{split}G_{3}=\big{\\{}&z_{1}^{21}z_{3}-z_{2}^{18}z_{3}^{3},z_{1}^{21}z_{2}-z_{2}^{19}z_{3}^{2},x_{2}z_{2}^{14}z_{3}^{3}-z_{1}^{17}z_{3},x_{2}z_{2}^{15}z_{3}^{2}-z_{1}^{17}z_{2},\\\
&x_{2}z_{1}^{4}z_{3}-z_{2}^{4}z_{3},x_{2}z_{1}^{4}z_{2}-z_{2}^{5},x_{2}^{2}z_{2}^{10}z_{3}^{3}-z_{1}^{13}z_{3},x_{2}^{2}z_{2}^{11}z_{3}^{2}-z_{1}^{13}z_{2},\\\
&x_{2}^{3}z_{2}^{6}z_{3}^{3}-z_{1}^{9}z_{3},x_{2}^{3}z_{2}^{7}z_{3}^{2}-z_{1}^{9}z_{2},x_{2}^{4}z_{2}^{2}z_{3}^{3}-z_{1}^{5}z_{3},x_{2}^{4}z_{2}^{3}z_{3}^{2}-z_{1}^{5}z_{2},\\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^{4}-x_{2}^{3}\big{\\}}.\end{split}$

Since the binomial $x_{1}z_{2}z_{3}-x_{2}z_{1}z_{3}\in I_{S}$,
$\\{3\\}+\\{7,10,13\\}+\\{0,3,6,9\\}=\\{4\\}+\\{6,12\\}+\\{0,3,6,9\\}$, but
$\\{3\\}+\\{7,10,13\\}\neq\\{4\\}+\\{6,12\\}$, the semigroup $S$ is non-
cancellative.

The following example introduces an algorithm to obtain an expression for an
integer set as a sum of other given integer sets, if possible. In particular,
the $i$-fold sumset of a set is studied.

######  Example 13.

We now use the above presentation of $S$ to check whether the element
$i\otimes\\{7,10,13\\}$ can be expressed in terms of the other generators of
the semigroup $S$. We compute the Gröbner basis with respect to the order
given by the matrix

$A=\left(\begin{array}[]{ccccc}0&0&0&1&0\\\ 1&1&1&0&1\\\ 1&0&0&0&0\\\
0&1&0&0&0\\\ 0&0&1&0&0\\\ \end{array}\right),$

and we obtain the set

$G_{A}=\big{\\{}x_{1}^{4}-x_{2}^{3},x_{1}^{2}x_{2}^{3}z_{3}^{3}-z_{1}^{3}z_{3},x_{2}^{6}z_{3}^{3}-x_{1}^{2}z_{1}^{3}z_{3},z_{1}^{2}z_{2}-x_{1}x_{2}^{4}z_{3}^{2},\\\
x_{1}z_{2}z_{3}-x_{2}z_{1}z_{3},x_{2}^{2}z_{2}z_{3}-x_{1}^{3}z_{1}z_{3},z_{1}z_{2}^{2}-x_{2}^{5}z_{3}^{2},x_{1}z_{2}^{2}-x_{2}z_{1}z_{2},\\\
x_{2}z_{2}^{2}z_{3}-x_{1}^{2}z_{1}^{2}z_{3},x_{2}^{2}z_{2}^{2}-x_{1}^{3}z_{1}z_{2},z_{2}^{3}-x_{1}^{3}x_{2}^{3}z_{3}^{2}\big{\\}}.$

In Table 1, we show some elements $z_{2}^{i}$ that when reduced with respect
to the basis $G_{A}$ are expressed by using only the variables $x_{1}$,
$x_{2}$, $z_{1}$, and $z_{3}$, and the expression of $i\otimes\\{7,10,13\\}$
in terms of the elements of the set
$\big{\\{}\\{3\\},\\{4\\},\\{6,12\\},\\{0,3,6,9\\}\big{\\}}$.

$i$ | Reduction of $z_{2}^{i}$ | $i\otimes\\{7,10,13\\}=$
---|---|---
$3$ | $x_{1}^{3}x_{2}^{3}z_{3}^{2}$ | $3\otimes\\{3\\}+3\otimes\\{4\\}+2\otimes\\{0,3,6,9\\}$
$4$ | $x_{1}^{2}x_{2}^{4}z_{1}z_{3}^{2}$ | $2\otimes\\{3\\}+4\otimes\\{4\\}+1\otimes\\{0,6,12\\}+2\otimes\\{0,3,6,9\\}$
$5$ | $x_{1}x_{2}^{5}z_{1}^{2}z_{3}^{2}$ | $1\otimes\\{3\\}+5\otimes\\{4\\}+2\otimes\\{0,6,12\\}+2\otimes\\{0,3,6,9\\}$
$6$ | $x_{2}^{6}z_{1}^{3}z_{3}^{2}$ | $6\otimes\\{4\\}+3\otimes\\{6,12\\}+2\otimes\\{0,3,6,9\\}$
$7$ | $x_{1}^{3}x_{2}^{4}z_{1}^{4}z_{3}^{2}$ | $3\otimes\\{3\\}+4\otimes\\{4\\}+4\otimes\\{0,6,12\\}+2\otimes\\{0,3,6,9\\}$
$8$ | $x_{1}^{2}x_{2}^{5}z_{1}^{5}z_{3}^{2}$ | $2\otimes\\{3\\}+5\otimes\\{4\\}+5\otimes\\{0,6,12\\}+2\otimes\\{0,3,6,9\\}$
Table 1: Expressions of some elements $i\otimes\\{7,10,13\\}$ in terms of the
subset of generators
$\big{\\{}\\{3\\},\\{4\\},\\{6,12\\},\\{0,3,6,9\\}\big{\\}}$.

In general, the reduction of $z_{2}^{i}$ with respect to $G_{A}$ is

$x_{1}^{(2-i){\rm\,mod\,}4}\,x_{2}^{\lfloor\frac{i+1}{4}\rfloor+2+\big{(}(i-3){\rm\,mod\,}4\big{)}}z_{1}^{i-3}z_{3}^{2}.$

Therefore, for every $i\geq 3$,

$i\otimes\\{7,10,13\\}=\big{(}{(2-i){\rm\,mod\,}4}\big{)}\otimes\\{3\\}+\\\
\Big{(}{\Big{\lfloor}\frac{i+1}{4}\Big{\rfloor}+2+\big{(}(i-3){\rm\,mod\,}4\big{)}}\Big{)}\otimes\\{4\\}+(i-3)\otimes\\{6,12\\}+2\otimes\\{0,3,6,9\\}.$

The last examples are dedicated to study the elasticity of a sumset semigroup.

######  Example 14.

Again, consider the semigroup $S$ given in example 12. From its ideal, we
compute a generating set of its associated lattice $M$,

$\big{\\{}\\{0,0,21,-18,-2\\},\\{0,1,-17,14,2\\},\\{0,1,4,-4,0\\},\\{0,2,-13,10,2\\},\\\
\\{0,3,-9,6,2\\},\\{0,4,-5,2,2\\},\\{0,5,-1,-2,2\\},\\{1,-1,-1,1,0\\},\\\
\\{1,0,3,-3,0\\},\\{1,4,-2,-1,2\\},\\{2,-1,2,-2,0\\},\\{2,3,-3,0,2\\},\\\
\\{3,-2,1,-1,0\\},\\{3,3,0,-3,2\\},\\{4,-3,0,0,0\\}\big{\\}},$

and its system of linear homogeneous equations,

$Ax=\left(\begin{array}[]{ccccc}-3&-4&2&1&12\\\ -6&-8&2&0&21\\\
\end{array}\right)x=0.$

We already know that $S$ is strongly reduced, but this fact is far for being
clear from the above equations. We can check it by computing with Normaliz [1]
its Hilbert basis:

        >>> c1=Cone(equations=[[-3,-4,2,1,12],[-6,-8,2,0,21]])
        >>> c1.HilbertBasis()
        []

Since the above output is the empty list, we have
$M\cap\mathbb{N}^{5}=\\{0\\}$. The Hilbert basis of $(A\mid-A)(x,y)=0$ has
$109$ elements:

$\begin{split}HB=\big{\\{}&\\{0,1,4,0,0,0,0,0,4,0\\},\\{1,0,3,0,0,0,0,0,3,0\\},\\{0,0,0,1,0,0,0,0,1,0\\},\\{0,0,21,0,0,0,0,0,18,2\\},\\\
&\\{0,21,0,0,8,0,0,0,12,0\\},\\{0,0,0,12,0,0,21,0,0,8\\},\\{0,0,1,0,0,0,0,1,0,0\\},\\{0,0,0,0,1,0,0,0,0,1\\},\\\
&\\{0,0,0,18,2,0,0,21,0,0\\},\\{1,0,0,15,2,0,0,18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2\\},\\\
&\\{6,1,1,0,2,0,0,0,4,0\\},\\{1,5,2,0,2,0,0,0,5,0\\},\\{0,5,0,0,2,0,0,1,2,0\\},\\{1,4,0,0,2,0,0,2,1,0\\},\\\
&\\{2,3,0,0,2,0,0,3,0,0\\},\\{3,0,2,1,0,0,7,0,0,2\\},\\{0,0,0,4,0,2,4,1,0,2\\},\\{0,4,0,2,2,0,0,5,0,0\\},\\\
&\\{0,5,0,1,2,1,0,4,0,0\\},\\{0,6,0,0,2,2,0,3,0,0\\},\\{0,0,0,3,0,7,0,0,0,2\\},\\{7,0,0,0,2,0,0,0,3,0\\},\\\
&\\{4,2,0,0,2,0,0,1,2,0\\},\\{5,1,0,0,2,0,0,2,1,0\\},\\{6,0,0,0,2,0,0,3,0,0\\},\\{2,4,1,0,2,0,0,0,4,0\\},\\\
&\\{1,0,0,3,0,0,6,0,0,2\\},\\{0,6,0,0,2,1,0,0,3,0\\},\\{3,2,0,1,2,0,0,4,0,0\\},\\{0,0,0,3,0,3,3,0,0,2\\},\\\
&\\{3,3,0,0,2,0,0,0,3,0\\}\big{\\}}\end{split}$

Now, using the formula (1), we conclude that the elasticity of $S$ is $3$.

To know if $S$ has acceptable elasticity, we use Algorithm 28 of [13] which is
implemented in
https://github.com/D-marina/CommutativeMonoids/blob/master/Sumsetssemigroups/sumsetSemigroups.ipynb
of [6]. Running the commands,

        >>> gb14=computationIS([3],[4],[6,12],[7,10,13],[0,3,6,9])
        >>> hasAcceptableElasticity(gb14, debug=True)
        ...
    Ψ    We compute a Groebner basis with the lex ordering of the variables
    Ψ    [x2, z1, x1, z2, z3]
    Ψ    GroebnerBasis([-x1**4 + x2**3, x1**4*x2**2*z3**2 - z1*z2**2,
    Ψ    -x1**3*z1*z2 + x2**2*z2**2, -x1**3*z1*z3 + x2**2*z2*z3,
    Ψ    -x1*z2**2 + x2*z1*z2, -x1*z2*z3 + x2*z1*z3,
    Ψ    x1**5*x2*z3**2 - z1**2*z2, -x1**2*z1**2*z2 + x2*z2**3,
    Ψ    -x1**2*z1**2*z3 + x2*z2**2*z3, -x1**6*z2*z3**2 + z1**3*z2,
    Ψ    -x1**6*z3**3 + z1**3*z3, x1**7*z3**2 - z2**3],
    Ψ    x2, z1, x1, z2, z3, domain=’ZZ’, order=’lex’)
    Ψ    Once removed the variables [x2, z1], we obtain
    Ψ    GroebnerBasis([x1**7*z3**2 - z2**3], x1, z2, z3, domain=’ZZ’,
    Ψ    order=’lex’)
        ...
        True

we obtain that the monoid has acceptable elasticity. Moreover, from the above
output, we see that the binomial $x_{1}^{7}x_{3}^{2}-z_{2}^{3}$ belongs to
$I_{S}$. Since the quotient of the addition of the exponents of these two
monomials is $(7+2)/3=3=\rho(S)$, the element
$7\otimes\\{3\\}+2\otimes\\{0,3,6,9\\}=3\otimes\\{7,10,13\\}$ reaches the
elasticity.

We see now an example of sumset semigroup without acceptable elasticity.

######  Example 15.

Let $S$ be the semigroup

$\big{\langle}\\{0,3\\},\\{0,4\\},\\{7,10,11,13,14,15,17,18,19,1,22,25\\}\big{\rangle}.$

Analogously as in the preceding example, we use function
hasAcceptableElasticity to check if $S$ has acceptable elasticity. The display
output of this function shows some steps of Algorithm 28 of [13] and returns
False, that is, the semigroup has not acceptable elasticity.

        >>> gb15=computationIS([0,3],[0,4],
                [7,10,11,13,14,15,17,18,19,1,22,25])
        >>> hasAcceptableElasticity(gb15, debug=True)
        Positive cone of M (the semigroup is strongly reduced): []
        Equations of M
        [[3, 4, 0], [0, 0, 1]]
        Matrix (A|-A) (equations of M \cap N^n, n=5):
        [[3, 4, 0, -3, -4, 0], [0, 0, 1, 0, 0, -1]]
        Generator system of M \cap N^n (number of generators 5):
        [[0, 0, 1, 0, 0, 1], [0, 1, 0, 0, 1, 0], [0, 3, 0, 4, 0, 0],
        [1, 0, 0, 1, 0, 0], [4, 0, 0, 0, 3, 0]]
        Elasticity of S: 4/3
        Atoms of A(I_M) that reach the elasticity:
            [[4, 0, 0, 0, 3, 0]]
        S has not acceptable elasticity (the monoid C is empty,
        see step 6 of algorithm in Algorithm 28 in
        http://doi.org/10.1007/s00233-002-0022-4)
        False

Acknowledgements. The authors were supported partially by Junta de Andalucía
research groups FQM-343 and FQM-366, and by the project MTM2017-84890-P
(MINECO/FEDER, UE).

## References

  * [1] W. Bruns, B. Ichim, C. Söger and U. von der Ohe.  Normaliz. Algorithms for rational cones and affine monoids.  Available at https://www.normaliz.uni-osnabrueck.de.
  * [2] D. A. Cox, J. Little, and D. O’Shea.  Ideals, Varieties, and Algorithms: An Introduction to Computational Algebraic Geometry and Commutative Algebra.  Undergraduate Texts in Mathematics. Springer, Cham, 2015.
  * [3] S. Eliahou, J. I. García-García, D. Marín-Aragón, and A. Vigneron-Tenorio.  The Buchweitz set of a numerical semigroup, 2020;  arXiv:2011.09187.
  * [4] Y. Fan, A. Geroldinger, F. Kainrath, and S. Tringali.  Arithmetic of commutative semigroups with a focus on semigroups of ideals and modules.  J. Algebra Appl. 16 (2017), no. 12, 1750234, 42 pp.
  * [5] Y. Fan and S. Tringali.  Power monoids: A bridge between factorization theory and arithmetic combinatorics.  J. Algebra 512 (2018), 252–294.
  * [6] J.I. García-García, D. Marín-Aragón, A. Sánchez-R.-Navarro, and A. Vigneron-Tenorio.  CommutativeMonoids, a Python library for computations in finitely generated commutative monoids.  Available at https://github.com/D-marina/CommutativeMonoids.
  * [7] R. Gilmer.  Commutative Semigroup Rings.  Chicago Lectures in Mathematics. 1984.
  * [8] M. B. Nathanson.  Additive Number Theory: Inverse Problems and the Geometry of Sumsets.  Graduate Texts in Mathematics. Springer, Vol. 165, 1996.
  * [9] P. Pisón-Casares, and A. Vigneron-Tenorio.  $\mathbb{N}$-solutions to linear systems over Z.  Linear Algebra Appl. 384 (2004), 135–154.
  * [10] J. C. Rosales y P. A. García-Sánchez,  Finitely generated commutative monoids. Nova Science Publishers, Inc., New York, 1999.
  * [11] J. C. Rosales and P. A. García-Sánchez.  Numerical Semigroups. Developments in Mathematics, 20. Springer, New York, 2009.
  * [12] J. C. Rosales, P. A. García-Sánchez, and J. I. García-García.  Presentations of finitely generated submonoids of finitely generated commutative monoids. Internat. J. Algebra Comput. 12 (2002), no. 5, 659–670.
  * [13] J. C. Rosales, P. A. García-Sánchez, and J. I. García-García.  Atomic commutative monoids and their elasticity. Semigroup Forum 68 (2004), no. 1, 64–86.
  * [14] J. C. Rosales, P. A. García-Sánchez, and J. M. Urbano-Blanco.  On presentations of commutative monoids. Internat. J. Algebra Comput 9 (1999), 539–553.
  * [15] T. Tao and V. Vu.  Additive Combinatorics: 105.  Cambridge; New York, 2006.