Symplectic groupoids and discrete constrained Lagrangian mechanics

In this article, we generalize the theory of discrete Lagrangian mechanics and variational integrators in two principal directions. First, we show that Lagrangian submanifolds of symplectic groupoids give rise to discrete dynamical systems, and we study the properties of these systems, including their regularity and reversibility, from the perspective of symplectic and Poisson geometry. Next, we use this framework -- along with a generalized notion of generating function due to Sniatycki and Tulczyjew -- to develop a theory of discrete constrained Lagrangian mechanics. This allows for systems with arbitrary constraints, including those which are non-integrable (in an appropriate discrete, variational sense). In addition to characterizing the dynamics of these constrained systems, we also develop a theory of reduction and Noether symmetries, and study the relationship between the dynamics and variational principles. Finally, we apply this theory to discretize several concrete examples of constrained systems in mechanics and optimal control.


Introduction
Understand[ing] in depth the symplectic geometry of the generating function method . . . should lead to a method for nonholonomic constraints.

McLachlan and Scovel, A survey of open problems
in symplectic integration [16] In this article, we generalize the theory of discrete Lagrangian mechanics and variational integrators in two principal directions. First, we show that Lagrangian submanifolds of symplectic groupoids give rise to discrete dynamical systems, and we study the properties of these systems, including their regularity and reversibility, from the perspective of symplectic and Poisson geometry. Next, we use this framework-along with a generalized notion of generating function due to Tulczyjew-to develop a theory of discrete constrained Lagrangian mechanics. This allows for systems with arbitrary constraints, including those which are "nonholonomic" (in an appropriate discrete, variational sense). In addition to characterizing the dynamics of these constrained systems, we also develop a theory of reduction and Noether symmetries, and study the relationship between the dynamics and variational principles. Finally, we apply this theory to discretize several concrete examples of constrained systems in mechanics and optimal control.
Before giving a more in-depth overview of the paper, and summarizing the key results, let us first give a brief background on discrete Lagrangian mechanics, in order to provide the context for the present work.
1.1. Background. The subject of discrete Lagrangian mechanics concerns the study of certain discrete dynamical systems on manifolds. As the name suggests, these discrete systems exhibit many geometric features which are analogous to those in continuous Lagrangian mechanics: in particular, the dynamics of these systems satisfy variational principles, have symplectic or Poisson flow maps, conserve momentum maps associated to Noether-type symmetries, and admit a theory of reduction. While discrete Lagrangian systems are quite mathematically interesting, in their own right, they also have important applications to structure-preserving numerical simulation of dynamical systems in geometric mechanics and optimal control theory.
In the simplest form of discrete Lagrangian mechanics, one begins with a function L : Q × Q → R, called the discrete Lagrangian, where Q is some configuration manifold. A trajectory q 0 , . . . , q n ∈ Q is a solution of the system if it extremizes the discrete action sum, S (q 0 , . . . , q n ) = n k=1 L (q k−1 , q k ) , where the endpoints q 0 and q n are held fixed. This is essentially a discrete version of Hamilton's principle of stationary action, where the tangent bundle T Q has been replaced by Q × Q, and the action integral has been replaced by an action sum. Solving this variational principle, one obtains the discrete Euler-Lagrange equations, 0 = ∂ ∂q k S (q 0 , . . . , q n ) = ∂ 0 L (q k , q k+1 ) + ∂ 1 L (q k−1 , q k ) , for k = 1, . . . , n − 1, where ∂ 0 L and ∂ 1 L denote the partial derivatives of L with respect to the first and second arguments, respectively. These discrete Euler-Lagrange equations define an implicit function (i.e., a relation), mapping (q k−1 , q k ) → (q k , q k+1 ). If L is sufficiently nondegenerate, then this relation is the graph of a flow map Q × Q → Q × Q, at least locally.
Alternatively, but equivalently, one can define a pair of discrete Legendre transformations F ± L : Q × Q → T * Q, given by This defines a symplectic relation on T * Q, given by so if the discrete Legendre transforms are (locally) invertible, then this gives a (local) symplectic automorphism which can be interpreted as the discrete Hamiltonian flow of the system. More precisely, if ω denotes the canonical symplectic form on T * Q, then L : Q × Q → R is a generating function for the Lagrangian submanifold dL (Q × Q) ⊂ (T * Q, −ω) × (T * Q, ω), which can be identified with the graph of the discrete Hamiltonian flow in the nondegenerate case. Observe that F + L (q k−1 , q k ) = p k = F − L (q k , q k+1 ) ⇔ ∂ 0 L (q k , q k+1 ) + ∂ 1 L (q k−1 , q k ) = 0, so this approach is equivalent to the previous one. Numerical methods which are constructed in this fashion are called variational integrators, due to the key role played by the variational principle. This approach to discretizing Lagrangian systems was put forward in seminal papers by Suris [19], Moser and Veselov [17], and others in the early 1990s, and the general theory was developed over the subsequent decade (see Marsden and West [15] for a comprehensive overview).
Weinstein [22] observed that these systems could be understood as a special case of a more general theory, describing discrete Lagrangian mechanics on arbitrary Lie groupoids. Given a Lie groupoid G ⇒ Q and a discrete Lagrangian L : G → R, a composable sequence of elements g 1 , . . . , g n ∈ G is a solution trajectory if it extremizes the discrete action sum S (g 1 , . . . , g n ) = n k=1 L (g k ) , where the product g 1 · · · g n = g is held fixed. This variational principle yields a discrete Lagrangian flow map g k → g k+1 . Equivalently, L can be interpreted as a generating function for the Lagrangian submanifold dL(G) ⊂ T * G. Since T * G is a symplectic groupoid over the dual Lie algebroid A * G, which has a canonical Poisson structure, this Lagrangian submanifold defines a Poisson relation on A * G. In the special case of the so-called pair groupoid Q×Q ⇒ Q, this recovers the previous theory. We will recall the details of this approach in Section 2, along with some of the more recent developments that appeared in Marrero et al. [13], including an explicit characterization of the discrete Lagrangian and Hamiltonian dynamics.
1.2. Organization of the paper. In Section 2, we begin by recalling the basic definitions and properties of Lie groupoids and algebroids, highlighting the close relationship between symplectic groupoids and Poisson manifolds. After laying these foundations, we next describe how Lagrangian submanifolds of symplectic groupoids give rise to discrete dynamics, and how this can be seen as an abstract generalization of discrete Lagrangian mechanics. The main result of this section, Theorem 2.15, is a significant generalization of earlier results characterizing the regularity and reversibility of discrete Lagrangian systems. We prove, in a generalized sense, that if either of the discrete Legendre transforms is a (local) diffeomorphism, then both are, and hence the discrete flow is a (local) Poisson automorphism.
Next, in Section 3, we develop a theory of discrete constrained Lagrangian mechanics, for systems which are restricted to some constraint submanifold of a Lie groupoid. In this case, rather than having a discrete Lagrangian defined on the entire groupoid, we only have L : N → R for some N ⊂ G. When N is a proper submanifold, this cannot be a generating function in the usual sense; however, we show that a more general notion of generating function, due to Tulczyjew, can be used to generate a Lagrangian submanifold Σ L ⊂ T * G. Using this approach, we characterize the regularity of discrete constrained Lagrangian systems, and obtain explicit formulas for the discrete Legendre transforms and discrete Euler-Lagrange equations. Finally, after showing that Σ L ⊂ T * G has the structure of an affine bundle over N associated to the conormal bundle ν * N , we discuss how the dynamics on Σ L can thus be interpreted as the evolution of configurations (on the base) and Lagrange multipliers (on the fibers).
In Section 4, we introduce morphisms of discrete constrained Lagrangian systems, and use this to develop the reduction theory for these systems. The notion of Noether symmetries is also introduced, and we prove the appropriate discrete version of Noether's theorem, relating symmetries to conserved quantities.
Subsequently, in Section 5, we show how the dynamics of discrete constrained Lagrangian systems can be derived from a constrained variational principle on N , and demonstrate that these dynamics are equivalent to those obtained previously via the generating function approach.
After this, in Section 6, we examine examples of discrete constrained Lagrangian systems for several applications. These applications include constrained mechanics and optimal control on Lie groups, an optimal control problem with nonholonomic constraints known as the plate-ball system, and time-dependent constrained mechanics with either fixed or adaptive time-stepping.
Throughout the paper, we have occasion to draw on certain technical results involving bisections of Lie groupoids, which are also instrumental to the multiplicative structure of the cotangent groupoid and to the proof of Theorem 5.1. We provide some supplementary details and discussion of these results in Appendix A.
2. Symplectic groupoids and discrete Poisson dynamics 2.1. Lie groupoids and algebroids. Let us first briefly recall some definitions pertaining to Lie groupoids and Lie algebroids. This will provide an abbreviated reference and fix the notation used throughout the remainder of the paper. For a detailed treatment of this rich topic, see the comprehensive work of Mackenzie [11]. Definition 2.1. A groupoid is a small category in which every morphism is invertible. That is, the groupoid denoted G ⇒ Q consists of a set of objects Q, a set of morphisms G, and the following structural maps: (i) a source map α : G → Q and target map β : G → Q; (ii) a multiplication map m : is called the set of composable pairs, such that multiplication is associative whenever defined; (iii) an identity section : Q → G of α and β, such that for all g ∈ G, (α(g)) g = g = g (β(g)) ; (iv) and an inversion map i : G → G, g → g −1 , such that for all g ∈ G, gg −1 = (α(g)) , g −1 g = (β(g)) .
Remark 2.2. Intuitively, groupoids can be viewed as either "categories with extra structure" or as "groups with missing structure," and both perspectives are useful. For instance, it can be helpful to see g ∈ G as an "arrow" from α(g) to β(g), where the multiplicative structure defines the composition of Alternatively, the groupoid G can be thought of as being a weaker version of a group, where multiplication is defined only partially (on G 2 ⊂ G × G) rather than totally (on G × G).
Next, for any element g ∈ G of a groupoid, there are associated left and right translation maps, which act, respectively, on those elements with which g is composable on the left and on the right. Definition 2.3. Given a groupoid G ⇒ Q and an element g ∈ G, define the left translation g : α −1 (β(g)) → α −1 (α(g)) and right translation r g : β −1 (α(g)) → β −1 (β(g)) by g to be For discrete mechanics, we will focus on a particular class of groupoids, Lie groupoids, which-much like Lie groups, of which they are a generalizationhave a differential structure in addition to (and compatible with) their algebraic structure. Definition 2.4. A Lie groupoid is a groupoid G ⇒ Q where G and Q are differentiable manifolds, α and β are submersions, and the multiplication map m is differentiable.
Remark 2.5. Observe that it is necessary for α and β to be submersions so that G 2 is a differentiable manifold; otherwise, one could not make sense of m as a differentiable map. It also follows from the definition that m is a submersion, is an immersion, and i is a diffeomorphism.
In a natural way, one can now introduce the notion of left-and rightinvariant vector fields on a Lie groupoid.
Just as the "infinitesimal version" of a Lie group is a Lie algebra, the infinitesimal version of a Lie groupoid is a Lie algebroid. We will first define Lie algebroids as abstract structures, in their own right, before subsequently recalling the definition of the Lie algebroid associated to a particular Lie groupoid.
Definition 2.7. A Lie algebroid is a real vector bundle A → Q, equipped with a Lie bracket ·, · on its space of sections Γ(A), and with a bundle map ρ : A → T Q called the anchor map. Furthermore, if we also denote by ρ : Γ(A) → X(Q) the homomorphism of C ∞ (Q)-modules of sections induced by the anchor, then we require that this satisfies the "Leibniz rule," for all X, Y ∈ Γ(A) and f ∈ C ∞ (Q).
Remark 2.8. Using the Jacobi identity, it is not hard to show that the induced map ρ : Γ(A) → X(Q) is a Lie algebra homomorphism, where X(Q) is endowed with the usual Jacobi-Lie bracket [·, ·] for vector fields. Definition 2.9. Given a Lie groupoid G ⇒ Q, the associated Lie algebroid AG → Q is defined by its fibers A q G = ker T (q) α, i.e., the space of α-vertical tangent vectors at the identity section, for each q ∈ Q. There is a bijection between sections X ∈ Γ (AG) and left-invariant vector fields ← − X ∈ X(G), defined by (1) ← − X (g) = T (β(g)) g (X (β(g))) .
The Lie algebroid structure on AG is then given by the bracket ·, · and anchor ρ satisfying the conditions for all X, Y ∈ Γ (AG) and q ∈ Q.
Remark 2.10. Alternatively, one can also establish a bijection between sections X ∈ Γ (AG) and right-invariant vector fields − → X ∈ X(Q), defined by which yields the Lie bracket relation Thus, X → ← − X is a Lie algebra isomorphism, while X → − → X is a Lie algebra anti-isomorphism.
Note that for every v ∈ A q G, we have the following expression for the tangent to the inversion map: This can be seen by taking v =ġ(0) for some α-vertical path g(t), and observ- , which rearranges to give the desired equality.
Finally, we discuss a subclass of Lie groupoids having even more additional structure. These are the symplectic groupoids, which are endowed with a symplectic manifold structure that is "compatible" with the Lie groupoid structure, in a sense which we will now define precisely.
If G ⇒ P is a symplectic groupoid and ω is the symplectic 2-form on G, then one may prove that (ker T µ α) ω = ker T µ β for µ ∈ G, where (ker T µ α) ω denotes the symplectic orthogonal complement of the subspace ker T µ α. That is, the subspaces of α-vertical and β-vertical tangent vectors are symplectic orthogonal to one another. Moreover, there exists a unique Poisson structure on P such that α : G → P is anti-Poisson and β : G → P is Poisson. In addition, the identity section : P → G is a Lagrangian immersion. (See Coste et al. [4], Mackenzie [11], Marle [12].) One example of a symplectic groupoid, in particular, lies at the heart of discrete Lagrangian mechanics: this is the cotangent groupoid. Given a Lie groupoid G ⇒ Q, let A * G → Q be the dual vector bundle of the associated Lie algebroid AG; then the cotangent groupoid is a symplectic groupoid T * G ⇒ A * G. Given an element µ ∈ T * g G, the source and target are defined such that, for all sections X ∈ Γ (AG), (The definition of multiplication in T * G is slightly more intricate, and involves left and right translation by bisections; these are discussed in Appendix A.) 2.2. Discrete dynamics of Lagrangian submanifolds. In this section, we discuss how a Lagrangian submanifold Σ ⊂ G of a symplectic groupoid G ⇒ P gives rise to discrete dynamics. In general, the dynamics are only defined implicitly, as a relation, rather than as an explicit flow map; we describe the conditions under which an explicit dynamical flow can be given. These dynamics can be interpreted either as discrete Lagrangian dynamics on Σ or as discrete Hamiltonian dynamics on P . In the discrete Hamiltonian case, the explicit flow is shown to be a (local) Poisson automorphism.
Example 2.13. Let G ⇒ Q be a Lie groupoid, equipped with a function L : G → R called the discrete Lagrangian. Then L generates a Lagrangian submanifold dL(G) ⊂ T * G of the cotangent groupoid T * G ⇒ A * G. A sequence µ 1 , . . . , µ n ∈ T * G satisfies the associated Lagrangian dynamics if and only if µ k = dL (g k ) for some g k ∈ G, k = 1, . . . , n, Applying the definition of α, β on T * G, this means that for any section X ∈ Γ (AG), this is equivalent to which can also be written as These are precisely the discrete Euler-Lagrange equations obtained by Marrero et al. [13] for discrete Lagrangian mechanics on Lie groupoids. In the special case where G is the pair groupoid Q × Q ⇒ Q, this recovers the discrete Euler-Lagrange equations, as in Marsden and West [15].
These dynamics are implicitly defined, since they are given by a relation on G rather than an explicitly defined map. Restating Definition 2.12 in these terms, we see that µ 1 , . . . , µ n ∈ G satisfies the discrete Lagrangian dynamics if and only if each pair of successive elements satisfies the relation (µ k , µ k+1 ) ∈ G 2 ∩ (Σ × Σ). (In fact, such a relation may be defined by any subset of a groupoid, although in general, the resulting dynamics will not preserve any notable geometric structure.) This raises the following question: Under what conditions is this relation, in fact, the graph of an explicit flow map µ k → µ k+1 (at least locally), and what properties does this flow map have? Clearly, if the restricted source map α| Σ : Σ → P is a (local) diffeomorphism, then this flow is given by the composition ( α| Σ ) −1 • β| Σ . Furthermore, if the restricted target map β| Σ : Σ → P is also a (local) diffeomorphism, then the flow is reversible, and its (local) inverse is ( β| Σ ) −1 • α| Σ . In case both the restricted source and target maps are (local) diffeomorphisms, we say that Σ is a (local) Lagrangian bisection of the symplectic groupoid G, since it is both a (local) α-and β-section, as well as a Lagrangian submanifold. (See Appendix A for more on bisections of Lie groupoids. ) We now show that, in fact, if either of the maps α| Σ or β| Σ is a local diffeomorphism, then both are. That is, if the Lagrangian submanifold Σ ⊂ G is either a local α-or β-section, then it is both, i.e., Σ is a local Lagrangian bisection. (Note that this result depends crucially upon the fact that G is a symplectic groupoid and that Σ ⊂ G is Lagrangian; it is not true for arbitrary submanifolds of Lie groupoids.) We begin by proving a lemma on complementary subspaces in a symplectic vector space; in the main theorem, this lemma is then applied to the α-and β-vertical tangent subspaces, exploiting the fact that they are symplectic orthogonal complements.
We note that this is a significant generalization of previous results on the regularity of discrete Lagrangian dynamics. Weinstein [22] first raised the question of how regularity results for the pair groupoid Q × Q might be generalized to arbitrary Lie groupoids G ⇒ Q, and this question was answered by Marrero et al. [13,Theorem 4.13]. Here, we extend this answer from the Lagrangian submanifold dL(G) ⊂ T * G to arbitrary Lagrangian submanifolds of symplectic groupoids.
Lemma 2.14. Let (Z, ω) be a 2d-dimensional symplectic vector space with subspaces V, W ⊂ Z, and denote their symplectic orthogonal complements by Proof. Observe that (V + W ) ω = V ω ∩ W ω . Since the subspaces V + W and (V + W ) ω are symplectic orthogonal complements, the sum of their dimensions is 2d. Therefore, which completes the proof.
Theorem 2.15. Let G ⇒ P be a 2d-dimensional symplectic groupoid, and suppose Σ ⊂ G is a Lagrangian submanifold. Then the restricted source map α| Σ : Σ → P is a local diffeomorphism if and only if the restricted target map β| Σ : Σ → P is.
Proof. For any µ ∈ Σ, let V = ker T µ α (i.e., the tangent space to the source fiber at µ) and W = T µ Σ. The source and target fibers are symplectic orthogonal complements, so V ω = ker T µ β, and because the fibers have equal dimension, it follows that dim V = dim V ω = d. Next, because Σ is a Lagrangian submanifold, this implies that W ω = W , so dim W = d. Therefore, dim V + dim W = 2d, so these subspaces of T µ G satisfy the conditions of Lemma 2.14.
Finally, α| Σ is a local diffeomorphism at µ if and only if the kernel 14 implies that these kernels have equal dimension, so one is trivial if and only if the other is.
Remark 2.16. Although we are only concerned with the conditions for α| Σ and β| Σ to be local diffeomorphisms, the proof of Theorem 2.15 also applies to any other property that can be described in terms of the dimension of the kernels of their tangent maps. (For example: α| Σ has constant rank if and only if β| Σ does.) Using Theorem 2.15, we deduce that if α| Σ is a local diffeomorphism, then so is β| Σ , and hence the discrete Lagrangian flow map ( α| Σ ) −1 • β| Σ is a local automorphism on Σ. Reversing the order of composition, it also follows that the discrete Hamiltonian flow map β| Σ • ( α| Σ ) −1 is a local automorphism on P -and moreover, it is a local Poisson automorphism. To see this, consider the Poisson map ( α, β) : G → P − × P , µ → ( α(µ), β(µ)), and observe that the image of Σ is precisely the graph of β| Σ • ( α| Σ ) −1 in P − × P . However, since Σ is Lagrangian, its image under the Poisson map ( α, β) is coisotropic; thus, it follows from a result of Weinstein [21] that β| Σ • ( α| Σ ) −1 is a (local) Poisson automorphism on P , since its graph is coisotropic in P − × P . This argument is essentially due to Ge [5], who further showed that this map from (local) Lagrangian bisections of a symplectic groupoid to (local) Poisson automorphisms on the base is a group homomorphism. (The group structure that allows for composition of bisections is discussed in Appendix A.)

