# Problems with support: need to be formal

Let $X$ be a metric space, $f:X\to\mathbb R_{\geq 0}$ is continuous. Suppose there exists two open sets $X_1$ and $X_2$ such that $X = \overline{X_1\cup X_2}$ and $f|_{X_1}>0, f|_{X_2} = 0$. How to prove that $\operatorname{supp}f = \overline{X_1}$?

For sure I know how to prove that $\overline{X_1}\subseteq \operatorname{supp}f$ - but I have problems with the other direction.

-
$X \setminus \overline{X}_1$ is open, and is contained in $\overline{X}_2$, right? What can you say about $f$ restricted to $\overline{X}_2$? – Dylan Moreland Jun 29 '11 at 14:32
@Dylan: I've got it, due to the continuity $f|_{\overline{X}_2} =0$. – Ilya Jun 29 '11 at 14:47
Note that $X$ didn't have to be a metric space for any of this. – Dylan Moreland Jul 3 '11 at 2:16

Choose $x$ in $\operatorname{supp}f$, then $x=\lim x_n$ with $f(x_n)\ne0$ for every $n$. Fix $n$. Since $f$ is continuous, $\{f=0\}$ is closed hence $\overline{X_2}\subseteq\{f=0\}$. Hence $x_n\notin\overline{X_2}$. Like every point of $X$, $x_n=\lim y_{n,k}$ with $y_{nk}\in X_1\cup X_2$ for every $k$. If $y_{nk}\in X_2$ for infinitely many $k$s, $x_n\in \overline{X_2}$. Since this is not so, one can assume without loss of generality that $y_{nk}\in X_1$ for every $k$. Thus $x_n\in\overline{X_1}$. We proved that $x\in\overline{X_1}$, hence $\operatorname{supp}f\subseteq\overline{X_1}$.