Solution (source code)

= Solution

Writing $\mathcal L$ for the collection of <Lebesgue measurable sets>, saying that $\mathcal L$ is a <sigma-algebra> means that $\mathbb R\in\mathcal L$, that $\mathbb R\setminus A\in\mathcal L$ whenever $A\in\mathcal L$, and that $\bigcup_{n=1}^{\infty}A_n\in\mathcal L$ whenever every $A_n\in\mathcal L$. These properties also imply closure under countable intersections and differences.

A real-valued <function> $f$ is a Lebesgue <measurable function> precisely when the <inverse image> of every <Borel set> is in $\mathcal L$. Equivalently, it suffices to test the half-lines:
$$
\boxed{\{x:f(x)>a\}\in\mathcal L\quad\text{for every }a\in\mathbb R.}
$$
The equivalence follows because these half-lines generate the <Borel sigma-algebra>, and <inverse images> preserve complements and countable unions.