bsc-leon-vatthauer/MonadK.agda

40 lines
1.4 KiB
Agda
Raw Normal View History

2023-08-17 18:07:40 +02:00
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