Ask Your Question

# Grobner bases using sage

Dear group members, Suppose I am working with an ideal in polynomial ring with n variables w.r.t. some ordering say degrevlex. If I compute groebner basis of that ideal, then is there any tool via which one can compute total degree of each of the polynomial in Groebner basis using sage?

edit retag close merge delete

## 1 answer

Sort by » oldest newest most voted

You can simply use list comprehension:

Setting example:

sage: R = PolynomialRing(QQ,3,'x',order='degrevlex') ; R
Multivariate Polynomial Ring in x0, x1, x2 over Rational Field
sage: R.inject_variables()
Defining x0, x1, x2
sage: I = R.ideal([x0*x1-x2^2,x1*x2]) ; I
Ideal (x0*x1 - x2^2, x1*x2) of Multivariate Polynomial Ring in x0, x1, x2 over Rational Field
sage: G = I.groebner_basis() ; G
[x2^3, x0*x1 - x2^2, x1*x2]


Then:

sage: [P.total_degree() for P in G]
[3, 2, 2]

more

## Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

## Stats

Asked: 2016-12-20 02:49:00 -0500

Seen: 89 times

Last updated: Dec 20 '16