Let \((X, \mcm_X)\) and \((Y, \mcm_Y)\) be measurable spaces. A function \(f\colon X \to Y\) is \((\mcm_X, \mcm_Y)\)-measurable if \(\inverseof{f}(B)\in\mcm_X\) for every \(B\in\mcm_Y\). Let \(\mcb_\RR\) and \(\mcb_{\RR^d}\) denote the Borel \(\sigma\)-algebras and \(\mcl_{\RR^d}\) the \(\sigma\)-algebra of Lebesgue measurable subsets of \(\RR^d\).
A function \(f\colon X\to \RR\) on a measurable space \((X, \mcm_X)\) is measurable if it is \((\mcm_X, \mcb_\RR)\)-measurable.
A function \(f\colon \RR^d\to \RR\) is Borel measurable if it is \((\mcb_{\RR^d}, \mcb_\RR)\)-measurable.
A function \(f\colon \RR^d\to \RR\) is Lebesgue measurable if it is \((\mcl_{\RR^d}, \mcb_\RR)\)-measurable.
Let \((X, \mcm_X)\) and \((Y, \mcm_Y)\) be measurable spaces, and let \(\mce\subseteq\mcm_Y\) be a family of sets that generates \(\mcm_Y\) as a \(\sigma\)-algebra. A function \(f\colon X\to Y\) is \((\mcm_X,\mcm_Y)\)-measurable if and only if \(\inverseof{f}(E)\in\mcm_X\) for every \(E\in\mce\).
In particular, since \(\mcb_\RR\) is generated by each of the families of rays below, a function \(f\colon X\to\RR\) is measurable if and only if any one of the following holds for every \(\alpha \in \RR\):
\(\inverseof{f}((\alpha, \infty))\in \mcm_X\);
\(\inverseof{f}([\alpha, \infty))\in \mcm_X\);
\(\inverseof{f}((-\infty, \alpha))\in \mcm_X\);
\(\inverseof{f}((-\infty, \alpha])\in \mcm_X\).
The forward implication holds because \(\mce\subseteq\mcm_Y\). Conversely, the family \(\theset{B\subseteq Y \suchthat \inverseof{f}(B)\in\mcm_X}\) is a \(\sigma\)-algebra, because preimages commute with complements and countable unions, and it contains \(\mce\); hence it contains the \(\sigma\)-algebra \(\mcm_Y\) generated by \(\mce\).