TITLE: Show the iff statement of lower semicontinuous
QUESTION [8 upvotes]: Given $X\subseteq \Bbb R^m, f:X\to\Bbb R$ and $x\in X$, we say $f$ is lower semicontinous (l.s.c for short) at x if$\forall \varepsilon>0\ \exists\ \delta >0\ \forall \in B(\delta,x), \ f(x)\le f(y)+\varepsilon$. 
I wish to show: 
If $X$ is closed, then $f$ is l.s.c if and only if the set $f^{-1}((-\infty,r]):=\{a\in X:f(a)\le r\}$ is closed for each $r\in \Bbb R$. I wonder how I could use the requirement that the set $X$ is closed.

REPLY [2 votes]: First Direction: Suppose that $f$ is l.s.c.  To show that $A_r = \{a\in X:f(a)\le r\}$ is closed, let $\{a_n\}$ be a sequence in $A_r$, converging to $a_\infty$, which we want to show is in $A_r$.  Since $f$ is l.s.c., 
$$
f(a_\infty) \leq \liminf f(a_n) \leq a,
$$
since $a_n \in A_r$.  Therefore, $a_\infty \in A_r$.
Second Direction:  The argument is basically identical.
It's much more convenient to use the equivalent sequential definition of lower semi-continuity