Mortivation for the definition of measurable function? 1) We say that $f:\mathbb R^n\to \mathbb R$ is measurable if $$\{x\in\mathbb R^n\mid f(x)<\alpha \},\tag{D}$$
is measurable for all $\alpha $. What is the motivation for such definition ? 
We can define for example continuity as : $f^{-1}(O)$ is open in $\mathbb R^n$ for all open set in $\mathbb R$. A possible definition for measurability could be for example $f^{-1}(O)$ is measurable for all open of $\mathbb R$, no ? So what is the motivation for the definition (D) ? 
2) In more abstract measurable spaces, $f:(X,\mathcal F)\to (Y, \mathcal G)$ we say that $f$ is measurable if $$f^{-1}(U)\in \mathcal F\tag{D'}$$ for al $U\in \mathcal G$. Is there a correlation with the definition (D) ? For example, if $Y$ is a space with an order $\mathcal R$, would it be equivalent to $$\{x\in X\mid f(x)\mathcal R\alpha \}\in \mathcal F,$$
for all $\alpha \in Y$ ? Because I unfortunately don't really see the relation between (D) and (D').  
 A: $(D)$ is actually a necessary and sufficient condition for $f:\mathbb R^n\to\mathbb R$ to be measurable if $\mathbb R$ is equipped with the Borel-$\sigma$-algebra. 
Especially the fact that it is sufficient is useful, and makes it easy to prove that functions are measurable.
In general if $X$ is a topological space with topology $\tau$ then by definition the corresponding Borel-$\sigma$-algebra is the $\sigma$-algebra generated by $\tau$ and denoted by $\sigma(\tau)$.
Here $\mathbb R$ is looked at as equipped with its usual topology.
If $\tau$ denotes this topology and $\mathcal M$ denotes the $\sigma$-algebra on $\mathbb R^n$ then it can be shown that $$f^{-1}(\sigma(\tau))\subseteq \mathcal M\text{ if and only if }f^{-1}((-\infty,\alpha))\in\mathcal M\text{ for every }\alpha\in\mathbb R$$
Here $f^{-1}(\sigma(\tau))$ serves as a notation for $\{f^{-1}(A)\mid A\in\sigma(\tau)\}$.
Note that $f^{-1}((-\infty,\alpha))=\{x\in\mathbb R^n\mid f(x)<\alpha\}$.
A: The two definitions are equivalent with the standard Borel sigma algebra.
The main trick is as follows: when checking the second definition, you don't need to check all $U\in\mathcal{G}$ - it is sufficient to check a generating set. For example, the open sets do generate the Borel sigma algebra so your suggested definition of measurability is also equivalent. But we can find an even smaller generating set, which is what the definition (D) is based on: all rays of the form $(-\infty,a)$.
And that's how you should read $(D)$. $f$ is measurable if $f^{-1}((-\infty,a))$ is measurable for each $a\in\mathbb{R}$.
