  The theory of principal bundles makes sense in any infinity-topos, such as
that of topological, of smooth, or of otherwise geometric
infinity-groupoids/infinity-stacks, and more generally in slices of these. It
provides a natural geometric model for structured higher nonabelian cohomology
and controls general fiber bundles in terms of associated bundles. For suitable
choices of structure infinity-group G these G-principal infinity-bundles
reproduce the theories of ordinary principal bundles, of bundle
gerbes/principal 2-bundles and of bundle 2-gerbes and generalize these to their
further higher and equivariant analogs. The induced associated infinity-bundles
subsume the notions of gerbes and higher gerbes in the literature.
  We discuss here this general theory of principal infinity-bundles, intimately
related to the axioms of Giraud, Toen-Vezzosi, Rezk and Lurie that characterize
infinity-toposes. We show a natural equivalence between principal
infinity-bundles and intrinsic nonabelian cocycles, implying the classification
of principal infinity-bundles by nonabelian sheaf hyper-cohomology. We observe
that the theory of geometric fiber infinity-bundles associated to principal
infinity-bundles subsumes a theory of infinity-gerbes and of twisted
infinity-bundles, with twists deriving from local coefficient infinity-bundles,
which we define, relate to extensions of principal infinity-bundles and show to
be classified by a corresponding notion of twisted cohomology, identified with
the cohomology of a corresponding slice infinity-topos.
  In a companion article [NSSb] we discuss explicit presentations of this
theory in categories of simplicial (pre)sheaves by hyper-Cech cohomology and by
simplicial weakly-principal bundles; and in [NSSc] we discuss various examples
and applications of the theory.
