# Showing function is measurable iff it's measurable for each rational

Suppose that $f: D \rightarrow \mathbb{R}$, where $D$ is measurable. Show that $f$ is measurable if and only if $\{f > \alpha\}=\{x \in D \mid f(x) > \alpha\}$ is measurable for each rational $\alpha$.

So, if $f$ is measurable then the forward direction of this proof is trivial, since $\mathbb{Q} \subset \mathbb{R}$. The converse is what i'm having trouble with, obviously.

Somehow I need to use the density of the rational numbers to show that being measurable at for every rational $\alpha$ implies it is measurable for any $\alpha \in \mathbb{R}$.

Going to need help from all you genius's on this one!

I think you have the right idea: the intuition about $\mathbb Q$ being dense in $\mathbb R$ is key.
So pick any $y \in \mathbb R$. Can you justify the existence of a decreasing sequence of rational numbers $\alpha_n$ such that $\lim \alpha_n = y$?
Next, perhaps you could convince yourself that $$\{ x \in D : f(x) > y \} = \bigcup_{n \in \mathbb N} \{ x \in D : f(x) > \alpha_n \}.$$ Now use the closure of a sigma-algebra under countable unions...
• You wouldn't really need a decreasing sequence approaching $y.$ Just use the set of all rationals $\ge y.$ (You still need the fact that the rationals are dense in $\mathbb R.$) $\qquad$ – Michael Hardy Jun 18 '18 at 3:51