Higher genus universally decodable matrices (UDMG)

We introduce the notion of Universally Decodable Matrices of Genus g (UDMG), which for g=0 reduces to the notion of Universally Decodable Matrices (UDM) introduced in [8]. A UDMG is a set of L matrices over a finite field, each with K rows, and a linear independence condition satisfied by collections of K+g columns formed from the initial segments of the matrices. We consider the mathematical structure of UDMGs and their relation to linear vector codes. We then give a construction of UDMG based on curves of genus g over the finite field, which is a natural generalization of the UDM constructed in [8]. We provide upper (and constructable lower) bounds for L in terms of K, q, g, and the number of columns of the matrices. We will show there is a fundamental trade off (Theorem 5.4) between L and g, akin to the Singleton bound for the minimal Hamming distance of linear vector codes.


Introduction
Universally Decodable Matrices (UDM) over finite fields were introduced by Tavildar and Viswanath in [4] to build examples of approximately universal codes (defined below), which were designed to solve an important problem in coding over parallel channels in slow-fading wireless communications systems. Recently Vontobel and Ganesan gave a general construction for UDMs in [8]. (See also [2].) In this paper we introduce a natural and useful generalization of UDMs we call Universally Decodable Matrices of Genus g (UDMGs). We then generalize the construction of UDMs given in [8] and find bounds for the size of a UDMG that apply in a more general setting than that considered in [4] and [8].
Despite (or perhaps because of) their utilitarian origin, these sets of matrices can be studied as an abstract mathematical structure in their own right, and as such have a rich and beautiful theory, including relations to traditional linear vector codes -which in some sense they generalize. Before we detail this structure, let us describe in more detail the communications problem which inspired their consideration and to which they provide a solution.
Communication Motivation for UDMG. First let us review the terminology we need from communications theory. Digital communication over a wireless channel takes place via the transmission of complex numbers whose magnitude and argument determine the amplitude and phase of the radio-frequency wave over which they are transmitted (the channel itself is randomly time-varying and is defined probabilistically). The radio wave is received by an antenna and sampled at the symbol rate, so if x ∈ C is the transmitted information-bearing complex-valued symbol, the corresponding discrete-time complex received signal will be y = hx+n, where h and n are realizations of complex random variables, respectively called the fading coefficient and the noise of the channel. We assume that the noise is an additive complex Gaussian random variable of mean 0 and variance 1. If the realization h is constant over all T timeslots that we will employ the channel, we say the channel is slow-fading. A set of L channels is called a parallel channel, and its elements are called its subchannels. An important example of a parallel channel is one that results in wide-band communication through the use of a technique called orthogonal frequency division multiplexing (OFDM) [5].
Therefore given a set W of messages (information), we can transmit it over L-parallel subchannels for T timeslots via an injection i : W → Mat L×T (C). There is a great deal of application-specific engineering that goes into constructing i, and it is useful to write it as the composition of an encoding map κ from W into a set C of codewords, and a map µ : C → Mat L×T (C) called modulation. We will call the quadruple (W, κ, C, µ) a coding scheme (or just a code). The rate of the code is log 2 |W |/T . The power of the code is 1 where || · || denotes the Frobenius norm, which by our normalizing choice of the noise is the same as the signal-to-noise ratio (SNR), which we denote as SNR(C, µ).
Recently [4] gave a definition of what it means for a sequence of codes for a slow-fading parallel channel to be "approximately universal" (for the experts, this was meant to capture the notion of what it means for the sequence of codes to optimally trade off diversity and multiplexing gain, no matter the choice of the distribution of the fading coefficients).
So as to not bring us too far afield, we will use an operational definition of approximately universal given in Theorem 5.1 of [4]: Suppose we have a slow-fading parallel channel with L subchannels. For each natural number n, suppose we have a coding scheme (W n , κ n , C n , µ n ) for our channel, employed for T timeslots, of rate R n , and signal-to-noise ratio SNR n , such that SNR n tends to ∞ as n does. Then we say the sequence is approximately universal if for every pair of distinct T -tuples of codewords v, w ∈ C T n , Given a coding scheme (W, κ, C, µ) for one timeslot, for any T , we can extend κ and µ entry-by-entry to functions κ T and µ T of the vectors W T and C T , to get the T -iterated coding scheme (W T , κ T , C T , µ T ) for T timeslots. Using the arithmetic-geometric mean inequality as in the proof of the following Lemma, it is not hard to see that if a sequence of coding schemes for one timeslot is approximately universal, then for any T , the corresponding sequence of T -iterated coding schemes is approximately-universal. So for the purpose of building examples of sequences of approximately universal coding schemes, it suffices to build examples for one timeslot. So we will assume henceforth that T = 1. We also need the following simplification: Lemma 0.1. For each natural number n, suppose we have a coding scheme (W n , C n , κ n , µ n ) for our parallel channel with L-subchannels, of rate R n , and signal-to-noise ratio SNR n , such that SNR n tends to ∞ as n does, and that µ n is real-valued. Suppose that for every pair of distinct codewords v, w ∈ C n , 1≤i≤L where d i is the i th -entry of the vector (µ n (v) − µ n (w))/ √ SNR n . Then the complexified coding scheme is approximately universal.
Proof. First of all, SNR(C n × C n , µ n × 0 + 0 × iµ n ) = 2SNR(C n , µ n ) and the rate of (W n × W n , κ n × κ n , C n × C n , µ n × 0 + 0 × iµ n ) is 2R n . So for distinct vectors (v 1 , v 2 ), (w 1 , w 2 ) ∈ C n × C n , we need to compute a lower bound for the i th entry of ((µ n (v 1 ) − µ n (w 1 )) 2 + (µ n (v 2 ) − µ n (w 2 )) 2 )/2SNR n , and multiply over all 1 ≤ i ≤ L. If v 1 = w 1 , we see that is a lower bound for this product, which is of the form needed for the definition of approximately universal. A similar bound holds if v 2 = w 2 , so now assume that v 1 = v 2 and that w 1 = w 2 . Then the arithmeticgeometric-mean inequality gives: UDMs were constructed in [4] because they can be used to build a sequence of approximately universal codes. We will now show how to generalize this construction. Let q be a power of a prime, F q the field with q elements, and N a natural number.
Let M = {M i |1 ≤ i ≤ L} be a collection of N × N matrices with entries in F q . If g is a non-negative integer, we say that M is a set of (square) Universally Decodable Matrices of Genus g (UDMG) of length L if for every L-tuple (λ 1 , ..., λ L ) of non-negative integers, the matrix formed by concontenating the first λ i columns of M i is of full rank Assume now for every N greater than some N 0 , we have a UDMG q be the kernel of the linear transformation ρ i : F N q → F N q given by multiplication by M i . Since M i has rank at least N − g by design, the dimension of K i is some δ i ≤ g. Let K be the span of . The modulation map µ N : C n → C L will be the column-by-column extension of a map µ 0 : F N q → C, which we will now describe in detail. Given the result of Lemma 0.1, there is no reason not to build our example with µ 0 being real-valued.
There is a standard map p q N : F N q → R, built as follows. Arbitrarily identify F q with I q = {0, 1, ..., q − 1} and extend this identification entry-by-entry from F N q → I N q . Now for any a = (a 1 , ..., a N ) ∈ I N q , let p q N (a) = This maps I N q to q N unit-spaced points on the real line symmetrically placed about the origin. The map p q N is standardly called q N -PAM (pulse-amplitude modulation). The modulation map we need to take is a weighted version of q N -PAM.
Lemma 0.3. There are positive constants α and β that depend on q, g, and L, but not on N, such that, To get an upper bound on σ i we note: the sum of the cross terms vanishing because of the invariance of the The lower bound for σ i depends of the parity of q. First let us assume q is odd, and set z 0 = ( q−1 2 , ..., q−1 2 ) ∈ I N q . Then µ 0 (z 0 ) = 0, so by Lemma 0.2, where m 0 (z) is the number of initial entries where z and z 0 agree. Each addend decreases in size as m 0 (z) increases, so if Z ′ is the subset of elements in I N q which agree with z 0 for their first initial ∆ entries, then we have Summing over 1 ≤ i ≤ L, we see that when q is odd we can take α = L/6q 2gL+2 .
When q is even, µ 0 (z) for z ∈ I N q is minimized when z is z 0 = (q/2 + 1, ..., q/2 + 1) or z 1 = (q/2, ..., q/2). Hence by Lemma 0.2, where m 0 (z) and m 1 (z) are respectively the number of initial entries where z agrees with z 0 and z 1 . Note that either m 0 (z) or m 1 (z) vanishes, since z 0 and z 1 differ in all entries. Again, each addend decreases in size as m 0 (z) or m 1 (z) increases, so if Z ′ is the subset of elements in I N q which agree with z 0 or z 1 for their first initial ∆ + 1 entries, then we have . Summing over 1 ≤ i ≤ L, we see that when q is even we can take α = L/2q gL+4 .
Theorem 0.4. Fix L > 0, g ≥ 0. Suppose for some N 0 , for N ≥ N 0 we have a sequence of UDMG M N of genus g of size N × N and length L, with L(N 0 − g) ≥ N 0 . Then the corresponding sequence of codes (W N , κ N , C N , µ N ) built from M N as above is approximately universal.
Proof. Our proof is modeled on that in Appendix IV of [4] . Fix an N ≥ N 0 , with L(N 0 − g) ≥ N 0 , and a UDMG M = {M 1 , ..., M L } of genus g and length L consisting of N × N matrices. Keep notation as above. Let v, w ∈ W N be distinct, so for every Suppose that M i v and M i w agree in precisely the first λ i entries. Hence by Lemma 0.2, Since M is a UDMG of genus g, and since v = w, we must have where recall R N = log 2 (W N ) is the rate of the code, and ∆ is the the Theorem follows from Lemmas 0.1 and 0.3.
The reason we include N 0 in our formulation is that we will show (see §5) that for fixed N and q, there is a bound for the number of parallel channels L a message can be reliably sent over in terms of the genus g of a UDMG. As a result, allowing UDMGs (and not just only UDMs) offer new possibilities for coding design on slow-fading parallel channels, allowing for a larger value of L for fixed q and N.
Outline of the Paper. In §1 we give the abstract mathematical model of UDMG and derive their basic properties, including the vectorspace realization of UDMG, equivalence of UDMG, and introduce suband quotient-UDMG. In §2 we relate UDMG to linear vector codes, suggesting that the former is something of a generalization of the latter. Section 3 gives our construction of UDMG of genus g based on curves of genus g (which we call "Goppa UDMG"). In [8] (Proposition 14) they construct a UDM so that the matrix formed by concatenating the first row of each matrix in the UDM is the generator matrix for a Reed-Solomon code. Similarly in Theorem 3.8 we show that the matrix formed by concatenating the first column of each of the matrices in a Goppa UDMG is the generating matrix for a corresponding Goppa code. In §4 we provide an example of a Goppa UDMG worked out for a curve of genus 1. The final §5 gives upper and constructable lower bounds on the number of matrixes in a UDMG in terms of its parameters.

