This looks like a bug to I reported it as
http://trac.sagemath.org/sage_trac/ticket/3678
As a work-around, maybe you could use the SymbolicExpressionRing?

On Sat, Jul 19, 2008 at 1:02 AM, Andrey Novoseltsev <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I need to substitute some variable in a polynomial ring with a
> fractional power of another one. I know that the result still will be
> a polynomial, however I have discovered the following behaviour (v.
> 3.0.5 on sage.math):
>
> sage: pr = PolynomialRing(QQ, "u,v")
> sage: pr.injvar()
> Defining u, v
> sage: u^(1/2)
> 1
> sage: pr = PolynomialRing(QQ, "w")
> sage: pr.injvar()
> Defining w
> sage: w^(1/2)
> ---------------------------------------------------------------------------
> TypeError                                 Traceback (most recent call
> last)
>
> /home/novoselt/<ipython console> in <module>()
>
> /home/novoselt/polynomial_element.pyx in
> sage.rings.polynomial.polynomial_element.Polynomial.__pow__ (sage/
> rings/polynomial/polynomial_element.c:8179)()
>
> /home/novoselt/element.pyx in
> sage.structure.element.RingElement.__mul__ (sage/structure/element.c:
> 8814)()
>
> /home/novoselt/coerce.pyx in
> sage.structure.coerce.CoercionModel_cache_maps.bin_op_c (sage/
> structure/coerce.c:5582)()
>
> TypeError: unsupported operand parent(s) for '*': '<type 'list'>' and
> 'Rational Field'
> sage: sqrt(w)
> sqrt(w)
>
> Is it how things were supposed to work for some reason or a bug?
>
> Thank you,
> Andrey
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to