CosetCode( C, w )
CosetCode
returns the coset of a code C with respect to word w.
w must be of the codeword type. Then, w is added to each codeword of
C, yielding the elements of the new code. If C is linear and w is
an element of C, the new code is equal to C, otherwise the new code
is an unrestricted code.
Generating a coset is also possible by simply adding the word w to C. See Operations for Codes.
gap> H := HammingCode(3, GF(2)); a linear [7,4,3]1 Hamming (3,2) code over GF(2) gap> c := Codeword("1011011");; c in H; false gap> C := CosetCode(H, c); a (7,16,3)1 coset code gap> List(Elements(C), el-> Syndrome(H, el)); [ [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ] ] # All elements of the coset have the same syndrome in H
GAP 3.4.4