# Rewriting linear combination of Groebner basis in terms of original terms

Let assume I have an ideal given by

x,y,z = QQ['x,y,z'].gens()
I = ideal(f1,f2,f3)
B = I.groebner_basis()


where f1,f2,f3 are just polynomials in variables x,y,z. Let's say B=(g1,g2).

Let's assume I happen to take a polynomial,h, that is in my ideal I. Then doing polynomial division, I can write

h=h1*g1+h2*g2


Basically I can write h as a linear combination of the elements in my Groebner basis. Is there a function that converts a linear combination in terms of Groebner to linear combination of terms in my ideal I? i.e.I can write

h=q1*f1+q2*f2+q3*f3

edit retag close merge delete

Sort by » oldest newest most voted

This answer ignores completely the Groebner basis. Just "lift" the corresponding element.

In an example:

R.<x,y,z> = QQ[]
f1, f2, f3 = (x + y + z)^2, x*y + y*z + z*x, x^3 + y^3 + z^3
J = R.ideal([f1, f2, f3])
h = x*y*z
print("Is h in J? {}".format(h in J))
q1, q2, q3 = h.lift(J)
print(f"q1 = {q1}\nq2 = {q2}\nq3 = {q3}")


This gives:

Is h in J? True
q1 = -1/3*x - 1/3*y - 1/3*z
q2 = x + y + z
q3 = 1/3


We have

sage: h == f1*q1 + f2*q2 + f3*q3
True


The line answering the question is q1, q2, q3 = h.lift(J).

more

This might be a harder question but what if I have something that is not in the Ideal? Is there a function that extracts the Ideal part? I believe I will need Groebner basis for that. Basically, the ideal part is when I divide out by the Groebner basis and the remainder is the non-Ideal part. Just wondering if there was a function that immediately does this.

( 2020-09-04 01:47:11 +0200 )edit