# 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:

1. proved that $C$ with the sup metric is complete;
2. proved that the subset of $C$ made by taking the continuous functions that are surjective is complete;
3. proved that a complete subspace of any metric space is closed;
4. 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.

• Why does U exist BECAUSE f([a,b]) is compact (what result are you using)? Also, why do you put that $g(x)$ is not inside $B(y,\epsilon)$? (if f is identically zero, isn't that false?) Please, spare no details. – DrHAL Oct 27 '16 at 14:11
• A continuous function maps compact sets to compact sets. If there was some $x$ such that $g(x) \in B(y,\epsilon)$, then we would have $f(x) \in B(y,2 \epsilon)$ which would contradict the selection of the $\epsilon$. – copper.hat Oct 27 '16 at 14:47
• What about the existence of U? And why can you suppose ||f - g|| < epsilon? I don't get it. – DrHAL Oct 27 '16 at 18:21
• If the function is not surjective, then there is some $z$ in the codomain that does not lie in $f([a,b])$. Since $f([a,b])$ is compact, it is closed, hence there is some open set, call it $U$ such that $z \in U$ and $U$ does not intersect $f([a,b])$. – copper.hat Oct 27 '16 at 18:40
• You are trying to show that the non surjective functions are open. So, we start with some non surjective function $f$ and we want to find some $\epsilon>0$ such that all functions in $B(f,\epsilon)$ are not surjective. I am picking a specific $\epsilon>0$ so that this holds. – copper.hat Oct 27 '16 at 18:42

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)$.

Show that the sets of all surjective continuous function is closed in $C.$

let $\{f_{n}\}_{n \in N}$ be a sequence of surjective functions in $C$ which is convergent to some $g$ in $C$ (w.r.t sup norm). show that $g$ is surjective:

pick $y \in [a,b]$ then for each $n \in N$ there exist $x_n \in [a,b]$ such that $f_{n}(a_n) = y$. WLOG we may assume $a_n \rightarrow x \in [a,b]$, and since $f_n$ is uniformly convergent to $g$ then $f_n(a_n) \rightarrow g(x)$ which implies $g(x) =y.$