1 Introduction

In this paper we are concerned with studying the depth of affine semigroup rings \(\Bbbk [{\mathcal{S}}]\), with \({\mathcal{S}}\) a simplicial affine semigroup fully embedded in \({\mathbb {N}}^d\), i.e. subalgebras of the polynomial ring \(\Bbbk [t_1,\dots ,t_d]\) generated by the monomials with exponents in \({\mathcal{S}}\), where \(\Bbbk\) is a field. The semigroup ring \(\Bbbk [{\mathcal{S}}]\) is a d-dimensional ring with a unique monomial maximal ideal \({\mathfrak {m}}\). Affine semigroup rings behave as local rings whose maximal ideal is the irrelevant ideal \({\mathfrak {m}}\). Thus, we may define the depth of an affine semigroup ring as the maximum length of a regular sequence in the maximal ideal.

Thanks to the Auslander–Buchsbaum formula (see (1)), it is possible to relate depth to the projective dimension, producing an alternative definition of depth that we can say is the most widespread in the world of affine semigroups; and what is more important, giving rise to the study of the depth in terms of the last nonzero Betti numbers.

It is known that the last nonzero Betti numbers of affine semigroup rings have a strong relationship with certain Apéry sets (see, e.g. [8, 10]). Furthermore, it is also known that maximal depth, i.e. Cohen–Macaulyness, has a characterization in terms of Apéry sets when the affine semigroup giving rise to the semigroup ring structure is simplicial (see Proposition 3.5 due to Rosales and García-Sánchez [15, Proposition 1.6]). Finally, although not explicitly, connections between Betti numbers, Apéry sets and depth are also established in [3].

For convenience, we will assume that each affine semigroup considered is simplicial. In this framework, we provide a new characterization of simplicial affine semigroups with depth two, and dimension three or four, in terms of Apéry sets (see Theorems 5.2 and 6.4).

The paper is organized as follows: after a preliminary section in which we lay the groundwork for most of the notations and the basic results of the entire article, in Sect. 3 we recall the notion of Apéry sets of an affine semigroup with respect to a subset of elements of the semigroup and we show that these sets may be effectively computed using Gröbner bases. Next, we establish a couple of well-known results relating depth and the Apéry sets (Propositions 3.4 and 3.5), that characterize cases of extreme depth. In Proposition 3.8, we give a necessary and sufficient condition for the Apéry set of a simplicial affine semigroup with respect to a subset of extremal rays to have a maximal element with respect to the partial order determined by the semigroup (Proposition 3.8).

In Sect. 4 we show the combinatorial characterization of the Betti numbers graded by an affine semigroup (Lemma 4.3 and Proposition 4.4) that will be fundamental in Sect. 5 and to a lesser extent in Sect. 6. Now, in Sect. 5, we give a necessary and sufficient condition for a simplicial affine subsemigroup of \({\mathbb {N}}^3\) to have depth two (Theorem 5.2). Notice that this completes all possible depth cases for dimension three, since depth one and depth three are already characterized. In Sect. 6, we use Koszul’s complexes to characterize depth two in dimension four (Theorem 6.4) and we provide a combinatorial interpretation of our result in terms of the simplicial complexes introduced in Sect. 4 (Proposition 6.6).

We end the paper with Conjecture 6.7 which claims that if the depth of a simplicial affine semigroup is two, then there exists a subset of extremal rays of cardinality two with respect to which the corresponding Apéry set has a maximal element. Our conjecture is optimistically motivated by the cases of extreme depth (Proposition 3.4 and Proposition 3.5) and the results obtained in Sects. 5 and 6 where it is shown to be true for \(d \le 4\). We end the paper by discussing why the conjecture cannot be extended to higher depths, in general.

2 Generalities and notation

Throughout this paper \({\mathcal{S}}\) denotes a simplicial affine semigroup with (fixed) minimal generating set \({\mathcal{A}}:= \{{{\textbf{a}}}_1,\dots ,{{\textbf{a}}}_e\} \subset {\mathbb {N}}^d\). Without loss of generality, we suppose that \({\text {rank}} {\mathbb {Z}} \mathcal A = d\), where \({\mathbb {Z}}{\mathcal{A}} = \sum _{i=1}^e {\mathbb {Z}} {{\textbf{a}}}_i\) is the subgroup of \({\mathbb {Z}}^d\) generated by \({\mathcal{A}}\).

Recall that the fact \({\mathcal{S}}\) is simplicial means that the rational cone

$$\begin{aligned}{\text {pos}}({\mathcal{A}}):= \left\{ \sum _{i=1}^e q_i {{\textbf{a}}}_i \mid q_i \in {\mathbb {Q}}_{\ge 0},\ i = 1, \ldots , e \right\} \subset {\mathbb {Q}}^d\end{aligned}$$

has d minimal generators also called extremal rays. Without loss of generality, from now on we suppose that \(E:=\{{{\textbf{a}}}_1, \ldots , {{\textbf{a}}}_d\}\) is \({\mathbb {Q}}\)-linearly independent, generates \({\text {pos}}({\mathcal{A}})\) and \({{\textbf{a}}}_i,\ i = 1, \ldots , d\), is the component-wise smallest vector of \({\mathcal{A}}\) in the corresponding extremal ray.

Let \(\Bbbk [{\textbf{x}}] = \Bbbk [x_1, \ldots , x_e]\) be the polynomial ring in e indeterminates over an arbitrary field \(\Bbbk\) and let

$$\begin{aligned}\Bbbk [{\mathcal{S}}] = \bigoplus _{{{\textbf{a}}}\in {\mathcal{S}}} \Bbbk \{{\textbf{t}}^{{{\textbf{a}}}}\}\end{aligned}$$

be the affine semigroup ring of \({\mathcal{S}}\).

The ring \(\Bbbk [{\textbf{x}}]\) has a natural \({\mathcal{S}}\)-graded structure given by assigning degree \({{\textbf{a}}}_i\) to \(x_i,\ i = 1, \ldots , e\); indeed,

$$\begin{aligned} \Bbbk [{\textbf{x}}] = \bigoplus _{{{\textbf{a}}}\in {\mathcal{S}}} \Bbbk [{\textbf{x}}]_{{\textbf{a}}}, \end{aligned}$$

where \(\Bbbk [{\textbf{x}}]_{{\textbf{a}}}\) denotes the \(\Bbbk\)-vector space generated by the monomials \({\textbf{x}}^{{\textbf{u}}}:= x_1^{u_1} \cdots x_e^{u_e}\) such that \(\sum _{i=1}^e u_i {{\textbf{a}}}_i = {{\textbf{a}}}\), and \(\Bbbk [{\textbf{x}}]_{{\textbf{a}}}\cdot \Bbbk [{\textbf{x}}]_{{{\textbf{a}}}'} = \Bbbk [{\textbf{x}}]_{{{\textbf{a}}}+{{\textbf{a}}}'}\). The surjective \({\mathcal{S}}\)-graded ring homomorphism

$$\begin{aligned}\varphi _0: \Bbbk [{\textbf{x}}] \longrightarrow \Bbbk [{\mathcal{S}}]; x_i \mapsto {\textbf{t}}^{{{\textbf{a}}}_i}\end{aligned}$$

endows \(\Bbbk [{\mathcal{S}}]\) with a structure of \({\mathcal{S}}\)-graded \(\Bbbk [{\textbf{x}}]\)-module. The kernel of \(\varphi _0\), denoted \(I_{\mathcal{A}}\), is the toric ideal of \({\mathcal{S}}\); clearly \(\Bbbk [{\mathcal{S}}] \cong \Bbbk [\textbf{x}]/I_{\mathcal{A}}\). Thus, minimal generating systems of \(I_\mathcal A\) gives rise to minimal representations of \(\Bbbk [{\mathcal{S}}]\) as \(\Bbbk [{\textbf{x}}]\)-module. Indeed, if \(M_{{\mathcal{A}}}:= \{f_1, \ldots , f_{\beta _1}\}\) is a minimal system of generators of \(I_{{\mathcal{A}}}\), then

$$\begin{aligned}\Bbbk [{\textbf{x}}]^{\beta _1} {\mathop {\longrightarrow }\limits ^{\varphi _1}} \Bbbk [{\textbf{x}}] {\mathop {\longrightarrow }\limits ^{\varphi _0}} \Bbbk [{\mathcal{S}}] \rightarrow 0\end{aligned}$$

is an exact sequence, where \(\varphi _1\) is the homomorphism of \(\Bbbk [{\textbf{x}}]\)-modules whose matrix with respect to the corresponding standard bases is \((f_1, \ldots , f_{\beta _1})\). Since \(I_{{\mathcal{A}}}\) is \({\mathcal{S}}\)-homogeneous (equivalently, a binomial ideal, see e.g. [12, Theorem 1]), then \(\varphi _1\) is also \({\mathcal{S}}\)-graded.

Now, if \(\ker \varphi _1 \ne 0\), we can consider a minimal system of \({\mathcal{S}}\)-graded generators of \(\ker \varphi _1\), proceed as above defining a \({\mathcal{S}}\)-graded homomorphism of \(\Bbbk [\textbf{x}]\)-modules \(\varphi _2\) and so on. By the Hilbert Syzygy Theorem, this process cannot continue indefinitely, giving rise to the \({\mathcal{S}}\)-graded minimal free resolution of \(\Bbbk [{\mathcal{S}}]\):

$$\begin{aligned}0 \rightarrow \Bbbk [{\textbf{x}}]^{\beta _p} {\mathop {\longrightarrow }\limits ^{\varphi _{p}}} \cdots {\mathop {\longrightarrow }\limits ^{\varphi _{2}}} \Bbbk [{\textbf{x}}]^{\beta _1} {\mathop {\longrightarrow }\limits ^{\varphi _1}} \Bbbk [{\textbf{x}}] {\mathop {\longrightarrow }\limits ^{\varphi _0}} \Bbbk [{\mathcal{S}}] \rightarrow 0.\end{aligned}$$

For \({{\textbf{b}}}\in {\mathcal{S}},\) we write \(\beta _{i, {{\textbf{b}}}}\) for the number of minimal generators of \(\ker \varphi _i\) of \({\mathcal{S}}\)-degree \({{\textbf{b}}}\). Of course, \(\beta _{i,{{\textbf{b}}}}\) may be 0. Here it is convenient to recall that \(\beta _{i, {{\textbf{b}}}} = \dim _{\Bbbk } {\text {Tor}}_i^{\Bbbk [{\textbf{x}}]}(\Bbbk , \Bbbk [{\mathcal{S}}])_{{\textbf{b}}}\) (see, e.g. [13, Lemma 1.32]) is an invariant of \(\Bbbk [{\mathcal{S}}]\) for every \(i > 0\) and \({{\textbf{b}}}\in {\mathcal{S}}\). The integer number \(\beta _{i,{{\textbf{b}}}}\) is called the i-th Betti number of \(\Bbbk [{\mathcal{S}}]\) in degree \({{\textbf{b}}}\) and \(\beta _i = \sum _{{{\textbf{b}}}\in {\mathcal{S}}} \beta _{i, {{\textbf{b}}}}\) is called the i-th (total) Betti number of \(\Bbbk [{\mathcal{S}}]\). Clearly, \(\Bbbk [{{\textbf{x}}}]^{\beta _i} = \bigoplus _{{{\textbf{b}}}\in {\mathcal{S}}} \Bbbk [{{\textbf{x}}}]^{\beta _{i,{{\textbf{b}}}}}\), for every \(i = 1, \ldots , p\).

Notice that there are finitely many nonzero Betti numbers. The elements \({{\textbf{b}}}\in {\mathcal{S}}\) such that \(\beta _{1,{{\textbf{b}}}} \ne 0\) are called in literature Betti elements and the set of Betti elements of \({\mathcal{S}}\) is usually denoted by \({\text {Betti}}({\mathcal{S}})\) (see, [9] for more details).

The maximum i such that \(\beta _i \ne 0\) is called the projective dimension of \(\Bbbk [{\mathcal{S}}]\), denoted \({\text {pd}}_{\Bbbk [{\textbf{x}}]}(\Bbbk [{\mathcal{S}}])\). By the Auslander–Buchsbaum formula (see, e.g. [2, Theorem 1.3.3]), one has

$$\begin{aligned} {\text {depth}}(\Bbbk [{\mathcal{S}}]) = e - {\text {pd}}_{\Bbbk [{\textbf{x}}]}(\Bbbk [{\mathcal{S}}]). \end{aligned}$$
(1)

Recall that when \({\text {depth}}(\Bbbk [{\mathcal{S}}])=d\) (equivalently, \({\text {pd}}_{\Bbbk [\textbf{x}]}(\Bbbk [{\mathcal{S}}])={\text {codim}}(\Bbbk [{\mathcal{S}}]) = e-d\)), then \(\Bbbk [{\mathcal{S}}]\) is Cohen–Macaulay. We extend this terminology to \({\mathcal{S}}\), by saying that \({\mathcal{S}}\) is Cohen–Macaulay when \(\Bbbk [{\mathcal{S}}]\) is.

3 Apéry sets and depth

The Apéry set of an element \({{\textbf{b}}}\in {\mathcal{S}}\) is defined as

$$\begin{aligned}{\text {Ap}}({\mathcal{S}},{{\textbf{b}}}):= \{{{\textbf{a}}}\in {\mathcal{S}} \ \mid \ {{\textbf{a}}}-{{\textbf{b}}}\notin {\mathcal{S}} \}.\end{aligned}$$

Since \({\mathcal{S}} \subset {\mathbb {N}}^d\), for \({{\textbf{b}}}\ne {\textbf{0}}\) we have \({\textbf{0}} \in {\text {Ap}}({\mathcal{S}},{{\textbf{b}}})\). For a finite subset \({\mathcal{B}}\) of \({\mathcal{S}}\), we define

$$\begin{aligned} {\text {Ap}}({\mathcal{S}}, {\mathcal{B}}):=\{{{\textbf{a}}}\in {\mathcal{S}} \; \ {{\textbf{a}}}-{{\textbf{b}}}\notin {\mathcal{S}}, \text { for all } {{\textbf{b}}}\in {\mathcal{B}}\} = \bigcap _{{{\textbf{b}}}\in {\mathcal{B}}} {\text {Ap}}({\mathcal{S}}, {{\textbf{b}}}). \end{aligned}$$

