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 [39] 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 [43]. Goppa's construction uses an algebraic curve C defined over a finite field and two disjoint rational divisors This is one of several papers published in Designs, Codes and Cryptography comprising the "Special Issue on Coding Theory and Applications". 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 [44] 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 et al. introduced in [25] 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 , 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 [12,13]. 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 [27,40] 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 [25,33] in the context of order functions and the series of supporting papers [7,29,32,35] with respect to the Berlekamp-Massey-Sakata algorithm and [11,26,28,36,37] 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 [1][2][3]41,[45][46][47]). 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 [41] (see also [15,24]), 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 [16,18,33]. 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 [30]. 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 [33] 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 [9]. 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, 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 [19]) 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 Sect. 2, we introduce the concept of wellsuited 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. Section 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 Sect. 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 Sect. 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 Sect. 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 Sect. 4.

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: 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, [21] 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 {γ l,s } (l,s)∈L(i, j) , where L(i, j) := {(l, s) ∈ I|(l, s) < L (i, j)}, < L being the lexicographical ordering in Z 2 , defined as (i 1 , j 1 ) < L (i 2 , j 2 ) if either i 1 < i 2 or i 1 = i 2 and j 1 < j 2 .

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.
∈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, where the values n i, j−1 and m l,s , (l, s) ∈ J(i, j − 1) correspond to the expression of n i, j−1 γ i, j−1 given in item b of Definition 2.2.
Polynomials close to approximated ones are used in [31] 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 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 i j 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 ( 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. 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 Step 2 cannot be repeated indefinitely. Set M = α Z s i j (l,s) =(i, j) Z r l,s l,s , α ∈ F * q , any monomial in a list L involved in the construction of a i, j (L). In this procedure M is replaced by the monomials of where s = a n i j + b, a, b ∈ N and 0 ≤ b < n i j . 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 i j 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 i j 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 l,s 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. (1), and let P , := {q i, j } (i, j)∈I be the family of approximated polynomials attached to and to a set

Theorem 2.1 Let = {γ i j } (i, j)∈I be a well-suited family of elements of a totally ordered commutative group G, expressed as in
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 , 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 , this monomial must be the same, up to a constant, therefore a suitable constant 0 = λ ∈ F q gives rise to the inequality w( 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 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 .

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: 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 L γ : 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 And, for each γ ∈ S , define the values 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.

Theorem 2.2 Let
= {γ i, j } (i, j)∈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 i, j 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 [25], 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 .

δ-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 Sect. 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 [3][4][5][6]14,34,38,42] 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 [8].
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 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.
Next, we give the definition of δ-sequence. This concept is introduced in a constructive manner and includes three cases according to the set to which its elements belong to. In the course of the paper we shall show the existence of many equivalent δ-sequences which will allow us to simplify the definition and obtain weight functions for families of plane valuations at infinity. In any case, this definition can be regarded as the "canonical one". We shall need to know that a normalized δ-sequence in N >0 is an ordered finite set of rational numbers = {δ 0 , δ 1 , . . . , δ g } such that there is a δ-sequence in N >0 , = {δ 0 , δ 1 , . . . , δ g }, where a 1 ; a 2 , . . . , a t , a t ≥ 2, is the continued fraction expansion of the quotient m r −1 /e r −1 (respectively, m r −2 /e r −2 ) given by * . A finite sequence of elements in R, = {δ 0 , δ 1 , . . . , δ r }, r ≥ 2, is a δ-sequence in R if it generates a well-ordered sub-semigroup of R, δ i is a positive rational number for 0 ≤ i ≤ r − 1, δ r is non-rational, and there exists a sequence j = {δ 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 blowing-ups (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: , v), 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.

Definition 3.4 A valuation of the field K is a mapping
where G is a totally ordered group, such that it satisfies f, g being elements in K * .
A valuation as above is said to be centered at R whenever R ⊆ 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 [24,41] (see also [15]). 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 poly- 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. Note that this last result is an extension of a result by Matsumoto [30].
To end, we present a result that relates this section with Sect. 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 i j < 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 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.

+
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) Proof It suffices to consider the round down function · applied to u s v s , define a := u s v s except when u s v s ∈ N, u j = av j for j less than some index t (s < t ≤ n) and u t < av t ; in this case a := u s v s − 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

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 + .

Proposition 3.3 Let = {δ i } r i=0 and
= {δ i } r i=0 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, 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 : 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 Sect. 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 {ν
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 Sect. 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: 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 Sect. 2.1. Now, we introduce the concept of sum of δ-sequences which will be essential for our purposes. Definition 3.9 Let ( i ) m i=2 be an ordered set of δ-sequences, all of them either in Z 2 or in R except the last one, m , which is also allowed to be in Q. A sum of these δ-sequences, m i=2 i , is a family of elements in R n + (for some positive integer n) of the form δ in the same class as the canonical δ-sequence in R n + corresponding to i , for 2 ≤ i ≤ m. We also require that, for each i, the intersection of the subgroups spanned by We notice that the sum of δ-sequences is neither unique nor commutative. Now we are ready to state our main result. 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]).

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 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.
i=0 , 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 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 [10]. We start by providing two families of dual evaluation codes {C δ } δ∈S given by only a δ-sequence .