Prove that if $f\in \hbox{Hom}_{\mathbb{Z}}(\prod_{i=1}^{\infty }\mathbb{Z},\mathbb{Z})$ and $f\mid_{\bigoplus_{i=1}^{\infty } \mathbb{Z}}=0$ then $f=0$.
I took an element of $\prod_{i=1}^{\infty }\mathbb{Z}$, that is, $(m_{1},m_{2},...)$, and because $f$ is homomorphism we have $f(m_{1},m_{2},...)=f(m_{1},0,0,...)+f(0,m_{2},0,...)+\cdots$ and because $f$ is zero on $\bigoplus_{i=1}^{\infty } \mathbb{Z}$ so $f(m_{1},m_{2},...)=0$, but I am not sure that my solution is right. Please tell me if it is right or wrong, and if it is wrong, please help me to make it right. Thank you.