Definition:Polynomial over Ring as Function on Free Monoid on Set

Definition
Let $R$ be a  commutative ring with unity. Let $M$ be the free commutative monoid on the indexed set $\left\{{X_j: j \in J}\right\}$.

A polynomial in $\left\{{X_j: j \in J}\right\}$ is a mapping $f: M \to R$ such that:
 * $f(\mathbf X^k) = 0$ for all but finitely many $\mathbf X^k \in M$.

Also see

 * Definition:Polynomial over Ring as Sequence