The universal property of logarithms

This is Neil’s scribe here.

We have made some progress with taking logarithms of functors, and seem to have a nice categorical analysis. This includes a universal property of the logarithm of a functor, a complete characterisation of those functors which have logarithms, a formula for calculating the logarithm of a functor (when it exists), and a simple derivation of the properties of the logarithm. Don’t get too excited though for reasons which become clear later.

We start by defining a functor  $ Y : C^{op} \to (C \to C) $ by  $ Y(A) = [A,-] $ . So Y(A) is a covariant hom functor and Y(A) is exactly what Conor and Hank have been calling `Naperian containers’. In general Y doesn’t have a right adjoint, but we call a functor F logarithmic iff there is an object  $ \log F $ and a bijection between maps  $ Y(A) \to F $ in  $ C \to C$ and maps  $A \to \log F $ in  $C^{op}$ , or equivalently maps  $\log F \to A$  in C.

Thm. Every Naperian container is logarithmic, and the log is calculated by thye McBridean formula  $ \log F = (\partial F) 1 $ .

Prf. If F is Naperian, it is of the form Y(B), so by Yoneda the maps  $Y(A) \to Y(B)$ are in bijective correspondence with maps  $B \to A$ . The result then follows by showing that  $\partial Y(B) 1 $ equals B. []

(We cheat by using Yoneda. Some hygeine is required that we will sort out later.)

Thm. Every logarithmic functor F is a Naperian container.

Prf. By assumption, the maps in  $\log F \to A$ are in bijection with the maps in  $Y(A) \to F$ .
By Yoneda, the latter maps are in bijection with elements of F(A). So F(A) equals  $\log F \to A$ . So    $F = Y(\log(F))$ , and hence is Naperian. []

This is a nice result. It shows that the logarithmic functors are precisely the extensions of Naperian containers.

The properties we will derive are these:

  •  $$\log(Y(A)) = A
  •  $\log(F \times G) = \log(F) + \log(G) $
  •  $\log(1) = 0 $ , where `1′ stands for the constant 1-valued functor, and likewise `0′ for the constant 0-valued functor. (These are terminal and initial objects in the functor category.)
  •  $\log(F^K) = \log(F) \times K $ , where K is an object in our category.
  • (Conor’s law)  $\log(F \cdot G) = \log(F) \times \log(G)$ .

Prf. For the first property, simply calculate  $ \partial(Y(a)) 1 $ . For the rest, note that F and G must be of the form Y(A) and Y(B). Now just use the first result.

Conclusion. This all looked very nice at one point. But these last results are actually pretty darn trivial. Maybe there is more substance to them if we avoid the use of Yoneda. For example the last three laws can be proved using the universal property.

2 Responses to “The universal property of logarithms”

  1. Kenn Says:

    Confusingly, this just showed up in my RSS feed today, but is dated three years ago. Since the only mention I’ve seen of Naperian types is in a preprint by Gibbons, I suspect there is clock skew and this really is newish. Hopefully someone gets pinged by my comment.

    When I wrote a type as an exponential, a labmate in a different discipline immediately asked what a logarithm would be, so I have been thinking along these same lines recently, playing with the recursive equations for Stream, List, Nat, and whatnot. Is this perhaps useful for flattening a type for parallel computation? What about non-Naperian types that are related to Naperian types? Take lists as finite prefixes of infinite streams; the “McBridean formula” gives the same result for both, even though the latter is non-Naperian.

    I’m hoping that you do find something non-trivial, as I want to read about it from someone who knows what they are talking about :-)

  2. Kenn Says:

    Should read “the former is non-Naperian”…

Leave a Reply

You must be logged in to post a comment.