Ticket #3359 (closed defect: fixed)

Opened 6 months ago

Last modified 3 months ago

[with patch, positive review] bug/inconsistency in multivariate polynomial substitution

Reported by: was Assigned to: malb
Priority: minor Milestone: sage-3.1.2
Component: commutative algebra Keywords:
Cc:

Description

Dear Andrey,

On Jun 4, 7:21 am, Andrey Novoseltsev <novos...@gmail.com> wrote:
> What is wrong with the code below and how to fix it?

I don't know what precisely is wrong with that code, but a very
similar code works.

First, i can reproduce the trouble:
sage: Rt.<t> = PolynomialRing(QQ,1)
sage: p = 1+t
sage: R.<u,v> = PolynomialRing(QQ, 2)
sage: p(u/v)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call
last)
...

The following works:
sage: Rt2.<t> = PolynomialRing(QQ)
sage: p2 = 1+t
sage: p2(u/v)
(u + v)/v

The difference is that Rt is a Multivariate Polynomial Ring (with one
variable, though), but Rt2 is a genuine Univariate Polynomial Ring.

So, at least there is a work-around.

Attachments

trac_3359.patch (0.8 kB) - added by malb on 08/18/2008 06:54:21 AM.
trac_3359-2.patch (0.7 kB) - added by mhansen on 08/26/2008 03:20:26 PM.

Change History

08/18/2008 06:54:21 AM changed by malb

  • attachment trac_3359.patch added.

08/18/2008 06:54:46 AM changed by malb

  • summary changed from bug/inconsistency in multivariate polynomial substitution to [with patch, needs review] bug/inconsistency in multivariate polynomial substitution.

The attached patch fixes this issue.

08/24/2008 05:26:28 AM changed by malb

was, can I ask you to review the patch since you reported the issue?

08/26/2008 03:20:26 PM changed by mhansen

  • attachment trac_3359-2.patch added.

08/26/2008 03:20:44 PM changed by mhansen

  • summary changed from [with patch, needs review] bug/inconsistency in multivariate polynomial substitution to [with patch, positive review] bug/inconsistency in multivariate polynomial substitution.

Looks good to me. Apply both patches.

08/26/2008 04:17:47 PM changed by mabshoff

  • status changed from new to closed.
  • resolution set to fixed.

Merged both patches in Sage 3.1.2.alpha1