1 Introduction

   Let \(\mathbb {Z}\) be the set of integers and \(\mathbb {N}=\{z\in \mathbb {Z}\mid z\ge 0\}\). A submonoid of \((\mathbb {N},+)\) is a subset of \(\mathbb {N}\) which is closed under addition and contains the element 0. A numerical semigroup is a submonoid S of \((\mathbb {N},+)\) such that \(\mathbb {N}\backslash S=\{x\in \mathbb {N}\mid x \notin S\}\) has finitely many elements.

If S is a numerical semigroup, then \({\mathrm m}(S)=\min (S\backslash \{0\})\), \({\mathrm F}(S)={\textrm{max}}\{z\in \mathbb {Z}\mid z \notin S\}\) and \({\mathrm g}(S)=\#(\mathbb {N}\backslash S)\) (where \(\# X \) denotes the cardinality of a set X) are three important invariants of S and we call them the multiplicity, the Frobenius number and the genus of S, respectively.

If A is a subset nonempty of \(\mathbb {N}\), we denote by \(\langle A \rangle \) the submonoid of \((\mathbb {N},+)\) generated by A, that is, \(\langle A \rangle =\{\lambda _1a_1+\dots +\lambda _na_n \mid n\in \mathbb {N}\backslash \{0\}, \, \{a_1,\dots , a_n\}\subseteq A \text{ and } \{\lambda _1,\dots ,\lambda _n\}\subseteq \mathbb {N}\}.\) In [13, Lema 2.1]) it is shown that \( \langle A \rangle \) is a numerical semigroup if and only if \({\textrm{gcd}}(A)=1.\)

If M is a submonoid of \((\mathbb {N},+)\) and \(M=\langle A \rangle \), then we say that A is a system of generators of M. Moreover, if \(M\ne \langle B \rangle \) for all \(B \varsubsetneq A\), then we will say that A is a minimal system of generators of M. In [13, Corollary 2.8] is shown that every submonoid of \((\mathbb {N},+)\) has a unique minimal system of generators, which in addition is finite. We denote by \({\textrm{ msg }}(M)\) the minimal system of generators of M. The cardinality of \({\textrm{ msg }}(M)\) is called the embedding dimension of M and will be denoted by \({\mathrm e}(M).\)

The Frobenius problem (see [9]) focuses on finding formulas to calculate the Frobenius number and the genus of a numerical semigroup from its minimal system of generators. The problem was solved in [15] for numerical semigroups with embedding dimension two. Nowadays, the problem is still open in the case of numerical semigroups with embedding dimension greater than or equal to three. Furthemore, in this case the problem of computing the Frobenius number of a general numerical semigroup becomes NP-hard.

If \(F\in \mathbb {N}\backslash \{0\},\) then we consider the set \(\mathscr {A}(F)=\{S\mid S \text{ is } \text{ a } \text{ numerical } \text{ semi- }\) group and \({\mathrm F}(S)=F\}.\) The study of set \(\mathscr {A}(F)\) has been the origin and motivation of this work.

The generalization of \(\mathscr {A}(F)\) as a family of numerical semigroups that verifies certain properties leads us to give the following definition. A covariety is a nonempty family \(\mathscr {C}\) of numerical semigroups that fulfils the following conditions:

  1. (1)

    \(\mathscr {C}\) has a minimum, \(\Delta (\mathscr {C})=\min (\mathscr {C})\) (with respect to set inclusion).

  2. (2)

    If \(\{S, T\} \subseteq \mathscr {C}\), then \(S \cap T \in \mathscr {C}\).

  3. (3)

    If \(S \in \mathscr {C}\) and \(S \ne \Delta (\mathscr {C})\), then \(S \backslash \{{\mathrm m}(S)\} \in \mathscr {C}\).

The elements of \(\mathscr {C}\) are called \(\mathscr {C}\)-semigroups.

In Sect. 2, we will see that every covariety is finite and its elements can be ordered making a tree. Moreover, we present a characterization of the children of an arbitrary vertex in this tree. This fact will allow us, in Sect. 3, to give a quite efficient algorithm to calculate all the elements of \(\mathscr {A}(F).\)

If \(\mathscr {C}\) is a covariety, then it has a finite number \(S_1,\dots ,S_n\) of maximal elements. A \(\mathscr {C}\)-set is a subset of \(S_i\backslash \Delta (\mathscr {C})\) for some \(i\in \{1,\dots , n\}.\) In Sect. 4, we will show that if A is a \(\mathscr {C}\)-set, then there is the smallest element of \(\mathscr {C}\) that contains A. This element will be denoted by \(\mathscr {C}(A)\) and it will called the \(\mathscr {C}\)-semigroup generated by A.

If \(S=\mathscr {C}(A),\) then we will say that A is a \(\mathscr {C}\)-system of generators of S. Furthemore, if \(S\ne \mathscr {C}(B)\) for all \(B \varsubsetneq A\), then we will say that A is a \(\mathscr {C}\)-minimal system of generators of S. In Sect. 4, we will show an example of covariety \(\mathscr {C}\) where the \(\mathscr {C}\)-minimal system of generators is not unique. Also we will prove, in this section, that every \(\mathscr {A}(F)\)-semigroup admits a unique \(\mathscr {A}(F)\)-minimal system of generators.

In Sect. 5, we will talk about the smallest covariety that contains a finite family of numerical semigroups, and we will give an algorithmic procedure to compute it.

