[proofplan]
We prove continuity using the open-set definition: a function between topological spaces is continuous exactly when the preimage of every open set in the codomain is open in the domain. Since the codomain topology is indiscrete, the only open subsets of $Y$ are $\varnothing$ and $Y$. Their preimages under any function are respectively $\varnothing$ and $X$, both of which are open in every topology on $X$.
[/proofplan]
[step:Use the open-set criterion for continuity]
Let $\tau_Y:=\{\varnothing,Y\}$ denote the indiscrete topology on $Y$. By the [definition of continuity](/page/Continuity) for maps between [topological spaces](/page/Topological%20Space), it suffices to prove that for every set $V\in\tau_Y$, the preimage
$f^{-1}(V):=\{x\in X:f(x)\in V\}$
belongs to $\tau_X$.
[guided]
Let $\tau_Y:=\{\varnothing,Y\}$ denote the indiscrete topology on $Y$. We use the open-set definition of [continuity](/page/Continuity): a map $f:(X,\tau_X)\to(Y,\tau_Y)$ is continuous if, for every open set $V\in\tau_Y$, the preimage
$f^{-1}(V):=\{x\in X:f(x)\in V\}$
is an open set in $X$, meaning $f^{-1}(V)\in\tau_X$.
Thus the problem reduces to checking preimages of open subsets of $Y$. The special feature of the indiscrete topology is that there are only two such subsets, namely $\varnothing$ and $Y$.
[/guided]
[/step]
[step:Check the only two open subsets of the indiscrete codomain]
Let $V\in\tau_Y$. Since $\tau_Y=\{\varnothing,Y\}$, either $V=\varnothing$ or $V=Y$.
If $V=\varnothing$, then $f^{-1}(V)=f^{-1}(\varnothing)=\varnothing$. Since $\tau_X$ is a topology on $X$, it contains $\varnothing$, so $f^{-1}(V)\in\tau_X$.
If $V=Y$, then $f^{-1}(V)=f^{-1}(Y)=X$, because $f$ has codomain $Y$. Since $\tau_X$ is a topology on $X$, it contains $X$, so $f^{-1}(V)\in\tau_X$.
[/step]
[step:Conclude that every function into an indiscrete space is continuous]
We have shown that for every open set $V\in\tau_Y$, the preimage $f^{-1}(V)$ belongs to $\tau_X$. Therefore, by the open-set definition of continuity, $f:(X,\tau_X)\to(Y,\tau_Y)$ is continuous. This proves the theorem.
[/step]