  In the background effective field theory of heterotic string theory, the
Green-Schwarz anomaly cancellation mechanism plays a key role. Here we
reinterpret it and its magnetic dual version in terms of differential twisted
String- and differential twisted Fivebrane-structures that generalize the
notion of Spin-structures and Spin-lifting gerbes and their differential
refinement to smooth Spin-connections. We show that all these structures can be
encoded in terms of nonabelian cohomology, twisted nonabelian cohomology, and
differential twisted nonabelian cohomology, extending the differential
generalized abelian cohomology as developed by Hopkins and Singer and shown by
Freed to formalize the global description of anomaly cancellation problems in
higher gauge theories arising in string theory. We demonstrate that the
Green-Schwarz mechanism for the H_3-field, as well as its magnetic dual version
for the H_7-field define cocycles in differential twisted nonabelian cohomology
that may be called, respectively, differential twisted Spin(n)-, String(n)- and
Fivebrane(n)-structures on target space, where the twist in each case is
provided by the obstruction to lifting the classifying map of the gauge bundle
through a higher connected cover of U(n) or O(n). We show that the twisted
Bianchi identities in string theory can be captured by the (nonabelian)
L-infinity-algebra valued differential form data provided by the differential
refinements of these twisted cocycles.
