Ideals of Numerical Semigroups and 
Error-Correcting Codes

Several results relating additive ideals of numerical semigroups and algebraic-geometrycodes are presented. In particular, we deal with the set of non-redundant parity-checks, the codelength, the generalized Hamming weights, and the isometry-dual sequences of algebraic-geometrycodes from the perspective of the related Weierstrass semigroups. These results are related tocryptographic problems such as the wire-tap channel, t-resilient functions, list-decoding, networkcoding, and ramp secret sharing schemes.


Introduction
In a previous survey chapter [1], numerical semigroups were presented together with some of the related classical problems, and their importance for algebraic-geometry codes was explained. In particular, numerical semigroups can be used to establish decoding conditions, are useful to define bounds for the minimum distance of codes, and to improve the code dimension. In this contribution, which is a continuation of that chapter, we will present some results relating ideals of numerical semigroups and the set of non-redundant parity-checks, the code length, the generalized Hamming weights, and the isometry-dual sequences of algebraic-geometry codes. The reader not familiar with algebraic geometry may be interested in the introductory sections of [1].
The organization of this contribution is as follows. Section 2 introduces numerical semigroups and states basic notions, in particular the Frobenius number and symmetric semigroups, which will be important in the following sections. Section 3 presents ideals of numerical semigroups and some results connecting the maximum gap of an ideal with the size of the complement of the ideal. Maximum sparse ideals are defined as those ideals for which this maximum gap is maximum restricted to a given size of the complement, and this connects with symmetric semigroups. Section 4 presents one-point algebraic-geometry codes and relates redundant checks with ideals of numerical semigroups. Section 5 deals with the Geil-Matsumoto bound for the number of points a curve can have and so with the length of codes. Section 6 deals with the sequences of one-point algebraic-geometry codes that satisfy the isometry-dual property and the effects of puncturing such sequences. The results are derived from the results on maximum sparse ideals of numerical semigroups. Section 7 deals with the generalized Hamming weights of algebraic-geometry codes by means of Feng-Rao numbers and Weierstrass semigroups. These results are related to cryptographic problems such as the wire-tap channel or ramp secret sharing schemes.
. Hence, semigroups generated by two positive integers satisfy the symmetry property.
Example 1 (Hermitian curve H q ). Let q be a prime power. The Hermitian curve H q over F q 2 is defined by the affine equation x q+1 = y q + y and homogeneous equation X q+1 − Y q Z − YZ q = 0. The point P ∞ = (0 : 1 : 0) is the unique point of H q at infinity. It can be proved (see, for instance, [1]) that v P ∞ ( Z Y ) = q + 1 and v P ∞ ( X Z ) = −q. Hence, the Weierstrass semigroup Λ at P ∞ contains the semigroup generated by q, q + 1 whose complement in N 0 has q(q−1) 2 = g elements. Since we know that the complement of Λ in N 0 also has g elements, this means that both semigroups are the same. For further details on the Hermitian curve, see [3,5].

Ideals
A subset I of a numerical semigroup Λ is an ideal of Λ if I + Λ ⊆ I. We say that I is a proper ideal of Λ if I = Λ. Because of the finiteness of the complement of Λ and the definition of an ideal, the complement of an ideal (either with respect to the ideal or with respect to N 0 ) must be finite as well. Hence, we can consider the largest integer in the complement of an ideal (with respect to N 0 ). It is called the Frobenius number of the ideal.
Next, we will prove an upper bound on the Frobenius number of an ideal which extends the upper bound for the Frobenius number of a numerical semigroup that is twice the genus minus one. Indeed, we will see that the Frobenius number of an ideal is less than or equal to the number of elements in the semigroup which do not belong to the ideal plus the double of the genus of the semigroup minus one. Notice that, if we take the ideal to be the whole semigroup, then we get the already known bound for the Frobenius number of a numerical semigroup. Hence, this result, stated in Theorem 1, can be seen as a generalization of the upper bound for the Frobenius number of the numerical semigroup. The ideals for which the Frobenius number attains the bound are called maximum sparse ideals. All the results in this section were first proved in [6].

