What is wrong in this proof: That $\mathbb{R}$ has measure zero

Here is a slight variation on your construction.

Consider $\mathbb{Q}$ which is countable, we may enumerate $\mathbb{Q}=\{q_1, q_2, \dots\}$. For each rational number $q_k$, cover it by an open interval $I_k$ centered at $q_k$ which does not contain $\pi.$

Each real number is arbitrarily close to a rational number since $\mathbb{Q}$ is dense in $\mathbb{R}$. Thus, each real number is in one of the open intervals. In particular, $\pi$ is in one of the open intervals.

Now, how can $\pi$ be in one of the open intervals, when each interval was specifically chosen to exclude $\pi$?

Yes, there are rational numbers arbitrarily close to $\pi.$ The catch is that, as the rationals get closer and closer to $\pi,$ the corresponding intervals get shorter and shorter.


This part

Each real number is arbitrarily close to a rational number since $\Bbb Q$ is dense in $\Bbb R$. Thus, each real number is in one of the open intervals.

is not true. For an arbitrary $x\in\Bbb R$, $x$ doesn't necessary lies in any of $I_k$'s. If you are not convinced, you can try showing that there exists an $I_k$ such that $x\in I_k$, it wouldn't be as easy as you thought.


This is not exactly an answer to your question, but is rather a historical digression and is too long for a comment.

The exact same question was asked by Axel Harnack in 1885 and he used interval $[0, 1]$ in place of whole of $\mathbb{R}$. Harnack convinced himself that his reasoning is correct and the interval $[0, 1]$ can be covered by a countable number of intervals of any desired length $\epsilon$. He believed that if $A$ is a union of a countable number of intervals then complement of $A$ (denoted by $A'$) is also a union of countable number of intervals. BTW the belief is correct if we replace "countable" by "finite".

His idea was that if $A = \bigcup_{k = 1}^{\infty}I_{k}$ then the complement $A' = [0, 1] - A$ is also a countable union of intervals. Moreover each such interval which is part of $A'$ must consist of only a single point, otherwise such intervals will contain an infinity of rational numbers. Thus $A'$ consists of a countable number of points and it can be covered by another set of intervals with total length less than $\epsilon$. Both $A$ and $A'$ together cover $[0, 1]$ and total length of intervals in both $A$ and $A'$ is less than $2\epsilon$.

Nobody thought that Harnack's proof above was flawed till Emile Borel appeared on scene. The assumption that complement of a countable union of intervals is again a countable union of intervals is wrong. Emile Borel proved the following theorem:

If $\{I_{k}\}$ is countable sequence of intervals such that each $I_{k} \subseteq [0, 1]$ and if the total length of intervals $I_{k}$ is less than $1$ then the complement $A' = [0, 1] - \bigcup_{k = 1}^{\infty}I_{k}$ necessarily contains an uncountable number of points.

Borel further mentioned that the above result actually leads to a much stronger result about a countable collection of open intervals namely:

Theorem: If $\{I_{k}\}$ is a countable collection of open intervals whose union contains $[a, b]$ then there is a finite number of these intervals $I_{k}$ whose union contains $[a, b]$.

This marks the birth of Heine Borel Theorem during 1895.

Note: The historical remarks above are taken from an excellent book A Radical Approach to Lebesgue's Theory of Integration by David M. Bressoud which describes the problems mathematicians faced with the concept of real number line and how these problems were finally resolved by Lebesgue using this theory of measure and integration.