# Poisson brackets for a field theory

I'm performing a calculation involving Dirac constraints theory, and I need to calculate the Poisson brackets between constraints and the total Hamiltonian. The starting theory is described by a Lagrangian density depending on two fields (say, L(X,Y)) and I realized I'm not familiar with a definition of Poisson brackets for a field theory involving more than a single field. I wasn't able to find a book that generalizes the standard definition for discrete systems (https://en.wikipedia.org/wiki/Poisson_bracket) to fields, so my first question is a good book for reference. Secondly, by thinking by analogy I came up with two different ways to solve my problem:

1. I define a Poisson bracket for every couple of field-momentum: $$$$\left\{ f,g \right\}= \frac{\partial f}{\partial X}\frac{\partial g}{\partial V}-\frac{\partial f}{\partial V}\frac{\partial g}{\partial X}$$$$ for the PB with respect to the field X and the corresponding momentum V, and: $$$$\left\{ f,g \right\}= \frac{\partial f}{\partial Y}\frac{\partial g}{\partial W}-\frac{\partial f}{\partial W}\frac{\partial g}{\partial Y}$$$$ for the PB with respect to the field Y and the corresponding momentum W
2. I define a single PB summing up for all the field-momentum couples (similarly to che standard definition):

$$$$\left\{ f,g \right\}= \frac{\partial f}{\partial X}\frac{\partial g}{\partial V}-\frac{\partial f}{\partial V}\frac{\partial g}{\partial X} + \frac{\partial f}{\partial Y}\frac{\partial g}{\partial W}-\frac{\partial f}{\partial W}\frac{\partial g}{\partial Y}$$$$

Can someone help?

It is standard for one pair of conjugate fields $$X(x)$$ and $$V(x)$$ and a functional of them, $$f[X,V]$$, to consider
$$\left\{ f[X,Y] , g[X,Y]\right \}= \int\!\! dx ~~~\Bigl ( \frac{\delta f}{\delta X(x)}\frac{\delta g}{\delta V(x)}- \frac{\delta f}{\delta V(x)}\frac{\delta g}{\delta X(x)} \Bigr ),$$ generalizing the standard multivariable expression to an infinite vector of variables, the fields.
If you have several fields, you may index fields to $$X^i(x)$$ and $$V^i(x)$$, and you further multiplex the above expression to discrete vectors whose components are infinite-dimensional fields, $$\left\{ f[X,Y] , g[X,Y]\right \}=\sum_i \int\!\! dx ~~~\Bigl ( \frac{\delta f}{\delta X^i(x)}\frac{\delta g}{\delta V^i(x)}- \frac{\delta f}{\delta V^i(x)}\frac{\delta g}{\delta X^i(x)} \Bigr ).$$
Recall $$\left\{ X^k(z) , V^j(y)\right \}= \delta^{kj} \delta (z-y)~~.$$