Introduction

Algebraic--Geometric Codes (AG--codes) are a family of linear codes described by Goppa in [Gop81a], [Gop81b]. Let Chi be an irreducible projective plane curve of genus g, defined by a (absolutely irreducible) homogeneous polynomial H(X, Y, Z) over a finite field K=setFq. A place of Chi is the maximal ideal of a discrete valuation subring of Bar(K)(Chi). We denote by vP the valuation at place P. Its degree is the degree of its residue class field over K. A divisor is an element D of the free abelian group over the set of places of Chi. Namely, such an element can be written additively: D = ∑P∈Places(Chi)nP.P, where all but finitely many nP∈Z are zero. The set of places with nonzero multiplicity is the support of D, denoted by Supp D. The set of divisors can be equipped with a natural partial order ≤ defined by:

D = ∑P ∈Places(Chi) nP .P ≤D' = ∑P ∈Places(Chi) n'P .P iff nP ≤n'P for all P.

If f∈K(Chi), then one can define the principal divisor: (f) = ∑P∈Places(Chi)vP(f).P. A divisor D is said to be defined over K if it is stable under the natural action of Gal(Bar(K)/K).

If (P1, ..., Pn) is a tuple of places of degree 1, then for a function f∈K(Chi), f(Pi) can be seen as an element of K. If D is a divisor defined over K, then the Riemann--Roch space RieRoch(D) of D is the K-vector space of dimension k:

RieRoch(D) = { f ∈K(Chi) * | (f) + D ≥0 } ∪{ 0 }.

Now provided D has support disjoint from S = { P1, ..., Pn}, we can define the algebraic geometric code to be the [n, k]q-code:

C = AGcode(S, D) = { (f(P1), ..., f(Pn)), f ∈RieRoch(D) }.

If < f1, ..., fk > is a base of RieRochK(D) as a K-vector space, then a generator matrix for C is: G = pmatrix( f1(P1) & ... & f1(Pn)
vdots & ddots & vdots
fk(P1) & ... & fk(Pn)
). Standard references are [Sti93] and [TV91].

There are two different implementations of the construction of AG--Codes in Magma. The first was implemented by Lancelot Pecquet and is based on the work of Hache [HLB95], [Hac96]. The second approach exploits the divisor machinery for function fields implemented by Florian Hess. In Magma V2.8, only the second implementation is exported. It is intended to rework the Pecquet version to take advantage of the new curve machinery before releasing it.

V2.28, 13 July 2023