Show this set in $C([0,1])$ is closed. I am trying to show the set $S = \{ f \in C([0,1]) : f(1/2) = 0\}$ is closed with the uniform metric $d_\infty(f,g) = \sup_{x \in [0,1]} |f(x) - g(x)|$.
Does this contradictive argument work?
Consider the complement $C([0,1]) \setminus S$. Take any open $\varepsilon$-ball in $C([0,1]) \setminus S$, ie $B_\varepsilon(f) = \{ g : \sup_{x \in [0,1]} |f(x) - g(x)| < \varepsilon \}$.
Assume there exists a function $g(x) \in B_\varepsilon(f)$ such that $g(1/2) = 0$. Then $\sup_{x\in[0,1]} |f(x) - g(x)| \leq f(1/2)$. Since $g \in B_\varepsilon(f)$ we must have $\sup_{x\in[0,1]} |f(x) - g(x)| \leq \varepsilon$.
Now send $\varepsilon \rightarrow 0$. Since $\sup_{x\in[0,1]} |f(x) - g(x)| \leq f(1/2) < \varepsilon$, in this limit we have $f(1/2) = 0$. But $f \in C([0,1]) \setminus S$. Contradiction.
So the set $C([0,1]) \setminus S$ is open.
So $S$ is closed.
 A: The idea is correct, but the argument is not correctly phrased : it has no sense to make $\varepsilon$ tend to $0$ in that situation.
A way to write it is the following : let $f  \in C([0,1]) \setminus S$. Then $f(1/2) \neq 0$. Let $r = |f(1/2)|$. If $g$ belongs to the open ball $B(f,r)$ then $d(f,g) < r$, so in particular, $|g(1/2)-f(1/2)| < |f(1/2)|$, so necessarily $g(1/2) \neq 0$. So $g \notin S$, which proves that $B(f,r) \subset C([0,1]) \setminus S$.
So $C([0,1]) \setminus S$ is open, and hence, $S$ is closed.

Remark : you can also prove directly that $f$ is closed without studying its complement.
Here is a way to do that : the functional $\varphi : f \mapsto f(1/2)$ is continuous, because for every $f \in C([0,1])$, one has $|\varphi(f)| \leq ||f||_\infty$
So $S=\varphi^{-1}(\lbrace 0 \rbrace)$ is the preimage of a closed subset by a continuous map, so it is closed.
A: Suppose $f_n$ is a sequence in $S$. If $f(1/2)\neq 0$, then $d(f_n,f)\geq f(1/2)$ for every $n$, implying $f(1/2) = 0$ is a necessary condition for the convergence of $f_n$ to $f$.
