Solution (source code)

= Solution

The <Borel sigma-algebra> $\mathcal B(\mathbb R)$ is the smallest <sigma-algebra> containing all open subsets of $\mathbb R$. A real-valued <Borel measurable function> on $(E,\mathcal E)$ is a map $f$ with $f^{-1}(B)\in\mathcal E$ for every $B\in\mathcal B(\mathbb R)$. It suffices to test the <sets> $(a,\infty)$ for rational $a$, because these generate the <Borel sigma-algebra>.

Here “Borel <function>” describes measurability into the Borel structure of the target; the domain need not itself be a topological space.