Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Defining Polynomial from Import

I am importing polynomials from LMFBD. So I have a set called data, which contains a polynomial in certain entries. So for example, data[0][0] may be a polynomial $x^2+x+1$. I want to check if this polynomial is irreducible over some number field $K$ I have defined. So I tried something like...

K = NumberField(y^2+1);
f = data[0][0];
f.change_ring(K);
f.is_irreducible()

But I get the error 'sage.symbolic.expression.Expression' object has no attribute 'is_irreducible'. How would I do this?