On Thursday, January 14, 2016 at 12:36:32 PM UTC-8, Matthias Goerner wrote:
>
>
> # Lift polynomial back to Q[x][y]
> lifted = factor.map_coefficients(lambda c:Rx(c.lift()), Rxy)
>
> Are you sure this is what you want and what you did before? The 
documentation of map_coefficients says that the second argument is to be 
the new *base ring*. Indeed, with your code I get:

sage: parent(lifted)
Univariate Polynomial Ring in y over Univariate Polynomial Ring in y over 
Univariate Polynomial Ring in x over Rational Field

i.e., an element in the polynomial ring QQ[x][y][Y], where "Y" is really 
"y", (which is difficult to distinguish from the previous "y" visually , 
but sage does distinguish them). 

Hence:

sage: parent(val)
Univariate Polynomial Ring in y over Univariate Polynomial Ring in x over 
Real Interval Field with 53 bits of precision

(who knows which y was substituted or was used before ... You could figure 
it out if you wanted).

If instead you do:

sage: lifted=factor.map_coefficients(lambda c:Rx(c.lift()), Rx)
sage: val = lifted.substitute(x = RIF(-2.67512520581, -2.67512520582), y = 
RIF(.00001, 1.00002))
sage: type(val)
<type 'sage.rings.real_mpfi.RealIntervalFieldElement'>

I don't think there are any issues.

Incidentally, the whole "x=var('x')" thing is making things unnecessarily 
complicated. You'd be better off setting them to the appropriate values 
right away:

Rx.<x>=PolynomialRing(RationalField(),'x')
Rxy.<y>=PolynomialRing(Rx,'y')

Or you could use

x=Rx.0
y=Rxy.0


> Something has changed. Was I using it incorrectly and this improved or is 
> this a regression?
>

Yes, according to the documentation (which presumably hasn't changed 
between your old version an 6.10), you were using something that shouldn't 
result in what you apparently were trying to obtain. 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" 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-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to