We solve the gluing problem for the tl-invariant. Consider a generaliz
ed Dirac operator D over a compact Riemannian manifold M that is parti
tioned by a compact hypersurface N such that M := M(1) U-N M(2). We as
sume that the Riemannian metric of M and D have a product structure ne
ar N, i.e., D = I (partial derivative/partial derivative tau + D-N) wi
th some Dime operator D-N On N. Using boundary conditions of Atiyah-Pa
todi-Singer type parametrized by Lagrangian subspaces L(i) of kerD(N)
we define selfadjoint extensions D-i, i = 1, 2, over M(i). We express
the eta-invariant of D in terms of the eta-invariants of D-i ,an invar
iant m(L(1), L(2)) Of the pair of the Lagrangian subspaces L(1), L(2),
which is related to the Maslov index and an integer-valued term J. In
the adiabatic limit, i.e., if a tubular neighborhood of N is long eno
ugh, the vanishing of J is shown under certain regularity conditions.
We apply this result in order to prove cutting and pasting formulas fo
r the eta-invariant, a Wall nonadditivity result for the index of Atiy
ah-Patodi-Singer boundary value problems and a splitting formula for t
he spectral flow.