Equibounded $L_1[0,1]$ is not compact metric space with cardinality $2^\mathbb{R}$? I came across the following theorem:

Let $M$ be a metric space. $M$ is compact if and only $M$ is the continuous image of the cantor set. (see reference)

An immediate consequence of this theorem is that any compact metric space has cardinality no larger than $\mathbb{R}$. This seems wrong to me. Consider the space of equibounded functions in $L_1[0,1]$. That is, take $M > 0$, and let 
$$ X = \big{\{} f \in L_1[0,1] : |f(x)| \leq M \ \text{for all } x \in [0,1] \big{\}} $$
I have the following observations:


*

*$X$ is obviously a metric space with the $L_1$ norm.

*$X$ is obviously totally bounded.

*$X$ obviously inherits completeness from $L_1[0,1]$.

*$X$ obviously inherits its cardinality $\# X = 2^\mathbb{R}$ from $L_1[0,1]$.


One of the above four observations must be wrong, or else we have violated the above theorem. An alternative explanation would be that theorem is wrong and the proof presented in Willard's General Topology makes an implicit assumption on the cardinality of the metric space.
Overall I am least confident in my second observation. While my intuition tells me this set is totally bounded, this could be an example of a space that is bounded but not totally bounded.
Any thoughts on which of these observations is/are wrong would be appreciated. Thanks!
 A: The space $L^1[0,1]$ does not have cardinality $2^{|\mathbb{R}|}$; it has cardinality $|\mathbb{R}|$.  For instance, this is immediate from the fact that $L^1[0,1]$ is a separable metric space.  Choosing a countable dense subset $D$, every element of $L^1[0,1]$ is the limit of some sequence in $D$, showing that $|L^1[0,1]|\leq|D^{\mathbb{N}}|=|\mathbb{R}|$.
(It is true that there are $2^{|\mathbb{R}|}$ Lebesgue-measurable functions $[0,1]\to\mathbb{R}$, but remember that elements of $L^1[0,1]$ are equivalence classes of such functions modulo equality on sets of measure $0$.)

More subtly, $X$ is not totally bounded either.  Here's a nice way to prove this: let $f_n(x)$ be the $n$th digit of the binary expansion of $x\in[0,1]$.  Then $f_n\in X$ (assuming $M\geq 1$).  However, if $m\neq n$, then $\|f_n-f_m\|_1=1/2$: if you pick a number randomly from $[0,1]$, there is a $1/2$ chance its $m$th and $n$th binary digits are the same and a $1/2$ chance they are different, so $|f_n-f_m|=0$ on a set of measure $1/2$ and $|f_n-f_m|=1$ on its complement.  So we have infinitely many elements of $X$ such that the distance between any two is $1/2$, so $X$ is not totally bounded.
A: Take $M=1.$ For distinct $m,n\in \mathbb N,$
$$\int_0^1|\sin (2\pi mx) - \sin (2\pi nx)|\,dx =2\int_0^1\frac{|\sin (2\pi mx) - \sin (2\pi nx)|}{2}\,dx$$ $$ \ge 2\int_0^1\left (\frac{\sin (2\pi mx) - \sin (2\pi nx))}{2}\right)^2\,dx = \frac{1}{2}\int_0^1(\sin^2 2\pi mx + \sin^2 2\pi n)\,dx = \frac{1}{2}.$$
The inequality follows because if $0\le f\le 1,$ then $\int_0^1 f\ge \int_0^1f^2.$ Squaring the integrand allows us to use the orthogonality of the functions $\sin (2\pi nx).$ Thus the sequence $\sin (2\pi nx)$ in $X$ cannot have a convergent subsequence, showing $X$ is not compact.
