Three roads to the geometric constraint formulation of gravitational theories with boundaries

The Hamiltonian description of mechanical or field models defined by singular Lagrangians plays a central role in physics. A number of methods are known for this purpose, the most popular of them being the one developed by Dirac. Here, we discuss other approaches to this problem that rely on the direct use of the equations of motion (and the tangency requirements characteristic of the Gotay, Nester, Hinds method), or are formulated in the tangent bundle of the configuration space. Owing to its interesting relation with general relativity we will use a concrete example as a test bed: an extension of the Pontryagin and Husain-Kucha\v{r} actions to four dimensional manifolds with boundary.


Introduction and preliminary remarks
The Hamiltonian formulation of field theories defined by singular Lagrangians (among which general relativity is a famed example) has a long history. A turning point in the quest for a systematic treatment of these systems was the introduction by Dirac of his celebrated "algorithm" [11] which has been in use ever since. Strictly speaking, Dirac's method as originally conceived, works only for mechanical systems with a finite number of degrees of freedom. Despite the statements made in this regard by Dirac himself [11, p.26], the extension of his method to field theories is not immediate. One has to proceed with care because some basic objects are not well defined, in particular the Poisson brackets between canonically conjugate variables. For instance, in the case of a scalar field φ with canonical momentum π, it is customary to write {φ(x), π(y)} = δ(x, y) , and work with this expression. However, Poisson brackets can only be defined for differentiable functions in phase space and are, themselves, differentiable functions.
Although the appearance of a Dirac delta seems to be an acceptable departure from smoothness that can be taken care of by resorting to simple tricks like smearing, it is not difficult to come up with models where formal expressions like (1) fail to work in a glaring way. Among such models, field theories in bounded regions stand out.
An effective way to avoid the problems that originate from the use of formal expressions, such as (1), is to use the GNH method [12][13][14] or a geometric rephrasing of the original Dirac approach [15]. The crucial element in these alternative methods is to require the Hamiltonian vector fields, whose integral curves define the system's dynamics, to be tangent to the constraint submanifold in phase space. As these tangency conditions may be written and studied without the use of Poisson brackets, many of the actual difficulties found in concrete computations in manifolds with boundaries disappear. Another source of difficulties (and misunderstandings) when dealing with field theories in bounded regions has to do with the behaviour of the fields at the boundaries and its relationship with the dynamics (see, for instance, [16] and references therein).
In the following, we will restrict ourselves to field theories derived from action principles. Let us consider the spacetime M where the field theory is defined to be, unless otherwise stated, (diffeomorphic to) the product of a finite interval of the real line and a 3-dimensional manifold Σ with (possibly empty) boundary ∂Σ, i.e. M = [t 1 , t 2 ] × Σ with t 1 < t 2 . We will often refer to the sets Σ 1 ∶= {t 1 } × Σ and Σ 2 ∶= {t 2 } × Σ as the lids and ∂ L M ∶= [t 1 , t 2 ] × ∂Σ as the lateral boundary (see figure  1).
Being the action S a functional on certain space of fields over M, not only it is necessary to define the independent fields that will be used to write it (the field space F , often consisting of sections of some tensor bundle), but also to consider their smoothness properties. This is usually done by requiring the fields to live in appropriate functional spaces. As a part of this specification it is possible to introduce boundary conditions.
Actions are usually written as integrals of top forms on the spacetime manifold M. In the case of manifolds with boundaries, additional contributions associated with the boundary may also be included (an instance of this is the Gibbons-Hawking-York boundary term in metric gravity). In general, an action will be defined by a Lagrangian pair (L, ℓ) of top forms defined on M and its lateral boundary ∂ L M.
Given an action and the values of the fields at the lids Σ 1 and Σ 2 , the dynamics is obtained by looking for its stationary points. The stationarity conditions will generically consist of equations in the bulk and equations at the boundary. Some comments are in order: i) If boundary conditions have been introduced in the definition of F , it is critical to take them into account when deriving the boundary Euler-Lagrange equations. This is so because the variations at the boundary will not be independent but will be constrained by the boundary conditions.
ii) Even when no boundary contribution is included in the action, there may still exist Euler-Lagrange equations at the boundary in addition to those at the bulk (usually coming from integrations by parts). As a consequence, the issue mentioned in the previous item will still be relevant [17].
iii) It is very important to understand that boundary conditions may appear as Euler-Lagrange equations at the boundary even if no such conditions are introduced in F . Also, they do not need to be simple specifications of the values of some fields or their "spatial" derivatives but may be dynamical (this will happen in the models that we consider here).
The purpose of this paper is to explore three different ways to obtain the Hamiltonian formulation of field theories linear in velocities in bounded regions. This is important in general relativity because the actions used in some relevant approaches (in particular the Hilbert-Palatini or Holst actions) are precisely of this type. The first and second approaches are based on the geometric constraint algorithm: the first one in the cotangent bundle [9] and the second in the tangent bundle [18][19][20]. In a different spirit, the third procedure starts right off from the field equations and quickly arrives at the Hamiltonian formulation [21]. These ideas have been known for quite some time, but have not been widely applied when boundaries are present, at least in the context of gravitational theories. As will be shown later, for the type of models discussed in the present paper, the final Hamiltonian description can be made in a phase space which is a submanifold of the configuration space. A few words on notation. As the basic fields that we will be using are differential forms we will not need to use spacetime indices, however, will use internal SO(3) indices i , j , . . . = 1, 2, 3 which may be raised and lowered with the SO(3) invariant metric δ ij and its inverse δ ij . We will also use the SO(3) volume form ε ijk . If we have a volume form vol in a manifold M and we have another top form α in M there exists a unique scalar field φ such that α = φvol. We will often denote φ = α vol .

