# How to introduce generating function in Hamiltonian formalism for field theories?

Let's have hamiltonian $$H(\psi , P ,\partial_{i}\psi ) = P\partial_{0}\psi - L(\psi , \partial_{\mu}\psi ), \quad P = \frac{\partial L}{\partial (\partial_{0}\psi)}. \qquad (.0)$$ I tried to introduce generating function for it. It will be easy if hamiltonian would be covariance, $$H = P^{\mu}\partial_{\mu}\psi - L:$$ for $$S{'} = \int L(\psi {'}, \partial_{\mu}\psi {'}){'}d^{4}x = \int (P{'}^{\mu}\partial_{\mu}\psi {'} - H(\psi {'} , P{'}, \partial_{i} \psi {'}))d^{4}x, \qquad (.1)$$ $$S = \int (P^{\mu}\partial_{\mu}\Psi - H(\psi, P , \partial_{i}\Psi ))d^{4}x \qquad (.2)$$ the principle of invariance of stationarity of action leads to connection of $(.1), (.2)$ through $$\int \partial_{\alpha}F^{\alpha}(\Psi, P, \partial_{i}\Psi)d^{4}x = \int F^{\alpha}dS_{\alpha}, \quad \delta \int F^{\alpha}dS_{\alpha} = 0.$$ But in the case of $(.0)$ I can only write the connection in form $$\delta F_{t_{a}}^{t_{b}} = \delta \int \partial_{0}G(\psi , \psi{'}, t)d^{4}x = 0 ,$$ where $G$ is some function which is continuous on all space.

Is it correct?

-