TITLE: The existence of non-trivial homomorphisms $\prod_{n=1}^{\infty}\mathbb{Z}/\bigoplus_{n=1}^{\infty}\mathbb{Z}\to\mathbb{Z}/p\mathbb{Z}$
QUESTION [15 upvotes]: Let $\prod_{n=1}^{\infty}\mathbb{Z}$ be the Baer-Specker group and $\bigoplus_{n=1}^{\infty}\mathbb{Z}$ be the natural free abelian subgroup. It is known that if $G$ is a countable abelian group with no infinitely divisible elements (e.g. $\mathbb{Z}$), then every homomorphism $\prod_{n=1}^{\infty}\mathbb{Z}/\bigoplus_{n=1}^{\infty}\mathbb{Z}\to G$ is trivial.
I've heard by word of mouth of a result on fundamental groups which would imply the existence of non-trivial homomorphisms $\prod_{n=1}^{\infty}\mathbb{Z}/\bigoplus_{n=1}^{\infty}\mathbb{Z}\to \mathbb{Z}/p\mathbb{Z}$ for any prime $p\geq 2$. What is an explicit construction of such a homomorphism for given $p$?

REPLY [23 votes]: Here's an elementary proof that doesn't require ultrafilters, but uses axiom of choice.
The group 
\begin{equation*}
\prod_{n=1}^\infty \mathbb{Z} / \bigoplus_{n=1}^\infty \mathbb{Z}
\end{equation*}
clearly surjects onto
\begin{equation*}
\prod_{n=1}^\infty (\mathbb{Z}/p\mathbb{Z}) / \bigoplus_{n=1}^\infty (\mathbb{Z}/p\mathbb{Z}).
\end{equation*}
The latter is a nontrivial $\mathbb{F}_p$-vector space, being a $p$-torsion abelian group. Therefore, we can choose a basis $\{e_i\}_{i\in I}$. Finally, we get a map into $\mathbb{Z}/p\mathbb{Z}$ by killing all but one of the $e_i$.