{'fraction_non_alphanumeric': 0.06811372109512591, 'fraction_numerical': 0.010406898286864436, 'mean_word_length': 3.5242135761589406, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 56, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Variational reduction of Hamiltonian systems with general constraints

In the Hamiltonian formalism, and in the presence of a symmetry Lie group, a variational reduction procedure has already been developed for Hamiltonian systems without constraints. In this paper we present a procedure of the same kind, but for the entire class of the higher order constrained systems (HOCS), described in the Hamiltonian formalism. Last systems include the standard and generalized nonholonomic Hamiltonian systems as particular cases. When restricted to Hamiltonian systems without constraints, our procedure gives rise exactly to the so-called Hamilton-Poincar\'e equations, as expected. In order to illustrate the procedure, we study in detail the case in which both the configuration space of the system and the involved symmetry define a trivial principal bundle.


Introduction
If a dynamical system defined on a manifold M is invariant (in some sense) under the action of a Lie group G, occasionally such an invariance can be used to reduce the number, or at least the order, of the differential equations that one must solve to find its trajectories. More precisely, one can obtain, by using a certain procedure, a new dynamical system on the quotient manifold M/G such that: 1. the number of its equations of motion, the reduced equations, is smaller than the number of the original equations of motion or, at least, the order of some of the former is less than the order of the latter; 2. there exists another set of equations: the reconstruction equations, whose form does not depend on the system under consideration (but only on M , G and the action involved) and which together with the reduced equations are equivalent to the original ones. Thus, the symmetry, through a reduction procedure, helps us to integrate (at least partially) the equations of motion of the dynamical system originally given.
In some cases, in addition, a principal connection A : T M → g, where T M is the tangent bundle of M and g is the Lie algebra of G, can be constructed in order to simplify the description of the reduced and reconstruction equations.
Since the reconstruction equations do not depend (in essence) on the system, they are usually considered as a group theoretical problem. Thus, philosophically, the problem of finding the trajectories of the original system is considered solved when the solutions of the reduced equations are found. This is why, from now on, we shall concentrate mainly on the reduced equations only.
Reduction techniques have been developed by numerous authors in many different frameworks. In particular, Cendra, Marsden and Ratiu elaborated a reduction process for Lagrangian systems in Ref. [10] and for (standard) nonholonomic systems in Ref. [11]. For the case of generalized nonholonomic systems (GNHS) (see [2,6,8,20]), a similar process was developed in [5], and an extension to higher order constrained systems (HOCS) (see [7,8]) was presented in [18]. All of these reduction procedures were elaborated in the Lagrangian formalism and in terms of variational-like principles. The latter means that the original and the A word about notation. Throughout all of the paper, Q will denote a differentiable finite-dimensional manifold. The tangent and cotangent bundles of Q will be denoted as τ Q : T Q → Q and π Q : T * Q → Q, respectively. If M is another differentiable manifold and f : Q → M is a differentiable function, we denote by f * : T Q → T M and f * : T * M → T * Q the tangent map and its transpose, respectively. Given two fibrations E 1 → Q and E 2 → Q, we denote by E 1 × Q E 2 the fibered product of E 1 and E 2 over Q. If E 1 and E 2 are vector bundles, then E 1 × Q E 2 is also a vector bundle with respect to the natural component-wise linear structure. When such a structure is taking into account, the product bundle is called the Whitney sum of E 1 and E 2 , and will be denoted E 1 ⊕ E 2 or E 1 ⊕ Q E 2 .

Reduction of Hamiltonian GNHS
In this section we recall the definition of a generalized nonholonomic system (GNHS) in the Hamiltonian formalism, following References [6,20]. Then, given a Lie group G, we define the idea of G-invariance for such systems. Finally, for the G-invariant ones, we develop two different reduction procedures such that (both of them):

Hamiltonian GNHS with symmetry
Motivated by certain mechanical systems such as rubber wheels and servomechanisms, where d'Alembert principle is typically violated, it was defined and studied in Refs. [2,6,8,20] a class of constrained Lagrangian systems, called generalized nonholonomic system (GNHS), that include the above mentioned mechanical systems and encode, in our opinion, their main features. In the Hamiltonian framework, they can be defined as follows (see [6] and [20]). Consider a triple (H, D, V) with where H is a differentiable function, D is a submanifold of T * Q and V is a vector subbundle of the tangent bundle T T * Q. Definition 1. We shall say that a triple (H, D, V) as above is a Hamiltonian GNHS on the configuration space Q, with Hamiltonian function H, kinematic constraints D and variational constraints V. And we shall say that a curve Γ : [t1, t2] → T * Q is a trajectory of (H, D, V) if Γ (t) ∈ D and for all infinitesimal variations with fixed end points 1 δΓ : [t1, t2] → T T * Q, such that δΓ (t) ∈ V, we have (1) By Γ ′ : (t 1 , t 2 ) → T T * Q we are denoting the velocity of Γ, defined as As usual, ω : T T * Q × T * Q T T * Q → R denotes the canonical symplectic 2-form of T * Q. Then, ω = −dθ, being θ : T T * Q → R the canonical 1-form of T * Q, given by Let us note that Eq. (1) is an extremal condition for the action functional  [ Γ (t) , π Q * (Γ ′ (t)) − H (Γ (t))] dt, for variations δΓ inside V. In fact, any variation δΓ can be defined by a map such that Γ 0 (t) = Γ (t) and ∂ ∂s 0 Γ s (t 1,2 ) = 0, through the formula So, using the equality dθ = −ω (and the fixed end point conditions δΓ (t 1,2 ) = 0) we have We shall make the following assumptions for the variational constraints V: A1 The subbundle V ⊥ , the symplectic orthogonal of V, is a vertical subbundle; that is, V ⊥ ⊂ ker (π Q * ).
A2 The subset defines a vector subbundle of T Q.
It can be shown that A1 implies the inclusions Remark 2. Assumptions A1 is related to the physical meaning of V ⊥ : the space of the constraint forces (for details see Refs. [6] and [14]). It says that the forces are given by vertical vectors. On the other hand, assumption A2 says that the space of constraint forces does not depend on velocities, but only on positions.
Define γ (t) := π Q (Γ (t)). It is clear that δγ (t) := π Q * (δΓ (t)) is an infinitesimal variation of γ. Using the Eq. (3) and assumption A2, it easily follows that On the other hand, in terms of γ, the action defined in Eq. (2) can be written Thus, Eq. (1) is an extremal condition for (5) for variations δγ inside C V .
Remark 3. By assuming conditions A1 and A2, a Hamiltonian GNHS (H, D, V) can be completely described by the data (H, D, C V ), and we shall do it from now on. The cases in which A2 is not satisfied will be studied in Section 3, in the context of higher order constrained systems.
Now suppose that we have a Lie group G acting on Q through a map ρ : G × Q → Q. (We choose here to work with left actions, but for right actions we would have similar definitions and results). Consider the canonical lifted actions of ρ to T Q and T * Q, given by respectively, where the diffeomorphism ρ g : Q → Q is given by ρ g (q) = ρ (g, q). Notice that We shall assume that X := Q/G, T Q/G and T * Q/G are manifolds and that the canonical projections π : Q → X , p : T Q → T Q/G andp : T * Q → T * Q/G are submersions.
In this case, we shall also say that the Lie group G is a symmetry of the triple (H, D, C V ).
By using the canonical projections p andp described above, we can define the reduced Hamiltonian h : T * Q/G → R, given by and the reduced kinematic and variational constraints D :=p (D) = D/G and C V : respectively.

A reduction procedure with one connection
The aim of this subsection is to write down the equations of motion of (H, D, C V ) in terms of the reduced data h, D and C V . In order to do that, we shall consider the results presented in [5] and [9]. In particular, we shall use the so-called generalized nonholonomic connection, defined from the variational constraints.

The Atiyah isomorphism
From now on, we shall assume that the action ρ : G × Q → Q is free, what implies that π : Q → X is a principal fiber bundle. Recall that a principal connection for π : Q → X is a map A : T Q → g such that where g is the Lie algebra of G, η Q ∈ X (Q) is the fundamental vector field related to η ∈ g, and Ad g : g → g is the adjoint action of g ∈ G on the Lie algebra g. It is well-known that A gives rise to a fiber bundle isomorphism (see Ref. [10]) called Atiyah isomorphism, given by where [v] := p (v) ∈ T Q/ G. By g := (Q × g) /G we are denoting the adjoint bundle (with base X ). (The action of G on Q × g is given by the action ρ on Q and the adjoint action on g). The elements of g are denoted as equivalence classes [q, η], with q ∈ Q and η ∈ g.
For later convenience, note that defining Related to α A , we have the next results.
• Since α A is a vector bundle isomorphism, then for each q ∈ Q the spaces T π(q) X ⊕ g π(q) and ( T Q/ G) π(q) have the same dimension. Moreover, since ρ is a free action, it can be shown that the map defines a linear isomorphism between T q Q and T π(q) X ⊕ g π(q) when restricted to each fiber T q Q.
• Let H denote the horizontal subbundle related to A and V := ker π * the vertical subbundle. For each q ∈ Q, the restrictions of α A • p to H q and V q are injective and and • By identifying the bundles (T Q/G) * and T * Q/ G in a canonical way, we can define the fiber bundle isomorphismα A : T * Q/G → T * X ⊕ g * given bŷ where ( g) * is identified with (g * ) in a natural way.
• Again, for each q ∈ Q, the linear spaces ( T * Q/ G) π(q) and T * π(q) X ⊕ g * π(q) have the same dimension and, since ρ is a free action, the mapα A •p : T * Q → T * X ⊕ g * defines a linear isomorphism with its image when restricted to each T * q Q.
Remark 4. As for a standard (unconstrained) Hamiltonian system, if the action of G on Q preserves the symplectic form (see Ref. [1] for more details), we have an application J : T * Q → g * , called momentum map, 2 defined (at least locally) by the formula where J(η) is a smooth function on T * Q such that By using this application, the isomorphismα A : T * Q/G → T * X ⊕ g * can be written aŝ where hor * q : T * q Q → T * π(q) X is dual to the horizontal lift map hor q : T π(q) X → T q Q associated to the connection A.

Generalized nonholonomic connection: reduced horizontal and vertical variations
Given a G-invariant Hamiltonian GNHS (H, D, C V ), if A is an arbitrary principal connection on π, the subset defines a vector subbundle of T X ⊕ g whose elements can be called reduced variations. Let us identify C V and α A (C V ), i.e. let us write As in Ref. [5], consider the generalized nonholonomic connection A • : T Q → g defined from the variational constraints. If H • denotes the horizontal subbundle related to A • , we can write and C • V := α A • • p (C V ) By using (12) and (13), we can prove that and That is, using the connection A • , the reduced variations decompose into horizontal and vertical parts which are mutually independent.
Remark 5. As we did with C V , we shall see the reduced kinematic constraint D [see (9)] as a subset of T * X ⊕ g * , i.e. we shall make the identification Moreover, from now on, and if there is no risk of confusion, we shall identify the fiber bundles T Q/ G (resp. T * Q/ G) and T X ⊕ g (resp. T * X ⊕ g * ) via the map α A (resp.α A ). If A is an arbitrary principal connection, we will write C V and D. If, on the other hand, we use the generalized nonholonomic connection A • , we shall write C • V and D • , respectively.

Reduced variational principle
As we have seen in Section 2.1, a curve Γ : [t 1 , t 2 ] → D ⊂ T * Q is a trajectory of (H, D, C V ) if and only if it is an extremal of the action for all variations δΓ such that δγ lies on C V . We want to write this extremal condition in terms of the reduced data (h, D, C V ).
Fix a principal connection A (we are not assuming at this point that A = A • ). Using the identification between T * Q/G and T * X ⊕ g * given byα A , let us denote the composition simply as h. Consider a curve Γ : [t 1 , t 2 ] → T * Q and write π Q (Γ(t)) =: γ(t). Following the notation of [9] and [10], let us define and Then, recalling (8), it is easy to show that and consequently Now, let ∇ A be the affine connection induced by A in g and g * and fix an affine connection ∇ X on X . Also, denote by B : T Q × Q T Q → g the curvature of A. Given a variation with fixed end points, it can be shown that for some curves δy : [t 1 , t 2 ] → T * X and δμ : [t 1 , t 2 ] → g * , and where δx (t) = π * (δγ (t)) ,η (t) = a (δγ (t)) , is the reduced curvature of A. Also, we can write where ∂h ∂y : T * X ⊕ g * → T X and ∂h ∂μ : are the first and second components of the fiber derivative Fh : T * X ⊕ g * → T X ⊕ g of h and ∂h ∂x : T * X ⊕ g * → T * X its base derivative with respect to an affine connection ∇ X ⊕ ∇ A . See [9] and [10] for more details. Accordingly, integrating by parts and using the fixed end points condition for δΓ, where ad * [q,v] is the transpose of the map ad [q,v] : g π(q) → g π(q) given by On the other hand, since the condition δΓ (t) ∈ V| Γ(t) only imposes that π Q * (δΓ (t)) = δγ (t) ∈ C V | γ(t) , we have that δy (t) and δμ (t) are arbitrary and As a consequence, the original variational principle (1) translates to the condition (19), with variations satisfying (20). This can be called the reduced variational principle. Let us study it in more detail.

Generalized Hamilton-d'Alembert-Poincaré equations
The arbitrariness of δy (t) and δμ (t) implies that [see Eq. (19)] Then, using the equalityẋ (t) = x ′ (t) [see Eq. (16)], we have that (19) is equivalent to So far we have seen that, if a curve Γ (t) is a trajectory of our GNHS, then the curve ς (t) given by (17) is a solution of (21) and (22), with variations subjected to (20). Reciprocally, it is easy to show that, if ς (t) solves the last equations and γ (t) is a solution of with is a trajectory of our GNHS. Here, α A • p| q (resp.α A •p| q ) denotes the linear isomorphism between T q Q (resp. T * q Q) and T π(q) X ⊕ g π(q) (resp. T * π(q) X ⊕ g * π(q) ) described in Section 2.2.1. The Eq. (23) is precisely a reconstruction equation. (Notice that, in essence, it does not depend on the system under consideration, but only on the configuration space Q, the group G and the chosen connection). As we said in the introduction, we will not study in this paper the reconstruction equations, but only the reduced ones. To continue our study of the latter, let us assume that A = A • . This implies that [see (14), (15) and (20)] with the reduced variations δx (t) andη (t) varying independently inside respectively, what enables us to decompose Eq. (21) into two parts, as we describe in the next result.
Theorem 6. Let (H, D, C V ) be a G-invariant Hamiltonian GNHS and let A • : T Q → g be the generalized nonholonomic connection of the system. Then, a curve Γ : and given by ; and the base curve x satisfies This theorem can be easily proved by combining the discussion above and Lemma 10 of Ref. [5].
Remark 7. So far, we have been dealing with a left action. For a right action, we only have to change the sign of the Lie bracket [v, w] in (19). Accordingly, the term ad * ∂h ∂μ (ς(t))μ (t) in (25) changes its sign and the Vertical Generalized Hamilton-d'Alembert-Poincaré translates to Summing up, we have replaced Eq. (1), which, as it is well-known, gives rise to a set of dim Q + dim C V first order ODEs, by what gives rise to a number of dim Q + dim C V − dim G first order ODEs. Thus, our reduction procedure corresponds to a reduction of the number of equations that we must solve in order to find the trajectories of the original GNHS (as it happens with the analogous process for unconstrained Hamiltonian systems [9]).

A reduction procedure using two connections
Suppose that π : Q → X is a trivial bundle. In such a case, it would be desirable to take A as the related trivial connection. In fact, if we could make this choice, then the curvature and the reduced curvature vanish, and Eq. (21) would reduce to Also, the calculation of the involved covariant derivatives are too much easier. The problem is that the variations δx andη are not independent, and we cannot decouple the above equation into horizontal and vertical parts as we did for the A = A • case. (We only know that their sum must be an element of C V ). In order to solve this problem we shall consider another reduction procedure, which involves a second principal connection.

The map ϕ
Given a Hamiltonian GNHS (H, D, C V ) with symmetry, consider an arbitrary principal connection A and the generalized nonholonomic connection A • defined from variational constraints C V . Consider also the isomorphisms and write In order to avoid any confusion, given a curve δγ, we shall write and Of course, if δγ is inside C V , then In Ref. [18], the relationship between variations δx • andη • with variations δx andη was found to be being P g : T X ⊕ g → g and I T X : T X → T X ⊕ g the canonical projection and inclusion, respectively. 3
Theorem 8. Let (H, D, C V ) be a G-invariant Hamiltonian GNHS, A • its generalized nonholonomic connection and A an arbitrary principal connection. A curve Γ : and given by for all curves and the base curve x (t) satisfies The Theorem can be proved by combining above calculations and the Lemma 4.6 (for the l = 0 case) of Ref. [18]. The reduction in the number of equations is the same as for the previous procedure.
Remark 9. If a right action is considered, we just have to change de sign of ad * ∂h ∂μ (ς(t))μ (t). Remark 10. Note that the variables x, y andμ (and as a consequence ς), the submanifold D and the curvature B are related to A, while the variations δx • andη • , and the subbundles C hor V and C ver V , are related to A • .
Although Eqs. (28) and (29) seem to be more complicated than Eqs. (24) and (25), we shall see in the last section that, for trivial principal bundles, the calculations involved in the latter, in order to obtain the equations of motions of the system, are substantially simpler than those involved in the former.

Reduction of Hamiltonian HOCS
The aim of this section is to extend the results of Section 2, valid for GNHS, to the case of higher order constrained systems (HOCS) described in the Hamiltonian framework. Firstly, we shall recall the definition of a Hamiltonian HOCS as presented in Ref. [15]. Then, given a Lie group G, we shall define the idea of G-invariance for these systems and develop a reduction procedure for them. Such a procedure can be seen as a generalization of that presented in Section 2.3. First, let us introduce some notation on higher order tangent bundles.
Basic notation on higher-order tangent bundles. For k ≥ 0, let us denote by T (k) M the k-th order tangent bundle of M (for details see [13,12]). The latter defines a fiber bundle τ (k) The equivalence relation is established as follows: γ 1 ∼ γ 2 if and only if for every local chart (U, ϕ) of M containing q, the equations With above identifications, the 1-lift of a curve γ is precisely its velocity γ ′ : (t 1 , t 2 ) → T M and f (1) = f * .

Hamiltonian HOCS with symmetry
Following [14,15], we recall the definition of a Hamiltonian higher order constrained system. Consider a smooth function H : T * Q → R and subsets with k, l ≥ 1 such that P is a submanifold and, for all σ ∈ T * Q and for all ξ ∈ T identified naturally with a subset of T σ T * Q, is either empty or a linear subspace. 4 Definition 2. A Hamiltonian HOCS or simply a HOCS is a triple (H, P, V) as given above. We call H the Hamiltonian function, P the kinematic constraints submanifold of order k and V the variational constraints subspace of order l. A trajectory of (H, P, V) is a curve Γ : [t 1 , t 2 ] → T * Q such that: 2. the set of variations δΓ of Γ such that is not empty; 3. for all such variations the equation Remark 11. Note that a GNHS (H, D, V) can be seen as a HOCSs with kinematic constraints of order k just defining It is easy to see that the trajectories of (H, D, V) are the same as those of (H, P, V) passing through D.
Definition 3. Given the space of variational constraints V ⊂ T (l−1) T * Q × T * Q T T * Q, the subset defined for each σ ∈ T * Q and ζ ∈ T is called the space of constraint forces.
Note that a Hamiltonian HOCS can also be described as the triple (H, P, W). We are interested in HOCS such that, for all σ ∈ T * Q and ζ ∈ T i.e. W (ζ) is a vertical subspace of T σ T * Q. This condition is analogous to condition A1 imposed on GNHSs in Section (2.1): the constraint forces are given by vertical vectors. Now, fix an affine connection ∇ on Q and consider its related isomorphism given as follows. For V ∈ T T * Q, consider a curve u : (−ε, ε) → T * Q passing through τ T * Q (V ) and with velocity V at s = 0, i.e. u * ( d/ds| 0 ) = V . Then define where D/Ds is the covariant derivative related to ∇. It is clear that the verticality condition on W says that, for all σ ∈ T * Q and all ζ ∈ T and (see Corollary 20, Eq. (41) on reference [15]) and C V (ζ) ⊂ T π(σ) Q is a linear subspace. For later convenience, define and The next proposition is a generalization of Eq. (4) for HOCS.
Proposition 12. Given a curve Γ : [t 1 , t 2 ] → T * Q, define the curve γ = π Q • Γ. Then, a variation δΓ of Γ satisfies δΓ (t) ∈ V Γ (l−1) (t) if and only if the variation δγ (t) := π Q * (δΓ (t)) satisfies In other words, δΓ is a variation of Γ with values in V, if and only if δγ is a variation of γ with values in C V .
As an immediate consequence, we have the following result.
Theorem 13. A curve Γ : [t 1 , t 2 ] → T * Q is a trajectory of (H, P, V) if and only if Γ (k−1) (t) ∈ P, the set of variations δγ of γ = π Q • Γ such that is not empty and for these variations being FH : T * Q → T Q and BH : T * Q → T * Q the fiber and base derivatives of H, respectively.
For a proof of these two results, you may consult [15]. An action ρ of G on Q gives rise to an action ρ (k) of G on T (k) T * Q in a canonical way. We just must consider the k-liftρ Definition 4. We say that a Hamiltonian HOCS (H, P, Let us assume that the canonical projectionp k : T (k−1) T * Q → T (k−1) T * Q G gives rise to a principal fiber bundle. This enable us to define the submanifold P ⊂ T (k−1) T * Q G given by P :=p k (P) = P/G, the reduced kinematic constraints, and the submanifold which we shall call the reduced variational constraints.

A reduction procedure
Let (H, P, C V ) be a G-invariant Hamiltonian HOCS. As in the case of a Hamiltonian GNHSs, we will write the equations of motion of (H, P, C V ) in terms of the reduced data h, P and C V . Following the same reasoning as in Section 2.3, we have the next result.
If A is an arbitrary principal connection, Γ is a trajectory of (H, P, C V ) if and only if , and the curve ς : [t 1 , t 2 ] → T * X ⊕ g * given by and We want to decompose the last equation into horizontal and vertical parts as we have done for Hamiltonian GNHS. In order to do that, we need to decompose each subspace C V p l Γ (l−1) (t) . Since these subspaces depend not only on x ∈ X but on the points of T (l−1) T * Q G x , a standard connection is not useful in this case. We need a more general object.

The cotangent l-connections
In [18], in order to establish a reduction procedure for Lagrangian HOCSs, the notion of an l-connection was presented. Analogously, to develop a reduction for Hamiltonian HOCSs, we shall define a naturally dual object.
Remark 17. Let us note that, when l = 1, and identifying Q × Q T Q with T Q, we have a genuine principal connection.
From now on, and unless we state otherwise, σ is an element of T * q Q for some q ∈ Q.
Given a cotangent l-connection A, the associated horizontal spaces H (ζ) are defined by Reciprocally, given horizontal spaces H (ζ) satisfying the properties listed above, the corresponding cotangent l-connection A is defined by the formula where η ∈ g is such that v − η Q (q) ∈ H (ζ).
(For a proof, see Ref. [18]). Related to a cotangent l-connection we have a map similar to the Atiyah isomorphism of a principal connection, defined in the following way: 1. Take [ζ] ∈ T (l−1) T * Q /G and [v] ∈ T Q/G, both of them based on the same point x ∈ X .

Consider representatives ζ ∈ T
(l−1) σ T * Q and v ∈ T q Q of each one of these classes, such that π (q) = x (observe that this is always possible).

Then, define
Following [18], we can see that α A is well defined. Besides, we can prove that, for each ζ ∈ T (l−1) T * Q, the map α
For later convenience, let us define the map a : and the maps a ζ : T Q → g given by

It follows that
where ζ and v are representatives based on the same point q.

The higher order cotangent connection
In this subsection we shall see that to each G-invariant Hamiltonian HOCS a particular cotangent lconnection can be assigned. It will be called higher order cotangent connection, and it will enable us to separate the reduced virtual displacements C V into horizontal and vertical components. The construction of such an object will be done in several steps (compare with the higher order l-connection appearing in [18]).
1. Fix a G-invariant metric on Q. We shall assume that H is simple, and that we choose the Riemannian metric defining its kinetic term.
2. For each q ∈ Q, σ ∈ T * q Q and ζ ∈ T where T (ζ) and U (ζ) are the orthogonal complements of S (ζ) in C V (ζ) and V (ζ), respectively. Recall that V(ζ) = V q is the vertical space at q associated to π.

Consider the orthogonal complement of C
We shall assume that the spaces R (ζ) ⊕ T (ζ) depend differentially on q and ζ. In other words, given v ∈ T q Q, define It is easy to show that A • is effectively a cotangent l-connection. In particular, Thus, Using the isomorphisms α

The maps ϕ [ζ]
Let us relate the description of p (C V (ζ)) via A • and an arbitrary connection A. Consider a curve Γ : (t 1 , t 2 ) → T * Q and the projected curve on Q given by γ(t) = π Q (Γ(t)). If δγ denotes an infinitesimal variation on γ, let us write α A • p (δγ (t)) = π * (δγ (t)) ⊕ a (δγ (t)) = δx (t) ⊕η (t) as before, and α [ζ] By using Proposition 18, all the reduced variations inside C V can be written in terms of independent variations δx • ∈ C hor V andη • ∈ C ver V . As we noticed in Section 2.3.1, we can write expressions for the variations δx andη in terms of δx • ,η • and the canonical projections as follows where ϕ [ζ] : T π(q) X → g π(q) is given by Observe that ϕ [ζ] gives rise to another map

The Higher Order Hamilton-d'Alembert-Poincaré (HdP) equations
We shall finally derive a set of equations describing the dynamics of a G-invariant Hamiltonian HOCS (H, P, C V ) in terms of their corresponding reduced variables on T * X and g * . In order to write these equations, we shall prove that the fiber bundles T (n) T * Q/G and T (n) T * X × X [(n + 1) g * ⊕ n g] are isomorphic. In the first place, we need the next result.
Lemma 19. If A : T Q → g is a principal connection on π : Q → X , thenÂ := A • π Q * : T T * Q → g is a principal connection onp : Proof. It is clear that the functionÂ : T T * Q → g, defined aŝ is linear and, for all η ∈ g and all g ∈ G, it satisfieŝ So,Â is indeed a principal connection onp.
Now, let us consider the fiber bundleĝ := (T * Q × g) /G where G acts on T * Q (resp. on g) through the canonical lifted (resp. adjoint) action. Observe that this bundle is the adjoint bundle ofp with base T * Q/G. Its elements will be denoted by [σ, η], where σ ∈ T * Q and η ∈ g.
It is clear thatÂ gives rise to the isomorphism Denoting byâ the mapâ : Moreover, according to Reference [10], related toÂ we have the following isomorphisms.
Lemma 20. For each n ≥ 1, we have a bundle isomorphism α (n) where nĝ denotes the Whitney sum of n copies ofĝ. For a curve Γ : [t 1 , t 2 ] → T * Q , this isomorphism is given by Dt i denotes the i-th covariant derivative of the curveâ (Γ ′ (t)) inĝ.
Consider the maps a andâ related to the connections A andÂ.

Lemma 21.
There exists a fiber bundle morphism p :ĝ → g such that Moreover, the map is a fiber bundle isomorphism.
Proof. First, let us define p :ĝ → g as p([σ, η]) = [π Q (σ), η]. Using Eq. (7), it easily follows that p is well defined. It is clear that this function is a fiber bundle morphism between the fiber bundlesĝ and g over the quotient map [π Q ] : what implies that p •â = a • π Q * . Finally, given a curve ζ : (−ε, ε) → T * Q, define the map where ζ 0 = ζ(0) ∈ T * Q and (q, η) ∈ Q × g is a representative such that 6 π Q (ζ 0 ) = q. A straightforward computation shows that such a map is well defined and is a smooth inverse of Id (T (n) T * Q)/G × p.
As an immediate consequence we have the following. Lemma 23. Given a vector bundle Π : V → Y and an affine connection on it, there exists an isomorphism between the fiber bundles And given a second vector vector bundle W → Y and an affine connection on it, we have the isomorphisms Proof. It is enough to show the first statement. Given a curve Γ : (−ε, ε) → V , a possible isomorphism is given by the assignment . The details are left to the reader.
Using above identifications, we can prove the wanted isomorphism.
Theorem 24. Any principal connection A on π gives rise to an isomorphism between the fiber bundles Proof. Combining Lemma 20 and Corollary 22, for any n ∈ N, we have the fiber bundle isomorphism On the other hand, using the n-lift ofα A : T * Q/G → T * X ⊕ g * and the third equation in Lemma 23, it is immediate that fixing an affine connection on T * X ⊕ g * we can construct an isomorphism between T (n) (T * Q/G) and T (n) T * X × X (n + 1) g * .
Composing the above mentioned isomorphisms, the theorem follows.
Consider also the curves γ(t) = π Q (Γ(t)) and x(t) = π(γ(t)), Also, consider on T * X ⊕ g * an affine connection ∇ = ∇ X ⊕ ∇ A . It is worth mentioning that the covariant derivative of a curve on g * with respect to the affine connection ∇ A coincides, by definition, with the covariant derivative with respect to the principal connection A.
Then, the isomorphism constructed in the proof of the last theorem is given by where D iμ Dt i (t) (resp. D iv Dt i (t)) denote the i-th covariant derivative of curves on g * (resp. g) with respect to the affine connection ∇ A (resp. the principal connection A). Now, we are able to write down the desired equations.
Theorem 26. Let (H, P, C V ) be a G-invariant Hamiltonian HOCS and let us denote by A • its associated higher order cotangent l-connection and A an arbitrary principal connection on π. A curve Γ : [t 1 , t 2 ] → T * Q is a trajectory of (H, P, C V ) if and only if the curve the Higher Order HdP Horizontal Equations (ς (t)) , and the base curve x(t) satisfies x ′ (t) = ∂h ∂y (ς (t)) .
The theorem can be proved by combining our previous results and the proof of Lemma 4.6 of Ref. [18]. Regarding the number of reduced equations, we have the same as for the case of GNHSs.
Remark 27. For a right action, recall that we have to change the sign of ad * ∂h ∂μ (ς(t))μ (t). Remark 28. The variables x, y andμ, the submanifold P, the curvature B and the curve c (t) are related to A, while the variations δx • andη • , and subspaces C hor V (c (t)) and C ver V (c (t)), are related to A • .

The case of trivial bundles
In this section we study the form that reduced equations obtained in the previous sections adopt when the configuration space Q of the system is a trivial principal bundle with structure group G. In the first place we shall focus on GNHSs. At the end of the section we briefly explain how to deal with the case of HOCSs.
We describe the reduction procedure using right actions, instead of left ones, to emphasize that all the computations are analogous for both kind of actions.
Given a manifold X and a Lie group G, let us consider the product manifold Q = X × G and the right action of G on Q induced by right translation of G, i.e. 7 Q × G → Q : ((x, h) , g) → (x, R g h) = (x, hg) .
They make π : Q → X : (x, h) → x a right trivial principal fiber bundle with base X and structure group G. For the lifted actions we shall use the notation T Q × G → T Q : x, h,ẋ,ḣ , g → x, hg,ẋ,ḣg and T * Q × G → T * Q : ((x, h, y, σ) , g) → (x, hg, y, σg) .
Then, a principal connection A : T Q → g is given by where A is a g-valued 1-form on X , i.e. A : X → T * X ⊗ g, and it is given by the formula A (x)ẋ = A (x, e,ẋ, 0). We shall say that the connection A is the trivial connection if A (x) = 0 for all x ∈ X .
Let us enumerate some identifications that we can do for these bundles.
• The adjoint bundle g can be identified with X × g using the map Analogously, g * and X × g * can be identified by • Using the above identifications, T X ⊕ g and T * X ⊕ g * are naturally identified with T X × g and T * X × g * , respectively. As a consequence, α A can be seen as the map α A : T Q/G → T X × g, given by [recall (11) and (39)] Then, the isomorphismα A : T * Q/G → T * X × g * is given by the formula (see Remark 4) • The curvature B of the principal connection A can be written as Thus, from the very definition of B [see (18)], and identifying g and X × g, we have that ,ẋ) , (x, δx)) = (x, B ((x, e,ẋ, 0) , (x, e, δx, 0))) • The reduced hamiltonian h can be seen as a map h : T * X × g * → R, and its fiber and base derivatives as maps ∂h ∂y : T * X × g * → T X , ∂h ∂μ : T * X × g * → X × g and ∂h ∂x : T * X × g * → T * X , respectively. Following these observations, given (x 0 , y 0 , µ 0 ) ∈ T * X ×g * , the element ∂h/∂μ (x 0 , y 0 , µ 0 ) ∈ X × g is, essentially, the partial derivative of h w.r.t. the vector space variable µ ∈ g * . More precisely, we can write ∂h ∂μ where the second component is the usual derivative of h(x 0 , y 0 , µ) at µ 0 as a function between the vector spaces g * and g. In these terms, given a curve ς (t) = (x (t) , y (t) , µ (t)), denoting byμ (t) ∈ g * the curve (x (t) , µ (t)) ∈ X × g * , we have that where the second ad * is the usual coadjoint action of g on g * . Under the same identifications, the base derivative of h can be seen as a map Recall that the latter is defined by an affine connection ∇ on T X ⊕ g given as a sum ∇ = ∇ X ⊕ ∇ A .
• We can see the map ϕ : T X → g, defined in Section 2.3.1, as a function ϕ : T X → X × g. Suppose that ϕ is related to the trivial connection A and to the nonholonomic connection A • , and denote by A • to the 1-form related to A • . In Ref. [18], it was proved that • In the same Reference, the covariant derivative of a curve on g corresponding to ∇ A was calculated. From that, we can easily write the covariant derivative of a curveμ(t) ∈ g * (w.r.t. the affine connection dual to ∇ A ), as • In addition, where ∂ c h/∂x is the base derivative of h with fixed µ and with respect to ∇ X .
In the following we shall write the reduced equations (using one and two connections) in the case of a general trivial bundle and then we will consider some useful particular situations.

