TITLE: Expressing the Lebesgue integral using categories + the difficulty of describing estimates in category theory
QUESTION [17 upvotes]: In this question of mine in a comment to the accepted answer, someone remarked:

There are ways to express even basic things in analysis, such as the
  spectral theorem or the Lebesgue integral, using the language of
  categories. But many of the hard theorems in analysis boil down to
  subtle estimates which (so far!) have not been simplified by clever
  categorical arguments.

I replied to this requesting a reference where the Lebesgue integral is expressed using categories but unfortunately I didn't get an answer. So I'm posting it as a question (I wouldn't mind for a reference concerning the spectral theorem either) with the additional kind request to also provide an explanation why it is difficult to describe estimates using category theory.

REPLY [2 votes]: Your question is, by its nature, rather vague and here is a subjective take on it in addition to the answers you have already received.  Whether this is the type of information that you are looking for is something only you can decide.
I will begin with the spectral theorem since this evinced only cursory replies.  The two basic dualities in analysis are probably the Riesz representation theorem (between $C(K)$ and the Radon measures on the compact space $K$) and Gelfand Naimark duality.  One can extend the latter be replacing the real line as the range space of the latter by more exotic algebras.  The spectral theorem for self-adjoint operators can be expressed in the form that the space of such operators with spectra in the compact subet $K$ of the reals (the complex plane for normal operators) is identifiable with the generalised spectrum that one gets by using the algebra $L(H)$ of operators.  This is basically a formulation of the functional calculus and has a fairly elementary proof---set it up for polynomials, derive one of the estimates you mention and extend by continuity and the Weierstraß theorem). One can then get the version involving spectral measures by invoking a suitable extension of the RRT for vector-valued measures.
This can be extended to the case of unbounded operators using the space of bounded continuous functions on the line but is a bit more delicate to state and prove since one has to use more involved structures on both spaces---not the norm but the so-called strict or mixed topologies (Buck, Orlicz, Wiweger, et al.)
As regards the question on integration there is a simple and transparent construction of the Banach space $L^1([0,1])$ in the language of category theory.  Denote by $\cal F_n$ the finite algebra generated by the dyadic intervals of length $2^{-n}$.  Then the corresponding $\ell^1$-space can be identified with $L^1(\cal F_n)$.  These spaces form an inductive spectrum in the category of Banach spaces with linear contractions as morphisms and we can define $L^1$ to be its inductive limit. (As mentioned in a comment, this is the proof given by Tom Leinster).
But the decisive point, which hasn't been mentioned above, is that we can identify  this space with A SPACE OF FUNCTIONS (better, equivalence classes thereof) on the interval.  Without this fact, these considerations remain a mere game with glass beads ("Glasperlenspiel").
It is for this reason that the treatment to be found in the textbooks of analysis and probablity are more elaborate (rather than just saying, say, take the space of continuous functions with the the norm defined using the Riemann integral and complete it).  Remarkably, the definition of a Lebesgue integrable function can be compressed into one sentence as was shown by Jan Mikusinski: a function such that there is a sequence $\alpha_k$ of real numbers and a sequence of intervals $I_k$ in the union of the $\cal F_n$ such that the series $\sum_k \alpha_k \lambda (I_k)$
is absolutely summable and $f(x)=\sum \alpha_k \chi_{I_k}(x)$ whenever the RHS converges absolutely.  
Of course, one then has to show that the basic properties follow from this definition---without Fatou, Beppo-Levi, dominated convergence, Radon Nikodym, etc., analysts and probabilists would be at rather a loss.  This is where the estimates come in and is done by Mikusinski in his texts.