# Express Groebner basis in terms of original basis

Working with a polynomial ring $R$, if I have an ideal generated by a set of polynomials $f_i$ (taking two for concreteness), I can obtain a Groebner basis $g_j$ by the commands

I = R.ideal([f1, f2])
g = I.groebner_basis()


What I want to do is express the Groebner basis in terms of the original basis, i.e. $g_j = \sum_i a_{ij} f_i$. How can I accomplish this in Sage? My understanding is that such an expression is calculated implicitly when the Groebner basis is calculated, so perhaps it is possible to recover it directly from the algorithm.

edit retag close merge delete

Sort by » oldest newest most voted

The simplest way is to do it during the Gröbner basis computation, e.g. in Buchberger's algorithm. It's possible to implement this in a few lines in SageMath.

As an alternative you can use the lift method on a polynomial, passing it a list of generators or an ideal:

sage: R.<x,y> = QQ[]
sage: f = x^2 - y^2
sage: f.lift(R.ideal([x, y]))
[x, -y]


Keep in mind that the solution is generally not unique due to the existence of syzygies between the generators.

more

I think the quick way for this is to carry around marker variables, say b1,b2 and then compute the groebner basis of the ideal (b1-f1,b2-f2), making sure you have a block order that prioritizes the original variables (that occur in f1,f2). You can then see in the resulting basis from the part of the polynomials in the b1,b2 how your original generators were combined. It's comparable to the trick of augmenting a matrix for Gaussian elimination to find the transformation that gets you there (i.e., the inverse of the matrix).

more

This is usable but not very convenient when you get e.g. b1^3 in the result; this is more suited for a subalgebra test.

( 2020-04-01 17:37:01 -0500 )edit

It may not be convenient but it does exactly reflect what happens: to obtain that relation, you'd need to take f1^3 in terms of your original basis.

( 2020-04-06 15:21:37 -0500 )edit