Syndrome( C, c )
Syndrome returns the syndrome of word c with respect to a code
C. c is a word of the vector space of C. If c is an element of
C, the syndrome is a zero vector. The syndrome can be used for looking
up an error vector in the syndrome table (see SyndromeTable) that is
needed to correct an error in c.
A syndrome is not defined for non-linear codes. Syndrome then returns
an error.
gap> C := HammingCode(4);
a linear [15,11,3]1 Hamming (4,2) code over GF(2)
gap> v := CodewordNr( C, 7 );
[ 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 ]
gap> Syndrome( C, v );
[ 0 0 0 0 ]
gap> Syndrome( C, "000000001100111" );
[ 1 1 1 1 ]
gap> Syndrome( C, "000000000000001" );
[ 1 1 1 1 ] # the same syndrome\: both codewords are in the same
# coset of C
GAP 3.4.4