Connectedness in the Quotient Space The problem says this:
Let $\sim$ be an equivalence relation in $X$ and consider the quotient space $X/\sim$. Prove that:


*

*$X$ connected $\Rightarrow$ $X/\sim$ connected.

*If $X/\sim$ is connected and every equivalence class $[x] = \left \{ y\in X : y \sim x \right \}$ is connected then $X$ is connected.


Proof 1) is easy and I know how to do it. But I'm stuck in the proof 2). That's what I have tried:
Let's suppose $X$ isn't connected. Then, $X=U\sqcup V$ with $U$ and $V$ open. 
Let $\pi : X\rightarrow X/\sim$ be the application that sends every $x\in X$ into his class. I want to see that $\pi (U)$ and $\pi(V)$ are open and that $\pi (U)\cap\pi (V)= \varnothing$ to conclude that $X/\sim$ isn't connected (because $\pi$ is surjective). But that is absurd, so $X$ must be connected.
I know how to prove that $\pi (U)\cap\pi (V)= \varnothing$, but I don't know how to show that $\pi (U)$ and $\pi(V)$ are open. Any advice?
Thanks!
 A: 
$X$ is connected iff every continuous function $f: X \to
 \{0,1\}$ is constant where $\{0,1\}$ is endowed with the discrete
  topology.

Let $f: X \to\{0,1\}$ be an arbitrary continuous function. Since every equivalence class $[x] = \left \{ y\in X : y \sim x \right \}$ is connected, $f$ restricted to $[x]$ is constant. Then $f$ induces a function $$\displaystyle\tilde f:X/\sim\,\to\{0,1\}$$ such that the following diagram commutes:
$$\require{AMScd}
\def\diaguparrow#1{\smash{
  \raise.6em\rlap{\scriptstyle #1}
  \lower.3em{\mathord{\diagup}}
  \raise.52em{\!\mathord{\nearrow}}
}}
\begin{CD}
&& X/\sim\\
& \diaguparrow{\pi} @VV \\\tilde f V \\
X @>> f> \{0,1\}
\end{CD}$$
that is, $f=\tilde f\circ \pi$. Since $f$ is continuous, $\tilde f$ is continuous. As $X/\sim $ is connected, $\tilde f$ is constant by the above theorem. Hence $f$ is constant.
A: It's not necessarily the case that $\pi(U)$ and $\pi(V)$ are open, since not all quotient maps are open maps. What's important is that $\pi(U)$ is open if $U$ is saturated, i.e. $U$ is the complete inverse image of a subset of $X/\sim$. So once we show $U,V$ must be saturated, we'll be done, by the argument you gave.
Suppose $U$ is not saturated. Say the inverse image of $[x]$ is only partially contained in $U$. [Note if the inverse image of each point is either completely contained in $U$ or not contained in $U$ at all, then $U$ would be saturated.] Then $([x]\cap U)\sqcup([x]\cap V)$ is a nontrivial decomposition of $[x]$. Since $U,V$ are both open in $X$, $[x]\cap U, [x]\cap V$ are both open in $[x]$. This contradicts $[x]$ being connected. Hence, $U$ is saturated and similarly $V$ is saturated.
