More generally, I'm interested in the situation of Lagrangian mechanics. And actually my question is local, so you can work on $\mathbb R^n$ if you like. I will begin with some background on Lagrangian mechanics, and then recall the notion of Morse index in the positive-definite case. My final question will be whether there is a similar story in the indefinite case.

## Background on Lagrangian mechanics

Let $\mathcal N$ be a smooth manifold. A **Lagrangian** on $\mathcal N$ is a function $L: {\rm T}\mathcal N \to \mathbb R$, where ${\rm T}\mathcal N$ is the tangent bundle to $\mathcal N$. I will always suppose that the Lagrangian is **nondegenerate**, in the sense that when restricted to any fiber ${\rm T}_q\mathcal N$, the second derivative $\frac{\partial^2 L}{\partial v^2}$ is everywhere invertible (for $v\in {\rm T}_q\mathcal N$, $\frac{\partial^2 L}{\partial v^2}(v)$ makes sense as a map ${\rm T}_v({\rm T}_q\mathcal N) \to {\rm T}_v^*({\rm T}_q\mathcal N)$). In this case, the **Euler-Lagrange equations**
$$ \frac{\partial L}{\partial q}\bigl(\dot\gamma(t),\gamma(t)\bigr) = \frac{\rm d}{{\rm d}t}\left[ \frac{\partial L}{\partial v}\bigl(\dot\gamma(t),\gamma(t)\bigr)\right]$$
define a nondegenerate second order differential equation for $\gamma$ a parameterized path in $\mathcal N$.

An important example is when $\mathcal N$ is equipped with a (semi-)Riemannian metric, in which case the Euler-Lagrange equations specify that $\gamma$ is an arc-length-parameterized geodesic.

By nondegeneracy, a solution to the Euler-Lagrange equations is determined by its initial conditions, a point $\bigl(\dot\gamma(0),\gamma(0)\bigr) \in {\rm T}\mathcal N$. Thus, the Euler-Lagrange equations determine a smooth function $\text{flow}: {\rm T}\mathcal N \times \mathbb R \to \mathcal N \times \mathcal N \times \mathbb R$, which sends an initial condition and a duration to the triple (initial location, final location, duration). Actually, the function is only defined on an open neighborhood of the zero section of ${\rm T}\mathcal N \times \mathbb R$.

I will use the shorthand **path** to mean a smooth function $[0,T] \to \mathcal N$, i.e. a parameterized path of finite duration. A path is **classical** if it solves the Euler-Lagrange equations, so that classical paths are in bijection with points in (that open neighborhood of) ${\rm T}\mathcal N \times \mathbb R$. A classical path is **nonfocal** if near it the function $\text{flow}: {\rm T}\mathcal N \times \mathbb R \to \mathcal N \times \mathcal N \times \mathbb R$ is a local diffeomorphism. Thus a choice of nonfocal classical path of duration $T$ determines a function $\gamma: \mathcal O \times [0,T] \to \mathcal N$, where $\mathcal O \subseteq \mathcal N \times \mathcal N$, such that for each $(q_0,q_1) \in \mathcal O$, the path $\gamma(q_0,q_1,-)$ is classical with $\gamma(q_0,q_1,0) = q_0$ and $\gamma(q_0,q_1,T) = q_1$. Given a nonfocal classical path $\gamma$, the corresponding **Hamilton principal function** $S_\gamma: \mathcal O \to \mathbb R$ is given by:
$$S_\gamma(q_0,q_1) = \int_{t=0}^T L\left( \frac{\partial \gamma}{\partial t}(q_0,q_1,t), \gamma(q_0,q_1,t)\right){\rm d}t$$

Finally, given a classical path $\gamma: [0,T] \to \mathcal N$, there is a well-defined second-order linear differential operator $D: \gamma^*{\rm T}\mathcal N \to \gamma^*{\rm T}^*\mathcal N$, given by: $$ D_\gamma[\xi] = -\frac{\rm d}{{\rm d}t} \left(\frac{\partial^2 L}{\partial v^2} \frac{{\rm d}\xi}{{\rm d}t}\right) - \frac{\rm d}{{\rm d}t}\left( \frac{\partial^2 L}{\partial q \partial v}\xi\right) + \frac{\partial^2 L}{\partial v \partial q} \frac{{\rm d}\xi}{{\rm d}t} + \frac{\partial^2 L}{\partial q \partial q}\xi$$ The second derivatives of $L$ are evaluated at $(\dot\gamma(t),\gamma(t))$ and act as "matrices"; in particular, $\frac{\partial^2 L}{\partial v \partial q}$ and $\frac{\partial^2 L}{\partial q \partial v}$ are transpose to each other. These individual matrices require local coordinates to be defined, but $D_\gamma$ is well-defined all together if $\gamma$ is classical.

