TITLE: Category Theory and Lebesgue Integration.
QUESTION [38 upvotes]: I'm wondering if there's any Category Theory floating around in the theory of Lebesgue Integration. To avoid things becoming too broad, let's keep this focused on the basics. Here's how I see the general set up (missing a few details to keep things brief!).
Definition 1: A function from $\mathbb{R}^k$ to $\mathbb{R}$ is a step function if there exists a partition $P$ of $\mathbb{R}^k$ such that $f$ is constant for each interval (of $\mathbb{R}^k$) associated with $P$ and zero on the unbounded region associated with $P$.
Theorem 1: Step funtions form a vector space over $\mathbb{R}$ and $\int$ (defined for step functions) is a linear transformation from this space to $\mathbb{R}$.
Theorem 2 (Lattice Properties): If $f, g$ are step functions on $\mathbb{R}^k$, then so are $\max (f, g)$, $\min (f, g)$, the positive & negative parts of $f$, and $\lvert f\rvert$.
Definition 2: A function $f:\mathbb{R}^k\to\mathbb{R}$ is an upper function if there is an increasing sequence of step functions $(f_n)_{n\in\mathbb{N}}$ such that $\int f_n$ converges and $f_n\to f$ a.e. as $n\to\infty$. The set (or whatever) of such functions is denoted $\mathscr{L}^{\text{inc}}(\mathbb{R}^k)$. We define the integral of an upper function as $$\int f=\lim_{n\to\infty}\underbrace{\int f_n.}_{\text{These are integrals of step functions.}}$$
Theorem 3: Upper functions don't form a vector space over $\mathbb{R}$.
Definition 3: A function $f:\mathbb{R}^k\to\mathbb{R}$ is Lebesgue integrable on $\mathbb{R}^k$ if there exist upper functions $g, h$ on $\mathbb{R}^k$ with $f=g-h$. We define $\int f=\int g -\int h$. The set (or whatever) of such functions is denoted $\mathscr{L}^1(\mathbb{R}^k)$.
Theorem 4: $\mathscr{L}^1(\mathbb{R}^k)$ is an $\mathbb{R}$-vector space and $\int$ is a linear map.
Theorem 5: Functions in $\mathscr{L}^1(\mathbb{R}^k)$ satisfy the same "Lattice Properties" as in Theorem 2.

Do step functions, upper functions, and Lebesgue integrable functions form categories? Is there a way to describe the "Lattice Properties" above of the respective functions using Category Theory? What's the "significance" of some of these functions but not others forming vector spaces from a categorical viewpoint (if there be such)?

I'm very sorry if this is too broad. It just seems like the sort of thing someone would've investigated . . .

REPLY [19 votes]: It's not quite what you were asking, but I feel compelled to link to my own doctoral dissertation here.
http://www.andrew.cmu.edu/user/awodey/students/jackson.pdf
I started from the well known facts that if $\langle \Omega,\mathcal{F}\rangle$ is a measurable space, and $j$ is the countable join topology on $\mathcal{F}$, then:

The object of measurable real valued functions is the Dedekind real numbers object $\mathbb{R}$ in $\textrm{Sh}_{j}(\mathcal{F})$.
The presheaf of measures $\mathbb{M}$ is also a sheaf.
(Lebesgue) integration is definable as a natural transformation
$$\textstyle\int\displaystyle:\mathbb{R}^{+}\times\mathbb{M}\to\mathbb{M}.$$

(3) wasn't "well known" as such, but is obvious when you think about it.
The work I did was to find definitions for $\mathbb{M}$ and $\int$ using the internal language of $\textrm{Sh}_{j}(\mathcal{F})$, and to provide categorical proofs of the Monotone Convergence Theorem and the Radon-Nikodym Theorem (spoiler alert: derivatives exist with respect to $\mu$ when the topology of $\mu$-almost everywhere equivalence induces a Boolean topos). These definitions and theorems can then be applied in any topos with a natural numbers object, and not just in the traditional setting of sheaves on a $\sigma$-field.