EVALUATION CODES DEFINED BY FINITE FAMILIES OF PLANE VALUATIONS AT INFINITY

We construct evaluation codes given by weight functions defined over polynomial rings in m ≥ 2 indeterminates. These weight functions are determined by sets of m− 1 weight functions over polynomial rings in two indeterminates defined by plane valuations at infinity. Well-suited families in totally ordered commutative groups are an important tool in our procedure.


Introduction
A paper by Shannon [38] published in 1948 is usually considered the origin of coding theory. Since then, due to its usefulness, this theory has had a rapid growth. It has used advanced mathematical developments as abstract algebra (in the most classical codes) or, more recently, algebraic geometry. Algebraic geometric codes were introduced by Goppa in [22] (see also [23]) and nowadays they are studied very much. One of the motivations to study them is that some families of these codes attain the Varshamov-Gilbert bound [42]. Goppa's construction uses an algebraic curve C defined over a finite field and two disjoint rational divisors D and G on C. The so-called geometric Reed-Solomon codes are obtained by evaluating rational functions defined by G at the points in the support of D and their linear dual codes are named geometric Goppa codes. Riemann-Roch theorem provides nice results concerning the parameters of these codes. The mentioned construction can be extended to higher dimensional varieties, with [43] being the first contribution in this line, and it is expected to get good results by considering suitable varieties.
Since coding theory can be of interest to a broad audience and algebraic geometry is not easy, Høholdt, van Lint and Pellikaan introduced in [24] order functions to simplify the treatment of certain algebraic geometric codes. Indeed, order functions were defined over order domains R with values in the set of non-negative integers and yield a filtration of vector spaces included in R, The dimensions of these vector spaces satisfy dim L i+1 = dim L i + 1 and, considering an evaluation map ev: R → F n q , F q the finite field of q elements and n > 0, one obtains families of codes {E i := ev(L i )} N i=1 (respectively, , where E N = F n q , named evaluation (respectively, dual evaluation) codes given by the order function and the map ev. This approach allows us to study one-point algebraic-geometric codes, that is algebraic geometric codes over a curve such that the support of the divisor G is only one rational point.
Notwithstanding if the concept of order function is enlarged and we allow those functions to take values in a well-ordered semigroup, many new codes can be constructed in a much more general setting. These codes admit bounds on the minimum distance as in the case of the classical order functions, called order (or Feng-Rao) bounds due to their relation with the bound introduced in [11,12]. Codes defined by order functions have an important property: they can be decoded by using the Berlekamp-Massey-Sakata decoding algorithm which yields a fast implementation of the modified algorithm [26,39] and the extended algorithm that uses a majority voting scheme for unknown syndromes. This guarantees an efficient procedure to correct a number of errors depending on the above bounds. See [24,32] in the context of order functions and the series of supporting papers [6,28,34,31] with respect to the Berlekamp-Massey-Sakata algorithm and [27,25,10,36,35] with respect to the decoding of algebraic geometric codes. Even a list-decoding procedure is proposed in [20].
Order functions and valuations of the fraction field of the corresponding order domains are very close objects. In fact any weight function, a particular type of order function, defines a valuation as above. Valuations are algebraic objects which have geometric meaning and are being extensively used in algebraic geometry for the treatment of the resolution problem (some classical results are included in [44,45,46,1,2,3,40]). Regrettably, there is no general classification of valuations and only the cases corresponding to curves and regular surfaces are well known. Valuations attached to curves are used in the study of algebraic geometric codes on curves. Spivakovsky, in [40] (see also [14,21]), completed the classification given by Zariski of plane valuations, that is, valuations centered at 2-dimensional local regular rings. This classification allows us to construct and study evaluation codes defined by weight functions associated with plane valuations [32,15,16]. In [16] plane valuations at infinity are considered which are well adapted to coding theory. These valuations are, in a sense, limits of valuations defined by curves with exactly one place at infinity. We notice that these curves are closely related with those order domains whose attached semigroup is contained in the set of nonnegative integers [29]. Generating sets of the value semigroup of weight functions defined by plane valuations at infinity, named δ-sequences, are given in [16], where we show how to construct a family of evaluation codes only with a δ-sequence and a set of points in F 2 q to evaluate. Moreover, Feng-Rao and Goppa bounds are studied for these codes and we can decode them as mentioned. Notice that all examples given in [32] concerning plane valuations are particular examples of the codes introduced in [16]. The main problem of these codes is that their length is at most q 2 .
In this paper, we shall show how we can get larger codes by using suitable finite families F of weight functions given by plane valuations at infinity. This will be done by proving that, unlike in the general case of order functions, we are able to construct a weight function from the valuations associated with F. Recall that order functions only reproduce one-point geometric Goppa codes; to study other geometric Goppa codes (on curves), with a similar machinery, a weak version of order functions, the so-called near orders, must be considered and, also, we must pick well-agreeing families of them [8]. Set F = {w ∆ i } m−1 i=1 (m > 2) a family as above. Each weight function w ∆ i is defined over a polynomial ring in two indeterminates F q [X, Y ] and it is determined by a δ-sequence ∆ i . The goal of this paper consists of constructing a weight function, through what we shall call a sum of the δ-sequences, m−1 i=1 ∆ i , defined over a polynomial ring in m indeterminates F q [X 1 , X 2 , . . . , X m ]. With this new order function, we construct evaluation codes of arbitrary length (increasing the value of m) which, as above, can be decoded with the help of the Berlekamp-Massey-Sakata decoding algorithm. Our codes evaluate at points on F m q and, thus, no difficulty concerning rationality of the chosen points arises. Given a semigroup in N r , one can construct (see for instance [18]) an order function with this semigroup; the order function evaluates a quotient algebra. Our methods allow us to construct order functions with attached semigroup generated by well-suited families without taking quotients.
Let us summarize the contents of the paper. In Section 2, we introduce the concept of well-suited families Γ in a totally ordered commutative group G. Each family Γ, together with a set of elements in F q , gives rise to a family of approximated polynomials in F q [X 1 , X 2 , . . . , X m ], where m depends on Γ (see Definition 2.3). The main results in this section are Theorems 2.1 and 2.2. The first one explains how to obtain a weight function w from the above polynomial ring whose value semigroup is that generated by Γ and the above mentioned approximated polynomials are the key to do it. The second one studies the evaluation codes defined by w. Section 3 is divided in four subsections. Subsection 3.1 recalls the concept of δ-sequence and the way of using it to construct codes given by weight functions defined over F q [X, Y ]. δ-sequences and plane valuations at infinity are related objects, as we shall show in Theorems 3.1 and 3.2 which collect the main results in this subsection. In Subsection 3.3 we give the concept of sum of δ-sequences and, for it, we need to consider a sort of euclidean division algorithm on the set of nonnegative elements, for the lexicographical ordering, of the set on n-tuples of real numbers. We devote Subsection 3.2 to do this. Theorem 3.4 proves that a sum of δ-sequences is a well-suited family and this explains the mentioned fact that from finitely many weight functions defined by plane valuations at infinity we can construct a weight function providing larger codes. Finally, in Subsection 3.4 an algorithmic procedure to get sums of δ-sequences is given and some examples of the codes we have introduced here, including their parameters, are shown in Section 4.

2.
Well-suited families and attached evaluation codes 2.1. Constructing weight functions on polynomial rings from well-suited families. In this paper, F q will denote the finite field of q elements. We start this section by stating the concept of weight function. To do it, we need a cancellative well-ordered commutative semigroup S with zero and admissible ordering and we denote by S ∪ {−∞} the above semigroup together with a new minimal element denoted by −∞, which satisfies α + (−∞) = −∞ for all α ∈ S ∪ {−∞}. We recall that if α, β, γ are arbitrary elements in a commutative semigroup with zero S and ≤ is an ordering on S, then ≤ is said to be admissible if 0 ≤ γ and, moreover, α ≤ β implies α + γ ≤ β + γ; and S is named cancellative whenever from the equality α + β = α + γ one can deduce β = γ. Definition 2.1. A weight function from a F q -algebra A onto a semigroup S ∪ {−∞} as above is a mapping w : A −→ S ∪{−∞} such that, for f 1 , f 2 ∈ A, the following statements are satisfied: • w(f 1 ) = −∞ if and only if f 1 = 0; • w(λf 1 ) = w(f 1 ) for all nonzero element λ ∈ F * q ; The weaker concept of order function is obtained as in Definition 2.1 but when the last condition is not imposed. The above triple (A, w, S) constitutes an order domain over k (see, for instance, [19] for the definition of order domain).
The aim of this section is to give a procedure to get weight functions defined over polynomial rings with prescribed image semigroup. To do it, we consider a totally ordered commutative group (G, ≤) and families Γ = {γ i,j } (i,j)∈I of elements in G of the form where r 1 := 1 and r i ≤ ∞, for 2 ≤ i ≤ m, such that: 1) Γ generates a cancellative well-ordered commutative with zero and with admissible ordering ≤ semigroup S Γ , and 2) γ i,j is not in the semigroup spanned by Definition 2.2. A well-suited family of elements in G is a family Γ as above such that, for each (i, j) ∈ I, j = r i , there exists n i,j ∈ N, n i,j > 1, satisfying the following properties: for some finite subset of indices, J(i, j), of L(i, j), where the coefficients m l,s are positive and m l,s < n l,s whenever s = r l . c: Any element γ ∈ S Γ can be expressed in a unique way in the form where I is a finite subset of I and 0 < m i,j < n i,j when j = r i .
It is straightforward to deduce that the unique expression of each element γ ∈ S Γ given in the item c can be computed by using the equality in item b as many times as necessary. Furthermore n i,j is the least integer larger than 1 satisfying equality in b because otherwise we should get n i,j < n i,j such that n i,j γ i,j would have two expressions as in item c, n i,j γ i,j = (l,s)∈J (i,j) m l,s γ l,s and its own expression n i,j γ i,j contradicting the uniqueness there imposed. Well-suited sequences give rise to families of polynomials which will be useful to provide weight functions. Next we define such polynomials. Definition 2.3. Let Γ = {γ i,j } (i,j)∈I be a well-suited family of elements in a totally ordered commutative group G and consider the polynomial ring in m indeterminates over the finite field of q elements F q [X, m] := F q [X 1 , X 2 , . . . , X m ]. Fix a set Λ = {λ i,j } (i,j)∈I of nonzero elements in F q . We define the family of approximated polynomials attached to Γ and Λ as the family of polynomials in F q [X, m], P Γ,Λ := {q i,j } (i,j)∈I given by q i,1 := X i and, for j = 1,  is a well-suited family of elements in the additive group Z 3 which will be used in Section 4.3. Indeed, n 2,1 = 5, n 2,2 = 2, n 3,1 = 6, because 5 γ 2,1 = 2 γ 1,1 , 2 γ 2,2 = γ 1,1 + 3 γ 2,1 and 6 γ 3,1 = γ 2,3 . As a consequence the set of polynomials in F 5 [X 1 , X 2 , X 3 ], P := {q 1,1 = X 1 , q 2,1 = X 2 , q 3,1 = X 3 , q 2,2 = q 5 2,1 − q 2 1,1 , q 2,3 = q 2 2,2 − q 1,1 q 3 2,1 , q 3,2 = q 6 3,1 − q 2,3 }, is a family of approximated polynomials attached to Γ, where λ i,j = 1 for every pair (i, j).
Polynomials close to approximated ones are used in [30] to construct valuations. To the best of our knowledge weight functions over polynomial rings with prescribed semigroups cannot be obtained from that paper, at least not in an straightforward way. Therefore, we are going to show how to use the previous concepts to get weight functions from F q [X, m].
For a start, let Γ = {γ ij } (i,j)∈I , Λ = {λ i,j } (i,j)∈I and P Γ,Λ := {q i,j } (i,j)∈I be as in Definition 2.3. Take a new set of indeterminates {Z i,j } (i,j)∈I and set Given a monomial M = α (i,j)∈I Z k i,j i,j , where α ∈ F q and the k i,j are non-negative integers, we define its weight as the number w(M ) := (i,j)∈I k i,j γ i,j . Consider a polynomial g in F q [Z, I] and let M be a monomial of g. We define the toughness of an indeterminate Z i,j in M as the value s/n i,j , where s is the exponent of Z ij in M and · stands for the round down function. An indeterminate Z i,j is called to be tough for M if j = r i and the toughness of Z i,j in M is positive.
Let L be a list of monomials in F q [Z, I] (that is, a finite set of non-necessarily different monomials). Fixed a positive integer a and an index (i, j) ∈ I with j = r i , we define ∆ where b = s − a n i,j and the exponents m l,s and the coefficients λ i,j are those appearing in the equality (2). Now, we state an algorithm (whose correctness is proved in Lemma 2.1) that allows us to express a polynomial f (X 1 , X 2 , . . . , X m ) ∈ F q [X, m] as a finite sum of terms of the type α (i,j)∈I q k i,j i,j , where α ∈ F q , 0 ≤ k i,j < n i,j whenever (i, j) ∈ I and j = r i , and k i,j = 0 except for finitely many indices. The input of the algorithm is a polynomial g ∈ F q [Z, I] and to get the mentioned expression we must apply it to the polynomial f = f (Z 1,1 , Z 2,1 , . . . , Z m,1 ) ∈ F q [Z, I].
1. Let L be the list of monomials of g.

