Welcome to our community

Be a part of something great, join today!

Prove statements about metric

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,004
Hey!! :eek:

Let $(X, d)$ be a metric space. For $A \subseteq X$ und $x \in X$ we define $d_A : X \rightarrow \mathbb{R}$ by \begin{equation*}d_A(x):=\inf\{d(x,y)\mid y\in A\}\end{equation*}
I want to prove the below statements:
  1. $A$ is closed iff for all $x\in X$ with $d(x,A)=0$ it holds that $x\in A$.
  2. The map $d_A:X\rightarrow \mathbb{R}$ is continuous.
  3. Let $A,B\subseteq X$ be disjunctive, closed subsets. Then there is a continuous function $f:X\rightarrow [0,1]$ such that $$f(x)=0\iff x\in A\ \text{ and } \ f(x)=1\iff x\in B$$

I have done the following:
  1. Since $A$ is closed, it holds that $\forall x\in X\setminus A : \exists \epsilon >0 : B_{\epsilon}(x)\cap A=\emptyset$.

    A ball $B_{\epsilon}(x)$ is the set of all points $y\in X$ satisfying $d(x,y)<\epsilon$.

    Is the definition correct so far? How could we continue? (Wondering)

    $$$$
  2. Let $a\in A$.

    We have that $d_A(x)=\inf\{d(x,y)\mid y\in A\}\leq d(x,a)$. Applying the triangle inequality we get $d(x,a)\leq d(x,y)+d(y,a)$. That means that we have $d_A(x)\leq d(x,y)+d(y,a)$.

    We take the infimum over $a\in A$ and we get: $\inf_ad_A(x)\leq \inf_a\left (d(x,y)+d(y,a)\right ) \Rightarrow d_A(x)\leq d(x,y)+\inf_ad(y,a)$.

    Since $(X,d)$ is a metric space, we have that $d$ is a metric and the property of symmetry is satisfied, and so we have $d(x,y)=d(y,x)$.

    Therefore we get $d_A(x)\leq d(x,y)+\inf_ad(a,y)\Rightarrow d_A(x)\leq d(x,y)+\inf_ad(y,a) \Rightarrow d_A(x)\leq d(x,y)+d_A(y) \Rightarrow d_A(x)-d_A(y)\leq d(x,y)$


    Let $\varepsilon>0$. We choose $\delta:=\varepsilon$. Then, if $d(x,y)<\delta$, we have that $|d_A(x)-d_A(y)|\leq d(x,y)<\varepsilon$.

    This means that $d_A$ is continuous.

    Is everything correct? (Wondering)

    $$$$
  3. Could you give me a hint for this one? i got stuck right now. (Wondering)
 
Last edited:

Janssens

Well-known member
Sep 16, 2017
202
3. Could you give me a hint for this one? i got stuck right now. (Wondering)
You can define the function $f$ explicitly in terms of $d_A$ and $d_B$. Use that:

From the definition of $d_A$ and 1. it follows that $d_A(x) = 0$ iff $x \in A$, and likewise for $d_B$.
The continuity of $f$ follows from 2.
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,004
You can define the function $f$ explicitly in terms of $d_A$ and $d_B$. Use that:

From the definition of $d_A$ and 1. it follows that $d_A(x) = 0$ iff $x \in A$, and likewise for $d_B$.
The continuity of $f$ follows from 2.
So do you mean that we should define the function as follows?
$$f(x)=\begin{cases}d_A(x) , x\in A\\ 1-d_B(x) , x\in B\end{cases}$$

(Wondering)
 

Opalg

MHB Oldtimer
Staff member
Feb 7, 2012
2,678
So do you mean that we should define the function as follows?
$$f(x)=\begin{cases}d_A(x) , x\in A\\ 1-d_B(x) , x\in B\end{cases}$$

(Wondering)
That function is only defined on $A$ and $B$. What is needed here is a function defined on the whole of $X$. It should take the value $0$ on $A$, $1$ on $B$, and go continuously from $0$ to $1$ in the region "between" $A$ and $B$.
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,004
That function is only defined on $A$ and $B$. What is needed here is a function defined on the whole of $X$. It should take the value $0$ on $A$, $1$ on $B$, and go continuously from $0$ to $1$ in the region "between" $A$ and $B$.
I haven't really understood how we define the function in the case $x\in X\setminus (A\cup B)$ so that it goes continuously from $0$ to $1$ in the region "between" $A$ and $B$. Could you explain to me further? (Wondering)
 

