Is it safe to say that

R = PolynomialRing(QQ, 'X,Y')

defines a ring over  Q  in two variables, in which

x,y = R.gens()

sets x & y to be the generators?  If this is so, then what exactly is
the role of 'X,Y' ?  Just to list the number of generators or what?
Could we just as well have said

R = PolynomialRing(QQ, 'A,B')
x,y = R.gens()

?

Thanks in advance!

John


On May 10, 2:22 pm, Sebastian Ramacher <s.ramac...@gmx.at> wrote:
> On 05/10/2011 07:59 PM, MathLynx wrote:
>
> > How do I detect the degree of a polynomial (say over Q) in one or
> > several variables?
>
> > x = var('x');
> > B = x^2;
> > B.deg()
>
> > gives an error.  How about
>
> > x,y = var('x , y');
> > B = x^2 + y^3;
>
> > and we want degree of B with respect to x? (presuming wrt y is the
> > same)
>
> Are you looking for something like that?
>
> >>> R = PolynomialRing(QQ, 'X,Y')
> >>> x,y = R.gens()
> >>> (x**2).degree()
> 2
> >>> (x**2+y**3).degree(x)
>
> 2
>
> Kind regards,

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to