ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 03 Feb 2019 15:19:08 -0600Basis of quotient ring as a vector spacehttps://ask.sagemath.org/question/45292/basis-of-quotient-ring-as-a-vector-space/I'm curious how I might get a k-basis for a quotient ring of the form R = k[x_1,...x_n] / I, where I is some ideal in the polynomial ring.
For example, given I = {x^3}, and R = Q[x]/I, I would want Sage to give me the vector space basis {1,x,x^2}.
Any help is appreciated!! :) Sun, 03 Feb 2019 12:59:06 -0600https://ask.sagemath.org/question/45292/basis-of-quotient-ring-as-a-vector-space/Answer by rburing for <p>I'm curious how I might get a k-basis for a quotient ring of the form R = k[x_1,...x_n] / I, where I is some ideal in the polynomial ring.</p>
<p>For example, given I = {x^3}, and R = Q[x]/I, I would want Sage to give me the vector space basis {1,x,x^2}.</p>
<p>Any help is appreciated!! :) </p>
https://ask.sagemath.org/question/45292/basis-of-quotient-ring-as-a-vector-space/?answer=45293#post-id-45293 I.normal_basis()Sun, 03 Feb 2019 13:48:07 -0600https://ask.sagemath.org/question/45292/basis-of-quotient-ring-as-a-vector-space/?answer=45293#post-id-45293Comment by rburing for <pre><code> I.normal_basis()
</code></pre>
https://ask.sagemath.org/question/45292/basis-of-quotient-ring-as-a-vector-space/?comment=45297#post-id-45297You're welcome! If you want to know the algorithm behind it, I think it is done by using a Groebner basis $I = \langle g_1, \ldots, g_s \rangle$: take all the monomials which are not in $LM(I) = \langle LM(g_1), \ldots, LM(g_s) \rangle$ (at least this is a way to do it).Sun, 03 Feb 2019 15:19:08 -0600https://ask.sagemath.org/question/45292/basis-of-quotient-ring-as-a-vector-space/?comment=45297#post-id-45297Comment by dd0dd0 for <pre><code> I.normal_basis()
</code></pre>
https://ask.sagemath.org/question/45292/basis-of-quotient-ring-as-a-vector-space/?comment=45295#post-id-45295Thanks! This works perfectlySun, 03 Feb 2019 14:28:51 -0600https://ask.sagemath.org/question/45292/basis-of-quotient-ring-as-a-vector-space/?comment=45295#post-id-45295