# Revision history [back]

Suppose I have a free module M over QQ[x]. How do I obtain the underlying QQ vector space? FreeModule does not have this coercion:

sage: R = PolynomialRing(QQ,'x')
sage: M = FreeModule(R,3)
sage: M in VectorSpaces(QQ)
False


And CombinatorialFreeModule only takes already subcategories of QQ-vector spaces:


sage: M = CombinatorialFreeModule(QQ, ['a','b','c'], category=Modules(R))
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
....
ValueError: Subcategory of Category of vector spaces with basis over Rational Field required; got Category of modules over Univariate Polynomial Ring in x over Rational Field


Suppose I have a free module M over QQ[x]. How do I obtain the underlying QQ vector space? FreeModule does not have this coercion:

sage: R = PolynomialRing(QQ,'x')
sage: R in CommutativeAlgebras(QQ)
True
sage: M = FreeModule(R,3)
sage: M in VectorSpaces(QQ)
False


And CombinatorialFreeModule only takes already subcategories of QQ-vector spaces:


sage: M = CombinatorialFreeModule(QQ, ['a','b','c'], category=Modules(R))
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
....
ValueError: Subcategory of Category of vector spaces with basis over Rational Field required; got Category of modules over Univariate Polynomial Ring in x over Rational Field