Healthy degenerate theories with higher derivatives

In the context of classical mechanics, we study the conditions under which higher-order derivative theories can evade the so-called Ostrogradsky instability. More precisely, we consider general Lagrangians with second order time derivatives, of the form $L(\ddot\phi^a,\dot\phi^a,\phi^a;\dot q^i,q^i)$ with $a = 1,\cdots, n$ and $i = 1,\cdots, m$. For $n=1$, assuming that the $q^i$'s form a nondegenerate subsystem, we confirm that the degeneracy of the kinetic matrix eliminates the Ostrogradsky instability. The degeneracy implies, in the Hamiltonian formulation of the theory, the existence of a primary constraint, which generates a secondary constraint, thus eliminating the Ostrogradsky ghost. For $n>1$, we show that, in addition to the degeneracy of the kinetic matrix, one needs to impose extra conditions to ensure the presence of a sufficient number of secondary constraints that can eliminate all the Ostrogradsky ghosts. When these conditions that ensure the disappearance of the Ostrogradsky instability are satisfied, we show that the Euler-Lagrange equations, which involve a priori higher order derivatives, can be reduced to a second order system.

In the context of classical mechanics, we study the conditions under which higher-order derivative theories can evade the so-called Ostrogradsky instability. More precisely, we consider general Lagrangians with second order time derivatives, of the form L(φ a ,φ a , φ a ;q i , q i ) with a = 1, · · · , n and i = 1, · · · , m. For n = 1, assuming that the q i 's form a nondegenerate subsystem, we confirm that the degeneracy of the kinetic matrix eliminates the Ostrogradsky instability. The degeneracy implies, in the Hamiltonian formulation of the theory, the existence of a primary constraint, which generates a secondary constraint, thus eliminating the Ostrogradsky ghost. For n > 1, we show that, in addition to the degeneracy of the kinetic matrix, one needs to impose extra conditions to ensure the presence of a sufficient number of secondary constraints that can eliminate all the Ostrogradsky ghosts. When these conditions that ensure the disappearance of the Ostrogradsky instability are satisfied, we show that the Euler-Lagrange equations, which involve a priori higher order derivatives, can be reduced to a second order system.

I. INTRODUCTION
While present observations are compatible with general relativity with a cosmological constant, it is of interest to explore alternative theories as they could provide a more fundamental description of present data or better account for future observations. Among these alternative theories, special attention has been devoted to Horndeski theory [1], or generalized Galileon theory [2][3][4][5][6], defined by the most general scalar-tensor Lagrangian that yields second-order Euler-Lagrange equations of motion. Recently it has been pointed out that one can find healthy extensions of Horndeski theories [7,8], whose Euler-Lagrange equations involve higher order derivatives (see also [9] for an earlier example of theory "beyond Horndeski" ).
To construct a sensible theory with higher order derivatives, one needs to avoid the presence of additional degrees of freedom (DOF) causing an instability due to the linear dependence of the Hamiltonian on momenta, known as the Ostrogradsky instability [10][11][12]. This instability is inevitable for nondegenerate Lagrangians, unless one introduces "by hand" additional constraints in order to reduce the phase space [13]. Otherwise, one must turn to degenerate Lagrangians to find viable theories. Particularly interesting are Lagrangians whose degeneracy is due to the coupling between a special variable, by which we mean a variable associated with higher order derivatives in the Lagrangian, and regular variables [14]. The degeneracy implies the existence of a primary constraint and of an associated secondary constraint, which reduce the effective dimension of phase space and thus eliminate the extra DOF at the source of the Ostrogradsky instability. This can be seen explicitly with the Hamiltonian analysis which has been performed recently [15] for quadratic *1 degenerate higher order scalar tensor (DHOST) theories introduced in [14] (see also [16][17][18] for subsequent works using the same approach).
Given these results, it is worth investigating how, for more general Lagrangians, the degeneracy of the kinetic matrix is related to the elimination of the Ostrogradsky ghosts. In contrast to naive expectations, maximal degeneracy of the kinetic matrix, i.e. of order n when n > 1 special variables are present, is not sufficient to eliminate multiple Ostrogradsky ghosts. Indeed, it was found in [19] that there exist (multi-)degenerate theories involving multiple special variables which still suffer from Ostrogradsky instability as their Hamiltonian depends linearly on some momenta.
One of the main goals of this paper is to present, for systems with multiple special variables, a set of extra conditions, in addition to the multi-degeneracy, leading to the elimination of all Ostrogradsky ghosts. For pedagogical reasons, we consider Lagrangians that contain one special variable, then several special variables, coupled to one or several regular variables. In each case, we analyse these theories both from the Lagrangian and Hamiltonian points of view. In particular, the Hamiltonian analysis enables us to show that, while the primary constraints are directly related to the degeneracy of the Lagrangian, the elimination of the Ostrogradsky ghosts requires the presence of secondary constraints. When several primary constraints are present, the number of associated secondary constraints can be lower. To eliminate all unwanted DOF associated with the linear instabilities of the Hamiltonian, one needs as many secondary constraints as primary ones, which requires some additional conditions. We explicitly write down how these extra conditions are expressed in the Lagrangian formulation. We also demonstrate how to reduce the Euler-Lagrange equations involving higher order derivatives into a second order system.
The organization of the paper is as follows. In Sec. II, we consider Lagrangians L(φ,φ, φ;q, q) that depend on two variables: φ(t) with at most second order derivative, and q(t) with at most first order derivative (throughout the paper, q denotes a "regular" variable while φ corresponds to a "special" variable). We explain how the Ostrogradsky ghost is eliminated by the constraints in the Hamiltonian formulation, and we also show that the Euler-Lagrange equations can be rewritten as a second-order system. In Sec. III, we consider a Lagrangian L(φ,φ, φ;q i , q i ) with multiple regular variables q i and generalize the analysis of the previous section. After discussing the case of Lagrangians L(φ a ,φ a , φ a ), depending only on special variables, in Sec. IV, we consider in Sec. V the most general case of a Lagrangian L(φ a ,φ a , φ a ;q i , q i ), depending on multiple special variables φ a and multiple regular variables. In addition to the degeneracy condition, we impose extra conditions that guarantee the absence of the Ostrogradsky instability. We present the Lagrangian form of these additional conditions and show that they allow the Euler-Lagrange equations to be rewritten as a second-order system. Sec. VI is devoted to our conclusions.

