# Prove that a set of differentiable function on $\mathbb{R^n}$ is a sheaf

Let $X = \mathbb{R^n}$. For every open subset $U \subseteq X$ , consider a presheaf $, \Gamma(U) := \{ f: U \rightarrow \mathbb{R} : f$ is differentiable$\}$. I need to show that this presheaf is a sheaf.

Now since the concept of differentiability is local in nature, so for any open subset, say $V$ of $U$ where $U$ is an open subspace of $X$, the set $\Gamma(V)$ should give rise to a sheaf. This is more of an intuitive explanation. I am unable to figure out how to mathematically prove the conditions that are required for a presheaf to become a sheaf. Any help is appreciated!

PS- I am not familiar with category theory so I wouldn't be able to get any answers/comments based on that.

If ya buy that it's a presheaf already, then ya just need to show it satisfies

1) Local determination 2) Gluing Lemma

So for 1, suppose we have a bunch of open sets $U_{\alpha}$ in $\mathbb{R}^n$ that cover an open set $U$ and we have two functions $f,g \in \Gamma(U)$ that, when restricted to each of these $U_{\alpha}$, agree with each other. We must show that f = g identically on $U$. But this is simple, because two functions are the same if they agree pointwise. So ya just needs to show that f(x) = g(x) for every x in $U$.

For 2, suppose we have an open cover $U_{\alpha}$ of a set $U$ and we have functions $f_{\alpha} \in \Gamma(U_\alpha)$ such that for any $\alpha$ and $\beta$ the restrictions of $f_\alpha$ and $f_\beta$ agree when mapped into $\Gamma(U_\alpha \cap U_\beta)$, (i.e., when restricted to their intersection). Under these conditions, we want to produce an f in $\Gamma(U)$ that agrees with the $f_\alpha$ when restricted. To do this, for $x \in U$, define f(x) by $f(x) = f_{\alpha}(x)$, where $U_\alpha$ is any open set in our collection that contains $x$. This is possible because it forms an open covering. A little work needs to be done to show this is a well-defined, smooth function though.

You need to show the two missing properties: locality and gluing.

Locality is trivial for any presheaf where sections are functions and restriction is the usual restriction of functions: Assume $U=\bigcup_{i\in I} U_i$ and we have $s,t\in \Gamma(U)$ such that $\operatorname{res}^U_{U_i}(s)=\operatorname{res}^U_{U_i}(t)$. We want to show $s=t$. Since $s,t$ are functions with domain $U$, we need to show that $s(u)=t(u)$ holds for all $u\in U$. OK, so let $u\in U$. Then $u\in U_i$ for some $U_i$ (it's a covering after all). Then $s(u)=s|_{U_i}(u)=\operatorname{res}^U_{U_i}(s)(u)=\operatorname{res}^U_{U_i}(t)(u)=t|_{U_i}(u)=t(u)$, as desired.

It is also clear what happens with gluing: Mere functions can always be glued. Given $U=\bigcup_{i\in I} U_i$ and sections $s_i\in\Gamma(U_i)$ such that $\operatorname{res}^{U_i}_{U_i\cap U_j}(s_i)=\operatorname{res}^{U_j}_{U_i\cap U_j}(s_j)$ always holds, we can define a function $s\colon U\to \Bbb R$ by letting $s(u)=s_i(u)$ where $i\in I$ is arbitrary with $u\in U_i$. This is always possible because the $U_i$ form a cover, and this is well-defined precisely because of the given condition for restrictions. The problem is just that it is not sufficient to merely have a function $s\colon U\to \Bbb R$, but rather a differentiable function. But as you correctly notice, differentiability is a local property. The function $s$ is differentiable iff it is differentiable at every point $u\in U$, and in order to prove that (and even compute the derivative) it suffices to "know" $s$ only in an open neighbourhood of $u$ -- such as an $U_i$ with $u\in U_i$.

So indeed, for any spaces $X,Y$ and any local property $\Phi$ the presheaf given by $\Gamma(U)=\{\,f\colon U\to Y\mid f\text{ has property }\Phi\,\}$, together with $\operatorname{res}^U_V(s)=s|_V$ for $V\subseteq U$ and $s\in \Gamma(U)$, is always a sheaf in the above somewhat obvious way.

The "fun with sheaves" really begins when $\Gamma(U)$ is not actually a set of functions ...