โ† back to reading

๐Ÿž Natural Breadcrumbs

Applied category theory and programming language theory are converging on the same structures from different directions. These pages map the translations, with runnable code.

PL theory

assert P(x)
y = f(x)
assert R(y)
z = g(y)
assert Q(z)

Category theory

{ P } f { R }    { R } g { Q }
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
    { P } gโˆ˜f { Q }

Same structure. Different notation. Each paper below gets a page that shows both.


Papers

Each paper has a ๐Ÿž page that translates its key ideas into diagrams and runnable code.

Paper One sentence
Staton 2025Every Hoare rule is a theorem, not an axiom, in stochastic systems๐Ÿž
Fritz 2020Stochastic functions form a category with copy and discard๐Ÿž
Fritz, Perrone, Rezagholi 2021"Which outputs are possible?" is a monad morphism๐Ÿž
Gaboardi 2021Hoare logic with grades: track side effects through composition๐Ÿž
Kura 2026Stage N's guarantee becomes stage N+1's assumption๐Ÿž
Hedges, Ghani 2018Nash equilibrium composes the same way contracts compose๐Ÿž
Capucci 2021"What is a goal but a predicate on a system?"๐Ÿž
Baez, Fritz, Leinster 2011Shannon entropy is the only information loss that respects composition๐Ÿž
Liell-Cock, Staton 2025Graded monads and Markov categories are the same structure๐Ÿž
Sato, Katsumata 2023Distance between programs = enrichment on the category๐Ÿž
Spivak 2013Typed ports and wiring diagrams: the syntax layer for composing boxes๐Ÿž
Jacobs 2014Weakest preconditions from fibrations over Kleisli categories๐Ÿž
Kidney, Wu 2021One monad parameterized by a semiring: probability, counting, search๐Ÿž
Leinster 2021Diversity IS categorical cardinality: magnitude generalizes species count๐Ÿž
Smithe 2021Bayesian inversions compose as lenses: forward inference, backward learning๐Ÿž
Parzygnat 2020Bayesian inversion as dagger structure: three levels of reversibility๐Ÿž
Di Lavore, Roman, Sobocinski 2025Markov categories where morphisms can fail: observations, conditioning๐Ÿž
Panangaden 2009Bisimulation metrics: behavioral distance between stochastic processes๐Ÿž
Cho, Jacobs 2015Predicates as effects, not subobjects: states/effects duality๐Ÿž
Ho, Wu, Raad 2026Hoare logic for Bayesian programs: frame rule IS probabilistic independence๐Ÿž
Chen, Vigneaux 2023Shannon entropy and magnitude unified: recovers magnitude under uniform๐Ÿž

Three ways in

Also: symbol grid ยท how to use this site

๐Ÿ“บ Video lectures: MIT 18.S097: Applied Category Theory (Fong & Spivak) ยท Stanford CS364A: Algorithmic Game Theory (Roughgarden)

Neighbors