II. LAGRANGIANS WITH SINGLE REGULAR AND SPECIAL VARIABLES
In this section, we consider a Lagrangian of the form which depends on two time-dependent variables φ(t) and q(t). The Lagrangian contains at most second order derivatives of φ whereas q appears at most with first order derivatives. In general, *1 i.e. whose action depends quadratically on the second derivatives of the scalar field.
theories of this type are known to exhibit an Ostrogradsky instability. More precisely, φ and q generically obey fourth order and second order equations of motion, respectively *2 , which require 6 initial conditions in total, corresponding to three physical DOF. One of these DOF is a ghost with an energy unbounded from below. Let us now derive the conditions to escape such an instability even when the Lagrangian features nontrivial second order derivatives (i.e. which cannot be eliminated by simply integrating by parts). We start with a Hamiltonian analysis and find necessary and sufficient conditions for the theory to be ghost free. To perform the Hamiltonian analysis, we consider the following equivalent Lagrangians and where the Q's are auxiliary variables and the λ's are Lagrange multipliers whose associated equations of motion impose that the Q's are fixed in terms ofq,φ andφ. The two forms are obviously equivalent but they possess different advantages for the Hamiltonian analysis. First, in Sec. II A-II C, we investigate the form (2.2), in which the canonical momenta capture the structure of the highest derivatives in the Lagrangian. This form is useful to understand the physical meaning of the degeneracy of a theory in terms of additional primary constraints between the momenta. Next, in Sec. II D, we consider the form (2.3), which is easier to generalize to a Lagrangian with an arbitrary number of variables or of derivatives, by introducing enough auxiliary variables and Lagrange multipliers so that the final Lagrangian is of the form (2.3) where the velocity terms only appear linearly. Then, in Sec. II E, we write the Euler-Lagrange equations of motion which are a priori higher order. As expected, we show that, when the theory satisfies the degeneracy condition, the equations of motion can be reduced to a second order system. We provide several specific examples of healthy degenerate Lagrangians in Sec. II F.

A. Hamiltonian analysis
Starting from the Lagrangian (2.2), which depends on four variables, we introduce the four canonical momenta P , p, π and ρ, associated with Q, q, φ and λ, respectively. The (only nonvanishing) elementary Poisson brackets are thus defined by We thus have two primary constraints whose Poisson bracket is nonvanishing: {Φ, Ψ} = −1.
*2 The equation of motion for φ could involve also third derivative of q. Such a third derivative can be eliminated making use of the equation of motion for q. Thus the dynamics is described by a system which is at most second order in q and can be up to fourth order in φ.
When one can invert (at least locally in the vicinity of any point in phase space) the first two expressions in (2.5) to obtainQ andq in terms of the momenta, then there is no further primary constraint. Considering infinitesimal variations of the momenta with respect toQ andq, we can write where the matrix K, which we will call the kinetic matrix, is given by It is possible to invert (2.7) if and only if K is nondegenerate, i.e. det K = 0. Taking into account the primary constraints (2.6), the Hamiltonian can be written as where the velocitiesQ andq are expressed in terms of the momenta so that H depends only on the conjugate variables (2.4). For the nondegenerate case, (2.6) are the only primary constraints and the total Hamiltonian is given by where µ and ν are Lagrange multipliers. Requiring stability under time evolution (with respect to the total Hamiltonian) of the primary constraints leads to fixing the Lagrange multipliers to µ = −{Ψ, H} = 0 and ν = {Φ, H}. As a consequence, there are no secondary constraints. Therefore, we have 2 second class primary constraints which eliminate 2 initial conditions, and we end up with (8 − 2)/2 = 3 DOF, one of which being ghost-like. Indeed, one sees immediately that H is linear in π which shows that, without extra constraints, the theory features an instability. This is an illustration of the wellknown Ostrogradsky instability.

