I need to check if an expression is polynomial in x but with coefficients that are either symbolic, or do not include the complex numebr I.
The problem is that maple considers integers and reals complex also.
type(1,complex) gives true. so I can't use
Since this gives false.
I could instead list all the types to be accepted using Or, like this
But I might overlook something if I have to enumerate every type accepted. It is easier to just exclude complex numbers.
What is the correct way to tell Maple to check if expression is polynomial in x where coefficients do not have the complex I in them? It it ok if the coefficient are any other numeric value, or a known Maple constant, or a parameter (symbol). I just want to exclude complex numbers.
I know I could do this
if not has(the_poly,I) then
But I wanted to learn how to make a type which excludes complex numbers.