# Affine Semigroup Algebras And Their Fibered Sums

C-Y. Jean Chan and I-Chiau Huang and Jung-Chen Liu  Department of Mathematics,
Central Michigan University, Mt. Pleasant, MI 48859, U.S.A<EMAIL_ADDRESS>Institute of Mathematics, Academia Sinica, Taipei, Taiwan.
<EMAIL_ADDRESS>Department of Mathematics, National Taiwan Normal
University, Taipei, Taiwan<EMAIL_ADDRESS>
###### Abstract.

We study affine semigroup rings as algebras over subsemigroup rings. From this
relative viewpoint with respect to a given subsemigroup ring, the fibered sum
of two affine semigroup algebras is constructed. Such a construction is
compared to the tensor product and to the classical gluings of affine
semigroup rings as defined in Rosales[13].

While fibered sum can always be achieved, gluings of affine semigroup rings do
not always exist. Therefore, we further investigate when the fibered sum of
affine semigroup algebras gives rise to a gluing. A criterion is recovered in
terms of the defining semigroups under which the gluing may take place.

###### Key words and phrases:

affine semigroup, affine semigroup algebra, Apéry monomial, fibered sum,
gluing

###### 2020 Mathematics Subject Classification:

13F65; 13B10; 20M25; 20M50

##  1\. Introduction

The main aim of this paper is to construct fibered sums in the category of
affine semigroup rings as our perception regarding gluing of affine semigroup
rings. Our work is inspired by a question raised by Gimenez and Srinivasan [3]
about when and how affine semigroup rings can be glued. We recount the history
of gluing in the literature below, following a brief introduction of affine
semigroup rings.

In geometric perspective, an affine semigroup ring with the semigroup embedded
in ${\mathbb{Z}}^{d}$ represents regular functions on an affine variety
parametrized by $d$ variables. For instance, numerical semigroup rings are
associated with monomial curves. Higher dimensional affine semigroup rings can
be in some cases associated with affine toric varieties. Due to the multiple
layers of interpretations, affine semigroup rings have been of great interests
to many disciplines in mathematics.

An affine semigroup ring is usually regarded as a finitely generated algebra
over a field $\kappa$. Besides such an absolute viewpoint, an affine semigroup
ring can also be regarded as an algebra over another ring obtained from a
subsemigroup. The latter is what we call a relative viewpoint. Works along
this line among other topics have been done by the second author, Kim and
Jafari [8, 9, 10] in one-dimensional cases, that is, for numerical semigroup
rings.

In this paper, we implement our relative viewpoint on affine semigroup rings
to the concept of gluing, which was introduced originally in absolute cases.
Gluing of numerical semigroup rings in a special case appeared in Watanabe
[16, Lemma 1] following the study of complete intersection numerical semigroup
rings by Herzog [7]. Delorme [1] treated gluing systematically for numerical
semigroups and obtained a thorough characterization for complete
intersections. Gluing was generalized to affine semigroup rings by Rosales
[13]. It was further studied in Gimenez and Srinivasan [3, 4].

In the approach just mentioned above, gluing is defined for arbitrary two
numerical semigroup rings. However, gluing is not a general operation in
higher dimensions; it exists only between those pairs satisfying certain
conditions. More precisely, let $S_{1}$ and $S_{2}$ be two semigroups in
${\mathbb{N}}^{d}$ for some positive $d$, and consider their associated affine
semigroup rings $\kappa[S_{1}]$ and $\kappa[S_{2}]$ over a field $\kappa$. The
gluing of $\kappa[S_{1}]$ and $\kappa[S_{2}]$ is defined if there exist two
positive integers $a$ and $b$ such that some specific identification holds
between $\kappa[aS_{1}]$ and $\kappa[bS_{2}]$ (see (5) and (8) in Section 5),
where $aS_{1}$ is the rescaling of $S_{1}$ by the constant $a$, and similarly
for $bS_{2}$. In such a case, the gluing produces a larger affine semigroup
ring $\kappa[aS_{1}+bS_{2}]$, which is not necessarily isomorphic to
$\kappa[S_{1}+S_{2}]$, even though $\kappa[aS_{1}]$ is isomorphic to
$\kappa[S_{1}]$ and so is $\kappa[bS_{2}]$ to $\kappa[S_{2}]$. For example,
the affine semigroup ring $A=\kappa[x^{3},x^{2}y,xy^{2},y^{3}]$ can not be
glued to itself as shown in [3, Example 1]. On the other hand, $A$ has another
two isomorphic presentations
$A_{1}=\kappa[x^{3}y^{3},x^{3}y^{2}z,x^{3}yz^{2},x^{3}z^{3}]$ and
$A_{2}=\kappa[x^{4},x^{3}y,x^{2}y^{2},xy^{3}]$ (see Example 4.2). The latter
two copies $A_{1}$ and $A_{2}$ can be glued [2, Example 7]. It is crucial to
observe that $A$ is a subring of a polynomial ring in two variables while a
polynomial ring of three variables is required to house both $A_{1}$ and
$A_{2}$ simultaneously. This example illustrates that the existence of gluing
depends on the relative position of the two rings, or precisely, how the
affine semigroup rings are embedded.

Through another set of rings in Example 5.1 and the statements following it,
we will provide detailed explanations about the contrast of the phenomenon
presented by $A$ versus $A_{1}$ and $A_{2}$ just described. In particular,
while an adjustment of rescaling by $a$ and $b$ is allowed for the purpose of
possible gluing, we see that if matrix multiplications are utilized instead of
scalar multiplications, then one can transform the affine semigroup rings into
an appropriate ambient polynomial ring where the gluing may take place. The
resulting glued affine semigroup rings satisfy certain universal property.
This leads to the fibered sum in our consideration.

In other words, the fibered sum of affine semigroup algebras constructed in
this paper provides a more general perspective than gluing. The consideration
of algebras incorporates a coefficient ring which can be any affine
subsemigroup ring in general. Gluing is a special case of fibered sum where
the coefficient ring is isomorphic to a polynomial ring in one variable. We
investigate also when the fibered sum of affine semigroup rings gives rise to
a gluing. An equivalent condition to the availability of gluing two affine
semigroup rings with only scalar multiplications is worked out in Theorem 5.3
recovering a criterion in [13, Theorem 1.4].

We see in Theorem 4.6 that, under certain conditions, the fibered sum is the
same as a tensor product. Discussions in this regard can be found in Examples
4.10 and 4.11.

Since affine semigroup rings can be viewed as the exponential counterpart of
affine semigroups, our construction is built from the fibered sum of affine
semigroups. To make these statements precise, we begin with some definitions
which will be used throughout the paper.

A monoid is a nonempty set with an associative binary operation and an
identity element. Since the inverse of any given element may not exist, a
monoid is not necessarily a group. The binary operator of a monoid under our
consideration is always commutative. An affine semigroup is a finitely
generated monoid $S$ that satisfies the following intrinsic properties: for
any $s,s_{1},s_{2}\in S$,

  1. (i)

(cancellative) if $s+s_{1}=s+s_{2}$, then $s_{1}=s_{2}$;

  2. (ii)

(torsion free) if $ns_{1}=ns_{2}$ in $S$ for some positive integer $n$, then
$s_{1}=s_{2}$.

As seen in [14, Corollary 3.4], a finitely generated monoid is an affine
semigroup if and only if it can be embedded in ${\mathbb{Z}}^{d}$
(equivalently in ${\mathbb{Q}}^{d}$) for some positive integer $d$. We will
see in Section 2 that the cancellative and torsion free conditions are
essential in many discussions. As part of the definition, our affine semigroup
always contains an identity element. Following the modern convention, we use
${\mathbb{N}}$ to denote the set of non-negative integers.

Let $\kappa$ be a field. Associated to an affine semigroup $S$, an affine
semigroup ring is a $\kappa$-algebra generated by monomials with exponents in
$S$. More precisely, by embedding $S$ in ${\mathbb{Z}}^{d}$, we may identify
each element $s\in S$ with a $d$-tuple
$(s_{1},\dots,s_{d})\in{\mathbb{Z}}^{d}$ and consider the $\kappa$-algebra

$\kappa[\mathbf{u}^{S}]=\kappa[\\{\mathbf{u}^{s}=u_{1}^{s_{1}}\cdots
u_{d}^{s_{d}}\mid s=(s_{1},\dots,s_{d})\in S\\}].$

Obviously, the $\kappa$-algebra $\kappa[\mathbf{u}^{S}]$ is finitely generated
and since it is a subring of the Laurent polynomial ring $\kappa[u_{1}^{\pm
1},\dots,u_{d}^{\pm 1}]$, it is also an integral domain. Henceforth, we will
use $\kappa[\mathbf{u}^{S}]$ to denote an affine semigroup ring instead of
$\kappa[S]$. It is essential to distinguish various embeddings of an affine
semigroup ring. The use of variables $\mathbf{u}$ helps keep track of changes
of embeddings. Such necessity will become clear in Sections 4 and 5,
especially in the latter one.

The paper is organized as follows: Section 2 first establishes fibered sums in
the category of cancellative monoids. A fibered sum of affine semigroups turns
out to be a quotient of that of cancellative monoids. Corollary 2.13 offers a
glimpse of fibered sums in a special case: assuming that $S_{1}$, $S_{2}$ and
$S$ are subsemigroups contained in an affine semigroup $T$ with $S\subset
S_{1}\cap S_{2}$, then $S_{1}+S_{2}$ in $T$ is the fibered sum of $S_{1}$ and
$S_{2}$ over $S$ provided that
$\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})=\operatorname{Grp}(S)$,
where $\operatorname{Grp}(\cdot)$ denotes the group generated by the argument
in it. The key fact that proves this statement is also used in proving Lemma
5.4 and Theorem 5.3 that provide a condition enabling the gluing to take
place.

An affine semigroup $S$ is positive if the only subgroup contained in $S$ is
the trivial group. In particular, a numerical semigroup is positive. In
Section 3, we extend the notion of Apéry elements from numerical semigroups to
positive affine semigroups. The notion is relative in nature, with which we
may talk about representations of an element with respect to an affine
subsemigroup. This also leads to a criterion for flatness discussed in Section
4.

Built from the fibered sums of affine semigroups, Section 4 is dedicated to
affine semigroup algebras and their fibered sums. If $R^{\prime}$ is a
positive affine semigroup algebra over $R$, then, using Apéry elements,
Theorem 4.3 shows that $R^{\prime}$ is free over $R$ if and only if it is flat
over $R$. We also explore the comparison between fibered sums and the usual
tensor products. It is important to be reminded that the tensor product of two
affine semigroup algebras is not necessarily an affine semigroup algebra.
Theorem 4.6 proves that under certain conditions, the fibered sum of affine
semigroup algebras is isomorphic to the usual tensor product.

Section 5 offers an overall comparison between fibered sums and the gluing
defined by Rosales [13]. As mentioned previously, a fibered sum is a more
general notion and can be done between arbitrary two affine semigroup algebras
with a prescribed common coefficient ring. Our study of fibered sums is
inspired by the works of Gimenez and Srinivasan [3, 4]. We discover that
gluing, when available, satisfies certain universal property. In fact, gluing
is a special case of fibered sums when the coefficient ring is taken as a
polynomial ring in one variable (see Theorem 5.2). We also prove in Lemma 5.4
that whether or not a gluing exists depends on the relationship among the
groups generated by the semigroups under consideration.

##  2\. Fibered Sums

Through abelian groups, we construct and investigate fibered sums of
cancellative monoids and those of affine semigroups in this section. In a
category, the fibered sum of morphisms $S\to S_{1}$ and $S\to S_{2}$ consists
of an object $S_{1}\sqcup_{S}S_{2}$ together with morphisms $S_{1}\to
S_{1}\sqcup_{S}S_{2}$ and $S_{2}\to S_{1}\sqcup_{S}S_{2}$ such that the
diagram