B. Additional primary constraint
The only hope to eliminate such an instability is the existence of an additional primary constraint. Thus, we will assume, from now on, that the momenta P and p are not independent variables but, instead, satisfy a relation R(P, p; Q, φ, q) = 0. In general, such a relation defines implicitly P in terms of p (or the reverse) and it is not always possible to express uniquely and globally P as a function of p (or the reverse). However, locally, it is always possible to write either P = F (p, Q, φ, q) or p = G(P, Q, φ, q). In the first case, the theory admits the additional primary constraint whereas in the second case, the additional primary constraint is As long as the analysis is local in phase space, (2.11) and (2.12) are equivalent, except if F (resp. G) does not depend explicitly on p (resp. P ) in some open set of the phase space. Thus there exists an independent case with the two unrelated primary constraint where f and g depend on the coordinates only and not on the momenta. Let us investigate the Hamiltonian structure with, say, the primary constraint (2.11), in addition to the two primary constraints (2.6). The total Hamiltonian is now given by H T = H(P, p, π, Q, q, φ) + µΦ + νΨ + ξΞ , (2.14) where ξ is a new Lagrange multiplier. Using the Poisson bracket {Φ, Ξ} = F φ , the invariance under time evolution of the 3 primary constraints giveṡ The first two equations enable us to fix the two Lagrange multipliers µ and ν. Since µ is required to vanish, the third equation implies Θ ≡ {Ξ, H} ≈ 0. A direct computation shows that Θ is given by where H 0 = H − πQ has been defined in (2.9). A more explicit expression of Θ is given in Appendix A. The condition Θ ≈ 0 provides a new constraint, independent of the previous ones, which determines π in terms of the other phase space variables. An important consequence is that one can get rid of the linear dependence of the Hamiltonian H on π, which signals that the Ostrogradsky instability is not present. Note however that the Hamiltonian could still be unbounded from below, but for other reasons. Let us continue our Hamiltonian analysis by requiring the time invariance of Θ: where we have set µ ≈ 0. For the generic case where ∆ ≡ {Θ, Ξ} = 0, the above equation fixes ξ and we have thus determined all Lagrange multipliers. In this case, the theory admits 4 constraints denoted generically χ i ∈ (Φ, Ψ, Ξ, Θ) for i = 1, · · · , 4. The Dirac matrix whose entries D ij = {χ i , χ j } are the Poisson brackets between the constraints is invertible as | det{χ i , χ j }| = ∆ 2 . Thus the constraints are all second-class constraints and we end up with (8 − 4)/2 = 2 DOF. In phase space, these DOF are described by the pairs (φ, Q) and (q, p), as the momenta P and π have been eliminated by solving explicitly the constraints Ξ ≈ 0 and Θ ≈ 0. In the special case ∆ = 0, the conclusions are different and the theory possesses fewer than 2 physical DOF. In fact, two different scenarios can be encountered, depending on whether or not there exists a tertiary constraint. A tertiary constraint arises when Γ ≡ {Θ, H} does not vanish automatically and one needs to impose it as a new constraint Γ ≈ 0. One then has to continue the procedure and check whetherΓ ≈ 0 generates further constraints. Whatever the conclusion of the constraints analysis is, we are left at the end with strictly less than 2 DOF. In the second type of scenario, Γ automatically vanishes and we are thus left with the four constraints χ i ≈ 0. Since the skew-symmetric Dirac matrix D is degenerate and contains the nonzero entry {Φ, Ψ} = −1, one infers that it is of rank 2, which means that one can identify two first-class constraints among the four constraints. As a consequence, we end up with only (8 − 2 × 2 − 2)/2 = 1 DOF in that case.
The Hamiltonian analysis of a theory with a primary constraint of the type (2.12) can be performed exactly in the same way. The conclusions are strictly similar and we end up generically with 2 DOF corresponding to the case ∆ = 0. As for the case (2.13), the analysis is a bit different, as we start with the two primary constraintsΞ andΠ. The total Hamiltonian is then of the form where we have introduced the two Lagrange multipliers ξ and ζ. Time invariance of these constraints fixes ξ and ζ, provided∆ ≡ {Ξ,Π} = Lq Q − L qQ = 0. In this generic situation, we close the canonical analysis with 4 constraintsχ i = (Φ, Ψ,Ξ,Π) and a Dirac matrix which is invertible, since | det{χ i ,χ j }| =∆ 2 . We conclude that all the constraints are second class and the system contains 2 DOF. In the special situation where∆ = 0, we may have more constraints or some of the constraints may become first class. In both cases, the theory possesses 1 or zero DOF. We conclude that an additional primary constraint leads to the elimination of the unwanted ghost-like DOF.

C. Degenerate Lagrangians
In the previous subsection, we have assumed the existence of explicit relations between the momenta, of the form (2.11), (2.12) or (2.13), which are valid locally. A more intrinsic characterization of the corresponding Lagrangians is that their kinetic matrix, defined in (2.8), is degenerate.
It is immediate to check that each of the conditions (2.11)-(2.13) implies the degeneracy of the kinetic matrix. Indeed, in the case (2.11) for instance, we have the relations which implies immediately that the determinant of the kinetic matrix vanishes: For the case (2.12), the same result holds with the replacements q ↔ Q and F → G. Finally, in the case (2.13), the full kinetic matrix vanishes K = 0, not only its determinant.
Conversely, let us now show that det K = 0 implies the existence of a primary constraint of the form (2.11) or (2.12), or a set of two primary constraints (2.13). First, let us consider the Lagrangians for which According to the implicit functions theorem, one can find locally (in the vicinity of any point in phase space) a function ϕ such thatq = ϕ(p,Q, Q, q, φ). (2.23) Consequently, the momentum P which depends a priori on the two velocities (q,Q) and on the coordinates (Q, q, φ) can locally be expressed as a function P = F (p,Q, Q, q, φ) replacingq by ϕ. Furthermore, the degeneracy of K implies ∂F/∂Q| p = 0. Indeed, if ∂F/∂Q| p = 0, one could invoke the implicit functions theorem again and deduce thatQ can be expressed in terms of the momenta (P, p) and the coordinates, which is in contradiction with the degeneracy of K. We thus conclude which corresponds precisely to the primary constraint (2.11). To summarize, det K = 0 together with Lqq = 0 implies that there exists a function F (p, Q, q, φ) such that P = F (p, Q, q, φ). If LQQ = 0, a very similar analysis enables us to conclude that there exists now a function G(P, Q, q, φ) such that p = G(P, Q, q, φ) and we recover the primary constraint (2.12). Note that when ∂F/∂p = 0, then necessarily ∂G/∂P = 0 and the two constraints are locally equivalent. These first two cases apply to degenerate kinetic matrix K which admits only one vanishing eigenvalue.
To complete the proof, one must finally consider the cases for which Lqq = LQQ = 0. Since the matrix K is degenerate, this implies that K in fact vanishes. It is then straightforward to show that there exist two functions f (Q, q, φ) and g(Q, q, φ) such that the constraints (2.13) hold. A more explicit proof of this property is given in the Appendix B without referring to the abstract implicit functions theorem. We can derive the relations between the functions F , G and the initial Lagrangian L via this explicit proof.
In summary, we conclude that the condition det K = 0 is equivalent to the existence of primary constraints restricting the momenta. Depending on the dimension (one or two) of the kernel of K, the theory admits one or two primary constraints. It amounts to the case (2.11) for Lqq = 0, the case (2.12) for LQQ = 0, and the case (2.13) for LQQ = Lqq = 0. As we said previously, the constraints (2.11) and (2.12) are equivalent when ∂F/∂p = 0 or ∂G/∂P = 0. In practice, one can check whether a given Lagrangian (2.2) is (Ostrogradsky) ghost-free by using the degeneracy condition det K = 0. Then one can see whether it has 2 DOF or less by checking ∆ = 0 or∆ = 0.

