ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 18 Dec 2022 13:15:10 +0100Linear Independence in Quotients of Polynomial Ringshttps://ask.sagemath.org/question/65386/linear-independence-in-quotients-of-polynomial-rings/Consider the following:
K = GF(2) # can be an arbitrary field
R.<a,b> = PolynomialRing(K)
I = R.ideal(a^2-1,a*b)
Q = R.quo(I)
Now $1,a,b$ are linearly dependent in `Q` because $b=0$ (in `Q`).
Is there an elegant way to check this with Sage, especially when the ideals get more complicated? That is: Is there a method to check whether $1,a_1,\dots,a_n$ are linearly (in)dependent in a given quotient $K[a_1,\dots,a_n]/I$?Sat, 17 Dec 2022 18:14:06 +0100https://ask.sagemath.org/question/65386/linear-independence-in-quotients-of-polynomial-rings/Answer by Max Alekseyev for <p>Consider the following:</p>
<pre><code>K = GF(2) # can be an arbitrary field
R.<a,b> = PolynomialRing(K)
I = R.ideal(a^2-1,a*b)
Q = R.quo(I)
</code></pre>
<p>Now $1,a,b$ are linearly dependent in <code>Q</code> because $b=0$ (in <code>Q</code>).</p>
<p>Is there an elegant way to check this with Sage, especially when the ideals get more complicated? That is: Is there a method to check whether $1,a_1,\dots,a_n$ are linearly (in)dependent in a given quotient $K[a_1,\dots,a_n]/I$?</p>
https://ask.sagemath.org/question/65386/linear-independence-in-quotients-of-polynomial-rings/?answer=65389#post-id-65389Use order that depends on degree (eg. degrevlex), compute Grobner basis wrt such order, and check if it contains any polynomials of degree 1. Any such polynomial will gives a desired linear combination:
K = GF(2) # can be an arbitrary field
R.<a,b> = PolynomialRing(K,order='degrevlex')
I = R.ideal(a^2-1,a*b)
print([f for f in I.groebner_basis() if f.degree()==1])
Sun, 18 Dec 2022 03:18:38 +0100https://ask.sagemath.org/question/65386/linear-independence-in-quotients-of-polynomial-rings/?answer=65389#post-id-65389Comment by Thrash for <p>Use order that depends on degree (eg. degrevlex), compute Grobner basis wrt such order, and check if it contains any polynomials of degree 1. Any such polynomial will gives a desired linear combination:</p>
<pre><code>K = GF(2) # can be an arbitrary field
R.<a,b> = PolynomialRing(K,order='degrevlex')
I = R.ideal(a^2-1,a*b)
print([f for f in I.groebner_basis() if f.degree()==1])
</code></pre>
https://ask.sagemath.org/question/65386/linear-independence-in-quotients-of-polynomial-rings/?comment=65399#post-id-65399Thanks, I've already played with that, too. In this case this should be equivalent to the fact that if we define all the multiplications, that is $a_ia_j - \dots$ (in my example one would have to add something of the form $b^2 - \dots$ to the ideal), then the GrÃ¶bner basis should have the length 3 (in my example) if and only if $1,a,b$ are linearly independent in the related quotient. I just wonder if there is a faster method.Sun, 18 Dec 2022 13:15:10 +0100https://ask.sagemath.org/question/65386/linear-independence-in-quotients-of-polynomial-rings/?comment=65399#post-id-65399