The Frobenius Number of an Ideal
Suppose that Λ is a numerical semigroup and that I is an ideal of Λ. The difference of the ideal I with respect to Λ is the number of elements in Λ \ I. One can prove (see [3], Lemma 5.15) that, in the case of principal ideals, that is, ideals of the form a + Λ for some nonnegative integer a, the difference is exactly a. From this, it is straightforward to deduce that the Frobenius number of a + Λ is less than or equal to twice the genus of the semigroup plus a (which is the difference) minus one. This will be generalized to the bound in Theorem 1 for any ideal. Furthermore, the semigroups for which the bound is attained will be characterized.

Upper Bounding the Frobenius Number of an Ideal
The set D(i) is often called the set of divisors of λ i , and its cardinal is denoted ν i = #D(i). The sequence ν i has many implications in coding theory. It is fundamental in the computation of bounds for the minimum distance of algebraic-geometry codes based on a single point as well as in the optimization of the redundancy of those codes. Its properties and applications can be seen in [7][8][9][10][11][12][13][14] and in the survey [1]. As a curiosity, it was proved in [7,15] that the set of elements of a numerical semigroup is determined by its ν sequence. However, it was proved in [8] that, given a finite subset of values of the ν sequence, it is contained in the ν sequence of infinitely many numerical semigroups. We will see how the sets D(i) are related to ideals of semigroups. Next, we present two lemmas proved by Barucci in [16] and by Høholdt, van Lint, and Pellikaan in [3], respectively, and the main theorem that can be derived from the two lemmas. Lemma 1 ([16]). Every ideal of a numerical semigroup Λ can be expressed as an intersection of finitely many irreducible ideals and irreducible ideals are expressible as Λ \ D(i) for some i.

Lemma 2 (([3]
). Theorem 5.24) Let g(i) be the number of gaps in the interval from 1 to λ i − 1 and let G(i) be the number of pairs of gaps whose sum equals λ i . Then, ν i = i − g(i) + G(i) + 1.

Theorem 1.
Suppose that I is an ideal of a numerical semigroup of genus g so that Λ \ I has d elements. Then, d + 2g + i ∈ I for all i ≥ 0. Equivalently, the Frobenius number of I is less than or equal to d + 2g − 1.
Proof. It is straightforward to see that the intersection of two ideals satisfying the result also satisfies the result. Now, by Lemma 1, it will be enough to show that the result holds for the ideals expressible as I = Λ \ D(i). Equivalently, ν i + 2g ≥ max{c, λ i + 1}, with c the conductor of Λ. This holds if c ≥ λ i + 1 since c ≤ 2g. Otherwise, if λ i + 1 > c, then g(i) = g, λ i = i + g, and as a consequence of The ideals for which the Frobenius number attains the previous bound will be called maximum sparse ideals.

Maximum Sparse Ideals
In next theorem, we characterize the ideals that are maximum sparse. Theorem 2. The statements that follow are equivalent for an ideal I with difference d > 0 of a semigroup Λ with genus g:

