AI Homework - problem 7, def and check poly

My homework at Artificial Intelligence lab, problem 7; polynomial
operations: definition, check if poly, evaluation of poly, sum and
product of polynomials.