Reference for "It is enough to specify a sheaf on a basis"? The wikipedia article on sheaves says:

It can be shown that to specify a sheaf, it is enough to specify its restriction to the open sets of a basis for the topology of the underlying space. Moreover, it can also be shown that it is enough to verify the sheaf axioms above relative to the open sets of a covering. Thus a sheaf can often be defined by giving its values on the open sets of a basis, and verifying the sheaf axioms relative to the basis.

However, it does not cite a specific reference for this statement. Does there exist a rigorous proof for this statement in the literature?
 A: I've wondered about this myself recently and haven't been able to find any source for a general statement involving $\mathcal{C}$-valued sheaves. I'm sure I've simply not looked hard enough (I don't do AG, for instance), but for the record, I'll sketch out a proof along with some other things one can deduce. The verification that the extension is a sheaf is long and mostly a very, very tedious verification that everything really does commute. 
One can formulate the notion of a $\mathcal{C}$-valued (pre)sheaf on a base $\mathscr{B}^{op}\subset \mathcal{O}(X)^{op}$ for any reasonably complete category $\mathcal{C}$. The idea is exactly as it works with sheaves, just find the arrow-theoretic expression of the set axioms. Doing so, one has this formulation:

A presheaf $\mathcal{F}$ on a base $\mathscr{B}$ is said to be a sheaf on $\mathscr{B}$ if the following holds. Given any covering $(U_{i})_{i\in I}$ by basis sets $U_i$ of a basis set $U$, and for each pair $(i,j)\in I\times I$, a family of coverings $(U_{ij,k})_{k\in I_{(i,j)}}$ of the intersection $U_i\cap U_j$, the diagram with the two sets of restrictions $\mathcal{F}(U_i)\to \mathcal{F}(U_{ijk})$ and $\mathcal{F}(U_i)\to \mathcal{F}(U_{jik})$ replacing the maps appearing in the usual equalizer condition for a sheaf is an equalizer. 

With that said, here's what I believe to be true.

Let $\mathcal{C}$ be a complete category, $X$ a space and $\mathscr{B}^{op}\subset \mathcal{O}(X)^{op}$ a base for the topology. Let $i\colon \mathscr{B}^{op}\hookrightarrow \mathcal{O}(X)^{op}$ be the inclusion.
  
  
*
  
*There is a functor of restriction on (pre)sheaves $i^\ast\colon (P)Sh_{X}(\mathcal{C})\to (P)Sh_{\mathscr{B}}(\mathcal{C})$.
  
  
  
*If $\mathcal{F}$ is a sheaf on $X$, then $i^\ast \mathcal{F}=\mathcal{F}\circ i$ is a sheaf on $\mathscr{B}$.
  
*If $\mathcal{F}$ is a presheaf on $\mathscr B$, then there is a presheaf $\mathcal{F}^e\colon \mathcal{O}(X)^{op}\to\mathcal C$ defined by $\mathcal{F}^e(U)=\lim_{\mathscr{B} \ni B\subset U}\mathcal{F}(U)$ with the obvious induced morphisms as well as a natural isomorphism $\mathcal{F}\mathop{\to}\limits^{\eta} \mathcal{F}^e\circ i$.
  
*If $\mathcal{F}$ is a presheaf on $\mathscr{B}$, then the data $(\mathcal{F}^e,\eta)$ is terminal among all other extensions of $\mathcal{F}$ to a presheaf on $X$.
  
*Upon making choices, $(-)^e$ assembles into a functor. One deduces what it does on arrows by understanding $F^e\circ i\to G^e\circ i$ to be the unique arrow $\varphi\colon F\to G$ fitting into the data of $(F,\eta)$, $(G,\tau)$ and the morphism $f\colon F\to G$ as $i^\ast \varphi$. For any other choice, $(-)^e_2$, there is a natural iso $(-)^e\approx (-)^e_2$. 
  
*If $\mathcal{F}$ is a sheaf on $\mathscr{B}$, then $\mathcal{F}^e$ is a sheaf on $X$.
  
*The functors $i^\ast$ and $(-)^e$ are left and right adjoint on presheaves. The adjunction restricts on sheaves to an adjoint equivalence $i^\ast_{Sh} : Sh_{X}(C)\cong Sh_{\mathscr{B}}(C) : (-)^e$.
  
  

I'll sketch 2. and 6. since everything else follows more-or-less in a straightforward fashion from these. 
2.
The essential ingredient is to factor (for given $U,U_i,U_{ijk}\in \mathscr{B}$) the equalizer test diagram for a sheaf on the base $\mathscr{B}$ as the sheaf test diagram for $U,U_i,U_i\cap U_j$, followed by a single arrow $\prod \mathcal{F}(U_i\cap U_j)\to \prod_{i,j} \prod_k \mathcal{F}(U_{ijk})$. (It turns out this arrow will be monic, since $\mathcal{F}$ is a sheaf and $\mathcal{C}$ complete so that $\prod$ commutes with equalizers.)
6.
This is actually fairly delicate in my account of it. The hardest part is making a reduction. 

Notation/Conventions
Here, we'll collect a few notations and a few potentially useful (?) reminders/observations.


*

*For ease of typing, I'm going to stop writing $\mathcal{C}$, and put $C=\mathcal{C}$. Moreover, I'm going to put $F:=\mathcal{F}$ the functor on $\mathscr{B}$, and $F^e$ be the extension.

*For any open set $U$, define $\mathscr{B}_U:=\{B\in \mathscr{B} : B\subset U\}$ and identify these all as subcategories of $\mathscr{B}$.

*I'm going to casually conflate $\mathscr{B}$ and $\mathscr{B}^{op}$ for ease of typing.

*Since we're working on the level of a single sheaf on $\mathscr{B}$, it is easier notationally to suppose (WLOG) that ${F}^e$ extends ${F}$—that is, ${F}^e\circ i={F}$. If we don't assume this, the notation becomes even worse and I don't want to deal with it. 

*For the presheaf $F^e$, the restrictions $F^e(U)\to F^e(V)$ are induced by the projections associated to the cones $F^e(V)\to \left. F\right|\mathscr{B}_{V}$. In particular, by our assumption, if $U\notin \mathscr{B}$, $B\in \mathscr{B}$, then the projection $F^e(U)\to F(B)$ is precisely the restriction.  

*Denote $res$ the restrictions for $F$ and $res^e$ the restrictions for $F^e$. Then $res^e_{UB}res_{BB'}=res^{e}_{UB'}$. 

Given $U,U_i,U_{i}\cap U_j$, let $$\mathscr{B}_{I}=\{B\in \mathscr{B} : B\subset U_i \text{for some }i\in I\}\ldotp$$ 
It is clear that $\mathscr{B}_I$ is a basis for $U$ from the definitions.
Consider the sheaf test diagram for $F^e$ of this family with arrow $f\colon c\to \prod_{i}F(U_i)$. A little reflection shows that if we can show that we can produce the lift $\tilde{f}\colon c\to \mathcal{F}^e(U)$ if we can show $F^e(U)=\lim_{\mathscr{B}_{I}\ni B}F(B)$.
Claim 1: Given $F$ a presheaf on $\mathscr{B}$, $U$ open, $V\subset U$, and $\mathscr{B}_0\subset\mathscr{B}$ a subcollection forming a basis for $U$, $F^e(V)=\lim_{\mathscr{B}_0\ni B\subset V}F(B)$.
For now, let's assume the claim.
(Existence)
Then we have $F^e(U)=\lim_{\mathscr{B}_{I}\ni B}F(B)$. Hence, the obvious choice would be to define $\tilde{f}\colon c\to \lim_{\mathscr{B}_{I}\ni B}F(B)$ on components to be the corresponding components of $f$—this will induce the desired arrow because it defines a cone $c\to \left. F\right|\mathscr{B}_I$ as the components of $f$ were already a cone. More precisely, let $f_i$ be the components of $f$, and let $f_{i,V}\colon c\to F(V)$ be the components of $f_{i}$ inducing it to the limit. Since $f$ equalizes the sheaf test diagram, one observes that:


*

*For any basis sets $V\subset W$ in $\mathscr{B}_I$, $res_{VW}f_{i,V}=f_{i,W}$. 

*For $V\subset U_i\cap U_j$, $f_{j,V}=f_{i,V}$. Hence, whenever $V\subset U_k$, $f_{k,V}=f_{i,V}$. 

*If $V\subset U_i$ and $V\nsubseteq U_j$ for any other $j$, then there is only one $i$ with component $f_{i,V}$.


Using these observations and the observation it is clear that we get a cone from $c\to \left. F\right|\mathscr{B}_I$. Since the arrow to $\prod F(U_i)$ is componentwise the projections $F^e(U)\to F(U_i)$, which are induced by the canonical projections $F^e(U)\to F(B)$ for $B\subset U_i$, the composite with $\tilde{f}$ on the $(i,B\subset U_i)$-th component is $pr_{i,B}pr_{i}^e\circ \tilde{f}=f_{i,B}$, by definition. This shows existence.
(Uniqueness) 
Claim 2: Under the assumption of claim 1, uniqueness is obvious. (Check components, &c. &c.)
This shows that $F^e$ is a sheaf if we assume claim 1. 

Proof of Claim 1 in the applicable case above
We assume $V=U$ in this case. Note that there is an obvious arrow $f\colon F^e(U)\to \lim_{\mathscr{B}_I\ni B\subset U}F(B)$ induced by projection. 
Remark: I'm confident it's slicker to prove that $\lim_{\mathscr{B}_I\ni B\subset U}F(B)$ satisfies the UP of $\lim_{\mathscr{B}\ni B\subset U}F(B)=F^e(U)$. But since it is not that hard to build an inverse $\varphi_U$ to $f$ on the components, this will be our strategy
Any basis set $V\in \mathscr{B}_{U}$ (N.B., $\mathscr{B}_U\supseteq \mathscr{B}_I$) can be covered by sets in $\mathscr{B}_I$, and any intersection of basis sets $B_1,B_2$ can by covered by basis sets in $\mathscr{B}_{I}$. Since $F$ is a sheaf on $\mathscr{B}$, there is the obvious equalizer diagram involving these. Do this for each basis set $V\in \mathscr{B}_U$. This gives us a family of equalizers indexed over the small discrete category of $\mathscr{B}_{U}$. Since $C$ is complete, we can stick these into one giant equalizer (imagine I could draw an equalizer)
$$\prod_{V\in \mathscr{B}_U}\mathcal{F}(V)\to\prod_{V\in \mathscr{B}_U}\prod_{\mathscr{B}_I\ni V_i\subset V}F(V_i)\to \prod_{V\in \mathscr{B}_U}\prod_{\mathscr{B}_I\ni V_{ijk}\subset V_i\cap V_j}F(V_{ijk})\ldotp$$
This follows by the usual adjointness argument, $\prod$ is right adjoint to the diagonal functor and hence preserves/commutes with limits. 
Let $g_V\colon \lim_{\mathscr{B}_I\ni B\subset U}F(U)\to \prod_{\mathscr{B}\ni V_i\subset V}F(V_i)$ be the projections $pr_{V_i}$. Then $res_{V_i,V_{ijk}}pr_{V_i}=res_{V_j,V_{ijk}}pr_{V_j}$ since the projections off of the limit are necessarily a cone to $\left. F\right|\mathscr{B}_I$. Doing this for each basis set $\mathscr{B}\ni V\subset U$, this assembles into an arrow $$\lim_{\mathscr{B}_I\ni B\subset U}F(U)\to \prod_{V\in \mathscr{B}_U}\prod_{\mathscr{B}_I\ni V_i\subset V}F(V_i)$$ that gets equalized in our new equalizer (namely, it is componentwise $g_V$, and since the equalizer in question was obtained componentwise, this follows from what we just said). Call it $\varphi$ with components $\varphi_V$. Define $\varphi=f^{-1}$ on components as $f^{-1}_V=\varphi_V$. If we are given $W\subset V\in \mathscr{B}_I$, then $res_{VW}\varphi_V=\varphi_W$ follows by the uniqueness of the UP of the equalizer—the arrow $res_{VW}\varphi_V$ also fits into the equalizer diagram corresponding to $W$.
Note that the uniqueness part above tells us that whenever $V\in\mathscr{B}_I$, $\varphi_V=pr_V$.
To check that $f \varphi=id$, note that on components $V\in\mathscr{B}_I$, this is $$pr_V f\varphi= (pr_V f)\varphi=res_{UV}^{e}\varphi=\varphi_V=pr_V,$$ which means $f\varphi$ is on components just the projections and hence must be the identity. Conversely, for $V\in\mathscr{B}$, $$res_{UV}^e \varphi f=(res_{UV}^e \varphi) f=\varphi_V f\ldotp$$ But $\varphi_V f$ fits into the equalizer for $V$, where $F^e(U)\to \prod_{\mathscr{B}_I\ni V_i\subset V} F(V_i)$ are the restrictions (i.e., the projections). Hence, by uniqueness, $\varphi_V f=res_{UV}^e$. Hence, $\varphi f=id$.

Remark:
As I mentioned, I'm confident there's an easier way to do claim 1 by verifying universal properties. One might also be able to make quick work of it by showing the inclusion $\mathscr{B}_I^{op}\hookrightarrow \mathscr{B}^{op}_U$ is final in a different way, perhaps by using a characterization of such functors. 
A: It is given in Daniel Perrin's Algebraic Geometry, Chapter 3,  Section 2. And by the way, it is a nice introductory text for algebraic geometry, which does not cover much scheme theory, but gives a definition of an abstract variety (using sheaves, like in Mumford's Red book).
Added: I just saw that Perrin leaves most of the details to the reader. For another proof, see Remark 2.6/Lemma 2.7 in Qing Liu's Algebraic Geometry and Arithmetic curves.
A: This is an excellent question and to tell the truth it is often handled in a cavalier fashion in the literature. This is a pity because it is a fundamental concept in algebraic geometry.  
For example  the structural sheaf $\mathcal O_X$ of an affine scheme $X=Spec(A)$ is defined by saying that over a basic open set $D(f)\subset X \;(f\in A)$ its value is $\Gamma(D(f),\mathcal O_X)=A_f$ and then relying on the mechanism of sheaves on a basis to extend this to a sheaf on $X$.
The same procedure is also  followed in defining the quasi-coherent sheaf of modules $\tilde M$ on $X$ associated to the $A$-module $M$.
However there are happy exceptions on the net , like Lucien Szpiro's  notes where sheaves on a basis of open sets are discussed in detail on pages 14-16.
You can also find a careful treatment in De Jong and collaborators' Stack Project , Chapter 6 "Sheaves on Spaces", section 30,  "Bases and sheaves"
A: This is proven in Serres FAC, Chapter 1 Section 1 subsection 4. 
His definition of a sheaf is what is currently called an etale space and a modern pre sheaf is what Serre refers to as a system, then a modern sheaf is a system satisfying propositions 1 and 2. The categories of sheaves over X and etale spaces over X are equivalent though.
Edit:
I originally said subsection 3, but it is subsection 4.
A: I'd like to add my own reference and strategy: Siegfried Bosch's Algebraic Geometry and Commutative Algebra has a pretty developped discussion on constructing $\mathcal{O}_X$ the structural sheaf of a scheme $X$ (cf. theorem 3 and Lemma 4 of section 6.6, p.242). However there is only a proof for a basis $\mathcal{B}$ stable under intersection, so I struggled for a while with this. It is only now that I fully grasp the ideas behind the Stacks Project's page on the matter. I'd like to show how to use it to its fullest here.
So let's fix the notation once more:

*

*$X$ is a topological space and $\mathcal B$ is a basis for its topology.

*For any open $U\in\mathcal B,~\,\rm{Cov}_{\mathcal B}(U)$, is the set of coverings $\mathcal{U}=(U_i)_{i\in I}$ of $U$, by opens from the basis $U_i\in\mathcal B$.

*For all opens $U\in\mathcal B$, set $C(U)\subset\rm{Cov}_{\mathcal B}(U)$ a cofinal system of coverings for the refinement relationship: for any covering $\mathcal U=(U_i)_{i\in I}\in\rm{Cov}_{\mathcal B}(U)$ there is a covering $\mathcal V=(V_j)_{j\in J}$ in $C(U)$ that refines $\mathcal U$, i.e., there is a map $\alpha:J\longrightarrow I$ such that $\forall j\in J,\,V_j\subseteq U_{\alpha(j)}$.

*For every $\mathcal U=(U_i)_{i\in I}\in C(U)$ and every $i,i'\in I$ fix once and for all a covering $\mathcal U_{i,i'}=(U_{i,i',k})_{k\in I_{i,i'}}$ of the intersection $U_i\cap U_{i'}$.

We now recall the statement oncerning sheaves on bases and refinements:

Let $\mathcal F$ be a given presheaf on $\mathcal B$. Then $\mathcal F$ is a $\mathcal B$-sheaf iff for any $U\in\mathcal B$ and any $\mathcal U=(U_i)_{i\in I}\in C(U)$, the following holds:

$(**)$For any collection of sections $s_i\in\mathcal F(U_i),i\in I$ such that $\forall i,i'\in I$
$$s_i|_{U_{i,i',k}} = s_{i'}|_{U_{i,i',k}}$$
there exists a unique section $s \in \mathcal{F}(U)$ such that $s_ i = s|_{U_ i}$ for all $i\in I$.


So there's a lot to unpack in this, but the main idea I want to point out is that we're almost done. If we can manage to define a pre-sheaf $\overline{\mathcal F}$ that extends a $\mathcal B$-sheaf $\mathcal F$, then we are done. Indeed we can choose our set of opens $\rm{O}(X)$ of $X$ to form a basis for its own topology, furthermore we define, for any open $U\subset X$ (!),
$$C(U):=\rm{Cov}_\mathcal B(U)\subset\rm{Cov}_{\rm{O}(X)}(U)$$
and fix any coverings of the overlaps $\mathcal U_{i,i'}$ (which can be chosen to be reduced to a simple open set if the basis is stable under intersection). To prove cofinality, we just need to use the fact that any open is covered by opens in $\mathcal B$: take any covering $(U_i)_i$ of $U$ and cover every $U_i$ by opens in $\mathcal B$. By applying the above result we see that $\overline{\mathcal F}$ is ncessarily a sheaf.
To find a presheaf extension $\overline{\mathcal F}$ we can just use the classic Hartshorne definition using the espace étalé, but I prefer to use the more formal construction:
$$\overline{\mathcal F}(U):=\lim_{V\in\mathcal B,V\subset U}\mathcal F(U).$$
Indeed, for any $U\in\mathcal B$ the projection maps
$$\overline{\mathcal F}(U)\longrightarrow\mathcal F(U)$$
form a natural isomorphism.