D. Alternative Hamiltonian analysis
For completeness, we now perform the Hamiltonian analysis of the Lagrangian (2.3) which is equivalent to (2.2). Starting with such a formulation has disadvantages. First the canonical analysis involves more constraints and thus it could be a priori more complicated than the analysis of (2.2). Second this formulation is more difficult to generalize and to adapt to field theories, including scalar-tensor theories. However, there are important benefits by considering (2.3) in the context of this article. As we will see, the total Hamiltonian is explicitly defined as a function of the phase space variables, and thus there is no need to resort to a local analysis to write the Hamiltonian and the constraints. Another benefit is that we can always reduce any Lagrangian with arbitrary higher derivatives to the form (2.3) where the velocity terms only appear linearly. Let us start with (2.3). The form of the Lagrangian implies that there are initially 8 pairs of conjugate variables It is immediate to see that we have the following 8 primary constraints Contrary to the previous subsection, the Hamiltonian and the total Hamiltonian are now defined globally and, after simple calculations, one obtains
To pursue the canonical analysis, we compute the time evolution of the constraints and impose their conservation. The simple property implies immediately that time conservation of the six constraints Φ i ≈ 0 and ρ i ≈ 0 fix the Lagrange multipliers µ i and ν i . Thus, these primary constraints do not generate secondary constraints. This is not the case for P 2 ≈ 0 and P 3 ≈ 0. Indeed, computing their time derivatives, we obtain two secondary constraints: These constraints are easily interpreted. They simply mean that the momentum P 1 ≈ λ 2 conjugate to Q 1 =φ is ∂L/∂Q 1 and the momentum p ≈ λ 3 conjugate to q is ∂L/∂q, as expected. We continue the analysis by computing the time evolution of these two secondary constraints and we obtain the two conditionṡ . We note that the kinetic matrix K naturally arises here when one identifies Q 2 toQ =φ and Q 3 toq as it should be. As a consequence, the two previous conditions can be reformulated as follows The end of the analysis depends on the rank of the matrix K.
If K is invertible, the system of equations fixes the Lagrange multipliers ξ 2 and ξ 3 and there is no further constraint. It is easy to check that all the constraints are second class. As a consequence, we end up with 10 second class constraints for 8 initial pairs of conjugate variables. This leads to (16 − 10)/2 = 3 DOF, which include the Ostrogradsky ghost.
If the kernel of K is one-dimensional, in the direction (u 2 , u 3 ), one obtains the tertiary constraint where u 2 and u 3 are functions of (Q i , q, φ). This constraint is the analog of (2.11) or (2.12) in the previous analysis. Requiring time invariance of this constraint generically gives one additional constraint, which leads to a total of 2 DOF. Finally, when K vanishes, (2.35) implies two constraints which are the analog of (2.13) in the previous analysis. The discussion of this case is similar to that of (2.13) and we end up in general with 2 DOF (or less).
In conclusion, we have checked that the two analyses starting from the Lagrangians (2.2) or (2.3) are equivalent.

E. Euler-Lagrange equations
We now proceed to study the equations of motion in presence of either of the primary constraints (2.11)-(2.13). For a general Lagrangian of the form (2.1), the Euler-Lagrange equations read Due to the dependence of L onφ, the equation of motion for q (2.39) in general involves the third derivative of φ. As for the equation of motion for φ (2.38), it involves the fourth derivative of φ and the third derivative of q.
When the theory is degenerate, the equations of motion can be reformulated as a second order system, as we now show. In order to make the correspondence with the Hamiltonian analysis clearer, we first replace (2.38) and (2.39) by the equivalent Euler-Lagrange equations derived from the alternative Lagrangian (2.2): Let us concentrate on the first two equations which can easily be rewritten in a more explicit way as As the kinetic matrix K is degenerate, it possesses a null vector. Let us assume that Lqq = 0 which corresponds to the case (2.11). Then, as shown in (B2) and (B3), K admits the null vector (1, −LqQ/Lqq), which is a function of (Q, Q, φ,q, q). As a consequence, (2.41) is equivalent to the following two equations: Note that the first of these equations does not contain second derivatives and determines the variable λ. Since λ = π, the first equation of (2.42) can be seen as the Lagrangian version of the secondary constraint (2.16), which we obtained in the Hamiltonian analysis. The equations of motion for φ and q are provided by the second equation in (2.42) and L φ =λ, where λ is replaced by its expression in (2.42). To reduce these two equations to a second order system, we need to use explicitly the constraint (2.11), which can be written as LQ = F (p, Q, q, φ) with p = Lq. The derivatives of this constraint yield the following useful relations: From (2.40) one can then express λ in terms of F as follows Using the above relations, one finds Thus, the equation of motion for φ, i.e. L φ =λ, takes the form where w depends only on (φ,φ, φ;q, q). When Lq Q = LQ q , the equation of motion for φ is w = 0: it is second order in φ and does not depend onq. When Lq Q = LQ q , one can combine (2.47) with the equation of motion for q in (2.42), which can be written as to obtain an equation of motion for φ of the form where E can be computed explicitly, although its expression is not simple in general. As a consequence, the equation for φ is always a second order equation which involves at most the first derivative of q. Computing the time derivative of this equation enables us to obtain generically (when ∂E/∂φ does not vanish) ... φ in terms of up to second derivatives of q and φ. Substituting this last relation in the second equation of (2.42) with Q =φ leads to a second order equation for q as well. This proves that the equations of motion can be recast as a second order system. One can deal with the case (2.12) with an analogous procedure and reach the same conclusions.
The remaining case (2.13) is simpler to analyze. Indeed, it is obvious that the fourth-order derivatives of φ and third-order derivatives of q do not appear in the equation of motion (2.38) for φ. Moreover, the terms with ... φ cancel as Lφφ = fφ. Since the equation of motion (2.39) for q in this case involves only up to second order derivatives, one thus concludes that the Euler-Lagrange equations form directly a second order system.
In conclusion, degenerate Lagrangians of the form (2.1) are such that their equations of motion can be reformulated as a system of second order equations for φ and q. This is consistent with the Hamiltonian analysis which shows that there is no extra degree of freedom in these theories. Nonetheless, it is worth stressing that the Euler-Lagrange equations derived from the Lagrangian in general do not give directly the "minimal" system of equations because they can involve up to fourth-order derivatives of φ, as we saw. Demanding the Euler-Lagrange equations to be second order is clearly not a necessary requirement in order to avoid the Ostrogradsky ghost.

F. Examples of degenerate theories
To illustrate our previous considerations, we now give some concrete examples of degenerate theories of the form (2.1).

