# What is missing? (Rudin's Principles of Mathematical Analysis - Theorem 2.30)

Let us first give a definition:

Definition Given a metric space $X$, and a subset $Y\subseteq X$, we say a subset $E$ of $Y$ is open relative to $Y$ if for each $p\in E$ there is an associated real $r>0$ such that $q\in E$ whenever $d(p,q)<r$ and $q\in Y$.

Next, we state the theorem:

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$.

The proof provided in the book goes like this:

Proof Suppose $E$ is open relative to $Y$. To each $p\in E$ there is a positive number $r_p$ such that the condition $d(p,q)<r_p$, $q\in Y$ imply that $q\in E$. Let $V_p$ be the set of all $q\in X$ such that $d(p,q)<r_p$, and define: $$G=\bigcup_{p\in E}{V_p}.$$ Then $G$ is an open subset of $X$, by Theorems 2.19 and 2.24 [which state that every neighbourhood is an open set, and every union of open sets is itself an open set]. since $p\in V_p$ for all $p\in E$ it is clear that $E\subseteq G\cap Y$.

So far so good. However, I could not understand why the next part of the proof is true:

By our choice of $V_p$, we have $V_p\cap Y \subseteq E$ for every $p\in E$, so that $G\cap Y \subseteq E$.

More specifically, why is it so clear that by our choice of $V_p$, we have $V_p\cap Y \subseteq E$ for every $p\in E$? As a 'counterexample', take: \begin{align} X=&\mathbb{R}^2 \\ Y=&\{ (x,0) : x\in\mathbb{R} \} \cup \{ (x,\frac{1}{2}) : x\in\mathbb{R} \}& \\ E=&\{ (x,0) \in Y : -1<x<1 \} \\ V_{(0,0)}=&\{ (x,y) \in X : x^2+y^2\lt 1 \} \left(\text{a.k.a the unit ball}\right) \end{align} Is my 'counterexample' correct? and if so, what is missing from the proof to make it work?

By definition, $V_p = \{q \in X \mid d(p,q) < r_p\}$. Thus, for every $q \in V_p$, $d(p,q) < r_p$.
For every $q \in V_p \cap Y$, it is both true that $d(p,q) < r_p$ and that $q \in Y$.
As stated above, "To each $p\in E$ there is a positive number $r_p$ such that the condition $d(p,q)<r_p, q \in Y$ imply that $q \in E$."
Thus, by the choice of $r_p$, every $q \in V_p \cap Y$ is also in $E$, so $V_p \cap Y \subseteq E$.
The problem with your 'counterexample' is that $V_{(0,0)}$ is not defined in the same way that Rudin defines it. $d((0,0),q) < 1$ and $q \in Y$ does not imply that $q \in E$, as required by the definition of the $V_p$. You probably want $r_{(0,0)} \le \frac{1}{2}$, which then gives $V_{(0,0)} = \{(x,y) \in X \mid x^2 + y^2 < \frac{1}{4}\}$, which should work.