There is indeed a very similar question asked [See Proving closure of S is the smallest closed set containing S. but the content is too advance for a starter in analysis like me and the focus of question is not the same. So I have decided to raise my question here:
Let $X$ be a metric space and $S$ be a subset in $X$. Show that
$\bar S$ is the smallest closed subsets of $X$ which contains $S$.
[ Here, define $\bar S$ as the closure of $S$ in $X$, where the closure is the set containing all the adherent points of $S$ in $X$. We also define $x \in S$ an adherent point of $S$ if $B(x,r) \cap S \neq \emptyset$ for all $r>0$.]
The question is reduced to proving the following:
- $\bar S$ is indeed closed in X.
- $\bar S$ contains $S$, i.e. $S \subset \bar S$.
- $\bar S$ is indeed the smallest in the sense that if $J \subset X$ satisfies 1. and 2., then $\bar S \subset J$.
The first two is rather straightforward and I cannot formulate the proof of the third claim. Here, I would also like to write down my proof for 1. and 2. Feel free to comment on it or provide your proof so that I can learn from you.
Proof of 1.: Consider $X \setminus \bar S$. For any $x \in X \setminus \bar S$, $x \notin \bar S$. It implies that there exists $r_x >0$ such that $B(x,r_x) \cap S = \emptyset$. Now, for any $y \in B(x,r_x)$, choose $r=min \{ d(x,y), r-d(x,y)\}$. Then $B(y,r) \subset B(x,r_x)$. It follows that $B(y,r) \cap S = \emptyset$, proving that $X \setminus \bar S$ is open.
Proof of 2.: It is trivial since for any $x \in S$, $x \in B(x,r) \cap S$ for all $r >0$.
Please tell me your thoughts in proving the third claim. Thanks in advance.