Example 1: Linear primary constraint
One can construct degenerate Lagrangians by assuming that the function F appearing in the primary constraint (2.11) depends linearly on the momentum p, i.e. F (p, Q, φ, q) = a(Q, φ, q)p + b(Q, φ, q) . (2.51) In this case, it is easy to see that the corresponding Lagrangians are of the form where L 0 is arbitrary. This is a special case of the toy model considered in Sec. 4 of [20].

Example 2: Factorized Lagrangians
Another class of examples is given by Lagrangians, whose dependence onQ andq is factorized, i.e. of the form Such a Lagrangian leads to a primary constraint (2.11) with F (t) = at α , where α = 1 and a a nonvanishing function a(Q, φ, q), if the functions L 1 and L 2 satisfy the differential equations Assuming b/a > 0 for simplicity, one can write explicitly L 1 and L 2 as where c 1 and c 2 are functions of (Q, φ, q) only. Choosing for instance α = 2, c 1 = −b = −4a = 2, and c 2 = 0, we obtain the Lagrangian We note that the terms involving ... φ in the Euler-Lagrange equations vanish identically. However, when multiple variables of the type φ are considered, the Euler-Lagrange equations in general contain nonvanishing ... φ terms [19]. We will return to this point in Sec. IV.

III. LAGRANGIAN WITH MULTIPLE REGULAR VARIABLES AND SINGLE SPECIAL VARIABLE
We wish to extend our previous analysis to multiple variables. For pedagogical reasons, in Sec. III we start with theories that possess only one special variable φ along with multiple regular variables q i . In Sec. IV, we consider Lagrangians with multiple special variables only. In Sec. V, we finally study the full generalization with both multiple special and regular variables. In all cases, we assume that the regular subsystem, when present, is by itself nondegenerate, i.e. their momenta are all independent. Although there are a few subtleties with multiple variables, the analysis in this section is very similar to the simpler case studied in Sec. II. Under the assumption that the q i 's form a nondegenerate subsystem, the degeneracy of the kinetic matrix will be shown to be a necessary and sufficient condition for getting rid of the Ostrogradsky ghost. The analysis of this section generalizes the degeneracy condition for the quadratic toy model considered in [14] to general Lagrangians with a single special variable and multiple regular variables.
Let us consider a Lagrangian of the form As before, it is convenient, in particular for the Hamiltonian analysis, to use the equivalent Lagrangian which depends on (m + 3) variables. Out of (m + 3) variables, the Lagrange multiplier λ is clearly nondynamical and the corresponding DOF is automatically removed by the primary constraints as we shall see below. In general, the theory thus contains (m + 2) DOF. In order to eliminate another DOF, associated with the Ostrogradsky ghost, one needs additional constraints, which are provided by degenerate Lagrangians. In this case, one ends up with (m + 1) healthy DOF, which correspond to one DOF associated with the special variable φ and m DOF associated with the regular variables q i 's. In that respect, the problem is very similar to the simpler case studied in Sec. II.

A. Constraints
As usual, we introduce the pairs of conjugate variables The form of the Lagrangian (3.2) implies the existence of two primary constraints If there is no further primary constraint, we can proceed exactly as in Sec. II A. In this way, we find 2 second class constraints that reduce the (m + 3) initial DOF to (m + 2) DOF, one of which is the Ostrogradsky ghost.
To obtain (m + 1) healthy DOF, we need additional constraints, analogous to (2.11)-(2.13). These constraints must kill the ghost, but not a safe degree of freedom like one of the regular variables. To be certain that we will not eliminate one of the q i 's variables, we assume, as already emphasized in the introduction of this section, that the subsystem of regular variables is nondegenerate, i.e. their momenta are all independent. More precisely, we assume that the relation defining the momenta p i = ∂L/∂q i is invertible and then one can locally express the velocitiesq i in terms of the momenta p i (and of the remaining phase space variables). This requirement is equivalent to asking that the sub-kinetic matrix L ij defined by is non degenerate. A consequence of this hypothesis is that only the case (2.11) can be generalized to multiple regular variables. Thus, we look for Lagrangians giving a primary constraint of the type where F is an arbitrary function. This condition is equivalent to the degeneracy of the full (m + 1) dimensional kinetic matrix Since the determinant of K is given by where L ij L jk = δ i k , the degeneracy of K, together with det L ij = 0, implies To prove the equivalence between (3.6) and (3.9), one can use a strategy similar to that of Sec. II. First, it is easy to show that (3.9) follows from (3.6). Indeed, (3.6) implies LQ = F (L i , Q, q i , φ) which in turn implies To show the converse, one writes the momentum in the form where the velocitiesq i have been replaced by the momenta p i , which is always possible to do since L ij is invertible. If ∂F/∂Q| p i = 0, then one could express locallyQ in terms of the momenta, which would mean that the Legendre transform (Q,q i ) → (P, p i ) is invertible, in contradiction with the degeneracy of K. Therefore, F does not depend onQ and we obtain a primary constraint of the type (3.6). An alternative and more concrete proof of this equivalence is provided in Appendix B. The Hamiltonian analysis of the theory closely follows that of Sec. II and we will not reproduce it here. It can be easily checked thatΞ ≈ 0 generates a secondary constraint Θ ≈ 0. In general, there is no further constraint and one ends up with 4 second class constraints. As a consequence, the theory admits generically (m + 1) DOF and there is no Ostrogradsky ghost. In some particular cases, there may exist extra (tertiary) constraints and some of the constraints may be first class, as discussed in Sec. II. In such cases, the theory could possess only m degrees of freedom, still without Ostrogradsky ghost.

B. Euler-Lagrange equations
To show that the Euler-Lagrange equations in degenerate theories reduce to a second order system, we follow the same strategy as in Sec. II E. We first derive the equations of motion associated to the equivalent Lagrangian (3.2): To avoid confusion, we have returned in this section to the more explicit notation Lqi instead of L i for ∂L/∂q i . The first two equations can be reformulated as The kinetic matrix is degenerate in only one null direction defined by the vector (−1, u i ) with u i = L ij Lq jQ = ∂F/∂p i , as shown in (B8) and (B9). Thus projecting the previous system in this null direction allows us to fix λ to 14) The equations of motion for Q and q i are given by They involve a priori the third derivative of φ. To get rid of these higher derivatives we make use of the primary constraint LQ = F (p i , q i , Q, φ) with p i = Lqi. Furthermore, the expression of λ (3.14) simplifies to where we used relations similar to (2.43). As a consequence, the equation of motion for φ, i.e. L φ =λ, takes the form where w depends only on (φ,φ, φ;q i , q i ). One can combine (3.19) with the equation of motion for q i in (3.15), which can be written asq 20) to obtain an equation of motion for φ of the form where E can be computed explicitly, although its expression is not simple in general. Note that the coefficient forQ = ... φ vanishes identically. We conclude that the equation for φ is always second order, and involves at most first derivatives of the q i . Following the same reasoning as in the previous section, taking a time derivative of E allows us to write down ... φ as a function of terms up to second derivatives. Substituting this expression of ... φ into the first equation of (3.15), we obtain second order equations for all the q i 's variables. Thus the degeneracy condition, with L ij invertible, implies that the equations of motions can be written as a second order system.

