TITLE: Generalizations of the Tietze extension theorem (and Lusin's theorem)
QUESTION [15 upvotes]: I am reasking a year-old math.stackexchange.com question asked by someone else.
(For my needs every space $X$ and $Y$ will be Polish---that is a completely separably metrizable space.)
The Tietze extension theorem says that if $X$ is a Polish space (even a normal space) and $Y=\mathbb{R}^n$, then a continuous function $f:C \rightarrow Y$ on a closed set $C \subseteq X$ can be extended to a continuous function $g:X \rightarrow Y$.
It seems important to the theorem in general that $Y = \mathbb{R}^n$, however there are some examples of pairs $X,Y$ where the theorem also holds.  For example, it is true if $X, Y \in \{2^\mathbb{N},\mathbb{N}^\mathbb{N}\}$.  (Although, other pairs like $X=\mathbb{R}, Y = 2^\mathbb{N}$ do not hold.)

Is there a characterization of the pairs $X,Y$ (or $X,Y,C$) for which the Tietze extension theorem holds?
If not, what extensions are known, especially those that include my $2^\mathbb{N}$ example above?


One motivation for asking this question is Lusin's theorem:
If $(X,\mathcal{B},P)$ is a Borel probability measure on a Polish space $X$ (even a Radon measure on a finite measure space) and $f:X \rightarrow Y$ is a measurable map (again $Y$ is Polish, or even second countable), then for all $\varepsilon > 0$, there is a closed set $C$ of measure $1-\varepsilon$ such that $f$ is continuous on $C$.
If $Y$ is $\mathbb{R}^n$, we can apply the Tietze extension theorem to find some continuous $g:X \rightarrow Y$ such that $g = f$ on $C$.  Wikipedia currently (12 July 2013) has a false statement that for any locally compact $X$ we can find such a continuous $g:X \rightarrow Y$.  For a counterexample, take $X=[0,1]$ and $Y=2^\mathbb{N}$ and $f$ to be the bit representation of the reals.
I am interested in which cases this stronger version of Lusin's thoerem (with the continuous $g:X \rightarrow Y$) holds.

REPLY [6 votes]: A compact space $Y$ is called an absolute extensor in dimension $0$ abbreviated $AE(0)$ if the pair $X,Y$ satisfies Tietze extension theorem for every compact zero-dimensional $X$. Any compact (retract of a) topological group is $AE(0)$ (Schepin/Uspenski). In particular $2^\mathbb{N}$ is $AE(0)$. In fact, Schepin proved that the only zero-dimensional $AE(0)$ space with character $\kappa$ at every point is $2^\kappa$.