2.
If there is a monomial M in L such that there exists some tough indeterminate Z i,j for it, then replace L by ∆ a i,j (L), where a is any positive integer, a ≤ s/n i,j and b = s − a n i,j , s being the exponent of Z i,j in M .

Repeat
Step 2 until obtaining a list whose monomials have no tough indeterminate. 4. Return the polynomial P g ∈ F q [Z, I] given by the sum of the monomials in the last obtained list L.
Lemma 2.1. The above algorithm stops after a finite number of steps and its output, P g , does not depend on the choices one can do in Step 2. Moreover, if f ∈ F q [X, m], the expression Pf (q i,j ) obtained after replacing each indeterminate Z i,j in Pf by q i,j is an expression of the polynomial f as a sum of terms of the type α (i,j)∈I q k i,j i,j , where α ∈ F q , 0 ≤ k i,j < n i,j whenever (i, j) ∈ I and j = r i , and k i,j = 0 except for finitely many indices.
Proof. Firstly we shall prove that the algorithm stops, which means that where s = a n ij + b, a, b ∈ N and 0 ≤ b < n ij . We shall use the concept of previous indeterminates which are those indeterminates of the new polynomial M that also belonged to the previous monomial M . The monomials of M are those with non-zero coefficient among the following ones: The weight of any monomial N k of M is where δ := w( (l,s) =(i,j) Z r l,s l,s ); here we have applied condition b of Definition 2.2. Applying condition a of Definition 2.2, it can be deduced that, when k = 0, the weight of N k (if it is non-zero) is strictly less than the one of M : However, the weight of N 0 is equal to the weight of M : An easy-to-check special property is that the toughness of Z ij and the non-previous indeterminates in N 0 is strictly less than the one of Z i,j in M . As a consequence of these facts we conclude that, each time that Step 2 is applied to a list L, the monomials of ∆ a i,j (L) that replace a monomial M must satisfy that either its weight is strictly less than the weight of M , or its weight coincides with w(M ) but, in them, the toughness of Z ij and of the non-previous indeterminates is strictly less than the one of Z i,j in M .
To finish we notice that if the algorithm repeated Step 2 indefinitely, then the above argument would imply the existence of either a strictly decreasing sequence of weights of monomials or a strictly decreasing sequence of values of toughness, which is a contradiction with the well-orderings of the semigroups S Γ and N.
The independence of the choices one can do in Step 2 follows from the fact that the algorithm can be thought as a successive replacement of powers of the type Z and this process continues until there is no power of the mentioned type. The last statement of the lemma happens because the definition of the approximated polynomials q i,j implies that Pf (q i,j ) = f and, therefore, Pf (q i,j ) gives an expression of the initial polynomial f which satisfies the requirements of that statement.
∈I be a well-suited family of elements of a totally ordered commutative group G, expressed as in (1), and let P Γ,Λ := {q i,j } (i,j)∈I be the family of approximated polynomials attached to Γ and to a set Λ = {λ i,j } (i,j)∈I of nonzero elements in F q . Then, there exists a weight function w : Proof. Let f ∈ F q [X, m] be and denote by Pf (Z i,j ) the polynomial k∈K M k (Z i,j ) obtained after applying tof the above described algorithm. Set w(M k (q i,j )) := w(M k (Z i,j )) (we use the same notation w as above for simplicity) and define w(f ) as −∞ when f = 0 and w(f ) := max k∈K w(M k (q i,j )) otherwise. Let us see that w is a weight function. It is an onto map from F q [X, m] to S Γ ∪ {∞} since q i,j ∈ F q [X, m] and the set {w(q i,j )} (i,j)∈I spans S Γ . The two first conditions in Definition 2.1 are clear and so we only need to check the remaining ones. The above described algorithmic procedure shows that if f l , l = 1, 2 are two polynomials in F q [X, m] and Pf l = k l ∈K l M k l (Z i,j ), then the corresponding expression for computing the weight of , w(f 2 )} except when the sum of the monomials attached to f 1 and f 2 that provide the weights vanishes; in this case w( Finally, we shall show that the last two properties in Definition 2.1 also happen. Indeed, both of them are a consequence of item c in Definition 2.2 because it implies that there is only a monomial in the expression Pf l (q i,j ) = k l ∈K l M k l (q i,j ) whose weight is w(f l ). We call it the leading monomial. Thus, if w(f 1 ) = w(f 2 ), this monomial must be the same, up to a constant, therefore a suitable constant 0 = λ ∈ F q gives rise to the inequality The leading monomial of h(q i,j ) coincides with the product of the leading monomials of Pf 1 (q i,j ) and Pf 2 (q i,j ), that is, the leading monomial of Pf 1 ·f 2 (q i,j ). But, taking into account (3), it is easy to see that the weight of the leading monomial does not change when one passes from h(q i,j ) to P h (q i,j ).

Example 2.2.
Consider the well-suited family Γ and their attached family of approximated polynomials P given in Example 2.1. Take for instance , then, according the above theorem, the weight function w, defined by Γ and P, satisfies In this paper we can use any set Λ but, for simplicity's sake, in practice we shall consider the set Λ 1 := {λ i,j = 1 for all indices}, and we shall set P Γ instead of P Γ,Λ 1 .

2.2.
Evaluation codes attached to well-suited families. Along this section, Γ = {γ i,j } (i,j)∈I will be a well-suited family on some group and S Γ (respectively, w Γ ) the semigroup (respectively, weight function) that it spans (respectively, defines). Assume that ev: F q [X, m] → F n q is a surjective morphism of F q -algebras. F n q becomes an F n q -algebra by using coordinatewise multiplication. We shall always use as ev morphisms given by evaluation at points in the m-dimensional affine space over F q . As a consequence we are able to provide codes of length n ≤ q m and, since m is arbitrary, for a fixed field, one can construct codes of arbitrary length. Furthermore, since the points to be evaluated are in the m-dimensional affine space over F q we have no problem with the rationality of such points because all of them are rational.
To get evaluation codes with the given ingredients, we consider, for each γ ∈ S Γ , the vector subspace of F n q defined as Then, we define the family of evaluation codes given by the epimorphism ev and the well-suited family Γ as {E γ := ev(L γ )} γ∈S Γ . The family of dual vector spaces in F n q , {C γ := (E γ ) ⊥ } γ∈S Γ , is named the family of dual evaluation codes given by the above data. Since S Γ is totally ordered and the map ev is surjective, it is clear that there exists a value in S Γ , Ω n , that depends on n, such that when γ ∈ S Γ and γ ≥ Ω n , E γ = F n q and C γ vanishes. We are going to determine bounds on the minimum distance of the family of dual codes. These bounds are also suitable to estimate the number of errors that can be corrected by some of the above mentioned algorithms for decoding them. For any η ∈ S Γ , set where η + := min{α ∈ S Γ |α > η}, which are usually named Feng-Rao (or order) bounds of the dual code C γ . Next, we state a result that contains the main properties concerning the codes we have just introduced.
∈I be a well-suited family and ev: F q [X, m] → F n q an epimorphism of F q -algebras. Consider P Γ,Λ := {q i,j } (i,j)∈I a family of approximated polynomials attached to Γ. Then (1) For each γ ∈ S Γ , the vector space L γ is generated by the set of polynomials such that I and m i,j run over the indices and coefficients set corresponding to the unique expression (item c of Definition 2.2) of the values η ∈ S Γ such that η ≤ γ.
, where I and m i,j run over the indices and coefficients set of the above mentioned unique expression of the values η ∈ S Γ such that γ ≤ η < Ω n .
Proof. S Γ is a well-ordered semigroup and since w Γ is a weight function, to generate L γ we only need to add any element in F q [X, m] of weight γ to the generators of L γ − , γ − being the previous element of γ in S Γ . An inductive procedure and the fact that the set {w Γ (q i,j )} (i,j)∈I spans S Γ concludes the proof of (1). The proof of (2) follows the same idea of the corresponding statement in [24], where order functions attached with semigroups whose elements are integer numbers are used. Finally, it is straightforward to prove (3) from the definition of ω η and the properties of the well-suited family Γ.

Weight functions defined by finite families of plane valuations at infinity
3.1. δ-sequences, plane valuations at infinity and weight functions. In this section we summarize some results coming mostly from [16]. We introduce the concept of δ-sequence and explain how we can get weight functions on polynomial rings in two indeterminates through certain type of plane valuations named at infinity. In this framework, when one considers semigroups spanned by δ-sequences, any weight function is of this type and can be constructed as a particular case of the theory developed in Section 2.1. To simplify and extend this development will be the goal of this paper. First of all, we define the classical δ-sequence concept (which we call δ-sequence in N >0 ) and the extended concept of δ-sequence, both of them are useful in coding theory. δ-sequences in N >0 were introduced by Abhyankar and Moh to study the semigroup at infinity of plane curves with only one place at infinity. Some interesting references concerning these curves are [5,3,4,37,33,41,13] and, concerning coding theory, Weierstrass semigroups and the least order bound of the Goppa codes, attached to curves whose plane models are curves as mentioned, were computed by Campillo and Farran in [7].
We attach to each δ-sequence in N >0 the following sequence of pairs {(e i , m i )} i≥0 , whose definition is divided in two cases depending on the two first elements of the sequence. Assume that δ 0 − δ 1 does not divide δ 0 , then Otherwise, Note that this sequence determines that of Newton polygons corresponding to the resolution of the germs of curves (with only one place at infinity) whose semigroup at infinity is generated by the δ-sequence.
Finally, an infinite sequence ∆ = {δ 0 , δ 1 , . . . , δ i , . . .} of elements in Q is a δ-sequence in Q if it generates a well-ordered sub-semigroup of Q and any ordered subset ∆ j = {δ 0 , δ 1 , . . . , δ j } is a normalized δ-sequence in N >0 . To explain why δ-sequences provide weight functions, we need to introduce some geometric development. Essentially, we shall review some of the theory about plane curves with only one place at infinity, plane valuations and related objects. Firstly, let L denote the line at infinity in the compactification of the affine plane to the projective plane over the field F q , P 2 , and set C a projective absolutely irreducible curve on P 2 . We shall say that C has only one place at infinity if the intersection C ∩ L is a single point p (the one at infinity) and C has only one branch at p which is rational. If K is the quotient field of the local ring O C,p , the germ of C at p defines a discrete valuation on K that we set ν C,p . For convenience, we fix homogeneous coordinates (X : Y : Z) on P 2 . Z = 0 will be the line at infinity and p = (1 : 0 : 0). Set (X, Y ) coordinates in the chart Z = 0 and (u, v) coordinates around the point at infinity. We shall use sequences of point blowingups (called simple ones) obtained by blowing-up P 2 at p and, successively, at a point on the obtained exceptional divisor. Embedding C into P 2 and considering a suitable finite simple sequence of point blowing-ups as above, the germ of C at p is resolved. There are two types of divisors depending on the fact that the blown-up point to get them belongs, or not, to an intersection of exceptional divisors; those divisors are named, respectively, satellite and free ones. Moreover, divisors in the above sequences can be organized in blocks in such a way that each block contains the divisors, ordered by appearance, from a free divisor to the next last satellite divisor which is previous to a free one. Assume that we have g blocks and denote by E s i (1 ≤ i ≤ g) the last free divisor obtained in each block of the resolution process. We say that an analytically irreducible germ of plane curve at p, ψ, is an i-curvette of the germ of C at p if the strict transform of ψ in the (corresponding germ of the) surface containing E s i is not singular and meets transversely E s i and no other exceptional curves. Next, we introduce the following concept which is close to that of approximated polynomials.  (X, Y ), . . . , q g (X, Y )}, will be named a family of approximates for the curve C whenever the following conditions happen: a: q 0 (X, Y ) = X, q 1 (X, Y ) = Y , δ 0 := −ν C,p (q 0 ) and δ 1 : , then the germ of curve at p defined byq i (u, v) (for 1 < i ≤ g) is an i-curvette (respectively, (i − 1)-curvette) of the germ of C at p when δ 0 − δ 1 does not divide (respectively, divides) δ 0 .
Notice that in this paper ν C,p (q i ) means ν C,p ([q i ]), where [q i ] is the class in the field K that q i defines. Now, we recall the concept of plane valuation and afterwards we introduce those valuations which we are interested in. Set R = O P 2 ,p and K is the quotient field of R.
A valuation as above is said to be centered at R whenever R ⊆ R ν := {f ∈ K * |ν(f ) ≥ 0} ∪{0} and R ∩ m ν (:= {f ∈ K * |ν(f ) > 0} ∪ {0}) coincides with the maximal ideal m of R. We call this type of valuations plane valuations. The main geometric property of these valuations is that there is a one to one correspondence between the set of plane valuations (of K centered at R) and the set of simple sequences of point blowing-ups of the scheme Spec R. The topology and the number the exceptional divisors appearing in this sequence classifies plane valuations [40,21] (see also [14]). This classification divides plane valuations in five types (from A to E) and it is a refinement of that given by Zariski according to invariants as the rank and the rational rank. When the sequence of point blowing-ups is finite, valuations are named divisorial ones (or of type A) and they are defined by the last exceptional divisor obtained in that sequence, which we denote by E N +1 . Let ν be a divisorial valuation, an element f in the maximal ideal of R is called to be a general element of ν if the germ of curve given by f is analytically irreducible, its strict transform in X N +1 is smooth and meets E N +1 transversely at a non-singular point. On the other hand, the isomorphism R/m ∼ = R ν /m ν happens for any plane valuation ν except for divisorial ones. For coding purposes, we are only interested in certain types of non-divisorial plane valuations, valuations of types C, D and E in [16]. We recall that the sequence of point blowing-ups corresponding to a valuation of type C or D has finitely many blocks of exceptional divisors, unlike that the attached to type E one which has infinitely many of them. Furthermore, in both cases C and D, the last block has infinitely many satellite exceptional divisors, being the difference that infinitely many centers of the blowing-ups belong to the same exceptional divisor in those of type C (we always identify a divisor with its strict transform in any surface of the point blowing-up sequence). Now, we are ready to define those valuations which will be useful for us.
Definition 3.5. A plane divisorial valuation at infinity is a plane divisorial valuation of K centered at R that admits, as a general element, an element in R providing the germ at p of some curve with one place at infinity (p being its point at infinity).
A plane valuation ν of K centered at R is said to be at infinity whenever it is a limit of plane divisorial valuations at infinity. More explicitly, set {ν i } ∞ i=1 the set of plane divisorial valuations, corresponding to divisors E i , that appear in the sequence of point blowing-ups given by ν. The valuation ν will be at infinity if, for any index i 0 , there is some i ≥ i 0 such that ν i is a plane divisorial valuation at infinity.
There exist plane valuations at infinity of any of the above described types [17].
Definition 3.6. Let ν be a plane valuation at infinity of type C, D or E. A sequence of polynomials P = {q i (X, Y )} i≥0 in F q [X, Y ] is a family of approximates for ν whenever each plane curve C with only one place at infinity providing a general element of some of the plane divisorial valuations at infinity converging to ν admits some subset of P as a family of approximates and P is minimal with this property.
The following two results that we have extracted from [16, Propositions 4.8, 4.9, 4.10] explain the relation among δ-sequences, plane valuations at infinity and weight functions.
, r ≤ ∞, be a δ-sequence and denote by S ∆ the semigroup that it spans. Set F q [X, Y ] the polynomial ring in two indeterminates over the finite field of q elements F q . Then, a: There exists a weight function w ∆ : being the group generated by S ∆ , is a plane valuation at infinity. Note that this last result is an extension of a result by Matsumoto [29]. To end, we present a result that relates this section with Subsection 2.1. It involves curves, further we shall explain the relationship between weight functions given by plane valuations at infinity and those introduced in that subsection. Assume that ∆ = {δ i } g i=0 is a δ-sequence in N >0 ; then, for 1 ≤ i ≤ g, it is well-known that there exists a unique expression of the form where a i0 ≥ 0 and 0 ≤ a ij < n j , for 1 ≤ j ≤ i − 1. Now, write q 0 := X q 1 := Y and, for 1 ≤ i ≤ g, where λ i ∈ F q \ {0} are arbitrary. Then the mentioned result is Proposition 3.1. The equality q g+1 = 0 defines a plane curve C with one place at infinity and the set {q i } g i=0 is a family of approximates for C such that −ν C,p (q i ) = δ i for all i = 0, 1, . . . , g.

