Exercise 3.3.1 in Stephen Abott's book poses the following question.
Show that if $K$ is compact and non-empty, then $\sup K$ and $\inf K$ both exist and are elements of $K$.
I attempted to write a simple proof, and would like someone to verify, if the proof is technically correct and rigorous.
My Attempt.
Let $K$ be compact and non-empty. By the theorem on the characterization of compactness, $K$ is closed and bounded. Since $K$ is a bounded subset of $\mathbf{R}$, by AoC, $K$ has a supremum and an infimum. Let $s = \sup K$.
There is a trichotomy. Either (i) $s \in int(K)$ (ii) $s \in \partial K$ (iii) $s \in ext(K)$.
(i) Suppose $s \in int(K)$. Then, there exists an $\epsilon$ such that the open interval $(s - \epsilon,s + \epsilon)$ is contained in $K$. Consider $s + \epsilon/2 \in (s, s+\epsilon) \cap K$. $s + \epsilon/2 > s$. But, this implies that $s$ is not an upper bound for $K$, which is a contradiction. Hence, $s \notin int(K)$.
(ii) Suppose $s \in ext(K)$. Then, there exists an $\epsilon > 0$ such that the open interval $(s - \epsilon,s + \epsilon)$ is contained in $K^C$. Consider $s - \epsilon/2 \in K \cap (s - \epsilon,s)$. $s - \epsilon/2 \ge x$ for all $x \in K$, and $s - \epsilon/2 < s$. So, $s$ is not an upper bound for $K$, which is a contradiction. Hence, $s \notin ext(K)$.
(iii) If $s \in \partial K$, because $K$ is a closed set, $\partial K \subseteq K$. So, $s \in K$.
A similar argument can be made for $\inf K$.
This closes the proof.