  In a previous paper with Adam Brandenburger, we used sheaf theory to analyze
the structure of non-locality and contextuality. Moreover, on the basis of this
formulation, we showed that the phenomena of non-locality and contextuality can
be characterized precisely in terms of obstructions to the existence of global
sections.
  Our aim in the present work is to build on these results, and to use the
powerful tools of sheaf cohomology to study the structure of non-locality and
contextuality. We use the Cech cohomology on an abelian presheaf derived from
the support of a probabilistic model, viewed as a compatible family of
distributions, in order to define a cohomological obstruction for the family as
a certain cohomology class. This class vanishes if the family has a global
section. Thus the non-vanishing of the obstruction provides a sufficient (but
not necessary) condition for the model to be contextual.
  We show that for a number of salient examples, including PR boxes, GHZ
states, the Peres-Mermin magic square, and the 18-vector configuration due to
Cabello et al. giving a proof of the Kochen-Specker theorem in four dimensions,
the obstruction does not vanish, thus yielding cohomological witnesses for
contextuality.
