1 Introduction

The study of good semigroups was formerly motivated by the fact that they are the value semigroups of one-dimensional analytically unramified rings (such as the local rings of an algebraic curve). The definition appeared the first time in [1] and these objects were widely studied in several works [2, 5, 10, 11, 17]. In [1], the authors proved that the class of good semigroups is actually larger than the one of value semigroups. Thus, such semigroups can be seen as a natural generalization of numerical semigroups and can be studied using a more combinatorial approach without necessarily referring to the ring theory context. In recent works [8, 9, 19], some notable elements and properties of numerical semigroups have been generalized to the case of good semigroups.

The main purpose of this work is to generalize the definitions of length and genus of an ideal of a numerical semigroup to the case of good ideals of a good semigroup studying also the relationships between them and the other objects defined in the previous works in the case of subsemigroups of \({\mathbb {N}}^2\).

If R is an analytically unramified ring, the value semigroup \(v(R)=\{\varvec{v(r)}\) | r is not a zerodivisor of \(R\}\) is a good semigroup [7]. If I is a relative good ideal of R, the extension \(I\subseteq {\bar{I}}\) is of finite type and the conductor ideal is \(C(I)=I:{\bar{I}}\), where both closure and colon operations are considered in the ring of total fractions. For a fixed \(\varvec{\alpha }\in {\mathbb {Z}}^d\), we denote by \(I(\varvec{\alpha })=\{r\in R| v(r)\ge \varvec{\alpha }\}\). If \(\varvec{c}(v(I))\) is the conductor of the ideal v(I) of v(R), we have \(v(I:{\bar{I}})=v(I({\varvec{c}}(I)))\). In the one-branch case, given a relative ideal I of R, we have that the length of the R-module \(l_R(I/C(I))\) is equal to n(v(I)), where n(v(I)) is the cardinality of the set of small elements of the numerical semigroup v(I). For this reason, given a relative ideal E of a numerical semigroup S, it is natural to call length of E the number n(E). On the other hand, the genus of E is defined as the number of gaps in E and it is denoted by g(E). It is straightforward that \(g(E)+n(E)={\text {c}}(E)\).

