{'fraction_non_alphanumeric': 0.03498684934858401, 'fraction_numerical': 0.007992333883825718, 'mean_word_length': 4.566678016116218, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Non-Abelian gauge theories invariant under diffeomorphisms

We discuss diffeomorphism and gauge invariant theories in three dimensions motivated by the fact that some models of interest do not have a suitable action description yet. The construction is based on a canonical representation of symmetry generators and on building of the corresponding canonical action. We obtain a class of theories that possess between zero and a finite number of degrees of freedom. We focus on three special cases, starting with a theory with maximal number of degrees of freedom and finishing with a theory with zero degrees of freedom (Chern-Simons).


Introduction
Building a suitable theory which would provide, through the principle of least action, a dynamical description of a physical system of interest, has been a long-standing problem in theoretical physics. Once having the action, one can use well-established procedures to address different questions such as the existence of symmetries, conserved charges, count of degrees of freedom, interactions, quantization of the theory, its renormalization, etc., especially the ones relevant off-shell. The problem becomes even more important if one considers effective actions, which capture effective dynamics of the system restricted to particular observable quantities. The least action principle remains central in modern physics and mathematics.
However, many physically interesting models still lack their actions, and are studied at the level of equations of motion, or are only defined as quantum theories. For example, higher-spin theories, which are quantum theories of massless fields with spin greater or equal to two, do not have action principle formulated yet, except for some particular toy models. One of them is a three-dimensional higher-spin gravity [1], whose fields of spin n ≥ 2 transform as the adjoint representations of the gauge group SL(n, R) × SL(n, R). Gravitational field is one of them because AdS 3 ≃ SL(2, R) × SL(2, R) is a subgroup of the full gauge group. An important feature of this action is that it is invariant under two local symmetries which are usually difficult to unite -namely, spacetime diffeomorphisms and non-Abelian gauge symmetry.
Other examples that have drown recent attention of the high energy physics community are motivated by the success of AdS/CFT correspondence in description of stronglycoupled field theories, in particular condensed-matter systems [2]. They are usually non-relativistic and their fields may scale differently with respect to time and space reparametrizations, thus their effective theories are dominated by non-relativistic symmetries described, for example, by the Schrödinger algebra [3,4] in the case of asymmetrical time and space scaling, or the Galilean algebra [5] in the symmetric case. Newton-Cartan gravity [6,7] is a geometric version of Newtonian gravity, constructed through gauging of a centrally extended form of the Galilean algebra (Bargmann algebra) [8]. However, it does not have a suitable developed action principle yet, only the one in the form of the Extended String Newton-Cartan Gravity [9].
Above examples show that there are still many open problems in finding an appropriate action of (relativistic or non-relativistic) gravity theories. This motivated us to employ a systematic way to construct a non-Abelian gauge theory which is also invariant under general coordinate transformations, in pursuit of a simple description of an (effective) action invariant under two sets of local symmetries.
With this respect, it is well-known that gravity can be obtained as a Poincaré gauge theory, where the fundamental field belongs the representation of the Poincaré gauge group (see, for example, the textbook [10], and the references therein). In particular, when the spacetime is Riemannean, the action becomes the Palatini one [11,12,13], invariant under Lorentz transformations and spacetime diffeomorphisms. In these cases, even though the spacetime diffeomorphisms admit the presence of non-Abelian gauge fields, the matter fields are not treated on equal footing as gauge fields.
One of our aims is to provide a symmetry-based argument to include gravitational interactions and matter-gravity interactions in a theory. The models which have already implemented that description are Chern-Simons gravity and supergravity for de Sitter, anti-de Sitter or Poincaré gauge groups in three [14,15] and any other odd spacetime dimension [16,17]. Inclusion of the new bosonic and fermionic fields in these theories becomes simply an extension of the gauge group (for example to higher-spin group or super group), at the same time fixing the interaction in an almost unique way, using only the group theory arguments.
In this work, we use the method based on Hamiltonian formalism [18], where the basic property of the diffeomorphism-invariant theories is that their Hamiltonian vanishes on-shell. It means that the diffeomorphism-invariant Hamiltonian becomes a linear combination of all its constraints that generate local symmetries in the theory. The opposite statement, in general, is not true -the vanishing Hamiltonian does not necessarily imply that the theory is invariant under general coordinate transformations.
In a standard approach, one starts from a given action, performs a Legendre transformation in order to obtain the canonical Hamiltonian of the theory, and explores its symmetries using the Dirac method [19] (for a review, see for example [10,18]). It results in obtaining an extended Hamiltonian as a linear combination of all symmetry-generating constraints of canonical fields present in the theory.
In our approach, we will invert the Dirac's procedure, and construct an extended Hamiltonian which is a linear combination of our desired symmetry generators (spacetime diffeomorphisms and non-Abelian gauge symmetry). Having the Hamiltonian, we will seek for an inverse Legendre transformation that will give us a corresponding canonical action. A result is an effective action of the theory invariant under given local symmetries.
The main challenge of our method is to find a canonical representation of the constraints in terms of the canonical variables, a connection A a µ (x) which transforms in the adjoint representation of the gauge group and the corresponding canonical momenta π µ a (x). With respect to spacetime diffeomorphisms, in principle one could be able to construct a representation of the so-called hypersurface deformation algebra, or Dirac algebra [20,21], that generates diffeomorphisms on-shell. However, since the Dirac algebra is not a Lie algebra, it turns out that the representation of the generator of time-like diffeomorphisms is particulary intricate. For that reason, as the first step, in this work we will focus solely on the canonical representations of the generators of gauge transformations and spatial diffeomorphisms, not requiring invariance under the time reparametrizations. The actions obtained in that way are suitable for description of non-relativistic models, for example.
Let us emphasize that, when the action is known, it is straightforward to find canonical representations of generators using the Dirac's method. Such examples which are diffeomorphism and gauge invariant in any dimension D are topological BF theories [22,23], whose fundamental fields are the connection (with the field strength F ) and the field B which is the D − 2 form. Under some additional restrictions BF theories describe gravity in first order formalism, either in complex self-dual Ashtekar connection or the real Ashtekar-Barbero connection [24,25,26]. Nevertheless, even though these examples use non-Abelian connection, they possess additional fields and, in order to obtain gravity, the original symmetry of the BF theory must be broken when D > 3. In two dimensions, the approach based on Ashtekar-Barbero variables can be applied for dilaton gravity and leads to the corresponding canonical representation of symmetry and spacetime diffeomorphisms generators [27].
Another relevant issue is related to the uniqueness of the representation, for a given choice of canonical variables. One of the important results is given in Ref. [20], where the unique canonical representation of the hypersurface deformation algebra in four dimensions has been constructed (up to a canonical transformation of momenta), in the case when the canonical variables are the spatial 3-metric and its conjugate momentum. Furthermore, it coincides with the ADM expressions for the constraints [28].
The choice of the phase space variables is crucial for our analysis. For example, the gauge theories in curved background spacetimes are not diffeomorphism invariant, but can be made invariant by including the embedding variables to the configuration space [29]. The resulting theory on this extended phase space is called a parametrised field theory and is equivalent to the original one only if additional constraints are imposed. The parametrised theories are gauge and diffeomorphism invariant. Other extensions of the phase space which enable diffeomorphism invariance are possible, as for the parametrised Maxwell theory, but as a result the gauge symmetry is broken [30].
The method adopted in this work was first applied successfully in two dimensions to obtain the gauged Wess-Zumino-Witten action [31] as a Lagrangian realization of the Virasoro algebra that its constraints satisfy, and its supersymmetric version [32]. Similarly, the Liouville theory was obtained as a gravitational Wess-Zumino action of the Polyakov string in [33], and an action for the spinning string was found in Refs. [34,35,36]. First attempts to apply the method in three dimensions are presented in Ref. [37]. The last work was inspired by Hamiltonian analysis of Chern-Simons theories performed in higher dimensions [38].
It is worthwhile noticing that the theories described by canonical actions will be first order by construction.
In what follows, we focus on three-dimensional spacetimes. In Section 2, we define the method in a precise way and list our assumptions. In Section 3, we construct symmetry generators in terms of canonical variables for both gauge generators and spatial diffeomorphisms. In Section 4, we find canonical actions in three different settings, one of them reproducing the well-known Chern Simons gravity. We summarize our results in Section 5, pointing out open problems and possible future lines of research.

Preliminaries
Consider a theory that is gauge-invariant under transformations of a semi-simple Lie group G. For simplicity, we consider a three dimensional spacetime, parametrized by the local coordinates x µ = (x 0 , x i ), i = 1, 2, of the topology R × Σ and the signature (−, +, +), where x 0 = t is the time coordinate.
Let T a , a = 1, . . . , n, be anti-Hermitean generators of the corresponding Lie algebra, where f c ab are the structure constants and g ab is the non-degenerate Cartan-Killing metric. The basic field is a connection A a µ (x) which transforms in the adjoint representations of the gauge group, such that the covariant derivative of a vector field reads D µ V a = ∂ µ V a + f a bc A b µ V c and the corresponding field-strength is given by the standard expression, In the phase space, the fundamental fields are conjugated variables A a µ (x) and the corresponding canonical momenta π µ a (x), whose Poisson bracket is given by From now on, we will use the short-hand notation {A a µ , π ′ν b } = δ a b δ µ ν δ. In the canonical formalism, the dynamics of the theory is governed by the Hamiltonian density H(A, π, u), that can also depend on the arbitrary multipliers u(x). An alternative way to describe the dynamics is in terms of the canonical action, obtained as a Legendre transformation of the Hamiltonian density, In Dirac formalism, the systems with local symmetries have constraints, or vanishing functions of canonical variables. There are two types of them: first class constraints that generate gauge symmetries, and second class constraints that do not generate any symmetry, but they eliminate redundant degrees of freedom.
Keeping that in mind, we assume that our theory (2.3) fulfills the following conditions, which ensure that it is both gauge and diffeomorphism invariant: (i ) The theory is invariant under the action of the gauge group G, so there are 2n independent first class constraints G a (A, π) = 0 andḠ a (A, π) = 0 generating a local symmetry with the parameters λ a (x) and ε a (x), respectively.
(iii ) A corresponding Hamiltonian density is a pure constraint, H(A, π, u) = 0, as a consequence of reparametrization symmetry.
To justify the condition (i ), recall that first class constraints are related to local symmetries through some local parameter λ a (x) and its time derivatives. However, in the Hamiltonian formalism, all time derivatives of parameters are treated as independent parameters. Since our aim is to obtain a Lagrangian whose equations of motion contain at most second time derivatives, the parameter of gauge transformations depends at most on first time derivatives. Thus, each time when there is a local symmetry with a parameter λ a , there is also a local symmetry with a parameter ε a ∼λ a . In consequence, there are two sets of first class constraints [39], as expressed in the condition (i ). If the gauge transformations are linear in time derivatives, λ a and ε a are the complete set of gauge parameters.
We also assume that the constraints are independent. This requirement is known as regularity condition (see, for example, Ref. [18]). So-called irregular systems do not fulfill this condition and the dependence of constraints produces a change in the number of symmetries and degrees of freedom [40,41].
The condition (ii ) ensures first class constraints which generate spacetime diffeomorphisms. As discussed in details in Refs. [21,24], it is still an open question how to construct a canonical representation of generators of time-like diffeomorphisms on the full phase space and off-shell. For that reason, we shall focus on a representation of the spatial diffeomorphisms and construct a theory that is invariant under the transformations generated by them. The spatial diffeomorphisms can be either linearly independent or dependent on gauge symmetries. For example, all spatial diffeomorphisms are independent in higher-dimensional Chern-Simons theory, and dependent on gauge transformations in three-dimensional spacetime [38]. Thus, to have a theory covariant on Σ, the spatial diffeomorphisms are either all dependent or all independent on the gauge symmetries, while the time-like diffeomorphisms, that generate time evolution off Σ, can be treated separately. Therefore, the number of independent constraints is 2ε for spatial diffeomorphisms and ε 0 for time-like diffeomorphism, where ε, ε 0 = 0 or 1.
In general case, the representation of the generator of the time-like diffeomorphism H 0 , when it is independent on gauge transformations, is not unique. In order to avoid technical difficulties related to its representation, we shall not include it. It means we will set ε 0 = 0, which can imply that the obtained theory is not invariant under the time-like diffeomorphism. Then one can ask whether the extended Hamiltonian still vanishes onshell. As pointed out in [18], the answer is -not necessarily, one example is an (effective) theory invariant under spatial diffeomorphisms with the canonical Hamiltonian different than zero [42]. However, since our ultimate goal is obtention of a fully covariant theory, we will not consider these cases. On the contrary, when possible, we can try to covariantize the final action, so that it becomes a scalar density under the general coordinate transformations, expecting that the Hamiltonian constraint would be implemented in that way dynamically. In other cases, when the covariantization is not possible, the new action should be seen as the one with reduced symmetry, describing in that way theories such as non-relativistic ones, or the ones in presence of a membrane.
The condition (iii ) is a property of a diffeomorphism invariant theory. As for the last condition (iv ), we permit the existence of second class constraints, whose number is always even. In order to perform the inverse Legendre transformations, when it is possible, we can only use the second class constraints, definitions of velocitieṡ A(A, π) and values for u obtained from the evolution of the constraints. We cannot use all equations of motion because then the action vanishes on-shell, as it becomes a boundary term [43].
At the end, let us count the degrees of freedom of our system. We start with 3n Lagrangian fields A a µ , and have 2n + 2ε first class constraints (G a ,Ḡ a , H i ) and 2m second class constraints φ M . A number of degrees of freedom N in the theory is, therefore, In the following section we will construct a representation of the constraints, as a first step towards the formulation of the canonical action.

Canonical representation of the generators
We seek for a theory invariant under internal gauge transformations and spatial diffeomorphisms. To this end, we need a representation of the generators in terms of canonical variables (A, π). This representation is not, in general, unique, and we will choose a particular one and discuss possible generalizations.

Gauge generators
As mentioned before, the canonical gauge generators G a (A, π) are first class constraints and they satisfy the Lie algebra The algebra of the generatorsḠ a (A, π) does not have predetermined form, and has to be such that they generate, together with G a , via the Poisson brackets, desired gauge transformations using the total, smeared symmetry generator It is worthwhile to emphasize that the smeared generator, as well as the Hamiltonian and all functionals of canonical variables, have to be differentiable quantities in order to have well-defined Poisson brackets. This is achieved by supplementing them with suitable boundary terms. This step is essential also for definition of canonical conserved charges [44,45]. In this text, however, we will not discuss the differentiability of the functionals as we are, at the initial stage, concerned with the construction of the canonical action possessing given symmetries. The question of the boundary terms should be, however, addressed later on. From now on, we will neglect all boundary terms in our calculations.
Recall that we introduced the additional set of generatorsḠ a in order to deal, in a canonical way, with the time derivatives of the local parameters that appear in the gauge transformation. Namely, sinceλ a becomes an independent parameter represented by ε a , the relation between them is naturally induced by the gauge transformation of the form (3.2), namely, Therefore, G a andḠ a have to be such that the above transformation law is satisfied. Let us start with the transformation law of the spatial components A a i . The first line in (3.4) and independence of λ b and ε b lead to the following functional equations in G a andḠ a , Note that, since G a andḠ a can depend at most on first spatial derivatives of the gauge field, the quantities of the type ∂Ga are distributions (Dirac delta function and its first spatial derivatives).
The general solution of Eqs.(3.6) reads where h a andḠ a are arbitrary phase space functions independent on π i a . On the other hand, from the transformation law of the time-like component A a 0 , it follows that leading to the solution We conclude that both first class constraints G a andḠ a are linear in momenta in case of non-Abelian gauge symmetries. The algebra of the gauge generators given by the expressions (3.7) and (3.10) has the following form, In order to describe a symmetry, the algebra has to close. It implies that, because h a andh a do not depend on the momenta, all extra terms depending on these functions on the right hand side of Eqs.(3.12) do not depend on the momenta either, and therefore they have to vanish. The result are the restrictions One particular family of two-parameter solutions of these restrictions is where α and β are real constants, which can also be zero. Indeed, it is straightforward to show that all covariant derivatives appearing in ∆G ∂A a i = 0, and similarly for other covariant derivatives. Using also the facts that h a andh a are independent on A b 0 and A b i , respectively, the other terms cancel out, for example In that way, the choice (3.14) yields ∆G ab (x, x ′ ) = 0 for all n and the non-Abelian gauge algebra closes.
The algebra of the constraints becomes 16) and the generator of gauge transformations acquires the form where h a (A) andh a (A) satisfy the conditions (3.13).

