Munkres Topology Problem 23.11 I wanted to check my proof to the following problem:


*Let $p:X \longrightarrow Y$ be a quotient map. SHow that if each set $p^{-1}(\{y\})$ is connected, and if $Y$ is connected, then $X$ is connected.


Here is my proof:
Suppose to the contrary that $X=U \cup V$ forms a separation of X. By Lemma 23.2, $p^{-1}(\{y\})$ is contained in either $U$ or $V$. Since $U$ and $V$ are open in $X$, we have that $p(U)$ and $p(V)$ are open in Y, since $p$ is a quotient map. But, since $U$ and $V$ are not empty and disjoint, we have that $p(U) \cap p(V) = \emptyset$ and $p(U),p(V)\neq \emptyset$. Thus, $p(U)$ and $p(V)$ form a separation of Y, since $p(X)=p(U)\cup p(V) = p(Y)$, a contradiction. 
I am not sure if my proof is incomplete or whether I made an error somewhere in my steps.    
 A: Your proof is essentially correct, but has two gaps.
1) Why are $p(U), p(V)$ open in $Y$?
2) Why do we have $p(U) \cap p(V) = \emptyset$?
I believe the proofs of both points were clear to you and you just omitted details.
Let us begin with 2). As Kavi Rama Murthy stated in his comment, if you consider $y \in p(U)$, then $p^{-1}(y) \cap U \ne \emptyset$ so that $p^{-1}(y) \subset U$ by Lemma 23.2. Similarly $p^{-1}(y) \subset V$ for $y \in p(V)$. Hence if there would exist $y \in p(U) \cap p(V)$, then $\emptyset \ne p^{-1}(y) \subset U \cap V$ which is a contradiction.
To verify 1) observe that $U \subset p^{-1}(p(U))$ and $V \subset p^{-1}(p(V))$. But by 1) $p^{-1}(p(U)) \cap p^{-1}(p(V)) = p^{-1}(p(U) \cap p(V)) = \emptyset$. This implies $U = p^{-1}(p(U))$ because if there would exist $x \in p^{-1}(p(U)) \setminus U$, then $x \in V \subset p^{-1}(p(V))$ which is impossible. Similarly $V = p^{-1}(p(V))$. Hence $p(U),p(V)$ are open since $p$ is a quotient map.
A: Recall that a topological space $X$ is connected if and only if every continuous function $f:X\to\{0,1\}$ is constant.
We make use of Theorem 22.2 on page 142:

Theorem 22.2
$\,\,\,\,\,\,\,\,$Let $p:X\to Y$ be a quotient map. Let $Z$ be a space and let $g:X\to Z$ be a map that is constant on each set $p^{-1}[\{y\}]$ for each $y\in Y$. Then $g$ induces a map $f:Y\to Z$ such that $f\circ p = g$. The induced map $f$ is continuous if and only if $g$ is continuous; $f$ is a quotient map if and only if $g$ is a quotient map.

Take $Z=\{0,1\}$ and let $g:X\to Z$ be continuous. As $p^{-1}[\{y\}]$ is connected for each $y\in Y$, then $g_{|p^{-1}[\{y\}]}$ is constant for each $y\in Y$. Since $g$ is continuous, then the induced map $f$ is continuous. It follows that $f$ is constant, which implies $g$ is also constant, completing the proof.