Some basic facts about the Husain-Kuchař model
The Husain-Kuchař (HK) model was introduced in [22] to understand some features of the Ashtekar formulation of general relativity [23,24] (see also [25]), since their respective Hamiltonian descriptions share the same phase space (the main difference being the absence of the Hamiltonian constraint in the HK model). The action of the HK model reads where here M is a closed, parallelizable (hence, orientable), 4-dimensional manifold, and e i , A i ∈ Ω 1 (M), i = 1, 2, 3, are 1-form fields. At each point p ∈ M, the three covectors e i (p) are required to be linearly independent (this is part of the specification of the configuration space of the model), and are the SO(3) covariant derivative of the e i and the curvature of the SO(3) connection A i , respectively. The field equations are: Structurally, they resemble the Einstein equations derived from the Hilbert-Palatini action. This explains the connection between the HK model and general relativity. Notice, anyway, that in this example the (0,2)-tensor γ ∶= e i ⊗e i is a degenerate metric as we do not have a co-frame but only three independent 1-forms e i . The degenerate directions of this metric can be easily characterized. If we choose a volume form vol in M (which is always possible because M is orientable) we can write which at each point p ∈ M is an element of the double dual T * * p M of the tangent space T p M. As T * * p M is canonically isomorphic to T p M the previous expression actually defines a vector field u ∈ X(M). Since u(e i ) = 0, then γ(u, ⋅) = 0, and hence the degenerate directions of the metric are those given by u. Notice that, if we change the fiducial volume form vol, the direction of the field u at each point of M stays the same, although the vector itself will be rescaled.
The field equations (4) admit a simple geometric interpretation based on the fact (see Appendix A) that if e i are three linearly independent frame fields (1-forms) on a four-dimensional manifold M and S i are three 1-forms on M satisfying ε ijk e j ∧ S k = 0, then S i = 0. Now, as ı u e i = 0, the field equations (4) imply and, hence, ı u De k = 0 and ı u F k = 0. A straightforward computation then gives The meaning of the dynamics is then clear: the effect of Lie-dragging a solution of the field equations along the direction defined by u, is just an SO(3) gauge transformation with parameter A i u . We will see in section 3.4 how a similar reasoning allows us to extend the previous analysis to an arbitrary vector field instead of u. From the point of view of the degenerate metric γ the interpretation of the dynamics is also clear: it will just be Lie-dragged along the integral curves of the vector field u.
The physical content of the model is simple to describe: whereas general relativity has two local physical degrees of freedom per point, the Husain-Kuchař model has three. In both instances they are contained in an SO(3) connection and its canonically conjugate densitized triad, hence, it is a bit surprising that in general relativity the natural variables are non-degenerate 4-metrics whereas it does not seem possible to build these metrics in the HK model. A partial answer to this problem is discussed in [26], where it was shown that, by adding an scalar field playing the role of time, it was possible to build non-degenerate 4-dimensional metrics for the HK model. An interesting question in this regard -which to our knowledge has not been answered yet-is the characterization of those metrics of the type described in [26] which also solve the Einstein equations.
The constraint submanifold in phase space for general relativity in Ashtekar variables is a submanifold of the constraint submanifold for the HK model so, from the perspective of the constraints, every solution to the GR constraints is also a solution to the HK ones. Notice, however, that in order to define the GR dynamics in the latter context, it is necessary to introduce the appropriate Hamiltonian vector field. In contrast with this, at the quantum level, the physical Hilbert space of full GR in the Ashtekar formulation is just a subspace of the one corresponding to the HK midel. The problem in this case is finding the appropriate quantum gravitational observables.
As a final comment, we would like to mention the existence of a number of different action principles that also lead to the Husain-Kuchař model [26][27][28]. They provide different points of view that can be useful to understand some features of the model and, eventually to learn something about the Hamiltonian formulation of general relativity.

