Q:

Prove that if $\displaystyle f : \mathbb{R} \longrightarrow [o,\infty] $ and $\displaystyle f^{-1}((r,\infty]) \in M $ for each $\displaystyle r \in \mathbb{Q} $, then $\displaystyle f $ is lebesgue measurable. ($\displaystyle M $ is the $\displaystyle \sigma $-algebra of Lebesgue measurable sets)

Attempt:

I need to show that for any set $\displaystyle A \in \mathcal{B}_{[0,\infty]} $, $\displaystyle f^{-1}(A) \in M $ (is this correct?). So I take a set $\displaystyle A \in \mathcal{B}_{[0,\infty]} $. By definition of $\displaystyle \mathcal{B}_{[0,\infty]} $, $\displaystyle A $ is an open interval (is this correct?). Now, i want to write $\displaystyle A $ as a union of sets of the form $\displaystyle (r,\infty] $ for each $\displaystyle r \in \mathbb{Q} $ but im sturggling to do this! Is this the right method? Can you help me? Thank you