# Gluing axiom

In mathematics, the gluing axiom is introduced to define what a sheaf ${\mathcal {F}}$ on a topological space $X$ must satisfy, given that it is a presheaf, which is by definition a contravariant functor
    ${\mathcal {F}}:{\mathcal {O}}(X)\rightarrow C$
to a category $C$ which initially one takes to be the category of sets. Here ${\mathcal {O}}(X)$ is the partial order of open sets of $X$ ordered by inclusion maps; and considered as a category in the standard way, with a unique morphism
    $U\rightarrow V$
if $U$ is a subset of $V$, and none otherwise.
As phrased in the sheaf article, there is a certain axiom that $F$ must satisfy, for any open cover of an open set of $X$. For example, given open sets $U$ and $V$ with union $X$ and intersection $W$, the required condition is that
    ${\mathcal {F}}(X)$ is the subset of ${\mathcal {F}}(U)\times {\mathcal {F}}(V)$ With equal image in ${\mathcal {F}}(W)$
In less formal language, a section $s$ of $F$ over $X$ is equally well given by a pair of sections :$(s',s'')$ on $U$ and $V$ respectively, which 'agree' in the sense that $s'$ and $s''$ have a common image in ${\mathcal {F}}(W)$ under the respective restriction maps
    ${\mathcal {F}}(U)\rightarrow {\mathcal {F}}(W)$
and
    ${\mathcal {F}}(V)\rightarrow {\mathcal {F}}(W)$.
The first major hurdle in sheaf theory is to see that this gluing or patching axiom is a correct abstraction from the usual idea in geometric situations. For example, a vector field is a section of a tangent bundle on a smooth manifold; this says that a vector field on the union of two open sets is (no more and no less than) vector fields on the two sets that agree where they overlap.
Given this basic understanding, there are further issues in the theory, and some will be addressed here. A different direction is that of the Grothendieck topology, and yet another is the logical status of 'local existence' (see Kripke–Joyal semantics).

## Removing restrictions on C

To rephrase this definition in a way that will work in any category $C$ that has sufficient structure, we note that we can write the objects and morphisms involved in the definition above in a diagram which we will call (G), for "gluing":
    ${\mathcal {F}}(U)\rightarrow \prod _{i}{\mathcal {F}}(U_{i}){{ \atop \longrightarrow } \atop {\longrightarrow \atop}}\prod _{i,j}{\mathcal {F}}(U_{i}\cap U_{j})$
Here the first map is the product of the restriction maps
    ${res}_{U,U_{i}}:{\mathcal {F}}(U)\rightarrow {\mathcal {F}}(U_{i})$
and each pair of arrows represents the two restrictions
    $res_{U_{i},U_{i}\cap U_{j}}:{\mathcal {F}}(U_{i})\rightarrow {\mathcal {F}}(U_{i}\cap U_{j})$
and
    $res_{U_{j},U_{i}\cap U_{j}}:{\mathcal {F}}(U_{j})\rightarrow {\mathcal {F}}(U_{i}\cap U_{j})$.
It is worthwhile to note that these maps exhaust all of the possible restriction maps among $U$, the $U_{i}$, and the $U_{i}\cap U_{j}$.
The condition for ${\mathcal {F}}$ to be a sheaf is that for any open set $U$ and any collection of open sets $\{U_{i}\}_{i\in I}$ whose union is $U$, the diagram (G) above is an equalizer.
One way of understanding the gluing axiom is to notice that $U$ is the colimit of the following diagram:
    $\coprod _{i,j}U_{i}\cap U_{j}{{ \atop \longrightarrow } \atop {\longrightarrow \atop}}\coprod _{i}U_{i}$
The gluing axiom says that ${\mathcal {F}}$ turns colimits of such diagrams into limits.

## Sheaves on a basis of open sets

In some categories, it is possible to construct a sheaf by specifying only some of its sections. Specifically, let $X$ be a topological space with basis $\{B_{i}\}_{i\in I}$. We can define a category ${\mathcal {O}}'(X)$ to be the full subcategory of ${\mathcal {O}}(X)$ whose objects are the $\{B_{i}\}$. A B-sheaf on $X$ with values in $C$ is a contravariant functor
    ${\mathcal {F}}:{\mathcal {O}}'(X)\rightarrow C$
which satisfies the gluing axiom for sets in ${\mathcal {O}}'(X)$. That is, on a selection of open sets of $X$, ${\mathcal {F}}$ specifies all of the sections of a sheaf, and on the other open sets, it is undetermined.
B-sheaves are equivalent to sheaves (that is, the category of sheaves is equivalent to the category of B-sheaves). Clearly a sheaf on $X$ can be restricted to a B-sheaf. In the other direction, given a B-sheaf ${\mathcal {F}}$ we must determine the sections of ${\mathcal {F}}$ on the other objects of ${\mathcal {O}}(X)$. To do this, note that for each open set $U$, we can find a collection $\{B_{j}\}_{j\in J}$ whose union is $U$. Categorically speaking, this choice makes $U$ the colimit of the full subcategory of ${\mathcal {O}}'(X)$ whose objects are $\{B_{j}\}_{j\in J}$. Since ${\mathcal {F}}$ is contravariant, we define ${\mathcal {F}}'(U)$ to be the limit of the $\{{\mathcal {F}}(B_{j})\}_{j\in J}$ with respect to the restriction maps. (Here we must assume that this limit exists in $C$.) If $U$ is a basic open set, then $U$ is a terminal object of the above subcategory of ${\mathcal {O}}'(X)$, and hence ${\mathcal {F}}'(U)={\mathcal {F}}(U)$. Therefore, ${\mathcal {F}}'$ extends ${\mathcal {F}}$ to a presheaf on $X$. It can be verified that ${\mathcal {F}}'$ is a sheaf, essentially because every element of every open cover of $X$ is a union of basis elements (by the definition of a basis), and every pairwise intersection of elements in an open cover of $X$ is a union of basis elements (again by the definition of a basis).

## The logic of C

The first needs of sheaf theory were for sheaves of abelian groups; so taking the category $C$ as the category of abelian groups was only natural. In applications to geometry, for example complex manifolds and algebraic geometry, the idea of a sheaf of local rings is central. This, however, is not quite the same thing; one speaks instead of a locally ringed space, because it is not true, except in trite cases, that such a sheaf is a functor into a category of local rings. It is the stalks of the sheaf that are local rings, not the collections of sections (which are rings, but in general are not close to being local). We can think of a locally ringed space $X$ as a parametrised family of local rings, depending on $x$ in $X$.
A more careful discussion dispels any mystery here. One can speak freely of a sheaf of abelian groups, or rings, because those are algebraic structures (defined, if one insists, by an explicit signature). Any category $C$ having finite products supports the idea of a group object, which some prefer just to call a group in $C$. In the case of this kind of purely algebraic structure, we can talk either of a sheaf having values in the category of abelian groups, or an abelian group in the category of sheaves of sets; it really doesn't matter.
In the local ring case, it does matter. At a foundational level we must use the second style of definition, to describe what a local ring means in a category. This is a logical matter: axioms for a local ring require use of existential quantification, in the form that for any $r$ in the ring, one of $r$ and $1-r$ is invertible. This allows one to specify what a 'local ring in a category' should be, in the case that the category supports enough structure.

## Sheafification

To turn a given presheaf ${\mathcal {P}}$ into a sheaf ${\mathcal {F}}$, there is a standard device called sheafification or sheaving. The rough intuition of what one should do, at least for a presheaf of sets, is to introduce an equivalence relation, which makes equivalent data given by different covers on the overlaps by refining the covers. One approach is therefore to go to the stalks and recover the sheaf space of the best possible sheaf ${\mathcal {F}}$ produced from ${\mathcal {P}}$.
This use of language strongly suggests that we are dealing here with adjoint functors. Therefore, it makes sense to observe that the sheaves on $X$ form a full subcategory of the presheaves on $X$. Implicit in that is the statement that a morphism of sheaves is nothing more than a natural transformation of the sheaves, considered as functors. Therefore, we get an abstract characterisation of sheafification as left adjoint to the inclusion. In some applications, naturally, one does need a description.
In more abstract language, the sheaves on $X$ form a reflective subcategory of the presheaves (Mac Lane–Moerdijk Sheaves in Geometry and Logic p. 86). In topos theory, for a Lawvere–Tierney topology and its sheaves, there is an analogous result (ibid. p. 227).

## Other gluing axioms

The gluing axiom of sheaf theory is rather general. One can note that the Mayer–Vietoris axiom of homotopy theory, for example, is a special case.