Stokes’ Theorem asserts that for a compactly-supported differential form $\omega$ of degree $n-1$ on a smooth oriented $n$-dimensional manifold $M$ we have the marvellous equation

$$\int_M d\omega = \int_{\partial M} \omega.$$

Doesn’t that look like a naturality condition in the sense of category theory? Somehow, integration is natural with respect to boundaries (or vice versa?). Can we make this precise?What I have tried so far: If $\Omega_0^k(M)$ denotes the vector space of compactly-supported differential forms of degree $k$ on $M$, and $d : \partial M \hookrightarrow M$ denotes the inclusion of the boundary, Stokes’ Theorem says that the diagram

$$

\require{AMScd}

\begin{CD}

\Omega_0^{n-1}(M) @>{d}>> \Omega_0^n(M) \\

@Vd^*VV @VV{\int_{M}}V \\\

\Omega_0^{n-1}(\partial M) @>{\int_{\partial M}}>> \mathbb{R}

\end{CD}

$$commutes. Is that correct? (I’m not sure about the $d^*$). This looks more like dinaturality, but I am not sure how to make a precise connection. Perhaps the cobordism category will be useful?

Any other categorical interpretation of Stokes’ Theorem would also be appreciated. Notice that such interpretations are by no means useless, a priori, and could perhaps even lead to more conceptual proofs. See for instance

Roeder, David. “Category theory applied to Pontryagin duality.” Pacific Journal of Mathematics 52.2 (1974): 519-527.

Hartig, Donald G. “The Riesz representation theorem revisited.” American Mathematical Monthly (1983): 277-280.

**Answer**

Here’s an attempt to make the “dinaturality” observation (more) precise. I will be leaving out many details that I haven’t worked out, so I may go wrong somewhere; I hope the general outline makes sense though.

- Let $\mathbb N$ be the poset of natural numbers in the usual ordering (or $\mathbb N$ could be the universal chain complex, i.e. category with the same objects given by natural numbers, $\mathrm{Hom}(n,m) = \mathbb{R}$ if $m \in \{n,n+1\}$, $0$ else, and all composites with nonidentity maps equal to zero. Then all the functors here are $\mathbb R$-linear).
- Let $\mathcal V$ be the category of topological vector spaces or some suitable similar category.
- Fix a manifold $X$ (or some other sort of smooth space).

Then we have functors

- $C: \mathbb N^\mathrm{op} \to \mathcal V$ where $C_n$ is the vector space freely generated by smooth maps $Y \to X$ where $Y$ is a compact, $n$-dimensional, oriented manifold with boundary, and the induced map $\partial: C_{n+1} \to C_n$ is the boundary map.
- $\Omega: \mathbb N \to \mathcal V$ is the de Rham complex; $\Omega_n = \Omega_n(X)$ is the space of $n$-forms on $X$ and the induced map $\mathrm d: \Omega_n \to \Omega_{n+1}$ is the exterior derivative.

Assuming that $\mathcal V$ has a suitable tensor product defined, we obtain a functor

- $C \otimes \Omega: \mathbb N ^\mathrm{op} \times \mathbb N \to \mathcal V$.

while there is also the constant functor

- $\mathbb R: \mathbb N ^\mathrm{op} \times \mathbb N \to \mathcal V$

Then Stokes’ theorem says that we have an extranatural transformation

- $\int : C \otimes \Omega \to \mathbb R$ which, given a map $Y \to X$ and a form $\omega$ on $X$, pulls the form back to $Y$ and integrates it (returning 0 if it’s the wrong dimension).

Interestingly, this means that integration should descend to a map out of the coend $\int : \int^{n \in \mathbb N} C_n \otimes \Omega_n \to \mathbb R$ (that first integral means integration of differential forms while the second means a coend). I’m not sure what the value of this coend is or how much it depends on the details I’ve left ambiguous. I suppose it probably has something to do with the de Rham cohomology of $X$?

**Attribution***Source : Link , Question Author : Martin Brandenburg , Answer Author : tcamps*