diff --git a/src/HeckeMiscPoly.jl b/src/HeckeMiscPoly.jl index 7cecbf2c4..5ff6bd282 100644 --- a/src/HeckeMiscPoly.jl +++ b/src/HeckeMiscPoly.jl @@ -537,6 +537,9 @@ function is_squarefree(f::PolyElem{<:FieldElement}) end function is_squarefree(f::PolyElem{<:RingElement}) + if iszero(f) + return true + end fac = factor_squarefree(f) return all(e <= 1 for (_, e) in fac) end