I have a trouble understanding the proof of theorem.
Theorem. If a function $f:K \rightarrow \mathbb{R}$ is continuous and $K$ is compact set, then $f(K)$ is compact too.
Proof. (This is part of proof in my text)
Let $\{V_\alpha \mid \alpha \in A\}$ is an open cover of $f(K)$, then $\{f^{-1}(V_\alpha) \mid \alpha \in A \}$ is also open cover of $K$.
I agree that it works because of the theorem that for continuous function and $\forall G \subseteq \mathbb{R}$ which is open set, $f^{-1}(G)$ is also open set on domain. Moreover if we denote $C = \cup V_\alpha$, then $f(K) \subseteq C$, $f^{-1}(f(K)) \subseteq f^{-1}(C)$. It is also known that $K \subseteq f^{-1}(f(K))$ then $K\subseteq f^{-1}(C)=f^{-1}(\cup V_\alpha) = \cup f^{-1}(V_\alpha)$. Then the statement in the proof is true that $\{ f^{-1}(V_\alpha) \mid \alpha \in A \}$ is also open cover of $K$.
Also, for each $\alpha$, there exists open set $U_\alpha$ such that $U_\alpha \cap K = f^{-1}(V_\alpha)$.
I think it works by the property of relatively open set that $f^{-1}(V_\alpha)$ is open in $K$, so there exists $U_\alpha \cap K = f^{-1}(V_\alpha)$.
Then $\{U_\alpha \mid \alpha \in A\}$ is open cover of $K$.
How can we verify that the last sentence is true? Intuitively I agree with it but I can't logically explain why it makes sense.
If $x\in K$ then $f(x)\in V_{\alpha_x}$ for some $\alpha_x\in A$. This because the $(V_{\alpha})_{\alpha\in A}$ cover $f(K)$.
Then $x\in f^{-1}(V_{\alpha_x})$.
Evidently for any $x\in K$ we can find an $\alpha_x\in A$ such that $x\in f^{-1}(V_{\alpha_x})$, so the $(f^{-1}(V_{\alpha}))_{\alpha\in A}$ cover $K$.