#14485: Get rid of the bogus coercion from SR to QQbar
-------------------------------------+-------------------------------------
Reporter: tmonteil | Owner: malb
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-6.4
Component: commutative | Resolution:
algebra | Merged in:
Keywords: QQbar, polynomial | Reviewers:
Authors: Marc Mezzarobba | Work issues:
Report Upstream: N/A | Commit:
Branch: | 9f5b44b3b5e431a92c77af7c52f4984c5c199a49
u/mmezzarobba/14485-QQbartoSR | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Description changed by mmezzarobba:
Old description:
> Here is the issue: there is no problem buildind a polynomial over AA:
>
> {{{
> sage: R = AA[x]
> sage: P = R(x^6+x^5+x^4-x^3+x^2-x+2/5)
> }}}
>
> But the same operation does not work on QQbar:
>
> {{{
> sage: S = QQbar[x]
> sage: Q = S(x^6+x^5+x^4-x^3+x^2-x+2/5)
> Traceback (most recent call last)
> ...
> NotImplementedError: symbol
> }}}
>
> Hovewer, this workaround works:
>
> {{{
> sage: Q = P.change_ring(QQbar)
> }}}
>
> Moreover the following works :
>
> {{{
> sage: S.<x> = PolynomialRing(QQbar,'x')
> sage: Q = S(x^6+x^5+x^4-x^3+x^2-x+2/5)
> sage: S == QQbar[x]
> True
> }}}
>
> Weird isn't it ?
New description:
Original issue: there is no problem buildind a polynomial over AA:
{{{
sage: R = AA[x]
sage: P = R(x^6+x^5+x^4-x^3+x^2-x+2/5)
}}}
But the same operation does not work on QQbar:
{{{
sage: S = QQbar[x]
sage: Q = S(x^6+x^5+x^4-x^3+x^2-x+2/5)
Traceback (most recent call last)
...
NotImplementedError: symbol
}}}
Hovewer, this workaround works:
{{{
sage: Q = P.change_ring(QQbar)
}}}
Moreover the following works :
{{{
sage: S.<x> = PolynomialRing(QQbar,'x')
sage: Q = S(x^6+x^5+x^4-x^3+x^2-x+2/5)
sage: S == QQbar[x]
True
}}}
Weird isn't it ?
--
--
Ticket URL: <http://trac.sagemath.org/ticket/14485#comment:13>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.