Is there a continuous surjection from $\mathbb R$ to $C_p([0,1])$?

A classical theorem in $C_p(X)$ theory, proved in Problem/Theorem 186 of "A $C_p$-Theory Problem Book (part1, Topological and Function Spaces)" by Tkachuk (which comes highly recommended if you're interested in spaces of the form $C_p(X)$):

Suppose $X$ is Tychonoff. Then the following are equivalent:

  1. $C_p(X)$ is $\sigma$-compact.
  2. $C_p(X)$ is $\sigma$-countably compact.
  3. $C_p(X)$ is locally compact.
  4. $C_p(X)$ is locally pseudocompact.
  5. $X$ is finite and discrete (so that $C_p(X) \simeq \mathbb{R}^n$ for some finite $n$).

A continuous image of $\mathbb{R}$ is $\sigma$-compact and $[0,1]$ is not finite, so we cannot have such a surjection.

The argument you referred to for the specific case $C_p(\mathbb{R})$ is conceptually simpler, but does not go straight through as $[0,1]$ does not have a nice infinite discrete $C$-embedded subspace like $\mathbb{N}$).


Henno Brandsma's answer give a reference for a more general question. Here I will just record a mostly self-contained proof for this specific case.

Given a function $\phi:\mathbb R\to C_p([0,1]),$ let $K_m$ be the image of $[-m,m]$ for each integer $m\geq 1.$ Inductively define a sequence of closed sets by $X_0=C_p([0,1])$ and for each $n\geq 1:$

  • $m_n=\min\{m\geq 1\mid K_m\cap X_{n-1}\neq \emptyset\},$ or $m_n=\infty$ if there is no such $m$
  • $X_n=\{f\in X_{n-1}\mid f(1/n)=(-1)^n/m_n\},$ where $1/\infty=0.$

So $m_n$ is a weakly increasing sequence, and $X_n$ is a weakly decreasing sequence of sets.

If $\max_n(m_n)=m<\infty,$ then $K_m\cap X_{n-1}\neq\emptyset$ never becomes empty for any $n.$ If $K_m$ were compact, then $(K_m\cap X_{n-1})_{n\geq 1}$ would be a non-increasing sequence of non-empty closed sets, so there would be some $f\in\bigcap_{n\geq 1}(K_m\cap X_{n-1}).$ But that gives $\liminf_{n\to \infty} f(1/n)\leq -1/m$ and $\limsup_{n\to\infty} f(1/n)\geq 1/m,$ which is not possible because $f$ must be continuous at $0.$ So in this case $K_m$ is not compact.

If $m_n\to\infty$ then $\bigcap_{n\geq 1} X_n$ contains the function $f:[0,1]\to\mathbb R$ that linearly interpolates between the points $(1/n,(-1)^n/m_n),$ setting $f(0)=0$ (note $1/m_n\to 0$). But for each $m$ we have $m_n>m$ for some $n,$ which gives $K_m\cap X_{n-1}=\emptyset,$ which implies $f\not\in K_m.$ So in this case $f\not\in\bigcup_{m\geq 1} K_m.$

In either case we have shown that $\{K_m\}$ is not a cover of $C_p([0,1])$ by compact sets. This means the original function $\phi$ is either not continuous or not surjective.