Skip to content
Draft
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1806521
Create Adjunctions.agda
Nov 30, 2021
c6f1d21
whoops, file was in the wrong place
Nov 30, 2021
4f12528
stub one thing at a time...
Nov 30, 2021
5973e7f
little progress
Nov 30, 2021
f755c48
Finish Split category definition
iwilare Dec 1, 2021
5700870
def of kleisli-object
Dec 1, 2021
fa0b87c
revert to 1.7
Dec 2, 2021
f1bc8e7
progress
Dec 2, 2021
a0b6dba
proof of Kl-initial
Dec 2, 2021
59d6ef6
cose
Dec 2, 2021
b9f877c
Clean modules and definitions
iwilare Dec 2, 2021
f6168a8
lazily think about it
Dec 9, 2021
fd94bd7
revert agda-lib to 1.7
Dec 9, 2021
38c00aa
a blind, automatic commit
Jan 14, 2022
44603fc
Add μ-eq, move to Adjunction.Properties, fill some definitions
iwilare May 29, 2022
1166118
Refactor with simpler names
iwilare Jul 23, 2022
f1ad63f
Simplify homomorphism, refactor into lemma on adjunction
iwilare Aug 6, 2022
0439ad0
Complete homomorphism for bang
iwilare Aug 18, 2022
f876929
Progress on initiality of Kleisli
iwilare Aug 19, 2022
a23a132
WIP
iwilare Jan 2, 2023
f731926
gnagna
Jan 3, 2023
30aad51
WIP with μ-comp
iwilare Jan 3, 2023
4b25a8b
Minima
iwilare Jan 9, 2023
ac22091
aloora
Jan 9, 2023
d9f6b10
pulizia
Jan 9, 2023
260272d
underscore
Jan 9, 2023
0c9a245
ostia
Jan 9, 2023
f13489a
nomi di mucomp
Jan 9, 2023
399992c
un mucomp fatto
Jan 9, 2023
6926096
underscores
Jan 9, 2023
c25e87b
qualcosa fatto
Jan 9, 2023
baec081
removed ids
Jan 9, 2023
4543667
swoosh
Jan 9, 2023
b4972e3
simplify mucomp ids
Jan 10, 2023
3902c5b
smol steps
Jan 10, 2023
42cebd6
mucomp fatto
Jan 10, 2023
09b1dda
typechecka fin qui
Jan 10, 2023
3c1a416
KL-initial
Jan 10, 2023
72e3bea
remove push of pippo
Jan 10, 2023
a576da1
just a comp from the end
Jan 10, 2023
d2cf221
Minima
iwilare Jan 10, 2023
27dd32d
smol homomorphism
Jan 11, 2023
7712bb5
Style fixes
iwilare Jan 11, 2023
20c26f8
Make terms explicit
iwilare Jan 11, 2023
e963814
Revert Categories.Tactic.Category
iwilare Jan 11, 2023
3cee6a1
Small progress on mu-comp
iwilare Jan 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions src/Categories/Adjoint/Construction/AdjunctionTerminalInitial.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{-# OPTIONS --without-K --safe #-}

open import Level
open import Categories.Category.Core using (Category)
open import Categories.Category
open import Categories.Monad

module Categories.Adjoint.Construction.AdjunctionTerminalInitial {o ℓ e} {C : Category (o ⊔ ℓ ⊔ e) (ℓ ⊔ e) e} (M : Monad C) where
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be tempted to call this Categories.Adjoint.Construction.Adjunctions.Properties.


open import Categories.Adjoint
open import Categories.Functor
open import Categories.NaturalTransformation.Core as NT
open import Categories.NaturalTransformation.NaturalIsomorphism as NI
open import Categories.Morphism.Reasoning as MR

open import Categories.Adjoint.Construction.Adjunctions M

open import Categories.Object.Terminal (Split M)
open import Categories.Object.Initial (Split M)
open import Categories.Category.Construction.EilenbergMoore
open import Categories.Category.Construction.Kleisli
open import Categories.Adjoint.Construction.Kleisli M as KL
open import Categories.Adjoint.Construction.EilenbergMoore M as EM

EM-object : SplitObj
EM-object = record
{ D = EilenbergMoore M
; F = EM.Free
; G = EM.Forgetful
; adj = EM.Free⊣Forgetful
; eqM = EM.FF≃F
}

EM-terminal : IsTerminal EM-object
EM-terminal = record
{ ! = {!!}
; !-unique = {! !}
}


Kl-object : SplitObj
Kl-object = record
{ D = Kleisli M
; F = KL.Free
; G = KL.Forgetful
; adj = KL.Free⊣Forgetful
; eqM = KL.FF≃F
}

Kl-initial : IsInitial Kl-object
Kl-initial = record
{ ! = bang
; !-unique = {! !}
}
where
-- vanno aperte un po' di cose per non diventar matti
bang : {A : SplitObj} → Split⇒ Kl-object A
bang {splitobj D F G adj eq} = record
{ H = record
{ F₀ = λ T → Functor.F₀ F T
; F₁ = λ {A} {B} f → adj.counit.η (F.₀ B) ∘ F.₁ (eq.⇐.η B C.∘ f)
; identity = λ {A} → begin
adj.counit.η (F.₀ A) ∘ F.₁ (eq.⇐.η A C.∘ M.η.η A) ≈⟨ refl⟩∘⟨ Functor.F-resp-≈ F lemma ⟩
adj.counit.η (F.₀ A) ∘ F.₁ (adj.unit.η A) ≈⟨ adj.zig ⟩
D.id ∎
; homomorphism = λ {X} {Y} {Z} {f} {g} → {! !}
; F-resp-≈ = λ x → D.∘-resp-≈ʳ (Functor.F-resp-≈ F (C.∘-resp-≈ʳ x))
}
; HF≃F' = {! !}
; G'H≃G = {! !}
}
where module adj = Adjoint adj
module F = Functor F
module M = Monad M
module eq = NaturalIsomorphism eq
open module D = Category D
open D.HomReasoning
module C = Category C

lemma : ∀ {A} → eq.⇐.η A C.∘ M.η.η A C.≈ adj.unit.η A
lemma {A} = C.HomReasoning.begin
eq.⇐.η A C.∘ M.η.η A C.HomReasoning.≈⟨ {! !} ⟩
adj.unit.η A C.HomReasoning.∎
where open C.HomReasoning
73 changes: 73 additions & 0 deletions src/Categories/Adjoint/Construction/Adjunctions.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{-# OPTIONS --without-K --safe #-}

open import Level
open import Categories.Category.Core using (Category)
open import Categories.Category
open import Categories.Monad

module Categories.Adjoint.Construction.Adjunctions {o ℓ e} {C : Category o ℓ e} (M : Monad C) where

open Category C

open import Categories.Adjoint
open import Categories.Functor
open import Categories.Morphism
open import Categories.Functor.Properties
open import Categories.NaturalTransformation.Core
open import Categories.NaturalTransformation.NaturalIsomorphism
open import Categories.Morphism.Reasoning as MR
open import Categories.Tactic.Category

-- three things:
-- 1. the category of adjunctions splitting a given Monad
-- 2. the proof that EM(M) is the terminal object here
-- 3. the proof that KL(M) is the initial object here

record SplitObj : Set (suc o ⊔ suc ℓ ⊔ suc e) where
constructor splitobj
field
D : Category o ℓ e
F : Functor C D
G : Functor D C
adj : F ⊣ G
eqM : G ∘F F ≃ Monad.F M

record Split⇒ (X Y : SplitObj) : Set (suc o ⊔ suc ℓ ⊔ suc e) where
constructor split⇒
private
module X = SplitObj X
module Y = SplitObj Y
field
H : Functor X.D Y.D
HF≃F' : H ∘F X.F ≃ Y.F
G'H≃G : Y.G ∘F H ≃ X.G

Split : Monad C → Category _ _ _
Split M = record
{ Obj = SplitObj
; _⇒_ = Split⇒
; _≈_ = λ U V → Split⇒.H U ≃ Split⇒.H V
; id = split-id
; _∘_ = comp
; assoc = λ { {f = f} {g = g} {h = h} → associator (Split⇒.H f) (Split⇒.H g) (Split⇒.H h) }
; sym-assoc = λ { {f = f} {g = g} {h = h} → sym-associator (Split⇒.H f) (Split⇒.H g) (Split⇒.H h) }
; identityˡ = unitorˡ
; identityʳ = unitorʳ
; identity² = unitor²
; equiv = record { refl = refl ; sym = sym ; trans = trans }
; ∘-resp-≈ = _ⓘₕ_
}
where
open NaturalTransformation
split-id : {A : SplitObj} → Split⇒ A A
split-id = record
{ H = Categories.Functor.id
; HF≃F' = unitorˡ
; G'H≃G = unitorʳ
}
comp : {A B X : SplitObj} → Split⇒ B X → Split⇒ A B → Split⇒ A X
comp {A = A} {B = B} {X = X} (split⇒ Hᵤ HF≃F'ᵤ G'H≃Gᵤ) (split⇒ Hᵥ HF≃F'ᵥ G'H≃Gᵥ) = record
{ H = Hᵤ ∘F Hᵥ
; HF≃F' = HF≃F'ᵤ ⓘᵥ (Hᵤ ⓘˡ HF≃F'ᵥ) ⓘᵥ associator (SplitObj.F A) Hᵥ Hᵤ
; G'H≃G = G'H≃Gᵥ ⓘᵥ (G'H≃Gᵤ ⓘʳ Hᵥ) ⓘᵥ sym-associator Hᵥ Hᵤ (SplitObj.G X)
}