# Pre-Hilbert spaces and orthogonal projections in the space of continuous functions

By $X$ we denote some pre-Hilbert space (it means that there is the inner product $<,>$ but the corresponding normed space is not neccesarily banach). It can be proved that in the case of non Hilbert space there exists a closed subspace $H_0\subset X$ such that $H_0\bigoplus H_0^\perp \ne X$.

So, let $X$ be the space of continuous functions $C[-1,1]\rightarrow \mathbb{C}$ endowed with the inner product $<f,g>=\int_{-1}^{1}f(t)\bar{g(t)}dt$. Consider the following subspace $H_0=\{f\in X: \int_{-1}^0f(t)dt=\int_{0}^{-1}f(t)dt\}$.

I'd like to understand wheather $H_0\bigoplus H_0^{\perp}=X$. First of all, could you give me some hints to prove that $H_0\bigoplus H_0^{\perp}=X$ indeed? (if my memory does not fail me, $X$ is not banach, hence we cannot use the theorem about Hilbert spaces) However, I'd like to understand whether it is possible to disprove that without an example, using only some properties of $H_0$ itsself?

If $X=H_0\oplus H_0^\perp$, then for every $f\in X$ there exist $g\in H_0$ such that $d(f,H_0)=\Vert f-g\Vert_2$. I. e. the distance to $H_0$ is attained for every $f\in X$. Moreover the distance minimizer $g$ is the projection of $f$ on $H_0$.
But this is not true. Indeed, note that $H_0$ is a kernel of the functional $$\varphi:C([-1,1])\to\mathbb{C}:f\mapsto \int_0^1 f(t)dt-\int_{-1}^0 f(t)dt$$ Its norm is $\sqrt{2}$ but it is not attained, hence for any $f\notin H_0$ the distance $d(f,H_0)$ is not attained. For more details see this answer. Beware, this answer consider another norm on $C([0,1])$ but the main idea remains the same.
It would be much simpler to get negative answer presented above if one could show that $H_0^\perp=\{0\}$. I believe this is true.