The generalised Husain-Kuchař-Pontryagin action
From now on, let M be a manifold with boundary. Let us consider e i , A i ∈ Ω 1 (M) with i = 1 , 2 , 3 as the basic dynamical fields. They are not subject, a priori, to any condition other than smoothness and the requirement that the e i be linearly independent. In particular, we will impose no boundary conditions on them at this point. The generalisation of the Husain-Kuchař-Pontryagin action given by [15], reads where α 1 . . . , α 5 ∈ R. The field equations are As we can see, demanding stationarity of the action gives two sets of necessary conditions: the bulk equations (9a), (9b), and the boundary equations (9c), (9d). It is important to emphasize-we will continue to do so throughout the paper-that the stationarity conditions for an action defined in a manifold with boundary will generically consist of these two types of equations.
Before proceeding further we would like to make several comments i) Although we will not discuss in any detail functional analytic issues, something needs to be said about the smoothness conditions on the fields and how they are affected by the presence of a boundary. In the interior of M (the bulk), we will require the fields to be "smooth enough" so that the field equations make sense there. In order to make sense of the boundary equations it is also natural to add whatever smoothness requirements on the fields are necessary on ∂M. An additional smoothness requirement might also be considered: demanding that, when extended to an open smooth manifold M containing M as a submersion, the bulk equations also hold at ∂M.
This last point is relatively subtle. On one hand, it appears unnatural from the viewpoint of the action principle since it does not seem necessary to demand such condition for the stationarity of the action. For instance, if we require the function in the bulk to admit a sufficiently smooth extension to M, and if the Euler Lagrange equations have a sufficiently nice form, "their action on the bulk function" will be smooth and, by continuity, they will also hold at the boundary. On the other hand, it can be seen as a sensible requirement that can be imposed a posteriori to select a subfamily of solutions to the variational equations with good physical properties, or even, appear as consistency requirements for the dynamics. It is also conceivable that a particular choice of smoothness requirements, both in the bulk and at the boundary, suffices to guarantee extendibility in the above sense. For an ordinary variational problem, the treatment of the lateral boundary and the lids may have to be different. It may happen that the extendibility condition applies only to lateral boundaries and not to the lids.
Some intuition about these questions can be gained by considering, for example, the Laplace equation on a bounded region of the plane and using the real or imaginary parts of complex analytic functions as examples. The last regularity requirement is, at least at face value, the strongest; we will proceed assuming it in the present work. As a last word of caution it should be mentioned that there may be consistency issues between the smoothness requirements in the bulk and at the boundary that we will also sidestep here.
ii) According to the regularity conditions that we are considering, the bulk equations must also hold when the fields are restricted to the boundary, so there are several sets of boundary equations. The content of these can be conveniently disentangled by either taking their pullback to the boundary and writing them in terms of pullbacks of the dynamical fields or first computing their interior product with the outer unit normal ν and then pulling them back. This procedure mimics one of the methods that we are going to follow in the paper to obtain the Hamiltonian formulation for the model given by the action (8).
iii) If α 1 = α 2 there are only boundary equations. The dynamics in the bulk is arbitrary. This means that any field configuration with the correct "boundary dynamics" provides stationary points for the action. Otherwise the bulk dynamics is that of the Husain-Kuchař model. From the point of view of the action, this happens because a simple integration by parts of the terms involving α 1 = α 2 can be used to cancel them, giving just boundary contributions to the action. Notice that the remaining terms can all be written as total derivatives, so that the action in this case is an integral over the boundary which corresponds to an extension of 3-dimensional (Euclidean) general relativity [10]. At this point it is worthwhile to advance that the Hamiltonian formulation for this theory will be obtained in the following in the same footing as the one corresponding to the bulk model.
and, hence, the pullbacks of the bulk equations (9a) and (9b) automatically hold as can be seen by plugging the expressions for  * ∂ F i and  * ∂ De i in terms of  * ∂ (ε ijk e j ∧ e k ) into the pullbacks of (9a) and (9b) to the boundary. The physical meaning of the specific models obtained at the boundary for other parameter choices are discussed in [9].
In the next subsections, we will focus on three different methods of obtaining the first part of the solution of the evolution problem, that is, an expression for the Hamiltonian vector field and a set of necessary constraints. Notice that this does not fully solve the problem since further consistency checks may be needed. Since the three approaches will produce the same results, we will defer this final step until section 3.4.

GNH analysis in the cotangent bundle
The first approach we would like to present is the Hamiltonian formulation, for the model introduced above, using the geometric GNH approach [12][13][14] (a related analysis using a "geometrized" version of the traditional Dirac algorithm [11] can be found in [15]). The main features of this method are: • The final Hamiltonian description lives in the primary constraint submanifold in phase space.
• Dynamical consistency is rephrased as a tangency condition. This has the advantage of altogether avoiding the use of Poisson brackets, which is useful in spacetime manifolds with boundary.
• Given a Lagrangian (which may come from a suitable 3 + 1 decomposition of an action) the main steps are: (i) the characterization of the primary constraint submanifold from the definition of momenta (fiber derivative), (ii) the definition of the Hamiltonian vector fields in terms of the simplectic form and the exterior derivative in field space of the Hamiltonian and (iii) checking consistency as a tangency requirement.
To begin with we perform a 3 + 1 decomposition of the action (8), we obtain the following Lagrangian [9]: Here, A i ∈ Ω 1 (Σ) and e i ∈ Ω 1 (Σ) are an SO(3) connection and a non-degenerate frame field on Σ, respectively. We also have the smooth scalar fields A i t , e i t ∈ C ∞ (Σ). The expressions for the curvature and the covariant derivative that appear in (10) are formally the same as (3b) and (3a) but, of course, these objects live now in Σ. Taken together, the (A i t , A i , e i t , e i ) define the configuration space Q for our model (adding also the requirement that the e i must be linearly independent) . We will denote the points of T q Q, the tangent space to Q at the point q As we can see the Lagrangian is a real function in T Q.
The fiber derivative (i.e., the definition of the canonical momenta) associated with a Lagrangian L is a map from the tangent bundle of the configuration space Q to its contangent bundle (phase space) In the present case this yields so that the canonical momenta (P At , P A , P et , P e ) are defined by The fiber derivative is not a diffeomorphism from T Q to T * Q because it is not onto, hence the dynamical system defined by the action (8) is singular. The image of T Q under the fiber derivative F L is the so called primary constraint submanifold M 0 of the phase space T * Q; the dynamics of the system is constrained to M 0 . The Hamiltonian is defined only on this primary constraint submanifold. In the present case it is It is interesting to notice that it does not depend on the canonical momenta. Vector fields in phase space will have components where the boldface letters denote the momenta directions in phase space. Notice that and, hence, it makes sense to consider their pullbacks to ∂Σ.
Acting on vector fields Z , Y ∈ X(T * Q) the canonical symplectic form is We have to now obtain the pullback ω of Ω to the primary constraint submanifold M 0 . A straightforward computation yields We compute now dIH(Y) we obtain two kinds of equations: (1) Conditions on the components of the vector field Z ∈ X(M 0 ): There are two types of these associated with the bulk and the boundary, respectively. The bulk conditions are only present if α 1 − α 2 ≠ 0 in which case they are The conditions at the boundary read There are no conditions involving Z i At and Z i et neither at the bulk nor at the boundary.
(2) Secondary constraints: Again we have constraints associated with the bulk and with the boundary. They come from the components of Y in dIH(Y) that do not appear in ω(Z, Y) and hence their coefficients must vanish. The bulk constraints are only present if α 1 − α 2 ≠ 0. They are The boundary constraints are Although at this point there are still consistency checks to be made-in particular studying the tangency of the Hamiltonian vector fields to the submanifold defined by all the constraints in phase space-we would now like to draw the attention of the readers to some alternative approaches to the problem. The tangency analysis will continue in Section 3.4.
To conclude this subsection, it is important to highlight the fact that momenta play no role in the Hamiltonian description that we are obtaining. Indeed, the pullback of the symplectic structure to M 0 , the Hamiltonian, the constraints and the Hamiltonian vector fields are all independent of the canonical momenta. Physically, this means that the dynamics of the momenta is trivial, in the sense already discussed in Section 2. Mathematically, this means that the fibers play no role and that the only relevant space is the base configuration space Q. This suggests, for instance, that it is possible to approach the Hamiltonian formulation of the model from the field equations. This issue will be discussed in the next sections.

