Continuous surjective functions $\omega_1 \to \omega_1$. I am looking for nontrivial examples of surjective continuous functions from $\omega_1$ onto  $\omega_1$ (with both $\omega_1$'s in the order topology).
What sorts of properties must these functions have?  Can you give an example that is very different from the identity? 
EDIT: More specifically, functions which are non-monotonic and/or non-one-to-one would be helpful.
 A: Here are a couple of not entirely trivial examples:


*

*Each $\alpha\in\omega_1$ can be written uniquely in the form $\omega\cdot\xi_\alpha+n_\alpha$ (ordinal arithmetic) with $\xi_\alpha\in\omega_1$ and $n_\alpha\in\omega$. For each $\xi\in\omega_1$ let $\sigma_\xi$ be a permutation of $\omega$ that fixes $0$. Define $$\varphi:\omega_1\to\omega_1:\alpha\mapsto\omega\cdot\xi_\alpha+\sigma_{\xi_\alpha}(n_\alpha)\;;$$ then $\varphi$ is continuous and bijective.

*More generally, if $0<\eta<\omega_1$, each $\alpha\in\omega_1$ can be written uniquely in the form $\omega^\eta\cdot\xi_\alpha+\rho_\alpha$ (all ordinal arithmetic) with $\xi_\alpha\in\omega_1$ and $\rho_\alpha\in\omega^\eta$. For each $\xi\in\omega_1$ let $\sigma_\xi$ be a continuous permutation of $\omega^\eta$ that fixes $0$; then $$\varphi:\omega_1\to\omega_1:\alpha\mapsto\omega^\eta\cdot\xi_\alpha+\sigma_{\xi_\alpha}(\rho_\alpha)$$ is continuous and bijective.

*Let $C=\{\gamma_\xi:\xi\in\omega_1\}$ be any closed, unbounded set in $\omega_1$ in its normal enumeration. The function $$\varphi:\omega_1\to\omega_1:\alpha\mapsto\min\{\xi\in\omega_1:\alpha\le\gamma_\xi\}$$ is well-defined, continuous, and surjective.
The first two of these are not in general monotonic, and the third is not in general a bijection. It’s easy enough to combine the two ideas to get examples that are neither.
Let’s see what we can say in general about such functions. Suppose that $\varphi:\omega_1\to\omega_1$ is a continuous surjection. For $\alpha\in\omega_1$ let $C_\alpha=\varphi^{-1}\big[\{\alpha\}\big]$; the family $\{C_\alpha:\alpha\in\omega_1\}$ of fibres of $\varphi$ is a partition of $\omega_1$ into closed sets. Note that if $A\subseteq\omega_1$ is unbounded, then $\varphi^{-1}[A]$ is also unbounded. Fix $\alpha\in\omega_1$ and let $K=\omega_1\setminus(\alpha+1)=\{\xi\in\omega_1:\xi>\alpha\}$; $K$ is closed and unbounded (a cub set), so $\varphi^{-1}[K]$ is a cub set. The intersection of two cub sets in $\omega_1$ is a cub set, and $C_\alpha\cap\varphi^{-1}[K]=\varnothing$, so $C_\alpha$ cannot be unbounded. Thus, $\varphi$ must have compact (hence bounded) fibres. It follows from the pressing-down lemma that if $S$ is any stationary subset of $\omega_1$, there is an $\alpha\in S$ such that $\varphi(\alpha)\ge\alpha$. Let $\Phi=\{\alpha\in\omega_1:\varphi(\alpha)=\alpha\}$, the set of fixed points of $\varphi$. A standard closing-off argument shows that $\Phi$ is unbounded, and of course $\Phi$ is closed. Thus, $\varphi$ has compact fibres and is the identity on a cub set. This further implies that any countable family of continuous surjections from $\omega_1$ to $\omega_1$ will agree on a cub set, since the family of cub sets is closed under countable intersections.