IV. LAGRANGIAN WITH ONLY SPECIAL VARIABLES
Before going to the general analysis for Lagrangians with arbitrary numbers of regular and special variables in Sec. V, we discuss in this section the particular case of Lagrangians that depend only on special variables. As pointed out in [19], there is a qualitative difference when we consider multiple special variables. For L(φ a ,φ a , φ a ) with a = 1, · · · , n, the Euler-Lagrange equations are in general fourth order, If the matrix ∂ 2 L/∂φ a ∂φ b is nondegenerate, one can multiply the above system by its inverse matrix to obtain n fourth order EOMs of the form .... φ a = (lower derivatives) , which require 4n initial conditions. In other words, we have 2n DOF and half of them are Ostrogradsky ghosts, associated with a linear dependence of the Hamiltonian on their canonical momenta.
If some of the eigenvalues of the matrix ∂ 2 L/∂φ a ∂φ b vanish, one can take particular linear combinations of EOMs to eliminate some fourth order derivatives. Let us now consider the maximally degenerate case for which In that situation, the Lagrangian takes necessarily the form where f a and g are (N + 1) arbitrary functions of the fields φ b and their velocitiesφ b . The highest derivative terms in the EOMs are then third order: If det E = 0, the system is essentially third order and cannot be reduced to a lower order system. One thus needs to specify 3n initial conditions and the system still suffers from the Ostrogradsky instability [19]. This is a simple illustration of the fact that the degeneracy is not a sufficient condition for eliminating the Ostrogradsky ghost when several special variables are present.
To circumvent this problem, a sufficient condition is to require With the conditions (4.3) and (4.6), the Euler-Lagrange equations for the Lagrangian L(φ a ,φ a , φ a ) are second order and only 2n initial conditions are needed, i.e. only n DOF are present. This can be seen immediately from the fact that (4.6) implies the existence of a function F (φ a , φ a ) such that f a = ∂F/∂φ a , hence As a consequence, the second order derivatives are removed from the Lagrangian. To summarize, the first condition (4.3) is the usual degeneracy condition and eliminates the fourth order derivative terms in EOMs. The second condition (4.6) eliminates the third order derivative terms in EOMs. As one can see from its anti-symmetric nature, the second condition (4.6) only applies when several special variables are present, which is consistent with Example 3 in Sec. II F. It is straightforward to extend this discussion to Lagrangians of the form L(φ a(N ) , · · · ,φ a , φ a ), with derivatives of arbitrary order N . The equations of motion are then of order 2N , unless the matrix ∂ 2 L/∂φ a(N ) ∂φ b(N ) is degenerate. If this matrix vanishes, the EOMs become of order (2N − 1) in general and the system still suffers from the Ostrogradsky instability. One needs extra conditions similar to (4.6) to get rid of the Ostrogradsky ghosts [19].

V. LAGRANGIAN WITH MULTIPLE REGULAR AND SPECIAL VARIABLES
In this section, we consider the general case of Lagrangians containing both multiple special variables φ a and multiple regular variables q i , L(φ a ,φ a , φ a ;q i , q i ) (a = 1, · · · , n; i = 1, · · · , m). (5.1) As in Secs. II and III, we assume that the regular subsystem is by itself nondegenerate *3 . It is also convenient to use the equivalent Lagrangian where the Lagrange multipliers λ a can be treated as new variables. In general, the Lagrangian (5.1), or equivalently (5.2), describes (2n + m) DOF, each special variable being associated to 2 DOF. Our goal will be to identify a subclass of Lagrangians that are free of Ostrogradsky ghosts, which implies that they should contain at most (n + m) DOF.

A. Hamiltonian analysis
Canonical variables are defined by the following nontrivial Poisson brackets The Lagrangian induces two sets of n primary constraints which can be used to eliminate the extra-variables λ a together with their momenta ρ a . If there are no other primary constraints, one can follow the procedure already discussed in Secs. II and III, and one ends up with (2n + m) DOF, among which n are Ostrogradsky ghosts In order to eliminate the Ostrogradsky ghosts, we now assume, generalizing the constraint (3.6) for a single special variable discussed in Sec. III, that there exist n primary constraints of the form The total Hamiltonian is then given by H T = H + µ a Φ a + ν a Ψ a + ξ a Ξ a with H = P aQ a + ρ aλ a + π aφ a + p iq i − L (1) eq , (5.6) *3 It is of course possible to consider systems where the variables q i are also degenerate. The present analysis is straightforward to extend although it would be more involved in practice.
where µ a , ν a and ξ a are Lagrange multipliers. Requiring the time invariance of the primary constraints Φ a and Ψ a , using {Ψ a , Φ b } = δ ab , fixes the Lagrange multipliers µ a and ν a , in particular µ a = 0. And time invariance of the remaining primary constraints Ξ a leads to the following n conditionsΞ The status of this set of conditions depends on the n-dimensional matrix M whose entries are M ab ≡ {Ξ a , Ξ b }. If M is invertible, all the Lagrange multipliers ξ a are determined and there are no secondary constraints. In this case, the system does not have sufficient number of constraints to eliminate the ghost DOF.
In order to get secondary constraints, M must be degenerate. The simplest scenario to get rid of all the Ostrogradsky ghosts is to require that the whole matrix M vanishes *4 In that case, (5.7) implies the existence of n secondary constraints These constraints fix all the momenta π a in terms of the p i and of the canonical coordinates. Since Ξ a does not contain π a , the set of secondary constraints Θ a is independent of the set Ξ a . Now, these constraints are sufficient to eliminate all the ghost-like DOF. If in addition the matrix ∆ with entries ∆ ab = {Θ a , Ξ b } is invertible, then the primary and secondary constraints are all second class and we end up with exactly (n + m) DOF as required. If det ∆ = 0, then there may be tertiary constraints or there might be first class constraints in the theory. Thus, Lagrangians with degenerate ∆ have fewer than (n+m) DOF and none of them is an Ostrogradsky ghost. In conclusion, the conditions (5.5) and (5.8) are sufficient to define ghost-free higher derivative Lagrangians with multiple special variables.

