Let \((\mathbf{C}, J)\) be a site. The inclusion \(\operatorname{Sh}(\mathbf{C}) \hookrightarrow \operatorname{Psh}(\mathbf{C})\) has a left adjoint \(L\) called sheafification.
A presheaf is a sheaf so long as:
Every matching family has some amalgamation, and
every such amalgamation is unique.
Given a presheaf \(P\), there is an obvious construction we can perform to glue together existing amalgamations so in that in the resulting presheaf, amalgamations are unique: quotient componentwise by the relation \(\sim\) where
if \(s,t \in P(X)\), say that \(s \sim t\) if there is some cover \(\{U_i \to X\}_{i \in I}\) such that \(s\) and \(t\) induce the same matching family of the \(U_i\)’s (this is the same as saying that they have identical families of restrictions to each member of the cover.)
Call this construction \(\mathcal{B}(-)\). The componentwise quotienting described above actually yields a presheaf (i.e. the assignment \(Y \mapsto \mathcal{B}(P)(Y) \overset{\operatorname{df}}{=} P(Y)/\sim\) extends to an assignment on maps \(X \to Y\) and the entire procedure is functorial) because the pullback of a cover is a cover (in the absence of pullbacks, the more general condition used in the definition of a coverage also suffices.)
It is also easy to see that \(\mathcal{B}(-)\) is well-defined on functorial on maps between presheaves \(P_1 \to P_2\), simply by chasing equivalent sections through naturality squares at covering maps \(U_{\alpha} \to X\).
So \(\mathcal{B}(-)\) is a way of “formally modifying” presheaves \(P\) to presheaves \(\mathcal{B}(P)\) such that condition 2 does hold.
Note that we already have a formal object which glues together matching families (\(\operatorname{Psh}(\mathbf{C})\) is \(\mathbf{C}\)’s formal cocompletion, after all), namely the coequalizer \(Q\) of the diagram
\[\left( \coprod_{j,k} \left(U_j \times_X U_k \right) \right) \rightrightarrows \coprod_i U_i\]
computed in \(\operatorname{Psh}(\mathbf{C})\) after passage through the Yoneda embedding.
For \(P(X)\) to amalgamate every matching family, we therefore need the canonical map
\[\operatorname{Psh}(\mathbf{C})(X,P) \to \operatorname{Psh}(\mathbf{C})(Q,P)\]
to be surjective (injectivity corresponds to uniqueness). This can be equivalently reformulated as: every map \(Q \to P\) admits an extension along the universal colimiting map \(Q \to X\) to a map \(X \to P\), i.e. every diagram of the following form admits the indicated completion:
This extension condition is something we can work with. For a presheaf \(P\), let’s construct a new presheaf \(\mathcal{A}(P)\) as the pushout
where the coproduct is taken over all coequalizers \(Q\) for every cover \(\{U_i \to X\}\) in \(J(X)\) (remember that \(J\) is the coverage turning \(\mathbf{C}\) into a site.)
The construction \(P \mapsto \mathcal{A}(P)\) is functorial because it assigns colimit (coproduct) comparison maps to each map of presheaves \(P_1 \to P_2\).
Although \(\mathcal{A}(-)\) does not solve our extension problem, transfinite compositions of it will. (It will turn out that, with \(\mathcal{B}\), twice suffices, but I will have to prove this later.)
By the Yoneda lemma, for every representable presheaf \(X\), the covariant hom-functor \(\operatorname{Psh}(\mathbf{C})(X,-)\) commutes with filtered colimits in \(\operatorname{Psh}(C)\).
When the filtered colimit \(\operatorname{\underset{\longrightarrow}{\lim}} P_i\) behaves like a directed union in the sense that every germ (viewed as an equivalence class) is determined by a representative from some object in the filtered diagram underlying the filtered colimit, we can conclude that every map \(X \to \operatorname{\underset{\longrightarrow}{\lim}} P_i\) in fact factors through some inclusion \(P_j \hookrightarrow \operatorname{\underset{\longrightarrow}{\lim}} P_i\).
Now, let \(\lambda\) be a regular cardinal. Consider the \(\lambda\)-transfinite composition
\[\widetilde{P} \overset{\operatorname{df}}{=} \operatorname{\underset{\longrightarrow}{\lim}} \left(P \to BP \to AB\to BABP \to ABABP \to \cdots \right)\]
and note that this does solve the extension problem from before, because any map \(Q \to \widetilde{P}\) is a compatible system of maps from the diagram of representables underlying \(Q\). Each of those maps factors through some initial segment of \(\widetilde{P}\) and therefore \(Q \to \widetilde{P}\) factors through their union (which is again an initial segment because \(\lambda\) was regular).
Hence, \(Q \to \widetilde{P}\) factors through some smaller transfinite composite \(Q \to \widetilde{P}_{\alpha}\). Since higher stages are built as pushouts of coproducts of spans, this means that we have a diagram
for some small \(\beta > \alpha\), so we have satisfied the extension requirement, hence \(\widetilde{P}\) satisfies condition 1.
As for uniqueness of amalgamations, it suffices to show that, as in the above diagram, there is some \(\beta > \alpha\) such that the map \(X \to \widetilde{P}_{\beta}\) is unique for \(Q \to \widetilde{P}_{\alpha}\). We can arrange for \(\widetilde{P}_{\beta}\) to be of the form \(\mathcal{B}(P_{\beta'})\). Then since we have arranged for matching families to have unique amalgamations, and the map \(\operatorname{Psh}(\mathbf{C})(X, \widetilde{P}_{\beta}) \to \operatorname{Psh}(\mathbf{C})(Q, \widetilde{P}_{\beta})\) quotients together non-unique amalgamations, the map must be injective, and therefore therefore \(X \to \widetilde{P}_{\beta}\) is unique.
The construction \(P \mapsto \widetilde{P}\) is again functorial because it assigns universal comparison maps between colimits to presheaf maps \(P_1 \to P_2\).
Now we check that this is left adjoint to the inclusion, which we call \(i\), though we suppress writing it because it doesn’t really do anything.
There is an obvious candidate \(\eta\) for unit map \(P \to \widetilde{P}\) simply given by \(P\)’s inclusion into \(\widetilde{P}\) as a member of the underlying filtered diagram of \(\widetilde{P}\).
There is an obvious candidate \(\epsilon\) for counit map \(\widetilde{S} \to S\) for \(S\) a sheaf by noting that \(\mathcal{B}(-)\) is idempotent on sheaves (since they already have unique amalgamation) and that there is a universal colimiting map \(\mathcal{A}(P) \to P\) whenever maps \(Q \to P\) uniquely extend along \(Q \to X\) (since then with this extension and \(\operatorname{id} : P \to P\), \(P\) is a weak pushout of each possible diagram of the form \(X \leftarrow Q \rightarrow P\).)
This turns \(S\) into a cocone to the diagram
\[P \to BP \to AB\to BABP \to ABABP \to \cdots\]
which thereby induces a universal colimiting map \(\widetilde{S} \to S\).
We verify the triangle identities:
If \(F\) is left-adjoint to \(G\), then we need to verify:
\(F \to FGF \to F = \operatorname{id}_F\), and
\(G \to GFG \to G = \operatorname{id}_G\).
In our case, the first identity is (after taking components twice)
\[\widetilde{P}(X) \overset{\widetilde{\eta}_X}{\to} \widetilde{\widetilde{P}}(X \overset{\epsilon_{\widetilde{P}(X)}}{\to} \widetilde{P}(X) \overset{?}{=} \operatorname{id}_{F(X)}\]
and follows from the fact that one of the maps which induces \(\epsilon_{\widetilde{P}(X)}\) is the identity map from the copy of \(\widetilde{P}(X)\) in the diagram underlying the filtered colimit \(\widetilde{\widetilde{P}}(X)\) to \(\widetilde{P}(X)\).
The second identity is (after taking components)
\[S \overset{\eta_S}{\to} \widetilde{S} \overset{\epsilon_S}{\to} S \overset{?}{=} \operatorname{id}_S\]
which is again the identity transformation on \(S\) for the same reason.
Final note: Taking coproducts and then quotienting is “the same” as taking a filtered colimit of the things (scare quotes because the relation you quotient by has to be expressible in terms of evaluation at and composition of the morphisms that make up the filtered diagram underlying the filtered colimit, which is the case here), so the composition \(\mathcal{B} \mathcal{A}(-)\) is in fact the familiar plus construction. It’s another theorem that performing the plus construction twice is enough to give sheafification (which I’ll prove in the future), so this whole argument with the transfinite machinery was overkill.