Dy
Dt while the vertical reduced equations read where η • is seen as a curve on g, and ϕ and B as maps taking values in g, rather than g [recall Eqs. (42) and (40)]. If we choose to work with only one connection, i.e. we take A = A • (and accordingly ϕ = 0), then the equations take the form Remark 29. In the above expression we are omitting the dot •, since we have only one connection and we do not need to make any distinction (as in Section 2.2.3).
Case 2: Choosing A as the trivial connection. Assume now that we choose A as the trivial connection on X × G. Hence A = 0, which implies that B = 0, and consequently the reduced equations read and If in addition we use Eq. (42), the horizontal equations can be written We emphasize that this last simplification cannot be done in the one-connection-approach, because A • does not necessarily coincide with the trivial connection.
Case 3: T * X is a trivial bundle and A is again the trivial connection. If T * X is trivial, then ∂h/∂y can be seen as a partial derivative in a linear space. In addition, if we choose ∇ X as the trivial affine connection, then the covariant derivative is a standard derivative of a vector variable with respect to t, i.e.
On the other hand, ∂ c h/∂x is also a standard partial derivative: ∂h/∂x. Therefore, the reduced equations in the two-connection-approach get simplified as The case of HOCS. Similar calculations can be made for HOCSs. We just must replace the standard connections by cotangent l-connections A : T (l) T * Q × Q T Q → g, which can be written with A : T (l) T * Q G → T * X ⊗ g given by x, e,ẋ, 0) .
Also, the map ϕ must be replaced by the maps ϕ [ζ] . In the case in which one of the connection is trivial and the other is the higher-order l-connection A • , the maps ϕ [ζ] are given by (under usual identifications)

