[sage-support] Re: how to keep up to a certain degree of a multivariate polynomial?

2013-06-04 Thread Simon King
Hi! On 2013-06-04, Sam math hes...@gmail.com wrote: How do I do this for a multivariate polynomial? It says O(.) is not defined... R.x,y = PolynomialRing(QQ) f = x^3*y^3 + x^2 * y^4 + x*y + x + y + 1 How can I chop this polynomial up to a certain degree of x and y? I.e. I want to keep up

[sage-support] Re: how to keep up to a certain degree of a multivariate polynomial?

2013-06-04 Thread john_perry_usm
Here's a different approach, which is more efficient, but poses its own challenges: sage: I = R.ideal(x^2) sage: Q = R.quo(I) sage: f = Q(x^3*y^3 + x^2*y^4 + x*y + x + y + 1) sage: f xbar*ybar + xbar + ybar + 1 So, the variables look different, and with reason. But: sage: %timeit

Re: [sage-support] Re: how to keep up to a certain degree of a multivariate polynomial?

2013-06-04 Thread Stephen Montgomery-Smith
On Monday, June 3, 2013 7:12:34 PM UTC-5, Sam math wrote: I have a multivariate polynomial and want to keep only up to a certain degree. I already know how to do this for the univariate case. For 1 variable, I'd do: R.x = PolynomialRing(QQ) f = x^4 + x^2 + x^3 + x

[sage-support] Re: how to keep up to a certain degree of a multivariate polynomial?

2013-06-04 Thread leif
Stephen Montgomery-Smith wrote: On Monday, June 3, 2013 7:12:34 PM UTC-5, Sam math wrote: I have a multivariate polynomial and want to keep only up to a certain degree. I already know how to do this for the univariate case. For 1 variable, I'd do: R.x = PolynomialRing(QQ)