Then $\gamma$ is nonfocal iff $D_\gamma$ has trivial kernel among the space of sections of $\gamma^*{\rm T}\mathcal N \to [0,T]$ that vanish at $0,T$.

Of course, really what's going on is that for $(q_0,q_1) \in \mathcal N \times \mathcal N$, the space of paths of duration $T$ that start at $q_0$ and end at $q_1$ is an infinite-dimensional manifold. Using the Lagrangian $L$ we can define an **action** function on this manifold. The Euler-Lagrange equations assert that a path $\gamma$ is a critical point for this function, $S_\gamma$ is the value of the function, and the operator $D_\gamma$ is the Hessian at that point.

## The Morse index of a classical path

Recall the following fact. Let $\mathcal V$ be a vector space and $D: \mathcal V\otimes \mathcal V \to \mathbb R$ a symmetric bilinear form on $\mathcal V$. Then any subspace $\mathcal V_- \subseteq \mathcal V$ that is maximal with respect to the property that $D|_{\mathcal V_-}$ is negative-definite has the same dimension as any other such subspace. This dimension is the **Morse index** $\eta$ of the operator $D$ acting on $\mathcal V$.

Recall that there is a canonical pairing between sections of $\gamma^*{\rm T}\mathcal N$ and sections of $\gamma^*{\rm T}^*\mathcal N$ (pairing the vectors and covectors for each $t\in [0,T]$ gives a function on $[0,T]$, which we then integrate). By composing with this pairing, we can think of the operator $D_\gamma$ as a bilinear form on $\gamma^*{\rm T}\mathcal N$, and it is symmetric on the space of sections of $\gamma^*{\rm T}\mathcal N$ that vanish at the endpoints $0,T$.
Given a nonfocal classical path $\gamma$, its **Morse index** $\eta(\gamma)$ is the Morse index of $D_\gamma$ acting on such endpoint-zero sections.

Let $L$ be a Lagrangian on $\mathcal N$, and assume moreover that the matrix $\frac{\partial^2 L}{\partial v^2}$ is not just everywhere invertible but actually everywhere positive-definite (this is a coordinate-independent statement, even though the value of the matrix depends on coordinates). Then the Morse index of any nonfocal classical path is finite. (And conversely: if $\frac{\partial^2 L}{\partial v^2}$ is not positive-definite along $\gamma$, then the Morse index as defined above is infinite.)

Moreover, suppose that $\gamma: [0,T] \to \mathcal N$ is classical and nonfocal and choose $T' \in [0,T]$ such that the obvious restrictions $\gamma_1: [0,T'] \to \mathcal N$ and $\gamma_2: [T',T] \to \mathcal N$ are both nonfocal. Let $S_{\gamma_1}$ and $S_{\gamma_2}$ be the corresponding Hamilton-principle functions. Then $q = \gamma(T')$ is a nondegenerate critical point for $S_{\gamma_1}(\gamma(0),-) + S_{\gamma_2}(-,\gamma(T))$. Define its Morse index of $\eta(q)$ to be the number of negative eigenvalues of the Hessian of $S_{\gamma_1}(\gamma(0),-) + S_{\gamma_2}(-,\gamma(T))$ at $q$. Then the following is a fact:

$\eta(\gamma) = \eta(\gamma_1) + \eta(q) + \eta(\gamma_2)$

## My question

Is there a similar story when $\frac{\partial^2 L}{\partial v^2}$ is invertible but indefinite? More precisely:

Suppose that you are given a nondegenerate (but not convex on fibers) Lagrangian $L$ on a manifold $\mathcal N$. Is there a way to assign a (finite) number $\eta(\gamma)$ to each classical nonfocal path $\gamma$ such that $\eta(\gamma) = \eta(\gamma_1) + \eta(q) + \eta(\gamma_2)$, where $\gamma,\gamma_1,\gamma_2$ are as above, and $\eta(q)$ is the usual Morse index of $S_{\gamma_1}(\gamma(0),-) + S_{\gamma_2}(-,\gamma(T))$?

The starting idea would be to recall the fact that in the positive-definite case, $\eta(\gamma)$ counts with multiplicity the number of times $T' \in [0,T]$ such that the restriction $\gamma|_{[0,T']}$ is focal. (The multiplicity is given by the rank of the differential of the flow map.) This counting still makes sense in the indefinite case. So perhaps it can be used, and the signature of $S_{\gamma_1}(\gamma(0),-) + S_{\gamma_2}(-,\gamma(T))$ can be added in by hand?