# In which sense the GNS-construction is a functor?

I think, the Gelfand–Naimark–Segal construction must be a functor is some sense, but I can't find an explicit statement anywhere. Can anybody enlighten me?

For example, is the following hypothesis true?

Let $\varphi:A\to B$ be an involutive homomorphism of C*-algebras, and let $f$ be a state on $B$. Consider the corresponding state $f\circ\varphi$ on $A$ and the GNS-constructions $\pi_{f\circ\varphi}:A\to {\mathcal B}(H_{f\circ\varphi})$ and $\pi_f:B\to {\mathcal B}(H_f)$. Let $\widetilde{A}$ and $\widetilde{B}$ be the von Neumann algebras in ${\mathcal B}(H_{f\circ\varphi})$ and ${\mathcal B}(H_f)$ generated by $\pi_{f\circ\varphi}(A)$ and $\pi_f(B)$ respectively, and let us consider $\pi_{f\circ\varphi}$ and $\pi_f$ as homomorphisms with ranges in $\widetilde{A}$ and $\widetilde{B}$. Is there a homomorphism $\widetilde{\varphi}:\widetilde{A}\to\widetilde{B}$ such that $$\pi_f\circ\varphi=\widetilde{\varphi}\circ\pi_{f\circ\varphi}$$ ?

I believe, it is not essential here that $A$ and $B$ are C*-algebras, they can just be topological algebras with involution is some sense, and the states can be defined as continuous positive functionals $f:A\to{\Bbb C}$ such that the map $x\mapsto f(x^*\cdot x)$ is also continuous.

I need this for my current work, if anybody could help, I would appreciate this very much.

I cross-posted this at MathOverflow.