Solution (source code)

= Solution

For bosonic fields, <time ordering> places operators with later time arguments to the left:
$$
T\{\phi_1\cdots\phi_n\}
=\phi_{\pi(1)}\cdots\phi_{\pi(n)},
\qquad t_{\pi(1)}\geq\cdots\geq t_{\pi(n)}.
$$
<Normal ordering> places all creation operators to the left of all annihilation operators and is denoted by colons. A <Wick contraction> is
$$
\operatorname{contr}(\phi_i,\phi_j)
=\langle0|T\{\phi_i\phi_j\}|0\rangle
=D_F(x_i-x_j).
$$
<Wick theorem> states
$$
\boxed{T\{\phi_1\cdots\phi_n\}
=:\!\phi_1\cdots\phi_n\!:
+\sum_{\text{single contractions}}:\!\cdots\!:
+\sum_{\text{double contractions}}:\!\cdots\!:+\cdots,}
$$
where each sum runs over inequivalent disjoint pairings and contracted fields are replaced by their <Feynman propagator>.