Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Restriction of scalars for free modules

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`

Restriction of scalars for free modules

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`