1.
The Frobenius number of the ideal I equals d + 2g − 1.
Proof. On one hand, let the Frobenius number of the ideal I be d + 2g − 1. If I is a non-trivial intersection of the ideals I and I , whose differences are, respectively, d and d , then the difference d of I is strictly larger than both d and d . If d + 2g − 1 is not an element of I, then it is neither an element of I nor an element of I , but the value d + 2g − 1 is strictly larger than both d + 2g − 1 and d + 2g − 1. This contradicts Theorem 1. This implies, by Lemma 1, that I is of the form Λ \ D(i) for some i. Now, contradicting our assumption. Consequently, λ i ≥ c and by Lemma 2, On the other hand, suppose I is of the form Λ \ D(i) for some i with G(i) = 0, and so d = ν i . By the former remarks, since G(i) = 0, one deduces that λ i = i + g and, by Lemma 2, it follows that Hence, all maximum sparse ideals are I 9 = Λ \ D(9) = {4, 8, 9, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, . . . }, where D(9) = {0, 5, 10, 15}, d = 4, and d + 2g − 1 = 15; I 10 = Λ \ D(10) = {5, 9, 10, 13, 14, 15, 17, 18, 19, 20, 21, 22, The next corollary characterizes maximum sparse ideals of symmetric semigroups. Proof. It has already been explained that the difference of the principal ideal a + Λ is exactly a, and so it is obvious that principal ideals of symmetric semigroups are maximum sparse.
Suppose now that I is a maximum sparse ideal of a symmetric semigroup Λ. If I = Λ, the result is obvious. Otherwise, by Theorem 2, I = Λ \ D(i) for some i with G(i) = 0. Let a be the minimum element of I. Since I = Λ \ D(i), the difference λ i − a is a gap of Λ. By the minimality of a, the gap λ i − a must be the Frobenius number F of Λ since, otherwise, λ i − F would be an element in Λ (because G(i) = 0) not in D(i) and, so, an element of I smaller than a. Now, it remains to see that any The ideal I has difference d = 5 and Frobenius number 16 = d + 2g − 1. Hence, I is a maximum sparse ideal, but it is not principal because it is, indeed, I = (9 + Λ) ∪ {10, 11, 14, 15}.

The Ideal of Frobenius Numbers of Sparse Ideals
The next lemma shows that the Frobenius numbers of the maximum sparse ideals of a numerical semigroup constitute in turn another ideal of the numerical semigroup.

Lemma 3. The nonzero non-gaps
Proof. First of all, notice that G(i) = 0 is not satisfied if λ i is smaller than the conductor. Indeed, if λ i is smaller than the conductor c, then there must be a gap a smaller than λ i with λ i − a < λ 1 , since, otherwise, λ i would not be smaller than the conductor. Now, λ i − a must be a positive gap and λ i = (λ i − a) + a, a contradiction with G(i) = 0. Hence, the elements in L are equal than or equal to the conductor of Λ.
It remains to show that, if λ i ∈ L, then λ i + λ j ∈ L for any λ j ∈ Λ. Assume that λ j = 0. Let k be such that λ i + λ j = λ k . Suppose that λ k ∈ L, that is, G(k) = 0. Then, there are two gaps a, a with λ k = a + a . Note that both a, a < λ i = λ k − λ j since λ i is greater than or equal to c. From a + a = λ k , we have λ j < a, a < λ i . Then, a − λ j does not belong to Λ because, otherwise, a = λ j + (a − λ j ) ∈ Λ + Λ ⊆ Λ. In particular, (a − λ j ) + a is a sum of two gaps equal to a + a − λ j = λ k − λ j = λ i , a contradiction with G(i) = 0.

One-Point Algebraic-Geometry Codes
In coding theory, by a linear code of length n, it is meant a linear subspace C of F n q , with F q the field of order q, for some prime power q. Its dimension is usually denoted k. The dual code of a linear code is its orthogonal space. It has the same length than C and dimension n − k. A knowledge of the dual code is useful in most decoding algorithms. To compare two different vectors of F n q , one counts the number of differing positions and this number is referred to as the Hamming distance between the two vectors. The weight of a vector is defined as its Hamming distance to the all-zero vector. An important parameter of a code is its minimum distance, representing the minimum of the Hamming distances between each pair of different vectors in the code. The correction capability of a code tells how far we can go from any code vector with the guarantee that we will not get closer to a code vector different than the originary one. The correction capability is exactly d−1 2 if the minimum distance of the code is d.
An important class of error-correcting codes are the algebraic-geometry codes. Let X be a smooth irreducible algebraic curve over F q and let Q be a rational point of X . Let Λ be the Weierstrass semigroup at Q and let A = m≥0 L(mQ) be the ring of rational functions of X only having poles at Q. There exists a basis z 0 , z 1 , . . . , z i , . . . of A such that v Q (z i ) = −λ i . Now, for each collection of rational points P 1 , . . . , P n , all of them different from Q, and each set of indices B ⊆ N 0 , define the one-point code C B =< (z i (P 1 ), . . . , z i (P n )) : i ∈ B > . The elements in the set B are called parity checks of C B and the one-point code is said to be classical if B = {0, 1, . . . , m}. We will use C m to refer to C {0,...,m} . In the present survey, we consider only the codes C m . Ref. [1] is a survey on results related to the minimum distance, the error-correction capability, and the redundancy of the codes C B from the perspective of Weierstrass semigroups. In that case we considered, though, the dual codes < (z i (P 1 ), . . . , z i (P n )) : i ∈ B > ⊥ .
It can be shown that C m = {( f (P 1 ), . . . , f (P n )) : f ∈ L(λ m Q)}. Note that it can be the case that C m = C m−1 . The next lemma is stated in other words in ( [17], Corollary 3.3).

Ideals and the Length of Algebraic-Geometry Codes
From the previous definition of algebraic-geometry codes, we see that the length of a code defined over an algebraic smooth irreducible curve is conditioned by the number of points of the curve. Thus, bounding the number of points of smooth irreducible curves becomes an important problem of algebraic-geometry codes.

The Geil-Matsumoto Bound
Define N q (g) as the maximum number of points an irreducible smooth curve of genus g can have over the finite field of q elements. The Hasse-Weil bound is . The web page [19] is devoted to give the best known examples of curves with many points for any fixed pair q, g. Suppose that, for an irreducible smooth curve X over F q , we not only know its genus but also the Weierstrass semigroup Λ at a given point. We may wonder, with this assumption, how many points X can have. For this goal, we define N q (Λ) to be the maximum number of possible points. The first bound is due to Lewittes [20], and it uses only the first element λ 1 of Λ different than 0. It is N q (Λ) L q (Λ) := qλ 1 + 1. On the other hand, Geil and Matsumoto [21] proved that Using the fact that #(Λ \ (qλ 1 + Λ)) = qλ 1 , proved in [3,21], one can deduce Lewittes' bound from the Geil-Matsumoto bound.
is the complement of an ideal of Λ. Hence, any advance in the comprehension of ideals of numerical semigroups may result in new bounds for the length of algebraic-geometry codes.
For a numerical semigroup generated by two coprime integers a, b, it can be proved [22] that the Geil-Matsumoto bound is exactly as follows:

Coincidences of Lewittes's and the Geil-Matsumoto Bound
It was proved by Beelen and Ruano in ( [23], Proposition 9) that, if q ∈ Λ, then the Lewittes and the Geil-Matsumoto bounds coincide. For two-generated semigroups, Equation (3) implies that both bounds coincide if and only if q q a b. Otherwise, the Lewittes bound is improved by the Geil-Matsumoto bound. This result for two-generated semigroups can be generalized to semigroups of any number of generators (larger than or equal to two). This is the goal of this subsection. The results are taken from [22]. Theorem 3. Let Λ = λ 1 , . . . , λ n with λ 1 < λ i for all i > 1. The next statements are equivalent Proof. By Equation (2), it is straightforward to prove that 2 implies 1. The reverse implication follows from the inclusion Λ \ ∪ n i=1 (qλ i + Λ) ⊆ Λ \ (qλ 1 + Λ) and the equality GM q (Λ) = L q (Λ), which, by Equation (2), implies that #(Λ \ ∪ n i=1 (qλ i + Λ)) = #(Λ \ (qλ 1 + Λ)). For the equivalence of the last two statements, notice that q(λ

Remark 3.
We have seen that for two-generated semigroups the converse is also true.
For semigroups with any number of generators, the converse is not true in general.

Simplified Computation
In [22], it was investigated whether the computation of the number Λ \ ∪ λ i generator of Λ (qλ i + Λ) could be performed as the simpler computation of Λ \ ∪ i∈J (qλ i + Λ) for some proper subset of indices J ⊆ {1, . . . , n}. This is the purpose of the next lemma. Lemma 6. Suppose that Λ = λ 1 , . . . , λ n and let J ⊆ {1, . . . , n} be an index subset. The following statements are equivalent

2.
For all i ∈ J there exists 1 j n, j ∈ J such that q(λ i − λ j ) ∈ Λ.
The next lemma is a consequence of the previous one.

1.
If λ j is the maximum of the generators that are strictly smaller than If λ j is the maximum of the generators that are strictly smaller than Proof. The first statement follows directly from Lemma 5 and Lemma 6. To prove the second statement, assume that q = xλ 1 + y, where x ≥ 1 and y are integers. Then, q q λ 1 = λ 1 + y x and the statement is a consequence of the inequalities x 1 and y λ 1 − 1.
We call Geil-Matsumoto generators those generators that are strictly smaller than 2λ 1 − 1. As follows from the previous results, to compute the Geil-Matsumoto bound, one only needs to subtract the ideals qµ + Λ from Λ for µ a Geil-Matsumoto generator. Because of the fact that, in general, one needs to subtract the ideals qλ + Λ for all generators λ, this gives a computational improvement. In [22], we observed that, although it decreases with the genus, the portion of non-Geil-Matsumoto generators remains still significant for genus 25 with a portion of more than 30%.
We notice that Lemma 7 is a direct consequence of Lemma 6. We leave it as an open research problem to find other consequences of Lemma 6 to find further computational improvements.

Characterization of Isometry-Dual Sequences of Algebraic-Geometry Codes by Means of Sparse Ideals
We say that the codes C, D ⊆ F n q are isometric with respect to x, for x ∈ F n q if D = χ x (C), where χ x is the map χ x : F n q → F n q defined component-wise by χ x (v) = x * v. More generally, we say that the sequence (C (i) ) i=0,...,n of codes satisfies the isometry-dual condition if a vector x ∈ (F * q ) n exists so that C (i) is x-isometric to C (n−i) ⊥ for every i = 0, 1, . . . , n. Suppose now that P 1 , . . . , P n , Q are different rational points of a projective, smooth, irreducible curve of genus g and let C m = {( f (P 1 ), . . . , f (P n )) : f ∈ L(mQ)}. As it has been previously stated, if Λ is the Weierstrass semigroup at Q and Λ * = {0} ∪ {m ∈ N, m > 0 : C m = C m−1 } = {m 0 = 0, m 1 , . . . , m n }, then Λ \ Λ * is an ideal of Λ. Furthermore, Geil, Munuera, Ruano, and Torres proved the next lemma for n > 2g + 2 (in a different but equivalent formulation). The strict inequality was improved to a non-strict inequality in [24].

Inclusion Relationship of Sparse Ideals
As seen in Theorem 2, a proper ideal I of Λ is maximum sparse if and only if I is of the form Λ \ D(i) for some integer i satisfying G(i) = 0. The next lemma states the relationship between Frobenius numbers of maximum sparse ideals of a given numerical semigroup when the ideals satisfy inclusion relationships.

Lemma 9.
For two proper maximum sparse ideals I, I of a numerical semigroup Λ with Frobenius numbers λ i , λ i , the following statements are equivalent: Proof. The equivalence of statements (1) and (2) is obvious. Since I, I are proper maximum sparse ideals, D(i) = Λ \ I and D(i ) = Λ \ I . Hence, statement (2) and statement (3) are equivalent. Statement (3) is equivalent to λ i ∈ D(i), which, in turn, is equivalent to statement (4). Statements (4) and (5) are equivalent since λ i = 2g − 1 + #(Λ \ I) and

Puncturing Sequences of Isometry-Dual One-Point Algebraic-Geometry Codes
We wonder now whether the isometry-dual property is inherited after puncturing sequences of one-point algebraic-geometry codes. We proved in the next theorem a necessary condition for the inheritance of the isometric-dual property. In particular, in order to mantain the property, the number of evaluating points that are supressed when puncturing must be a non-gap of the associated Weierstrass semigroup. This result was proved first in [24]. . . , C m n also holds the isometry-dual property, then n − n ∈ Λ.

Ideals and Generalized Hamming Weights
The number of nonzero coordinates of a word coincides with the cardinal of the support of the one-dimension vector it generates. Hence, the minimum distance of a linear code can be thought as the minimum number of elements the support of a one-dimension linear space can have. This is generalized to the so-called Hamming weights, which are defined, for each given dimension as the minimum size of the support of the linear subspaces of that dimension. The generalized Hamming weights for algebraic-geometry codes have been analyzed in [25][26][27]. Applications of generalized Hamming weights appear in a variety of fields of communications. Wei [28] first used the notion to analyze the performance of Ozarow-Wuyner's wire-tap channel of type II [29] and in connection to t-resilient functions. In [30], there is an update of the connections of generalized Hamming weights with the wire-tap channel using network coding. The reference [31] generalizes the notion for network coding. Generalized Hamming weights have applications also in the area of list decoding [32,33]. In particular, Guruswami showed that his (e, L)-list decodibility notion in the case of erasures is equivalent to the generalized Hamming weights for linear codes. Generalized Hamming weights have also been used to bound the covering radius of linear codes [34] and for secure secret sharing based on linear codes [35,36]. One further related notion is that of relative generalized Hamming weights, where only the support of subspaces with no intersection with a given subspace are considered. They are applied to bound the information leakage in linear ramp secret sharing schemes. They were proposed in [37] and analyzed for algebraic-geometry codes in [38,39].
Heijnen and Pellikaan introduced in [40] the generalized order bounds for the generalized Hamming weights of dual one-point algebraic-geometry codes in terms of Weierstrass semigroups. Farrán and Munuera showed the existence of a constant, which they named the Feng-Rao number, depending only on the dimension of the Hamming weights and the Weierstrass semigroup, which completely determined the order bounds for codes of rate low enough. The references [41][42][43][44] deal with the generalized order bounds and the Feng-Rao numbers related to particular classes of semigroups.
We will present a new bound on the generalized Hamming weights that was first proved in [6]. It uses a lower bound on the Feng-Rao numbers derived from the upper bound for the Frobenius number of an ideal of a semigroup that we presented in Theorem 1. It is obtained through the analysis of intervals of consecutive gaps of Weierstrass semigroups. The idea of consecutive gaps was already used in [45] to bound the minimum distance of one-point codes and in [46] to bound the generalized Hamming weights for primal codes.

Feng-Rao Numbers
In Section 3.3, we introduced the ν sequence of a numerical semigroup Λ counting the number of pairs of non-gaps whose sum equals a given non-gap. The minimum distance of the dual one-point code C ⊥ m associated with a rational point Q with Weierstrass semigroup Λ and associated sequence ν is bounded by the order (or Feng-Rao) bound defined as δ(m) = min{ν i : i > m} [3,10,47]. Some results about the computation of the order bound can be found in [3,7,[11][12][13][14]48].
The order bound for the minimum distance is generalized to any dimension r by the r-th order bound for the generalized r-th generalized Hamming weight. In this case, define D(i 1 , . . . , i r ) = D(i 1 ) ∪ · · · ∪ D(i r ). Then, the r-th order bound is defined as δ r (m) = min{#D(i 1 , . . . , i r ) : i 1 , . . . , i r > m}. This definition was introduced in [40]. Farrán and Munuera proved in [49] that, for each integer r ≥ 2 and for each numerical semigroup Λ, there exists a constant E r = E(Λ, r), the so-called r-th Feng-Rao number, satisfying that where g and c stand respectively for the genus and the conductor of Λ. This is indeed an extension of the Goppa bound in which case r = 1 and E r = 0 ([3], Theorem 5.24). The constant E r satisfies 3. r ≤ E r ≤ λ r−1 if g > 0 (and r ≥ 2) ( [49], Proposition 5), 4.
In [41,49,50], one can find more results related to the Feng-Rao numbers. We will use Theorem 1 to describe a new lower bound for the Feng-Rao number E r . The new bound is strictly better than the bound E r ≥ r for semigroups having more than two intervals of gaps and dimensions r > 2.

Bound on the Feng-Rao Numbers
To prove the new bound, we first need the next lemma, whose proof can be found in [6], and then we can state the theorem with the bound. The proof of the theorem uses that δ r (m) counts the number of elements of a numerical semigroup not belonging to an ideal and the bound of Theorem 1.
Theorem 5. Suppose that n −1 is the number of intervals of at least − 1 consecutive gaps of Λ, for an integer larger than 1. Then, Proof. By definition of δ r (m), there exist integers i 1 , . . . , i r with m < i 1 < · · · < i r such that δ r (m) = #D(i 1 , . . . , i r ). The integers i 1 , . . . , i r minimize #D(i 1 , . . . , i r ). Denote A the set {i 1 , . . . , i r }. Suppose that the integer m is at least 2c − g − 1. From the definition of E r , we have δ r (m) = m − g + E r + 2.
If we assume that A has no consecutive integers, then Then, by inequality (6), E r ≥ r + r −1 − 2. On the other hand, assume that A has at least consecutive integers. Suppose that i j is the maximum integer belonging to A so that i j − + 1, . . . , i j ∈ A and so i j− +1 = i j − + 1, . . . , i j−1 = i j − 1 and In particular, if λ is an element of Γ, it must be strictly smaller than the conductor c of Λ. Obviously, . . , i j−1 ) \ D(i j ) and the sets in this union are disjoint.
Thus, we conclude that the bound is sharp if and only if = 2, the Weierstrass semigroup Λ is hyperelliptic, and r ≤ g/2 + 1.

The Bound Applied to the Hermitian Curve
The weight hierarchy of H q has already been studied in [27,51]. However, for its simplicity, we wanted to give a description of n . As we have seen before, the Weierstrass semigroup at the rational point at infinity is generated by q and q + 1. Its weight hierarchy was studied in [42]. The semigroup generated by q and q + 1 is {0} ∪ {q, q + 1} ∪ {2q, 2q + 1, 2q + 2} ∪ · · · ∪ {(q − 2)q, . . . , (q − 2)q + (q − 2)} ∪ {k ∈ N 0 : k ≥ (q − 1)q}. In this case, the lengths of the intervals of consecutive gaps are q − 1, q − 2, . . . , 1. Thus, It is left as an open question to compare the results in [41] with the bound proved in Theorem 5, using these values of n .

Further Reading
It was our purpose to cite within the text the bibliography related to each specific section. However, the reader may be interested in some more general references. The books [52][53][54] have many results on numerical semigroups. Algebraic-geometry codes have been widely explained in different books such as [18,55,56] or in chapter [57]. For a general theory of one-point codes, their decoding, and also some of their relationships with Weierstrass semigroups, chapter [3] is probably the most important reference. Finally, chapter [1] is a survey of results on numerical semigroups, their classification, characterization and counting, and their relationship with algebraic-geometry codes from the perspective of decoding algorithms, their parameters such as the minimum distance, and the optimization of their redundancy under particular decoding restrictions.

Conclusions
Numerical semigroups play an important role in the analysis of error-correcting codes. More specifically, additive ideals of numerical semigroups are involved in determining non-redundant parity-checks, the code length, the generalized Hamming weights, and the isometry-dual sequences of algebraic-geometry codes. These results have been presented in this survey in a unified framework.