# Continuous Image of Compact Space is Compact/Corollary 3

## Corollary to Continuous Image of Compact Space is Compact

Let $S$ be a compact topological space.

Let $f: S \to \R$ be a continuous real-valued function.

Then $f$ attains its bounds on $S$.

## Proof 1

By Continuous Image of Compact Space is Compact: Corollary 2, $f \sqbrk S$ is bounded.

$\map \sup {f \sqbrk S} \in \map \cl {f \sqbrk S}$
$\map \inf {f \sqbrk S} \in \map \cl {f \sqbrk S}$

From Continuous Image of Compact Space is Compact, $f \sqbrk S$ is compact in $\R$.

From Non-Closed Set of Real Numbers is not Compact, it follows from the Rule of Transposition that $f \sqbrk S$ is closed in $\R$.

$f \sqbrk S = \map \cl {f \sqbrk S}$

Hence the result that:

$\map \sup {f \sqbrk S} \in f \sqbrk S$

and:

$\map \inf {f \sqbrk S} \in f \sqbrk S$

$\blacksquare$

## Proof 2

By Continuous Image of Compact Space is Compact, $f \sqbrk S$ is compact.

From Compact Metric Space is Complete and Compact Metric Space is Totally Bounded, $f \sqbrk S$ is complete and totally bounded.

Hence both the supremum and the infimum of $f \sqbrk S$ exist in $\R$.

Because $f \sqbrk S$ is complete:

$\sup f \sqbrk S \in f \sqbrk S$

and:

$\inf f \sqbrk S \in f \sqbrk S$

$\blacksquare$