UnionCode( C_1, C_2 )
UnionCode returns the union of codes C_1 and C_2. This code
consists of the union of all codewords of C_1 and C_2 and all
linear combinations. Therefore this function works only for linear
codes. The function AddedElementsCode can be used for non-linear codes,
or if the resulting code should not include linear combinations. See
AddedElementsCode. If both arguments are cyclic, the result is also
cyclic.
gap> G := GeneratorMatCode([[1,0,1],[0,1,1]]*Z(2)^0, GF(2));
a linear [3,2,1..2]1 code defined by generator matrix over GF(2)
gap> H := GeneratorMatCode([[1,1,1]]*Z(2)^0, GF(2));
a linear [3,1,3]1 code defined by generator matrix over GF(2)
gap> U := UnionCode(G, H);
a linear [3,3,1]0 union code
gap> c := Codeword("010");; c in G;
false
gap> c in H;
false
gap> c in U;
true
GAP 3.4.4