Mathematical Model of UDMG
We first present the most general definition of Universally Decodable Matrices of genus g, and then specialize to the class of most interest in communications applications.
To fix notation, for a prime power q, let F q be the field with q elements, and for any N, K > 0, let M K×N (F q ) denote the K ×N matrices with entries in F q . For any set S of column vectors in F K q , we let sp(S) be the span of S over F q . We denote the i th entry of a vector v by (v) i and likewise denote the j th -column of a matrix M by (M) j . All our vector spaces will be finite dimensional. We define an integer vector α to be greater than or equal to another integer vector β of the same length, if every entry of α is greater than or equal to the corresponding entry of β. If η ∈ Z, we let η denote the column vector all of whose entries are η and whose length is determined by context. For any vector the collection A of the first λ i columns from each M i is called an allowable set of columns from M.
We say that M is a (set of) Universally Decodable Matrices of genus g (UDMG) if for every allowable set of columns A of M, sp(A) = F K q . If so, we say that M is a (L, N, K, q, g)-UDMG. The space of all UDMG with parameters (L, N, K, q, g) will be denoted as U(L, N, K, q, g). We call the parameters (L, N, K, q, g) respectively the size, length, height, alphabet cardinality, and genus of M.
If in addition there is a positive integer η such that N i = η, 1 ≤ i ≤ L, M will be called η-regular, and the set of such will be denoted by U(L, η, K, q, g).
It is only interesting to study UDMG M which have at least one set of allowable columns, i.e., those for which N ≥ K + g. Similarly, if any N i > K + g, (M i ) j for K + g < j ≤ N i is never an element of an allowable set of columns, so we will only be interested in considering UDMG for which every N i ≤ K + g. Anomalous behavior occurs when K = 1, since then for any g ≥ 0 and any N, we can have a code of unbounded size by taking each M i = 1 (of length N i ).
These considerations lead to the following: The set of such will be denoted U n (L, N, K, q, g). A UDMG which is not nondegenerate will be called degenerate.
Remark 1.4. (1) We will be concerned throughout with the problems of finding upper bounds for L, by which we mean B u = B u (N, K, q, g) such that U n (L, N, K, q, g) is empty for L > B u , and constructable lower bounds for L, by which we mean B ℓ = B ℓ (N, K, q, g) such that there exists an L ≥ B ℓ such that U n (L, N, K, q, g) is non-empty.
(2) In the definition of UDMG we do not require g to be minimal, so for any 0 ≤ g ≤g, U(L, N, K, q, g) ⊆ U(L, N, K, q,g). However a nondegenerate UDMG with parameters (L, N, K, q, g) is not necessarily a non-degenerate UDMG with parameters (L, N, K, q,g) (3) Similarly, given any A = (A 1 , ..., A L ) ∈ U(L, N, K, q, g), we can truncate it to produce an We call such an A ′ a subUDMG of A. (Taking N ′ = 0 produces what could only be called the empty UDMG.) If each N ′ i < N i , we say that A ′ is a proper subUDMG of A. Dual to the notion of subUDMG is taking a quotient of a UDMG by a proper subUDMG. To explain this construction, it will be necessary to view UDMGs through a different guise. Indeed, note that the definition of a UDMG considers the span of allowable columns of a set of matrices, and not the columns themselves. Hence it is sometimes useful to consider just the spans of the columns of a matrix in a UDMG, and not the columns themselves. We build up the requisite notions as follows. Note that all V (M i ) j are subspaces of F K q . Definition 1.6. If W is an F q -vector space, and C : V 1 , ..., V N is an ordered list of N subspaces, we call C a chain of subspaces of W if V 1 ⊆ · · · ⊆ V N . We say the chain is closely nested if dim(V 1 ) ≤ 1 and dim(V i+1 /V i ) ≤ 1 for each 1 ≤ i < N.
For any M ∈ M K×N (F q ), V (M) is a chain of closely nested subspaces of F K q . Conversely, given a chain C : V 1 ⊆ · · · ⊆ V N of closely nested subspaces of F K q , one can form a matrix M ∈ M K×N (F q ), such that C = V (M) by setting V 0 = 0, and for each 0 Definition 1.7. We define a closely nested chain C : V 1 ⊆ · · · ⊆ V N of subspaces of an F q -vector space W to be isomorphic to a closely nested chain C ′ : We extend this notion of isomorphism (element-byelement) to isomorphisms of ordered collections of closely nested chains of a vector space.
With this we can now define two UDMGs to be isomorphic if their vector space realizations are isomorphic ordered collections of closely nested chains of some F K q . Given a set of matrices, one can test whether it is a UDMG in terms of its vector space realization.
be a closely nested chain of subspaces of W , and C = {C 1 , ...., C L } be the ordered collection of these chains. A vector Λ = (λ 1 , ..., λ L ) of integers with 1 ≤ λ i ≤ N i , such that L i=1 λ i ≥ K + g is called an allowable vector for C. We say that C is a (set of) Universally Decodable Vector Spaces of genus g (UDVSG) if for every allowable vector Λ = (λ 1 , ..., λ L ) of C, the vector space sum L i=1 V i λ i = W. If so, we say that C is a (L, N, K, q, g)-UDVSG attached to W .
We have concocted these definitions so that the vector space realization of an (L, N, K, q, g)-UDMG is a (L, N, K, q, g)-UDVSG, and conversely, that any (L, N, K, q, g)-UDVSG attached to some W is isomorphic to the vector space realization of some (L, N, K, q, g)-UDMG. Therefore the notion of UDVSM gives a coordinate-free way to study UDGMs. This is precisely what we need to make sense of quotients of a UDMG. Definition 1.10. We define a closely nested chain C : V 1 ⊆ · · · ⊆ V N of subspaces of an F q -vector space W to be reduced if V 1 is non-trivial and irredundant if it is reduced and V i+1 = V i for all 1 ≤ i < N. We call a collection of closely nested chains of subspaces of W to be be reduced or irredundant if every chain is reduced or irredundant. Likewise we call a collection of matrices to be reduced or irredundant if its vector space realization is. Remark 1.11. (1) Any closely nested sequence of subspaces can be pruned by removing any initial 0-subspaces to make it reduced, and then be further pruned by removing any repeated subspaces to make it irredundant. We can correspondingly prune a matrix by removing any initial 0-columns or by removing any column in the span of the previous columns.
(2) It is the regular, irredundant UDMG which are most important in the engineering application described in the Introduction (where we considered only square UDMG for ease of exposition). The reason for irredundancy is that one would not waste power by transmitting a zero codeword or one known to be in the span of previous ones since we are assuming the channel transmits reliably what it does not erase. The reason for regularity is that each channel will be used for the same amount of time.
We note that the η-regular, irredundant UDMGs of size L, genus 0, and height K over F q comprise precisely the set U(L, η, K, q, 0), which coincides with the space of all (L, η, K, q)-UDMs defined in [8].
(3) In complete analogy to truncating a UDMG to form a subUDMG (or a proper subUDMG), one can truncate a UDVSG by truncating its chains to form a subUDVSG (or proper UMVSG if every chain is truncated.).
(4) Likewise we can define a UDVSG to be non-degenerate if it is the vector space realization of a non-degenerate UDMG.
The following will be a fundamental notion for us. Definition 1.12. Let C : V 1 ⊆ V 2 ⊆ · · · ⊆ V N be a chain of subspaces of an F q -vector space W . Let B be any subspace of W . We define the quotient chain C B of C modulo B to be the chain  Proof. We just have to check that given two vector spaces W 1 ⊆ W 2 with dim(W 2 /W 1 ) = 1, then the dimension of V = ((W 2 +B)/B)/((W 1 + B)/B) is at most 1. But V is isomorphic to (W 2 /(W 2 ∩B))/(W 1 /(W 1 ∩ B)) which has dimension dim(W 2 /W 1 ) − dim((W 2 ∩ B)/(W 1 ∩ B)) ≤ 1.
Remark 1.14. If C is a reduced (or irredundant) chain, then in general, C B will not be reduced (or irredundant), but one can of course prune C B to produce a reduced (or irredundant) chain.
-UDVSG, which we call the quotient of C by S.

