Dear Sage folks,

For a number field K whose defining polynomial has a non-integral rational 
coefficient, factoring a polynomial with coefficients in K sometimes 
results in the following UserWarning:

SageMath version 8.8.beta1, Release Date: 2019-04-07
sage: K.<a> = NumberField(x^2 - 1/2)
sage: R.<y> = PolynomialRing(K)
sage: p = 11*a*y + 7
sage: p.factor()
/sage/local/lib/python3.7/site-packages/sage/rings/number_field/number_field.py:1682:
 
UserWarning: interpreting PARI polynomial 11 relative to the defining 
polynomial x^2 - 2 of the PARI number field
  % (x, self.pari_polynomial()))
(11*a) * (y + 14/11*a)

Oddly, I'm only seeing this error for linear polynomials in y, not things 
of higher degree:

sage: q = p**2*y + p/3 + (a/5)*y^3
sage: prod(q.factor()) == q
True

The only reference in trac to this error message I could find is:

https://trac.sagemath.org/ticket/22202

Indeed the doctest added in #22202 to show that this ticket is fixed fails 
if the defining polynomial of the number field is made non-integral:

sage: y = QQ['y'].gen()
sage: R = QQ.extension(y^2-1/2,'a')['x']  # was y^2 - 2
sage: R("a*x").factor()
/sage/local/lib/python3.7/site-packages/sage/rings/number_field/number_field.py:1682:
 
UserWarning: interpreting PARI polynomial 0 relative to the defining 
polynomial x^2 - 2 of the PARI number field
  % (x, self.pari_polynomial()))
/sage/local/lib/python3.7/site-packages/sage/rings/number_field/number_field.py:1682:
 
UserWarning: interpreting PARI polynomial 1 relative to the defining 
polynomial x^2 - 2 of the PARI number field
  % (x, self.pari_polynomial()))

In all the instances I've seen, the polynomial being interpreted in the 
warning is a constant, meaning that the warning is harmless.  I assume the 
issues is related to the fact that K.pari_polynomial() is not just 
K.absolute_polynomial():

sage: K.pari_polynomial()
x^2 - 2
sage: K.absolute_polynomial()
x^2 - 1/2

Best,

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to