"Source: Text/Code/CodeAlG.text";
"Line: 328";
"Date: Tue Jun 27 09:43:58 2017";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Code/CodeAlG.text, line: 328
// Example: H166E3 ()
print "Example: H166E3";
ei := GetEchoInput();
SetEchoInput(true);
q := 8;
F<a> := GF(q);
PS<x,y,z> := ProjectiveSpace(F, 2);
W := x^3*y + y^3*z + x*z^3;
Cv := Curve(PS, W);
FF<X,Y> := FunctionField(Cv);
Pl := Places(Cv, 1);
plc := Place(Cv ! [0,1,0]);
P := [ Pl[i] : i in [1..#Pl] | Pl[i] ne plc ];
G := 11*plc;
C := AGDualCode(P, G);    

v := Random(C);
rec_vec := v;
rec_vec[Random(1,Length(C))] +:= Random(F);
res := AGDecode(C, v, 4*plc);
res eq v;
assert $1;
SetEchoInput(ei);
