Covariant phase space with boundaries

The covariant phase space method of Iyer, Lee, Wald, and Zoupas gives an elegant way to understand the Hamiltonian dynamics of Lagrangian field theories without breaking covariance. The original literature however does not systematically treat total derivatives and boundary terms, which has led to some confusion about how exactly to apply the formalism in the presence of boundaries. In particular the original construction of the canonical Hamiltonian relies on the assumed existence of a certain boundary quantity"$B$", whose physical interpretation has not been clear. We here give an algorithmic procedure for applying the covariant phase space formalism to field theories with spatial boundaries, from which the term in the Hamiltonian involving $B$ emerges naturally. Our procedure also produces an additional boundary term, which was not present in the original literature and which so far has only appeared implicitly in specific examples, and which is already nonvanishing even in general relativity with sufficiently permissive boundary conditions. The only requirement we impose is that at solutions of the equations of motion the action is stationary modulo future/past boundary terms under arbitrary variations obeying the spatial boundary conditions; from this the symplectic structure and the Hamiltonian for any diffeomorphism that preserves the theory are unambiguously constructed. We show in examples that the Hamiltonian so constructed agrees with previous results. We also show that the Poisson bracket on covariant phase space directly coincides with the Peierls bracket, without any need for non-covariant intermediate steps, and we discuss possible implications for the entropy of dynamical black hole horizons.


Introduction
The most basic problem in physics is the initial-value problem: given the state of a system at some initial time, in what state do we find it at a later time? This problem is most naturally discussed within the Hamiltonian formulation of classical/quantum mechanics. In relativistic theories however it is difficult to use this formalism without destroying manifest covariance: any straightforward approach requires one to pick a preferred set of time slices. Such a choice is especially inconvenient in theories which are generally-covariant, such as Einstein's theory of gravity.
The standard approach to this problem is to de-emphasize the Hamiltonian formalism, restricting classically to Lagrangians and quantum mechanically to path integrals. This works fine for many applications, but there remain some topics, such as the initialvalue problem, for which the Hamiltonian formalism is too convenient to dispense with. For example it is only in the Hamiltonian formalism that one can do a proper accounting of the degrees of freedom in a system, and thermodynamic quantities such as energy and entropy are naturally defined there.
This note grew out of the authors' attempts to understand the covariant phase space formalism. Its primary goal is pedagogical: to present that formalism in a way that avoids some confusions which the authors, and apparently also others, ran into in studying the original literature. These confusions have to do with the role of boundary terms and total derivatives in the formalism, which in the standard presentation [7] were treated in a somewhat cavalier manner. Indeed in [7] boundary terms and total derivatives were ignored for most of the initial discussion, but then the existence of the Hamiltonian was presented as requiring the existence of a boundary quantity called B obeying a certain integrability condition. 2 Moreover no general reassurance as to when such a quantity exists was given, which is surprising from the point of view of the ordinary canonical formalism: usually the Hamiltonian can be obtained from the Lagrangian algorithmically via the equation H = p aq a − L. In a formalism which treats boundary terms systematically, the existence of the Hamiltonian should be automatic (as for example is the case in the non-covariant analysis of general relativity given in [26]). Our goal in this note is to give such a systematic treatment within the covariant phase space formalism. As a bonus, we will find that the formula given in [7] for the canonical Hamiltonian is not correct in general: there is an additional boundary term which is nonzero even in general relativity for sufficiently permissive boundary conditions, and which is generically nonzero for theories with sufficiently many derivatives. After giving the general formalism we will illustrate it in a few examples, recovering known results derived using non-covariant methods in the appropriate cases.
Our results are simple enough that we can briefly describe them here. Indeed we consider a classical field theory action where L is a d-form and is a (d − 1)-form. ∂M in general includes both spatial and future/past pieces, in this paper we do not consider null boundaries. The variation of L always has the form δL = E a δφ a + dΘ, (1.2) where E a = 0 are the equations of motion and Θ is a (d − 1)-form which is linear in the variations of the fields φ a . Stationarity of the action up to future/past boundary terms requires (Θ + δ ) | Γ = dC, (1.3) where Γ is the spatial boundary and C is a (d − 2)-form defined on Γ that is also linear in the field variations. The (pre-)symplectic form of this system is given by where Σ is a Cauchy slice and the precise meaning of the second variation implicit in this formula is explained below (basically we re-interpret δ as the exterior derivative on the space of field configurations). Finally if ξ µ is a vector field generating a one-parameter family of diffeomorphisms which preserve the boundary conditions, and under which L, , and C transform covariantly, then the Hamiltonian which generates this family of diffeomorphisms is given by that J ξ = dQ ξ . Thus in such theories the Hamiltonian conjugate to ξ is a pure boundary term: The remainder of this paper explains these formulas in more detail and illustrates them using examples. In a final section we show that the Poisson bracket in the covariant phase space formalism is generally equivalent to the Peierls bracket, we give a proof of Noether's theorem for continuous symmetries within the covariant phase space approach, and we comment on some subtleties arising in the application of our results to asymptotic boundaries. The inclusion of boundary terms in the covariant phase space formalism was previously considered in [8,12,14,20,[27][28][29][30][31], each of which has some nontrivial overlap with our discussion. In particular setting C = 0 in our formalism one obtains a formalism described in [8], but as we explain below this is an inappropriate restriction. A formalism with nonzero C was introduced in [12,14,20], but the covariance properties of C were not studied and its contribution to canonical charges such as the Hamiltonian was shown only in general relativity with specific boundary conditions. An alternative formalism in which many of the same issues can be addressed was given in [32,33]; we have not studied in detail the relationship between that formalism and ours, but it requires integrability assumptions of the type we avoid and the treatment of boundary terms seems to be less general than ours. 3 We believe our treatment of boundary terms is the most complete so far, and also perhaps the most efficient.

Notation
In this paper we make heavy use of differential forms, our conventions for these are that if ω is a p form and σ is a q form, we have (ω ∧ σ) µ 1 ...µpν 1  Here "[·] denotes averaging over index permutations weighted by sign, so for example ω [µ σ ν] = 1 2 (ω µ σ ν − ω ν σ µ ), and is the volume form. The Lie derivative of any differential form ω with respect to a vector field X is related to the exterior derivative via Cartan's magic formula L X ω = X · dω + d(X · ω), (1.8) where · denotes inserting a vector into the first argument of a differential form (if ω is a zero-form we define X · ω = 0). Throughout the paper we will use "d" to indicate the exterior derivative on spacetime and "δ" to indicate the exterior derivative on configuration space (and also its pullback to pre-phase space and phase space), a notation we discuss further around equation (2.22). We take spacetime to be a manifold with boundary M , whose boundary we call ∂M , and we are often interested a Cauchy surface Σ and its boundary ∂Σ. We here set up some conventions about how to assign orientations to these various submanifolds of M . Given an orientation on an orientable manifold with boundary M , there is a natural orientation induced on ∂M such that Stokes' theorem holds. If M has a metric, as it always will for us, then we can describe this induced orientation by saying we require that the boundary volume form ∂M is related to the spacetime volume form by = n ∧ ∂M , (1.10) where n is the "outward pointing" normal form defined by equation (2.35) below. We will always use this orientation for ∂M . We will also adopt the orientation on Σ given by viewing it as the boundary of its past in M , and we will adopt the orientation on ∂Σ given by viewing it as the boundary of Σ. So for example if we take M to be the region with x ≤ 0 in Minkowski space, with volume form = dt ∧ dx ∧ dy ∧ dz, and we take Σ to be the surface t = 0, then the volume form ∂M on ∂M is −dt ∧ dy ∧ dz, the volume form Σ on Σ is dx ∧ dy ∧ dz, and the volume form ∂Σ on ∂Σ is dy ∧ dz. Note in particular that the volume form on ∂Σ is not obtained by viewing ∂Σ as the boundary of its past within ∂M , these differ by a sign. Sometimes we will discuss a Cauchy surface Σ − which is the past boundary of a spacetime M , the most convenient way to maintain our conventions is to say that when this surface appears implicitly as part of ∂M we give it the opposite orientation from when it appears explicitly as Σ − .

