On Thursday 03 September 2009, William Stein wrote:
> Hi Martin (and Sage-devel),
>
> I discovered that polynomial substitution is badly inconsistent between the
> symbolic ring and multivariate polynomials:
>
> sage: R.<x,y> = QQ[]
> sage: f = x + 2*y
> sage: f.subs(x=y,y=x)
> 3*y
> sage: var('x,y')
> sage: f = x + 2*y
> sage: f.subs(x=y,y=x)
> 2*x + y
>
> See http://trac.sagemath.org/sage_trac/ticket/6873 for more and a proposal
> about how to solve this.

FWIW this behaviour is documented:

            .. note::

               The evaluation is performed by evaluating every
               ``variable:value`` pair separately.  This has side effects
               if e.g. x=y, y=z is provided. If x=y is evaluated first,
               all x variables will be replaced by z eventually.

Also, I think that ticket is dupe of

   http://trac.sagemath.org/sage_trac/ticket/6482

Still, it needs to be addressed.

Cheers,
Martin

-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://www.informatik.uni-bremen.de/~malb
_jab: martinralbre...@jabber.ccc.de



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

Reply via email to