I want to ask you for following statement
$f$ is continuous from $X$ to $Y$, where $X$ is compact Hausdorff, connected and $Y$ is ordered set in order topology, then $f$ is onto?
My attempt
For given $y \in Y$ choose nbhd $N_y$. Since $f$ is continuous and $X$ is compact Hausdorff, $B=f^{-1}(\bar N_y$) is compact in X , Where $\bar N_y$ is closure of nbhd. Since $f(B)$ is compact on Y which contain $y$, it has extreme value. Now we can apply Intermediate theorem on $f(B)$ , so we can find $x^* \in B$ such that $f(x*)=y$ . Thus $f$ is onto
First, I want to ask whether this proof is correct or not.
Second, Is there any counter example if X has only connect condition ?
Third, Is there any other condition $f$ could be automatically onto for specific condition of $X$ and $Y$
Thank you!
Your proof is not correct; you assume (incorrectly) that $B$ is non-empty.
A very simple counterexample to your statement is the inclusion $[0, 1] \to [0, 2]$ with the ordinary Euclidean/order topology (an even simpler example is the inclusion $\{0\} \to \{0, 1\}$, assuming that $Y$ need not be connected).