In Principles of Mathematical Analysis by Walter Rudin, Theorem 2.30 states that:
Suppose $Y \subset 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$.
I've thought of the following "counterexample":
If $X = \mathbb{R}^2$, $Y = ([0,2],0)$, $G = B_1(0)$ (i.e. the open ball of radius 1 centered at 0), then the theorem implies that $E = Y \cap G = ([0,1),0)$ is open relative to $Y$, which it is clearly not (due to $(0,0) \in E$).
Could someone point out why this "counterexample" is wrong?
Edit:
Here is the definition of "Open Relative to":
$E$ is open relative to $Y$ if for each $p \in E$ there is an associated $r>0$ such that $q \in E$ whenever $d(p,q) < r$ and $q\in Y$.