$\textstyle{S_{1}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{S_{1}\sqcup_{S}S_{2}}$$\textstyle{S\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{S_{2}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$

is commutative and universal in the following sense: for any commutative
diagram

$\textstyle{S_{1}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{T}$$\textstyle{S\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{S_{2}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$

in the category, there exists a unique morphism $S_{1}\sqcup_{S}S_{2}\to T$
making the diagram

---
$\textstyle{T}$$\textstyle{S_{1}\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$-------$\textstyle{S_{1}\sqcup_{S}S_{2}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{S\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{S_{2}\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$---

commute. We also say that $S_{1}\sqcup_{S}S_{2}$ is the fibered sum of $S_{1}$
and $S_{2}$ over $S$.

In this paper, a monoid $S$ with the associative binary operation $+$ and an
identity element $0$ is always assumed to be commutative. A monoid is
cancellative if $s_{1}=s_{2}$ whenever $s_{1}+s_{3}=s_{2}+s_{3}$ for
$s_{1},s_{2},s_{3}\in S$. Every cancellative monoid $S$ is naturally contained
in its group of differences $\operatorname{Grp}(S)=\\{s_{1}-s_{2}\mid
s_{1},s_{2}\in S\\}$ with the binary operation inherited from $S$. A
homomorphism $S\to S^{\prime}$ of cancellative monoids induces a homomorphism
of abelian groups $\operatorname{Grp}(S)\to\operatorname{Grp}(S^{\prime})$. We
often denote the image of an element $s\in S$ in $S^{\prime}$ also by $s$.
Within a commutative diagram of monoids, such abuse of notation does not cause
confusion. A monoid $S$ is torsion free if for every $s_{1},s_{2}\in S$ and
positive integer $n$, the condition $ns_{1}=ns_{2}$ implies $s_{1}=s_{2}$.
Given a monoid $S$, we define an equivalence relation: for $s_{1},s_{2}\in S$,

$s_{1}\sim_{\operatorname{tor}}s_{2}\iff\text{ $\exists$ $n>0$ in
${\mathbb{Z}}$ such that }ns_{1}=ns_{2}.$

The quotient $S/\sim_{\operatorname{tor}}$ is a torsion free monoid. If a
monoid $S$ is cancellative, then so is $S/\sim_{\operatorname{tor}}$.

######  Example 2.1.

Any submonoid of the monoid ${\mathbb{N}}$ of nonnegative integers is finitely
generated, cancellative and torsion free. The submonoid $\\{(x,y)\mid
x,y>0\\}\cup\\{(0,0)\\}$ of ${\mathbb{N}}^{2}$ is cancellative and torsion but
not finitely generated.

An affine semigroup is a finitely generated monoid isomorphic to a submonoid
of ${\mathbb{Q}}^{d}$. An affine semigroup that can be embedded into
${\mathbb{N}}$ is called a numerical semigroup. In the literature, the
greatest common divisor of a numerical semigroup is usually assumed to be $1$.
In our definition, we lift the restriction on the greatest common divisor to
allow embeddings by rescaling. Multiplied by an integer, an affine semigroup
${\mathbb{Q}}^{d}$ can be embedded into some ${\mathbb{Z}}^{d}$. It is known
that a finitely generated commutative monoid is an affine semigroup if and
only if it is cancellative and torsion free [14, Corollary 3.4]. For an affine
semigroup $S$, the group $\operatorname{Grp}(S)$ is a free abelian group,
whose rank is denoted by $\operatorname{rank}(S)$.

The first main result of this section is the existence of fibered sums in the
category of cancellative monoids, and then by modulo the equivalence relation
$\sim_{\operatorname{tor}}$ defined above, we obtain fibered sums of affine
semigroups. Let $S\to S_{1}$ and $S\to S_{2}$ be homomorphisms of cancellative
monoids. Regardless of $S$, the direct sum of $S_{1}$ and $S_{2}$ is denoted
by $S_{1}\oplus S_{2}$ as usual. We shall construct a cancellative monoid
$S_{1}\oplus_{S}S_{2}$, which is a quotient of $S_{1}\oplus S_{2}$, and show
that it is a fibered sum in the category of cancellative monoids. If the
monoids $S,S_{1},S_{2}$ are affine semigroups, we shall construct an affine
semigroup $S_{1}\widetilde{\oplus}_{S}S_{2}$ and show that it is a fibered sum
in the category of affine semigroups.

Now, we begin to construct fibered sums in the category of cancellative
monoids. The homomorphisms $S\to S_{1}$ and $S\to S_{2}$ of cancellative
monoids induce the fibered sum
$\operatorname{Grp}(S_{1})\sqcup_{\operatorname{Grp}(S)}\operatorname{Grp}(S_{2})$
in the category of abelian groups that is isomorphic to the direct sum
$\operatorname{Grp}(S_{1})\oplus\operatorname{Grp}(S_{2})$ modulo the subgroup
consisting of elements $(s,-s)$, where $s\in\operatorname{Grp}(S)$.

######  Notation 2.2.

Let $S$, $S_{1}$ and $S_{2}$ be cancellative monoids. The notation
$S_{1}\oplus_{S}S_{2}$ denotes the image of the composition of the
homomorphisms

(1) $S_{1}\oplus
S_{2}\to\operatorname{Grp}(S_{1})\oplus\operatorname{Grp}(S_{2})\to\operatorname{Grp}(S_{1})\sqcup_{\operatorname{Grp}(S)}\operatorname{Grp}(S_{2}).$

Given an element $(s_{1},s_{2})$ in the direct sum $S_{1}\oplus S_{2}$, its
image in $S_{1}\oplus_{S}S_{2}$ is denoted by $s_{1}\oplus s_{2}$.

If $(s_{1},s_{2})$ and $(t_{1},t_{2})$ in $S_{1}\oplus S_{2}$ have the same
image, namely $s_{1}\oplus s_{2}=t_{1}\oplus t_{2}$ in
$\operatorname{Grp}(S_{1})\sqcup_{\operatorname{Grp}(S)}\operatorname{Grp}(S_{2})$,
then we must have $(s_{1},s_{2})=(t_{1},t_{2})+(s,-s)$ in
$\operatorname{Grp}(S_{1})\oplus\operatorname{Grp}(S_{2})$ for some
$s\in\operatorname{Grp}(S)$. In this case, we may write $s=b-a$ for some
$a,b\in S$, and have

$(s_{1},s_{2})+(a,-a)=(t_{1},t_{2})+(b,-b)$

in $\operatorname{Grp}(S_{1})\oplus\operatorname{Grp}(S_{2})$, which is
equivalent to

$(s_{1},s_{2})+(a,0)+(0,b)=(t_{1},t_{2})+(b,0)+(0,a).$

Now the last equality also holds in $S_{1}\oplus S_{2}$. This gives the
following equivalent conditions in terms of elements in the cancellative
monoids:

(2) $s_{1}\oplus s_{2}=t_{1}\oplus
t_{2}\iff\begin{cases}s_{1}+a=t_{1}+b\quad\mbox{in }S_{1}\\\
s_{2}+b=t_{2}+a\quad\mbox{in }S_{2}\end{cases}\mbox{for some $a,b\in S$.}$

In particular, $a\oplus 0=0\oplus a$ in $S_{1}\oplus_{S}S_{2}$ for any $a\in
S$. In other words, the diagram

$\textstyle{S_{1}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{S_{1}\oplus_{S}S_{2}}$$\textstyle{S\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{S_{2}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$

is commutative, where $S_{i}\to S_{1}\oplus_{S}S_{2}$ is the composition of
the canonical embedding $S_{i}\to S_{1}\oplus S_{2}$ and the homomorphisms in
(1).

######  Lemma 2.3.

In the category of cancellative monoids, given homomorphisms $S\to S_{1}$ and
$S\to S_{2}$, the monoid $S_{1}\oplus_{S}S_{2}$ together with the canonical
homomorphisms $S_{1}\to S_{1}\oplus_{S}S_{2}$ and $S_{2}\to
S_{1}\oplus_{S}S_{2}$ is the fibered sum of $S_{1}$ and $S_{2}$ over $S$.

###### Proof.

We note that the cancellative property holds in $S_{1}\oplus_{S}S_{2}$ since
it is a homomorphic image in a group. Thus it belongs to the category of
cancellative monoids.

To check that $S_{1}\oplus_{S}S_{2}$ is the fibered sum, we consider a
commutative diagram

---
$\textstyle{T}$$\textstyle{S_{1}\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\varphi_{1}}$-------$\textstyle{S_{1}\oplus_{S}S_{2}}$$\textstyle{S\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{S_{2}\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\varphi_{2}}$---

of cancellative monoids. Since $S_{1}\oplus_{S}S_{2}$ is generated by the
images of $S_{1}$ and $S_{2}$, there is at most one homomorphism
$S_{1}\oplus_{S}S_{2}\to T$ that extends the above commutative diagram. To
verify such a homomorphism is well-defined, we need to show that if
$s_{1}\oplus s_{2}=t_{1}\oplus t_{2}$ in $S_{1}\oplus_{S}S_{2}$ then

(3)
$\varphi_{1}(s_{1})+\varphi_{2}(s_{2})=\varphi_{1}(t_{1})+\varphi_{2}(t_{2}).$

There exist $a,b\in S$ such that $s_{1}+a=t_{1}+b$ and $s_{2}+b=t_{2}+a$.
Applying $\varphi_{1}$ and $\varphi_{2}$ and summing up their images in $T$,
we have

(4)
$\varphi_{1}(s_{1})+\varphi_{1}(a)+\varphi_{2}(s_{2})+\varphi_{2}(b)=\varphi_{1}(t_{1})+\varphi_{1}(b)+\varphi_{2}(t_{2})+\varphi_{2}(a).$

From the commutative diagram, $\varphi_{1}(a)=\varphi_{2}(a)$ and
$\varphi_{1}(b)=\varphi_{2}(b)$. Since $T$ is cancellative, we may cancel out
images of $a$ and $b$ from (4) to obtain the required identity (3). ∎

Next, we construct the fibered sum in the category of affine semigroups. Let
$S\to S_{1}$ and $S\to S_{2}$ be homomorphisms of affine semigroups. Since
$S_{1}\oplus_{S}S_{2}$ is a finitely generated cancellative monoid, its
quotient $(S_{1}\oplus_{S}S_{2})/\sim_{\operatorname{tor}}$ is also a finitely
generated cancellative monoid and thus an affine semigroup since it is
obviously torsion free.

######  Notation 2.4.

Let $S$, $S_{1}$ and $S_{2}$ be affine semigroups described above. We use the
notation

$S_{1}\widetilde{\oplus}_{S}S_{2}:=(S_{1}\oplus_{S}S_{2})/\sim_{\operatorname{tor}}$

for the quotient of $S_{1}\oplus_{S}S_{2}$ modulo the equivalence relation.
Moreover, we write $s_{1}\widetilde{\oplus}s_{2}$ for the image of
$s_{1}\oplus s_{2}\in S_{1}\oplus_{S}S_{2}$ in
$S_{1}\widetilde{\oplus}_{S}S_{2}$.

######  Proposition 2.5.

Let $S$, $S_{1}$ and $S_{2}$ be as in Notation 2.4. The affine semigroup
$S_{1}\widetilde{\oplus}_{S}S_{2}$ is the fibered sum of $S_{1}$ and $S_{2}$
over $S$ in the category of affine semigroups.

###### Proof.

Consider a commutative diagram

---
$\textstyle{T}$$\textstyle{S_{1}\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$-------$\textstyle{S_{1}\widetilde{\oplus}_{S}S_{2}}$$\textstyle{S\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{S_{2}\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$---

of affine semigroups. As cancellative monoids, there is a unique homomorphism
$\varphi\colon S_{1}\oplus_{S}S_{2}\to T$ making the diagram

---
$\textstyle{T}$$\textstyle{S_{1}\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$-------$\textstyle{S_{1}\oplus_{S}S_{2}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{S\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{S_{2}\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$---

commute. Since $T$ is torsion free, the homomorphism $\varphi$ induces a
homomorphism $S_{1}\widetilde{\oplus}_{S}S_{2}\to T$, which is the unique one
making the diagram

---
$\textstyle{T}$$\textstyle{S_{1}\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$-------$\textstyle{S_{1}\widetilde{\oplus}_{S}S_{2}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{S\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{S_{2}\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$---

commute. ∎

With Proposition 2.3 and Proposition 2.5, we now formally give Notation 2.2
and Notation 2.4 their anticipated titles.

######  Definition 2.6.

In the category of cancellative monoids, let $S$, $S_{1}$ and $S_{2}$ be
objects with homomorphisms $S\rightarrow S_{1}$ and $S\rightarrow S_{2}$. The
cancellative monoid $S_{1}\oplus_{S}S_{2}$ is called the fibered sum of
$S_{1}$ and $S_{2}$ over $S$. Futhermore if $S$, $S_{1}$ and $S_{2}$ are
affine semigroups, then $S_{1}\widetilde{\oplus}_{S}S_{2}$ is called the
fibered sum of $S_{1}$ and $S_{2}$ over $S$ in the category of affine
semigroups.

Properties of fibered sums depend on the underlying monoid $S$.

######  Example 2.7.

It can be checked directly by the universal property that
$2{\mathbb{N}}\oplus_{6{\mathbb{N}}}3{\mathbb{N}}\simeq\langle
2,3\rangle\subset{\mathbb{N}}$. Moreover,
$2{\mathbb{N}}\widetilde{\oplus}_{6{\mathbb{N}}}3{\mathbb{N}}\simeq
2{\mathbb{N}}\oplus_{6{\mathbb{N}}}3{\mathbb{N}}$ since $\langle 2,3\rangle$
is already torsion free. On the other hand in
$2{\mathbb{N}}\oplus_{12{\mathbb{N}}}3{\mathbb{N}}$, we have $6\oplus 0\neq
0\oplus 6$ while $2(6\oplus 0)=2(0\oplus 6)$, so
$2{\mathbb{N}}\oplus_{12{\mathbb{N}}}3{\mathbb{N}}$ is not torsion free.
Hence,
$2{\mathbb{N}}\widetilde{\oplus}_{12{\mathbb{N}}}3{\mathbb{N}}\not\simeq
2{\mathbb{N}}\oplus_{12{\mathbb{N}}}3{\mathbb{N}}$.

If $S\to S_{1}$ and $S\to S_{2}$ are embeddings of affine semigroups, so are
the canonical homomorphisms $S_{1}\to S_{1}\widetilde{\oplus}_{S}S_{2}$ and
$S_{2}\to S_{1}\widetilde{\oplus}_{S}S_{2}$. It is always true that
$S_{1}\widetilde{\oplus}_{S}S_{2}$ is the sum of the images of $S_{1}$ and
$S_{2}$ under the canonical homomorphisms. In such a case, $S_{1}$ and $S_{2}$
can be considered as submonoids of $S_{1}\widetilde{\oplus}_{S}S_{2}$.
Furthermore, embeddings of $S$ into $S_{1}\widetilde{\oplus}_{S}S_{2}$ via
$S_{i}$ for $i=1,2$ agree as well, so $S$ can be considered as a submonoid of
$S_{1}\widetilde{\oplus}_{S}S_{2}$. Through these embeddings, the intersection
of $S_{1}$ and $S_{2}$ may take place inside
$S_{1}\widetilde{\oplus}_{S}S_{2}$. We may consider also the fibered sum of
$S_{1}$ and $S_{2}$ over other affine semigroups such as $S_{1}\cap S_{2}$ or
any of its submonoids in $S_{1}\widetilde{\oplus}_{S}S_{2}$. In fact by
inspecting the universal property in the category of affine semigroups,
$S_{1}\widetilde{\oplus}_{S}S_{2}$ is also the fibered sum of $S_{1}$ and
$S_{2}$ over any submonoid of $S_{1}\cap S_{2}$ containing $S$. For instance,
$2{\mathbb{N}}\widetilde{\oplus}_{12{\mathbb{N}}}3{\mathbb{N}}\simeq
2{\mathbb{N}}\widetilde{\oplus}_{6{\mathbb{N}}}3{\mathbb{N}}$ in Example 2.7.
See Example 4.9 for the $\kappa$-algebra version of this statement.

Note that even if $S_{1}$, $S_{2}$ and $S$ are submonoids of an affine
semigroup $T$, the fibered sum $S_{1}\widetilde{\oplus}_{S}S_{2}$ may not be
embeddable into $T$. It may happen that $S_{1}+S_{2}$ taken in $T$ is not
isomorphic to $S_{1}\widetilde{\oplus}_{S}S_{2}$. See Example 2.11. The next
proposition gives an intrinsic condition with which the fibered sum can be
obtained inside a larger affine semigroup.

######  Proposition 2.8.

Let $S\to S_{1}$ and $S\to S_{2}$ be embeddings of affine semigroups. Assume
that $S_{1}$ and $S_{2}$ have the same rank as $S$. If $S_{1}$ and $S_{2}$
embed to an affine semigroup $T$, whose compositions following the above
embeddings agree on $S$, then $S_{1}+S_{2}$ taken in $T$ is isomorphic to
$S_{1}\widetilde{\oplus}_{S}S_{2}$

###### Proof.

The point is that the condition on the ranks is equivalent to
$\operatorname{Grp}(nS_{1})\subset\operatorname{Grp}{S}$ and
$\operatorname{Grp}{(nS_{2})}\subset\operatorname{Grp}{S}$ for some $n>0$. We
regard $S_{1}$, $S_{2}$ and $S$ as subsets of $T$. The universal property of
fibered sum gives a map $S_{1}\widetilde{\oplus}_{S}S_{2}\to S_{1}+S_{2}$ with
$s_{1}\widetilde{\oplus}s_{2}\mapsto s_{1}+s_{2}$, which is clearly onto. To
show that the map is one-to-one, we consider elements
$s_{1}\widetilde{\oplus}s_{2}$ and $t_{1}\widetilde{\oplus}t_{2}$ in
$S_{1}\widetilde{\oplus}_{S}S_{2}$ such that $s_{1}+s_{2}=t_{1}+t_{2}$. With
the same $n$ above, $ns_{1}-nt_{1}=nt_{2}-ns_{2}\in\operatorname{Grp}{S}$.
Then $ns_{1}\oplus ns_{2}=nt_{1}\oplus nt_{2}$ and this implies
$s_{1}\widetilde{\oplus}s_{2}=t_{1}\widetilde{\oplus}t_{2}$. ∎

######  Corollary 2.9.

Let $S_{1}$ and $S_{2}$ be numerical semigroups in ${\mathbb{N}}$. Let $S$ be
a subsemigroup contained in $S_{1}\cap S_{2}$. Then $S_{1}+S_{2}$ is
isomorphic to $S_{1}\widetilde{\oplus}_{S}S_{2}$.

######  Example 2.10.

Let $S_{1}=\langle 2,5\rangle$ and $S_{2}=\langle 3,4,5\rangle$ be numerical
semigroups in ${\mathbb{N}}$. Let $S$ be a subsemigroup in $S_{1}\cap
S_{2}=\langle 4,5,6,7\rangle$. Then
$S_{1}\widetilde{\oplus}_{S}S_{2}=S_{1}+S_{2}=\langle 2,3\rangle$.

Without the conditions on the ranks of affine semigroups, Proposition 2.8 does
not hold in general.

######  Example 2.11.

Affine semigroups $S_{1}=\langle(1,0),(1,1)\rangle$ and
$S_{2}=\langle(1,1),(0,1)\rangle$ in ${\mathbb{N}}^{2}$ have rank 2. Their
intersection $S=\langle(1,1)\rangle$ has rank 1. Using the homomorphisms
$S_{1}\to{\mathbb{N}}^{3}$ and $S_{2}\to{\mathbb{N}}^{3}$ given by
$(1,0)\mapsto(1,0,0)$, $(1,1)\mapsto(0,1,0)$ and $(0,1)\mapsto(0,0,1)$, we
have $S_{1}\oplus_{S}S_{2}\simeq{\mathbb{N}}^{3}$ by the universal property.
Furthermore, $S_{1}\oplus_{S}S_{2}$ is isomorphic to
$S_{1}\widetilde{\oplus}_{S}S_{2}$ since ${\mathbb{N}}^{3}$ is torsion free.
Taken in ${\mathbb{N}}^{2}$, the affine semigroup $S_{1}+S_{2}$ is
${\mathbb{N}}^{2}$, which is not isomorphic to
$S_{1}\widetilde{\oplus}_{S}S_{2}$.

Later in Section 5, we shall compare the fiber sum
$S_{1}\widetilde{\oplus}_{S}S_{2}$ defined in this section with gluing.

######  Lemma 2.12.

Let $S_{1}$, $S_{2}$ and $S$ be submonoids of a cancellative monoid $T$ such
that $S\subset S_{1}\cap S_{2}$. The following two conditions are equivalent.

  1. (i)

$\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})=\operatorname{Grp}(S)$
in $\operatorname{Grp}(T)$.

  2. (ii)

The homomorphism $S_{1}\oplus_{S}S_{2}\to T$ obtained by the universal
property sending $s_{1}\oplus s_{2}$ to $s_{1}+s_{2}$ is one-to-one.

###### Proof.

Since the inclusion
$\operatorname{Grp}(S)\subset\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})$
always holds, it suffices to verify
$\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})\subset\operatorname{Grp}(S)$
for condition (i). The latter inclusion means that $s_{1}-t_{1}=t_{2}-s_{2}$
with $s_{1},t_{1}\in S_{1}$ and $s_{2},t_{2}\in S_{2}$ implies
$s_{1}-t_{1}=t_{2}-s_{2}=b-a$ for some $a,b\in S$. The last two equalities are
equivalent to $s_{1}+a=t_{1}+b$ in $S_{1}$ and $s_{2}+b=t_{2}+a$ in $S_{2}$,
that is, $s_{1}\oplus s_{2}=t_{1}\oplus t_{2}$ by definition as seen in (2).
In other words, this is the same as asking if $s_{1}+s_{2}=t_{1}+t_{2}$
implies $s_{1}\oplus s_{2}=t_{1}\oplus t_{2}$. Therefore
$\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})\subset\operatorname{Grp}(S)$
is equivalent to that $S_{1}\oplus_{S}S_{2}\to T$ given by $s_{1}\oplus
s_{2}\mapsto s_{1}+s_{2}$ is a one-to-one homomorphism. ∎

The second condition in Lemma 2.12 implies that $S_{1}\oplus_{S}S_{2}$ is
isomorphic to $S_{1}+S_{2}$ which is a subsemigroup of $T$. In the case where
$T$ is an affine semigroup and $S_{1},S_{2},S$ are affine subsemigroups of
$T$, it follows that $S_{1}+S_{2}$ is also an affine subsemigroup since $T$ is
torsion free. This implies $S_{1}\oplus_{S}S_{2}$ is already torsion free and
so is isomorphic to the fibered sum $S_{1}\widetilde{\oplus}_{S}S_{2}$.
Therefore, we have the following corollary.

######  Corollary 2.13.

If $S_{1}$, $S_{2}$ and $S$ are affine subsemigroups of an affine semigroup
$T$ such that $S\subset S_{1}\cap S_{2}$ and
$\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})=\operatorname{Grp}(S)$
in $\operatorname{Grp}(T)$, then $S_{1}\widetilde{\oplus}_{S}S_{2}\simeq
S_{1}\oplus_{S}S_{2}\simeq S_{1}+S_{2}$.

######  Example 2.14.

In ${\mathbb{N}}^{3}$, let
$S_{1}=\langle(4,0,0),(3,1,0),(2,2,0),(1,3,0)\rangle$ and
$S_{2}=\langle(3,3,0),(3,2,1),(3,1,2),(3,0,3)\rangle$ as considered in [3,
Example 1] and [2, Example 7]. Then
$\operatorname{Grp}(S_{2})=\\{(a+c,a,c)\mid a,c\in{\mathbb{Z}}\text{ and
}a+c\text{ is divisible by }3\\}$. Note that
$(0,4,0)=(2,2,0)+(2,2,0)-(4,0,0)$. Hence
$\operatorname{Grp}(S_{1})=\\{(a,b,0)\mid a,b\in{\mathbb{Z}}\text{ and
}a+b\text{ is divisible by }4\\}$. Elements of
$\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})$ are of the form
$(a,a,0)$, where $a\in{\mathbb{Z}}$ satisfies $3\,|\,a$ and $2\,|\,a$. Hence
$\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})=\operatorname{Grp}(S)$
in ${\mathbb{Z}}^{3}$, where $S=\langle(6,6,0)\rangle$. Thus by Lemma 2.12,
$S_{1}\oplus_{S}S_{2}$ can be embedded in $\mathbb{N}^{3}$. This shows that
$S_{1}\oplus_{S}S_{2}$ is torsion free. Hence it is already an affine
semigroup and we have $S_{1}\oplus_{S}S_{2}=S_{1}\widetilde{\oplus}_{S}S_{2}$.
In fact, from Corollary 4.4 and Lemma 4.5, we will see that
$\kappa[S_{1}]\otimes_{\kappa[S]}\kappa[S_{2}]$ is an affine semigroup ring
and that $S_{1}\oplus_{S}S_{2}$ is the semigroup corresponding to it.

Next example shows that even if $S_{1}\oplus_{S}S_{2}$ does not embed into $T$
as stated in Lemma 2.12, it is still possible that
$S_{1}\widetilde{\oplus}_{S}S_{2}$ embeds into $T$.

######  Example 2.15.

In ${\mathbb{Z}}^{2}$, let $S_{1}=\langle(1,-1),(0,1)\rangle$,
$S_{2}=\langle(1,1),(0,-1)\rangle$ and $S=\langle(1,1),(1,-1)\rangle$. Then
$\operatorname{Grp}(S_{1})=\operatorname{Grp}(S_{2})={\mathbb{Z}}^{2}$ and

$\operatorname{Grp}(S)=\\{(a,b)\in{\mathbb{Z}}^{2}\mid\text{$a+b$ is
even}\\}\neq\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2}).$

By Lemma 2.12, $S_{1}\oplus_{S}S_{2}$ does not embed into ${\mathbb{Z}}^{2}$.
However, by Proposition 2.8,
$S_{1}\widetilde{\oplus}_{S}S_{2}=\langle(1,0),(0,1),(0,-1)\rangle$ which can
be embedded into ${\mathbb{Z}}^{2}$.

With canonical embeddings from $S_{1}$ and $S_{2}$ to
$S_{1}\widetilde{\oplus}_{S}S_{2}$, Lemma 2.12 for
$T=S_{1}\widetilde{\oplus}_{S}S_{2}$ gives rise to the following proposition.

######  Proposition 2.16.

Let $S\subset S_{1}$ and $S\subset S_{2}$ be affine semigroups. The canonical
map $S_{1}\oplus_{S}S_{2}\to S_{1}\widetilde{\oplus}_{S}S_{2}$ is an
isomorphism if and only if
$\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})=\operatorname{Grp}(S)$
in $\operatorname{Grp}(S_{1}\widetilde{\oplus}_{S}S_{2})$.

We end this section by applying Lemma 2.12 to the numerical situations in
Corollary 2.18. Note that a numerical semigroup in ${\mathbb{N}}$ has finite
complement if and only if its greatest common divisor is $1$ [15, Lemma 2.1].
For such a numerical semigroup, its group of differences is exactly
${\mathbb{Z}}$. By rescaling the semigroups, it follows that if $S$ is a
numerical semigroup in ${\mathbb{N}}$ with the greatest common divisor $d$,
then $dn\in S$ for all $n\gg 0$ and $\operatorname{Grp}(S)=d{\mathbb{Z}}$. The
following lemma summarizes a few key properties that hold for numerical
semigroups but are not always true for affine semigroups of higher ranks. In
particular, the condition on groups of differences in Lemma 2.12 and
Proposition 2.16 can be stated in terms of greatest common divisors in
numerical situations.

######  Lemma 2.17.

Let $S_{1}$ and $S_{2}$ be numerical semigroups in ${\mathbb{N}}$. Then
$\operatorname{Grp}(S_{1}\cap
S_{2})=\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})$ always holds.
Moreover, if $S$ is a numerical semigroup contained in $S_{1}\cap S_{2}$, then
the following coditions are equivalent

  1. (i)

$\operatorname{Grp}(S)=\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})$.

  2. (ii)

$\gcd S=\gcd(S_{1}\cap S_{2})$.

###### Proof.

For $i=1,2$, let $d_{i}=\gcd(S_{i})$, and let
$d=\operatorname{lcm}(d_{1},d_{2})$. Then
$\operatorname{Grp}(S_{i})=d_{i}{\mathbb{Z}}$ and
$\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})=d{\mathbb{Z}}$. Since
$\operatorname{Grp}(S_{1}\cap
S_{2})\subseteq\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})$,
$\gcd(S_{1}\cap S_{2})$ is divisible by $d$. On the other hand, $nd\in
S_{1}\cap S_{2}$ for all $n\gg 0$ since $nd_{1}\in S_{1}$ and $nd_{2}\in
S_{2}$ for all $n\gg 0$. By choosing a large enough $n$, we have
$d=(n+1)d-nd\in\operatorname{Grp}(S_{1}\cap S_{2})$ and so $d$ is divisible by
$\gcd(S_{1}\cap S_{2})$. Hence, $\gcd(S_{1}\cap S_{2})=d$, or equivalently,
$\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})=\operatorname{Grp}(S_{1}\cap
S_{2})$. The equivalent conditions follows directly from this. ∎

