In my general topology course we were given the following problem
Consider the metric space of continuous functions with the supremum metric, that is, $C[\mathbb{R}]:= \{f:\mathbb{R} \to \mathbb{R} | \ f \text{ is continuous in the usual sense}\}$ with the topology induced by the metric $d(f,g) = \sup|f(x)-g(x)|$. Note that this metric isn't always finite.
Prove that if $\ d(f,g) = \infty \ $ then $\ f$ and $\ g$ are not on the same connected component.
My attempt was to show the converse: if they're both in the same connected component then they must be finitly distant.
Let $C$ be a connected component and take $f,g \in C$. Take the following $C$-open sets $F = C \cap \left( \bigcup_{n \in \mathbb{N}} B_n(f) \right)$ and $G = C \cap \left(\bigcup_{n \in \mathbb{N}} B_n(f) \right)$.
Now (this I don't know/think its true), $C = F \ \cup \ G$, and since $C$ is connected, $F \ \cap \ G \neq \emptyset$. Take $h$ in the inteserction, then both $d(f,h), \ d(g,h)$ are finite and thus $d(f,g) \le d(f,h) + d(h,g) < \infty$. Done.
I'm not sure if those $F$ and $G$ work (note: if the statement is true, then $F$ and $G$ are exacly the connected components of $f\ $ and $g$), but I feel so close to finishing my proof. If I'm actually on the right track I would appreciate a hint on how to define/find the sets that will "split" $C$ conviniently.
Thanks in advance.