B. Conditions for the Lagrangian to evade the Ostrogradsky instability
In analogy with the results of the previous sections, one can show that the condition (5.5) is equivalent to the degeneracy of the (n + m)-dimensional kinetic matrix where we use the notations More precisely, the degeneracy must be of order n, i.e. dim(Ker K) = n, which can be expressed by the conditions L ab − L ai L ij L jb = 0 . Indeed, the condition dim(Ker K) = n is equivalent to the existence of n eigenvectors (v b α , v i α ) for α ∈ {1, · · · , n} such that where we have used the property that L ij is invertible. Since the v b α form a family of n independent n-dimensional vectors, we conclude that L ab −L ai L ij L jb = 0. Conversely, if L ab −L ai L ij L jb = 0, one can easily construct at least n null-vectors of K, with their components satisfying v i α = −L ij L jb v b α . This, together with the invertibility of L ij , implies dim(Ker K) = n.
Let us now show the equivalence between (5.5) and (5.12). It is immediate to see that (5.5) implies (5.12) by writing which directly follows from (5.5). The converse is proved in a way similar to previous sections. As L ij is invertible, one can write any momentum P a as a function P a = F a (Q b , p i , Q, q, φ). If there exists a pair (a, b) such that ∂F a /∂Q b | p i = 0 then one sees immediately that L ab − L ai L ij L jb = ∂F a /∂Q b | p i = 0. Thus the functions F a do not depend on the velocitiesQ b . A more explicit proof is provided in Appendix B.
Finally, let us examine the consequences of the conditions (5.8) for the Lagrangian. Taking derivatives of (5.5) with respect to Q b and q i with the use of (B19), we obtain Plugging these expressions together with (B19) into (5.8) yields the conditions where we have explicitly written some second derivatives of L with respect to velocities to avoid confusion. The converse is also true. Note that the above conditions reduce to (4.6) in the absence of regular variables.
In conclusion, any Lagrangian of the form (5.1) which satisfies the relations (5.12) and (5.16) is free of Ostrogradsky ghosts. These conditions have a clear interpretation from the Hamiltonian point of view: they ensure the existence of primary and secondary second class constraints which enable one to get rid of the Ostrogradsky ghosts.

C. Euler-Lagrange equations
We conclude our study of multi-variable Lagrangians by showing that the equations of motion can be written as a second order system. We follow the same method as in previous simpler cases starting from the equivalent formulation (5.2) of Lagrangian. Euler-Lagrange equations can be written as (5.17) where K is the kinetic matrix (5.10) and (V a , v i ) is given by which is written down in terms of up to the second order derivatives of q and φ. As previously, n among these equations fix the Lagrange multipliers λ a and they correspond to the secondary constraints Φ a in the Hamiltonian analysis. The equations of motion for φ a and q i take the form where λ a is replaced by its expression To go further, we first make use of the primary constraints LQ a = F a (p i , q i ; Q b , φ b ) with p i = Lqi. Using these constraints, a straightforward calculation shows that the terms proportional toQ b and q i in the equation of motion for φ a are given by The equations of motion (5.19) then read where R a depends only on (φ b ,φ b , φ b ;q j ,q j ). After substituting (5.23) into (5.22), an immediate calculation shows that the coefficients of theQ b in the resulting equations are given by We recognize in the r.h.s. the Poisson brackets {Ξ a , Ξ b } between the secondary constraints Ξ a . These coefficients are in general nonvanishing, in contrast to the previous cases where the coefficient forQ vanishes identically (see (2.49) or (3.21)). This illustrates the role of the extra conditions (5.8) at the level of the equations of motion. Imposing them ensures that (5.24) vanishes and that thë Q b = ... φ b terms can be removed from the equations of motion for the φ a . We thus obtain Following the same idea as in the previous cases, and taking a time derivative of E a , we can write down ... φ a in terms of up to second derivatives. Plugging it into (5.23), we obtain a set of second order equations of motion for q i 's. This concludes our analysis.
In this work, we have investigated in which circumstances a classical mechanics Lagrangian containing higher order derivatives can escape the generic Ostrogradsky instability. We have shown that there is a qualitative difference between Lagrangians that contain only one special variable and those with multiple special variables.
In the first case, the degeneracy of the kinetic matrix is a necessary and sufficient condition (under the assumption that the regular variables q i form a nondegenerate subsystem) to evade the Ostrogradsky instability. The degeneracy of the kinetic matrix is associated with the existence of a primary constraint in phase space, whose time invariance implies a secondary constraint. Both constraints eliminate the would-be Ostrogradsky ghost. This result holds for any number of regular variables and the degeneracy is expressed by simple conditions on the second derivatives of the Lagrangian (see Eq. (3.9)).
By contrast, when n(> 1) special variables are present, the degeneracy, of order n, of the kinetic matrix (expressed by the conditions (5.12)) is not sufficient to eliminate the n Ostrogradsky ghosts that are present in general. The reason is that the degeneracy of order n induces n primary constraints, but requiring the time invariance of these constraints does not necessarily generate n secondary constraints. Therefore, the degeneracy condition is not sufficient in general to get rid of the Ostrogradsky instability. This can however be achieved by imposing additional conditions, such as the vanishing of all Poisson brackets between the primary constraints, which leads to the presence of n secondary constraints. In the Lagrangian formulation, these conditions can be expressed as antisymmetric relations between the second derivatives of the Lagrangian with respect to the second or first order time derivatives of the various variables (see Eq. (5.16)).
In all cases, we showed how the higher order Euler-Lagrange equations can be rewritten as a second-order system. We also provided some specific examples of ghost-free Lagrangian (see Sec. II F). Although our results apply to Lagrangians describing point particles, we believe that the conditions obtained in this paper could be quite useful to construct ghost-free field theories involving for example several scalar fields and other fields such as the gravitational metric. It would thus be interesting to extend the present analysis to field theories, a task which we leave for a future work.
Even if velocitiesQ andq seem to enter in this expression, it is simple to show that Θ is a function of the phase space variables only. Now, we provide how to obtain ∆ given in (A12) expressed by derivatives of Lagrangian. First, it is straightforward to write down In order to proceed further, we need to know how Θ changes under the infinitesimal variation of the canonical variables. To this end, let us perturb (A1). The result is given by Picking up velocity variation part only, we have Using the primary constraint (2.11) written in the Language of the Lagrangian formalism, LQ = F (Lq, Q, q, φ), and definition of the conjugate momenta, (A4) becomes where we used (B5) and Lqq = 0. As it should be from the fact that Θ is a function of the canonical variables, δΘ has been finally expressed as a linear combination of the infinitesimal variation of the canonical variables. Then, we find Lqq .
It is appropriate to make one remark here. Although Θ is a function of the canonical variables, its specification is not unique in the sense that there is ambiguity of expressing Θ in terms of the canonical variables due to the constraint Ξ ≈ 0. For instance, it is always possible to replace all P ′ s appearing in Θ by other variables by using P = F (p, Q, q, φ). By the same token, it is equally allowed to partially keep P in Θ. This ambiguity amounts to adding αδΞ to δΘ where α is an arbitrary function of the canonical variables. Indeed, we can derive the following relation; where α = {Ξ, α ′ }. This shows that adding αδΞ is equivalent to replace P in H by F (p, Q, q, φ) by some amount controlled by α ′ . What remains is to express the derivatives of F in (A2) and (A6) in terms of derivatives of Lagrangian. For the sake of clarity, let us write the primary constraint as Taking the first derivative we obtain and the second derivative yields In a similar way, we obtain Lqq .