Proof. First let us verify that if
First of all, if N ′ is an allowable vector, then r = 0 and the dimension of B is K, so d = 0. Now suppose N ′ is not an allowable vector, and for a contradiction, that d > g. Then there is an allowable vector λ ≥ N ′ with L i=1 = K + g, and so that a contradiction of the definition of UDVSG. Proposition 1.13 gives that each (C i ) B , 1 ≤ i ≤ L is a closely nested chain of subspaces of W/B, which has dimension d+r. That the size of C/S is L follows from that each N ′ i ≤ N i − 1. So to verify that C/S is a (L, N − N ′ , d + r, q, g − d)-UDVSG attached to W/B, we need just to take any vector λ = (λ 1 , ..., 2) Even if C is nondegenerate, it can happen thatC/S is not.
Definition 1.17. The quotient of a UDMG C by a proper subUDMG S is a UDMG isomorphic to the quotient of V (C) by V (S) (so is only defined up to isomorphism).

Relationship between UDMGs and linear vector codes
If C is an [n, k, d] F q -linear vector code (that is, a k-dimensional subspace of F n q whose minimal Hamming distance is d), then the Singleton Bound states that n + 1 − d − k ≥ 0 see [6] or [9]. We standardly call s = n + 1 − d − k the Singleton Defect of C [1]. If s = 0 then C is a maximal distance separating MDS code. More generally, linear codes of defect s are called A s MDS codes N, K, q, g) UDMG, and G be the K × L matrix whose i th -column is the first column of M i . Then if L ≥ K + g, G is the generating matrix for some F q -linear [L, K, d]-codeC of defect at most g. In particular, if g = 0,C is an MDS-code.
Proof. Since L ≥ K + g and M is a UDMG of genus g, G has rank K over F q . We just have to bound the minimum distance ofC. If v ∈C is non-zero, there is an invertible K × K matrix M over F q such that v is a row of MG. Since G is a matrix whose every K × (K + g) minor has rank K, the same is true of MG. Hence v has at most K + g − 1 zero entries, so has Hamming weight at least L + 1 − K − g. Hence the Singleton defect ofC is at most g.
Bounds on the size of MDS codes have been extensively studied (they are the subject of the famed "MDS"-conjecture), and still comprise an active area of research. Although there are sporadic better results, the best known bound for a general [n, k, d] F q -linear MDS code is that n ≤ k + q − 1 (see [1] or [6]).
We will make use of the generalization of this bound to A s MDS codes: Let C be a [n, k, d] F q -linear code of Singleton defect s. Then n ≤ k − 2 + (q + 1)(s + 1).
Cognizant of Proposition 2.1, in [8], for L ≥ K, they construct a UDMG M with parameters (L, K, K, q, 0) whose associated linear vector codeC is a Reed-Solomon code with parameters [L, K, L − K + 1]. The Reed-Soloman codes are the classic non-trivial example of MDS codes. In the next section we generalize this construction to more generally build UDMG M with parameters (L, K, K, q, g), whose associated linear vector codesC are Goppa codes constructed from curves of genus g over F q , and have parameters [L, K, d] for some d ≥ L − K + 1 − g, so have Singleton Defect s ≤ g (see Remark 3.6, Theorem 3.7, and Theorem 3.8).
We cannot help from noting that since every linear code over F q is an A s MDS codes for some s, there is a sense in which UDMG are generalizations of linear vector codes over F q . This leads to the tantalizing question of what the dual of a UDMG should be, and what properties it would have. Likewise, is there a good notion of what the spectrum of a UDMG should be? .

