0

I have to prove that if $f:\mathbb R\to \mathbb N$ is continuous, then it's constant. Th result looks intuitive, but I can't prove it. I try by contradiction : suppose there is $x,y\in\mathbb R$ s.t. $f(x)\neq f(y)$. So in somehow $|f(x)-f(y)|\geq 1$, and thus, using the $\varepsilon -\delta $ definition with $\varepsilon <1$ I tried to get a contradiction, but since there is no reason to have $|x-y|\leq \delta $, I couldn't find a way to write it properly. Can someone give hint ?

1 Answers1

1

Method 1

Using your method : Suppose $x<y$ and $f(x)\neq f(y)$. Set $z=\inf\{t>x\mid f(t)\neq f(y)\}$. Using continuity of $f$ at $z$ should allow you to get a contradiction.

Method 2

$f^{-1}(\{f(0)\})$ is open and closed in $\mathbb R$.

Surb
  • 55,662