I'm doing a real analysis course and I've tried to demonstrate above rigorously. If anyone could give a small look over, it would be much appreciated.
Definition of Maximum element: $y \in S$, $x\leq y$ for all $x \in S$
Definition of the least upper-bound:
$1$: $x \leq M$ for all $x \in S$, and
$2$: $x \leq K$ for all $x \in S$ $\implies M \leq K$
By definition of a maximum element condition $1$ is fulfilled and thus proves $y$ is an upper bound to $S$ . Next take all upper bounds $K$ such that.
$x \leq y \leq K$
$y$ is a upper bound by $1$, so $K \geq y$ is verified, and thus $2$ is verified.
Therefore $\sup S = y$
Thanks!
No, you don't take all upper bounds $K$ such that $x\leqslant y\leqslant K$. First of all, this doesn't make sense (what is $x$?). And, above all, you can't put any restriction on the upper bound that you take when your goal is to prove that $y$ is the least upper bound.
So, let $K$ be an upper bound of $S$. Since $y\in S$, $y\leqslant K$. And, since $y$ itself is an upper bound of $S$, this proves that $Y$ is the least upper bound.