Appendix B: Degeneracy of kinetic matrix and primary constraints
This Appendix is devoted to showing more explicitly that the degeneracy of the kinetic matrix leads to the existence of primary constraints (see Secs. II C, III A, and V B). We study the cases with single regular and special variables, multiple regular variables and single special variable, and multiple regular and special variables.

Single regular and special variables
We provide an alternative and more concrete proof of det K = 0, where K is defined in (2.8), leads to one of the three additional primary conditions (2.11), (2.12) or (2.13). For that purpose, we start writing the degenerate kinetic matrix as follows Its degeneracy implies that one or two of its eigenvalues are vanishing. Furthermore, K is a real symmetric matrix and thus is diagonalizable. The explicit diagonalization depends on whether c and a are vanishing or not. First, if c ≡ Lqq = 0, K has one nonzero eigenvalue and can be diagonalized as where r ≡ b/c and Now, we are going to show that the degeneracy leads in this case to a constraint (2.11). Indeed, using this eigenbasis of K in (2.7) leads to −δP + rδp rδP + δp = 0 c(r 2 + 1)(rδQ + δq) .
We thus arrive at The function LqQ/Lqq is a priori a function of the velocitiesq andQ. From the Legendre transform, it can be viewed as a function of p andQ which in fact can be shown to depend only p (and Q, φ, q). Indeed, when one computes variations of LqQ/Lqq with respect to δq and δQ first and with respect to δp and δQ using (B5), one obtains As detK = 0, LqQ/Lqq is a function of p only. Thus, the first equation in (B5) gives the primary constraint (2.11) with F ′ (p) = LqQ/Lqq. The second equation of (B5) is discussed in (A5). Then, the case a ≡ LQQ = 0 in (B1) is treated in a way similar to the previous case, and leads to a primary constraint of the type (2.12). Finally, when K has two vanishing eigenvalues, necessarily K = 0, which leads immediately to constraints of the type (2.13).

Multiple regular variables and single special variable
We show that imposing the degeneracy condition (3.9) and det L ij = 0 to the kinetic matrix (3.7) leads to the existence of the primary constraint (3.6). Using (3.9) and defining u i ≡ L ij L jQ , we can write which amounts to (3.10). In fact, the (n + 1)-dimensional vector (−1, u i ) with u i = ∂F/∂p i is a null vector of K. We make use of this null vector to block-diagonalize K as follows where and an m×m matrix C = (uu T +1) 1/2 is the square root of (u i u j +δ ij ). As the kinetic matrix relates the infinitesimal variations as (δP, δp i ) T = K(δQ, δq j ) T , evaluating it in the block-diagonalized basis yields −δP + u T δp uδP + δp = 0 (uu T + 1)L(uδQ + δq) .
We thus arrive at δP − LQ i L ij δp j = 0, L ij LQ j δQ + δq i = L ij δp j , which is precisely a generalization of (B5) to the case with multiple regular variables. We can confirm that the infinitesimal variation of L ij LQ j with respect to δQ and δq i is given by Thus the first equation of (B11) gives the primary constraint (3.6) with ∂F/∂L i = L ij LQ j .

Multiple regular and special variables
Similarly to Appendix B 2, imposing the degeneracy condition (5.12) and det L ij = 0, the kinetic matrix (5.10) can be block-diagonalized as where A i a ≡ L ij L ja , k ij ≡ L ij to avoid confusion, and an n × n matrix B and an m × m matrix C are the square roots of A T A + 1 and AA T + 1, respectively: Since all the eigenvalues for A T A + 1 and AA T + 1 are positive, B and C are well-defined. Further, they are symmetric and have symmetric inverse matrices as their determinants are nonvanishing. Substituting the block-diagonalization (B13) into the relation (δP a , δp i ) T = K(δQ b , δq j ) T , we obtain −δP + A T δp AδP + δp = 0 (AA T + 1)k(AδQ + δq) .
We thus arrive at δP a − L ai L ij δp j = 0, L ij L aj δQ a + δq i = L ij δp j .
which is a generalization of (B5) or (B11). We can confirm that the infinitesimal variation of L ij L aj with respect to δQ and δq i is given by Thus the first equation of (B17) gives the primary constraint (5.5) with