In mathematics, a sheaf is a tool for systematically tracking locally defined data attached to the open sets of a topological space. The data can be restricted to smaller open sets, and the data assigned to an open set is equivalent to all collections of compatible data assigned to collections of smaller open sets covering the original one. For example, such data can consist of the rings of continuous or smooth real-valued functions defined on each open set. Sheaves are by design quite general and abstract objects, and their correct definition is rather technical. They are variously defined, for example, as sheaves of sets or sheaves of rings, depending on the type of data assigned to open sets. In mathematics, a sheaf is a tool for systematically tracking locally defined data attached to the open sets of a topological space. The data can be restricted to smaller open sets, and the data assigned to an open set is equivalent to all collections of compatible data assigned to collections of smaller open sets covering the original one. For example, such data can consist of the rings of continuous or smooth real-valued functions defined on each open set. Sheaves are by design quite general and abstract objects, and their correct definition is rather technical. They are variously defined, for example, as sheaves of sets or sheaves of rings, depending on the type of data assigned to open sets. There are also maps (or morphisms) from one sheaf to another; sheaves (of a specific type, such as sheaves of abelian groups) with their morphisms on a fixed topological space form a category. On the other hand, to each continuous map there is associated both a direct image functor, taking sheaves and their morphisms on the domain to sheaves and morphisms on the codomain, and an inverse image functor operating in the opposite direction. These functors, and certain variants of them, are essential parts of sheaf theory. Due to their general nature and versatility, sheaves have several applications in topology and especially in algebraic and differential geometry. First, geometric structures such as that of a differentiable manifold or a scheme can be expressed in terms of a sheaf of rings on the space. In such contexts several geometric constructions such as vector bundles or divisors are naturally specified in terms of sheaves. Second, sheaves provide the framework for a very general cohomology theory, which encompasses also the 'usual' topological cohomology theories such as singular cohomology. Especially in algebraic geometry and the theory of complex manifolds, sheaf cohomology provides a powerful link between topological and geometric properties of spaces. Sheaves also provide the basis for the theory of D-modules, which provide applications to the theory of differential equations. In addition, generalisations of sheaves to more general settings than topological spaces, such as Grothendieck topology, have provided applications to mathematical logic and number theory. In topology, differential geometry, and algebraic geometry, several structures defined on a topological space (e.g., a differentiable manifold) can be naturally localised or restricted to open subsets of the space: typical examples include continuous real or complex-valued functions, n times differentiable (real or complex-valued) functions, bounded real-valued functions, vector fields, and sections of any vector bundle on the space. Presheaves formalise the situation common to the examples above: a presheaf (of sets) on a topological space is a structure that associates to each open set U of the space a set F(U) of sections on U, and to each open set V included in U a map F(U) → F(V) giving restrictions of sections over U to V. Each of the examples above defines a presheaf by taking the restriction maps to be the usual restriction of functions, vector fields and sections of a vector bundle. Moreover, in each of these examples the sets of sections have additional algebraic structure: pointwise operations make them abelian groups, and in the examples of real and complex-valued functions the sets of sections even have a ring structure. In addition, in each example the restriction maps are homomorphisms of the corresponding algebraic structure. This observation leads to the natural definition of presheaves with additional algebraic structure such as presheaves of groups, of abelian groups, of rings: sets of sections are required to have the specified algebraic structure, and the restrictions are required to be homomorphisms. Thus for example continuous real-valued functions on a topological space form a presheaf of rings on the space. Given a presheaf, a natural question to ask is to what extent its sections over an open set U are specified by their restrictions to smaller open sets Vi of an open cover of U. A presheaf is separated if its sections are 'locally determined': whenever two sections over U coincide when restricted to each of Vi, the two sections are identical. All examples of presheaves discussed above are separated, since in each case the sections are specified by their values at the points of the underlying space. Finally, a separated presheaf is a sheaf if compatible sections can be glued together, i.e., whenever there is a section of the presheaf over each of the covering sets Vi, chosen so that they match on the overlaps of the covering sets, these sections correspond to a (unique) section on U, of which they are restrictions. It is easy to verify that all examples above except the presheaf of bounded functions are in fact sheaves: in all cases the criterion of being a section of the presheaf is local in a sense that it is enough to verify it in an arbitrary neighbourhood of each point. On the other hand, a function can be bounded on each set of an (infinite) open cover of a space without being bounded on all of the space; thus bounded functions provide an example of a presheaf that in general fails to be a sheaf. Another example of a presheaf that fails to be a sheaf is the constant presheaf that associates the same fixed set (or abelian group, or ring,...) to each open set: it follows from the gluing property of sheaves that the set of sections on a disjoint union of two open sets is the Cartesian product of the sets of sections over the two open sets. The correct way to define the constant sheaf FA (associated to for instance a set A) on a topological space is to require sections on an open set U to be continuous maps from U to A equipped with the discrete topology; then in particular FA(U) = A for connected U. Maps between sheaves or presheaves (called morphisms), consist of maps between the sets of sections over each open set of the underlying space, compatible with restrictions of sections. If the presheaves or sheaves considered are provided with additional algebraic structure, these maps are assumed to be homomorphisms. Sheaves endowed with nontrivial endomorphisms, such as the action of an algebraic torus or a Galois group, are of particular interest. Presheaves and sheaves are typically denoted by capital letters, F being particularly common, presumably for the French word for sheaves, faisceaux. Use of calligraphic letters such as F {displaystyle {mathcal {F}}} is also common.