Monads, partial evaluations, and rewriting
Tobias Fritz, Paolo Perrone

TL;DR
This paper introduces a construction for partial evaluation of expressions within any monad, linking it to the bar construction and providing a rewriting framework with desirable properties, including for probability monads.
Contribution
It formalizes partial evaluation for monads, connects it to the bar construction, and develops a rewriting system with proven properties for weakly cartesian monads.
Findings
Partial evaluations can be composed via Kan fillers.
The rewriting system is reflexive, confluent, and transitive for weakly cartesian monads.
Partial evaluations for probability monads relate to conditional expectation.
Abstract
Monads can be interpreted as encoding formal expressions, or formal operations in the sense of universal algebra. We give a construction which formalizes the idea of "evaluating an expression partially": for example, "2+3" can be obtained as a partial evaluation of "2+2+1". This construction can be given for any monad, and it is linked to the famous bar construction, of which it gives an operational interpretation: the bar construction induces a simplicial set, and its 1-cells are partial evaluations. We study the properties of partial evaluations for general monads. We prove that whenever the monad is weakly cartesian, partial evaluations can be composed via the usual Kan filler property of simplicial sets, of which we give an interpretation in terms of substitution of terms. In terms of rewritings, partial evaluations give an abstract reduction system which is reflexive,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
