Let \(\displaystyle{\left(X,d\right)}\) be a metric space and \(\displaystyle{D\subseteq X}\) .
Prove that \(\displaystyle{D}\) is dense on \(\displaystyle{X}\) if, and only if, for each continuous function
\(\displaystyle{f:X\longrightarrow \mathbb{R}}\) holds :
\(\displaystyle{f(x)=0\,,\forall\,x\in D\implies f=\mathbb{O}}\) .
Welcome to mathimatikoi.org; a site of university mathematics! Enjoy your stay here!
Metric topology

 Team Member
 Articles: 0
 Posts: 426
 Joined: Mon Nov 09, 2015 1:52 pm

 Articles: 0
 Posts: 6
 Joined: Thu Nov 19, 2015 7:27 pm
Re: Metric topology
One direction is easy. If $f=0 $ on $D$ , then by continuity $f = 0$ on $\bar{D} = X$
Now assume the converse. A different definition of density in a metric space is the following :
"$D$ is dense iff every open set in $X$ intersects $D$ nontrivially".
So assume $D$ is not dense and pick an open set not intersecting $D$. Since we're working in a metric space, there exists an $x$ and an $\epsilon>0$ : $B_{\epsilon} (x) \cap D = \emptyset $.
How can we use this information? Things like Urysohn's lemma come to mind... Indeed, Urysohn gives a continuous function where $f(X B_{\epsilon} (x)) = 0$ and $f (\bar{B_{\epsilon/2}}(x) ) = 1 $ and we are done. (Every metric space is normal)
However, things here are much easier! Just define $A= \bar{B}_{\epsilon/2}(x)$ and $B= B_{\epsilon}(x) ^{\mathsf{c}}$. Notice $D \subset B$ and let $$f(x)= \frac{dist(x,B)} {dist(x,A) +dist(x,B)}$$.
This $f$ does the job , so we get home without any heavy machinery.
Nikos
Now assume the converse. A different definition of density in a metric space is the following :
"$D$ is dense iff every open set in $X$ intersects $D$ nontrivially".
So assume $D$ is not dense and pick an open set not intersecting $D$. Since we're working in a metric space, there exists an $x$ and an $\epsilon>0$ : $B_{\epsilon} (x) \cap D = \emptyset $.
How can we use this information? Things like Urysohn's lemma come to mind... Indeed, Urysohn gives a continuous function where $f(X B_{\epsilon} (x)) = 0$ and $f (\bar{B_{\epsilon/2}}(x) ) = 1 $ and we are done. (Every metric space is normal)
However, things here are much easier! Just define $A= \bar{B}_{\epsilon/2}(x)$ and $B= B_{\epsilon}(x) ^{\mathsf{c}}$. Notice $D \subset B$ and let $$f(x)= \frac{dist(x,B)} {dist(x,A) +dist(x,B)}$$.
This $f$ does the job , so we get home without any heavy machinery.
Nikos

 Team Member
 Articles: 0
 Posts: 426
 Joined: Mon Nov 09, 2015 1:52 pm
Re: Metric topology
Thank you Nikos.
Here is another proof :
Suppose that \(\displaystyle{D}\) is not dense on \(\displaystyle{\left(X,d\right)}\), that is \(\displaystyle{\overline{D}\neq X}\) .
Then, there exists \(\displaystyle{y\in X}\) such that \(\displaystyle{d(y,D)>0}\) . The function
\(\displaystyle{f:X\longrightarrow \mathbb{R}\,,f(x)=d(x,D)}\) is continuous and \(\displaystyle{f(x)=0\,,\forall\,x\in D\subseteq \overline{D}}\) .
Accoding to the hypothesis, \(\displaystyle{f=\mathbb{O}}\), a contradiction, since \(\displaystyle{f(y)>0}\) .
Here is another proof :
Suppose that \(\displaystyle{D}\) is not dense on \(\displaystyle{\left(X,d\right)}\), that is \(\displaystyle{\overline{D}\neq X}\) .
Then, there exists \(\displaystyle{y\in X}\) such that \(\displaystyle{d(y,D)>0}\) . The function
\(\displaystyle{f:X\longrightarrow \mathbb{R}\,,f(x)=d(x,D)}\) is continuous and \(\displaystyle{f(x)=0\,,\forall\,x\in D\subseteq \overline{D}}\) .
Accoding to the hypothesis, \(\displaystyle{f=\mathbb{O}}\), a contradiction, since \(\displaystyle{f(y)>0}\) .