  We consider the mixed gravitational-Yang-Mills anomaly as the coupling
between the $K$-theory and $K$-homology of a $C^*$-algebra crossed product. The
index theorem of Connes-Moscovici allows to compute the Chern character of the
$K$-cycle by local formulae involving connections and curvatures. It gives a
topological interpretation to the anomaly, in the sense of noncommutative
algebras.
