# Let $E$ be measurable and define $f:E\rightarrow\mathbb{R}$ such that $\{x\in E : f(x)>c\}$ is measurable for all $c\in\mathbb{Q}$, is $f$ measurable?

Let $E$ be measurable and define $f:E\rightarrow\mathbb{R}$ such that $\{x\in E : f(x)>c\}$ is measurable for all $c\in\mathbb{Q}$, is $f$ measurable?

There are a number of equivalent definitions for the measurability of a function and the most obvious one would be to show that $\{x\in E : f(x)>c\}$ is measurable for all $c\in\mathbb{R}$.

Thus my strategy has been to consider an arbitrary irrational $y$ and use the density of the rationals in the reals to show that there exists some open set $O$ such that $m^*(O-\{x\in E : f(x)>y\})< \varepsilon$. I would do this by choosing some rational $q<y$, close enough to $y$, such that the set of values in $E$ which get sent under $f$ to values strictly greater than $q$ and less than or equal to $y$ is small enough. But that doesn't in general seem possible since I could keep sending intervals of some fixed positive length to smaller and smaller regions just beneath $y$. However conversely, such a function would not be enough for a counter example, since finding such a function only rules out this strategy, but doesn't necessarily entail non-measurability.

Is there a better definition of the measurability of a set I should use? or does the statement actually not imply measurability? Thanks.

-
possible duplicate of Showing that $f$ is measurable. –  Martin Sleziak Nov 4 '12 at 5:48
This is strange - I have seen this question in the queue for reviewing close votes, but when I come here, it seems that my vote is first...? –  Martin Sleziak Nov 4 '12 at 5:50
@MartinSleziak: The two aren't duplicates. The other specifies that that the $r$ are irrational, while this specifies that they're rational. –  Cameron Buie Dec 3 '12 at 21:39
@CameronBuie Sorry for my mistake, I should have been more careful. –  Martin Sleziak Dec 4 '12 at 5:59

Yes. Given any $\alpha\in\Bbb R$, we can obtain $\{x\in E:f(x)>\alpha\}$ as the union of countably infinitely many sets of the form $\{x\in E:f(x)>c\}$ with $c\in\Bbb Q$. In particular, enumerate the rationals greater than $\alpha$ by $\{q_n\}_{n=1}^\infty$, and show that $$\{x\in E:f(x)>\alpha\}=\bigcup_{n=1}^\infty\{x\in E:f(x)>q_n\},$$ then use the fact that countable unions of measurable sets are measurable.