Diffeomorphism generators
Now we focus on the representation of the generator of general coordinate transformations, δx µ = −ξ µ (x), that acts on the fields as a Lie derivative, δA a µ = £ ξ A a µ . A canonical representation of the generators of these transformations, spacetime diffeomorphisms, should be such that the smeared generator D[ξ] = d 2 x ξ µ H µ acts on an arbitrary function of phase space variables F (A, π) as (3.18) The diffeomorphism group represents a kinematical symmetry of any diffeomorphism invariant action. In the standard approach, one starts from the Lagrangian of a diffeomorphism invariant theory and constructs the canonical representation of the generators of spacetime diffeomorphisms. The canonical representation of generators of space-like diffeomorphisms, H i (A, π), is independent on the Lagrangian, while the generator of timelike diffeomorphism, so called the Hamiltonian constraint, H 0 (A, π), depends on the dynamics of the theory (the form of the Lagrangian). For that reason, they generate a dynamical symmetry of the theory. The fact that the dynamics takes place on spacelike hypersurfaces embedded in a spacetime with Lorentzian signature is reflected in the algebra of the constraints (H 0 , H i ), which is Dirac algebra, also known as hypersurface deformation algebra, of the form [19,30] where q ij is the inverse of the induced metric on the spatial hypersurface. The Dirac algebra is not a Lie algebra, because of the structure functions q ij (x) in the brackets of the Hamiltonian constraints (3.19). For that reason, the canonical representations of the Hamiltonian constraint and the spatial diffeomorphism generator cannot be derived in the same way.
In particular, the time evolution off Σ is determined by the Hamiltonian constraint H 0 , so its representation is theory-dependent and cannot be obtained in a straightforward way by our methods. As explained in the previous section (see discussion about the point (ii )), we shall focus only on the spatial diffeomorphisms. Under their action, the field A a 0 transforms as a scalar and the field A a i transforms as a one-form. Similarly, π 0 a and π i a are scalar and vector densities, respectively. Now we can make use of the fact that, apart from general coordinate transformations, we also have gauge symmetry. Recall that the Cartan's identity, relates the field-dependent gauge transformation D µ (ξ ν A a ν ) to the diffeomorphisms £ ξ A a µ . In the special case of theories where the equations of motion are F a µν = 0, these two sets of local transformations are dependent on-shell, £ ξ A a µ = D µ λ a . Clearly, in these theories A a µ is a pure-gauge, so the theory has no local degrees of freedom, N = 0. Local symmetry represented by the second term on the r.h.s. of Eq.(3.22), relevant only when N = 0, is also called improved diffeomorphism [46].
The identity (3.22) applied to the spatial diffeomorphisms suggests the form of the spatial diffeomorphism generators as so that the smeared generator would read In that case, it is straightforward to check that, under spatial diffeomorphisms, A a i transforms like a one-form, for any function h b , while π i a should change as a vector density of the weight one £ ξ π i a = ∂ j (ξ j π i a ) − (∂ j ξ i ) π j a . Straightforward calculation gives implying that the last term in the above formula has to vanish (on-shell or off-shell). However, if we exclude the term −A b i h b from the diffeomorphism generator, we obtain a good transformation law of the fields in any case, and independently on the function h a . We shall, therefore, define the spatial diffeomorphisms generator as where H i is linear in A a i and π i a , , is satisfied for any function on the phase space. Direct checkup shows that H i close the spatial diffeomorphisms sub-algebra (3.21), but the algebra with gauge generators {G a , H ′ i } does not close, when h a (A) = 0, even if the conditions (3.13) are fulfilled. For that reason, for now we shall restrict our analysis to the case when h a = 0 andh a = 0, leading to The cases h a ,h a = 0 will become relevant when the second class constrains are included, and will be discussed in the next section. Furthermore, it is more convenient to replace H i by other first class constraints K i , It turns out that K i are generators of improved spatial diffeomorphisms [46], which differ from spatial diffeomorphisms by a gauge transformation. Namely, if we define a smeared generator then the improved diffeomorphisms transform the fields as New constraints satisfy the following algebra, Note that the Poisson brackets of K i does not close without the presence of G a and there are field-dependent structure functions F a ij . Remarkably, in the Hamiltonian analysis of the higher-dimensional Chern-Simons theory, the constraints of the improved diffeomorphisms appear naturally as secondary first class constraints [38], and the diffeomorphisms are only an on-shell symmetry. This example suggests that it is simpler to choose K i as the symmetry generators for construction of the Hamiltonian action in general.
To summarize, the constraints in the theory invariant under both gauge transformations and spatial diffeomorphisms include the generators of these symmetries, but it can also contain a set of second class constraints that are not symmetry generators, and whose presence is important for building a covariant theory. Therefore, the complete set of the constraints is: First class :Ḡ a = π 0 a , n , G a = D i π i a , n , Second class : φ M , 2m .

