#11368: can't coerce pari to rational function field
-------------------------------------------------+-------------------------
Reporter: katestange | Owner: robertwb
Type: defect | Status: new
Priority: minor | Milestone: sage-5.13
Component: coercion | Resolution:
Keywords: coercion pari rational | Merged in:
fraction_field string | Reviewers:
Authors: | Work issues:
Report Upstream: N/A | Commit:
Branch: | Stopgaps:
Dependencies: |
-------------------------------------------------+-------------------------
Old description:
> The following fails
> {{{
> sage: R.<x,y> = PolynomialRing(QQ)
> sage: S = R.fraction_field()
> sage: S(pari((x+y)/y))
> TypeError: no canonical coercion from Fraction Field of Multivariate
> Polynomial Ring in x, y over Rational Field to Rational Field
> }}}
> However, if you replace (x+y)/y with x+y, it works (in other words,
> polynomials work but rational functions don't).
>
> I think it is probably related that the following fails: (with R and S as
> above)
> {{{
> S('(x+y)/y')
> }}}
> with the same error. Again, polynomial coercion like
> {{{
> S('x+y')
> }}}
> succeeds. (If someone finds that this is a different problem, please put
> in a separate ticket, but I'm guessing it's related.)
New description:
The following fails
{{{
sage: R.<x,y> = PolynomialRing(QQ)
sage: S = R.fraction_field()
sage: S(pari((x+y)/y))
TypeError: no canonical coercion from Fraction Field of Multivariate
Polynomial Ring in x, y over Rational Field to Rational Field
}}}
However, if you replace (x+y)/y with x+y, it works (in other words,
polynomials work but rational functions don't).
--
Comment (by pbruin):
In newer Sage versions (for example 5.13.beta0), the example
`S('(x+y)/y')` works correctly, but the original example (converting from
PARI) still fails.
--
Ticket URL: <http://trac.sagemath.org/ticket/11368#comment:3>
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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.