Lebesgue measurability of a set

Prompted by this question I was looking for $A \subset (0,1)$ such that for any interval $(a,b)\subset (0,1), A \cap (a,b)$ and $A^c \cap (a,b)$ are both uncountable. One such $A$ is the set of all numbers that have a finite number of $1$’s in their base $3$ expansion. As no choice was used in the construction, it should be Lebesgue measurable, but I can’t prove it. How is it proved?

Solutions Collecting From Web of "Lebesgue measurability of a set"

For each $n$, let $A_n$ be the subset of elements of $A$ that have at least a $1$ in the first $n$ digits of their ternary expansion, but no $1$s after the $n$th digit. Your set $A$ is equal to the union of the $A_n$s and the Cantor set. Each $A_n$ is a finite union of scaled translates of the Cantor set (take $3^{-n}C$, where $C$ is the Cantor set, to get all numbers that have ternary expansion with no $1$s and that have $0$ in the first $n$ positions; then you can “translate” by adding a suitable number that has a tail of $0$s and appropriate $1$s in the appropriate coordinates).

So each $A_n$ is a finite union of Lebesgue-measurable sets (scaled Cantor sets are Lebesgue-measurable, and translates of a Lebesgue-measurable set are Lebesgue-measurable), hence Lebesgue measurable. $A$ is a countable union of Lebesgue measurable sets, hence Lebesgue measurable.

Added. As Andres Caicedo points out in the comments below, the argument above shows that the set $A$ is in fact not merely Lebesgue measurable, but Borel.

The number $x_n$ in the $n^\text{th}$ place after the radix point in the ternary expansion of $x$ is a measurable function of $x$. This is true because the floor function is Borel measurable, and $x_n=\left\lfloor 3\cdot\left(3^{n-1}x-\lfloor3^{n-1}x\rfloor\right)\right\rfloor$. The set $\{x:x_n\neq 1\}$ is measurable for each $n$, and so therefore is the set $$\bigcup_{n=1}^\infty\bigcap_{k=n}^\infty \{x:x_k\neq 1\}.$$


Certain null sets of the second category give further examples of this. The complement of such a set can be contructed by taking a countable union of closed sets with empty interior whose complements have progressively smaller measure (e.g., using fat Cantor sets).