Let $(X, \mathcal{T})$ and $(Y, \mathcal{S})$ be two topological spaces.
Consider a function $\gamma: X \to Y$ and the corestricted function $\eta: X \to \gamma(X): x \mapsto \gamma(x)$. I want to prove the following:
$\gamma$ is continuous if and only if $\eta$ is continuous (the codomain is equipped with the subspace topology).
Attempt:
Suppose $\gamma$ is continuous. Let $A$ be open in the subspace $\gamma(X)$. Then $A = \gamma(X) \cap B$ where $B \in \mathcal{S}$. Hence
$$\eta^{-1}(A) = \eta^{-1}(\gamma(X) \cap B) = \{x \in X\mid \eta(x) \in \gamma(X)\cap B\}= \{x \in X\mid \gamma(x) \in \gamma(X)\cap B\}$$ $$= \{x \in X \mid \gamma(x) \in B\}= \gamma^{-1}(B)\in \mathcal{T}$$
Conversely, suppose that $\eta$ is continuous. Let $A \in \mathcal{S}$. Then
$$\gamma^{-1}(A) = \gamma^{-1}(A \cap \gamma(X)) = \eta^{-1}(A \cap \gamma(X))$$
and since $A \cap \gamma(X)$ is open in the subspace $\gamma(X)$ of $S$, it follows that $\gamma^{-1}(A) \in \mathcal{T}$.
Is this proof correct?