Hamiltonian mechanics
Hamiltonian mechanics is often presented as the dynamics of a phase space labeled by position and momentum coordinates q a , p a , with any scalar function H on this phase space generating dynamical evolution via Hamilton's equationṡ Unfortunately this split of coordinates into positions and momenta makes it difficult to preserve covariance. There is however an elegant geometric formulation of Hamiltonian mechanics which allows us to avoid making such a split. Namely we instead view phase space as an abstract manifold P, endowed with a closed non-degenerate two-form Ω called the symplectic form [34]. A manifold equipped with such a form is called a symplectic manifold. We now briefly review Hamiltonian mechanics from this point of view.
Let P be a symplectic manifold, with symplectic form Ω. We can view Ω as a map from vectors to one-forms via Ω(Y )(X) ≡ Ω(X, Y ), and since Ω is non-degenerate this map will have an inverse, Ω −1 , which we can also view as an anti-symmetric two-vector mapping a pair of one-forms to a real number via Ω −1 (ω, σ) ≡ ω(Ω −1 (σ)). Given any function H : P → R, we can then define a vector field X H on P via where f : P → R is an arbitrary function on P. Here we introduce a notation where we denote the exterior derivative on phase space by δ to distinguish it from the exterior derivative d on spacetime which appears below. The idea is then to view the integral curves of X H in P as giving the time evolution of the system generated by viewing H as the Hamiltonian. We can express this using the Poisson bracket of two functions f and g on P, defined by in terms of which we have the time evolutioṅ for any function f : P → R. Clearly Ω must be non-degenerate for this dynamics to be well-defined. It is less obvious why Ω is required to be closed, and in fact there are dynamical systems where it isn't, but in such systems the Poisson bracket is not preserved under time evolution by an arbitrary Hamiltonian so it cannot become a commutator in quantum mechanics. 4 The old-fashioned version of the Hamiltonian formalism using q a and p a is recovered from these definitions by taking The standard interpretation of the phase space of a dynamical system is that it labels the set of distinct initial conditions on a time slice. This interpretation is not covariant, as we need to specify the time slice. The main idea of the covariant phase space formalism, going back to [1][2][3][4], is roughly speaking to instead define phase space as the set of solutions of the equations of motion. To the extent that the initial value problem is well-defined, these should be in one-to-one correspondence with the set of initial conditions on any time slice. This definition however needs some improvement for theories with continuous local symmetries, since for such theories the initial value problem is not well-defined [35]. For example a solution A µ of Maxwell's equations can always be turned into another equally good solution by a gauge transformation which has zero support in a neighborhood of any particular time slice. In the above language, this problem arises because the naive symplectic form one derives from the Maxwell Lagrangian is degenerate (we review this example further in section 3.2 below).
Fortunately there is a nice way to deal with this: we instead refer to the set of solutions of the equations of motion (obeying any needed boundary conditions) as prephase space P. We will soon see that in any Lagrangian field theory this pre-phase space is always naturally equipped with a pre-symplectic form Ω, which is a closed but possibly degenerate two-form. The physical phase space P is then obtained by quotienting P by the action of the group of continuous transformations whose generators are zero modes of Ω [1][2][3][4][5]. More explicitly, if X and Y are vector fields on P which are annihilated by Ω, then their commutator [ X, Y ] ≡ L X Y will also be annihilated by Ω. Indeed using δ Ω = 0, X · Ω = Y · Ω = 0, and (1.8), we have (2.7) 4 One way to see this is the following: conservation of the Poisson bracket is equivalent to saying that the Lie derivative L X H Ω vanishes. From (1.8) we then have 5) so for this to vanish for arbitrary H we need δΩ = 0.
The set of zero-mode vector fields of Ω thus form a (possibly infinite-dimensional) Lie algebra, and by Frobenius's theorem they are jointly tangent to a set of submanifolds which foliate P. These submanifolds can be thought of as the orbits of the connected subgroup G of the diffeomorphisms of P whose Lie algebra corresponds to the zero modes of Ω. The physical phase space P is then defined as the quotient of P by this action: 5 P ≡ P/ G.
Thus the action of G is a redundancy of description that leaves no imprint on P; in local field theories it is typically realized as a set of continuous gauge transformations which become trivial sufficiently quickly at any boundaries. 6 To complete the construction of the phase space P, we must also define a symplectic form Ω. This is done in the following way. Let π : P → P be the map that that sends each point in P to its G-orbit, let p be a point in P, and let X and Y be vectors in the tangent space T p P. We can always find a point q ∈ P and vectors X and Y in T q P such that X and Y are the pushforwards of X and Y by π. We then define For this Ω to be well-defined, we need to show that it is independent of the arbitrariness involved in choosing q, X, and Y . We first note that two vectors X and X in T q P which both push forward to the same X ∈ T p P can differ only by addition of a vector annihilated by Ω: this ambiguity thus has no effect in (2.9). Secondly we observe that by definition any two points q, q ∈ P which both map to p are related by the group action: q = gq for some g ∈ G. This implies that the pushforward X ∈ T q P of X ∈ T q P by g maps via pushforward by π to the same element of T p P that X does (this follows from π • g = π). Finally we note that Ω is invariant under pushforward 5 There is an interesting mathematical subtlety in this construction: the phase space we obtain may not actually be a manifold [4,36,37]. The reason is that there may be special points in P which are invariant under a nontrivial subgroup of the set of gauge transformations we quotient by, in which case P will be singular at those configurations. For example in general relativity there can be special geometries which have continuous isometries, and if those isometries vanish in a neighborhood of any boundaries then they will correspond to zero modes of Ω. In this paper we assume that this does not happen: at worst it affects only a measure zero set of points in P, and even that seems unlikely to be realized in asymptotically-AdS or asymptotically-flat spacetimes since isometries which are nonvanishing at the boundary are not zero modes of Ω. We expect a generalization of our formalism could remove this assumption, but currently we do not think it is worth the additional machinery. For similar reasons we also do not address the subtleties associated to P and P often being infinite-dimensional manifolds. 6 Discrete gauge symmetries do not lead to zero modes of the pre-symplectic form, but in going from P to P we should still quotient by some or all of them depending on the boundary conditions. by g: this follows from the fact that by (1.8) for any zero mode X of Ω we have L X Ω = X · δ Ω + δ( X · Ω) = 0. (2.10) Together these results imply that (2.9) is indeed unambiguous. Finally we note that the Ω so constructed is non-degenerate: by (2.9) any nonzero vector field X annihilated by Ω would be the pushforward of a vector field X annihilated by Ω, but by construction these have all already been quotiented by and thus their pushforwards by π must vanish. Therefore Ω is indeed a symplectic form on P. This discussion has so far been rather abstract; an example may be helpful. Consider a free non-relativistic particle, with action There is a two-parameter set of solutions so we can use (x 0 , p) as coordinates on phase space. The symplectic form (here G is trivial so no quotient is needed) is δp ∧ δx 0 , and the Hamiltonian evolution on this set of solutions generated by the Hamiltonian H = p 2 2m is We emphasize the difference in interpretation between equations (2.12) and (2.13): the former gives a parametrization of the set of solutions by saying what is going on at t = 0, while the latter gives an evolution on that set which is nontrivial even though each solution "already knows" its own evolution. 7 This distinction is especially clear if we evolve in this phase space using a Hamiltonian other than p 2 2m , we discuss this further in section 4 below.

