  When a flux quantum is pushed through a gapped two-dimensional tight-binding
operator, there is an associated spectral flow through the gap which is shown
to be equal to the index of a Fredholm operator encoding the topology of the
Fermi projection. This is a natural mathematical formulation of Laughlin's
Gedankenexperiment. It is used to provide yet another proof of the bulk-edge
correspondence. Furthermore, when applied to systems with time reversal
symmetry, the spectral flow has a characteristic $Z_2$ signature, while for
particle-hole symmetric systems it leads to a criterion for the existence of
zero energy modes attached to half-flux tubes. Combined with other results,
this allows to explain all strong invariants of two-dimensional topological
insulators in terms of a single Fredholm operator.
