1 Introduction

Several central problems in Classical Mechanics involve unbounded trajectories of a phase flow or, more generally, of a one-parameter family of phase flows. Hamiltonian PDE’s, e.g. reaction–diffusion equations in one space dimension, such as fifth-order Kortweg–De-Vries (KdV), nonlinear Schrödinger (NLS) or longwave–shortwave resonance (LW–SW) equations, have the property that their steady part is a finite-dimensional Hamiltonian system. For these Hamiltonian systems, solitary wave solutions can be characterised as homoclinic and heteroclinic orbits, namely solutions parametrized by the whole real line and joining a saddle point to itself in the former case, two different saddle points in the latter case. In this respect, the spectral problem associated with the linearization around a given homoclinic motion leads to a one-parameter family of linear Hamiltonian systems.

Central configurations in the N-body problem with a general singular \(\alpha \)-homogeneous weak self-interacting potential (including the gravitation case) give rise to special asymptotic solutions (e.g. homographic as well as a class of colliding or parabolic motions) that represent an interesting class of motions parametrized by unbounded intervals for which the index theory developed in this paper could be successfully employed. (We refer the reader to [8, 22] and references therein). In the classical case of orbits parametrized by bounded intervals (for instance in the study of periodic orbits) spectral flow formulas have been recently used in order to tackle challenging linear stability problems. (We refer the interested reader to [6, 7, 19,20,21] and references therein). Except these results in which an index theory for homoclinic motions was developed, we only mention the paper [11], where the authors assigned a geometrical index to any unbounded motion of a Hamiltonian system, and [33] where a suitable spectral flow formula for a one-parameter family of Hamiltonian systems under homoclinic boundary conditions was proved.

Two are the main ingredients of the index theory developed in this paper. The first one is essentially based on a symplectic invariant known in literature as Maslov index, which, roughly speaking, counts algebraically the intersections between a (continuous) curve of Lagrangian subspaces \(\ell \) and a transversally oriented sub-variety (the singular Maslov cycle \(\Sigma (L_0)\)) of a fixed Lagrangian subspace \(L_0\) in the Lagrangian Grassmannian manifold. A strictly related notion that we essentially consider, is the Maslov index for (ordered) pairs of Lagrangian paths. (Cf. Sect. 3, [10, 24, 31] and reference therein) (Fig. 1).

Fig. 1
figure 1

\(\Sigma (L_0)\) is the Maslov cycle (or train) with vertex \(L_0\). The (red) curve \(\ell \) represents a smooth path of Lagrangian subspaces. The black curve inside the cycle \(\Sigma (L_0)\) represents the (singular) higher codimensional stratum (color figure online)

The second key ingredient is a well-known topological invariant termed spectral flow. The spectral flow is an integer-valued homotopy invariant for paths of selfadjoint Fredholm operators that was introduced by Atiyah, Patodi and Singer in [2] in their investigation of index theory on manifolds with boundary. Roughly speaking, it counts the net number of eigenvalues which pass through the zero in the positive direction when the parameter travels along the whole interval. Otherwise stated is the integer given by the number of negative eigenvalues that becomes positive minus the number of positive that become negative when the parameter runs along the whole interval. A related notion that we shall use is that of \(\varepsilon \) -spectral flow (cf. [10] and references therein), denoted by \(\varepsilon \)-\({{\mathrm{sf}}}\) which counts the number of eigenvalues \(\lambda \) crossing the line \(\lambda =\varepsilon >0\) with sign. Due to its central importance in the (symplectic) Sturm theory (cf. [5]), in the study of conjugate and focal points along geodesics in semi-Riemannian manifolds (cf. [17, 26, 27, 29] and references therein), as well as grading the Floer complex in Floer homology (cf. [3] and references therein), only to mention very few of them, the literature on the subject is very broad. Among all of them we found particularly interesting and elegant at the same time the following papers that represent our basic references: [9, 10, 12, 24, 28, 32, 35]. Quoting the masterpiece of V.I. Arnol’d [4], the idea behind the spectral flow formula can be masterfully resumed by the following few lines

[...] It turned out that there appeared in the asymptotic formulas certain integers, reflecting homological properties of curves on surfaces of the phase space and closely related to the Morse indices of the corresponding variational problems.

This deep sentence essentially summarizes the content of this paper in the case of Hamiltonian systems and motions parametrized by (un)bounded intervals. So far, several constructions of the Maslov index and related indices (e.g the Maslov-type, the Conley–Zehnder, Hörmander or four-fold, Kashiwara or triple, Leray and Wall index, just to mention only a few of them) were constructed. We refer to [10, 23, 31] and references therein for an exhaustive account on the subject. In the present paper, we shall use the construction given in [10] (cf. also [31]), where the authors associate a Maslov index to any ordered pair of continuous (and piecewise smooth) paths of Lagrangian subspaces, by assigning an integer which heuristically counts algebraically (namely with signs and multiplicities) the number of non-trivial intersections between the paths of Lagrangian subspaces.

The paper is organized as follows. Section 1 is devoted to describe the problem, to introduce the building blocks of the index theory constructed in the paper as well as to state and to give an account of the ideas behind the proof of the main results. Section 2 is dedicated to recall as well as to describe the main properties of the Maslov index for pairs as well as of the spectral flow for paths of closed selfadjoint Fredholm operators, which are behind the notion of the geometrical and spectral index, respectively. Section 3, which represents the core of the paper, is devoted to prove the main results stated in Sect. 1 whose proofs are scattered along the whole of section.

2 Description of the problem and main results

The goal of this section is to introduce the dynamical framework in order to describe the problem as well as the main definitions and ingredients of the index theory both in the unbounded and bounded case. We conclude this section by stating the main results and discussing the principal consequences of the index theory constructed in the paper.

2.1 Index theory for unbounded orbits

Given the \(\mathscr {C}^2\)-Hamiltonian function \(H: \mathbb {R}\times \mathbb {R}^{2n} \rightarrow \mathbb {R}\), we start to consider the Hamiltonian system

$$\begin{aligned} w'(t)=J\, \nabla H\big (t,w(t)\big ), \qquad t \in \mathbb {R}\end{aligned}$$
(1.1)

