# Change base Field of Vector Space

Given a number field $L$, I can construct a vector space $V$ over the rational field as follows :

V,fr,to = L.vector_space()

Now, if I want to define the same vector space over a subfield of $L$, say $K$ rather than the rational field, is there any command.

edit retag close merge delete

Sort by ยป oldest newest most voted

This is covered in the documentation on relative number fields.

Bottom up construction:

sage: K.<i> = QuadraticField(-1)
sage: R.<x> = PolynomialRing(K)
sage: L_over_K.<a> = K.extension(x^2 - 2)
sage: V,from_V,to_V = L_over_K.relative_vector_space()
sage: V.base_field() == K
True
sage: V.dimension()
2
sage: W,from_W,to_W = L_over_K.absolute_vector_space()
sage: W.base_field() == QQ
True
sage: W.dimension()
4


Top down construction:

sage: L.<i,a> = NumberField([x^2 + 1, x^2 - 2])
sage: L_over_K.<ii,aa> = L.relativize(i)
sage: K = L_over_K.base_field()
sage: V,from_V,to_V = L_over_K.relative_vector_space()
sage: V.base_field() == K
True
sage: V.dimension()
2
sage: W,from_W,to_W = L_over_K.absolute_vector_space()
sage: W.base_field() == QQ
True
sage: W.dimension()
4

more