# Revision history [back]

You may do something like:

sage: x,y,z = QQ['x,y,z'].gens()
sage: I = ideal(x^5 + y^4 + z^3 - 1,  x^3 + y^3 + z^2 - 1)
sage: B = I.groebner_basis()
sage: B
[y^6 + x*y^4 + 2*y^3*z^2 + x*z^3 + z^4 - 2*y^3 - 2*z^2 - x + 1,
x^2*y^3 - y^4 + x^2*z^2 - z^3 - x^2 + 1,
x^3 + y^3 + z^2 - 1]


This example was taken from the documentation.

You may do something like:

sage: x,y,z = QQ['x,y,z'].gens()
sage: I = ideal(x^5 + y^4 + z^3 - 1,  x^3 + y^3 + z^2 - 1)
sage: B = I.groebner_basis()
sage: B
[y^6 + x*y^4 + 2*y^3*z^2 + x*z^3 + z^4 - 2*y^3 - 2*z^2 - x + 1,
x^2*y^3 - y^4 + x^2*z^2 - z^3 - x^2 + 1,
x^3 + y^3 + z^2 - 1]


This example was taken from the documentation on documentationIdeals in multivariate polynomial rings.

You may do something like:

sage: R = QQ['x,y,z']
sage: R
Multivariate Polynomial Ring in x, y, z over Rational Field
sage: x,y,z = QQ['x,y,z'].gens()
R.gens()
sage: I = ideal(x^5 + y^4 + z^3 - 1,  x^3 + y^3 + z^2 - 1)
sage: B = I.groebner_basis()
sage: B
[y^6 + x*y^4 + 2*y^3*z^2 + x*z^3 + z^4 - 2*y^3 - 2*z^2 - x + 1,
x^2*y^3 - y^4 + x^2*z^2 - z^3 - x^2 + 1,
x^3 + y^3 + z^2 - 1]


This example was taken from the documentation on Ideals in multivariate polynomial rings