######  Corollary 2.18.

Let $S_{1}$ and $S_{2}$ be numerical semigroups in ${\mathbb{N}}$. Let $S$ be
a subsemigroup contained in $S_{1}\cap S_{2}$. Then $\gcd S=\gcd(S_{1}\cap
S_{2})$ if and only if
$S_{1}\widetilde{\oplus}_{S}S_{2}=S_{1}\oplus_{S}S_{2}$.

###### Proof.

First note that, by Lemma 2.17, $\gcd S=\gcd(S_{1}\cap S_{2})$ is equivalent
to
$\operatorname{Grp}(S)=\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})$.
And by Proposition 2.16, the latter is equivalent to that the canonical
homomorphism $S_{1}\oplus_{S}S_{2}\to S_{1}\widetilde{\oplus}_{S}S_{2}$ is an
isomorphism, which means that $S_{1}\oplus_{S}S_{2}$ is torsion free and hence
$S_{1}\oplus_{S}S_{2}=S_{1}\widetilde{\oplus}_{S}S_{2}$ by the construction of
$S_{1}\widetilde{\oplus}_{S}S_{2}$. ∎

######  Example 2.19.

Consider the numerical semigroups $S_{1}=\langle 3,10\rangle$, $S_{2}=\langle
5,6\rangle$, and $S=\langle 6,10\rangle$ in ${\mathbb{N}}$. Then
$S_{1}\widetilde{\oplus}_{S}S_{2}=S_{1}+S_{2}=\langle 3,5\rangle$ by Corollary
2.9. Furthermore, by Corollary 2.18, $S_{1}\widetilde{\oplus}_{S}S_{2}\neq
S_{1}\oplus_{S}S_{2}$, since $\gcd S\neq\gcd(S_{1}\cap S_{2})$. (c.f. Example
4.10.)

##  3\. Apéry elements

We call an affine semigroup positive if $0$ is the only invertible element.
Positive affine semigroups are exactly finitely generated monoids that can be
embedded into some ${\mathbb{N}}^{d}$ (see [5, Theorem 7.3]). Numerical
semigroups are always positive.

In this section, we define Apéry elements extending the notion of Apéry
numbers from numerical semigroups. For an algebra defined by positive affine
semigroups, we characterize if it is free or flat using Apéry elements in
Theorem 4.3. As seen in Example 2.15, the fibered sum of positive affine
semigroups may not be positive. We end the section by presenting some
conditions under which the positivity is preserved by taking fibered sums.

Let $S^{\prime}$ be a monoid and $S$ be its submonoid. An element of
$S^{\prime}$ is called Apéry over $S$ if it can not be written as $s+w$ for
any $w\in S^{\prime}$ and $0\neq s\in S$. If $S^{\prime}$ is a numerical
semigroup and $0\neq n\in S^{\prime}$, an Apéry element of $S^{\prime}$ over
$n{\mathbb{N}}$ is called an Apéry number over $n$ in the literature. A
representation of an element of $S^{\prime}$ over $S$ is an expression of the
element of the form $s+w$, where $s\in S$ and $w$ is an Apéry element of
$S^{\prime}$ over $S$. If $S^{\prime}$ is positive, all of its elements have a
representation. Without positivity, Apéry elements may not exist. We write
$\operatorname{Apr}(S^{\prime}/S)$ for the set of Apéry elements of
$S^{\prime}$ over $S$.

######  Example 3.1.

The affine semigroup ${\mathbb{Z}}$ does not have Apéry elements over
${\mathbb{N}}$.

######  Lemma 3.2.

If $S\subset S^{\prime}$ are positive affine semigroups and
$S\simeq{\mathbb{N}}$, then every element of $S^{\prime}$ has a unique
representation over $S$.

###### Proof.

The proof for the case of numerical semigroups [10, Corollary 2.2] carries
over to this lemma. More precisely, let $S=\langle s\rangle$ and let
$w_{1},w_{2}\in\operatorname{Apr}(S^{\prime}/S)$. Suppose

$\ell_{1}s+w_{1}=\ell_{2}s+w_{2}$

in $S^{\prime}$ with $\ell_{1},\ell_{2}\in{\mathbb{N}}$. Without loss of
generality, we may assume $\ell_{1}\geq\ell_{2}$. Note that
$(\ell_{1}-\ell_{2})s\in S$ since $\ell_{1}-\ell_{2}\in{\mathbb{N}}$. Hence,
we have

$(\ell_{1}-\ell_{2})s+\ell_{2}s+w_{1}=\ell_{2}s+w_{2}$

which implies

