if $\pi\lambda=\mu+\frac{\pi}{2}+k\pi$, or equivalently $\mu=\pi\lambda-\frac{\pi}{2}-k\pi$.\
In (ii), $u$ belongs to the domain of $\mathcal{A}_\lambda$ if and only if

$$\begin{aligned}
u(0)=v\in L_0,\quad u(1)=\exp(-\mu J)v\in\gamma'_{nor},\end{aligned}$$

which is equivalent to

$$(\cos(\mu)I_{2n}-\sin(\mu)J)(\mathbb{R}^n\times\{0\})\cap\left(\mathbb{R}(\sin(\pi\lambda)e_1-\cos(\pi\lambda)e_{n+1})+\sum^{2n}_{j=n+2}{\mathbb{R}e_j}\right)\neq\{0\}.$$ Again, there are two cases in which this intersection is non-trivial. Firstly, $\mu=k\pi+\frac{\pi}{2}$ where $\cos(\mu)=0$. Secondly, if there is some $\alpha\neq 0$ such that $\alpha\cos(\mu)e_1=\sin(\pi\lambda)e_1$ and $\alpha\sin(\mu)e_{n+1}=\cos(\pi\lambda)e_{n+1}$, which is equivalent to

$$e^{i\pi\lambda}=\cos(\pi\lambda)+i\sin(\pi\lambda)=\alpha(sin(\mu)+i\cos(\mu))=\alpha i e^{-i\mu}=\alpha e^{i(\frac{\pi}{2}-\mu)}.$$ Hence $|\alpha|=1$, and the latter equation holds if and only if $\pi\lambda=\frac{\pi}{2}-\mu+k\pi$ which finally shows that $\mu=-\pi\lambda+\frac{\pi}{2}+k\pi$.

We see from the previous lemma that in both cases there is only one eigenvalue of $\mathcal{A}_\lambda$ that crosses the axis whilst the parameter $\lambda$ travels from $0$ to $1$. It is now an immediate consequence of the definition of the spectral flow that $\operatorname{sf}(\mathcal{A})=1$ for $(\gamma_1,\gamma_2)=(\gamma_{nor},L_1)$ and $\operatorname{sf}(\mathcal{A})=-1$ for $(\gamma_1,\gamma_2)=(L_0,\gamma'_{nor})$. Hence Theorem \[main\] is shown in the admissible case.

Step 2: The general case {#step-2-the-general-case .unnumbered}
------------------------

Let $(\gamma_1,\gamma_2)$ be a pair of paths in $\Lambda(n)$ which is not necessarily admissible, and let $\mathcal{A}$ be the path . Let $\delta>0$ be as in Lemma \[lemma-sflperturbation\] such that

$$\begin{aligned}
\operatorname{sf}(\mathcal{A})=\operatorname{sf}(\mathcal{A}^{\delta_0})\end{aligned}$$

for all $0\leq \delta_0\leq\delta$.\
We consider the solution $\Psi:I\rightarrow\operatorname{Sp}(2n,\mathbb{R})$ of the differential equation

$$\begin{aligned}
\begin{cases}
J\Psi'(t)+\delta_0\Psi(t)=0,\quad t\in I\\
\Psi(0)=I_{2n},
\end{cases}\end{aligned}$$