Goppa UDMGs
Everything we require on the theory of curves over finite fields and their associated Goppa codes can be found in [9]. We will recall what we need by way of establishing notation.
By a curve X over F q we mean a one-dimensional non-singular projective variety (always taken to be irreducible) over the algebraic clo-sureF q of F q which is defined over F q We will let X(F q )denote the points of X defined overF q and X(F q ) be the subset of points defined over F q . A divisor D on X is an element of the free abelian group generated by X(F q ), so can be written as D = P ∈X(Fq) n(P )P , where all but finitely many n(P ) ∈ Z vanish. The set of P for which n(P ) = 0 is called the support of D and written as supp(D). We write deg(D) for the degree of D, which is P ∈X(Fq) n(P ). We put a partial order on divisors by saying D ≥ 0 if each n(P ) ≥ 0. LetF q (X) and F q (X) respectively denote the field of functions on X and the subfield of functions defined over F q . For every P ∈ X(F q ) we let v P be the discrete valuation onF q (X) that measures the order of zero (or pole) at P of a function. To every non-zero f ∈F q (X) we can associate a divisor (f ) = Likewise, if ω is a differential on X, for every P ∈ X(F q ), we can let t P be a uniformizer in the valuation ring ofF q (X) associated to v P , and define v P (ω) = v P (ω/dt P ), which is independent of the choice of t P . Then we define the divisor of ω to be (ω) = P ∈X(Fq) v P (ω)P . We put an equivalence relation on divisors by saying that D 1 and D 2 are linearly equivalent if D 1 − D 2 is the divisor of a function: if so we write D 1 ∼ D 2 . For any differential ω we set κ = (ω) which is called a canonical divisor of X, which is well-defined up to linear equivalence since the ratio of any two differentials is a function.
The space L(D) is a finite dimensionalF q -vector space, and we let l(D) denote its dimension. If D is defined over F q (i.e., is fixed by the Galois group ofF q over F q ), then L(D) has a basis that lies in F q (X).
For any divisor D and point P ∈ X(F q ) not in the support of D, we can define an increasing zero basis at P for L(D) to be an ordered basis (f 1 , ..., f ℓ(D) ) such that for all 1 (One can also do decreasing pole bases.) Such bases exist because v P is a discrete valuation andF q is the redisue field of v P . If D and P are defined over F q , the increasing zero basis can be taken to have elements in F q (X), in which case we call it an increasing zero basis at P over F q .
Every non-zero function on X has the same number of poles and zeros, so a function without a pole is a constant, and has a trivial divisor. In other words: Fundamental to the subject is the Riemann-Roch Theorem. Note that setting D = 0 gives l (κ) = g. Then setting D = κ gives that deg κ = 2g − 2.   We now have what we need to construct our Goppa UDMGs. Our construction directly generalizes the one given in [8], once their results on bivariate polynomials are reinterpreted in terms of statements about the arithmetic and geometry of the projective line P 1 over F q . Our construction produces an A ∈ U(L, K, K, q, g) but we can always truncate this to anÃ ∈ U(L, N, K, q, g) as in Remark 1.4 where each N i ≤ K.
Theorem 3.7. Let X be a curve of genus g over F q , and fix any K > g − 1. Let a = K + g − 1, D be a divisor of degree a on X defined over F q , and P = {P 1 , ..., P L } ⊆ X(F q ) be such that Supp D ∩ P = ∅. Let B 0 be any ordered basis for L(D) as an F q -vector space, and for 1 ≤ i ≤ L, let B i be an increasing zero basis for L(D) at P i over F q . For 1 ≤ i ≤ L, let M i be the change-of-basis matrix from B 0 to B i , which is a K × K matrix. Then the set M = {M 1 , ..., M L } is a UDMG with parameters (L, K, K, q, g). We will call M the Goppa UDMG associated with (X, P, D), and it is nondegenerate if L, K ≥ 2.
Proof. For the size of each M i , note that K > g − 1 implies that a > 2g−2, so ℓ(D) = a−g+1 = K by Corollary 3.4. If we write for 1 ≤ j < K. Since Supp D ∩ P = ∅ we lose no generality by taking B i1 (P i ) = 1. By construction, writing B i as column vectors, we have for each 1 ≤ i ≤ K. To prove the theorem, we must verify that given any allowable set of columns 0 ≤ λ i ≤ K such that L i=1 λ i = K + g = a + 1, that if µ i is the K × λ i matrix consisting of the first λ i columns of M i , and M is the K × (K + g) matrix formed by concatenating µ i for 1 ≤ i ≤ L, then M has rank K. Equivalently, we need to show that every row vector u of length K with entries in F q in the left-nullspace of M is the zero vector. Note that uM = 0 implies uN i = 0, for all 1 ≤ i ≤ L. Set f = uB 0 , which is the zero function precisely when u is the zero vector. By (1) But deg(E) < 0 and so l (E) = 0 by Lemma 3.2. Hence f = 0, u = 0, and M is of full rank. Thus M ∈ U(L, K, K, q, g).
Theorem 3.8. With notation as in Theorem 3.7, the matrix formed by concatenating the first column of each {M i }, 1 ≤ i ≤ L, is the generating matrix for the Goppa code associated with (X, P, D).
Proof. A generating matrix for the Goppa code with parameters (X, P, D) has entries g ij = f i (P j ), for 1 ≤ i ≤ K, 1 ≤ j ≤ L, where {f i }, 1 ≤ i ≤ K, is any basis for L(D) defined over F q . In particular, we can take f i = B 0i , 1 ≤ i ≤ K, as this basis.
Recall that M j is defined to be the matrix satisfying M j B j = B 0 , for 1 ≤ j ≤ K. Thus we have M j B j (P j ) = B 0 (P j ). But B j is an increasing zero basis at P j , so B jk (P j ) = 0 for 2 ≤ k ≤ L. We took B j1 (P j ) = 1, so B 0i (P j ) = (M j ) i,1 as desired.
4. An example of a Goppa UDMG of genus 1 Example 1. Let X be the curve in P 2 defined by the equation S 2 T = R 3 + RT 2 + T 3 over F 5 . Since the cubic is nonsingular overF 5 , X is a nonsingular projective curve of genus 1 over F 5 [3]. Set P = {P 1 , P 2 , P 3 , P 4 , P 5 , P 6 , P 7 , P 8 , P 9 } = which is all of X(F 5 ), and let D be the degree 3 divisor cut out by the hyperplane S + R = 0 on X. Since the hyperplane is defined over F 5 , the same is true of D, and one checks that none of the points in P are in the support of D. To build the Goppa UDMG associated with (C, P, D), we need to calculate an increasing zero basis for L(D) about each point in P. Let Q = [0, 1, 0]. If r = R/T, s = S/T ∈ F q (C), then a standard fact about genus 1 curves give that 1, r, s span L(3Q), and that the divisor of r + s is D − 3Q (see [3], Chapter 3). Hence α = 1/(r + s), β = r/(r + s), and γ = s/(r + s) span L(D). Let B i , 1 ≤ i ≤ 9, be an increasing zero basis for L(D) about the point P i . Then we can take: , and B t 9 = (γ, β, α), where the superscript t denotes taking the transpose. Let B 0 = B 1 and let M i be the change of basis matrix that satisfies Then we get: By Theorem 3.7, the set M = {M 1 , . . . , M 9 } ∈ U(9, 3, 3, 5, 1). We note that M is an example of a genus 1 UDMG which is not a UDM. This follows from setting λ i = 0 for i = 1, 2, 3, 4, 5, 9 and λ 6 = λ 7 = λ 8 = 1, so 9 i=1 λ i = 3, and seeing that the resulting matrix It is seemingly non-trivial to check that M is a UDMG of genus 1 without using Theorem 3.7.
Remark 4.1. It is clear that from our construction of a Goppa UDMG M associated to a curve X of genus g over F q that its size L is bounded by #(X(F q )). Bounds on the number of points on a curve over a finite field are given by the famous Hasse-Weil-Serre Theorem: Theorem 4.2. Let X be a curve of genus g defined over F q . Then These bounds are not always sharp, so in order to build Goppa UDMG of fixed genus g and maximal size, we want to find curves of genus g over a given finite field that have the maximal known number of rational points. The problem of finding such curves is very well-studied and is a continual area of active research. The role that the work of Tsfasman, Vladut, and Zink on this problem played in the construction of Goppa codes with parameters that beat the Gilbert-Varshamov bound for linear vector codes over finite fields is described in [9]. For the latest on which curves of which genus over which finite fields are known to have the most rational points, see the website [7].

