Homeomorphism preserve connected set If $(X,\tau_X)$ and $(Y,\tau_Y)$ are topological spaces and $\phi : X \to Y$ is a homeomorphisms is I'm trying to prove/disprove that connected sets are mapped into connected sets (which I think is true).
My attempt is:
Suppose $A \subset X$ is a connected set, which means it cannot be partitioned into two disjoint non empty subsets in $X$, suppose $\phi(A) = B$ is disconnected instead, this means that $\mathcal{O}_Y^1 \cup \mathcal{O}_Y^2 = B = \phi(A)$, where $\mathcal{O}_Y^1, \mathcal{O}_Y^2 \in \tau_Y$ and $\mathcal{O}_Y^1 \cap \mathcal{O}_Y^2 = \emptyset$ (and non empty as well). But this implies $$A = 
\phi^{-1}(\mathcal{O}_Y^1 \cup \mathcal{O}_Y^2) = \phi^{-1}(\mathcal{O}_Y^1) \cup \phi^{-1}(\mathcal{O}_Y^2) = \mathcal{O}_X^1 \cup \mathcal{O}_X^2
$$
where $\mathcal{O}_X^1,\mathcal{O}_X^2 \in \tau_X$ are open disjoint in $X$, which means $A$ would be disconnected. The sets are not empty because $\mathcal{O}_Y^1, \mathcal{O}_Y^2$ are assumed not empty, so they have non empty pre-images.
Is my proof correct?
 A: No, it is not correct (although it can be corrected):


*

*You begin with $A\in X$. It should be $A\subset X$ instead.

*Then you write that assuming that $A$ is connected “means it can be partitioned into two disjoint non empty subsets in $X$”. Actually, any subset of $X$ (connected or not) has this property.

*Finally, you write that $A$ can be written as the union of two open disjoint subsets of $X$, adding that this “means $A$ would be disconnected”. Not so. You must add that those two open disjoint subsets of $X$ are non-empty to deduce what you want to deduce.

A: If $A$ is connected, continuity of $f$ already tells us that $f[A]$ is connected, and if $f[A]$ is connected, so is $f^{-1}[f[A]]$ by continuity of $f^{-1}$, so if $f$ is a homeomorphism $A \to f[A]$ is a bijection between the connected subsets of $A$ and those of $Y$. Similar things can be said for compact subsets of $X$ and $Y$ too. If you just want $A$ continuous implies $f[A]$ continuous, then we're done with continuity of $f$ and no more is needed.  
You're basically (in your attempt) trying to reprove the fact that continuous images of connected sets are connected again, which you probably already did before, so need not be redone.
