Let $\tau_1$ and $\tau_2$ be two topologies on set $X\neq\emptyset$ such that $(X, \tau_1)$ is Hausdorff and $\tau_1 \subsetneq \tau_2$. Can $(X, \tau_2)$ be compact?
My effort:
Suppose that $(X, \tau_2)$ is compact. Let the map $f \colon (X, \tau_2) \to (X, \tau_1)$ be defined by $$f(x) \colon= x \ \mbox{ for all } \ x \in X.$$ Then, for any open set $U$ in $(X, \tau_1)$, the inverse image $f^{-1}(U) = U$, which is open in $(X, \tau_2)$ as well. So $f$ is continuous. Thus, $f$ is a continuous mapping of the compact space $(X, \tau_2)$ into (in fact, onto) the Hausdorff space $(X, \tau_1)$. So $f$ is a homeomorphism.
Therefore, if $V$ is an open set in $(X, \tau_2)$, then $f(V) = V$ is open in $(X, \tau_1)$ as well, showing that $\tau_2 \subset \tau_1$, which contradicts $\tau_1 \subsetneq \tau_2$. Hence $(X, \tau_2)$ cannot be compact.
Is the above proof correct?