bsc-leon-vatthauer/src/Monad/Morphism.lagda.md
2023-10-09 12:11:21 +02:00

1.9 KiB
Raw Blame History

module Monad.Morphism {o  e} (C : Category o  e) where
  open Category C

Monad morphisms

This file contains the definition of morphisms between (strong) monads on the same category

Morphisms between monads

A morphism between monads is a natural transformation that preserves η and μ, this notion is already formalized in the categories library, but since we are only interested in monads on the same category we rename their definitions.

  Monad⇒ = Monad⇒-id

Morphisms between strong monads

A morphism between strong monads is a morphism between the underlying monads that also preverses strength.

  record IsStrongMonad⇒ {monoidal : Monoidal C} (M N : StrongMonad monoidal) (α : NaturalTransformation (StrongMonad.M.F M) (StrongMonad.M.F N)) : Set (o    e) where
    private
      module M = StrongMonad M
      module N = StrongMonad N
      module α = NaturalTransformation α
    open Monoidal monoidal
    
    field
      η-comm :  {U}  α U  M.M.η.η U  N.M.η.η U
      μ-comm :  {U}  α U  (M.M.μ.η U)  N.M.μ.η U  α (N.M.F.₀ U)  M.M.F.₁ (α U)
      τ-comm :  {U V}  α (U ⊗₀ V)  M.strengthen.η (U , V)  N.strengthen.η (U , V)  (id ⊗₁ α V)

  record StrongMonad⇒ {monoidal : Monoidal C} {M N : StrongMonad monoidal} : Set (o    e) where
    field
      α : NaturalTransformation (StrongMonad.M.F M) (StrongMonad.M.F N)
      isStrongMonad⇒ : IsStrongMonad⇒ M N α

    open IsStrongMonad⇒ isStrongMonad⇒ public