The Euclidean relation in R n
+ . In this section, R will denote the real numbers, R n the set of n-tuples of real numbers, lexicographically ordered, and R n + the additive semigroup of nonnegative elements in R n under the same ordering. n-tuples (u 1 , u 2 , . . . , u n ) in R n + will be usually expressed as u. The following version of the Euclidean division happens: Proposition 3.2. Let u ≥ v ∈ R n + be such that there exists an index s (1 ≤ s ≤ n) satisfying u j = v j = 0 for j < s and v s > 0, then there exists a unique positive integer a such that u = av + w and (0, 0, . . . , 0) =: 0 ≤ w < v.
Proof. It suffices to consider the round down function · applied to us vs , define a := us vs except when us vs ∈ N, u j = av j for j less than some index t (s < t ≤ n) and u t < av t ; in this case a := us vs − 1. Then, the result holds setting w = u − av. The value a is unique since any other positive integer satisfying the equality u = av + w does not satisfy 0 ≤ w < v.
The proposition above allows us to perform an Euclidean division between elements u and v in R n + . To complete this, we add the symbol ∞ to the set N >0 to get N >0,∞ and then, when u s = 0 and v s = 0, we shall set u = ∞ v.
As a consequence, iterating that result, we can establish an Euclidean algorithm for any pair of elements in R n + , u 0 ≥ u 1 , as follows: There are several CASES for the algorithm: (1) It stops and for some index k, one gets u k = a k u k+1 + 0.
(2) It never stops and we obtain an infinite sequence of natural numbers a l , l ≥ 0.
(3) It stops and, for some index k, one gets that there exists another index s, 1 ≤ s ≤ n, such that the first s components u k+1,j , 1 ≤ j ≤ s, of u k+1 vanish, but u k,s = 0, being u k,1 = · · · = u k,s−1 = 0, that is, a k = ∞. When the first item (1) happens, we say that u k+1 is the greatest common divisor of u 0 and u 1 . Moreover, for u, v ∈ R n + we shall write a := u/v whenever there exists a ∈ N >0 such that u = av, where we have considered the scalar multiplication.
The above procedure allows us to establish an equivalence relation on the subset A of pairs (u, v) of R n + × R n + such that u ≥ v which produces large equivalence classes which will be useful for us. Definition 3.7. Two pairs (u 0 , u 1 ) and (v 0 , v 1 ) in the above set A are said to be equivalent (or related by the "Euclidean" relation R E ) if the Euclidean algorithm (6) applied to both of them provides the same case and the same values a 0 ; a 1 , . . . , a l , . . . .
If (u 0 , u 1 ) is an element in the set A, then its equivalence class by R E is given either by an irrational number, or by a rational number or by a rational number plus infinite. To decide it, one has to consider the first non-vanishing component u 0,s of u 0 , if u 1,s = 0, then we are in the class ∞ . Otherwise, we consider the quotient u 0,s /u 1,s ; if this corresponds to an irrational number given by the continued fraction a 0 ; a 1 , . . . , a l . . . , (u 0 , u 1 ) is in the class given by that continued fraction. If u 0,s /u 1,s is a rational number with continued fraction a 0 ; a 1 , . . . , a k we must check the remaining quotients u 0,j /u 1,j , j > s and if the continued fraction of all of them is a 0 ; a 1 , . . . , a k , then (u 0 , u 1 ) belongs to the class that this continued fraction represents. Otherwise that pair is in the class given by a 0 ; a 1 , . . . , a k , ∞ . For instance, in the set A in R 2 + , the pairs [ (14,9), (6,4)] and [ (7,9), (3,6)] are in the same class