Canonical action
When the theory is invariant under general coordinate transformations, the Hamiltonian becomes a pure constraint. It enables to write the most general Hamiltonian density as a linear combination of all constraints present in the theory, where the associated Hamiltonian multipliers are u a (x), v a (x), ζ i (x) and w M (x). On the other hand, in the standard approach one starts from the Lagrangian description of a theory and then in the Dirac formalism distinguishes between the primary and secondary constraints, that is, the ones obtained from the definition of the canonical momenta (primary), and the ones obtained from the evolution of the primary constraints (secondary). The Legendre transformation of the Lagrangian evaluated on-shell yields the canonical Hamiltonian, but a proper definition of physical variables in the reduced phase space requires also to account the constraints between canonical variables. It leads to the total Hamiltonian that includes also the primary constraints, and the extended Hamiltonian that includes all (primary and secondary) constraints.
We will adopt an approach of Dirac who conjectured that all first class constraints (primary and secondary) generate gauge transformations and should be included in the extended Hamiltonian. In Ref. [39], it was shown that this is always the case, except when the powers of some constraint φ appear, e.g., φ n . Then the constraint φ n and the ones following from its evolution do not enter the extended Hamiltonian. Thus, only the first class constraints that do generate gauge transformations are included in the extended Hamiltonian. The resulting Hamiltonian equations of motion are not identical to the Lagrangian ones, but the difference is not physical. For more details, see for example Ref. [10].
It this approach, we construct the canonical action which contains larger number of arbitrary multipliers, obtained from the extended Hamiltonian. These multipliers can be partially identified with unphysical components of the gauge field if one conveniently assumes that some of the first class constraints are primary, and therefore requires that their evolution produces the other -secondary-first class constraint. We will make use of this method to reduce a number of multipliers. Resulting equations of motion would not depend on the choice of the constraints as primary or secondary, but the effective Lagrangian could have different (physically equivalent) form, in latter case containing additional auxiliary fields [47].
So far we have not considered the second class constraints, φ M . Recall that there must be an even number of these constraints, because their Poisson brackets have the form where the tensor ∆ M N must be invertible on-shell. Therefore, the rank of ∆ M N has to be maximal, and since it is antisymmetric, it is an even number 2m. In addition, the constraints φ M have to commute on-shell with all first class constraints.
At first sight, it seems that there is a huge arbitrariness in the choice of φ M (x). However, although their choice is not unique, there are at least two conditions which drastically reduce a number of possible choices. First, their number is limited by the number of degrees of freedom in the theory and, second, they have to be covariant under both diffeomorphisms and gauge transformations, so that the index M is not arbitrary. More precisely, its tensorial properties are determined by the indices a, b, . . . (with the range n) and i, j, . . . (with the range 2). From the degrees of freedom count (2.4), we have where, as discussed before, we assume ε 0 = 0. The above inequality implies, for example, that for n > 3, φ M cannot be an antisymmetric or symmetric group tensor of rank two, as n(n − 1)/2 or n(n + 1)/2 constraints would not satisfy the above condition. Keeping this argument in mind, there are the following allowed multiplets of the constraints φ M fixed by its tensorial properties, The sum of all the components present in the theory must be equal to 2m.
So far, we found a particular representation of first class constraints and wrote an extended Hamiltonian describing a theory with n−m−2ε degrees of freedom. Let us prove now that this method indeed produces an action invariant under local transformations.
Before doing it, further simplification can be done in the Hamiltonian (4.1). Namely, since the second class constraints have to satisfy the consistency conditions, we use Eq.(4.2) and the fact that {φ M , G ′ A } = 0 on-shell, to obtaiṅ Then, due to invertibility of the matrix ∆ M N , the multipliers associated to second class constraints vanish, w N = 0. As a result, the extended Hamiltonian density does not depend on second class constraints, acquiring the form where G A = G a ,Ḡ a , K i are first class constraints and U A = (u a , v a , ζ i ) are the corresponding multipliers. Hamiltonian equations are invariant under local transformations generated by the smeared generator where Λ A = (λ a , ε a , ξ i ) are local parameters. The algebra given by Eqs. (3.16) and (3.33) does not have the standard form. It closes, but with some some structure functions f C AB (x) depending on the canonical fields. Also, since the algebra in general involves distributions δ and ∂ i δ, the derivative term gives rise to another set of the structure functions, f Ci AB (x). Thus, the Poisson brackets algebra has the form, where the structure functions are not completely arbitrary, because the brackets are antisymmetric and (4.7) has to satisfy the Jacobi identity. Under these conditions, the canonical action is invariant under the transformation generated by the smeared generator G [Λ]. Indeed, this action changes under local transformations as Using the algebra (4.7), the generators vary as while the canonical fields transform (with the functions h a andh a given by Eqs.(3.14)) as Plugging these expressions into δI, after few integrations by parts, first two terms in δI lead to the identity 12) and the full canonical action changes under the local transformations generated by The invariance (δI = 0) follows if the indefinite multipliers change according to the rule This transformation law is a generalization of the one given in the review [48], where the algebra did not contain the ∂ i δ terms and whose structure functions were restricted to the field-independent structure constants. In the next section, we will choose particular constraints (for given m and ε), and construct the corresponding gauge theories. Recall that we always have ε = 1, except when F a µν = 0. Let us focus on special cases.

