-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
defn: monads are lax functors (#460)
I noticed this on the [nlab](https://ncatlab.org/nlab/show/monad#Etymology) and it sounded fun to write down. Really it'd be nice to do this using displayed bicategories with a displayed bicategory of monads over a base bicategory $$\mathsf{S}$$. # Description * A few facts about the terminal category * The terminal bicategory * Monads are equivalent to lax functors from said bicategory
- Loading branch information
Showing
6 changed files
with
142 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!-- | ||
```agda | ||
open import 1Lab.Prelude | ||
|
||
open import Cat.Instances.Shape.Terminal | ||
open import Cat.Univalent | ||
open import Cat.Bi.Base | ||
|
||
import Cat.Reasoning | ||
``` | ||
--> | ||
|
||
```agda | ||
module Cat.Bi.Instances.Terminal where | ||
``` | ||
|
||
# The terminal bicategory {defines="terminal-bicategory"} | ||
|
||
The **terminal bicategory** is the [[bicategory]] with a single object, and a trivial | ||
category of morphisms. | ||
|
||
```agda | ||
open Prebicategory | ||
|
||
⊤Bicat : Prebicategory lzero lzero lzero | ||
⊤Bicat .Ob = ⊤ | ||
⊤Bicat .Hom _ _ = ⊤Cat | ||
⊤Bicat .Prebicategory.id = tt | ||
⊤Bicat .compose = !F | ||
⊤Bicat .unitor-l = path→iso !F-unique₂ | ||
⊤Bicat .unitor-r = path→iso !F-unique₂ | ||
⊤Bicat .associator = path→iso !F-unique₂ | ||
⊤Bicat .triangle _ _ = refl | ||
⊤Bicat .pentagon _ _ _ _ = refl | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!-- | ||
```agda | ||
open import Cat.Functor.Equivalence.Path | ||
open import Cat.Instances.Shape.Terminal | ||
open import Cat.Functor.Equivalence | ||
open import Cat.Instances.Product | ||
open import Cat.Prelude | ||
``` | ||
--> | ||
|
||
```agda | ||
module Cat.Instances.Shape.Terminal.Properties where | ||
``` | ||
|
||
# Properties | ||
|
||
We note that the [[terminal category]] is a unit to the categorical product. | ||
|
||
```agda | ||
⊤Cat-unit : ∀ {o h} {C : Precategory o h} → ⊤Cat ×ᶜ C ≡ C | ||
⊤Cat-unit = sym $ Precategory-path Cat⟨ !F , Id ⟩ Cat⟨!F,Id⟩-is-iso where | ||
open is-precat-iso | ||
open is-iso | ||
Cat⟨!F,Id⟩-is-iso : is-precat-iso Cat⟨ !F , Id ⟩ | ||
Cat⟨!F,Id⟩-is-iso .has-is-ff .is-eqv (tt , f) .centre = f , refl | ||
Cat⟨!F,Id⟩-is-iso .has-is-iso .is-eqv (tt , a) .centre = a , refl | ||
Cat⟨!F,Id⟩-is-iso .has-is-ff .is-eqv (tt , f) .paths (g , p) i = p (~ i) .snd , λ j → p (~ i ∨ j) | ||
Cat⟨!F,Id⟩-is-iso .has-is-iso .is-eqv (tt , a) .paths (b , p) i = p (~ i) .snd , λ j → p (~ i ∨ j) | ||
``` |