Geometric constraint algorithm in the tangent bundle
In order to work, the GNH procedure only needs a presymplectic space. In the previous section, this space was (F L(T Q), ω). Because the cotangent bundle T * Q has a canonical symplectic structure, it is a fitting choice for many purposes, in particular there are approaches to quantization that take advantage of the availability of a symplectic or presymplectic form. On the other hand, it may be interesting to work directly on the tangent bundle of the configuration space where the Lagrangian is defined. This would be natural, for instance, if one wants to apply path integral quantization methods. A possible approach to this would be to import the canonical symplectic form from the phase space via the pullback defined by the fiber derivative F L. However, this feels unnatural because it entails going back and forth from T Q to T * Q. It would certainly be desirable to work directly in T Q. This can be done as we describe in this section. The main steps of the procedure are the following: • Build a presimplectic form in the tangent bundle of the configuration space T Q from the Lagrangian by using the so called Liouville vector field V.
• Define the energy and find the vector fields that give the evolution of the system by solving equation (24).
• Impose the second order condition (necessary to guarantee the equivalence of the dynamics with that given by the Euler-Lagrange equations.) Whilst the tangent space does not have a canonical symplectic structure, there are canonical structures in the double tangent that can be used to introduce suitable symplectic structures in the tangent bundle of the configuration space T Q once a Lagrangian -a real function in T Q-is chosen.
If the Lagrangian is singular, we will obtain a presymplectic space in its own right in which the GNH procedure can be applied. One could raise the issue that this structure is not canonical because it depends on the choice of Lagrangian, however this is not really a problem, in fact, this also happens in the Hamiltonian setting where both the primary constraint manifold and the Hamiltonian are obtained from a choice of Lagrangian which encodes the physics of the system (remember that the primary constraint submanifold in phase space is the image of T Q under the fiber derivative F L defined by the Lagrangian). In fact, under general conditions which hold, in practice, for all interesting physical theories, both formulations are equivalent [29].
The almost tangent structure (or vertical endomorphism) on T Q [29][30][31] is the vector-valued 1-form J ∶ T T Q → T T Q defined by where ξ y (w) ∶= d dǫ (y+ǫw) ǫ=0 is the canonical lift of w ∈ T Q to T y T Q and π Q ∶ T Q → Q is the bundle projection. It is easy to see that J 2 = 0. We define the vertical subspace of T T Q as V (T Q) = Im J = ker J = ker T π Q whose elements are called vertical vectors. This induces a derivation of rank 0 on differential forms on T Q and the vertical derivative such that dI 2 J = 0. The Liouville vector field is defined as V y ∶= ξ y (y). In a natural bundle chart With all this, we can build the presymplectic structure (T Q, ω L , dIE L ) associated with the pair (T Q, L), where Indeed, note that the almost tangent structure is canonical to T Q and the Lagrangian was the only other relevant element in the construction. The Hamiltonian equation in this (pre)symplectic space thus becomes also referred to as the (pre)symplectic Lagrangian equation. This equation gives the evolution of the system, but it is very important to realise that if ω L is presymplectic, in general, the integral curves of the Lagrangian vector field Z are not a solution of the Euler-Lagrange equations. The obstruction is that these integral curves in T Q may not be canonical lifts of curves in Q, in which case they can not be tied to the variational principle. To recover equivalence with the Euler-Lagrange equations one must additionally impose the so-called second order condition [18,29] which is equivalent to T π Q (Z) = π T Q (Z). Then, the stationary points of the action are given by vector fields simultaneously satisfying (24) and (25).
In [30] it was proved that there exists a submanifold with an unique vector field solving (24) and (25). An algorithmic procedure to obtain such maximal submanifold was later given in [20], we summarize it here: i) A solution to (24) exists at x ∈ T Q if (dIE L ) x is in the image of (ω L ) x . This condition can be seen to be equivalent to ı X (dIE L ) x = 0, for all X ∈ (ker ω L ) x ; this is refered to as the dynamical constraint. Let P 1 be the submanifold where the dynamical constraint is satisfied. Note that if Z is a solution of (24), then Z + Y for Y ∈ ker ω is also a solution.
ii) In P 1 , solutions are guaranteed to satisfy (24) but they need not satisfy (25).
Since the solutions will have the form Z 0 + Y for Y ∈ ker ω L , we have some freedom to choose Y in such a way that Z 0 + Y satisfies (25). This can be done in a submanifold S 1 of P 1 satisfying the condition ı X ı Y (ω L ) x = 0, for all X such that JX ∈ V x (T Q) ∩ (ker ω L ) x . This is called the non-dynamical constraint. Note that if Z+Y is a solution to both (24) and (25), then Z+Y +W for W ∈ V (T Q) ∩ ker ω L is also a solution.
iii) In S 1 , solutions to both (24) and (25) exist, however they are not tangent to S 1 in general. Since we still have the freedom to choose W ∈ V (T Q) ∩ ker ω L , we can take it in such a way that the resulting solution is tangent to S 1 in a (perhaps smaller) submanifold S 2 . Again, the chosen solution may not be tangent to S 2 , so we need to iterate this last step until no further constraints crop up.
We will apply this method in the case of Lagrangians linear in velocities -first discussed in [19]such as the model (10) that we are studying here. Such Lagrangians L ∈ C ∞ (T Q) are fully characterized by a function h ∈ C ∞ (Q) and a 1-form µ ∈ Ω 1 (Q). They can be written as whereμ(q, v) ∶= µ q (v) ∈ C ∞ (T Q). As per the algorithm, the points x ∈ T Q where (24) can be solved are determined by the constraints It can be shown that for vertical vectors so that equation (27) actually only imposes conditions on the horizontal vectors. In the linear-in-velocities case, it is easy to derive the relations Since both dIE L and ω L are pullbacks of objects in Q and vertical vectors do not generate additional restrictions because of (28), we can write the condition (27) in Q as with x ∈ Q and X ∈ X(Q). Note that this means that the dynamical constraints are functions in Q and do not involve the velocities. The next step consists in finding the points where (25) holds, which are determined by The condition for X is trivial: a vector W ∈ ker ω L is such that W q ∈ ker dIµ, but since W = JX, this means that W q = 0, hence all vectors in X(T Q) satisfy this condition. So we just have to demand that there exists a vector Y ∈ ker dIµ such that Z + Y satisfies the second order condition, or equivalently, that at x ∈ T Q there exists Using of the explicit form of (26) to rewrite the Hamiltonian equation (24) one concludes that the Lagrangian vector field is given by The main result of this analysis is precisely that, when the Lagrangian is linear in the velocities, these do not play any role in either the constraints or the evolution and everything happens in the base space Q, making the system particularly easy to analyze. Turning now to the particular case of the Lagrangian (10) we havê so that the constraints (29) are ε ilm e l ∧ e m = 0 , and the Lagrangian vector field is determined by (30) can only be satisfied in the points of T Q where The constraints and equations for the Lagrangian vector field are the same that we obtained in section 3.1 using the GNH algorithm. The only exception is the constraints introduced by the second order condition, which is an additional requirement in the tangent bundle and does not appear in the cotangent bundle. The final tangency step will be studied in section 3.4.