Local Lagrangians
In Lagrangian field theories we can make the discussion of the previous section more concrete using the formalism of [5][6][7][8][9]. In this formalism the Lagrangian density is converted into a Lagrangian d-form L, which is a local functional of the dynamical fields φ and their derivatives, and also potentially of some non-dynamical background fields χ and their derivatives. For example for a self-interacting scalar field theory we have where φ is a dynamical field, g µν is a non-dynamical background metric, and is the spacetime volume form. To avoid confusion, we emphasize that in saying that L is a d-form, we mean that it transforms as a d-form under diffeomorphisms which act on both the dynamical and background fields. In the following subsection we will discuss the special case of covariant Lagrangians, which transform as d-forms also under diffeomorphisms which act only the dynamical fields.
In [5][6][7][8][9] the Lagrangian form was viewed as only being defined up to the addition of a total derivative, but since we are being careful about boundary terms we will not allow the Lagrangian to be arbitrarily modified by the addition of a total derivative. Indeed when we integrate the Lagrangian d-form to define an action, we will include a boundary term obtained by integrating over ∂M a (d − 1)-form built out of the restrictions of φ and χ to the boundary ∂M , and also possibly their normal derivatives there: Thus we may shift L by a total derivative only if we shift in a compensating manner that preserves S, and for the most part we will not do this. The basic idea of Lagrangian mechanics is that, after imposing appropriate boundary conditions at ∂M , we should look for configurations φ c about which the action is stationary under arbitrary variations of the dynamical fields which obey those boundary conditions. In fact the truth is slightly more subtle, due to the fundamentally different meaning of boundary conditions at spatial boundaries and boundary conditions at future/past boundaries. The former are part of the definition of the theory, while the latter specify a state within that theory. If we wish to allow variations that change the state, which indeed we do, then we do not wish to impose any boundary conditions at future/past boundaries. Stationarity of the action under such variations would be too strong of a requirement, typically it would lead to a problem with few or no solutions. The right approach is instead to only require that the action be stationary up to terms which are localized at the future and past boundaries. If we decompose ∂M = Γ ∪ Σ − ∪ Σ + , where Γ is the spatial boundary, Σ − is the past boundary, and Σ + is the future boundary, then we should look for configurations Φ c about which (2.16) where the variation obeys the boundary conditions at Γ and Ψ is locally constructed out of the dynamical and background fields at Σ ± . To discuss this more explicitly it is convenient to note that, by way of "integration by parts"-style manipulations, any local Lagrangian form must obey where a is an index running over the dynamical fields, δφ a are variations of those fields, d is the spacetime exterior derivative, Θ is a local functional of the dynamical fields φ, the background fields χ, and their derivatives, and is also a homogeneous linear functional of the δφ and their derivatives. The E a are local functionals of φ, χ, and their derivatives. Θ is a (d−1)-form, and is called the symplectic potential. It is defined only up to addition of a total derivative dY for Y some local (d−2) form. We moreover see that to avoid a term at the spatial boundary Γ in (2.16), we need the second term in (2.18) to only have support on Σ ± . A first guess is that we therefore should require (δ + Θ)| Γ = 0 for all variations obeying the boundary conditions. Given the ambiguity of shifting Θ by a total derivative, however, this is unnatural. A more general sufficient condition, which we believe (but have not shown) is also necessary, is to require that (Θ + δ )| Γ = dC, (2.20) where C is a local (d − 2)-form on Γ which is constructed from the φ, χ, δφ, and their derivatives. As with L and , any addition to Θ of a total derivative dY must be complemented by an addition of Y to C, such that (2.20) is preserved. 8 We thus may rewrite (2.18) as so we have achieved (2.16) with Ψ = Θ + δ − dC (writing it this way requires us to extend C to Σ ± in an arbitrary manner, but only its values at ∂Σ ± actually contribute).
To set up the Hamiltonian formalism, we must now introduce a pre-phase space and pre-symplectic form. The pre-phase space P we take to be the set of dynamical field configurations which obey the equations of motion, and also the boundary conditions at the spatial boundary Γ. We do not impose boundary conditions in the future/past, and any background field configurations are held fixed. In defining the symplectic form, it is very useful to first note that there is a convenient change of notation which allows us to re-interpret quantities like Θ and C as one-forms on P [3]. The idea is that instead of viewing the quantity δφ a (x) as an infinitesimal variation, we can (and from now on will) view it as a one-form on the set of dynamical field configurations φ a (x). 9 δ thus now denotes the exterior derivative for differential forms living on this configuration space, and the action of δφ a (x) on a vector field is given by Thus if we wish to convert δφ a (x) from a one-form back to a variation, we act with it on a vector whose components are the desired variation. In this new notation, Θ and C are one-forms on configuration space. We may then pull them back to one-forms on our pre-phase space P by restricting their action to those vectors which are tangent to P. 10 Using this new interpretation of δ we can now introduce our version of the presymplectic current from [5][6][7][8], which we define as the pullback to P of the quantity δΨ: Here we have used δ 2 = 0. Since the pullback and exterior derivative are commuting operations, ω is closed as a two-form on P. Moreover ω vanishes on Γ, since by (2.20) we have ω is also closed as a (d − 1)-form on spacetime: In classical mechanics the term "configuration space" is sometimes used to describe the set of positions of particles at a fixed time. Here we are instead talking about the set of functions φ a (x) throughout spacetime, our configuration space could also be called the set of histories.
10 Tangent vectors to P are precisely those whose components f a (φ, x) obey the linearized equations of motion, in the sense that E a (φ c + f, χ) = 0 to linear order in f .
Here we have used that E a = 0 on P, and also that d and δ commute. Finally we define the pre-symplectic form on P as where Σ is any Cauchy slice of M . (2.24) and (2.25) ensure that Ω is independent of the choice of Σ. Moreover from (2.23) we have so Ω is independent of how we chose to extend C into the interior of M . Ω will be degenerate if there are continuous local symmetries, but once we quotient P by the subgroup G of pre-phase space diffeomorphisms generated by the zero modes of Ω (and possibly its extension by other discrete gauge symmetries) then the resulting symplectic form Ω on phase space will be non-degenerate (and closed since ω is closed on P).

Covariant Lagrangians
The covariant phase space formalism is especially useful for systems whose dynamics are invariant under at least some continuous subgroup of the spacetime diffeomorphism group. We first recall that by definition the variation of any dynamical tensor field φ under the infinitesimal diffeomorphism generated by a vector field ξ µ is with the right hand side being the Lie derivative of φ with respect to ξ [38]. To make contact with the notation of the previous section we can define a vector field on configuration space, in terms of which we have Here "·" again denotes the insertion of a vector into the first (and in this case only) argument of a differential form. More generally the infinitesimal diffeomorphism transformation of any configuration-space tensor σ, such as the one-forms Θ and C or the two-form ω, is given by In particular from (1.8) we have so "the diffeomorphism of a variation is the variation of a diffeomorphism", as is the case for the standard interpretation of the symbol δφ a (x) as an infinitesimal function.
We now introduce a key definition: a configuration-space tensor σ which is also a spacetime tensor locally constructed out of the dynamical and background fields is covariant under the infinitesimal diffeomorphism generated by a vector field ξ µ if where we emphasize that L ξ is the spacetime Lie derivative. This is to be distinguished from the configuration-space Lie derivative L X ξ appearing in (2.31): the latter implements the diffeomorphism on dynamical fields only, while the former implements it on both dynamical and background fields. This distinction is important because symmetries are only allowed to act on dynamical fields, so for σ to transform correctly under a diffeomorphism symmetry it must be covariant. The simplest way for a configuration space and spacetime tensor σ locally constructed out of dynamical and background fields to be covariant under some ξ is for all background fields involved in its construction to be invariant under ξ, in the sense that L ξ χ i = 0 where i runs over background fields. For example the Lagrangian form (2.14) is covariant under any diffeomorphisms which are isometries of the background metric g, but it is not covariant under general diffeomorphisms. More generally some non-invariant background fields are allowed as long as the combinations in which they appear in σ are invariant. An extreme case is for σ to not depend on any nontrivial background fields at all, as happens for the Einstein-Hilbert Lagrangian in general relativity, in which case it will be covariant under arbitrary diffeomorphisms. 11 In fact it was shown in [7] that this is the only way for a Lagrangian form to be covariant under arbitrary diffeomorphisms: it must be built only out of a dynamical metric g µν , its associated Riemann tensor R α βγδ , tensorial dynamical matter fields, and covariant derivatives of the latter two. 12 Moreover it was also shown that for such Lagrangians the symplectic potential Θ can always be taken to be covariant under arbitrary diffeomorphisms, essentially because the derivation of (2.17) can always be done using "integration by parts" manipulations on covariant derivatives. Indeed even if there are nontrivial background fields, we can still choose Θ to be covariant under the subgroup of diffeomorphisms which preserve all background fields. This is because we could always choose to consider a different theory where all background fields become dynamical, in which case the Lagrangian form would become covariant under arbitrary diffeomorphisms, and thus by the argument of [7] so would Θ. Therefore Θ must still be covariant in the original theory under diffeomorphisms which preserve all background fields.
Covariance of the Lagrangian form L under the diffeomorphisms generated by a vector field ξ µ is not sufficient for those diffeomorphisms to be symmetries, they must also respect the boundary conditions and the boundary term at Γ must also be covariant under them. These requirement are nontrivial, for example many diffeomorphisms do not even preserve the location of Γ. For a continuous transformation of dynamical fields to be a symmetry, the action must be invariant under that transformation up to possible boundary terms at Σ ± (see section 4.2 below for more on why this is the correct requirement). We can write the variation of the action (2.15) by an infinitesimal diffeomorphism under which L is covariant as where we have used (2.33) and (1.8). To avoid contributions at the spatial boundary Γ, we first require that at Γ the normal component of ξ µ vanishes. This ensures that ξ µ does not move Γ, and also ensures that the first term in (2.34) vanishes. If is covariant with respect to ξ then the second term will also not give a contribution at Γ, since we then have δ ξ | Γ = L ξ | Γ = d(ξ · )| Γ , which integrates to a contribution at ∂Σ ± . We will now see however that in general this covariance of imposes more requirements on ξ than just a vanishing normal component at Γ. We thus will need to restrict consideration to diffeomorphisms obeying these additional requirements (and also preserving the boundary conditions), since otherwise they will not be symmetries.
In considering what kinds of terms may appear in it is useful to adopt the covariant hypersurface formalism, which is a way of discussing the extrinsic properties of a hypersurface without making any choice of coordinates [38,39]. To discuss ∂M in this formalism, we introduce a background scalar field f on M such that (1) There is a neighborhood of ∂M in which f ≤ 0, and in which f = 0 only on ∂M .
(2) ∂ µ f is either spacelike or timelike at each point in ∂M , except perhaps at finitely many "corners" where it is not well-defined and across which its signature can switch.
Different choices of f away from ∂M give different foliations of the spacetime near the boundary. We can then define a normal one-form field in the vicinity of ∂M , with the ± being determined by whether ∂ µ f is spacelike or timelike on the nearby part of ∂M . 13 n µ can then be used to define an induced metric and an extrinsic curvature tensor where we emphasize that these quantities live in a neighborhood of ∂M . Away from ∂M in this neighborhood they obviously depend on the choice of f , but right on ∂M they do not. 14 This neighborhood will be foliated by slices of constant f , and within it γ ν µ can be used to project tensor indices down to ones which are tangent to those slices. It can also be used to define a hypersurface-covariant derivative, which, acting on any tensor T that obeys the requirement that contraction of any index with n µ or n µ vanishes, is defined by This is the unique derivative such that D µ γ αβ = 0. γ µν , n µ , and K µν (and also their tangential and normal derivatives) are natural quantities to use in constructing , together with tangential and normal derivatives of the dynamical fields.
By construction, will transform as a (d − 1)-form under diffeomorphisms which act on both dynamical and background fields, with f included among the latter. For it to be covariant we need it to still transform as a (d − 1)-form when only the dynamical fields transform. We've already seen that the covariance of L under the infinitesimal diffeomorphisms generated by ξ µ requires all 'bulk" background fields to appear in L only in combinations which are invariant under those diffeomorphisms. Similarly the covariance of also requires some kind of invariance of f . We only need to be covariant at the spatial boundary Γ, so the strongest condition we could reasonably require is that everywhere in some neighborhood of Γ, in which case we will will say that ξ µ is foliationpreserving. will always be covariant with respect to foliation-preserving diffeomorphisms (provided that any other background fields are also invariant). More generally however we can also consider diffeomorphisms where we only require for all n = 0, 1, . . . k, in which case we say that ξ µ is foliation-preserving at order k.
Any which is constructed out of at most k derivatives of f will also be covariant under such diffeomorphisms, 15 and in fact since f appears only inside of n µ , which is foliationindependent, such an will actually also be covariant under foliation-preserving diffeomorphisms of order k − 1. 16 Finally we consider the covariance of the quantity C appearing in (2.20). We will assume that given and Θ the demonstration of equation (2.20) involves "covariant integration by parts" manipulations on the boundary, together with imposing the boundary conditions (see sections 3.3, 3.4 for examples of this). The C which appears will then always be a locally constructed out of the dynamical and background fields and their derivatives, and it will transform as a (d − 2)-form under diffeomorphisms which act on both the dynamical and background fields. Moreover like it will be covariant under foliation-preserving diffeomorphisms which preserve any other background fields. Furthermore if involves at most k derivatives of f then C will as well, so C will more generally at least be covariant under foliation-preserving diffeomorphisms of order k−1. We will need to use this covariance of C in the following subsection.

