Morphisms Between Monads #
Basic definitions of maps between monads parameterized over any possible output type.
This is implemented with more constrained universes as m ⟶ n in mathlib category theory,
but this gives definitions more standardized to a cs context.
TODO: Evaluate more fine-grained PureHom/BintHom/etc, with Class versions as well.
Probably should be in the context of upstreaming things.
A MonadHom m n bundles a monad map m ⟶ n (represented as a NatHom) with proofs that
it respects the bind and pure operations in the underlying monad.
Instances For
A MonadHom m n bundles a monad map m ⟶ n (represented as a NatHom) with proofs that
it respects the bind and pure operations in the underlying monad.
Equations
- «term_→ᵐ_» = Lean.ParserDescr.trailingNode `«term_→ᵐ_» 25 26 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " →ᵐ ") (Lean.ParserDescr.cat `term 25))
Instances For
Similar to AddHomClass but for MonadHom. This becomes more important if we start defining
a hierarchy of these types (e.g. for AlternativeMonads).
Note that getting FunLike to work has some outParam challenges, may not be workable.
Instances
Construct a MonadHom from a lawful monad lift.
Equations
Instances For
Equations
- MonadHom.«term_∘ₘ_» = Lean.ParserDescr.trailingNode `MonadHom.«term_∘ₘ_» 90 91 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ∘ₘ ") (Lean.ParserDescr.cat `term 90))