The field equations approach
A comparison of the field equations for the model that we are considering here with the constraints obtained by using any of the previous approaches shows that they are structurally identical, despite the fact that they are defined on manifolds of different dimensions (the spacetime M and the spatial manifold Σ). This is not always the case as attested, for instance, by the Einstein equations in metric variables and the constraints in the ADM formulation. The reason for the nice behaviour that we find in our example is easy to understand: in the present case the fields are differential forms and the field equations are written in terms of natural operations such as the exterior derivative and the exterior differential. These operations interact in a very simple and natural way with pullbacks (in particular, by  * t ) and, hence, it is straightforward to obtain necessary conditions from the field equations in the form of constraints. In the following we take advantage of this idea to also include dynamics. The main steps of the procedure that we describe in this section are the following: • Pullback the field equations to Σ t by using  * t to obtain constraints. To this end it will be useful to first define adapted fields by using the fact that M = [t 1 , t 2 ]×Σ.
• Compute the interior product of the field equations with the vector field ∂ t canonically defined by the decomposition M = [t 1 , t 2 ]×Σ in terms of the objects introduced in the previous step. Then pull this back to Σ t .
• Write the previous result in terms of time derivatives of the fields and introduce in this way the vector fields that define the evolution of the system.
To begin with, recall that M = I × Σ, with I = [t 1 , t 2 ], admits a foliation by the hypersurfaces Σ t and the inclusion  t ∶ Σ → M with  t (Σ) = Σ t . As usual, we will denote both the projection on the first argument and its elements by t. The vector field in M tangent to the curves t ↦ (t, p) is denoted by ∂ t and it satisfies Note that a differential form α ∈ Ω p (M) can be adapted to the foliation by the decomposition where α t ∶= ı ∂t α and α ∶= ı ∂t (dt ∧ α). We will call α t and α the adapted components of α.
Consider the family of functionsS I ∶Q → R with I an interval of R. They are actions in some configuration spaceQ where L is a top form in M which depends on the objects inQ. The action (8) is of this form. One can also rewrite it as a function S I ∶ P(Q) → R defined on a space of curves in a different configuration space Q by writing where γ is constructed with the adapted fields  * t ı ∂tq ,  * tq ∈ P(Q) for each of the configuration variablesq inQ. The two formulations are equivalent and the critical points of (31) are in one-to-one correspondence with stationary curves of (32).
It was shown by Nester [18] that the Euler-Lagrange equations can be written in the invariant form and that if γ ⊂ Q is a curve solution to the variational principle, the vector field Z alongγ ⊂ T Q given by Z˙γ (t) =γ˙γ (t) ∶= (γ γ(t) ,γ γ(t) ) solves (33). Then, for eachq ∈Q which is a critical point of (31) there is a curve γ in Q -which can be described in terms of the adapted fields-such that Z =γ solves the Euler-Lagrange equations. Notice that, by construction, v = Z q . However, a vector field Z ∈ X(T Q) satisfying (33) will not generally come from a curve γ corresponding to a solution of the Euler-Lagrange equations, because the integral curve it generates may not be the canonical lift of a curve in Q. This is true only if we additionally impose the second order condition (25).

