Suppose X is an irreducible plane curve. Let S be a sequence of places of X having degree 1 and let D be a divisor of X whose support is disjoint from the support of S. The function returns the (weakly) algebraic--geometric code obtained by evaluating functions of the Riemann--Roch space of D at the points of S. The degree of D need not be bounded by the cardinality of S.
Construct the dual of the algebraic geometric code constructed from the sequence of places S and the divisor D, which corresponds to a differential code. In order to take advantage of the algebraic geometric structure, the dual must be constructed in this way, and not by directly calling the function Dual.
Given the prime power q and a positive integer r, construct a Hermitian code C with respect to the Hermitian curve X = x(q + 1) + y(q + 1) + z(q + 1) defined over GF(q2). The support of C consists of all places of degree one of X over GF(q2), with the exception of the place over P = (1:1:0). The divisor used to define a Riemann--Roch space is r * P.
> F<w> := GF(16); > P2<x,y,z> := ProjectiveSpace(F, 2); > f := x^3+x^2*z+y^3+y^2*z+z^3; > X := Curve(P2, f); > g := Genus(X); > g; 1 > places1 := Places(X, 1); > #places1; 25
We now need to find an appropriate divisor D. Since we require a code of dimension k=9 we take the divisor corresponding to a place of degree k + g - 1 = 9 (g is the genus of the curve).
> found, place_k := HasPlace(X, 9+g-1); > D := DivisorGroup(X) ! place_k; > C := AlgebraicGeometricCode(places1, D); > C; [25, 9] Linear Code over GF(2^4) Generator matrix: [1 0 0 0 0 0 0 0 0 w^9 w w^8 0 w^5 1 1 w^5 w^7 w^8 w^10 w^4 w^11 w^5 w^10 w^8] [0 1 0 0 0 0 0 0 0 w^4 w^5 1 w^10 w^4 w^11 w^12 0 1 w^2 w^4 w^6 w^4 w^5 w^14 w^4] [0 0 1 0 0 0 0 0 0 w^5 w^13 w^7 w^10 w^7 w^5 w^14 w^14 w 1 w^10 w^9 1 0 w^5 w] [0 0 0 1 0 0 0 0 0 w^8 w^3 w^3 w^12 w^7 w^10 w w^6 0 w^7 w^10 w^4 w^9 w^14 w^8 w^12] [0 0 0 0 1 0 0 0 0 w^8 1 w^4 w^7 w^5 w w^8 w w^5 w w^13 0 w^14 w^14 w^14 w^6] [0 0 0 0 0 1 0 0 0 1 1 w^12 w^14 w^9 w^10 w^6 w^6 w^7 w^10 w^4 w^3 w^13 w^13 w^3 w^4] [0 0 0 0 0 0 1 0 0 w w w^10 w^4 w^12 w w^13 w^4 w w^2 w^3 w^3 w^12 w^10 w^5 w^13] [0 0 0 0 0 0 0 1 0 w^13 w^6 w^12 w^2 w^3 w^7 w^3 w^4 w^14 w^4 w^11 w^4 w w^6 w^4 w^14] [0 0 0 0 0 0 0 0 1 0 w^11 w w^7 w^12 w^4 w^3 w^6 w^12 w^3 w^13 w^2 w^11 w^10 w^3 1] > MinimumDistance(C); 16
> k<w> := GF(16); > P2<x,y,z> := ProjectiveSpace(k, 2); > f := (y^2+x*y+x^2)*z^3+y^3*z^2+(x*y^3+x^2*y^2+x^3*y+x^4)*z+x^3*y^2+x^4*y+x^5; > X := Curve(P2, f); > g := Genus(X); > g; 4
We find all the places of degree 1.
> places1 := Places(X, 1); > #places1; 45
We choose as our divisor 15 * P1, where P1 is a place of degree 1. Before applying the AG-Code construction we must remove P1 from the set of places of degree 1.
> P1 := Random(places1); > Exclude(~places1, P1); > #places1; 44 > D := 15 * (DivisorGroup(X) ! P1); > C := AlgebraicGeometricCode(places1, D); > C:Minimal; [44, 12] Linear Code over GF(2^4) > MinimumWeight(C); 29