3.3.
Sum of δ-sequences. As we have mentioned, there exists a close relation between δ-sequences and weight functions given by plane valuations at infinity. The goal of this section consists of explaining how to get a weight function from finitely many weight functions given by plane valuations at infinity through suitable δ-sequences. For a start, we introduce the concept of class of equivalent δ-sequences in R n + for some fixed integer number n ≥ 2. Let ∆ = {δ i } r i=0 , r ≤ ∞, be a δ-sequence and for all i set δ i := (δ i , 0, . . . , 0) ∈ R n + , where we add n − 1 zeroes except when the δ-sequence is in Z 2 in which case we add only n − 2 zeroes. The set ∆ = {δ i } r i=0 is called the canonical δ-sequence in R n + corresponding to ∆. Now, following the development of the previous section, and using the same formulae defined below Definition 3.1, we get a sequence of pairs {(m i , e i )} for i ≤ r−1 (respectively, i ≤ r − 2) according to the fact that δ 0 − δ 1 does not divide (respectively, divides) δ 0 . Notice that both values e i and m i are elements in R n + , but n i is a positive integer. From the definition of δ-sequence and taking into account the two described possibilities for δ 0 − δ 1 , one deduces that, for i ≤ r − 2 (respectively, i ≤ r − 3), the pairs (m i , e i ) corresponding to ∆ define, under the relation R E , a class of the type a 0 , a 1 , . . . , a k . When the δ-sequence comes from a δ-sequence in Q we obtain infinitely many classes as above; when it comes from a δ-sequence in R, the last pair (m t , e t ) defines a class with infinitely many values a 0 , a 1 , . . . , a l , . . . and in case of coming from a δ-sequence in Z 2 , it defines a class of the type a 0 , a 1 , . . . , a k , ∞ . We are ready to define the concept of δ-sequence in R n + and the class of equivalent δ-sequences in R n + . Definition 3.8. A sequence ∆ = {δ i } r i=0 of finitely or infinitely many elements in R n + is called to be a δ-sequence in R n + if, for 1 ≤ i ≤ r − 1, the value d i := gcd(δ 0 , δ 1 , . . . , δ i−1 ) is defined and each pair of the sequence {(m i , e i )}, defined as we did after Definition 3.1, where n i := d i /d i+1 , 1 ≤ i ≤ r − 1, belongs to the same class with respect to the relation R E that the pairs attached to some canonical δ-sequence in R n + . As a consequence, the set of δ-sequences in R n + can be partitioned into equivalence classes containing what we call equivalent δ-sequences represented by a canonical δ-sequence. Indeed, e 0 = (21,9,21,9), m 0 = (35,15,35,15) and [(35, 15, 35, 15), (21,9,21,9)] is in the class 1; 1, 3 . Moreover, d 2 = (7, 3, 7, 3) because (35, 15, 35, 15) = 2(14, 6, 14, 6) + (7, 3, 7, 3) and (14, 6, 14, 6) = 2(7, 3, 7, 3), therefore n 1 = 5 and so e 1 = (7, 3, 7, 3) and m 1 = (21,8,15,11). Finally, we complete our explanation after checking that (m 1 , e 1 ) is in the class represented by 2, 1, ∞ .
be two equivalent δ-sequences in R n + , then the semigroups S ∆ and S ∆ that they span, both lexicographically ordered, are isomorphic ordered semigroups.
Proof. Let ∆ be the δ-sequence that yields the canonical δ-sequence in R n + representing ∆ and ∆ . For a start, we assume that ∆ is a δ-sequence in Q, Definition 3.8 for this case implies that δ i = δ i v and δ i = δ i v , for every index i, where v and v are non-vanishing vectors in R n + . As a consequence, ϕ : S ∆ → S ∆ given by ϕ(δ i ) = δ i is an isomorphism of ordered semigroups.
We are going to prove that the map ϕ defined as above is also an isomorphism of ordered semigroups whether the sequence ∆ is in Z 2 whether it is in R, which will conclude the proof. Assume that ∆ is in Z 2 and set ∆ * = {δ * i } r i=0 a δ-sequence in N >0 providing ∆ as described in Definition 3.2. Suppose that δ * 0 − δ * 1 does not divide δ * 0 (so the first formulae under Definition 3.1 hold). Otherwise the reasoning we are going to do is analogous. Similarly as above, there exist v and v non-vanishing vectors in R n + such that δ i = δ * i v and δ i = δ * i v whenever i < r. Furthermore, the Euclidean division between m r−1 and e r−1 provides a class of the type a 0 ; a 1 , . . . , a k , ∞ and an expression as in (6), where u 0 = m r−1 and u 1 = e r−1 . The last expression will be u k+1 = ∞ u k+2 what means αu k+2 < u k+1 for any α ∈ N >0 . For simplicity, set a = u k+1 and b = u k+2 and doing back substitution m r−1 = λa + βb and e r−1 = ηa + ξb with λ, β, η, ξ ∈ N. Taking into account that ∆ and ∆ are equivalent, it is straightforward to check that m r−1 = λa + βb and e r−1 = ηa + ξb with the same values λ, β, η, ξ and for other vectors a and b in R n + that also satisfy αb < a for all α ∈ N >0 . Now, e r−1 = e * r−1 v = ηa+ξb and since e * r−1 divides δ * i , 0 ≤ i < r, we get δ i = a i a + b i b with a i , b i ∈ Z and since δ r = n r−1 δ r−1 − m r−1 , it happens δ r = a r a + b r b with a r , b r ∈ Z. The same procedure proves δ i = a i a + b i b , 0 ≤ i ≤ r. So, any element s ∈ S ∆ can be expressed s = ωa + θb and s < s happens whenever either ω < ω or ω = ω and θ < θ . This finishes our reasoning for this case since ∆ satisfies the same properties replacing a with a and b with a and since ϕ(s := ωa + θb) = ωa + θb .
To end, suppose that ∆ is a δ-sequence in R. Reasoning as above and assuming also that δ 0 − δ 1 does not divide δ 0 , we get that δ i = δ i v and δ i = δ i v when 0 ≤ i < r and also e r−1 = e r−1 v and δ r = n r−1 δ r−1 − m r−1 . The fact that ∆ is a δ-sequence in R implies that the quotient of the first non-vanishing coordinates of δ r and v (say δ r,1 /v 1 ) is a non-rational real number which is the same that the corresponding δ r,1 /v 1 attached to ∆ because the δ-sequences ∆ and ∆ are equivalent. This concludes the proof after bearing in mind that we are using lexicographical ordering in S ∆ and S ∆ .
Next, we state the Abhyankar-Moh Theorem for plane valuations at infinity [17]. This theorem holds for any type of these plane valuations and it determines generators for the so-called semigroups at infinity. However, we shall only consider types C, D and E plane valuations because these are the only useful types in coding theory (see [16,Proposition 4.2] and the paragraph below it for type A valuations and, for type B ones, the second remark in the page 727 of the same paper). With notations as in Section 3.1, let ν : K * → G be a (type C, D or E) plane valuation at infinity. The semigroup at infinity of ν is defined to be the following sub-semigroup of G: Theorem 3.3. Let ν be a (type C, D or E) plane valuation at infinity under the assumption that it can be defined by a sequence of plane divisorial valuations at infinity {ν i } ∞ i=1 such that the characteristic of the field F q does not divide gcd(−ν i (x), −ν i (y)) for all i ∈ N >0 . Then, there exists a δ-sequence ∆ such that the semigroup at infinity S ν,∞ is generated by ∆. ∆ will be in Z 2 , R or Q according the type, C, D, or E, respectively, of ν.
The converse of this theorem is also true and it does not depend on the characteristic of the field F q (see clause b of Theorem 3.1). In [16], it is shown that the procedure described in Section 2.1 can be used to provide a weight function w ∆ from a δ-sequence ∆ = {δ i } r i=0 , r ≤ ∞. In order to do it, it suffices to write ∆ in the form: δ 0 δ 1 , δ 2 , . . . , δ r .
In the same paper, we use the relation of w ∆ with plane valuations to prove that it is a weight function because, from it, other interesting properties, as Theorem 3.2, can be derived. Notwithstanding the practical procedure to construct codes uses the machinery of Section 2.1. Now, we introduce the concept of sum of δ-sequences which will be essential for our purposes.
We notice that the sum of δ-sequences is neither unique nor commutative. Now we are ready to state our main result. Theorem 3.4. Let {ν i } 2≤i≤m be a family of m−1 plane valuations at infinity whose semigroups at infinity are generated by their corresponding δ-sequences, {∆ i } 2≤i≤m , which define weight functions denoted by {w ∆ i } 2≤i≤m . Then any sum of δ-sequences Σ := m i=2 ∆ i is a well-suited family of elements in the additive group R n such that the values in each equality b of Definition 2.2 depend only on one weight function w ∆ i . Therefore any sum Σ defines a weight function w Σ with values in the semigroup generated by Σ defined on the polynomial ring F q [X, m]. As a consequence, the procedure given in Section 2.2 yields codes defined by finite families of weight functions given by plane valuations at infinity and, moreover, Feng-Rao bounds for these codes satisfy d(α) ≤ min (i,j)∈I (m i,j + 1) ≤ d ev (α), where I and m i,j run over the indices and the coefficients set of the unique expression of the values η ∈ S Σ (c in Definition 2.2) such that γ ≤ η < Ω n .
Proof. The definition of δ-sequence implies that we can attach to any δ-sequence {δ i } r i=0 positive integer values n i satisfying (2) of Definition 3.1 and (3) of that definition whenever i < r. Now, clauses a and b of Definition 2.2 follow by considering the δ-sequences {δ i−1,r i−1 , δ i,1 , δ i,2 , . . . , δ i,r i } (which behave as ∆ i ) and their respective integers n i , that we denote n i,j .
It only remains to prove that clause c also holds. Indeed, if γ ∈ S Σ \ {0}, an expression of γ with the requirements of c in Definition 2.2 follows from the equalities described in b. In order to prove the uniqueness we shall assume that γ admits two different expressions satisfying the requirements of c. This implies the existence of an equality of the form where I and I are disjoint non-empty finite subsets of I and 0 < m i,j , m i,j < n i,j whenever j = r i . Due to the conditions given in Definition 3.9, it is clear that there exists an index i 0 such that (i, j) ∈ L(i 0 , r i 0 ) \ L(i 0 − 1, r i 0 −1 ) for all (i, j) ∈ I ∪ I . But this is a contradiction because {δ i,j | (i, j) ∈ L(i 0 , r i 0 ) \ L(i 0 − 1, r i 0 −1 )} is equivalent to a subset of a canonical δ-sequence in R n + and, therefore, every element of the semigroup that it generates admits a unique decomposition as in c (since this fact holds for a δ-sequence [16]).

