Let A and B be two disjoint closed sets of any Metric space X.I have to construct a continuous function such that
$f(x):= 0$ if x belongs to $A$
$f(x) = 1$ if x belongs to $B$
My idea is to use the concept of distance between a point and a set.So I tried like this..
$f(x):= 0$ if $d(x,A) = 0$ and
$f(x) = 1$ if $d(x,A) \neq 0$
I am able to prove $f$ is continuous if both $x$ and $y$ belongs to $A$ or Both belongs to $B$.. But how to prove if $d(x,y)$ less than $\delta$ ($x$ belongs to $A$ and $y$ belongs to $B$) $\Rightarrow d(f(x),f(y))$ less than $\epsilon$.