Theory with the maximal number of degrees of freedom
The simplest possible theory has the minimal number of constraints, which are only the gauge ones, with the arbitrary functions in the equations (3.7) and (3.10) set to zero, h a = 0,h a = 0, and without second class constraints (m = 0). Absence of spatial diffeomorphisms will either produce a theory where all diffeomorphisms are functionally dependent on the gauge transformations (ε = 0), or the theory will not be invariant under general coordinate transformations.
This theory has the maximal number N = n of degrees of freedom and its constraint structure reads First class :Ḡ a = π 0 a , n , G a = D i π i a , n .
It is interesting that here we have the same set of the first class constraints as in non-Abelian Yang-Mills theory. The essential difference between two theories is that the Yang-Mills' Hamiltonian density contains the usual kinetic term 1 2 π 2 which is not a constraint, because the Yang-Mills theory does not have reparametrization symmetry.
With these constraints, the Hamiltonian density (4.1) becomes A time evolution of the variable F (A, π) on the phase space is given by the Poisson brackeṫ Evolution of the constraints G a andḠ a does not generate the new ones, so we have the complete set of them.

Now we have a good Hamiltonian that fulfills all requirements (i )-(iv ) and we can obtain the Hamiltonian equations,
(4.18) Let us notice that F a µν = 0 is not an equation of motion of this theory for arbitrary multipliers. For example, F a 0i = −D i (v a + A a 0 ) and F a ij = 0. According to (3.22), diffeomorphisms are not on-shell equivalent to gauge transformations, and the theory is not invariant under general coordinate transformations.
Before moving to the next case, let us analyze this theory and try to get some insight about possible improvements.
From the definition (2.3), the canonical action becomes Now it is explicit that this simple constraints choice does not lead to a gravitational theory. The action (4.19) is gauge invariant but not diffeomorphisms invariant. Vanishing Hamiltonian is, therefore, necessary, but not sufficient condition for a theory to be diffeomorphism invariant. This theory cannot be put in the covariant form without imposing additional conditions. We can try to determine Hamiltonian multipliers using the fact that some of the constraints can be primary, and another secondary. For example, inspired by Yang-Mills theory, we can suppose thatḠ a = π 0 a is a primary constraint and allow the multiplier to depend on the phase space variables. Then its consistency condition (time evolution) leads, the same as in the Yang-Mills case, to the secondary constraint G a = D i π i a . This assumption now gives where the first term vanishes on-shell, as we already know thatḠ a = 0. The second term yields a secondary constraint G a only if ∂v ′b The sign minus is added for convenience. This choice enables to have on-shell F a 0i = 0, but it is still F a ij = 0.
The canonical action becomes [37] where, in the second line, we redefined the arbitrary multiplier asū a = u a −Ȧ a 0 . From this form of the action it is easy to identify that non-invariance is due to the missing components F a ij . Since here A a i are dynamical fields carrying degrees of freedom, F a ij is not a pure gauge and it is not a constraint, so it cannot appear in the action. Another problem of this action is that the momenta π i a cannot be integrated out to make the action a functional of the gauge field only. In the case of π 0 a this is not problematic as this field is clearly unphysical, but dynamical π i a needs another treatment. These two problems of I suggest that a way to improve the theory would be to add the spatial diffeomorphisms constraints, K i , in the Hamiltonian action, and also introduce second class constraints that would enforce a relation π i a = L i a (A), to help integrate out the momenta in a covariant way.
We shall explore both possibilities. Let us start from the first option which introduces spatial diffeomorphisms without involving second class constraints.