If \(\mathscr {C}\) is a covariety and S is a \(\mathscr {C}\)-semigroup, then the \(\mathscr {C}\)-rank of \(\mathscr {C}\) is \(\mathscr {C}_{\text{ rank }}(S)=\min \{\ \# A\mid A \text{ is } \text{ a } \mathscr {C}\text{-set } \text{ and } \mathscr {C}(A)=S \}.\) In Sect. 6, we will see that \(\mathscr {C}_{\text{ rank }}(S)\le {\mathrm e}(S)\) and \(\mathscr {C}_{\text{ rank }}(S)=0\) if and only if \(S=\Delta (\mathscr {C}).\)

In Sect. 6, we will also see that if \(S\in \mathscr {A}(F)\), then \(\mathscr {A}(F)_{\text{ rank }}(S)\le {\mathrm m}(S)-1.\) We will study the \(\mathscr {A}(F)\)-semigroups S such that \(\mathscr {A}(F)_{\text{ rank }}(S)\in \{1, {\mathrm m}(S)-1\}\) and we will find formulas to calculate the genus of this kind of numerical semigroups, depending on its \(\mathscr {A}(F)\)-minimal system of generators.

2 The tree associated with a covariety

If T is a numerical semigroup, then \(\mathbb {N}\backslash T\) is a finite set and so we have the following result.

Lemma 2.1

If T is a numerical semigroup, then the set

$$\begin{aligned} \{ S \mid S \text{ is } \text{ numerical } \text{ semigroup } \text{ and } T\subseteq S\} \end{aligned}$$

is finite.

Proposition 2.1

Every covariety has finite cardinality.

Proof

If \(\mathscr {C}\) is a covariety, then \(\mathscr {C}\subseteq \{S \mid S \text{ is } \text{ a } \text{ numerical } \text{ semigroup } \text{ and } \Delta (\mathscr {C})\subseteq S\}.\) By Lemma 2.1, we know that \(\{S \mid S \text{ is } \text{ a } \text{ numerical } \text{ semigroup } \text{ and } \Delta (\mathscr {C})\subseteq S\}\) is a finite set. Therefore \(\mathscr {C}\) is finite. \(\square \)

The following result is well known and it is easy to prove.

Lemma 2.2

Let S and T be numerical semigroups and \(x\in S.\) Then

  1. 1.

    \(S\cap T\) is also a numerical semigroup and \({\mathrm F}(S\cap T)={\textrm{max}}\{{\mathrm F}(S), {\mathrm F}(T)\}.\)

  2. 2.

    \(S\backslash \{x\}\) is a numerical semigroup if and only if \(x\in {\textrm{ msg }}(S).\)

  3. 3.

    \({\mathrm m}(S)=\min \left( {\textrm{ msg }}(S)\right) .\)

As a consequence of this lemma we have the following result.

Proposition 2.2

If \(F\in \mathbb {N}\backslash \{0\}\), then \(\mathscr {A}(F)\) is a covariety. Moreover,

$$\begin{aligned} \Delta (\mathscr {A}(F))=\{0,F+1,\rightarrow \}, \end{aligned}$$

where the symbol \(\rightarrow \) means that every integer greater than \(F+1\) belongs to the set.

A graph G is a pair (VE) where V is a nonempty set and E is a subset of \(\{(u,v)\in V\times V \mid u\ne v\}\). The elements of V and E are called vertices and edges, respectively. A path (of length n) connecting the vertices x and y of G is a sequence of different edges of the form \((v_0,v_1), (v_1,v_2),\ldots ,(v_{n-1},v_n)\) such that \(v_0=x\) and \(v_n=y\).

A graph G is a tree if there exists a vertex r (known as the root of G) such that for any other vertex x of G there exists a unique path connecting x and r. If (uv) is an edge of the tree G, we say that u is a child of v.

Let \(\mathscr {C}\) be a covariety and let \(S\in \mathscr {C}.\) Define recursively the following sequence of \(\mathscr {C}\)-semigroups:

  • \(S_0=S\),

  • \(S_{n+1} =\left\{ \begin{array}{ll} S_n\backslash \{{\mathrm m}(S_n)\} &{} \text{ if } S_n\ne \Delta (\mathscr {C}),\\ \Delta (\mathscr {C}) &{} \text{ otherwise. } \end{array} \right. \)

The following result has an immediate proof.

Lemma 2.3

If \(\mathscr {C}\) is a covariety, \(S\in \mathscr {C}\) and \(\{S_n\}_{n\in \mathbb {N}}\) is the sequence of semigroups defined above, then there is \(k\in \mathbb {N}\) such that \(\Delta (\mathscr {C})=S_k\subsetneq S_{k-1} \subsetneq \dots \subsetneq S_0=S.\) Moreover, the cardinality of \(S_i\backslash S_{i+1}\) is equal to 1 for every \(i\in \{0,1,\dots ,k-1\}.\)

If \(\mathscr {C}\) is a covariety, we define the graph \({\mathrm G}(\mathscr {C})\) in the following way:

  • the set of vertices of \({\mathrm G}(\mathscr {C})\) is \(\mathscr {C}\),

  • \((S,T)\in \mathscr {C}\times \mathscr {C}\) is an edge of \({\mathrm G}(\mathscr {C})\) if and only if \(T=S\backslash \{{\mathrm m}(S)\}.\)

As a consequence of Lemma 2.3, we have the following result.

Proposition 2.3

If \(\mathscr {C}\) is a covariety, then \({\mathrm G}(\mathscr {C})\) is a tree with root \(\Delta (\mathscr {C}).\)

A tree can be built recurrently starting from the root and connecting, through an edge, the vertices already built with their children. Hence, it is very interesting to characterize the children of an arbitrary vertex in a tree.

Following the terminology introduced in [11], an integer z is a pseudo-Frobenius number of S if \(z\notin S\) and \(z+s\in S\) for all \(s\in S\backslash \{0\}.\) We denote by \({\textrm{PF}}(S)\) the set of pseudo-Frobenius numbers of S. The cardinality of \({\textrm{PF}}(S)\) is an important invariant of S (see [7] and [3]) called the type of S,  denoted by \({\mathrm t}(S).\)

The following result is Corollary 2.23 from [13].

Lemma 2.4

If S is a numerical semigroup and \(S\ne \mathbb {N},\) then \({\mathrm t}(S)\le {\mathrm m}(S)-1.\)

Given a numerical semigroup S,  denote by \(\textrm{SG}(S)=\{x\in {\textrm{PF}}(S)\mid 2x\in S\}.\) The elements of \(\textrm{SG}(S)\) will be called the special gaps of S. The following result is Proposition 4.33 from [13].

Lemma 2.5

Let S be a numerical semigroup and \(x\in \mathbb {N}\backslash S.\) Then \(x\in \textrm{SG}(S)\) if and only if \(S\cup \{x\}\) is a numerical semigroup.

Proposition 2.4

If \(\mathscr {C}\) is a covariety and \(S\in \mathscr {C},\) then the set formed by the children of S in the tree \({\mathrm G}(\mathscr {C})\) is \(\{S\cup \{x\}\mid x\in \textrm{SG}(S), x<{\mathrm m}(S) \text{ and } S\cup \{x\}\in \mathscr {C}\}.\)

Proof

If T is a child of S,  then \(T\in \mathscr {C}\) and \(T\backslash \{{\mathrm m}(T)\}=S.\) Therefore, \(S\cup \{{\mathrm m}(T)\}=T\in \mathscr {C},\) \({\mathrm m}(T) \in \textrm{SG}(S)\) and \({\mathrm m}(T)<{\mathrm m}(S).\)

If \(x<{\mathrm m}(S),\) then \({\mathrm m}(S\cup \{x\})=x.\) Hence, \(S\cup \{x\}\in \mathscr {C}\) and \(\left( S\cup \{x\}\right) \backslash \{{\mathrm m}(S\cup \{x\})\}=S.\) Consequently, \(S\cup \{x\}\) is a child of S in the tree \({\mathrm G}(\mathscr {C}).\) \(\square \)

3 Algorithm to compute \(\mathscr {A}(F)\)

   Let S be a numerical semigroup and \(n\in S\backslash \{0\}\). The Apéry set of n in S (named so in honour of [2]) is \(\textrm{Ap}(S,n)=\{s\in S\mid s-n \notin S\}\).

The following result is deduced from [13, Lemma 2.4].

Lemma 3.1

If S is a numerical semigroup and \(n\in S\backslash \{0\},\) Then \(\textrm{Ap}(S,n)\) is a set with cardinality n. Moreover, \(\textrm{Ap}(S,n)=\{0=w(0),w(1), \dots , w(n-1)\}\), where w(i) is the least element of S congruent with i modulo n, for all \(i\in \{0,\dots , n-1\}.\)

If S is a numerical semigroup, then we define over \(\mathbb {Z}\) the following order relation: \(a\le _S b\) if and only if \(b-a\in S.\) The following result is [11, Lemma 10].

Lemma 3.2

If S is a numerical semigroup and \(n \in S{\setminus } \{0\}.\) Then

$$\begin{aligned} {\textrm{PF}}(S)=\{w-n\mid w \in \textrm{Maximals}_{\le _S}\textrm{Ap}(S,n)\}. \end{aligned}$$

The following result has an immediate proof.

Lemma 3.3

Let S be a numerical semigroup, \(n\in S\backslash \{0\}\) and \(w \in \textrm{Ap}(S,n).\) Then \(w\in \textrm{Maximals}_{\le _S}(\textrm{Ap}(S,n))\) if and only if \(w+w'\notin \textrm{Ap}(S,n)\) for all \(w'\in \textrm{Ap}(S,n)\backslash \{0\}. \)

The following result has a simple proof.

Lemma 3.4

If S is a numerical semigroup and \(S\ne \mathbb {N},\) then

$$\begin{aligned}\textrm{SG}(S)=\{x\in {\textrm{PF}}(S)\mid 2x \notin {\textrm{PF}}(S)\}.\end{aligned}$$

Remark 1

Note that if S is a numerical semigroup and we know \(\textrm{Ap}(S,n)\) for some \(n\in S \backslash \{0\},\) as a consequence of Lemmas 3.23.3 and 3.4, we can easily compute \(\textrm{SG}(S).\)

We will illustrate the content of the previous remark with an example.

Example 1

Let \(S=\{0,5,\rightarrow \}.\) Then \(\textrm{Ap}(S,5)=\{0,6,7,8,9\}.\) By applying Lemma 3.3, we have that \(\textrm{Maximals}_{\le _S}\textrm{Ap}(S,5)=\{6,7,8,9\}.\) Then Lemma 3.2 asserts that \({\textrm{PF}}(S)=\{1,2,3,4\}.\) Finally, by using Lemma 3.4, we obtain \(\textrm{SG}(S)=\{3,4\}.\)

The following result is easy to prove.

Lemma 3.5

Let S be a numerical semigroup, \(n\in S \backslash \{0\}\) and \(x\in \textrm{SG}(S).\) Then \(x+n\in \textrm{Ap}(S,n).\) Furthemore, \(\textrm{Ap}\left( S\cup \{x\},n \right) =\left( \textrm{Ap}(S,n)\backslash \{x+n\}\right) \cup \{x\}.\)

Remark 2

Observe that as a consequence from Lemma 3.5, if we know \(\textrm{Ap}(S,n),\) then we can easily compute \(\textrm{Ap}(S\cup \{x\},n).\) In particular, if \(\mathscr {C}\) is a covariety and \(S\in \mathscr {C},\) then by Lemma 3.5 allows to calculate the set \(\textrm{Ap}(T,n)\) from \(\textrm{Ap}(S,n),\) for all child T of S in the tree \({\mathrm G}(\mathscr {C})\)(see Proposition 2.4).

Next we illustrate this remark with an example.

Example 2

We take again the numerical semigroup \(S=\{0,5,\rightarrow \}\) with \(\textrm{Ap}(S,5)=\{0,6,7,8,9\}.\) By Example 1 we know that \(3\in \textrm{SG}(S).\) If \(T=S\cup \{3\},\) then the Lemma 3.5, asserts that \(\textrm{Ap}(T,5)=\left( \{0,6,7,8,9\}\backslash \{3+5\}\right) \cup \{3\}=\{0,3,6,7,9\}.\)

As a consequence of Propositions 2.2 and 2.4, we have the following result.

Proposition 3.1

Let \(F\in \mathbb {N}\backslash \{0\}\) and \(S\in \mathscr {A}(F).\) Then the set formed by the children of S in the tree \({\mathrm G}(\mathscr {A}(F))\) is \(\left\{ S\cup \{x\}\mid x \in \textrm{SG}(S), \, x<{\mathrm m}(S) \text{ and } x\ne F\right\} .\)

In the following example, we illustrate the usage of Algorithm 1.

Algorithm 1
figure a

Computation of the covariety of numerical semigroups with Frobenius number F.

Example 3

We are going to compute \(\mathscr {A}(5).\) In order to simplify notation we will write \(\Delta \) to denote \(\Delta (\mathscr {A}(5)).\)

  • \(\mathscr {A}(5)=\{\Delta =\{0,6,\rightarrow \}\},\) \(B=\{\Delta \}\) and \(\textrm{Ap}(\Delta ,6)=\{0,7,8,9,10,11\}.\)

  • \(\theta (\Delta )=\{3,4\}\) and \(C=\{\Delta \cup \{3\},\Delta \cup \{4\}\}.\)

  • \(\mathscr {A}(5)=\{\Delta , \Delta \cup \{3\},\Delta \cup \{4\}\}, \) \(B=\{\Delta \cup \{3\},\Delta \cup \{4\}\},\) \(\textrm{Ap}(\Delta \cup \{3\},6)=\{0,3,7,8,10,11\}\) and \(\textrm{Ap}(\Delta \cup \{4\},6)=\{0,4,7,8,9,11\}.\)

  • \(\theta (\Delta \cup \{3\})=\emptyset ,\) \(\theta (\Delta \cup \{4\})=\{2,3\}\) and \(C=\{\Delta \cup \{2,4\},\Delta \cup \{3,4\}\}.\)

  • \(\mathscr {A}(5)=\{\Delta , \Delta \cup \{3\},\Delta \cup \{4\}, \Delta \cup \{2,4\}, \Delta \cup \{3,4\} \}, \) \(B=\{\Delta \cup \{2,4\},\Delta \cup \{3,4\}\},\) \(\textrm{Ap}(\Delta \cup \{2,4\},6)=\{0,2,4,7,9,11\}\) and \(\textrm{Ap}(\Delta \cup \{3,4\},6)=\{0,3,4,7,8,11\}.\)

  • \(\theta (\Delta \cup \{2,4\})=\emptyset \) and \(\theta (\Delta \cup \{3,4\})=\emptyset .\) Therefore the Algorithm return \(\mathscr {A}(5)=\{\Delta , \Delta \cup \{3\}, \Delta \cup \{4\},\Delta \cup \{2,4\},\Delta \cup \{3,4\}\}.\)

4 The least \(\mathscr {C}\)-semigroup that contains a \(\mathscr {C}\)-set

   Along this section \(\mathscr {C}\) denotes a covariety and \(\{M_1,\dots , M_n\}\) is the set formed by the maximal elements of \(\mathscr {C},\) with respect to set inclusion. Recall that a \(\mathscr {C}\)-set is a subset of \(M_i\backslash \Delta (\mathscr {C})\) for some \(i\in \{1,\dots ,n\}.\)

If A is a \(\mathscr {C}\)-set, then we denote by \(\mathscr {C}(A)\) the intersection of all the \(\mathscr {C}\)-semigroups containing A. As \(\mathscr {C}\) is finite, then the intersection of \(\mathscr {C}\)-semigroups is also a \(\mathscr {C}\)-semigroup. Therefore, we can state the following result.

Proposition 4.1

If A is a \(\mathscr {C}\)-set, then \(\mathscr {C}(A)\) is the least (with respect to set inclusion) \(\mathscr {C}\)-semigroup containing A.

Proposition 4.2

If \(S\in \mathscr {C},\) then \(A=\{x\in {\textrm{ msg }}(S)\mid x\notin \Delta (\mathscr {C})\}\) is a \(\mathscr {C}\)-set and \(\mathscr {C}(A)=S.\)

Proof

It is clear that A is a \(\mathscr {C}\)-set. As \(S\in \mathscr {C}\) and \(A\subseteq S,\) then \(\mathscr {C}(A)\subseteq S.\) If \(T\in \mathscr {C}\) and \(A\subseteq T,\) then \(A\cup \Delta (\mathscr {C})\subseteq T.\) Therefore \({\textrm{ msg }}(S)\subseteq T\) and consequently \(S\subseteq T.\) Thus \(S\subseteq \mathscr {C}(A).\) We conclude that \(S=\mathscr {C}(A).\) \(\square \)

As a consequence of Proposition 4.2, we have the following result.

Corollary 4.1

Under the standing notation, \(\mathscr {C}=\{\mathscr {C}(A)\mid A \text{ is } \text{ a } \mathscr {C}\text{-set }\}.\)

If A is a \(\mathscr {C}\)-set and \(S=\mathscr {C}(A)\), then we say that A is a \(\mathscr {C}\)-system of generators of S. Furthemore, if \(S\ne \mathscr {C}(B)\) for all \(B \varsubsetneq A\), then we will say that A is a \(\mathscr {C}\)-minimal system of generators of S.

In general, the \(\mathscr {C}\)-minimal system of generators are not unique as the following example shows.

Example 4

Let \(\mathscr {C}=\{S \mid S \text{ is } \text{ a } \text{ numerical } \text{ semigroup, } {\mathrm m}(S)\ge 6 \text{ and } {\mathrm F}(S)\le 11\}\cup \left\{ S_1=\{0,5,6,7,10, \rightarrow \}, S_2=\{0,5,8,9,10, \rightarrow \}, S_3=\{0,5,10, \rightarrow \}\right\} .\)

  • It is clear that \(\Delta (\mathscr {C})=\{0,12,\rightarrow \}\) is the minimum of \(\mathscr {C}.\)

  • We can see straightforwardly that the intersection of two elements of \(\mathscr {C}\) is again an element of \(\mathscr {C}.\)

  • It is clear that if \(S\in \mathscr {C}\) and \(S\ne \Delta (\mathscr {C}),\) then \(S\backslash \{{\mathrm m}(S)\}\in \mathscr {C}.\)

  • As a consequence of the three previous claims, we have that \(\mathscr {C}\) is a covariety.

  • It is easy to verify that \(\mathscr {C}(\{5,6\})=\mathscr {C}(\{5,7\})=S_1,\) \(\mathscr {C}(\{5\})=S_3,\) \(\mathscr {C}(\{6\})=\{0,6,12,\rightarrow \}),\) \(\mathscr {C}(\{7\})=\{0,7,12,\rightarrow \})\) and \(\mathscr {C}(\{ \emptyset \})=\{0,12,\rightarrow \}.\)

Therefore, the sets \(\{5,6\}\) and \(\{5,7\}\) are \(\mathscr {C}\)-minimal system of generators of \(S_1\)

Finally, note that the above example also shows that, in general, the set \(\{x\in {\textrm{ msg }}(S)\mid x \notin \Delta (\mathscr {C})\}\) is not a minimal system of generators of S. In fact, \(\{x\in {\textrm{ msg }}(S_1)\mid x \notin \{0,12, \rightarrow \}\}=\{5,6,7\}\) and \(\mathscr {C}(\{5,7\})=S_1.\)

Our next aim in this section will be to prove that every \(\mathscr {A}(F)\)-semigroup admits a unique \(\mathscr {A}(F)\)-minimal system of generators.

Proposition 4.3

If \(F\in \mathbb {N}\backslash \{0\}\) and \(S \in \mathscr {A}(F),\) then the set \(A=\{x\in {\textrm{ msg }}(S)\mid x\notin \Delta (\mathscr {A}(F))\}\) is the unique \(\mathscr {A}(F)\)-minimal system of generators of S.

Proof

By Proposition 4.2, we know that A is an \(\mathscr {A}(F)\)-set and \(\mathscr {A}(F)(A)=S\). To conclude the proof, we will see that if B is an \(\mathscr {A}(F)\)-set and \(\mathscr {A}(F)(B)=S,\) then \(A \subseteq B.\) In fact, if \(x\in A\backslash B,\) then \(S\backslash \{x\}\) is an \(\mathscr {A}(F)\)-semigroup and \(B\subseteq S\backslash \{x\}.\) Therefore, \(\mathscr {A}(F)(B)\subseteq S\backslash \{x\},\) which is impossible. \(\square \)

We end this section by characterizing the maximal elements of the covariety \(\mathscr {A}(F).\)

A numerical semigroup is irreducible if it cannot be expressed as an intersection of two numerical semigroups containing it properly. This concept was introduced in [12] where the following result is also proven.

Proposition 4.4

Let S be a numerical semigroup. Then S is irreducible if and only if S is a maximal element in \(\mathscr {A}({\mathrm F}(S)).\)

The irreducible numerical semigroups have great interest because from [3] and [7], can be deduced that a numerical semigroup S is irreducible if and only if S is a symmetric or pseudo-symmetric numerical semigroup. These kind of semigroups have been widely treated in the literature because a one dimensional local domain analytically irreducible is Gorenstein (respectively Kunz) if and only if its value semigroup is symmetric (respectively pseudo-symmetric), see [8] and [3]. Finally, we will mention that in [5] appears an algorithm which computes all the irreducible numerical semigroups with a fixed Frobenius number. These results are used in [4] to give and algorithm that allows to compute all the elements of \(\mathscr {A}(F).\)

5 The covariety generated by a finite family of numerical semigroups

   In general, the intersection of covarieties is not a covariey. In fact, if S and T are numerical semigroups with \(S\ne T,\) then \(\mathscr {C}_1=\{S\}\) and \(\mathscr {C}_1=\{T\}\) are covarieties an \(\mathscr {C}_1\cap \mathscr {C}_2=\emptyset \) which is not a covariety.

The following result has an immediate proof.

Lemma 5.1

Let \(\{\mathscr {C}_i\}_{i\in I}\) be a family of covarieties such that \(\Delta (\mathscr {C}_i)=\Delta \) for all \(i\in I,\) then \(\bigcap _{i\in I}\mathscr {C}_i\) is a covariety and \(\Delta \) is its minimum element.

If \(F\in \mathbb {N}\backslash \{0\},\) then we denote by

$$\begin{aligned}{\mathscr {B}}(F)=\{S\mid S \text{ is } \text{ a } \text{ numerical } \text{ semigroup } \text{ and } {\mathrm F}(S)\le F\}.\end{aligned}$$

The following result is straightforward to prove.

Lemma 5.2

If \(F\in \mathbb {N}\backslash \{0\},\) then \({\mathscr {B}}(F)\) is a covariety and its minimum is \(\Delta ({\mathscr {B}}(F))=\{0,F+1,\rightarrow \}.\)

The following result has an immediate proof.

Lemma 5.3

If \(S_1,\dots , S_n\) are numerical semigroups and \(F={\textrm{max}}\{{\mathrm F}(S_1),\dots , {\mathrm F}(S_n)\},\) then \(\{S_1,\dots , S_n\}\subseteq {\mathscr {B}}(F).\)

If \(\{S_1,\dots , S_n\}\) is a finite set of numerical semigroups and \(F={\textrm{max}}\{{\mathrm F}(S_1),\dots , {\mathrm F}(S_n)\},\) then we denote by \(\displaystyle \langle \{S_1,\dots ,S_n\}\rangle ,\) the intersection of all covarieties that contain \(\{S_1,\dots , S_n\}\) and have \(\{0,F+1, \rightarrow \}\) as minimum.

As a consequence of Lemmas 5.15.2 and 5.3, we have the following result.

Proposition 5.1

If \(S_1,\dots , S_n\) are numerical semigroups, then \(\displaystyle \langle \{S_1,\dots ,S_n\}\rangle \) is the smallest (with respect to set inclusion) covariety that contains \(\{S_1,\dots , S_n\}\) and has \(\{0,F+1, \rightarrow \}\) as minimum.

The covariety \(\displaystyle \langle \{S_1,\dots ,S_n\}\rangle \) is called the covariety generated by \(\{S_1,\dots , S_n\}.\) Our main aim will be to give an algorithmic procedure to compute all elements of \(\displaystyle \langle \{S_1,\dots ,S_n\}\rangle \) from \(\{S_1,\dots , S_n\}.\)

For all \(i \in \{1,\dots , n\},\) we recurrentely define the following sequence:

  • \(S^0_i = S_i\),

  • \(S^{n+1}_i =\left\{ \begin{array}{lcl} S^n_i\backslash \{{\mathrm m}(S_i^n)\} &{} &{} \text{ if } \,\, S_i^n\ne \{0,F+1,\rightarrow \},\\ \{0,F+1,\rightarrow \} &{} &{} \text{ otherwise. } \\ \end{array} \right. \)

The following result has an immediate proof.

Lemma 5.4

For every \(i\in \{1,\dots ,n\}\) there exists \(P_i=\min \{k\in \mathbb {N}\mid S_i^k=\{0,F+1,\rightarrow \}\}.\)

For all \(i\in \{1,\dots ,n\},\) we will denote by \({\textrm{Cad}}(S_i)=\{S_i^0,\dots , S_i^{P_i}\}.\) Note that \(\{0,F+1,\rightarrow \}=S_i^{P_i}\subsetneq S_i^{P_i-1}\subsetneq \dots \subsetneq S_i^0=S_i\) and \(\# (S_i^k\backslash S_i^{k+1})=1\) for every \(k \in \{0,\dots , P_i-1\}.\)

The following proposition provides us the previously announced result.

Proposition 5.2

If \(S_1,\dots , S_n\) are numerical semigroups, then \(\displaystyle \langle \{S_1,\dots ,S_n\}\rangle =\{\bigcap _{b\in B}T_b\mid \emptyset \ne B \subseteq \{1,\dots ,n\} \text{ and } T_b\in {\textrm{Cad}}(S_b) \text{ for } \text{ all } b\in B\}.\)

Proof

To prove this proposition it is enough to see that \(\mathscr {C}=\{\bigcap _{b\in B}T_b\mid \emptyset \ne B \subseteq \{1,\dots ,n\} \text{ and } T_b\in {\textrm{Cad}}(S_b) \text{ for } \text{ all } b\in B\}\) is a covariety.

  • We can see that \(\{0,F+1,\rightarrow \}\) is the minimum of \(\mathscr {C}.\)

  • It is clear that the intersection of two elements of \({\textrm{Cad}}(S_i)\) is again an element of \({\textrm{Cad}}(S_i).\)

  • As a consequence of the previous set, we easily obtain that the intersection of two elements of \(\mathscr {C}\) is again an element of \(\mathscr {C}.\)

  • Now, we will see that if \(T\in \mathscr {C}\) and \(T\ne \{0,F+1,\rightarrow \},\) then \(T\backslash \{{\mathrm m}(T)\}\in \mathscr {C}.\) Indeed, if \(T\in \mathscr {C},\) then there exists \(\emptyset \ne B \subseteq \{1,\dots ,n\}\) and there is \( T_b\in {\textrm{Cad}}(S_b)\) for all \(b\in B\) such that \(T=\bigcap _{b\in B}T_b.\) As \({\mathrm m}(T)\in T,\) then \({\mathrm m}(T)\in S_b\) for all \(b\in B.\) For every \(b\in B,\) we denote by \(T'_b=\{x\in T_b\mid x>{\mathrm m}(T)\}\cup \{0\}.\) It is clear that \(T'_b\in {\textrm{Cad}}(S_b)\) for all \(b\in B\) and \(T\backslash \{{\mathrm m}(T)\}=\bigcap _{b\in B}T'_b.\) Therefore, \(T\backslash \{{\mathrm m}(T)\}\in \mathscr {C}.\)

  • As a consequence of the previous points, we have that \(\mathscr {C}\) is a covariety.

\(\square \)

The following result is an immediate consequence of Proposition 5.2.

Corollary 5.1

If S is a numerical semigroup, then \(\langle \{S\}\rangle ={\textrm{Cad}}(S).\)

We end this section by giving an example that illustrates the content of Proposition 5.2.

Example 5

Let \(S_1=\langle 5,7,9\rangle =\{0,5,7,9,10,12,14,\rightarrow \}\) and \(S_2=\langle 4,6,9\rangle =\{0,4,6,8,9,10,12,\rightarrow \}.\) Then \(13={\textrm{max}}\{{\mathrm F}(S_1)=13,{\mathrm F}(S_2)=11\},\) \({\textrm{Cad}}(S_1)=\displaystyle \left\{ S_1, S_1\backslash \{5\}, S_1\backslash \{5,7\}, S_1\backslash \{5,7,9\}, S_1\backslash \{5,7,9,10\}, S_1\backslash \{5,7,9,10,12\}\right\} \) and

\({\textrm{Cad}}(S_2)=\displaystyle \left\{ S_2, S_2\backslash \{4\}, S_2\backslash \{4,6\}, S_2\backslash \{4,6,8\}, S_2\backslash \{4,6,8,9\}, S_2\backslash \{4,6,8,9,10\},\right. \)

\(\left\{ S_2\backslash \{4,6,8,9,10,12\}, S_2\backslash \{4,6,8,9,10,12,13\} \right\} .\)

By applying Proposition 5.2, we obtain that \(\displaystyle \langle \{S_1,S_2\}\rangle ={\textrm{Cad}}(S_1)\cup {\textrm{Cad}}(S_2)\cup \{T_1\cap T_2 \mid T_1\in {\textrm{Cad}}(S_1) \text{ and } T_2\in {\textrm{Cad}}(S_2)\}.\)

6 The \(\mathscr {C}\)-rank of a \(\mathscr {C}\)-semigroup

   If \(\mathscr {C}\) is a covariey and S is a \(\mathscr {C}\)-semigroup, then the \(\mathscr {C}\)-rank of S is \(\mathscr {C}_{\textrm{rank}\, }(S)=\min \{\# A\mid A \text{ is } \text{ a } \mathscr {C}\text{-set } \text{ and } \mathscr {C}(A)=S\}.\)

As a consequence of Proposition 4.2, we have the following result.

Proposition 6.1

If \(\mathscr {C}\) is a covariety and S is a \(\mathscr {C}\)-semigroup, then \(\mathscr {C}_{\textrm{rank}\, }(S)\le {\mathrm e}(S).\)

The following result has an immediate proof.

Proposition 6.2

Let \(\mathscr {C}\) be a covariety and \(S\in \mathscr {C}.\) Then \(\mathscr {C}_{\textrm{rank}\, }(S)=0\) if and only if \(S=\Delta (\mathscr {C}).\)

Lemma 6.1

Let \(\mathscr {C}\) be a covariety and \(S\in \mathscr {C}\) such that \(S\ne \Delta (\mathscr {C}).\) If A is a \(\mathscr {C}\)-set and \(\mathscr {C}(A)=S,\) then \({\mathrm m}(S)\in A.\)

Proof

If \({\mathrm m}(S)\notin A,\) then \(S\backslash \{{\mathrm m}(S)\}\) is a \(\mathscr {C}\)-semigroup that contains A. Therefore, \(\mathscr {C}(A)\subseteq S\backslash \{{\mathrm m}(S)\},\) which is absurd. \(\square \)

Proposition 6.3

Let \(\mathscr {C}\) be a covariety and \(S\in \mathscr {C}\) such that \(S\ne \Delta (\mathscr {C}).\) Then the following conditions are equivalent.

  1. 1.

    \(\mathscr {C}_{\textrm{rank}\, }(S)=1.\)

  2. 2.

    There is \(a\in S\) such that \(S=\mathscr {C}(\{a\}).\)

  3. 3.

    \(S=\mathscr {C}(\{{\mathrm m}(S)\}).\)

Proof

(1) implies (2). Trivial.

(2) implies (3). It is a consequence of Lemma 6.1.

(3) implies (1). It follows from Proposition 6.2. \(\square \)

As a consequence of Proposition 4.3, we have the following result.

Proposition 6.4

Let \(\{a_1,\dots , a_n,a_{n+1}=F\}\subseteq \mathbb {N}\) where \(0<a_1<\dots<a_n<a_{n+1}\) and \(a_{i+1}\notin \displaystyle \langle \{a_1,\dots ,a_i\}\rangle \) for all \(i\in \{1,\dots , n\}.\) Then \(\displaystyle \langle \{a_1,\dots ,a_n\}\rangle \cup \{F+1,\rightarrow \}\) is an \(\mathscr {A}(F)\)-semigroup with \(\mathscr {A}(F)\)-\(\textrm{rank}\, \) equal to n. Moreover, every \(\mathscr {A}(F)\)-semigroup with \(\mathscr {A}(F)\)-\(\textrm{rank}\, \) equal to n has this form.

For integers a and b,  we say that a divides b if there exists an integer c such that \(b=ca,\) and we denote this by \(a\mid b.\) Otherwise, a does not divide b, and we denote this by \(a\not \mid b.\)

As an immediate consequence of Proposition 6.4, we have the following result.

Corollary 6.1

If \(\{m,F\}\subseteq \mathbb {N}\) such that \(0<m<F\) and \(m\not \mid F,\) then \(\langle m \rangle \cup \{F+1,\rightarrow \}\) is an \(\mathscr {A}(F)\)-semigroup with \(\mathscr {A}(F)\)-\(\textrm{rank}\, \) equal to one. Moreover, every \(\mathscr {A}(F)\)-semigroup with \(\mathscr {A}(F)\)-\(\textrm{rank}\, \) equal to one has this form.

If q is a rational number, \(\lfloor q \rfloor ={\textrm{max}}\{z\in \mathbb {Z}\mid z\le q\}.\)

Proposition 6.5

If \(F\in \mathbb {N}\backslash \{0\},\) \(S\in \mathscr {A}(F)\) and \(\mathscr {A}(F)_{\textrm{rank}\, (S)}=1,\) then \({\mathrm g}(S)=F-\displaystyle \left\lfloor \frac{F}{{\mathrm m}(S)}\right\rfloor .\)

Proof

From Corollary 6.1, we deduce that \(S=\langle {\mathrm m}(S) \rangle \cup \{F+1,\rightarrow \}.\) Therefore, \(S=\left\{ 0,{\mathrm m}(S),2{\mathrm m}(S),\dots ,\left\lfloor \frac{F}{{\mathrm m}(S)}\right\rfloor {\mathrm m}(S) \right\} \cup \{F+1,\rightarrow \}.\) Hence, \({\mathrm g}(S)=F-\displaystyle \left\lfloor \frac{F}{{\mathrm m}(S)}\right\rfloor .\) \(\square \)

Example 6

Let \(\mathscr {A}(15)(\{6\}).\) By applying Proposition 6.5, we have that \({\mathrm g}(S)=15-\displaystyle \left\lfloor \frac{15}{6}\right\rfloor =15-2=13.\)

Let \(P_1,\dots , P_r\) be positive prime intergers and \(\{\alpha _1,\dots , \alpha _r\}\subseteq \mathbb {N}.\) We know that the number of positive divisors of \(P_1^{\alpha _1}\dots P_r^{\alpha _r}\) is \((\alpha _1+1)\cdots (\alpha _r+1).\) Then, as a consequence of Corollary 6.1, we have the following result.

Proposition 6.6

Let F be an integer such that \(F\ge 2.\) If \(F=P_1^{\alpha _1}\dots P_r^{\alpha _r}\) is the decomposition of F into primes, then the set \(\{S\in \mathscr {A}(F)\mid \mathscr {A}(F)_{\textrm{rank}\, (S)}=1\}\) has cardinality \(F-(\alpha _1+1)\cdots (\alpha _r+1).\)

Example 7

As \(72=2^3\cdot 3^2\), then by applying Proposition 6.6, the set \(\{S\in \mathscr {A}(72)\mid \mathscr {A}(72)_{\textrm{rank}\, (S)}=1\}\) has cardinality \(72-(3+1)\cdot (2+1)=72-12=60.\)

The next aim is to study the \(\mathscr {A}(F)\)-semigroups with maximum rank. For this, we need to introduce some concepts and results.

The following result is deduced from [13, Proposition 2.10].

Lemma 6.2

Let S be a numerical semigroup. Then \({\mathrm e}(S)\le {\mathrm m}(S).\)

A numerical semigroup S is said to be maximal embedding dimension(referred to henceforth as \({\textrm{MED}}\)-semigroup) if \({\mathrm e}(S) = {\mathrm m}(S).\)

In the literature, one can find a long list of works dealing with the study of one dimensional analytically irreducible local domains via their value semigroups. One of the properties studied for this kind of rings using this approach is that of being of maximal embedding dimension (see [1, 3, 6, 14]).

The following result is deduced from [13, Corollary 3.2].

Lemma 6.3

If S is a \({\textrm{MED}}\)-semigroup, then \({\mathrm F}(S)={\textrm{max}}\left( {\textrm{ msg }}(S) \right) -{\mathrm m}(S).\)

Proposition 6.7

Let \(F\in \mathbb {N}\backslash \{0\}\) and \(S\in \mathscr {A}(F).\) Then \(\mathscr {A}(F)_{\textrm{rank}\, }(S)\le {\mathrm m}(S)-1.\)

Proof

By Proposition 6.1, we know that \(\mathscr {A}(F)_{\textrm{rank}\, (S)}\le {\mathrm e}(S)\) and by Lemma 6.2, we have \({\mathrm e}(S) \le {\mathrm m}(S).\) If \({\mathrm e}(S) ={\mathrm m}(S),\) then by applying Lemma 6.3, we deduce that \(F<{\textrm{max}}({\textrm{ msg }}(S)).\) By using Proposition 4.3, we conclude that \(\mathscr {A}(F)_{\textrm{rank}\, }(S)\le {\mathrm e}(S)-1= {\mathrm m}(S)-1.\) \(\square \)

If \(S\in \mathscr {A}(F)\) and \(\mathscr {A}(F)_{\textrm{rank}\, }(S)={\mathrm m}(S)-1,\) then we say that S is an \(\mathscr {A}(F)\)-semigroup with maximum \(\mathscr {A}(F)_{\textrm{rank}\, }\) (referred to henceforth as \({\mathrm M}\mathscr {A}(F){\mathrm R}\)-semigroup).

Proposition 6.8

Let S be a \({\textrm{MED}}\)-semigroup and \(F={\textrm{max}}({\textrm{ msg }}(S)).\) Then \(S\backslash \{F\}\) is a \({\mathrm M}\mathscr {A}(F){\mathrm R}\)-semigroup. Moreover, every \({\mathrm M}\mathscr {A}(F){\mathrm R}\)-semigroup has this form.

Proof

By Lemma 6.3, we know that \(S\backslash \{F\}\in \mathscr {A}(F)\) and \(\{x\in {\textrm{ msg }}(S\backslash \{F\})\mid x \notin \Delta (\mathscr {A}(F))\}={\textrm{ msg }}(S)\backslash \{F\}.\) By Proposition 4.3, we have \(\mathscr {A}(F)_{\textrm{rank}\, }(S\backslash \{F\})={\mathrm m}(S\backslash \{F\})-1.\)

If \(S\in \mathscr {A}(F)\) and \(\mathscr {A}(F)_{\textrm{rank}\, }(S)={\mathrm m}(S)-1,\) then by applying Proposition 4.3 we deduce that \(S\cup \{F\}\) is a \({\textrm{MED}}\)-semigroup and \(F={\textrm{max}}\left( {\textrm{ msg }}(S\cup \{F\}) \right) .\) \(\square \)

If A and B are nonempty subsets of \(\mathbb {Z}\), we write \(A+B=\{a+b \mid a\in A, b\in B\}.\)

The following result is deduced from [3, Proposition I.2.9].

Lemma 6.4

Let S be a numerical semigroup. Then S is a \({\textrm{MED}}\)-semigroup if and only if \((S\backslash \{0\})+\{-{\mathrm m}(S)\}\) is a numerical semigroup.

The following result is deduced from [10, Proposition 2].

Lemma 6.5

Let S be a numerical semigroup and \(m\in S\backslash \{0\}.\) Then \(\left( \{m\}+S\right) \cup \{0\}\) is a \({\textrm{MED}}\)-semigroup with multiplicity m and Frobenius number \({\mathrm F}(S)+m.\)

Proposition 6.9

Let S be a numerical semigroup, \(m\in S\backslash \{0\}\) and \(F={\mathrm F}(S)+2\,m.\) Then \(T=\left( \{m\}+S\right) \cup \{0\}\) is a \({\textrm{MED}}\)-semigroup and \({\textrm{max}}({\textrm{ msg }}(T))=F.\) Moreover, if P is a \({\textrm{MED}}\)-semigroup and \({\textrm{max}}({\textrm{ msg }}(P))=F,\) then P has this form.

Proof

  • By Lemma 6.5, we know that T is a \({\textrm{MED}}\)-semigroup with multiplicity m and Frobenius number \({\mathrm F}(S)+m.\) By using Lemma 6.3, we have that \({\textrm{max}}({\textrm{ msg }}(T))={\mathrm F}(S)+m+m=F.\)

  • By Lemma 6.4, we know that \(S=(P\backslash \{0\})+\{-{\mathrm m}(P)\}\) is a numerical semigroup and \({\mathrm m}(P)\in S\backslash \{0\}.\) Moreover, by applying Lemma 6.3, we have that \({\mathrm F}(S)=F-2{\mathrm m}(P).\) Finally, it is clear that \(P=\left( \{{\mathrm m}(P)\}+S\right) \cup \{0\}.\)

\(\square \)

Example 8

Let \(S=\langle 5,7,9 \rangle =\{0,5,7,9,10,12,14,\rightarrow \}.\) Then, by applying Proposition 6.9, we have that \(T=\left( \{7\}+S\right) \cup \{0\}\) is a \({\textrm{MED}}\)-semigroup and \({\textrm{max}}({\textrm{ msg }}(T))={\mathrm F}(S)+2\cdot 7=13+14=27.\) Therefore, by applying Proposition 6.8, we obtain that \(T\backslash \{27\}\) is a \({\mathrm M}\mathscr {A}(F){\mathrm R}\)-semigroup.

The following result is deduced from [10, Corollary 8].

Lemma 6.6

Let S be a \({\textrm{MED}}\)-semigroup. Then

$$\begin{aligned} {\mathrm g}(S)=\displaystyle \frac{1}{{\mathrm m}(S)}\left( \sum _{x\in {\textrm{ msg }}(S)\backslash \{{\mathrm m}(S)\}}x\right) -\frac{{\mathrm m}(S)-1}{2}. \end{aligned}$$

Proposition 6.10

Let S be a \({\mathrm M}\mathscr {A}(F){\mathrm R}\)-numerical semigroup and let A be its \(\mathscr {A}(F)\)-minimal system of generators. Then

$$\begin{aligned} {\mathrm g}(S)=\displaystyle \frac{1}{{\mathrm m}(S)}\left( \sum _{a\in (A\backslash \{{\mathrm m}(S)\})\cup \{F\}}a\right) -\frac{{\mathrm m}(S)-3}{2}. \end{aligned}$$

Proof

From Proposition 6.8, we can assert that \(S\cup \{F\}\) is a \({\textrm{MED}}\)-semigroup. By applying Proposition 4.3, we have that \({\textrm{ msg }}(S\cup \{F\})=A\cup \{F\}.\) As \({\mathrm g}(S)={\mathrm g}\left( S\cup \{F\}\right) +1,\) then by applying Lemma 6.6, we obtain the desired result. \(\square \)

Example 9

Let \(S=\mathscr {A}(15)\left( \{8,9,10,11,12,13,14\}\right) .\) Then, by applying Proposition 6.10, we have that

$$\begin{aligned} {\mathrm g}(S)=\displaystyle \frac{1}{8}\left( 9+10+11+12+13+14+15\right) -\frac{8-3}{2}=8. \end{aligned}$$