|
| 1 | +# Coalgebras over comonads on precategories |
| 2 | + |
| 3 | +```agda |
| 4 | +module category-theory.coalgebras-comonads-on-precategories where |
| 5 | +``` |
| 6 | + |
| 7 | +<details><summary>Imports</summary> |
| 8 | + |
| 9 | +```agda |
| 10 | +open import category-theory.commuting-squares-of-morphisms-in-precategories |
| 11 | +open import category-theory.comonads-on-precategories |
| 12 | +open import category-theory.functors-precategories |
| 13 | +open import category-theory.natural-transformations-functors-precategories |
| 14 | +open import category-theory.natural-transformations-maps-precategories |
| 15 | +open import category-theory.precategories |
| 16 | +
|
| 17 | +open import foundation.action-on-identifications-functions |
| 18 | +open import foundation.dependent-pair-types |
| 19 | +open import foundation.identity-types |
| 20 | +open import foundation.sets |
| 21 | +open import foundation.universe-levels |
| 22 | +
|
| 23 | +open import foundation-core.cartesian-product-types |
| 24 | +``` |
| 25 | + |
| 26 | +</details> |
| 27 | + |
| 28 | +## Idea |
| 29 | + |
| 30 | +A |
| 31 | +{{#concept "coalgebra" Disambiguation="over a comonad on a precategory" Agda=coalgebra-comonad-Precategory}} |
| 32 | +over a [comonad](category-theory.comonads-on-precategories.md) `T` consists of |
| 33 | +an object `A` and morphism `a : A → TA` satisfying two compatibility laws: |
| 34 | + |
| 35 | +- **Counit law**: `ε_A ∘ a = id_A` |
| 36 | +- **Comultiplication law**: `Ta ∘ a = δ ∘ a` |
| 37 | + |
| 38 | +## Definitions |
| 39 | + |
| 40 | +```agda |
| 41 | +module _ |
| 42 | + {l1 l2 : Level} (C : Precategory l1 l2) |
| 43 | + (T : comonad-Precategory C) |
| 44 | + {A : obj-Precategory C} |
| 45 | + (a : hom-Precategory C A (obj-endofunctor-comonad-Precategory C T A)) |
| 46 | + where |
| 47 | +
|
| 48 | + has-counit-law-coalgebra-comonad-Precategory : UU l2 |
| 49 | + has-counit-law-coalgebra-comonad-Precategory = |
| 50 | + comp-hom-Precategory C (hom-counit-comonad-Precategory C T A) a = |
| 51 | + id-hom-Precategory C |
| 52 | +
|
| 53 | + has-comul-law-coalgebra-comonad-Precategory : UU l2 |
| 54 | + has-comul-law-coalgebra-comonad-Precategory = |
| 55 | + comp-hom-Precategory C (hom-endofunctor-comonad-Precategory C T a) a = |
| 56 | + comp-hom-Precategory C (hom-comul-comonad-Precategory C T A) a |
| 57 | +
|
| 58 | + is-coalgebra-comonad-Precategory : UU l2 |
| 59 | + is-coalgebra-comonad-Precategory = |
| 60 | + has-counit-law-coalgebra-comonad-Precategory × |
| 61 | + has-comul-law-coalgebra-comonad-Precategory |
| 62 | +
|
| 63 | +module _ |
| 64 | + {l1 l2 : Level} (C : Precategory l1 l2) |
| 65 | + (T : comonad-Precategory C) |
| 66 | + where |
| 67 | +
|
| 68 | + coalgebra-comonad-Precategory : UU (l1 ⊔ l2) |
| 69 | + coalgebra-comonad-Precategory = |
| 70 | + Σ ( obj-Precategory C) |
| 71 | + ( λ A → |
| 72 | + Σ ( hom-Precategory C A (obj-endofunctor-comonad-Precategory C T A)) |
| 73 | + ( λ a → is-coalgebra-comonad-Precategory C T a)) |
| 74 | +
|
| 75 | + obj-coalgebra-comonad-Precategory : |
| 76 | + coalgebra-comonad-Precategory → obj-Precategory C |
| 77 | + obj-coalgebra-comonad-Precategory = pr1 |
| 78 | +
|
| 79 | + hom-coalgebra-comonad-Precategory : |
| 80 | + (f : coalgebra-comonad-Precategory) → |
| 81 | + hom-Precategory C |
| 82 | + ( obj-coalgebra-comonad-Precategory f) |
| 83 | + ( obj-endofunctor-comonad-Precategory C T |
| 84 | + ( obj-coalgebra-comonad-Precategory f)) |
| 85 | + hom-coalgebra-comonad-Precategory f = pr1 (pr2 f) |
| 86 | +
|
| 87 | + comm-coalgebra-comonad-Precategory : |
| 88 | + (f : coalgebra-comonad-Precategory) → |
| 89 | + is-coalgebra-comonad-Precategory C T (hom-coalgebra-comonad-Precategory f) |
| 90 | + comm-coalgebra-comonad-Precategory f = pr2 (pr2 f) |
| 91 | +
|
| 92 | + counit-law-coalgebra-comonad-Precategory : |
| 93 | + (f : coalgebra-comonad-Precategory) → |
| 94 | + has-counit-law-coalgebra-comonad-Precategory C T |
| 95 | + ( hom-coalgebra-comonad-Precategory f) |
| 96 | + counit-law-coalgebra-comonad-Precategory f = pr1 (pr2 (pr2 f)) |
| 97 | +
|
| 98 | + comul-law-coalgebra-comonad-Precategory : |
| 99 | + (f : coalgebra-comonad-Precategory) → |
| 100 | + has-comul-law-coalgebra-comonad-Precategory C T |
| 101 | + ( hom-coalgebra-comonad-Precategory f) |
| 102 | + comul-law-coalgebra-comonad-Precategory f = pr2 (pr2 (pr2 f)) |
| 103 | +``` |
0 commit comments