Q:

Distance function on unit ball from a closed set is lower semi-continuous

While solving exercises from the book Real Analysis by Carothers, I have read about lower semi-continuity (Exercise of chapter 5, Problem 32 on page 67). I have managed to solve the problem but came to know another example of lower semi-continuous function from my teacher. But I am having problem to actually prove that. Please help me. Thnx in advance.
Here is the problem.

Let $(X, || . ||)$ be normed linear space with the naturally induced metric $d(x,y)=||x-y||$ on $X$. Let $B=\{x\in X \mid ||x|| <1\}$ and $Y$ be a closed subspace of $X$. Define $f:B\to \mathbb R$ by $f(x)=d(x,Y)$ which is the distance of $x$ from the subspace $Y$. Prove that $f$ is lower semi-continuous. 

Now in order to solve the problem I thought to show $S_{\alpha} =\{x\in B \mid f(x)=d(x,Y)\le \alpha \}$ to be closed for all $\alpha \in \mathbb R$ 
Now in order to do that we may assume $\alpha \ge 0$ as otherwise for $\alpha <0$ the set $S_{\alpha}=\phi$ is automatically closed.
But after that I am completely stuck. I can not find a way to show that if a sequence $(x_n)$ in $S_{\alpha}$ converges to $x$ then $x$ must be in $S_{\alpha}$.
Am I on the right track or some other approach will be easy for this?
One more thing, I think the set $B$ must play a role here but I can not figure it out what it is.
Please help me to solve this problem. Thanks again.

A:

Extend your function $f$ to the whole space $X$ ($f(x)= d(x,Y)$). If $f$ is lower semicontinuous on $X$, it will be so on every of its subspaces, in particular on $B$.
I show that $X \setminus S_{\alpha}$ is open.
Forall $x \in X \setminus S_{\alpha}$ I want to find some open ball centered at $x$ which is contained in $X \setminus S_{\alpha}$. But how to find the radius of this ball? Well, you have $f(x) > \alpha$ so write
$$f(x) = \alpha + 3 \varepsilon$$
I show that $B_x(\varepsilon) \subset B \setminus S_{\alpha}$. Suppose by contradiction this is not the case. Then there exists some $z \in B_x(\varepsilon) \cap S_{\alpha}$. Since $d(z,Y) \le \alpha$ there exists $y \in Y$ such that $d(z,y) < \alpha + \varepsilon$. And now you get
$$\alpha +3\varepsilon = d(x,Y) \le d(x,y) \le d(x,z) + d(z,y) < \varepsilon + \alpha + \varepsilon$$
a contradiction.
PS: Note that this argument works for every metric space. If you have any metric space $X$, and any subset $Y \subset X$, then the map $x \mapsto d(x,Y)$ is lower semicontinuous.