According to the previous discussion, if Ψ is an equation of motion produced by variations, the equations
give the solution to the symplectic Lagrangian equation (24). Notice that (34) will require us to impose the constraints on the points of Q and fix the velocities, which via the procedure explained above are identified with the q components of the Lagrangian vector field. Notice that, a priori the resulting vector field need not necessarily be tangent to the submanifold defined by the constraints.
We will now apply this approach to the present problem. A simple way to do it is by splitting every object in the equations in its adapted components, since then (34) become trivial. We will (temporarily) denote the fields adapted to Σ with a bar to emphasize this and make the computations more transparent.
Let us define the adapted differential as dα = ı ∂t (dt ∧ dα) which can only act on α adapted to the foliation. Then, the exterior derivative decomposes as We can also define the covariant derivative on each leaf for α i adapted to the foliation as and we will write F i = DA i the curvature of Σ. As a first step, it is useful to have the decompositions of the covariant derivatives Notice that these expressions depend on the velocities. This is so because of the Lie derivatives that appear in the decomposition of the exterior derivative (since the velocity is precisely the derivative in t).
Using these ingredients, the equations of motion (9) decompose as For simplicity, we will drop the bars henceforth. Since Z satisfies the second order condition, we can identify the velocities with the corresponding components of the evolution vector field. Now, extracting both the tangential and transverse components of the equations of motion we obtain the following set of equations: Some of them, which come from the tangent part of the equations, are conditions involving only the points in Q: these are constraints. The remaining ones, coming from the transverse part of the equations, involve the components of the vector field Z. These define the evolution of the system. As can be readily seen, both the constraints and the evolution equations are precisely the same ones that we have found with the other two methods.

