Prove that the set $Y = \{f \in C[0, 2] \ | \ f(1) = 0 \} \subseteq (C[0, 2], d)$ where $d$ is the uniform metric is closed.
Note $C[0, 2]$ is the metric space of all continuous functions on $[0, 2]$.
My Attempted Proof: We show that $C[0, 2] \setminus Y$ is open in $C[0, 2]$.
Note that $C[0, 2] \setminus Y = \{f \in C[0, 2] \ | \ f(1) \neq 0\}$. Recall that the uniform metric is defined to be $$d(f, g) = \max_{0 \leq x \leq 2}|f(x)-g(x)|$$
Pick a function $f \in C[0, 2] \setminus Y$. We need to show the existence of an open ball $B(f, r) \subseteq C[0, 2] \setminus Y$ for some $r > 0$. We do this by contradiction.
Suppose there did not exist an $r > 0$ such that $B(f, r) \subseteq C[0, 2] \setminus Y$. Then for all $r > 0$ there exists an $h \in C[0, 2] \setminus Y$ such that $h \not\in B(f, r)$. This implies that $d(f, h)$ is unbounded.
But since $[0, 2]$ is closed we have that $h$ attains a maximum on $[0, 2]$ and so does $f$, so there must exist some integer $M$ such that $d(f, h) \leq M$, we thus have a contradiction, and the existence of such an open ball follows. $\square$.
I don't think that my proof is correct. For example I don't think that there exists a unique $h$ for all $r > 0$ for which $h$ is not contained in $C[0, 2] \setminus Y$. Furthermore I haven't used the fact that $f(1) \neq 0$ and $h(1) \neq 0$ anywhere in the proof.
How could I go about proving this? And are there any errors in my attempted proof that I haven't spotted?
Take $f\in C\bigl([0,2]\bigr)\setminus Y$. Then $f(1)\neq0$. Take $r=\bigl|f(1)\bigr|$. I will prove that$$B\left(f,\frac r2\right)\subset C\bigl([0,2]\bigr)\setminus Y.$$Indeed, if $g\in B\left(f,\frac r2\right)$, then\begin{align}\bigl|g(1)\bigr|&=\bigl|f(1)+g(1)-f(1)\bigr|\\&\geqslant\bigl|f(1)\bigr|-\bigl|g(1)-f(1)\bigr|\\&>r-\frac r2=\frac r2\\&>0.\end{align}