Showing a set is open through an inverse

36 Views Asked by At

The question: Show that a set $U$ is open in the metric $M$ if and only if $U = f^{-1}(V)$ for some continuous function $f: M \rightarrow \mathbb{R}$ and some open set $V$ in $\mathbb{R}$

I have no idea how to even begin on either side of this proof My apologies if someone has answered this before but I could not find anything as such

1

There are 1 best solutions below

0
On

Take $C$ to be the complement of $U$, which is closed. Consider the function $$ f(x) = \inf_{y \in C} d(x,y), $$ also known as "distance from C". Exercise: prove that it is a continuous function. Then $U = \{x : f(x) > 0\} = f^{-1}((0,\infty))$.