I’m really enjoying this paper by Filippo Bonchi, Elena DiLavore and @mromang08.
Special highlights:
-
Separating out value manipulation, computation, and side effects into three categories on the same collection of objects, which are cartesian, monoidal, and premonoidal respectively. The example to keep in mind here is if you have a (possibly non-commutative) monad T on a cartesian category C, then you have (C, Kl_{Z(T)}(C), Kl_{T}(C)). The intuition is that computation might be nondeterministic, so it doesn’t commute with copy-delete (monoidal not cartesian), and side effects must happen in a specific, so parallel composition is ill-defined (premonoidal not monoidal). They call such a triple an “effectful category”
Incidentally, it might seem evil to say that there are “identity on objects” functors on categories, but this can be done in a non-evil way by saying that an identity on objects functor C \to D is a monad in \mathbf{Prof} with carrier C. I know that Mario knows this, but probably this is pitched to an audience who doesn’t care about evilness but would be put off by monads in \mathbf{Prof}.
Also, they relate this to call-by-push-value. I wonder if @mromang08 could comment on the precise relationship, because if I remember correctly in call-by-push-value there is an adjunction rather than just an inclusion of categories. Honestly, just having an inclusion seems more desirable to me in any case, because I don’t want to reflect the computation back into my values, I want my values to stay values! But I’d like to know why one would choose to do one way or another.
-
Showing how Haskell’s do-notation can be used in an arbitrary effectful category!! Do notation: not just for monads anymore!
-
Streams! I used to think that streams were not very interesting “they are just like lists but infinite, what’s the big deal?” But I kept seeing libraries using streams, like fs2, which is a stream library in Scala that powers, believe it or not, Disney Plus. And also, everyone’s favorite swiss army knife, bash pipelines, is secretly streams! So I have been convinced that streams are actually a big deal. I do wonder if streams are something like a “non-dependent” version of the cofree comonad, and that maybe generalizing from streams to cofree comonads would bring some interesting benefits to the various stream libraries. However, I really like that the approach to streams that is taken by Bonchi et al is very generic over the base category, while cofree comonads are pretty Set-based.
-
Causal processes, which are maps \bigotimes_i X_i \to \bigotimes_i Y_i that are determined by a family of maps f_n \colon X_0 \otimes \cdots \otimes X_n \to Y_0 \otimes \cdots \otimes Y_n that satisfy a certain compatibility condition. This is cool to me, because it seems like a categorification of Markov processes being adapted to a filtration. @mromang08 when are you going to do this for continuously-indexed streams?? Many people want this.
-
Semantics for Mealy machines as effectful streams. This relates to some stuff that I was thinking about with David Jaz and others in Oxford a couple weeks ago: Random trajectories of Markov kernels. Figuring out how to blend the streams/partial Markov stuff coming from @mromang08 and Elena with @david.jaz systems theory is long overdue.