where \('\) denotes the derivative with respect to the (time) t variable, \( \nabla \) the gradient with respect to the second variable and where J is the standard complex structure

$$\begin{aligned} J= \begin{bmatrix} 0&\quad -I_n\\ I_n&\quad 0 \end{bmatrix}. \end{aligned}$$

We assume that \(p, q \in \mathbb {R}^{2n}\) are two restpoints (or equilibria) for the Hamiltonian vectorfield; thus in particular

$$\begin{aligned} \nabla H(t, p)= \nabla H(t, q)=0 \qquad \forall \, t \in \mathbb {R}. \end{aligned}$$

In the rest of the paper, we always assume that they are hyperbolic, in the sense that the spectrum of the Hessian matrix of H at p and q is off the imaginary axis, namely

$$\begin{aligned} \sigma \big ( D^2 H(\cdot ,p)\big ) \cap i \mathbb {R}= \sigma \big ( D^2 H(\cdot ,q)\big ) \cap i \mathbb {R}= \emptyset . \end{aligned}$$

A heteroclinic connection between p and q is a solution of Eq. (1.1) satisfying the following asymptotic (boundary) conditions

$$\begin{aligned} \lim _{t\rightarrow -\infty }w(t)=p \quad \text { and } \quad \lim _{t \rightarrow +\infty }w(t)=q. \end{aligned}$$

In the particular case in which the orbit is asymptotic both in the past and in the future to the same equilibrium point, namely

$$\begin{aligned} \quad \lim _{|t|\rightarrow +\infty }w(t)=p\quad \Big (\text {or } \quad \lim _{|t| \rightarrow +\infty }w(t)=q\Big ), \end{aligned}$$

we shall refer to w as homoclinic solution at p (or q), respectively (Fig. 2).

Fig. 2
figure 2

On the left is sketched a heteroclinic connection w between the two saddle points p and q. The (red) punctured curve represents the unstable manifold of the point p and the (blue) dashed curve represents the stable manifold of the point q. On the right is drawn a homoclinic orbit at p (color figure online)

The other class of unbounded motions that we introduce, are termed future halfclinic solutions (resp. past halfclinic solutions). Let L be a Lagrangian subspace and let \(H: [0,+\infty ) \times \mathbb {R}^{2n} \rightarrow \mathbb {R}\) be a \(\mathscr {C}^2\)-function. A future halfclinic solution at q is a solution of the asymptotic boundary value problem (Fig. 3)

$$\begin{aligned} {\left\{ \begin{array}{ll} w'(t)=J\, \nabla H\big (t,w(t)\big ), \qquad t \in (0,+\infty )\\ w(0) \in L \ \text {and} \ \lim _{t \rightarrow +\infty }w(t)=q. \end{array}\right. } \end{aligned}$$
Fig. 3
figure 3

A past halfclinic orbit (solid green line) between p and L and a future halfclinic orbit (dashed blue line) between L and q (color figure online)

Analogously, if \(H: (-\infty ,0] \times \mathbb {R}^{2n} \rightarrow \mathbb {R}\) is of class \(\mathscr {C}^2\), we define a past halfclinic solution at p as a solution of the following asymptotic boundary value problem

$$\begin{aligned} {\left\{ \begin{array}{ll} w'(t)=J\, \nabla H\big (t,w(t)\big ), \qquad t \in (-\infty ,0)\\ \lim _{t \rightarrow -\infty }w(t)=p \ \text {and} \ w(0) \in L.\ \end{array}\right. } \end{aligned}$$

By linearizing Eq. (1.1) along the h-clinic solution w (where h- stands for hetero or homo- or half), we end-up with the following linear Hamiltonian system

$$\begin{aligned} {\left\{ \begin{array}{ll} z'(t)=J B(t)\, z(t), \qquad t \in \mathbb {R}\\ \lim _{t \rightarrow +\infty } z(t)=0 \ \text {and} \ \lim _{t \rightarrow -\infty } z(t)=0 \end{array}\right. } \end{aligned}$$

in the heteroclinic/homoclinic case and with

$$\begin{aligned} {\left\{ \begin{array}{ll} z'(t)=J B(t)\, z(t), \qquad t \in [0,+\infty ) \\ z(0) \in L \text { and } \lim _{t \rightarrow +\infty } z(t)=0 \end{array}\right. }\quad \left( \text {resp. } {\left\{ \begin{array}{ll} z'(t)=J B(t)\, z(t),\qquad t \in (-\infty ,0] \\ \lim _{t \rightarrow -\infty } z(t)=0 \text { and } z(0) \in L \end{array}\right. }\right) \end{aligned}$$

in the future (resp. past) halfclinic case. Denoting by \(\gamma _{\tau }\) the matrix solution of the Hamiltonian initial value problem given in Eq.  (1.1) such that \(\gamma _{\tau }(\tau )=I\), we recall the stable and the unstable subspaces are respectively given by

$$\begin{aligned} E^s(\tau )=\left\{ v \in \mathbb {R}^{2n}|\lim _{t\rightarrow +\infty } \gamma _{\tau }(t)\,v=0\right\} \text { and } E^u(\tau ):=\left\{ v \in \mathbb {R}^{2n}|\lim _{t\rightarrow -\infty } \gamma _{\tau }(t)\,v=0\right\} . \end{aligned}$$

Let us now consider the constant solutions of the Hamiltonian system given in Eq. (1.1) at the restpoints pq. Denoting by \(B(-\infty )\) and by \(B(+\infty )\) the linearization of \(\nabla H\) at (the constant solutions) p and q respectively, we get

$$\begin{aligned} z'(t)=JB(\pm \infty )\, z(t), \qquad t \in \mathbb {R}\end{aligned}$$

and, by the hyperbolicity assumption on p and q, we get \(\sigma \big (JB(\pm \infty )\big ) \cap i \mathbb {R}= \emptyset \). We let \(S(t):=JB(t)\), \(S(\pm \infty ):=JB(\pm \infty )\), and we set

$$\begin{aligned}&E^s(\pm \infty ):=\left\{ v \in \mathbb {R}^{2n}|\lim _{t\rightarrow +\infty } \exp \big (t S(\pm \infty )\big )v=0\right\} \text { and }\\&E^u(\pm \infty ):=\left\{ v \in \mathbb {R}^{2n}|\lim _{t\rightarrow -\infty }\exp \big (t S(\pm \infty )\big )v=0\right\} . \end{aligned}$$

The invariant stable and unstable subspaces defined above are Lagrangian subspaces (cf., for instance, [11, 33] and references therein) and the following convergence result holds:

$$\begin{aligned} \lim _{\tau \rightarrow +\infty }E^s(\tau )=E^s(+\infty ) \quad \text { and } \quad \lim _{\tau \rightarrow -\infty } E^u(\tau )= E^u(-\infty ). \end{aligned}$$

(Cf. [1, Proposition 1.2]). Following authors in [10] to each ordered pair of Lagrangian paths

$$\begin{aligned} \tau \longmapsto \big (E^s(\tau ),E^u(-\tau ) \big ), \quad \tau \longmapsto \big (E^s(\tau ),L\big ) \quad \text {and finally } \tau \longmapsto \Big (L,E^u(-\tau )\Big ) \end{aligned}$$

we can assign an integer known as Maslov index of the pair \({{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\) which heuristically counts the nontrivial intersections (with sign) between the paths defining the pair when the parameter \(\tau \) varies (Cf. Sect. 2, for the definition).

Remark 1.1

Several constructions for the Maslov index are available in the literature, but in this paper we essentially follows the ones given by authors in [4, 10, 24, 31] and especially by Cappell, Lee & Miller in [10].

Inspired by [13], we are now ready to associate to any h-clinic solution, the geometrical index.

Definition 1.2

We define the geometrical index of the

  • heteroclinic or homoclinic orbit w, as the integer given by

    $$\begin{aligned} {{\mathrm{\iota }}}(w):=-{{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\Big (E^s(\tau ),E^u(-\tau ); \tau \in [0,+\infty )\Big ); \end{aligned}$$
  • future halfclinic orbit w between L and q, as the integer given by

    $$\begin{aligned} {{\mathrm{\iota }}}(w):=-{{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\Big (E^s(\tau ),L; \tau \in [0,+\infty )\Big ); \end{aligned}$$
  • past halfclinic orbit w between p and L, as the integer defined by

    $$\begin{aligned} {{\mathrm{\iota }}}(w):=-{{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\Big (L,E^u(-\tau ); \tau \in [0,+\infty )\Big ). \end{aligned}$$

Let now \(H:[0,1] \times \mathbb {R}\times \mathbb {R}^{2n}\rightarrow \mathbb {R}\) be a continuous map such that \(H_\lambda :=H(\lambda , \cdot ,\cdot ): \mathbb {R}\times \mathbb {R}^{2n} \rightarrow \mathbb {R}\) is of class \(\mathscr {C}^2\) for all \(\lambda \in [0,1]\) and its derivatives depend continuously on \(\lambda \). We consider the one-parameter family of Hamiltonian systems

$$\begin{aligned} w'(t)=J\, \nabla H_{\lambda }\big (t,w(t)\big ), \qquad t \in \mathbb {R}. \end{aligned}$$
(1.2)

For each \(\lambda \in [0,1]\), let \(p_\lambda , q_\lambda \in \mathbb {R}^{2n}\) such that

$$\begin{aligned} \nabla H_\lambda \big (t,p_\lambda \big )=\nabla H_\lambda \big (t,q_\lambda \big )=0, \qquad \forall \, (\lambda ,t) \in [0,1] \times \mathbb {R}\end{aligned}$$

we assume that they are hyperbolic restpoints and let us denote by \(w_\lambda \) the heteroclinic connection between \(p_\lambda \) and \(q_\lambda \). Furthermore, let \(\lambda \mapsto L_\lambda \) be a continuous path of Lagrangian subspaces and we denote by \(w_\lambda \) the past halfclinic connection between \(p_\lambda \) and \(L_\lambda \) and by \(w_\lambda \) the future halfclinic connection between \(L_\lambda \) and \(q_\lambda \). By linearizing Eq.  (1.2) along the h-clinic solution \(w_\lambda \) we get the following linear Hamiltonian system

$$\begin{aligned} {\left\{ \begin{array}{ll} z'(t)=J B_\lambda (t)\, z(t) \qquad t \in \mathbb {R}\\ \lim _{t \rightarrow +\infty } z(t)=0 \ \text {and} \ \lim _{t \rightarrow -\infty } z(t)=0 \end{array}\right. } \end{aligned}$$
(1.3)

in the heteroclinic/ homoclinic case and

$$\begin{aligned} {\left\{ \begin{array}{ll} z'(t)=J B_\lambda (t)\, z(t) \qquad t \in [0,+\infty ) \\ z(0) \in L_\lambda \text { and } \lim _{t \rightarrow +\infty } z(t)=0 \end{array}\right. }\quad \left( \text {resp. }{\left\{ \begin{array}{ll} z'(t)=J B_\lambda (t)\, z(t)\qquad t \in (-\infty ,0] \\ \lim _{t \rightarrow -\infty } z(t)=0 \text { and } z(0) \in L_\lambda \end{array}\right. }\right) \nonumber \\ \end{aligned}$$
(1.4)

in the future (resp. past) halfclinic case. Denoting by \(\gamma _{(\tau ,\lambda )}\) the matrix solution of the Hamiltonian system given in Eq. (1.2), such that \(\gamma _{(\tau ,\lambda )}(\tau )=I\), we recall the stable and the unstable subspaces are respectively given by

$$\begin{aligned}&E^s_{\lambda }(\tau ):=\left\{ v \in \mathbb {R}^{2n}|\lim _{t\rightarrow +\infty } \gamma _{(\tau ,\lambda )}(t)\,v=0\right\} \text { and }\\&E^u_{\lambda }(\tau ):=\left\{ v \in \mathbb {R}^{2n}|\lim _{t\rightarrow -\infty } \gamma _{(\tau ,\lambda )}(t)\,v=0\right\} . \end{aligned}$$

Let us now consider the constant solutions of the Hamiltonian system given in Eq. (1.2) at the restpoints \(p_\lambda ,q_\lambda \). By linearizing along them and denoting by \(B_\lambda (-\infty )\) and by \(B_\lambda (-\infty )\) the linearization of \(\nabla H_\lambda \) along the (constant solutions) \(p_\lambda \) and \(q_\lambda \) respectively, we get

$$\begin{aligned} z'(t)=JB_{\lambda }(\pm \infty )\, z(t), \qquad t \in \mathbb {R}\end{aligned}$$

and, by the hyperbolicity of \(p_\lambda \) and \(q_\lambda \), for each \(\lambda \in [0,1]\), \(\sigma \big (JB_\lambda (\pm \infty )\big ) \cap i \mathbb {R}= \emptyset \). We let \(S_\lambda (t):=JB_\lambda (t)\) and \(S_\lambda (\pm \infty ):=JB_\lambda (\pm \infty )\). Let us consider the continuous two-parameters family of Hamiltonian matrices \(S:[0,1] \times \mathbb {R}\rightarrow \mathrm {Mat}\,(2n, \mathbb {R})\) and assume that:

(H1) :

There exists two continuous paths that will be denoted by \(\lambda \mapsto S_\lambda (+\infty )\) and \(\lambda \mapsto S_\lambda (-\infty )\) such that

$$\begin{aligned} S_\lambda (+\infty )=\lim _{t\rightarrow +\infty }S(\lambda ,t) \quad \text { and } \quad S_\lambda (-\infty )=\lim _{t\rightarrow -\infty } S(\lambda , t), \qquad \lambda \in [0,1] \end{aligned}$$

uniformly with respect to \(\lambda \). Moreover for every \(\lambda \in [0,1]\) the matrices \(S_\lambda (\pm \infty )\) are hyperbolic.

We set

$$\begin{aligned}&E_\lambda ^s(\pm \infty ):=\left\{ v \in \mathbb {R}^{2n}|\lim _{t\rightarrow +\infty } \exp \big (t S_\lambda (\pm \infty )\big )v=0\right\} \text { and }\\&E_\lambda ^u(\pm \infty ):=\left\{ v \in \mathbb {R}^{2n}|\lim _{t\rightarrow -\infty }\exp \big (t S_\lambda (\pm \infty )\big )v=0\right\} . \end{aligned}$$

Under the assumption (H1), the invariant stable and unstable subspaces defined above are Lagrangian subspaces (cf. Lemma 3.1) and by invoking [1, Proposition 1.2], the following convergence result holds

$$\begin{aligned} \lim _{\tau \rightarrow +\infty }E_\lambda ^s(\tau )=E_\lambda ^s(+\infty ) \quad \text { and } \quad \lim _{\tau \rightarrow -\infty } E_\lambda ^u(\tau )= E_\lambda ^u(-\infty ). \end{aligned}$$

To the linearized Hamiltonian system given in Eqs.  (1.3) and (1.4), we associate respectively the closed selfadjoint Fredholm operators

$$\begin{aligned} A_\lambda :=-J \dfrac{d}{dt}- B_\lambda (t) : \mathscr {D}(A_\lambda ) \subset L^2(\mathbb {R};\mathbb {R}^{2n}) \rightarrow L^2(\mathbb {R};\mathbb {R}^{2n})\text { and }\\ A^+_\lambda :=-J \dfrac{d}{dt}- B_\lambda (t) : \mathscr {D}(A^+_\lambda ) \subset L^2([0,+\infty );\mathbb {R}^{2n}) \rightarrow L^2([0,+\infty );\mathbb {R}^{2n})\\ \left( \text {resp. } A^-_\lambda :=-J \dfrac{d}{dt}- B_\lambda (t) : \mathscr {D}(A^-_\lambda ) \subset L^2((-\infty ,0];\mathbb {R}^{2n}) \rightarrow L^2((-\infty ,0];\mathbb {R}^{2n})\right) \end{aligned}$$
(1.5)

where \(\mathscr {D}(A_\lambda )=W^{1,2}(\mathbb {R};\mathbb {R}^{2n})\) and \(\mathscr {D}(A_\lambda ^\pm )= W_\lambda ^\pm \) for

$$\begin{aligned}&W_\lambda ^+:=\left\{ u \in W^{1,2}([0,+\infty ); \mathbb {R}^{2n})| u(0) \in L_\lambda \right\} \text { and } \\&W_\lambda ^-:=\left\{ u \in W^{1,2}((-\infty ,0]; \mathbb {R}^{2n})| u(0) \in L_\lambda \right\} . \end{aligned}$$

Denoting by \(\mathscr {CF}^{sa}(V)\) the space of all closed selfadjoint Fredholm operators on the (real separable) Hilbert space V, we have three well-defined families of closed selfadjoint Fredholm operators

$$\begin{aligned}&A:[0,1] \rightarrow \mathscr {CF}^{sa}\big (L^2(\mathbb {R}, \mathbb {R}^{2n})\big ) \text { and }\\&A^+:[0,1] \rightarrow \mathscr {CF}^{sa}\big (L^2([0,+\infty ), \mathbb {R}^{2n})\big ) \\&\quad \Big (\text {resp. } A^-:[0,1] \rightarrow \mathscr {CF}^{sa}\big (L^2((-\infty ,0], \mathbb {R}^{2n})\big )\Big ). \end{aligned}$$

It is easy to check that \(A,A^+, A^-\) are actually (gap) continuous. Now, if \(p_\lambda ,q_\lambda \) are two families of hyperbolic restpoints and \(w_\lambda \) is a heteroclinic between them, we define the spectral index of \(w_\lambda \) as minus the spectral flow of A (cfr. Sect. 2.2), i.e.

$$\begin{aligned} {{\mathrm{i_{\mathrm{spec}}}}}(w_\lambda ; \lambda \in [0,1]):=-{{\mathrm{sf}}}(A_\lambda ; \lambda \in [0,1]) \end{aligned}$$

and analogously if \(L \in \mathscr {C}^0\big ([0,1]; \Lambda (n)\big )\) and \(w_\lambda \) is either a future halfclinic between \(L_\lambda \) and p (resp. a past halfclinic between \(q_\lambda \) and \(L_\lambda \)), we define the spectral index of \(w_\lambda \) as the negative spectral flow of the paths \(A^+\) (resp. \(A^-\)); thus

$$\begin{aligned} {{\mathrm{i_{\mathrm{spec}}}}}(w_\lambda ):=-{{\mathrm{sf}}}(A_\lambda ^+; \lambda \in [0,1]) \quad \big (\text {resp. } {{\mathrm{i_{\mathrm{spec}}}}}(w_\lambda ):=-{{\mathrm{sf}}}(A_\lambda ^-; \lambda \in [0,1])\big ) . \end{aligned}$$

(Cf. Sects. 2 and 3 for further details). Under this notation, the main result of this paper reads as follows.

Theorem 1

(Index Theorem for families of h-clinic orbits) Let \(p_\lambda ,q_\lambda \) be two hyperbolic restpoints of the Hamiltonian system given in Eq.  (1.2) and let \(w_\lambda \) be a heteroclinic connection between them. Under the previous notation and if (H1) holds, we get

  • (heteroclinic/homoclinic case )

    $$\begin{aligned} \begin{aligned} {{\mathrm{i_{\mathrm{spec}}}}}(w_\lambda ;\lambda \in [0,1])={{\mathrm{\iota }}}(w_1) - {{\mathrm{\iota }}}(w_0) + {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (E^s_\lambda (+\infty ),E^u_\lambda (-\infty ); \lambda \in [0,1]\big ). \end{aligned} \end{aligned}$$

Let \(L \in \mathscr {C}^0\big ([0,1]; \Lambda (n)\big )\) and let \(w_\lambda \) either a future halfclinic solution between \(L_\lambda \) and \(q_\lambda \) or a past halfclinic solution between \(p_\lambda \) and \(L_\lambda \). Under the previous notation and if (H1) is fulfilled, then we have

  • (future halfclinic case)

    $$\begin{aligned} \begin{aligned} {{\mathrm{i_{\mathrm{spec}}}}}(w_\lambda ;\lambda \in [0,1])={{\mathrm{\iota }}}(w_1) - {{\mathrm{\iota }}}(w_0) + {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (E^s_\lambda (+\infty ),L_\lambda ; [0,1]\big ) \end{aligned} \end{aligned}$$
  • (past halfclinic case)

    $$\begin{aligned} \begin{aligned} {{\mathrm{i_{\mathrm{spec}}}}}(w_\lambda ;\lambda \in [0,1])={{\mathrm{\iota }}}(w_1) - {{\mathrm{\iota }}}(w_0) + {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (L_\lambda ,E^u_\lambda (-\infty ); [0,1]\big ). \end{aligned} \end{aligned}$$

Remark 1.3

A few comments on the proof of Theorem 1 are in order. The idea behind the spectral flow formulas in the heteroclinic/homoclinic and halfclinic cases relies on the fact that either the path A or the paths \(A^\pm \) (defined in Eq.  (1.5)) are stratum-homotopic to the real first order selfadjoint elliptic operator

$$\begin{aligned} D(E^u_\lambda (0), E^s_\lambda (0))\phi :=- J \dfrac{d\phi }{dt} \end{aligned}$$
(1.6)

on the domain \( W_\lambda :=\left\{ u \in W^{1,2}([a,b];\mathbb {R}^{2n})| u(a) \in E^u_\lambda (0), \ u(b) \in E^s_\lambda (0)\right\} \) and one of the main ingredient of the proof (scattered all along the whole of Sect. 3) is based on the \(\varepsilon \)-spectral flow as well as on [10, Theorem 0.4] which will be crucial in our arguments. It is worth noticing that the crucial role of the operator given in Eq. (1.6) could be traced back to the works by Floer [14,15,16] and few years later to Yoshida [34].

Remark 1.4

We observe that in the case of future and past halfclinic orbits, the pairs of paths of Lagrangian subspaces to be considered are \(E=\big (E_\lambda ^s(0), L_\lambda \big )\) and \(E=\big (L_\lambda , E_\lambda ^u(0)\big )\).

As direct application of Theorem 1, in the special case of a (single) Hamiltonian system, we get a spectral flow formula for a homoclinic and future/past halfclinic orbits in terms of the relative Morse index. (Cf. We refer the interested reader to Sect. 3 for the proof).

Corollary 1

(Index Theorem for homoclinic orbits of Chen and Hu) Let \(H \in \mathscr {C}^2\big (\mathbb {R}\times \mathbb {R}^{2n}, \mathbb {R}\big )\) be a Hamiltonian function, p be a hyperbolic restpoint, w be a (homoclinic) solution of the Hamiltonian system

$$\begin{aligned} {\left\{ \begin{array}{ll} w' = J \nabla H\big (t, w(t)\big ), \qquad t \in \mathbb {R}\\ \lim _{|t|\rightarrow +\infty } w(t)=p. \end{array}\right. } \end{aligned}$$

We set \( B(t):=D^2 H\big (t, z(t)\big )\) and \(B_*\) respectively the linearization of \(\nabla H\) along the homoclinic orbit z and along the constant solution p and we assume that

$$\begin{aligned} \lim _{z\rightarrow p} D^2 H\big (t, z\big )=B_* \end{aligned}$$

uniformly with respect to \(t \in \mathbb {R}\). Then, we have

$$\begin{aligned} {{\mathrm{i_{\mathrm{rel}}}}}\left( - J \dfrac{d}{dt}- B_*, -J \dfrac{d}{dt}- B(t) \right) = {{\mathrm{\iota }}}(w) \end{aligned}$$

where we denoted by \({{\mathrm{i_{\mathrm{rel}}}}}\) the relative Morse index(cf. Definition 2.10).

An analogous result holds in the halfclinic case.

Corollary 2

(Index Theorem for halfclinic orbits) Let \(H \in \mathscr {C}^2\big ([0,+\infty ) \times \mathbb {R}^{2n}, \mathbb {R}\big )\) (resp. \(H \in \mathscr {C}^2\big ((-\infty ,0] \times \mathbb {R}^{2n}, \mathbb {R}\big )\) be a Hamiltonian function, q be a hyperbolic restpoint, \(L \in \Lambda (n)\) and w be a future (resp. past) halfclinic solution of the Hamiltonian system

$$\begin{aligned} {\left\{ \begin{array}{ll} w' = J \nabla H\big (t, w(t)\big ), \qquad t \in [0,+\infty )\\ w(0) \in L \ \text { and }\ \lim _{t\rightarrow +\infty } w(t)=q \end{array}\right. } \left( \text {resp. } {\left\{ \begin{array}{ll} w' = J \nabla H\big (t, w(t)\big ), \qquad t \in (-\infty ,0]\\ \lim _{t\rightarrow -\infty } w(t)=p\ \text {resp.}\ w(0) \end{array}\right. }\right) . \end{aligned}$$

Under the assumptions of Corollary 1, we have in both cases

$$\begin{aligned} {{\mathrm{i_{\mathrm{rel}}}}}\left( - J \dfrac{d}{dt}- B_*, -J \dfrac{d}{dt}- B(t) \right) ={{\mathrm{\iota }}}(w). \end{aligned}$$

2.2 A new index theory on bounded domains

This subsection is devoted to provide a new spectral flow formula for Hamiltonian systems defined on bounded intervals. Let \(L, M \in \Lambda (n)\), \(a,b \in \mathbb {R}\) and \(H:[a,b]\times \mathbb {R}^{2n} \rightarrow \mathbb {R}\) be a \(\mathscr {C}^2\)-function and let w be a solution of the Hamiltonian system

$$\begin{aligned} {\left\{ \begin{array}{ll} w'(t)=J\nabla H\big (t, w(t)\big ), \qquad t \in (a,b)\\ w(a) \in L \ \text { and } w(b) \in M. \end{array}\right. } \end{aligned}$$
(1.7)

We denote by \(\gamma _{a}\) the (fundamental) matrix-valued solution \(\gamma _{a}: [a,b] \rightarrow \mathrm {Sp}\,(2n,\mathbb {R})\) of the Hamiltonian system given in Eq. (1.7)

$$\begin{aligned} {\left\{ \begin{array}{ll} \gamma '_{a}(t)= S(t)\,\gamma _{a}(t), \qquad t \in [a,b]\\ \gamma _{a}(a)=I. \end{array}\right. } \end{aligned}$$

For any \( c \in (a,b)\) we consider the ordered pair of Lagrangian paths pointwise defined by

$$\begin{aligned} \big ( W(c),V(c)\big ) \end{aligned}$$

where

$$\begin{aligned} W(c):=\gamma _a(c) \gamma ^{-1}_a(b)M \text { and } V(c):=\gamma _{a}(c)L. \end{aligned}$$

Let \(\alpha :[a,b] \rightarrow [c,b]\) be a positive affine reparametrization of the interval [cb] (with the same orientation) whilst the function \(\beta :[a,b] \rightarrow [a,c]\) is a negative affine reparametrization of the interval [ac] (with the opposite orientation).

Definition 1.5

Under the previous notation, we define the geometrical index of the solution w of the Hamiltonian system given in Eq. (1.7) as follows

$$\begin{aligned} {{\mathrm{\iota _b}}}(w):={{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\Big (W\big (\beta (\tau )\big ),V\big (\alpha (\tau )\big ); \tau \in [a,b]\Big ). \end{aligned}$$

Remark 1.6

It is worth noticing that Definition 1.5 is new in the case of orbits parametrized by bounded intervals. In fact, it is standard (cfr. [5, 32], for instance) in this case to define the geometrical index of the solution w of the Hamiltonian system given in Eq. (1.7) as follows

$$\begin{aligned} {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (M, \gamma _a(t)L; \tau \in [a,b]\big ). \end{aligned}$$

However, we will prove in Lemma 3.10 that these two integers coincide. In this way we are able to recover all the existing results.

Let now \(H:[0,1] \times [a,b] \times \mathbb {R}^{2n}\rightarrow \mathbb {R}\) be a continuous map such that \(H_\lambda :=H(\lambda , \cdot ,\cdot ): [a,b] \times \mathbb {R}^{2n} \rightarrow \mathbb {R}\) is of class \(\mathscr {C}^2\) for all \(\lambda \in [0,1]\) and its derivatives depend continuously on \(\lambda \). As before, for each \(\lambda \in [0,1]\), let \(\lambda \mapsto L_\lambda \) and \(\lambda \mapsto M_\lambda \) be two paths of Lagrangian subspaces. We consider the one-parameter family of Hamiltonian systems

$$\begin{aligned} {\left\{ \begin{array}{ll} w'(t)=J\, \nabla H_\lambda \big (t,w(t)\big ), \qquad t \in (a,b)\\ w(a)\in L_\lambda \ \text { and } \ w(b) \in M_\lambda \end{array}\right. } \end{aligned}$$
(1.8)

and for each \(\lambda \in [0,1]\), we denote by \(w_\lambda \) the bounded solution of the Hamiltonian system given in Eq.  (1.8) between \(L_\lambda \) and \(M_\lambda \). By linearizing Eq. (1.8) along \(w_\lambda \), we get the following linear Hamiltonian system

$$\begin{aligned} {\left\{ \begin{array}{ll} z'(t)=J B_\lambda (t)\, z(t), \qquad t \in (a,b)\\ z(a) \in L_\lambda \ \text { and } \ z(b) \in M_\lambda . \end{array}\right. } \end{aligned}$$

We denote by \( W^{1,2}([a,b];L_\lambda , M_\lambda )\) the Sobolev space defined by

$$\begin{aligned} W^{1,2}([a,b],L_\lambda , M_\lambda ):=\left\{ z \in W^{1,2}([a,b];\mathbb {R}^{2n})| z(a)\in L_\lambda \text { and } z(b) \in M_\lambda \right\} \end{aligned}$$

and for each \(\lambda \in [0,1]\), we define the operators

$$\begin{aligned} T_\lambda :=- J \frac{d}{dt} - B_\lambda (t): W^{1,2}([a,b];L, M) \subset L^2([a,b], \mathbb {R}^{2n}) \longrightarrow L^2([a,b], \mathbb {R}^{2n}). \end{aligned}$$

It is well-known that for each \(\lambda \in [0,1]\), \( T_\lambda \) is a closed unbounded selfadjoint Fredholm operator in \(L^2([a,b], \mathbb {R}^{2n})\) having domain \( W^{1,2}([a,b];L_\lambda , M_\lambda )\) (cf. [18], for instance) and hence it remains well-defined (gap continuous) path of closed selfadjoint Fredholm operators

$$\begin{aligned} T:[0,1]\ni \lambda \longmapsto T_\lambda \in \mathscr {CF}^{sa}(L^2([a,b],\mathbb {R}^{2n})). \end{aligned}$$

We define \({{\mathrm{i_{\mathrm{spec}}}}}(T):=-{{\mathrm{sf}}}(T_\lambda ;\lambda \in [0,1])\).

Theorem 2

(Spectral flow formula for bounded orbits) Under the previous notation, we have

$$\begin{aligned} {{\mathrm{i_{\mathrm{spec}}}}}(T)={{\mathrm{\iota _b}}}(w_1)-{{\mathrm{\iota _b}}}(w_0) + {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (M,L; [0,1]\big ). \end{aligned}$$
(1.9)

In the special case in which the Lagrangian boundary conditions are independent on \(\lambda \) as direct consequence of the nullity property of the \({{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\) index (cf. Sect. 2) the third term in the (RHS) of Eq. (1.9), vanishes identically.

Corollary 1.7

In the assumption of Theorem 2, if \((L_\lambda , M_\lambda ) \equiv (L,M) \in \Lambda (n)\times \Lambda (n)\), then we have

$$\begin{aligned} {{\mathrm{i_{\mathrm{spec}}}}}(T)={{\mathrm{\iota _b}}}(w_1)-{{\mathrm{\iota _b}}}(w_0). \end{aligned}$$

Remark 1.8

We conclude the overview of the main results of this paper by stressing the fact that, with this approach, we are able to get at once the spectral flow formulas for solutions parametrized by a half-line, on the whole real line or by a bounded interval, by establishing in the last case a precise and net way to relate this new definition to the classical one. It is worth mentioning that the definition of the Maslov index given in this paper, is very flexible and it agrees also in the unbounded case, with the definition given by authors in [11, Definition 1, pag.592] and in [8, 22]. A big effort for the readability of the paper was made by trying on the one-hand to shorten as much as possible all proofs by avoiding standard details; on the other hand we attempt to be clear and to add precise references to the existing literature as much as possible. The paper is structured as follows. In Sect. 2 we quickly recap the basic definitions and properties of the spectral flow and of the Maslov index. In Sect. 3 which is the core of the paper, we prove a general spectral flow formula for a one-parameter family of Hamiltonian systems. As direct application we prove a new index theorems for homoclinic and half-clinic motions and we finally recover all the existing results in the case of orbits parametrized on bounded intervals.

3 Maslov index and spectral flow

This Section is devoted to recall the basic definitions and properties of the Maslov index for pairs of Lagrangian subspaces and of the spectral flow for paths of closed selfadjoint Fredholm operators. Our basic references for the material contained in this section are [10, 24, 35] and [9] and references therein.

3.1 The Maslov index for pairs of Lagrangian paths

Let \((\mathbb {R}^{2n},\omega )\) be the standard symplectic space where \(\omega \) is the (standard) symplectic form given by

$$\begin{aligned} \omega (u,v) :=\langle J u, v\rangle \quad \text { for }\quad J:=\begin{pmatrix} 0&{}\quad -I_n\\ I_n &{}\quad 0 \end{pmatrix} \end{aligned}$$

where \(I_n\) denotes the identity matrix. We denote by \(\Lambda (n)\) the set of all Lagrangian subspaces of \((\mathbb {R}^{2n},\omega )\) and we refer to as the Lagrangian Grassmannian of \((\mathbb {R}^{2n},\omega )\). It is well-known that the Lagrangian Grassmannian is a real compact and connected analytic \(\frac{1}{2} n(n+1)\)-dimensional submanifold of the Grassmannian manifold of all n-dimensional subspaces in \(\mathbb {R}^{2n}\). For \(a, b \in \mathbb {R}\) with \(a<b\), we denote by \(\mathscr {P}([a,b];\mathbb {R}^{2n})\) the space of all ordered pairs of continuous maps of Lagrangian subspaces

$$\begin{aligned} L: [a,b] \ni t \mapsto L(t):=\big (L_1(t), L_2(t)\big ) \in \Lambda (n) \times \Lambda (n) \end{aligned}$$

equipped with the compact-open topology. Following authors in [10] we recall the definition of the Maslov index for pairs of Lagrangian subspaces, that will be denoted by \({{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\). (In the notation, CLM stands for Cappell, Lee and Miller). Loosely speaking, given the pair \(L=(L_1, L_2) \in \mathscr {P}([a,b];\mathbb {R}^{2n})\), this index counts with signs and multiplicities the number of instants \(t \in [a,b]\) that \(L_1(t) \cap L_2(t) \ne \{0\}\).

Definition 2.1

The CLM-index is the unique integer valued function

$$\begin{aligned} {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}:\mathscr {P}([a,b];\mathbb {R}^{2n})\ni L \longmapsto {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}(L;[a,b]) \in \mathbb {Z}\end{aligned}$$

satisfying the Properties I–VI given in [10, Section 1].

Remark 2.2

Authors in [10] defined their index in any (finite-dimensional) real or complex symplectic vector space. A different approach can be conceived by using the charts of the differential atlas of \(\Lambda (n)\) and the fundamental groupoid along the lines given by authors in [17].

It is worth mentioning that there is a very efficient way to compute \({{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\) through the so-called crossing forms as shown by authors in [24, 31]. We also observe that in the special case in which one Lagrangian path of the pair is constant, the \({{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\)-index is closely related to the (relative) Maslov index \({{\mathrm{\mu ^{\mathrm{RS}}}}}\), defined by authors in the celebrated paper [31]. As proved in [24, Theorem 3.1], if \(L=(L_1,L_2) \in \mathscr {P}([a,b];\mathbb {R}^{2n})\), then the following relation holds

$$\begin{aligned} {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}(L_1, L_2;[a,b])={{\mathrm{\mu ^{\mathrm{RS}}}}}(L_2, L_1;[a,b]) - \dfrac{1}{2} \big (h_{12}(b)-h_{12}(a)\big ) \end{aligned}$$

where \(h_{12}(t):=\dim L_1(t)\cap L_2(t)\). (Cf. [24, Theorem 3.1] for further details).

Properties of the CLM-index.

For the sake of the reader we list some properties of the \({{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\) index that we shall frequently use along the paper.

  • (Stratum homotopy relative to the ends) Given a continuous map

    $$\begin{aligned} L:[0,1]\ni s \mapsto L(s) \in \mathscr {P}([a,b];\mathbb {R}^{2n}) \text { where } L(s)(t):=\big (L_1(s,t), L_2(s,t)\big ) \end{aligned}$$

    such that \(\dim \big (L_1(s,a) \cap L_2(s,a)\big )\) and \(\dim \big (L_1(s,b) \cap L_2(s,b)\big )\) are both constant, then

    $$\begin{aligned} {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (L(0);[a,b]\big )= {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (L(1);[a,b]\big ). \end{aligned}$$
  • (Path additivity) Let \(a,b,c \in R\) with \(a<b<c\). If \(L:=(L_1, L_2) \in \mathscr {P}([a,c];\mathbb {R}^{2n})\), then

    $$\begin{aligned} {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}(L;[a,c])= {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}(L;[a,b])+{{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}(L;[b,c]). \end{aligned}$$
  • (Nullity) Given \(L=(L_1,L_2) \in \mathscr {P}([a,b];\mathbb {R}^{2n})\) such that \(\dim \big (L_1(t\cap L_2(t)\big )\) is independent on t and \(L_1(t) \cap L_2(t)\) varying continuously, then

    $$\begin{aligned} {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}(L;[a,b])=0. \end{aligned}$$
  • (Reversal) Let \(L=(L_1,L_2) \in \mathscr {P}([a,b];\mathbb {R}^{2n})\). Denote the same path travelled in the reverse direction in \(\mathscr {P}([-b,-a];\mathbb {R}^{2n})\) by \(\widehat{L}(s)=\big (L_1(-s), L_2(-s)\big )\). Then

    $$\begin{aligned} {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}(\widehat{L};[-b, -a])= -{{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}(L;[a,b]). \end{aligned}$$

3.2 The spectral flow for paths of closed selfadjoint Fredholm operators

Given the separable real Hilbert space V, we denote by \(\mathcal C^{sa}(V)\) the set of all (closed) densely defined and selfadjoint operators \(T : \mathcal D(T) \subset V \rightarrow V\) and by \( \mathscr {CF}^{sa}(V)\) the space of all closed selfadjoint and Fredholm operators equipped with the graph distance topology (or gap topology), namely the topology induced by the gap metric \( d_G(T_1, T_2):=\left\| P_1-P_2 \right\| _{\mathscr {L}(V)}\) where \(P_i\) is the projection onto the graph of \(T_i\) in the product space \(V \times V\) and \(\mathscr {L}(V)\) denotes the Banach space of all bounded and linear operators. Let \(T \in \mathscr {CF}^{sa}(V)\) and for \(a,b \notin \sigma (T)\), we set

$$\begin{aligned} P_{[a,b]}(T):=\mathfrak {R}\left( \dfrac{1}{2\pi \, i}\int _\gamma \left( \lambda -T^{\mathbb {C}}\right) ^{-1} d\, \lambda \right) \end{aligned}$$

where \(\gamma \) is the circle of radius \(\frac{b-a}{2}\) around the point \(\frac{a+b}{2}\). We recall that if \([a,b]\subset \sigma (T)\) consists of isolated eigenvalues of finite type then

$$\begin{aligned} \mathrm {rge}\,P_{[a,b]}(T)= E_{[a,b]}(T):=\bigoplus _{\lambda \in [a,b]}\ker (\lambda -T); \end{aligned}$$

(cf. [18, Section XV.2], for instance) and 0 either belongs to the resolvent set of T or it is an isolated eigenvalue of finite multiplicity. The next result allow us to define the spectral flow for continuous paths in \(\mathscr {CF}^{sa}(V)\).

Proposition 2.3

Let \(T_0 \in \mathscr {CF}^{sa}(V)\) be fixed. There exists a positive real number \(a \notin \sigma (T_0)\) and an open neighborhood \(\mathscr {N} \subset \mathscr {CF}^{sa}(V)\) of \(T_0\) in the gap topology such that \(\pm a \notin \sigma (T)\) for all \(T \in \mathscr {N}\) and the map

$$\begin{aligned} \mathscr {N} \ni T \longmapsto P_{[-a,a]}(T) \in \mathscr {L}(V) \end{aligned}$$

is continuous and the projection \( P_{[-a,a]}(T)\) has constant finite rank for all \(t \in \mathscr {N}\).

Proof

For the proof of this result we refer the interested reader to [9, Proposition 2.10]. \(\square \)

Let now \(\mathcal A:[a,b] \rightarrow \mathscr {CF}^{sa}(V)\) be a continuous path. As direct consequence of Proposition 2.3, for every \(t \in [a,b]\) there exists \(a>0\) and an open connected neighbourhood \(\mathscr {N}_{t,a} \subset \mathscr {CF}^{sa}(V)\) of \(\mathcal A(t)\) such that \(\pm a \notin \sigma (T)\) for all \(T \in \mathscr {N}_{t,a}\), the map \( \mathscr {N}_{t,a} \in T \longmapsto P_{[-a,a]}(T) \in \mathscr {L}(V)\) is continuous and hence the rank of \(\mathcal P_{[-a,a]}(T)\) does not depends on \(T \in \mathscr {N}_{t,a}\). Now let us consider the open covering of the interval I given by the pre-images of the neighbourhoods \(\mathcal N_{t,a}\) through \(\mathcal A\) and by choosing a sufficiently fine partition of the interval [ab] having diameter less than the Lebesgue number of the covering, we can find \(a=:t_0< t_1< \ldots < t_n:=b\), operators \(T_i \in \mathscr {CF}^{sa}(V)\) and positive real numbers \(a_i \), \(i=1, \ldots , n\) in such a way the restriction of the path \(\mathcal A\) on the interval \([t_{i-1}, t_i]\) lies in the neighborhood \(\mathscr {N}_{t_i, a_i}\) and hence the \(\dim E_{[-a_i, a_i](\mathcal A_t)}\) is constant for \(t \in [t_{i-1},t_i]\), \(i=1, \ldots ,n\).

Definition 2.4

The spectral flow of \(\mathcal A\) on the interval [ab] is defined by

$$\begin{aligned} {{\mathrm{sf}}}(\mathcal A; [a,b]):=\sum _{i=1}^N \dim \,E_{[0,a_i]}(\mathcal A_{t_i})- \dim \,E_{[0,a_i]}(\mathcal A_{t_{i-1}}) \in \mathbb {Z}. \end{aligned}$$

Remark 2.5

The spectral flow as given in Definition 2.4 is well-defined (in the sense that it is independent either on the partition or on the \(a_i\)) and only depends on the continuous path \(\mathcal A\). (Cf. [9, Proposition 2.13] and references therein). We also refer the interested reader to [33] for the analogous properties in the case of selfadjoint Fredholm operators on fixed domains.

Remark 2.6

Definition 2.4 is formally analogous to the definition of the spectral flow of a continuous path of selfadjoint bounded Fredholm operators introduced by author in [28].

Properties of the Spectral Flow.

For the sake of the reader we list some properties of the spectral flow that we shall frequently use in the paper.

  • (Stratum homotopy relative to the ends) Given a continuous map

    $$\begin{aligned} \bar{A}: [0,1]\rightarrow \mathscr {C}^0\big ([a,b];\mathscr {CF}^{sa}(V)\big )\text { where } \bar{A}(s)(t):=\bar{A}^s(t) \end{aligned}$$

    such that \(\dim \ker \bar{A}^s(a)\) and \(\dim \ker \bar{A}^s(b)\) are both independent on s, then

    $$\begin{aligned} {{\mathrm{sf}}}(\bar{A}^0_t; t \in [a,b])={{\mathrm{sf}}}(\bar{A}^1_t; t \in [a,b]). \end{aligned}$$
  • (Path additivity) If \(A^1, A^2\in \mathscr {C}^0\big ([a,b];\mathscr {CF}^{sa}(V)\big ) \) are such that \( A^1(b)= A^2(a)\), then

    $$\begin{aligned} {{\mathrm{sf}}}( A^1_t * A^2_t; t \in [a,b]) = {{\mathrm{sf}}}( A^1_t; t \in [a,b])+{{\mathrm{sf}}}( A^2_t; t \in [a,b]) \end{aligned}$$

    where \(*\) denotes the usual catenation between the two paths.

  • (Nullity) If \( A\in \mathscr {C}^0\big ([a,b];\mathrm {GL}(V)\big )\), then \({{\mathrm{sf}}}( A_t; t \in [a,b])=0\);

  • (Reversal) Denote the same path travelled in the reverse direction in \(\mathscr {CF}^{sa}(V)\) by \(\widehat{A}(t)=A(-t)\). Then

    $$\begin{aligned} {{\mathrm{sf}}}( A_t; t \in [a,b])=-{{\mathrm{sf}}}(\widehat{A} _t; t \in [-b,-a]). \end{aligned}$$

There is an efficient way to compute the spectral flow, through what are called crossing forms. Let us consider a \(\mathscr {C}^1\)-path, which always exists in the homotopy class (relative to the ends) and let \(P_t\) be the orthogonal projector from V to \(E_0\big (\mathcal A_t\big )\), the kernel of \(\mathcal A_t\). When \(E_0\big (\mathcal A_{t_0}\big )\ne \{0\}\) we term the instant \(t_0\) a crossing instant. In this case we defined the crossing operator \(\Gamma (\mathcal A,t_0)\) as

$$\begin{aligned} \Gamma (\mathcal A,t_0):=P_{t_0} \dfrac{\partial }{\partial t}P_{t_0}: E_0\big (\mathcal A_{t_0}\big )\rightarrow E_0\big (\mathcal A_{t_0}\big ). \end{aligned}$$

We term the crossing instant \(t_0\) regular if the crossing operator \(\Gamma (\mathcal A,t_0)\) is non-degenerate. In this case we define the signature simply as

$$\begin{aligned} {{\mathrm{sgn}}}\big (\Gamma (\mathcal A,t_0)\big ):=\dim E_+\big (\Gamma (\mathcal A,t_0)\big )- \dim E_-\big (\Gamma (\mathcal A,t_0)\big ), \end{aligned}$$

where \( E_+\big (\Gamma (\mathcal A,t_0)\big )\) (resp. \( E_-\big (\Gamma (\mathcal A,t_0)\big )\)) denote the positive (resp. negative) spectral space of the operator \(\Gamma (\mathcal A,t_0)\). We assume that all the crossings are regular. Then the crossing instants are isolated (and hence on a compact interval are in a finite number) and the spectral flow is given by the following formula

$$\begin{aligned} {{\mathrm{sf}}}(\mathcal A_t; t \in [a,b]) = \sum _{t_0 \in \mathcal S_*} {{\mathrm{sgn}}}\big (\Gamma (\mathcal A, t_0)\big )- \dim E_-\big (\Gamma (\mathcal A,a)\big ) + \dim E_+\big (\Gamma (\mathcal A,b)\big ) \end{aligned}$$

where \(\mathcal S_*:=\mathcal S\cap (a,b)\) and \(\mathcal S\) denotes the set of all crossings.

Remark 2.7

One can prove that there exists \(\varepsilon _0>0\) sufficiently small such that \({{\mathrm{sf}}}(\mathcal A_t; t \in [a,b])= {{\mathrm{sf}}}(\mathcal A_t+ \varepsilon I; t \in [a,b])\) (where \(I\) denotes the identity operator on V) for \(\varepsilon \in [0, \varepsilon _0]\); furthermore for almost every such \(\varepsilon \) the path \(t \mapsto \mathcal A_t+ \varepsilon I\) has regular crossings. We refer the interested reader to [11, 19, 33] and references therein.

Given the continuous path \( A: [a,b]\rightarrow \mathscr {CF}^{sa}(V)\), we denote by \( A^\varepsilon \) the path \( A^\varepsilon : [a,b]\ni t \mapsto A_t \in \mathscr {CF}^{sa}(V)\) pointwise defined by

$$\begin{aligned} A^\varepsilon _t:=A_t -\varepsilon I, \qquad t \in [a,b]. \end{aligned}$$

Lemma 2.8

There exists \(\varepsilon >0\) sufficiently small, such that

$$\begin{aligned} {{\mathrm{sf}}}( A_t; t\in [a,b])= {{\mathrm{sf}}}( A^\varepsilon _t;t \in [a,b])- \dim \ker A_a +\dim \ker A_b. \end{aligned}$$

Proof

We start by observing that, since \( A_a, A_b\in \mathscr {CF}^{sa}(V)\), then 0 belongs to the resolvent set of \( A_a\) and \( A_b\) or it is an isolated eigenvalue of finite multiplicity. Thus we can choose \(\varepsilon >0\) smaller than every non-zero eigenvalue of \( A_a\) and \( A_b\) and we define the family

$$\begin{aligned} \widetilde{ A^{ \varepsilon }}: \mathcal R \rightarrow \mathscr {CF}^{sa}(V) \text { as } \widetilde{ A^{ \varepsilon }}(t,s):=A_t - s\varepsilon I\end{aligned}$$

where \(\mathcal R:=[a,b]\times [0,1]\). Being the rectangle topologically trivial and by invoking the homotopy property of the spectral flow, it follows that the spectral flow of the path obtained by restricting \(\widetilde{ A^\varepsilon }\) to the boundary of \(\mathcal R\) is zero. Thus by the path additivity property of the spectral flow, we have

$$\begin{aligned} {{\mathrm{sf}}}(\widetilde{A}^\varepsilon (t,0); t \in [a,b])= & {} {{\mathrm{sf}}}(\widetilde{A}^{\varepsilon }(t,1); t \in [a,b]) + {{\mathrm{sf}}}( \widetilde{A}(a,s); s \in [0,1])\\&- {{\mathrm{sf}}}( \widetilde{A}(b,s); s \in [0,1]). \end{aligned}$$

Since by the choice of \(\varepsilon \) the paths \(s\mapsto \widetilde{A}(a,s)\) and \(s\mapsto \widetilde{A}(b,s)\) have no crossing instants other than, possibly, the initial or the final, we get

$$\begin{aligned} {{\mathrm{sf}}}( A_t; t \in [a,b]) ={{\mathrm{sf}}}( A^{\varepsilon }_t; t \in [a,b]) - \dim \ker A_a+ \dim \ker A_b \end{aligned}$$

This conclude the proof. \(\square \)

As direct consequence of Lemma 2.8, we are entitled to give the following definition.

Definition 2.9

We term \(\varepsilon \) -spectral flow of the path A and we denote it by \({{\mathrm{sf}}}_\varepsilon ( A_t;t\in [a,b])\), the spectral flow (as given in definition 2.4) of the path \( A^{\varepsilon }:[a,b] \rightarrow \mathscr {CF}^{sa}(V)\); i.e.

$$\begin{aligned} {{\mathrm{sf}}}_\varepsilon ( A_t;t\in [a,b]):={{\mathrm{sf}}}( A^\varepsilon _t;t\in [a,b]). \end{aligned}$$

By Definition 2.9 and Lemma 2.8, we get the following

$$\begin{aligned} {{\mathrm{sf}}}( A_t;t\in [a,b]) ={{\mathrm{sf}}}_\varepsilon ( A_t;t\in [a,b]) - \dim \ker A_a + \dim \ker A_b. \end{aligned}$$

In particular if the endpoints of A are invertible, they coincide. We close this Section by recalling the relation between the spectral flow and another integer known in literature as relative Morse index.

Definition 2.10

([35, Definition 2.8]). Let \( A , B\in \mathscr {CF}^{sa}(V)\) and we assume that B is A-compact (namely compact in the graph norm topology of A). Then the relative Morse index of the pair A, \( A+ B\) is defined by

$$\begin{aligned} {{\mathrm{i_{\mathrm{rel}}}}}( A, A+ B)=-{{\mathrm{sf}}}(\widetilde{ A};[a,b]) \end{aligned}$$

for \(\widetilde{ A}:=A+ \widetilde{ B}\) and where \( \widetilde{ B}\) is any continuous curve of A-compact operators such that \(\widetilde{ B}(a)= 0\) is the null operator and \( \widetilde{ B}(b)= B\).

Remark 2.11

We observe that in the aforementioned paper the authors considered the more general case of bounded Fredholm operators in Banach spaces. However the extension to the case considered above presents no difficulties.

4 A spectral flow formula for families of Hamiltonian systems

The scope of this Section which is the core of the paper is twofold: on one hand we construct an index theory and we prove a new spectral flow formula for a one-parameter family of (linear) Hamiltonian systems defined on unbounded intervals; on the other hand we recover the well-known index theory in the case of bounded intervals.

We start by associating to the family of Hamiltonian systems a

  • geometrical index defined in terms of the \({{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\)-index of a suitable pair of Lagrangian paths defined in terms of the invariant (stable and unstable) subspaces and encoding the symplectic properties of the solution space;

  • spectral index will be given in terms of the spectral flow of a path of first order elliptic operators and it is devoted to detect the analytic properties of the arising path of closed selfadjoint Fredholm operators.

We start by recalling that \(T \in \mathrm {Mat}\,(2n,\mathbb {R})\) is termed hyperbolic if its spectrum does not meet the imaginary axis. In this case, the spectrum of a hyperbolic operator T consists of two isolated closed components (one of which may be empty)

$$\begin{aligned} \sigma (T) \cap \left\{ z \in \mathbb {C}| \mathfrak {R}(z)<0\right\} \text { and } \sigma (T) \cap \left\{ z \in \mathbb {C}| \mathfrak {R}(z)>0\right\} . \end{aligned}$$

Let \(\mathbb {R}^{2n}= V^-(T) \oplus V^+(T)\) be the corresponding T-invariant splitting of \(\mathbb {R}^{2n}\) into closed subspaces, given by the spectral decomposition with projections \(P^-(T)\) and \(P^+(T)\). So

$$\begin{aligned}&\sigma \left( T\vert _{V^-(T)}\right) = \sigma (T) \cap \left\{ z \in \mathbb {C}| \mathfrak {R}(z)<0\right\} \text { and }\\&\sigma \left( T\vert _{V^+(T)}\right) = \sigma (T) \cap \left\{ z \in \mathbb {C}| \mathfrak {R}(z)>0\right\} . \end{aligned}$$

Given the one-parameter family of Hamiltonian systems

$$\begin{aligned} z'(t)= S_\lambda (t)\, z(t) \qquad t \in \mathbb {R}\end{aligned}$$
(3.1)

we define the two-parameter family of matrix-valued maps \(\gamma _{(\tau ,\lambda )}: \mathbb {R}\rightarrow \mathrm {Mat}\,(2n,\mathbb {R})\) parametrized by \((\tau ,\lambda ) \in \mathbb {R}\times [0,1]\) as the fundamental solutions of the Hamiltonian systems given in Eq.  (3.1), namely the matrix solutions of the following Cauchy problem

$$\begin{aligned} {\left\{ \begin{array}{ll} \gamma '_{(\tau ,\lambda )}(t)=S_\lambda (t)\gamma _{(\tau ,\lambda )}(t), \qquad t \in \mathbb {R}\\ \gamma _{(\tau ,\lambda )}(\tau )=I\end{array}\right. } \end{aligned}$$

where \(S_\lambda (t):=S(\lambda ,t)\). We recall that the stable and unstable spaces of the Hamiltonian system given in Eq.  (3.1) are respectively given by

$$\begin{aligned} E^s_\lambda (\tau ):=\left\{ v \in \mathbb {R}^{2n}|\lim _{t\rightarrow +\infty } \gamma _{(\tau ,\lambda )}(t)v=0\right\} \text { and } E^u_\lambda (\tau ):=\left\{ v \in \mathbb {R}^{2n}|\lim _{t\rightarrow -\infty } \gamma _{(\tau ,\lambda )}(t)v=0\right\} . \end{aligned}$$
(3.2)

Let us define the asymptotic Hamiltonian systems

$$\begin{aligned} z'(t)= S_{\lambda }(\pm \infty )\, z(t) \qquad t \in \mathbb {R}\end{aligned}$$

and as before we define the stable and unstable spaces as follows

$$\begin{aligned}&E^s_\lambda (\pm \infty ):=\left\{ v \in \mathbb {R}^{2n}|\lim _{t\rightarrow +\infty } \exp {\big (t S_\lambda (\pm \infty )\big )}v=0\right\} \text { and }\nonumber \\&E^u_\lambda (\pm \infty ):=\left\{ v \in \mathbb {R}^{2n}|\lim _{t\rightarrow -\infty }\exp {\big (t S_\lambda (\pm \infty )\big )}v=0\right\} . \end{aligned}$$
(3.3)

By invoking [1, Proposition 1.2], the assumption (H1), implies the following convergence result on the invariant manifolds

$$\begin{aligned} \lim _{\tau \rightarrow +\infty }E^s_\lambda (\tau )=E^s_\lambda (+\infty ) \text { and } \lim _{\tau \rightarrow -\infty } E^u_\lambda (\tau )= E^u_\lambda (-\infty ) \end{aligned}$$
(3.4)

where the limit is uniform with respect to the parameter \(\lambda \) in the gap (metric) topology of the Grassmannian manifold.

Lemma 3.1

If (H1) holds then the space \(E^s_\lambda (\tau )\), \((\tau , \lambda ) \in [0,+\infty ]\times [0,1]\), and \(E^u_\lambda (\tau )\), \((\tau , \lambda ) \in [-\infty ,0]\times [0,1]\) defined in Eqs. (3.2)–(3.3) belong to \(\Lambda (n)\).

Proof

If \(v,w:\mathbb {R}\rightarrow \mathbb {R}^{2n}\) are non-trivial solutions of the differential equation \(z'- S_\lambda (t) z=0\) then \(\omega \big (v(\tau ), w(\tau )\big )\) is constant for all \(\tau \in \mathbb {R}\). Moreover \(\omega \big (v(\tau ), w(\tau )\big )=0\) if \(v(\tau ), w(\tau ) \in E^u_\lambda (\tau )\) or \(v(\tau ), w(\tau ) \in E^s_\lambda (\tau )\), for some \(\tau \in \mathbb {R}\). Thus \(E^u_\lambda (\tau )\) and \(E^s_\lambda (\tau )\) are isotropic subspaces of \((\mathbb {R}^{2n}, \omega )\). By taking into account (H1), \(S_\lambda (\pm \infty )\) are hyperbolic matrices; thus in particular \(E^s_\lambda (+\infty )=V^-\big (S_\lambda (+\infty )\big )\) and \(E^u_\lambda (-\infty )=V^+ \big (S_\lambda (-\infty )\big )\) are Lagrangian subspaces. By the convergence result stated in Formula (3.4) and by taking into account that the dimension is a continuous integer-valued function (and hence constant on the connected components of the Grassmannian), we conclude the proof. \(\square \)

Lemma 3.2

For every \(\tau \in \mathbb {R}\), we have

$$\begin{aligned} {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big ( E^s_\lambda (0),E^u_\lambda (0)\big )= {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big ( E^s_\lambda (\tau ),E^u_\lambda (\tau )\big ). \end{aligned}$$

Proof

The proof relies on a very straightforward stratum homotopy argument. For, let us consider the following homotopy.

$$\begin{aligned} h:=(h_1, h_2): [0,1] \times [0,1] \rightarrow \Lambda (n) \times \Lambda (n), \qquad h(\lambda , s)= \big (E^s_\lambda ((1-s)\cdot \tau ), E^u_\lambda ((1-s)\cdot \tau )\big ). \end{aligned}$$

Since \(E^u_\lambda (\tau ')=\gamma _{(\tau ,\lambda )}(\tau ')E^u_\lambda (\tau )\) and \(E^s_\lambda (\tau ')=\gamma _{(\tau ,\lambda )}(\tau ')E^s_\lambda (\tau )\), for every \(\tau \in \mathbb {R}\), \(\dim \big (E^u_\lambda (\tau ) \cap E^s_\lambda (\tau )\big )\) is independent on \(\tau \). By this argument and by the stratum homotopy invariance property of the \({{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\) the thesis follows. This conclude the proof. \(\square \)

Let \(\mathcal R^-:=[-\infty ,0]\times [0,1]\), \(\mathcal R^+:=[0,+\infty ]\times [0,1]\) and let us define the continuous two-parameter family of Lagrangian subspaces:

$$\begin{aligned}&E^u: \mathcal R^- \rightarrow \Lambda (n)\text { defined by } E^u(\tau , \lambda ):=E^u_\lambda (\tau ) \text { and } \\&E^s: \mathcal R^+ \rightarrow \Lambda (n) \text { defined by } E^s(\tau , \lambda ):=E^s_\lambda (\tau ). \end{aligned}$$

Being \(\mathcal R^\pm \) topologically trivial, it follows that the pair \(\lambda \mapsto \big (E^s_\lambda (0),E^u_\lambda (0)\big ) \in \mathscr {P}([0,1]; \mathbb {R}^{2n})\), is stratum homotopic with respect pair of Lagrangian paths obtained by concatenating the following three pairs of Lagrangian paths:

  • \([0,+\infty ) \ni t \longmapsto \big (E^s_0(\tau ), E^u_0(-\tau )\big ) \in \Lambda (n) \times \Lambda (n)\);

  • \([0,1] \ni \lambda \longmapsto \big (E^s_\lambda (+\infty ), E^u_\lambda (-\infty ))\big ) \in \Lambda (n) \times \Lambda (n)\);

  • \([0,+\infty ) \ni t \longmapsto \big (E^s_1(-\tau ), E^u_1(\tau )\big ) \in \Lambda (n) \times \Lambda (n)\).

In shorthand notation, we shall denote the concatenated path as follows

$$\begin{aligned}{}[0,+\infty ]\times & {} [0,1] \ni (t, \lambda )\\&\longmapsto \Big (E^s_0(\tau )*E^s_\lambda (+\infty )*E^s_1(-\tau ), E^u_0(-\tau )*E^u_\lambda (-\infty )*E^u_1(\tau )\Big )\\&\qquad \qquad \in \Lambda (n) \times \Lambda (n). \end{aligned}$$

Proposition 3.3

The following equality holds:

$$\begin{aligned}&{{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}(E^s_\lambda (0), E^u_\lambda (0);\lambda \in [0,1])= {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big ( E^s_0(\tau ),E^u_0(-\tau ); \tau \in [0,+\infty )\big ) \\&\quad +{{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (E^s_\lambda (+\infty ),E^u_\lambda (-\infty ); \lambda \in [0,1]\big )- {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (E^s_1(\tau ),E^u_1(-\tau ); \tau \in [0,+\infty )\big ). \end{aligned}$$

Proof

By the invariance of the \({{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\) index for stratum-homotopy and the additivity for concatenation of paths (cf. [10, Properties II & III, pag.127], we have that

$$\begin{aligned}&{{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big ( E^s_\lambda (0), E^u_\lambda (0);\lambda \in [0,1]\big )\nonumber \\&\quad ={{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (E^s_0(\tau )*E^s_\lambda (+\infty )*E^s_1(-\tau ), E^u_0(-\tau )*E^u_\lambda (-\infty )*E^u_1(\tau ); \tau , \lambda \in \in [0,+\infty )\nonumber \\&\qquad \cup [0,1]\cup (-\infty ,0]\big )\nonumber \\&\quad ={{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (E^s_0(\tau ),E^u_0(-\tau );\tau \in [0,+\infty )\big )+ {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (E^s_\lambda (+\infty ),E^u_\lambda (-\infty );\lambda \in [0,1]\big )\nonumber \\&\quad +{{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (E^s_1(-\tau ),E^u_1(\tau );\tau \in (-\infty ,0]\big ). \end{aligned}$$
(3.5)

(Cf. Fig. 4). By the reversal property of the \({{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\)-index given in Sect. 2 (cf. [10, Property X, pag. 130]), we get that the last term in Eq. (3.5) can be written according to the following expression

$$\begin{aligned} {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (E^s_1(-\tau ),E^u_1(\tau );\tau \in (-\infty ,0]\big )=- {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (E^s_1(\tau ),E^u_1(-\tau );\tau \in [0,+\infty )\big ).\quad \end{aligned}$$
(3.6)

The conclusion is obtained by putting together Eqs. (3.5) and (3.6). \(\square \)

Fig. 4
figure 4

A sketch of the stable (blue rectangle on the right) and unstable subspace (red rectangle on the left) parameter spaces (color figure online)

Let \(\mathcal W:=W^{1,2}(\mathbb {R}, \mathbb {R}^{2n})\) be the Sobolev space of all functions in \(L^2(\mathbb {R}, \mathbb {R}^{2n})=:\mathcal V\) having derivatives in \(\mathcal V\). By standard regularity arguments it readily follows that any solution of the boundary value problems given in Eq.  (3.1) belongs to \(\mathcal W\). Now, for each \(\lambda \in [0,1]\), we define the operators

$$\begin{aligned} A_\lambda :=-J \frac{d}{dt} -B_\lambda (t): \mathcal W \subset \mathcal V \longrightarrow \mathcal V. \end{aligned}$$

By invoking [32, Theorem 2.1], it follows that for each \(\lambda \in [0,1]\), \( A_\lambda \) is a closed unbounded selfadjoint Fredholm operator in \(\mathcal V\) having domain \(\mathcal W\) and hence it remains a well-defined a gap continuous path of closed selfadjoint Fredholm operatorsFootnote 1

$$\begin{aligned} A: [0,1] \longrightarrow \mathscr {CF}^{sa}(\mathcal V): \lambda \longmapsto A_\lambda . \end{aligned}$$
(3.7)

Definition 3.4

We term spectral index of the family of Hamiltonian systems given in Eq. (3.1), the integer \({{\mathrm{i_{\mathrm{spec}}}}}( A)\) defined as the spectral flow of the path given in (3.7); i.e.

$$\begin{aligned} {{\mathrm{i_{\mathrm{spec}}}}}(A):=-{{\mathrm{sf}}}(A_\lambda ; \lambda \in [0,1]). \end{aligned}$$

For \(t_1, t_2 \in \mathbb {R}\) with \(t_1 <t_2\) be fixed and let us denote by \(\mathcal W_{\lambda ,[t_1,t_2]}\) the Sobolev space defined by

$$\begin{aligned} \mathcal W_{\lambda ,[t_1,t_2]}:=\left\{ u \in W^{1,2}([t_1, t_2]; \mathbb {R}^{2n})| u(t_1) \in E^u_\lambda (t_1) \text { and } u(t_2) \in E^s_\lambda (t_2)\right\} . \end{aligned}$$

Let us define the operators \( A_{\lambda ,[t_1,t_2]}\) as the restriction to \( W_{\lambda }([t_1,t_2];\mathbb {R}^{2n})\) of the operator \( A_\lambda \).

Proposition 3.5

For any \(t_1 ,t_2 \in \mathbb {R}\) with \(t_1 <t_2\) it follows that

  1. 1.

    for every \(\lambda \in [0,1]\), \(A_{\lambda ,[t_1,t_2]}\) is degenerate if and only if \(A_\lambda \) is degenerate; i.e.

    $$\begin{aligned} \dim \ker A_{\lambda ,[t_1,t_2]}= \dim \ker A_\lambda . \end{aligned}$$
  2. 2.

    \( {{\mathrm{sf}}}(A_{\lambda ,[t_1,t_2]};\lambda \in [0,1])= {{\mathrm{sf}}}(A_\lambda ;\lambda \in [0,1])\).

Proof

(\(\Leftarrow \)) We start to prove that if \(A_\lambda \) is degenerate then \(A_{\lambda ,[t_1,t_2]}\) is degenerate. For, we assume that \( \dim \ker A_\lambda \ne \{0\}\) and we recall that \( \dim \ker A_\lambda = \dim \big (E^u_\lambda (\tau )\cap E^s_\lambda (\tau )\big )\) for some and hence for any \(\tau \in \mathbb {R}\). Let \(0 \ne v \in E^u_\lambda (\tau )\cap E^s_\lambda (\tau )\). Let \(v \in E^u_\lambda (\tau )\cap E^s_\lambda (\tau )\) then in particular \(v \in E^u_\lambda (t_1)\) and \(v \in E^s_\lambda (t_2)\). Thus \(v \in E^u_\lambda (t_1)\cap E^s_\lambda (t_2)\) and hence \( v \in \ker A_{\lambda , [t_1,t_2]}\) and this conclude the proof of the first part.

(\(\Rightarrow \)) In order to prove this second implication it is enough to show that if \(A_{\lambda ,[t_1,t_2]}\) is non-degenerate then \(A_\lambda \) is non-degenerate.

For any \(t_1 <t_2\), we start by observing that \(\gamma _{t_1,\lambda }(t_2)E^u_\lambda (t_1)=E^u_\lambda (t_2)\). Thus there exists \(0 \ne v(t_1) \in E^u_\lambda (t_1)\). We now define \(v(t):=\gamma _{t_1,\lambda }(t)\big (v(t_1)\big )\) and we observe that \( v(t_2) \in E^s_\lambda (t_2)\). In conclusion the non trivial function

$$\begin{aligned} v(t):={\left\{ \begin{array}{ll} \gamma _{t_1,\lambda }(-t)\big (v(t_1)\big ) &{} t \leqslant t_1\\ \gamma _{t_1,\lambda }(t)\big (v(t_2)\big ) &{} t_1 \leqslant t \leqslant t_2\\ \gamma _{t_1+t_2,\lambda }(t)\big (v(t_1)\big ) &{} t \geqslant t_2 \end{array}\right. } \end{aligned}$$

belongs to \(\ker A_\lambda \). This conclude the proof of the first statement.

The proof of the second statement relies on the very definition of the spectral flow (cf. Definition 2.4). We start to choose a sufficiently small partition of the interval [0, 1], namely \(0:=\lambda _0< \cdots < \lambda _n:=1\). Thus, we can find operators \( A_i \) and positive real numbers \(a_i\), \(i=1, \ldots , n\) in such a way the dimension of the spectral spaces \(E_{[-a_i,a_i]}( A_\lambda )\) is constant for \(\lambda \in [\lambda _{i-1}, \lambda _i]\). Up to refine the partition we can also assume that also the dimension of the spectral spaces \(E_{[-a_i,a_i]}( A_{\lambda , [t_1,t_2]})\) is constant for \(\lambda \in [\lambda _{i-1}, \lambda _i]\).

Moreover we assume \(E_{[-3a_i,3a_i]}( A_{\lambda , [t_1,t_2]})=E_{[-a_i,a_i]}( A_{\lambda , [t_1,t_2]})\) for \(\lambda \in [\lambda _{i-1}, \lambda _i]\), that is, no eigenvalues belongs to the interval \((-3a_i,-a_i)\cup (a_i,3a_i)\). Let \(\chi _{[t_1,t_2]}\) be the characteristic function of \([t_1,t_2]\), and we denote \(A_{\lambda , s, [t_1,t_2]}:=A_{\lambda , [t_1,t_2]}+s \chi _{[t_1,t_2]} I\) for \(s\in [0,2a_i]\). By the homotopy property of spectral flow, from the fact that \({{\mathrm{sf}}}(A_{\lambda , 2a_i, [t_1,t_2]}; [\lambda _{i-1}, \lambda _i]))=0 \) we have

$$\begin{aligned} {{\mathrm{sf}}}(A_{\lambda , [t_1,t_2]}; \lambda \in [\lambda _{i-1}, \lambda _i])) ={{\mathrm{sf}}}(A_{\lambda _{i-1}, s, [t_1,t_2]}; s \in [0, 2\,a_i]))-{{\mathrm{sf}}}(A_{\lambda _{i}, s, [t_1,t_2]}; s \in [0, 2\,a_i]). \end{aligned}$$

On the other hand, we let \(A_{\lambda ,s}:=A_{\lambda }+s \chi _{[t_1,t_2]} I\) for \(s\in [0,2\,a_i]\). Similarly, we have

$$\begin{aligned} {{\mathrm{sf}}}(A_{\lambda }; \lambda \in [\lambda _{i-1}, \lambda _i])) ={{\mathrm{sf}}}(A_{\lambda _{i-1}, s}; s \in [0, 2\,a_i]))-{{\mathrm{sf}}}(A_{\lambda _{i}, s}; s \in [0, 2\,a_i]). \end{aligned}$$

We also observe that, for \(\lambda \in [\lambda _{i-1},\lambda _i]\),

$$\begin{aligned} {{\mathrm{sf}}}(A_{\lambda , s, [t_1,t_2]}; s\in [0, 2\,a_i]))= & {} \sum _{s=0}^{ 2\,a_i}\dim \ker (A_{\lambda , s, [t_1,t_2]}), \\ {{\mathrm{sf}}}(A_{\lambda , s}; s \in [0, 2\,a_i]))= & {} \sum _{s=0}^{2\,a_i}\dim \ker (A_{\lambda , s}) . \end{aligned}$$

By arguing precisely as before, we can conclude that

$$\begin{aligned} \dim \ker (A_{\lambda , s, [t_1,t_2]}) =\dim \ker (A_{\lambda , s}) \end{aligned}$$

and by this last equality immediately follows that

$$\begin{aligned} {{\mathrm{sf}}}(A_\lambda ; \lambda \in [\lambda _{i-1}, \lambda _i])= {{\mathrm{sf}}}( A_{\lambda , [t_1,t_2]};\lambda \in [\lambda _{i-1}, \lambda _i]). \end{aligned}$$

Summing up all over \(i=0, \ldots , n\), we get the thesis. This conclude the proof. \(\square \)

For each \(\lambda \in [0,1]\) and for some \(t_0 \in \mathbb {R}\), we set

$$\begin{aligned} \mathcal X_{\lambda }:=\left\{ u \in W^{1,2}([0,1], \mathbb {R}^{2n})| u(0) \in E^u_\lambda (t_0) \text { and } u(1) \in E^s_\lambda (t_0)\right\} \end{aligned}$$

and we consider the elliptic selfadjoint first order differential operator

$$\begin{aligned} D_\lambda :=D\big (E^u_\lambda (t_0), E^s_\lambda (t_0)\big ): \mathcal X_{\lambda }\subset L^2([0,1]; \mathbb {R}^{2n}) \rightarrow L^2([0,1]; \mathbb {R}^{2n}) \text { given by } \end{aligned}$$
$$\begin{aligned} D_\lambda :=- J \dfrac{d}{dt}. \end{aligned}$$
(3.8)

Proposition 3.6

Let D be the path pointwise defined by Eq.  (3.8). The following equality holds

$$\begin{aligned} {{\mathrm{sf}}}\big ( D_\lambda ;\lambda \in [0,1]\big )= {{\mathrm{sf}}}(A_\lambda ;\lambda \in [0,1]). \end{aligned}$$

Proof

Changing variable by setting \( s:=(t-t_1)/(t_2-t_1)\in [0,1]\) the operator \(A_{\lambda ,[t_1,t_2]}\) can be re-written as follows

$$\begin{aligned} A_{\lambda ,[t_1,t_2]}= -\dfrac{1}{t_2-t_1}J\dfrac{d}{ds} - B_\lambda \big ((t_2-t_1)s+ t_1\big ) :W_{\lambda } \subset L^2([0,1];\mathbb {R}^{2n}) \rightarrow L^2([0,1];\mathbb {R}^{2n}) \end{aligned}$$

where

$$\begin{aligned} \mathcal W_{\lambda }:=\left\{ u \in W^{1,2}([0,1]; \mathbb {R}^{2n})| u(0) \in E^u_\lambda (t_1) \text { and } u(1) \in E^s_\lambda (t_2)\right\} . \end{aligned}$$
(3.9)

We now define the operator

$$\begin{aligned} \widetilde{A}_{\lambda ,[t_1,t_2]}:=(t_2-t_1) A_{\lambda ,[t_1,t_2]} = -J\dfrac{d}{ds} - (t_2-t_1)B_\lambda \big ((t_2-t_1)s+ t_1\big ) \end{aligned}$$
(3.10)

on the domain \(\mathcal W_\lambda \) defined in Eq.  (3.9) Let \(\tau :[0,1]\rightarrow \mathbb {R}\) be the (continuous) map defined by \(\tau (\sigma ):=t_2+(1-\sigma )(t_1-t_2)\) and let \(k: [0,1]\times [0,1] \rightarrow \mathscr {CF}^{sa}(L^2([0,1];\mathbb {R}^{2n}))\) given by

$$\begin{aligned} k(\lambda , \sigma ):=- J\dfrac{d}{ds}-\big (t_2-\tau (\sigma )\big ) B_\lambda \big (\tau (\sigma )\big ). \end{aligned}$$

We observe that \(k(\lambda , 0)= \widetilde{A}_{\lambda ,[t_1,t_2]}\) and \(k(\lambda , 1)= D_\lambda \). Being \(t_2-t_1 >0\) we get that

$$\begin{aligned} {{\mathrm{sf}}}(\widetilde{A}_{\lambda , [t_1,t_2]};\lambda \in [0,1])={{\mathrm{sf}}}(A_{\lambda , [t_1,t_2]};\lambda \in [0,1]) \end{aligned}$$

and by using the second statement of Proposition 3.5 we get that \({{\mathrm{sf}}}(\widetilde{A}_{\lambda \in [t_1,t_2]};\lambda \in [0,1])= {{\mathrm{sf}}}(A_\lambda ;\lambda \in [0,1])\). Passing to the limit for \((t_2 -t_1)\rightarrow 0\) in Eq.  (3.10), the path \(\widetilde{A}_{[t_1,t_2]}\) pointwise reduces to D. By the first statement of Proposition 3.5 immediately follows that the homotopy is admissible since the dimension of the kernel of the map k is independent on the homotopy parameter \(\sigma \). By the stratum homotopy invariance of the spectral flow and with respect to the endpoints the thesis readily follows. This conclude the proof. \(\square \)

As direct consequence of Proposition 3.6, we get

Proposition 3.7

If assumption (H1) holds, then

$$\begin{aligned} {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big ( E^s_\lambda (0), E^u_\lambda (0);\lambda \in [0,1]\big )= -{{\mathrm{sf}}}(A_\lambda ;\lambda \in [0,1]). \end{aligned}$$

Proof

By invoking [10, Theorem 0.4], we have

$$\begin{aligned} {{\mathrm{sf}}}_\varepsilon ( D_\lambda ;\lambda \in [0,1])={{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big ( E^u_\lambda (0), E^s_\lambda (0);\lambda \in [0,1]\big ), \end{aligned}$$

which implies

$$\begin{aligned} -{{\mathrm{sf}}}( D_\lambda ;\lambda \in [0,1])={{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big ( E^s_\lambda (0), E^u_\lambda (0);\lambda \in [0,1]\big ). \end{aligned}$$

By Proposition 3.6 we infer that \({{\mathrm{sf}}}( A_\lambda ;\lambda \in [0,1])={{\mathrm{sf}}}( D_\lambda ;\lambda \in [0,1])\). This conclude the proof. \(\square \)

Remark 3.8

It is worth noticing that Proposition 3.7 generalizes the main result recently proved by author in [33].

As consequence of Lemma 3.2 the integers \(\dim \big (E^u_0(t_0)\cap E^s_0(t_0)\big )\) and \(\dim \big (E^u_1(t_0)\cap E^s_1(t_0)\big )\) does not depend on \(t_0\). Summing up all the results scattered so far we are in position to prove the main result of this Section.

Theorem 3.9

(Spectral flow formula) In the above notation and if assumption (H1) holds, then we have

$$\begin{aligned} {{\mathrm{i_{\mathrm{spec}}}}}(A)= & {} {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (E^s_0(\tau ),E^u_0(-\tau ); \tau \in [0,+\infty )\big ) + {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (E^s_\lambda (+\infty ), E^u_\lambda (-\infty ); \lambda \in [0,1]\big )\\&\quad - {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big ( E^s_1(\tau ),E^u_1(-\tau ); \tau \in [0,+\infty )\big ). \end{aligned}$$

Proof

By Definition 3.4, we know that \({{\mathrm{i_{\mathrm{spec}}}}}( A)= -{{\mathrm{sf}}}( A_\lambda ; \lambda \in [0,1])\). The results is from Proposition 3.7 and Proposition 3.3. This conclude the proof. \(\square \)

As promised in Sect. 1, by using Theorem 3.9, we are able to prove a new spectral flow formula for Hamiltonian systems parametrized by bounded intervals. Let \(L, M \in \mathscr {C}^0\big ([0,1];\Lambda (n)\big )\) and let us consider the following family of Hamiltonian boundary value problems

$$\begin{aligned} {\left\{ \begin{array}{ll} z'(t)= S_\lambda (t)\, z(t), \qquad t \in [a,b]\\ \big (z(a), z(b)\big )\in L_\lambda \times M_\lambda . \end{array}\right. } \end{aligned}$$
(3.11)

Following authors in [4, 23, 32] and references therein, we associate to the Hamiltonian bvp given in Eq.  (3.11) the following Maslov index. Let \(\gamma _{(\lambda ,a)}(t)\) be denote the two parameter family of matrix-valued maps \(\gamma _{(\lambda ,a)}: [a,b] \rightarrow \mathrm {Sp}\,(2n,\mathbb {R})\) defined by

$$\begin{aligned} {\left\{ \begin{array}{ll} \gamma '_{(\lambda ,a)}(t)= S_\lambda (t)\,\gamma _{(\lambda ,a)}(t), \qquad t \in [a,b]\\ \gamma _{(\lambda ,a)}(a)=I\end{array}\right. } \end{aligned}$$

and we now consider the integer given by \({{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}(E_{\lambda , [a,b]}; \lambda \in [0,1])\), where \(E_{[a,b]}\in \mathscr {P}\big ([0,1];\mathbb {R}^{2n}\big )\) is pointwise defined by \(E_{[a,b]}(\lambda ):=\big ( M_\lambda ,\gamma _a(b)L_\lambda \big )\). For any \(c \in (a,b)\), we consider the real-valued functions on [ab] defined by

$$\begin{aligned} \alpha (t):=\dfrac{(t-b)}{(a-b)}(c-b)+b \ \ \text { if }\ \ t \in [a,b] \quad \beta (t):=\dfrac{(t-b)}{(a-b)}(c-a)+a \ \ \text { if } \ \ t \in [a,b].\quad \end{aligned}$$
(3.12)

We observe that the function \(\alpha \) is a positive affine reparameterisation of the interval [cb] with the same orientation whilst the function \(\beta \) is a negative affine reparameterisation of the interval [ac] with the opposite orientation. For \(c=(a+b)/2\) the functions introduced in Eq.  (3.12) reduce respectively to

$$\begin{aligned} \alpha (t)= \dfrac{1}{2} (t-b) +b \ \ \text { if }\ \ t \in [a,b]\\ \quad \beta (t)= \dfrac{1}{2}(b-t) +a \ \ \text { if } \ \ t \in [a,b]. \end{aligned}$$

Let \( c \in (a,b)\), \(F\in \mathscr {P}([0,1];\mathbb {R}^{2n})\) be the continuous path of ordered pairs of Lagrangian paths pointwise defined by

$$\begin{aligned} F(\lambda ):=\big ( W_\lambda (c),V_\lambda (c)\big ), \end{aligned}$$

where

$$\begin{aligned} W_\lambda (c):=\gamma _a(c)\gamma _a^{-1}(b)\, M_\lambda . \text { and } V_\lambda (c):=\gamma _{(a,\lambda )}(c)L_\lambda \end{aligned}$$

Lemma 3.10

Under the previous notation, we have

$$\begin{aligned} {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}(F;[0,1])= {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}(E_{[a,b]};[0,1]). \end{aligned}$$

Proof

The proof readily follows since

$$\begin{aligned} \begin{aligned}&{{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (F;[0,1]\big )= {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (\gamma ^{-1}_a(b-c)M, \gamma _a(c)L;[0,1]\big )\\&= {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (M,\gamma _a(b-c)\gamma _a(c)L;[0,1]\big )= {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (M,\gamma _a(b)L;[0,1]\big )={{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}(E_{[a,b]};[0,1]). \end{aligned} \end{aligned}$$

This conclude the proof. \(\square \)

We denote by \( W^{1,2}([a,b];L_\lambda , M_\lambda )\) the Sobolev space defined by

$$\begin{aligned} W^{1,2}([a,b],L_\lambda , M_\lambda ):=\left\{ z \in W^{1,2}([a,b];\mathbb {R}^{2n})| z(a)\in L_\lambda \text { and } z(b) \in M_\lambda \right\} \end{aligned}$$

and for each \(\lambda \in [0,1]\), we define the operators

$$\begin{aligned} T_\lambda :=- J \frac{d}{dt} - B_\lambda (t): W^{1,2}([a,b];L, M) \subset L^2([a,b], \mathbb {R}^{2n}) \longrightarrow L^2([a,b], \mathbb {R}^{2n}). \end{aligned}$$

It is well-known that for each \(\lambda \in [0,1]\), \( T_\lambda \) is a closed unbounded selfadjoint Fredholm operator in \(L^2([a,b], \mathbb {R}^{2n})\) having domain \( W^{1,2}([a,b];L_\lambda , M_\lambda )\) (cf. [18], for instance) and hence it remains well-defined (gap continuous) path of closed selfadjoint Fredholm operators

$$\begin{aligned} T:[0,1]\ni \lambda \longmapsto T_\lambda \in \mathscr {CF}^{sa}(L^2([a,b],\mathbb {R}^{2n})). \end{aligned}$$

Theorem 3.11

(Spectral flow formula on bounded intervals) In the previous notation, we have

$$\begin{aligned} {{\mathrm{i_{\mathrm{spec}}}}}(T)= & {} {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (W_1\big (\beta (\tau )\big ), V_1\big (\alpha (\tau )\big );\tau \in [a,b]\big ) + {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (M_\lambda ,L_\lambda ;\lambda \in [0,1]\big )\\&\quad - {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (W_0\big (\beta (\tau )\big ), V_0\big (\alpha (\tau )\big ); \tau \in [a,b]\big ) \end{aligned}$$

Proof

We define the operators

$$\begin{aligned} D_\lambda :=- J \frac{d}{dt} : W^{1,2}([a,b];V_\lambda (c), W_\lambda (c)) \subset L^2([a,b], \mathbb {R}^{2n}) \longrightarrow L^2([a,b], \mathbb {R}^{2n}). \end{aligned}$$

By arguing as inthe proof of Proposition 3.6, we have \({{\mathrm{sf}}}(D_\lambda ;\lambda \in [0,1])={{\mathrm{sf}}}(T_\lambda ;\lambda \in [0,1])\). We get also that

$$\begin{aligned} {{\mathrm{i_{\mathrm{spec}}}}}(T)=-{{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}(W_\lambda (c), V_\lambda (c);\lambda \in [0,1]). \end{aligned}$$

Arguing as in the proof of Theorem 3.9 and using the additivity properties of the \({{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\)-index, we get the result. This conclude the proof. \(\square \)

Corollary 3.12

In the assumption of Theorem 3.11, if \((L_\lambda , M_\lambda ) \equiv (L,M) \in \Lambda (n)\times \Lambda (n)\), then we have

$$\begin{aligned} {{\mathrm{i_{\mathrm{spec}}}}}(T)={{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (W_1\big (\beta (\tau )\big ), V_1\big (\alpha (\tau )\big );\tau \in [a,b]\big ) - {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (W_0\big (\beta (\tau )\big ), V_0\big (\alpha (\tau )\big );\tau \in [a,b]\big ). \end{aligned}$$

Inspired by the classical Morse-type Index Theorem for periodic solution of Hamiltonian system (cf. [23] and references therein) we now prove a Morse-type index Theorem for unbounded motions of a Hamiltonian system.

Proof of Theorem 1

The proof of this result in the case of heteroclinic/homoclinic motions immediately follows by Theorem 3.9, Definition 1.2 and the previous discussion. The other two formulas in Theorem 1 on the future and past halfclinic orbits, can be directly obtained by the previous one simply by setting for \(i=0,1\) simply \(E^u_i(-\tau )\equiv L_i\) in the case of future heteroclinic orbit and \(E^s_i(\tau )\equiv L_i\) in the case of past heteroclinic orbit for any \(\tau \in [0,+\infty )\). This conclude the proof. \(\square \)

Proof of Corollary 1 and Corollary 2

Let us consider on the space \(\mathcal W\) the path of closed selfadjoint Fredholm operators pointwise respectively given by \(A_\lambda :=-J\dfrac{d}{dt} - B_*-\lambda \big (B(t)-B_*\big )\). We observe that \({{\mathrm{\iota }}}(w_0) =0\) since \(E^u_0(\tau ),E^s_0(\tau )\) is constant. Similarly, \(E^s_\lambda (+\infty ),E^u_\lambda (-\infty )\) not depend on \(\lambda \) implies \( {{\mathrm{\mu ^{\scriptscriptstyle {\mathrm {CLM}}}}}}\big (E^s_\lambda (+\infty ),E^u_\lambda (-\infty ); \lambda \in [0,1]\big )=0\). This conclude the proof of Corollary 1. The proof of Corollary 2 is completely analogous.       \(\square \)

Proof of Theorem 2

The proof of this result readily follows by Definition 1.5 and Theorem 3.11. This conclude the proof. \(\square \)