Theory containing only first class constraints
In this section we assume that spatial diffeomorphisms are independent first class constraints (ε = 1) and there are no second class constraints, m = 0. Based on our experience with the gauge constraints gained in Section 4.1, some arbitrary multipliers can be identified with unphysical gauge field components if we assume thatḠ a is primary and G a secondary constraint. In this settings, there are 2n + 2 first class constraints, Primary first class:Ḡ a = π 0 a , n , satisfying the Poisson brackets (3.16) and (3.33). Note that K i have to be primary constraints. The number of physical degrees of freedom is N = n − 2.
The Hamiltonian density is of the form where we have to replace v a = −A a 0 to ensure that the evolution ofḠ a = 0 leads to G a = 0. Equations of motion reaḋ (4.24) The canonical action becomes (4.25) or, equivalently, after introducing the multiplierū a = u a −Ȧ a 0 , the result is This theory illustrates a nontrivial gauge theory also invariant under spatial diffeomorphisms, which possesses dynamical degrees of freedom in three dimensions. The time-like diffeomorphisms are absent. This action can describe a theory that is not invariant under coordinate transformations in one direction only, such as diffeomorphism invariant theory on a brane or a non-relativistic model. Work on possible applications is currently in progress.
If we want a fully diff-invariant theory, we need some additional ingredients, and one possibility is to consider a theory with second class constraints. We do it in the next example.

