First time here? Check out the FAQ!

Ask Your Question
4

Multivariate Polynomials over Rational Function Fields

asked 14 years ago

Sameer Agarwal gravatar image

updated 13 years ago

Kelvin Li gravatar image

Is it possible to define multivariate polynomials where the coefficients lie in a rational function field and do Groebner basis computations on them? Maple, Reduce and Axiom support this. For example I would like to be able to compute the Groebner basis of the polynomials

{v * x^2 + y, u* x * y + y^2}

where the polynomials belong to the ring Q(u,v)[x,y].

I tried the following

B.<u,v> = PolynomialRing(QQ, 'u', 'v')
R.<x,y> = PolynomialRing(B, 'x', 'y')
I = R.ideal(v * x^2 + y, u* x * y + y^2) 
g = I.groebner_basis()

This fails with the error

TypeError: Can only reduce polynomials over fields.
Preview: (hide)

2 Answers

Sort by » oldest newest most voted
6

answered 14 years ago

William Stein gravatar image

Make u and v be in the Fraction field:

sage: B.<u,v> = Frac(QQ['u,v'])
sage: R.<x,y> = PolynomialRing(B, 'x', 'y')
sage: I = R.ideal(v * x^2 + y, u* x * y + y^2) 
sage: g = I.groebner_basis()
sage: g
[y^3 + u^2/v*y^2, x^2 + 1/v*y, x*y + 1/u*y^2]
Preview: (hide)
link

Comments

1

Thanks, that works perfectly. Now my quest for the Elimination ideal I2 = I.elimination_ideal([x]) fails with TypeError: Cannot call Singular function 'eliminate' with ring parameter of type '<class 'sage.rings.polynomial.multi_polynomial_ring.mpolynomialring_polydict_do\="" main'="">'

Sameer Agarwal gravatar imageSameer Agarwal ( 14 years ago )
1

answered 14 years ago

niles gravatar image

When I try this, the error I get is a little more informative:

sage: I2 = I.elimination_ideal([x])
...
TypeError: Cannot call Singular function 'eliminate' with ring parameter of type 
'<class 'sage.rings.polynomial.multi_polynomial_ring.MPolynomialRing_polydict_domain'>'

The function eliminte comes from

sage: eliminate = sage.libs.singular.ff.eliminate

which is a wrapper for the Singular function and is supposed to convert Sage's rings to rings that Singular understands . . . however it seems that this wrapper does not understand the _polydict_domain rings. Perhaps one could convert R to a ring that the wrapper does understand (or file this as a bug in the wrapper and fix it). Checking, I see that there is a ring type MPolynomialRing_libsingular, but it only allows base rings from a very small list (like ZZ and finite fields).

Maybe someone who knows more about the Singular interface can help here?

Preview: (hide)
link

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 14 years ago

Seen: 1,980 times

Last updated: Aug 26 '10