‘Proof’ that non-Abelian Berry phase vanishes identically For a degenerate system with Hamiltonian $H =H(\mathbf{R})$ and eigenstates $\left|n(\mathbf{R})\right\rangle$ the non-Abelian Berry connection is
$$A^{(mn)}_i=\mathrm{i}\left\langle m|\partial_in\right\rangle\tag{1}$$
and the non-Abelian Berry curvature is
$$
F_{ij} = \partial_i A_j-\partial_j A_i - \mathrm{i}\left[A_i, A_j\right]
$$
in matrix notation or, including the state indices:
$$
F_{ij}^{(mn)} = \partial_i A_j^{(mn)}-\partial_j A_i^{(mn)}-\mathrm{i}\sum_k\left( A_i^{(mk)}A_j^{(kn)}-A_j^{(mk)}A_i^{(kn)}\right).\tag{2}
$$
Substituting (1) into (2) gives
\begin{align}
F_{ij}^{(mn)} &=  \mathrm{i}\partial_i\left\langle m|\partial_jn\right\rangle- \mathrm{i}\partial_j\left\langle m|\partial_in\right\rangle -\mathrm{i}\sum_k\left(\mathrm{i}^2\left\langle m|\partial_i k\right\rangle\left\langle k|\partial_j n\right\rangle-\mathrm{i}^2\left\langle m|\partial_j k\right\rangle\left\langle k|\partial_i n\right\rangle\right)\\
&=\mathrm{i}\left\langle \partial_i m|\partial_jn\right\rangle+\mathrm{i}\left\langle  m|\partial_i\partial_jn\right\rangle -\mathrm{i}\left\langle \partial_j m|\partial_in\right\rangle-\mathrm{i}\left\langle  m|\partial_j\partial_in\right\rangle +\mathrm{i}\langle m|\left(\sum_k|\partial_i k\rangle\langle k|\right)|\partial_j n\rangle-\mathrm{i}\langle m|\left(\sum_k|\partial_j k\rangle\langle k|\right)|\partial_i n\rangle\\
&=\mathrm{i}\left\langle \partial_i m|\partial_jn\right\rangle -\mathrm{i}\left\langle \partial_j m|\partial_in\right\rangle +\mathrm{i}\langle m|\left(-\sum_k| k\rangle\langle \partial_ik|\right)|\partial_j n\rangle-\mathrm{i}\langle m|\left(-\sum_k|k\rangle\langle \partial_jk|\right)|\partial_i n\rangle\\
&=\mathrm{i}\left\langle \partial_i m|\partial_jn\right\rangle -\mathrm{i}\left\langle \partial_j m|\partial_in\right\rangle -\mathrm{i}\sum_k \underbrace{\langle m| k\rangle}_{\delta_{mk}}(\langle \partial_ik|\partial_j n\rangle-\langle \partial_jk|\partial_i n\rangle)\\
&=\mathrm{i}\left\langle \partial_i m|\partial_jn\right\rangle -\mathrm{i}\left\langle \partial_j m|\partial_in\right\rangle- \mathrm{i}\left\langle \partial_i m|\partial_jn\right\rangle+\mathrm{i}\left\langle \partial_j m|\partial_in\right\rangle\\
&=0.
\end{align}
To go from the second to the third line I used
$$
0=\partial_i(1) = \partial_i\left(\sum_k |k\rangle\langle k| \right) = \sum_k |\partial_i k\rangle\langle k|+\sum_k |k\rangle\langle\partial_i k|.
$$
Clearly I have done something wrong as the Berry curvature is not zero in all cases. Please could someone point out my error?
 A: Your calculation is correct. I believe the problem is that the non-Abelian Berry curvature is useful only when it is defined in a sub-Hilbert space and that subspace is not the same at different parameter R. In this case, the identity you mentioned in the end no longer equals to zero.
A: To expand on Leon's answer, it may be helpful to think in analogy with the usual $U(1)$ gauge theory. We can think of the non-abelian Berry connection as an $SU(n)$ gauge field, where $n$ is the number of bands. Our gauge transformations are a change of basis by unitary matrix $U(k)$ and the connection and curvature transform as
$$
A' = U^\dagger A U + i U^\dagger\partial_k U\\
F' = U^\dagger F U
$$
respectively.
In matrix notation we may write the Berry connection $A = i M^\dagger \partial_k M$ where $M$ is a matrix of the eigenvectors,
$$
M_{ij} = |j\rangle_i.
$$
If $M$ is unitary, corresponding to the condition $\sum_k |k\rangle\langle k| = 1$, we may perform a change of basis which takes $A'\to0$ (explicitly we change basis by $M$), and therefore $F$ must be zero since it is a gauge-covariant quantity.
That is if we keep all bands, every Berry connection is "pure gauge".
However, if we consider a sub-space of the bands, then $M$ is instead a projector onto those bands $M = \sum_{k=1}^{n < N } |k\rangle\langle k|$ where $N$ is the total number of bands, and in general there is not guaranteed to be a change of basis which nullifies $A$.
Thus, $F$ can be non-zero in this subspace.
A: Shouldn't it be ?
$$
F_{ij}^{(mn)} = \partial_i A_j^{(mn)}-\partial_j A_i^{(mn)}-\mathrm{i}\sum_k\left( A_i^{(mk)}A_j^{(kn)} \mathbf+ A_j^{(mk)}A_i^{(kn)}\right).\tag{2}
$$
