Define $g(a) := \liminf_{x \to a} f(x)$ for all $a \in X$. Then $g$ is lower semi-continuous Let $X$ be a topological space. Then I'm trying to prove below result about a function $g$ derived from $f$.

Theorem: Let $f:X \to \mathbb R \cup \{\pm \infty\}$. For $a \in X$, let $\mathcal N_a$ be the set of all open neighborhoods of $a$. We define a function $g:X \to \mathbb R \cup \{\pm \infty\}$ by
$$
g(a) := \liminf_{x \to a} f(x) := \sup _{V \in \mathcal N_a} \inf _{x \in V} f(x) \quad \forall a \in X.
$$
Then $g \le f$ and $g$ is lower semi-continuous.


*

*Could you have a check on my attempt?


*Is there another simpler proof that uses the criterion "$g$ is l.s.c. iff for all $\lambda \in \mathbb R$, the set $\{x \in X \mid g(x) \le \lambda\}$ is closed in $X$"?

My attempt: Clearly, $g \le f$. Fix $a \in X$. We want to prove
$$
g(a) \le \liminf_{x \to a} g(x).
$$

Lemma: Let $g:X \to \mathbb R \cup \{\pm \infty\}$. Fix $a \in X$ and $\beta \in \mathbb R$. The following statements are equivalent.

*

*$$
\beta \le \liminf _{x \to a} g (x)
$$

*If $(x_d)$ is a net such that $x_d \to a$ and $g(x_d) \to \alpha$, then $\alpha \ge \beta$.


Let $(x_d)_{d\in D}$ be a net such that $x_d \to a$ and $g(x_d) \to \alpha$. By our Lemma, it suffices to show $\alpha \ge g(a)$. For each $(V, n) \in \mathcal N_a \times \mathbb N$,

*

*There is $d_1 \in D$ such that $g(x_{d}) \in U_n := (\alpha - \frac{1}{n}, \alpha + \frac{1}{n})$ for all $d \ge d_1$.

*There is $d_2 \in D$ such that $x_{d} \in V$ for all $d \ge d_2$.

*There is $d_3 \in D$ such that $d_3  \ge d_2$ and $d_3  \ge d_1$.

*By this result, there is a net $(y_t)$ such that $y_t \to x_{d_3}$ and $f(y_t) \to g(x_{d_3})$.

*Clearly, $U_n$ is a neighborhood of $g(x_{d_3})$, and $V$ an open neighborhood of $x_{d_3}$. Then there is $y_{t_0}$ such that $y_{t_0} \in V$ and $f(y_{t_0}) \in U_n$.

*Let $y_{V, n} := y_{t_0}$.

We endow $\mathcal N_a \times \mathbb N$ with a partial order $\le$ defined by
$$
(V_1, n_1) \le (V_2, n_2) \iff (V_1 \supset V_2) \wedge (n_1 \le n_2).
$$
Then $(\mathcal N_a \times \mathbb N, \le)$ is a directed set. By construction, and $y_{V, n} \to a$ and $f(y_{V,n}) \to \alpha$. By this result, $\liminf_{x \to a} f(x)$ is the smallest cluster point among all convergent nets $(f(x_t))$ such that $x_t \to a$. This implies $\alpha \ge \liminf_{x \to a} f(x)$. This completes the proof.
 A: The proof you wrote is correct but difficult to follow. You can clean up your proof by more clearly stating the net condition you are employing: $g$ is lsc if and only if every convergent net $x_d \to x$ satisfies
$$
g(x) \leq \liminf_{d \in D} g(x_d) := \sup_{d \in D} \inf_{d \leq \bar d} g(x_{\bar d}).
$$

We can also avoid nets entirely. Let's use the level set criterion: $g$ is lsc iff $L(g, \lambda) := \{ x \in X : g(x) \leq \lambda\}$ is closed for each $\lambda \in \mathbb{R}$, for the function $g = \liminf f$. Of course it suffices to show that the complement $L(g, \lambda)^c$ is open.
For a given $\lambda \in \mathbb{R}$, suppose $x  \in L(g, \lambda)^c$. Then $\liminf_{y \to x} f(y) > \lambda$, which implies that there exists an open neighborhood $U_0 \in \mathcal{N}_x$ such that $\inf_{y \in U_0} f(y) > \lambda$. Let $x' \in U_0$ be arbitrary. Then
$$
\liminf_{y \to x'} f(y) = \sup_{U \in \mathcal{N}_{x'}} \inf_{y \in U} f(y) \geq \inf_{y \in U_0} f(y) > \lambda.
$$
Hence, $U_0 \subset L(g,\lambda)^c$, which implies that $L(g, \lambda)^c$ is open; so $L(g,\lambda)$ is closed.
