I was trying to prove (or disprove) whether or not all maps between profinite spaces are continuous.
One proof in favor was the following. Suppose we have a map of profinite sets $X\to Y$. For any finite quotient $Y\to\tilde{Y}$, the composition $X\to\tilde{Y}$ is continous, as maps to finite sets always are.
To elaborate, the map $X\to\tilde{Y}$ factors through $X\to X/\sim$. Here we have $x_1\sim x_2$ if they have the same image. Then $X/\sim$ is finite, hence discrete (as $X$ is totally disconnected). As a result, $X\to\tilde{Y}$ is continuous.
As a result, the map $X\to Y$ must be continuous, as $Y$ is obtained by taking the inverse limit of the system of the finite quotients. This concludes the proof in favor.
A proof against the statement is the following. Consider the set $X=\mathbb{N}\cup\{\infty\}$ with its usual order topology. This is profinite. However, consider the map $f:X\to X$, where $f(x)=x$ if $x\in\mathbb{N}$, and $f(\infty)=0$. If $f$ where continuous, its image would be compact. However, its image is $\mathbb{N}$, which is not compact.
So my question is, what goes wrong? Thanks in advance.