ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 15 Jan 2015 15:44:08 -0600Linear subspace of polynomial ringhttp://ask.sagemath.org/question/10964/linear-subspace-of-polynomial-ring/I am trying to compute a QQ-linear subspace W of a polynomial ring R over QQ. However, R does not seem to have a method like subspace.
So what I would like to do is
R=PolynomialRing(QQ,'x',3)
x=R.gens()
W=R.subspace([x[0]^2,3*x[1]+x[0]])
For further purposes I still want to apply functions defined on the ring R to elements of W but also apply linear algebra methods (linear maps, eigenspaces, ...) to W.
I am sorry to bother you with this, it should be very easy, but I did not find a way to do it.Mon, 27 Jan 2014 00:12:44 -0600http://ask.sagemath.org/question/10964/linear-subspace-of-polynomial-ring/Answer by tmonteil for <p>I am trying to compute a QQ-linear subspace W of a polynomial ring R over QQ. However, R does not seem to have a method like subspace.
So what I would like to do is</p>
<pre><code>R=PolynomialRing(QQ,'x',3)
x=R.gens()
W=R.subspace([x[0]^2,3*x[1]+x[0]])
</code></pre>
<p>For further purposes I still want to apply functions defined on the ring R to elements of W but also apply linear algebra methods (linear maps, eigenspaces, ...) to W.</p>
<p>I am sorry to bother you with this, it should be very easy, but I did not find a way to do it.</p>
http://ask.sagemath.org/question/10964/linear-subspace-of-polynomial-ring/?answer=15969#post-id-15969There should be a way, since the category framework knows that `R` is a vector space:
sage: R.categories()
[Join of Category of unique factorization domains and Category of commutative algebras over Rational Field,
Category of unique factorization domains,
Category of gcd domains,
Category of integral domains,
Category of domains,
Category of commutative algebras over Rational Field,
Category of algebras over Rational Field,
Category of commutative rings,
Category of rings,
Category of rngs,
Category of semirings,
Category of monoids,
Category of semigroups,
Category of magmas,
Category of vector spaces over Rational Field,
Category of modules over Rational Field,
Category of bimodules over Rational Field on the left and Rational Field on the right,
Category of right modules over Rational Field,
Category of left modules over Rational Field,
Category of commutative additive groups,
Category of commutative additive monoids,
Category of commutative additive semigroups,
Category of additive magmas,
Category of sets,
Category of sets with partial maps,
Category of objects]
sage: R in VectorSpaces(QQ)
True
But then, i do not know what explicit things i can do with that... It could be nice to inherits all features of a vector space. I will ping specialists to explain what can be done.
Mon, 27 Jan 2014 02:28:38 -0600http://ask.sagemath.org/question/10964/linear-subspace-of-polynomial-ring/?answer=15969#post-id-15969Comment by bgillespie for <p>There should be a way, since the category framework knows that <code>R</code> is a vector space:</p>
<pre><code>sage: R.categories()
[Join of Category of unique factorization domains and Category of commutative algebras over Rational Field,
Category of unique factorization domains,
Category of gcd domains,
Category of integral domains,
Category of domains,
Category of commutative algebras over Rational Field,
Category of algebras over Rational Field,
Category of commutative rings,
Category of rings,
Category of rngs,
Category of semirings,
Category of monoids,
Category of semigroups,
Category of magmas,
Category of vector spaces over Rational Field,
Category of modules over Rational Field,
Category of bimodules over Rational Field on the left and Rational Field on the right,
Category of right modules over Rational Field,
Category of left modules over Rational Field,
Category of commutative additive groups,
Category of commutative additive monoids,
Category of commutative additive semigroups,
Category of additive magmas,
Category of sets,
Category of sets with partial maps,
Category of objects]
sage: R in VectorSpaces(QQ)
True
</code></pre>
<p>But then, i do not know what explicit things i can do with that... It could be nice to inherits all features of a vector space. I will ping specialists to explain what can be done.</p>
http://ask.sagemath.org/question/10964/linear-subspace-of-polynomial-ring/?comment=25537#post-id-25537Did anything ever come out of this inquiry? I've been poking around all day trying to figure out how to do this, and I'm starting to suspect that it just isn't implemented yet. At the moment, it looks like only special vector space implementations are infinite-dimensional, while the standard implementation falls back on FreeModule, which requires a finite dimension.
Interested in any updates that arise.Thu, 15 Jan 2015 15:44:08 -0600http://ask.sagemath.org/question/10964/linear-subspace-of-polynomial-ring/?comment=25537#post-id-25537