Here is Prob. 11, Sec. 23, in the book Topology by James R. Munkres, 2nd edition:
Let $p \colon X \to Y$ be a quotient map. Show that if each set $p^{-1}(\{ y \} )$ is connected and if $Y$ is connected, then $X$ is connected.
My Attempt:
By definition, $p$ is a surjective map of the topological space $X$ onto the topological space $Y$, such that, for each set $V \subset Y$, the set $p^{-1}(V)$ is open in $X$ if and only if $V$ is open in $Y$.
Now suppose that $X$ is not connected. Then, by definition, we can write $X = C \cup D$, where the sets $C$ and $D$ are non-empty, disjoint, and open in $X$; that is, let the sets $C, D$ constitute a separation of $X$.
Let $y \in Y$. As the set $p^{-1}(\{ y \})$ is connected, so by Lemma 23.2 in Munkres, we must have either $p^{-1}(\{ y \}) \subset C$ or $p^{-1}(\{ y \}) \subset D$, but not both since $C \cap D = \emptyset$.
In particular, for every point $x \in X$, as $p(x) \in Y$, so we must have either $p^{-1}( \{ p(x) \} ) \subset C$ or $p^{-1}( \{ p(x) \} ) \subset D$, but not both.
Am I right?
Let $U$ and $V$ be the following subsets of $Y$. $$ U \colon= \{ \ y \in Y \ \colon \ p^{-1}(\{ y \}) \subset C \ \}, \qquad V \colon= \{ \ y \in Y \ \colon \ p^{-1}(\{ y \}) \subset D \ \}. $$ Then $U$ and $V$ are disjoint sets, because $C$ and $D$ are disjoint.
Am I right? Is the very last assertion in need of further elaboration?
Moreover, since $p$ is surjective and since $C \cup D = X$, we can conclude that $Y = U \cup V$.
Am I right? If so, then do I need to be any more explicit as to why this is so?
We now show that $p^{-1}(U) = C$ and $p^{-1}(V) = D$.
Let $x \in p^{-1}(U)$. Then $p(x) \in U$, and so $p^{-1}( \{ p(x) \} ) \subset C$, by the definition of set $U$. But as $x \in p^{-1}( \{ p(x) \} )$, so $x \in C$ also. Thus we have $p^{-1}(U) \subset C$.
Is my reasoning correct?
Conversely, suppose that $x \in C$. As in the fourth paragraph of this proof, we can conclude that either $p^{-1}( \{ p(x) \} ) \subset C$ or $p^{-1}( \{ p(x) \} ) \subset D$, but not both. But $x \in C \cap p^{-1}( \{ p(x) \} )$. So we must have $p^{-1}( \{ p(x) \} ) \subset C$, which implies that $p(x) \in U$ and hence that $x \in p^{-1}(U)$. Thus $C \subset p^{-1}(U)$.
Is this part of my reasoning correct and clear enough too?
From the preceding two paragraphs, we can conclude that $C = p^{-1}(U)$. Similarly, we can also show that $D = p^{-1}(V)$.
Now as $C = p^{-1}(U)$ and $D = p^{-1}(V)$ are open in $X$ and as $p$ is a quotient map, so the sets $U$ and $V$ are open in $Y$.
As $p$ is surjective, so we have $$ p(C) = p\left( p^{-1}(U) \right) = U, $$ and similarly also $p(D) = V$.
Now as $C$ and $D$ are assumed to be non-empty and as $p(C) = U$ and $p(D) = V$, so both $U$ and $V$ are non-empty as well.
Thus we have shown that $U$ and $V$ are non-empty disjoint open sets in the topological space $Y$ such that $Y = U \cup V$. Thus the sets $U, V$ constitute a separation of $Y$, which contradicts our hypothesis that $Y$ is connected.
Thus our supposition that $X$ is not connected is wrong. Hence $X$ is connected.
Is this proof correct? If not, then at which point(s) is (are) there problems therein?
I really enjoyed reading this! This has a good level of detail.
The only part that I got stuck was where you said
This sentence alone is not enough to justify the conclusion.
Based on the definitions of $U,V$ you want to establish that for every $y\in Y$, either $p^{-1}(\{y\})\subseteq C$ or $p^{-1}(\{y\})\subseteq D$. But you already showed this in a previous part of your post!
So in other words, you should have said