diff --git a/MonadK.agda b/MonadK.agda new file mode 100644 index 0000000..7d2ac5f --- /dev/null +++ b/MonadK.agda @@ -0,0 +1,40 @@ +open import Level +open import Categories.Category.Core +open import Categories.Category.Extensive.Bundle +open import Function using (id) + +module MonadK {o ℓ e} (D : ExtensiveDistributiveCategory o ℓ e) where + open ExtensiveDistributiveCategory D renaming (U to C; id to idC) + open import UniformIterationAlgebras + open import UniformIterationAlgebra + open import Categories.FreeObjects.Free + open import Categories.Functor.Core + open import Categories.Adjoint + open import Categories.Adjoint.Properties + open import Categories.NaturalTransformation.Core renaming (id to idN) + open import Categories.Monad + open Equiv + + record MonadK : Set (suc o ⊔ suc ℓ ⊔ suc e) where + forgetfulF : Functor (Uniform-Iteration-Algebras D) C + forgetfulF = record + { F₀ = λ X → Uniform-Iteration-Algebra.A X + ; F₁ = λ f → Uniform-Iteration-Algebra-Morphism.h f + ; identity = refl + ; homomorphism = refl + ; F-resp-≈ = id + } + + field + algebras : ∀ X → FreeObject {C = C} {D = Uniform-Iteration-Algebras D} forgetfulF X + + freeF : Functor C (Uniform-Iteration-Algebras D) + freeF = FO⇒Functor forgetfulF algebras + + adjoint : freeF ⊣ forgetfulF + adjoint = FO⇒LAdj forgetfulF algebras + + K : Monad C + K = adjoint⇒monad adjoint + + -- TODO show that the category of K-Algebras is the category of uniform-iteration algebras \ No newline at end of file