Parent of polynomial evaluation dependent on names of variables?

6 views
Skip to first unread message

Nils Bruin

unread,
Jun 11, 2010, 3:07:46 PM6/11/10
to sage-devel
I would expect that when one evaluates a polynomial, only the coercion
properties of the *base ring* of the polynomial ring relative to the
ring of definition of the evaluation point are important, but the
example below gave me an unexpected negative answer.

The fact that R is has an automatic coercion to S in the first example
but not in the second seems to affect the result. I would have
expected the result of the second example in both cases.

sage: R=QQ['x']
sage: S=QQ['x','y']
sage: h=S.0^2
sage: parent(h(R.0,0))
Multivariate Polynomial Ring in x, y over Rational Field

sage: R=QQ['x']
sage: S=QQ['u','v']
sage: h=S.0^2
sage: parent(h(R.0,0))
Univariate Polynomial Ring in x over Rational Field

John Cremona

unread,
Jun 11, 2010, 3:44:40 PM6/11/10
to sage-...@googlegroups.com
Nils,

See http://trac.sagemath.org/sage_trac/ticket/8502. I had found that,
depending on the base ring, the result of evaluating all the variables
was sometimes in the coefficient ring and sometimes a (constant)
polynomial. So I fixed it -- I think. But the result is clearly not
perfect.

John

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

Nils Bruin

unread,
Jun 11, 2010, 3:55:54 PM6/11/10
to sage-devel
On Jun 11, 12:44 pm, John Cremona <john.crem...@gmail.com> wrote:
> Nils,
>
> Seehttp://trac.sagemath.org/sage_trac/ticket/8502.  I had found that,
> depending on the base ring, the result of evaluating all the variables
> was sometimes in the coefficient ring and sometimes a (constant)
> polynomial.  So I fixed it -- I think.  But the result is clearly not
> perfect.

I don't think that particular fix is relevant for the behaviour I
noted. Supposedly your patch was merged in 4.4.alpha0 but the
behaviour persists in 4.4.3.

John Cremona

unread,
Jun 11, 2010, 3:59:53 PM6/11/10
to sage-...@googlegroups.com

All I really meant was that the function giving your problem has also
given other problems, which have been fixed in it, but that is
certainly the place to look for someone fixing your bug.

John

Nils Bruin

unread,
Jun 11, 2010, 5:07:28 PM6/11/10
to sage-devel
On Jun 11, 12:59 pm, John Cremona <john.crem...@gmail.com> wrote:

> All I really meant was that the function giving your problem has also
> given other problems, which have been fixed in it, but that is
> certainly the place to look for someone fixing your bug.

It looks like other people consider this a bug as well then. This is
now
http://trac.sagemath.org/sage_trac/ticket/9220
Reply all
Reply to author
Forward
0 new messages