Let X be a topological space, and A a set. The sections of the constant sheaf over an open setU may be interpreted as the continuous functions, where A is given the discrete topology. If U is connected, then these locally constant functions are constant. If f: X → is the unique map to the one-point space and A is considered as a sheaf on, then the inverse imagef−1A is the constant sheaf on X. The sheaf space of is the projection mapX × A → X.
A detailed example
Let X be the topological space consisting of two points p and q with the discrete topology. X has four open sets: ∅,,,. The five non-trivial inclusions of the open sets of X are shown in the chart. A presheaf on X chooses a set for each of the four open sets of X and a restriction map for each of the nine inclusions. The constant presheaf with value Z, which we will denote F, is the presheaf that chooses all four sets to be Z, the integers, and all restriction maps to be the identity. F is a functor, hence a presheaf, because it is constant. F satisfies the gluing axiom, but it is not a sheaf because it fails the local identity axiom on the empty set. This is because the empty set is covered by the empty family of sets: Vacuously, any two sections of F over the empty set are equal when restricted to any set in the empty family. The local identity axiom would therefore imply that any two sections of F over the empty set are equal, but this is not true. A similar presheaf G that satisfies the local identity axiom over the empty set is constructed as follows. Let, where 0 is a one-element set. On all non-empty sets, give G the value Z. For each inclusion of open sets, G returns either the unique map to 0, if the smaller set is empty, or the identity map on Z. Notice that as a consequence of the local identity axiom for the empty set, all the restriction maps involving the empty set are boring. This is true for any presheaf satisfying the local identity axiom for the empty set, and in particular for any sheaf. G is a separated presheaf, but unlike F it fails the gluing axiom. is covered by the two open sets and, and these sets have empty intersection. A section on or on is an element ofZ, that is, it is a number. Choose a section m over and n over, and assume that. Because m and n restrict to the same element 0 over ∅, the gluing axiom requires the existence of a unique section s on that restricts to m on and n on. But because the restriction map from to is the identity,, and similarly, so, a contradiction. is too small to carry information about both and. To enlarge it so that it satisfies the gluing axiom, let. Let π1 and π2 be the two projection maps. Define and. For the remaining open sets and inclusions, let H equal G. H is a sheaf called the constant sheaf on X with value Z. Because Z is a ring and all the restriction maps are ring homomorphisms, H is a sheaf of commutative rings.