Let $X$ be a non-empty subset of $\mathbb{R}$ and let $y$ be a real number. Prove that $\sup(X)=y$ if and only if
1) $x$ is less than or equal to $y$ for every $x$ in $X$.
2) For every $\epsilon > 0$, there exists $x$ in $X$ such that $y-\epsilon < x ≤ y$
I'm not sure how to prove this, I started off with just using the definition of a supremum and the completeness axiom but didn't get that far. I'm also not sure how how to deal with the inequality at the end. Any direction on where to go with this would be helpful. Thanks
For part two, since $y$ is a supremum for $X$, $y-\epsilon$ is not an upper bound for $X$ for any $\epsilon > 0$. Since $y - \epsilon$ is not an upper bound, there exists some $x \in X$ such that $y-\epsilon < x$.