Previous Up Next

5.32.3  Test if a polynomial or list of polynomials belongs to an ideal given by a Gröbner basis: in_ideal

The in_ideal command takes three mandatory arguments and one optional argument. The mandatory arguments are a polynomial (or list of polynomials), a list giving a Gröbner basis, and the list of polynomial variables. The optional fourth argument can be an optional argument from gbasic (see section 5.32.1), such as plex or tdeg. By default it will be plex. If a Gröbner basis is computed with a different order from the default, then in_ideal must use the same order.
in_basis returns the value true (1) or false (0), or a list of trues and falses, indicating whether or not the polynomial(s) in the first argument are in the ideal generated by the Gröbner basis in the second argument, using the variables from the third argument.
Input:

in_ideal((x+y)^2,[y^2,x^2 + 2*x*y],[x,y])

Output:

1

Input:

in_ideal([(x+y)^2,x+y],[y^2,x^2+2*x*y],[x,y])

Output:

[1,0]

Input:

in_ideal(x+y,[y^2,x^2+2*x*y],[x,y])

Output:

0

Previous Up Next