Show that $K \subset \mathbb{R}^d$ is compact $\iff \forall f\in C^0(K, \mathbb{R})$, $f$ is bounded on $K$.
The direction "$\implies$" is given by Weierstrass theorem.
For the other direction, I want to show that $K$ is bounded and closed and thus compact.
We have in particular for $f=\pi_i$ (the $i$-th projection), that $f$ is bounded for any $1 \leq i \leq d$, which implies $K$ is bounded.
But I'm not sure how to show that $K$ is closed.
I thought about maybe looking at something like $f(x) = ||x||$ and then we have $f^{-1}[\mathbb{R}]=K$, and by the thorem that says that the preimage of a closed set by a continuous function is closed we should get that $K$ is closed?
But I'm pretty sure I'm using it wrong since it seems I can prove some open sets are closed this way, which doesn't make sense. So my questions are:
- What is the mistake in the last part?
- How do I correctly show $K$ is closed?
I just read that theorem again and it seems the conditions are a little more delicate then I remembered: $f: E \subset \mathbb{R}^d \to \mathbb{R}^m$ is open $\iff \forall$ open $ U \subset \mathbb{R}^m \exists$ open $V \subset \mathbb{R}^d$ s.t $f^{-1}[U] = V \cap E$
– paxtibimarce Feb 17 '21 at 17:24