Final consistency analysis
Here we give a detailed account and extend the analysis presented in [9]. As we have shown the three different methods discussed above give the same result in the form of constraints and equations for the components of the Hamiltonian vector field Z associated both with the bulk and the boundary. From this point on the consistency analysis that will eventually lead to the final Hamiltonian formulation for the model considered here is the same for the three cases. The main issue to be checked is the tangency of the Hamiltonian vector field Z to the submanifold defined by all the constraints.
The equations for Z can be solved in a straightforward way without introducing new secondary constraints and will depend only on the configuration variables [9]. The bulk components can be easily obtained by solving the equations (20) (see [9] and [21]). To this end it is convenient to rewrite them in the form The solutions are where ω = 1 3! ε ijk e i ∧e j ∧e k is a volume form over Σ because we work with non-degenerate frames. In the following we will use the notation From the bulk equations (9a), (9b) it follows that f, t are symmetric matrices in the internal indices. In terms of these objects we have and we can write (36) in the form whose interpretation is discussed in detail in [9]. Here we just recall that introducing the vector field ρ ∈ X(Σ) defined in the whole of Σ including its boundary by equations (37a) and (37b) can be rewritten in the form The interpretation of (38a) and (38b) is well-known: the bulk dynamics corresponds to diffeomeorphisms and "internal" rotations defined by the arbitrary objects ρ and A i t − ı ρ A i . In particular, the fact that some of these transformations are diffeomorphisms suggests that it will be convenient to restrict our model to a configuration space such that the vector field ρ is tangent to the boundary. As we will see this can be achieved by imposing an extra boundary condition on the fields.
The boundary components of Z are even simpler to find as they are determined by the linear system of equations with constant coefficients (21). As we did above, it is convenient to rewrite these equations in the form For a generic choice of α 1 , . . . , α 5 (i.e. when α 2 5 − 4α 2 α 3 ≠ 0) the solutions to these equations are where By continuity the pullbacks of (36) (which are well defined because the components of the Hamiltonian vector field are differential forms) to the boundary must coincide with the values obtained in (40). This condition leads to the following additional set of boundary constraints: which can be generically written in the equivalent form At this point it is convenient to rewrite (23) in terms of f ij and t ij . These are Before we continue, there is a relatively fine point that must be considered with care. This concerns the possible extension of the bulk constraints to the boundary. The complete specification of the configuration space of the system requires a discussion of the smoothness conditions that the fields must satisfy. A simple way to proceed would be to demand as much regularity as needed to guarantee that all the expressions that appear in our analysis (for instance, the constraints) are well defined. This is in line with the traditional attitude in physics. However, in the presence of boundaries this has some consequences that have to be acknowledged and taken into account. Consider the bulk constraints. A relevant question regarding them is: Should they also hold at ∂Σ? In fact, intuitively one would expect the answer to be positive as a consequence of a simple and natural continuity requirement. The answer actually depends on the regularity conditions that we impose on the fields. For instance, let us take Σ with a regular boundary such that it can be submersed in an open manifoldΣ. If we demand that all the basic fields-i.e. the variables defining our configuration space (A i t , A i , e i t , e i )-admit smooth extensions toΣ then, if they satisfy the constraints in the interior of Σ they will also do so at ∂Σ because F i and De i will be C ∞ (Σ) and, hence, the constraints themselves when evaluated at these field configurations will also be smooth. On the other hand it is conceivable that no inconsistencies arise if the bulk constraints are not required to hold at the boundary. It may also happen that demanding consistency leads to conditions that are essentially equivalent to the extension property. In the following we will work under the hypothesis that the bulk constraints hold at the boundary.
The tangency conditions for the bulk constraints (22) are obtained by computing their directional derivatives along the field Z. These are: It is possible to directly check that these equations hold for the values of Z i A and Z i e given in (36). A better strategy is to consider them together with (35). In fact, by computing the covariant differential D of these two conditions we find By subtracting (44a) and (45) and using (36a) and (35b) we get which can be seen to vanish by expanding ε ijk ε pqr in terms of Kronecker deltas and using the secondary constraints in the form f ij = f ji , t ij = t ji . An analogous computation involving (44b) and (46) shows that the second tangency condition in the bulk also holds. The tangency conditions for the boundary constraints (23) are As we did before, instead of directly plugging the solutions for  * ∂ Z i A and  * ∂ Z i e into (40), it is better to compute the covariant differential D of (21) (taking advantage of the fact that the pullback behaves well with respect to the exterior differential and the exterior product) to get Now, combining (48a) and (47a) together with the pullback to the boundary of (20) we immediately get Proceeding in an analogous way with (48b) and (47b) we find As we can see these two expressions vanish as a consequence of the boundary constraints (23).
We now discuss the constraints (42) and (43). Note that if ρ is tangent to the boundary, we can swap the interior product with the pullback. More precisely, denoting by ρ the restriction of ρ to the boundary, If this happens, then This implies that the tangency of ρ to the boundary and (43) guarantee that the constraints (42) are satisfied. We end this section by showing that the condition that ρ be tangent to ∂Σ can be expressed in the form and checking the tangency of the vector field Z on the constraint submanifold of M 0 when this new condition is added.
On one hand we have (remember that ∂Σ has dimension 2) Conversely, Let us suppose that  * ∂ (ε ijk e i t e j ∧ e k ) = 0, then we have that  * ∂ ı ρ (ε ijk e i ∧ e j ∧ e k ) = 0. Let X, Y ∈ X(Σ) be such that they are tangent to ∂Σ. Let us call X and Y their restrictions to ∂Σ. We have now ı X ı Y  * ∂ (ı ρ ω) = 0, but this is the same as As ω is a volume form this tells us that X, Y and ρ are linearly dependent on ∂Σ and, hence, ρ is tangent to the boundary.
Finally let us look at the tangency condition for (49). Computing its Lie derivative along Z we find  * ∂ (ε ijk Z i et e j ∧ e k + 2ε ijk e i t Z j e ∧ e k ) = 0 . As the first term is proportional to v i Z i et (v i is constructed in the first lemma proved in appendix A) and v i ≠ 0 this equation can always be solved for Z i et , which guarantees the consistency of the tangency condition embodied by (49).

Remark 1.
As discussed, the consistency of the model depends on the vector field ρ being tangent to the boundary ∂Σ. However, it is not necessary to impose this condition by hand. Given the constraints (42), (43), the condition (49) is automatically satisfied. To see this, write where θ ij is either α 5 t ij + 2α 3 f ij + α 1 δ ij or 2α 2 t ij + α 5 f ij + α 4 δ ij so that are equivalent to the constraints (43) and (42), respectively. Since C i is a 2-form whose pullback to the boundary vanishes, it can be written in a neighbourhood of ∂Σ as C i =C i ∧ n, where n is the normal to the boundary andC i is such that it depends on e i , it is non-zero since e i is a non-degenerate triad, and its pullback does not vanish. But then, so that if condition (42) is satisfied, necessarily  * ∂ i ρ n = 0, hence ρ is tangent to ∂Σ. This means that it is not necessary to impose this as an independent condition as it is built into the model to begin with.