In Sect. 2 we recall the definition of good semigroup and we fix the basic notations. In [7] it is defined as a function of distance d between relative good ideals in a good semigroup S and it is proved that if S is a semigroup of values of a ring R, given a good relative ideal I of R, we have \(l_R(I/C(I))=d(v(I){\setminus } v(C(I)))\). For this reason, taking into account the additivity of the function d, we can generalize in a natural way the definition of length and genus to the case of good ideals of \({\mathbb {N}}^d\) (not necessarily in case of the semigroup of values of a ring) as it was done in [26] for Arf semigroups. Given a relative good ideal \(E\subseteq S\), we define, respectively, length and genus of E as \(l(E)=d(E{\setminus } E({\varvec{c}}(E)))\) and \(g(E)=d({\mathbb {N}}^d{\setminus } E({\varvec{c}}(E))\). We conclude the section giving a slightly different version of an explicit method to compute length and genus introduced in [11]. In [26], it was computed the number of good Arf semigroups with n branches having a fixed genus using the untwisted multiplicity trees defined in [25]. Our aim is to obtain a similar result for a general good semigroup. In [3], it is presented a method to compute all numerical semigroups up to a fixed genus building a tree where each new level is obtained removing minimal generators larger than the Frobenius number from the semigroups of the previous level. In Sect. 3, we repeat the same idea for good semigroups \(S\subseteq {\mathbb {N}}^2\); in this case, the tracks of the good semigroup, defined in [19], will have the role that minimal generators played in case of numerical one. To do this, we prove that every good semigroup of genus g can be obtained removing a track from one of genus \(g-1\) (Theorem 3.4) and that by removing a track from a good semigroup of genus g we obtain a good semigroup of genus \(g+1\) (Theorem 3.5). Then, we explain how to build the tree of good semigroups, underlining the differences with the numerical case. We report the results regarding the computation of the number of local good semigroups with a fixed genus up to genus 27, produced with an algorithm written in “GAP” [22] using the package “NumericalSgps” [12]. In Sect. 4 we study the relationships between genus, length and other notable elements of a good semigroup. In [15], it was proved the inequality \(c(S)\le (t(S)+1)l(S)\) for numerical semigroups. The type of a good semigroup was originally defined in [1] for the good semigroups such that \(S-M\) is a relative good ideal of S and it was recently generalized in [8]. We conclude the paper asking if this inequality holds for good semigroups with respect to the generalized version of the definition of the type. We definitely prove that length, genus and type satisfy the relationships \(t(S)+l(S)-1\le g(S)\le t(S)l(S)\) also in the case of good semigroups (Proposition 4.6 and Corollary 4.7). To conclude the paper we observe that the definitions and the algorithm given in the previous section give us the possibility to introduce an analogue of the Wilf conjecture for good semigroups. In this case, we found counterexamples for the conjecture (Example 4.2) but the problem remains open for good semigroups which are value semigroups of a ring.

2 Length and Genus of a Good Ideal

We begin recalling the definition of good semigroup introduced in [1].

Definition 2.1

A submonoid S of \(({\mathbb {N}}^d,+)\) is a good semigroup if it satisfies the following properties:

  1. (G1)

    If \(\varvec{\alpha }=(\alpha _1,\ldots ,\alpha _d), \varvec{\beta }=(\beta _1,\ldots ,\beta _d)\) belong to S, then \(\min (\varvec{\alpha };\varvec{\beta }) :=(\min \{\alpha _1,\beta _1\},\ldots , \min \{\alpha _d,\beta _d\})\in S\);

  2. (G2)

    There exists \(\varvec{\delta } \in {\mathbb {N}}^d\) such that \(\varvec{\delta }+{\mathbb {N}}^d \subseteq S\);

  3. (G3)

    If \(\varvec{\alpha }=(\alpha _1,\ldots ,\alpha _d),\varvec{\beta }=(\beta _1,\ldots ,\beta _d)\in S\); \(\varvec{\alpha }\ne \varvec{\beta }\) and \(\alpha _i=\beta _i\) for some \(i\in \{1,\ldots ,d\}\); then there exists \(\varvec{\epsilon } \in S\) such that \(\epsilon _i>\alpha _i=\beta _i\) and \(\epsilon _j\ge \min \{\alpha _j,\beta _j\}\) for each \(j\ne i\) (if \(\alpha _j\ne \beta _j\), the equality holds).

Furthermore, we always assume to work with a local good semigroup S, that is, if \(\varvec{\alpha }=(\alpha _1,\ldots ,\alpha _d)\in S\) and \(\alpha _i=0\) for some \(i\in \{1,\ldots ,d\}\), then \(\varvec{\alpha }=\varvec{0}=(0,\ldots ,0)\). As a consequence of property (G2), the element \(\varvec{c(S)}=\min \{\varvec{\delta }| S\supseteq \varvec{\delta }+{\mathbb {N}}^d\}\) is well defined and it is called the conductor of the good semigroup. The element \(\varvec{f(S)}=\varvec{c(S)}-\varvec{1}\), where \(\varvec{1}=(1,\ldots ,1)\), is called the Frobenius vector of the good semigroup. On the elements of \({\mathbb {N}}^d\) is naturally defined a partial order relation induced by the usual order on \({\mathbb {N}}\). Hence, given \(\varvec{\alpha }=(\alpha _1,\ldots \alpha _d)\), \(\varvec{\beta }=(\beta _1,\ldots ,\beta _d)\in S\), we write \(\varvec{\alpha }\le \varvec{\beta }\) if \(\alpha _i\le \beta _i\) for all \(i\in \{1,\ldots ,d\}\). It is possible to show that a good semigroup can be described by a finite set of elements, this set is denoted by \({\text {Small}}(S)=\{\varvec{\alpha }\in S| \varvec{\alpha }\le \varvec{c(S)}\}\) and its elements are called the small elements of S. The good semigroup having small elements \(\{\varvec{0}, \varvec{1}\}\) is a local good semigroup containing all the other ones, we denote it by \({\mathbb {N}}^d(1,\ldots ,1)\).

Following the notations reported in [7], we recall some definitions.

Let S be a good semigroup. If \(E\subseteq {\mathbb {Z}}^d\) is such that \(E+S\subseteq E\) and \(\varvec{\alpha } +E\subseteq S\) for some \(\varvec{\alpha }\in S\), then E is called a relative ideal of S. A relative ideal of S needs not to satisfy the properties (G1) and (G3) of good semigroups. A relative ideal E that does satisfy properties (G1) and (G3) will be called a relative good ideal. Given a good semigroup S and a relative good ideal E, two elements \(\varvec{\alpha },\varvec{\beta }\) in E are consecutive if there are no elements \(\varvec{\gamma } \in E\) such that \(\varvec{\alpha }<\varvec{\gamma }<\varvec{\beta }\).

An ordered sequence of \(n+1\) elements in E:

$$\begin{aligned} \varvec{\alpha }=\varvec{\alpha ^{(0)}}<\varvec{\alpha ^{(1)}}<\cdots <\varvec{\alpha ^{(n)}} \end{aligned}$$

is called a chain of length n in E; furthermore it is called saturated in E if all its elements are consecutive in E.

In [7] it is proved that, if \(\varvec{\alpha },\varvec{\beta }\in E\) with \(\varvec{\alpha }<\varvec{\beta }\), then all the saturated chains between \(\varvec{\alpha }\) and \(\varvec{\beta }\) have the same length. This common length is denoted by \(d_E(\varvec{\alpha },\varvec{\beta })\).

Given two relative good ideals \(E\supseteq F\), we denote by \(\varvec{e(E)},\varvec{e(F)}\) the minimal elements of E and F, respectively; for \(\varvec{\alpha }\in {\mathbb {N}}^d\) big enough one has that \(\varvec{\alpha }\in E\) and \(\varvec{\alpha }\in F\). Furthermore, in [7] it is proved that the number \(d_E(\varvec{e(E)},\varvec{\alpha })-d_F(\varvec{e(F)},\varvec{\alpha })\) is independent of the choice of \(\varvec{\alpha }\). So we can define

$$\begin{aligned} d(E{\setminus } F):=d_E(\varvec{e(E)},\varvec{\alpha })-d_F(\varvec{e(F)},\varvec{\alpha }). \end{aligned}$$

Given \(\varvec{\alpha } \in {\mathbb {N}}^d\), we denote by \(E(\varvec{\alpha })=\{\varvec{\beta }\in E: \varvec{\beta }\ge \varvec{\alpha }\}\). The function \(d(-{\setminus }-)\) satisfies the following properties:

Proposition 2.2

[7]

  1. (1)

    If \(E\supseteq F\supseteq G\) are good relative ideals of S, then we have \(d(E {\setminus } G) = d(E {\setminus } F) + d(F {\setminus } G)\).

  2. (2)

    If \(E\supseteq F\) are good relative ideals of S, then \(d(E {\setminus } F) = 0\) if and only if \(E=F\).

  3. (3)

    Let us consider E, a good relative ideal of S and \(\varvec{\alpha }\in {\mathbb {Z}}^d\). If \(\varvec{\alpha }^i=\varvec{\alpha }+\varvec{e}^i\), where \(e_j^i=0\) if \(j\ne i\) and \(e_i^i=1\), then \(d(E(\varvec{\alpha }){\setminus } E(\varvec{\alpha }^i))\le 1\), where the equality holds if and only if \(\{\varvec{\beta }\in E | \beta _i=\alpha _i \text { and } \beta _j\ge \alpha _j, \text { if } j\ne i\}\ne \emptyset \).

Given a good ideal E, there always exists a minimal element \(\varvec{c(E)}\) such that if \(\varvec{\alpha }\ge \varvec{c(E)}\), then \(\varvec{\alpha }\in E\). The element \(\varvec{c(E)}\) is called the conductor of the ideal E and the ideal \(C(E):=E(\varvec{c(E)})\) is called the conductor ideal of E. If \(\varvec{c(E)}=(c_1,\ldots , c_d)\), we denote by \(c_E:=c_1+\cdots +c_d\).

Definition 2.3

Given a good ideal E of a good semigroup \(S\subseteq {\mathbb {N}}^d\), we define the genus of E as the number \(g(E)=d({\mathbb {N}}^d{\setminus } E)\) and the length of E as the number \(l(E)=d(E{\setminus } C(E))\). In particular \(g(S)=d({\mathbb {N}}^d{\setminus } S)\) and \(l(S)=d(S{\setminus } C(S))\).

Remark 2.4

By Proposition 2.2(1), \(d({\mathbb {N}}^d{\setminus } C(E))=d({\mathbb {N}}^d{\setminus } E)+d(E{\setminus } C(E))\). Thus, we can write: \(g(E)=c_E-l(E)\).

Now we want to introduce a useful formula for the computation of the genus. As in [6] and in [19], we will work on the equivalent structure of semiring \(\Gamma _S\) to simplify the notation.

We consider the one-point compactification of the topological space \({\mathbb {N}}\), hence we set \({\overline{{\mathbb {N}}}}={\mathbb {N}}\cup \{\infty \}\) and we extend the natural order and the sum over \({\mathbb {N}}\) to \({\overline{{\mathbb {N}}}}\), setting, respectively, \(a<\infty \) for all \(a\in {\mathbb {N}}\) and \(x+\infty =\infty +x=\infty \).

Let \(S\subseteq {\mathbb {N}}^d\) be a good semigroup with \(\varvec{c(S)}=(c_1,\ldots ,c_d)\). Denoting by \(I=\{1,\ldots d\}\) and taking \(U\subseteq I\) we introduce the sets \(S^{\infty (U)}\subseteq {\overline{{\mathbb {N}}}}^d\) as the sets containing the limits of elements of S in \({\mathbb {N}}^d\) with fixed projection \(\alpha _i\), for all \(i\in U\). More explicitly we say that the vector \((\alpha _{1},\ldots ,\alpha _{d})\in S^{\infty (U)}\) if and only if \(\alpha _{j}=\infty \) for all \(j\notin U\) and there exists \(\varvec{\beta } \in S\) such that \(\beta _j=\alpha _j\) if \(j\in U\) and \(\beta _j= c_j\) if \(j\notin U\).

We set

$$\begin{aligned} S^{\infty }:=\bigcup _{U\subsetneq I} S^{\infty (U)}, \end{aligned}$$

and we notice that \(S^{\infty (\emptyset )}=\{\varvec{\infty }=(\infty ,\ldots ,\infty )\}\) and \(S^{\infty (I)}=S\). Hence we denote by \(\Gamma _S:=S\cup S^{\infty }\) the closure of S in \({\mathbb {N}}^d\). Given \(\varvec{\alpha }=(\alpha _1,\ldots ,\alpha _d),\) \(\varvec{\beta }=(\beta _1,\ldots ,\beta _d)\in \Gamma _S\), we introduce the operations

$$\begin{aligned}&\varvec{\alpha }\oplus \varvec{\beta }:=\min \{\varvec{\alpha },\varvec{\beta }\} =(\min \{\alpha _1,\beta _1\},\ldots ,\min \{\alpha _d,\beta _d\}), \\&\varvec{\alpha }\odot \varvec{\beta }:=\varvec{\alpha }+\varvec{\beta }. \end{aligned}$$

It is easy to prove that \((\Gamma _S,\oplus ,\odot )\) is a semiring.

Given a subset E of a good semigroup \(S\subseteq {\mathbb {N}}^d\), we denote by

$$\begin{aligned}E_j=\{e_j|(e_1,\ldots ,e_d)\in E\},\end{aligned}$$

the jth projection of E. We introduce the following numbers:

$$\begin{aligned} l_S(E_j)= & {} |\{\alpha \in E_j|\alpha _j< c_j\}|,\\ g_S(E_j)= & {} |\{\alpha \in {\mathbb {N}}{\setminus } E_j|\alpha _j< c_j\}|. \end{aligned}$$

Remark 2.5

It is easy to notice that, given \(U \subseteq I\), the subset of S defined as

$$\begin{aligned} E^{U}=\{ \varvec{\alpha }=(\alpha _1,\ldots ,\alpha _d) \in S | \alpha _j \ge c_j \forall j\notin U\}, \end{aligned}$$

is actually a good relative ideal of S. Furthermore, considering \(j \in U\), we have that the jth projection \(S_j^{\infty (U)}\) of \(S^{\infty (U)}\) is equal to \(E^{(U)}_j\).

In pursuit of an idea reported in [11], with the following recursive formulas we can reduce to compute the length and the genus of a good semigroup by only considering small elements of numerical ones.

Proposition 2.6

Given a good semigroup \(S\subseteq {\mathbb {N}}^d\), if we denote by \(U_i=\{i,\ldots ,d\}\subseteq I\), we have:

$$\begin{aligned} l(S)= & {} \sum _{i=1}^d l_S(S^{\infty (U_i)}_i),\\ g(S)= & {} \sum _{i=1}^d g_S(S^{\infty (U_i)}_i). \end{aligned}$$

Proof

Let us consider the chain from \(\varvec{0}\) to \(\varvec{c(S)}=(c_1,\ldots ,c_d)\), where the elements have the form \((i_1,\ldots ,i_j,\ldots ,i_d)\) with \(0\le i_j\le c_j\), ordered with respect the lexicographical order on \({\mathbb {N}}^d\).

We consider the elements of the chain having the form \((i_1,0,\ldots ,0)\) with \(i_1\in \{0,\ldots ,c_1-1\}\), as a consequence of Proposition 2.2(3), we have:

$$\begin{aligned} d(S((i_1,0,\ldots ,0)){\setminus } S((i_1+1,0,\ldots ,0)))=1 \Leftrightarrow \\ \{\varvec{\beta }\in S| \beta _1=i_1, \beta _k\ge 0,k\ne 1\}\ne \emptyset \Leftrightarrow \\ \text {there exists an element of the form } (i_1,\alpha _2,\ldots ,\alpha _d)\in S. \end{aligned}$$

Thus, by Proposition 2.2(1), we have:

$$\begin{aligned} d(S((0,0,\ldots ,0)){\setminus } S((c_1,0,\ldots ,0)))=l(S_1)=l_S(S^{\infty (U_1)}_1) \end{aligned}$$

Now, let us consider the elements of the chain of the form \((c_1,\ldots ,c_{j-1},i_j,\ldots ,\)0) with \(i_j\in \{1,\ldots ,c_j\}\). We observe that \((c_1,\ldots ,c_{j-1},i_j,\ldots ,0)\in S\) if and only if \((\infty ,\ldots ,\infty ,i_j,\ldots ,0)\in \Gamma _S\); so we have:

$$\begin{aligned}&d(S((c_1,\ldots ,c_{j-1},i_j,\ldots ,0)){\setminus } S((c_1,\ldots ,c_{j-1},i_j+1,\ldots ,0)))=1 \Leftrightarrow \\&\{\varvec{\beta }\in \Gamma _S| \beta _j=i_j, \beta _k\ge 0,k>j \text { and } \beta _k=\infty ,k<j \}\ne \emptyset \Leftrightarrow \\&\text {there exists an element of the form } (\infty ,\infty ,\ldots ,i_j,\alpha _{j+1},\ldots ,\alpha _d)\in \Gamma _S. \end{aligned}$$

We observe \(d(S((c_1,\ldots ,c_{j-1},0,\ldots ,0)){\setminus } S((c_1,\ldots ,c_{j-1},1,\ldots ,0)))=0\), otherwise there would be an element of the form \((c_1,\ldots ,c_{j-1},0,\alpha _{j+1},\ldots ,\alpha _d)\in S\), but this contradicts the locality of S. Hence, by Proposition 2.2(1), we have:

$$\begin{aligned} d(S((c_1,\ldots ,c_{j-1},1,\ldots ,0)){\setminus } S((c_1,\ldots ,c_{j-1},c_j,\ldots ,0)))=l_S(S^{\infty (U_j)}_j), \end{aligned}$$

Using again Proposition 2.2(1), by the definition of length we obtain:

$$\begin{aligned} l(S)=\sum _{i=1}^d l_S(S^{\infty (U_i)}_i). \end{aligned}$$

The proof of the second formula is analogous to the first one. \(\square \)

Example

Let us consider the good semigroup \(S\subseteq {\mathbb {N}}^4\) having small elements:

$$\begin{aligned} {\text {Small}}(S)= & {} \{ (2, 3, 2, 9 ), (2, 4, 4, 9), (2, 4, 6, 9 ), (2, 4, 8, 9 ), ( 2, 4, 9, 9 ), \\&( 2, 4, 10, 9), (4, 3, 2, 10), (4, 6, 4, 18 ), ( 4, 7, 6, 18), ( 4, 7, 8, 18 ), \\&(4, 7, 9, 18 ), (4, 7, 10, 18), (4, 8, 6, 18 ), (4, 8, 8, 18), (4, 8, 9, 18), \\&(4, 8, 10, 18 ), ( 6, 3, 2, 10 ), ( 6, 6, 4, 18 ), ( 6, 7, 6, 18 ), ( 6, 7, 8, 18 ),\\&( 6, 7, 9, 18 ), ( 6, 7, 10, 18 ), ( 6, 9, 6, 18 ), ( 6, 10, 8, 18 ), ( 6, 10, 9, 18 ), \\&(6, 10, 10, 18 ), ( 7, 3, 2, 10 ), ( 7, 6, 4, 18 ), ( 7, 7, 6, 18 ), ( 7, 7, 8, 18 ), \\&( 7, 7, 9, 18 ), ( 7, 9, 6, 18 ), ( 7, 10, 8, 18 ), ( 7, 10, 9, 18 ), ( 8, 3, 2, 10 ), \\&( 8, 6, 4, 18 ), ( 8, 7, 6, 18 ), ( 8, 7, 8, 18 ), ( 8, 7, 10, 18 ), ( 8, 9, 6, 18 ), \\&( 8, 10, 8, 18 ), ( 8, 10, 10, 18 )\} \end{aligned}$$

The conductor is \(\varvec{c(S)}=(8,10,10,18)\). We compute the sets \(S^{\infty (U_i)}_i\).

$$\begin{aligned} S^{\infty (U_1)}=S \end{aligned}$$
$$\begin{aligned} S_1^{\infty (U_1)}= & {} \{0,2,4,6,7,8=c_1,\rightarrow \}=S_1. \\ \end{aligned}$$

\(l_S(S_1^{\infty (U_1)})=5\), \(g_S(S_1^{\infty (U_1)})=3\).

$$\begin{aligned} S^{\infty (U_2)}= & {} \{( \infty , 3, 2, 10 ), ( \infty , 6, 4, 18 ), ( \infty , 7, 6, 18 ), ( \infty , 7, 8, 18 ),\\&( \infty , 7, 10, 18 ), ( \infty , 9, 6, 18 ), ( \infty , 10, 8, 18 ), ( \infty , 10, 10, 18 ), \ldots \}\\ S_2^{\infty (U_2)}= & {} \{3,6,7,9,10=c_2,\rightarrow \}, l_S(S_2^{\infty (U_2)})=4, g_S(S_2^{\infty (U_2)})=6.\\ S^{\infty (U_3)}= & {} \{( \infty , \infty , 8, 18 ), ( \infty , \infty , 10, 18 ), \ldots \}\\ S_3^{\infty (U_3)}= & {} \{8,10=c_3,\rightarrow \}, l_S(S_3^{\infty (U_3)})=1, g_S(S_3^{\infty (U_3)})=9.\\ S^{\infty (U_4)}= & {} \{( \infty , \infty , \infty , 18 ),\ldots \}\\ S_4^{\infty (U_4)}= & {} \{18=c_4,\rightarrow \}, l_S(S_4^{\infty (U_4)})=0, g_S(S_4^{\infty (U_4)})=18.\\ l(S)= & {} l_S(S_1^{\infty (U_1)})+l_S(S_2^{\infty (U_2)})+l_S(S_3^{\infty (U_3)}) +l_S(S_4^{\infty (U_4)})\\= & {} 5+4+1+0=10\\ g(S)= & {} g_S(S_1^{\infty (U_1)})+g_S(S_2^{\infty (U_2)})+g_S(S_3^{\infty (U_3)}) +g_S(S_4^{\infty (U_4)})\\ {}= & {} 3+6+9+18=36 \end{aligned}$$

Notations In case of good semigroups with two branches, we can write in a different way the formula for the computation of the genus. Now we introduce some notations regarding the good semigroups of \({\mathbb {N}}^2\) that will be useful also in the next section. Given a good semigroup \(S\subseteq {\mathbb {N}}^d\) and an element \(\varvec{\alpha }\in {\mathbb {N}}^d\), following the notation in [1], we set:

$$\begin{aligned} \Delta _i(\varvec{\alpha }):= & {} \{\varvec{\beta }\in {\mathbb {Z}}^{d}|\alpha _i=\beta _i \text { and } \alpha _j<\beta _j \text { for } j\ne i\}\\ \Delta (\varvec{\alpha }):= & {} \bigcup _{i=1}^d\Delta _i(\varvec{\alpha })\\ \Delta _i^S(\varvec{\alpha }):= & {} S\cap \Delta _i(\varvec{\alpha })\\ \Delta ^S(\varvec{\alpha }):= & {} S\cap \Delta (\varvec{\alpha }). \end{aligned}$$

Furthermore, we define:

$$\begin{aligned} {}_i\Delta (\varvec{\alpha }):= & {} \{\varvec{\beta }\in {\mathbb {Z}}^{d}|\alpha _i= \beta _i \text { and } \beta _j<\alpha _j \text { for } j\ne i\}\\ _i\Delta ^S(\varvec{\alpha }):= & {} S\cap _i\Delta (\varvec{\alpha }). \end{aligned}$$

Extending some of the previous definitions to infinite elements of \({\overline{{\mathbb {N}}}}^2\), we set

$$\begin{aligned} _1\Delta ((\alpha _1,\infty )):= & {} \{\varvec{\beta }\in {\mathbb {Z}}^{2}|\beta _1=\alpha _1 \}\\ _2\Delta ((\alpha _1,\infty )):= & {} \emptyset \\ _1\Delta ((\infty ,\alpha _2)):= & {} \emptyset \\ _2\Delta ((\infty ,\alpha _2)):= & {} \{\varvec{\beta }\in {\mathbb {Z}}^{2}|\beta _2=\alpha _2 \} \\ _i\Delta ^S(\varvec{\alpha }):= & {} S\cap {}_i\Delta (\varvec{\alpha }). \end{aligned}$$

From this point onwards, with a little abuse of notation, we denote again by S the semiring associated with the good semigroup S.

We will say that an element \(\varvec{\alpha }\in S {\setminus }{\varvec{0}}\) is irreducible if, from \(\varvec{\alpha }=\varvec{\beta }+\varvec{\gamma }\) with \(\varvec{\beta },\varvec{\gamma }\in S\), it follows \(\varvec{\alpha }=\varvec{\beta }\) or \(\varvec{\alpha }=\varvec{\gamma }\). An element that is not irreducible will be called reducible. We denote by I(S) the set of irreducible elements of S. An element \(\varvec{\alpha }\in S\) will be called maximal in S if \(\varvec{\alpha }\in S{\setminus } S^{\infty }\) and \(\Delta _S(\varvec{\alpha })=\emptyset \) (finite maximal), or if \(\varvec{\alpha }\in S^{\infty }\) (infinite maximal).

We denote by \(A_f(S)\) the set of finite maximals in S and by \(A(S):=A_f(S)\cup S^{\infty }\) the set of all maximals in S. Furthermore, we call \(I_A(S)\) the set of all irreducible maximals in S. It is easy to see that the set of irreducible maximals is finite and in [19] it is proved that S is generated by these elements as a semiring.

Corollary 2.7

If \(S\subseteq {\mathbb {N}}^2\) is a good semigroup, then \(g(S)=g(S_1)+g(S_2)+|A_f(S)|.\)

Proof

In this case, by the last proposition, it follows that \(g(S)=g(S_1)+g_S(S^{\infty (2)}_2)\). We notice that:

$$\begin{aligned} {\mathbb {N}}{\setminus } S^{\infty (2)}_2=({\mathbb {N}}{\setminus } S_2)\cup \{y| \max \{x |\exists (x,y)\in S\}<c_1\} \end{aligned}$$

and observing that the second set has the same cardinality as \(A_f(S)\), we obtain the thesis. \(\square \)

3 The Tree of Good Semigroups of \({\mathbb {N}}^2\) by Genus

In [3], it is presented as a method to compute all numerical semigroups up to a fixed genus building a tree where each new level is obtained removing minimal generators larger than the Frobenius number from the semigroups of the previous level.

In this section we want to repeat the same process with the good semigroups, building a tree of local good semigroups of \({\mathbb {N}}^2\), where the gth level of the tree collects all local good semigroups with genus g. To follow this idea, we will show that, in this case, the analogous of minimal generators are the tracks of the good semigroup originally defined in [19].

Here we will recall the definition:

Definition 3.1

Given \(\varvec{\alpha },\varvec{\beta }\in I_A(S)\) we say that \(\varvec{\alpha }\) and \(\varvec{\beta }\) are connected by a piece of track if they are not comparable, i.e. \(\varvec{\alpha } \not \le \varvec{\beta }\) and \(\varvec{\beta } \not \le \varvec{\alpha }\), and denoting \(\varvec{\gamma }=\varvec{\alpha } \oplus \varvec{\beta }\), we have \(\Delta ^S(\varvec{\gamma })\cap (S{\setminus } I(S))=\emptyset \).

Definition 3.2

Given \(\varvec{\alpha _1},\ldots ,\varvec{\alpha _n}\in I_A(S)\), with \(\alpha _{11}<\cdots <\alpha _{n1}\) we say that \(\varvec{\alpha _1},\ldots ,\varvec{\alpha _n}\) are connected by a track if we have:

  • \(_2\Delta ^S(\varvec{\alpha _1})\cap (S{\setminus } I(S))=\emptyset \);

  • \(_1\Delta ^S(\varvec{\alpha _n})\cap (S{\setminus } I(S))=\emptyset \);

  • \(\varvec{\alpha _i}\) and \(\varvec{\alpha _{i+1}}\) are connected by a piece of track for all \(i\in \{1,\ldots , n-1\}\).

In this case, denoted by \(\varvec{\gamma _i}=\varvec{\alpha _i}\oplus \varvec{\alpha _{i+1}}\) for \(i\in \{1,\ldots , n-1\}\), we set:

$$\begin{aligned} T((\varvec{\alpha _1},\ldots ,\varvec{\alpha _n}))=\{\varvec{\alpha _1}\} \cup {}_2\Delta ^S(\varvec{\alpha _1}) \cup \left( \cup _{i=1}^{n-1}\Delta ^S(\varvec{\gamma _i})\right) \cup {}_1\Delta ^S(\varvec{\alpha _n}) \cup \{\varvec{\alpha _n}\}, \end{aligned}$$

and we call this set the track connecting \(\varvec{\alpha _1},\ldots ,\varvec{\alpha _n}\).

We will simply say that \(T\subseteq S\) is a track in S if there exist \(\varvec{\alpha _1},\ldots ,\varvec{\alpha _n}\in I_A(S)\) such that T is the track connecting \(\varvec{\alpha _1},\ldots ,\varvec{\alpha _n}\). We call \(\varvec{\alpha _1}\) and \(\varvec{\alpha _n}\), respectively, the starting point and the ending point of the track. We include in the definition of tracks of S, also the sets of the form \(T((\varvec{\alpha }))={}_1{\Delta }^S(\varvec{\alpha })\cup \{\varvec{\alpha }\}\cup {}_2{\Delta }^S(\varvec{\alpha })\) consisting only of an element \(\varvec{\alpha }\in I_A(S)\) such that \(_i\Delta ^S(\varvec{\alpha })\cap (S{\setminus } I(S))=\emptyset \), with \(i=1,2\). In this case, the starting point and the ending point are the same. Noting that the previous definition implies that a track T of S never contains elements \(\varvec{\alpha }\) such that \(\varvec{\alpha } \ge \varvec{c(S)}+\varvec{e(S)}.\)

The following statement holds:

Lemma 3.3

Given a good semigroup S, and a track \(T=T((\varvec{\alpha _1},\ldots ,\varvec{\alpha _n}))\) in S, then, \(S'=S{\setminus } T\) is a good semigroup strictly contained in S.

Proof

See [19]. \(\square \)

Given \(A,B\subseteq {\mathbb {N}}^d\) we set:

$$\begin{aligned}\min (A,B)=\{\min (\varvec{\alpha },\varvec{\beta })| \varvec{\alpha }\in A, \varvec{\beta }\in B\}. \end{aligned}$$

In the next two theorems, we will establish a relationship between the tracks and the genus of a good semigroup.

Theorem 3.4

Each local good semigroup \(S' \ne {\mathbb {N}}^2(1,1)\) with genus \(g(S')\) can be obtained removing a track from a good semigroup with genus \(g(S')-1\).

Proof

Let us consider a semigroup \(S'\) with genus \(g(S')\); we have \(\varvec{c(S')}=(c_1,c_2)\) and \(\varvec{f(S')}=(c_1-1,c_2-1)=(f_1,f_2)\). We will distinguish two cases.

Case 1 \(\varvec{f(S')}\notin S'\). In this case, we introduce the following sets:

$$\begin{aligned}&X=\{x|(x,f_2)\in S'\}\quad \text { if }f_2 \ne 0, \\&Y=\{y|(f_1,y)\in S'\}\quad \text { if }f_1 \ne 0. \end{aligned}$$

Notice that \(S' \ne {\mathbb {N}}^2(1,1)\) implies that at least one among X and Y can be always considered. If X and Y are defined and not empty we consider, respectively: \({\tilde{x}}=\max \{x| (x,f_2)\in S'\}\) and \({\tilde{y}}=\max \{y| (f_1,y)\in S'\}\). If \(X=\emptyset \), we denote by

$$\begin{aligned} T_X=\Delta _2(\varvec{f(S')})\cup [({\mathbb {N}}^2{\setminus } S') \cap \min {(S',\Delta _2(\varvec{f(S')})})], \end{aligned}$$

otherwise we denote by

$$\begin{aligned} T_X=\Delta _2(\varvec{f(S')})\cup \Delta _1(({\tilde{x}},f_2))\cup {[}({\mathbb {N}}^2{\setminus } S') \cap \min {(S',\Delta _2(\varvec{f(S')})})]. \end{aligned}$$

If \(Y=\emptyset \), we denote by

$$\begin{aligned} T_Y=\Delta _1(\varvec{f(S')})\cup [({\mathbb {N}}^2{\setminus } S') \cap \min {(S',\Delta _1(\varvec{f(S')})})], \end{aligned}$$

