# Sufficient and Necessary Conditions for Semi-continuous Functions

I am trying to understand one commonly stated necessary and sufficient condition for a function to be (lower) semicontinuous:

$$f(x) \leq \liminf_{y \rightarrow x}{f(y)} \iff \forall a \in \mathbb{R} \quad Z(f,a) \equiv \{ x : f(x) \le a \} \mbox{ is closed}$$

I can easily prove the forward direction with limits of sequences of elements taken from $Z(f,a)$, but I'm having trouble proving the backward direction. I can prove the following, however,

$$f(x) \leq \liminf_{y \rightarrow x}{f(y)} \iff \mbox{epi}(f) \equiv \{(x,y) : f(x) \le y\} \mbox{ is closed}$$

I would like to be able to make some connection between $\mbox{epi}(f)$ and $Z(f,a)$, but none of the usual countable union properties of closed sets can help me. Is this the wrong path to be going down, or is there perhaps some simple step I'm missing?

-

For every $x$, let $g(x)=\liminf\limits_{z\to x}f(z)$ and assume that there exists $x$ such that $f(x)>g(x)$. Choose any $a$ such that $g(x)<a<f(x)$, for example $a=\frac12(f(x)+g(x))$.
On the one hand, $x$ is not in $Z(f,a)$ because $f(x)>a$. On the other hand, $g(x)<a$ and there exists a sequence $(x_n)$ such that $x_n\to x$ and $f(x_n)\to g(x)$, hence $f(x_n)<a$ for every $n$ large enough, that is, $x_n$ is in $Z(f,a)$. Since $x_n\to x$, this proves that $Z(f,a)$ is not closed.
Hence, if $Z(f,a)$ is closed for every $a$, then $f\le g$.
Splendid! I have a single question -- why can we say that $\exists (x_{n}) \mbox{ s.t. } f(x_{n}) \rightarrow g(x)$? By assuming $f(x) > g(x)$, we've assumed that $f$ isn't continuous at $x$. –  duckworthd Aug 31 '11 at 9:28
...because if $g(x) = \liminf_{n \rightarrow \infty} f(x_n)$ then $\exists (x_{n_{i}}) \in (x_{n}) \mbox{ s.t. } \rightarrow x$. Is that correct? –  duckworthd Aug 31 '11 at 9:31
This does not concern the value of $f$ at $x$ nor its dis/continuity. Simply, for every neighborhood $U$ of $x$ and every positive $\epsilon$, there exists some $y$ in $U$ such that $|f(y)-g(x)|\le\epsilon$. (You may try to prove this by contradiction.) Hence you can construct a sequnce $(x_n)$ such that $x_n\to x$ and $|f(x_n)-g(x)|\le1/n$. Please tell me if you meet obstacles. –  Did Aug 31 '11 at 18:33