----
> [!definition] Definition. ([[sheaf]])
> A **sheaf** is a [[presheaf]] $\mathcal{F}$ whose sections are uniquely determined by their restrictions, in the following sense:
>
Suppose $U$ is an open set and let $\{ U_{i} \}_{i \in I}$ be an [[cover|open cover]] of $U$[^3] by subsets $U_{i} \subset U$, i.e., $U=\bigcup_{i}U_{i}$.
>
**1. (Locality)** If $s$, $t \in \mathcal{F}(U)$ satisfy $s |_{U_{i}}=t |_{U_{i}}$[^4] for all $i \in I$, then in fact $s=t$.[^1]
>
**2. (Gluing)** If a family of sections $\{ s_{i} \in \mathcal{F}(U_{i}) \}_{i}$ has pairwise agreement on all overlap of their domains[^5], then they 'patch together': there is a section $s \in \mathcal{F}(U)$ such that $s |_{U_{i}}=s_{i}$ for all $i \in I$. Such a section is variously called the **gluing**, **concatenation**, or **collation** of the sections $s_{\alpha}$. By **(1)**, it is unique.[^2]
>
> Note that $\mathcal{F}(\emptyset)$ is always the [[terminal object|final object]] of the data [[category]].
>
> $\mathsf{D}$-valued sheaves on $X$ form a full subcategory of $\mathsf{pShv}_\mathsf{D}(X)$, denoted $\mathsf{Shv}_\mathsf{D}(X)$.
^definition
[^1]: This is a generalization of the idea that, for functions $U \to \mathbb{R}$, local agreement implies global agreement.
[^2]: This is a generalization of the idea for gluing functions in [[the gluing lemma]].
> [!equivalence]
>
> The locality and gluing conditions may be stated together as asserting that the sequence $0 \to \mathcal{F}(U) \xrightarrow{\alpha} \bigoplus_{i \in I}\mathcal{F}(U_{i}) \overset{\beta_1}{\underset{\beta_2}{\rightrightarrows}} \bigoplus_{i,j \in I}\mathcal{F}(U_{i} \cap U_{j})$
>
>
> is [[exact sequence|exact]] for all $U \subset X$ open and open covers $\{ U_{i} \}_{i \in I}$ of $U$, where we have defined
> - $\alpha(s):=(s |_{U_{i}})_{i \in I}$
> - $\beta_{1}\big( (s_{i})_{i \in I} \big):=( s_{i} |_{U_{i} \cap U_{j}} )_{i,j \in I}$
> - $\beta_{2}\big( (s_{i})_{i \in I} \big):=(s_{j} |_{U_{i} \cap U_{j}})_{i,j \in I}$
>
> 'Exactness', in this case, means
> 1. $\alpha$ is [[injection|injective]] (this is precisely the **locality** condition)
> 2. $\beta_{1} \circ \alpha=\beta_{2} \circ \alpha$ (this automatically holds)
> 3. For any $(s_{i})_{i \in I} \in \bigoplus_{i \in I}\mathcal{F}(U_{i})$, with $\beta_{1}\big( (s_{i})_{i \in I} \big)=\beta_{2}\big( (s_{i})_{i \in I} \big)$, there exists $s \in \mathcal{F}(U)$ with $\alpha(s)=(s_{i})_{i \in I}$ (this is the **gluing** condition.)
>
> [[category|Categorical remark]]: $\alpha$ is the [[equalizer]] of $\beta_{1}, \beta_{2}$.
>
> (If we have one arrow that is $\beta_{1}-\beta_{2}$ and assuming the data category is something like $R$-$\mathsf{Mod}$, maybe that is the same thing but fits in more with exactness as $R$-$\mathsf{Mod}$.)
----
####
[^3]: Note that each $U_{\alpha} \subset U$ in light of our definition of [[cover|open cover]].
[^4]: Recall that the notation $s |_{V}$ means $\mathcal{F}_{UV}(s)$, the image of $s$ under the restriction map $\mathcal{F}(U) \to \mathcal{F}(V)$.
[^5]: That is, if $U_{i} \cap U_{i'} \neq \emptyset$ then $s_{i} |_{U_{i} \cap U_{i'}}=s_{i'} |_{U_{i} \cap U_{i'}}$ for all indices $i,i'$.
----
#### References
> [!backlink]
> ```dataview
> TABLE rows.file.link as "Further Reading"
> FROM [[]]
> FLATTEN file.tags as Tag
> WHERE Tag = "#definition" OR Tag = "#theorem" OR Tag = "#MOC" OR Tag = "#proposition" OR Tag = "#axiom"
> GROUP BY Tag
> ```
> [!frontlink]
> ```dataview
> TABLE rows.file.link as "Further Reading"
> FROM outgoing([[]])
> FLATTEN file.tags as Tag
> WHERE Tag = "#definition" OR Tag = "#theorem" OR Tag = "#MOC" OR Tag = "#proposition" OR Tag = "#axiom"
> GROUP BY Tag
> ```