Suppose $\forall U, V \subset X$ open, disjoint sets in $X$ it holds that $\overline{U} \cap \overline{V} = \emptyset$ as well.
I want to show that for every two disjoint open sets, $U, V$ there is a continuous function $f: X \to [0,1]$ that separates $U, V$. That is, $f(U) \subset \{0\}, f(V) \subset \{1\}$.
My attempt:
If $U, V$ are as above, than $ \overline{V} \subset X - \overline{U}$ and $ \overline{U} \subset X - \overline{V}$ and these are open sets in $X$.
Moreover $X = X - \overline{U} \cup X - \overline{V}$.
Setting $A = X - \overline{U} \cap X - \overline{V}$, we can define:
$ f(x) = \begin{cases} 0 & \text{if $x \in X - \overline{V}$} \\ \frac{1}{2} & \text{if $x \in A$} \\ 1 & \text{if $x \in X - \overline{U}$} \end{cases} $
And it seems $f$ is continuous. However I feel shaky about this; what am I missing?
First, it seems like the definition of your function doesn't make sense. If $x\in A$, then $x\in X-\overline U$ and $x\in X-\overline V$, so is $f(x)$ 0, .5, or 1? Did you mean the following? $$f(x)=\begin{cases}0\quad x\in\overline U\\.5\quad x\in A \\ 1 \quad x\in \overline V\end{cases}$$