# When can we separate an open set from its complement by a continuous function?

Given a topological space $X$, and an open set $U \subsetneq X$. When can we say that, given $n \in \mathbb N$ there exists a continuous real valued function $f \rightarrow \mathbb R$, such that, $f(U) \subset (-\frac{1}{n},\frac{1}{n})$ and $f(U^c) \geq\left|\frac{1}{n}\right|$.

Thank you!

-

## 3 Answers

Note that your question is equivalent to the following

Given an open subset $U$ of a topological space $X$, when can we say that there is a continuous real-valued function $f$ on $X$ such that $f(x) > 0$ for all $x \in U$ and $f(x) = 0$ for all $x \notin U$.

Such a set $U$ is called a co-zero set (or, in Engelking, a functionally open set); their complements are zero sets (or, in Engelking, functionally closed). It is easy to show that zero sets are G$_\delta$ (since $f^{-1} [ \{ 0 \} ] = \bigcap_{n} f^{-1} [\;(-1/n , 1/n )\;]$). It follows that co-zero sets are F$_\sigma$. In normal spaces, the co-zero sets are exactly the open F$_\sigma$-sets. (To circle back to other questions that you have asked, this means that in perfectly normal spaces, the co-zero sets are exactly the open sets.)

However in non-normal spaces, there may be closed G$_\delta$-sets which are not zero sets. For example, in the Niemtyzki (or Moore) plane, the set $F = \{ \langle x , 0 \rangle : x \in \mathbb{Q} \}$ is a closed G$_\delta$ set which is not a zero-set.

-
i see. ok. Thank you!! – topsi Feb 3 '14 at 15:42

The answer to the original question with $f(U^c)\subset {\mathbb R}\setminus [-1/n, 1/n]$: If and only if $U$ is not only open but is also closed.

Answer to the modified question: Such function always exists, provided that $X$ is metrizable. (Hint: Use a suitable modification of the distance function to $U^c$ in order to define the function $f$.) If $X$ is not assumed to be metrizable, the answer is, in general, negative.

-
and, If I would change it to $f(U^c) \geq |\frac{1}{n}|$, whould I still have to require that $U$ will be both open and closed? – topsi Feb 3 '14 at 12:49
No, but it would require you to change your question, which is advisable if this is indeed the question you had in mind! – studiosus Feb 3 '14 at 12:51
yes it is, i will change it – topsi Feb 3 '14 at 12:56

A space where every closed set is the zero set of a continuous function (which is basically equivalent with what you ask) is called perfectly normal. See Zero set and Perfectly normal space in wikipedia.

In general, a set that is a zero-set of a function in an arbitrary space is not characterizable.

-
Thenk you for your answer and for the link for zero set!! – topsi Feb 3 '14 at 15:43