# Check if polynomial is in factored form, without factoring

I have a large list list of integer polynomials, all of which are the output of Factor. So my list looks something like this: {... x^2 + 1, (-1 + x)(x^2 + x + 1) ...}

Now I want to do further analysis of the reducible elements of list. The problem is that I do not want to check each polynomial again by IrreduciblePolynomialQ because I already know which are irreducible (they are the ones which are not factored.)

Q: What efficient way is there to check if a polynomial is in factored form? I.e. a function isF such that isF[(-1 + x)(1 + x + x^2)] returns True but isF[-1 + x^3] and isF[1 + x + x^2] return False. I suppose isF could simply check if ( appears in its input, but I'm not sure how to do that.

You can check whether the Head of the expression is Plus, which is associated with a non-factored polynomial:

list = {  1 + x^2,
(-1 + x) (1 + x + x^2),
(1 + x)^2,
2 (2 + x + x^2),
2 (2 + x)^2
};

ClearAll[isF]
isF[Times[_Integer, poly_]] := isF[poly]

• What about something like the output of Factor[2 x + 2 x^2 + 4]? Mar 16, 2021 at 17:50