// Construct Hermitian code [8,5,3] over GF(4) LIB "brnoeth.lib"; int plevel=printlevel; printlevel=-1; ring s=2,(x,y),lp; list HC=Adj_div(x3+y2+y); // define Hermitian function field y2+y+x3=0 over GF(2) HC=NSplaces(1..2,HC); HC=extcurve(2,HC); // extend to GF(4) def work=HC[1][4]; setring work; intvec G=5; // the rational divisor G = 5*HC[3][1] HC[3]; // closed points // let us see which point do entries of HC[3] refer to def for_points=HC[1][5]; setring for_points; POINTS; // so we will have a one-point code with the point being point at infinity setring work; intvec D=2..9; // D = sum of the rational places no. 2..9 over GF(4) // let us construct the corresponding evaluation AG code : matrix C=AGcode_L(G,D,HC); // here is a linear code of type [8,5,>=3] over GF(4) print(C); // let us check out the basis of L(G) def for_basis=HC[1][2]; setring for_basis; list LG=BrillNoether(G,HC); LG; // let us check that the dimension is the one predicted by Weierstarss semigroup list WS=Weierstrass(1,5,HC); WS; // take a Hermitian curve over GF(49) defined by y7+y=x^8 ring s2=7,(x,y),lp; HC=Adj_div(-x8+y7+y); // define Hermitian function field y^7+y=x^8 over GF(7) HC=NSplaces(1..2,HC); HC=extcurve(2,HC); // extend to GF(49) work=HC[1][4]; setring work; G=20; // the rational divisor G = 20*HC[3][1] HC[3]; // closed points // let us see which point do entries of HC[3] refer to for_points=HC[1][5]; setring for_points; POINTS; int size_P=size(POINTS); // so again we will have a one-point code with the point being point at infinity setring work; D=2..size_P; // D = sum of the rational places no. 2..9 over GF(4) // let us construct the corresponding evaluation AG code : matrix C=AGcode_L(G,D,HC); // here is a linear code of type [344,6,>=324] over GF(49) print(C); // let us check out the basis of L(G) for_basis=HC[1][2]; setring for_basis; list LG=BrillNoether(G,HC); LG; // let us check that the dimension is the one predicted by Weierstarss semigroup list WS=Weierstrass(1,20,HC); WS; // Exercise: construct a Hermitian code over GF(4) with G=HC[3][2]+2*HC[3][3] and D=sum of all other rational points LIB "brnoeth.lib"; int plevel=printlevel; printlevel=-1; ring s3=2,(x,y),lp; HC=Adj_div(x3+y2+y); // define Hermitian function field y2+y+x3=0 over GF(2) HC=NSplaces(1..2,HC); HC=extcurve(2,HC); // extend to GF(4) work=HC[1][4]; setring work; HC[3]; G=0,1,2; // let us see which point do entries of HC[3] refer to for_points=HC[1][5]; setring for_points; POINTS; setring work; D=1,4,5,6,7,8,9; matrix C=AGcode_L(G,D,HC); // here is a linear code of type [7,3,>=4] over GF(4) print(C); // try not disjoint supports D=1,3,4,5,6,7,8,9; matrix C=AGcode_L(G,D,HC); // Basic decoding algorithm of Skorobogatov-Vladut for a code orthogonal to [8,5,3] Hermitian code // which turns out to be Hermitian [8,3,5] code LIB "brnoeth.lib"; int plevel=printlevel; printlevel=-1; ring s4=2,(x,y),lp; HC=Adj_div(x3+y2+y); // Hermitian function field again HC=NSplaces(1..2,HC); HC=extcurve(2,HC); work=HC[1][4]; setring work; G=5; // the rational divisor G = 5*HC[3][1] D=2..9; // D = sum of the rational places no. 2..9 over GF(4) // construct the corresp. residual AG code of type [8,3,>=5] over GF(4) // it is orthogonal to AGcode_L(G,D,HC) matrix C=AGcode_Omega(G,D,HC); // we can correct 1 error and the genus is 1, thus G1 must have degree 2 // and support disjoint from that of D intvec G1=2; list SV=prepSV(G,D,G1,HC); print(SV[1]); // the parity check matrix SV[8+3][1]; // correction capacity of the algorithm SV[8+3][2]; // designed Goppa distance // now we produce 1 error on the zero-codeword : matrix y[1][8]; y[1,3]=a; // and then we decode : print(decodeSV(y,SV)); // Exercise: decode maximum possible number of errors with a code orthogonal to // Hermitian code over GF(3^2) defined with G=15*P_{\infty} LIB "brnoeth.lib"; int plevel=printlevel; printlevel=-1; ring s5=3,(x,y),lp; HC=Adj_div(-x4+y3+y); HC=NSplaces(1..2,HC); HC=extcurve(2,HC); work=HC[1][4]; setring work; G=15; D=2..28; // construct the corresp. residual AG code over GF(9) // it is orthogonal to AGcode_L(G,D,HC) matrix C=AGcode_Omega(G,D,HC); intvec G1=6; list SV=prepSV(G,D,G1,HC); SV[27+3][1]; // correction capacity of the algorithm // so we may correct 3 errors; matrix y[1][27]; y[1,3]=1; y[1,10]=-1; y[1,15]=a; // and then we decode : print(decodeSV(y,SV)); $