Definition. The state promonad [mde-0010]
Definition. The state promonad [mde-0010]
Let \((ℂ, ⊗, I)\) be a monoidal category, and \(S\) an object of \(ℂ\).
The state promonad has underlying endoprofunctor \(\textsf {St}_{S} : ℂ \to ℂ\) defined on objects by \[(C, C') \mapsto ℂ(S ⊗ C; S ⊗ C')\] and on morphisms by \[(f : C \to D, g : C' \to D) \mapsto \lambda p . (S ⊗ f) \mathbin {⨟} p \mathbin {⨟} (S ⊗ g)\]
or in string diagrams, \((f,g)\) maps to the function:
The unit has components \[\eta _{C,C'} : ℂ(C;C') \to ℂ(S ⊗ C; S ⊗ C') : f \mapsto \textsf {id}_{S}⊗f\],
and the multiplication has components \[\mu _{C,C'} : \left (\int ^{D \in ℂ} \textsf {St}_{S}(C,D) \times \textsf {St}_{S}(D,C')\right ) \to ℂ(S ⊗ C; S ⊗ C') : \langle p \mid q \rangle \mapsto p \mathbin {⨟} q\]
whose action may be drawn using open string diagrams,