Subset of continuous functions that are not surjective is open (with sup metric) 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)?

Let $f$ be non-surjective; without loss of generality, $f$ maps into $[a,b']$ with $b' < b$. Let $\epsilon = \frac{b - b'}2$. Then the open ball of radius $\epsilon$ around $f$ is contained in the non-surjective functions, since no such function can map onto $b$.
This implicitly uses the fact that the continuous image of a compact set is compact, since we have to rule out that the image of $f$ is e.g. $[a,b)$.