Diffeomorphism charges
We now turn to the problem of constructing the Hamiltonian H ξ that generates the evolution in phase space corresponding to the diffeomorphisms generated by any vector field ξ µ which respects the boundary conditions and under which L, , and C are covariant. Our strategy will be to first find a function H ξ on pre-phase space obeying with X ξ given by (2.29). For any zero mode X of Ω we have so H ξ will also be a well-defined function on the phase space P. Moreover since Ω defines the non-degenerate symplectic form Ω on P via (2.9), we may use its inverse there to rewrite (2.41) as where X ξ is now defined modulo addition by a zero mode of Ω and f is a function on P. This is nothing but Hamilton's equation (2.2), so finding an H ξ on P obeying (2.41) is sufficient to construct the Hamiltonian on phase space. We now compute the right hand side of (2.41), aiming to show that indeed it is equal to δ of something. It is useful [7] to first introduce the Noether current This is a scalar function on P, and a (d − 1)-form on spacetime. Note that we are using "·" for the insertion of both pre-phase space and spacetime vectors. If L is covariant under ξ then J ξ is closed as a spacetime form: In this derivation we have used (2.17), (1.8), (2.19), (2.33), and also that d(X ξ · Θ) = X ξ · dΘ. We then have the following calculation: Here we have made liberal use of (1.8) for both pre-phase space and spacetime differential forms, as well as (2.44) Here we have again used (1.8), as well as (2.33) (applied to C) and (2.20), and also discarded the integral of a total derivative over the closed manifold ∂Σ. Comparing to (2.41) we see that we have succeeded in obtaining an exterior derivative on pre-phase space, with H ξ given by where the arbitrary additive constant is independent of the dynamical fields and reflects the standard additive ambiguity of the energy in any Hamiltonian system. Note in particular that no additional "integrability condition", such as those in equation (80) of [7] or equation (16) of [9], was needed: equation (2.20), which we obtained by demanding stationarity of the action, was sufficient to algorithmically construct H ξ . Note also that H ξ is independent of choice of Cauchy surface Σ: if we consider two slices Σ and Σ, whose boundaries obey ∂Σ − ∂Σ = ∂Ξ, with Ξ ⊂ Γ, the difference of H ξ evaluated on these slices is given by Here we used (2.44), (2.20), (2.31) applied to , (1.8), (2.33) applied to , and that ξ has no normal component to Ξ.
Our derivation of (2.48) only required the various quantities to be covariant with respect to the particular diffeomorphism ξ µ being considered. So for example we could use (2.48) to write down the various Poincare generators of any relativistic Lagrangian field theory in Minkowski space. In the special case where L is covariant under arbitrary continuous diffeomorphisms, as happens for example in general relativity, an additional simplification of (2.48) is possible. Indeed in this situation it was shown in [7] that not only do we have dJ ξ = 0, actually there will be a local covariant (d − 2)-form Q ξ constructed out of the dynamical fields and their derivatives, called the Noether charge, such that 17 J ξ = dQ ξ . (2.50) We may then make one final application of Stokes theorem in (2.48) to obtain the following expression, true only in generally-covariant theories: Thus in such theories the Hamiltonian for any continuous diffeomorphism is a pure boundary term: this is analogous to the fact that in electromagnetism that the total electric charge is the electric flux through spatial infinity. Equations (2.48) and (2.51) are perhaps the main technical results of this paper; as far as we know they have not appeared in the literature before. One can obtain equation (82) from [7] by replacing → −B and setting C = 0: the terms involving C are not present there because C was not included in their definition of the presymplectic current, while we included it in (2.23) to ensure that ω| Γ = 0. 18 The boundary terms in (2.48) can be given a nice interpretation as follows. As mentioned in footnote 8, if we are not interested in preserving the covariance of L and Θ then we can remove the boundary term from the action and the total derivative dC from equation (2.20) via the redefinitions (2.52) In terms of these the action and presymplectic current are simply We can also define a new Noether current where the extra terms involving in the definition are necessary to ensure that dJ ξ = 0. 19 We thus may rewrite (2.48) as so we see that it is really J ξ which should be thought of as the local generator of ξ diffeomorphisms. Moreover if we choose f away from ∂M such that ξ is foliationpreserving near Σ, then the terms in the definition of J ξ do not contribute to H ξ . We then have which is a version of the standard formula H = pq − L.

Examples
We now illustrate this formalism in a series of examples, starting simple to get some practice with our differential form technology.

Two-derivative scalar field
We begin with the scalar field theory (2.14), with Lagrangian form where we define and we have used the convenient identity which is true for any vector field V . The restriction of Θ to ∂M is given by where ∂M is the volume form on ∂M , n µ is the normal form (2.35), and we have used (1.10). Therefore our boundary requirement (2.20) will be satisfied with , C = 0 provided that we adopt either Dirichlet (δφ| Γ = 0) or Neumann (n µ ∇ µ φ| Γ = 0) boundary conditions. To write the pre-symplectic current we need to address a notational subtlety we have so far avoided: with two kinds of differential forms, there are also two kinds of wedge products. We will from here on adopt a convention where we automatically view the configuration-space differentials δφ a as anti-commuting objects. The product of two of them will therefore implicitly be a wedge product, but we will only write "∧" for the spacetime wedge product. With this convention, the pre-symplectic current is given by withω µ = −∇ µ δφ δφ, (3.8) and the pre-symplectic form is Heren µ is the normal vector to Σ, which we note is past-pointing in our conventions (see the discussion around (1.10)). This pre-symplectic form is already non-degenerate, so no quotient is necessary and we have P = P and Ω = Ω. Indeed comparing to (2.6), we see that we have recovered using covariant methods the standard result that in this theoryφ is the canonical momentum conjugate to φ. Finally the Noether current is with where the quantity in brackets is the energy-momentum tensor T µν . J ξ is closed on P if and only if ξ µ is a Killing vector of the background metric.

Maxwell theory
We now give an example where the quotient from pre-phase space to phase space is nontrivial. This will just be Maxwell electrodynamics, with Lagrangian form so apparently we have Θ = −δA ∧ F. (3.14) If we impose Dirichlet boundary conditions, meaning we fix the pullback of A to the spatial boundary Γ, then the stationarity requirement (2.20) is satisfied with no need for an or C. We then have the symplectic potential and pre-symplectic form which illustrate the usual statement that A and − F are canonical conjugates. Zero modes of Ω are associated with gauge transformations, which are flows in configuration space generated by vectors of the form Indeed note that Our Dirichlet boundary conditions require the restriction of dλ to Γ vanishes, so λ must be constant on Γ. Since the boundary conditions allow for ∂Σ F to vary, X λ will apparently be a zero mode of Ω if and only if λ| Γ = 0. Therefore in constructing the physical phase space we should quotient only by the set of gauge transformations which vanish at the spatial boundary. The ones which approach a nonzero constant there act nontrivially on phase space, and in fact by an analogue of the discussion below (2.41) we can interpret (3.18) as telling us that the generator of these gauge transformations on phase space is 20 as expected from Gauss's law.

