[proofplan]
A quotient map is a surjection $q$ such that $V \subset Y$ is open if and only if $q^{-1}(V)$ is open in $X$. Continuity supplies the forward implication. The content is the reverse: if $q^{-1}(V)$ is open, then $V$ is open. We treat the open-map and closed-map cases separately. In the open-map case, we use the surjectivity identity $V = q(q^{-1}(V))$ to express $V$ as the image of an open set. In the closed-map case, we pass to complements, expressing $Y \setminus V$ as the image of a closed set.
[/proofplan]
[step:Reduce to the reverse implication of the quotient condition]
Let $V \subset Y$. Since $q$ is continuous, if $V$ is open in $Y$ then $q^{-1}(V)$ is open in $X$. To establish that $q$ is a quotient map, it remains to prove the converse: if $q^{-1}(V)$ is open in $X$, then $V$ is open in $Y$.
[guided]
A quotient map is a continuous surjection $q: X \to Y$ such that the topology on $Y$ is the quotient topology induced by $q$: a subset $V \subset Y$ is open if and only if $q^{-1}(V)$ is open in $X$. Since $q$ is continuous by hypothesis, the "only if" direction is automatic. The entire content of the theorem is the reverse: the additional hypothesis (open map or closed map) forces the "if" direction.
[/guided]
[/step]
[step:Prove the open-map case via the surjectivity identity $V = q(q^{-1}(V))$]
**Case 1: $q$ is an open map.** Suppose $q^{-1}(V)$ is open in $X$. Since $q$ is surjective, the identity
\begin{align*}
V = q(q^{-1}(V))
\end{align*}
holds: the inclusion $q(q^{-1}(V)) \subset V$ is valid for any function, and the reverse inclusion follows from surjectivity (every $y \in V$ has a preimage $x \in q^{-1}(V)$, so $y = q(x) \in q(q^{-1}(V))$).
Since $q^{-1}(V)$ is open in $X$ and $q$ is an open map, the image $q(q^{-1}(V))$ is open in $Y$. Hence $V$ is open in $Y$.
[guided]
The identity $V = q(q^{-1}(V))$ holds for any surjection and any subset $V$ of the codomain. For a non-surjective function, only $q(q^{-1}(V)) \subset V$ holds — points of $V$ not in the image of $q$ are missed. Surjectivity is therefore essential to this argument.
Given this identity, the conclusion is immediate: $q^{-1}(V)$ is open in $X$ by assumption, $q$ maps open sets to open sets by hypothesis, so $V = q(q^{-1}(V))$ is open in $Y$.
[/guided]
[/step]
[step:Prove the closed-map case by passing to complements]
**Case 2: $q$ is a closed map.** Suppose $q^{-1}(V)$ is open in $X$. We show that $V$ is open by showing its complement $Y \setminus V$ is closed. The preimage identity for complements gives
\begin{align*}
q^{-1}(Y \setminus V) = X \setminus q^{-1}(V).
\end{align*}
Since $q^{-1}(V)$ is open in $X$, the set $X \setminus q^{-1}(V)$ is closed in $X$. Applying the surjectivity identity to the set $Y \setminus V$,
\begin{align*}
Y \setminus V = q(q^{-1}(Y \setminus V)) = q(X \setminus q^{-1}(V)).
\end{align*}
Since $X \setminus q^{-1}(V)$ is closed in $X$ and $q$ is a closed map, the image $q(X \setminus q^{-1}(V))$ is closed in $Y$. Hence $Y \setminus V$ is closed, and $V$ is open.
[guided]
The closed-map case cannot proceed as directly as the open-map case. We want to conclude that $V$ is open, but the closed-map hypothesis yields information only about images of closed sets. The resolution is to work with the complement: proving $Y \setminus V$ is closed is equivalent to proving $V$ is open.
The identity $q^{-1}(Y \setminus V) = X \setminus q^{-1}(V)$ is a general fact about preimages and holds for any function. From the hypothesis that $q^{-1}(V)$ is open, we conclude $X \setminus q^{-1}(V) = q^{-1}(Y \setminus V)$ is closed. Since $q$ is a closed map, $q(q^{-1}(Y \setminus V))$ is closed in $Y$. Surjectivity then gives $q(q^{-1}(Y \setminus V)) = Y \setminus V$, completing the argument.
The two cases share a common structure: both reduce to the surjectivity identity $S = q(q^{-1}(S))$ — applied to $S = V$ in the open case, and to $S = Y \setminus V$ in the closed case.
[/guided]
[/step]