### 11.5.2 Gröbner reduction

The greduce command finds a polynomial modulo I, where I is an ideal as in Section 11.5.1.

- greduce takes three arguments mandatory arguments and three optional arguments:
  - P, a multivariate polynomial.
  - gbasis, a vector made of polynomials which is supposed to be a Gröbner basis.
  - vars, and a vector of variable names.
  - Optionally, the same ordering options and CoCoA options as gbasis (see Section 11.5.1).
- greduce(P,gbasis,vars⟨,options⟩) returns the reduction of P with respect to the Gröbner basis gbasis. It is 0 if and only if the polynomial belongs to the ideal.

#### Examples

greduce(x*y-1,[x^2-y^2,2*x*y-y^2,y^3],[x,y])

1
2

y2−1

that is to say xy−1≡ 1/2y2−1(mod I ) where I is the ideal generated by the Gröbner basis [x2−y2,2xy−y2,y3], because 1/2y2−1 is the Euclidean division remainder of xy−1 by G2=2x y−y2.

greduce(x1^2*x3^2,[x3^3-1,-x2^2-x2*x3-x3^2,x1+x2+x3],[x1,x2,x3],tdeg)

x2 |  |  |  |  |  |  |  |  |  |