Discrete constrained Lagrangian mechanics
3.1. Generating Lagrangian submanifolds of T * G. In this section, we will be concerned with generating a Lagrangian submanifold Σ L ⊂ T * G of the cotangent groupoid, associated to a function L called the discrete Lagrangian. This is a particular example of the formalism introduced in the previous section. As shown in Example 2.13, one way to do this is by defining a discrete Lagrangian L : G → R and taking Σ L = dL(G); this is the case considered in previous work on discrete Lagrangian mechanics, including Weinstein [22] and Marrero et al. [13].
Setting aside the groupoid structure for the moment, this approach exploits the fact that for any manifold M and function L : M → R, the submanifold dL(M ) ⊂ T * M is Lagrangian. However, there is a more general construction due to Tulczyjew (and stated, for example, in [20]), which we will use to generalize the earlier approach to discrete mechanics. Theorem 3.1 (Tulczyjew). Let M be a smooth manifold, N ⊂ M a submanifold, and L : N → R. Then Turning back to the groupoid formulation, this allows one to define a discrete Lagrangian on some constraint submanifold N ⊂ G, rather than necessarily on all of G. This realization motivates the following definition.
It follows immediately from Theorem 3.1 that a discrete constrained Lagrangian system generates a Lagrangian submanifold Σ L ⊂ T * G of the cotangent groupoid T * G ⇒ A * G. The relationship among these spaces is shown in the following diagram: be a discrete constrained Lagrangian system. Then define the discrete Legendre transformations F ± L : Σ L → A * G to be the restricted source and target maps, Proof. Direct application of Theorem 2.15.
Definition 3.5. A discrete constrained Lagrangian system (G, N, L) is said to be regular if F ± L are local diffeomorphisms, and hyperregular if they are global diffeomorphisms. Now, given a trajectory µ 1 , . . . , µ n ∈ T * G, it follows from Definition 2.12 that this satisfies the discrete Lagrangian dynamics of Σ L when µ 1 , . . . , µ n ∈ Σ L and Hence, if (G, N, L) is regular, then the discrete Lagrangian flow map is given by the local automorphism (F − L) Hamiltonian flow map is given by the local Poisson automorphism In the special case N = G, Σ L = dL(G), this is in agreement with the formulation of Weinstein [22] and Marrero et al. [13], as discussed in Example 2.13.
Remark 3.6. It should be emphasized that this formalism does not require N to be a subgroupoid of G, but only a submanifold. If N ⊂ G is indeed a subgroupoid, then one can simply reduce to the unconstrained dynamics on N ⇒ Q, which are given by the Lagrangian submanifold dL(N ) ⊂ T * N ⇒ A * N . Therefore, in the subgroupoid case, N can be thought of as specifying discrete holonomic constraints on G. By contrast, when N is not a subgroupoid, it can be thought of as specifying discrete nonholonomic constraints on G. This is consistent with the definition of holonomic and nonholonomic constraints for continuous Lagrangian systems. For example, a constraint distribution ∆ ⊂ T Q is integrable precisely when ∆ is closed under the Jacobi-Lie bracket on T Q, i.e., when ∆ is a subalgebroid of the tangent Lie algebroid T Q. Just as continuous holonomic constraints correspond to Lie subalgebroids, it is natural to think of discrete holonomic constraints as corresponding to Lie subgroupoids.

3.2.
Affine bundle structure of Σ L . For any discrete constrained Lagrangian system (G, N, L), the Lagrangian submanifold Σ L ⊂ T * G is also a bundle over N . More precisely, taking the projection to be the restriction of the cotangent bundle projection π G | Σ L : Σ L → N , we obtain an affine bundle whose associated vector bundle is ν * N , the conormal bundle of N in G. To see this, note that for any µ ∈ Σ L and Λ ∈ ν * N at the same basepoint π G (µ) = π G (Λ) = g, we have for all v ∈ T g N , and thus µ + Λ ∈ Σ L . (For more details, see Libermann and Marle [10] and references therein.) Therefore, Σ L is isomorphic to ν * N , but generally not in any canonical way. To choose a particular isomorphism, if one so desires, it suffices to specify a distinguished section σ : N → Σ L , and then In particular, suppose that L is an extension of L to a neighborhood of N in G, so that L = L| N . Then this defines the distinguished section σ = d L| N , and hence Applying the definitions of α and β, it follows that the discrete Legendre transformations can be written as and similarly, for all sections X ∈ Γ (AG). Now, given a sequence µ 1 , . . . , µ n ∈ T * G, let g k = π G (µ k ) and take Λ k = µ k − d L (g k ) for k = 1, . . . , n. Therefore, this is a solution of the discrete Lagrangian dynamics when Λ 1 , . . . , Λ n ∈ ν * N and for all sections X ∈ Γ (AG) and k = 1, . . . , n − 1. In the special case N = G, observe that ν * N is simply the zero section of T * G, which is isomorphic to G itself; hence, the dynamics reduce to the unconstrained discrete Euler-Lagrange equations of Example 2.13.

Lagrange multipliers. Suppose that the constraint submanifold
where {φ a } a∈A is a family of real functions defined in a neighborhood of N and A is an index set. It follows that {dφ a | N } a∈A is a basis of sections of the conormal bundle ν * N . Hence, a section Λ of the conormal bundle can be written where the real functions λ a on N are called Lagrange multipliers. (Here, we have used the Einstein summation notation to indicate that we are summing over a ∈ A.) In fact, since φ a | N = 0, we can deduce that Now, as before, suppose that the discrete Lagrangian L : N → R is the restriction to N of a real function L on G. Therefore, an element µ ∈ Σ L , with g = π G (µ), can be written as In this sense, Σ L can be seen as the space consisting of elements g ∈ N , together with the Lagrange multipliers λ constraining g to N .
4. Morphisms, reduction, and Noether symmetries 4.1. Groupoid morphisms and reduced dynamics. In order to study reduction of discrete constrained Lagrangian systems, we first recall the definition of a morphism of Lie groupoids. After this, we introduce the slightly more specialized notion of a morphism for discrete constrained Lagrangian systems, which preserves not only the groupoid structure, but also that of the constraint submanifolds and the Lagrangian functions.
A morphism Φ : G → G of Lie groupoids induces a smooth map Φ 0 : Q → Q on the base, which satisfies Moreover, Φ induces a morphism AΦ : AG → AG of the corresponding Lie algebroids, and for any g ∈ G and any v ∈ A β(g) G, w ∈ A α(g) G. Consequently, two sections X ∈ Γ (AG) and X ∈ Γ (AG ) satisfy AΦ  It is now possible to define the dual notions of these relations on the cotangent groupoid and its base.
We now have the necessary equipment to state and prove the main theorem on the reduction of discrete constrained Lagrangian systems, which states how the structure of the cotangent groupoid and Lagrangian submanifold transform under morphisms. As an immediate corollary, we see that the Lagrangian dynamics of (G, N, L) reduce to those of (G , N , L ), with respect to Φ * -relatedness. (The content of this theorem is shown diagrammatically in Figure 1.) Theorem 4.5. Let Φ : G → G be a morphism of the discrete constrained Lagrangian systems (G, N, L) and (G , N , L ), and suppose µ ∈ T * G and µ ∈ T * G are Φ * -related. Then, the following are true: Proof. To prove (1), we begin by denoting g = π G (µ) and g = π G (µ ); since µ and µ are Φ * -related, we have Φ(g) = g . If µ ∈ Σ L , then Φ(g) = g ∈ N , so g ∈ Φ −1 (N ) = N . Furthermore, for all v ∈ T g N , and thus µ ∈ Σ L . To prove (2), suppose that v ∈ A α(g) G. Then Then and thus β(µ) and β (µ ) are A * Φ-related. . . , µ n ∈ T * G satisfies the discrete Lagrangian dynamics of (G , N , L ), then any Φ * -related sequence µ 1 , . . . , µ n ∈ T * G satisfies the discrete Lagrangian dynamics of (G, N, L).
Remark 4.7. If Φ : G → G is a submersion, then the converse is true as well.
Since every v ∈ T Φ(g) N can be written as v = T Φ(v) for v ∈ T g N , part (1) of Theorem 4.5 can be strengthened to µ ∈ Σ L ⇔ µ ∈ Σ L . Furthermore, AΦ is a fiberwise surjection if (and only if) Φ is a submersion (Mackenzie [11,Proposition 3.5.15]). Therefore, with this additional assumption, Corollary 4.6 can be strengthened to say that the sequence µ 1 , . . . , µ n ∈ T * G satisfies the discrete Lagrangian dynamics if and only if the Φ * -related sequence µ 1 , . . . , µ n ∈ T * G does.

4.2.
Noether symmetries and constants of the motion. Next, we extend the notion of discrete Noether symmetries and constants of the motion, as defined for unconstrained systems on Lie groupoids in Marrero et al. [13], to apply to discrete constrained Lagrangian systems.

Variational principles
Discrete constrained Lagrangian systems are a generalization of variational integrators. However, up to this point, we have only treated the discrete Lagrangian L : N ⊂ G → R as a generating function, and have not yet made any mention of its variational interpretation. In this section, we show that, under certain regularity conditions, the Lagrangian dynamics of (G, N, L) are precisely the critical points of a discrete constrained action sum. 5.1. Admissible trajectories and variations. Given a fixed element g ∈ G, a trajectory g 1 , . . . , g n ∈ G is said to be admissible if g k ∈ N for k = 1, . . . , n, and if the elements are composable with product g 1 · · · g n = g. Let C n g,N denote the set of admissible trajectories of length n. Without loss of generality, we can take n = 2, so that the space of admissible trajectories is Finally, assume that G 2 ∩ (N × N ) is a submanifold of N × N , and that the map m| G 2 ∩(N ×N ) : G 2 ∩ (N × N ) → G has constant rank in an open neighborhood of C 2 g,N . This is sufficient to ensure (by the subimmersion theorem, cf. Abraham et al. [1]) that C 2 g,N is itself a submanifold of G 2 ∩ (N × N ). Now, a "variation" of an admissible trajectory (g 1 , g 2 ) ∈ C 2 g,N is an element of the tangent space and T (g 1 ,g 2 ) m (v g 1 , v g 2 ) = 0 .
In fact, letting q = β (g 1 ) = α (g 2 ), this tangent space is isomorphic to a vector subspace (A q G) (N,g 1 ,g 2 ) ⊂ A q G, defined by The following theorem establishes this isomorphism explicitly.
, is an isomorphism.
To express these discrete constrained Euler-Lagrange equations in terms of arbitrary sections X ∈ Γ (AG), as with the earlier results, suppose now that L is an extension to a neighborhood of N ⊂ G, so that L = L| N . Therefore, it follows from the above that where T * (q) g 1 and T * (q) (r g 2 • i) denote the cotangent lift (i.e., the adjoint to the tangent map) of g 1 and r g 2 • i, respectively, and where (A q G) 0 (N,g 1 ,g 2 ) ⊂ T * (q) G is the annihilator of (A q G) (N,g 1 ,g 2 ) . Now, by using the definition of (A q G) (N,g 1 ,g 2 ) , we can write its annihilator as (6), we obtain that and Λ 2 ∈ (ker T g 2 β) 0 . Finally, sinceΛ 1 annihilates α-vertical tangent vectors, in particular it annihilates any left-invariant vector field evaluated at g 1 ; likewise, Λ 2 annihilates any right-invariant vector field evaluated at g 2 . Therefore, it follows that for any X ∈ Γ (AG), we have which is precisely the equation (5) that we derived earlier, in the case n = 2.
To generalize this argument for any n ≥ 2, one can proceed in a similar manner. Given a fixed g ∈ G, suppose that the space of composable sequences of length n in N , . . . , g n ) ∈ N | (g k , g k+1 ) ∈ G 2 for k = 1, . . . , n − 1} , is a submanifold of N n , and that the multiplication map m n | N n 2 : N n 2 → G, (g 1 , . . . , g n ) → g 1 · · · g n , has constant rank in an open neighborhood of C n g,N = m n | N n 2 −1 (g). Then, as before, it follows that C n g,N is a submanifold of N n 2 . The discrete constrained action sum is then and one may prove that when (g 1 , . . . , g n ) ∈ C n g,N is a critical point of hold for all sections X ∈ Γ (AG) and k = 1, . . . , n − 1, where Λ k ∈ ν * g k N for k = 1, . . . , n. Again, this agrees precisely with the earlier equation (5).
6. Examples 6.1. Constrained mechanics and optimal control on Lie groups. Let G be a Lie group, whose identity element is denoted by e ∈ G, and let g be the Lie algebra of G. Suppose that a submanifold N ⊂ G is given by the vanishing of the constraint functions φ a , for a ∈ A, defined on a neighborhood of N . Let L : N → R be a discrete Lagrangian, and let L be an extension of L to a neighborhood of N , so that L = L| N . Then the discrete dynamics are given by the constraint equations φ a (g k ) = 0 for all a ∈ A, k = 1, . . . , n, together with the equations for every ξ ∈ g. Now, in addition to the usual definition ← − ξ (g) = T g (ξ), we can use the tangent inversion identity (3) to see that T i(ξ) = −ξ + T ( • β) (ξ) = −ξ; therefore, by the chain rule, we simply have − → ξ (g) = −T (r g • i) (ξ) = T r g (ξ). Hence, (7) can be rewritten as * If we define µ k = r * g k d L(e) ∈ g * and Φ a k = r * g k dφ a (e) ∈ g * for each k, then this is equivalent to . . , n − 1, where Ad * : G × g * → g * is the coadjoint action of G on g * . These equations will be called the discrete constrained Lie-Poisson equations for this system.
We now show how this framework can be used to discretize a general family of optimal control problems on Lie groups. Again, let G be a Lie group with Lie algebra g, and define some control submanifold C ⊂ g. A curve ξ : [0, 1] → C is said to be a control curve for a trajectory g : [0, 1] → G if it satisfiesġ(t) = T g(t) (ξ(t)) for all t; when G is a matrix Lie group, we can simply write this asġ(t) = g(t)ξ(t). The continuous optimal control problem is defined as follows (cf. Koon and Marsden [9]): Given an initial configuration g 0 ∈ G, a final configuration g 1 ∈ G, and a function l : g → R, find the control curve ξ : [0, 1] → C for a path g : [0, 1] → G, satisfying g(0) = g 0 and g(1) = g 1 , such that 1 0 l (ξ(t)) dt is minimized. In other words, we wish to find the most efficient (lowest-cost) way to "steer" the system on a path from g 0 to g 1 by applying controls in C. (In optimal control problems, it is generally assumed that the system is controllable, i.e., that there exists a control curve for every pair of initial and final configurations. As in Koon and Marsden [9], we omit discussion of controllability, since we are primarily interested in the necessary variational conditions for optimality.) To derive the associated discrete system, it is usually necessary to introduce an analytic local diffeomorphism τ : g → G, which maps a neighborhood of 0 ∈ g to a neighborhood of e ∈ G, where e denotes the identity element of G. As a consequence, it is possible to deduce that τ (ξ)τ (−ξ) = e. This map can then be used to relate the continuous and discrete settings (cf. Bou-Rabee and Marsden [2]). There are several choices, in the literature, for the map τ . For instance, one may take τ to be the exponential map, defined by the time-1 flow exp(ξ) = γ(1), where γ : [0, 1] → G is the integral curve of the vector field ← − ξ ∈ X(G) with initial condition γ(0) = e. Alternatively, for quadratic matrix Lie groups (e.g., SO(3), SE(2), SE(3)), it is typical to use the Cayley map cay : g → G, defined by cay(ξ) = (I − ξ/2) −1 (I + ξ/2), where I = e denotes the identity matrix. Now, suppose that we start with a continuous optimal control problem, specified by a Lagrangian l : g → R and a control submanifold C determined by the vanishing of the independent constraints Ψ a : g → R, a ∈ A. Then, given a choice of the map τ : g → G, we may construct the discrete Lagrangian L : G → R and constraint functions φ a : G → R, a ∈ A, by where h is the time step size of the discretization. Therefore, we can finally rewrite Equation (7) as where ξ k = τ −1 (g k ) /h. In other words, denoting dτ ξ : g → g to be the left-trivialized tangent map of τ , defined by T ξ τ = T e τ (ξ) • dτ ξ , the previous equation can be rewritten as

