Characteristic function of Cantor set is Riemann integrable

I want to prove that the characteristic function of the Cantor set is Riemann integrable on $[0,1]$. Could somebody please tell me if my proof is correct?

Let $f$ be the characteristic function of the Cantor set and let $L(f,P)$ denote the lower Riemann sum and $U(f,P)$ the upper Riemann sum with respect to partition $P$.

First note that in any subinterval of $[0,1]$ there are points that are not in $C$, hence $L(f,P)=0$ for all partitions $P$, and hence $L(f)=0$.

Let $\varepsilon > 0$. If $C = \bigcap_n C_n$ then let $n$ be such that the length of $C_n$ is smaller than $\varepsilon$: $|C_n|<\varepsilon$. (Here $C_n$ is a union of $2^n$ closed intervals of length ${1 \over 3^n}$.)

Let $P$ be the partition consisting of the endpoints of the intervals in $C_n$ and let $I_k$ denote the intervals in $C_n$. Then $$ U(f,P) = \sum_k |I_k| < \varepsilon$$

Hence $U(f) = 0$ and therefore $\int_0^1 f = 0$.

Please note that I am not looking for a proof. I am asking if somebody could please check my proof.


Solution 1:

Let $\chi_A$ be the characteristic function of the set $A$.

Then, for any $n\geq 1$,

  • $\chi_{C_n}$ is a step function and its integral is equal to $\left(\dfrac{2}{3}\right)^n$ over $[0,1]$.
  • $\chi_C\leq \chi_{C_n}$.
  • the zero function is a step function lower than $\chi_C$ on $[0,1]$.

So, for any $n\geq 1$, $$0\leq \sup_{u\leq \chi_C} \int_0^1u \leq \inf_{u\geq \chi_C} \int_0^1u \leq \left(\dfrac{2}{3}\right)^n$$ where the $\sup$ and $\inf$ are taken over step functions on $[0,1]$.

Thus the upper integral $U(\chi_C)$ and the lower integral $L(\chi_C)$ of $\chi_C$ are equal and $\chi_C$ is integrable with $$\int_0^1\chi_C=0.$$