Continuous Image of Compact Space is Compact/Corollary 3/Proof 1

Corollary to Continuous Image of Compact Space is Compact
Let $f: S \to \R$ be a real-valued function.

If $S$ is a compact space, then $f$ attains its bounds on $S$.

Proof
By Continuous Image of Compact Space is Compact: Corollary 2, $f \left({S}\right)$ is bounded.

By Supremum of Bounded Above Set of Reals is in Closure:
 * $\sup \left({f \left({S}\right)}\right) \in \operatorname {cl} \left({f \left({S}\right)}\right)$

and by Infimum of Bounded Below Set of Reals is in Closure:
 * $\inf \left({f \left({S}\right)}\right) \in \operatorname {cl} \left({f \left({S}\right)}\right)$

From Continuous Image of Compact Space is Compact, $f \left({S}\right)$ is compact in $\R$.

From Non-Closed Set of Real Numbers is not Compact, it follows from the Rule of Transposition that $f \left({S}\right)$ is closed in $\R$.

From Closed Set equals its Closure:
 * $f \left({S}\right) = \operatorname {cl} \left({f \left({S}\right)}\right)$

Hence the result that:
 * $\sup \left({f \left({S}\right)}\right) \in f \left({S}\right)$

and:
 * $\inf \left({f \left({S}\right)}\right) \in f \left({S}\right)$