It is known that \({\text {Ap}}({\mathcal{S}}, {\mathcal{B}})\) is finite if and only if \({\text {pos}}({\mathcal{A}}) = {\text {pos}}({\mathcal{B}})\) (see, e.g. [1, Theorem 2.6]). In particular, \({\text {Ap}}({\mathcal{S}}, E) = \cap _{i=1}^d {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\) is a finite set.

Given \(\delta \subseteq \{1, \ldots , d\}\) and a monomial order \(\prec\) on \(\Bbbk [{\textbf{x}}]\), set

$$\begin{aligned} Q:= \left\{ {\textbf{x}}^{\textbf{u}} \in \Bbbk [\{x_i\}_{i \not \in \delta }] \right\} \setminus {\text {in}}_\prec (I_{\mathcal{A}} + \langle \{x_i\}_{i \in \delta } \rangle ). \end{aligned}$$

The following result is a generalization of [14, Theorem 3.3], which can also be deduced from [1, Theorem 2.1].

Proposition 3.1

With the above notation, the map

$$\begin{aligned} Q \longrightarrow \bigcap _{i \in \delta } {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i);\quad {\textbf{x}}^{\textbf{u}} \longmapsto \sum _{i\not \in \delta } u_i {{\textbf{a}}}_i \end{aligned}$$

is a bijection.

Proof

Let us prove that the map is a well-defined bijection. If \({\textbf{x}}^{\textbf{u}} \in Q\), then \({\textbf{q}} = \sum _{i \not \in \delta } u_i {{\textbf{a}}}_i \in \bigcap _{i \in \delta } {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\); otherwise, there exists \(j \in \delta\) such that \({\textbf{q}}-{{\textbf{a}}}_j = \sum _{i=1}^e v_i {{\textbf{a}}}_i \in {\mathcal{S}}\). So, \({\textbf{x}}^{\textbf{u}} - x_j {\textbf{x}}^{\textbf{v}} \in I_{{\mathcal{A}}}\) and, consequently, \({\textbf{x}}^{\textbf{u}} \in {\text {in}}_\prec (I_{{\mathcal{A}}} + \langle \{x_i\}_{i \in \delta } \rangle )\), a contradiction. Moreover, if there exists \({\textbf{x}}^{\textbf{w}} \in Q\) with \({\textbf{q}} = \sum _{i \not \in \delta } w_i {{\textbf{a}}}_i\), then \({\textbf{x}}^{\textbf{u}} - {\textbf{x}}^{\textbf{w}} \in I_{\mathcal{A}}\). So, either \({\textbf{x}}^{\textbf{u}}\) or \({\textbf{x}}^{\textbf{w}}\) lie in \({\text {in}}_\prec (I_{{\mathcal{A}}} + \langle \{x_i\}_{i \in \delta } \rangle )\) which is not possible by hypothesis. Thus, the map is injective. Finally, if \({\textbf{q}} \in \bigcap _{i \in \delta } {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\), then \({\textbf{q}} = \sum _{i \not \in \delta } v_i {{\textbf{a}}}_i\) for some \(v_i \in {\mathbb {N}},\ i \not \in \delta\). Now, if \({\textbf{x}}^{\textbf{u}}\) is the remainder of the division of \({\textbf{x}}^{\textbf{v}}\) by \(I_{{\mathcal{A}}} + \langle \{x_i\}_{i \in \delta } \rangle\), then \({\textbf{x}}^{\textbf{u}} \in Q\) with \(\sum _{i \not \in \delta } u_i {{\textbf{a}}}_i = {\textbf{q}}\). \(\square\)

Notation 3.2

Let \(\preceq _{{\mathcal{S}}}\) be the partial order on \({\mathcal{S}}\) given by \({{\textbf{a}}}\preceq _{{\mathcal{S}}} {{\textbf{a}}}'\) if and only if \({{\textbf{a}}}'-{{\textbf{a}}}\in {\mathcal{S}}\). Notice that \({\textbf{0}} \in {\mathbb {N}}^d\) is the only minimal element of \({\mathcal{S}}\) for \(\preceq _{{\mathcal{S}}}\). Moreover, if \({{\textbf{a}}}' \in {\text {Ap}}({\mathcal{S}}, {\mathcal{B}})\) and \({{\textbf{a}}}\in {\mathcal{S}}\) is such that \({{\textbf{a}}}\preceq _{\mathcal{S}} {{\textbf{a}}}'\), then \({{\textbf{a}}}\in {\text {Ap}}({\mathcal{S}}, {\mathcal{B}})\).

Corollary 3.3

With the above notation, \({\textbf{x}}^{{\textbf{u}}} \in Q\) divides \({\textbf{x}}^{{\textbf{v}}} \in Q\) if and only if \(\sum _{i \not \in \delta } v_i a_i \in \bigcap _{i \in \delta } {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\) and \(\sum _{i \not \in \delta } u_i a_i \preceq _{\mathcal{S}} \sum _{i \not \in \delta } v_i a_i\); in particular, \(\sum _{i \not \in \delta } u_i a_i \in \bigcap _{i \in \delta } {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\).

Proof

If \({\textbf{x}}^{{\textbf{u}}} \in Q\) divides \({\textbf{x}}^{{\textbf{v}}} \in Q\), then \({\textbf{x}}^{{\textbf{v}}} = {\textbf{x}}^{{\textbf{w}}} {\textbf{x}}^{{\textbf{u}}}\) for some \({\textbf{x}}^{\textbf{w}} \in \Bbbk [\{x_i\}_{i \not \in \delta }]\). If \({\textbf{x}}^{{\textbf{w}}} \in {\text {in}}_\prec (I_{\mathcal{A}} + \langle \{x_i\}_{i \in \delta } \rangle )\) then \({\textbf{x}}^{{\textbf{v}}} \not \in Q\), in contradiction to the hypothesis. So \({\textbf{x}}^{{\textbf{w}}} \in Q\) and, by Proposition 3.1, we have that \(\sum _{i \not \in \delta } v_i a_i \in \bigcap _{i \in \delta } {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\) and \(\sum _{i \not \in \delta } v_i a_i - \sum _{i \not \in \delta } u_i a_i = \sum _{i \not \in \delta } w_i a_i \in \bigcap _{i \in \delta } {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i) \subset {\mathcal{S}}\), that is, \(\sum _{i \not \in \delta } u_i a_i \preceq _{\mathcal{S}} \sum _{i \not \in \delta } v_i a_i\).

Conversely, if \(\sum _{i \not \in \delta } v_i a_i \in \bigcap _{i \in \delta } {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\) and \(\sum _{i \not \in \delta } u_i a_i \preceq _{\mathcal{S}} \sum _{i \not \in \delta } v_i a_i\), then \(\sum _{i\not \in \delta } v_i {{\textbf{a}}}_i - \sum _{i\not \in \delta } u_i {{\textbf{a}}}_i\) \(= \sum _{i=1}^e w_i {{\textbf{a}}}_i \in {\mathcal{S}}\). If \(\sum _{i=1}^e w_i {{\textbf{a}}}_i \not \in \bigcap _{i \in \delta } {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i),\) then there exists \(j \in \delta\) such that \(\sum _{i=1}^e w_i {{\textbf{a}}}_i - {{\textbf{a}}}_j \in {\mathcal{S}}\) and consequently, \(\sum _{i\not \in \delta } v_i {{\textbf{a}}}_i - {{\textbf{a}}}_j = \sum _{i\not \in \delta } u_i {{\textbf{a}}}_i + \sum _{i=1}^e w_i {{\textbf{a}}}_i - {{\textbf{a}}}_j \in {\mathcal{S}}\), that is, \(\sum _{i\not \in \delta } v_i {{\textbf{a}}}_i \not \in \bigcap _{i \in \delta } {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i),\) in contradiction to the hypothesis. Arguing analogously, we have that \(\sum _{i\not \in \delta } u_i {{\textbf{a}}}_i \in \bigcap _{i \in \delta } {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\). Therefore, by Proposition 3.1, \({\textbf{x}}^{{\textbf{u}}} \in Q\) divides \({\textbf{x}}^{{\textbf{v}}} \in Q\). \(\square\)

The following characterization of \(\Bbbk [{\mathcal{S}}]\) to have depth one is a consequence of [8, Theorem 6 and Proposition 16].

Proposition 3.4

The ring \(\Bbbk [{\mathcal{S}}]\) has depth one if and only if \({\text {Ap}}({\mathcal{S}},{{\textbf{b}}})\) has a maximal element with respect to \(\preceq _{\mathcal{S}}\) for some (equivalently all) \({{\textbf{b}}}\in {\mathcal{S}}\).

Note that, by Corollary 3.3 and Proposition 3.4, \({\text {depth}}(\Bbbk [{\mathcal{S}}])=1\) if and only if the corresponding set Q has a maximal element for the partial order given by divisibility of monomials of \(\Bbbk [\textbf{x}]\).

The case of \(\Bbbk [{\mathcal{S}}]\) having (maximal) depth d, that is, \({\mathcal{S}}\) is Cohen–Macaulay, is also characterized in terms of the Apéry sets.

Proposition 3.5

[15, Corollary 1.6]. The semigroup \({\mathcal{S}}\) is Cohen–Macaulay if and only if for all \({{\textbf{a}}}, {{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}}, E)\) such that \({{\textbf{b}}}- {{\textbf{a}}}\in \sum _{i=1}^d {\mathbb {Z}} {{\textbf{a}}}_i\) we have \({{\textbf{a}}}= {{\textbf{b}}}\).

Let us show other connections of Apéry sets with the depth of the semigroup ring that are valid beyond extreme cases of depth.

Proposition 3.6

Let \(e \ge 3\) and \(i \ne j\), the monomial \(x_j\) is a zero-divisor of \(\Bbbk [{\textbf{x}}]/(I_{{\mathcal{A}}}+\langle x_i \rangle )\) if and only if there exists \({{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i)\) such that \({{\textbf{a}}}_j + {{\textbf{b}}}\not \in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i)\). In this case, \({\text {depth}}(\Bbbk [{\mathcal{S}}]) > 1\).

Proof

By [6, Proposition 1.10], the indeterminate \(x_j\) is a zero-divisor of \(\Bbbk [{\textbf{x}}]/(I_{{\mathcal{A}}}+\langle x_i \rangle )\) if and only if there exists \({\textbf{x}}^{\textbf{u}} \not \in I_{{\mathcal{A}}}+\langle x_i \rangle\) such that \(x_j {\textbf{x}}^{\textbf{u}} \in I_{{\mathcal{A}}}+\langle x_i \rangle\). Clearly, \({\textbf{x}}^{\textbf{u}} \not \in I_{{\mathcal{A}}}+\langle x_i \rangle\) if and only if \({{\textbf{b}}}= \sum _{k=1}^e u_k {{\textbf{a}}}_k \in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\). Moreover, \({{\textbf{b}}}+ {{\textbf{a}}}_j \not \in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\) if and only if there exists \({{\textbf{b}}}' \in {\mathcal{S}}\) such that \({{\textbf{b}}}+ {{\textbf{a}}}_j = {{\textbf{b}}}' + {{\textbf{a}}}_i\). Equivalently, \(x_j {{\textbf{x}}}^{{\textbf{u}}}\in I_{{\mathcal{A}}} + \langle x_i \rangle\); that is, \(x_j\) is a zero-divisor of \(\Bbbk [{\textbf{x}}]/(I_{\mathcal A}+\langle x_i \rangle )\) and we are done. \(\square\)

Observe that if \((x_i,x_j)\) is a regular sequence on \(\Bbbk [{{\textbf{x}}}]/I_{{\mathcal{A}}}\) then \({{\textbf{a}}}_j + {{\textbf{b}}}\not \in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i)\) for every \({{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i)\); in particular, \({\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i)\) does not have a maximal element with respect to \(\preceq _{\mathcal{S}}\), as expected by Proposition 3.4.

Corollary 3.7

Let \(d \ge 2\) and \(1 \le i < j \le d\). The following statements are equivalent.

  1. (1)

    \((x_i,x_j)\) is a regular sequence on \(\Bbbk [{{\textbf{x}}}]/I_{{\mathcal{A}}}\).

  2. (2)

    For \({{\textbf{b}}}_1,{{\textbf{b}}}_2\in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\), if \({{\textbf{b}}}_1 - {{\textbf{b}}}_2 \in {\mathbb {Z}}{{\textbf{a}}}_i + {\mathbb {Z}}{{\textbf{a}}}_j\), then \({{\textbf{b}}}_1 = {{\textbf{b}}}_2\).

Proof

Suppose that \((x_i,x_j)\) is a regular sequence on \(\Bbbk [{{\textbf{x}}}]/I_{{\mathcal{A}}}\) and let \({{\textbf{b}}}_1, {{\textbf{b}}}_2\in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\) such that \({{\textbf{b}}}_1 = {{\textbf{b}}}_2 + z_1 {{\textbf{a}}}_i + z_2{{\textbf{a}}}_j,\) for some \(z_1, z_2 \in {\mathbb {Z}}\). Clearly, \(z_1 z_2 \le 0\); so, without loss of generality, suppose \(z_1 \le 0\) and \(z_2 \ge 0\), so that \({{\textbf{b}}}_1 + (-z_1) {{\textbf{a}}}_i = {{\textbf{b}}}_2 + z_2 {{\textbf{a}}}_j\). Now, since, by Proposition 3.6, \({{\textbf{b}}}_1 + u {{\textbf{a}}}_i \in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_j)\) and \({{\textbf{b}}}_2 + v {{\textbf{a}}}_j \in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i)\) for every \(u, v \in {\mathbb {N}}\), we conclude that \(z_1 = z_2 = 0\).

Conversely, suppose that (2) holds and let us see that \((x_i,x_j)\) is a regular sequence on \(\Bbbk [{{\textbf{x}}}]/I_{{\mathcal{A}}}\). Since \(x_i\) is a nonzero-divisor of \(\Bbbk [{{\textbf{x}}}]/I_{{\mathcal{A}}}\), it suffices to prove that \(x_j\) is is a nonzero-divisor of \(\Bbbk [{{\textbf{x}}}]/(I_{\mathcal A} + \langle x_i \rangle )\). Let \({{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\), if \({{\textbf{b}}}+ {{\textbf{a}}}_j \not \in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\), then there exists \({{\textbf{b}}}' \in {\mathcal{S}}\) such that \({{\textbf{b}}}+ {{\textbf{a}}}_j = {{\textbf{b}}}' + {{\textbf{a}}}_i\). Let \(u, v, w \in {\mathbb {N}}\) be the smallest non-negative integers such that \({{\textbf{c}}}= {{\textbf{b}}}- u {{\textbf{a}}}_j \in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\) and \({{\textbf{c}}}' = {{\textbf{b}}}' - v {{\textbf{a}}}_i - w {{\textbf{a}}}_j \in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i) \cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\). Clearly, \({{\textbf{c}}}\in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\) and \({{\textbf{c}}}- {{\textbf{c}}}' = (v+1) {{\textbf{a}}}_i + (w - (u+1)) {{\textbf{a}}}_j\). So, by hypothesis, \({{\textbf{c}}}= {{\textbf{c}}}'\) and consequently \((v+1) {{\textbf{a}}}_i = ((u+1)-w) {{\textbf{a}}}_j\) which is not possible because \({{\textbf{a}}}_i, {{\textbf{a}}}_j \in E\) and elements of E are supposed to be \({\mathbb {Q}}\)-linearly independent. \(\square\)

Notice that for \(d=2\) the above result is nothing but Proposition 3.5.

We end this section with a characterization of the existence of a maximal element in certain Apéry sets that will be very useful later on.

Proposition 3.8

Let \(E' \subset E\). The following statements are equivalent.

  1. (1)

    \({\text {Ap}}({\mathcal{S}},E')\) has a maximal element with respect to \(\preceq _{{\mathcal{S}}}\).

  2. (2)

    There exists \({{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}},E')\) such that \({{\textbf{b}}}+{{\textbf{a}}}_i \notin {\text {Ap}}({\mathcal{S}},E')\) for every \(i \in E{\setminus } E'\).

Proof

The statement (1) clearly implies (2). Conversely, let \({{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}}, E')\) such that \({{\textbf{b}}}+{{\textbf{a}}}\notin {\text {Ap}}({\mathcal{S}}, E')\) for every \({{\textbf{a}}}\in E {\setminus } E'\). In particular, \({{\textbf{b}}}+{{\textbf{c}}}\notin {\text {Ap}}({\mathcal{S}}, E')\) for every \({{\textbf{c}}}\in {\mathcal{S}}{\setminus } {\text {Ap}}({\mathcal{S}}, E)\). Indeed, if \({{\textbf{c}}}\in {\mathcal{S}}\setminus {\text {Ap}}({\mathcal{S}}, E)\), then \({{\textbf{c}}}-{{\textbf{a}}}\in {\mathcal{S}}\) for some \({{\textbf{a}}}\in E\), that is, \({{\textbf{c}}}= {{\textbf{a}}}+ {{\textbf{c}}}'\) for some \({{\textbf{a}}}\in E\) and \({{\textbf{c}}}' \in {\mathcal{S}}\). Now, on the one hand, if \({{\textbf{a}}}\in E {\setminus } E'\), then \({{\textbf{b}}}+ {{\textbf{c}}}= {{\textbf{b}}}+ {{\textbf{a}}}+ {{\textbf{c}}}' \not \in {\text {Ap}}({\mathcal{S}}, E')\), otherwise, \({{\textbf{b}}}+{{\textbf{a}}}\in {\text {Ap}}({\mathcal{S}}, E')\) by Corollary 3.3; and, on the other hand, if \({{\textbf{a}}}\in E'\), then \({{\textbf{b}}}+ {{\textbf{c}}}- {{\textbf{a}}}= {{\textbf{b}}}+ {{\textbf{c}}}' \in \mathcal{\mathcal{S}}\) and, consequently, \({{\textbf{b}}}+{{\textbf{c}}}\not \in {\text {Ap}}({\mathcal{S}}, E')\).

So, if \({{\textbf{b}}}+{{\textbf{c}}}\notin {\text {Ap}}({\mathcal{S}}, E')\) for all \({{\textbf{c}}}\in {\text {Ap}}({\mathcal{S}},E)\), we are done. Otherwise, \({{\textbf{b}}}+{{\textbf{c}}}_1\in {\text {Ap}}({\mathcal{S}},E')\) for some \({{\textbf{c}}}_1\in {\text {Ap}}({\mathcal{S}},E)\). Since \({{\textbf{b}}}+{{\textbf{c}}}_1+{{\textbf{a}}}\notin {\text {Ap}}({\mathcal{S}},E')\) for every \({{\textbf{a}}}\in E {\setminus } E'\), we may repeat the same argument with \({{\textbf{b}}}+{{\textbf{c}}}_1\) instead of \({{\textbf{b}}}\). So either \({{\textbf{b}}}+{{\textbf{c}}}_1\) is maximal or there exists \({{\textbf{c}}}_2\in {\text {Ap}}({\mathcal{S}},E)\) such that \({{\textbf{c}}}_1\preceq _{\mathcal{S}}{{\textbf{c}}}_2\), \({{\textbf{b}}}+{{\textbf{c}}}_2\in {\text {Ap}}({\mathcal{S}},E')\) and \({{\textbf{b}}}+{{\textbf{a}}}+{{\textbf{c}}}_2\notin {\text {Ap}}({\mathcal{S}},E')\) for every \({{\textbf{a}}}\in E {\setminus } E'\). Since \({\text {pos}}({\mathcal{A}}) = {\text {pos}}(E)\), then \({\text {Ap}}({\mathcal{S}},E)\) is finite (see, e.g., [1, Theorem 2.6]) and this process necessarily stops. Hence \({\text {Ap}}({\mathcal{S}},E')\) has a maximal element with respect to \(\preceq _{{\mathcal{S}}}\). \(\square\)

4 Beti numbers and depth

Let us start by recalling the combinatorial characterization of the Betti numbers of \(\Bbbk [{\mathcal{S}}]\), which will be very useful later on. For \({{\textbf{b}}}\in {\mathcal{S}}\) consider the simplicial complex

$$\begin{aligned} \Delta _{{\textbf{b}}}=\left\{ F\subseteq {\mathcal{A}} \ \mid \ {{\textbf{b}}}-\sum _{{{\textbf{a}}}\in F} {{\textbf{a}}}\in {\mathcal{S}}\right\} . \end{aligned}$$

The following result is [13, Theorem 9.2].

Proposition 4.1

The Betti number \(\beta _{i+1,{{\textbf{b}}}}\) of \(\Bbbk [{\mathcal{S}}]\) equals the dimension over \(\Bbbk\) of the i-th reduced homology group \({\widetilde{H}}_i(\Delta _{{\textbf{b}}}; \Bbbk )\), for every \(i \ge 0\) and \({{\textbf{b}}}\in {\mathcal{S}}\).

Thus,

$$\begin{aligned} {\text {depth}}(\Bbbk [{\mathcal{S}}])&= e - \max \{i \mid \beta _{i, {{\textbf{b}}}} \ne 0,\ \text {for some}\ {{\textbf{b}}}\in {\mathcal{S}}\}\\ {}&= e - \max \{i \mid \dim ({\widetilde{H}}_{i-1}(\Delta _{{\textbf{b}}}; \Bbbk )) \ne 0,\ \text {for some}\ {{\textbf{b}}}\in {\mathcal{S}}\}. \end{aligned}$$

Consider now the simplicial complex

$$\begin{aligned} T_{{\textbf{b}}}=\left\{ F\subseteq E \ \mid \ {{\textbf{b}}}-\sum _{{{\textbf{a}}}\in F} {{\textbf{a}}}\in {\mathcal{S}}\right\} . \end{aligned}$$

Let \(D(j)=\{{{\textbf{b}}}\in {\mathcal{S}}\ \mid \ {\widetilde{H}}_j(T_{{\textbf{b}}})\ne 0\}\) and

$$\begin{aligned} C_i=\left\{ {{\textbf{b}}}\in {\mathcal{S}} \ \mid \ {{\textbf{b}}}- \sum _{{{\textbf{a}}}\in F} {{\textbf{a}}}\in D(j),\ \text {for some}\ j\ge -1 \text { and } F\subseteq {\mathcal{A}} \setminus E\ \text {with}\ \#F=i-j\right\} . \end{aligned}$$

The following result is a reformulation of [3, Proposition 3.3] and provides a sufficient condition for \(\Bbbk [{\mathcal{S}}]\) to have a nonzero \((i+1)\)-th Betti number in degree \({{\textbf{b}}}\).

Proposition 4.2

If \(\beta _{i+1,{{\textbf{b}}}} \ne 0\), then \({{\textbf{b}}}\in C_i\).

Notice that, if \(C_k = \varnothing\), then \({\text {pd}}_{\Bbbk [{\textbf{x}}]}(\Bbbk [{\mathcal{S}}]) \le k\) and, consequently, \({\text {depth}}(\Bbbk [{\mathcal{S}}]) \ge e - k\).

Let us now characterize the elements in D(0) in terms of Apéry sets.

Lemma 4.3

Let \({{\textbf{b}}}\in {\mathcal{S}}\). Then \({{\textbf{b}}}\in D(0)\) if and only if there exists \(E' \subset E\) such that \({{\textbf{b}}}\not \in {\text {Ap}}({\mathcal{S}}, E')\) and \({{\textbf{b}}}- \sum _{{{\textbf{a}}}\in E {\setminus } E'} {{\textbf{a}}}\in {\text {Ap}}({\mathcal{S}}, E')\).

Proof

Since \(D(0) = \{{{\textbf{b}}}\in {\mathcal{S}}\ \mid \ {\widetilde{H}}_0(T_{{\textbf{b}}}) \ne 0\}\) and the dimension of \({\widetilde{H}}_0(T_{{\textbf{b}}})\) as a \(\Bbbk\)-vector space is one less than the number of connected components of \(T_{{\textbf{b}}}\), we have that \(D(0) \ne 0\) precisely when \(T_{{\textbf{b}}}\) is not connected. Let \(E_1, \ldots , E_k\) be the set of vertices of the connected components of \(T_{{\textbf{b}}}\). Then \(k \ge 2\) and

$$\begin{aligned} {{\textbf{b}}}= {{\textbf{b}}}_1 + \sum _{{{\textbf{a}}}\in E_1} {{\textbf{a}}}= \cdots = {{\textbf{b}}}_k + \sum _{{{\textbf{a}}}\in E_k} {{\textbf{a}}}, \end{aligned}$$

with \({{\textbf{b}}}_j \in {\text {Ap}}({\mathcal{S}}, E_i)\) for each \(j \ne i\) and \(i = 1, \ldots , k\). Thus, taking \(E' = E {\setminus } E_i\) for some \(i \in \{1, \ldots , k\}\) we get the direct implication.

Conversely, if there exists a subset \(E' \subset E\) such that \({{\textbf{b}}}\not \in {\text {Ap}}({\mathcal{S}},E')\) and \({{\textbf{b}}}- \sum _{{{\textbf{a}}}\in E {\setminus } E'} {{\textbf{a}}}\in {\text {Ap}}({\mathcal{S}}, E')\), then \(T_{{\textbf{b}}}\) has at least two connected components and we are done. \(\square\)

The Betti degrees appearing in the leftmost syzygy module of the \({\mathcal{S}}\)-graded minimal free resolution of \(\Bbbk [{\mathcal{S}}]\) (that is, the integers \(\beta _{e-{\text {depth}}(\Bbbk [{\mathcal{S}}]), {\textbf{b}}} \ne 0,\) for some \({\textbf{b}} \in {\mathcal{S}})\) are combinatorially described in the following result.

Proposition 4.4

Let \(q = {\text {depth}}(\Bbbk [{\mathcal{S}}])\). If \(\beta _{e-q,{{\textbf{b}}}}\ne 0\), then \({{\textbf{b}}}- \sum _{{{\textbf{a}}}\in {\mathcal{A}} {\setminus } E} {{\textbf{a}}}\in D(d-q-1)\). Moreover, if \({\text {depth}}(\Bbbk [{\mathcal{S}}]) = d-1\), then there exists a subset \(E' \subset E\) such that

$$\begin{aligned} {{\textbf{b}}}- \sum _{{{\textbf{a}}}\in {\mathcal{A}} \setminus E'} {{\textbf{a}}}\in {\text {Ap}}({\mathcal{S}}, E')\quad \text {and}\quad {{\textbf{b}}}- \sum _{{{\textbf{a}}}\in {\mathcal{A}} \setminus E} {{\textbf{a}}}\notin {\text {Ap}}({\mathcal{S}}, E'). \end{aligned}$$

Proof

By Proposition 4.2, \({{\textbf{b}}}={{\textbf{b}}}'+\sum _{{{\textbf{a}}}\in F} {{\textbf{a}}}\), where \({{\textbf{b}}}' \in D(j)\) for some \(j\ge -1\) and \(F \subseteq \{d+1, \ldots , e\}\) with \(e-q-1-j\#F \le e-d\); in particular, \(d-q-1 \le j\). Since \({\text {depth}}(\Bbbk [{\mathcal{S}}])=q\), by [3, Theorem 4.1], \(D(j)=\varnothing\) for \(j\ge e-q\). Therefore, \(j=d-q-1\) and \(F= {\mathcal{A}} {\setminus } E\).

Finally, if \({\text {depth}}(\Bbbk [{\mathcal{S}}]) = d-1\), by Lemma 4.3, there exists \(E' \subset E\) such that \({{\textbf{b}}}' \notin {\text {Ap}}({\mathcal{S}},E')\) and \({{\textbf{b}}}'- \sum _{{{\textbf{a}}}\in E {\setminus } E'} {{\textbf{a}}}\in {\text {Ap}}({\mathcal{S}},E')\). \(\square\)

The following result follows easily from the definition of D(j).

Corollary 4.5

Let \(q = {\text {depth}}(\Bbbk [{\mathcal{S}}])\). If \(\beta _{e-q,{{\textbf{b}}}}\ne 0\), then \({{\widetilde{H}}}_{d-q-1}(T_{{{\textbf{b}}}- \sum _{{{\textbf{a}}}\in {\mathcal{A}} {\setminus } E}}) \ne 0\). In particular, \(D(d-q-1) \ne \varnothing\).

As the following example shows, the converse of the above results is not true.

Example 4.6

Let \({\mathcal{A}} = \{{{\textbf{a}}}_1, {{\textbf{a}}}_2, {{\textbf{a}}}_3, {{\textbf{a}}}_4, {{\textbf{a}}}_5, {{\textbf{a}}}_6\} \subset {\mathbb {N}}^3\) be such that \({{\textbf{a}}}_i\) is the i-th column of the following matrix:

$$\begin{aligned} \left( \begin{array}{cccccc} 5 &{}\quad 4 &{}\quad 1 &{}\quad 8 &{}\quad 7 &{}\quad 3 \\ 3 &{}\quad 1 &{}\quad 5 &{}\quad 5 &{}\quad 4 &{}\quad 4 \\ 1 &{}\quad 7 &{}\quad 2 &{}\quad 6 &{}\quad 5 &{}\quad 2 \end{array} \right) . \end{aligned}$$

Using Singular [4], one can compute a minimal system of generators of \(I_{\mathcal{A}},\)

$$\begin{aligned}{} & {} \Big \{ x_2x_5x_6^5-x_3^2x_4^3, x_3x_5^6-x_4^5x_6, x_2x_4^2x_6^6-x_3^3x_5^5, x_1^5x_2^3x_3-x_4^3x_5^2, \\{} & {} \quad \quad x_1^5x_2^2x_3^3-x_5^3x_6^5, x_1^5x_2^3x_4^2x_6-x_5^8, x_2x_5^7x_6^4-x_3x_4^8, x_2^2x_6^{11}-x_3^5x_4x_5^4,\\{} & {} \quad \quad x_1^5x_2^4x_6^5-x_3x_4^6x_5, x_1^5x_2x_3^6x_5^2-x_4^2x_6^{11}, x_6^{16}-x_1^5x_3^8x_4x_5, x_1^5x_2^4x_5^5x_6^4-x_4^{11} \Big \}, \end{aligned}$$

and easily check both that \({\text {depth}}(\Bbbk [{\mathcal{S}}])=2\) and that \(\beta _{e-2} = \beta _4 = 6\). Moreover, one can compute the set B of elements \({{\textbf{b}}}\in {\mathcal{S}}\), such that \(\beta _{4,{{\textbf{b}}}} \ne 0\), namely,

$$\begin{aligned} B = \{&{{\textbf{b}}}_1=(79,80,63), {{\textbf{b}}}_2=(89,87,66), {{\textbf{b}}}_3=(82,72,62),\\&{{\textbf{b}}}_4=(91,78,69), {{\textbf{b}}}_5=(97,77,72), {{\textbf{b}}}_6=(106,72,80)\}. \end{aligned}$$

Let \(I_{13} = \langle x_1, x_3, x_2x_5x_6^5, x_5^3x_6^5, x_4^3x_5^2, x_2x_4^2x_6^6, x_2^2x_6^{11}, x_4^5x_6, x_6^{16}, x_4^2x_6^{11}, x_5^8, x_2x_5^7x_6^4, x_4^{11} \rangle\) be the initial ideal of \(I_{{\mathcal{A}}} + \langle x_1, x_3 \rangle\) with respect to the \({\mathcal{A}}\)-graded reverse lexicographical ordering \(\prec\) such that \(x_3 \prec x_2 \prec x_1 \prec x_6 \prec x_5 \prec x_4\).

Observe that \(x_4^2x_5^7x_6^4 \not \in I_{13}\) and \(x_4^2x_5^7x_6^4 x_i \in I_{13}\) for every \(i \in \{1, \ldots , 6\}\), so Corollary 3.3 implies that \({{\textbf{c}}}= 2 {{\textbf{a}}}_4 + 7 {{\textbf{a}}}_5 + 4 {{\textbf{a}}}_6 = (77,54,55) \in \max _{\preceq {\mathcal{S}}} {\text {Ap}}({\mathcal{S}}, \{{{\textbf{a}}}_1,{{\textbf{a}}}_3\})\); in particular, \({{\textbf{c}}}+ {{\textbf{a}}}_2 \not \in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_1) \cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_3)\). Moreover, using the GAP ( [7]) package numericalsgps ( [5]), one can check that \({{\textbf{c}}}+{{\textbf{a}}}_2\) has two factorizations, (0, 0, 1, 10, 0, 0) and (0, 1, 0, 2, 7, 4), so \({{\textbf{c}}}+{{\textbf{a}}}_2 \in D(0)\), as expected by Lemma 4.3. However, \({{\textbf{b}}}= {{\textbf{c}}}+ {{\textbf{a}}}_2 + \sum _{i=4}^6 {{\textbf{a}}}_i = (99,68,75) \not \in B\), that is, \(\beta _{4,{{\textbf{b}}}} = 0\).

In spite of this, one can check that there exists \({{\textbf{c}}}_i\in \max _{\preceq _{\mathcal{S}}}{\text {Ap}}({\mathcal{S}},\{{{\textbf{a}}}_1,{{\textbf{a}}}_2\})\) such that \({{\textbf{b}}}_i={{\textbf{c}}}_i+ {{\textbf{a}}}_3 + \sum ^6_{j=4}{{\textbf{a}}}_j,\) for each \(i \in \{1, \ldots ,6\}\). Concretely, in this case, \({{\textbf{c}}}_1 = (60,62,48), {{\textbf{c}}}_2 = (70,69,51), {{\textbf{c}}}_3 = (63,54,47), {{\textbf{c}}}_4 = (72,60,54),\) \({{\textbf{c}}}_5 = (78,59,57)\) and \({{\textbf{c}}}_6 = (87,54,65)\).

5 Depth two in three-dimensional case

Let \(d=3\). As before \({\mathcal{A}} = \{{{\textbf{a}}}_1, \ldots , {{\textbf{a}}}_e\}\) and now \(E = \{{{\textbf{a}}}_1, {{\textbf{a}}}_2, {{\textbf{a}}}_3\}\). In this case, the semigroup ring of \({\mathcal{S}}\) generated by \({\mathcal{A}}, \Bbbk [{\mathcal{S}}]\), has positive depth less than or equal to three. As mentioned in Sect. 3, the extreme cases, namely \({\text {depth}}(\Bbbk [{\mathcal{S}}])=1\) and \({\text {depth}}(\Bbbk [{\mathcal{S}}])=3\), are already characterized in terms of Apéry sets. Thus, in this section, we focus our attention on the case of depth two.

The following is Lemma 4.3 for \(d=3\).

Lemma 5.1

One has that \({{\textbf{b}}}\in D(0)\) if and only if \({{\textbf{b}}}\notin {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\) and \({{\textbf{b}}}-{{\textbf{a}}}_k\in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\), for some \(\{i,j,k\}=\{1,2,3\}\).

The following is a necessary and sufficient condition for \(\Bbbk [{\mathcal{S}}]\) to have depth two, when \(d = 3\).

Theorem 5.2

The ring \(\Bbbk [{\mathcal{S}}]\) has depth two if and only if \({\text {Ap}}({\mathcal{S}},{{\textbf{b}}})\) does not have a maximal element for some (equivalently all) \({{\textbf{b}}}\in {\mathcal{S}}\), and \({\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\) has a maximal element with respect to \(\preceq _{{\mathcal{S}}}\), for some \(1\le i<j\le 3\).

Proof

If \({\text {depth}}(\Bbbk [{\mathcal{S}}])=2\), then, by Proposition 3.4, \({\text {Ap}}({\mathcal{S}},{{\textbf{b}}})\) does not have a maximal element for some (equivalently all) \({{\textbf{b}}}\in {\mathcal{S}}\). Moreover, by [3, Theorem 4.1], there exists \({{\textbf{b}}}\in D(0)\). So, by Lemma 5.1, there exists a permutation \(\{i,j,k\}=\{1,2,3\}\) such that \({{\textbf{b}}}\notin {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\) and \({{\textbf{b}}}-{{\textbf{a}}}_k\in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\). Now, Proposition 3.8 implies that \({\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\) has a maximal element with respect to \(\preceq _{{\mathcal{S}}}\).

Conversely, if \({{\textbf{c}}}\in \max _{\preceq _{\mathcal{S}}}{\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\), then \({{\textbf{b}}}= {{\textbf{c}}}+{{\textbf{a}}}_k\notin {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\). By Lemma 5.1, \({{\textbf{b}}}\in D(0)\). Thus, \({\text {depth}}(\Bbbk [{\mathcal{S}}])\le 2\), by [3, Theorem 4.1]. Since, by Proposition 3.4, \({\text {depth}}(\Bbbk [{\textbf{x}}])>1\), we conclude that \({\text {depth}}(\Bbbk [{\mathcal{S}}])=2\). \(\square\)

The above result is not true for every choice \(1\le i<j\le 3\).

Example 5.3

Let \({\mathcal{A}} = \{{{\textbf{a}}}_1, {{\textbf{a}}}_2, {{\textbf{a}}}_3, {{\textbf{a}}}_4, {{\textbf{a}}}_5, {{\textbf{a}}}_6\} \subset {\mathbb {N}}^3\) be such that \({{\textbf{a}}}_i\) is the i-th column of the following matrix:

$$\begin{aligned} \left( \begin{array}{cccccc} 2 &{}\quad 0 &{}\quad 0 &{}\quad 9 &{}\quad 3 &{}\quad 7 \\ 0 &{}\quad 2 &{}\quad 0 &{}\quad 7 &{}\quad 9 &{}\quad 3 \\ 0 &{}\quad 0 &{}\quad 2 &{}\quad 3 &{}\quad 7 &{}\quad 5 \end{array} \right) . \end{aligned}$$

Using Singular [4], one can compute a minimal system of generators of \(I_{\mathcal{A}}\), \(\big \{ x_1x_2^2x_6-x_3x_4, x_2^3x_3x_6-x_1^2x_5, x_1^7x_2^3x_3^5-x_6^2, x_1^5x_2^6x_3^6-x_5x_6, x_1^8x_2^5x_3^4-x_4x_6, x_1^3x_2^9x_3^7-x_5^2, x_1^6x_2^8x_3^5-x_4x_5, x_1^9x_2^7x_3^3-x_4^2 \big \},\) and then easily check that \({\text {depth}}(\Bbbk [{\mathcal{S}}])=2\). Let \(1\le i<j\le 3\), considering Proposition 3.1, let us denote by \(I_{ij}\) the initial ideal of \(I_{{\mathcal{A}}} + \langle x_i, x_j \rangle\) with respect to the \({\mathcal{A}}\)-graded reverse lexicographical ordering \(\prec\) such that \(x_3 \prec x_2 \prec x_1 \prec x_6 \prec x_5 \prec x_4\). In this case, we have

$$\begin{aligned} I_{12} = \langle x_1,x_2,x_3x_4\rangle + \langle x_4,x_5,x_6 \rangle ^2, \quad I_{13} = \langle x_1, x_3 \rangle + \langle x_4,x_5,x_6 \rangle ^2 \end{aligned}$$

and

$$\begin{aligned} I_{23} = \langle x_2, x_3, x_1^2x_5 \rangle + \langle x_4,x_5,x_6 \rangle ^2. \end{aligned}$$

Observe that \(x_4 \not \in I_{12}\) and \(x_4 x_i \in I_{12}\) for every \(i \in \{1, \ldots , 6\}\), so, by Corollary 3.3, we obtain \({{\textbf{a}}}_4 \in \max _{\preceq {\mathcal{S}}} {\text {Ap}}({\mathcal{S}}, \{{{\textbf{a}}}_1, {{\textbf{a}}}_2\})\). Analogously, \(x_1 x_5 \not \in I_{23}\) and \(x_1 x_5 x_i \in I_{13}\) for every \(i \in \{1, \ldots , 6\}\), implies that \({{\textbf{a}}}_1 + {{\textbf{a}}}_5 = (5,9,7) \in \max _{\preceq {\mathcal{S}}} {\text {Ap}}({\mathcal{S}}, \{{{\textbf{a}}}_2,{{\textbf{a}}}_3\}\). However, since \(x_2\) does not belong to the support of any of the generators of \(I_{13}\), by Corollary 3.3, \({\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_1) \cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_3)\) does not have any maximal element.

The following result is Proposition 4.4 for \(d=3\).

Proposition 5.4

Let \({\text {depth}}(\Bbbk [{\mathcal{S}}])=2\). If \(\beta _{e-2,{{\textbf{b}}}}\ne 0\), then there exist a permutation \(\{i,j,k\}=\{1,2,3\}\) and \({{\textbf{c}}}\in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\) such that \({{\textbf{c}}}+{{\textbf{a}}}_k \not \in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\) and

$$\begin{aligned} {{\textbf{b}}}={{\textbf{c}}}+{{\textbf{a}}}_k+\sum _{\ell = 4}^e {{\textbf{a}}}_\ell . \end{aligned}$$

The following example shows that the subscripts ij are not fixed for all Betti degrees in Proposition 5.4, in general.

Example 5.5

Let \({\mathcal{A}} = \{{{\textbf{a}}}_1, {{\textbf{a}}}_2, {{\textbf{a}}}_3, {{\textbf{a}}}_4, {{\textbf{a}}}_5, {{\textbf{a}}}_6\} \subset {\mathbb {N}}^3\) be such that \({{\textbf{a}}}_i\) is the i-th column of the following matrix:

$$\begin{aligned} \left( \begin{array}{cccccc} 2 &{}\quad 0 &{}\quad 0 &{}\quad 11 &{}\quad 5 &{}\quad 9 \\ 0 &{}\quad 2 &{}\quad 0 &{}\quad 9 &{}\quad 9 &{}\quad 5 \\ 0 &{}\quad 0 &{}\quad 2 &{}\quad 5 &{}\quad 9 &{}\quad 11 \end{array} \right) . \end{aligned}$$

Using Singular [4], one can compute a minimal system of generators of \(I_{\mathcal{A}}\) and then easily check that \({\text {depth}}(\Bbbk [{\mathcal{S}}])=2\) and that \(\beta _4 = 2\). In this case, \(\beta _{4,{{\textbf{b}}}} \ne 0\) if and only if \({{\textbf{b}}}\in \{{{\textbf{b}}}_1 = (34,32,36), {{\textbf{b}}}_2 = (36,32,34)\}\). Let \({{\textbf{c}}}_1 = {{\textbf{b}}}_1 -{{\textbf{a}}}_2 - \sum _{\ell = 4}^6 {{\textbf{a}}}_\ell = {{\textbf{a}}}_2 + {{\textbf{a}}}_6 = (9,7,11)\) and \({{\textbf{c}}}_2 = {{\textbf{b}}}_2 -{{\textbf{a}}}_1 - \sum _{\ell = 4}^6 {{\textbf{a}}}_\ell = 2{{\textbf{a}}}_1 + {{\textbf{a}}}_5 = (9,9,9)\). Observe that \({{\textbf{c}}}_1 \in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i) \cap {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_j)\) if and only if \(\{i,j\} = \{1,3\}\) and that \({{\textbf{c}}}_2 \in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i) \cap {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_j)\) if and only if \(\{i,j\} = \{2,3\}\).

Observe that \({{\textbf{c}}}_1\) and \({{\textbf{c}}}_2\) are maximal elements of \({\text {Ap}}({\mathcal{S}}, \{{{\textbf{a}}}_1,{{\textbf{a}}}_3\})\) and \({\text {Ap}}({\mathcal{S}}, \{{{\textbf{a}}}_2,{{\textbf{a}}}_3\})\), respectively. For this reason, we wonder if \({{\textbf{c}}}\) in Proposition 5.4can always be selected from a maximal element.

The last result of this section complements the Corollary 3.7, in such a way that we can conclude that \((x_i, x_j), (x_i, x_k)\) or \((x_i,x_j-x_k),\ \{i,j,k\} = \{1,2,3\}\), is a regular sequence in \(\Bbbk [{\mathcal{S}}]\) when \(d=3\) and \({\text {depth}}(\Bbbk [{\mathcal{S}}]) )= 2\).

Proposition 5.6

Let \({\text {depth}}(\Bbbk [{\mathcal{S}}]) = 2\) and \(\{i,j,k\} = \{1,2,3\}\). If \(x_j\) and \(x_k\) are zero-divisors of \(\Bbbk [{{\textbf{x}}}]/(I+ \langle x_i \rangle )\), then \(x_j-x_k\) is a nonzero-divisor of \(\Bbbk [{{\textbf{x}}}]/(I+ \langle x_i \rangle )\).

Proof

Assume contrary that \(x_j-x_k\) is a zero-divisor of \(\Bbbk [\textbf{x}]/(I_{{\mathcal{A}}}+\langle x_i \rangle )\). Equivalently, since \(I_{\mathcal{A}}\) is a prime ideal, by [6, Proposition 1.10], there exists \({\textbf{x}}^{\textbf{u}} \not \in I_{{\mathcal{A}}}+\langle x_i \rangle\) such that \(x_j {\textbf{x}}^{\textbf{u}} \in I_{\mathcal A}+\langle x_i \rangle\) and \(x_k {\textbf{x}}^{\textbf{u}} \in I_{{\mathcal{A}}}+\langle x_i \rangle\). So, if \({{\textbf{b}}}= \sum _{l=1}^e u_l {{\textbf{a}}}_l \in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i),\) we have that \({{\textbf{b}}}+ {{\textbf{a}}}_j \not \in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i)\) and \({{\textbf{b}}}+ {{\textbf{a}}}_k \not \in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i)\). Thus, \({{\textbf{b}}}+{{\textbf{c}}}\notin {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\) for \({{\textbf{c}}}\in {\mathcal{S}}{\setminus }{\text {Ap}}({\mathcal{S}},E)\).

If \({{\textbf{b}}}+{{\textbf{c}}}\notin {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\) for all \({{\textbf{c}}}\in {\text {Ap}}({\mathcal{S}},E)\), then \({{\textbf{b}}}\) is a a maximal element for \({\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\). Otherwise, \({{\textbf{b}}}+{{\textbf{c}}}_1\in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\) for some \({{\textbf{c}}}_1\in {\text {Ap}}({\mathcal{S}},E)\). Since \({{\textbf{b}}}+{{\textbf{c}}}_1\notin {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\), we may repeat the same argument with \({{\textbf{b}}}+{{\textbf{c}}}_1\) instead of \({{\textbf{b}}}\). So, either \({{\textbf{b}}}+{{\textbf{c}}}_1\) is maximal or there exists \({{\textbf{c}}}_2\in {\text {Ap}}({\mathcal{S}},E)\) such that \({{\textbf{c}}}_1\preceq _{\mathcal{S}}{{\textbf{c}}}_2\), \({{\textbf{b}}}+{{\textbf{c}}}_2\in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\) and \({{\textbf{b}}}+{{\textbf{c}}}_2\notin {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\). As \({\text {Ap}}({\mathcal{S}},E)\) is finite, this process stops. Therefore, \({\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\) has a maximal element with respect to \(\preceq _{\mathcal{S}}\), so from Proposition 3.4\({\text {depth}}(\Bbbk [{\mathcal{S}}]) = 1\), a contradiction to the fact that \({\text {depth}}(\Bbbk [{\mathcal{S}}]) > 1\) by Proposition 3.6. \(\square\)

6 Depth two in four-dimensional case

Let \(d =4\) and, according to our notation, \(E = \{{{\textbf{a}}}_1,{{\textbf{a}}}_2,{{\textbf{a}}}_3,{{\textbf{a}}}_4\}\). Let us characterize the property that \(\Bbbk [{\mathcal{S}}]\) has depth two in this case. To do this, we resort directly to the Koszul homology techniques on which the combinatorial constructions used in the previous sections are based.

We begin by establishing the notation and briefly recalling the notion of Koszul complex.

Let \(\overline{{\textbf{t}}}\) be the sequence \(({\textbf{t}}^{{{\textbf{a}}}_1},\dots ,{\textbf{t}}^{{{\textbf{a}}}_d})\) of elements of \(\Bbbk [{\mathcal{S}}]\). Let \(K_0 = \Bbbk [{\mathcal{S}}]\) and \(K_p=\bigoplus \Bbbk [{\mathcal{S}}] {{\textbf{e}}}_{i_1\dots i_d}\) be the free \(\Bbbk [{\mathcal{S}}]\)-module of rank \(\left( {\begin{array}{c}d\\ p\end{array}}\right)\) with basis \(\{{{\textbf{e}}}_{i_1\dots i_p} \; \ 1\le i_1<\dots <i_p\le d\}\) for each \(1 \le p \le d.\) Set

$$\begin{aligned} \phi _p:K_p\longrightarrow K_{p-1};\ {{\textbf{e}}}_{i_1\dots i_p} \mapsto \sum ^p_{j=1}(-1)^{j-1} {\textbf{t}}^{{{\textbf{a}}}_{i_j}} {{\textbf{e}}}_{i_1\dots \widehat{i_j} \dots i_p},\ p = 2, \ldots , d, \end{aligned}$$

where the notation \(\widehat{i_j}\) denotes omission of \(i_j\), and \(\phi _1: K_1=\bigoplus _{i=1}^d \Bbbk [{\mathcal{S}}] {{\textbf{e}}}_{i} \rightarrow K_0 = \Bbbk [{\mathcal{S}}]; {{\textbf{e}}}_i \mapsto {\textbf{t}}^{{{\textbf{a}}}_i}\). One can check that \(\phi _p \circ \phi _{p-1} = 0,\) for every \(p \in \{1, \ldots , d\}\). Thus, we have that

$$\begin{aligned} K_\bullet (\overline{{\textbf{t}}}): 0 \rightarrow K_{d} {\mathop {\longrightarrow }\limits ^{\phi _p}} K_{d-1} \longrightarrow \cdots \longrightarrow K_1 {\mathop {\longrightarrow }\limits ^{\phi _1}} K_0 \rightarrow 0 \end{aligned}$$

is a chain complex of \(\Bbbk [{\mathcal{S}}]\)-modules. This complex is called the Koszul complex associated to \({\overline{t}}\).

The Koszul complex has homology groups

$$\begin{aligned} H_p(K_\bullet (\overline{{\textbf{t}}}), \Bbbk [{\mathcal{S}}]):=\frac{\ker {\phi _p}}{{\text {Im}} {\phi _{p+1}}},\quad p = 0, \ldots , d, \end{aligned}$$

and \(H_p({\overline{x}}, \Bbbk [{\mathcal{S}}]) = 0\) for every \(p > d\).

The following result is an immediate consequence of [11, 16.8 and 16.6].

Proposition 6.1

With the above notation, \({\text {depth}}(\Bbbk [{\mathcal{S}}]) = d - \max \{p \mid H_p(K_\bullet ({\overline{t}}),\Bbbk [{\mathcal{S}}]) \ne 0\}\).

Before characterizing the case where the depth of \(\Bbbk [{\mathcal{S}}]\) is two for \(d =4\), we need to prove a couple of technical lemmas valid for all \(d \ge 4\).

Lemma 6.2

Let \(d \ge 4\) and \(\{i< j < k\} \subseteq \{1, \ldots , d\}\). There exists \({\textbf{f}} = f_{ij} {{\textbf{e}}}_{ij} - f_{ik} {{\textbf{e}}}_{ik}+f_{jk} {{\textbf{e}}}_{jk} \in \ker \phi _2 {\setminus } {\text {Im}} \phi _3,\) for some \(f_{ij}, f_{ik}, f_{jk} \in \Bbbk [{\mathcal{S}}]\) if and only if for every \(i_4 \in \{1, \ldots , d\} \setminus \{i,j,k\}\) there exist a permutation \(\{i_1, i_2, i_3\} = \{i,j,k\}\) and \({{\textbf{a}}}\in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_{i_3}) \cap {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_{i_4})\) such that \({\textbf{t}}^{{\textbf{a}}}\) appears with nonzero coefficient in \(f_{i_1 i_2}\) and both \({{\textbf{a}}}+{{\textbf{a}}}_{i_1}-{{\textbf{a}}}_{i_3}\) and \({{\textbf{a}}}+{{\textbf{a}}}_{i_2}-{{\textbf{a}}}_{i_3}\) belong to \({\mathcal{S}}\).

Proof

Let \(f_{jk} = \sum _{{{\textbf{a}}}\in {\mathcal{S}}} \lambda _{{\textbf{a}}}^{jk} {\textbf{t}}^{{\textbf{a}}}\). If \(f_{jk} = 0\), then

$$\begin{aligned} 0 = \phi _2({\textbf{f}})&= f_{ij} ({\textbf{t}}^{{{\textbf{a}}}_j}{{\textbf{e}}}_i - \textbf{t}^{{{\textbf{a}}}_i}{{\textbf{e}}}_j) - f_{ik} ({\textbf{t}}^{{{\textbf{a}}}_k}{{\textbf{e}}}_i - \textbf{t}^{{{\textbf{a}}}_i}{{\textbf{e}}}_k)+f_{jk} ({\textbf{t}}^{{{\textbf{a}}}_j}{{\textbf{e}}}_k - {\textbf{t}}^{{{\textbf{a}}}_k}{{\textbf{e}}}_j)\\&= (f_{ij} {\textbf{t}}^{{{\textbf{a}}}_j} - f_{ik} {\textbf{t}}^{{{\textbf{a}}}_k}) {{\textbf{e}}}_i - (f_{jk} {\textbf{t}}^{{{\textbf{a}}}_k} + f_{ij} {\textbf{t}}^{{{\textbf{a}}}_i}) {{\textbf{e}}}_j + (f_{ik} {\textbf{t}}^{{{\textbf{a}}}_i} + f_{jk} {\textbf{t}}^{{{\textbf{a}}}_j}) {{\textbf{e}}}_k \end{aligned}$$

implies, \({\textbf{f}} = 0\), a contradiction. Hence, for each \({{\textbf{a}}}\in {\mathcal{S}}\) such that \(\lambda _{{\textbf{a}}}^{jk} \ne 0\), there exist \({{\textbf{c}}}_{{\textbf{a}}}, {{\textbf{c}}}'_{{\textbf{a}}}\in {\mathcal{S}}\) such that \({{\textbf{a}}}+ {{\textbf{a}}}_j = {{\textbf{c}}}_{{\textbf{a}}}+ {{\textbf{a}}}_i\) and \({{\textbf{a}}}+ {{\textbf{a}}}_k = {{\textbf{c}}}'_{{\textbf{a}}}+ {{\textbf{a}}}_i\); in particular, both \({{\textbf{a}}}+ {{\textbf{a}}}_j - {{\textbf{a}}}_i\) and \({{\textbf{a}}}+ {{\textbf{a}}}_k - {{\textbf{a}}}_i\) belong to \({\mathcal{S}}\). Now, if \({{\textbf{a}}}\not \in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i),\) then \({{\textbf{c}}}_{{\textbf{a}}}- {{\textbf{a}}}_j = {{\textbf{c}}}'_{{\textbf{a}}}-{{\textbf{a}}}_k = {{\textbf{a}}}-{{\textbf{a}}}_i \in {\mathcal{S}}\) and, consequently,

$$\begin{aligned} {\textbf{g}}_a:= {\textbf{t}}^{{{\textbf{c}}}'_{{\textbf{a}}}} {{\textbf{e}}}_{ij} + {\textbf{t}}^{{{\textbf{c}}}_{{\textbf{a}}}} {{\textbf{e}}}_{ik} - {\textbf{t}}^{{\textbf{a}}}{{\textbf{e}}}_{jk} = \phi _3({\textbf{t}}^{{{\textbf{a}}}-{{\textbf{a}}}_i} {{\textbf{e}}}_{ijk}) \in {\text {Im}} \phi _3 \subset \ker \phi _2 \end{aligned}$$

Therefore, if \({{\textbf{a}}}\not \in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i),\) for every \({{\textbf{a}}}\in {\mathcal{S}}\) with \(\lambda _{{\textbf{a}}}^{jk} \ne 0\), then

$$\begin{aligned} {\textbf{g}}: = {\textbf{f}} - \sum _{{{\textbf{a}}}\in {\mathcal{S}}} \lambda _{{\textbf{a}}}^{jk} {\textbf{g}}_{{\textbf{a}}}= \left( f_{ij} - \sum _{{{\textbf{a}}}\in {\mathcal{S}}} \lambda _{{\textbf{a}}}^{jk} {\textbf{t}}^{{{\textbf{c}}}'_{{\textbf{a}}}} \right) {{\textbf{e}}}_{ij} - \left( f_{ik} - \sum _{{{\textbf{a}}}\in {\mathcal{S}}} \lambda _{{\textbf{a}}}^{jk} {\textbf{t}}^{{{\textbf{c}}}_{{\textbf{a}}}} \right) {{\textbf{e}}}_{ik} \in \ker \phi _2. \end{aligned}$$

However, \(\phi _2({\textbf{g}}) = 0\) implies \({\textbf{g}}=0,\) that is, \({\textbf{f}} = \sum _{{{\textbf{a}}}\in {\mathcal{S}}} \lambda _{{\textbf{a}}}^{jk} {\textbf{g}}_{{\textbf{a}}}\in {\text {Im}} \phi _3\) which is a contradiction. So, there exists \({{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i),\) for some \({{\textbf{b}}}\in {\mathcal{S}}\) with \(\lambda _{{\textbf{b}}}^{jk} \ne 0\).

Let \({\textbf{h}} = {\textbf{f}} - \sum _{{{\textbf{a}}}\not \in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)} \lambda _{{\textbf{a}}}^{jk} {\textbf{g}}_{{\textbf{a}}}\). By the previous arguments, \({\textbf{h}} = h_{ij} {{\textbf{e}}}_{ij} - h_{ik} {{\textbf{e}}}_{ik}+h_{jk} {{\textbf{e}}}_{jk} \in \ker \phi _2 {\setminus } {\text {Im}} \phi _3,\) with \(h_{jk} = \sum _{{{\textbf{a}}}\in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i)} \lambda _{{\textbf{a}}}^{jk} {\textbf{t}}^{{\textbf{a}}}\ne 0\). Let \(l \in \{1, \ldots , d\} {\setminus } \{i,j,k\}\). If \({{\textbf{a}}}\not \in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_l)\) for every \({{\textbf{a}}}\in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i)\) with \(\lambda _{jk} \ne 0\), then \(h_{jk} = {\textbf{t}}^{{{\textbf{a}}}_l} {{\tilde{h}}}_{jk}\) and both \(h_{ij}\) and \(h_{ik}\) are divisible by \({\textbf{t}}^{{{\textbf{a}}}_l}\), then we may replace \({\textbf{h}}\) by \({\textbf{h}}/{\textbf{t}}^{{{\textbf{a}}}_l}\). Thus, without loss of generality, we suppose that there exists \({{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i)\) with \(\lambda _{{\textbf{b}}}^{jk} \ne 0\) such that, at least, one of \({{\textbf{b}}}, {{\textbf{c}}}_{{\textbf{b}}}\) or \({{\textbf{c}}}'_{{\textbf{b}}}\) belongs to \(\textrm{Ap}({\mathcal{S}}, {{\textbf{a}}}_l)\). So, we distinguish three cases:

  • If \({{\textbf{b}}}\in \textrm{Ap}({\mathcal{S}}, {{\textbf{a}}}_l)\), then \({{\textbf{b}}}\in \textrm{Ap}({\mathcal{S}}, {{\textbf{a}}}_i) \cap \textrm{Ap}({\mathcal{S}}, {{\textbf{a}}}_l)\). We already know that \({{\textbf{b}}}+ {{\textbf{a}}}_k - {{\textbf{a}}}_i\) and \({{\textbf{b}}}+ {{\textbf{a}}}_j - {{\textbf{a}}}_i\) belong to \({\mathcal{S}}\).

  • If \({{\textbf{c}}}_{{\textbf{b}}}\in \textrm{Ap}({\mathcal{S}}, {{\textbf{a}}}_l),\) then \({{\textbf{c}}}_{{\textbf{b}}}- {{\textbf{a}}}_j = {{\textbf{a}}}- {{\textbf{a}}}_i \not \in {\mathcal{S}}\). Thus, \({{\textbf{c}}}_{{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_j) \cap {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_l)\). Moreover, \({{\textbf{c}}}_{{\textbf{b}}}+ {{\textbf{a}}}_i - {{\textbf{a}}}_j = {{\textbf{a}}}\in {\mathcal{S}}\) and, since \(\phi _2({\textbf{h}}) = 0\) there exists a monomial \({\textbf{t}}^{{{\textbf{d}}}}\) of \(f_{ik}\) such that \({{\textbf{c}}}_{{\textbf{b}}}+ {{\textbf{a}}}_k = {{\textbf{d}}}+ {{\textbf{a}}}_j\), that is, \({{\textbf{c}}}_b + {{\textbf{a}}}_k - {{\textbf{a}}}_j \in {\mathcal{S}}\).

  • If \({{\textbf{c}}}'_{{\textbf{b}}}\in \textrm{Ap}({\mathcal{S}}, {{\textbf{a}}}_l),\) then \({{\textbf{c}}}'_{{\textbf{b}}}- {{\textbf{a}}}_k = {{\textbf{a}}}- {{\textbf{a}}}_i \not \in {\mathcal{S}}\). Thus, \({{\textbf{c}}}'_{{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_k) \cap {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_l)\). Moreover, \({{\textbf{c}}}'_{{\textbf{b}}}+ {{\textbf{a}}}_i - {{\textbf{a}}}_k = {{\textbf{a}}}\in {\mathcal{S}}\) and, since \(\phi _2({\textbf{h}}) = 0\) there exists a monomial \({\textbf{t}}^{{{\textbf{d}}}}\) of \(f_{jk}\) such that \({{\textbf{c}}}'_{{\textbf{b}}}+ {{\textbf{a}}}_i = {{\textbf{d}}}+ {{\textbf{a}}}_j\), that is, \({{\textbf{c}}}'_b + {{\textbf{a}}}_i - {{\textbf{a}}}_j \in {\mathcal{S}}\).

Conversely, let \({\textbf{f}} = {\textbf{t}}^{{{\textbf{a}}}+ {{\textbf{a}}}_k - {{\textbf{a}}}_i} {{\textbf{e}}}_{ij} + {\textbf{t}}^{{{\textbf{a}}}+ {{\textbf{a}}}_j - {{\textbf{a}}}_i} {{\textbf{e}}}_{ik} - {\textbf{t}}^{{\textbf{a}}}{{\textbf{e}}}_{jk}\). Clearly, \({\textbf{f}} \in \ker \phi _2\), and \({\textbf{f}} \not \in {\text {Im}} \phi _3\) because \({{\textbf{a}}}- {{\textbf{a}}}_i \not \in {\mathcal{S}}\). \(\square\)

Lemma 6.3

Let \(d \ge 4\) and \(\{i< j< k < l\} \subseteq \{1, \ldots , d\}\). There exists \({\textbf{f}} = f_{ik} {{\textbf{e}}}_{ik} + f_{il} {{\textbf{e}}}_{il} + f_{jk} {{\textbf{e}}}_{jk} + f_{jl} {{\textbf{e}}}_{jl} \in \ker \phi _2 {\setminus } {\text {Im}} \phi _3\) for some \(f_{ik}, f_{il}, f_{jk}, f_{jl} \in \Bbbk [{\mathcal{S}}]\) if and only if one of the following conditions holds:

  1. (1)

    There exists a permutation \(\{i_1,i_2,i_3,i_4\} = \{i,j,k,l\}\) and \({{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_{i_1})\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_{i_4})\) such that \({{\textbf{b}}}+{{\textbf{a}}}_{i_2}-{{\textbf{a}}}_{i_1}, {{\textbf{b}}}+{{\textbf{a}}}_{i_3} -{{\textbf{a}}}_{i_4}\) and \({{\textbf{b}}}+{{\textbf{a}}}_{i_2}+{{\textbf{a}}}_{i_3}-({{\textbf{a}}}_{i_1}+{{\textbf{a}}}_{i_4})\) belong to \({\mathcal{S}}\).

  2. (2)

    There exists a permutation \(\{i_1< i_2 < i_3\} \subset \{i,j,k,l\}\) such that \({\textbf{g}} = -{\textbf{t}}^{{{\textbf{a}}}_{i_4}} g_{i_1i_2} {{\textbf{e}}}_{i_1i_2} + g_{i_1i_3} {{\textbf{e}}}_{i_1i_3}+g_{i_2i_3} {{\textbf{e}}}_{i_2i_3} \in \ker \phi _2 {\setminus } {\text {Im}} \phi _3,\) for some \(g_{i_1i_2}, g_{i_1i_3}, g_{i_2i_3} \in \Bbbk [{\mathcal{S}}]\) and \(i_4 \in \{i,j,k,l\} \setminus \{i_1, i_2, i_3\}\).

Proof

Let \(f_{jk} = \sum _{{{\textbf{a}}}\in {\mathcal{S}}} \lambda _{{\textbf{a}}}^{jk} {\textbf{t}}^{{\textbf{a}}}\). If \(f_{jk} = 0\), then

$$\begin{aligned} 0 = \phi _2({\textbf{f}})&= f_{ik} ({\textbf{t}}^{{{\textbf{a}}}_k}{{\textbf{e}}}_{i} - \textbf{t}^{{{\textbf{a}}}_i}{{\textbf{e}}}_k) + f_{il} ({\textbf{t}}^{{{\textbf{a}}}_l}{{\textbf{e}}}_{i}-{\textbf{t}}^{{{\textbf{a}}}_i}{{\textbf{e}}}_l) + f_{jk} ({\textbf{t}}^{{{\textbf{a}}}_k}{{\textbf{e}}}_j - {\textbf{t}}^{{{\textbf{a}}}_j}{{\textbf{e}}}_k) + f_{jl} ({\textbf{t}}^{{{\textbf{a}}}_l}{{\textbf{e}}}_j - {\textbf{t}}^{{{\textbf{a}}}_j}{{\textbf{e}}}_l) \\&= (f_{ik} {\textbf{t}}^{{{\textbf{a}}}_k} + f_{il} {\textbf{t}}^{{{\textbf{a}}}_l}){{\textbf{e}}}_{i} + (f_{jk} {\textbf{t}}^{{{\textbf{a}}}_k} + f_{jl} {\textbf{t}}^{{{\textbf{a}}}_l}){{\textbf{e}}}_j - (f_{ik} {\textbf{t}}^{{{\textbf{a}}}_i} + f_{jk}{\textbf{t}}^{{{\textbf{a}}}_j}){{\textbf{e}}}_k \\&\quad - (f_{jl} \textbf{t}^{{{\textbf{a}}}_j} + f_{il}{\textbf{t}}^{{{\textbf{a}}}_i}){{\textbf{e}}}_l \end{aligned}$$

implies, \({\textbf{f}} = 0\), a contradiction. Hence, for each \({{\textbf{a}}}\in {\mathcal{S}}\) such that \(\lambda _{{\textbf{a}}}^{jk} \ne 0\), there exist \({{\textbf{c}}}_{{\textbf{a}}}, {{\textbf{c}}}'_{{\textbf{a}}}\in {\mathcal{S}}\) such that \({{\textbf{a}}}+ {{\textbf{a}}}_j = {{\textbf{c}}}_{{\textbf{a}}}+ {{\textbf{a}}}_i\) and \({{\textbf{a}}}+ {{\textbf{a}}}_k = {{\textbf{c}}}'_{{\textbf{a}}}+ {{\textbf{a}}}_l\); in particular, both \({{\textbf{a}}}+ {{\textbf{a}}}_j - {{\textbf{a}}}_i\) and \({{\textbf{a}}}+ {{\textbf{a}}}_k - {{\textbf{a}}}_l\) belong to \({\mathcal{S}}\). Moreover, there exists \({{\textbf{c}}}''_{{\textbf{a}}}\in {\mathcal{S}}\) such that \({{\textbf{c}}}_{{\textbf{a}}}+ {{\textbf{a}}}_k = {{\textbf{c}}}''_{{\textbf{a}}}+ {{\textbf{a}}}_l\). So, \({{\textbf{a}}}+ {{\textbf{a}}}_j + {{\textbf{a}}}_k = {{\textbf{c}}}_{{\textbf{a}}}+ {{\textbf{a}}}_i + {{\textbf{a}}}_k = {{\textbf{c}}}''_{{\textbf{a}}}+ {{\textbf{a}}}_i + {{\textbf{a}}}_l\), that is, \({{\textbf{a}}}+ {{\textbf{a}}}_j + {{\textbf{a}}}_k - ({{\textbf{a}}}_i + {{\textbf{a}}}_l)\) belongs to \({\mathcal{S}}\). Now, if \({{\textbf{a}}}\in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i) \cap {\text {Ap}}({\mathcal{S}}, a_l)\), then we get (1). Otherwise, without loss of generality, we suppose \({{\textbf{a}}}\not \in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\). Then

$$\begin{aligned}{\textbf{g}}_a:= {\textbf{t}}^{{{\textbf{a}}}-{{\textbf{a}}}_i + {{\textbf{a}}}_k} {{\textbf{e}}}_{ij} - {\textbf{t}}^{{{\textbf{c}}}_{{\textbf{a}}}} {{\textbf{e}}}_{ik} + {\textbf{t}}^{{\textbf{a}}}{{\textbf{e}}}_{jk} = \phi _3({\textbf{t}}^{{{\textbf{a}}}-{{\textbf{a}}}_i} {{\textbf{e}}}_{ijk}) \in {\text {Im}} \phi _3 \subset \ker \phi _2\end{aligned}$$

Therefore, if \({{\textbf{a}}}\not \in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i),\) for every \({{\textbf{a}}}\in {\mathcal{S}}\) with \(\lambda _{{\textbf{a}}}^{jk} \ne 0\), then

$$\begin{aligned} {\textbf{g}}&: =&{\textbf{f}} - \sum _{{{\textbf{a}}}\in {\mathcal{S}}} \lambda _{{\textbf{a}}}^{jk} {\textbf{g}}_{{\textbf{a}}}= -\left( \sum _{{{\textbf{a}}}\in {\mathcal{S}}} \lambda _{{\textbf{a}}}^{jk} {\textbf{t}}^{{{\textbf{a}}}-{{\textbf{a}}}_i + {{\textbf{a}}}_k} \right) {{\textbf{e}}}_{ij} + \left( f_{ik} + \sum _{{{\textbf{a}}}\in {\mathcal{S}}} \lambda _{{\textbf{a}}}^{jk} {\textbf{t}}^{{{\textbf{c}}}_{{\textbf{a}}}} \right) {{\textbf{e}}}_{ik} \\{} & {} + f_{il} {{\textbf{e}}}_{il} + f_{jl} {{\textbf{e}}}_{jl} \in \ker \phi _2 \setminus {\text {Im}} \phi _3. \end{aligned}$$

Finally, since \(\phi _2({\textbf{g}}) = 0\), we conclude that the coefficient of \({{\textbf{e}}}_{ik}\) is zero and, consequently, that (2) holds.

Conversely, we treat the two cases separately. On the one hand, if (1) holds, then

$$\begin{aligned}{\textbf{f}} = {\textbf{t}}^{{{\textbf{b}}}+{{\textbf{a}}}_{i_2}-{{\textbf{a}}}_{i_1}} {{\textbf{e}}}_{i_1 i_3} + {\textbf{t}}^{{{\textbf{b}}}+{{\textbf{a}}}_{i_3}-{{\textbf{a}}}_{i_4}} {{\textbf{e}}}_{i_2 i_4} - {\textbf{t}}^{{{\textbf{b}}}} {{\textbf{e}}}_{i_2 i_3} - {\textbf{t}}^{{{\textbf{b}}}+{{\textbf{a}}}_{i_2}+{{\textbf{a}}}_{i_3} - ({{\textbf{a}}}_{i_1}+{{\textbf{a}}}_{i_4})} {{\textbf{e}}}_{i_1 i_4} \in \ker \phi _2;\end{aligned}$$

moreover, \({\textbf{f}} \not \in {\text {Im}} \phi _3\) because \({{\textbf{b}}}- {{\textbf{a}}}_{i_1} \not \in {\mathcal{S}}\) and \({{\textbf{b}}}- {{\textbf{a}}}_{i_2} \not \in {\mathcal{S}}\), and therefore the third addend cannot come from any generator of \({\text {Im}} \phi _3\). On the other hand, if (2) holds, then arranging indexes if necessary, we have that

$$\begin{aligned}{\textbf{f}} = {\textbf{g}} + \phi _3(g_{i_1 i_2} {{\textbf{e}}}_{i_1i_2i_4}) = g_{i_1 i_3}{{\textbf{e}}}_{i_1 i_3} + g_{i_2 i_3}{{\textbf{e}}}_{i_2 i_3} + {\textbf{t}}^{{{\textbf{a}}}_{i_1}} g_{i_1 i_2}{{\textbf{e}}}_{i_2 i_4} - {\textbf{t}}^{{{\textbf{a}}}_{i_2}} g_{i_1 i_2}{{\textbf{e}}}_{i_1 i_4} \in \ker \phi _2 \setminus {\text {Im}} \phi _3,\end{aligned}$$

with \(i_4 \in \{i,j,k,l\} {\setminus } \{i_1, i_2, i_3\}\) \(\square\)

We are now in a position to state and prove our characterization of depth two for \(d = 4\).

Theorem 6.4

If \(d=4\) then \({\text {depth}}(\Bbbk [{\mathcal{S}}])=2\) if and only if \({\text {Ap}}({\mathcal{S}}, {{\textbf{a}}})\) does not have a maximal element for some (every) \({{\textbf{a}}}\in {\mathcal{S}}\) and there exists a permutation \(\{i,j,k,l\}=\{1,2,3,4\}\) and \({{\textbf{b}}}\in {\mathcal{S}}\) such that one of the following conditions holds:

  1. (1)

    \({{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i) \cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\) such that \({{\textbf{b}}}+{{\textbf{a}}}_k-{{\textbf{a}}}_i\) and \({{\textbf{b}}}+{{\textbf{a}}}_l-{{\textbf{a}}}_i\) belong to \({\mathcal{S}}\).

  2. (2)

    \({{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\) such that \({{\textbf{b}}}+{{\textbf{a}}}_k-{{\textbf{a}}}_i, {{\textbf{b}}}+{{\textbf{a}}}_l-{{\textbf{a}}}_j\) and \({{\textbf{b}}}+{{\textbf{a}}}_k+{{\textbf{a}}}_l-({{\textbf{a}}}_i+{{\textbf{a}}}_j)\) belong to \({\mathcal{S}}\).

In both cases, \({\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\) has a maximal element with respect to \(\preceq _{\mathcal{S}}\).

Proof

If \({\text {depth}}(\Bbbk [{\mathcal{S}}])=2\), by Proposition 3.4, \({\text {Ap}}({\mathcal{S}}, {{\textbf{a}}})\) does not have a maximal element for some (every) \({{\textbf{a}}}\in {\mathcal{S}}\). Moreover, by Proposition 6.1, \(H_2(K_\bullet ({\overline{x}}), \Bbbk [{\mathcal{S}}])\ne 0\). Let \({\textbf{f}}=\sum _{1 \le i < j \le 4} f_{ij} {{\textbf{e}}}_{ij}\in \ker \phi _2{\setminus } {\text {Im}} \phi _3\), where \(f_{ij} \in \Bbbk [{\mathcal{S}}],\ 1 \le i < j \le 4\). we distinguish two cases:

  1. (1)

    If there exists \(h_{ij}^k \in \Bbbk [{\mathcal{S}}],\ 1 \le i < j \le 4\) and \(k \in \{1,2\}\), such that \({\textbf{f}}\) can written in the form

    $$\begin{aligned}&({\textbf{t}}^{a_3} h_{12}^1 + {\textbf{t}}^{a_4} h_{12}^2) {\textbf{e}}_{12} + ({\textbf{t}}^{a_4} h_{13}^1 - {\textbf{t}}^{a_2} h_{13}^2) {\textbf{e}}_{13} - ({\textbf{t}}^{a_2} h_{14}^1 + {\textbf{t}}^{a_3} h_{14}^2) {\textbf{e}}_{14} \\&\qquad + ({\textbf{t}}^{a_1} h_{23}^1 + {\textbf{t}}^{a_4} h_{23}^2) {\textbf{e}}_{23} + ({\textbf{t}}^{a_1} h_{24}^1 - {\textbf{t}}^{a_3} h_{24}^2) {\textbf{e}}_{24} + ({\textbf{t}}^{a_1} h_{34}^1 + {\textbf{t}}^{a_2} h_{34}^2) {\textbf{e}}_{34}, \end{aligned}$$

    then

    $$\begin{aligned} {{\textbf{g}}}=&{\textbf{f}}-\phi _3(h_{12}^1 {\textbf{e}}_{123}+h_{12}^2 {\textbf{e}}_{124} + h_{34}^1 {\textbf{e}}_{134}+h_{34}^2{\textbf{e}}_{234}) \\ =&({\textbf{t}}^{{{\textbf{a}}}_4} h_{13}^1 - {\textbf{t}}^{{{\textbf{a}}}_2} h_{13}^2) {\textbf{e}}_{13} - ({\textbf{t}}^{{{\textbf{a}}}_2} h_{14}^1 + {\textbf{t}}^{{{\textbf{a}}}_3} h_{14}^2) {\textbf{e}}_{14} \\&+ ({\textbf{t}}^{{{\textbf{a}}}_1} h_{23}^1 + {\textbf{t}}^{{{\textbf{a}}}_4} h_{23}^2) {\textbf{e}}_{23} + ({\textbf{t}}^{{{\textbf{a}}}_1} h_{24}^1 - {\textbf{t}}^{{{\textbf{a}}}_3} h_{24}^2) {\textbf{e}}_{24} \in \ker \phi _2\setminus {\text {Im}} \phi _3 \end{aligned}$$

    and, by Lemmas 6.3 and 6.2, we are done.

  2. (2)

    If there exists a permutation \(\{i,j,k,l\} = \{1,2,3,4\}\) such that \(\pm f_{kl} = \sum _{{{\textbf{b}}}\in {\mathcal{S}}} \lambda _{{\textbf{b}}}^{kl} {\textbf{t}}^b\) cannot be written in the form \({\textbf{t}}^{{{\textbf{a}}}_i} g_j \pm {\textbf{t}}^{{{\textbf{a}}}_j} g_i\), then there exists \({{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i) \cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\) with \(\lambda _{{\textbf{b}}}^{kl} \ne 0\). For simplicity, rearranging indices if necessary, we suppose \(i=1,j=2,k=3\) and \(l=4\). Therefore, \({\textbf{f}} = \sum _{1 \le i < j \le 4} f_{ij} {{\textbf{e}}}_{ij}\) and there exists a monomial \({\textbf{t}}^{{\textbf{b}}}\) of \(f_{34}\) such that \({{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_1) \cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_2)\). Now, since

    $$\begin{aligned} 0 = \phi _2({\textbf{f}}) =\,&f_{12} ({\textbf{t}}^{{{\textbf{a}}}_2} {{\textbf{e}}}_1 - \textbf{t}^{{{\textbf{a}}}_1} {{\textbf{e}}}_2) + f_{13} ({\textbf{t}}^{{{\textbf{a}}}_3} {{\textbf{e}}}_1 - {\textbf{t}}^{{{\textbf{a}}}_1} {{\textbf{e}}}_3) + f_{14} ({\textbf{t}}^{{{\textbf{a}}}_4} {{\textbf{e}}}_1 - {\textbf{t}}^{{{\textbf{a}}}_1} {{\textbf{e}}}_4) \\&+ f_{23} ({\textbf{t}}^{{{\textbf{a}}}_3} {{\textbf{e}}}_2 - {\textbf{t}}^{{{\textbf{a}}}_2} {{\textbf{e}}}_3) + f_{24} ({\textbf{t}}^{{{\textbf{a}}}_4} {{\textbf{e}}}_2 - {\textbf{t}}^{{{\textbf{a}}}_2} {{\textbf{e}}}_4) + f_{34} (\textbf{t}^{{{\textbf{a}}}_4} {{\textbf{e}}}_3 - {\textbf{t}}^{{{\textbf{a}}}_3} {{\textbf{e}}}_4), \end{aligned}$$

    in particular the coefficients \(-f_{13} {\textbf{t}}^{{{\textbf{a}}}_1} - f_{23} {\textbf{t}}^{{{\textbf{a}}}_2} + f_{34} {\textbf{t}}^{{{\textbf{a}}}_4}\) and \(-f_{14} {\textbf{t}}^{{{\textbf{a}}}_1} - f_{24} {\textbf{t}}^{{{\textbf{a}}}_2} - f_{34} {\textbf{t}}^{{{\textbf{a}}}_3}\) of \({{\textbf{e}}}_3\) and \({{\textbf{e}}}_4\), respectively, are zero. Therefore, there exist \({{\textbf{c}}}, {{\textbf{c}}}' \in {\mathcal{S}}\) such that \({{\textbf{b}}}+ {{\textbf{a}}}_4 = {{\textbf{c}}}+ {{\textbf{a}}}_i\) and \({{\textbf{b}}}+ {{\textbf{a}}}_3 = {{\textbf{c}}}' + {{\textbf{a}}}_j\) with \(i,j \in \{1,2\}.\) If \(i=j\), then \({{\textbf{b}}}- {{\textbf{a}}}_i = {{\textbf{c}}}' - {{\textbf{a}}}_3 = {{\textbf{c}}}- {{\textbf{a}}}_4\), so \({\textbf{f}} - \phi _3({\textbf{t}}^{{{\textbf{b}}}-{{\textbf{a}}}_i} {{\textbf{e}}}_{i34}) = {\textbf{f}} - {\textbf{t}}^{{\textbf{b}}}{{\textbf{e}}}_{34} + {\textbf{t}}^{{{\textbf{c}}}'} {{\textbf{e}}}_{i4} - {\textbf{t}}^{{{\textbf{c}}}} {{\textbf{e}}}_{i3} \in \ker \phi _2 {\setminus } {\text {Im}} \phi _3\). Thus, we may suppose \(i \ne j,\) say \(i=1\) and \(j=2\), so that \({{\textbf{b}}}+ {{\textbf{a}}}_4 = {{\textbf{c}}}+ {{\textbf{a}}}_1\) and \({{\textbf{b}}}+ {{\textbf{a}}}_3 = {{\textbf{c}}}' + {{\textbf{a}}}_2\), that is, \({{\textbf{b}}}+ {{\textbf{a}}}_4 - {{\textbf{a}}}_1\) and \({{\textbf{b}}}+ {{\textbf{a}}}_3 - {{\textbf{a}}}_2\). Finally, since the coefficient \(f_{12} {\textbf{t}}^{{{\textbf{a}}}_2} + f_{13} {\textbf{t}}^{{{\textbf{a}}}_3} + f_{14} \textbf{t}^{{{\textbf{a}}}_4}\) of \({{\textbf{e}}}_1\) in \(\phi _2({\textbf{f}})\) must be zero, there exists \({{\textbf{c}}}'' \in {\mathcal{S}}\) such that

    1. (a)

      \({{\textbf{c}}}+ {{\textbf{a}}}_3 = {{\textbf{c}}}'' + {{\textbf{a}}}_2\). So, \({{\textbf{b}}}+ {{\textbf{a}}}_3 + {{\textbf{a}}}_4 = {{\textbf{c}}}'' + {{\textbf{a}}}_1 + {{\textbf{a}}}_2\) which implies \({{\textbf{b}}}+ {{\textbf{a}}}_3 + {{\textbf{a}}}_4 - ({{\textbf{a}}}_1 + {{\textbf{a}}}_2) \in {\mathcal{S}}\) or

    2. (b)

      \({{\textbf{c}}}+ {{\textbf{a}}}_3 = {{\textbf{c}}}'' + {{\textbf{a}}}_4\). So, \({{\textbf{b}}}+ {{\textbf{a}}}_3 + {{\textbf{a}}}_4 = {{\textbf{c}}}'' + {{\textbf{a}}}_4 + {{\textbf{a}}}_1\) which implies \({{\textbf{c}}}' + {{\textbf{a}}}_2 = {{\textbf{b}}}+ {{\textbf{a}}}_3 = {{\textbf{c}}}'' + {{\textbf{a}}}_1\). Moreover, since the coefficient \(f_{24} {\textbf{t}}^{{{\textbf{a}}}_4} - f_{12} {\textbf{t}}^{{{\textbf{a}}}_1} + f_{23} {\textbf{t}}^{{{\textbf{a}}}_3}\) of \({{\textbf{e}}}_2\) in \(\phi _2({\textbf{f}})\) must be zero, there exists \({{\textbf{c}}}''' \in {\mathcal{S}}\) such that \({{\textbf{c}}}+ {{\textbf{a}}}_3 = {{\textbf{c}}}''' + {{\textbf{a}}}_4\). So \({{\textbf{b}}}+ {{\textbf{a}}}_3 + {{\textbf{a}}}_4 = {{\textbf{c}}}''' + {{\textbf{a}}}_4 + {{\textbf{a}}}_1\) which implies \({{\textbf{c}}}' + {{\textbf{a}}}_2 = {{\textbf{b}}}+ {{\textbf{a}}}_3 = {{\textbf{c}}}''' + {{\textbf{a}}}_1\). Therefore, \({{\textbf{b}}}-{{\textbf{a}}}_1 = {{\textbf{c}}}'''-{{\textbf{a}}}_3 = {{\textbf{c}}}- {{\textbf{a}}}_4\), that is \({\textbf{f}} - \phi _3({\textbf{t}}^{{{\textbf{b}}}-{{\textbf{a}}}_1} {{\textbf{e}}}_{134}) = {\textbf{f}} - {\textbf{t}}^{{\textbf{b}}}{{\textbf{e}}}_{34} + {\textbf{t}}^{{{\textbf{c}}}'''} {{\textbf{e}}}_{14} - {\textbf{t}}^{{{\textbf{c}}}} {{\textbf{e}}}_{i3} \in \ker \phi _2 {\setminus } {\text {Im}} \phi _3\). Thus, we may suppose that \({{\textbf{c}}}+ {{\textbf{a}}}_3 = {{\textbf{c}}}''' + {{\textbf{a}}}_2\) and, consequently, \({{\textbf{b}}}+ {{\textbf{a}}}_3 + {{\textbf{a}}}_4 = {{\textbf{c}}}''' + {{\textbf{a}}}_1 + {{\textbf{a}}}_2\) which implies \({{\textbf{b}}}+ {{\textbf{a}}}_3 + {{\textbf{a}}}_4 - ({{\textbf{a}}}_1 + {{\textbf{a}}}_2) \in {\mathcal{S}}\).

Conversely, by Lemmas 6.3 and 6.2, \(\ker \phi _2 {\setminus } {\text {Im}} \phi _3 \ne \varnothing\). So, \(1 \le {\text {depth}}(\Bbbk [{\mathcal{S}}]) \le 2\), and since, by Proposition 3.4\({\text {depth}}(\Bbbk [{\mathcal{S}}]) \ne 1\), we are done.

Finally, by Proposition 3.8 we conclude that \({\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\) has a maximal element with respect to \(\preceq _{\mathcal{S}}\). \(\square\)

Unlike the case \(d=3\), the existence of a maximal element is not sufficient to guarantee depth two as the following example shows.

Example 6.5

Let \({\mathcal{S}} \subset {\mathbb {N}}^4\) be the affine semigroup generated by the columns \({{\textbf{a}}}_1, \ldots , {{\textbf{a}}}_7\) of the following matrix

$$\begin{aligned} A = \left( \begin{array}{ccccccc} 2 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 5 &{}\quad 7 &{}\quad 5 \\ 0 &{}\quad 2 &{}\quad 0 &{}\quad 0 &{}\quad 5 &{}\quad 5 &{}\quad 7 \\ 0 &{}\quad 0 &{}\quad 2 &{}\quad 0 &{}\quad 7 &{}\quad 5 &{}\quad 7 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 2 &{}\quad 7 &{} \quad 7 &{}\quad 5 \end{array} \right) . \end{aligned}$$

Since \({{\textbf{a}}}_5+{{\textbf{a}}}_1={{\textbf{a}}}_3+{{\textbf{a}}}_6\) and \({{\textbf{a}}}_5+{{\textbf{a}}}_2={{\textbf{a}}}_4+{{\textbf{a}}}_7\), \({\text {Ap}}( {\mathcal{S}},{{\textbf{a}}}_3)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_4)\) has a maximal element by Proposition 3.8. Moreover \(\Bbbk [{\mathcal{S}}]\) is not Cohen–Macaulay, by Proposition 3.5. One can easily check that \(x_3,x_4,x_1+x_2\) is a regular sequence on \(\Bbbk [{\mathcal{S}}]\), which implies \({\text {depth}}(\Bbbk [{\mathcal{S}}])=3\). This shows that the last condition on \({{\textbf{b}}}\) in the second statement of Theorem 6.4 is necessary.

Conditions (1) and (2) in Theorem 6.4 have a clear combinatorial meaning; For a better understanding of the following result, it is convenient to take into account the notation and the results established at the beginning of Sect. 4.

Proposition 6.6

If \(d=4\), then there exist \(\{i,j,k,l\}=\{1,2,3,4\}\) and \({{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i) \cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\) satisfying conditions (1) or (2) in Theorem 6.4 if and only if there exist \({\textbf{c}}\) and \(\{i,j,k,l\}=\{1,2,3,4\}\) such that \(T_{{\textbf{c}}}\) is one of the following:

  1. (a)

    The hollow triangle with vertices ik and l.

  2. (b)

    The hollow triangle with vertices ik and l and the edge \(\{i,j\}\).

  3. (c)

    A hollow tetrahedron ijk and l without, at least, the faces \(\{i,k,l\}\) and \(\{j,k,l\}\).

  4. (d)

    The square with edges \(\{i,j\}, \{j,k\}, \{k,l\}\) and \(\{i,l\}\), and the edge (diagonal) \(\{i,k\}\).

  5. (e)

    The square with edges \(\{i,j\}, \{j,k\}, \{k,l\}\) and \(\{i,l\}\).

Proof

Suppose that there exists a permutation \(\{i,j,k,l\}=\{1,2,3,4\}\) and \({{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\) such that \({{\textbf{b}}}+{{\textbf{a}}}_k-{{\textbf{a}}}_i\) and \({{\textbf{b}}}+{{\textbf{a}}}_l-{{\textbf{a}}}_i\) belong to \({\mathcal{S}}\). In this case, if \({{\textbf{b}}}+ {{\textbf{a}}}_k + {{\textbf{a}}}_l \in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_j)\), then \(T_{{{\textbf{b}}}+ {{\textbf{a}}}_k + {{\textbf{a}}}_l}\) is the hollow triangle with vertices ik and l; otherwise either \(T_{{{\textbf{b}}}+ {{\textbf{a}}}_k + {{\textbf{a}}}_l}\) is the hollow triangle without vertices ik and l and the edge \(\{i, j\}\) or \(T_{{{\textbf{b}}}+ {{\textbf{a}}}_k + {{\textbf{a}}}_l}\) contains two hollow triangles; namely, the one with vertices ik and l and the one with vertices jk and l. Suppose now that there exists a permutation \(\{i,j,k,l\}=\{1,2,3,4\}\) and \({{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_i)\cap {\text {Ap}}({\mathcal{S}},{{\textbf{a}}}_j)\) such that \({{\textbf{b}}}+{{\textbf{a}}}_k-{{\textbf{a}}}_i, {{\textbf{b}}}+{{\textbf{a}}}_l-{{\textbf{a}}}_j\) and \({{\textbf{b}}}+{{\textbf{a}}}_k+{{\textbf{a}}}_l-({{\textbf{a}}}_i+{{\textbf{a}}}_j)\) belong to \({\mathcal{S}}\). In this case, if \({{\textbf{b}}}+ {{\textbf{a}}}_l \in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i)\) and \({{\textbf{b}}}+ {{\textbf{a}}}_k \in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_j)\), then \(T_{{{\textbf{b}}}+ {{\textbf{a}}}_k + {{\textbf{a}}}_l}\) is a square without interior; otherwise, we arrive at one of the configurations of the previous cases.

In cases (a)–(d), we have, among other conditions, that \({{\textbf{b}}}= {{\textbf{c}}}- {{\textbf{a}}}_k - {{\textbf{a}}}_l \in \mathcal{\mathcal{S}}\) and that both \({{\textbf{b}}}+ {{\textbf{a}}}_k - {{\textbf{a}}}_i = {{\textbf{c}}}- {{\textbf{a}}}_i -{{\textbf{a}}}_l =\) and \({{\textbf{b}}}+ {{\textbf{a}}}_l - {{\textbf{a}}}_i = {{\textbf{c}}}- {{\textbf{a}}}_i - {{\textbf{a}}}_k\) belongs to \({\mathcal{S}}\), and that \({{\textbf{b}}}- {{\textbf{a}}}_i = {{\textbf{c}}}- {{\textbf{a}}}_i - {{\textbf{a}}}_k - {{\textbf{a}}}_l \not \in {\mathcal{S}}\) and \({{\textbf{b}}}- {{\textbf{a}}}_j = {{\textbf{c}}}- {{\textbf{a}}}_j - {{\textbf{a}}}_k - {{\textbf{a}}}_l = \not \in {\mathcal{S}}\), that is, \({{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_i) \cap {\text {Ap}}({\mathcal{S}}, {{\textbf{a}}}_j)\); so, condition (1) in Theorem 6.4 holds. And, in case (e), we have the previous conditions plus \({{\textbf{b}}}+ {{\textbf{a}}}_k + {{\textbf{a}}}_l - {{\textbf{a}}}_i - {{\textbf{a}}}_j = {{\textbf{c}}}- {{\textbf{a}}}_i - {{\textbf{a}}}_j \in {\mathcal{S}}\); so, condition (2) in Theorem 6.4 holds. \(\square\)

Observe that cases (a)–(b) implies that there exists \({{\textbf{c}}}\in {\mathcal{S}}\) such that \({\widetilde{H}}_1(T_{{{\textbf{c}}}}) \ne 0\), that is, \({{\textbf{c}}}\in D(1)\). However, conditions (a)–(e) in Proposition 6.6 may be not replaced by \(D(1) \ne \varnothing\) because the following configuration for \(T_{\textbf{c}}\) such that \({{\textbf{c}}}\in D(1)\) does not appear in Proposition 6.6 (Fig. 1).

Fig. 1
figure 1

Simplicial complex with four vertices consisting of one triangle and one hollow triangle

Taking into account the results about depth two, we dare to propose the following optimistic conjecture.

Conjecture 6.7

If \({\text {depth}}(\Bbbk [{\mathcal{S}}]) = 2,\) then there exists \(E' \subseteq E\) of cardinality 2 such that \({\text {Ap}}({\mathcal{S}},E')\) has a maximal element with respect to \(\preceq _{{\mathcal{S}}}\).

The conjecture holds for \(d \le 4\). Indeed, for \(d \le 2\), because \({\text {Ap}}({\mathcal{S}},E)\) is a finite set (see, e.g. [14, Proposition 3.2.] or [1, Theorem 2.6]), for \(d=3\) by Theorem 5.2 and for \(d=4\) by Theorem 6.4.

We emphasize that we cannot replace 2 by 3 in Conjecture 6.7 as the following example shows.

Example 6.8

Let \({\mathcal{S}} \subset {\mathbb {N}}^4\) be the affine semigroup generated by the columns \({{\textbf{a}}}_1, \ldots , {{\textbf{a}}}_6\) of the following matrix

$$\begin{aligned} A = \left( \begin{array}{ccccccc} 2 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 5 &{}\quad 7 \\ 0 &{}\quad 2 &{}\quad 0 &{}\quad 0 &{}\quad 5 &{}\quad 7 \\ 0 &{}\quad 0 &{}\quad 2 &{}\quad 0 &{}\quad 7 &{}\quad 5 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 2 &{}\quad 7 &{}\quad 5 \end{array} \right) . \end{aligned}$$

Using Singular [4], one can compute a minimal system of generators of \(I_{\mathcal{A}}\) and then easily check that \({\text {depth}}(\Bbbk [{\mathcal{S}}])=3\) and, with the help of Proposition 3.1, that \({\text {Ap}}({\mathcal{S}},\{i,j,k\})\) does not have maximal elements for every \(1 \le i< j < k \le 4\).

In spite of the above example, it may happen that \(\Bbbk [{\mathcal{S}}]\) have depth three and \({\text {Ap}}({\mathcal{S}},E')\) has a maximal element for some \(E' \subset E\) of cardinality three.

Example 6.9

Let \({\mathcal{S}} \subset {\mathbb {N}}^4\) be the affine semigroup generated by the columns \({{\textbf{a}}}_1, \ldots , {{\textbf{a}}}_8\) of the following matrix

$$\begin{aligned} A = \left( \begin{array}{cccccccc} 2 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 3 &{}\quad 4 &{}\quad 2 &{}\quad 5\\ 0 &{}\quad 3 &{}\quad 0 &{}\quad 0 &{}\quad 3 &{}\quad 1 &{}\quad 3 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad 2 &{}\quad 0 &{}\quad 3 &{}\quad 2 &{}\quad 1 &{}\quad 7\\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 3 &{}\quad 3 &{}\quad 5 &{}\quad 7 &{}\quad 1 \end{array} \right) . \end{aligned}$$

Using Singular [4], one can compute a minimal system of generators of \(I_{\mathcal{A}}\) and then easily check that \({\text {depth}}(\Bbbk [{\mathcal{S}}])=3\).

Let \({{\textbf{b}}}= 2 {{\textbf{a}}}_6+ {{\textbf{a}}}_7 + 5 {{\textbf{a}}}_8\), using the GAP ( [7]) package numericalsgps ( [5]), one can check that \({\textbf{b}} - {{\textbf{a}}}_i \not \in {\mathcal{S}}\) for \(i \in \{1,3,4\}\), that is, \({\textbf{b}} \in {\text {Ap}}({\mathcal{S}},\{1,3,4\})\), and that \({{\textbf{b}}}+ {{\textbf{a}}}_i \not \in {\text {Ap}}({\mathcal{S}},\{1,3,4\})\) for every \(i \in \{1, \ldots , 8\}\). So, \({{\textbf{b}}}\) is a maximal element of \({\text {Ap}}({\mathcal{S}},\{1,3,4\})\) with respect to \(\preceq _{\mathcal{S}}\).

This last result gives a necessary and sufficient condition for what illustrated in the above example occur.

Proposition 6.10

Let \(d =4\). If \({\text {depth}}(\Bbbk [{\mathcal{S}}]) = 3\), then \({\text {Ap}}({\mathcal{S}},E')\) has a maximal element with respect to \(\preceq _{{\mathcal{S}}}\) for some \(E' \subset E\) of cardinality three if and only if there exists \({{\textbf{b}}}\in {\mathcal{S}}\) such that \(T_{{\textbf{b}}}\) is not connected and has, at least, an isolated vertex.

Proof

If \({\text {depth}}(\Bbbk [{\mathcal{S}}])=3\), then, by [3, Theorem 4.1], there exists \({{\textbf{b}}}\in D(0)\), that is, there exists \({{\textbf{b}}}\in {\mathcal{S}}\) such that \(T_{{\textbf{b}}}\) is disconnected.

Suppose that the simplicial complex \(T_{{\textbf{b}}}\) does not have isolated vertices for every \({{\textbf{b}}}\in D(0)\). We claim that \({{\textbf{c}}}+ u {{\textbf{a}}}_l \in {\text {Ap}}({\mathcal{S}},E {\setminus }\{{{\textbf{a}}}_l\})\) for every \(u \in {\mathbb {N}}, {{\textbf{c}}}\in {\text {Ap}}({\mathcal{S}},E)\) and \(1 \le l \le 4\). Contrary, let us suppose that there exist \(u \in {\mathbb {N}}, {{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}},E)\) and \(1 \le l \le 4\) such that \({{\textbf{b}}}+ u\, {{\textbf{a}}}_l \not \in {\text {Ap}}({\mathcal{S}},E {\setminus }\{{{\textbf{a}}}_l\})\); without loss of generality, we also assume that u is the smallest with this property. Since \({{\textbf{b}}}+ u\, {{\textbf{a}}}_l \not \in {\text {Ap}}({\mathcal{S}},E {\setminus }\{{{\textbf{a}}}_l\})\), there exists \(1 \le i \le 4\), such that \({{\textbf{b}}}+ u\, {{\textbf{a}}}_l - {{\textbf{a}}}_i \in {\mathcal{S}}\) and, by the minimality of u, \({{\textbf{b}}}+ u {{\textbf{a}}}_l - {{\textbf{a}}}_j - {{\textbf{a}}}_l \not \in {\mathcal{S}}\) for every \(1 \le j \le 4\). So, if \({{\textbf{c}}}= {{\textbf{b}}}+ u {{\textbf{a}}}_l\), we have that \({{\textbf{a}}}_i\) and \({{\textbf{a}}}_l\) are vertices of \(T_{{\textbf{c}}}\) and that \({{\textbf{a}}}_l\) is isolated. Therefore \({{\textbf{c}}}\in D(0)\) and \(T_{{\textbf{c}}}\) has at least one isolated vertex in contradiction to the hypothesis. Now, given \(E'=E {\setminus } \{{{\textbf{a}}}_l\}\) and \({{\textbf{b}}}\in {\text {Ap}}({\mathcal{S}},E')\), let \(v \in {\mathbb {N}}\) be the smallest such that \({{\textbf{c}}}={{\textbf{b}}}- v {{\textbf{a}}}_l \in {\mathcal{S}}\). Since \({{\textbf{c}}}\in {\text {Ap}}({\mathcal{S}},E)\), by our previous claim, we have that \({{\textbf{c}}}+ u {{\textbf{a}}}_l \in {\text {Ap}}({\mathcal{S}},E')\) for every \(u \in {\mathbb {N}}\). In particular, if \(u > v,\) then \({{\textbf{b}}}\preceq _{{\mathcal{S}}} {{\textbf{b}}}+ (u-v){{\textbf{a}}}_l \in {\text {Ap}}({\mathcal{S}},E')\). Thus, \({\text {Ap}}({\mathcal{S}},E')\) does not have maximal elements.

Conversely, if there exists \({{\textbf{b}}}\in D(0)\) such that \(T_{{\textbf{b}}}\) has, at least, an isolated vertex, say \({{\textbf{a}}}_l\), then we have that \({{\textbf{b}}}\not \in {\text {Ap}}({\mathcal{S}},\{{{\textbf{a}}}_i,{{\textbf{a}}}_j,{{\textbf{a}}}_k\})\) and \({{\textbf{b}}}- {{\textbf{a}}}_l \in {\text {Ap}}({\mathcal{S}},\{{{\textbf{a}}}_i,{{\textbf{a}}}_j,{{\textbf{a}}}_k\})\) for some permutation \(\{i,j,k,l\} = \{1,2,3,4\}\); thus, by Proposition 3.8, we conclude that \({\text {Ap}}({\mathcal{S}},\{{{\textbf{a}}}_i,{{\textbf{a}}}_j,{{\textbf{a}}}_k\})\) has a maximal element, for some \(1\le i<j<k\le 4\). \(\square\)