otherwise we denote by

$$\begin{aligned} T_Y=\Delta _1(\varvec{f(S')})\cup \Delta _2(f_1,{\tilde{y}})\cup {[}({\mathbb {N}}^2{\setminus } S') \cap \min {(S',\Delta _1(\varvec{f(S')})})]. \end{aligned}$$

We consider the following sets:

$$\begin{aligned} S^1=S'\cup T_Y,\\ S^2=S'\cup T_X. \end{aligned}$$

To prove the thesis, we can reduce to consider only the good semigroup \(S^2\), since considering \(S^1\) the proof is analogous.

According to the definition of tracks, it is easy to observe that \(T_X\) is a track of \(S^2\) having the form \(T_X=T(({\tilde{x}},\infty ),(\infty ,f_2))\) if \(X\ne \emptyset \) and \(T_X=T((\infty ,f_2))\) otherwise.

If \(X=\emptyset \), by removing the track \(T_X\), we have that \(A_f(S^2)=A_f(S')\), \(g(S^2_2)=g(S'_2)-1\) and \(g(S^2_1)=g(S'_1)\). As a consequence of Corollary 2.7 we have that \(S'\) is obtained removing a track from the good semigroup \(S^2\) having genus \(g(S')-1\) (Fig. 1).

If \(X\ne \emptyset \), by removing the track \(T_X\), we have that \(|A_f(S^2)|=|A_f(S')|-1\), \(g(S^2_2)=g(S'_2)\) and \(g(S^2_1)=g(S'_1)\). Hence, using again Corollary 2.7 we have that \(S'\) is obtained removing a track from the good semigroup \(S^2\) having genus \(g(S')-1\) (Fig. 2).

Fig. 1
figure 1

Representation of \(T_X\) in case \(X=\emptyset \). The elements of \(T_X\) are represented with a dashed line and white dots

Fig. 2
figure 2

Representation of \(T_X\) in case \(X\ne \emptyset \). The elements of \(T_X\) are represented with dashed lines and white dots

Case 2 \(\varvec{f(S')}\in S'\). In this case, we define \(T=\Delta (\varvec{f(S')})\). If we consider

$$\begin{aligned} S=S'\cup T; \end{aligned}$$

also in this case it is easy to observe that S is a good semigroup and \(T=T((f_1,\infty ),(\infty ,f_2))\) is a track of S.

Fig. 3
figure 3

Representation of T. The elements of T are represented with dashed lines

Removing the track T from S, we have that \(|A_f(S)|=|A_f(S')|-1\), \(g(S_2)=g(S'_2)\) and \(g(S_1)=g(S'_1)\) (Fig. 3). Hence, using again Corollary 2.7 we have that \(S'\) is obtained removing a track by the good semigroup S having genus \(g(S')-1\). \(\square \)

Theorem 3.5

Given a good semigroup S with genus g(S), removing a track of S we obtain a semigroup with genus \(g(S)+1\).

Proof

Let S be a good semigroup, we consider a track \(T:=T((\varvec{\alpha _1},\ldots ,\varvec{\alpha _n}))\). With the same notation used in Lemma 3.3, we consider \(S'=S{\setminus } T\). We want to prove that \(g(S')=g(S)+1\). We observe that by Definition 3.1, \(\varvec{\alpha _i}\in A_f(S)\), for any \(i\in \{2,\ldots ,n-1\}\).

Let us consider first the case \(\varvec{\alpha _1}=(x,\infty )\). Now we can distinguish two cases:

Case 1 \(\varvec{\alpha _n}\in A_f(S)\). In this situation, removing the track T, we remove the elements \(\varvec{\alpha _i}\) with \(i=1,\ldots ,n\), hence we loose \(n-1\) finite maximals, in \(S'\). At the same time the elements \(\varvec{\gamma _i}=\min \{\varvec{\alpha _i},\varvec{\alpha _{i+1}}\}\in S'\) with \(i=1,\ldots , n-1\) become finite maximals of \(S'\); therefore, \(|A_f(S)|=|A_f(S')|\). If \(\varvec{\beta }\in {}_1\Delta ^S(\varvec{\alpha _n})\), by property (G3), there exists an element \(\varvec{\delta }\in \Delta ^S_1(\varvec{\beta })\cap S'\); clearly we have \(\delta _2=\beta _2\). Furthermore, we have \(\alpha _{i,2}=\gamma _{i-1,2}\), for any \(i\in \{2,\ldots ,n\}\). Hence we proved that \(g(S_2')=g(S_2)\). Now we observe that \(\Delta _1^{S'}(\varvec{\alpha _n})=\emptyset \), since \(S'\subset S\) and \(\varvec{\alpha _n}\) was a maximal of S, furthermore, \(_1\Delta ^{S'}(\varvec{\alpha _n})=\emptyset \), from the definition of \(S'\). Hence in \(S'\) we loose an element in the first projection; we have \(g(S_1')=g(S_1)+1\). By Corollary 2.7:

$$\begin{aligned} g(S')=g(S'_1)+g(S'_2)+|A_f(S')|=g(S_1)+1+g(S_2)+|A_f(S)|=g(S)+1. \end{aligned}$$

Case 2 \(\varvec{\alpha _n}=(\infty ,y)\). In this situation, by removing the track T, we remove the elements \(\varvec{\alpha _i}\) with \(i=1,\ldots ,n\), hence we loose \(n-2\) finite maximals in \(S'\). At the same time, the elements \(\varvec{\gamma _i}=\min \{\varvec{\alpha _i},\varvec{\alpha _{i+1}}\}\) with \(i=1,\ldots , n-1\), become finite maximals in \(S'\); hence \(|A_f(S)|=|A_f(S')|-1\). Since \(\alpha _{i,2}=\gamma _{i-1,2}\), for any \(i\in \{2,\ldots ,n\}\) and \(\alpha _{i,1}=\gamma _{i,1}\), for any \(i\in \{1,\ldots ,n-1\}\); we have, respectively, \(g(S_2')=g(S_2)\) and \(g(S'_1)=g(S_1)\). Therefore, again by Corollary 2.7:

$$\begin{aligned} g(S')=g(S'_1)+g(S'_2)+|A_f(S')|=g(S_1)+g(S_2)+|A_f(S)|+1=g(S)+1. \end{aligned}$$

Now we suppose \(\varvec{\alpha _1}\in A_f(S)\); in this case, if \(\varvec{\alpha _n}=(\infty ,y)\), the proof is analogous to the Case 1 that we have seen above, so we can suppose \(\varvec{\alpha _n}\in A_f(S)\). In this case, by removing the track T, we remove the elements \(\varvec{\alpha _i}\), \(i=1,\ldots ,n\), hence we loose n finite maximals in \(S'\). At the same time the elements of \(\gamma _i\) \(i=1,\ldots , n-1\) become finite maximals in \(S'\); hence \(|A_f(S)|=|A_f(S')|+1\). With the same argument that we used in Case 1, it is easy to observe that \(g(S_1')=g(S_1)+1\) and \(g(S_2')=g(S_2)+1\). Hence we have:

$$\begin{aligned} g(S')=g(S'_1)+g(S'_2)+|A_f(S')|=g(S_1)+1+g(S_2)+1+|A_f(S)|-1=g(S)+1. \end{aligned}$$

It is easy to notice that if the starting point and the ending point are the same the proof can be repeated in a similar way. \(\square \)

We have observed that tracks play the same role as minimal generators in the case of numerical semigroups. Now we want to show that, as in the numerical case, it is not necessary to consider all the minimal generators to build the tree. In fact, as we are going to show, it is sufficient to consider some special tracks.

Definition 3.6

Given a local good semigroup \(S\subseteq {\mathbb {N}}^2\), we say that \(T((\varvec{\alpha _1},\ldots ,\varvec{\alpha _n}))\) is a beyond track, if \(\{\varvec{\alpha }\in S, \varvec{\alpha }\ge \varvec{c(S)}\}\cap T((\varvec{\alpha _1},\ldots ,\varvec{\alpha _n}))\ne \emptyset \).

Furthermore, we denote by

$$\begin{aligned} {\text {BT}}(S)=\{ T=T((\varvec{\alpha _1},\ldots ,\varvec{\alpha _n})) | T \text { is a beyond track of } S\}. \end{aligned}$$

If \(S'\) is a good semigroup of \({\mathbb {N}}^2\) obtained from a good semigroup S by removing a track, we say that S is a parent of \(S'\) (or equivalently \(S'\) is a son of S). We say that S is a special parent of \(S'\) (or equivalently \(S'\) is a special son of S), if \(S'\) is obtained from S removing a beyond the track.

Lemma 3.7

If S is a special parent of \(S'\), then \(\varvec{c(S)}<\varvec{c(S')}.\)

Proof

Since S is a special parent of \(S'\), we have \(S'=S{\setminus } T\), where T is a beyond the track of S. In particular, we have \(S'\subseteq S\), which implies that \(\varvec{c(S)}\le \varvec{c(S')}.\) Thus, we need to prove that \(\varvec{c(S)}\ne \varvec{c(S')}\). Let us assume by contradiction that \(\varvec{c(S)}=\varvec{c(S')}\). Since T is a beyond the track of S, there exists an element \(\varvec{\beta }\in T\) with \(\varvec{\beta }\ge \varvec{c(S)}\). We recall that for a good semigroup \(S'\) we have that \(\varvec{\alpha } \in S' \iff \min (\varvec{\alpha },\varvec{c(S')}) \in S'\). Thus, since \(\varvec{\beta }\notin S'\), we have

$$\begin{aligned} \varvec{c(S')}=\varvec{c(S)}=\min (\varvec{\beta },\varvec{c(S)})=\min (\varvec{\beta },\varvec{c(S')}) \notin S', \end{aligned}$$

which is a contradiction. \(\square \)

By Theorem 3.4 we can deduce the following corollary.

Corollary 3.8

Let \(S'\) be a good semigroup \(S'\ne {\mathbb {N}}^2(1,1)\), with \(\varvec{f(S')}=(f_1,f_2)\). We denote by \(p=|\{ i \in \{1,2\} | f_i \ne 0 \} |\).

  1. (1)

    If \(\varvec{f(S')}\in S'\), then \(S'\) has exactly one special parent.

  2. (2)

    If \(\varvec{f(S')}\notin S'\), then \(S'\) has exactly p special parents.

Proof

(1) If we define the set \(T=\Delta (\varvec{f(S')})\) as in the proof of Theorem 3.4, the good semigroup \(S=S'\cup T\) is trivially a special parent of S. Now we want to prove that, if there exists a good semigroup \({\overline{S}}\) and a beyond track \({\overline{T}}\) of \({\overline{S}}\), such that \(S'={\overline{S}}{\setminus } {\overline{T}}\), then \({\overline{T}}=T\).

Since \(\varvec{f(S')}\in S'\) then, by the previous lemma, there exists \(\varvec{\beta }\in \Delta (\varvec{f(S')})\cap {\overline{T}}\). By property (G3) of good semigroups, it follows \(\Delta (\varvec{f(S')})\subseteq {\overline{T}}\). In this case, since \((f_1,\infty )\) and \((\infty ,f_2)\), are, respectively, a starting point and an ending point of the track \({\overline{T}}\), we have \({\overline{T}}=\Delta (\varvec{f(S')})=T\).

(2) If we define, when it is possible, the sets \(T_X\) and \(T_Y\) as in the proof of Theorem 3.4, the good semigroups \(S^1\) and \(S^2\) are trivially special parents of \(S'\). Now we want to prove that, if \({\overline{S}}\) is a good semigroup and there exists a beyond track \({\overline{T}}\) of \({\overline{S}}\) such that \(S'={\overline{S}}{\setminus } {\overline{T}}\), then \({\overline{T}}=T_X\) or \({\overline{T}}=T_Y\).

By the previous lemma, there exists \(\varvec{\beta }\in \Delta (\varvec{f(S')})\cap {\overline{T}}\). Thus, by property (G3) of good semigroups, it follows either \(\Delta _1(\varvec{f(S')})\subseteq {\overline{T}}\) or \(\Delta _2(\varvec{f(S')})\subseteq {\overline{T}}\). If we suppose \(\Delta _1(\varvec{f(S')})\subseteq {\overline{T}}\), then we prove that \({\overline{T}}=T_Y\). We start observing that \((f_1,\infty )\) is necessarily the starting point of \({\overline{T}}\). If the set Y is empty, then it is also the ending point, hence \({\overline{T}}=T((f_1,\infty ))=\Delta _1(\varvec{f(S')})=T_Y\).

If \(Y\ne \emptyset \), we observe that since \(\Delta _1(\varvec{f(S')})\subseteq {\overline{T}}\), then \({\overline{T}}=T((f_1,\infty ),(\infty , y))\), where \((\infty , y)\in I_A({\overline{S}})\). We recall that, in the proof of Theorem 3.4, we denoted by \({\tilde{y}}=\max \{y| (f_1,y)\in S'\}\); by maximality of \({\tilde{y}}\), it follows \(y={\tilde{y}}\). Hence we have \({\overline{T}}=T((f_1,\infty ),(\infty , {\tilde{y}}))=T_Y\). Assuming \(\Delta _2(\varvec{f(S')})\subseteq {\overline{T}}\), repeating the same proof, it is easy to observe that \({\overline{T}}=T_X\). \(\square \)

Now we can introduce the tree of local good semigroups with a fixed genus.

Notations Now, we denote by \({\mathfrak {N}}_g\) the set of good semigroups with genus g. We build the following family of sets of good semigroups:

  • \(A_1={\mathbb {N}}^2(1,1)\);

  • \(A_{i}=\{S'| S'\text {, is a special son of } S\in A_{i-1}\}\).

We want to show that all semigroups of genus \(g+1\) are special sons of semigroups of genus g, in other words:

Proposition 3.9

\(A_g={\mathfrak {N}}_g\), for all \(g\in {\mathbb {N}}{\setminus } \{0\}\).

Proof

We work by induction on g. We suppose \(A_{g-1}={\mathfrak {N}}_{g-1}\) and we prove that \(A_{g}={\mathfrak {N}}_{g}\). Immediately by Theorem 3.5, \(A_{g}\subseteq {\mathfrak {N}}_{g}\). If \(S'\in {\mathfrak {N}}_{g}\), by Proposition 3.8, there exists a special parent S which, by Theorem 3.5, belongs to \({\mathfrak {N}}_{g-1}=A_{g-1}\); hence \(S'\in A_{g}\). \(\square \)

We proved that all good semigroups of genus g can be obtained removing a special track from semigroups of genus \(g-1\). Hence, as a consequence of the previous proposition, the succession \(A_1,A_2,\ldots ,A_g\) defines a tree of local good semigroups in which the level \(A_i\) consists of all good semigroups having genus g.

Remark 3.10

We denote by \(n_g\) the number of local good semigroups of genus g. The fact that a good semigroup of \({\mathfrak {N}}_g\) can have two distinct special parents in \({\mathfrak {N}}_{g-1}\) implies that the formula

$$\begin{aligned} n_g=\sum _{S \in {\mathfrak {N}}_{g-1}}{|\{ S'|S' \text { is a special son of } S\} |}=\sum _{S \in {\mathfrak {N}}_{g-1}}{|{\text {BT}}(S)|}, \end{aligned}$$

does not hold in general.

From the computational point of view, it would be convenient to determine, for each good semigroup S, a subset \(T(S)\subseteq {\text {BT}}(S) \) such that

$$\begin{aligned} n_g=\sum _{S \in {\mathfrak {N}}_{g-1}}{|T(S)|}, \end{aligned}$$

for each \(g \in {\mathbb {N}}.\)

To do that, given a good semigroup S with conductor \(\varvec{c(S)}=(c_1,c_2)\), we define

$$\begin{aligned} T(S)= \left\{ \begin{aligned}&{\text {BT}}(S),&\quad \text { if } c_2=1 \\&\{ T((\varvec{\alpha _1},\ldots ,\varvec{\alpha _n}))\in {\text {BT}}(S) |\varvec{\alpha _n} \ge (\infty ,c_2) \}&\quad \text { if } c_2 \ne 1 \end{aligned} \right. \end{aligned}$$

and we claim that T(S) satisfies the required property.

It suffices to show that each good semigroup \(S'\) has one and only one special parent S, such that \(S'=S{\setminus } T\) with \(T \in T(S)\). Thus, let us consider an arbitrary good semigroup \(S'\), with conductor \(\varvec{c(S')}=(c'_1,c'_2)\).

Case 1 \(c'_2=1\). Corollary 3.8 tells us that \(S'\) has only one special parent S, such that \(S'=S {\setminus } T\), with \(T \in {\text {BT}}(S)\). Furthermore, denoting by \(\varvec{c(S)}=(c_1,c_2)\), we still have \(c_2=1\). Hence, by definition of T(S), we have \({\text {BT}}(S)=T(S)\) and \(T \in T(S)\) as required.

Case 2 \(c'_2 \ne 1\) and \(\varvec{f(S')}=(f'_1,f'_2) \in S'\). Corollary 3.8 tells us that \(S'\) has only one special parent S, namely \(S=S' \cup \Delta (\varvec{f(S')})\). Notice that \(\Delta (\varvec{f(S')})\) is the track \(T=T((f'_1,\infty ),(\infty ,f'_2)) \in {\text {BT}}(S)\). Since we have \(\varvec{c(S)}\le \varvec{f(S')}\), it follows that \((\infty ,f'_2) \ge (\infty ,c_2), \) implying that \(T \in T(S)\).

Case 3 \(c'_2 \ne 1\) and \(\varvec{f(S')}=(f'_1,f'_2) \notin S'\). In this case, we have exactly two special parents

$$\begin{aligned} S^1&=S'\cup T_Y,\\ S^2&=S'\cup T_X, \end{aligned}$$

where again considering the notations of Theorem 3.4

$$\begin{aligned} T_Y= & {} \left\{ \begin{aligned}&T((f'_1,\infty )) \in {\text {BT}}(S^1)&\quad \text { if } Y=\emptyset \\&T((f'_1,\infty ),(\infty ,{\tilde{y}}))\in {\text {BT}}(S^1)&\quad \text { if } Y\ne \emptyset \end{aligned} \right. \\ T_X= & {} \left\{ \begin{aligned}&T((\infty ,f'_2))\in {\text {BT}}(S^2)&\quad \text { if } X=\emptyset \\&T(({\tilde{x}},\infty ),(\infty ,f'_2))\in {\text {BT}}(S^2)&\quad \text { if } X\ne \emptyset \end{aligned} \right. \end{aligned}$$

Notice that \(T_Y\) never belongs to \(T(S^1)\), since \(\varvec{c(S^1)}=(c'_1-m,c'_2)\) with \(m\ge 1\) and \((\infty ,{\tilde{y}})<(\infty ,c'_2).\) On the other hand, \(T_X\) always belongs to \(T(S^2)\) because in both the possible definitions, the ending point is \((\infty ,f'_2) \ge (\infty ,\varvec{c(S^2)}_2)\) (we recall that \(\varvec{c(S^2)}\) has the form \((c'_1,c'_2-n)\) with \(n\ge 1\)). Thus \(S^2\) is the required unique special parent of \(S'\).

Now we show with an example the construction of the tree up to genus \(g=4\).

Example

The starting point is the set

$$\begin{aligned} {\mathfrak {N}}_{1}=\{{\mathbb {N}}^2(1,1)\}. \end{aligned}$$

The beyond tracks of \({\mathbb {N}}^2(1,1)\) are: \(T_1=T((\infty ,1))\), \(T_2=T((1,\infty ))\), \(T_3=T((1,\infty ),(\infty ,1))\). If we denote by \(S_i\) the special son associated to \(T_i\), we have: \(S_1=\{(0,0),(1,2)\}\), \(S_2=\{(0,0),(2,1)\}\), \(S_3=\{(0,0), (1,1), (2,2)\}\).

$$\begin{aligned} {\mathfrak {N}}_{2}=\{S_1,S_2,S_3\}. \end{aligned}$$

Let us consider \(S_1=\{(0,0),(1,2)\}\), we have the beyond tracks:

\(T_{1,1}=T(( 1, \infty ), (\infty , 2))\), \(T_{1,2}=T((1, \infty ),(\infty ,3))\), \(T_{1,3}=T((1, \infty ))\), \(T_{1,4}=T((\infty , 2))\), \(T_{1,5}=T((\infty , 3))\). Notice that Remark 3.10 tells us that we can avoid to compute the son of \(S_1\) with respect to the track \(T_{1,3} \notin T(S_1)\). We obtain:

$$\begin{aligned} S_{1,1}= & {} \{(0,0), (1,2), (2,3)\}, S_{1,2}=\{(0,0), (1,2), (1,3), (2,2), (2,4)\}, \\ S_{1,3}= & {} \{(0,0), (2,2)\}, S_{1,4}=\{(0,0), (1,3)\}, S_{1,5}=\{(0,0), (1,2), (1,4)\}. \end{aligned}$$

If we consider \(S_2=\{(0,0), (2,1)\}\), we have the beyond tracks:

\(T_{2,1}=T(( 2, \infty ), (\infty , 1))\), \(T_{2,2}=T((3, \infty ),(\infty ,1))\), \(T_{2,3}=T((\infty , 1))\), \(T_{2,4}=T((2, \infty ))\), \(T_{2,5}=T((3, \infty ))\). We obtain:

$$\begin{aligned} S_{2,1}= & {} \{(0,0), (2,1), (3,2)\},\quad S_{2,2}=\{(0,0), (2,1), (2,2), (3,1), (4,2)\},\\ S_{2,3}= & {} \{(0,0), (2,2)\}\quad S_{2,4}=\{(0,0), (3,1)\},\quad S_{2,5}=\{(0,0), (2,1), (4,1)\}. \end{aligned}$$

We notice that \(S_{1,3}=S_{2,3}\), but in this case \(T_{2,3}\in T(S_2)\).

For what concerns the good semigroup \(S_3=\{ (0,0), (1,1), (2,2)\}\), we have only a beyond track: \(T_{3,1}=T(( 2, \infty ), (\infty , 2))\). We obtain:

$$\begin{aligned} S_{3,1}= & {} \{(0,0), (1,1), (2,2), (3,3)\}. \\ {\mathfrak {N}}_{3}= & {} \{S_{1,1},S_{1,2},S_{1,3},S_{1,4},S_{1,5},S_{2,1} ,S_{2,2},S_{2,3},S_{2,4},S_{2,5},S_{3,1}\}. \end{aligned}$$

Now, we have:

  • \(S_{3,1}\) has got only one beyond track, so only a special son

    $$\begin{aligned} S_{3,1,1}=\{(0,0), (1,1),(2,2),(3,3),(4,4)\}. \end{aligned}$$
  • \(S_{2,1}\) has got two beyond tracks, thus two special sons

    $$\begin{aligned} S_{2,1,1}= & {} \{(0,0), (2,1),(4,2)\},\\ S_{2,1,2}= & {} \{(0,0), (2,1),(3,2),(3,3),(4,2),(5,3)\}. \end{aligned}$$
  • \(S_{2,2}\) has no beyond tracks.

  • \(S_{2,3}\) has got eight tracks. So it has got eight special sons:

    $$\begin{aligned} S_{2,3,1}= & {} \{(0,0), (2,2),(3,3)\}, S_{2,3,2}=\{(0,0), (2,2),(2,3),(3,2),(3,4)\}, \\ S_{2,3,3}= & {} \{(0,0), (2,2), (2,3), (2,4), (3,2), (3,3), (4,2), (4,4)\},\\ S_{2,3,4}= & {} \{(0,0), (2,2), (2,3), (3,2), (4,3)\},\\ S_{2,3,5}= & {} \{(0,0), (3,2)\},\\ S_{2,3,6}= & {} \{(0,0), (2,2),(4,2)\},S_{2,3,7}=\{(0,0), (2,3)\},\\ S_{2,3,8}= & {} \{(0,0), (2,2),(2,4)\}. \end{aligned}$$
  • \(S_{2,4}\) has got seven tracks. So it has got seven special sons:

    $$\begin{aligned} S_{2,4,1}= & {} \{(0,0), (3,1),(4,2)\},S_{2,4,2}=\{(0,0), (4,1)\},\\ S_{2,4,3}= & {} \{(0,0), (3,1),(3,2),(4,1),(5,2)\},S_{2,4,4}=\{(0,0), (3,1),(5,1)\},\\ S_{2,4,5}= & {} \{(0,0), (3,1),(3,2),(4,1),(5,2)\},\\ S_{2,4,6}= & {} \{(0,0), (3,1),(4,1),(6,1)\},S_{2,4,7}=\{(0,0), (3,2)\}. \end{aligned}$$
  • \(S_{2,5}\) has got four tracks. So it has got four special sons:

    $$\begin{aligned} S_{2,5,1}= & {} \{(0,0), (2,1),(4,2)\},\\ S_{2,5,2}= & {} \{(0,0), (2,1),(2,2),(4,1), (4,2), (5,1), (6,2)\},\\ S_{2,5,3}= & {} \{(0,0), (2,1),(4,1),(6,1)\}, S_{2,5,4}=\{(0,0), (2,2),(4,2)\}. \end{aligned}$$
  • \(S_{1,1}\) has got two tracks. So it has got two special sons:

    $$\begin{aligned} S_{1,1,1}=\{(0,0), (1,2),(2,3),(2,4),(3,3),(3,5)\}, S_{1,1,2}=\{(0,0), (1,2),(2,4)\} \end{aligned}$$
  • \(S_{1,2}\) has no tracks.

  • \(S_{1,3}=S_{2,3}\) was studied before.

  • \(S_{1,4}\) has got seven tracks. So it has got seven special sons:

    $$\begin{aligned} S_{1,4,1}= & {} \{(0,0), (1,3),(2,4)\}, S_{1,4,2}=\{(0,0), (1,3),(1,4),(2,3),(2,5)\}, \\ S_{1,4,3}= & {} \{(0,0), (1,3),(1,4),(1,5),(2,3),(2,4),(2,6)\}, S_{1,4,4}=\{(0,0), (2,3)\}, \\ S_{1,4,5}= & {} \{(0,0), (1,4)\},S_{1,4,6}=\{(0,0), (1,3),(1,5)\},\\ S_{1,4,7}= & {} \{(0,0), (1,3),(1,4),(1,6)\} \end{aligned}$$
  • \(S_{1,5}\) has got four tracks. So it has got four special sons:

    $$\begin{aligned} S_{1,5,1}= & {} \{(0,0), (1,2),(2,4)\}\\ S_{1,5,2}= & {} \{(0,0), (1,3),(1,4),(1,5),(2,2),(2,4),(2,6)\}\\ S_{1,5,3}= & {} \{(0,0), (2,2),(2,4)\}, S_{1,5,4}=\{(0,0), (1,2),(1,4),(1,6)\}. \end{aligned}$$

Notice that

  • \(S_{2,1,1}=S_{2,5,1}\), but \(T_{2,1,1}\notin T(S_{2,1})\) while \(T_{2,5,1} \in T(S_{2,5});\)

  • \(S_{2,3,5}=S_{2,4,7}\), but \(T_{2,3,5}\notin T(S_{2,3})\) while \(T_{2,4,7} \in T(S_{2,4});\)

  • \(S_{2,3,6}=S_{2,5,4}\), but \(T_{2,3,6}\notin T(S_{2,3})\) while \(T_{2,5,4} \in T(S_{2,5});\)

  • \(S_{1,4,4}=S_{2,3,7}\), but \(T_{1,4,4}\notin T(S_{1,4})\) while \(T_{2,3,7} \in T(S_{2,3});\)

  • \(S_{1,5,1}=S_{1,1,2}\), but \(T_{1,5,1}\notin T(S_{1,5})\) while \(T_{1,1,2} \in T(S_{1,1});\)

  • \(S_{1,5,3}=S_{2,3,8}\), but \(T_{1,5,3}\notin T(S_{1,5})\) while \(T_{2,3,8} \in T(S_{2,3}),\)

thus, the repeated semigroups can be computed only one time by taking into account the consequences of Remark 3.10. We represent the tree of good semigroups up to genus 4 that we have just determined (Fig. 4).

Fig. 4
figure 4

Tree of local good semigroups until genus 4

We implemented a function in “GAP” [22] using the package “NumericalSgps” [12] to find the special tracks and an algorithm to build the tree of local good semigroups by genus (where each level is built starting from the previous one). The following table contains the results obtained regarding the value of \(n_g\) up to genus 27 (Table 1).

Table 1 Table reporting the number of local good semigroups by genus

In 2008 Bras Amorós observed that in case of numerical semigroups the numerical sequence \(\{n_g\}\) seemed to have the same behaviour of Fibonacci sequence and conjectured that the ratio \(\frac{n_g}{n_{g-1}}\) converges to the golden ratio [3]. In 2013 this was actually proved by Zhai [24]. Looking at the previous table, even though we have not a great quantity of data, the tendency for local good semigroups of \({\mathbb {N}}^2\) appears to be different. In fact the difference \(\frac{n_g}{n_{g-1}}-\frac{n_g-1}{n_{g-2}}\) seems to be an increasing function, hence the ratio seems to diverge.

4 Relationship Between Genus and Other Notable Elements

4.1 On the Type of a Good Semigroup

In this subsection, we want to relate the genus and the type of a good semigroup \(S\subseteq {\mathbb {N}}^2\) by generalizing a well known inequality that holds in the case of numerical semigroups.

First of all, we recall the concept of the type of a good semigroup by following the definition introduced in [8] that extends the one initially given in [1].

We write \((\alpha _1,\alpha _2)\ll (\beta _1,\beta _2)\) if and only if \(\alpha _1<\beta _1\) and \(\alpha _2<\beta _2\). Now we can introduce a partial order on S setting \((\alpha _1,\alpha _2)\le \le (\beta _1,\beta _2)\) if and only if \((\alpha _1,\alpha _2)=(\beta _1,\beta _2)\) or \((\alpha _1,\alpha _2)\ne (\beta _1,\beta _2)\) and \((\alpha _1,\alpha _2)\ll (\beta _1,\beta _2)\).

Given a good semigroup \(S \subseteq {\mathbb {N}}^2\), let us consider a set \(A \subseteq S\) such that there exists \(\varvec{c} \in {\mathbb {N}}^2\) with \(\varvec{c}+{\mathbb {N}}^2 \subseteq S {\setminus } A\). As described in [8], it is possible to build up a partition of such a set A, in the following way.

Let us define, \(D^{(0)}=\emptyset \):

$$\begin{aligned} B^{(i)}= & {} \left\{ \varvec{\alpha }\in A \backslash \left( \bigcup _{j<i}D^{(j)}\right) : \varvec{\alpha } \text { is maximal with respect to } \le \le \right\} \\Csps^{(i)}= & {} \{\varvec{\alpha }\in B^{(i)}: \varvec{\alpha }=\varvec{\beta }_1\oplus \varvec{\beta }_2 \text { for some } \varvec{\beta }_1,\varvec{\beta }_2\in B^{(i)}{\setminus }\{\varvec{\alpha }\}\}\\D^{(i)}= & {} B^{(i)}\backslash C^{(i)}. \end{aligned}$$

For a certain \(N\in {\mathbb {N}}\), we have \(A=\bigcup _{i=1}^ND^{(i)}\) and \(D^{(i)}\cap D^{(j)}=\emptyset \). According to the notations in [8], we rename these sets in an increasing order setting \(A_i=D^{(N+1-i)}.\) Thus we have

$$\begin{aligned} A=\bigcup _{i=1}^NA_i, \end{aligned}$$

and the sets \(A_i\) are called levels of A.

It was proved [8, Thm. 2.7] that, if \(E=S {\setminus } A\) is a proper good ideal of S, then \(N=d(S{\setminus } E)\).

Definition 4.1

Let us consider a set \(A \subseteq {\mathbb {N}}^2\) such that there exists \(\varvec{c} \in {\mathbb {N}}^2\) with \(\varvec{c}+{\mathbb {N}}^2 \subseteq {\mathbb {N}}^2 {\setminus } A\). We denote by \({\text {NL}}(A)\) the integer such that

$$\begin{aligned} A=\bigcup _{i=1}^{{\text {NL}}(A)}A_i, \end{aligned}$$

is the partition in levels of A described above.

Now we want to generalize to good ideals a result proved for good semigroups in [8].

Proposition 4.2

Let I be a relative good ideal of a good semigroup \(S\subseteq {\mathbb {N}}^2\). We consider \(A\subseteq I\) satisfying the conditions of Definition 4.1 and such that \(E=I{\setminus } A\) is a relative good ideal of S. Then

$$\begin{aligned} {\text {NL}}(A)=d(I{\setminus } E) \end{aligned}$$

Proof

If I is a relative good ideal of S there exists \(\varvec{\alpha }\in S\) such that \(\varvec{\alpha }+I\subseteq S\). We notice that \((\varvec{\alpha }+I)\cup \{0\}\) is a good semigroup. In fact, if \(\varvec{\alpha }+\varvec{i_1},\varvec{\alpha }+\varvec{i_2}\in \varvec{\alpha }+I\),

$$\begin{aligned} (\varvec{\alpha }+\varvec{i_1})+(\varvec{\alpha }+\varvec{i_2})=\varvec{\alpha }+(\varvec{\alpha }+\varvec{i_1}+\varvec{i_2})\in \varvec{\alpha }+I \end{aligned}$$

since \(\varvec{\alpha }+(\varvec{i_1}+\varvec{i_2})\in S+I\subseteq I\). Furthermore, it is easy to check that \(\varvec{\alpha }+E\) is a proper good ideal of \((\varvec{\alpha }+I)\cup \{0\}\). Setting \(S'=(\varvec{\alpha }+I)\cup \{0\}\), \(E'=\varvec{\alpha }+E\) and \(A'=((\varvec{\alpha }+I)\cup \{0\}){\setminus } (\varvec{\alpha }+E)\), by [8, Thm. 2.7], we have

$$\begin{aligned} d(S'{\setminus } E')={\text {NL}}(A') \end{aligned}$$

so we can write:

$$\begin{aligned} 1+d(\varvec{\alpha }+I{\setminus } \varvec{\alpha }+E)=d(S'{\setminus } E')={\text {NL}}(A')=1+{\text {NL}}(\varvec{\alpha }+I {\setminus } \varvec{\alpha }+E). \end{aligned}$$

We can conclude that:

$$\begin{aligned} d(I{\setminus } E)=d(\varvec{\alpha }+I{\setminus } \varvec{\alpha }+E)={\text {NL}}(\varvec{\alpha }+I {\setminus } \varvec{\alpha }+E)={\text {NL}}(I{\setminus } E)={\text {NL}}(A). \end{aligned}$$

\(\square \)

Using this result we can easily rewrite the genus as the number of levels of \({\mathbb {N}}^2{\setminus } S\).

Corollary 4.3

Given a good semigroup T, \(g(T)={\text {NL}}({\mathbb {N}}^2{\setminus } T)\).

Proof

It is sufficient to apply Proposition 4.2, considering \(S=T\), \(I={\mathbb {N}}^2\), \(A={\mathbb {N}}^2{\setminus } T\). \(\square \)

In [8], the set of pseudo-frobenius elements of a good semigroup S is defined as

$$\begin{aligned} {\text {PF}}(S)=\{\varvec{\alpha } \in {\mathbb {N}}^2 {\setminus } S | \varvec{\alpha }+M \subseteq S\}, \end{aligned}$$

where \(M=S{\setminus } \{\varvec{0}\}\) is the maximal ideal of S.

The set \({\text {PF}}(S)\) satisfies the condition of the set A in Definition 4.1. The type of good semigroup S is defined as \(t(S)={\text {NL}}({\text {PF}}(S))\), that is the number of levels of the pseudo-frobenius elements.

Remark 4.4

We recall that given two ideals E and F of S, it is possible to consider the set

$$\begin{aligned} E-F=\{\varvec{\alpha } \in {\mathbb {Z}}^2 | \varvec{\alpha }+F \subseteq E\}. \end{aligned}$$

This set is not, in general, a good ideal. We have that \({\text {PF}}(S)=(S-M){\setminus } S\), thus \(t(S)={\text {NL}}((S-M){\setminus } S)\). In [8, Proposition 3.5], it is proved that if \(S-M\) is a good ideal, then \(t(S)=d(S-M {\setminus } S)\) as it was initially defined in [1].

Given a good semigroup S, we want to prove the inequality

$$\begin{aligned} g(S)\le t(S)l(S), \end{aligned}$$

that generalizes the analogous one proved in [15] for numerical semigroups.

To do that we need the following lemma.

Lemma 4.5

Let us consider a subset \(A \subseteq {\mathbb {N}}^2\) such that there exists \(\varvec{c} \in {\mathbb {N}}^2\) with \(\varvec{c}+{\mathbb {N}}^2 \subseteq {\mathbb {N}}^2 {\setminus } A\). Suppose that \(A=\bigcup _{j=1}^hB_j\) with \(B_l \cap B_m=\emptyset \) if \(l\ne m\). Then

$$\begin{aligned} {\text {NL}}(A) \le \sum _{j=1}^h{{\text {NL}}(B_j)}. \end{aligned}$$

Proof

We denote by \(n={\text {NL}}(A)\) and by \(m_j={\text {NL}}(B_j)\). Furthermore we write

$$\begin{aligned} A=\bigcup _{i=1}^n{A_i}, \quad B_j=\bigcup _{l=1}^{m_j}{B_{j,l}}\quad \text { for } j=1,\ldots ,h. \end{aligned}$$

We want to find a chain

$$\begin{aligned} \varvec{\alpha _1} \le \cdots \le \varvec{\alpha _n}, \text { where } \varvec{\alpha _i} \in A_i\quad \text {for all }i=1,\ldots ,n, \end{aligned}$$

and such that each \(B_{j,l}\) contains at most one of the \(\varvec{\alpha _i}\)’s. To do that we consider \(\varvec{\alpha _1}\) as an arbitrary element of \(A_1\), then we choose \(\varvec{\alpha _i}\), with \(i\ge 2\), by taking into account the following rule. We denote by \(D=A_{i+1} \cap \{\varvec{\beta } \in A| \varvec{\alpha _i} \ll \varvec{\beta } \}\).

Case 1 If D is not empty, then we choose as \(\varvec{\alpha _{i+1}}\) an arbitrary element of D.

Case 2 If \(D=\emptyset \), then [8, Lemma 2.4 (1)] ensures that \(\Delta _1(\varvec{\alpha _i}) \cap A_{i+1}\) and \(\Delta _2(\varvec{\alpha _i}) \cap A_{i+1}\) are both non-empty. Furthermore, if we suppose that \(\varvec{\alpha _i} \in B_{j,l}\), then there must exist a \(k \in \{1,2\}\) such that \(\Delta _k(\varvec{\alpha _i}) \cap B_{j,l}=\emptyset \). In fact, otherwise, we would have \(\varvec{\alpha _i}=\varvec{\beta _1}\oplus \varvec{\beta _2}\), with \(\varvec{\alpha _i},\varvec{\beta _1},\varvec{\beta _2} \in B_{j,l}\) that is a contradiction since \(B_{j,l}\) is a level of \(B_j\) and cannot contain such a configuration. Thus, in this case we choose an element of \(\Delta _k(\varvec{\alpha _i}) \cap A_{i+1}\) as \(\varvec{\alpha _{i+1}}\).

By construction and by the properties of the levels, it is clear that it is not possible to find \(l \in \{1,\ldots ,m_j\}\) and \(j \in \{ 1,\ldots ,h\}\) such that \(|B_{j,l} \cap \{\varvec{\alpha _1}, \ldots , \varvec{\alpha _n} \}| \ge 2.\)

Thus \({\text {NL}}(A) \le \sum _{j=1}^h{{\text {NL}}(B_j)}\) as required. \(\square \)

Now we are ready to prove the main result of this subsection.

Proposition 4.6

Let S be a good semigroup. Then

$$\begin{aligned} g(S) \le t(S)l(S). \end{aligned}$$

Proof

We denote by \(n=l(S)\) and we choose

$$\begin{aligned} \varvec{0}=\varvec{\alpha _0}\le \varvec{\alpha _1}\le \cdots \le \varvec{\alpha _n}=\varvec{c(S)}, \end{aligned}$$

an arbitrary saturated chain in S between \(\varvec{0}\) and \(\varvec{c(S)}\). We consider the following chain of ideals of S:

$$\begin{aligned} S \subseteq S-S(\varvec{\alpha _1})=S-M \subseteq S-S(\varvec{\alpha _2})\subseteq \cdots \subseteq S-S(\varvec{\alpha _n})=S-C(S)={\mathbb {N}}^2. \end{aligned}$$

We have

$$\begin{aligned} {\mathbb {N}}^2 {\setminus } S= \bigcup _{i=1}^n{(S-S(\varvec{\alpha _i})){\setminus }(S-S(\varvec{\alpha _{i-1}}))}, \end{aligned}$$

and by Lemma 4.5 and Corollary 4.3 we can deduce:

$$\begin{aligned} g(S)= {\text {NL}}({\mathbb {N}}^2{\setminus } S) \le \sum _{i=1}^n{{\text {NL}}((S-S(\varvec{\alpha _i})){\setminus }(S-S(\varvec{\alpha _{i-1}})))}. \end{aligned}$$
(4.1)

Now we claim that

$$\begin{aligned} {\text {NL}}((S-S(\varvec{\alpha _i})){\setminus }(S-S(\varvec{\alpha _{i-1}})))\le & {} {\text {NL}}((S-S(\varvec{\alpha _1})){\setminus }(S-S(\varvec{\alpha _{0}})))\\= & {} {\text {NL}}((S-M) {\setminus } S)=t(S), \end{aligned}$$

for all \(i=2,\ldots ,n.\)

For each \(i \in \{2,\ldots ,n\},\) we denote by

$$\begin{aligned} \tilde{\varvec{\alpha }}_{i-1}={\left\{ \begin{array}{ll} \varvec{\alpha _{i-1}}, &{}\quad \text { if } \varvec{\alpha _i} \notin \Delta ^S(\varvec{\alpha _{i-1}}) \\ \max \{\Delta _{3-k}^S(\varvec{\alpha _{i-1}})\}\oplus \varvec{c(S)},&{} \quad \text { if } \varvec{\alpha _i} \in \Delta _{k}^S(\varvec{\alpha _{i-1}}) \end{array}\right. }, \end{aligned}$$

and we consider the following function

The function f is clearly injective, thus to prove our claim we need only to show that it is well defined.

Thus we fix an arbitrary \(\varvec{\beta } \in (S-S(\varvec{\alpha _i})){\setminus }(S-S(\varvec{\alpha _{i-1}}))\) and we prove that \(\varvec{\beta }+\tilde{\varvec{\alpha }}_{i-1} \in (S-M) {\setminus } S\).

  1. 1.

    We prove that \(\varvec{\beta }+\tilde{\varvec{\alpha }}_{i-1} \in S-M\). Let us consider an element \(\varvec{\gamma }\in M=S(\varvec{\alpha _1})\). We need to show that \(\varvec{\beta }+\tilde{\varvec{\alpha }}_{i-1} +\varvec{\gamma } \in S\). Since \(\varvec{\beta } \in S-S(\varvec{\alpha _i})\), it suffices to notice that \(\tilde{\varvec{\alpha }}_{i-1} +\varvec{\gamma } \ge \varvec{\alpha _i}\). In fact, otherwise \((\tilde{\varvec{\alpha }}_{i-1} +\varvec{\gamma } ) \oplus \varvec{\alpha _i}=\varvec{\delta } \in S\) would be an element such that \(\varvec{\alpha _{i-1}}< \varvec{\delta } < \varvec{\alpha _i}\), since \(\varvec{\alpha _{i-1}}\le \tilde{\varvec{\alpha }}_{i-1}\le \tilde{\varvec{\alpha }}_{i-1}+\varvec{\gamma }\) and \(\varvec{\alpha _{i-1}}\le \varvec{\alpha _i}\). But this contradicts the fact that we considered a saturated chain in S.

  2. 2.

    We prove that \(\varvec{\beta }+\tilde{\varvec{\alpha }}_{i-1} \notin S\). Let us assume, by contradiction, that \(\varvec{\beta }+\tilde{\varvec{\alpha }}_{i-1} \in S\). We consider \(D:=S(\varvec{\alpha _{i-1}}){\setminus } S(\varvec{\alpha _{i}})\). We have two cases:

    Case 1 \(\varvec{\alpha _i} \notin \Delta ^S(\varvec{\alpha _{i-1}})\). In this case, we have \(D=\{ \varvec{\alpha _{i-1}}=\tilde{\varvec{\alpha }}_{i-1}\}\). In fact, if \(\varvec{\beta } \in D\) and \( \varvec{\beta }\ne \varvec{\alpha _{i-1}}\), it would follow \( \varvec{\alpha _{i-1}}< \varvec{\beta }\oplus \varvec{\alpha _i} < \varvec{\alpha _i}\), against the fact that \(\varvec{\alpha _{i-1}}\) and \(\varvec{\alpha _{i}}\) are consecutive in S. Thus \(\varvec{\beta }+\tilde{\varvec{\alpha }}_{i-1} \in S \) implies \(\varvec{\beta } \in (S-S(\varvec{\alpha _{i-1}}))\) that is a contradiction.

    Case 2 There exists \(k \in \{1,2\}\) such that \(\varvec{\alpha _i} \in \Delta _{k}^S(\varvec{\alpha _{i-1}})\). It is easy to notice that in this case \(D:=S(\varvec{\alpha _{i-1}}){\setminus } S(\varvec{\alpha _{i}})=\Delta _{3-k}^S(\varvec{\alpha _{i-1}}) \cup \{\varvec{\alpha _{i-1}}\}\). Let us consider an arbitrary \(\varvec{\gamma } \in D\) and let us show that \(\varvec{\beta }+\varvec{\gamma } \in S\). If \(\varvec{\gamma } \in \Delta _{3-k}^S( \tilde{\varvec{\alpha }}_{i-1})\), then \(\varvec{\beta }+\varvec{\gamma } \in \Delta _{3-k}( \varvec{\beta }+\tilde{\varvec{\alpha }}_{i-1})\). We notice that, by definition of \(\tilde{\varvec{\alpha }}_{i-1}\), in this case \( \varvec{c(S)} \in \Delta _{k}^S(\tilde{\varvec{\alpha }}_{i-1})\). Since \(\varvec{\beta }+\tilde{\varvec{\alpha }}_{i-1} \in S\), it easily follows \(\varvec{\beta }+\varvec{\gamma } \in \Delta _{3-k}(\varvec{\beta }+\tilde{\varvec{\alpha }}_{i-1}) \subseteq S\). If \(\varvec{\gamma } < \tilde{\varvec{\alpha }}_{i-1}\), then property (G3) implies that there must exist a \(\varvec{\delta } \in \Delta _k^S(\varvec{\gamma })\). Furthermore, \(\varvec{\delta } \in S(\varvec{\alpha _{i}})\), (otherwise \(\varvec{\alpha _{i-1}}< \varvec{\delta }\oplus \varvec{\alpha _i} < \varvec{\alpha _i}\) ). Since \(\varvec{\beta } \in S-S(\varvec{\alpha _i})\), we have \(\varvec{\beta }+\varvec{\delta } \in S\).

    Finally, we have:

    $$\begin{aligned} \varvec{\gamma }+\varvec{\beta }=\overbrace{(\varvec{\beta }+\varvec{\delta })}^{\in S} \oplus \overbrace{(\varvec{\beta }+\tilde{\varvec{\alpha }}_{i-1})}^{\in S} \in S. \end{aligned}$$

    Thus, also in this case, we deduce \(\varvec{\beta } \in (S-S(\varvec{\alpha _{i-1}}))\) that is a contradiction.

This means that \(\varvec{\beta }+\tilde{\varvec{\alpha }}_{i-1} \notin S\) and the claim is proved. Finally, by expression (4.1) and the claim, it follows:

$$\begin{aligned} g(S)\le & {} \sum _{i=1}^n{{\text {NL}}((S-S(\varvec{\alpha _i})){\setminus }(S-S(\varvec{\alpha _{i-1}})))}\\\le & {} \sum _{i=1}^{l(S)}({\text {NL}}((S-M){\setminus } S))=t(S)l(S), \end{aligned}$$

and the proof is complete. \(\square \)

Given a good semigroup S, its canonical ideal is the set \(K=\{\varvec{\alpha }\in {\mathbb {N}}^2|\Delta ^S(\varvec{\gamma }-\varvec{\alpha })=\emptyset \}\). In [1, Prop 2.17.] it is proved that \(g(S)\ge d(K{\setminus } C(S))\).

We observe that, if \(S-M\) is a good ideal, \(t(S)=d((S-M){\setminus } S)\). Since \(S-M\subseteq K\cup \Delta (\varvec{\gamma })\), we have:

$$\begin{aligned} t(S)\le & {} d(K\cup \Delta (\varvec{\gamma }){\setminus } S)\le d(K\cup \Delta (\varvec{\gamma }){\setminus } K)+d(K{\setminus } S)=1+d(K{\setminus } S)= \\= & {} d(K{\setminus } C(S))-d(S{\setminus } C(S))+1\le g(S)-l(S)+1 \end{aligned}$$

Using Proposition 4.2 it is possible to prove this inequality for any good semigroup S, also if \(S-M\) is not a good semigroup:

Corollary 4.7

Given a good semigroup S, \(g(S)\ge t(S)+l(S)-1\).

Proof

Since \({\text {PF}}(S)\subseteq (K{\setminus } S)\cup \Delta (\varvec{\gamma })\), by [8, Lemma 3.6] and Lemma 4.5, we deduce

$$\begin{aligned} t(S)= & {} {\text {NL}}({\text {PF}}(S))\le {\text {NL}}((K{\setminus } S)\cup \Delta (\varvec{\gamma }))\\ {}\le & {} {\text {NL}}((K{\setminus } S))+ {\text {NL}}( \Delta (\varvec{\gamma })) \le {\text {NL}}(K{\setminus } S)+1 \end{aligned}$$

If we apply the Proposition 4.2, considering \(I=K\), \(A=K{\setminus } S\), \(E=S\), we have:

$$\begin{aligned} {\text {NL}}(K{\setminus } S)+1=d(K{\setminus } S)+1=d(K{\setminus } C(S))-d(S{\setminus } C(S))+1\le g(S)-l(S)+1. \end{aligned}$$

\(\square \)

4.2 On the Wilf Conjecture

In [23], it was first introduced the well known Wilf conjecture regarding the numerical semigroups and in [13] it was slightly rephrased. It states that the number of minimal generators of a numerical semigroup S, i.e. the embedding dimension of the semigroup, always satisfies the inequality

$$\begin{aligned} {\text {edim}}(S) \ge \frac{c(S)}{c(S)-g(S)}, \end{aligned}$$

where c(S) and g(S) are, respectively, the conductor and the genus of the semigroup.

The Wilf conjecture represents an important open problem in the context of the numerical semigroups theory, and it has been proved for many special cases [4, 14, 15, 18, 20, 21] and checked for numerical semigroups up to genus 50 in [3] and up to genus 60 in [16].

In [19] the concept of embedding dimension of a good semigroup of \({\mathbb {N}}^2\) has been introduced, therefore, now it makes sense to extend in a natural way the conjecture to good semigroups. Specifically, we want to check if, for a good semigroup \(S \subseteq {\mathbb {N}}^d\) of genus g(S), the inequality

$$\begin{aligned} {\text {edim}}(S) \ge \frac{c_S}{c_S-g(S)}, \end{aligned}$$

always holds, where \(c_S\) is defined as in Sect. 2.

By exploring the tree of good semigroups of \({\mathbb {N}}^2\), introduced in the previous section, it is possible to check that the conjecture is satisfied for semigroups up to genus 22. However, starting from genus 23, examples where the conjecture is not verified begin to show up, as we can see in the following case.

Example

We consider the good semigroup S, represented by the following set of small elements:

$$\begin{aligned} {\text {Small}}(S)= & {} \{ (0,0), ( 4, 3 ), ( 8, 6 ), ( 8, 9 ), ( 8, 11 ), ( 8, 12 ), ( 8, 13 ), ( 8, 14 ), ( 9, 6 ),\\&( 12, 9 ), ( 12, 11 ), ( 12, 12 ),( 12, 13 ), ( 12, 14 ), ( 13, 9 ), ( 13, 11 ),\\&( 15, 9 ), ( 16, 12 ), ( 16, 13 ), ( 16, 14 ), ( 17, 12 ), ( 17, 13 ), ( 17, 14 ),\\&( 18, 12 ), ( 18, 13 ), ( 19, 12 ), ( 20, 14 ) \}. \end{aligned}$$

We have \(c_S=34\) and \(g(S)=23\). Using the algorithms presented in [19], it is possible to check that \({\text {edim}}(S)=3\) (according to the terminology introduced in that paper, the set \(\{(4,3),(8,\infty ),(13,11)\}\subseteq I_A(S)\) constitutes a minimal set of representatives for S).

Finally, we have:

$$\begin{aligned} 3={\text {edim}}(S)<\frac{c_S}{c_S-g(S)}=\frac{34}{11}, \end{aligned}$$

disproving the Wilf conjecture for good semigroups of \({\mathbb {N}}^2\).

Remark 4.8

It still makes sense to ask whether the Wilf conjecture is true for good semigroups that are value semigroups. In fact, at the moment, there are no known examples of value semigroups disproving the conjecture, since for all the known counterexamples it seems impossible to find suitable rings having them as value semigroups. This fact may suggest that the Wilf conjecture is more related to the structure inherited from the rings than on the combinatorical properties of these objects.