Before I ask questions about the proof I am having trouble differentiating between these two definitions that are related to the proof.
Def. 1. $E$ is open in $X$ means to each point $p \in E\ \exists r>0$ such that $$ d(p,q)<r,\ q \in X \Rightarrow q \in E. $$
Def. 2. $E$ open relative to $Y$ if to each point $p \in E\ \ \exists r>0$ such that $q \in E$ whenever $$d(p,q)<r\ \&\ q \in Y$$
To me, both of these definitions seem to be the same (and trivial, to be honest). So what is the "big" difference?
And now, this is the proof my professor gave in class which is more or less the same as Rudin's. I am looking for clarification on some parts (to be honest, most parts) of the proof. My comments and questions in bold refer to the statement above.
$\textbf{Theorem}$. Suppose $Y \subseteq X$. A subset $E$ of $Y$ is open relative to $Y$ if and only if $E = Y \cap G$ for some open subset $G$ of $X$.
$Proof.$ $(\Rightarrow)$ Suppose $E$ is open relative to $Y$. To each $p \in E,\ \exists r_p >0$ such that
$$d(p,q) < r_p,\ q \in Y \Rightarrow q \in E.$$
Let $V_p$ be the set of all $q \in X$ such that $d(p,q) < r_p$ and define $G = \cup _{p \in E}\ V_p$.
Why do this? Just because is works?
Then $G$ is an open subset of $X$.
$G$ is an open subset of $X$ because arbitrary union of open sets is open. Right?
Since $p \in V_p\ \forall p \in E$, it is clear that $E \subseteq G \cap Y.$
This is not "clear" like my professor states, please explain.
By our choice of $V_p$, we have $V_p \cap E \subseteq E$ for every $p \in E$ so that $G \cap Y \subseteq E$.
This makes sense in my head if I think in terms of sets in general. It's always true that the intersection of two sets is a subset of each of the sets, so it's no different in this case. BUT the words "by our choice" is bothering me, should it? Lastly, I don't understand why the intersection of $G$ and $Y$ would be a subset of $E$.
Hence, $E = G \cap Y$.
$(\Leftarrow)$ Conversely, if $G$ is open in $X$ and $E = G \cap Y$, every $p \in E$ has a neighborhood $V_p \subseteq G$. Then,
$$V_p \cap Y \subseteq E$$
so that $E$ is open relative to $Y$. $□$
Thank you all in advance for the help.