Since the cat is out of the bag, maybe we could talk about Puzzle 3 a little, with an eye to constructive aspects. I’m not well-trained in constructive mathematics, so there’s a good chance I’ll learn something here.

I would guess that if you can prove “constructively” (whatever you take that to mean) that a compact metric space $(X, d)$ has a countable dense subset $x_n$, then the coast is clear. Assume, as we may, that the metric $d$ is valued in $I = [0, 1]$. The trick is first to use that sequence to embed $X$ in the Hilbert cube $I^\mathbb{N}$, by

$u: X \hookrightarrow I^\mathbb{N}$

$x \mapsto (d(x_n, x))_{n \in \mathbb{N}}.$

(By the way, this says that the Hilbert cube $I^\mathbb{N}$ also enjoys a ‘versal’ property: any compact metric space embeds into it.)

Now, Cantor space $C = \{0, 1\}^\mathbb{N}$ maps onto $I$ (Puzzle 1) by sending a sequence $(a_n)$ of $0$’s and $1$’s to $\sum_{n \geq 0} \frac{a_n}{2^{n+1}}$. Call this map $\lambda$ (partly in honor of Lebesgue: this map is closely related to the Cantor-Lebesgue function). Then there is a continuous surjection of $C$ onto the Hilbert cube, via a series of maps

$C = \{0, 1\}^\mathbb{N} \cong \{0, 1\}^{\mathbb{N} \times \mathbb{N}} \cong (\{0, 1\}^\mathbb{N})^\mathbb{N} \stackrel{\lambda^\mathbb{N}}{\to} I^\mathbb{N}.$

By taking a pullback in $Top$, the category of topological spaces,

$\array{
K & \hookrightarrow & C \\
\downarrow \mathrlap{q} & & \downarrow \mathrlap{surj} \\
X & \stackrel{u}{\hookrightarrow} & I^\mathbb{N}
}$

we get a continuous surjection $q: K \twoheadrightarrow X$ of a *subspace* $K$ of $C$ onto $X$.

Now all we need is a continuous surjection $r: C \to K$, since then $p = q \circ r: C \to X$ is the desired surjection. But I claim the inclusion $K \hookrightarrow C$ has a retraction $r$, constructively. Simply identify $C$ with the subspace of numbers in $[0, 1]$ which, written in base $5$, have only $0$’s and $4$’s. Then the average $\frac{x+y}{2}$ of any two $x, y \in C$ does not belong to $C$ (consider the first place where the base $5$ expansion of $x, y$ differ; then the average will have a $2$ in that place). It follows that for any $x \in C$, there is a *unique* $r(x) \in K$ such that

$d(x, r(x)) = \inf \{d(x, y): y \in K\}$

and $x \mapsto r(x)$ provides the desired retraction $r$.

## Re: Topology Puzzles

Please forgive me for asking, but what is the point of posing these puzzles? The answers are indeed widely known, and easily googled.