Showing that $f$ is measurable. Below is a proof to show that if $f$ is a real function on a measurable space $X$ such that
$\{x : f(x) \gt r\}$ is measurable for every irrational $r$, then $f$ is measurable.  
Suppose $\{x \in X | f(x) \gt r\}$ is measurable, $r\in \mathbb{R\setminus Q}$. Let $d\in\mathbb{R}$. Then for each $n$ $\exists$ $r_n\in\mathbb{R\setminus Q}$ such that $r_n \gt d$. Then 
$$ \{x | f(x) \gt d\} = \bigcup_{n=1}^\infty \{x | f(x) \gt r_n\}.$$
Since $\{x | f(x) \gt r_n\} $ is measurable, $f$ is measurable.  
Please, is this right?
 A: My problem is with this statement in your proof. The rest seems fine.
$$\displaystyle \{x|f(x)>d\}=\bigcup_{n=1}^\infty \{x|f(x)>r_n\}.$$
If you do not place suitable restrictions upon your $r_n$, I do not think it is true.
For example, see the case when $d=3$. We will see that for some $r_n$s not chosen carefully, that equality is not true. Choose $r_n=n\pi$. It is a sequence of irrational numbers, and they are all bigger than $d=3$. Just like your condition.
BUT, if there was an $a \in X$ for which $f(a)$ was say $3.1$ (just to give an example), then, since $3.1$ is bigger than $3$, $a \in \{x|f(x)>3\}$, the LHS . But since $3.1$ is smaller than any $n\pi$ for positive $n$, $a\notin \displaystyle \bigcup_{n=1}^\infty \{x|f(x)>r_n\}$. So those sets are not equal. 
To remedy this, we must eliminate that "gap" we saw between $3.1$(or I could have done all of this with 3.01 or 3.001 or as close to 3 as I wanted)  and the $r_n$s. So, the way to make sure this doesnt happen, is to make sure that $r_n \to d$.
A: With $d \in \mathbb{Q}$, choose irrationals $r_n$ such that $r_n \downarrow d$ (ie, each $r_n \geq d$, and $r_n$ converges to $d$). Then your construction works, because the set on the right is the countable union of measurable sets.