Higher-derivative scalar
We now give a simple example of a theory with nonzero C. This is a non-interacting scalar field theory, with Lagrangian form We first note that with θ being the vector To identify C we are interested in the pullback of Θ to the ∂M , which from (1.10) is given by Θ| ∂M = θ µ n µ ∂M . (3.24) We will show that Θ| ∂M is the sum of a term which vanishes with appropriate boundary conditions and a term which is a boundary total derivative. Indeed by using (2.36) to decompose the ∇ ν δφ in the third term of θ µ into normal and tangential parts, we find Here D α is the hypersurface-covariant derivative (2.38). Therefore if we adopt "generalized Neumann" boundary conditions This C term is not covariant in the interior of M , but by the discussion above equation (2.40) its restriction to the boundary will be covariant under foliation-preserving diffeomorphisms of order zero. We expect this example is indicative of the general situation for higher derivative Lagrangians: there will typically be a nonvanishing C term, which is covariant on the boundary but cannot be covariantly extended into the interior of M .

General relativity
We now discuss general relativity, which we take to have Here R is the Ricci scalar, and K is the trace g αβ K αβ of the extrinsic curvature (2.37). The metric g µν is dynamical, and there are no nontrivial background fields. The relevant variations (see e.g. [38]) are where D µ is the hypersurface-covariant derivative (2.38), and we emphasize that in the last two variations we have treated the function f identifying the location of ∂M (see (2.35)) as a background field. Using these variations we have   The boundary conditions we will adopt, analogous those we chose for Maxwell theory in section 3.2, are to require that the pullback of g µν to Γ is fixed. We then must have The set of diffeomorphisms which respect (3.41) are those for which ξ µ n µ | Γ = 0 and so in other words ξ must approach a Killing vector of the spatial boundary metric. In the language of section 2.3 these diffeomorphisms are foliation-preserving at order zero, so since and C are constructed out of γ µν , n µ , and K µν they will be covariant. With these boundary conditions C is typically nonzero: c µ involves the mixed normal-tangential components of δg να , while (3.41) only constrains the strictly tangential components. 21 We now consider the Noether current and charge. From (2.44), (3.29), and (3.34) we have The results of [7] imply that on pre-phase space, where E µν = 0, we must have J ξ = dQ ξ for some locally constructed (d − 2)-form Q ξ . And indeed using the fact that for any two-form S we have we have where we have viewed ξ µ as a one-form. More explicitly, (3.48) To compute H ξ we are interested in the pullback of Q ξ to ∂Σ, where Σ is some Cauchy slice. Constructing this is facilitated by observing that on Γ we have where τ is the normal form of ∂Σ viewed as the boundary of its past in Γ (remember that this implies that τ µ is past-pointing). The minus sign in (3.49) follows from the discussion of orientation below equation (1.9). Combining (1.10) and (3.49) we have = τ ∧ n ∧ ∂Σ , (3.50) 21 We could also consider a stronger set of boundary conditions, where (3.41) is replaced by δγ µν | Γ = 0. We then would have to further restrict to diffeomorphisms obeying n α γ β µ (∇ α ξ β + ∇ β ξ α ) | Γ = 0. Since γ µν δg νλ = γ µν δγ νλ , with these boundary conditions we would indeed have C = 0. Moreover the theory with these boundary conditions in fact is a partial gauge-fixing of the theory with the boundary conditions (3.41): we therefore construct the same physical phase space either way. This ability to get rid of C with a partial gauge-fixing is special to general relativity, the theory of the previous subsection shows that it will not happen in general higher-derivative theories.

so (3.47) then gives
Similarly we have Therefore from (2.51) we have Introducing the Brown-York stress tensor [40] T with the second equality following from (2.18) and (3.37), we can rewrite this as which is the correct expression for the generator of a boundary isometry with killing vector ξ µ . For fun we show how to re-derive this result using traditional non-covariant Hamiltonian methods in appendix A, where we generalize the analysis of [26] to remove an arbitrary requirement that Σ intersects ∂M orthogonally (a comparison of the lengths of the two calculations shows the advantages of the covariant formalism). We close this section by showing how the standard ADM Hamiltonian of general relativity in asymptotically-flat spacetime [41] with d ≥ 4 can also be directly recovered from (2.51). Indeed in any asymptotically-flat spacetime we can choose coordinates (t, x i ) where the metric has the form We take the spatial boundary to be at r = r c for r c some large but finite radius, and we require that the pullback of h µν to this boundary vanish. We discuss further the meaning of the fall-off conditions on h µν in section 4.3 below. Here our goal is to compute the Hamiltonian H ξ for the vector ξ µ = δ µ t , (3.58) which should agree with the ADM expression. In checking this it is sufficient to expand all quantities to linear order in h µν , since any higher powers will give vanishing contributions to H ξ as we take r c → ∞. 22 Defining the "unperturbed" normal vector and using (3.51), (3.53), and also that on ∂Σ we have = −ξ ∧ r ∧ ∂Σ (see again the discussion of orientations below (1.9)), we find In evaluating (ξ · ) | ∂Σ it is very useful to use the formula for δK in (3.30) to compute the linear term in h. Using this, and also that ξ · ∂M = − ∂Σ , after some algebra we find Here K 0 is the trace of the extrinsic curvature of the surface r = r c in pure Minkowski space, and D and γ µν are the covariant derivative and induced metric on ∂Σ; the last term is thus a total derivative on ∂Σ and does not contribute to H ξ . Moreover all terms proportional to K µν vanish, either because the pullback of h µν to the surface r = r c vanishes or because K tt = 0 in Minkowski space. Combining these expressions we thus find that The first term is indeed the ADM Hamiltonian, and the second is a (divergent as r c → ∞) constant on phase space.

Brown-York stress tensor
In the previous subsection we saw that in general relativity our covariant Hamiltonian (2.51) was equivalent to the Brown-York expression (3.56). In fact this equivalence can be extended to rather general diffeomorphism-invariant theories, as first noted in [8].
We here give an improved version of that argument, which is simpler and allows for C = 0. Our general construction of the Hamiltonian (2.51) relied on choosing boundary conditions such that equation (2.20) holds. Here we will restrict to considering boundary conditions where the pullback of g µν to ∂M is fixed. We then assume that if we allow this pullback to vary, (2.20) is violated only as where T µν is symmetric and obeys T µν n ν = 0. 23 We found precisely this structure in general relativity in equation (3.37), and in general we can think of T µν as the derivative of the action with respect to the boundary induced metric as in (3.55). We will refer to it as the generalized Brown-York stress tensor.
To relate T µν and the canonical Hamiltonian H ξ , we first choose two Cauchy slices Σ − and Σ + , with Σ + strictly in the future of Σ − , and we then introduce a new quantity where M +− denotes the points in M which lie between Σ − and Σ + and Γ +− denoting the points in Γ which lie between ∂Σ − and ∂Σ + . Note that we do not include any boundary terms on Σ ± . The idea is then to compute δ ξ S in two different ways, where ξ µ is an extension of an arbitrary diffeomorphism on ∂M into M , and then to compare what we get. The first computation uses the covariance of L and , from which we find The signs arise from the orientation conventions explained below (1.9). The second 23 In general this will require us to still impose boundary conditions on any matter fields, as well as possibly on normal derivatives of metric, and we are here assuming that a choice for these boundary conditions exists such that (3.63) holds. Moreover in (3.66) below we assume that any infinitesimal diffeomorphism of ∂M can be extended into M in a way that respects these other boundary conditions. computation instead uses (2.17) and (3.63), giving Here all orientations are again as below (1.9), and τ µ is the normal vector to ∂Σ ± when viewed as the boundary of its past in ∂M . In the first two terms on the right-hand side the minus sign in (3.49) is cancelled by a minus sign arising from our orientation convention that ∂Γ +− = −∂Σ + + ∂Σ − . Since we can choose the restriction of ξ µ to ∂M arbitrarily, we can in particular choose it to vanish in the vicinity of ∂Σ ± and adjust it arbitrarily elsewhere in Γ +− . (3.68) therefore then tells us that we must have D α T αβ = 0. Moreover we can choose ξ to be a Killing vector of the boundary metric in a neighborhood of ∂Σ + , and to vanish in the vicinity of ∂Σ − , in which case (3.68) tells us that We may then now take ξ to be a Killing vector throughout ∂M , recovering (3.56).
Thus we see that the connection between the covariant phase space formalism and the generalized Brown-York tensor is quite close.

