A Borel perfectly everywhere surjective function on the Cantor set Does there exist a Borel (or even continuous) function $f:\mathcal{C}\to\mathcal{C}$, where $\mathcal{C}$ is the Cantor set (or Cantor space $2^\omega$) such that for every nonempty closed perfect set $P\subseteq\mathcal{C}$, $f|P$ maps surjectively onto $\mathcal{C}$?
Such functions (on $\mathbb{R}$) are called perfectly everywhere surjective here: https://core.ac.uk/download/pdf/83599431.pdf, but the maps constructed there rely on, in essence, a well-ordering of $\mathbb{R}$ and are likely far from any kind of measurability.
Hoping that the self-similarity of the Cantor set could be exploited here.
 A: As suggested by the comment above, the answer is no. The relevant fact is that every nonmeager subset of $\mathcal{C}$ with the Baire property (in particular, any Borel set) contains a nonempty closed perfect set.
Suppose that there was a Borel function $f$ with this property. Observe that for every $p\in\mathcal{C}$, $f^{-1}(\{p\})$ is a comeager Borel set: $f^{-1}(\{p\})$ is a Borel set which meets every nonmeager set, since nonmeager subsets of $\mathcal{C}$ must contain perfect sets, so its complement is meager.
But then, if we take $p\in\mathcal{C}$, $f^{-1}(\{p\})$ contains a perfect set which maps only onto $p$, a contradiction.
This argument works for any function which is Baire measurable, a similar argument can be given for Lebesgue measurable.
A: I think that recursion theory gives a clearer way to answer the question. If $f$ is a Borel function, then it is  a hyperarithmetic reduction relative to a real, say $x$. Then fix any "regular" forcing (random forcing, Cohen forcing etc) which always produce ``powerless" generic reals,  we may pick up a perfect set $P$ of such generic reals. Now restricted to  $P$,  $f$ cannot range over the whole Cantor space. For example, $\mathscr{O}^x$, the hyperjump of $x$, does not belong the range.
The method can be push up to more set theoretical. For example, by almost the same argument, it can be shown that in Solovay model, there is no such function.