A ball rolling without sliding over another ball
Let us consider now a mechanical system consisting of two balls B 1 and B 2 of radii r 1 and r 2 , respectively, in the presence of gravity (see Figure ...). Suppose that r 1 > r 2 and that B 2 is rolling without sliding over the surface of B 1 . Assume also that the center of B 1 is fixed with respect to a given inertial reference system, and that B 1 can freely rotate around its center. Now, consider the following control problem: stabilize asymptotically the smaller ball B 2 on the top of the bigger one B 1 by making a torque on B 1 . (Such a torque would be the feedback controller). This problem can be addressed by imposing a so-called Lyapunov constraint [16]. In such a case, the mentioned torque is given by the related constraint force. Since we have more constraint forces directions than constraints, the system of equations will be underdeterminated.
Here, what it is important for us is that the original Hamiltonian system, with the nonholonomic (rollingwithout-sliding) constraint, the Lyapunov constraint and the torque direction, all together, define a HOCS (see Ref. [17]). Moreover, we shall see immediately that such a HOCS can be chosen SO(3)-invariant (in the sense of Section 3.1). The purpose of the present section is to apply the reduction procedure developed previously to this kind of HOCS. Concretely, our main aim is to find an expression of the horizontal and vertical HdP equations for it.
To begin with, let us denote by R and I 1 the rotation matrix and the moment of inertia of B 1 , respectively, and let us indicate by C, I 2 and m 2 the rotation matrix, the moment of inertia and the mass of B 2 . In addition, denote by e the unit vector with origin in the center of B 1 and pointing in the direction of the center of B 2 .
It is clear that the configuration of the system can be described by the triple (R, e, C), i.e. its configuration space is given by The elements of the tangent bundle T Q will be denoted (R,Ṙ, e,ė, C,Ċ), except when we refer to elements in C V , where the notation (R, δR, e, δe, C, δC) will be used instead. To make computations easier, we will use the following identifications: The first one is the well-known trivialization by right translations. The second identification uses a Lie algebra isomorphism : (R 3 , ×) → (so (3), [·, ·]) given by 9 In R 3 the lie bracket is given by the cross product × of vectors. Under these identifications, we have where ξ =ĊC −1 and η =ṘR −1 . As a consequence, Since S 2 is a submanifold of the euclidean space R 3 , we will sometimes see the space T e S 2 as a linear subspace of R 3 . Analogously, the cotangent space will be identified as A covector at (R, e, C) will be written (R, π, e, σ, C, γ) ∈ T * Q, with π, γ ∈ R 3 . 9 We identify so(3) with the set of skew-symmetric matrices of dimension 3.
Now, let us describe the dynamics of the system. The Lagrangian L : T Q → R is given by L(R, η, e,ė, C, ξ) = 1 2 where · and (·) 2 denote the euclidean inner product and the squared euclidean norm on R 3 , respectively; g is the acceleration of gravity and z = (0, 0, 1) is the vertical unit vector pointing upwards (see Figure  ...). In order to obtain the Hamiltonian H : T * Q → R of the system, we must use the Legendre transform FL : T Q → T * Q, given by FL(R, η, e,ė, C, ξ) = (R, π, e, σ, C, γ) = (R, I 1 η, e, m 2ė , C, I 2 ξ).
It is easy to show that H(R, π, e, σ, C, γ) = 1 • Lyapunov constraint and related constraint force.
Given two non-negative functions V, µ ∈ C ∞ (T * Q), consider the submanifold If V is positive-definite around some point of T * Q, according to Ref. [16], above submanifold defines a Lyapunov constraint. Observe that the latter is a second order constraint, i.e. k = 2 (see Def. 2). We shall assume that V is of the form where Φ is a positive-definite matrix depending smoothly on (R, e) and v ∈ C ∞ (SO(3) × S 2 ) is nonnegative.
If we want to implement this constraint by making a torque on the ball B 1 , then the space of constraint forces and its related variational constraints would be, respectively, • Rolling constraint and d'Alembert's Principle.
To obtain the Hamiltonian counterpart, it is enough to perform the Legendre transform to find D Rol := FL(C Rol K ) = (R, π, e, σ, C, γ) ∈ T * Q : 1 m 2 σ = 1 r 1 + r 2 Finally, assuming d'Alembert's Principle, i.e. assuming that the space of constraint forces implementing above constraint is given by then the set of related variational constraints will be given by C Rol V := C Rol K .
We are now ready to define the symmetry of the system. Let us consider the right action of SO(3) on Q, ρ : Q × SO(3) → Q, given by ρ ((R, e, C), B) = (R, e, CB).
Both the Lagrangian and the Hamiltonian functions are clearly invariant with respect to these actions. On the other hand, a simple calculation shows that P and C V are invariant too. Therefore, (H, P, C V ) is indeed a SO(3)-invariant HOCS.
• Generalized nonholonomic connection and associated maps.
Since the variational constraints C V of our system are given by a subbundle of T Q, i.e. we have variations of order l = 1, to decompose them into vertical and horizontal parts, it is enough to consider a standard connection. We will now construct the generalized nonholonomic connection associated to our problem, following the steps described at the beginning of Section 3.2.2. To do that, we need to construct the spaces S, U, T and R. Observe that the vertical space is given by V = {0} × {0} × R 3 = {(R, 0, e, 0, C, ξ) ∈ T Q : ξ ∈ R 3 } and S = V ∩ C V = {(R, 0, e, 0, C, ξ) ∈ T Q : ξ ∈ span{e}}.
Finally, since R is the orthogonal complement of C V + V in T Q and C V + V = V ⊕ T = (R, 0, e, δe, C, ξ) ∈ T Q : (e, δe) ∈ T S 2 , ξ ∈ R 3 = {0} ⊕ T S 2 ⊕ R 3 , 10 The superscript ⊥ denote orthogonal complement with respect to the euclidean inner product in R 3 .
we have that Gathering all the previous expressions, we define the wanted connection as that given by the horizontal space H • = T ⊕ R = R, η, e, δe, C, 1 r 12 (e × δe) ∈ T Q : (e, δe) ∈ T S 2 , η ∈ R 3 .
On the other hand, based on the calculations of the previous section, the trivial connection may be written A(R, η, e, δe, C, ξ) = C −1 ξ.
In order to write down the reduced Hamiltonian h : T * X × R 3 → R and the reduced kinematic constraints P, we shall use the trivial connection. This gives rise exactly to the expressions that we already have, i.e. h is given by (49) and the reduced kinematic constraints P by the Equations (50), (51) and (52).