$(\ell_{1}-\ell_{2})s+w_{1}=w_{2},$

for $S^{\prime}$ is a cancellative monoid. However,
$w_{2}\in\operatorname{Apr}(S^{\prime}/S)$, so $(\ell_{1}-\ell_{2})s=0$. This
implies $w_{1}=w_{2}$ and $\ell_{1}s=\ell_{2}s$. ∎

Unique representation is of special interest because we will see later that in
the case of affine semigroup algebras, this is equivalent to flatness as well
as to freeness.

######  Lemma 3.3.

Let $S\to S_{1}$ and $S\to S_{2}$ be embeddings of affine semigroups. If
$S_{2}$ is positive and every element of $S_{2}$ has a unique representation
over $S$, then every element of $S_{1}\oplus_{S}S_{2}$ has a unique
representation over $S_{1}$.

###### Proof.

Consider $s_{1}\oplus s_{2}\in S_{1}\oplus_{S}S_{2}$. If $s_{2}=a+w$ for some
$a\in S$ and $w\in S_{2}$, then $s_{1}\oplus s_{2}=(s_{1}+a)\oplus w$. Since
$S_{2}$ is positive, every element of $S_{1}\oplus_{S}S_{2}$ can be written as
$s\oplus w$ for some $s\in S_{1}$ and $w\in\operatorname{Apr}(S_{2}/S)$. We
claim that $\operatorname{Apr}((S_{1}\oplus_{S}S_{2})/S_{1})$ consists of
elements in the form of $0\oplus w$ with $w\in\operatorname{Apr}(S_{2}/S)$. If
$t_{1}\oplus w_{1}=t_{1}^{\prime}\oplus w_{2}$ with $t_{1},t_{1}^{\prime}\in
S_{1}$ and $w_{1},w_{2}\in\operatorname{Apr}(S_{2}/S)$, then
$t_{1}^{\prime}+a=t_{1}+b$ in $S_{1}$ and $w_{2}+b=w_{1}+a$ in $S_{2}$ for
some $a,b\in S$. Since every element of $S_{2}$ has a unique representation
over $S$, we must have $w_{1}=w_{2}$ and $a=b$, which imply
$t_{1}=t_{1}^{\prime}$. As a consequence, $0\oplus
w\in\operatorname{Apr}((S_{1}\oplus_{S}S_{2})/S_{1})$ if and only if
$w\in\operatorname{Apr}(S_{2}/S)$. Furthermore, the above argument also proves
that every element of $S_{1}\oplus_{S}S_{2}$ has a unique representation over
$S_{1}$. ∎

######  Lemma 3.4.

Let $S\to S_{1}$ and $S\to S_{2}$ be embeddings of positive cancellative
monoids. Suppose $S$ is numerical. If $s_{1}\oplus s_{2}=0$ in
$S_{1}\oplus_{S}S_{2}$, then $s_{i}=0$ in $S_{i}$ for each $i$.

###### Proof.

Since $s_{1}\oplus s_{2}=0\oplus 0$, there exist $a,b\in S$ such that