Jackiw-Teitelboim gravity
Our last example will be Jackiw-Teitelboim (JT) gravity [42,43], which is a simple theory of gravity coupled to a scalar in 1 + 1 dimensions. Starting with [44] it has seen considerable recent interest, in part based on its appearance within the low-temperature sector of the SYK model [45][46][47]. A covariant Hamiltonian formulation of this theory on compact space (i.e. on S 1 ) was given in [48], an analysis on open space (i.e. on R) with somewhat unusual boundary conditions leading to an empty theory was given in [49], and a Hamiltonian formulation of the theory with the "nearly AdS 2 " boundary conditions appropriate for viewing it as a model of AdS/CFT was given in [50]. In this section we describe the last case from a covariant phase space point of view. 24 We define JT gravity to have bulk and boundary Lagrangian forms Here Φ is a dynamical scalar field, conventionally called the dilaton, Φ 0 is a nondynamical constant, and R and K are the intrinsic and extrinsic curvature for a dynamical metric g µν . Using (3.30), and also that in 1+1 dimensions we have R µν = 1 2 Rg µν and K µν = Kγ µν , we find and also δ = 2(K − 1)δΦ + D α Φn β − Φγ αβ δg αβ (3.73) (3.74) Combining these we have The simplest boundary conditions which respect (2.20) are therefore those where we fix Φ and the pullback of g µν on Γ. Explicitly we will take where φ b and r c are fixed positive constants with units of energy and length, and to recover the full AdS 2 geometry we take r c → ∞. In this paper we will consider only the situation where there are two such asymptotic boundaries, as illustrated in figure  1. The Noether current for JT gravity is and the Noether charge is As in our analysis of general relativity, we can evaluate Q ξ , ξ · , and X ξ · C on ∂Σ to compute the canonical Hamiltonian using (2.51). This again has the Brown-York form (3.56), with Brown-York stress tensor This can also be directly confirmed by comparing equations (3.63) and (3.75), which is fortunate since by the argument of the previous subsection the canonical approach and the Brown-York approach must agree. So far this analysis has paralleled that of general relativity in section 3.4, but in JT gravity with these boundary conditions one can go further and explicitly construct the phase space [50]. We now explain how to do this using the covariant phase space formalism. The key observation is that up to diffeomorphism all solutions of JT gravity have the form where Φ e is a dimensionless parameter that sets the value of Φ at the special point x = τ = 0 where the value of Φ is extremal. Therefore the pre-phase space of JT gravity is labeled by Φ e together with a choice of diffeomorphism. Our task will be to clarify what part of that diffeomorphism is physical. It is convenient to first say a bit more about the properties of these solutions. The metric is just that of AdS 2 in global coordinates, and x = ±∞ are its two asymptotic boundaries. In pure AdS 2 we would allow τ to also run from −∞ to ∞, but here this would not respect the boundary condition (3.77): for τ outside of the range (−π/2, π/2) the boundary value of Φ can be negative. Therefore it is natural to consider only the dynamics of the shaded green region in figure 1. Another motivation for this is that once matter fields are included we expect the null future/past boundaries of this region to become curvature singularities, as happens in the near-extremal Reissner-Nordström solution of which this is a dimensional reduction. At finite r c we can parametrize the two asymptotic boundaries via where ± indicate the boundaries near x = ±∞ and t ± 0 are arbitrary shifts of time on those boundaries. These functions are chosen so that (3.77) are satisfied, and one can think of t ± 0 as parametrizing the choice of time origin in each boundary. In what follows the asymptotic expressions at large r c are sufficient for obtaining the final result. We will eventually be interested in the energy of these solutions, if we consider a diffeomorphism generator t µ that approaches ∂ t at each boundary, the Brown-York tensor (3.81) gives a Hamiltonian which evaluates (see e.g. [50]) to (3.85) The basic technical problem we need to contend with is that in the (τ, x) coordinates the boundary locations (3.83),(3.84) depend on Φ e and t ± 0 , so in other words they depend on our choice of configuration and boundary Cauchy surface. This is not consistent with our treatment of boundaries in the covariant phase space formalism, where we took the coordinate location of the boundary to be the same for all points in configuration space (and we accordingly restricted to diffeomorphisms that do not move this location). To solve this problem we need to introduce new coordinates where the boundaries (and the Cauchy surface we use in evaluating Ω) stay put. To achieve this we first introduce a notation where we refer to the old coordinates as x µ = (τ, x). We then introduce new coordinates y µ = (t, y) related to the old ones by a diffeomorphism In other words in the y µ coordinates the spatial boundaries are at y = y ± , and on those boundaries t coincides with the boundary time appearing in (3.77). In these coordinates we can re-express our solutions as where we use the superscript {x} to indicate the specific functions appearing in (3.82). We therefore can take our pre-phase space P to be labeled by three real parameters Φ e , t + 0 , and t − 0 , as well as a diffeomorphism f µ obeying (3.87). The crucial subtlety is that in computing variations of Φ and g µν , we must include not only the variations of the parameters in the solutions (3.82) (where only Φ e appears) but also the variations of these parameters within diffeomorphisms f µ . Once all variations have been computed, we are free to then return to the x µ coordinates to simplify calculations.
From (3.82) and (3.88), the variations of the metric and dilaton in the y coordinates are given by We emphasize that, unlike the diffeomorphisms we have considered so far, ξ µ is a one-form on pre-phase space. From (3.72), (2.44), (2.50), and (3.70), we find that on pre-phase space we have Thus the presymplectic form is given by where we have used (3.80), (3.76), and also that dΦ dt | Γ = 0. As before, n µ is the normal form at the spatial boundary and τ µ is the normal form for ∂Σ viewed as the boundary of its past in Γ. The integral over ∂Σ is just a sum over two points, being careful about orientation. Computing this is a somewhat tedious exercise in working out expressions for n µ , τ µ , and ξ µ in the x µ coordinates and performing the appropriate contractions. Using the asymptotic expressions (3.83), (3.84) for τ ± and x ± , we find Another calculation 25 gives Thus we arrive at where we have chosen our Cauchy slice Σ to arrive at time t on both boundaries. To compute the final variation, it is useful to note that where in several places we have used the antisymmetry of ξ µ ξ ν arising from the implicit wedge-product in pre-phase space. We thus have the variation 25 This calculation is simpler in the "Schwarzschild" coordinates with r s = Φe φ b . At finite r c the relationship between t andt is t = 1 − r 2 s /r 2 ct . These coordinates are also convenient for the calculation that gives (3.85).
where in the second equality we have used (3.45). From (3.93) and = τ ∧ n we also have δ (τ µ ξ µ ) = − 1 2 ξ α ξ β αβ , (3.99) so the terms involving Φ 0 cancel in (3.96). Finally computing the variation of the remaining boundary term, and making use of (3.85), we have Therefore all variations of f µ at fixed Φ e and t ± 0 correspond to zero modes of the pre-symplectic form, as does a variation of t + 0 − t − 0 which preserves t + 0 + t − 0 . We thus should take the quotient of P by the group action generated by these zero modes, at last obtaining a two-dimensional phase space parametrized by the energy H t and its canonical conjugate ∆ [50]. 26 Of course it is no surprise that the Hamiltonian is the generator of time translations, what interesting here is that it is only the combined time translation ∆ which is physical, and also that there are no other degrees of freedom. The situation is quite analogous to 1 + 1-dimensional Maxwell theory on a spatial line interval, as explained in [50].

Discussion
In this final section we consider a few interesting conceptual issues that arise in applying the covariant phase space formalism.

