I have the following proposition:
"Let $C$ be the set of continuous functions $f:[a,b] \rightarrow [a,b]$ with the sup metric. The subset of $C$ made by taking the continuous functions that are not surjective is open."
I've managed to prove this, but by using results from complete metric spaces:
- proved that $C$ with the sup metric is complete;
- proved that the subset of $C$ made by taking the continuous functions that are surjective is complete;
- proved that a complete subspace of any metric space is closed;
- finished by using that a set is open if its complement is closed.
What I'm looking for is a simpler proof, a less "complete" proof.
My idea: I thought about again proving that the subset of $C$ taking the surjective functions is closed. Maybe using that every continuous function in $f:[a,b] \rightarrow [a,b]$ is bounded. How can I go from that (if at all)?
Suppose $f$ is not surjective, then there is some non empty open $U$ such that $f([a,b]) \cap U = \emptyset$. This exists because $f([a,b])$ is compact and hence closed.
Pick some $y \in U$, then there is some $\epsilon>0$ such that $B(y,2\epsilon) \subset U$.
Now suppose $\|f-g\|_\infty < \epsilon$. Then $g(x) \notin B(y,\epsilon)$ for all $x$.
Hence the range of each function in $B_\infty(f,\epsilon)$ does not intersect $B(y,\epsilon)$ and hence is not surjective.