Show that if $K$ is compact and nonempty, then $\sup K$ and $\inf K$ both exist and are elements of $K$.
If $K$ is compact, then by definition it is closed and bounded, and every sequence in $K$ has a subsequence that converges to a limit that is also in $K$. $K$ is also nonempty. Let $s = \sup K$ and $t = \inf K$. Since $K$ is bounded, it has an upper and lower bound, which can be defined by $s$ and $t$, respectively. If a set is closed, it includes its bounds in the set, so $s,t \in K$.
Is the proof I wrote correct?
Best Answer
You have the right idea, but it depends on what you take for granted. If you've already shown that the following are true:
Then the claim immediately follows: the supremum and infimum of a compact subset exist by boundedness, and belong to the subset by closure.