Let $(C[0,1],\lVert\cdot\rVert_{\infty})$ be the set of continuous functions in $[0,1]$, and consider $X=\{f\mid f(0)=0\}$ and $Y=\{f \in X\mid \int^1_0f(x)\,\textrm{d}x=0\}$, subspaces of $C[0,1]$.
Prove that for all $f \in X$ such that $\lVert f\rVert_{\infty}=1$ we have that $\inf\{\lVert g-f\rVert_{\infty}\mid g \in Y \}<1$.
I proved that $Y$ is a proper closed subspace of $X$, thus is Banach because I also proved that $X$ is Banach.
We have that $\inf\{\lVert g-f\rVert_{\infty}\mid g \in Y \} \leqslant \lVert f-0\rVert _{\infty}=1$.
Now if I assume that $\inf\{\lVert g-f\rVert_{\infty}\mid g \in Y \} =1$, can someone help me to derive a contradiction?