Continuous function $f$ from Euclidean topology to discrete topology is constant. let the standard metric $d(x,y)=|y-x|$ and  $\rho_{disc}$ be the discrete metric defined by
$${\displaystyle \rho_{disc} (x,y)={\begin{cases}1&{\mbox{if}}\ x\neq y,\\0&{\mbox{if}}\ x=y\end{cases}}}$$ Let $V=(\mathbb{R}, \rho_{disc}$) and $W=(\mathbb{R},d)$ be two metric spaces (that has $\mathbb{R}$ as underlying sets, but given by two different metrices as written).
Show that a function $f:W\rightarrow V$ is continuous if and only if  it is constant using the supremum property (directly/indirectly)
So far
Have tried for a lot of time now but I just do not see why I have to use the supremum property and how. It makes absolutely no sense to me.
The only thing that seems straight forward to me is that if $f$ is constant (but I do not even use  the supremum property here obviously) then it is continuous. The other implication does make sense to me using the supremum property.
 A: Assume there are points $x_0<x_1$ such that $f(x_0) \neq f(x_1)$.
Now consider the set $X = \{x \quad |\quad f(x) = f(x_0) \text{ and } x \in [x_0,x_1]\}$.
The set $X$ is non-empty and bounded above by $x_1$. It follows that it has a supremum $\alpha$.
Now show that $f$ is not continuous at $\alpha$ by taking $\varepsilon = 0.5$, there are two cases, one is when $f(\alpha) = f(x_0)$ and the other is when $f(\alpha) \neq f(x_0)$.
A: Let $f : W \to V$ be a continuous function. Suppose that $f$ is not constant. Let $a < b \in \Bbb R$ be such that $f(a) \neq f(b)$. Consider the set
\begin{align}
S &:= \{x \in \Bbb R : f(x) = f(a)\} \cap (-\infty, b) \\ 
&= f^{-1}(\{f(a)\}) \cap (-\infty, b).
\end{align}
Note that $S$ is an open subset of $\Bbb R$. (Here is where we use that $V$ is endowed with $\rho_{\text{disc}}$. This tells us that the singleton $\{f(a)\}$ is open and thus, so is its preimage, by continuity.)
$S$ is clearly a nonempty subset (it contains $a$) of $\Bbb R$ which is bounded above (by $b$). Thus, it has a supremum $s \in \Bbb R$. In particular, $s + \epsilon \notin S$ for any $\epsilon > 0$. Since $S$ is open, this forces that $s \notin S$.
But $\sup S = s$ implies that there exists a sequence $(s_n)_n$ in $S$ such that $s_n \to s$. By continuity, we must have $f(s_n) \to f(s)$ and thus, $f(s) = f(a)$ and hence, $s \in S$. A contradiction!

Some comments:

*

*The above works for any $V$ which is a metric space with the discrete metric.

*The above also gives a proof of connected-ness of $\Bbb R$. Indeed, if $\Bbb R = U_1 \sqcup U_2$ is a separation of $\Bbb R$ into disjoint non-empty open subsets, then defining $f$ to be $0$ on $U_1$ and $1$ on $U_2$ gives a non-constant continuous function into $(\Bbb R, \rho_{\text{disc}})$.

