Added K monad

This commit is contained in:
Leon Vatthauer 2023-08-17 18:07:40 +02:00
parent 72560dfb59
commit 358b3be4c6
Signed by: leonv
SSH key fingerprint: SHA256:G4+ddwoZmhLPRB1agvXzZMXIzkVJ36dUYZXf5NxT+u8

40
MonadK.agda Normal file
View file

@ -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