If $E \subset \mathbb{R}$ is non-empty and bounded above, then $\sup E \in \overline E$ (the closure of $E$)
This is a theorem in Rudin's real analysis (theorem 2.28,p35) but I would like to know under what circumstances it holds. The proof provided is the following:
Write $y := \sup E$, if $y \in E$, then $y \in \overline E$. If $y \notin E$, then for every $h >0$, there exists $x \in E$ such that $y-h < x < y$. Thus $y$ is a limit point of $E$ and $y \in \overline E \quad \triangle$
Now, I understand that this theorem is true for the Euclidean distance function (i.e. $d(x,y):= |y - x|)$, but does the theorem hold for all other metrics we can define on $\mathbb{R}$ as well? My guess would be no, since I was unable to prove this so I think Rudin proved this theorem thinking about the Euclidean metric.
No, the above theorem does not hold for all other metrics we can define on $\mathbb{R}$.
Take for example the discrete distance $d(x,y)$ which is zero if $x=y$ and $1$ otherwise. Then every subset of $\mathbb{R}$ endowed with this metric is both open and closed (because every singleton is open).
Therefore if $E=(0,1)$ then $E$ is bounded above and $\sup(E)=1$ ($1$ is the least upper bound with respect to the order defined in $\mathbb{R}$, the metric is not involved here), but $1 \not\in \overline{E}=E=(0,1)$.