Ported quesetion for simplifying algebraic expressions.