Upper bounds on the size of UDMGs
Our first bound comes from our work in section 2. Combining Lemma 2.2 with Proposition 2.1 gives: Theorem 5.1. For non-degenerate M ∈ U(L, N, K, q, g) we have #(M) = L ≤ K − 2 + (g + 1)(q + 1). This is only a good bound when N = 1: we will now use it to get a better bound for many choices of parameters, by taking the quotient of a UDMG by an appropriate proper subUDMG to reduce to the case where N = 1.
Definition 5.2. Let M be a nondegenerate UDMG in U(L, N, K, q, g). Suppose that each N i ≥ 2, 1 ≤ i ≤ L. Then we break such UDMGs into two classes. If L i=1 (N i − 1) ≥ K − 2, we will say M is of Class 1. Otherwise, we will say M is of Class 2.
Lemma 5.3. Suppose we have a non-degenerate M ∈ U(L, N, K, q, g) with each N i ≥ 2, and that M is of Class 1.Then there is an integer d with 0 ≤ d ≤ min(g, K − 2) such that there exists a corresponding M ∈ U(L, 1, d + 2, q, g − d).
Proof. Let M be as in the statement of the Lemma and V (M) be its vector space realization. Let ν = (ν 1 , . . . , ν L ) be such that ν i ≤ N i − 1 and L i=1 ν i = K − 2. Let S be the proper subUDVSG of M gotten by truncating the i th chain of M to a chain of length ν i . By Theorem 1.15 (which applies with r = 2), we have that V (M)/S is a UDVSG with parameters (L, N − ν, d + 2, q, g − d) for some d with 0 ≤ d ≤ min(K − 2, g). Now takeM be the UDMG corresponding to the truncation of M/S in which every chain has been truncated to its first subspace. ThenM ∈ U(L, 1, d + 2, q, g − d).
Theorem 5.4. Let M be a non-degenerate UDMG in U(L, N, K, q, g) with each N i ≥ 2. Let γ M = min L i=1 N i . If M is of Class 1, we have L ≤ (g + 1)(q + 1).
Remark 5.5. 1) Theorem 5.4 agrees with the bound in Lemma 9 of [8], for M ∈ U(L, η, K, q, 0) in the region η ≤ K ≤ 2η. Moreover, Theorem 5.4 is tighter than the bound in Lemma 10 of [8] when K = 2η +1 and provides a bound on L for all η ≤ K. Of course our bound is of a slightly different nature since we assume η ≥ 2 throughout and their bound also includes the η = 1 case.
3) Theorem 5.4 is not sharp for all classes of UDMGs. We now present another bound on L for certain UDMGs and give an example where this new bound is sharper then the bound in Theorem 5.4. Lemma 5.6. For nondegenerate A ∈ U(L, N, K, q, g) with N i ≥ K − 1 for each 1 ≤ i ≤ L, we have the bound Proof. Let M = {M 1 , ..., M L } be in U(L, N, K, q, g) with N i ≥ K − 1 for all i. Let P be the set of all partitions of K − 1 into L non-negative integers. Then it is well-known that (2) #(P) = K − 2 + L K − 1 .
Since the codimension 1 subspaces of F K q are in one-to-one correspondence with the points in P K−1 (F q ), there are q K −1 q−1 subspaces of dimension K −1 in F K q . Order them arbitrarily and let the j th subspace