Question: Let $C[0,1]$ be the set of all continuous function from $[0,1]$ to $\mathbb R$. Prove that the cardinality of $C[0,1]$ is equal to that of $\mathbb R$.
My attempt: Let $X$ be a countable dense subset of $[0,1]$.
- $f$ is continuous. So, $f$ is determined by its restriction to $X$.
- Also the restriction to $X$ determines an injection from $C[0,1]$ into $C(X)$.
- #$C(X) =$#$\mathbb{R}$ implies $C[0,1] \leq$ #$\mathbb{R}$.
Now we want to prove #$\mathbb{R} \leq$ #$C[0,1]$.
Now for each $a \in [0,1]$ the map $a \mapsto f_a$ ($f_a(x) = a\ \forall\ x\in [0,1]$) defines an injection from $[0,1]$ into $C[0,1]$. Since #$[0,1] =$#$\mathbb{R}$, we get #$\mathbb{R} \leq$ #$C[0,1]$.
Is it correct? I am confused about the second inequality.