Remark 2.
We assumed all the fields to smoothly extend into the boundary. However, one might wonder in which way does relaxing this assumption affect the results. By using a similar argument to the one in the previous remark, it can be seen how even in this case, the model still enforces ρ to be tangent to the boundary. Remark 3. Consider e i ∈ Ω 1 (M) the part of e i tangent to each leaf Σ and choose the volume form ω = ε ijk dt ∧ e i ∧ e j ∧ e k . Since one easily computes Hence we can decompose u = ∂ t − ρ. Of course, u is a vector density and had we chosen a different volume form to define it, we would have obtained the same result up to a product with a non-vanishing function. Since we are only interested in its direction, this suffices. We know that ρ is tangent to the boundary ∂Σ, in particular it is also tangent to the boundary ∂M. On the other hand, ∂ t is tangent to ∂M by construction. Hence, u is also tangent to ∂M. Figure 2. Tangency of the vector fields ∂ t , u and ρ to the boundary.

Conclusions and comments
In this paper we have discussed three different methods to obtain the Hamiltonian formulation for the generalised Husain-Kuchař-Pontryagin action in a 4-dimensional manifold with boundary. A relevant feature of our analysis is that we have been able to deal with the boundary rigorously and in doing so, we have arrived at some key insights into the model. By appropriately choosing the coupling constants α i in the bulk Lagrangian, it is possible to get, as boundary contributions, the 3-dimensional Euclidean Einstein equations with an arbitrary cosmological constant.
While boundaries may introduce new terms in the Lagrangian or Hamiltonian and require new constraints at the boundary, their effect is more profound than that. In particular, boundaries shape the configuration space and greatly affect the integrability conditions of the theory as discussed at the beginning of section 3 and throughout section 3.4. Note that integrability can be studied in the methods we have used, while in the covariant phase space treatments such as [33][34][35][36][37] (see also [38,39] for 3-dimensional general relativity), which are focused on conserved charges and symmetries, integrability issues are not regarded.
Although all of the approaches used in section 3 to find the dynamics have produced equivalent results, it is interesting to compare them.
First, notice that all the methods give the same results because the Lagrangian is linear in the velocities. An interesting consequence of this is the fact that the dynamics is fully contained in the configuration space Q in the sense that, for instance, canonical momenta play no role. As a result, the formulations in T Q and T * Q, which share their base space, are equivalent.
Perhaps the most prominent difference between the approaches discussed here is the fact that the analysis presented in section 3.1 is made in the cotangent space T * Q while the treatment in sections 3.2, 3.3 uses the tangent space T Q. Although they are equivalent, one might prefer one formulation over the others depending on the desired application, for instance, working in T * Q could be useful for quantization.
It is important to point out that if one chooses to work in T Q, one must additionally impose the second order condition (25) for the solutions to be equivalent to those coming from the Euler-Lagrange equations. In T * Q such condition is not needed.
The geometric constraint algorithm (on which sections 3.1, 3.2 are both based) arose as a geometrized version of Dirac's method and is an improvement of it in the sense that it replaces Poisson bracket computations (that can be tricky, for instance if the fields are defined in a manifold with boundary) with geometric considerations. The field equations approach used in section 3.3 manages to bypass many of the computations of the geometric constraint algorithm making it the fastest and least computationally involved of the three. In some known examples (for instance for general relativity written in terms of the Hilbert-Palatini or Holst actions) this is, by far, the best way to arrive at the Hamiltonian formulation [21,32]. This is so because, in this case, it is crucially possible to simplify some of the field equations before applying the procedure that we have used here.

Lemma 1
Let Σ be a 3-dimensional manifold with parallelizable boundary ∂Σ. If ε ijk e i ∧ e j ∧ e k is a volume form in Σ (including at ∂Σ) then there exist v i ∈ C ∞ (∂Σ) with δ ij v i v j = 1 such that  * ∂ (ε ijk e j ∧ e k ) = v i ⋅ area where area is a volume form in ∂Σ.
Proof. Let us take three everywhere linearly independent vector fields X, Y, Z ∈ X(Σ) such that X and Y are tangent to the boundary and always different from zero there (remember that ∂Σ is parallelizable) and Z everywhere transverse to the boundary. At every point of ∂Σ we have then , whereX andỸ are vector the fields at the boundary obtained by restricting X and Y . Hence we conclude that ε ijk  * ∂ (e j ∧ e k ) is different from zero everywhere on ∂Σ. This means that, for a given volume form area we have ε ijk  * ∂ (e j ∧ e k ) = ε ijk  * ∂ (e j ∧ e k ) area area , with ε ijk  * ∂ (e j ∧ e k ) area everywhere different from zero. By normalizing it we get the desired v i , which is unique modulo a sign.
Proof. Let us complete e i with a 1-form e 0 linearly independent with the e i . As M is orientable ε ijk e i ∧e j ∧e k ∧e 0 will be a volume form. Let us expand now S i = S i j e j +S i 0 e 0 . The condition ε i jk e j ∧ S k = 0 then becomes ε i jk e j ∧ (S k l e l + S k 0 e 0 ) = 0 .
Let u ∈ X(M) be a vector field such that e 0 (u) ≠ 0 and e i (u) = 0, then, by taking the interior product with u we find S k 0 ε i jk e j = 0 ⇒ S k 0 ε i jk = 0 ⇒ S k 0 = 0 .
Also, by taking the exterior product with e m ∧ e 0 and using the fact that ε ijk e i ∧ e j ∧ e k ∧ e 0 is a volume form we immediately get S k l ε i jk ε jlm = 0 ⇒ δ im S − S mi = 0 ⇒ S mi = 0 .
Hence we conclude that S i = 0.