$\left\\{\begin{array}[]{ll}s_{1}+a=0+b&\mbox{ in }S_{1}\\\ s_{2}+b=0+a&\mbox{
in }S_{2}.\end{array}\right.$

Let $\varphi:S\to{\mathbb{N}}$ be an embedding and let $k=\varphi(a)$ and
$\ell=\varphi(b)$. Without loss of generality, we assume that $k\geq\ell$ and
let $m:=k-\ell$. Note that $\ell a=kb$ because $\varphi(\ell
a)=\ell\varphi(a)=\ell k=k\ell=k\varphi(b)=\varphi(kb)$ and $\varphi$ is one-
to-one. Moreover, in $S_{1}$,

$ma+ks_{1}+\ell a=(m+\ell)a+ks_{1}=ka+ks_{1}=k(a+s_{1})=kb=\ell a.$

Since $S_{1}$ is cancellative, $ma+ks_{1}=0$. Since $S_{1}$ is positive,
$ma=ks_{1}=0$ and so $k=0$ or $s_{1}=0$.

If $k=0$, then $a=0$ and so $s_{2}+b=0$. Since $S_{2}$ is positive,
$s_{2}=b=0$ in $S_{2}$. This implies $s_{1}+a=0$ in $S_{1}$. By the positivity
of $S_{1}$, $s_{1}=0$. If $s_{1}=0$, then $a=b$ in $S_{1}$. Since $s_{2}+b=a$
in $S_{2}$ and $S_{2}$ is cancellative, $s_{2}=0$. ∎

######  Proposition 3.5.

For embeddings $S\to S_{1}$ and $S\to S_{2}$ of positive cancellative monoids,
the fibered sum $S_{1}\oplus_{S}S_{2}$ is positive under either of the
following conditions.

  * (i)

Every element of $S_{2}$ has a unique representation over $S$.

  * (ii)

$S$ is numerical.

###### Proof.

Suppose every element of $S_{2}$ has a unique representation over $S$. Assume
that $(s_{1}\oplus s_{2})+(t_{1}\oplus t_{2})=0$. Then there exist $a,b\in S$
such that $s_{1}+t_{1}+a=b$ in $S_{1}$ and $s_{2}+t_{2}+b=a$ in $S_{2}$. Since
every element of $S_{2}$ has a unique representation over $S$, the element
$s_{2}+t_{2}$ has to be in $S$. Hence, the equality $(s_{2}+t_{2})+b=a$ holds
in $S$ and so also in $S_{1}$. Working on $S_{1}$, we have

$(s_{1}+t_{1}+a)+(s_{2}+t_{2})=b+(s_{2}+t_{2})=a.$

We may cancel out $a$ and obtain $s_{1}+t_{1}+(s_{2}+t_{2})=0$. By positivity
of $S_{1}$, $s_{1}=t_{1}=s_{2}+t_{2}=0$. By positivity of $S_{2}$,
$s_{2}=t_{2}=0$. We conclude that $S_{1}\oplus_{S}S_{2}$ is positive.

Next, assume that $S$ is numerical. Suppose $s_{1}\oplus s_{2},t_{1}\oplus
t_{2}\in S_{1}\oplus_{S}S_{2}$ such that $(s_{1}\oplus s_{2})+(t_{1}\oplus
t_{2})=0$ in $S_{1}\oplus_{S}S_{2}$. By Lemma 3.4, we have $s_{i}+t_{i}=0$ in
$S_{i}$ for $i=1,\,2$. By the positivity of $S_{i}$, this implies that
$s_{i}=t_{i}=0$. Therefore, $s_{1}\oplus s_{2}=t_{1}\oplus t_{2}=0$. This
shows that $S_{1}\oplus_{S}S_{2}$ is positive. ∎

The positivity of $S_{1}\oplus_{S}S_{2}$ gives the positivity of
$S_{1}\widetilde{\oplus}_{S}S_{2}$. More precisely, suppose
$s_{1}\widetilde{\oplus}s_{2},t_{1}\widetilde{\oplus}t_{2}\in
S_{1}\widetilde{\oplus}_{S}S_{2}$ such that
$(s_{1}\widetilde{\oplus}s_{2})+(t_{1}\widetilde{\oplus}t_{2})=0$ in
$S_{1}\widetilde{\oplus}_{S}S_{2}$. Then there exists a positive integer $n$
such that $n\big{(}(s_{1}\oplus s_{2})+(t_{1}\oplus t_{2})\big{)}=0$ and so
$n(s_{1}\oplus s_{2})+n(t_{1}\oplus t_{2})=0$ in $S_{1}\oplus_{S}S_{2}$. Since
$S_{1}\oplus_{S}S_{2}$ is positive, this implies that $n(s_{1}\oplus
s_{2})=n(t_{1}\oplus t_{2})=0$, and so
$s_{1}\widetilde{\oplus}s_{2}=t_{1}\widetilde{\oplus}t_{2}=0$ and this shows
that $S_{1}\widetilde{\oplus}_{S}S_{2}$ is positive. With this observation and
Proposition 3.5, we have the following result.

######  Corollary 3.6.

For embeddings $S\to S_{1}$ and $S\to S_{2}$ of positive affine semigroups,
the fibered sum $S_{1}\widetilde{\oplus}_{S}S_{2}$ is positive under either of
the following conditions.

  * (i)

Every element of $S_{2}$ has a unique representation over $S$.

  * (ii)

$S$ is numerical.

##  4\. Algebras

For the remaining paper, $\kappa$ is a field. Let $S$ be a commutative monoid.
The monoid ring $\kappa[\mathbf{u}^{S}]$ in the symbol $\mathbf{u}$ is the set
of formal finite sums $\sum_{s\in S}a_{s}\mathbf{u}^{s}$, where
$a_{s}\in\kappa$, with term-wise addition and the multiplication given by
$(a_{s}\mathbf{u}^{s})(a_{t}\mathbf{u}^{t})=a_{s}a_{t}\mathbf{u}^{s+t}$. If
the commutative monoid is an affine semigroup, the symbol $\mathbf{u}^{s}$ can
be interpreted as a monomial. By definition, an affine semigroup $S$ can be
embedded into ${\mathbb{Z}}^{d}$. With the embedding, an element of $S$ is
realized as a $d$-tuple $(i_{1},\ldots,i_{d})$ of integers. The affine
semigroup ring $R:=\kappa[\mathbf{u}^{S}]$ is the subring of the Laurent
polynomial ring $\kappa[\mathbf{u},\mathbf{u}^{-1}]$ in the variables
$\mathbf{u}$ generated by $u_{1}^{i_{1}}\cdots u_{d}^{i_{d}}$, where
$(i_{1},\ldots,i_{d})\in S$. An affine semigroup can also be embedded to
${\mathbb{Q}}^{d}$. Monomials with rational exponents naturally occur in
comparison of affine semigroup rings with various embeddings.

######  Example 4.1.

The affine semigroup $\langle(2,0),(1,1),(0,2)\rangle\subset{\mathbb{N}}^{2}$
also embeds into ${\mathbb{Q}}^{2}$ through $(1,0)\mapsto(1/2,0)$ and
$(0,1)\mapsto(1/2,1)$. These two embeddings give rise to an isomorphism

$\kappa[u_{1}^{2},u_{1}u_{2},u_{2}^{2}]\simeq\kappa[x,xy,xy^{2}]$

of $\kappa$-algebras, where $u_{1}\mapsto x^{1/2}$ and $u_{2}\mapsto
x^{1/2}y$. The affine semigroup also embeds into ${\mathbb{Q}}^{3}$ through
$(1,0)\mapsto(1,1/2,0)$ and $(0,1)\mapsto(0,1/2,1)$. These two embeddings give
rise to an isomorphism

$\kappa[u_{1}^{2},u_{1}u_{2},u_{2}^{2}]\simeq\kappa[x^{2}y,xyz,yz^{2}]$

of $\kappa$-algebras, where $u_{1}\mapsto xy^{1/2}$ and $u_{2}\mapsto
y^{1/2}z$. Another embedding into ${\mathbb{Q}}^{3}$ through
$(1,0)\mapsto(1/2,1,0)$ and $(0,1)\mapsto(1/2,0,1)$ gives rise to an
isomorphism

$\kappa[u_{1}^{2},u_{1}u_{2},u_{2}^{2}]\simeq\kappa[xy^{2},xyz,xz^{2}]$

of $\kappa$-algebras, where $u_{1}\mapsto x^{1/2}y$ and $u_{2}\mapsto
x^{1/2}z$.

The affine semigroup rings in the following example appeared in [2, Example 7]
and [3, Example 1]. In terms of rational exponents, we see that these rings
are isomorphic.

######  Example 4.2.

The affine semigroup
$\langle(3,0),(2,1),(1,2),(0,3)\rangle\subset{\mathbb{N}}^{2}$ embeds into
${\mathbb{N}}^{3}$ through $(1,0)\mapsto(1,1,0)$ and $(0,1)\mapsto(1,0,1)$.
The embedding gives rise to an isomorphism

$\kappa[u_{1}^{3},u_{1}^{2}u_{2},u_{1}u_{2}^{2},u_{2}^{3}]\simeq\kappa[x^{3}y^{3},x^{3}y^{2}z,x^{3}yz^{2},x^{3}z^{3}]$

of $\kappa$-algebras, where $u_{1}\mapsto xy$ and $u_{2}\mapsto xz$. The
affine semigroup also embeds into ${\mathbb{Q}}^{2}$ through
$(1,0)\mapsto(4/3,0)$ and $(0,1)\mapsto(1/3,1)$. The latter embedding gives
rise to an isomorphism

(5)
$\kappa[u_{1}^{3},u_{1}^{2}u_{2},u_{1}u_{2}^{2},u_{2}^{3}]\simeq\kappa[x^{4},x^{3}y,x^{2}y^{2},xy^{3}]$

of $\kappa$-algebras, where $u_{1}\mapsto x^{4/3}$ and $u_{2}\mapsto
x^{1/3}y$.

From the above perspective, an affine semigroup ring
$R=\kappa[\mathbf{u}^{S}]$ is not only a ring, but a ring together with an
embedding $R\to\kappa[\mathbf{u},\mathbf{u}^{-1}]$ indicated by the variables
$\mathbf{u}$. We use the notation $S=\log_{\mathbf{u}}R$ for the
correspondence between the semigroup $S$ and the commutative ring $R$. As seen
in Examples 4.1 and 4.2, an affine semigroup ring may occur in different
guises from various embeddings of the semigroup. For an affine semigroup ring
$R$ in a set of variables $\mathbf{u}$ and in another set of variables
$\mathbf{v}$, there is an isomorphism
$\log_{\mathbf{v}}\mathbf{u}\colon\log_{\mathbf{u}}R\to\log_{\mathbf{v}}R$,
which can be described by an invertible matrix. For instance,

$\log_{\mathbf{v}}\mathbf{u}=\begin{pmatrix}4/3&1/3\\\ 0&1\end{pmatrix}$

indicates the change of embeddings that gives rise to the isomorphism (5). If
$\log_{\mathbf{u}}R$ and $\log_{\mathbf{v}}R$ are subsets of ${\mathbb{Q}}$,
the isomorphism $\log_{\mathbf{v}}\mathbf{u}$ is simply the multiplication by
the number $s\in{\mathbb{Q}}$ given by $\mathbf{v}=\mathbf{u}^{s}$. If
$s=\log_{\mathbf{u}}{\mathbf{v}}\in{\mathbb{N}}$, we say that the embedding of
$R$ in $\kappa[\mathbf{u}]$ is finer than its embedding in
$\kappa[\mathbf{v}]$.

If $S$ is an affine subsemigroup of another affine semigroup $S^{\prime}$, we
may consider them as subsemigroups of some ${\mathbb{Z}}^{d}$. The semigroup
ring $R^{\prime}:=\kappa[\mathbf{u}^{S^{\prime}}]$ is an algebra over the
coefficient ring $R:=\kappa[\mathbf{u}^{S}]$. We use $R^{\prime}/R$ to denote
the affine semigroup algebra $R^{\prime}$ over $R$. An affine semigroup ring
$\kappa[\mathbf{u}^{S}]$ is positive if $\mathbf{u}^{0}$ is the only
invertible monomial; or equivalently, the affine semigroup $S$ is positive. We
call an affine semigroup algebra $R^{\prime}/R$ positive, if $R^{\prime}$ is
positive. The coefficient ring of a positive affine semigroup algebra is also
positive.

Let $R^{\prime}/R$ be an affine semigroup algebra in the variables
$\mathbf{u}$. A monomial $\mathbf{u}^{w}\in R^{\prime}$ is Apéry over $R$ if
$w$ is Apéry over the semigroup $\log_{\mathbf{u}}R$. In other words,
$\mathbf{u}^{w}$ is Apéry over $R$ if it can not be written as
$\mathbf{u}^{s}\mathbf{u}^{w_{0}}$ for any $\mathbf{u}^{w_{0}}\in R^{\prime}$
and $1\neq\mathbf{u}^{s}\in R$. The set of Apéry monomials of $R^{\prime}$
over $R$ is denoted by $\operatorname{Apr}(R^{\prime}/R)$. The notion of
representations in affine semigroups also has an exponential counterpart. To
be precise, a representation of a monomial $\mathbf{u}^{s^{\prime}}\in
R^{\prime}$ over $R$ is an expression
$\mathbf{u}^{s^{\prime}}=\mathbf{u}^{s}\mathbf{u}^{w}$, where
$\mathbf{u}^{s}\in R$ and $\mathbf{u}^{w}\in\operatorname{Apr}(R^{\prime}/R)$.
If $R^{\prime}/R$ is positive, any monomial in $R^{\prime}$ has a
representation over $R$.

######  Theorem 4.3.

Let $R^{\prime}/R$ be a positive affine semigroup algebra in the variables
$\mathbf{u}$. The following conditions are equivalent.

  1. (i)

Every monomial in $R^{\prime}$ has a unique representation over $R$.

  2. (ii)

$R^{\prime}$ is free over $R$.

  3. (iii)

$R^{\prime}$ is flat over $R$.

###### Proof.

First note that because $R$ and $R^{\prime}$ are both subrings of
$\kappa[\mathbf{u}]$ generated by monomials, if $f$ is in $R$ (resp.
$R^{\prime}$), then every monomial appearing in $f$ is contained in $R$ (resp.
$R^{\prime}$). Hence, if every monomial in $R^{\prime}$ has a unique
representation, then $R^{\prime}$ is a free module over $R$ with
$\operatorname{Apr}(R^{\prime}/R)$ as a basis. More precisely, suppose there
exist distinct
$\mathbf{u}^{w_{1}},\mathbf{u}^{w_{2}},\ldots,\mathbf{u}^{w_{n}}\in\operatorname{Apr}(R^{\prime}/R)$
and nonzero $f_{1},f_{2},\ldots,f_{n}\in R$ such that
$f_{1}\mathbf{u}^{w_{1}}+f_{2}\mathbf{u}^{w_{2}}+\cdots+f_{n}\mathbf{u}^{w_{n}}=0$.
Since $f_{1}$ is nonzero, let $\mathbf{u}^{s_{1}}$ be a monomial appearing in
$f_{1}$. Then the monomial $\mathbf{u}^{s_{1}}\mathbf{u}^{w_{1}}$ must appear
in $f_{i}\mathbf{u}^{w_{i}}$ for some $i$, and so
$\mathbf{u}^{s_{i}}\mathbf{u}^{w_{i}}=\mathbf{u}^{s_{1}}\mathbf{u}^{w_{1}}$
where $\mathbf{u}^{s_{i}}$ is a monomial appearing in $f_{i}$. Since
$\mathbf{u}^{w_{1}}$ and $\mathbf{u}^{w_{i}}$ are distinct, the equality
$\mathbf{u}^{s_{i}}\mathbf{u}^{w_{i}}=\mathbf{u}^{s_{1}}\mathbf{u}^{w_{1}}$
contradicts the assumption that every monomial in $R^{\prime}$ has a unique
representation over $R$. This proves that (i) implies (ii).

Since free modules are flat, it remains to show that every monomial in
$R^{\prime}$ has a unique representation over $R$ if $R^{\prime}$ is flat over
$R$. Suppose there exist distinct
$\mathbf{u}^{w_{1}},\mathbf{u}^{w_{2}}\in\operatorname{Apr}(R^{\prime}/R)$ and
$\mathbf{u}^{s_{1}},\mathbf{u}^{s_{2}}\in R$ such that

$\mathbf{u}^{s_{1}}\mathbf{u}^{w_{1}}=\mathbf{u}^{s_{2}}\mathbf{u}^{w_{2}},\quad\mbox{i.e.,
}\mathbf{u}^{s_{1}}\mathbf{u}^{w_{1}}-\mathbf{u}^{s_{2}}\mathbf{u}^{w_{2}}=0.$

Since $R^{\prime}$ is flat over $R$, by [11, Theorem 7.6], there exist
matrices

$\mathcal{M}=\left[\begin{array}[]{ccc}\vskip 3.0pt plus 1.0pt minus
1.0ptf_{11}&\cdots&f_{1\ell}\\\
f_{21}&\cdots&f_{2\ell}\end{array}\right]\qquad\mbox{and}\qquad\left[\begin{array}[]{c}g_{1}\\\
\vdots\\\ g_{\ell}\end{array}\right]$

with $f_{ij}\in R$ and $g_{i}\in R^{\prime}$ such that

$\left[\begin{array}[]{cc}\mathbf{u}^{s_{1}}&\mathbf{u}^{s_{2}}\end{array}\right]\mathcal{M}=0\qquad\mbox{and}\qquad\mathcal{M}\left[\begin{array}[]{c}g_{1}\\\
\vdots\\\
g_{\ell}\end{array}\right]=\left[\begin{array}[]{c}\mathbf{u}^{w_{1}}\\\
\mathbf{u}^{w_{2}}\end{array}\right].$

Since $f_{11}g_{1}+\cdots+f_{1\ell}g_{\ell}=\mathbf{u}^{w_{1}}$, the monomial
$\mathbf{u}^{w_{1}}$ must appear in $f_{1i}g_{i}$ for some $i$, and so we have
$\mathbf{u}^{w_{1}}=\mathbf{u}^{t}\mathbf{u}^{t^{\prime}}$, where
$\mathbf{u}^{t}$ and $\mathbf{u}^{t^{\prime}}$ are monomials appearing in
$f_{1i}$ and $g_{i}$, respectively. That $f_{1i}\in R$ and $g_{i}\in
R^{\prime}$ implies $\mathbf{u}^{t}\in R$ and $\mathbf{u}^{t^{\prime}}\in
R^{\prime}$. Since $\mathbf{u}^{w_{1}}\in\operatorname{Apr}(R^{\prime}/R)$,
$\mathbf{u}^{t}=1$. Moreover, since
$\mathbf{u}^{s_{1}}f_{1i}+\mathbf{u}^{s_{2}}f_{2i}=0$ and $\mathbf{u}^{t}$ is
a monomial appearing in $f_{1i}$, the monomial
$\mathbf{u}^{s_{1}}\mathbf{u}^{t}=\mathbf{u}^{s_{1}}$ appears in
$\mathbf{u}^{s_{1}}f_{1i}$ and so $\mathbf{u}^{s_{1}}$ appears in
$\mathbf{u}^{s_{2}}f_{2i}$. This implies
$\mathbf{u}^{s_{1}}=\mathbf{u}^{s_{2}}\mathbf{u}^{r}$ for some monomial
$\mathbf{u}^{r}$ appearing in $f_{2i}$. Notice that $\mathbf{u}^{r}$ must be
in $R$ because $f_{2i}\in R$. Therefore

$\mathbf{u}^{s_{1}}\mathbf{u}^{w_{1}}=\mathbf{u}^{s_{2}}\mathbf{u}^{w_{2}}\implies\mathbf{u}^{s_{2}}\mathbf{u}^{r}\mathbf{u}^{w_{1}}=\mathbf{u}^{s_{2}}\mathbf{u}^{w_{2}}\implies\mathbf{u}^{r}\mathbf{u}^{w_{1}}=\mathbf{u}^{w_{2}}.$

Since $\mathbf{u}^{w_{2}}\in\operatorname{Apr}(R^{\prime}/R)$ and
$\mathbf{u}^{r}\in R$, $\mathbf{u}^{r}=1$ and so
$\mathbf{u}^{w_{1}}=\mathbf{u}^{w_{2}}$, which contradicts the assumption that
$\mathbf{u}^{w_{1}}$ and $\mathbf{u}^{w_{2}}$ are distinct. ∎

The following corollary is an immediate consequence of Lemma 3.2 and Theorem
4.3.

######  Corollary 4.4.

Let $\kappa[\mathbf{u}^{S^{\prime}}]$ be a positive affine semigroup ring and
$s\in{S^{\prime}}$. Then $\kappa[\mathbf{u}^{S^{\prime}}]$ is flat over
$\kappa[\mathbf{u}^{s}]$.

Consider affine semigroup algebras $R_{1}/R$ in variables $\mathbf{u}$ and
$R_{2}/R$ in variables $\mathbf{v}$. Denote $S_{1}=\log_{\mathbf{u}}R_{1}$,
$S_{2}=\log_{\mathbf{v}}R_{2}$ and
$S=\log_{\mathbf{u}}R\simeq\log_{\mathbf{v}}R$. In previous sections, we
construct two cancellative monoids $S_{1}\oplus_{S}S_{2}$ and
$S_{1}\widetilde{\oplus}_{S}S_{2}$. The former is finitely generated but not
necessarily torsion free. The latter is the quotient of the former by the
equivalence relation $\sim_{\operatorname{tor}}$ and thus is an affine
semigroup. In particular, using the fact that
$S_{1}\widetilde{\oplus}_{S}S_{2}$ is a fibered sum of $S_{1}$ and $S_{2}$
over $S$ in the category of affine semigroups, it can be checked directly that
$\kappa[\mathbf{w}^{S_{1}\widetilde{\oplus}_{S}S_{2}}]$ over $R$ satisfies the
universal property, and thus is a fibered sum of $R_{1}/R$ and $R_{2}/R$ in
the category of affine semigroup algebras. We call the ring
$\kappa[\mathbf{w}^{S_{1}\widetilde{\oplus}_{S}S_{2}}]$ a fibered sum of the
affine semigroup rings $R_{1}$ and $R_{2}$ over $R$. In order to understand
$\kappa[\mathbf{w}^{S_{1}\oplus_{S}S_{2}}]$ and
$\kappa[\mathbf{w}^{S_{1}\widetilde{\oplus}_{S}S_{2}}]$ better, it is
desirable to compare them with other rings that naturally arise from $R_{1}$
and $R_{2}$, such as their tensor product over $R$. The following lemma proves
that if one of the algebras is positive and flat, then
$\kappa[\mathbf{w}^{S_{1}\oplus_{S}S_{2}}]$ is isomorphic to
$R_{1}\otimes_{R}R_{2}$.

######  Lemma 4.5.

Consider affine semigroup algebras $R_{1}/R$ in variables $\mathbf{u}$ and
$R_{2}/R$ in variables $\mathbf{v}$. Denote $S_{1}=\log_{\mathbf{u}}R_{1}$ and
$S_{2}=\log_{\mathbf{v}}R_{2}$. Let $S$ be a semigroup isomorphic to both
$\log_{\mathbf{u}}R$ and $\log_{\mathbf{v}}R$. If $R_{2}$ is positive and flat
over $R$, then $\kappa[\mathbf{w}^{S_{1}\oplus_{S}S_{2}}]\simeq
R_{1}\otimes_{R}R_{2}$ as $R$-algebras.

###### Proof.

Since $R_{2}$ is positive and flat over $R$, elements of $S_{2}$ can be
written uniquely as $s+w$ for some $s\in S$ and
$w\in\operatorname{Apr}(S_{2}/S)$. Hence elements of $S_{1}\oplus_{S}S_{2}$
can be written uniquely as $s_{1}\oplus w$ for some $s_{1}\in S_{1}$ and
$w\in\operatorname{Apr}(S_{2}/S)$. We may define a $\kappa$-linear map
$\kappa[\mathbf{w}^{S_{1}\oplus_{S}S_{2}}]\to R_{1}\otimes_{R}R_{2}$ by
$\mathbf{w}^{s_{1}\oplus w}\mapsto\mathbf{u}^{s_{1}}\otimes\mathbf{v}^{w}$,
which is indeed a ring homomorphism. The universal property of the tensor
product provides an $R$-linear map
$R_{1}\otimes_{R}R_{2}\to\kappa[\mathbf{w}^{S_{1}\oplus_{S}S_{2}}]$ satisfying
$\mathbf{u}^{s_{1}}\otimes\mathbf{v}^{s_{2}}\mapsto\mathbf{w}^{s_{1}\oplus
s_{2}}$. These two maps are inverse to each other and so they are indeed
isomorphisms of $R$-algebras. ∎

Observe that for Lemma 4.5, in addition to the assumption that $R_{2}$ is
positive and flat over $R$, if the groups of differences of these semigroups
are nicely related, namely
$\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})=\operatorname{Grp}(S)$
in $\operatorname{Grp}(S_{1}\widetilde{\oplus}_{S}S_{2})$, then by Proposition
2.16, $S_{1}\oplus_{S}S_{2}$ and $S_{1}\widetilde{\oplus}_{S}S_{2}$ are
isomorphic and hence $\kappa[\mathbf{w}^{S_{1}\widetilde{\oplus}_{S}S_{2}}]$
is also isomorphic to $R_{1}\otimes_{R}R_{2}$. In other words, Lemma 4.5 and
Proposition 2.16 show the following theorem.

######  Theorem 4.6.

With notation as in Lemma 4.5, if $R_{2}$ is positive and flat over $R$ and if
$\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})=\operatorname{Grp}(S)$
in $\operatorname{Grp}(S_{1}\widetilde{\oplus}_{S}S_{2})$, then
$\kappa[\mathbf{w}^{S_{1}\widetilde{\oplus}_{S}S_{2}}]\simeq
R_{1}\otimes_{R}R_{2}$ as $R$-algebras.

In the category of commutative rings, nice properties of $R_{1}/R$ in the
diagram

