I have given a polynomial in two variables y^10+10 * y^8 * x^3 + 1 in 
Q[x][y] and a polynomial defining a number field such as x^5 + 137.
I want to factor the polynomial over the number field and then evaluate it 
given numerical interval values for x and y.

I used to do the following:

Rx=PolynomialRing(RationalField(),'x')
Rxy=PolynomialRing(Rx,'y')
x = var('x')
y = var('y')

# Polynomial in Q[x][y]
poly = Rxy(y^10+10 * y^8 * x^3 + 1)
nf = NumberField(x^5 + 137, 'x')

#polynomial in Q(a)[y] where a is a "root" of nf
poly_nf = poly.change_ring(nf)
factors = poly_nf.factor()

#pick first factor
factor, multiplicity = factors[0]

# Lift polynomial back to Q[x][y]
lifted = factor.map_coefficients(lambda c:Rx(c.lift()), Rxy)

# Evaluate
val = lifted.substitute(x = RIF(-2.67512520581, -2.67512520582), y = 
RIF(1.00001, 1.00002))

# We expect this to be an interval
type(val)
<type 'sage.rings.real_mpfi.RealIntervalFieldElement'>

But in sage 6.10, this now gives as result:
<type 'sage.rings.polynomial.polynomial_element.Polynomial_generic_dense'>


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

-- 
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