  Contextuality can be understood as the impossibility to construct a globally
consistent description of a model even if there is local agreement. In
particular, quantum models present this property. We can describe contextuality
with the bundle approach, where the scenario is represented as a simplicial
complex, the fibers being the sets of outcomes, and contextuality as the
non-existence of global section in the measure bundle. Using the generalization
to non-finite outcome fibers, we built in details the concept of measure
bundle, demonstrating the Fine-Abramsky-Brandenburger theorem for the bundle
formalism. We introduce a hierarchy called n-contextuality to explore the
dependence of contextual behavior of a model to the topology of the scenario,
following the construction of it as a simplicial complex. With it we exemplify
the dependence on higher homology groups and show that GHZ models, thus quantum
theory, has all levels of the hierarchy. Also, we give an example of how
non-trivial topology of the scenario result an increase of contextual behavior.
For the first level of the hierarchy, we construct the concept of connection
through Markov operators for the measure bundle. Taking the case of equal
fibers we can identify the outcomes as the basis of a vector space, that
transform according to a group extracted from the connection. We thus show that
contextuality has a relationship with the non-triviality of the holonomy group
in the respective frame bundle.