$\textstyle{R_{1}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{R_{1}\otimes_{R}R_{2}}$$\textstyle{R\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{R_{2}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$

pass to the algebra $R_{1}\otimes_{R}R_{2}$ over $R_{2}$ under base change
from $R$ to $R_{2}$. In addition if $R_{2}$ is positive and flat over $R$,
then by Lemma 4.5, $\kappa[\mathbf{w}^{S_{1}\oplus_{S}S_{2}}]$ is isomorphic
to $R_{1}\otimes_{R}R_{2}$, so the algebra
$\kappa[\mathbf{w}^{S_{1}\oplus_{S}S_{2}}]$ over $R_{2}$ inherits some nice
properties of $R_{1}$ over $R$. With notation and assumptions as in Lemma 4.5,
note that if $S_{1}$ is also positive, then the affine semigroup
$S_{1}\widetilde{\oplus}_{S}S_{2}\simeq(S_{1}\oplus_{S}S_{2})/\sim_{\operatorname{tor}}$
is positive by Corollary 3.6(i). This leads us to adapt the following
notation.

######  Notation 4.7.

With notation as in Lemma 4.5, assuming that both $S_{1}$ and $S_{2}$ are
positive and that $R_{2}$ is flat over $R$, we use
$R_{1}\widetilde{\otimes}_{R}R_{2}$ to denote the positive affine semigroup
ring $\kappa[\mathbf{w}^{S_{1}\widetilde{\oplus}_{S}S_{2}}]$ which is the
fibered sum of $R_{1}$ and $R_{2}$ over $R$.

Furthermore, in the proof of Lemma 4.5, we obtain an isomorphism
$R_{1}\otimes_{R}R_{2}\to\kappa[\mathbf{w}^{S_{1}\oplus_{S}S_{2}}]$ given by
$\mathbf{u}^{s_{1}}\otimes\mathbf{v}^{s_{2}}\mapsto\mathbf{w}^{s_{1}\oplus
s_{2}}$. Hence, it is natural for us to identify the monomial
$\mathbf{w}^{s_{1}\oplus s_{2}}$ in
$\kappa[\mathbf{w}^{S_{1}\oplus_{S}S_{2}}]$ with the element
$\mathbf{u}^{s_{1}}\otimes\mathbf{v}^{s_{2}}$ in $R_{1}\otimes_{R}R_{2}$.
Since Notation 4.7 introduces $R_{1}\widetilde{\otimes}_{R}R_{2}$ for
$\kappa[\mathbf{w}^{S_{1}\widetilde{\oplus}_{S}S_{2}}]$, it is natural to
denote the monomial $\mathbf{w}^{s_{1}\widetilde{\oplus}s_{2}}$ in
$\kappa[\mathbf{w}^{S_{1}\widetilde{\oplus}_{S}S_{2}}]$ as
$\mathbf{u}^{s_{1}}\widetilde{\otimes}\mathbf{v}^{s_{2}}$.

######  Definition 4.8.

Let $R_{1}/R$ and $R_{2}/R$ be positive affine semigroup algebras over $R$.
Assume that $R_{2}/R$ is flat. We say that the positive affine semigroup
algebra $R_{1}\widetilde{\otimes}_{R}R_{2}$ over $R_{2}$ is the flat base
change of $R_{1}/R$ by $R_{2}/R$.

Flat base change can be illustrated in the following commutative diagram under
the condition that $R_{2}$ is flat over $R$:

$\textstyle{R_{1}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{R_{1}\widetilde{\otimes}_{R}R_{2}}$$\textstyle{R\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{R_{2}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$

We are interested in knowing what property captured in the vertical algebra
$R_{1}/R$ passes to the other vertical algebra via flat base change.

######  Example 4.9.

Consider the affine semigroup rings $R=\kappa[X^{6n}]$, $R_{1}=\kappa[X^{3}]$,
$R_{2}=\kappa[X^{2}]$. First note that by Proposition 2.8,
$3{\mathbb{N}}\widetilde{\oplus}_{6n{\mathbb{N}}}2{\mathbb{N}}\simeq
3{\mathbb{N}}+2{\mathbb{N}}$, so
$R_{1}\widetilde{\otimes}_{R}R_{2}\simeq\kappa[X^{2},X^{3}]$. Moreover, by
Corollary 4.4, $R_{2}/R$ is flat. We investigate the flat base change of
$R_{1}/R$ by $R_{2}/R$ as illustrated below.

$\textstyle{R_{1}=\kappa[X^{3}]\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{R_{1}\widetilde{\otimes}_{R}R_{2}\simeq\kappa[X^{2},X^{3}]}$$\textstyle{R=\kappa[X^{6n}]\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{R_{2}=\kappa[X^{2}]\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$

If $n=1$, then the Apéry monomials of $R_{1}/R$, namely $1$ and $X^{3}$, pass
to the Apéry monomials $1\widetilde{\otimes}1$ and $X^{3}\widetilde{\otimes}1$
of $(R_{1}\widetilde{\otimes}_{R}R_{2})/R_{2}$. However, if $n>1$, the Apéry
monomial $X^{6}$ of $R_{1}/R$ passes to $X^{6}\widetilde{\otimes}1$ which is
no longer Apéry in $(R_{1}\widetilde{\otimes}_{R}R_{2})/R_{2}$ since
$X^{6}\widetilde{\otimes}1=(X^{2})^{3}(1\widetilde{\otimes}1)$. By
straightforward computations, $1\widetilde{\otimes}1$ and
$X^{3}\widetilde{\otimes}1$ remain to be the only Apéry monomials. Precisely,
we notice that $6n{\mathbb{N}}\subset 6{\mathbb{N}}=2{\mathbb{N}}\cap
3{\mathbb{N}}$ for all $n\geq 1$ and that the fiber sum of $R_{1}$ and $R_{2}$
over $\kappa[X^{6n}]$ is isomorphic to
$R_{1}\widetilde{\otimes}_{\kappa[X^{6}]}R_{2}$ for all $n$. (See also the
discussion following Example 2.7.)

In order to define the flat base change in the category of affine semigroup
rings, Definition 4.8 assumes that $R_{2}/R$ is flat. Even assuming further
that $R_{1}/R$ is flat, flatness does not always pass to the algebra
$R_{1}\widetilde{\otimes}_{R}R_{2}$ over $R_{2}$ nor over $R$. The next
example demonstrates these phenomena.

######  Example 4.10.

By [10, Proposition 2.5], adding the square root of a monomial to
$R=\kappa[X^{3},X^{5}]$, we obtain a flat algebra. For instance,
$R_{1}=\kappa[X^{3/2},X^{5}]$ and $R_{2}=\kappa[X^{3},X^{5/2}]$ are flat over
$R$. By Corollary 2.9,
$R_{1}\widetilde{\otimes}_{R}R_{2}\simeq\kappa[X^{3/2},X^{5/2}]$. The Apéry
monomials of $R_{1}/R$ are $1$ and $X^{3/2}$. In this example, they are
exactly the Apéry monomials of $R_{1}\widetilde{\otimes}_{R}R_{2}$ over
$R_{2}$ via the isomorphism just mentioned. However $1$ and $X^{3/2}$ are not
linearly independent over $R_{2}$ since $X^{6}X^{3/2}=X^{15/2}\cdot 1$. This
shows that the flatness of $R_{1}/R$ does not pass through the flat base
change.

Next, we observe that the Apéry monomials of
$R_{1}\widetilde{\otimes}_{R}R_{2}$ over $R$ are $1$, $X^{3/2}$, $X^{5/2}$ and
$X^{3/2}X^{5/2}$. Re-arranging the above equation, one sees distinct
representations $X^{6}X^{3/2}=X^{5}X^{5/2}$. This shows that, by Theorem 4.3,
the algebra $\kappa[X^{3/2},X^{5/2}]$ is not flat over $R$.

The tensor product $R_{1}\otimes_{R}R_{2}$ is free over $R_{2}$ and $R$
respectively due to the flatness of $R_{2}$ over $R$. Thus
$R_{1}\otimes_{R}R_{2}$ and $R_{1}\widetilde{\otimes}_{R}R_{2}$ are not
isomorphic. In fact, $R_{1}\otimes_{R}R_{2}\simeq R_{2}[t]/\langle
t^{2}-X^{3}\rangle$ is not an integral domain, because $t^{10}-X^{15}$ in the
ideal $\langle t^{2}-X^{3}\rangle$ can be factored as
$(t^{5}+X^{15/2})(t^{5}-X^{15/2})$ in $R_{2}[t]$ and neither factor is
contained in $\langle t^{2}-X^{3}\rangle$. This example in semigroup algebras
corresponds to the results of its exponent counterpart in Example 2.19.

######  Example 4.11.

Consider $R_{1}=\kappa[X,XY]$ and $R_{2}=\kappa[XY,Y]$. Let $R:=R_{1}\cap
R_{2}=\kappa[XY]$. Since $R_{1}$ and $R_{2}$ are polynomial rings over $R$,
they are flat over $R$. By Lemma 4.5, the ring generated by the fibered sum of
the corresponding cancellative monoids is

(6) $\kappa[X,XY]\otimes_{\kappa[XY]}\kappa[XY,Y]\simeq\kappa[X,XY,Z]$

which is already an affine semigroup ring. Thus, it is the fibered sum
$R_{1}\widetilde{\otimes}_{R}R_{2}$ of $R_{1}$ and $R_{2}$ over $R$.

Example 4.11 shows that the fibered sum may lead to an increase of dimension
of the rings. In particular, if $R_{1}$ or $R_{2}$ is flat over $R$, then by
Lemma 4.5 the fibered sum is the tensor product or a quotient of the tensor
product. In Section 5, we review gluing from [13] which coincides as a special
case of fibered sums. For example, with a change of embeddings, Example 4.11
can be viewed as the gluing of two polynomial rings. Geometrically, these are
the coordinate rings of two affine planes. In this case, the fibered sum
identifies an affine line from each plane – as if the fibered sum glues the
two planes along a line, and naturally creates a three dimensional affine
space. In terms of semigroups, the semigroups in Example 4.11 are generated by
the monomials in the cones spanned respectively by $X,XY$ and by $XY,Y$. The
latter one is isomorphic to the cone spanned by $XY$ and $Z$ in a three
dimensional space. One thinks that the gluing happens when there is a room for
folding up the two cones along the one cone spanned by $XY$ such that the
folding creates a crease where the gluing takes place. Thus the resulting
folded semigroup generates a three dimensional semigroup ring as in (6).

Such observation reveals the advantage of considering fibered sum and this
will become clear in Section 5. In fact, as we will see in the discussion
following Example 5.1, gluing is not intrinsic, and not every pair of
semigroup rings can be glued. In particular, by [4, Therom 1.4],
$\kappa[X,XY]$ and $\kappa[XY,Y]$ cannot be glued under any circumstance since
they are both nondegenerate in $\kappa[X,Y]$ (i.e. $\kappa[X,XY]$ and
$\kappa[XY,Y]$ have the same dimension as $\kappa[X,Y]$). On the other hand,
$\kappa[X,XY]$ and $\kappa[XY,Z]$ can be glued since they are degenerate in
the three dimensional polynomial ring $\kappa[X,Y,Z]$, the smallest space
where they coexist. Fibered sums always take place regardless initial
embeddings, and therefore, provide one possible intrinsic interpretation for
gluing.

##  5\. Fibered Sum versus Gluing

Let $T_{1}$ and $T_{2}$ be numerical semigroups in ${\mathbb{N}}$, both with
the greatest common divisor $1$. Let $a\in T_{1}$ and $b\in T_{2}$ be
relatively prime numbers such that $a$ (resp. $b$) is not a minimal generator
of $T_{1}$ (resp. $T_{2}$). Under these conditions on $a$ and $b$, the
numerical semigroup $bT_{1}+aT_{2}$ is called a gluing of numerical semigroups
(c.f. [15, p. 130]).

The gluing is in fact a fibered sum with respect to a third numerical
semigroup to be unveiled here: we look at this fact from the perspective of
considering them as exponents in the semigroup rings. Namely, we consider
$R_{1}:=\kappa[u_{1}^{T_{1}}]$ and $R_{2}:=\kappa[u_{2}^{T_{2}}]$ as subrings
of the polynomial rings $\kappa[u_{1}]$ and $\kappa[u_{2}]$ in variables
$u_{1}$ and $u_{2}$, respectively. The aim of gluing is to equate the
monomials $u_{1}^{a}$ and $u_{2}^{b}$. In fact, if we identify $u_{1}^{1/b}$
and $u_{2}^{1/a}$ and call it $u$, then the new variable $u$ works for this
purpose. Furthermore, $R_{1}=\kappa[u^{bT_{1}}]$ and
$R_{2}=\kappa[u^{aT_{2}}]$ as subsets of $\kappa[u^{bT_{1}+aT_{2}}]$ have an
intersection $R:=\kappa[u^{ab}]$. In the way of

$u_{1}^{a}=(u_{1}^{1/b})^{ba}=u^{ba}=u^{ab}=(u_{2}^{1/a})^{ab}=u_{2}^{b},$

$u_{1}^{a}$ and $u_{2}^{b}$ are “glued”. Precisely, the process of gluing
identifies the subring $\kappa[u_{1}^{a}]$ of $\kappa[u_{1}^{T_{1}}]$ and
$\kappa[u_{2}^{b}]$ of $\kappa[u_{2}^{T_{2}}]$. If we change their embeddings
all into $\kappa[u]$, then both $u_{1}^{a}$ and $u_{2}^{b}$ are mapped to
$u^{ab}$. Moreover, $R_{1}$ and $R_{2}$ now has a subring $\kappa[u^{ab}]$ in
common over which the resulting gluing $\kappa[u^{bT_{1}+aT_{2}}]$ appears as
a universal object. Returning to the semigroup perspective, by Corollary 2.9,
$aT_{1}+bT_{2}$ is exactly the fibered sum of $aT_{1}$ and $bT_{2}$ over
$ab{\mathbb{N}}$ as defined in Definition 2.6. We remark that, as far as
fibered sums are concerned, the condition stated in the above excluding $a$
and $b$ being minimal generators for gluing is not necessary. The relatively
prime condition on $a$ and $b$ assures that the gluing has greatest common
divisor $1$. This condition is neither essential.

Our interpretation of gluing imposes vital usage of variables $\mathbf{u}$
that accommodate the algebras $R_{1}/R$ and $R_{2}/R$ as well as the ring
$R_{1}\widetilde{\otimes}_{R}R_{2}$. In the classical treatment of affine
semigroup rings, the role of variables is not brought out into open. For an
affine semigroup $S$, the associated affine semigroup ring is often denoted by
$\kappa[S]$, without referencing variables. However, coming to actual
operations of elements in the ring, recognition of variables becomes essential
in understanding the underline ring structures.

Gluing. The gluing of numerical semigroup rings is generalized to higher
dimension by Rosales [13]. Let $S$ be an affine semigroup. We consider the
affine semigroup ring $\kappa[\mathbf{v}^{S}]$ in multivariable $\mathbf{v}$.
For $a\in{\mathbb{N}}$ and new multivariable $\mathbf{u}=\mathbf{v}^{1/a}$, we
say that $\kappa[\mathbf{u}^{aS}]=\kappa[\mathbf{v}^{S}]$ has an embedding in
$\kappa[\mathbf{u}]$ finer than its embedding in $\kappa[\mathbf{v}]$,
similarly to the numerical cases described after Example 4.2. Let
$S_{1}=\langle s_{1},\ldots,s_{n}\rangle$ and $S_{2}=\langle
t_{1},\ldots,t_{m}\rangle$ be positive affine semigroups generated by
$s_{1},..,s_{n}$ and $t_{1},..,t_{m}$ in ${\mathbb{N}}^{d}$ respectively.
Rosales [13] defines that $S_{1}$ and $S_{2}$ can be glued if there exist
$a,b\in{\mathbb{N}}$ such that the $\kappa$-algebra homomorphisms

$\displaystyle\varphi_{1}$ $\displaystyle:$
$\displaystyle\kappa[X_{1},\ldots,X_{n}]\to\kappa[\mathbf{u}^{aS_{1}}],$ (7)
$\displaystyle\varphi_{2}$ $\displaystyle:$
$\displaystyle\kappa[Y_{1},\ldots,Y_{m}]\to\kappa[\mathbf{u}^{bS_{2}}],$
$\displaystyle\varphi$ $\displaystyle:$
$\displaystyle\kappa[X_{1},\ldots,X_{n},Y_{1},\ldots,Y_{m}]\to\kappa[\mathbf{u}^{aS_{1}+bS_{2}}]$

given by $\varphi(X_{i})=\varphi_{1}(X_{i})=\mathbf{u}^{as_{i}}$ and
$\varphi(Y_{j})=\varphi_{2}(Y_{j})=\mathbf{u}^{bt_{j}}$ satisfying the
condition

(8) $\ker\varphi=\ker\varphi_{1}+\ker\varphi_{2}+\langle X^{i_{1}}_{1}\cdots
X^{i_{n}}_{n}-Y^{j_{1}}_{1}\cdots Y^{j_{m}}_{m}\rangle$

for some monomials $X^{i_{1}}_{1}\cdots X^{i_{n}}_{n}$ and
$Y^{j_{1}}_{1}\cdots Y^{j_{m}}_{m}$. In our perception, what Rosales means by
saying that $S_{1}$ and $S_{2}$ can be glued actually means that
$\kappa[\mathbf{u}^{S_{1}}]$ and $\kappa[\mathbf{u}^{S_{2}}]$ can be glued
along a polynomial ring in one variable in some finer embedding.

The next example illustrates the above description.

######  Example 5.1.

Consider the affine semigroups $S_{1}=\langle(2,1,0),(1,1,1),(0,1,2)\rangle$
and $S_{2}=\langle(1,2,0),(1,1,1),(1,0,2)\rangle$ in ${\mathbb{N}}^{3}$. We
use $x$, $y$, $z$ for variables in $\bf u$. Then
$R_{1}=\kappa[\mathbf{u}^{S_{1}}]=\kappa[x^{2}y,xyz,yz^{2}]$ and
$R_{2}=\kappa[\mathbf{u}^{S_{2}}]=\kappa[xy^{2},xyz,xz^{2}]$. In this example,
$m=n=3$. By taking $a=b=1$,
$\kappa[\mathbf{u}^{aS_{1}+bS_{2}}]=\kappa[x^{2}y,yz^{2},xyz,xy^{2},xz^{2}]$.
The above ring homomorphisms $\varphi_{1}$ maps $X_{1},X_{2},X_{3}$ to
$x^{2}y,xyz,yz$, and similarly for $Y_{1},Y_{2}$, and $Y_{3}$. Lemma 5.4 will
show $\ker\varphi=\ker\varphi_{1}+\ker\varphi_{2}+\langle X_{2}-Y_{2}\rangle$,
which means only $xyz$ from $R_{1}$ and $R_{2}$ are identified. Therefore,
$R_{1}$ and $R_{2}$ can be glued along $\kappa[xyz]$ to obtain
$\kappa[x^{2}y,yz^{2},xyz,xy^{2},xz^{2}]$. This is done without identifying
powers of other monomials.

Next, we discuss the connections between the fibered sum and the gluing just
described. Consider
$R^{\prime}=R_{1}^{\prime}=R_{2}^{\prime}=\kappa[u^{2},uv,v^{2}]$ and the
corresponding homomorphisms as in (7), but denoted here by
$\varphi_{1}^{\prime}$, $\varphi_{2}^{\prime}$, and $\varphi^{\prime}$, with
$a=b=1$. Besides elements of $\ker\varphi_{1}^{\prime}$ and
$\ker\varphi_{2}^{\prime}$, the kernel of $\varphi^{\prime}$ is also generated
by $X_{1}-Y_{1}$, $X_{2}-Y_{2}$ and $X_{3}-Y_{3}$. The semigroup $S^{\prime}$
that gives rise to $R_{1}^{\prime}$ and $R_{2}^{\prime}$ is generated by the
columns in the matrix

$M=\begin{pmatrix}2&1&0\\\ 0&1&2\end{pmatrix}.$

These semigroups cannot be realized by any choices of positive integers $a$
and $b$ to reduce the generating set of $\ker\varphi^{\prime}$ by adding only
one binomial to $\ker\varphi_{1}^{\prime}+\ker\varphi_{2}^{\prime}$.
Therefore, $R_{1}^{\prime}$ and $R_{2}^{\prime}$ cannot be glued. This is a
nondegenerate case in Gimenez and Srinivasan [4] and is supported by Theorem
1.4 of the same paper.

On the other hand, one observes that $R_{1}^{\prime}=R_{2}^{\prime}$ is
isomorphic to $R_{1}$ and $R_{2}$ in Example 5.1 where a gluing of $R_{1}$ and
$R_{2}$ takes place. This shows that gluing is not an intrinsic definition. We
propose a remedy to resolve such situation in the following.

In Example 5.1, $S_{1}$ and $S_{2}$ are indeed the semigroups in
${\mathbb{N}}^{3}$ generated by the columns in the matrices

$M_{1}=\begin{pmatrix}2&1&0\\\ 1&1&1\\\ 0&1&2\end{pmatrix}\text{ and
}M_{2}=\begin{pmatrix}1&1&1\\\ 2&1&0\\\ 0&1&2\end{pmatrix},$

respectively. Instead of a scalar multiple as defined in the gluing, we
suggest a matrix transformation on the generating set. For instance, let

$A=\begin{pmatrix}1&0\\\ 1/2&1/2\\\ 0&1\end{pmatrix}\text{ and
}B=\begin{pmatrix}1/2&1/2\\\ 1&0\\\ 0&1\end{pmatrix}.$

Then $AM=M_{1}$ and $BM=M_{2}$. Let $AS^{\prime}$ denote the semigroup
generated by the columns of the matrix $AM$, and similarly $BS^{\prime}$ for
$BM$. Obviously, now we have
$\kappa[\mathbf{u}^{AS^{\prime}}]=\kappa[\mathbf{u}^{S_{1}}]=R_{1}$ and
$\kappa[\mathbf{u}^{BS^{\prime}}]=\kappa[\mathbf{u}^{S_{2}}]=R_{2}$, and they
can be glued as shown in Example 5.1.

We summarize the above comparison of the attempt of gluing $R^{\prime}$ and
itself to gluing $R_{1}$ and $R_{2}$. The semigroup $S^{\prime}$ is of rank
$2$ and embedded in ${\mathbb{N}}^{2}$. This makes $R^{\prime}$ nondegenerate
and so it cannot be glued to itself as stated in [4, Therom 1.4]. By linear
transformations, the semigroup $S^{\prime}$ is transferred into two semigroups
$S_{1}$ and $S_{2}$ in a free group of higher rank. In this way, not only
$S_{1}$ and $S_{2}$ are degenerate, but they are also separate in a way that
$\operatorname{Grp}{(S_{1})}\cap\operatorname{Grp}{(S_{2})}$ is generated by a
single element belonging to $S_{1}\cap S_{2}$. The latter condition about the
intersection is equivalent to requiring $\ker\varphi$ to acquire only one more
generator in addition to $\ker\varphi_{1}$ and $\ker\varphi_{2}$. Such an
essential condition is proved in [13, Therom 1.4] and recovered in Theorem 5.3
below using fibered sums.

We first prove a theorem that interprets gluings as fibered sums.

######  Theorem 5.2.

If positive affine semigroup rings $R_{1}$ and $R_{2}$ in the same variables
can be glued along a polynomial ring $R$ in one variable in some finer
embedding, then there are homomorphisms $R\to R_{1}$ and $R\to R_{2}$ such
that the gluing is isomorphic to $R_{1}\otimes_{R}R_{2}$. Furthermore,
$R_{1}\widetilde{\otimes}_{R}R_{2}\simeq R_{1}\otimes_{R}R_{2}$.

###### Proof.

Denote $S_{1}=\log_{\mathbf{u}}R_{1}$ and $S_{2}=\log_{\mathbf{u}}R_{2}$. Let
$i_{1},\ldots,i_{n},j_{1},\cdots,j_{m}$ and $a,b$ be integers as in the
definition of the gluing as described above. Define two homomorphisms
${\mathbb{N}}\to S_{1}$ and ${\mathbb{N}}\to S_{2}$ by sending $1$ to
$i_{1}s_{1}+\cdots+i_{n}s_{n}$ and $j_{1}t_{1}+\cdots+j_{m}t_{m}$,
respectively. Define $S_{1}\to aS_{1}+bS_{2}$ and $S_{2}\to aS_{1}+bS_{2}$ by
multiplying $a$ and $b$ to $S_{1}$ an $S_{2}$, respectively. The images of $1$
from ${\mathbb{N}}$ via the compositions of the above homomorphisms agree in
$aS_{1}+bS_{2}$ by the gluing hypothesis on $S_{1}$ and $S_{2}$. These
homomorphisms of affine semigroups induce a commutative diagram

$\textstyle{\kappa[\mathbf{u}^{S_{1}}]\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{\kappa[\mathbf{u}^{aS_{1}+bS_{2}}]}$$\textstyle{\kappa[\mathbf{u}^{{\mathbb{N}}}]\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{\kappa[\mathbf{u}^{S_{2}}]\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$

of affine semigroup rings.

Let $\mathcal{R}$ be an arbitrary $\kappa$-algebra. Assume that the outer
layer of the following diagram with $\mathcal{R}$ at the northeastern corner
commutes.

---
$\textstyle{\mathcal{R}}$$\textstyle{\kappa[\mathbf{u}^{S_{1}}]\simeq\kappa[\mathbf{u}^{aS_{1}}]\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$----------$\textstyle{\kappa[\mathbf{u}^{aS_{1}+bS_{2}}]\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{\kappa[\mathbf{u}^{{\mathbb{N}}}]\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{\kappa[\mathbf{u}^{S_{2}}]\simeq\kappa[\mathbf{u}^{bS_{2}}]\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$----

By realizing the affine semigroup rings as quotients of polynomial rings
modulo their corresponding defining ideals in the definition of gluing,

$\begin{array}[]{l}\kappa[\mathbf{u}^{S_{1}}]\simeq\kappa[\mathbf{u}^{aS_{1}}]\simeq\kappa[X_{1},\dots,X_{n}]/\ker\varphi_{1}\\\
\kappa[\mathbf{u}^{S_{2}}]\simeq\kappa[\mathbf{u}^{bS_{2}}]\simeq\kappa[Y_{1},\dots,Y_{m}]/\ker\varphi_{2}\\\
\kappa[\mathbf{u}^{aS_{1}+bS_{2}}]\simeq\kappa[X_{1},\dots,X_{n},Y_{1},\cdots,Y_{m}]/\ker\varphi,\end{array}$

we see that the images of $X_{i}$ and $Y_{j}$ in $\mathcal{R}$ from
$\kappa[\mathbf{u}^{aS_{1}}]$ and $\kappa[\mathbf{u}^{bS_{2}}]$ naturally
provide assignments of those variables in
$\kappa[X_{1},\dots,X_{n},Y_{1},\dots,Y_{m}]$. While
$\ker\varphi=\ker\varphi_{1}+\ker\varphi_{2}+\langle X^{i_{1}}_{1}\cdots
X^{i_{n}}_{n}-Y^{j_{1}}_{1}\cdots Y^{j_{m}}_{m}\rangle$, we notice that the
images of $X^{i_{1}}_{1}\cdots X^{i_{n}}_{n}$ and $Y^{j_{1}}_{1}\cdots
Y^{j_{m}}_{m}$ agree for they are the image of $\mathbf{u}$ from
$\kappa[\mathbf{u}^{{\mathbb{N}}}]$. Thus both $\kappa$-algebra homomorphisms
from $\kappa[\mathbf{u}^{S_{1}}]$ and $\kappa[\mathbf{u}^{S_{2}}]$ to
$\mathcal{R}$ factor through $\kappa[\mathbf{u}^{aS_{1}+bS_{2}}]$. Such
induced map must be unique by the desired commutativity of the resulting
triangular diagrams.

The above work observes that $\kappa[\mathbf{u}^{aS_{1}+bS_{2}}]$ satisfies
the universal property in the category of $\kappa$-algebras and concludes that
the gluing $\kappa[\mathbf{u}^{aS_{1}+bS_{2}}]$ is isomorphic to
$R_{1}\otimes_{R}R_{2}$, where $R:=\kappa[\mathbf{u}^{{\mathbb{N}}}]$. This
proves the first statement of the proposition

Since the algebra $R_{2}/R$ is flat, by Lemma 4.5,

$\kappa[\mathbf{u}^{aS_{1}+bS_{2}}]\simeq
R_{1}\otimes_{R}R_{2}\simeq\kappa[\mathbf{u}^{S_{1}\oplus_{{\mathbb{N}}}S_{2}}].$

This shows also that $\kappa[\mathbf{u}^{S_{1}\oplus_{{\mathbb{N}}}S_{2}}]$ is
an affine semigroup ring, so the exponent $S_{1}\oplus_{{\mathbb{N}}}S_{2}$
must be torsion free which implies that it is isomorphic to
$S_{1}\widetilde{\oplus}_{{\mathbb{N}}}S_{2}$. Hence,
$R_{1}\widetilde{\otimes}_{R}R_{2}\simeq R_{1}\otimes_{R}R_{2}$. ∎

The next theorem recovers an equivalent condition for the existence of the
gluing as in [13, Theorem 1.4].

######  Theorem 5.3.

Positive affine semigroups $S_{1}$ and $S_{2}$ in ${\mathbb{N}}^{d}$ can be
glued if and only if there are $a,b\in{\mathbb{N}}$ and a non-zero element in
$aS_{1}\cap bS_{2}$ generating
$\operatorname{Grp}(aS_{1})\cap\operatorname{Grp}(bS_{2})$ in
${\mathbb{Z}}^{d}$.

In fact, Theorem 5.3 follows a special case when the gluing of
$\kappa[\mathbf{u}^{S_{1}}]$ and $\kappa[\mathbf{u}^{S_{2}}]$ takes place
without the need of any scalar modification and is plainly
$\kappa[\mathbf{u}^{S_{1}+S_{2}}]$. In Lemma 5.4, we further observe that the
condition (8) on the kernel for $\kappa[\mathbf{u}^{S_{1}+S_{2}}]$ to be the
gluing of $\kappa[\mathbf{u}^{S_{1}}]$ and $\kappa[\mathbf{u}^{S_{2}}]$ in
$\kappa[\mathbf{u}]$ is equivalent to a condition on the groups generated by
$S_{1}$ and $S_{2}$. We begin proving this observation using a key Lemma 2.12.

######  Lemma 5.4.

Let $S_{1}=\langle s_{1},\ldots,s_{n}\rangle$ and $S_{2}=\langle
t_{1},\ldots,t_{m}\rangle$ be affine semigroups in ${\mathbb{N}}^{d}$, and
consider the $\kappa$-algebra homomorphisms

$\displaystyle\varphi_{1}$ $\displaystyle:$
$\displaystyle\kappa[X_{1},\ldots,X_{n}]\to\kappa[\mathbf{u}^{S_{1}}],$
$\displaystyle\varphi_{2}$ $\displaystyle:$
$\displaystyle\kappa[Y_{1},\ldots,Y_{m}]\to\kappa[\mathbf{u}^{S_{2}}],$
$\displaystyle\varphi$ $\displaystyle:$
$\displaystyle\kappa[X_{1},\ldots,X_{n},Y_{1},\ldots,Y_{m}]\to\kappa[\mathbf{u}^{S_{1}+S_{2}}]$

given by $\varphi(X_{i})=\varphi_{1}(X_{i})=\mathbf{u}^{s_{i}}$ and
$\varphi(Y_{j})=\varphi_{2}(Y_{j})=\mathbf{u}^{t_{j}}$. For any nonzero
element $w=i_{1}s_{1}+\cdots+i_{n}s_{n}=j_{1}t_{1}+\cdots+j_{m}t_{m}$ in
$S_{1}\cap S_{2}$, the following conditions are equivalent.

  1. (i)

$\ker\varphi=\ker\varphi_{1}+\ker\varphi_{2}+\langle X^{i_{1}}_{1}\cdots
X^{i_{n}}_{n}-Y^{j_{1}}_{1}\cdots Y^{j_{m}}_{m}\rangle$.

  2. (ii)

$\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})=\operatorname{Grp}(S)$,
where $S={\mathbb{N}}w$.

###### Proof.

First note that since $S_{1}\oplus_{S}S_{2}$ is a fibered sum, there exists a
canonical map $S_{1}\oplus_{S}S_{2}\to S_{1}+S_{2}$ by the universal property
and it induces a $\kappa$-algebra homomorphism
$\eta:\kappa[\mathbf{u}^{S_{1}\oplus_{S}S_{2}}]\to\kappa[\mathbf{u}^{S_{1}+S_{2}}]$.
Consider the $\kappa$-algebra homomorphism

$\widetilde{\varphi}:\kappa[X_{1},\ldots,X_{n},Y_{1},\ldots,Y_{m}]\to\kappa[\mathbf{u}^{S_{1}\oplus_{S}S_{2}}]$

given by $\widetilde{\varphi}(X_{i})=\mathbf{u}^{s_{i}\oplus 0}$ and
$\widetilde{\varphi}(Y_{j})=\mathbf{u}^{0\oplus t_{j}}$. Then $\varphi_{1}$,
$\varphi_{2}$, $\varphi$, and $\widetilde{\varphi}$ are epimorphisms, and we
have the commutative diagram

$\textstyle{\kappa[X_{1},\ldots,X_{n},Y_{1},\ldots,Y_{m}]\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\qquad\qquad\widetilde{\varphi}}$$\scriptstyle{\varphi}$$\textstyle{\kappa[\mathbf{u}^{S_{1}\oplus_{S}S_{2}}]\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\eta}$$\textstyle{\kappa[\mathbf{u}^{S_{1}+S_{2}}].}$

Next we consider the following ideal of
$\kappa[X_{1},\ldots,X_{n},Y_{1},\ldots,Y_{m}]$

$J=\ker\varphi_{1}+\ker\varphi_{2}+\langle X^{i_{1}}_{1}\cdots
X^{i_{n}}_{n}-Y^{j_{1}}_{1}\cdots Y^{j_{m}}_{m}\rangle.$

Note that the image of $X^{i_{1}}_{1}\cdots X^{i_{n}}_{n}-Y^{j_{1}}_{1}\cdots
Y^{j_{m}}_{m}$ under $\widetilde{\varphi}$ is

$\begin{array}[]{rl}&\left(\mathbf{u}^{s_{1}\oplus
0}\right)^{i_{1}}\cdots\left(\mathbf{u}^{s_{n}\oplus
0}\right)^{i_{n}}-\left(\mathbf{u}^{0\oplus
t_{1}}\right)^{j_{1}}\cdots\left(\mathbf{u}^{0\oplus t_{m}}\right)^{j_{m}}\\\
=&\mathbf{u}^{(i_{1}s_{1}+\cdots+i_{n}s_{n})\oplus
0}-\mathbf{u}^{0\oplus(j_{1}t_{1}+\cdots+j_{m}t_{m})}\\\ =&\mathbf{u}^{w\oplus
0}-\mathbf{u}^{0\oplus w}\end{array}$

which is equal to $0$ since $w\in S$ and so $w\oplus 0=0\oplus w$. It is now
clear that $J$ is contained in $\ker\widetilde{\varphi}$ and so
$\widetilde{\varphi}$ induces a $\kappa$-algebra homomorphism

$\psi:\kappa[X_{1},\ldots,X_{n},Y_{1},\ldots,Y_{m}]/J\to\kappa[\mathbf{u}^{S_{1}\oplus_{S}S_{2}}]$

with $\ker\psi=\ker\widetilde{\varphi}/J$. On the other hand, note that by
Corollary 4.4 and Lemma 4.5, we have an isomorphism

$\iota:\kappa[\mathbf{u}^{S_{1}\oplus_{S}S_{2}}]\xrightarrow{\,\,\,\sim\,\,\,}\kappa[\mathbf{u}^{S_{1}}]\otimes_{\kappa[\mathbf{u}^{S}]}\kappa[\mathbf{u}^{S_{2}}].$

And also, due to the hypothesis that $S={\mathbb{N}}w$ for $w\in S_{1}\cap
S_{2}$, and that $J$ contains $X^{i_{1}}_{1}\cdots
X^{i_{n}}_{n}-Y^{j_{1}}_{1}\cdots Y^{j_{m}}_{m}$, the following diagram
commutes

$\textstyle{\kappa[\mathbf{u}^{S_{1}}]}$$\textstyle{\simeq}$$\textstyle{\dfrac{\kappa[X_{1},\ldots,X_{n}]}{\ker\varphi_{1}}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{\dfrac{\kappa[X_{1},\ldots,X_{n},Y_{1},\ldots,Y_{m}]}{J}}$$\textstyle{\kappa[\mathbf{u}^{S}]\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{\kappa[\mathbf{u}^{S_{2}}]\simeq\dfrac{\kappa[Y_{1},\ldots,Y_{m}]}{\ker\varphi_{2}}.\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$

We will show in the remaining proof that this commutative diagram leads to the
desired equivalence.

First, the universal property of tensor products ensures the existence of the
homomorphism

$\kappa[\mathbf{u}^{S_{1}}]\otimes_{\kappa[\mathbf{u}^{S}]}\kappa[\mathbf{u}^{S_{2}}]\to\frac{\kappa[X_{1},\ldots,X_{n},Y_{1},\ldots,Y_{m}]}{J},$

which then induces a homomorphism from an isomorphic $\kappa$-algebra

$\phi:\kappa[\mathbf{u}^{S_{1}\oplus_{S}S_{2}}]\to\frac{\kappa[X_{1},\ldots,X_{n},Y_{1},\ldots,Y_{m}]}{J}.$

We observe the images of $X_{i}$ and $Y_{j}$ in
$\kappa[X_{1},\ldots,X_{n},Y_{1},\ldots,Y_{m}]/J$ via $\phi\circ\psi$

$\begin{array}[]{rl}&X_{i}\mapsto\mathbf{u}^{s_{i}\oplus
0}\stackrel{{\scriptstyle\iota}}{{\mapsto}}\mathbf{u}^{s_{i}}\otimes 1\mapsto
X_{i}\\\ &Y_{j}\mapsto\mathbf{u}^{0\oplus
t_{j}}\stackrel{{\scriptstyle\iota}}{{\mapsto}}1\otimes\mathbf{u}^{t_{j}}\mapsto
Y_{j}\end{array}$

and the images of $\mathbf{u}^{s_{i}\oplus 0}$ and $\mathbf{u}^{0\oplus
t_{j}}$ in $\kappa[\mathbf{u}^{S_{1}\oplus_{S}S_{2}}]$ via $\psi\circ\phi$

$\begin{array}[]{rl}&\mathbf{u}^{s_{i}\oplus
0}\stackrel{{\scriptstyle\iota^{\tiny{-1}}}}{{\longmapsto}}\mathbf{u}^{s_{i}}\otimes
1\mapsto X_{i}\mapsto\mathbf{u}^{s_{i}\oplus 0}\\\ &\mathbf{u}^{0\oplus
t_{j}}\stackrel{{\scriptstyle\iota^{\tiny{-1}}}}{{\longmapsto}}1\otimes\mathbf{u}^{t_{j}}\mapsto
Y_{j}\mapsto\mathbf{u}^{0\oplus t_{j}}\end{array}.$

This shows that $\phi$ and $\psi$ are the inverse of each other, and so $\psi$
is an isomorphism. This implies $\ker\widetilde{\varphi}=J$ since
$\ker\psi=\ker\widetilde{\varphi}/J$.

Moreover, the previous commutative diagram
$\varphi=\eta\circ\widetilde{\varphi}$ shows that
$\ker\varphi\supset\ker\widetilde{\varphi}=J$. The equality holds, which means

$\ker\varphi=\ker\varphi_{1}+\ker\varphi_{2}+\langle X^{i_{1}}_{1}\cdots
X^{i_{n}}_{n}-Y^{j_{1}}_{1}\cdots Y^{j_{m}}_{m}\rangle,$

if and only if $\eta$ is injective, which, by the construction of $\eta$ in
the beginning of the proof, is equivalent to that the canonical map
$S_{1}\oplus_{S}S_{2}\to S_{1}+S_{2}$ is one-to-one. Finally, by Lemma 2.12,
the last condition is equivalent to
$\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})=\operatorname{Grp}(S)$.
This proves the lemma. ∎

Now we prove Theorem 5.3.

###### Proof.

Assume that $R_{1}\simeq\kappa[\mathbf{u}^{S_{1}}]$ and
$R_{2}\simeq\kappa[\mathbf{u}^{S_{2}}]$ in some $\kappa[\mathbf{u}]$ can be
glued along a polynomial ring in one variable. Then by definition, there exist
positive integers $a$ and $b$ such that their gluing is
$\kappa[\mathbf{u}^{aS_{1}+bS_{2}}]$ up to isomorphisms. The forward
implication follows immediately by applying Lemma 5.4 to $aS_{1}$ and
$bS_{2}$.

Conversely, if there exist positive integers $a$ and $b$ that satisfy the
stated condition for the groups, then we have condition (ii) in Lemma 5.4 for
$aS_{1}$ and $bS_{2}$. Hence, its equivalent condition (i) holds which gives
the gluing of $S_{1}$ and $S_{2}$. ∎

The result in Lemma 5.4 implies that the condition of
$\operatorname{Grp}(aS_{1})\cap\operatorname{Grp}(bS_{2})$ being generated by
a single element $w$ in $aS_{1}\cap bS_{2}$ is a necessary and sufficient
condition for gluing to take place. That is, the existence of such $w$
determines whether or not a gluing is possible. Furthermore, although gluing
happens in the level of semigroups, it is closely related to the relative
positions of the groups generated by them. In particular if an element in
$S_{1}\cap S_{2}$ generates
$\operatorname{Grp}(S_{1})\cap\operatorname{Grp}(S_{2})$, then it generates
$S_{1}\cap S_{2}$, but the converse does not hold. For instance, let
$S_{1}=\langle(1,0),(1,1)\rangle$ and $S_{2}=\langle(0,1),(1,1)\rangle$ in
${\mathbb{N}}^{2}$. Then for any positive integers $a$ and $b$, $aS_{1}\cap
bS_{2}$ is always generated by one element, but
$\operatorname{Grp}(aS_{1})\cap\operatorname{Grp}(bS_{2})$ has rank $2$. This
reflects the folding intuition described after Example 4.11. While condition
(ii) in Lemma 5.4 cannot be established by scalar multiples, we see that it
may be done by matrix transformations in the discussion following Example 5.1.

Summary. We conclude this paper by reiterating our “relative” point of view.
The idea of gluing is to construct a new affine semigroup ring from two given
ones by identifying selected subrings. We have seen two approaches in this
section: from set-theoretic viewpoint or from categorical viewpoint.

The set-theoretic approach is the classical method initiated in Rosales [13],
in which the part to be identified is a one-dimensional polynomial ring. To
assure that no extra identification occurs outside the polynomial ring, this
classical approach takes into account the defining relations of the given
affine semigroup rings and those of the new one. Precisely, the new affine
semigroup ring, if constructible, is restricted to acquire only one extra
relation among the generators in addition to the existing relations in the
given affine semigroup rings.

From another standpoint, our approach of taking fibered sum is functorial,
where an affine semigroup ring is regarded as an object equipped with
morphisms in the category of affine semigroup rings. An affine semigroup ring
containing the two given ones with identified parts fits in a commutative
diagram. The desired construction is a diagram, smallest in the sense that all
such diagrams emerge from it. (This is as illustrated in the proof of Theorem
5.2.) So what we seek is a universal object among these diagrams, or in other
words, a fibered sum in the category of affine semigroup rings.

Consideration of fibered sums yields the generality that the parts to be
identified can be an arbitrary affine semigroup ring. This potentially widens
the range of future studies in the field. For example, in the numerical cases,
singularities are stable under gluing and this fact can be explained by base
changes [10]. The fibered sum introduced in this paper, thus, calls for the
investigation of singular properties of affine semigroup algebras under base
changes, among many prospective directions.

Acknowledgement. The first author would like to express her gratitude to the
Institute of Mathematics of Academia Sinica for their generous support and
hospitality during her multiple visits.

## References

  * [1] Charles Delorme.  Sous-monoïdes d’intersection complète de $N.$.  Ann. Sci. École Norm. Sup. (4), 9(1):145–154, 1976.
  * [2] Philippe Gimenez and Hema Srinivasan.  The structure of the minimal free resolution of semigroup rings obtained by gluing.  J. Pure Appl. Algebra, 223(4):1411–1426, 2019.
  * [3] Philippe Gimenez and Hema Srinivasan.  Gluing semigroups: when and how.  Semigroup Forum, 101(3):603–618, 2020.
  * [4] Philippe Gimenez and Hema Srinivasan.  On gluing semigroups in $\mathbb{N}^{n}$ and the consequences.  Res. Math. Sci., 9(2):Paper No. 23, 14, 2022.
  * [5] Pierre Antoine Grillet.  Commutative semigroups, volume 2 of Advances in Mathematics (Dordrecht).  Kluwer Academic Publishers, Dordrecht, 2001.
  * [6] Pierre Antoine Grillet.  The free envelope of a finitely generated commutative semigroup.  Trans. Amer. Math. Soc., 149:665–682, 1970.
  * [7] Jürgen Herzog.  Generators and relations of abelian semigroups and semigroup rings.  Manuscripta Math., 3:175–193, 1970.
  * [8] I-Chiau Huang and Raheleh Jafari.  Factorizations in numerical semigroup algebras.  J. Pure Appl. Algebra, 223(5):2258–2272, 2019.
  * [9] I-Chiau Huang and Raheleh Jafari.  Coefficient rings of numerical semigroup algebras.  Semigroup Forum, 103(3):899–915, 2021.
  * [10] I-Chiau Huang and Mee-Kyoung Kim.  Numerical semigroup algebras.  Comm. Algebra, 48(3):1079–1088, 2020.
  * [11] Hideyuki Matsumura.  Commutative Ring Theory.  Cambridge University Press, 1986.
  * [12] José Carlos Rosales.  On finitely generated submonoids of ${\bf N}^{k}$.  Semigroup Forum, 50(2):251–262, 1995.
  * [13] José Carlos Rosales.  On presentations of subsemigroups of ${\bf N}^{n}$.  Semigroup Forum, 55(2):152–159, 1997.
  * [14] José Carlos Rosales and Pedro A. García-Sánchez.  Finitely generated commutative monoids.  Nova Science Publishers, Inc., Commack, NY, 1999.
  * [15] José Carlos Rosales and Pedro A. García-Sánchez.  Numerical semigroups, volume 20 of Developments in Mathematics.  Springer, New York, 2009.
  * [16] Keiichi Watanabe.  Some examples of one dimensional Gorenstein domains.  Nagoya Math. J., 49:101–109, 1973.