3.4.
An algorithmic procedure to get sums of δ-sequences. In this section, we start with an ordered set of m − 1 δ-sequences, (∆ i ) 2≤i≤m , such that only ∆ m can be in Q, and provide an algorithmic procedure to construct a sum m i=2 ∆ i of them. Our procedure will be inductive on the number m − 1 of δ-sequences, and the number, n − 1, of δ-sequences in Z 2 will determine the value n corresponding to the set R n + where m i=2 ∆ i will be embedded. Set ∆ i the canonical δ-sequence in R n + relative to ∆ i . For each index 3 ≤ l ≤ m we are going to explain how to perform l−1 i=2 ∆ i + ∆ l to get l i=2 ∆ i , where l−1 i=2 ∆ i is written as Our procedure depends on the type of the δ-sequence ∆ l and it is clear that starting with our initial set, after m−2 sums, we shall arrive to m i=2 ∆ i , which will be the required sum m i=2 ∆ i . We must assume that the t-last coordinates of the elements in l−1 i=2 ∆ i vanish, t being the number of δ-sequences in Z 2 in the set (∆ i ) m i=l . This condition is imposed to guarantee the triviality of the intersection of subgroups given in Definition 3.9.
Let us see the mentioned explanation. Notice that r l−1 < ∞.
From our method, it is clear that the l−1 sequences that we can get from the last element in one row to the last one in the next one are, respectively, in the classes corresponding with the δ-sequences ∆ 2 , ∆ 3 , . . . , ∆ l and the condition involving intersection of subgroups in Definition 3.9 also happens because δ l−1,r l−1 does not belong to the group spanned by the previous elements δ i,j in (8) with respect to the lexicographical ordering. In addition, the product by a new non-rational number δ s to get δ s δ l−1,r l−1 guarantees that the procedure works in the next step. - , let us consider the first s elements of a δ-sequence in N >0 providing ∆ l , {δ * i } s−1 i=0 , and dividing by their greatest common divisor, assume that gcd((δ * i ) i=0,...,s−1 ) = 1. Then, writing l−1 i=2 ∆ i as in (8), a sum l i=2 ∆ i will be δ * 0 δ 1,1 δ * 0 δ 2,1 , δ * 0 δ 2,2 , . . . , δ * 0 δ 2,r 2 . . . . . . . . . . . . δ * 0 δ l−1,1 , δ * 0 δ l−1,2 , . . . , δ * 0 δ l−1,r l−1 δ * 1 δ l−1,r l−1 , δ * 2 δ l−1,r l−1 , . . . , δ * s−1 δ l−1,r l−1 , z, where, assuming that δ * 0 − δ * 1 does not divide δ * 0 (the remaining case works similarly), we get z by using the following procedure. Consider the values a 0 ; a 1 , . . . , a k−1 , ∞ given by the pair (m s−1 , e s−1 ) corresponding to ∆ l and using as much indeterminates as necessary obtain any expression like (6) such that it finishes with u k−1 = a k−1 u k + u k+1 , there is no α ∈ N >0 such that αu k+1 > u k and u 1 = δ l−1,r l−1 , which is the value e s−1 of the last δsequence in our sum. Then z := n s−1 δ * s−1 δ l−1,r l−1 −u 0 and this completes the computation of the sum. When we compute z we must add the condition that the n − t + 1 coordinate of u 0 (and therefore of z) is different from zero. Again it is clear that the sequences that we can get from the last element in one row to the last element of the next one are, respectively, in the classes corresponding with the δ-sequences ∆ 2 , ∆ 3 , · · · , ∆ l , and an analogous reasoning to the one done in (a) proves the condition involving intersection of subgroups in Definition 3.9. The way we define z allows us to go on with the process in the next step.

Examples
We finish this paper giving a sample of codes constructed with the techniques above described. We have to choose some finite subset among the infinitely many existing families of δ-sequences, sum the elements in that subset and, according this choice, consider sets of points to be evaluated. For the moment we do not know which are the choices that provide the best parameters. Our computations use the computer algebra system Singular [9]. We start by providing two families of dual evaluation codes {C δ } δ∈S ∆ given by only a δ-sequence ∆.