For the free scalar field theory, the generating functional is given by
$$Z[J] = N \int D\phi e^{i \int d^4x \left( \frac{1}{2} \phi(x) A\phi(x)+J(x)\phi(x)\right)} .$$
with the differential operator $A = -(\Box + m^2)$. The way this is calculated in my book is by analogy with the following multidimensional integral:
$$\left(\prod_k\int_{-\infty}^{\infty} q_k \right)e^{[(i/2)\sum_{ij} q_i A_{ij} q_j ]+ [i\sum_i J_iq_i]} = Ce^{(-i/2)\sum_{ij}J_i (A^{-1})_{ij}J_j}$$
The sums are replaced by integrals, vectors by functions and matrices by operators. So that:
$$Z[J] = Z_0 \exp(-i/2)\iint d^4x d^4y J(x) D_F(x-y)J(y)$$
where $D_F(x-y)$ is the inverse of $A$.
My question is this: Why is there an equivalence between the discrete and continuous case - in the first expression for $Z[J]$ there is a single integral while the discrete 'equivalent' contains one double and one single sum. Wouldn't the equivalence only hold if the first expression for $Z[J]$ had something like $$\iint d^4xd^4y \phi(x)A\phi(y) + \int d^4x J(x)\phi(x)$$ in the exponent?