# distance to a closed subspace / Banach space

I have the following problem:

Let $X:=\{f\in C^0([0,1])|f(0)=0\}$ with the $||\cdot||_\infty$-norm. Also let $U:=\{f\in X|\int_0^1f(x)dx=0\}$ be a subspace of X.

i) Show that $X$ is a Banach space and $U$ is a real closed subspace.

ii) Show that $dist(f,U)=|\int_0^1f(x)dx| \forall f\in X$

iii) Show that $\int_0^1h(x)dx<||h||_\infty \forall h\in X/\{0\}$

I already proofed ii) and iii). I have a question for i).I already proofed that U is a real closed subspace and I know the proof to show that $C^0([0,1])$ is a Banachspace. I don't see why the same proof wouldn't work for $X$. Is there anything I don't see?

Hint Form (iii) see that the linear form $$\phi:f\mapsto \int_0^1f(x)dx$$ is continuous on $( X ,\|\cdot\|_\infty)$
and $$U=\ker \phi=\phi^{-1}\{0\}$$