Structure of the Mapping Cylinder of a Continuous Function Let $X,Y$ be topological spaces and $f : X \to Y$ a continuous function. In his book Algebraic Topology, Hatcher constructs the mapping cylinder of $f$ to be the quotient space $M_f = ((X \times I) \sqcup Y)/\sim$, where $(x,1) \sim f(x)$ for all $x \in X$. I'm trying to prove the intuitively obvious claim that $\pi|_Y : Y \to \pi(Y)$ is a homeomorphism, where $\pi : (X \times I) \sqcup Y \to M_f$ is the quotient map.
Here are my thoughts: Clearly the map is continuous and a bijection onto its image, so we just need to show that it's open. For any $U \subset Y$ open, we know that $f^{-1}(U) \subset X$ is open since $f$ is continuous. Then $f^{-1}(U) \times I$ is open in $X \times I$ which implies that $V := (f^{-1}(U) \times I) \cup U$ is open in $(X\times I) \sqcup Y$. $V$ is also saturated with respect to the quotient map $\pi$, so $\pi(V)$ is open in $M_f$. It follows that $\pi(V) \cap \pi(Y)$ is open in $\pi(Y)$, but it's easy to see that $\pi(V) \cap \pi(Y)$ is just $\pi(U)$, and the proof is complete.
I'm pretty sure this reasoning is correct (let me know if it isn't), but I'm trying to figure out if the continuity of $f$ is necessary for the claim to hold. My gut tells me that it shouldn't---even if $X \times I$ is joined to $Y$ by some crazy, discontinuous function, the gluing should still leave $Y$ intact. Is there a way to prove this without relying on the continuity of $f$, or is the claim even true in this case?
 A: You really do need $f$ to be continuous.
Suppose that $\pi[U]$ is open in $\pi[Y]$; then $\pi[U]=W\cap\pi[Y]$ for some open $W\subseteq M_f$. Since $W$ is open in the quotient $M_f$, $\pi^{-1}[W]$ is open in $(X\times I)\sqcup Y$. Now
$$\begin{align*}
\big(f^{-1}[U]\times\{1\}\big)\sqcup U&=\pi^{-1}\big[\pi[U]\big]\\
&=\pi^{-1}\big(W\cap\pi[Y]\big)\\
&=\pi^{-1}[W]\cap\pi^{-1}\big[\pi[Y]\big]\\
&=\pi^{-1}[W]\cap\big((X\times\{1\})\sqcup Y\big)\,,
\end{align*}$$
so $U=\pi^{-1}[W]\cap Y$, and $f^{-1}[U]\times\{1\}=f^{-1}[W]\cap(X\times\{1\})$. Thus, $f^{-1}[U]\times\{1\}$ is open in $X\times\{1\}$, and hence $f^{-1}[U]$ is open in $X$.
A: The subspace topology $\pi(Y)$ inherits from $M_f$ consists exactly of sets of the form $\pi(V)$ where $V \subseteq Y$ is an open set such that $f^{-1}(V)$ is open in $X$. Thus, $\pi|_Y : Y \to \pi(Y)$ is a homeomorphism if and only if $f$ is continuous.
The basic point is to understand a bit more about the topology of $M_f$ by deciding what are the saturated open subsets of $(X \times I) \sqcup Y$. Open subsets of $(X \times I) \sqcup Y$ are exactly the sets of the form $U \sqcup V$ where $U \subseteq X \times I$ and $V \subseteq Y$ are open. I claim that the sets $V$ which occur in open sets $U \sqcup V$ that are saturated with respect to $\sim$ are exactly the open subsets of $Y$ with $f^{-1}(V)$ open in $X$. Indeed, if $V$ is such a set, then taking $U = f^{-1}(V) \times I$ gives $U \sqcup V$ saturated and open. On the other hand, one easily sees that $U \sqcup V$ is saturated with respect to $\sim$ if and only if $U \cap (X \times \{1\}) = f^{-1}(V) \times \{1\}$ and the latter condition implies $f^{-1}(V)$ is open in $X$.