Theory with zero degrees of freedom
Let us analyze another extreme case, where a number of degrees of freedom is zero, N = 0. Taking into account the inequality (4.3), we can have N = 0 when the number of second class constraints 2m depends on the dimension of non-Abelian group n and the number of independent spatial diffeomorphisms 2ε, as m = n − 2ε . (4.27) There are two possibilities: ε = 0 and ε = 1. In the first case, we get m = n and according to the table of allowed multiplets of the second class constraints, this naturally corresponds to the constraints of the form φ i a . Alternatively, we can also choose two sets of the constraints φ a , or 2n scalar constraints, etc, but, in general in these cases it is difficult for larger n to construct a sufficient number of independent scalars or vectors satisfying suitable algebra, whereas for φ i a we need only one covariant set of the constraints, which clearly becomes the simplest choice to explore from now on.
Similarly, when ε = 1, we need m = n − 2, and because there is no one constraint which has 2(n − 2) components, it implies that we have to take a set of them, for example, 2(n − 2) scalar constraints. As mentioned before, we will not discuss here these cases.
To conclude, in this section we analyze the theory with zero degrees of freedom where the spatial diffeomorphisms are not an independent symmetry, ε = 0, and there are 2n second class constraints with the index structure M = i a : Primary first class :Ḡ a = π 0 a , n , Primary or secondary first class : G a = D i π i a , n , Primary or secondary second class : φ i a , 2n .
We already saw in previous sections that it is convenient to divide the constraints into the primary and secondary ones because, in that way, we can identify some Hamiltonian multipliers as gauge fields. This separation is arbitrary, so we define that: -There are p primary and n − p secondary constraints G a ; -There are q primary and 2n − q secondary constraints φ i a . There are no tertiary constraints because we look at theories whose Lagrangian equations of motion are at most second order in time derivatives. Furthermore, since the secondary constraints are obtained from the primary ones by means of the consistency conditions, there is always equal or fewer number of them, p + q ≥ n . (4.28) For covariance, all G a have to be either primary or secondary, and similarly for φ i a . Thus, there are four possibilities of the pairs (p, q), that are (0, 0), (n, 0), (0, 2n) and (n, 2n). But p = q = 0 is not allowed because it does not fulfill the above inequality, and p = n is not allowed because, in this case, the theory does not have the second generation of first class constraints and we saw earlier that they help to obtain a covariant transformation law of canonical variables and identify some arbitrary multipliers with unphysical gauge field components. There remains only one possibility, that is: G a are secondary (p = 0) and φ i a are primary (q = 2n) constraints. Because we already have canonical representations of the first class constraints, now we focus on second class ones, φ i a . The primary constraints are always linear in momenta, and the index structure yields φ i a = π i a + L i a (A) . The constraint φ i a has to commute on-shell with all the generators. In particular, forḠ a that gives which has to vanish on-shell, finding that L i a does not depend on-shell on A a 0 , L i a = L i a (A b j ) . In principle, in the above expression we can also add the term A b 0 σ i ab (A c j ), where σ i ab (A c j ) vanishes on-shell but, as A i 0 is a non-physical variable (conjugated to π 0 i = 0), this would only lead to a redefinition of the corresponding Hamiltonian multiplier. We shall therefore set σ i ab = 0 without loss of generality. The second class constraints also have to satisfy the algebra (4.2), that is where the symplectic matrix Ω ij ab is invertible on-shell. Ω must be antisymmetric under the simultaneous exchange of the indices (i, a, x) ↔ (j, b, x ′ ). In a local theory, Ω ij ab (x, x ′ ) = Ω ij ab (x)δ, and then the antisymmetric indices [ij] can be realized through the constant Levi-Civitá tensor ε ij . The group indices (ab) have to be symmetric, so they are proportional to the invertible Cartan metric g ab . It means that an invertible tensor of an appropriate rank reads Ω ij ab (x, x ′ ) = k ε ij g ab δ , (4.32) where k is a non-vanishing real function of the gauge fields A a i . We shall take k = const = 0 to ensure invertibility in all points of the spacetime manifold. Then we find a particular solution However, it turns out that this choice of second class constraints is not consistent with the first class character of G a , because their brackets do not vanish, In order to recover the vanishing brackets between φ and G, we redefine these constraints in the following way. For the gauge constraint G a , we can take the form found previously in Eq.(3.7), with the function h a given by (3.10), and φ i a can be modified by the addition of the function s i a = 0, that is, where h a and s i a do not depend on A a 0 in order to commute withḠ a = π 0 a . Now we require that the Poisson brackets of the constraints (4.35) vanish on-shell. As the result, we find where α is a real constant. This result matches with Eq. (3.14). Note that the constant k cancels out in φ i a and the constraints depend only on α, namely The algebra of constraints becomes which is the same as before, up to the replacement 2α ↔ k.
As shown in Eq.(4.5), the extended Hamiltonian density does not contain the second class constraints, and its explicit form is It implies that the Hamiltonian density read Hamiltonian equations of motion arė Also, we find that F a µν = 0 on-shell since in agreement with the fact that the theory does not possess locally propagating degrees of freedom because the basic field is pure gauge. Furthermore, the spatial diffeomorphisms become dependent on the gauge transformations, as discussed before. Using the expression for the multipliers v a and the constraints φ i a to eliminate the non-physical momenta π i a in the canonical action (2.3), we find where we redefinedū a = u a −Ȧ a 0 . The first two terms in the previous equation form the action of the Chern-Simons theory, with ε ij ≡ ε 0ij , so that the canonical action can be put in the form The actions I and I CS are physically equivalent, since their difference is decoupled from the Chern-Simons term and on-shell it is satisfied π 0 a = 0 andū a = 0. It is interesting that, in this procedure, we obtain G a as secondary constraints, whereas the Hamiltonian analysis of Chern-Simons action gives different secondary constraints and G a appear as a linear combination of primary and secondary ones (see Chapter 6.4 in Ref. [10]). In our approach, however, we start from the extended Hamiltonian that includes all constraints, both primary and secondary, and reconstruct the Chern-Simons action in a different, but physically equivalent way, finding that it is the unique action which can be obtained under given assumptions.

