# Proof verification: Compact set has sup and inf

I was reading this post compact set always contains its supremum and infimum

There was an answer reposted as follows:

As $K$ is compact, we have that $K$ is bounded. So $\sup K$ and $\inf K$ exists. By definition $\sup K$, for every $n \in N$ exists $x_n \in K$ such that $\sup K- x_n<1/n$ then $\sup K = \lim x_n$ with $x_n \in K$, as K is closed follows that $\sup K \in K$. To inf is analogous. Ps: Compact ⇒ closed and bounded.

This proof is quite attractive but I do not get the idea that just because $\sup K$ exists, therefore there exists a sequence approaching it.

Can someone please explain this part to clarify why that $\sup K$ must exist for a compact set $K$?

• Because any bounded set of real numbers has a supremum.
– user296602
Feb 13 '16 at 2:42

Here is why there always exists a sequence in $K$ converging to $\sup K$, provided its existence (which is guaranteed by the fact that bounded sets always have a least upper bound in $\Bbb R$).

Let $A\subseteq \Bbb R$ and let $s=\sup A<+\infty$.

If there were a $n>0$ such that $\left(s-\frac1n,+\infty\right)\cap A=\emptyset$, then $s-\frac1{2n}$ would be an upper bound for $A$, which would contradict the fact that $s$ is the least upper bound of $A$. Therefore, for all $n$ there must exist $x_n\in A$ such that $x_n> s-\frac1n$.

But since $s$ is an upper bound of $A$ and $x_n\in A$, it must hold $x_n\le s$ as well.

Therefore $s-\frac1n < x_n\le s$. By the squeeze therem, $x_n\to s$.

• Wunderbar! Danke sehr Feb 13 '16 at 4:32

Compact is equivalent to closed + bounded in R. Bounded sets in R have sup and inf.

• Your answer seems to do nothing more than reiterate the first line of the quoted proof, which the original question asker seems not to understand. As such, it seems that this answer isn't likely to be of much use. Dec 5 '18 at 5:01
• The sup and inf of bounded set $B$ might not belong to $B$. Take an open interval. Dec 5 '18 at 5:10