If $X$ is a Hilbert space, then $L^{2}(\mathbb{R},X)$ is a Hilbert space with the inner product $\langle f,g\rangle:=\int_{\mathbb{R}}\langle f(s),g(s)\rangle_{X}ds$. Suppose on the other hand that $X$ is an arbitrary $C^{*}$-algebra and define the function $\{\cdot|\cdot\}:L^{2}(\mathbb{R},X)\times L^{2}(\mathbb{R},X)\to\mathbb{R}$ by \begin{equation*} \{f|g\}:=\int_{\mathbb{R}}\|f(s)g^{*}(s)\|_{X}ds \end{equation*} where this function is well-defined by Holder's inequality. There are also several nice properties:
- $\{f|g\}\geq 0$ and $\{f|g\}=0$ iff $\{s\in\mathbb{R} \mid f(s)g^{*}(s)\neq 0\}$ is Lebesgue-null
- $\{f|g\}=\int_{\mathbb{R}}\|f(s)g^{*}(s)\|_{X}ds=\int_{\mathbb{R}}\|g(s)f^{*}(s)\|_{X}ds=\{g|f\}$
- $\{\lambda f|g\}=|\lambda|\{f|g\}$ and $\{(f+g)|h\}\leq \{f|h\}+\{g|h\}$
and, in addition, $\{f|f\}=\int_{\mathbb{R}}\|f(s)f^{*}(s)\|_{X}ds=\int_{\mathbb{R}}\|f(s)\|_{X}^{2}ds=\|f\|^{2}_{L^{2}(\mathbb{R},X)}$ by means of the $C^{*}$ condition on $\|\cdot\|_{X}$. This appears to lead to the following ``proposition:"
``Propostiion:" $L^{2}(\mathbb{R},X)$ is not a Hilbert space.
Proof: Suppose for a contradiction that there exists an inner product on $L^{2}(\mathbb{R},X)$ such that $\|f\|^{2}=\langle f,f\rangle$ for every $f\in L^{2}(\mathbb{R},X)$. Then, \begin{align*} \langle f,g \rangle &=\frac{1}{4}\left(\|f+g\|^{2}-\|f-g\|^{2}+i\|if-g\|^{2}-i\|if+g\|^{2}\right) \\ &=\frac{1}{4}\left(\|f+g\|^{2}+\|f-g\|^{2}+i\{if-g|if-g\}-i\{if+g|if+g\}\right) \\ &=\frac{1}{4}\left(\|f+g\|^{2}+\|f-g\|^{2}+i\{f-g|f-g\}-i\{f+g|f+g\} \right) \\ &=\frac{1-i}{4}\|f+g\|^{2}+\frac{1+i}{4}\|f-g\|^{2}\end{align*} and this obtains $\|f\|^{2}=(1-i)\|f\|^{2}$ by taking $g=f$ so the proof is complete.
My problem is this: I seem to have proved that $L^{2}(\mathbb{R},X)$ is not a Hilbert space whenever $X$ is an arbitrary $C^{*}$-algebra, but this cannot be true - there are $C^{*}$-algebras that are also Hilbert spaces (consider $X=\mathbb{C}$ where complex conjugation is the involution). So where is the issue with the above construction? Have I implicitly assumed something and/or missed something about the mapping $\{\cdot|\cdot\}$?
Possible solution: I just came across the Gelfand-Naimark-Segal theorem which states that every $C^{*}$-algebra is isometrically isomorphic to a $C^{*}$-sub-algebra of $\mathcal{B}(H)$ for some Hilbert space $H$. In particular, I have implicitly assumed above that $X$ (modulo an isometric isomorphism) is a $C^{*}$-sub-algebra of $\mathcal{B}(H)$ for some $H$ with $\dim(H)>1$, where there are least two projections $P,Q\in X$ onto orthogonal vectors in $H$. See this MSE post to see why this ensures $X$ is not Hilbert.