Revision history [back]

After you reformulated your question, it seems to me that what you want to do is test "radical membership" of some of the x_i. That's to say: You want to know whether there is some integer n such that x_i^n belongs to the ideal.

Actually, the Gröbner basis of an ideal is not enough to solve that radical membership! In Singular, radical membership can be tested as explained here.

That functionality is provided by some library of Singular. If you want to do the same in Sage, without using a Singular sub-process, you can meanwhile do as follows:

First, we define some ideal, and show that the Gröbner basis does not immediately show that some power of y vanishes:

sage: P.<x,y> = QQ[]
sage: I = P*[x*y^3+y^5, x*y^6]
sage: I.groebner_basis()
[x^3*y^3, x^2*y^4, y^5 + x*y^3]


Next, we import some stuff that is needed to benefit from Singular library functions in Sage, load the library, define the Singular function, and test for radical membership of y in I:

sage: from sage.libs.singular import lib, singular_function
sage: lib("tropical.lib")
skipping text from parameter
1


I don't know where the text "skipping text ..." comes from - anyway, the answer of the function is 1, and that means that indeed some power of y belongs to I. Let us verify it:

sage: y in I
False
sage: y^2 in I
False
sage: y^3 in I
False
sage: y^7 in I
False
sage: y^8 in I
True


However, no power of x belongs to I:

sage: rad_mem(x,I)
0


I hope this is enough to solve your problem. In particular, I believe that looking at some protocol output of slimgb would certainly not solve your problem: As demonstrated above, the Gröbner basis does, in general, not directly provide the radical membership information for variables).

Also, as much as I know, there is no option to make slimgb or std or another Singular function make print the polynomials being considered.