how to prove the limit and continuity? For a closed set $F\subseteq \mathbb{R}^{k}$, define $$f_n (x) := \max\{1-n d(x,F),0\}.$$ Show that $f_n \downarrow I_F$ and that $f_n$ is continuous and bounded. I am trying to use $f_{n}(x)=\frac{1-nd(x,F)+|1-nd(x,F)|}{2}$. 
For $x\in F$, $f_{n}(x)\rightarrow 1$ for $n\rightarrow\infty$. For $x\notin F$, how can I get that? Also for continuity, it would be more complicated.
Can someone give hints?
 A: For the limit part, it suffices to prove that $d(x,F)>0$ for $x \not \in F$. For this, note that since $F$ is closed, its complement is open, so if $x \not \in F$ then there is a ball around $x$ which is entirely outside of $F$. How can you bound $d(x,F)$ using this ball?
$f_n$ are trivially bounded by $1$.
For continuity, the maximum of two continuous functions is continuous. (If this isn't obvious, you essentially have a piecewise function which only changes pieces at points where the pieces are equal.) So you just need to show that $x \mapsto d(x,F)$ is continuous. For this you should try to prove that $|d(x,F)-d(y,F)| \leq d(x,y)$, which can be proven using some triangle inequality manipulations involving $d(x,z)$ and $d(y,z)$ for arbitrary $z \in F$.
A: Recall that if $A \subseteq \Bbb R^k$, $d(x,A) = 0$ if and only if $x\in \overline{A}$. Use this fact to prove $f_n(x) = 1$ when $x\in F$. When $x\notin F$, $d(x,F) > 0$, so by the Archemedian property there exists a positive integer $N$ for which $d(x,F) > 1/N$, i.e., $1 - Nd(x,F) < 0$. If $n \ge N$, then $1 - nd(x,F) \le 1 - Nd(x,F) < 0$, hence $f_n(x) = 0$ for all $n\ge N$. This implies $f_n(x)\to 0$. Hence, $\lim_{n\to \infty} f_n(x) = 1_F(x)$ for all $x$.
Since $g_n(x) = 1 - nd(x,F)$ is continuous and $f_n$ is the maximum of continuous functions $f_n$ and $0$, $f_n$ is continuous. For boundedness, show that $0 \le f_n \le 1$. 
To prove $f_n(x) \ge f_{n+1}(x)$, work in cases: $1 - nd(x,F) \ge 0$, and $1 - nd(x,F) \le 0$. Use the fact that if $x \ge a$ and $x \ge b$, then $x \ge \max\{a,b\}$. 
