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 . . .