I'm trying to solve this question:
(a) Let $E \subset \mathbb{R}$ be a set bounded from above with supremum $x \in \mathbb{R}$ Prove that for every $\varepsilon>0$ the intersection $E \cap(x-\varepsilon, x]$ is nonempty.
(b) Give an example of a set $E \subset \mathbb{R}$ bounded from above such that $E \cap(x-\varepsilon, x)=\emptyset$ for $x=\sup E$ and some $\varepsilon>0$
(c) Give an example of a set $E \subset \mathbb{R}$ bounded from above such that $E \cap\{x\}=\emptyset$ for $x=\sup E$ (This with the previous part shows you really need the half open interval $(x-\varepsilon, x]$ in the first part).
Now, here's what I did:
For part (a), if $\sup(E)=x \in E$, then $x \in E \cap (x-\varepsilon, x]$ and the problem is solved. If $x \notin E$, then there exists an $\alpha \in E$, such that $\alpha > x-\varepsilon$ for arbitrary $\varepsilon >0$. So, $\alpha \in E$ and $\alpha \in (x-\varepsilon , x]$ and hence $E \cap (x-\varepsilon, x] \neq \emptyset$.
For part (c), let $E=(0, 1)$. Then $\sup E=1$ and $(0, 1) \cap \{1\}=\emptyset$.
First, I want to know if I did these two parts correctly, and I also have trouble with part (b).