Sheaf
In mathematics a sheaf means a topological construction F on a given space X giving one a set or richer structure F(U) for each open set U of X, which are in a certain sense compatible with each other with respect to restrictions to smaller subsets and patching smaller sets to a bigger one. It can also mean a more refined generalisation, for which see Grothendieck topology.
The formal definition of a sheaf divides into two parts. The first, which defines the idea of presheaf, is simple category theory. The second carries the burden of saying patching works, and is easy to understand in examples such as analytic continuation, where it amounts to saying that a consistent definition of an analytic function on each of several open sets in the complex plane gives rise to an analytic function on the union.
A presheaf of sets on X is a contravariant functor from the category of open subsets of X, with inclusions as morphisms, to the category of sets (or another concrete category - the category of abelian group, for example). Usually, however, we insist that there's a forgetful functor from that category to Set). More explicitly if U and V are open subsets of X with U contained in V, we are given the data of a function from F(V) to F(U), which we can name 'restriction from V to U'. The functor condition implies some basic axioms for restrictions.
A sheaf is a presheaf, for which the sheaf axion holds. The sheaf axiom explains the relation of F(V) with all the F(U) when U runs over an open cover of V. The presheaf condition implies that a single element of F(V) gets restricted to compatible elements of the F(U). This means, if the open sets U1 and U2 intersect, the restrictions of this element in F(U1) and F(U2) gets restricted to the same element in F(U1 ∩ U2). Now the sheaf axiom additionally demands the converse: If you have a family of such compatible elements in the F(U), it comes from precisely one element in F(V).
There are many examples in which the sheaf axiom can be routinely checked: for example the sheaf C(X) of real-valued continuous functions on X, for which C(U) is the set of real-valued continuous functions on U.
If we fix a point x of X and consider F(N) as N runs over open neighbourhoods of x, we can take the (direct) limit, in the categorical sense. We call that Fx, the stalk of F at x. In the theory it is shown in what sense F can be reconstructed from its stalks.
In early developments of sheaf theory, it was shown that giving a sheaf F as a functor is as good as giving a certain topological space Y together with a mapping from Y to X. Here Y is supposed to be the space of stalks of X: each stalk is given the discrete topology but Y is given the topology such that F can be recovered from Y as the sheaf of sections of the mapping. Of course, this accounts for the agricultural terminology.
What that means is that for open sets U we construct the sections, i.e. mappings from U to Y such that the composition with the given mapping from Y to X is the identity on U. Given any mapping Z to X we can in fact in this way construct a sheaf of sections: that is, sections of any continuous mapping obey the axioms for a sheaf. The statement is that sheaves as functors can be considered to arise in this way, up to a natural transformation, the isomorphism concept for functors.
The correct topology for Y makes the mapping to X a local homeomorphism. This therefore gives a complete picture of sheaves on X, as worked out for example in the book of Godement. Much of the categorical language came later than that.
The space associated to the sheaf of sections of Z, with its given continuous mapping to X, is therefore endowed with a local homeomorphism to X, and in a sense deals with all the 'ramification' in the mapping, in the 'best possible way'. This may be expressed by adjoint functors; but is also important as an intuition about sheaves of sets. This collection of ideas is related to topos theory, but in a sense that more general notion of sheaf moves away from geometric intuition.
If x is an element of X, and F is a sheaf on X, it makes sense to speak about germs of elements of F(U) where U is an open set containing x. For f in F(U) , we can take the restriction f|N of f to any open neighbourhood N of x. The family of these f|N gives rise to an element fx of the stalkFx. We call this the germ at x of f: it is a kind of 'ghost' of f, looked at only very near x. See for example the detailed example given at local ring.
Another example is given by analytic functions, for which power series serve as germs; but note that the germ of a differentiable function is not given by Taylor expansion.
There's a natural one-to-one correspondence (functor) between sheaves and étale spacess. Here an étale space for X is a local homeomorphism to X; this equivalence of categories between sheaves on X and étale spaces for X sums up the previous discussion at a higher level of abstraction.
Examples:
The formal definition
Definition of a presheaf
The sheaf axiom
Stalk of a sheaf
Space associated to a sheaf
Germs
Étale spaces