# Prove/Disprove there exists only one continuous function $f:\mathbb{R} \to \mathbb{Z}$

I know that every function $$f: \mathbb{Z} \to \mathbb{R}$$ is continuous.

This can be proven by Weierstrass' $$\varepsilon$$-$$\delta$$ criterion. If $$f:E\subseteq \mathbb{R} \to \mathbb{R}$$ is continuous at $$x_0 \in E$$, then $$\forall \varepsilon > 0 \exists \delta > 0 \forall x \in E \left( \left| x - x_0\right| < \delta \to \left| f(x) - f(x_0)\right| < \varepsilon \right)$$ Let $$E := \mathbb{Z}$$ and $$\varepsilon > 0$$, $$x_0 \in E$$ be fixed. Taking $$\delta := 1$$, we get, that the only point which fulfills $$\left| x - x_0\right| < \delta$$ is $$x_0$$ itself, but then trivially $$\left| f(x_0) - f(x_0)\right| = 0 < \varepsilon$$ holds. Since $$x_0 \in E$$ was arbitrary, $$f$$ is continuous on $$E$$.

But how can one prove/disprove that there exists only one continuous function:

$$f:\mathbb{R} \to \mathbb{Z}$$

• Back up, before you attempt a proof, why do you think this is true? – Chris Culter Jan 7 '20 at 17:41
• There are in fact infinitely many continuous functions $\;\Bbb R\to\Bbb Z\;$ (with the usual topology and the inherited one, respectively), and each one of them pretty boring because $\;\Bbb R\;$ is connected... – DonAntonio Jan 7 '20 at 17:44
• @DonAntonio Thanks for your reply. My assumption was wrong because I couldn't find a counterexample. But I don't understand what you mean with $\mathbb{R}$ is connected. Can you elaborate? – JavaTeachMe2018 Jan 7 '20 at 17:45
• @Java In this case it is the same as saying that $\;\Bbb R\;$ is path-connected...Anyway, being connected means that we cannot write $\;\Bbb R=A\cup B\;$ , with $\;A\cap B=\emptyset\;$ and $\;A,B\;$ both non empty and open. – DonAntonio Jan 7 '20 at 17:49
• The point to connectedness here is that if $X$ is connected and $f$ is continuous then $f(X)$ is connected. So here $f(\Bbb R)$ is a connected subset of $\Bbb Z$, hence it contains only one point, which is to say $f$ is constant. – David C. Ullrich Jan 7 '20 at 18:04

Hint: Is it not the case that $$f:\mathbb{R}\to \mathbb{Z}$$ given by $$f(x)=1$$ and $$g:\mathbb{R}\to \mathbb{Z}$$ given by $$g(x)=0$$ are both continuous?
Any constant function $$\mathbb{R} \to \mathbb{Z}$$ is continuous, so this claim is definitely false.
Indeed, suppose we are given a continuous function $$f: \mathbb{R} \to \mathbb{Z}$$. Since $$\mathbb{R}$$ is connected, we have that $$f(\mathbb{R})$$ is a connected subspace of $$\mathbb{Z}$$. The only connected subspaces of $$\mathbb{Z}$$ are singeltons, so $$f$$ must necessarily be constant.
There are many ways to show that a continuous $$f:\Bbb R\to \Bbb Z$$ must be constant. We can consider $$f$$ to be continuous from $$\Bbb R$$ into $$\Bbb R$$ and use some general properties of all continuous real functions. For example, the Intermediate Value Property: Suppose $$f:\Bbb R\to \Bbb R$$ is continuous and not constant. Then there are $$x,x'$$ with $$f(x)\ne f(x').$$ Now for every $$y$$ between $$f(x)$$ and $$f(x'),$$ there exists $$x''$$ between $$x$$ and $$x'$$ such that $$f(x'')=y.$$ But there is always some $$y$$ between $$f(x)$$ and $$f(x')$$ with $$y\not \in \Bbb Z;$$ therefore it is not possible that $$\{f(x''):x''\in \Bbb R\} \subseteq \Bbb Z.$$