Kleisli Category of PMF as a Markov Category #
The Kleisli category of the PMF monad (probability mass functions), with Prod
as tensor and PUnit as unit, forms a Markov category — the first non-trivial
instance of MarkovCategory.
Full probability (PMF) rather than sub-probability (PMF (Option α)) is needed because
discard_natural (f ≫ ε = ε) requires mass preservation. The key lemma is
PMF.bind_const : (p.bind fun _ => q) = q, giving discard_natural for free.
Main results #
MonoidalCategory (KleisliCat PMF)—Prodtensor,PUnitunitBraidedCategory (KleisliCat PMF)— braiding swaps components viapureSymmetricCategory (KleisliCat PMF)— braiding is self-inverseCopyDiscardCategory (KleisliCat PMF)— diagonal copy, terminal discardMarkovCategory (KleisliCat PMF)—discard_naturalviaPMF.bind_const
Composition in KleisliCat PMF applies the first morphism then binds the second.
Monoidal structure #
Left whiskering: tensors the identity on X with a morphism f on the right.
Instances For
Right whiskering: tensors a morphism f on the left with the identity on Y.
Equations
Instances For
Forward component of the associator.
Instances For
Inverse component of the associator.
Instances For
Associator isomorphism for the tensor product.
Equations
- X.assocIsoPMF Y Z = { hom := X.assocHomPMF Y Z, inv := X.assocInvPMF Y Z, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
Left unitor: PUnit ⊗ X ≅ X.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Right unitor: X ⊗ PUnit ≅ X.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Forward component of the braiding: swaps the two components.
Instances For
Braiding isomorphism: swaps the two tensor factors.
Equations
- X.braidIsoPMF Y = { hom := X.braidHomPMF Y, inv := Y.braidHomPMF X, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Simp lemmas #
MonoidalCategory #
Equations
- One or more equations did not get rendered due to their size.
BraidedCategory and SymmetricCategory #
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
ComonObj (copy = diagonal, delete = terminal) #
Every type in KleisliCat PMF is a comonoid object:
comul is the diagonal and counit is the terminal map.
Equations
- X.instComonObjPMF = { counit := fun (x : X) => PMF.pure PUnit.unit, comul := fun (x : X) => PMF.pure (x, x), counit_comul := ⋯, comul_counit := ⋯, comul_assoc := ⋯ }
Every type in KleisliCat PMF is a commutative comonoid object.
CopyDiscardCategory #
Equations
- One or more equations did not get rendered due to their size.
MarkovCategory #
KleisliCat PMF is a Markov category:
discarding after any stochastic map equals discarding directly.
Equations
- One or more equations did not get rendered due to their size.