TITLE: Is a semicontinuous real function  Borel measurable?
QUESTION [7 upvotes]: Let $f(x,u): [0,1]^2 \mapsto \mathbb{R}$ be a continuous
function.
[Q] Is $g(x) = \inf_{u\in [0,1]} f(x,u)$ always Borel measurable?
If not, can one find a counter-example?
Note that, for any $c$, 
we have
$$(x: g(x) < c) = \text{Proj}_x ((x,u): f(x,u) < c),$$
where $\text{Proj}_x$ is a projection operator to $x$-axis.
In the context of measurable selection theorem,
the projection of Borel set $((x,u): f(x,u) < c)$  of
$\mathbb{R}^2$ is
not necessarily a Borel set of $\mathbb{R}$.
But, I can not find a counter-example.
If there exists a proper counter-example, then it also
implies that a semicontinuous real function is not necessarily  Borel measurable.
Thanks.

REPLY [2 votes]: I think every (lower) semicontinuous function $f:X \to \mathbb{R}$ is Borel measurable, since you have the following characterization: for every $a \in \mathbb{R}$ the set
$$ f^{-1}((-\infty, a])$$
is closed in the topology that you are considering in $X$.
Since you only have to check the measurability property for a generating class of the Borelians in $\mathbb{R}$ you are done.