WTS: For two metric spaces $X,Y$ If $f:X \rightarrow Y$ is continuous then for every open set $U\subset Y$, $f^{-1}(U)$ is open. May someone please verify if this proof is correct?
Proof: Assume $f$ is continuous. Let $U$ be an open set in $Y$. Let $x\in f^{-1}(U)$. Since $U$ is open, there exists an $\epsilon>0$ such that $N_{\epsilon}(f(x)) \subset U$. Since the function is continuous, $\exists \delta >0$ such that whenever $p\in f^{-1}(U)$ and $p\in N_{\delta}(x)$ then $f(p)\in N_{\epsilon}(f(x))$. Since $f(p)\in N_{\epsilon}(f(x))$ then $p\in f^{-1}(U)$ and so $N_{\delta}(x) \subset U$.
The question I have is that I think the proof is correct, but I don't see why the $p$ cannot be in the intersection of the $N_{\delta}(x) $. and $f^{-1}(U)$.
May someone please clarify and tell me what I should do to improve the proof? Please?
You must have meant to finish with $N_\delta (x) \subset f^{-1}(U)$ instead of $\subset U$. But also you shouldn't assume that $p\in f^{-1}(U)$ and $p \in N_\delta(x)$ when using continuity of $f$, this is like using continuity of $f$ as a function on the induced metric subspace, $f:f^{-1}(U)\to Y$. Instead, you want to get your small ball $N_\delta(x)\subset X$ and prove that it is a subset of $f^{-1}(U)$.
The inclusion $A \subset f^{-1}(f(A))$ and the implication $B\subset C \implies f^{-1}(B) \subset f^{-1}(C)$, true for any function $f$ and sets $A,B,C$ will be useful.