Equivalence of Definitions of Polynomial Function on Subset of Ring

Theorem
Let $R$ be a commutative ring with unity.

Let $S \subset R$ be a subset.

1 implies 2
Let $P(X) \in \R[X]$ be the polynomial:
 * $P = \displaystyle \sum_{k \mathop = 0}^n a_k \cdot X^k$

where $\sum$ denotes indexed summation.

We show that $P(\operatorname{id}) = f$.

2 implies 1
Let $P\in R[X]$ be a polynomial and $f = P(\operatorname{id}) \in R^S$.

By Polynomial is Linear Combination of Monomials, there exist: such that $P = \displaystyle \sum_{k \mathop = 0}^n a_k \cdot X^k$ where $\sum$ denotes indexed summation.
 * $n \in \N$
 * $a_0, \ldots, a_n \in R$

Let $\operatorname{ev}_{\operatorname{id}}$ denote the evaluation homomorphism at $\operatorname{id}$.

Then $\operatorname{ev}_{\operatorname{id}}(P) = f$.

We have: