{'fraction_non_alphanumeric': 0.058997905590462384, 'fraction_numerical': 0.01230868374415982, 'mean_word_length': 3.474625144175317, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Local convexity for second order differential equations on a Lie algebroid

A theory of local convexity for a second order differential equation (SODE) on a Lie algebroid is developed. The particular case when the SODE is homogeneous quadratic is extensively discussed.


Introduction
Lie algebroids and groupoids were fundamental mathematical objects in the research by K Mackenzie. In fact, an standard reference for these topics is his book [9]. On the other hand, the relation of Lie algebroids and groupoids with Physics is increasingly important, specially with classical and quantum mechanics and, particularly, with Lagrangian mechanics. Lagrangian mechanics on Lie algebroids. Lagrangian mechanics on Lie algebroids has deserved a lot of interest in recent years from the seminal paper by Weinstein [19]. The notion of a Lie algebroid [9] allows to discuss general Lagrangian systems beyond the ones defined on the tangent bundle of the configuration manifold. These include systems determined by Lagrangian functions on Lie algebras, Atiyah algebroids, action Lie algebroids...These systems appear, in a natural way, when one applies reduction by a symmetry Lie group (see [2,7,10,11,19]).
The typical definition of a mechanical Lagrangian function L : A → R on a Lie algebroid τ : A → Q is L(a) = K g (a) = 1 2 g(a, a), for a ∈ A, where g : A × Q A → R is a bundle metric on A or, more generally, L(a) = K g (a) − V (τ (a)) = 1 2 g(a, a) − V (τ (a)), for a ∈ A, with V ∈ C ∞ (Q). In the first case, L represents the kinetic energy on A induced by the bundle metric g and, in the second case, L is the difference of the kinetic energy and the potential energy induced by the real C ∞ -function V on Q.
In both cases, the solutions of the Euler-Lagrange equations for L (the dynamical equations) are the integral curves of a second order differential equation (a sode ) Γ L on A, that is, a vector field on A whose integral curves are admissible. This means that an integral curve γ : I → A of Γ L satisfies the following condition d dt where ρ : A → T Q is the anchor map of A. Moreover, in the first case when L is the kinetic energy induced by a bundle metric on A, Γ L is a homogeneous quadratic sode i.e., the (local) coefficients of Γ L in the generalized velocities are fiberwise homogeneous quadratic functions. Our motivation. The explicit integration of the sode Γ L is, in general, quite complicated. So, of particular interest, it is the construction of geometric integrators for Lagrangian systems using a discrete variational principle. In this direction, a lot of effort has been devoted to the case when the discrete Lagrangian function is defined on the cartesian product Q × Q of a smooth manifold Q (see [16,18]). Q × Q plays the role of a discretized version of the standard velocity phase space T Q and the discrete Lagrangian function L d : Q × Q → R is an approximation of the continuous Lagrangian function L : T Q → R. The discrete evolution operator is given by a smooth map ξ : Q × Q → Q × Q, (q 0 , q 1 ) → ξ(q 0 , q 1 ) = (q 1 , q 2 ) which inherits some of the geometric properties of the flow of the sode Γ L at a fixed sufficiently small time h > 0. For the comparison between ξ and the exact flow of Γ L at time h, it is crucial the construction of the exact discrete Lagrangian function whose discrete evolution is just the flow of Γ L at time h. For the construction of this discrete Lagrangian function, one must use (local) convexity results for the standard sode Γ L (see [16,18]). Note that T Q is just the Lie algebroid of the pair Lie groupoid Q × Q. So, when one considers the more general case of a continuous Lagrangian function defined on the Lie algebroid AG of a Lie groupoid G, then the Lie groupoid G plays the role of the discrete phase space. In fact, a theory on discrete Lagrangian mechanics on Lie groupoids have been developed in last years (see [12,13,17,19]). For the analysis of the error, and as in the standard case when the Lie groupoid is the pair groupoid Q×Q, it is very important the construction of the exact discrete Lagrangian function on the Lie groupoid G associated with a continuous Lagrangian function on the Lie algebroid AG of G. In turn, for the introduction of this discrete Lagrangian function, one must previously have a theory of local convexity for a sode on AG.
The aim of this paper is to provide this theory. The main ideas in the paper. For the previous purpose, we proceed as follows: (i) We prove appropiate convexity results for a sode which is defined in a special Lie algebroid: the vertical bundle of a fibration; (ii) We introduce a Lie algebroid morphism Ψ : V α → AG between the vertical bundle of the source map α : G → Q of the Lie groupoid G and AG, which is fiberwise bijective and (iii) We prove that given a sode Γ on AG, there exists a unique sodeΓ on V α which is Ψ-related with Γ and, then, we use 1.
The structure of the paper. The paper is structured as follows. In Section 2, we discuss local convexity results for an standard sode on the tangent bundle of a manifold. In Section 3, we extend these results for the more general case when the sode is defined on a Lie algebroid. In Section 4, we consider the particular case of a homogeneous quadratic sode on a Lie algebroid. Section 5 contains the conclusions and some comments on the future work. The paper ends with two appendices which contain the proofs of Theorems 2.1 and 2.2 and some basic results on Lie algebroids and groupoids. Relation with our preprint [14]. A part of the results in this paper (Sections 2 and 3) are contained in our unpublished preprint [14]. The reason is that we have decided to split this preprint in two different parts. The first one is this paper and, as you can see, it contains the results in [14] plus a discussion on the particular case of a homogeneous quadratic sode in a Lie algebroid. Moreover, another difference is that the results in Section 2 of this paper are presented in a slightly different way which is, in our opinion, clearer and more accurate. In particular, we include an analytical explicit proof of Theorem 2.2 (see Appendix A) which is missing in our preprint [14].
On the other hand, in the second part in which we split the preprint [14], we will introduce the discrete exact Lagrangian function associated with a continuous regular Lagrangian function on the Lie algebroid of a Lie groupoid and, in addition, we will discuss the variational error analysis in this setting (see [15]).

2.
Local convexity for standard second order differential equations Let Q be a smooth manifold, T Q its tangent bundle and T 2 Q the space of second jets of curves on Q. We will denote by τ Q : T Q → Q the canonical projection. As we know, from local coordinates (q i ) on Q, we can induce local coordinates (q i ,q i ) on T Q and (q i ,q i ,q i ) on T 2 Q.
A standard sode on Q is a subset S of T 2 Q. If the equation S is explicit, which means thatq i = ξ i (q,q), ∀i , then, using the canonical inclusion of T 2 Q in T T Q, S may be transformed to a vector field Γ on T Q, that is, S = imΓ. In fact, the local expression of Γ is Along this paper, we will assume that our sode is explicit and we will refer to it as the vector field Γ on T Q. Note that, in such a case, the integral curves of Γ are tangent lifts of curves in Q: the trajectories of the sode Γ. In fact, these curves t → (q i (t)) in Q satisfy the equations Therefore, a first convexity theorem for a sode may be deduced using the theory of explicit second order differential equations.
Theorem 2.1. Let Γ be a sode in Q and q 0 be a point of Q. Then, one may find a sufficiently small positive number h 0 , a family of tangent vectors of Q at q 0 , and two compact subsets C andC of Q and T Q, respectively, with q 0 ∈ C and v (h,q 0 ) ∈C, such that there exists a unique trajectory of Γ Proof. A proof of this result may be found in Appendix A.
Let Γ be a sode on Q. We will denote by Φ Γ the flow of Γ Here, D Γ is the open subset of R × T Q given by Moreover, we may introduce the exponential map associated with Γ at q 0 for the time h as follows We remark that the map exp Γ (0,q 0 ) is constant. However, we have the following result. Theorem 2.2. Let Γ be a sode in Q and q 0 a point in Q. We take a sufficiently small positive real number h and v (h,q 0 ) ∈ T q 0 Q as in Theorem 2.1. Then, Proof. A proof of this result may be found in Appendix A.
From Theorem 2.2, we have that there exist open subsets U 0 and U in D Γ (h,q 0 ) and Q, respectively, with v (h,q 0 ) ∈ U 0 and q 0 ∈ U, such that the map Next, we will consider the open subset D Γ h of T Q given by In addition, we may define the smooth map exp Γ h : is non-singular at v. Then, exp Γ h is also non-singular at v.
Proof. We must prove that the map . The first condition implies that ) and thus, using the second one, we conclude that As we know, if h > 0 is sufficiently small and q 0 ∈ Q then the map exp Γ (h,q 0 ) : . Therefore, using Lemma 2.3, we deduce the following result (i) The exponential map associated with Γ at time h The maps ⊆ T Q are called the exact retraction maps associated with Γ. We have that that is, the following diagram Remark 2.5. In some applications, it is useful to define the following map which is a local diffeomorphism since

Convexity theorems for second order differential equations on Lie algebroids
In this section, we will obtain a version of Theorem 2.4 for a sode on a general Lie algebroid A.
First of all, we will recall the definition of a sode on A (see, for instance, [7]). Let Γ be a vector field on the tangent bundle T Q of a manifold Q. Then, using (2.1), it is easy to prove that Γ is a sode if and only if This fact suggest us to introduce the definition of a sode on the Lie algebroid τ : and, in such a case, the trajectories of Γ are the projections, via τ : A → Q, of the integral curves of Γ. In other words, where d A f is the fiberwise linear function on A given by Let (q i ) be local coordinates on an open subset U ⊆ Q and {e α } a local basis of Γ(A), the space of sections of A, such that Denote by (q i , y α ) the corresponding local coordinates on A. Then, the local expression of a sode Γ is So, the integral curves of Γ satisfy the following system of differential equations Thus, we have not an explicit system of second order differential equations as in the case of an standard sode on T Q. However, we will prove some local convexity theorems for the sode Γ on A.
In fact, in Section 3.1, we will discuss the particular case when A is a special integrable Lie algebroid: the vertical bundle associated with a fibration. In such a case, we will prove a parametrized version of Theorem 2.4. Next, in Section 3.2, we will consider the more general case when A is the Lie algebroid AG associated with an arbitrary Lie groupoid G. In fact, we will see that a sode on AG induces a sode on the vertical bundle of the source map of G and, then, we will apply the results of the previous section. Finally, we will discuss the general case. For this purpose, we will use that for every Lie algebroid A there exists a (local) Lie groupoid whose Lie algebroid is A.
3.1. The particular case of the vertical bundle of a fibration. Consider a surjective submersion π : Q −→ M and the pair groupoid Q × Q ⇒ Q (see Appendix B) . The subset Gπ ⊂ Q × Q given by is a Lie subgroupoid of the pair groupoid. In consequence, the source and target maps are (q 1 , q 2 ) → q 1 and (q 1 , q 2 ) → q 2 , respectively, the identity map is q → (q, q) and the multiplication is given by (q 1 , q 2 )(q 2 , q 3 ) = (q 1 , q 3 ). The Lie algebroid of Gπ is the vector bundle whose fiber at a point q is with the anchor (0, v) → v, and hence it can be identified with the vertical bundle τ : V π = ker T π −→ Q, with the canonical inclusion as the anchor map and Lie bracket in the space of sections Γ(τ ) the restriction to Γ(V π) of the standard Lie bracket of vector fields.
On V π we can take coordinates as follows. We consider local coordinates (q i ) = (q a , q α ) in Q adapted to the submersion π, that is, π(q a , q α ) = (q a ). The coordinate vector fields {e α = ∂/∂q α } are a basis of local sections of V π, and hence we have coordinates (q a , q α , y α ) on V π, where y α are the components of a vector on such a coordinate basis. Thus, if ([[·, ·]], ρ) is the Lie algebroid structure on V π, it follows that ρ(e α ) = ∂ ∂q α and [[e α , e β ]] = 0.
This implies that the structure functions are for every a ∈ V π. In other words T a τ (Γ(a)) is the vertical vector a ∈ V π itself, and hence, if m = π(τ (a)) then the vector Γ(a) is tangent to T (π −1 (m)). It follows that a sode on V π is but a parametrized version of an ordinary sode, where the parameters are the coordinates on the base manifold M. In other words, it is a smooth family of ordinary sodes, one on each fiber of the projection π : Q → M.
This can also be easily seen in coordinates. Locally, such a sode vector field is The integral curves of Γ are the solutions of the differential equationṡ From this expression it is obvious that a sode on V π is locally a parametrized version of an ordinary sode, where the parameters are the coordinates (q a ) on the base manifold M.
On the other hand, V π is a regular submanifold of T Q. In fact, the canonical inclusion i V π : V π → T Q is an embedding. In addition, if q 0 is a point of Q then it is easy to prove that: (i) There exists an open subset W of Q, with q 0 ∈ W , and there exists an standard local sodeΓ on Q, which is defined in T W , such that Note that the local equations defining V π as a submanifold of T Q are y a = 0 and, thus, it is sufficient to takē ) ∈ Q is a trajectory ofΓ, π(σ(0)) = π(σ(h)) = m and m has local coordinates (q a 0 ) then, using that the trajectories ofσ satisfy the local equations: and q a (0) = q a (h) = q a 0 , we deduce that q a (t) = q a 0 , ∀t andσ is an integral curve of Γ |T (π −1 (m)) andσ is a trajectory of Γ |T (π −1 (m)) . Therefore, using Theorem 2.1 and the previous items 1 and 2, one may find an open neighborhood of q 0 in Q and a unique curveσ q 0 q 0 h ≡ σ q 0 q 0 h on it which connects the point q 0 with itself and such that it is trajectory ofΓ, for h enough small. Then, from the second condition, it follows that the curve σ q 0 q 0 h is contained in π −1 (π(q 0 )) and v (h,q 0 ) =σ q 0 q 0 h (0) ∈ V q 0 (π). Moreover, if we apply Theorem 2.4 to the standard sodeΓ, we deduce the following result , is a diffeomorphism. Here, τ V π : V π → Q is the canonical projection and Φ Γ is the flow of the vector field Γ on V π.
(ii) For every couple (q, q ′ ) ∈ (U × U) ∩ Gπ there exists a unique trajectory σ qq ′ h : [0, h] → π −1 (π(q)) of the sode Γ |T (π −1 (π(q))) which satisfies As in the standard case, we will denote by ⊆ V π the exact retraction maps associated with Γ. In other words, 3.2. The case of the Lie algebroid of a Lie groupoid. We will consider a Lie groupoid G ⇒ Q with source map α, target map β, and consider the fibration π ≡ α and the associated Lie algebroid V α as above. Let τ : AG −→ Q be the Lie algebroid of G, and denote by ρ its anchor (see Appendix B). Denote by Ψ the vector bundle map Ψ : V α −→ AG given by Ψ(v g ) = T l g −1 v g , for every v g ∈ V α, where l g −1 : α −1 (α(g)) → α −1 (β(g)) is the left-translation by g −1 ∈ G. This map is well defined since T α(T l g −1 v g ) = 0 and hence T l g −1 v g is α-vertical at the identity in β(g). The following commutative diagram illustrates the situation: This follows using that if X ∈ Γ(AG) and ← − X is the corresponding left invariant vector field on G, then ← − X is a section of the vector bundleτ : V α → G and, in fact, the space of sections of this vector bundle is locally generated by the left-invariant vector fields on G. In addition: where ρ is the anchor map of the Lie algebroid AG.

(see Appendix B).
On the other hand, given a sode Γ in AG there exists a unique sodeΓ in V α which is Ψ related to Γ, that is T Ψ •Γ = Γ • Ψ. Indeed, this is a special case of the following result, by taking into account that Ψ is a fiberwise bijective morphism of Lie algebroids. Proposition 3.2. Let τ 1 : E 1 −→ Q 1 and τ 2 : E 2 −→ Q 2 be Lie algebroids and let Ψ : E 1 −→ E 2 be a morphism of Lie algebroids which is fiberwise bijective. Given a sode vector field Γ 2 on the Lie algebroid E 2 there exists a unique sode vector field Γ 1 on the Lie algebroid E 1 such that T Ψ • Γ 1 = Γ 2 • Ψ.
Proof. We have to show that for every a 1 ∈ E 1 , there exists a unique v 1 ∈ T a 1 E 1 satisfying the equations Note that if v 1 , v ′ 1 ∈ T a 1 E 1 satisfy these conditions then v ′ 1 − v 1 ∈ Ker(T τ 1 ) and, since Ψ is fiberwise bijective and (T Ψ)(v 1 ) = (T Ψ)(v ′ 1 ), we conclude that v ′ 1 = v 1 . Next, we will see that one may find a vector v 1 ∈ T a 1 E 1 which satisfies the above equations.
The right hand side of this equation is vertical at the point Ψ(a 1 ), and since Ψ is fiberwise bijective it has a unique solution c 1 . Thus, the vector v 1 = Γ(a 1 )+ξ V (a 1 , c 1 ) is the solution for our equations.
Let Γ be a sode in the Lie algebroid AG of a Lie groupoid G. Denote byΓ the unique sode in V α which is Ψ-related with Γ. Note that the natural inclusion ι : AG → V α is a Lie algebroid morphism over the identity map ǫ : Q → G. So, AG is a Lie subalgebroid of the Lie algebroid V α. However, the restriction of a sode on V α to AG is not, in general, tangent to AG. Example 3.3. Suppose that G is a Lie group. Then, the Lie algebra g of G is the Lie algebroid of the Lie groupoid G (see Appendix B). Moreover, since the source map α : G → {e} is the trivial map (with e the identity element in G), we have that V α is just the tangent bundle T G of G and the Lie algebroid V α → G is the standard Lie algebroid τ G : T G → G. In addition, using the left trivialisation of T G we can identify T G with the product G × g. Under this identification, the natural inclusion ι : g → T G is given by ι : g → G × g, ξ → ι(ξ) = (e, ξ).
Proof. Using Theorem 3.1, we deduce that there exists a sufficiently small positive number h > 0, an open subsetŨ in V α, with v (h,q 0 ) ∈Ũ, and an open subset V of G, with ε(q 0 ) ∈ V , such that: (i) The exponential map ofΓ at h is a diffeomorphism. (ii) For every g, g ′ ∈ (V ×V )∩Gα, there exists a unique trajectory σ gg ′ h : [0, h] → α −1 (α(g)) ofΓ satisfying the following conditions Now, we take the open subsetŨ ∩ AG of AG. It is clear that v (h,q 0 ) ∈Ũ ∩ AG. Denote by ι : AG → V α the canonical inclusion. Then, the exponential map exp Γ h :Ũ ∩ AG ⊆ AG → G is given by where pr 2 : (V × V ) ∩ Gα → V ⊆ G is the canonical projection on the second factor. In fact, and it follows that X v = 0.
We conclude that there exists an open subset U ′ ⊆ AG, with v (h,q 0 ) ∈ U ′ , and an open subset U ′ ⊆ G, such that ε(q 0 ) ∈ U ′ and Next, using that ε : Q → G is a continuous map, we have that there exists an open subset W of Q such that q 0 ∈ W and ε(W ) ⊆ U ′ . So, α −1 (W ) and U = U ′ ∩α −1 (W ) are open subsets of G and ε(q 0 ) ∈ U, ε(α(U)) ⊆ U.
Thus, we may take U = (exp Γ h ) −1 (U) ⊆ AG, and (i) and the first part of (ii) in the theorem hold.
Finally, using that the sodeΓ is Ψ-related with the sode Γ and the fact that τ • Ψ = β •τ , we deduce the last part of the theorem.

We will denote by
They are the exact retraction maps associated with Γ at h.
Note that R e − h (g) = a ε(α(g))gh (0) =σ ε(α(g))gh (0) (3.3) and (3.4) The following diagram illustrates the situation The general case. In the general case, when we have a general Lie algebroid (E, [[ , ]], ρ), it is possible to construct a local Lie groupoid G integrating this Lie algebroid. This groupoid is local in the sense that the product is not necessarily defined on G 2 , but only locally defined near the identity section (see [4] for details).
In any case, Theorem 3.4 is a local result for points near of the identities and, therefore, it remains valid for general Lie algebroids.

4.
Homogeneous quadratic second order differential equations 4.1. The standard case. Let Γ be a sode on T Q and ∆ the Euler vector field on T Q. As we know, the flow of ∆ is (see, for instance, [8]). From (4.1), we have that the vector field Γ is homogeneous of weight 1 with respect to ∆. Anyway, in this paper, we will use the terminology, homogeneous quadratic sode, for the following reason. If the local expression of Γ is then, using that ∆ =q i ∂ ∂q i , it follows that ∆(Γ i ) = 2Γ i , for every i, or, equivalently, Γ i (q,q) = Γ i jk (q)q jqk , for every i. In other words, the (local) function Γ i is a fiberwise homogeneous quadratic polynomial function, for every i. In particular, this implies that Γ vanishes along the zero section of τ Q : T Q → Q. Thus, the trajectory of Γ with initial velocity 0 q ∈ T q Q (q ∈ Q) is the constant curve On the other hand, if is the trajectory of Γ with initial velocity v q ∈ T q Q and s is a sufficiently small real number, then the trajectory of Γ with initial velocity sv q is the homothetic reparametrization of c vq given by In particular, c vq (s) = c svq (1). q) . Therefore, in what follows, we will consider the starshaped open subset D Γ (1,q) of T q Q about 0 q ∈ T q Q given by

(4.2) Thus, if h is a sufficiently small positive number and
As in the general case of an standard sode we will denote by D Γ 1 the open subset of T Q defined by is an starshaped open subset of T Q about the zero section 0 : Q → T Q of T Q and we have the exponential map of Γ at h = 1, which we will simply denote by In the particular case of a homogeneous quadratic sode this map has some additional properties. In fact, using (4.2), it follows that for q ′ ∈ τ Q (D Γ 1 ), v q ′ ∈ D Γ 1 and t ∈ [0, 1]. On the other hand, as we know, the linear map is an isomorphism. So, we can identify the tangent space T 0 q ′ (D Γ 1 ) = T 0 q ′ (T Q) with the product T q ′ Q × T q ′ Q. Under this identification and using (4.3), we deduce that is just the identity map. Therefore, if q is a fixed point of Q, this implies that there exists an starshaped open subset U of T Q about the restriction to τ Q (U) of the zero section, with q ∈ τ Q (U), such that the exponential map is a diffeomorphism.

4.2.
The general case. Let G be a Lie groupoid over Q and Γ a sode on the Lie algebroid τ : AG → Q. Then, following the previous section, we can introduce in a natural way the notion of a homogeneous quadratic sode on AG. where ∆ is the Euler vector field of AG with global flow Let (q i ) be local coordinates on Q, {e α } a local basis of Γ(AG) and (q i , y α ) the corresponding local coordinates on AG. If the local expression of the sode Γ on AG is ∂ ∂y α , then, using that ∆ = y α ∂ ∂y α , it follows that Γ is homogeneous quadratic if and only if Γ α is a fiberwise homogeneous quadratic function on AG, for every α. This means that Γ α (q, y) = Γ α βγ (q)y β y γ . Next, we will prove that the unique sode on V α, which is Ψ-related with a homogeneous quadratic sode on AG, also is homogeneous quadratic.
Proposition 4.2. Let Γ be a homogeneous quadratic sode on AG andΓ the unique sode on V α which is Ψ-related with Γ. Then,Γ also is homogeneous quadratic.
Proof. We will proceed as follows: (i) We will see that the Lie bracket [∆,Γ] is a sode on the Lie algebroid V α, where∆ is the Euler vector field of the Lie algebroidτ : V α → G. (ii) We will prove that the sode [∆,Γ] is Ψ-related with Γ.
Thus, from Proposition 3.2, we will conclude that the result holds.
(i) Letf be a real C ∞ -function on G. Then, using (3.1) and the fact that∆ is ã τ -vertical vector field, we have that On the other hand, since the Lie derivative with respect to∆ of a fiberwise linear function on V α is just the same function, we deduce that This, from (3.1), implies (i).
Under the same hypotheses as in Proposition 4.2, we will denote by exp Γ h : U ⊆ AG → U ⊆ G the exponential map associated with Γ at h > 0 and for the point q 0 ∈ Q as in Theorem 3.4, that is, Using thatΓ is a homogeneous quadratic sode we can take h = 1 and U an starshaped open subset of AG about the restriction of the zero section to τ (U) ⊆ Q. We will denote by exp Γ : U ⊆ AG → U ⊆ G the corresponding map and we will prove the following result. Proposition 4.3. If exp Γ : U ⊆ AG → U ⊆ G is the exponential map associated with a homogeneous quadratic sode Γ on AG, we have that is the trajectory ofΓ with initial velocity v ε(q) . Moreover, under the canonical identifications, is just the identity map.
Proof. The sodeΓ on the Lie algebroidτ : V α → G may be considered as a smooth family of standard sodes, one on each fiber of the source map α : G → Q.
In addition, each one of these sodes is homogeneous quadratic. So, using the results in Section 4.1, we deduce that (4.4) holds. Now, the linear map is a linear isomorphism, where 0 : Q → AG is the zero section. Thus, we can identify On the other hand, the linear map also is a linear isomorphism and we can identify T ε(q) G with the same product space Under the previous identifications and using (4.4), we conclude that is the identity map.

Conclusions and future work
We have developed a local convexity theory for a sode Γ on the Lie algebroid AG of a Lie groupoid G. In fact, we introduce the exponential map associated with Γ as a local diffeomorphism between AG and G. The particular case when Γ is homogeneous quadratic is discussed in the last part of the paper. Now, in the presence of a mechanical continuous Lagrangian function L : AG → R, we can consider the sode Γ L on AG whose trajectories are the solutions of the Euler-Lagrange equations for L (see [7,10]). Then, we can apply the results in this paper to Γ L and we can introduce, in a natural way, a discrete Lagrangian function L e h : G → R on G, with h a sufficiently small positive real number. L e h is the exact discrete Lagrangian function associated with L (see [14,15]). In addition, if we take a discrete Lagrangian function L d : G → R which is an approximation of order r of L e h , then one may prove that the discrete scheme induced by L d is an approximation of the continuous flow Γ L of order r (see [14,15]). In other words, L e h is crucial to discuss the variational error analysis.
On the other hand, the results in Section 2 of this paper also play an important role in the definition of the exponential map and the exact discrete submanifold associated with an standard mechanical nonholonomic system. In turn, the previous objects allow to introduce the exact discrete nonholonomic equations (see [1] In this appendix, we will give a proof of Theorems 2.1 and 2.2. For this purpose, we will use some standard results on second order differential equations on R n (see [6]). Let be a system of second order differential equations on R × R n , with ξ i a real C ∞function on a compact subset of R × R 2n which contains the origin. We will consider the problem of the existence of solutions satisfying the boundary conditions q i (0) = 0, q i (h 0 ) = 0, ∀i, with h 0 > 0. In this direction, using Corollary 4.1 of Chapter XII in [6], we deduce the following result.
q ≤ R, q ≤Ṙ such that f satisfies a Lipschitz condition with respect to q,q of the form ξ(t, q j 1 ,q j 1 ) − ξ(t, q j 2 ,q j 2 ) ≤ C q 2 − q 1 +Ċ q 2 −q 1 with Lipschitz constants C,Ċ, so small that In addition, suppose that ξ(t, q j ,q j ) ≤ M and that Then, the system of second order differential equations for all j has a unique solution satisfying We will also use the following classical result.
Proposition A.2. Let f : U ⊆ R n → R n be a C ∞ -smooth map, with U a convex open subset of R n and suppose that there exists a positive constant C > 0 such that Then, we have that We consider the corresponding local coordinates (τ −1 Since Γ is a sode, we also have that Then, the trajectories of Γ inŨ are the solutions of the system of second order differential equations Now, if we take 0 < R < ǫ and 0 <Ṙ then, using that ξ i is a real C ∞ -function on B(0; ǫ) × R n , we deduce that there exist positive constants C,Ċ > 0 satisfying d 1 ξ(q,q) ≤ C, d 2 ξ(q,q) ≤Ċ, for (q,q) ∈B(0; R) ×B(0;Ṙ), whereB(0; R) andB(0;Ṙ) are the closed balls in R n of center the origin and radius R andṘ, respectively.
Next, we choose a sufficiently small positive number h 0 satisfying Now, if we take h ∈ R, 0 < h ≤ h 0 and the compact subsets C andC of Q and T Q, respectively, given by then, using Theorem A.1, we conclude that there exists a unique trajectory σ q 0 q 0 h : . Therefore, it is sufficient to define v (h,q 0 ) :=σ q 0 q 0 h (0) and we end the proof of the result.
Next, we will prove Theorem 2.2.
Thus, from Lemma 3.1, Chapter XII in [6], we deduce that the matriz U (q 0 ,q 0h ) (p), with 0 < p ≤ p 0 , is regular, for every h. Therefore, it is sufficient to take h = p, with 0 < p ≤ p 0 , and the result is proved.

Appendix B. Lie algebroids and groupoids
First of all, we will recall the definition of a Lie groupoid and some generalities about them are explained (for more details, see [9]).
A groupoid over a set M is a set G together with the following structural maps: • A pair of maps α : G → M, the source, and β : G → M, the target. Thus, an element g ∈ G is thought as an arrow from q 0 = α(g) to q 1 = β(g) in M The maps α and β define the set of composable pairs G 2 = {(g, h) ∈ G × G/β(g) = α(h)}.
• q 0 = α(g) = β(g −1 ) g −1 f f A groupoid G over a set Q will be denoted simply by the symbol G ⇒ Q.
The groupoid G ⇒ Q is said to be a Lie groupoid if G and Q are manifolds and all the structural maps are differentiable with α and β differentiable submersions. If G ⇒ Q is a Lie groupoid then m is a submersion, ε is an immersion and i is a diffeomorphism. Moreover, if q ∈ Q, α −1 (q) (resp., β −1 (q)) will be said the α-fiber (resp., the β-fiber) of q.
Typical examples of Lie groupoids are: the pair or banal groupoid Q×Q over Q, a Lie group G (as a Lie groupoid over a single point), the Atiyah groupoid (Q × Q)/G (over Q/G) associated with a free and proper action of a Lie group G on Q and the Lie groupoid Gπ associated with a fibration π : Q → M given by Gπ = {(q, q ′ ) ∈ Q × Q/π(q) = π(q ′ )}, (it is a Lie subgroupoid of the pair groupoid Q × Q ⇒ Q).
Note that l −1 g = l g −1 and r −1 g = r g −1 . A vector fieldX on G is said to be left-invariant (resp., right-invariant) if it is tangent to the fibers of α (resp., β) andX(gh) = (T h l g )(X(h)) (resp.,X(gh) = (T g r h )(X(g))), for (g, h) ∈ G 2 . Now, we will recall the definition of the Lie algebroid associated with G. We consider the vector bundle τ : AG → Q, whose fiber at a point q ∈ Q is A q G = V ε(q) α = Ker(T ε(q) α). It is easy to prove that there exists a bijection between the space Γ(τ ) of sections of τ : AG → Q and the set of left-invariant (resp., right-invariant) vector fields on G. If X is a section of τ : AG → Q, the corresponding left-invariant (resp., right-invariant) vector field on G will be denoted by ← − X (resp., − → X ), where ← − X (g) = (T ε(β(g)) l g )(X(β(g))), (B.1)