Janssens

Well-known member
Sep 16, 2017
202
So do you mean that we should define the function as follows?
$$f(x)=\begin{cases}d_A(x) , x\in A\\ 1-d_B(x) , x\in B\end{cases}$$

(Wondering)
In addition to the reply by Opalg (which is of course to the point), I would recommend that you make an "inspired guess":

(i) Can you write down a function $f$ that is $0$ on $A$ and $1$ on $B$, using nothing but $d_A$ and $d_B$?

(ii) Once you have a candidate, then try to prove: If $f(x) = 0$ then $x \in A$ and if $f(x) = 1$ then $x \in B$.

Did the candidate do the job? Good, then you are done. Did step (ii) fail? Then try to make small modifications to $f$ such that (i) remains true, hoping that you can make (ii) hold as well.
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,004
In addition to the reply by Opalg (which is of course to the point), I would recommend that you make an "inspired guess":

(i) Can you write down a function $f$ that is $0$ on $A$ and $1$ on $B$, using nothing but $d_A$ and $d_B$?

(ii) Once you have a candidate, then try to prove: If $f(x) = 0$ then $x \in A$ and if $f(x) = 1$ then $x \in B$.

Did the candidate do the job? Good, then you are done. Did step (ii) fail? Then try to make small modifications to $f$ such that (i) remains true, hoping that you can make (ii) hold as well.
From the subquestion 1. we have that since $A$ is closed it follows that if $d(x,A)=0$ then $x\in A$. Can we say that $d(x,A)=0 \iff x\in A$ ?

If $d(x,A)=0$ then it holds that $d_A(x)=0$, correct?

Similarily, the same holds also for $B$.

I haven't really understood how to define the function $f$ using $d_B$ so that it is equal to $1$ when $x\in B$.

Could you give me a hint? (Wondering)
 

Opalg

MHB Oldtimer
Staff member
Feb 7, 2012
2,678
From the subquestion 1. we have that since $A$ is closed it follows that if $d(x,A)=0$ then $x\in A$. Can we say that $d(x,A)=0 \iff x\in A$ ?

If $d(x,A)=0$ then it holds that $d_A(x)=0$, correct?

Similarily, the same holds also for $B$.
Yes, that is correct.

I haven't really understood how to define the function $f$ using $d_B$ so that it is equal to $1$ when $x\in B$.

Could you give me a hint? (Wondering)
I found this part of the problem quite difficult, and I don't see how to give a hint other than giving away the answer.
How about the function $f(x) = \dfrac{d_A(x)}{d_A(x) + d_B(x)}$?

That function is defined for all $x$ in $X$ (because the denominator of the fraction is never $0$). It is a continuous function; it takes values in the interval $[0,1]$; and it takes the value $0$ iff $x\in A$ and the value $1$ iff $x\in B$.
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,004
Yes, that is correct.


I found this part of the problem quite difficult, and I don't see how to give a hint other than giving away the answer.
How about the function $f(x) = \dfrac{d_A(x)}{d_A(x) + d_B(x)}$?

That function is defined for all $x$ in $X$ (because the denominator of the fraction is never $0$). It is a continuous function; it takes values in the interval $[0,1]$; and it takes the value $0$ iff $x\in A$ and the value $1$ iff $x\in B$.
Ahh ok? Now I see what you meant! (Nerd)



Is my answer at the second question, that $d_A$ is continuous, correct and complete? (Wondering)



Let's consider the first question.

We suppose that $\forall x\in X : d(x,A)=0\Rightarrow x\in A$. By definition it holds that $\displaystyle{d(x,A)=\lim_{n\rightarrow \infty}d(x, a_n)}$ and so it holds that $\displaystyle{\lim_{n\rightarrow \infty}d(x, a_n)=0}$. Does this mean that all limit points of $A$ are contained in $A$ ? (Wondering)