Meaning of the Poisson bracket
There is a somewhat counterintuitive property of covariant phase space: if we define pre-phase space as the set of solutions of the equations of motion, it seems that each point in phase space "already knows" its full time evolution -why do we need to evolve them at all? And moreover doesn't this definition of phase space pick a preferred Hamiltonian? How then are we supposed to think about evolving in this phase space using a different Hamiltonian? We have already addressed the first question using the example (2.11): a solution which realizes some set of initial data on a Cauchy slice Σ 1 is a different solution from the one which realizes it on a distinct Cauchy slice Σ 2 , and they correspond to different points in pre-phase space. Whether or not they map to the same point in phase space is determined by whether or not there is a diffeomorphism connecting them which is generated by a zero mode of the pre-symplectic form: if there is then they coincide, while if there is not then they don't. The second two questions are best understood by way of the Peierls bracket, which is an old proposal for a covariant definition of the Poisson bracket [51]. We will now show that the Peierls bracket arises very naturally within the covariant phase space formalism, and thus gives an elegant interpretation of the Poisson bracket on covariant phase space. 27 In our language the insight of Peierls was to give a construction of a vector field X g on pre-phase space whose pushforward to phase space is the Hamiltonian flow vector for any G-invariant function g on pre-phase space (remember that G is the group whose action on pre-phase space is generated by the zero modes of Ω, usually it is the set of gauge transformations which become trivial sufficiently quickly at any boundaries). By an analogous discussion to that around equation (2.41), this means a vector field such that δg = −X g · Ω. (4.1) Given such a vector field, the Poisson bracket between g and any other G-invariant function f is easily evaluated via {f, g} = X g · δf, (4.2) the right-hand side of which is Peierls's bracket in our notation. The full evolution generated by g may then be obtained by exponentiating this bracket. Peierls's proposal for X g is constructed as follows. Begin with an action and boundary conditions such that (2.20) holds, and construct the associated covariant pre-phase space P and phase space P as in section 2.2. Take g to be a function on configuration space whose restriction to pre-phase space is G-invariant and which is constructed only using the dynamical field variables φ a in some finite time window lying between a "past" Cauchy surface Σ − and a "future" Cauchy surface Σ + . We may then introduce a deformed action S = S 0 − λg, (4.4) whose equations of motion will differ from those of S 0 in the region M +− lying between Σ − and Σ + . More concretely, after enough integrations by parts we can write the variation of g as where the ∆ g a are spacetime d-forms that vanish outside of M +− , and which are also functionals of the dynamical fields within M +− . 28 We will restrict to variations which obey the original boundary conditions for S 0 , in which case the new action will be stationary about configurations obeying the deformed equations of motion To linear order in λ we can write any solution of these equations as where φ a 0 is a solution of the original equations of motion E a = 0 and h a has the property that the configuration-space vector Here J ± (·) denotes the causal future/past of any set, so the advanced solution vanishes to the future of Σ + and the retarded solution vanishes to the past of Σ − (see figure  2 for an illustration). These two solutions are unique up to G-transformations, since otherwise the difference of two distinct retarded solutions or two distinct advanced 28 In general these ∆ g a will be subtle distributional objects, involving delta-functions and so on, and may require some short-distance regularization to make precise. solutions would give a nontrivial solution of the unperturbed linearized equations of motion with the same initial data as the trivial solution h a = 0 (see [53], [10] for more discussion of how gauge symmetries interact with the Peierls bracket). The proposal of Peierls is then that we should take To see that this proposal is consistent with (4.1), we first note that from (4.9) we have In other words h a R − h a A is a solution of the unperturbed linearized equations of motion, and we may thus interpret X g as a vector field on pre-phase space. Now let Σ be a Cauchy surface which is in the future of Σ + . We then have = δg. (4.14) Here we have used that that h A has no support on Σ, that h R has no support in the distant past, that d and δ commute, that d 2 = δ 2 = 0, (2.24), (2.17), (4.9), (4.5), and that the support of ∆ g a lies in the past of Σ. The conservation of Ω ensures that the result actually holds for any choice of Σ. Thus we confirm the equivalence of the Peierls and Poisson brackets, a result which in Peierls's paper was restricted to two-derivative theories and required the introduction of non-covariant methods.
In summary the Peierls bracket gives a very intuitive meaning to the Poisson bracket on covariant phase space: the quantity {f, g} tells us the linear response of f to a deformation of the action by −g. The direction in pre-phase space in which g evolves us is the direction of a solution of the unperturbed equations of motion obtained by starting with an unperturbed solution φ a 0 at early times, evolving forward using the deformed equations of motion to obtain a configuration at late times, and then evolving that configuration backwards using the original equations of motion. We illustrate this in figure 2.

Noether's theorem
Noether's theorem tells us that every continuous symmetry leads to a conserved charge, and in a Hamiltonian formalism any conserved charge should be the generator of a continuous symmetry. We here show how these standard results arise within the covariant phase space formalism. In addition to the pedagogical value of this demonstration, we will need to make use of it in the following section on asymptotic boundaries.
We define a continuous symmetry of a Lagrangian field theory to be a vector field X on configuration space (which we remind the reader we define as the set of "histories" obeying the spatial boundary conditions but not necessarily the equations of motion) such that X · δL = dα, (4.15) where α is a d − 1 form locally constructed out of dynamical and background fields that obeys a spatial boundary condition We emphasize that both of these equations hold "off-shell" -they are true everywhere in configuration space. Our goal will be to show that X is tangent to pre-phase space (meaning that the flow it generates sends solutions of the equations of motion to other such solutions), that the quantity is conserved on pre-phase space, and that H X generates X evolution in the sense that on pre-phase space δH X = −X · Ω. (4.18) To establish the conservation of H X , we note that on pre-phase space the integrand of (4.17) is a closed d − 1 form: Here we have used d 2 = 0, (2.17), (2.19), and (4.15). Moreover the pullback of the integrand to the spatial boundary Γ vanishes by (2.20) and (4.16). Together these observations imply that indeed H X is independent of the choice of Cauchy surface Σ. The other claimed properties of X and H X are most easily derived by considering the variation of the modified action we introduced above in section 3.5. Here M +− is the region of spacetime between a "past" Cauchy surface Σ − and a "future" Cauchy surface Σ + , and Γ +− is the region of Γ which is between ∂Σ − and ∂Σ + . The idea is to compute the Lie derivate L X δ S in two different ways and equate them. In the first approach we have where we have used (4.15) and (4.16). In the second approach, we instead have where we have used (2.17), (2.20), (1.8), and also that X · δ 2 L = (X · δE a )δφ a − (X · δφ a )δE a + d(X · δΘ) = 0 Equating (4.21) and (4.22), and using (4.17) and (2.23), we find that throughout configuration space we have (4.24) We may first evaluate this equation on solutions obeying E a = 0 and variations about them which vanish in the neighborhood of Σ ± , in which case we see that we must have X · δE a = 0: this shows that indeed X is tangent to pre-phase space. Therefore the right-hand side of (4.24) vanishes for arbitrary variations in configuration space about any solution of the equations of motion. We next consider a variation which near Σ + obeys the linearized equations of motion but vanishes near Σ − : we thus see that we must have (4.18) when H X and Σ are evaluated on Σ + . Finally we observe that this statement will not be modified if we then restrict to variations which obey the linearized equations of motion everywhere, and so (4.18) holds on pre-phase space and H X is thus indeed the generator of X evolution.
Our expressions (2.48) and (2.51) for diffeomorphism generators can be viewed as a special case of this general framework, with (4.25) The reader can check that for covariant theories this α obeys (4.15), (4.16), with X = X ξ , and that the integrand of (4.17) is identical to the modified Noether current J ξ appearing in equation (2.55). Indeed we could have arrived at (2.48) and (2.51) entirely from this point of view, but this would have destroyed the spacetime covariance which simplified many of our calculations in examples, and would also have obscured the sense in which our approach is a generalization of that of [5][6][7][8].

