#11368: can't coerce pari to rational function field
--------------------------+-------------------------------------------------
Reporter: katestange | Owner: robertwb
Type: defect | Status: new
Priority: minor | Milestone: sage-4.7.1
Component: coercion | Keywords: coercion pari rational
fraction_field string
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
--------------------------+-------------------------------------------------
Changes (by katestange):
* keywords: coercion pari rational fraction_field => coercion pari
rational fraction_field string
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).
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).
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.)
--
Comment:
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.)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11368#comment:1>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.