From 0165423fcf553cd8e0075a788f9b9dfccedec944 Mon Sep 17 00:00:00 2001 From: Leon Vatthauer Date: Tue, 3 Oct 2023 19:44:08 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Started=20working=20on=20quotien?= =?UTF-8?q?ting=20the=20delay=20monad?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 3 + src/Monad/Instance/Delay.lagda.md | 4 +- src/Monad/Instance/Delay/Quotienting.lagda.md | 58 +++++++++++++++++-- 3 files changed, 56 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 355ac99..d52d115 100644 --- a/Makefile +++ b/Makefile @@ -31,3 +31,6 @@ push': Everything.agda: git ls-tree --full-tree -r --name-only HEAD | egrep '^src/[^\.]*.l?agda(\.md)?' | sed -e 's|^src/[/]*|import |' -e 's|/|.|g' -e 's/.agda//' -e '/import Everything/d' -e 's/..md//' | LC_COLLATE='C' sort > Everything.agda + +open: + firefox public/index.html \ No newline at end of file diff --git a/src/Monad/Instance/Delay.lagda.md b/src/Monad/Instance/Delay.lagda.md index 6019898..2cf1bf4 100644 --- a/src/Monad/Instance/Delay.lagda.md +++ b/src/Monad/Instance/Delay.lagda.md @@ -1,6 +1,5 @@ + + +## Preliminaries + +Existence of the coequalizer doesn't suffice, we will need some conditions having to do with preservation of the coequalizer, so let's first define what it means for a coequalizer to be preserved by an endofunctor: + +```agda + preserves : ∀ {X Y} {f g : X ⇒ Y} → Endofunctor C → Coequalizer f g → Set (o ⊔ ℓ ⊔ e) + preserves {X} {Y} {f} {g} F coeq = Coequalizer (Functor.₁ F f) (Functor.₁ F g) +``` + +We will now show that the following conditions are equivalent: + +1. For every $X$, the coequalizer is preserved by $D$ +2. every $\tilde{D}X$ extends to a search-algebra, so that each $ρ_X$ is a D-algebra morphism +3. for every $X$, $(\tilde{D}X, ρ ∘ now : X → \tilde{D}X)$ is a stable free elgot algebra on X, $ρ_X$ is a D-algebra morphism and $ρ_X = ((ρ_X ∘ now + id) ∘ out)^\#$ +4. $\tilde{D}$ extends to a strong monad, so that $ρ$ is a strong monad morphism + +```agda module _ (D : DelayM) where - open DelayM D + open DelayM D renaming (functor to D-Fun; monad to D-Monad; kleisli to D-Kleisli) - open Functor functor using () renaming (F₁ to D₁) - open RMonad kleisli + open Functor D-Fun using () renaming (F₁ to D₁) + open RMonad D-Kleisli - module _ {X : Obj} (coeq : Coequalizer (extend (ι {X})) (D₁ π₁)) where - -- TODO + + + + module _ (coeqs : ∀ X → Coequalizer (extend (ι {X})) (D₁ π₁)) where + + Ď₀ : Obj → Obj + Ď₀ X = Coequalizer.obj (coeqs X) + + cond-1 : Set (o ⊔ ℓ ⊔ e) + cond-1 = ∀ {X} → preserves D-Fun (coeqs X) + + cond-2 : Set (o ⊔ ℓ ⊔ e) + cond-2 = {! !} + + cond-3 : Set (o ⊔ ℓ ⊔ e) + cond-3 = {! !} + + cond-4 : Set (o ⊔ ℓ ⊔ e) + cond-4 = {! !} ``` \ No newline at end of file