Apparent bug when factoring over a finite field
The code below constructs the finite field F of order 7, defines an irreducible polynomial p over F, and then constructs the associated field extension K (the "splitting field of p") before checking that the polynomial in fact splits over K. When I run this code (for instance in a Jupyter notebook or on SageMathCell) I get an extensive error message pertaining to the factor()
method. If I modify the code slightly, changing the exponents in both p
and f
from 2
to 3
, the code executes without issue. Could this be a bug, or have I forgotten something about basic field theory that is causing this?
F = Integers(7)
P.<x> = F[]
p = x^2 + 2
K.<c> = F.extension(p)
S.<z> = K[]
f = z^2 + 2
factor(f)