Ring functions which 'respects' homomorphisms Let $R$ be a ring, and $\varphi \in End(R) $ an homomorphism. We define
$$ S_{\varphi} = \{f:R\ \rightarrow\ R \ | \varphi(a) = \varphi(b) \ \Rightarrow \ \varphi(f(a))=\varphi(f(b))\ \} $$
In a certain sense, this is the set of functions 'respecting' $\varphi$. Consider
$$ \mathcal{H}_R= \bigcap_{\varphi \in End(R)} S_{\varphi} $$
(i) Show that $\mathcal{H}_R$ is a ring with the operations on functions induced by operations of $R$. 
(ii) Show that $R[x] \subseteq \mathcal{H}_R$.

Motivated by (i), (ii), the real question I would like to ask you is: 
(iii) Does it hold $\mathcal{H}_R \subseteq R[x] $ for every ring $R$? If not, can you find a counterexample?
 A: If anyone wants to field the first two questions, go right ahead. They just involve chasing the definitions. (I agree with comments that this reads like a homework problem). 
For question (iii), I encourage you to think of a ring whose only endomorphism is the identity. For example, if $R$ is any ring where a homomorphism $f: R \to S$ is uniquely determined by what it does to $1 \in R$ (which implies there is at most one such ring homomorphism $f$ for any ring $S$, since $1 \in R$ must be taken to $1 \in S$), then $R$ has that unique endomorphism property. Based on this, you should be able to come up with examples right away. Now, what would this imply for your problem? 
A: I'm sorry for my superficial exposition. Points 1,2 are quite straightforward, and I wrote them just to motivate point 3. Next time I will avoid redondant questions. I formulated it long time ago and I misread my notes. I thought a bit to the problem, and I also changed the final question.
Let $R$ be a ring such that $|R| = |\mathbb{N}|$. Let $I_R$ be the set of ideals in $R$. We define
$$ S_J = \{f:R\ \rightarrow \ R\ | \ \forall a,b \in R: \ a + J = b+ J \ \Rightarrow \ f(a) + J = f(b) + J \} $$
and then $ \displaystyle \mathcal{H}_R = \bigcap_{J \in I_R} S_J$. Show that $\mathcal{H}_R$ contains a non-countable number of non-polynomial functions.
However, this was not a homework problem. The original problem was if $\mathcal{H}_{\mathbb{Z}} $ contains non-polynomial functions; i.e. if does exist a non polynomial function $f$ such that $a \equiv b \pmod{n} \ \Rightarrow \  f(a) \equiv f(b) \pmod{n} $ 
and this does not seem a trivial question to me.
