2023-08-19 12:15:34 +02:00
|
|
|
|
<!--
|
|
|
|
|
```agda
|
|
|
|
|
open import Level
|
|
|
|
|
open import Categories.Category.Equivalence using (StrongEquivalence)
|
|
|
|
|
open import Function using (id)
|
|
|
|
|
open import Categories.FreeObjects.Free
|
|
|
|
|
open import Categories.Functor.Core
|
|
|
|
|
open import Categories.Adjoint
|
|
|
|
|
open import Categories.Adjoint.Properties
|
|
|
|
|
open import Categories.Adjoint.Monadic.Crude
|
|
|
|
|
open import Categories.NaturalTransformation.Core renaming (id to idN)
|
|
|
|
|
open import Categories.Monad
|
|
|
|
|
open import Categories.Category.Construction.EilenbergMoore
|
|
|
|
|
open import Categories.Category.Slice
|
2023-09-12 16:03:20 +02:00
|
|
|
|
open import Category.Instance.AmbientCategory using (Ambient)
|
2023-08-19 12:15:34 +02:00
|
|
|
|
```
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
## Summary
|
|
|
|
|
In this file I explore the monad ***K*** and its properties:
|
|
|
|
|
|
|
|
|
|
- [X] *Lemma 16* Definition of the monad
|
|
|
|
|
- [ ] *Lemma 16* EilenbergMoore⇒UniformIterationAlgebras (use [crude monadicity theorem](https://agda.github.io/agda-categories/Categories.Adjoint.Monadic.Crude.html))
|
|
|
|
|
- [ ] *Proposition 19* ***K*** is strong
|
|
|
|
|
- [ ] *Theorem 22* ***K*** is an equational lifting monad
|
|
|
|
|
- [ ] *Proposition 23* The Kleisli category of ***K*** is enriched over pointed partial orders and strict monotone maps
|
|
|
|
|
- [ ] *Proposition 25* ***K*** is copyable and weakly discardable
|
|
|
|
|
- [ ] *Theorem 29* ***K*** is an initial pre-Elgot monad and an initial strong pre-Elgot monad
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Code
|
|
|
|
|
|
|
|
|
|
```agda
|
2023-09-12 16:03:20 +02:00
|
|
|
|
module Monad.Instance.K {o ℓ e} (ambient : Ambient o ℓ e) where
|
|
|
|
|
open Ambient ambient
|
|
|
|
|
open import Category.Construction.UniformIterationAlgebras ambient
|
|
|
|
|
open import Algebra.UniformIterationAlgebra ambient
|
2023-08-19 12:15:34 +02:00
|
|
|
|
open Equiv
|
|
|
|
|
|
|
|
|
|
-- TODO move this to a different file
|
|
|
|
|
|
2023-09-12 16:03:20 +02:00
|
|
|
|
forgetfulF : Functor Uniform-Iteration-Algebras C
|
2023-08-19 12:15:34 +02:00
|
|
|
|
forgetfulF = record
|
|
|
|
|
{ F₀ = λ X → Uniform-Iteration-Algebra.A X
|
|
|
|
|
; F₁ = λ f → Uniform-Iteration-Algebra-Morphism.h f
|
|
|
|
|
; identity = refl
|
|
|
|
|
; homomorphism = refl
|
|
|
|
|
; F-resp-≈ = id
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-- typedef
|
|
|
|
|
FreeUniformIterationAlgebra : Obj → Set (suc o ⊔ suc ℓ ⊔ suc e)
|
2023-09-12 16:03:20 +02:00
|
|
|
|
FreeUniformIterationAlgebra X = FreeObject {C = C} {D = Uniform-Iteration-Algebras} forgetfulF X
|
2023-08-19 12:15:34 +02:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### *Lemma 16*: definition of monad ***K***
|
|
|
|
|
|
|
|
|
|
```agda
|
|
|
|
|
record MonadK : Set (suc o ⊔ suc ℓ ⊔ suc e) where
|
|
|
|
|
field
|
|
|
|
|
algebras : ∀ X → FreeUniformIterationAlgebra X
|
|
|
|
|
|
2023-09-12 16:03:20 +02:00
|
|
|
|
freeF : Functor C Uniform-Iteration-Algebras
|
2023-08-19 12:15:34 +02:00
|
|
|
|
freeF = FO⇒Functor forgetfulF algebras
|
|
|
|
|
|
|
|
|
|
adjoint : freeF ⊣ forgetfulF
|
|
|
|
|
adjoint = FO⇒LAdj forgetfulF algebras
|
|
|
|
|
|
|
|
|
|
K : Monad C
|
|
|
|
|
K = adjoint⇒monad adjoint
|
|
|
|
|
|
|
|
|
|
-- EilenbergMoore⇒UniformIterationAlgebras : StrongEquivalence (EilenbergMoore K) (Uniform-Iteration-Algebras D)
|
|
|
|
|
-- EilenbergMoore⇒UniformIterationAlgebras = {! !}
|
|
|
|
|
```
|