"Source: Text/Code/CodeFld.text";
"Line: 5349";
"Date: Thu Sep 25 14:47:47 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Code/CodeFld.text, line: 5349
// Example: H165E47 ()
print "Example: H165E47";
ei := GetEchoInput();
SetEchoInput(true);
//no-test
K<a> := GF(4);
C := Dual(HammingCode(K, 3));
C;
I, SMAut := PDSetSimplexCode(K, 3);
I in AllInformationSets(C);
s := #SMAut-1;  s;
[ LinearCode(GeneratorMatrix(C)*SMAut[i]) eq C : i in [1..s+1] ];
IsPermutationDecodeSet(C, I, SMAut, s);
c := C ! [0,1,1,1,1,0,0,0,0,a^2,a^2,a^2,a^2,a,a,a,a,1,1,1,1];
c in C;
u := c;
u[1] := c[1] + a;
u[2] := c[2] + a^2;
u[3] := c[3] + a;
u[4] := c[4] + a^2;
u[5] := c[5] + a;
u[6] := c[6] + a^2;
u in C;
isDecoded, uDecoded := PermutationDecode(C, I, SMAut, s, u);
isDecoded;
uDecoded eq c;
SetEchoInput(ei);
