# 33.22 Operations for Row Space Cosets

Comparison of Row Space Cosets

`C1 = C2` :

returns `true` if the two row space cosets C1, C2 are equal, and `false` otherwise. Note that equal cosets need not have equal representatives (see Row Space Cosets).

`C1 < C2` :

returns `true` if the row space coset C1 is smaller than the row space coset C2, and `false` otherwise. This ordering is defined by comparison of canonical representatives.

Arithmetic Operations for Row Space Cosets

`C1 + C2` :

If C1 and C2 are row space cosets that belong to the same quotient space, the result is the row space coset that is the sum resp. the difference of these vectors. Otherwise an error is signalled.

`s * C` :

returns the row space coset that is the product of the scalar s and the row space coset C, where s must be an element of the ground field of the vector space that defines C.

Membership Test for Row Space Cosets

`v in C` :

returns `true` if the vector `v` is an element of the row space coset C, and false otherwise.

```    gap> v:= GF(2)^2; v.name:= "v";;
RowSpace( GF(2), [ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ] ] )
gap> u:= Subspace( v, [ [ 1, 1 ] * Z(2) ] ); u.name:="u";;
Subspace( v, [ [ Z(2)^0, Z(2)^0 ] ] )
gap> f:= v / u;
v / [ [ Z(2)^0, Z(2)^0 ] ]
gap> elms:= Elements( f );
[ ([ 0*Z(2), 0*Z(2) ]+u), ([ 0*Z(2), Z(2)^0 ]+u) ]
gap> 2 * elms[2];
([ 0*Z(2), 0*Z(2) ]+u)
gap> elms[2] + elms[1];
([ 0*Z(2), Z(2)^0 ]+u)
gap> [ 1, 0 ] * Z(2) in elms[2];
true
gap> elms[1] = elms[2];
false ```

GAP 3.4.4
April 1997