Discussion and outlook
In this work we showed that a method based on the Hamiltonian formalism can be successfully applied for construction of theories invariant under general coordinate transformations and possessing a non-Abelian gauge symmetry. Our motivation was to build a gravitational theory coupled to non-Abelian matter or high-spin fields in three dimensions. The procedure was previously applied in two dimensions to obtain Wess-Zumino-Novikov-Witten model [31] and its supersymmetric extension [32].
The key step in the construction was finding a canonical representation of symmetry generators in the phase space, i.e., spatial diffeomorphisms and gauge generators. The Hamiltonian constraint that generates evolution along a time-like direction and forms the Dirac algebra with the generators of spatial diffeomorphisms, was not included in our approach. As shown in Ref. [20], in order to obtain its canonical representation, some additional assumptions were necessary. In consequence, the models obtained by our method, which are not invariant under time reparametrization, can be used to describe the dynamics of non-relativistic theories or, in case of Hamiltonian evolution along spatial direction, the dynamics of geometries containing membranes (which are diff-invariant submanifolds). Work on possible applications is currently in progress.
In particular, we applied the method in three different cases. The first model has maximal number of degrees of freedom and minimal number of constraints, but it is a gauge theory that is not diffeomorphism invariant. In the next example, we considered a model with first class constraints only, and obtained a nontrivial gauge theory also invariant under spatial diffeomorphisms. This theory possesses n − 2 dynamical degrees of freedom, it is not equivalent to Yang-Mills theory and should be better explored in future. Finally, we studied a system without degrees of freedom, which turned out to be the Chern-Simons theory.
These three examples show that the method, based on symmetries and the canonical representations of their generators, could be used as a powerful tool for exploring possible dynamics of gauge theories.
The project has many open questions to be addressed in future. The most important one is the inclusion of time-like diffeomorphisms in this formalism, which would guarantee that the final theory contains gravitational field. Another of the future tasks is to analyze the uniqueness of the canonical representations, i.e., discuss non-equivalent representations of the symmetry generators and the resulting canonical actions. For example, one possible extension would be to include primary constraints non-linear in momenta, present in case of free non-relativistic point particle.
An important challenge whose solving is currently in progress, is construction of a physically interesting example of a theory that possess physical degrees of freedom in three dimensions, but is also invariant under spacetime diffeomorphisms. An additional extension concerns an issue of boundary terms, essential for having a well-defined theory in spacetime regions with boundary and definition of conserved quantities, and should also be addressed later on.