In his paper Basically bounded functors and flat sheaves (Pacific Math. J, vol. 57, no. 2, 1975, p. 597-610), William C. Waterhouse gives a nice example of a presheaf that has no associated sheaf. This is Theorem 5.5 (page 605). I thank François Loeser for having indicated this paper to me, and for his suggestion of explaining it here!
Of course, such a beast is reputed not to exist, since it is well known that any presheaf has an associated sheaf, see for example Godement's book Topologie algébrique et théorie des faisceaux, pages 110-111.
That is, for any presheaf on a topological space, there is a sheaf with a morphism of presheaves which satisfies a universal property: any morphism from to a sheaf factors uniquely through .
Waterhouse's presheaf is a more sophisticated example of a presheaf, since it is a presheaf on the category of affine schemes for the flat topology. Thus, a presheaf on the category of affine schemes is the datum,
- of a set for every ring ,
- and of a map for every morphism of rings ,
subject to the following conditions:
- if and are morphism of rings, then ;
- one has for every ring .
Any morphism of rings gives rise to two morphisms respectively defined by and , and the two compositions are equal. Consequently, for any presheaf , the two associated maps are equal.
By definition, a presheaf is a sheaf for the flat topology if for any faithfully flat morphism of rings, the map is injective and its image is the set of elements at which the two natural maps and from to coincide.
Here is Waterhouse's example.
For every ring , let be the set of all locally constant functions from to some von Neumann cardinal such that for every .
This is a presheaf. Indeed, let is a ring morphism, let be the associated continuous map on spectra. For , then is a locally constant map from to some von Neumann cardinal. Moreover, for every prime ideal in , with inverse image , the morphism induces an injection from the residue field into , so that satisfies the additional condition on , hence .
However, this presheaf has no associated sheaf for the flat topology. The proof is by contradiction. So assume that is a sheaf and satisfies the universal property.
First of all, we prove that the morphism is injective: for any ring , the map is injective. For any cardinal and any ring , let be the set of locally constant maps from to . Then is a presheaf, and in fact a sheaf. There is a natural morphism of presheaves , given by if , that is, , and otherwise. Consequently, there is a unique morphism of sheaves such that . For any ring , and any large enough cardinal , the map is injective. In particular, the map must be injective.
Let be a ring and be a faithfully flat morphism. Let be the two natural morphisms of rings defined above. Then, the equalizer of the two maps and from to must inject into the equalizer of the two corresponding maps from to . Consequently, one has an injection from to .
The contradiction will become apparent once one can find rings for which has a cardinality as large as desired. If is a point , then is just the set of functions from the point to some von Neumann cardinal such that . That is, is the cardinal itself. And since is a point, the coincidence condition is necessarily satisfied, so that .
To conclude, it suffices to take a faithfully flat morphism such that is field of cardinality strictly greater than . For example, one can take to be a field and the field of rational functions in many indeterminates (strictly more than the cardinality of ).
What does this example show? Why isn't there a contradiction in mathematics (yet)?
Because the definition of sheaves and presheaves for the flat topology that I gave above was definitely defective: it neglects in a too dramatic way the set theoretical issues that one must tackle to define sheaves on categories. In the standard setting of set theory provided by ZFC, everything is a set. In particular, categories, presheaves, etc. are sets or maps between sets (themselves represented by sets). But the presheaf that Waterhouse defines does not exist as a set, since there does not exist a set of all rings, nor a set of all von Neumann cardinals.
The usual way (as explained in SGA 4) to introduce sheaves for the flat topology consists in adding the axiom of universes — there exists a set which is a model of set theory. Then, one does not consider the (inexistent) set of all rings, or cardinals, but only those belonging to the universe —one talks of -categories, -(pre)sheaves, etc.. In that framework, the -presheaf defined by Waterhouse (where one restricts oneself to algebras and von Neumann cardinals in ) has an associated sheaf . But this sheaf depends on the chosen universe: if is an universe containing , the restriction of to algebras in will no longer be a -presheaf.