Proving measurable function: Real versus rational number I am working on this problem$^{(1)}$ on measurable function like this:

Show that $f$ is measurable if $(X, \mathcal A)$ is measurable space, $f$ is real-value function and $\{x \mid f(x) > r \} \in \mathcal A$ for each rational number $r.$

Earlier on the text gives this definition$^{{2}}$ of measurable function:

A function $f : X \to \mathbb R$ is measurable or $\mathcal A$-measurable if $\{x \mid f(x) > a \} \in \mathcal A$ for all $a \in \mathbb R.$

To an untrained eyes, the problem with this problem is that there seems to be no problem at all, except, perhaps, that the exercise says "$\forall r \in \mathbb Q$", whereas the definition says "$\forall a \in \mathbb R.$" Am I on the right track here? Please help me going forward if this is the right issue to tackle.
Thank you for your time and help.

Footnotes: 
(1) Richard F. Bass' Real Analysis, 2nd. edition, chapter 5: Measurable Functions, Exercise 5.1, page 44. 
(2) Definition 5.1, page 37.
 A: The exercise is assuming that $\{x : f(x) > r\} \in \mathcal A$ for each rational $r$. 
You now need to show that it holds for all $a \in \mathbb R$, not just the rationals, for it to satisfy the definition of measurable function.
You are on the right track.
As another exercise for you: this can be generalized slightly to the following, without much change to the proof:

Let $A$ be a dense subset of $\mathbb R$. Then $f$ is measurable if $\{x : f(x) > a\}$ is measurable for all $a \in A$.


As an update to your comment, I think the theorem itself you mentioned doesn't help directly, but the proof teaches you the technique you should use in this case. 
Pick $a \in \mathbb R$, since $\mathbb Q$ is dense in $\mathbb R$, find a sequence $\{q_k\}$ in $\mathbb Q$ such that $\displaystyle \lim_{k \to \infty} q_k = a$ (from above), then notice that $$\{x : f(x) > a\}  = \bigcup \{x : f(x) > q_k\}.$$
A: Hint: 
For $a\in\mathbb R$ let $(r_n)_n$ be a decreasing sequence in $\mathbb Q$ converging to $a$. 
Try to express $\{x\mid f(x)>a\}$ in the sets $\{x\mid f(x)>r_n\}$.
A: I am posting this solution that was spun out of solutions from @RobertCardona and @drhab , thanks to both of you for patiently fielding my clueless-at-best, dumb-at-worst questions.
(1) Let $a \in \mathbb R$ such that $\{x \mid f(x) > a \} \in \mathcal A$. Thus $f(x)$ is a measurable function. 
(2) $\forall a \in \mathbb R$, there exists a sequence {$r_k$}, $r_k \in \mathbb Q$ and $k \in \mathbb N$, such that $r_k$ converges to $a$. That is,
$$\lim_{k \to \infty} r_k = a.$$
(3) Observe that $\{x \mid f(x) > a \}$ can be expressed in term of many, many $ \{x \mid f(x) > r_k\}$. Thus,
$$\{x \mid f(x) > a \} = \bigcup _{k=1}^{\infty} \{x \mid f(x) > r_k\}.$$
(4) Recall that $\{x \mid f(x) > r_k\} \in \mathcal A$ by hypothesis. Since union of measurable sets is also measurable, therefore
$$\bigcup _{k=1}^{\infty} \{x \mid f(x) > r_k\} \in \mathcal A,$$
where $r_k$ is rational number.
(5) Since the $f(x)$ in the RHS of equation (3) is a measurable function, thus it's  implied that the $f(x)$ in the LHS is also measurable function for $r \in \mathbb Q.$ $\qquad \blacksquare$
