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$?

edit retag close merge delete

Sort by » oldest newest most voted

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:

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])

more

Thanks, 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.

( 2022-12-18 13:15:10 +0200 )edit