The limit of $d(A(x), A(y))$ is 0 as $y$ goes to $x$ and a differential Let $F$ be a closed non empty subset of the euclidean space $\mathbb{R}^n$ and $A(x) =\{y\in F, d(x, F) =||x-y||\} \forall x\in \mathbb{R}^n $. I have proven that $A(x) $ is non empty and compact for all $x$.  And now I have to prove that the limit of $d(A(x), A(y))$  is 0 as $y$ goes to $x$. I don't see how to do this and I would appreciate your help.
For this question I considered a sequence $(x_n) $ that converges to $x$. We want to prove that $d(A(x_n), A(x))\rightarrow 0$. Since $A(x_n) $ is compact then there exists $y_n$ such that $d(A(x_n), A(x))=d(y_n, A(x) ) $. Then we can extract a convergent subsequence $(y_{n_k} )$. Let $y$ be its limit. Then I proved that $y\in A(x) $ and so $d(A(x_{n_k} ), A(x))$ goes to 0. Now all I need to do is to prove that $d(A(x_n), A(x))$ converges but I don't see how.
I need help with the next question as well : if $f(x) =d(x, F)^2 $ is differentiable at x and $a\in A(x) $ then $df(x) (h) =2(x-a|h)$ where $(. |. )$  is the scalar product. Thank you in advance for your help. 
 A: Alright so thanks to a tip given by Jochen in the comments I was able to solve the first question. I still need help with the second question though.
Here is my answer to the first question :
First let's start by proving the following simple result (which was given by Jochen):  
Lemma :
If $(x_n)$ is a sequence of real numbers then $(x_n)$ converges to $l$ if and only if every subsequence of $(x_n)$ has a subsequence that converges to $l$.
Proof :
Suppose $(x_n)$ doesn't converge to $l$. Then $\exists \epsilon >0$ such that for all positive integers $n$ there is $m\ge n$ such that $|x_m-l|>\epsilon$. It is thus possible to find a subsequence $(x_{n_k})$ satisfying : $|x_{n_k}-l|>\epsilon\ \forall k$. It is possible to extract a subsequence $(x_{n_{\varphi (k)}})$ that converges to $l$. But $|x_{n_{\varphi (k)}}-l|>\epsilon\ \forall k$ which contradicts the convergence of $(x_{n_{\varphi (k)}})$ to $l$.  
Answer to the first question :
Let $x\in \mathbb{R}^n$ and $(x_n)$ a sequence that converges to $x$. We want to prove that $\lim _{n\rightarrow \infty} d(A(x_n),A(x))=0$. Let $(x_{n_k})$ be a subsequence of $(x_n)$. Since the map $f(t)=d(t,A(x))$ is continuous and $A(x_{n_k})$ is a non empty compact subset of $\mathbb{R}^n$ then $\exists y_k \in A(x_{n_k})$ such that $d(y_k,A(x))=d(A(x_{n_k}),A(x))$.
$y_k \in A(x_{n_k})\ \forall k$ so $||y_k-x_{n_k}||=d(x_{n_k},F)\ \forall k$
$||y_k||\le ||y_k-x_{n_k}||+||x_{n_k}-x||+||x||\le d(x_{n_k},F)+||x_{n_k}-x||+||x||\ \forall k$
The sequences $(d(x_{n_k}))$ and $(||x_{n_k}-x||)$ both converge so they are both bounded and so $(y_k)$ is bounded as well. So there is a convergent subsequence $(y_{\varphi(k)})$ of $(y_k)$. Let $y$ be its limit.
$||y_{\varphi(k)}-x_{n_{\varphi(k)}}||=d(x_{n_{\varphi(k)}},F)\ \forall k,\ ||y_{\varphi(k)}-x_{n_{\varphi(k)}}||\rightarrow ||y-x||$ and $d(x_{n_{\varphi(k)}},F)\rightarrow d(x,F)$ as $k\rightarrow \infty$
So $||y-x||=d(x,F)\Rightarrow y\in A(x)\Rightarrow d(y,A(x))=0$
So $d(A(x_{n_{\varphi(k)}}),A(x))=d(y_{\varphi(k)},A(x))\rightarrow d(y,A(x))=0$ and we conclude by the lemma that $d(A(x_n),A(x))\rightarrow 0$.
I would be grateful if somebody could check this answer and/or help me with the next question.
