Let $(X, \Sigma )$ be a measurable space and $f: X \rightarrow \mathbb R$ a function. Let $\mathbb Q = \{ q_1, q_2, \dots \}$ be the set of rational numbers ordered into a sequence. Prove that $f$ is measurable if and only if $f^{-1} \big([q_n, q_m)\big) \in \Sigma$ for all $m,n \geq 1$.
Can someone help please.
Assuming we're dealing with the Borel $\sigma$-algebra on $\mathbb{R}$. You should how that $\{[q_n,q_m): q_n,q_m \in Q\}$ generate the Borel $\sigma$-algebra.
This is simple: Let $a_n$ be a decreasing sequence of rational numbers which tends to $-\infty$ , and $b_n$ be an increasing sequence of rational numbers which converges to $b$, and $b\in \mathbb{R}$. Then, $\cup_{n=1}^{\infty} [a_n,b_n) = (-\infty,b)$. Likewise, you can write any set in $[q_m,q_n)$ as $(-\infty,q_n) \cap (-\infty, q_m)^C$. Thus, the set of intervals $[q_m, q_n)$ and intervals $(-\infty,b)$ generate the same $\sigma$-algebra (the Borel $\sigma$-algebra).
Then, $\cup_{n=1}^\infty f^{-1} [a_n,b_n) = f^{-1} (\cup_{n=1}^{\infty} [a_n,b_n) ) = f^{-1} (-\infty,b)$ and $\cup_{n=1}^\infty f^{-1} [a_n,b_n) \in \Sigma$. Since intervals of the form $(-\infty,b)$ generate the Borel $\sigma$-algebra, you have shown that the inverse image of any Borel set is measurable.