TITLE: Show that f is measurable
QUESTION [5 upvotes]: Let $U$ be a open Set of $\mathbb{R} \times [0,\infty]$ and let f be defined as
$$f: \mathbb{R}\mapsto [0,\infty], \quad f(x) := \max\{0,\sup\{y| (x,y) \in U\}\} $$
How can I show that $f$ is measurable?

REPLY [2 votes]: By replacing $U$ with $U \cap [\Bbb{R} \times [0,\infty)]$, we can assume $U \subset \Bbb{R} \times [0,\infty)$ (this does not change $f$, because $U$ is open (why?)).
Now, the product $\sigma$-algebra on $\Bbb{R}^2$ of the Borel-$\sigma$-algebra on $\Bbb{R}$ is just the Borel-$\sigma$-Algebra on $\Bbb{R}^2$.
This implies, that the map $x \mapsto \chi_U (x,y)$ is measurable for every $y \in \Bbb{R}$.
Now note that
$$
f(x) = \sup_{y \in \Bbb{Q}} [y \cdot \chi_U (x,y)]
$$
holds (why? This again uses the fact that $U$ is open).
It is now an easy matter to show that the supremum of a countable(!) family of measurable functions is measurable, which implies your claim.

REPLY [2 votes]: Define $g:\mathbb{R}\rightarrow\left[0,\infty\right]$ by $x\mapsto\sup\left\{ y\mid\left(x,y\right)\in U\right\} $ and let $c\in\mathbb R$ be a constant.
If $x\in\left\{ g>c\right\} $ then set $U$ contains an element $\left(x,y\right)$
with $y>c$. 
Find some $\epsilon>0$ s.t. $y-\epsilon>c$ and $\left(x-\epsilon,x+\epsilon\right)\times\left(y-\epsilon,y+\epsilon\right)$
is a subset of $U$. 
This is possible because $U$ is open and leads
to: $\left(x-\epsilon,x+\epsilon\right)\subset\left\{ g>c\right\} $.
Proved is now that set $\left\{ g>c\right\} $ is open, hence Borel-measurable.
This is true for any $c\in\mathbb{R}$ allowing the conclusion that
$g$ is Borel-measurable. 
Then also $f$ prescribed by $x\mapsto\max\left\{ 0,g\left(x\right)\right\} $
is Borel-measurable.