6.2.
A discrete plate-ball system. Consider, now, the optimal control problem for the classical example of a homogeneous ball, rolling (without slipping) on a rotating plate. The configuration space of this system is Q = R 2 ×SO(3), parameterized by q = (x, y, g). Let (ω x , ω y , ω z ) ∈ R 3 ∼ = so(3) be the angular velocity vector of the ball with respect to an inertial frame, and let r be its radius. Suppose that the plane rotates with constant angular velocity Ω, about the axis perpendicular to the plane through the origin. Then, we may formulate the following optimal control problem, which is called the plate-ball problem: Given initial and final configurations q 0 , q 1 ∈ R 2 × SO(3), find the optimal control curves (x(t), y(t)) ∈ R 2 , t ∈ [0, 1], that steer the system from q 0 to q 1 , such that the cost function is minimized, subject to the (nonholonomic) rolling-withoutslipping constraintṡ where c is a constant.
The continuous equations of motion for this problem are carefully studied in Koon and Marsden [9], Iglesias et al. [7]; we now study the geometric discretization of this system and its dynamics.
Now, denote by {E 1 , E 2 , E 3 } the standard basis of the Lie algebra so (3), This defines the Lie algebra isomorphism : R 3 → so(3) (sometimes called the "hat map" [1]), which takes As a discretization procedure for the Lie group SO (3), it is typical to use the matrix logarithm, denoted log : SO(3) → so (3), which is the (local) inverse of the matrix exponential map exp : so(3) → SO (3). For simplicity, we may use the approximation exp (hξ) ≈ I + hξ to obtain Taking ω = ξ, we therefore deduce that since tr (IE i ) = tr (E i ) = 0 for i = 1, 2, 3. Finally, we derive the following discretization of the plate-ball system. Let N be the submanifold of R 2 × R 2 × SO(3) determined by the vanishing of the constraint functions, and take the discrete Lagrangian to be L (x 0 , y 0 , x 1 , y 1 , g 1 ) = h 2 Therefore, applying the results of Section 3.3, the discrete constrained Lagrangian dynamics are given by together with the vanishing of the constraint functions (8), where X is an arbitrary section of the vector bundle T R 2 × so(3) → R 2 . A basis of sections of this vector bundle is given by Hence, the discrete dynamics are given by the following system of equations: These are eight equations (corresponding to the five basis elements and three constraints), and each step of the dynamics requires solving for eight unknowns (the five degrees of freedom x, y, ω x , ω y , ω z , plus the three Lagrange multipliers).

