I'm looking for a reference for the theorem saying that a real-valued lower (upper) semicontinuous function on any metric space can be reached as a pointwise limit by a non-decreasing (non-increasing) sequence of continuous functions.


To provide some context, I'm interested in the special case, where the metric space is $\overline{\mathbb{R}}\times\mathbb{R}^N$ with $\overline{\mathbb{R}}$ being the two-point compactification of a real line and a lower semicontinuous function $f:\overline{\mathbb{R}}\times\mathbb{R}^N\to[0,\infty)$ is an extension of a continuous function $g\in C(\mathbb{R}\times\mathbb{R}^N;[0,\infty))$ given by
$$f(x,y):=\begin{cases} g(x,y) &for &(x,y)\in \mathbb{R}\times\mathbb{R}^N \\ 0 &for & (x,y)\in\{\pm\infty\}\times\mathbb{R}^N\end{cases}.$$
The function $g$ satisfies an additional homogeneity condition: $g(x,\alpha y)=\alpha g(x,y)$ for $\alpha\geq 0$ and all $x,y$ and this property carries over to $f$ obviously. I'm wondering if I can guarantee that the approximating sequence also fulfills this condition.


Thank you.



Approximation of semicontinuous function
As your function has a particularly simple form, it might be the easiest to just explicitly write down a nice approximating sequence.


$$f\_n(x,y) = \begin{cases} g(x,y) & |x| \leq n \\ (n + 1 - |x|)g(x,y) & n \leq |x| \leq n+1 \\ 0 & |x| > |n+1|\end{cases} $$


Homogeniety of $f\_n$ in $y$ is now inherited directly from $g$. Moreover, for each fixed $x$ and $y$ the sequence $(f\_n(x,y))\_{n \in \mathbb{N}}$ is eventually constant.