Asymptotic boundaries
So far our general formalism has neglected the issue of the convergence of the integrals appearing in our expressions for the symplectic form and the canonical charges. This is no issue when the Cauchy slice Σ on which they are evaluated is a compact Riemannian manifold with boundary and all boundary conditions are finite, but in the cases which are perhaps of most physical interest Σ will either be noncompact or only be conformally compact (the latter meaning that Σ is compact topologically but the metric and matter fields may diverge at ∂M ). From the point of view of this article a natural way to understand such theories is to realize them as limits of theories with an "infrared cutoff", as indeed we did in our discussion of the ADM energy in general relativity in section 3.4 and the symplectic structure of Jackiw-Teitelboim gravity in section 3.6.
There are however two subtleties which can arise in this procedure which we would like to discuss: (1) If we refer to the radial location of the infrared cutoff in some coordinates as r c , there can be sequences of solutions obeying the boundary conditions at finite r c which approach limits in the r c = ∞ theory that have infinite energy. These limiting solutions are those which "have stuff all the way out", for example in general relativity with vanishing cosmological constant we could imagine initial data where we have an infinite chain of equally-spaced copies of the Earth extending out to infinity. Such configurations probably do not deserve the label of "asymptotically flat", and in any event since they have infinite energy the Hamiltonian is not well-defined on a phase space which includes them.
(2) There may be symmetries of the r c = ∞ theory which are not symmetries for any finite r c . Examples include boosts and spatial translations (and also potentially BMS transformations) of asymptotically-flat space with a radial cutoff, and also special conformal transformations in asymptotically-anti de Sitter space with a radial cutoff. To construct the charges for these symmetries, we need to generalize our formalism to allow symmetries which are "approximate" at finite r c .
The standard method for dealing with the first issue is to restrict to configurations in the r c = ∞ theory which obey certain fall-off conditions [25,[54][55][56][57]. For example in asymptotically flat space one typically restricts to metrics of the form where η µν is the usual Minkowski metric in Cartesian coordinates (t, x i ), and where h µν is required to obey 29 with r ≡ √ x i x i . These fall-off conditions do not hold for all solutions which are limits of finite-r c configurations, and in particular imposing them ensures that the energy will be finite and thus excludes configurations with "stuff all the way out". They thus must be viewed as additional requirements that are applied to the r c = ∞ theory, beyond just being a limit of a sequence of finite-r c configurations obeying the boundary conditions at r = r c . This presciption may seem ad hoc, but in fact it is quite analogous to the way in which continuum quantum field theories are constructed from their lattice counterparts: as we take the lattice spacing to zero most of the states in the Hilbert space have "too much structure at short distances", and approach states of infinite energy in the continuum limit. The Hilbert space of states with finite energy in the continuum is much smaller than the limit of the lattice Hilbert space, and in particular it only allows a finite number of excitations on top of the vacuum. This resemblance is not a mere analogy, in AdS/CFT these two observations are actually dual to each other.
As for the second problem, the basic issue is that once we have an infrared regulator surface our general formalism only applies to diffeomorphisms which preserve the location of that regulator surface (such as the time translation in our discussion of the ADM energy in section 3.4). In the limit where we remove the regulator surface, there are diffeomorphisms which would have moved it but still preserve the asymptotic fall-off conditions, and these should also be viewed as symmetries. This phenomenon is also quite familiar from a lattice field theory point of view: introducing a short-distance regulator typically breaks many of the symmetries of a theory. Which ones are preserved depends on the choice of regulator, but in the continuum limit they all are recovered. There are various ways that the generators for symmetries broken by the regulator can be described using our formalism, one procedure we like is the following. Begin with a diffeomorphism generator ξ µ which preserves the asymptotic fall-off conditions but is not parallel to the cutoff surface at r = r c . Define a flow on the regulated configuration space viaX where f a is a term that "fixes" the violation of the boundary conditions at r = r c that is caused by applying the diffeomorphism. In the limit that r c → ∞ we can and will take f a → 0. At finite r c this "corrected" flow is not a symmetry, and in particular instead of (4.15) we will now haveX with β a d-form which is not necessarily exact, but which vanishes in the r c → ∞ limit at any specific point in M (we can and will still take α to obey (4.16)). Our proposal is then to still define the charge for generating this approximate symmetry by equation (4.17). Repeating the derivation of (4.24) then leads to (4.30) Thus if we restrict to configurations which obey fall-off conditions such that β → 0 in the limit that r c → ∞, we see that in the same limitX ξ is tangent to pre-phase space and HX ξ generatesX ξ translations. We have checked this prescription in a few simple examples, but we leave the details for future work.

Black hole entropy
One of the original applications of the covariant phase space formalism was in Wald's derivation of his famous entropy formula for black holes in higher-derivative gravity [6,7]. This derivation is based on applying the covariant phase space formalism to a single exterior subregion of an equilibrium wormhole solution; we here show that this result is not changed by systematically including boundary terms. Indeed let Σ be a Cauchy surface in such a solution which contains the bifurcate horizon χ, and let Σ ext be the subset of Σ which lies between the bifurcate horizon and one of the two external spatial boundaries (we can choose either of them). The idea is then to integrate equation (2.46) over Σ ext , with ξ µ taken to be the Killing symmetry of the stationary black hole. Indeed we have where H ext ξ denotes the contribution to H ξ from the component of ∂Σ which is intersected by Σ ext and we have chosen the orientation of χ so that its normal vector points towards the interior of Σ ext . In going from the first to the second line we have used (1.8), and in going from the second to the third we have used that ξ µ vanishes at the bifurcate horizon and also that X ξ vanishes at any point in pre-phase space where it generates a symmetry (ie where L ξ φ a = 0). The fourth line follows directly from the first as a consequence of the vanishing of X ξ . Following [6,7] we may then interpret the equivalence of the last two lines of (4.31) as an expression of the first law of thermodynamics dE = T dS, which leads directly to the Wald formula.
In [7] the possibility of extending the Wald entropy formula to non-stationary black holes was considered, but the covariant phase space method based on the Noether charge Q ξ was dismissed on the grounds that the additive ambiguity Θ = Θ + dY leads to an ambiguity in Q ξ which vanishes only for stationary solutions. We however would like to suggest that this dismissal was premature, and the issue should be reconsidered in light of the present work. The reason is that our treatment of boundary terms actually fixes this ambiguity, leading uniquely to our − ∂Σ X ξ · C term in H ξ . As discussed below (2.20), the only remaining ambiguity is a simultaneous shift of Θ and C that has no effect on H ξ . Therefore we have some hope that a generalization of the Wald formula to dynamical horizons may still be obtainable using covariant phase space techniques. On the other hand even if the Noether charge is now unambiguous, there is no expectation of a first law for perturbations of non-stationary configurations; it is only the second law which is supposed to apply. So it seems that some new idea (such as using the Ryu-Takayanagi formula or giving a systematic treatment of the second law) is still necessary to generalize Wald's derivation to non-stationary horizons. It would be interesting to see if our − ∂Σ X ξ · C term is related to the "extrinsic curvature corrections" appearing in the higher-derivative Ryu-Takayanagi formula of [58], and also if it might be of use in deriving a second law (see e.g. [59]). To achieve this, one needs to view the exterior region as a closed dynamical system in its own right, including a careful discussion of boundary conditions on the causal horizon (knowing these will be part identifying the correct C there), and it is likely that the "edge mode" or "center" degrees of freedom that arise when one defines a phase space for gravity in a subregion [17,[60][61][62][63][64] will play an important role. In this paper we have chosen not to study null boundaries, so we leave this for future work.

A Non-covariant Hamiltonian analysis of general relativity
In this appendix we show how to obtain the canonical Hamiltonian (3.56) of general relativity directly from the traditional non-covariant approach. The idea of such a calculation goes back quite a ways [25,41,65], but it was not until [26] that a systematic treatment of boundary terms starting from the action formalism was given. In that treatment to simplify calculations it was assumed that slices of constant time intersect ∂M orthogonally, and the resulting Hamiltonian was given in a somewhat non-standard form. In this appendix we repeat that analysis without any restriction on the time slices, and our presentation results in the standard Brown-York expression (3.56). This calculation is not necessary for the logical flow of our paper, but some readers may find it amusing.
We begin by choosing a set of Cauchy surfaces Σ t which foliate our (globallyhyperbolic) spacetime M and are labelled by a time coordinate t. We also (nonuniquely) choose coordinates on each slice such that we can view the spacetime as R × Σ, with Σ some d − 1 manifold which is homeomorphic to each Σ t . We are interested in finding the Hamiltonian H ξ for the diffeomorphisms generated by the vector field Heren µ is the normal form to the Cauchy slices Σ t (not to be confused with n µ the normal form to the boundary ∂M ), and we require that N > 0 and N µn µ = 0. Explicitly,n µ = N δ t µ .

(A.3)
N is called the lapse: it measures how fast proper time elapses on a geodesic normal to Σ t as we change t. N µ is called the shift: it measures how much the coordinates we've chosen on the Σ t shift as we change t relative to what we would have gotten by connecting them using normal geodesics. We now study general relativity with the action given by (3.29). The basic idea is to view the induced metricγ µν ≡ g µν +n µnν on each Cauchy slice Σ t as the "position" degrees of freedom, identify their conjugate canonical momenta, and then compute the Hamiltonian via the usual formula H = pq − L. We therefore need to re-express the action in a way that makes manifest all occurrences of the time derivativė γ µν ≡γ α µγ β ν L ξγαβ .
(A.6) The only time derivatives in the non-boundary part of this action arise from the extrinsic curvatures viaK whereD is the hypersurface covariant derivative on Σ t , defined as in (2.38 At this point the authors of [26] chose to setn µ n µ = 0, in which case the boundary term in (A.10) just becomes the integral of the extrinsic curvature of ∂Σ within Σ, which manifestly depends only on the induced metric on Σ t and not its time derivative. We however will not assume this, and will instead observe that a short calculation shows that n µn µ ∇ νn ν − n µn ν ∇ νn µ + K =D µ (γ µν n ν ) + (ξ ρ − N ρ ) N −1 ∇ ρ (n µn µ ) . (A.11) Thus in addition to the time derivatives ofγ µν arising from the extrinsic curvatures, in the boundary term there is also a time-derivative of the quantity n µn µ , which we therefore must view as an additional dynamical degree of freedom. The canonical momenta conjugate toγ µν and n µn µ which follow from (A.10) are where γ ∂Σ is the determinant of the induced metric on ∂Σ. We thus may compute the Hamiltonian via Substituting the above formulas and doing a bit of algebra, we find √γ P µν r µ N ν + τ µ ξ µ 8πG N −1 ξ µ ∇ µ (n νn ν ) − n µn µ ∇ νn ν + n µn ν ∇ νn µ − K ∂Σ (A.14) In the second line the quantity r µ is the normal form to ∂Σ within Σ. r µ and τ µ are related to n µ andn µ via r µ = αγ ν µ n ν τ µ = αγ ν µn ν , (A.15) with α = 1 1 + (n µn µ ) 2 .
(A. 16) The terms multiplying N µ and N in the first line of (A.14) are just the shift and Hamiltonian constraint equations of general relativity, which vanish on shell, so as expected the on-shell Hamiltonian is a pure boundary term (the second line of (A.14)).