Time-dependent constrained mechanics.
To treat time-dependent discrete mechanics on a Lie groupoid G ⇒ Q, we construct the new Lie groupoid G R = R × R × G ⇒ R × Q, with structure functions defined by The associated Lie algebroid is naturally identified with T R × AG → R × Q.
Hence, the sections of this Lie algebroid are spanned by ∂ ∂t , 0 and elements having the form (0, X), where X ∈ Γ (AG). Therefore, we can express the left-and right-invariant vector fields as follows: Now, suppose we are given a constraint submanifold N R ⊂ G R and a discrete Lagrangian L R : N R → R. Then, following the theory presented in Section 3, the discrete dynamics correspond to the Lagrangian submanifold Σ L R of the cotangent groupoid T * G R ⇒ A * G R . More explicitly, take an arbitrary extension L R , and suppose that N R is given by the vanishing of constraint functions φ a R , a ∈ A. Then the discrete dynamical equations are φ a R (t k , t k+1 , g k+1 ) = 0, a ∈ A, and Example 6.1. Let us construct an integrator for the constrained optimal control problem on a Lie group, as in Section 6.1, but incorporating adaptive time-stepping, rather than a fixed time step h. Define the time-dependent discrete Lagrangian Taking ξ k = τ −1 (g k ) /h k , where h k = t k − t k−1 , the discrete dynamics are thus given by the equations The last condition, corresponding to the ∂ ∂t terms, can be interpreted as conservation of energy along the discrete evolution, as with the symplecticenergy-momentum preserving methods of Kane et al. [8].
Example 6.2. The previous example allowed for variable time steps, with constraints placed only on the Lie groupoid G. On the other hand, we may consider time-dependent discrete Lagrangian mechanics which are unconstrained on G, but with fixed time step size t k − t k−1 = h for k = 1, . . . , n. As before, consider the groupoid G R ⇒ R × Q, and define the constraint submanifold N R = {(t 0 , t 1 , g 1 ) ∈ G R | t 1 = t 0 + h} , for some constant h. This corresponds to the vanishing of the single constraint function φ R (t 0 , t 1 , g 1 ) = t 1 − t 0 − h.
Then, given an extended discrete Lagrangian L R : G R → R, the equations of motion are (together with the constraint equation) for k = 1, . . . , n − 1. However, this can be simplified greatly, since we observe Finally, observe that these two equations are completely decoupled, so we can in fact eliminate the first equation. Therefore, we obtain with t k+1 = t k + h, for k = 1, . . . , n − 1. This has precisely the same form as the discrete Euler-Lagrange equations in the time-independent case; as in the continuous theory of Lagrangian mechanics, no " ∂L ∂t "-type terms arise from introducing the time dependency. In the special case where L R depends only on the time step size t k+1 − t k , this is equivalent to defining the time-independent discrete Lagrangian L : G → R, and one recovers precisely the usual, unconstrained discrete Euler-Lagrange equations.
Finally, we remark that an extension of this setup can be used for more sophisticated step size control, by taking the constraint function to be (for example), where h : G → R is some step size function. In this case, , neither of which is generally zero. This differs considerably from the constant h case treated above: in general, the equations of motion no longer decouple, and moreover the discrete Euler-Lagrange equations contain additional terms arising from the time step control function. This gives some insight into the delicate nature of implementing time step control for structure-preserving numerical integrators (as discussed at length in, e.g., Hairer et al. [6]).

