[Math] Show that if $K$ is compact and nonempty, then $\sup K$ and $\inf K$ both exist and are elements of $K$.

proof-verificationproof-writingreal-analysis

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:

  • A subset of the real numbers is compact iff it is closed and bounded (Heine-Borel theorem);
  • Every bounded subset of the real numbers has a supremum and an infimum (least-upper-bound property);
  • The supremum and infimum of a subset belong to its closure;

Then the claim immediately follows: the supremum and infimum of a compact subset exist by boundedness, and belong to the subset by closure.