[GAP Forum] How to determine that a vector is in a vector space or not?

Max Horn max at quendi.de
Sun Jan 6 18:10:28 GMT 2013


Dear Jianrong,

On 04.01.2013, at 10:10, 李建荣 wrote:

> Dear Forum,
> 
> Let v be a vector and V a vector space. Is there some function in GAP which can determine that v is in V or not? I search the manual of GAP but did not find one. Thank you very much. 

If a is a vector and V a vectorspace, you can simply write

 a in V

to get a boolean true/false value indicating what you want. For example:

gap> V:=VectorSpace(GF(3), [ [1,0,0,0], [0,1,0,1], [1,-1,0,0] ] * Z(3)^0);
<vector space over GF(3), with 3 generators>
gap> [1,0,0,1] * Z(3)^0 in V;
true
gap> [1,0,1,0] * Z(3)^0 in V;
false


Hope that helps,
Max


More information about the Forum mailing list