```p(x) = a0x^0 + a1x^1 + + anx^n where a is the name of the polynomial, x is a variable, and a0, a1, ..., an are constants. Let P be a language of polynomial definitions and has the following properties: * All polynomial definitions use the same variable name (corresponding to x). The names of a polynomial in a definition consist only of lowercase letters and cannot be confused with variable names. * Each constant is an arithmetic expression, such that: * Non-negative integers are expressions. * Addition & multiplication of two expressions with an explicit (infix) operator is an expression. * It is possible to use pairs of parentheses to group (sub)expressions. * Multiplication of constants with variables is implicit, i.e., there is no explicit (infix) operator between them. * Exponents for variables, like 43 in x^43, are non-negative integers. * If the exponent for a variable is 0, the variable is allowed to be completely omitted. * If the exponent for a variable is 1, the variable is allowed to be written without an exponent. Polynomials that have neither constants nor variables do not occur. ```
For more detail here