Solution (source code)

= Solution

On a <stationary spacetime>, choose a complete set of complex solutions $u_i$ of the massive <Klein-Gordon equation> that have positive frequency with respect to the timelike <Killing vector field> and are orthonormal in the conserved <Klein-Gordon inner product>:
$$
(u_i,u_j)_{KG}=\delta_{ij},
\qquad
(u_i^*,u_j^*)_{KG}=-\delta_{ij},
\qquad
(u_i,u_j^*)_{KG}=0.
$$
The existence of a <Cauchy hypersurface> in the <globally hyperbolic spacetime> makes the classical initial-value problem and this inner product well defined. Expand the real field as
$$
\widehat\phi=\sum_i\left(\widehat a_i u_i+\widehat a_i^\dagger u_i^*\right),
\qquad
[\widehat a_i,\widehat a_j^\dagger]=\delta_{ij}.
$$
The <vacuum state in a stationary spacetime> is defined by
$$
\boxed{\widehat a_i|0\rangle=0\quad\text{for every positive-frequency mode }i}.
$$
Acting with the creation operators builds the <bosonic Fock space>.