I am an undergraduate student who is studying real analysis from Rudin's POMA and I am trying to prove that these two definitions that I have for dense sets are equivalent:
1) Given a metric space $X$ and $E \subset X$; $E$ is dense in $X$ iff every point of $X$ is a limit point of $E$ or $E = X$ or both of these are true.
2) Given a metric space $X$ and $E \subset X$; $E$ is dense in $X$ iff the intersection of $E$ and every non-empty open set of $X$ is non-empty.
In an attempt to prove the equivalence I have encountered an example which I can't get my head around it. Given the set $X$ such that X consists of all points $s_n$ , where $s_n = \sum_{k=0}^n (1/2)^k$ for all $n \ge 0$, and $2$ as well. Now define the metric for such a set to be the same as that of $\mathbb{R}$. Then $X$ is a metric space. Now according to definition (1) the only dense set in $X$ is $X$ itself, but according to (2) the set $V = X - \{2\}$ is a dense set in $X$ besides $X$ as well. However we should not have such a problem. So could you please point out what I am doing wrong. Thank you.
Definition (1) seems to assume the (reasonable) definition "$x$ is a limit point of $E$ if and only if there is an injective sequence $x_n\in E$ such that $x_n\to x$", whereas $x$ would be adherent to $E$ if such a sequence weren't necessarily injective.
With that assumption, definition (1) is not equivalent to the usual definition of dense subset: "$E$ is dense in $X$ if and only if all the points of $X$ are adherent to $E$", which is indeed equivalent to definition (2). For instance, consider $X=(0,1)\cup \{2\}$ with the usual metric: $E=\Bbb Q\cap X$ satisfies (2), but not (1).
However, I went back to my copy of Rudin's Principles of Mathematical Analysis, which might differ from yours because, for one thing, it is not an English version. The relevant definition seems to be point (j) of Def. 2.18:
In symbols, $$\forall x\in X, (x\text{ is a limit of }E\vee x\in E\vee\underbrace{(x\text{ is a limit of }E\wedge x\in E)}_{\text{redundant}})$$
Which is different from what you've said
$$(\forall x\in X,x\text{ is a limit of }E)\vee (\forall x\in X, x\in E)\vee\underbrace{(\forall x\in X,(x\text{ is a limit of }E\wedge x\in E))}_{\text{redundant}} $$
just as much as "for all $n\in \Bbb N$, $n$ is either odd or even" differs from "either, for all $n\in \Bbb N$, $n$ is even, or, for all $n\in \Bbb N$, $n$ is odd".
Whether the mistake was made by the author in an older edition than mine, or by you because of inattentive reading, I can't know. However, I strongly suggest you adopt the definiton I've said.