Conclusion
7.1. Summary of results. We began this paper by developing a generalized theory of discrete Lagrangian mechanics, in terms of Lagrangian submanifolds of symplectic groupoids, which induce Poisson relations on their base manifolds. We also characterized the regularity and reversibility of these systems, providing a significant generalization of previous results.
Applying this framework to the cotangent groupoid T * G ⇒ A * G of a groupoid G ⇒ Q, we were able to formulate a new theory of discrete constrained Lagrangian mechanics, where the discrete Lagrangian L is defined on a constraint submanifold N ⊂ G; this reduces to the earlier unconstrained theory in the special case N = G. This allows both for holonomic constraints, when N is a subgroupoid of G, as well as more general nonholonomic constraints, and the distinction between the two is consistent with the continuous theory on Lie algebroids. The Lagrangian submanifold Σ L ⊂ T * G generated by L was shown to have the structure of an affine bundle over N , associated to the conormal bundle of N . When N is defined implicitly, by the vanishing of a family of functions φ a in a neighborhood on G, we showed that one can obtain natural coordinates for the fibers of Σ L , which correspond to Lagrange multipliers for the constraints. The resulting dynamics on Σ L , therefore, specify the evolution of configurations (on the base) and Lagrange multipliers (on the fibers).
In this setting, we also introduced the notion of a morphism between discrete constrained Lagrangian systems, which corresponds to a morphism of Lie groupoids that preserves the additional structure of the discrete Lagrangians and constraint manifolds. With this definition, it was then proven that morphisms of discrete constrained Lagrangian systems allow for reduction of the dynamics. In addition, we studied Noether symmetries, and proved a discrete version of Noether's theorem, for these constrained systems.
After this, we proved that, under some regularity conditions, the dynamical equations can also be derived from a variational principle, where the discrete action sum is constrained to trajectories lying in N . This establishes a connection between these systems and variational integrators.
Finally, we applied the previous results to discretize several examples of continuous systems with constraints, including constrained mechanics and optimal control on Lie groups, the nonholonomic plate-ball system, and time-dependent systems with either fixed or adaptive time steps. 7.2. Future directions. There are many interesting directions, regarding discrete constrained Lagrangian mechanics, that remain to be explored. For example, it is well known that if we have a regular, continuous Lagrangian function L : T Q → R, and a sufficiently small time step h > 0, then one may define a regular discrete Lagrangian function L E h : Q × Q → R, called the exact discrete Lagrangian, where L E h (q 0 , q 1 ) is precisely the action integral along the Euler-Lagrange path from q 0 to q 1 , over a time interval of size h. Moreover, the exact Hamiltonian flow, for time h, is just the pushforward (via the discrete Legendre transformations) of the discrete flow associated with L E h (cf. Marsden and West [15]). In other words, the Lagrangian submanifold dL E h ⊂ T * (Q × Q) is equal to the graph of the Hamiltonian flow for time h. This result is important for the error analysis of variational integrators on Q × Q, and this analysis can also be extended to an exact discrete Lagrangian L E h : G → R when the continuous Lagrangian L : AG → R is defined on the Lie algebroid of G (Marrero et al. [14]). It would be interesting to extend this construction for a constrained Lagrangian system, with constraint distribution ∆ ⊂ AG, and to see if one could express such results in terms of a Lagrangian bisection of T * G, generated by an exact discrete Lagrangian on some N ⊂ G.
Finally, for continuous systems, Yoshimura and Marsden [24] showed that a variational principle, which they call the Hamilton-Pontryagin principle, is closely related to Dirac structures, and thus can be quite useful for studying systems with nonholonomic constraints and various degeneracies. In Stern [18], it was shown that a discrete Hamilton-Pontryagin principle describes the relationship between the generating-function and variational interpretations of the unconstrained discrete Lagrangian L : G → R. It would be interesting to see if this variational principle could be generalized to discrete constrained Lagrangians L : N ⊂ G → R, and how this might be connected to the discretization of Dirac structures and of the Courant algebroid. In this appendix, we will recall some key facts about bisections of Lie groupoids, which provide the technical underpinning for several concepts appearing elsewhere in this article. Most notably, we derive an expression for the tangent map of Lie groupoid multiplication. This expression, which appeared in Xu [23], is a crucial ingredient in the proof of the Theorem 5.1, which we employed in the variational formulation of discrete constrained Lagrangian mechanics. We also apply this result to present an alternative derivation of the multiplication map for the cotangent groupoid.  [11] defines a bisection to be the map B α having this property, rather than its image B; the definitions are equivalent.) Likewise, there is a β-section B β = (β| B ) −1 : Q → G, where α • B β = (β • B α ) −1 : Q → Q is a diffeomorphism. Furthermore, each bisection B ⊂ G defines a left action B : G → G and a right action r B : G → G on the groupoid, given on any g ∈ G by B (g) = B β (α(g)) g, r B (g) = gB α (β(g)) .
Given two bisections B 1 , B 2 ⊂ G, one can show that the product is again a bisection, and that the bisections of G in fact form a group. More generally, B ⊂ G is called a local bisection if the restricted maps α| B and β| B are local diffeomorphisms onto open sets U, V ⊂ Q, respectively. Analogously to the global case, there exists a local α-section B α : U → B such that β • B α : U → V is a diffeomorphism, as well as a local β-section (As before, an alternate but equivalent definition, cf. Mackenzie [11], takes a local bisection to be the map B α , rather than B itself.) Each local bisection B ⊂ G defines a local left action B : α −1 (V ) → α −1 (U ) and a local right action r B : β −1 (U ) → β −1 (V ), given by B = B β (α(g)) g, r B (g) = gB α (β(g)) .
It is also possible to define multiplication of local bisections; moreover, if i : G → G denotes the inversion map on G, then the inverse i(B) of a local bisection is again a local bisection. Thus, the local bisections of G form an inverse semigroup, which contains the group of global bisections as those elements with U = V = Q.
A.2. The tangent map of Lie groupoid multiplication.
A key fact about Lie groupoids is that, for every g ∈ G, there exists a local bisection B ⊂ G such that g ∈ B. (In general, though, there may not exist any global bisection through g.) Using this property, we may now state and prove the following theorem on the tangent map of multiplication in G.
A.3. Multiplication in the cotangent groupoid. Given a Lie groupoid G ⇒ Q with Lie algebroid AG → Q, we have already discussed the source and target maps, respectively denoted α and β, of the cotangent groupoid T * G ⇒ A * G. In this subsection, we discuss the multiplication map m, whose formulation depends on the properties of bisections. In particular, we derive an expression for this multiplication map using Theorem A.1.
Using these properties, we can now obtain the following explicit formula for the cotangent multiplication map.