From c27e3ea1548f06cf21aedbbda4a2951325fb19b3 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Tue, 17 Oct 2023 22:30:38 +0200 Subject: [PATCH 01/89] text subtypes --- src/foundation/complements-subtypes.lagda.md | 4 ++-- src/foundation/symmetric-difference.lagda.md | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/foundation/complements-subtypes.lagda.md b/src/foundation/complements-subtypes.lagda.md index 441baca4ff..34d296f6b8 100644 --- a/src/foundation/complements-subtypes.lagda.md +++ b/src/foundation/complements-subtypes.lagda.md @@ -23,8 +23,8 @@ open import foundation-core.subtypes ## Idea -The complement of a subtype `P` of `A` consists of the elements that are not in -`P`. +The **complement** of a [subtypes](foundation-core.subtypes.md) `P` of `A` +consists of the elements that are not in `P`. ## Definition diff --git a/src/foundation/symmetric-difference.lagda.md b/src/foundation/symmetric-difference.lagda.md index 6049da18de..457ffcd8fa 100644 --- a/src/foundation/symmetric-difference.lagda.md +++ b/src/foundation/symmetric-difference.lagda.md @@ -28,8 +28,9 @@ open import foundation-core.transport-along-identifications ## Idea -The symmetric difference of two subtypes `A` and `B` is the subtypes that -contains the elements that are either in `A` or in `B` but not in both. +The **symmetric difference** of two [subtypes](foundation-core.subtypes.md) `A` +and `B` is the subtypes that contains the elements that are either in `A` or in +`B` but not in both. ## Definition @@ -52,6 +53,8 @@ module _ ### The coproduct of two decidable subtypes is equivalent to their symmetric difference plus two times their intersection +This is also known as the _inclusion-exclusion principle_. + ```agda module _ {l l1 l2 : Level} {X : UU l} @@ -163,3 +166,7 @@ module _ s (inr (pair x q)) = right-cases-s x q (is-decidable-Decidable-Prop (P x)) ``` + +## See also + +- [Complements of subtypes](foundation.complements.subtypes.md) From e627749de575f0f4ce040310a52851fd135cab6e Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 18 Oct 2023 15:10:32 +0200 Subject: [PATCH 02/89] precategory and embedding of subcategory --- src/category-theory.lagda.md | 1 + src/category-theory/subcategories.lagda.md | 333 ++++++++++++++++++ src/category-theory/subprecategories.lagda.md | 54 ++- 3 files changed, 357 insertions(+), 31 deletions(-) create mode 100644 src/category-theory/subcategories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index d53f0377e8..ea0e6f9919 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -102,6 +102,7 @@ open import category-theory.representing-arrow-category public open import category-theory.sieves-in-categories public open import category-theory.simplex-category public open import category-theory.slice-precategories public +open import category-theory.subcategories public open import category-theory.subprecategories public open import category-theory.terminal-objects-precategories public open import category-theory.yoneda-lemma-categories public diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md new file mode 100644 index 0000000000..418a611c76 --- /dev/null +++ b/src/category-theory/subcategories.lagda.md @@ -0,0 +1,333 @@ +# Subcategories + +```agda +module category-theory.subcategories where +``` + +
Imports + +```agda +open import category-theory.categories +open import category-theory.embeddings-precategories +open import category-theory.faithful-functors-precategories +open import category-theory.functors-categories +open import category-theory.functors-precategories +open import category-theory.maps-categories +open import category-theory.maps-precategories +open import category-theory.precategories +open import category-theory.subprecategories + +open import foundation.dependent-pair-types +open import foundation.embeddings +open import foundation.identity-types +open import foundation.propositions +open import foundation.sets +open import foundation.subtypes +open import foundation.universe-levels +``` + +
+ +## Idea + +A **subcategory** of a [category](category-theory.categories.md) `C` consists of +a [subtype](foundation-core.subtypes.md) `P₀` of the objects of `C`, and a +family of subtypes `P₁` + +```text + P₁ : (X Y : obj C) → P₀ X → P₀ Y → subtype (hom X Y) +``` + +of the morphisms of `C`, such that `P₁` contains all identity morphisms of +objects in `P₀` and is closed under composition. + +## Definitions + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Category l1 l2) + (P₀ : subtype l3 (obj-Category C)) + (P₁ : (x y : obj-Category C) → subtype l4 (hom-Category C x y)) + where + + contains-id-subtype-Category : UU (l1 ⊔ l3 ⊔ l4) + contains-id-subtype-Category = + contains-id-subtype-Precategory (precategory-Category C) P₀ P₁ + + is-prop-contains-id-subtype-Category : + is-prop contains-id-subtype-Category + is-prop-contains-id-subtype-Category = + is-prop-contains-id-subtype-Precategory (precategory-Category C) P₀ P₁ + + contains-id-prop-subtype-Category : Prop (l1 ⊔ l3 ⊔ l4) + contains-id-prop-subtype-Category = + contains-id-prop-subtype-Precategory (precategory-Category C) P₀ P₁ + + is-closed-under-composition-subtype-Category : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) + is-closed-under-composition-subtype-Category = + is-closed-under-composition-subtype-Precategory + ( precategory-Category C) P₀ P₁ + + is-prop-is-closed-under-composition-subtype-Category : + is-prop is-closed-under-composition-subtype-Category + is-prop-is-closed-under-composition-subtype-Category = + is-prop-is-closed-under-composition-subtype-Precategory + ( precategory-Category C) P₀ P₁ + + is-closed-under-composition-prop-subtype-Category : Prop (l1 ⊔ l2 ⊔ l3 ⊔ l4) + is-closed-under-composition-prop-subtype-Category = + is-closed-under-composition-prop-subtype-Precategory + ( precategory-Category C) P₀ P₁ +``` + +### The predicate of being a subcategory + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Category l1 l2) + (P₀ : subtype l3 (obj-Category C)) + (P₁ : (x y : obj-Category C) → subtype l4 (hom-Category C x y)) + where + + is-subcategory-Prop : Prop (l1 ⊔ l2 ⊔ l3 ⊔ l4) + is-subcategory-Prop = + is-subprecategory-Prop (precategory-Category C) P₀ P₁ + + is-subcategory : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) + is-subcategory = type-Prop is-subcategory-Prop + + is-prop-is-subcategory : is-prop (is-subcategory) + is-prop-is-subcategory = is-prop-type-Prop is-subcategory-Prop + + contains-id-is-subcategory : + is-subcategory → contains-id-subtype-Category C P₀ P₁ + contains-id-is-subcategory = pr1 + + is-closed-under-composition-is-subcategory : + is-subcategory → is-closed-under-composition-subtype-Category C P₀ P₁ + is-closed-under-composition-is-subcategory = pr2 +``` + +### Subcategories + +```agda +Subcategory : + {l1 l2 : Level} (l3 l4 : Level) + (C : Category l1 l2) → + UU (l1 ⊔ l2 ⊔ lsuc l3 ⊔ lsuc l4) +Subcategory l3 l4 C = Subprecategory l3 l4 (precategory-Category C) + +module _ + {l1 l2 l3 l4 : Level} + (C : Category l1 l2) + (P : Subcategory l3 l4 C) + where + + subtype-obj-Subcategory : subtype l3 (obj-Category C) + subtype-obj-Subcategory = pr1 P + + obj-Subcategory : UU (l1 ⊔ l3) + obj-Subcategory = type-subtype subtype-obj-Subcategory + + inclusion-obj-Subcategory : obj-Subcategory → obj-Category C + inclusion-obj-Subcategory = inclusion-subtype subtype-obj-Subcategory + + is-in-obj-Subcategory : (x : obj-Category C) → UU l3 + is-in-obj-Subcategory = is-in-subtype subtype-obj-Subcategory + + is-in-obj-inclusion-obj-Subcategory : + (x : obj-Subcategory) → + is-in-obj-Subcategory (inclusion-obj-Subcategory x) + is-in-obj-inclusion-obj-Subcategory = + is-in-subtype-inclusion-subtype subtype-obj-Subcategory + + subtype-hom-Subcategory : + (x y : obj-Category C) → subtype l4 (hom-Category C x y) + subtype-hom-Subcategory = pr1 (pr2 P) + + hom-Subcategory : (x y : obj-Subcategory) → UU (l2 ⊔ l4) + hom-Subcategory = hom-Subprecategory (precategory-Category C) P + + inclusion-hom-Subcategory : + (x y : obj-Subcategory) → + hom-Subcategory x y → + hom-Category C + ( inclusion-obj-Subcategory x) + ( inclusion-obj-Subcategory y) + inclusion-hom-Subcategory = + inclusion-hom-Subprecategory (precategory-Category C) P + + is-in-hom-Subcategory : + (x y : obj-Category C) (f : hom-Category C x y) → UU l4 + is-in-hom-Subcategory x y = is-in-subtype (subtype-hom-Subcategory x y) + + is-in-hom-inclusion-hom-Subcategory : + (x y : obj-Subcategory) (f : hom-Subcategory x y) → + is-in-hom-Subcategory + ( inclusion-obj-Subcategory x) + ( inclusion-obj-Subcategory y) + ( inclusion-hom-Subcategory x y f) + is-in-hom-inclusion-hom-Subcategory = + is-in-hom-inclusion-hom-Subprecategory (precategory-Category C) P + + is-subcategory-Subcategory : + is-subcategory C subtype-obj-Subcategory subtype-hom-Subcategory + is-subcategory-Subcategory = pr2 (pr2 P) + + contains-id-Subcategory : + contains-id-subtype-Category C + ( subtype-obj-Subcategory) + ( subtype-hom-Subcategory) + contains-id-Subcategory = + contains-id-Subprecategory (precategory-Category C) P + + is-closed-under-composition-Subcategory : + is-closed-under-composition-subtype-Category C + ( subtype-obj-Subcategory) + ( subtype-hom-Subcategory) + is-closed-under-composition-Subcategory = + is-closed-under-composition-Subprecategory (precategory-Category C) P +``` + +### The precategory structure of a subcategory + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Category l1 l2) + (P : Subcategory l3 l4 C) + where + + hom-set-Subcategory : (x y : obj-Subcategory C P) → Set (l2 ⊔ l4) + hom-set-Subcategory = hom-set-Subprecategory (precategory-Category C) P + + is-set-hom-Subcategory : + (x y : obj-Subcategory C P) → is-set (hom-Subcategory C P x y) + is-set-hom-Subcategory = is-set-hom-Subprecategory (precategory-Category C) P + + id-hom-Subcategory : + {x : obj-Subcategory C P} → hom-Subcategory C P x x + id-hom-Subcategory {x} = id-hom-Subprecategory (precategory-Category C) P {x} + + comp-hom-Subcategory : + {x y z : obj-Subcategory C P} → + hom-Subcategory C P y z → + hom-Subcategory C P x y → + hom-Subcategory C P x z + comp-hom-Subcategory {x} {y} {z} = + comp-hom-Subprecategory (precategory-Category C) P {x} {y} {z} + + associative-comp-hom-Subcategory : + {x y z w : obj-Subcategory C P} + (h : hom-Subcategory C P z w) + (g : hom-Subcategory C P y z) + (f : hom-Subcategory C P x y) → + ( comp-hom-Subcategory {x} {y} {w} + ( comp-hom-Subcategory {y} {z} {w} h g) f) = + ( comp-hom-Subcategory {x} {z} {w} h + ( comp-hom-Subcategory {x} {y} {z} g f)) + associative-comp-hom-Subcategory = + associative-comp-hom-Subprecategory (precategory-Category C) P + + left-unit-law-comp-hom-Subcategory : + {x y : obj-Subcategory C P} + (f : hom-Subcategory C P x y) → + comp-hom-Subcategory {x} {y} {y} (id-hom-Subcategory {y}) f = f + left-unit-law-comp-hom-Subcategory = + left-unit-law-comp-hom-Subprecategory (precategory-Category C) P + + right-unit-law-comp-hom-Subcategory : + {x y : obj-Subcategory C P} + (f : hom-Subcategory C P x y) → + comp-hom-Subcategory {x} {x} {y} f (id-hom-Subcategory {x}) = f + right-unit-law-comp-hom-Subcategory = + right-unit-law-comp-hom-Subprecategory (precategory-Category C) P + + associative-composition-structure-Subcategory : + associative-composition-structure-Set hom-set-Subcategory + associative-composition-structure-Subcategory = + associative-composition-structure-Subprecategory (precategory-Category C) P + + is-unital-composition-structure-Subcategory : + is-unital-composition-structure-Set + ( hom-set-Subcategory) + ( associative-composition-structure-Subcategory) + is-unital-composition-structure-Subcategory = + is-unital-composition-structure-Subprecategory (precategory-Category C) P + + precategory-Subcategory : Precategory (l1 ⊔ l3) (l2 ⊔ l4) + precategory-Subcategory = + precategory-Subprecategory (precategory-Category C) P +``` + +### The category structure of a subcategory + +### The inclusion functor of a subcategory + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Category l1 l2) + (P : Subcategory l3 l4 C) + where + + inclusion-map-Subcategory : + map-Precategory (precategory-Subcategory C P) (precategory-Category C) + inclusion-map-Subcategory = + inclusion-map-Subprecategory (precategory-Category C) P + + is-functor-inclusion-Subcategory : + is-functor-map-Precategory + ( precategory-Subcategory C P) + ( precategory-Category C) + ( inclusion-map-Subcategory) + is-functor-inclusion-Subcategory = + is-functor-inclusion-Subprecategory (precategory-Category C) P + + inclusion-Subcategory : + functor-Precategory (precategory-Subcategory C P) (precategory-Category C) + inclusion-Subcategory = inclusion-Subprecategory (precategory-Category C) P +``` + +## Properties + +### The inclusion functor is faithful and an embedding on objects + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Category l1 l2) + (P : Subcategory l3 l4 C) + where + + is-faithful-inclusion-Category : + is-faithful-functor-Precategory + ( precategory-Subcategory C P) + ( precategory-Category C) + ( inclusion-Subcategory C P) + is-faithful-inclusion-Category = + is-faithful-inclusion-Subprecategory (precategory-Category C) P + + is-emb-obj-inclusion-Category : + is-emb + ( obj-functor-Precategory + ( precategory-Subcategory C P) + ( precategory-Category C) + ( inclusion-Subcategory C P)) + is-emb-obj-inclusion-Category = + is-emb-obj-inclusion-Subprecategory (precategory-Category C) P + + is-embedding-inclusion-Subcategory : + is-embedding-functor-Precategory + ( precategory-Subcategory C P) + ( precategory-Category C) + ( inclusion-Subcategory C P) + is-embedding-inclusion-Subcategory = + is-embedding-inclusion-Subprecategory (precategory-Category C) P + + embedding-Subcategory : + embedding-Precategory (precategory-Subcategory C P) (precategory-Category C) + embedding-Subcategory = embedding-Subprecategory (precategory-Category C) P +``` diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index 4026e9bfd0..fd0788d762 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -363,22 +363,22 @@ module _ pr2 inclusion-map-Subprecategory {x} {y} = inclusion-hom-Subprecategory C P x y - is-functor-inclusion-map-Subprecategory : + is-functor-inclusion-Subprecategory : is-functor-map-Precategory ( precategory-Subprecategory C P) ( C) ( inclusion-map-Subprecategory) - pr1 is-functor-inclusion-map-Subprecategory g f = refl - pr2 is-functor-inclusion-map-Subprecategory x = refl + pr1 is-functor-inclusion-Subprecategory g f = refl + pr2 is-functor-inclusion-Subprecategory x = refl - inclusion-functor-Subprecategory : + inclusion-Subprecategory : functor-Precategory (precategory-Subprecategory C P) C - pr1 inclusion-functor-Subprecategory = + pr1 inclusion-Subprecategory = inclusion-obj-Subprecategory C P - pr1 (pr2 inclusion-functor-Subprecategory) {x} {y} = + pr1 (pr2 inclusion-Subprecategory) {x} {y} = inclusion-hom-Subprecategory C P x y - pr2 (pr2 inclusion-functor-Subprecategory) = - is-functor-inclusion-map-Subprecategory + pr2 (pr2 inclusion-Subprecategory) = + is-functor-inclusion-Subprecategory ``` ## Properties @@ -392,46 +392,38 @@ module _ (P : Subprecategory l3 l4 C) where - is-faithful-inclusion-map-Subprecategory : - is-faithful-map-Precategory + is-faithful-inclusion-Subprecategory : + is-faithful-functor-Precategory ( precategory-Subprecategory C P) ( C) - ( inclusion-map-Subprecategory C P) - is-faithful-inclusion-map-Subprecategory x y = + ( inclusion-Subprecategory C P) + is-faithful-inclusion-Subprecategory x y = is-emb-inclusion-subtype ( subtype-hom-Subprecategory C P ( inclusion-obj-Subprecategory C P x) ( inclusion-obj-Subprecategory C P y)) - is-faithful-inclusion-functor-Subprecategory : - is-faithful-functor-Precategory - ( precategory-Subprecategory C P) - ( C) - ( inclusion-functor-Subprecategory C P) - is-faithful-inclusion-functor-Subprecategory = - is-faithful-inclusion-map-Subprecategory - - is-emb-obj-inclusion-functor-Subprecategory : + is-emb-obj-inclusion-Subprecategory : is-emb ( obj-functor-Precategory ( precategory-Subprecategory C P) ( C) - ( inclusion-functor-Subprecategory C P)) - is-emb-obj-inclusion-functor-Subprecategory = + ( inclusion-Subprecategory C P)) + is-emb-obj-inclusion-Subprecategory = is-emb-inclusion-subtype (subtype-obj-Subprecategory C P) - is-embedding-inclusion-functor-Subprecategory : + is-embedding-inclusion-Subprecategory : is-embedding-functor-Precategory ( precategory-Subprecategory C P) ( C) - ( inclusion-functor-Subprecategory C P) - pr1 is-embedding-inclusion-functor-Subprecategory = - is-emb-obj-inclusion-functor-Subprecategory - pr2 is-embedding-inclusion-functor-Subprecategory = - is-faithful-inclusion-functor-Subprecategory + ( inclusion-Subprecategory C P) + pr1 is-embedding-inclusion-Subprecategory = + is-emb-obj-inclusion-Subprecategory + pr2 is-embedding-inclusion-Subprecategory = + is-faithful-inclusion-Subprecategory embedding-Subprecategory : embedding-Precategory (precategory-Subprecategory C P) C - pr1 embedding-Subprecategory = inclusion-functor-Subprecategory C P - pr2 embedding-Subprecategory = is-embedding-inclusion-functor-Subprecategory + pr1 embedding-Subprecategory = inclusion-Subprecategory C P + pr2 embedding-Subprecategory = is-embedding-inclusion-Subprecategory ``` From 6a3d946a1353dc5ac2a0dca045f2388074d30e15 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 18 Oct 2023 16:18:10 +0200 Subject: [PATCH 03/89] full maps/functors of precategories --- src/category-theory/categories.lagda.md | 6 +- .../embedding-maps-precategories.lagda.md | 4 +- .../embeddings-precategories.lagda.md | 5 +- .../faithful-maps-precategories.lagda.md | 43 +++++- .../full-functors-precategories.lagda.md | 122 +++++++++++++++++ .../full-maps-precategories.lagda.md | 128 ++++++++++++++++++ .../functors-precategories.lagda.md | 43 +++++- src/category-theory/groupoids.lagda.md | 2 +- src/foundation/surjective-maps.lagda.md | 2 +- 9 files changed, 337 insertions(+), 18 deletions(-) create mode 100644 src/category-theory/full-functors-precategories.lagda.md create mode 100644 src/category-theory/full-maps-precategories.lagda.md diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index c1edb247af..c8614067d7 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -176,7 +176,7 @@ module _ ( is-category-Category C x y) ( is-set-iso-Precategory (precategory-Category C)) - obj-Category-1-Type : 1-Type l1 - pr1 obj-Category-1-Type = obj-Category C - pr2 obj-Category-1-Type = is-1-type-obj-Category + obj-1-type-Category : 1-Type l1 + pr1 obj-1-type-Category = obj-Category C + pr2 obj-1-type-Category = is-1-type-obj-Category ``` diff --git a/src/category-theory/embedding-maps-precategories.lagda.md b/src/category-theory/embedding-maps-precategories.lagda.md index 3b3ea5e582..24ddcab831 100644 --- a/src/category-theory/embedding-maps-precategories.lagda.md +++ b/src/category-theory/embedding-maps-precategories.lagda.md @@ -28,8 +28,8 @@ open import foundation.universe-levels A [map](category-theory.maps-precategories.md) between [precategories](category-theory.precategories.md) `C` and `D` is an **embedding map** if it's an embedding on objects and -[faithful](category-theory.faithful-maps-precategories.md). Hence embedding maps -are maps that are embeddings on objects and hom-sets. +[fully faithful](category-theory.fully-faithful-maps-precategories.md). Hence +embedding maps are maps that are embeddings on objects and hom-sets. Note that for a map of precategories to be called _an embedding_, it must also be a [functor](category-theory.functors-precategories.md). This notion is diff --git a/src/category-theory/embeddings-precategories.lagda.md b/src/category-theory/embeddings-precategories.lagda.md index 1614c05880..30f079e5b5 100644 --- a/src/category-theory/embeddings-precategories.lagda.md +++ b/src/category-theory/embeddings-precategories.lagda.md @@ -27,8 +27,9 @@ open import foundation.universe-levels A [functor](category-theory.functors-precategories.md) between [precategories](category-theory.precategories.md) `C` and `D` is an **embedding** if it's an embedding on objects and -[faithful](category-theory.faithful-functors-precategories.md). Hence embeddings -are functors that are embeddings on objects and hom-sets. +[fully faithful](category-theory.faithful-functors-precategories.md). Hence +embeddings are functors that are embeddings on objects and equivalences on +hom-sets. ## Definition diff --git a/src/category-theory/faithful-maps-precategories.lagda.md b/src/category-theory/faithful-maps-precategories.lagda.md index 644445effd..2cb3135220 100644 --- a/src/category-theory/faithful-maps-precategories.lagda.md +++ b/src/category-theory/faithful-maps-precategories.lagda.md @@ -16,6 +16,7 @@ open import foundation.embeddings open import foundation.equivalences open import foundation.injective-maps open import foundation.propositions +open import foundation.function-types open import foundation.universe-levels ``` @@ -25,7 +26,7 @@ open import foundation.universe-levels A [map](category-theory.maps-precategories.md) between [precategories](category-theory.precategories.md) `C` and `D` is **faithful** if -its an [embedding](foundation-core.embeddings.md) on hom-sets. +it's an [embedding](foundation-core.embeddings.md) on hom-sets. Note that embeddings on [sets](foundation-core.sets.md) happen to coincide with [injections](foundation.injective-maps.md), but we define it in terms of the @@ -56,6 +57,43 @@ module _ pr2 is-faithful-prop-map-Precategory = is-prop-is-faithful-map-Precategory ``` +### The type of faithful maps between two precategories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + where + + faithful-map-Precategory : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) + faithful-map-Precategory = + Σ (map-Precategory C D) (is-faithful-map-Precategory C D) + + map-faithful-map-Precategory : + faithful-map-Precategory → map-Precategory C D + map-faithful-map-Precategory = pr1 + + is-faithful-faithful-map-Precategory : + (F : faithful-map-Precategory) → + is-faithful-map-Precategory C D (map-faithful-map-Precategory F) + is-faithful-faithful-map-Precategory = pr2 + + obj-faithful-map-Precategory : + faithful-map-Precategory → obj-Precategory C → obj-Precategory D + obj-faithful-map-Precategory = + obj-map-Precategory C D ∘ map-faithful-map-Precategory + + hom-faithful-map-Precategory : + (F : faithful-map-Precategory) {x y : obj-Precategory C} → + hom-Precategory C x y → + hom-Precategory D + ( obj-faithful-map-Precategory F x) + ( obj-faithful-map-Precategory F y) + hom-faithful-map-Precategory = + hom-map-Precategory C D ∘ map-faithful-map-Precategory +``` + ### The predicate of being injective on hom-sets on maps between precategories ```agda @@ -80,7 +118,8 @@ module _ ( hom-map-Precategory C D F {x} {y})) is-injective-hom-prop-map-Precategory : Prop (l1 ⊔ l2 ⊔ l4) - pr1 is-injective-hom-prop-map-Precategory = is-injective-hom-map-Precategory + pr1 is-injective-hom-prop-map-Precategory = + is-injective-hom-map-Precategory pr2 is-injective-hom-prop-map-Precategory = is-prop-is-injective-hom-map-Precategory ``` diff --git a/src/category-theory/full-functors-precategories.lagda.md b/src/category-theory/full-functors-precategories.lagda.md new file mode 100644 index 0000000000..689af7dcff --- /dev/null +++ b/src/category-theory/full-functors-precategories.lagda.md @@ -0,0 +1,122 @@ +# Full functors between precategories + +```agda +module category-theory.full-functors-precategories where +``` + +
Imports + +```agda +open import category-theory.full-maps-precategories +open import category-theory.functors-precategories +open import category-theory.isomorphisms-in-precategories +open import category-theory.maps-precategories +open import category-theory.precategories + +open import foundation.dependent-pair-types +open import foundation.embeddings +open import foundation.function-types +open import foundation.equivalences +open import foundation.injective-maps +open import foundation.identity-types +open import foundation.action-on-identifications-functions +open import foundation.propositions +open import foundation.universe-levels +``` + +
+ +## Idea + +A [functor](category-theory.functors-precategories.md) between +[precategories](category-theory.precategories.md) `C` and `D` is **full** if +it's [surjective](foundation-core.surjective-maps.md) on hom-sets. + +## Definition + +### The predicate of being full on functors between precategories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + (F : functor-Precategory C D) + where + + is-full-functor-Precategory : UU (l1 ⊔ l2 ⊔ l4) + is-full-functor-Precategory = + is-full-map-Precategory C D (map-functor-Precategory C D F) + + is-prop-is-full-functor-Precategory : + is-prop is-full-functor-Precategory + is-prop-is-full-functor-Precategory = + is-prop-is-full-map-Precategory C D (map-functor-Precategory C D F) + + is-full-prop-functor-Precategory : Prop (l1 ⊔ l2 ⊔ l4) + is-full-prop-functor-Precategory = + is-full-prop-map-Precategory C D (map-functor-Precategory C D F) +``` + +### The type of full functors between two precategories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + where + + full-functor-Precategory : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) + full-functor-Precategory = + Σ (functor-Precategory C D) (is-full-functor-Precategory C D) + + functor-full-functor-Precategory : + full-functor-Precategory → functor-Precategory C D + functor-full-functor-Precategory = pr1 + + is-full-full-functor-Precategory : + (F : full-functor-Precategory) → + is-full-functor-Precategory C D (functor-full-functor-Precategory F) + is-full-full-functor-Precategory = pr2 + + obj-full-functor-Precategory : + full-functor-Precategory → obj-Precategory C → obj-Precategory D + obj-full-functor-Precategory = + obj-functor-Precategory C D ∘ functor-full-functor-Precategory + + hom-full-functor-Precategory : + (F : full-functor-Precategory) {x y : obj-Precategory C} → + hom-Precategory C x y → + hom-Precategory D + ( obj-full-functor-Precategory F x) + ( obj-full-functor-Precategory F y) + hom-full-functor-Precategory = + hom-functor-Precategory C D ∘ functor-full-functor-Precategory +``` + +### The predicate of being injective on hom-sets on functors between precategories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + (F : functor-Precategory C D) + where + + is-injective-hom-functor-Precategory : UU (l1 ⊔ l2 ⊔ l4) + is-injective-hom-functor-Precategory = + is-injective-hom-map-Precategory C D (map-functor-Precategory C D F) + + is-prop-is-injective-hom-functor-Precategory : + is-prop is-injective-hom-functor-Precategory + is-prop-is-injective-hom-functor-Precategory = + is-prop-is-injective-hom-map-Precategory C D + ( map-functor-Precategory C D F) + + is-injective-hom-prop-functor-Precategory : Prop (l1 ⊔ l2 ⊔ l4) + is-injective-hom-prop-functor-Precategory = + is-injective-hom-prop-map-Precategory C D + ( map-functor-Precategory C D F) +``` diff --git a/src/category-theory/full-maps-precategories.lagda.md b/src/category-theory/full-maps-precategories.lagda.md new file mode 100644 index 0000000000..97626f62c2 --- /dev/null +++ b/src/category-theory/full-maps-precategories.lagda.md @@ -0,0 +1,128 @@ +# Full maps between precategories + +```agda +module category-theory.full-maps-precategories where +``` + +
Imports + +```agda +open import category-theory.functors-precategories +open import category-theory.maps-precategories +open import category-theory.precategories + +open import foundation.dependent-pair-types +open import foundation.embeddings +open import foundation.equivalences +open import foundation.injective-maps +open import foundation.surjective-maps +open import foundation.propositions +open import foundation.function-types +open import foundation.universe-levels +``` + +
+ +## Idea + +A [map](category-theory.maps-precategories.md) between +[precategories](category-theory.precategories.md) `C` and `D` is **full** if +it's a [surjection](foundation.surjective-maps.md) on hom-sets. + +## Definition + +### The predicate of being full on maps between precategories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + (F : map-Precategory C D) + where + + is-full-map-Precategory : UU (l1 ⊔ l2 ⊔ l4) + is-full-map-Precategory = + (x y : obj-Precategory C) → + is-surjective (hom-map-Precategory C D F {x} {y}) + + is-prop-is-full-map-Precategory : is-prop is-full-map-Precategory + is-prop-is-full-map-Precategory = + is-prop-Π² + ( λ x y → is-prop-is-surjective (hom-map-Precategory C D F {x} {y})) + + is-full-prop-map-Precategory : Prop (l1 ⊔ l2 ⊔ l4) + pr1 is-full-prop-map-Precategory = is-full-map-Precategory + pr2 is-full-prop-map-Precategory = is-prop-is-full-map-Precategory +``` + +### The type of full maps between two precategories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + where + + full-map-Precategory : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) + full-map-Precategory = + Σ (map-Precategory C D) (is-full-map-Precategory C D) + + map-full-map-Precategory : + full-map-Precategory → map-Precategory C D + map-full-map-Precategory = pr1 + + is-full-full-map-Precategory : + (F : full-map-Precategory) → + is-full-map-Precategory C D (map-full-map-Precategory F) + is-full-full-map-Precategory = pr2 + + obj-full-map-Precategory : + full-map-Precategory → obj-Precategory C → obj-Precategory D + obj-full-map-Precategory = + obj-map-Precategory C D ∘ map-full-map-Precategory + + hom-full-map-Precategory : + (F : full-map-Precategory) {x y : obj-Precategory C} → + hom-Precategory C x y → + hom-Precategory D + ( obj-full-map-Precategory F x) + ( obj-full-map-Precategory F y) + hom-full-map-Precategory = + hom-map-Precategory C D ∘ map-full-map-Precategory +``` + +### The predicate of being injective on hom-sets on maps between precategories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + (F : map-Precategory C D) + where + + is-injective-hom-map-Precategory : UU (l1 ⊔ l2 ⊔ l4) + is-injective-hom-map-Precategory = + (x y : obj-Precategory C) → is-injective (hom-map-Precategory C D F {x} {y}) + + is-prop-is-injective-hom-map-Precategory : + is-prop is-injective-hom-map-Precategory + is-prop-is-injective-hom-map-Precategory = + is-prop-Π² + ( λ x y → + is-prop-is-injective + ( is-set-hom-Precategory C x y) + ( hom-map-Precategory C D F {x} {y})) + + is-injective-hom-prop-map-Precategory : Prop (l1 ⊔ l2 ⊔ l4) + pr1 is-injective-hom-prop-map-Precategory = + is-injective-hom-map-Precategory + pr2 is-injective-hom-prop-map-Precategory = + is-prop-is-injective-hom-map-Precategory +``` + +## See also + +- [Faithful maps between precategories](category-theory.faithful-maps-precategories.md) diff --git a/src/category-theory/functors-precategories.lagda.md b/src/category-theory/functors-precategories.lagda.md index 9aff6c8219..6093393e93 100644 --- a/src/category-theory/functors-precategories.lagda.md +++ b/src/category-theory/functors-precategories.lagda.md @@ -320,9 +320,9 @@ module _ equiv-htpy-eq-functor-Precategory : (F = G) ≃ htpy-functor-Precategory equiv-htpy-eq-functor-Precategory = - ( equiv-htpy-eq-map-Precategory C D) + ( equiv-htpy-eq-map-Precategory C D ( map-functor-Precategory C D F) - ( map-functor-Precategory C D G) ∘e + ( map-functor-Precategory C D G)) ∘e ( equiv-eq-map-eq-functor-Precategory C D F G) htpy-eq-functor-Precategory : F = G → htpy-functor-Precategory @@ -355,13 +355,23 @@ module _ {x y : obj-Precategory C} where - preserves-is-iso-functor-Precategory : + hom-inv-preserves-is-iso-functor-Precategory : (f : hom-Precategory C x y) → is-iso-Precategory C f → - is-iso-Precategory D (hom-functor-Precategory C D F f) - pr1 (preserves-is-iso-functor-Precategory f is-iso-f) = + hom-Precategory D + ( obj-functor-Precategory C D F y) + ( obj-functor-Precategory C D F x) + hom-inv-preserves-is-iso-functor-Precategory f is-iso-f = hom-functor-Precategory C D F (hom-inv-is-iso-Precategory C is-iso-f) - pr1 (pr2 (preserves-is-iso-functor-Precategory f is-iso-f)) = + + is-right-inv-preserves-is-iso-functor-Precategory : + (f : hom-Precategory C x y) → + (is-iso-f : is-iso-Precategory C f) → + ( comp-hom-Precategory D + ( hom-functor-Precategory C D F f) + ( hom-functor-Precategory C D F (hom-inv-is-iso-Precategory C is-iso-f))) = + ( id-hom-Precategory D) + is-right-inv-preserves-is-iso-functor-Precategory f is-iso-f = ( inv ( preserves-comp-functor-Precategory C D F ( f) @@ -370,7 +380,15 @@ module _ ( hom-functor-Precategory C D F) ( is-section-hom-inv-is-iso-Precategory C is-iso-f)) ∙ ( preserves-id-functor-Precategory C D F y) - pr2 (pr2 (preserves-is-iso-functor-Precategory f is-iso-f)) = + + is-left-inv-preserves-is-iso-functor-Precategory : + (f : hom-Precategory C x y) → + (is-iso-f : is-iso-Precategory C f) → + ( comp-hom-Precategory D + ( hom-functor-Precategory C D F (hom-inv-is-iso-Precategory C is-iso-f)) + ( hom-functor-Precategory C D F f)) = + ( id-hom-Precategory D) + is-left-inv-preserves-is-iso-functor-Precategory f is-iso-f = ( inv ( preserves-comp-functor-Precategory C D F ( hom-inv-is-iso-Precategory C is-iso-f) @@ -380,6 +398,17 @@ module _ ( is-retraction-hom-inv-is-iso-Precategory C is-iso-f)) ∙ ( preserves-id-functor-Precategory C D F x) + preserves-is-iso-functor-Precategory : + (f : hom-Precategory C x y) → + is-iso-Precategory C f → + is-iso-Precategory D (hom-functor-Precategory C D F f) + pr1 (preserves-is-iso-functor-Precategory f is-iso-f) = + hom-inv-preserves-is-iso-functor-Precategory f is-iso-f + pr1 (pr2 (preserves-is-iso-functor-Precategory f is-iso-f)) = + is-right-inv-preserves-is-iso-functor-Precategory f is-iso-f + pr2 (pr2 (preserves-is-iso-functor-Precategory f is-iso-f)) = + is-left-inv-preserves-is-iso-functor-Precategory f is-iso-f + preserves-iso-functor-Precategory : iso-Precategory C x y → iso-Precategory D diff --git a/src/category-theory/groupoids.lagda.md b/src/category-theory/groupoids.lagda.md index e48a614850..74c4bfda09 100644 --- a/src/category-theory/groupoids.lagda.md +++ b/src/category-theory/groupoids.lagda.md @@ -186,7 +186,7 @@ module _ where 1-type-Groupoid : 1-Type l1 - 1-type-Groupoid = obj-Category-1-Type (category-Groupoid G) + 1-type-Groupoid = obj-1-type-Category (category-Groupoid G) ``` #### The groupoid obtained from the 1-type induced by a groupoid `G` is `G` itself diff --git a/src/foundation/surjective-maps.lagda.md b/src/foundation/surjective-maps.lagda.md index ec46eebd71..fa63e6d452 100644 --- a/src/foundation/surjective-maps.lagda.md +++ b/src/foundation/surjective-maps.lagda.md @@ -357,7 +357,7 @@ apply-twice-dependent-universal-property-surj-is-surjective f H C G s = ( f) ( H) ( λ b → C b (f y)) - (λ x → G x y) + ( λ x → G x y) ( s)) ``` From a5dadcab7b5cc729f2f1c9668b22951130320422 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 18 Oct 2023 16:48:35 +0200 Subject: [PATCH 04/89] fully faithful maps of precategories --- src/category-theory.lagda.md | 3 + .../faithful-maps-precategories.lagda.md | 2 +- .../full-functors-precategories.lagda.md | 6 +- .../full-maps-precategories.lagda.md | 4 +- ...fully-faithful-maps-precategories.lagda.md | 209 ++++++++++++++++++ 5 files changed, 218 insertions(+), 6 deletions(-) create mode 100644 src/category-theory/fully-faithful-maps-precategories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index ea0e6f9919..2a8f823db3 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -41,8 +41,11 @@ open import category-theory.equivalences-of-precategories public open import category-theory.exponential-objects-precategories public open import category-theory.faithful-functors-precategories public open import category-theory.faithful-maps-precategories public +open import category-theory.full-functors-precategories public open import category-theory.full-large-subcategories public open import category-theory.full-large-subprecategories public +open import category-theory.full-maps-precategories public +open import category-theory.fully-faithful-maps-precategories public open import category-theory.function-categories public open import category-theory.function-precategories public open import category-theory.functors-categories public diff --git a/src/category-theory/faithful-maps-precategories.lagda.md b/src/category-theory/faithful-maps-precategories.lagda.md index 2cb3135220..fc050d4398 100644 --- a/src/category-theory/faithful-maps-precategories.lagda.md +++ b/src/category-theory/faithful-maps-precategories.lagda.md @@ -14,9 +14,9 @@ open import category-theory.precategories open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.equivalences +open import foundation.function-types open import foundation.injective-maps open import foundation.propositions -open import foundation.function-types open import foundation.universe-levels ``` diff --git a/src/category-theory/full-functors-precategories.lagda.md b/src/category-theory/full-functors-precategories.lagda.md index 689af7dcff..a3a922e4c0 100644 --- a/src/category-theory/full-functors-precategories.lagda.md +++ b/src/category-theory/full-functors-precategories.lagda.md @@ -13,13 +13,13 @@ open import category-theory.isomorphisms-in-precategories open import category-theory.maps-precategories open import category-theory.precategories +open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.embeddings -open import foundation.function-types open import foundation.equivalences -open import foundation.injective-maps +open import foundation.function-types open import foundation.identity-types -open import foundation.action-on-identifications-functions +open import foundation.injective-maps open import foundation.propositions open import foundation.universe-levels ``` diff --git a/src/category-theory/full-maps-precategories.lagda.md b/src/category-theory/full-maps-precategories.lagda.md index 97626f62c2..be84df861c 100644 --- a/src/category-theory/full-maps-precategories.lagda.md +++ b/src/category-theory/full-maps-precategories.lagda.md @@ -14,10 +14,10 @@ open import category-theory.precategories open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.equivalences +open import foundation.function-types open import foundation.injective-maps -open import foundation.surjective-maps open import foundation.propositions -open import foundation.function-types +open import foundation.surjective-maps open import foundation.universe-levels ``` diff --git a/src/category-theory/fully-faithful-maps-precategories.lagda.md b/src/category-theory/fully-faithful-maps-precategories.lagda.md new file mode 100644 index 0000000000..5eea42538d --- /dev/null +++ b/src/category-theory/fully-faithful-maps-precategories.lagda.md @@ -0,0 +1,209 @@ +# Fully faithful maps between precategories + +```agda +module category-theory.fully-faithful-maps-precategories where +``` + +
Imports + +```agda +open import category-theory.faithful-maps-precategories +open import category-theory.full-maps-precategories +open import category-theory.functors-precategories +open import category-theory.maps-precategories +open import category-theory.precategories + +open import foundation.dependent-pair-types +open import foundation.embeddings +open import foundation.equivalences +open import foundation.function-types +open import foundation.injective-maps +open import foundation.propositions +open import foundation.surjective-maps +open import foundation.universe-levels +``` + +
+ +## Idea + +A [map](category-theory.maps-precategories.md) between +[precategories](category-theory.precategories.md) `C` and `D` is **fully +faithful** if it's an [equivalence](foundation-core.equivalences.md) on +hom-sets, or equivalently, a [full](category-theory.full-maps-precategories.md) +and [faithful](category-theory.faithful-maps-precategories.md) map on +precategories. + +## Definition + +### The predicate of being fully faithful on maps between precategories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + (F : map-Precategory C D) + where + + is-fully-faithful-map-Precategory : UU (l1 ⊔ l2 ⊔ l4) + is-fully-faithful-map-Precategory = + (x y : obj-Precategory C) → is-equiv (hom-map-Precategory C D F {x} {y}) + + is-prop-is-fully-faithful-map-Precategory : + is-prop is-fully-faithful-map-Precategory + is-prop-is-fully-faithful-map-Precategory = + is-prop-Π² + ( λ x y → is-property-is-equiv (hom-map-Precategory C D F {x} {y})) + + is-fully-faithful-prop-map-Precategory : Prop (l1 ⊔ l2 ⊔ l4) + pr1 is-fully-faithful-prop-map-Precategory = is-fully-faithful-map-Precategory + pr2 is-fully-faithful-prop-map-Precategory = + is-prop-is-fully-faithful-map-Precategory +``` + +### The type of fully faithful maps between two precategories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + where + + fully-faithful-map-Precategory : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) + fully-faithful-map-Precategory = + Σ (map-Precategory C D) (is-fully-faithful-map-Precategory C D) + + map-fully-faithful-map-Precategory : + fully-faithful-map-Precategory → map-Precategory C D + map-fully-faithful-map-Precategory = pr1 + + is-fully-faithful-fully-faithful-map-Precategory : + (F : fully-faithful-map-Precategory) → + is-fully-faithful-map-Precategory C D (map-fully-faithful-map-Precategory F) + is-fully-faithful-fully-faithful-map-Precategory = pr2 + + obj-fully-faithful-map-Precategory : + fully-faithful-map-Precategory → obj-Precategory C → obj-Precategory D + obj-fully-faithful-map-Precategory = + obj-map-Precategory C D ∘ map-fully-faithful-map-Precategory + + hom-fully-faithful-map-Precategory : + (F : fully-faithful-map-Precategory) {x y : obj-Precategory C} → + hom-Precategory C x y → + hom-Precategory D + ( obj-fully-faithful-map-Precategory F x) + ( obj-fully-faithful-map-Precategory F y) + hom-fully-faithful-map-Precategory = + hom-map-Precategory C D ∘ map-fully-faithful-map-Precategory + + equiv-hom-fully-faithful-map-Precategory : + (F : fully-faithful-map-Precategory) {x y : obj-Precategory C} → + hom-Precategory C x y ≃ + hom-Precategory D + ( obj-fully-faithful-map-Precategory F x) + ( obj-fully-faithful-map-Precategory F y) + pr1 (equiv-hom-fully-faithful-map-Precategory F) = + hom-fully-faithful-map-Precategory F + pr2 (equiv-hom-fully-faithful-map-Precategory F {x} {y}) = + is-fully-faithful-fully-faithful-map-Precategory F x y + + inv-equiv-hom-fully-faithful-map-Precategory : + (F : fully-faithful-map-Precategory) {x y : obj-Precategory C} → + hom-Precategory D + ( obj-fully-faithful-map-Precategory F x) + ( obj-fully-faithful-map-Precategory F y) ≃ + hom-Precategory C x y + inv-equiv-hom-fully-faithful-map-Precategory F = + inv-equiv (equiv-hom-fully-faithful-map-Precategory F) + + map-inv-hom-fully-faithful-map-Precategory : + (F : fully-faithful-map-Precategory) {x y : obj-Precategory C} → + hom-Precategory D + ( obj-fully-faithful-map-Precategory F x) + ( obj-fully-faithful-map-Precategory F y) → + hom-Precategory C x y + map-inv-hom-fully-faithful-map-Precategory F = + map-equiv (inv-equiv-hom-fully-faithful-map-Precategory F) +``` + +## Properties + +### Fully faithful maps of precategories are full and faithful maps + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + (F : map-Precategory C D) + where + + is-full-is-fully-faithful-map-Precategory : + is-fully-faithful-map-Precategory C D F → is-full-map-Precategory C D F + is-full-is-fully-faithful-map-Precategory is-ff-F x y = + is-surjective-is-equiv (is-ff-F x y) + + full-map-is-fully-faithful-map-Precategory : + is-fully-faithful-map-Precategory C D F → full-map-Precategory C D + pr1 (full-map-is-fully-faithful-map-Precategory is-ff-F) = F + pr2 (full-map-is-fully-faithful-map-Precategory is-ff-F) = + is-full-is-fully-faithful-map-Precategory is-ff-F + + is-faithful-is-fully-faithful-map-Precategory : + is-fully-faithful-map-Precategory C D F → is-faithful-map-Precategory C D F + is-faithful-is-fully-faithful-map-Precategory is-ff-F x y = + is-emb-is-equiv (is-ff-F x y) + + faithful-map-is-fully-faithful-map-Precategory : + is-fully-faithful-map-Precategory C D F → faithful-map-Precategory C D + pr1 (faithful-map-is-fully-faithful-map-Precategory is-ff-F) = F + pr2 (faithful-map-is-fully-faithful-map-Precategory is-ff-F) = + is-faithful-is-fully-faithful-map-Precategory is-ff-F + + is-fully-faithful-is-full-is-faithful-map-Precategory : + is-full-map-Precategory C D F → + is-faithful-map-Precategory C D F → + is-fully-faithful-map-Precategory C D F + is-fully-faithful-is-full-is-faithful-map-Precategory + is-full-F is-faithful-F x y = + is-equiv-is-emb-is-surjective (is-full-F x y) (is-faithful-F x y) + + fully-faithful-map-is-full-is-faithful-map-Precategory : + is-full-map-Precategory C D F → + is-faithful-map-Precategory C D F → + fully-faithful-map-Precategory C D + pr1 + ( fully-faithful-map-is-full-is-faithful-map-Precategory + is-full-F is-faithful-F) = + F + pr2 + ( fully-faithful-map-is-full-is-faithful-map-Precategory + is-full-F is-faithful-F) = + is-fully-faithful-is-full-is-faithful-map-Precategory + ( is-full-F) (is-faithful-F) + +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + (F : fully-faithful-map-Precategory C D) + where + + full-map-fully-faithful-map-Precategory : full-map-Precategory C D + full-map-fully-faithful-map-Precategory = + full-map-is-fully-faithful-map-Precategory C D + ( map-fully-faithful-map-Precategory C D F) + ( is-fully-faithful-fully-faithful-map-Precategory C D F) + + faithful-map-fully-faithful-map-Precategory : faithful-map-Precategory C D + faithful-map-fully-faithful-map-Precategory = + faithful-map-is-fully-faithful-map-Precategory C D + ( map-fully-faithful-map-Precategory C D F) + ( is-fully-faithful-fully-faithful-map-Precategory C D F) +``` + +## See also + +- [Fully faithful functors between precategories](category-theory.fully-faithful-functors-precategories.md) From dcfc5d48b895185fb54029bd9a913e567fd71ca2 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 18 Oct 2023 17:12:34 +0200 Subject: [PATCH 05/89] fully faithful functors of precategories --- src/category-theory.lagda.md | 1 + .../faithful-functors-precategories.lagda.md | 42 ++- ...y-faithful-functors-precategories.lagda.md | 337 ++++++++++++++++++ ...fully-faithful-maps-precategories.lagda.md | 37 +- .../functors-precategories.lagda.md | 12 +- src/category-theory/subprecategories.lagda.md | 15 - 6 files changed, 417 insertions(+), 27 deletions(-) create mode 100644 src/category-theory/fully-faithful-functors-precategories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index 2a8f823db3..811245310a 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -45,6 +45,7 @@ open import category-theory.full-functors-precategories public open import category-theory.full-large-subcategories public open import category-theory.full-large-subprecategories public open import category-theory.full-maps-precategories public +open import category-theory.fully-faithful-functors-precategories public open import category-theory.fully-faithful-maps-precategories public open import category-theory.function-categories public open import category-theory.function-precategories public diff --git a/src/category-theory/faithful-functors-precategories.lagda.md b/src/category-theory/faithful-functors-precategories.lagda.md index 06d56f459d..4d93a122e0 100644 --- a/src/category-theory/faithful-functors-precategories.lagda.md +++ b/src/category-theory/faithful-functors-precategories.lagda.md @@ -15,6 +15,7 @@ open import category-theory.precategories open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.equivalences +open import foundation.function-types open import foundation.injective-maps open import foundation.propositions open import foundation.universe-levels @@ -26,7 +27,7 @@ open import foundation.universe-levels A [functor](category-theory.functors-precategories.md) between [precategories](category-theory.precategories.md) `C` and `D` is **faithful** if -its an [embedding](foundation-core.embeddings.md) on hom-sets. +it's an [embedding](foundation-core.embeddings.md) on hom-sets. Note that embeddings on [sets](foundation-core.sets.md) happen to coincide with [injections](foundation.injective-maps.md). However, we define faithful functors @@ -58,7 +59,44 @@ module _ is-faithful-prop-map-Precategory C D (map-functor-Precategory C D F) ``` -### The predicate of being faithful on functors between precategories +### The type of faithful functors between two precategories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + where + + faithful-functor-Precategory : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) + faithful-functor-Precategory = + Σ (functor-Precategory C D) (is-faithful-functor-Precategory C D) + + functor-faithful-functor-Precategory : + faithful-functor-Precategory → functor-Precategory C D + functor-faithful-functor-Precategory = pr1 + + is-faithful-faithful-functor-Precategory : + (F : faithful-functor-Precategory) → + is-faithful-functor-Precategory C D (functor-faithful-functor-Precategory F) + is-faithful-faithful-functor-Precategory = pr2 + + obj-faithful-functor-Precategory : + faithful-functor-Precategory → obj-Precategory C → obj-Precategory D + obj-faithful-functor-Precategory = + obj-functor-Precategory C D ∘ functor-faithful-functor-Precategory + + hom-faithful-functor-Precategory : + (F : faithful-functor-Precategory) {x y : obj-Precategory C} → + hom-Precategory C x y → + hom-Precategory D + ( obj-faithful-functor-Precategory F x) + ( obj-faithful-functor-Precategory F y) + hom-faithful-functor-Precategory = + hom-functor-Precategory C D ∘ functor-faithful-functor-Precategory +``` + +### The predicate of being injective on hom-sets on functors between precategories ```agda module _ diff --git a/src/category-theory/fully-faithful-functors-precategories.lagda.md b/src/category-theory/fully-faithful-functors-precategories.lagda.md new file mode 100644 index 0000000000..03311c0c03 --- /dev/null +++ b/src/category-theory/fully-faithful-functors-precategories.lagda.md @@ -0,0 +1,337 @@ +# Fully faithful functors between precategories + +```agda +module category-theory.fully-faithful-functors-precategories where +``` + +
Imports + +```agda +open import category-theory.faithful-functors-precategories +open import category-theory.full-functors-precategories +open import category-theory.fully-faithful-maps-precategories +open import category-theory.functors-precategories +open import category-theory.isomorphisms-in-precategories +open import category-theory.precategories + +open import foundation.dependent-pair-types +open import foundation.embeddings +open import foundation.equivalences +open import foundation.function-types +open import foundation.injective-maps +open import foundation.propositions +open import foundation.surjective-maps +open import foundation.universe-levels +``` + +
+ +## Idea + +A [functor](category-theory.functors-precategories.md) between +[precategories](category-theory.precategories.md) `C` and `D` is **fully +faithful** if it's an [equivalence](foundation-core.equivalences.md) on +hom-sets, or equivalently, a +[full](category-theory.full-functors-precategories.md) and +[faithful](category-theory.faithful-functors-precategories.md) functor on +precategories. + +## Definition + +### The predicate of being fully faithful on functors between precategories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + (F : functor-Precategory C D) + where + + is-fully-faithful-functor-Precategory : UU (l1 ⊔ l2 ⊔ l4) + is-fully-faithful-functor-Precategory = + is-fully-faithful-map-Precategory C D (map-functor-Precategory C D F) + + is-prop-is-fully-faithful-functor-Precategory : + is-prop is-fully-faithful-functor-Precategory + is-prop-is-fully-faithful-functor-Precategory = + is-prop-is-fully-faithful-map-Precategory C D + ( map-functor-Precategory C D F) + + is-fully-faithful-prop-functor-Precategory : Prop (l1 ⊔ l2 ⊔ l4) + is-fully-faithful-prop-functor-Precategory = + is-fully-faithful-prop-map-Precategory C D + ( map-functor-Precategory C D F) + + equiv-hom-is-fully-faithful-functor-Precategory : + is-fully-faithful-functor-Precategory → {x y : obj-Precategory C} → + hom-Precategory C x y ≃ + hom-Precategory D + ( obj-functor-Precategory C D F x) + ( obj-functor-Precategory C D F y) + equiv-hom-is-fully-faithful-functor-Precategory = + equiv-hom-is-fully-faithful-map-Precategory C D + ( map-functor-Precategory C D F) + + inv-equiv-hom-is-fully-faithful-functor-Precategory : + is-fully-faithful-functor-Precategory → + {x y : obj-Precategory C} → + hom-Precategory D + ( obj-functor-Precategory C D F x) + ( obj-functor-Precategory C D F y) ≃ + hom-Precategory C x y + inv-equiv-hom-is-fully-faithful-functor-Precategory is-ff-F = + inv-equiv (equiv-hom-is-fully-faithful-functor-Precategory is-ff-F) + + map-inv-hom-is-fully-faithful-functor-Precategory : + is-fully-faithful-functor-Precategory → + {x y : obj-Precategory C} → + hom-Precategory D + ( obj-functor-Precategory C D F x) + ( obj-functor-Precategory C D F y) → + hom-Precategory C x y + map-inv-hom-is-fully-faithful-functor-Precategory is-ff-F = + map-equiv (inv-equiv-hom-is-fully-faithful-functor-Precategory is-ff-F) +``` + +### The type of fully faithful functors between two precategories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + where + + fully-faithful-functor-Precategory : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) + fully-faithful-functor-Precategory = + Σ (functor-Precategory C D) (is-fully-faithful-functor-Precategory C D) + + functor-fully-faithful-functor-Precategory : + fully-faithful-functor-Precategory → functor-Precategory C D + functor-fully-faithful-functor-Precategory = pr1 + + is-fully-faithful-fully-faithful-functor-Precategory : + (F : fully-faithful-functor-Precategory) → + is-fully-faithful-functor-Precategory C D + ( functor-fully-faithful-functor-Precategory F) + is-fully-faithful-fully-faithful-functor-Precategory = pr2 + + obj-fully-faithful-functor-Precategory : + fully-faithful-functor-Precategory → obj-Precategory C → obj-Precategory D + obj-fully-faithful-functor-Precategory = + obj-functor-Precategory C D ∘ functor-fully-faithful-functor-Precategory + + hom-fully-faithful-functor-Precategory : + (F : fully-faithful-functor-Precategory) + {x y : obj-Precategory C} → + hom-Precategory C x y → + hom-Precategory D + ( obj-fully-faithful-functor-Precategory F x) + ( obj-fully-faithful-functor-Precategory F y) + hom-fully-faithful-functor-Precategory = + hom-functor-Precategory C D ∘ functor-fully-faithful-functor-Precategory + + equiv-hom-fully-faithful-functor-Precategory : + (F : fully-faithful-functor-Precategory) + {x y : obj-Precategory C} → + hom-Precategory C x y ≃ + hom-Precategory D + ( obj-fully-faithful-functor-Precategory F x) + ( obj-fully-faithful-functor-Precategory F y) + equiv-hom-fully-faithful-functor-Precategory F = + equiv-hom-is-fully-faithful-functor-Precategory C D + ( functor-fully-faithful-functor-Precategory F) + ( is-fully-faithful-fully-faithful-functor-Precategory F) + + inv-equiv-hom-fully-faithful-functor-Precategory : + (F : fully-faithful-functor-Precategory) + {x y : obj-Precategory C} → + hom-Precategory D + ( obj-fully-faithful-functor-Precategory F x) + ( obj-fully-faithful-functor-Precategory F y) ≃ + hom-Precategory C x y + inv-equiv-hom-fully-faithful-functor-Precategory F = + inv-equiv (equiv-hom-fully-faithful-functor-Precategory F) + + map-inv-hom-fully-faithful-functor-Precategory : + (F : fully-faithful-functor-Precategory) + {x y : obj-Precategory C} → + hom-Precategory D + ( obj-fully-faithful-functor-Precategory F x) + ( obj-fully-faithful-functor-Precategory F y) → + hom-Precategory C x y + map-inv-hom-fully-faithful-functor-Precategory F = + map-equiv (inv-equiv-hom-fully-faithful-functor-Precategory F) +``` + +## Properties + +### Fully faithful functors of precategories are full and faithful functors + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + (F : functor-Precategory C D) + where + + is-full-is-fully-faithful-functor-Precategory : + is-fully-faithful-functor-Precategory C D F → + is-full-functor-Precategory C D F + is-full-is-fully-faithful-functor-Precategory is-ff-F x y = + is-surjective-is-equiv (is-ff-F x y) + + full-functor-is-fully-faithful-functor-Precategory : + is-fully-faithful-functor-Precategory C D F → full-functor-Precategory C D + pr1 (full-functor-is-fully-faithful-functor-Precategory is-ff-F) = F + pr2 (full-functor-is-fully-faithful-functor-Precategory is-ff-F) = + is-full-is-fully-faithful-functor-Precategory is-ff-F + + is-faithful-is-fully-faithful-functor-Precategory : + is-fully-faithful-functor-Precategory C D F → + is-faithful-functor-Precategory C D F + is-faithful-is-fully-faithful-functor-Precategory is-ff-F x y = + is-emb-is-equiv (is-ff-F x y) + + faithful-functor-is-fully-faithful-functor-Precategory : + is-fully-faithful-functor-Precategory C D F → + faithful-functor-Precategory C D + pr1 (faithful-functor-is-fully-faithful-functor-Precategory is-ff-F) = F + pr2 (faithful-functor-is-fully-faithful-functor-Precategory is-ff-F) = + is-faithful-is-fully-faithful-functor-Precategory is-ff-F + + is-fully-faithful-is-full-is-faithful-functor-Precategory : + is-full-functor-Precategory C D F → + is-faithful-functor-Precategory C D F → + is-fully-faithful-functor-Precategory C D F + is-fully-faithful-is-full-is-faithful-functor-Precategory + is-full-F is-faithful-F x y = + is-equiv-is-emb-is-surjective (is-full-F x y) (is-faithful-F x y) + + fully-faithful-functor-is-full-is-faithful-functor-Precategory : + is-full-functor-Precategory C D F → + is-faithful-functor-Precategory C D F → + fully-faithful-functor-Precategory C D + pr1 + ( fully-faithful-functor-is-full-is-faithful-functor-Precategory + is-full-F is-faithful-F) = + F + pr2 + ( fully-faithful-functor-is-full-is-faithful-functor-Precategory + is-full-F is-faithful-F) = + is-fully-faithful-is-full-is-faithful-functor-Precategory + ( is-full-F) (is-faithful-F) + +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + (F : fully-faithful-functor-Precategory C D) + where + + full-functor-fully-faithful-functor-Precategory : full-functor-Precategory C D + full-functor-fully-faithful-functor-Precategory = + full-functor-is-fully-faithful-functor-Precategory C D + ( functor-fully-faithful-functor-Precategory C D F) + ( is-fully-faithful-fully-faithful-functor-Precategory C D F) + + faithful-functor-fully-faithful-functor-Precategory : + faithful-functor-Precategory C D + faithful-functor-fully-faithful-functor-Precategory = + faithful-functor-is-fully-faithful-functor-Precategory C D + ( functor-fully-faithful-functor-Precategory C D F) + ( is-fully-faithful-fully-faithful-functor-Precategory C D F) +``` + +### Fully faithful functors reflect isomorphisms + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + (F : functor-Precategory C D) + (is-ff-F : is-fully-faithful-functor-Precategory C D F) + {x y : obj-Precategory C} + where + + -- hom-inv-reflects-is-iso-fully-faithful-functor-Precategory : + -- (f : hom-Precategory C x y) → + -- is-iso-Precategory D (hom-functor-Precategory C D F f) → + -- hom-Precategory C y x + -- hom-inv-reflects-is-iso-fully-faithful-functor-Precategory f is-iso-f = + -- map-inv-hom-fully-faithful-functor-Precategory C D F + -- ( hom-inv-is-iso-Precategory D is-iso-f) + + -- is-right-inv-hom-inv-is-iso-fully-faithful-functor-Precategory : + -- (f : hom-Precategory C x y) → + -- is-iso-Precategory D (hom-fully-faithful-functor-Precategory C D F f) → + -- ( comp-hom-Precategory D + -- ( hom-functor-Precategory C D F f) + -- ( hom-functor-Precategory C D F (hom-inv-is-iso-Precategory C is-iso-f))) = + -- ( id-hom-Precategory D) + -- is-right-inv-hom-inv-is-iso-fully-faithful-functor-Precategory f is-iso-f = ? + -- ( inv + -- ( preserves-comp-functor-Precategory C D F + -- ( f) + -- ( hom-inv-is-iso-Precategory C is-iso-f))) ∙ + -- ( ap + -- ( hom-functor-Precategory C D F) + -- ( is-section-hom-inv-is-iso-Precategory C is-iso-f)) ∙ + -- ( preserves-id-functor-Precategory C D F y) + + -- is-left-inv-hom-inv-is-iso-fully-faithful-functor-Precategory : + -- (f : hom-Precategory C x y) → + -- (is-iso-f : is-iso-Precategory C f) → + -- ( comp-hom-Precategory D + -- ( hom-functor-Precategory C D F (hom-inv-is-iso-Precategory C is-iso-f)) + -- ( hom-functor-Precategory C D F f)) = + -- ( id-hom-Precategory D) + -- is-left-inv-hom-inv-is-iso-fully-faithful-functor-Precategory f is-iso-f = + -- ( inv + -- ( preserves-comp-functor-Precategory C D F + -- ( hom-inv-is-iso-Precategory C is-iso-f) + -- ( f))) ∙ + -- ( ap + -- ( hom-functor-Precategory C D F) + -- ( is-retraction-hom-inv-is-iso-Precategory C is-iso-f)) ∙ + -- ( preserves-id-functor-Precategory C D F x) + + -- preserves-is-iso-fully-faithful-functor-Precategory : + -- (f : hom-Precategory C x y) → + -- is-iso-Precategory C f → + -- is-iso-Precategory D (hom-functor-Precategory C D F f) + -- pr1 (preserves-is-iso-fully-faithful-functor-Precategory f is-iso-f) = + -- hom-inv-is-iso-fully-faithful-functor-Precategory f is-iso-f + -- pr1 (pr2 (preserves-is-iso-fully-faithful-functor-Precategory f is-iso-f)) = + -- is-right-inv-hom-inv-is-iso-fully-faithful-functor-Precategory f is-iso-f + -- pr2 (pr2 (preserves-is-iso-fully-faithful-functor-Precategory f is-iso-f)) = + -- is-left-inv-hom-inv-is-iso-fully-faithful-functor-Precategory f is-iso-f + + -- preserves-iso-fully-faithful-functor-Precategory : + -- iso-Precategory C x y → + -- iso-Precategory D + -- ( obj-functor-Precategory C D F x) + -- ( obj-functor-Precategory C D F y) + -- pr1 (preserves-iso-fully-faithful-functor-Precategory f) = + -- hom-functor-Precategory C D F (hom-iso-Precategory C f) + -- pr2 (preserves-iso-fully-faithful-functor-Precategory f) = + -- preserves-is-iso-fully-faithful-functor-Precategory + -- ( hom-iso-Precategory C f) + -- ( is-iso-iso-Precategory C f) +``` + +### Fully faithful functors induce equivalences of isomorphism sets + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (D : Precategory l3 l4) + (F : functor-Precategory C D) + where + + -- is-equiv-iso-fully-faithful-functor-Precategory : +``` diff --git a/src/category-theory/fully-faithful-maps-precategories.lagda.md b/src/category-theory/fully-faithful-maps-precategories.lagda.md index 5eea42538d..4eb65ec5b1 100644 --- a/src/category-theory/fully-faithful-maps-precategories.lagda.md +++ b/src/category-theory/fully-faithful-maps-precategories.lagda.md @@ -60,6 +60,35 @@ module _ pr1 is-fully-faithful-prop-map-Precategory = is-fully-faithful-map-Precategory pr2 is-fully-faithful-prop-map-Precategory = is-prop-is-fully-faithful-map-Precategory + + equiv-hom-is-fully-faithful-map-Precategory : + is-fully-faithful-map-Precategory → {x y : obj-Precategory C} → + hom-Precategory C x y ≃ + hom-Precategory D + ( obj-map-Precategory C D F x) + ( obj-map-Precategory C D F y) + pr1 (equiv-hom-is-fully-faithful-map-Precategory is-ff-F) = + hom-map-Precategory C D F + pr2 (equiv-hom-is-fully-faithful-map-Precategory is-ff-F {x} {y}) = + is-ff-F x y + + inv-equiv-hom-is-fully-faithful-map-Precategory : + is-fully-faithful-map-Precategory → {x y : obj-Precategory C} → + hom-Precategory D + ( obj-map-Precategory C D F x) + ( obj-map-Precategory C D F y) ≃ + hom-Precategory C x y + inv-equiv-hom-is-fully-faithful-map-Precategory is-ff-F = + inv-equiv (equiv-hom-is-fully-faithful-map-Precategory is-ff-F) + + map-inv-hom-is-fully-faithful-map-Precategory : + is-fully-faithful-map-Precategory → {x y : obj-Precategory C} → + hom-Precategory D + ( obj-map-Precategory C D F x) + ( obj-map-Precategory C D F y) → + hom-Precategory C x y + map-inv-hom-is-fully-faithful-map-Precategory is-ff-F = + map-equiv (inv-equiv-hom-is-fully-faithful-map-Precategory is-ff-F) ``` ### The type of fully faithful maps between two precategories @@ -104,10 +133,10 @@ module _ hom-Precategory D ( obj-fully-faithful-map-Precategory F x) ( obj-fully-faithful-map-Precategory F y) - pr1 (equiv-hom-fully-faithful-map-Precategory F) = - hom-fully-faithful-map-Precategory F - pr2 (equiv-hom-fully-faithful-map-Precategory F {x} {y}) = - is-fully-faithful-fully-faithful-map-Precategory F x y + equiv-hom-fully-faithful-map-Precategory F = + equiv-hom-is-fully-faithful-map-Precategory C D + ( map-fully-faithful-map-Precategory F) + ( is-fully-faithful-fully-faithful-map-Precategory F) inv-equiv-hom-fully-faithful-map-Precategory : (F : fully-faithful-map-Precategory) {x y : obj-Precategory C} → diff --git a/src/category-theory/functors-precategories.lagda.md b/src/category-theory/functors-precategories.lagda.md index 6093393e93..061e652f80 100644 --- a/src/category-theory/functors-precategories.lagda.md +++ b/src/category-theory/functors-precategories.lagda.md @@ -367,10 +367,10 @@ module _ is-right-inv-preserves-is-iso-functor-Precategory : (f : hom-Precategory C x y) → (is-iso-f : is-iso-Precategory C f) → - ( comp-hom-Precategory D + comp-hom-Precategory D ( hom-functor-Precategory C D F f) - ( hom-functor-Precategory C D F (hom-inv-is-iso-Precategory C is-iso-f))) = - ( id-hom-Precategory D) + ( hom-functor-Precategory C D F (hom-inv-is-iso-Precategory C is-iso-f)) = + id-hom-Precategory D is-right-inv-preserves-is-iso-functor-Precategory f is-iso-f = ( inv ( preserves-comp-functor-Precategory C D F @@ -384,10 +384,10 @@ module _ is-left-inv-preserves-is-iso-functor-Precategory : (f : hom-Precategory C x y) → (is-iso-f : is-iso-Precategory C f) → - ( comp-hom-Precategory D + comp-hom-Precategory D ( hom-functor-Precategory C D F (hom-inv-is-iso-Precategory C is-iso-f)) - ( hom-functor-Precategory C D F f)) = - ( id-hom-Precategory D) + ( hom-functor-Precategory C D F f) = + id-hom-Precategory D is-left-inv-preserves-is-iso-functor-Precategory f is-iso-f = ( inv ( preserves-comp-functor-Precategory C D F diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index fd0788d762..a02250f5c9 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -411,19 +411,4 @@ module _ ( inclusion-Subprecategory C P)) is-emb-obj-inclusion-Subprecategory = is-emb-inclusion-subtype (subtype-obj-Subprecategory C P) - - is-embedding-inclusion-Subprecategory : - is-embedding-functor-Precategory - ( precategory-Subprecategory C P) - ( C) - ( inclusion-Subprecategory C P) - pr1 is-embedding-inclusion-Subprecategory = - is-emb-obj-inclusion-Subprecategory - pr2 is-embedding-inclusion-Subprecategory = - is-faithful-inclusion-Subprecategory - - embedding-Subprecategory : - embedding-Precategory (precategory-Subprecategory C P) C - pr1 embedding-Subprecategory = inclusion-Subprecategory C P - pr2 embedding-Subprecategory = is-embedding-inclusion-Subprecategory ``` From c931841e2729dd7911330d4c3200de661aace569 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 18 Oct 2023 17:17:40 +0200 Subject: [PATCH 06/89] fix definition of embeddings of precategories --- .../embedding-maps-precategories.lagda.md | 10 +++--- .../embeddings-precategories.lagda.md | 9 ++--- .../full-functors-precategories.lagda.md | 26 -------------- .../full-maps-precategories.lagda.md | 34 ------------------- 4 files changed, 11 insertions(+), 68 deletions(-) diff --git a/src/category-theory/embedding-maps-precategories.lagda.md b/src/category-theory/embedding-maps-precategories.lagda.md index 24ddcab831..769d6c7ae3 100644 --- a/src/category-theory/embedding-maps-precategories.lagda.md +++ b/src/category-theory/embedding-maps-precategories.lagda.md @@ -7,7 +7,7 @@ module category-theory.embedding-maps-precategories where
Imports ```agda -open import category-theory.faithful-maps-precategories +open import category-theory.fully-faithful-maps-precategories open import category-theory.functors-precategories open import category-theory.maps-precategories open import category-theory.precategories @@ -27,9 +27,11 @@ open import foundation.universe-levels A [map](category-theory.maps-precategories.md) between [precategories](category-theory.precategories.md) `C` and `D` is an **embedding -map** if it's an embedding on objects and +map** if it's an [embedding](foundation-core.embeddings.md) on objects and [fully faithful](category-theory.fully-faithful-maps-precategories.md). Hence -embedding maps are maps that are embeddings on objects and hom-sets. +embedding maps are maps that are embeddings on objects and +[equivalences](foundation-core.equivalences.md) on +hom-[sets](foundation-core.sets.md). Note that for a map of precategories to be called _an embedding_, it must also be a [functor](category-theory.functors-precategories.md). This notion is @@ -52,7 +54,7 @@ module _ is-embedding-map-prop-map-Precategory = prod-Prop ( is-emb-Prop (obj-map-Precategory C D F)) - ( is-faithful-prop-map-Precategory C D F) + ( is-fully-faithful-prop-map-Precategory C D F) is-embedding-map-map-Precategory : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) is-embedding-map-map-Precategory = diff --git a/src/category-theory/embeddings-precategories.lagda.md b/src/category-theory/embeddings-precategories.lagda.md index 30f079e5b5..0159743c45 100644 --- a/src/category-theory/embeddings-precategories.lagda.md +++ b/src/category-theory/embeddings-precategories.lagda.md @@ -26,10 +26,11 @@ open import foundation.universe-levels A [functor](category-theory.functors-precategories.md) between [precategories](category-theory.precategories.md) `C` and `D` is an -**embedding** if it's an embedding on objects and -[fully faithful](category-theory.faithful-functors-precategories.md). Hence -embeddings are functors that are embeddings on objects and equivalences on -hom-sets. +**embedding** if it's an [embedding](foundation-core.embeddings.md) on objects +and [fully faithful](category-theory.fully-faithful-functors-precategories.md). +Hence embeddings are functors that are embeddings on objects and +[equivalences](foundation-core.equivalences.md) on +hom-[sets](foundation-core.sets.md). ## Definition diff --git a/src/category-theory/full-functors-precategories.lagda.md b/src/category-theory/full-functors-precategories.lagda.md index a3a922e4c0..6441ecc9d4 100644 --- a/src/category-theory/full-functors-precategories.lagda.md +++ b/src/category-theory/full-functors-precategories.lagda.md @@ -94,29 +94,3 @@ module _ hom-full-functor-Precategory = hom-functor-Precategory C D ∘ functor-full-functor-Precategory ``` - -### The predicate of being injective on hom-sets on functors between precategories - -```agda -module _ - {l1 l2 l3 l4 : Level} - (C : Precategory l1 l2) - (D : Precategory l3 l4) - (F : functor-Precategory C D) - where - - is-injective-hom-functor-Precategory : UU (l1 ⊔ l2 ⊔ l4) - is-injective-hom-functor-Precategory = - is-injective-hom-map-Precategory C D (map-functor-Precategory C D F) - - is-prop-is-injective-hom-functor-Precategory : - is-prop is-injective-hom-functor-Precategory - is-prop-is-injective-hom-functor-Precategory = - is-prop-is-injective-hom-map-Precategory C D - ( map-functor-Precategory C D F) - - is-injective-hom-prop-functor-Precategory : Prop (l1 ⊔ l2 ⊔ l4) - is-injective-hom-prop-functor-Precategory = - is-injective-hom-prop-map-Precategory C D - ( map-functor-Precategory C D F) -``` diff --git a/src/category-theory/full-maps-precategories.lagda.md b/src/category-theory/full-maps-precategories.lagda.md index be84df861c..ce6acbd0a6 100644 --- a/src/category-theory/full-maps-precategories.lagda.md +++ b/src/category-theory/full-maps-precategories.lagda.md @@ -92,37 +92,3 @@ module _ hom-full-map-Precategory = hom-map-Precategory C D ∘ map-full-map-Precategory ``` - -### The predicate of being injective on hom-sets on maps between precategories - -```agda -module _ - {l1 l2 l3 l4 : Level} - (C : Precategory l1 l2) - (D : Precategory l3 l4) - (F : map-Precategory C D) - where - - is-injective-hom-map-Precategory : UU (l1 ⊔ l2 ⊔ l4) - is-injective-hom-map-Precategory = - (x y : obj-Precategory C) → is-injective (hom-map-Precategory C D F {x} {y}) - - is-prop-is-injective-hom-map-Precategory : - is-prop is-injective-hom-map-Precategory - is-prop-is-injective-hom-map-Precategory = - is-prop-Π² - ( λ x y → - is-prop-is-injective - ( is-set-hom-Precategory C x y) - ( hom-map-Precategory C D F {x} {y})) - - is-injective-hom-prop-map-Precategory : Prop (l1 ⊔ l2 ⊔ l4) - pr1 is-injective-hom-prop-map-Precategory = - is-injective-hom-map-Precategory - pr2 is-injective-hom-prop-map-Precategory = - is-prop-is-injective-hom-map-Precategory -``` - -## See also - -- [Faithful maps between precategories](category-theory.faithful-maps-precategories.md) From 64eb63986b64ff91a2fc2dddadeadc13983049f9 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 18 Oct 2023 17:49:53 +0200 Subject: [PATCH 07/89] preunivalent categories --- src/category-theory.lagda.md | 1 + src/category-theory/categories.lagda.md | 14 +- ...y-faithful-functors-precategories.lagda.md | 42 ++-- .../preunivalent-categories.lagda.md | 219 ++++++++++++++++++ 4 files changed, 255 insertions(+), 21 deletions(-) create mode 100644 src/category-theory/preunivalent-categories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index 811245310a..254ef9b751 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -96,6 +96,7 @@ open import category-theory.precategory-of-maps-from-small-to-large-precategorie open import category-theory.precategory-of-maps-precategories public open import category-theory.pregroupoids public open import category-theory.presheaf-categories public +open import category-theory.preunivalent-categories public open import category-theory.products-in-precategories public open import category-theory.products-of-precategories public open import category-theory.pullbacks-in-precategories public diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index c8614067d7..b6f529c779 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -23,11 +23,15 @@ open import foundation.universe-levels ## Idea -A category in Homotopy Type Theory is a precategory for which the identities -between the objects are the isomorphisms. More specifically, an equality between -objects gives rise to an isomorphism between them, by the J-rule. A precategory -is a category if this function is an equivalence. Note: being a category is a -proposition since `is-equiv` is a proposition. +A **category** in Homotopy Type Theory is a +[precategory](category-theory.precategories.md) for which the +[identifications](foundation-core.identity-types.md) between the objects are the +[isomorphisms](category-theory.isomorphisms-in-precategories.md). More +specifically, an equality between objects gives rise to an isomorphism between +them, by the J-rule. A precategory is a category if this function, called +`iso-eq`, is an [equivalence](foundation-core.equivalences.md). In particular. +being a category is a [proposition](foundation-core.propositions.md) since +`is-equiv` is a proposition. ## Definition diff --git a/src/category-theory/fully-faithful-functors-precategories.lagda.md b/src/category-theory/fully-faithful-functors-precategories.lagda.md index 03311c0c03..51a5e9c5cc 100644 --- a/src/category-theory/fully-faithful-functors-precategories.lagda.md +++ b/src/category-theory/fully-faithful-functors-precategories.lagda.md @@ -14,10 +14,12 @@ open import category-theory.functors-precategories open import category-theory.isomorphisms-in-precategories open import category-theory.precategories +open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.equivalences open import foundation.function-types +open import foundation.identity-types open import foundation.injective-maps open import foundation.propositions open import foundation.surjective-maps @@ -257,22 +259,30 @@ module _ {x y : obj-Precategory C} where - -- hom-inv-reflects-is-iso-fully-faithful-functor-Precategory : - -- (f : hom-Precategory C x y) → - -- is-iso-Precategory D (hom-functor-Precategory C D F f) → - -- hom-Precategory C y x - -- hom-inv-reflects-is-iso-fully-faithful-functor-Precategory f is-iso-f = - -- map-inv-hom-fully-faithful-functor-Precategory C D F - -- ( hom-inv-is-iso-Precategory D is-iso-f) - - -- is-right-inv-hom-inv-is-iso-fully-faithful-functor-Precategory : - -- (f : hom-Precategory C x y) → - -- is-iso-Precategory D (hom-fully-faithful-functor-Precategory C D F f) → - -- ( comp-hom-Precategory D - -- ( hom-functor-Precategory C D F f) - -- ( hom-functor-Precategory C D F (hom-inv-is-iso-Precategory C is-iso-f))) = - -- ( id-hom-Precategory D) - -- is-right-inv-hom-inv-is-iso-fully-faithful-functor-Precategory f is-iso-f = ? + hom-inv-reflects-is-iso-is-fully-faithful-functor-Precategory : + (f : hom-Precategory C x y) → + is-iso-Precategory D (hom-functor-Precategory C D F f) → + hom-Precategory C y x + hom-inv-reflects-is-iso-is-fully-faithful-functor-Precategory f is-iso-Ff = + map-inv-hom-is-fully-faithful-functor-Precategory C D F is-ff-F + ( hom-inv-is-iso-Precategory D is-iso-Ff) + + is-right-inv-hom-inv-is-iso-fully-faithful-functor-Precategory : + (f : hom-Precategory C x y) → + (is-iso-Ff : is-iso-Precategory D (hom-functor-Precategory C D F f)) → + ( comp-hom-Precategory C + ( f) + ( map-inv-hom-is-fully-faithful-functor-Precategory C D F is-ff-F (hom-inv-is-iso-Precategory D is-iso-Ff))) = + ( id-hom-Precategory C) + is-right-inv-hom-inv-is-iso-fully-faithful-functor-Precategory f is-iso-Ff = + equational-reasoning + comp-hom-Precategory C f + ( map-inv-hom-is-fully-faithful-functor-Precategory C D F is-ff-F + ( hom-inv-is-iso-Precategory D is-iso-Ff)) + = {! !} by {! !} + = {! !} by {! !} + = {! !} by {! !} + = id-hom-Precategory C by {! !} -- ( inv -- ( preserves-comp-functor-Precategory C D F -- ( f) diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md new file mode 100644 index 0000000000..2b6d26ef1a --- /dev/null +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -0,0 +1,219 @@ +# Preunivalent categories + +```agda +module category-theory.preunivalent-categories where +``` + +
Imports + +```agda +open import category-theory.isomorphisms-in-precategories +open import category-theory.precategories + +open import foundation.1-types +open import foundation.dependent-pair-types +open import foundation.embeddings +open import foundation.equivalences +open import foundation.identity-types +open import foundation.propositions +open import foundation.sets +open import foundation.universe-levels +``` + +
+ +## Idea + +A **preunivalent category** is a [precategory](category-theory.precategories.md) +for which the [identifications](foundation-core.identity-types.md) between the +objects [embed](foundation-core.embeddings.md) into the +[isomorphisms](category-theory.isomorphisms-in-precategories.md). More +specifically, an equality between objects gives rise to an isomorphism between +them, by the J-rule. A precategory is a category if this function, called +`iso-eq`, is an embedding. In particular. being preunivalent is a +[proposition](foundation-core.propositions.md) since `is-emb` is a proposition. + +The idea of preunivalence is that it is a common generalization univalent +mathematics and mathematics with Axiom K. Hence preunivalent categories +generalize both [categories](category-theory.categories.md) in the sense we have +defined them (as univalent categories), and strict categories, which are +precategories whose objects form a [set](foundation-core.sets.md). + +## Definition + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) + where + + is-preunivalent-prop-Precategory : Prop (l1 ⊔ l2) + is-preunivalent-prop-Precategory = + Π-Prop + ( obj-Precategory C) + ( λ x → + Π-Prop + ( obj-Precategory C) + ( λ y → is-emb-Prop (iso-eq-Precategory C x y))) + + is-preunivalent-Precategory : UU (l1 ⊔ l2) + is-preunivalent-Precategory = type-Prop is-preunivalent-prop-Precategory + +Preunivalent-Category : (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2) +Preunivalent-Category l1 l2 = + Σ (Precategory l1 l2) (is-preunivalent-Precategory) + +module _ + {l1 l2 : Level} (C : Preunivalent-Category l1 l2) + where + + precategory-Preunivalent-Category : Precategory l1 l2 + precategory-Preunivalent-Category = pr1 C + + obj-Preunivalent-Category : UU l1 + obj-Preunivalent-Category = obj-Precategory precategory-Preunivalent-Category + + hom-set-Preunivalent-Category : + obj-Preunivalent-Category → obj-Preunivalent-Category → Set l2 + hom-set-Preunivalent-Category = + hom-set-Precategory precategory-Preunivalent-Category + + hom-Preunivalent-Category : + obj-Preunivalent-Category → obj-Preunivalent-Category → UU l2 + hom-Preunivalent-Category = hom-Precategory precategory-Preunivalent-Category + + is-set-hom-Preunivalent-Category : + (x y : obj-Preunivalent-Category) → is-set (hom-Preunivalent-Category x y) + is-set-hom-Preunivalent-Category = + is-set-hom-Precategory precategory-Preunivalent-Category + + comp-hom-Preunivalent-Category : + {x y z : obj-Preunivalent-Category} → + hom-Preunivalent-Category y z → + hom-Preunivalent-Category x y → + hom-Preunivalent-Category x z + comp-hom-Preunivalent-Category = + comp-hom-Precategory precategory-Preunivalent-Category + + associative-comp-hom-Preunivalent-Category : + {x y z w : obj-Preunivalent-Category} + (h : hom-Preunivalent-Category z w) + (g : hom-Preunivalent-Category y z) + (f : hom-Preunivalent-Category x y) → + comp-hom-Preunivalent-Category (comp-hom-Preunivalent-Category h g) f = + comp-hom-Preunivalent-Category h (comp-hom-Preunivalent-Category g f) + associative-comp-hom-Preunivalent-Category = + associative-comp-hom-Precategory precategory-Preunivalent-Category + + associative-composition-structure-Preunivalent-Category : + associative-composition-structure-Set hom-set-Preunivalent-Category + associative-composition-structure-Preunivalent-Category = + associative-composition-structure-Precategory + ( precategory-Preunivalent-Category) + + id-hom-Preunivalent-Category : + {x : obj-Preunivalent-Category} → hom-Preunivalent-Category x x + id-hom-Preunivalent-Category = + id-hom-Precategory precategory-Preunivalent-Category + + left-unit-law-comp-hom-Preunivalent-Category : + {x y : obj-Preunivalent-Category} (f : hom-Preunivalent-Category x y) → + comp-hom-Preunivalent-Category id-hom-Preunivalent-Category f = f + left-unit-law-comp-hom-Preunivalent-Category = + left-unit-law-comp-hom-Precategory precategory-Preunivalent-Category + + right-unit-law-comp-hom-Preunivalent-Category : + {x y : obj-Preunivalent-Category} (f : hom-Preunivalent-Category x y) → + comp-hom-Preunivalent-Category f id-hom-Preunivalent-Category = f + right-unit-law-comp-hom-Preunivalent-Category = + right-unit-law-comp-hom-Precategory precategory-Preunivalent-Category + + is-unital-composition-structure-Preunivalent-Category : + is-unital-composition-structure-Set + hom-set-Preunivalent-Category + associative-composition-structure-Preunivalent-Category + is-unital-composition-structure-Preunivalent-Category = + is-unital-composition-structure-Precategory + ( precategory-Preunivalent-Category) + + is-preunivalent-Preunivalent-Category : + is-preunivalent-Precategory precategory-Preunivalent-Category + is-preunivalent-Preunivalent-Category = pr2 C +``` + +### Precomposition by a morphism + +```agda +precomp-hom-Preunivalent-Category : + {l1 l2 : Level} (C : Preunivalent-Category l1 l2) + {x y : obj-Preunivalent-Category C} + (f : hom-Preunivalent-Category C x y) + (z : obj-Preunivalent-Category C) → + hom-Preunivalent-Category C y z → + hom-Preunivalent-Category C x z +precomp-hom-Preunivalent-Category C = + precomp-hom-Precategory (precategory-Preunivalent-Category C) +``` + +### Postcomposition by a morphism + +```agda +postcomp-hom-Preunivalent-Category : + {l1 l2 : Level} (C : Preunivalent-Category l1 l2) + {x y : obj-Preunivalent-Category C} + (f : hom-Preunivalent-Category C x y) + (z : obj-Preunivalent-Category C) → + hom-Preunivalent-Category C z x → + hom-Preunivalent-Category C z y +postcomp-hom-Preunivalent-Category C = + postcomp-hom-Precategory (precategory-Preunivalent-Category C) +``` + +### Equalities give rise to homomorphisms + +```agda +module _ + {l1 l2 : Level} + (C : Preunivalent-Category l1 l2) + where + + hom-eq-Preunivalent-Category : + (x y : obj-Preunivalent-Category C) → + x = y → hom-Preunivalent-Category C x y + hom-eq-Preunivalent-Category = + hom-eq-Precategory (precategory-Preunivalent-Category C) + + hom-inv-eq-Preunivalent-Category : + (x y : obj-Preunivalent-Category C) → + x = y → hom-Preunivalent-Category C y x + hom-inv-eq-Preunivalent-Category = + hom-inv-eq-Precategory (precategory-Preunivalent-Category C) +``` + +## Properties + +### The objects in a category form a 1-type + +The type of identities between two objects in a preunivalent category embeds +into the type of isomorphisms between them. But this type is a set, and thus the +identity type is a set. + +```agda +module _ + {l1 l2 : Level} (C : Preunivalent-Category l1 l2) + where + + is-1-type-obj-Preunivalent-Category : is-1-type (obj-Preunivalent-Category C) + is-1-type-obj-Preunivalent-Category x y = + is-set-is-emb + ( iso-eq-Precategory (precategory-Preunivalent-Category C) x y) + ( is-preunivalent-Preunivalent-Category C x y) + ( is-set-iso-Precategory (precategory-Preunivalent-Category C)) + + obj-1-type-Preunivalent-Category : 1-Type l1 + pr1 obj-1-type-Preunivalent-Category = obj-Preunivalent-Category C + pr2 obj-1-type-Preunivalent-Category = is-1-type-obj-Preunivalent-Category +``` + +## See also + +- [Axiom L](foundation.axiom-l.md) From 6e71dba122ce6780235f19017ea21aae7629cb59 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 18 Oct 2023 17:55:02 +0200 Subject: [PATCH 08/89] `is-emb-htpy-emb` --- src/foundation/embeddings.lagda.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/foundation/embeddings.lagda.md b/src/foundation/embeddings.lagda.md index 8d29fe181e..164cb2a70c 100644 --- a/src/foundation/embeddings.lagda.md +++ b/src/foundation/embeddings.lagda.md @@ -55,12 +55,12 @@ module _ ```agda module _ - {l1 l2 : Level} {A : UU l1} {B : UU l2} {f g : A → B} (H : f ~ g) + {l1 l2 : Level} {A : UU l1} {B : UU l2} where abstract - is-emb-htpy : is-emb g → is-emb f - is-emb-htpy is-emb-g x y = + is-emb-htpy : {f g : A → B} (H : f ~ g) → is-emb g → is-emb f + is-emb-htpy {f} {g} H is-emb-g x y = is-equiv-top-is-equiv-left-square ( ap g) ( concat' (f x) (H y)) @@ -71,14 +71,21 @@ module _ ( is-emb-g x y) ( is-equiv-concat' (f x) (H y)) + + is-emb-htpy-emb : {f : A → B} (e : A ↪ B) → f ~ map-emb e → is-emb f + is-emb-htpy-emb e H = is-emb-htpy H (is-emb-map-emb e) + module _ - {l1 l2 : Level} {A : UU l1} {B : UU l2} {f g : A → B} (H : f ~ g) + {l1 l2 : Level} {A : UU l1} {B : UU l2} where abstract - is-emb-htpy' : is-emb f → is-emb g - is-emb-htpy' is-emb-f = - is-emb-htpy (inv-htpy H) is-emb-f + is-emb-htpy' : {f g : A → B} (H : f ~ g) → is-emb f → is-emb g + is-emb-htpy' H is-emb-f = is-emb-htpy (inv-htpy H) is-emb-f + + is-emb-htpy-emb' : (e : A ↪ B) {g : A → B} → map-emb e ~ g → is-emb g + is-emb-htpy-emb' e H = is-emb-htpy' H (is-emb-map-emb e) + ``` ### Any map between propositions is an embedding From 53b650069526d7abbbf3b0bef9cf875494f4becb Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 18 Oct 2023 18:01:27 +0200 Subject: [PATCH 09/89] wip subcategories are preunivalent --- src/category-theory/subcategories.lagda.md | 37 +++++++++++++++------- src/foundation/embeddings.lagda.md | 5 +-- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index 418a611c76..5587d9514a 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -12,13 +12,17 @@ open import category-theory.embeddings-precategories open import category-theory.faithful-functors-precategories open import category-theory.functors-categories open import category-theory.functors-precategories +open import category-theory.isomorphisms-in-categories open import category-theory.maps-categories open import category-theory.maps-precategories open import category-theory.precategories +open import category-theory.preunivalent-categories open import category-theory.subprecategories open import foundation.dependent-pair-types open import foundation.embeddings +open import foundation.equivalences +open import foundation.homotopies open import foundation.identity-types open import foundation.propositions open import foundation.sets @@ -262,8 +266,6 @@ module _ precategory-Subprecategory (precategory-Category C) P ``` -### The category structure of a subcategory - ### The inclusion functor of a subcategory ```agda @@ -318,16 +320,27 @@ module _ ( inclusion-Subcategory C P)) is-emb-obj-inclusion-Category = is-emb-obj-inclusion-Subprecategory (precategory-Category C) P +``` - is-embedding-inclusion-Subcategory : - is-embedding-functor-Precategory - ( precategory-Subcategory C P) - ( precategory-Category C) - ( inclusion-Subcategory C P) - is-embedding-inclusion-Subcategory = - is-embedding-inclusion-Subprecategory (precategory-Category C) P +### Subcategories are preunivalent + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Category l1 l2) + (P : Subcategory l3 l4 C) + where - embedding-Subcategory : - embedding-Precategory (precategory-Subcategory C P) (precategory-Category C) - embedding-Subcategory = embedding-Subprecategory (precategory-Category C) P + is-preunivalent-Subcategory : + is-preunivalent-Precategory (precategory-Subcategory C P) + is-preunivalent-Subcategory x y = + is-emb-htpy-emb + ( comp-emb + {! !} + ( emb-equiv + ( ( extensionality-obj-Category C + ( inclusion-obj-Subcategory C P x) + ( inclusion-obj-Subcategory C P y)) ∘e + ( equiv-ap-inclusion-subtype (subtype-obj-Subcategory C P))))) + {! !} ``` diff --git a/src/foundation/embeddings.lagda.md b/src/foundation/embeddings.lagda.md index 164cb2a70c..96e6d3002f 100644 --- a/src/foundation/embeddings.lagda.md +++ b/src/foundation/embeddings.lagda.md @@ -114,14 +114,15 @@ module _ abstract is-emb-comp-htpy : - (f : A → C) (g : B → C) (h : A → B) (H : f ~ (g ∘ h)) → is-emb g → + (f : A → C) (g : B → C) (h : A → B) (H : f ~ g ∘ h) → is-emb g → is-emb h → is-emb f is-emb-comp-htpy f g h H is-emb-g is-emb-h = is-emb-htpy H (is-emb-comp g h is-emb-g is-emb-h) comp-emb : (B ↪ C) → (A ↪ B) → (A ↪ C) - comp-emb (pair g H) (pair f K) = pair (g ∘ f) (is-emb-comp g f H K) + pr1 (comp-emb (g , H) (f , K)) = g ∘ f + pr2 (comp-emb (g , H) (f , K)) = is-emb-comp g f H K ``` ### The right factor of a composed embedding is an embedding From 8438206a2d5d24140c1254da87844a541e35f2f2 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 18 Oct 2023 19:23:21 +0200 Subject: [PATCH 10/89] `is-contr-total-iso-Category` --- .../isomorphisms-in-categories.lagda.md | 24 +++++++++++++++++++ .../isomorphisms-in-large-categories.lagda.md | 10 +++++++- .../equivalence-induction.lagda.md | 5 ++-- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/category-theory/isomorphisms-in-categories.lagda.md b/src/category-theory/isomorphisms-in-categories.lagda.md index e933292744..60788a02ab 100644 --- a/src/category-theory/isomorphisms-in-categories.lagda.md +++ b/src/category-theory/isomorphisms-in-categories.lagda.md @@ -15,6 +15,8 @@ open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.equivalences open import foundation.identity-types +open import foundation.contractible-types +open import foundation.functoriality-dependent-pair-types open import foundation.propositions open import foundation.sets open import foundation.universe-levels @@ -648,6 +650,28 @@ module _ eq-iso-Category (iso-eq-Category C x y p) = p is-retraction-eq-iso-Category {x} {y} = is-retraction-map-inv-equiv (extensionality-obj-Category x y) + +module _ + {l1 l2 : Level} + (C : Category l1 l2) + (X : obj-Category C) + where + + is-contr-total-iso-Category : + is-contr (Σ (obj-Category C) (iso-Category C X)) + is-contr-total-iso-Category = + is-contr-equiv' + ( Σ (obj-Category C) (X =_)) + ( equiv-tot (extensionality-obj-Category C X)) + ( is-contr-total-path X) + + is-contr-total-iso-Category' : + is-contr (Σ (obj-Category C) (λ Y → iso-Category C Y X)) + is-contr-total-iso-Category' = + is-contr-equiv' + ( Σ (obj-Category C) (_= X)) + ( equiv-tot (λ Y → extensionality-obj-Category C Y X)) + ( is-contr-total-path' X) ``` ### Functoriality of `eq-iso` diff --git a/src/category-theory/isomorphisms-in-large-categories.lagda.md b/src/category-theory/isomorphisms-in-large-categories.lagda.md index ed9e200e45..af9003a2ff 100644 --- a/src/category-theory/isomorphisms-in-large-categories.lagda.md +++ b/src/category-theory/isomorphisms-in-large-categories.lagda.md @@ -195,9 +195,17 @@ module _ is-contr (Σ (obj-Large-Category C l1) (iso-Large-Category C X)) is-contr-total-iso-Large-Category = is-contr-equiv' - ( Σ (obj-Large-Category C l1) (λ Y → X = Y)) + ( Σ (obj-Large-Category C l1) (X =_)) ( equiv-tot (extensionality-obj-Large-Category C X)) ( is-contr-total-path X) + + is-contr-total-iso-Large-Category' : + is-contr (Σ (obj-Large-Category C l1) (λ Y → iso-Large-Category C Y X)) + is-contr-total-iso-Large-Category' = + is-contr-equiv' + ( Σ (obj-Large-Category C l1) (_= X)) + ( equiv-tot (λ Y → extensionality-obj-Large-Category C Y X)) + ( is-contr-total-path' X) ``` ## Properties diff --git a/src/foundation-core/equivalence-induction.lagda.md b/src/foundation-core/equivalence-induction.lagda.md index ce2e4826d6..2ae66c1b19 100644 --- a/src/foundation-core/equivalence-induction.lagda.md +++ b/src/foundation-core/equivalence-induction.lagda.md @@ -66,8 +66,9 @@ module _ ( pair A id-equiv) ( pair ( pair A id-equiv) - ( λ t → ( inv (contraction c (pair A id-equiv))) ∙ - ( contraction c t))) + ( λ t → + ( inv (contraction c (pair A id-equiv))) ∙ + ( contraction c t))) ( P)) ``` From e1c119a539a35b9b77edea5c362c8539294a9c6a Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 18 Oct 2023 19:35:02 +0200 Subject: [PATCH 11/89] remove repeat theorems `equivalence-induction` --- .../equivalence-induction.lagda.md | 92 ------------------- src/foundation/equivalence-induction.lagda.md | 15 +++ 2 files changed, 15 insertions(+), 92 deletions(-) delete mode 100644 src/foundation-core/equivalence-induction.lagda.md diff --git a/src/foundation-core/equivalence-induction.lagda.md b/src/foundation-core/equivalence-induction.lagda.md deleted file mode 100644 index 2ae66c1b19..0000000000 --- a/src/foundation-core/equivalence-induction.lagda.md +++ /dev/null @@ -1,92 +0,0 @@ -# Equivalence induction - -```agda -module foundation-core.equivalence-induction where -``` - -
Imports - -```agda -open import foundation.dependent-pair-types -open import foundation.universe-levels - -open import foundation-core.contractible-types -open import foundation-core.equivalences -open import foundation-core.function-types -open import foundation-core.homotopies -open import foundation-core.identity-types -open import foundation-core.sections -open import foundation-core.singleton-induction -``` - -
- -## Idea - -Equivalence induction is a condition equivalent to the univalence axiom - -## Properties - -```agda -module _ - {l1 : Level} {A : UU l1} - where - - ev-id : - { l : Level} (P : (B : UU l1) → (A ≃ B) → UU l) → - ( (B : UU l1) (e : A ≃ B) → P B e) → P A id-equiv - ev-id P f = f A id-equiv - - IND-EQUIV : - {l : Level} (P : (B : UU l1) (e : A ≃ B) → UU l) → UU (lsuc l1 ⊔ l) - IND-EQUIV P = section (ev-id P) - - triangle-ev-id : - { l : Level} - ( P : (Σ (UU l1) (λ X → A ≃ X)) → UU l) → - ( ev-point (pair A id-equiv) {P}) ~ - ( ( ev-id (λ X e → P (pair X e))) ∘ - ( ev-pair {A = UU l1} {B = λ X → A ≃ X} {C = P})) - triangle-ev-id P f = refl -``` - -### Contractibility of the total space of equivalences implies equivalence induction - -```agda - abstract - IND-EQUIV-is-contr-total-equiv : - is-contr (Σ (UU l1) (λ X → A ≃ X)) → - {l : Level} → - (P : (Σ (UU l1) (λ X → A ≃ X)) → UU l) → IND-EQUIV (λ B e → P (pair B e)) - IND-EQUIV-is-contr-total-equiv c P = - section-left-factor - ( ev-id (λ X e → P (pair X e))) - ( ev-pair) - ( is-singleton-is-contr - ( pair A id-equiv) - ( pair - ( pair A id-equiv) - ( λ t → - ( inv (contraction c (pair A id-equiv))) ∙ - ( contraction c t))) - ( P)) -``` - -### Equivalence induction implies contractibility of the total space of equivalences - -```agda - abstract - is-contr-total-equiv-IND-EQUIV : - ( {l : Level} (P : (Σ (UU l1) (λ X → A ≃ X)) → UU l) → - IND-EQUIV (λ B e → P (pair B e))) → - is-contr (Σ (UU l1) (λ X → A ≃ X)) - is-contr-total-equiv-IND-EQUIV ind = - is-contr-is-singleton - ( Σ (UU l1) (λ X → A ≃ X)) - ( pair A id-equiv) - ( λ P → section-comp - ( ev-id (λ X e → P (pair X e))) - ( ev-pair {A = UU l1} {B = λ X → A ≃ X} {C = P}) - ( pair ind-Σ refl-htpy) - ( ind P)) -``` diff --git a/src/foundation/equivalence-induction.lagda.md b/src/foundation/equivalence-induction.lagda.md index 31f049238c..a134cca402 100644 --- a/src/foundation/equivalence-induction.lagda.md +++ b/src/foundation/equivalence-induction.lagda.md @@ -115,6 +115,21 @@ module _ {l1 : Level} {A : UU l1} where + abstract + is-contr-total-equiv-induction-principle-equivalences : + ( {l : Level} (P : (Σ (UU l1) (λ X → A ≃ X)) → UU l) → + induction-principle-equivalences (λ B e → P (B , e))) → + is-contr (Σ (UU l1) (λ X → A ≃ X)) + is-contr-total-equiv-induction-principle-equivalences ind = + is-contr-is-singleton + ( Σ (UU l1) (λ X → A ≃ X)) + ( A , id-equiv) + ( λ P → section-comp + ( ev-id-equiv (λ X e → P (X , e))) + ( ev-pair {A = UU l1} {B = λ X → A ≃ X} {C = P}) + ( ind-Σ , refl-htpy) + ( ind P)) + abstract is-contr-total-is-identity-system-equiv : ( {l : Level} → is-identity-system l (λ X → A ≃ X) A id-equiv) → From 0c762b5866348952bf8a550e34885b9c78299b4f Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 18 Oct 2023 20:10:17 +0200 Subject: [PATCH 12/89] isomorphism induction --- src/category-theory.lagda.md | 1 + .../isomorphism-induction-categories.lagda.md | 177 ++++++++++++++++++ .../isomorphisms-in-categories.lagda.md | 4 +- src/foundation-core.lagda.md | 1 - src/foundation/embeddings.lagda.md | 2 - src/foundation/equivalence-induction.lagda.md | 12 +- 6 files changed, 185 insertions(+), 12 deletions(-) create mode 100644 src/category-theory/isomorphism-induction-categories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index 254ef9b751..341b80e374 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -59,6 +59,7 @@ open import category-theory.homotopies-natural-transformations-large-precategori open import category-theory.initial-objects-large-categories public open import category-theory.initial-objects-large-precategories public open import category-theory.initial-objects-precategories public +open import category-theory.isomorphism-induction-categories public open import category-theory.isomorphisms-in-categories public open import category-theory.isomorphisms-in-large-categories public open import category-theory.isomorphisms-in-large-precategories public diff --git a/src/category-theory/isomorphism-induction-categories.lagda.md b/src/category-theory/isomorphism-induction-categories.lagda.md new file mode 100644 index 0000000000..8048075196 --- /dev/null +++ b/src/category-theory/isomorphism-induction-categories.lagda.md @@ -0,0 +1,177 @@ +# Isomorphism induction in categories + +```agda +module category-theory.isomorphism-induction-categories where +``` + +
Imports + +```agda +open import category-theory.categories +open import category-theory.isomorphisms-in-categories + +open import foundation.contractible-types +open import foundation.dependent-pair-types +open import foundation.identity-systems +open import foundation.subuniverses +open import foundation.univalence +open import foundation.universal-property-dependent-pair-types +open import foundation.universe-levels + +open import foundation-core.commuting-triangles-of-maps +open import foundation-core.contractible-maps +open import foundation-core.equivalences +open import foundation-core.function-types +open import foundation-core.homotopies +open import foundation-core.identity-types +open import foundation-core.sections +open import foundation-core.singleton-induction +``` + +
+ +## Idea + +**Isomorphism induction** is the principle asserting that for any type family + +```text + P : (B : 𝒞) (ϕ : A ≅ B) → 𝒰 +``` + +of types indexed by all [isomorphisms](foundation.equivalences.md) with domain +`A`, there is a [section](foundation.sections.md) of the evaluation map + +```text + ((B : 𝒞) (ϕ : A ≅ B) → P B ϕ) → P A id-iso. +``` + +The principle of isomorphism induction is equivalent to the univalence axiom for +categories. + +## Statement + +```agda +module _ + {l1 l2 : Level} (C : Category l1 l2) {A : obj-Category C} + where + + ev-id-iso-Category : + {l : Level} (P : (B : obj-Category C) → (iso-Category C A B) → UU l) → + ((B : obj-Category C) (e : iso-Category C A B) → P B e) → P A (id-iso-Category C) + ev-id-iso-Category P f = f A (id-iso-Category C) + + induction-principle-iso-Category : + {l : Level} (P : (B : obj-Category C) (e : iso-Category C A B) → UU l) → UU (l1 ⊔ l2 ⊔ l) + induction-principle-iso-Category P = section (ev-id-iso-Category P) + + triangle-ev-id-iso-Category : + {l : Level} + (P : (Σ (obj-Category C) (iso-Category C A)) → UU l) → + coherence-triangle-maps + ( ev-point (A , id-iso-Category C) {P}) + ( ev-id-iso-Category (λ X e → P (X , e))) + ( ev-pair {A = obj-Category C} {B = iso-Category C A} {C = P}) + triangle-ev-id-iso-Category P f = refl +``` + +## Properties + +### Contractibility of the total space of isomorphisms implies isomorphism induction + +```agda +module _ + {l1 l2 : Level} (C : Category l1 l2) {A : obj-Category C} + where + + abstract + induction-principle-iso-is-contr-total-iso-Category : + is-contr (Σ (obj-Category C) (iso-Category C A)) → + {l : Level} → + (P : (Σ (obj-Category C) (iso-Category C A)) → UU l) → + induction-principle-iso-Category C (λ B e → P (B , e)) + induction-principle-iso-is-contr-total-iso-Category c P = + section-left-factor + ( ev-id-iso-Category C (λ X e → P (X , e))) + ( ev-pair) + ( is-singleton-is-contr + ( A , id-iso-Category C) + ( ( A , id-iso-Category C) , + ( λ t → + inv (contraction c (A , id-iso-Category C)) ∙ contraction c t)) + ( P)) +``` + +### Isomorphism induction implies contractibility of the total space of isomorphisms + +```agda +module _ + {l1 l2 : Level} (C : Category l1 l2) {A : obj-Category C} + where + + abstract + is-contr-total-equiv-induction-principle-iso-Category : + ( {l : Level} (P : (Σ (obj-Category C) (iso-Category C A)) → UU l) → + induction-principle-iso-Category C (λ B e → P (B , e))) → + is-contr (Σ (obj-Category C) (iso-Category C A)) + is-contr-total-equiv-induction-principle-iso-Category ind = + is-contr-is-singleton + ( Σ (obj-Category C) (iso-Category C A)) + ( A , id-iso-Category C) + ( λ P → section-comp + ( ev-id-iso-Category C (λ X e → P (X , e))) + ( ev-pair {A = obj-Category C} {B = iso-Category C A} {C = P}) + ( ind-Σ , refl-htpy) + ( ind P)) +``` + +### Isomorphism induction in a universe + +```agda +module _ + {l1 l2 l3 : Level} (C : Category l1 l2) {A : obj-Category C} + (P : (B : obj-Category C) (e : iso-Category C A B) → UU l3) + where + + abstract + is-identity-system-iso-Category : section (ev-id-iso-Category C P) + is-identity-system-iso-Category = + induction-principle-iso-is-contr-total-iso-Category C + ( is-contr-total-iso-Category C _) + ( λ t → P (pr1 t) (pr2 t)) + + ind-iso-Category : + P A (id-iso-Category C) → + {B : obj-Category C} (e : iso-Category C A B) → P B e + ind-iso-Category p {B} = pr1 is-identity-system-iso-Category p B + + compute-ind-iso-Category : + (u : P A (id-iso-Category C)) → ind-iso-Category u (id-iso-Category C) = u + compute-ind-iso-Category = pr2 is-identity-system-iso-Category +``` + +### The evaluation map `ev-id-iso-Category` is an equivalence + +```agda +module _ + {l1 l2 l3 : Level} (C : Category l1 l2) {A : obj-Category C} + (P : (B : obj-Category C) (e : iso-Category C A B) → UU l3) + where + + is-equiv-ev-id-iso-Category : is-equiv (ev-id-iso-Category C P) + is-equiv-ev-id-iso-Category = + is-equiv-left-factor-htpy + ( ev-point (A , id-iso-Category C)) + ( ev-id-iso-Category C P) + ( ev-pair) + ( triangle-ev-id-iso-Category C (λ u → P (pr1 u) (pr2 u))) + ( dependent-universal-property-contr-is-contr + ( A , id-iso-Category C) + ( is-contr-total-iso-Category C A) + ( λ u → P (pr1 u) (pr2 u))) + ( is-equiv-ev-pair) + + is-contr-map-ev-id-iso-Category : + is-contr-map (ev-id-iso-Category C P) + is-contr-map-ev-id-iso-Category = + is-contr-map-is-equiv is-equiv-ev-id-iso-Category +``` diff --git a/src/category-theory/isomorphisms-in-categories.lagda.md b/src/category-theory/isomorphisms-in-categories.lagda.md index 60788a02ab..5ccd19595c 100644 --- a/src/category-theory/isomorphisms-in-categories.lagda.md +++ b/src/category-theory/isomorphisms-in-categories.lagda.md @@ -12,11 +12,11 @@ open import category-theory.isomorphisms-in-precategories open import foundation.action-on-identifications-binary-functions open import foundation.action-on-identifications-functions +open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.equivalences -open import foundation.identity-types -open import foundation.contractible-types open import foundation.functoriality-dependent-pair-types +open import foundation.identity-types open import foundation.propositions open import foundation.sets open import foundation.universe-levels diff --git a/src/foundation-core.lagda.md b/src/foundation-core.lagda.md index cd39ca220d..aeb5a4f4cb 100644 --- a/src/foundation-core.lagda.md +++ b/src/foundation-core.lagda.md @@ -22,7 +22,6 @@ open import foundation-core.embeddings public open import foundation-core.empty-types public open import foundation-core.endomorphisms public open import foundation-core.equality-dependent-pair-types public -open import foundation-core.equivalence-induction public open import foundation-core.equivalence-relations public open import foundation-core.equivalences public open import foundation-core.fibers-of-maps public diff --git a/src/foundation/embeddings.lagda.md b/src/foundation/embeddings.lagda.md index 96e6d3002f..d986629c83 100644 --- a/src/foundation/embeddings.lagda.md +++ b/src/foundation/embeddings.lagda.md @@ -71,7 +71,6 @@ module _ ( is-emb-g x y) ( is-equiv-concat' (f x) (H y)) - is-emb-htpy-emb : {f : A → B} (e : A ↪ B) → f ~ map-emb e → is-emb f is-emb-htpy-emb e H = is-emb-htpy H (is-emb-map-emb e) @@ -85,7 +84,6 @@ module _ is-emb-htpy-emb' : (e : A ↪ B) {g : A → B} → map-emb e ~ g → is-emb g is-emb-htpy-emb' e H = is-emb-htpy' H (is-emb-map-emb e) - ``` ### Any map between propositions is an embedding diff --git a/src/foundation/equivalence-induction.lagda.md b/src/foundation/equivalence-induction.lagda.md index a134cca402..5ea3b1be33 100644 --- a/src/foundation/equivalence-induction.lagda.md +++ b/src/foundation/equivalence-induction.lagda.md @@ -81,9 +81,7 @@ module _ ## Properties -### Equivalence induction is equivalent to the contractibility of the total space of equivalences - -#### Contractibility of the total space of equivalences implies equivalence induction +### Contractibility of the total space of equivalences implies equivalence induction ```agda module _ @@ -91,12 +89,12 @@ module _ where abstract - is-identity-system-is-contr-total-equiv : + induction-principle-equivalences-is-contr-total-equiv : is-contr (Σ (UU l1) (λ X → A ≃ X)) → {l : Level} → (P : (Σ (UU l1) (λ X → A ≃ X)) → UU l) → induction-principle-equivalences (λ B e → P (B , e)) - is-identity-system-is-contr-total-equiv c P = + induction-principle-equivalences-is-contr-total-equiv c P = section-left-factor ( ev-id-equiv (λ X e → P (X , e))) ( ev-pair) @@ -108,7 +106,7 @@ module _ ( P)) ``` -#### Equivalence induction implies contractibility of the total space of equivalences +### Equivalence induction implies contractibility of the total space of equivalences ```agda module _ @@ -155,7 +153,7 @@ module _ abstract is-identity-system-equiv : section (ev-id-equiv P) is-identity-system-equiv = - is-identity-system-is-contr-total-equiv + induction-principle-equivalences-is-contr-total-equiv ( is-contr-total-equiv _) ( λ t → P (pr1 t) (pr2 t)) From eb4e0b5b2e6d0b8fb096470f8f3aa2a0f72f577b Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 01:03:50 +0200 Subject: [PATCH 13/89] singleton induction for propositions --- src/foundation/singleton-induction.lagda.md | 46 +++++++++++++++++++-- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/src/foundation/singleton-induction.lagda.md b/src/foundation/singleton-induction.lagda.md index ed4b0a5879..5a64763545 100644 --- a/src/foundation/singleton-induction.lagda.md +++ b/src/foundation/singleton-induction.lagda.md @@ -15,6 +15,7 @@ open import foundation-core.contractible-types open import foundation-core.function-types open import foundation-core.homotopies open import foundation-core.identity-types +open import foundation-core.propositions open import foundation-core.sections open import foundation-core.transport-along-identifications ``` @@ -56,14 +57,15 @@ abstract {l1 l2 : Level} {A : UU l1} (a : A) (is-contr-A : is-contr A) (B : A → UU l2) → B a → (x : A) → B x ind-singleton-is-contr a is-contr-A B b x = - tr B ((inv (contraction is-contr-A a)) ∙ (contraction is-contr-A x)) b + tr B (inv (contraction is-contr-A a) ∙ contraction is-contr-A x) b +abstract compute-ind-singleton-is-contr : {l1 l2 : Level} {A : UU l1} (a : A) (is-contr-A : is-contr A) (B : A → UU l2) → - ((ev-point a {B}) ∘ (ind-singleton-is-contr a is-contr-A B)) ~ id + (ev-point a {B} ∘ ind-singleton-is-contr a is-contr-A B) ~ id compute-ind-singleton-is-contr a is-contr-A B b = - ap (λ ω → tr B ω b) (left-inv (contraction is-contr-A a)) + ap (λ p → tr B p b) (left-inv (contraction is-contr-A a)) is-singleton-is-contr : {l1 l2 : Level} {A : UU l1} (a : A) → is-contr A → is-singleton l2 A a @@ -83,7 +85,43 @@ abstract is-contr-is-singleton : {l1 : Level} (A : UU l1) (a : A) → ({l2 : Level} → is-singleton l2 A a) → is-contr A - is-contr-is-singleton A a S = is-contr-ind-singleton A a (λ P → pr1 (S P)) + is-contr-is-singleton A a S = is-contr-ind-singleton A a (pr1 ∘ S) +``` + +### Singleton induction for propositions + +```agda +abstract + ind-singleton-is-prop : + {l1 l2 : Level} {A : UU l1} (a : A) (is-prop-A : is-prop A) + (B : A → UU l2) → B a → (x : A) → B x + ind-singleton-is-prop a is-prop-A = + ind-singleton-is-contr a (is-proof-irrelevant-is-prop is-prop-A a) + +abstract + compute-ind-singleton-is-prop : + {l1 l2 : Level} {A : UU l1} + (a : A) (is-prop-A : is-prop A) (B : A → UU l2) → + (ev-point a {B} ∘ ind-singleton-is-prop a is-prop-A B) ~ id + compute-ind-singleton-is-prop a is-prop-A = + compute-ind-singleton-is-contr a (is-proof-irrelevant-is-prop is-prop-A a) + +is-singleton-is-prop : + {l1 l2 : Level} {A : UU l1} (a : A) → is-prop A → is-singleton l2 A a +is-singleton-is-prop a is-prop-A = + is-singleton-is-contr a (is-proof-irrelevant-is-prop is-prop-A a) + +abstract + is-prop-ind-singleton : + {l1 : Level} (A : UU l1) (a : A) → + ({l2 : Level} (P : A → UU l2) → P a → (x : A) → P x) → is-prop A + is-prop-ind-singleton A a S = is-prop-is-contr (is-contr-ind-singleton A a S) + +abstract + is-prop-is-singleton : + {l1 : Level} (A : UU l1) (a : A) → + ({l2 : Level} → is-singleton l2 A a) → is-prop A + is-prop-is-singleton A a S = is-prop-ind-singleton A a (pr1 ∘ S) ``` ## Examples From 57bba3c55d3dc05f65a53b78a1d14e9921a30fad Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 01:32:31 +0200 Subject: [PATCH 14/89] `contains-is-iso-Subcategory` --- .../isomorphism-induction-categories.lagda.md | 10 ++- src/category-theory/subcategories.lagda.md | 90 +++++++++++++++---- 2 files changed, 79 insertions(+), 21 deletions(-) diff --git a/src/category-theory/isomorphism-induction-categories.lagda.md b/src/category-theory/isomorphism-induction-categories.lagda.md index 8048075196..13bdbbdfff 100644 --- a/src/category-theory/isomorphism-induction-categories.lagda.md +++ b/src/category-theory/isomorphism-induction-categories.lagda.md @@ -32,14 +32,16 @@ open import foundation-core.singleton-induction ## Idea -**Isomorphism induction** is the principle asserting that for any type family +**Isomorphism induction** in a category `𝒞` is the principle asserting that for +any type family ```text P : (B : 𝒞) (ϕ : A ≅ B) → 𝒰 ``` -of types indexed by all [isomorphisms](foundation.equivalences.md) with domain -`A`, there is a [section](foundation.sections.md) of the evaluation map +of types indexed by all +[isomorphisms](category-theory.isomorphisms-in-category.md) with domain `A`, +there is a [section](foundation.sections.md) of the evaluation map ```text ((B : 𝒞) (ϕ : A ≅ B) → P B ϕ) → P A id-iso. @@ -124,7 +126,7 @@ module _ ( ind P)) ``` -### Isomorphism induction in a universe +### Isomorphism induction in a category ```agda module _ diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index 5587d9514a..cb19df89a7 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -12,21 +12,29 @@ open import category-theory.embeddings-precategories open import category-theory.faithful-functors-precategories open import category-theory.functors-categories open import category-theory.functors-precategories +open import category-theory.isomorphism-induction-categories open import category-theory.isomorphisms-in-categories +open import category-theory.isomorphisms-in-precategories open import category-theory.maps-categories open import category-theory.maps-precategories open import category-theory.precategories open import category-theory.preunivalent-categories open import category-theory.subprecategories +open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.equivalences +open import foundation.fundamental-theorem-of-identity-types open import foundation.homotopies open import foundation.identity-types open import foundation.propositions open import foundation.sets +open import foundation.singleton-induction +open import foundation.structure-identity-principle +open import foundation.subtype-identity-principle open import foundation.subtypes +open import foundation.transport-along-identifications open import foundation.universe-levels ``` @@ -34,16 +42,18 @@ open import foundation.universe-levels ## Idea -A **subcategory** of a [category](category-theory.categories.md) `C` consists of -a [subtype](foundation-core.subtypes.md) `P₀` of the objects of `C`, and a -family of subtypes `P₁` +A **subcategory** of a [category](category-theory.categories.md) `C` is simply a +[subprecategory](category-theory.subprecategories.md). It consists of a +[subtype](foundation-core.subtypes.md) `P₀` of the objects of `C`, and a family +of subtypes `P₁` ```text P₁ : (X Y : obj C) → P₀ X → P₀ Y → subtype (hom X Y) ``` of the morphisms of `C`, such that `P₁` contains all identity morphisms of -objects in `P₀` and is closed under composition. +objects in `P₀` and is closed under composition. By univalence, it therefore +contains the isomorphisms, and hence defines a category. ## Definitions @@ -141,6 +151,10 @@ module _ is-in-obj-Subcategory : (x : obj-Category C) → UU l3 is-in-obj-Subcategory = is-in-subtype subtype-obj-Subcategory + is-prop-is-in-obj-Subcategory : + (x : obj-Category C) → is-prop (is-in-obj-Subcategory x) + is-prop-is-in-obj-Subcategory = is-prop-is-in-subtype subtype-obj-Subcategory + is-in-obj-inclusion-obj-Subcategory : (x : obj-Subcategory) → is-in-obj-Subcategory (inclusion-obj-Subcategory x) @@ -167,6 +181,12 @@ module _ (x y : obj-Category C) (f : hom-Category C x y) → UU l4 is-in-hom-Subcategory x y = is-in-subtype (subtype-hom-Subcategory x y) + is-prop-is-in-hom-Subcategory : + (x y : obj-Category C) (f : hom-Category C x y) → + is-prop (is-in-hom-Subcategory x y f) + is-prop-is-in-hom-Subcategory x y = + is-prop-is-in-subtype (subtype-hom-Subcategory x y) + is-in-hom-inclusion-hom-Subcategory : (x y : obj-Subcategory) (f : hom-Subcategory x y) → is-in-hom-Subcategory @@ -293,6 +313,25 @@ module _ inclusion-Subcategory = inclusion-Subprecategory (precategory-Category C) P ``` +### Isomorphisms in subcategories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Category l1 l2) + (P : Subcategory l3 l4 C) + where + + is-iso-Subcategory : + {x y : obj-Subcategory C P} → hom-Subcategory C P x y → UU (l2 ⊔ l4) + is-iso-Subcategory {x} {y} = + is-iso-Precategory (precategory-Subcategory C P) {x} {y} + + iso-Subcategory : + (x y : obj-Subcategory C P) → UU (l2 ⊔ l4) + iso-Subcategory = iso-Precategory (precategory-Subcategory C P) +``` + ## Properties ### The inclusion functor is faithful and an embedding on objects @@ -322,25 +361,42 @@ module _ is-emb-obj-inclusion-Subprecategory (precategory-Category C) P ``` -### Subcategories are preunivalent +### Subcategories are categories ```agda module _ {l1 l2 l3 l4 : Level} (C : Category l1 l2) (P : Subcategory l3 l4 C) + {x y : obj-Subcategory C P} + (f : hom-Subcategory C P x y) + (is-iso-f : is-iso-Category C (inclusion-hom-Subcategory C P x y f)) where - is-preunivalent-Subcategory : - is-preunivalent-Precategory (precategory-Subcategory C P) - is-preunivalent-Subcategory x y = - is-emb-htpy-emb - ( comp-emb - {! !} - ( emb-equiv - ( ( extensionality-obj-Category C - ( inclusion-obj-Subcategory C P x) - ( inclusion-obj-Subcategory C P y)) ∘e - ( equiv-ap-inclusion-subtype (subtype-obj-Subcategory C P))))) - {! !} + contains-is-iso-Subcategory : is-iso-Subcategory C P f + contains-is-iso-Subcategory = + ind-iso-Category C + { inclusion-obj-Subcategory C P x} + ( λ Y e → + (p : is-in-obj-Subcategory C P Y) + (q : is-in-hom-Subcategory C P (inclusion-obj-Subcategory C P x) Y (hom-iso-Category C e)) → + is-iso-Subcategory C P {x} {Y , p} (hom-iso-Category C e , q)) + ( λ p q → + ind-singleton-is-prop + ( contains-id-Subcategory C P (pr1 x) p) + ( is-prop-is-in-hom-Subcategory C P + ( inclusion-obj-Subcategory C P x) + ( pr1 x) + ( pr1 (id-iso-Category C))) + ( _) + ( ind-singleton-is-prop + ( pr2 x) + ( is-prop-is-in-obj-Subcategory C P (pr1 x)) + ( _) + ( is-iso-id-hom-Precategory (precategory-Subcategory C P) {x}) + ( p)) + ( q)) + ( inclusion-hom-Subcategory C P x y f , is-iso-f) + ( is-in-obj-inclusion-obj-Subcategory C P y) + ( is-in-hom-inclusion-hom-Subcategory C P x y f) ``` From 9292127b85ba20f634a7603c01376706b8672a94 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 01:58:44 +0200 Subject: [PATCH 15/89] remove unfinished work --- .../full-functors-precategories.lagda.md | 3 +- .../full-maps-precategories.lagda.md | 3 +- ...y-faithful-functors-precategories.lagda.md | 97 +------------------ .../isomorphism-induction-categories.lagda.md | 6 +- src/category-theory/subcategories.lagda.md | 35 ++++--- src/category-theory/subprecategories.lagda.md | 11 +++ 6 files changed, 41 insertions(+), 114 deletions(-) diff --git a/src/category-theory/full-functors-precategories.lagda.md b/src/category-theory/full-functors-precategories.lagda.md index 6441ecc9d4..51101a2c2b 100644 --- a/src/category-theory/full-functors-precategories.lagda.md +++ b/src/category-theory/full-functors-precategories.lagda.md @@ -30,7 +30,8 @@ open import foundation.universe-levels A [functor](category-theory.functors-precategories.md) between [precategories](category-theory.precategories.md) `C` and `D` is **full** if -it's [surjective](foundation-core.surjective-maps.md) on hom-sets. +it's [surjective](foundation-core.surjective-maps.md) on +hom-[sets](foundation-core.sets.md). ## Definition diff --git a/src/category-theory/full-maps-precategories.lagda.md b/src/category-theory/full-maps-precategories.lagda.md index ce6acbd0a6..ff66787da8 100644 --- a/src/category-theory/full-maps-precategories.lagda.md +++ b/src/category-theory/full-maps-precategories.lagda.md @@ -27,7 +27,8 @@ open import foundation.universe-levels A [map](category-theory.maps-precategories.md) between [precategories](category-theory.precategories.md) `C` and `D` is **full** if -it's a [surjection](foundation.surjective-maps.md) on hom-sets. +it's a [surjection](foundation.surjective-maps.md) on +hom-[sets](foundation-core.sets.md). ## Definition diff --git a/src/category-theory/fully-faithful-functors-precategories.lagda.md b/src/category-theory/fully-faithful-functors-precategories.lagda.md index 51a5e9c5cc..9ca36f19d0 100644 --- a/src/category-theory/fully-faithful-functors-precategories.lagda.md +++ b/src/category-theory/fully-faithful-functors-precategories.lagda.md @@ -249,99 +249,4 @@ module _ ### Fully faithful functors reflect isomorphisms -```agda -module _ - {l1 l2 l3 l4 : Level} - (C : Precategory l1 l2) - (D : Precategory l3 l4) - (F : functor-Precategory C D) - (is-ff-F : is-fully-faithful-functor-Precategory C D F) - {x y : obj-Precategory C} - where - - hom-inv-reflects-is-iso-is-fully-faithful-functor-Precategory : - (f : hom-Precategory C x y) → - is-iso-Precategory D (hom-functor-Precategory C D F f) → - hom-Precategory C y x - hom-inv-reflects-is-iso-is-fully-faithful-functor-Precategory f is-iso-Ff = - map-inv-hom-is-fully-faithful-functor-Precategory C D F is-ff-F - ( hom-inv-is-iso-Precategory D is-iso-Ff) - - is-right-inv-hom-inv-is-iso-fully-faithful-functor-Precategory : - (f : hom-Precategory C x y) → - (is-iso-Ff : is-iso-Precategory D (hom-functor-Precategory C D F f)) → - ( comp-hom-Precategory C - ( f) - ( map-inv-hom-is-fully-faithful-functor-Precategory C D F is-ff-F (hom-inv-is-iso-Precategory D is-iso-Ff))) = - ( id-hom-Precategory C) - is-right-inv-hom-inv-is-iso-fully-faithful-functor-Precategory f is-iso-Ff = - equational-reasoning - comp-hom-Precategory C f - ( map-inv-hom-is-fully-faithful-functor-Precategory C D F is-ff-F - ( hom-inv-is-iso-Precategory D is-iso-Ff)) - = {! !} by {! !} - = {! !} by {! !} - = {! !} by {! !} - = id-hom-Precategory C by {! !} - -- ( inv - -- ( preserves-comp-functor-Precategory C D F - -- ( f) - -- ( hom-inv-is-iso-Precategory C is-iso-f))) ∙ - -- ( ap - -- ( hom-functor-Precategory C D F) - -- ( is-section-hom-inv-is-iso-Precategory C is-iso-f)) ∙ - -- ( preserves-id-functor-Precategory C D F y) - - -- is-left-inv-hom-inv-is-iso-fully-faithful-functor-Precategory : - -- (f : hom-Precategory C x y) → - -- (is-iso-f : is-iso-Precategory C f) → - -- ( comp-hom-Precategory D - -- ( hom-functor-Precategory C D F (hom-inv-is-iso-Precategory C is-iso-f)) - -- ( hom-functor-Precategory C D F f)) = - -- ( id-hom-Precategory D) - -- is-left-inv-hom-inv-is-iso-fully-faithful-functor-Precategory f is-iso-f = - -- ( inv - -- ( preserves-comp-functor-Precategory C D F - -- ( hom-inv-is-iso-Precategory C is-iso-f) - -- ( f))) ∙ - -- ( ap - -- ( hom-functor-Precategory C D F) - -- ( is-retraction-hom-inv-is-iso-Precategory C is-iso-f)) ∙ - -- ( preserves-id-functor-Precategory C D F x) - - -- preserves-is-iso-fully-faithful-functor-Precategory : - -- (f : hom-Precategory C x y) → - -- is-iso-Precategory C f → - -- is-iso-Precategory D (hom-functor-Precategory C D F f) - -- pr1 (preserves-is-iso-fully-faithful-functor-Precategory f is-iso-f) = - -- hom-inv-is-iso-fully-faithful-functor-Precategory f is-iso-f - -- pr1 (pr2 (preserves-is-iso-fully-faithful-functor-Precategory f is-iso-f)) = - -- is-right-inv-hom-inv-is-iso-fully-faithful-functor-Precategory f is-iso-f - -- pr2 (pr2 (preserves-is-iso-fully-faithful-functor-Precategory f is-iso-f)) = - -- is-left-inv-hom-inv-is-iso-fully-faithful-functor-Precategory f is-iso-f - - -- preserves-iso-fully-faithful-functor-Precategory : - -- iso-Precategory C x y → - -- iso-Precategory D - -- ( obj-functor-Precategory C D F x) - -- ( obj-functor-Precategory C D F y) - -- pr1 (preserves-iso-fully-faithful-functor-Precategory f) = - -- hom-functor-Precategory C D F (hom-iso-Precategory C f) - -- pr2 (preserves-iso-fully-faithful-functor-Precategory f) = - -- preserves-is-iso-fully-faithful-functor-Precategory - -- ( hom-iso-Precategory C f) - -- ( is-iso-iso-Precategory C f) -``` - -### Fully faithful functors induce equivalences of isomorphism sets - -```agda -module _ - {l1 l2 l3 l4 : Level} - (C : Precategory l1 l2) - (D : Precategory l3 l4) - (F : functor-Precategory C D) - where - - -- is-equiv-iso-fully-faithful-functor-Precategory : -``` +This remains to be formalized. diff --git a/src/category-theory/isomorphism-induction-categories.lagda.md b/src/category-theory/isomorphism-induction-categories.lagda.md index 13bdbbdfff..ece50daa29 100644 --- a/src/category-theory/isomorphism-induction-categories.lagda.md +++ b/src/category-theory/isomorphism-induction-categories.lagda.md @@ -59,11 +59,13 @@ module _ ev-id-iso-Category : {l : Level} (P : (B : obj-Category C) → (iso-Category C A B) → UU l) → - ((B : obj-Category C) (e : iso-Category C A B) → P B e) → P A (id-iso-Category C) + ((B : obj-Category C) (e : iso-Category C A B) → P B e) → + P A (id-iso-Category C) ev-id-iso-Category P f = f A (id-iso-Category C) induction-principle-iso-Category : - {l : Level} (P : (B : obj-Category C) (e : iso-Category C A B) → UU l) → UU (l1 ⊔ l2 ⊔ l) + {l : Level} (P : (B : obj-Category C) (e : iso-Category C A B) → UU l) → + UU (l1 ⊔ l2 ⊔ l) induction-principle-iso-Category P = section (ev-id-iso-Category P) triangle-ev-id-iso-Category : diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index cb19df89a7..092e636ae1 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -25,6 +25,7 @@ open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.equivalences +open import foundation.function-types open import foundation.fundamental-theorem-of-identity-types open import foundation.homotopies open import foundation.identity-types @@ -378,25 +379,31 @@ module _ ind-iso-Category C { inclusion-obj-Subcategory C P x} ( λ Y e → - (p : is-in-obj-Subcategory C P Y) - (q : is-in-hom-Subcategory C P (inclusion-obj-Subcategory C P x) Y (hom-iso-Category C e)) → + ( p : is-in-obj-Subcategory C P Y) + ( q : + is-in-hom-Subcategory C P + ( inclusion-obj-Subcategory C P x) + ( Y) + ( hom-iso-Category C e)) → is-iso-Subcategory C P {x} {Y , p} (hom-iso-Category C e , q)) - ( λ p q → - ind-singleton-is-prop - ( contains-id-Subcategory C P (pr1 x) p) + ( ( ind-singleton-is-prop + ( contains-id-Subcategory C P + ( inclusion-obj-Subcategory C P x) + ( is-in-obj-inclusion-obj-Subcategory C P x)) ( is-prop-is-in-hom-Subcategory C P ( inclusion-obj-Subcategory C P x) - ( pr1 x) - ( pr1 (id-iso-Category C))) + ( inclusion-obj-Subcategory C P x) + ( id-hom-Category C)) + ( λ q → is-iso-Subcategory C P (id-hom-Category C , q))) ∘ + ( ind-singleton-is-prop + ( is-in-obj-inclusion-obj-Subcategory C P x) + ( is-prop-is-in-obj-Subcategory C P + ( inclusion-obj-Subcategory C P x)) ( _) - ( ind-singleton-is-prop - ( pr2 x) - ( is-prop-is-in-obj-Subcategory C P (pr1 x)) - ( _) - ( is-iso-id-hom-Precategory (precategory-Subcategory C P) {x}) - ( p)) - ( q)) + ( is-iso-id-hom-Precategory (precategory-Subcategory C P) {x}))) ( inclusion-hom-Subcategory C P x y f , is-iso-f) ( is-in-obj-inclusion-obj-Subcategory C P y) ( is-in-hom-inclusion-hom-Subcategory C P x y f) ``` + +It remains to show that subcategories indeed define categories. diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index a02250f5c9..ea03985a9d 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -154,6 +154,11 @@ module _ is-in-obj-Subprecategory : (x : obj-Precategory C) → UU l3 is-in-obj-Subprecategory = is-in-subtype subtype-obj-Subprecategory + is-prop-is-in-obj-Subprecategory : + (x : obj-Precategory C) → is-prop (is-in-obj-Subprecategory x) + is-prop-is-in-obj-Subprecategory = + is-prop-is-in-subtype subtype-obj-Subprecategory + is-in-obj-inclusion-obj-Subprecategory : (x : obj-Subprecategory) → is-in-obj-Subprecategory (inclusion-obj-Subprecategory x) @@ -187,6 +192,12 @@ module _ (x y : obj-Precategory C) (f : hom-Precategory C x y) → UU l4 is-in-hom-Subprecategory x y = is-in-subtype (subtype-hom-Subprecategory x y) + is-prop-is-in-hom-Subprecategory : + (x y : obj-Precategory C) (f : hom-Precategory C x y) → + is-prop (is-in-hom-Subprecategory x y f) + is-prop-is-in-hom-Subprecategory x y = + is-prop-is-in-subtype (subtype-hom-Subprecategory x y) + is-in-hom-inclusion-hom-Subprecategory : (x y : obj-Subprecategory) (f : hom-Subprecategory x y) → is-in-hom-Subprecategory From be053aff91a5cc2b4ea6fd343d001ad82e0aa252 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 02:32:19 +0200 Subject: [PATCH 16/89] full subprecategories --- src/category-theory.lagda.md | 1 + .../full-functors-precategories.lagda.md | 2 +- .../full-subprecategories.lagda.md | 303 ++++++++++++++++++ .../isomorphism-induction-categories.lagda.md | 2 +- src/foundation/symmetric-difference.lagda.md | 2 +- 5 files changed, 307 insertions(+), 3 deletions(-) create mode 100644 src/category-theory/full-subprecategories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index 341b80e374..de394944a2 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -45,6 +45,7 @@ open import category-theory.full-functors-precategories public open import category-theory.full-large-subcategories public open import category-theory.full-large-subprecategories public open import category-theory.full-maps-precategories public +open import category-theory.full-subprecategories public open import category-theory.fully-faithful-functors-precategories public open import category-theory.fully-faithful-maps-precategories public open import category-theory.function-categories public diff --git a/src/category-theory/full-functors-precategories.lagda.md b/src/category-theory/full-functors-precategories.lagda.md index 51101a2c2b..b5f808eb3e 100644 --- a/src/category-theory/full-functors-precategories.lagda.md +++ b/src/category-theory/full-functors-precategories.lagda.md @@ -30,7 +30,7 @@ open import foundation.universe-levels A [functor](category-theory.functors-precategories.md) between [precategories](category-theory.precategories.md) `C` and `D` is **full** if -it's [surjective](foundation-core.surjective-maps.md) on +it's [surjective](foundation.surjective-maps.md) on hom-[sets](foundation-core.sets.md). ## Definition diff --git a/src/category-theory/full-subprecategories.lagda.md b/src/category-theory/full-subprecategories.lagda.md new file mode 100644 index 0000000000..d25968ced0 --- /dev/null +++ b/src/category-theory/full-subprecategories.lagda.md @@ -0,0 +1,303 @@ +# Full subprecategories + +```agda +module category-theory.full-subprecategories where +``` + +
Imports + +```agda +open import category-theory.categories +open import category-theory.embeddings-precategories +open import category-theory.faithful-functors-precategories +open import category-theory.faithful-maps-precategories +open import category-theory.fully-faithful-functors-precategories +open import category-theory.functors-precategories +open import category-theory.isomorphisms-in-categories +open import category-theory.isomorphisms-in-precategories +open import category-theory.maps-precategories +open import category-theory.precategories +open import category-theory.subprecategories + +open import foundation.dependent-pair-types +open import foundation.embeddings +open import foundation.equivalences +open import foundation.function-types +open import foundation.fundamental-theorem-of-identity-types +open import foundation.identity-types +open import foundation.propositions +open import foundation.sets +open import foundation.subtype-identity-principle +open import foundation.subtypes +open import foundation.universe-levels +``` + +
+ +## Idea + +A **subprecategory** of a [precategory](category-theory.precategories.md) `C` +consists of a [subtype](foundation-core.subtypes.md) `P₀` of the objects of `C`. + +Alternatively, we say that a +[subprecategory](category-theory.subprecategories.md) **is full** if for every +two objects `X` and `Y` in the subprecategory, the subtype of homomorphisms from +`X` to `Y` in the subprecategory is [full](foundation.full-subtypes.md). + +## Definition + +### Subprecategories + +```agda +Full-Subprecategory : + {l1 l2 : Level} (l3 : Level) (C : Precategory l1 l2) → UU (l1 ⊔ lsuc l3) +Full-Subprecategory l3 C = subtype l3 (obj-Precategory C) + +module _ + {l1 l2 l3 : Level} + (C : Precategory l1 l2) + (P : Full-Subprecategory l3 C) + where + + subtype-obj-Full-Subprecategory : subtype l3 (obj-Precategory C) + subtype-obj-Full-Subprecategory = P + + obj-Full-Subprecategory : UU (l1 ⊔ l3) + obj-Full-Subprecategory = type-subtype subtype-obj-Full-Subprecategory + + inclusion-obj-Full-Subprecategory : + obj-Full-Subprecategory → obj-Precategory C + inclusion-obj-Full-Subprecategory = + inclusion-subtype subtype-obj-Full-Subprecategory + + is-in-obj-Full-Subprecategory : (x : obj-Precategory C) → UU l3 + is-in-obj-Full-Subprecategory = is-in-subtype subtype-obj-Full-Subprecategory + + is-prop-is-in-obj-Full-Subprecategory : + (x : obj-Precategory C) → is-prop (is-in-obj-Full-Subprecategory x) + is-prop-is-in-obj-Full-Subprecategory = + is-prop-is-in-subtype subtype-obj-Full-Subprecategory + + is-in-obj-inclusion-obj-Full-Subprecategory : + (x : obj-Full-Subprecategory) → + is-in-obj-Full-Subprecategory (inclusion-obj-Full-Subprecategory x) + is-in-obj-inclusion-obj-Full-Subprecategory = + is-in-subtype-inclusion-subtype subtype-obj-Full-Subprecategory +``` + +### The precategory structure of a full subprecategory + +```agda +module _ + {l1 l2 l3 : Level} + (C : Precategory l1 l2) + (P : Full-Subprecategory l3 C) + where + + hom-set-Full-Subprecategory : (x y : obj-Full-Subprecategory C P) → Set l2 + hom-set-Full-Subprecategory x y = + hom-set-Precategory C + ( inclusion-obj-Full-Subprecategory C P x) + ( inclusion-obj-Full-Subprecategory C P y) + + hom-Full-Subprecategory : (x y : obj-Full-Subprecategory C P) → UU l2 + hom-Full-Subprecategory x y = type-Set (hom-set-Full-Subprecategory x y) + + is-set-hom-Full-Subprecategory : + (x y : obj-Full-Subprecategory C P) → is-set (hom-Full-Subprecategory x y) + is-set-hom-Full-Subprecategory x y = + is-set-type-Set (hom-set-Full-Subprecategory x y) + + id-hom-Full-Subprecategory : + {x : obj-Full-Subprecategory C P} → hom-Full-Subprecategory x x + id-hom-Full-Subprecategory = id-hom-Precategory C + + comp-hom-Full-Subprecategory : + {x y z : obj-Full-Subprecategory C P} → + hom-Full-Subprecategory y z → + hom-Full-Subprecategory x y → + hom-Full-Subprecategory x z + comp-hom-Full-Subprecategory = comp-hom-Precategory C + + associative-comp-hom-Full-Subprecategory : + {x y z w : obj-Full-Subprecategory C P} + (h : hom-Full-Subprecategory z w) + (g : hom-Full-Subprecategory y z) + (f : hom-Full-Subprecategory x y) → + ( comp-hom-Full-Subprecategory {x} {y} {w} + ( comp-hom-Full-Subprecategory {y} {z} {w} h g) f) = + ( comp-hom-Full-Subprecategory {x} {z} {w} h + ( comp-hom-Full-Subprecategory {x} {y} {z} g f)) + associative-comp-hom-Full-Subprecategory = + associative-comp-hom-Precategory C + + left-unit-law-comp-hom-Full-Subprecategory : + {x y : obj-Full-Subprecategory C P} + (f : hom-Full-Subprecategory x y) → + comp-hom-Full-Subprecategory {x} {y} {y} + ( id-hom-Full-Subprecategory {y}) + ( f) = + f + left-unit-law-comp-hom-Full-Subprecategory = + left-unit-law-comp-hom-Precategory C + + right-unit-law-comp-hom-Full-Subprecategory : + {x y : obj-Full-Subprecategory C P} + (f : hom-Full-Subprecategory x y) → + comp-hom-Full-Subprecategory {x} {x} {y} + ( f) + ( id-hom-Full-Subprecategory {x}) = + f + right-unit-law-comp-hom-Full-Subprecategory = + right-unit-law-comp-hom-Precategory C + + associative-composition-structure-Full-Subprecategory : + associative-composition-structure-Set hom-set-Full-Subprecategory + pr1 associative-composition-structure-Full-Subprecategory {x} {y} {z} = + comp-hom-Full-Subprecategory {x} {y} {z} + pr2 associative-composition-structure-Full-Subprecategory {x} {y} {z} {w} = + associative-comp-hom-Full-Subprecategory {x} {y} {z} {w} + + is-unital-composition-structure-Full-Subprecategory : + is-unital-composition-structure-Set + ( hom-set-Full-Subprecategory) + ( associative-composition-structure-Full-Subprecategory) + pr1 is-unital-composition-structure-Full-Subprecategory x = + id-hom-Full-Subprecategory {x} + pr1 (pr2 is-unital-composition-structure-Full-Subprecategory) {x} {y} = + left-unit-law-comp-hom-Full-Subprecategory {x} {y} + pr2 (pr2 is-unital-composition-structure-Full-Subprecategory) {x} {y} = + right-unit-law-comp-hom-Full-Subprecategory {x} {y} + + precategory-Full-Subprecategory : Precategory (l1 ⊔ l3) l2 + pr1 precategory-Full-Subprecategory = obj-Full-Subprecategory C P + pr1 (pr2 precategory-Full-Subprecategory) = hom-set-Full-Subprecategory + pr1 (pr2 (pr2 precategory-Full-Subprecategory)) = + associative-composition-structure-Full-Subprecategory + pr2 (pr2 (pr2 precategory-Full-Subprecategory)) = + is-unital-composition-structure-Full-Subprecategory +``` + +### Isomorphisms in full subprecategories + +```agda +module _ + {l1 l2 l3 : Level} + (C : Precategory l1 l2) + (P : Full-Subprecategory l3 C) + where + + iso-Full-Subprecategory : + (X Y : obj-Full-Subprecategory C P) → UU l2 + iso-Full-Subprecategory X Y = + iso-Precategory C (inclusion-subtype P X) (inclusion-subtype P Y) + + iso-eq-Full-Subprecategory : + (X Y : obj-Full-Subprecategory C P) → X = Y → iso-Full-Subprecategory X Y + iso-eq-Full-Subprecategory = + iso-eq-Precategory (precategory-Full-Subprecategory C P) +``` + +### The inclusion functor of a full subprecategory + +```agda +module _ + {l1 l2 l3 : Level} + (C : Precategory l1 l2) + (P : Full-Subprecategory l3 C) + where + + inclusion-map-Full-Subprecategory : + map-Precategory (precategory-Full-Subprecategory C P) C + pr1 inclusion-map-Full-Subprecategory = inclusion-obj-Full-Subprecategory C P + pr2 inclusion-map-Full-Subprecategory = id + + is-functor-inclusion-Full-Subprecategory : + is-functor-map-Precategory + ( precategory-Full-Subprecategory C P) + ( C) + ( inclusion-map-Full-Subprecategory) + pr1 is-functor-inclusion-Full-Subprecategory g f = refl + pr2 is-functor-inclusion-Full-Subprecategory x = refl + + inclusion-Full-Subprecategory : + functor-Precategory (precategory-Full-Subprecategory C P) C + pr1 inclusion-Full-Subprecategory = + inclusion-obj-Full-Subprecategory C P + pr1 (pr2 inclusion-Full-Subprecategory) = id + pr2 (pr2 inclusion-Full-Subprecategory) = + is-functor-inclusion-Full-Subprecategory +``` + +## Properties + +### A full subprecategory of a category is a category + +```agda +module _ + {l1 l2 l3 : Level} + (C : Category l1 l2) + (P : Full-Subprecategory l3 (precategory-Category C)) + where + + is-category-precategory-Full-Subcategory : + is-category-Precategory + ( precategory-Full-Subprecategory + ( precategory-Category C) + ( P)) + is-category-precategory-Full-Subcategory X = + fundamental-theorem-id + ( is-contr-total-Eq-subtype + ( is-contr-total-iso-Category C (inclusion-subtype P X)) + ( is-prop-is-in-subtype P) + ( inclusion-subtype P X) + ( id-iso-Category C) + ( is-in-subtype-inclusion-subtype P X)) + ( iso-eq-Full-Subprecategory + ( precategory-Category C) + ( P) + ( X)) +``` + +### The inclusion functor is an embedding + +```agda +module _ + {l1 l2 l3 : Level} + (C : Precategory l1 l2) + (P : Full-Subprecategory l3 C) + where + + is-faithful-inclusion-Full-Subprecategory : + is-faithful-functor-Precategory + ( precategory-Full-Subprecategory C P) + ( C) + ( inclusion-Full-Subprecategory C P) + is-faithful-inclusion-Full-Subprecategory x y = is-emb-id + + is-fully-faithful-inclusion-Full-Subprecategory : + is-fully-faithful-functor-Precategory + ( precategory-Full-Subprecategory C P) + ( C) + ( inclusion-Full-Subprecategory C P) + is-fully-faithful-inclusion-Full-Subprecategory x y = is-equiv-id + + is-emb-obj-inclusion-Full-Subprecategory : + is-emb + ( obj-functor-Precategory + ( precategory-Full-Subprecategory C P) + ( C) + ( inclusion-Full-Subprecategory C P)) + is-emb-obj-inclusion-Full-Subprecategory = + is-emb-inclusion-subtype (subtype-obj-Full-Subprecategory C P) + + is-embedding-inclusion-Full-Subprecategory : + is-embedding-functor-Precategory + ( precategory-Full-Subprecategory C P) + ( C) + ( inclusion-Full-Subprecategory C P) + pr1 is-embedding-inclusion-Full-Subprecategory = + is-emb-obj-inclusion-Full-Subprecategory + pr2 is-embedding-inclusion-Full-Subprecategory = + is-fully-faithful-inclusion-Full-Subprecategory +``` diff --git a/src/category-theory/isomorphism-induction-categories.lagda.md b/src/category-theory/isomorphism-induction-categories.lagda.md index ece50daa29..e69d93f845 100644 --- a/src/category-theory/isomorphism-induction-categories.lagda.md +++ b/src/category-theory/isomorphism-induction-categories.lagda.md @@ -40,7 +40,7 @@ any type family ``` of types indexed by all -[isomorphisms](category-theory.isomorphisms-in-category.md) with domain `A`, +[isomorphisms](category-theory.isomorphisms-in-categories.md) with domain `A`, there is a [section](foundation.sections.md) of the evaluation map ```text diff --git a/src/foundation/symmetric-difference.lagda.md b/src/foundation/symmetric-difference.lagda.md index 457ffcd8fa..2a4e22b528 100644 --- a/src/foundation/symmetric-difference.lagda.md +++ b/src/foundation/symmetric-difference.lagda.md @@ -169,4 +169,4 @@ module _ ## See also -- [Complements of subtypes](foundation.complements.subtypes.md) +- [Complements of subtypes](foundation.complements-subtypes.md) From d11c8a43fd6ce1478ff8caca14ddc8893b1d18b6 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 02:41:09 +0200 Subject: [PATCH 17/89] full subcategories --- src/category-theory.lagda.md | 1 + .../full-subcategories.lagda.md | 281 ++++++++++++++++++ .../full-subprecategories.lagda.md | 7 - 3 files changed, 282 insertions(+), 7 deletions(-) create mode 100644 src/category-theory/full-subcategories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index de394944a2..4098472e0f 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -45,6 +45,7 @@ open import category-theory.full-functors-precategories public open import category-theory.full-large-subcategories public open import category-theory.full-large-subprecategories public open import category-theory.full-maps-precategories public +open import category-theory.full-subcategories public open import category-theory.full-subprecategories public open import category-theory.fully-faithful-functors-precategories public open import category-theory.fully-faithful-maps-precategories public diff --git a/src/category-theory/full-subcategories.lagda.md b/src/category-theory/full-subcategories.lagda.md new file mode 100644 index 0000000000..5a351c3c94 --- /dev/null +++ b/src/category-theory/full-subcategories.lagda.md @@ -0,0 +1,281 @@ +# Full subcategories + +```agda +module category-theory.full-subcategories where +``` + +
Imports + +```agda +open import category-theory.categories +open import category-theory.embeddings-precategories +open import category-theory.faithful-functors-precategories +open import category-theory.faithful-maps-precategories +open import category-theory.full-subprecategories +open import category-theory.fully-faithful-functors-precategories +open import category-theory.functors-categories +open import category-theory.functors-precategories +open import category-theory.isomorphisms-in-categories +open import category-theory.isomorphisms-in-precategories +open import category-theory.maps-categories +open import category-theory.maps-precategories +open import category-theory.precategories +open import category-theory.subcategories + +open import foundation.dependent-pair-types +open import foundation.embeddings +open import foundation.equivalences +open import foundation.function-types +open import foundation.fundamental-theorem-of-identity-types +open import foundation.identity-types +open import foundation.propositions +open import foundation.sets +open import foundation.subtype-identity-principle +open import foundation.subtypes +open import foundation.universe-levels +``` + +
+ +## Idea + +A **subcategory** of a [precategory](category-theory.precategories.md) `C` +consists of a [subtype](foundation-core.subtypes.md) `P₀` of the objects of `C`. + +Alternatively, we say that a [subcategory](category-theory.subcategories.md) +**is full** if for every two objects `X` and `Y` in the subcategory, the subtype +of homomorphisms from `X` to `Y` in the subcategory is +[full](foundation.full-subtypes.md). + +## Definition + +### Subprecategories + +```agda +Full-Subcategory : + {l1 l2 : Level} (l3 : Level) (C : Category l1 l2) → UU (l1 ⊔ lsuc l3) +Full-Subcategory l3 C = Full-Subprecategory l3 (precategory-Category C) + +module _ + {l1 l2 l3 : Level} + (C : Category l1 l2) + (P : Full-Subcategory l3 C) + where + + subtype-obj-Full-Subcategory : subtype l3 (obj-Category C) + subtype-obj-Full-Subcategory = P + + obj-Full-Subcategory : UU (l1 ⊔ l3) + obj-Full-Subcategory = type-subtype subtype-obj-Full-Subcategory + + inclusion-obj-Full-Subcategory : + obj-Full-Subcategory → obj-Category C + inclusion-obj-Full-Subcategory = + inclusion-subtype subtype-obj-Full-Subcategory + + is-in-obj-Full-Subcategory : (x : obj-Category C) → UU l3 + is-in-obj-Full-Subcategory = is-in-subtype subtype-obj-Full-Subcategory + + is-prop-is-in-obj-Full-Subcategory : + (x : obj-Category C) → is-prop (is-in-obj-Full-Subcategory x) + is-prop-is-in-obj-Full-Subcategory = + is-prop-is-in-subtype subtype-obj-Full-Subcategory + + is-in-obj-inclusion-obj-Full-Subcategory : + (x : obj-Full-Subcategory) → + is-in-obj-Full-Subcategory (inclusion-obj-Full-Subcategory x) + is-in-obj-inclusion-obj-Full-Subcategory = + is-in-subtype-inclusion-subtype subtype-obj-Full-Subcategory +``` + +### The precategory structure of a full subcategory + +```agda +module _ + {l1 l2 l3 : Level} + (C : Category l1 l2) + (P : Full-Subcategory l3 C) + where + + hom-set-Full-Subcategory : (x y : obj-Full-Subcategory C P) → Set l2 + hom-set-Full-Subcategory x y = + hom-set-Category C + ( inclusion-obj-Full-Subcategory C P x) + ( inclusion-obj-Full-Subcategory C P y) + + hom-Full-Subcategory : (x y : obj-Full-Subcategory C P) → UU l2 + hom-Full-Subcategory x y = type-Set (hom-set-Full-Subcategory x y) + + is-set-hom-Full-Subcategory : + (x y : obj-Full-Subcategory C P) → is-set (hom-Full-Subcategory x y) + is-set-hom-Full-Subcategory x y = + is-set-type-Set (hom-set-Full-Subcategory x y) + + id-hom-Full-Subcategory : + {x : obj-Full-Subcategory C P} → hom-Full-Subcategory x x + id-hom-Full-Subcategory = id-hom-Category C + + comp-hom-Full-Subcategory : + {x y z : obj-Full-Subcategory C P} → + hom-Full-Subcategory y z → + hom-Full-Subcategory x y → + hom-Full-Subcategory x z + comp-hom-Full-Subcategory = comp-hom-Category C + + associative-comp-hom-Full-Subcategory : + {x y z w : obj-Full-Subcategory C P} + (h : hom-Full-Subcategory z w) + (g : hom-Full-Subcategory y z) + (f : hom-Full-Subcategory x y) → + ( comp-hom-Full-Subcategory {x} {y} {w} + ( comp-hom-Full-Subcategory {y} {z} {w} h g) f) = + ( comp-hom-Full-Subcategory {x} {z} {w} h + ( comp-hom-Full-Subcategory {x} {y} {z} g f)) + associative-comp-hom-Full-Subcategory = + associative-comp-hom-Category C + + left-unit-law-comp-hom-Full-Subcategory : + {x y : obj-Full-Subcategory C P} + (f : hom-Full-Subcategory x y) → + comp-hom-Full-Subcategory {x} {y} {y} + ( id-hom-Full-Subcategory {y}) + ( f) = + f + left-unit-law-comp-hom-Full-Subcategory = + left-unit-law-comp-hom-Category C + + right-unit-law-comp-hom-Full-Subcategory : + {x y : obj-Full-Subcategory C P} + (f : hom-Full-Subcategory x y) → + comp-hom-Full-Subcategory {x} {x} {y} + ( f) + ( id-hom-Full-Subcategory {x}) = + f + right-unit-law-comp-hom-Full-Subcategory = + right-unit-law-comp-hom-Category C + + associative-composition-structure-Full-Subcategory : + associative-composition-structure-Set hom-set-Full-Subcategory + pr1 associative-composition-structure-Full-Subcategory {x} {y} {z} = + comp-hom-Full-Subcategory {x} {y} {z} + pr2 associative-composition-structure-Full-Subcategory {x} {y} {z} {w} = + associative-comp-hom-Full-Subcategory {x} {y} {z} {w} + + is-unital-composition-structure-Full-Subcategory : + is-unital-composition-structure-Set + ( hom-set-Full-Subcategory) + ( associative-composition-structure-Full-Subcategory) + pr1 is-unital-composition-structure-Full-Subcategory x = + id-hom-Full-Subcategory {x} + pr1 (pr2 is-unital-composition-structure-Full-Subcategory) {x} {y} = + left-unit-law-comp-hom-Full-Subcategory {x} {y} + pr2 (pr2 is-unital-composition-structure-Full-Subcategory) {x} {y} = + right-unit-law-comp-hom-Full-Subcategory {x} {y} + + precategory-Full-Subcategory : Precategory (l1 ⊔ l3) l2 + pr1 precategory-Full-Subcategory = obj-Full-Subcategory C P + pr1 (pr2 precategory-Full-Subcategory) = hom-set-Full-Subcategory + pr1 (pr2 (pr2 precategory-Full-Subcategory)) = + associative-composition-structure-Full-Subcategory + pr2 (pr2 (pr2 precategory-Full-Subcategory)) = + is-unital-composition-structure-Full-Subcategory +``` + +### Isomorphisms in full subcategories + +```agda +module _ + {l1 l2 l3 : Level} + (C : Category l1 l2) + (P : Full-Subcategory l3 C) + where + + iso-Full-Subcategory : + (X Y : obj-Full-Subcategory C P) → UU l2 + iso-Full-Subcategory X Y = + iso-Category C (inclusion-subtype P X) (inclusion-subtype P Y) + + iso-eq-Full-Subcategory : + (X Y : obj-Full-Subcategory C P) → X = Y → iso-Full-Subcategory X Y + iso-eq-Full-Subcategory = + iso-eq-Precategory (precategory-Full-Subcategory C P) +``` + +## Properties + +### Full subcategories are categories + +```agda +module _ + {l1 l2 l3 : Level} + (C : Category l1 l2) + (P : Full-Subcategory l3 C) + where + + category-Full-Subcategory : Category (l1 ⊔ l3) l2 + pr1 category-Full-Subcategory = precategory-Full-Subcategory C P + pr2 category-Full-Subcategory = is-category-precategory-Full-Subcategory C P +``` + +### The inclusion functor is an embedding + +```agda +module _ + {l1 l2 l3 : Level} + (C : Category l1 l2) + (P : Full-Subcategory l3 C) + where + + inclusion-map-Full-Subcategory : + map-Category (category-Full-Subcategory C P) C + pr1 inclusion-map-Full-Subcategory = inclusion-obj-Full-Subcategory C P + pr2 inclusion-map-Full-Subcategory = id + + is-functor-inclusion-Full-Subcategory : + is-functor-map-Category + ( category-Full-Subcategory C P) + ( C) + ( inclusion-map-Full-Subcategory) + pr1 is-functor-inclusion-Full-Subcategory g f = refl + pr2 is-functor-inclusion-Full-Subcategory x = refl + + inclusion-Full-Subcategory : + functor-Category (category-Full-Subcategory C P) C + pr1 inclusion-Full-Subcategory = + inclusion-obj-Full-Subcategory C P + pr1 (pr2 inclusion-Full-Subcategory) = id + pr2 (pr2 inclusion-Full-Subcategory) = + is-functor-inclusion-Full-Subcategory + +module _ + {l1 l2 l3 : Level} + (C : Category l1 l2) + (P : Full-Subcategory l3 C) + where + + is-fully-faithful-inclusion-Full-Subcategory : + is-fully-faithful-functor-Precategory + ( precategory-Full-Subcategory C P) + ( precategory-Category C) + ( inclusion-Full-Subcategory C P) + is-fully-faithful-inclusion-Full-Subcategory x y = is-equiv-id + + is-emb-obj-inclusion-Full-Subcategory : + is-emb + ( obj-functor-Category + ( category-Full-Subcategory C P) + ( C) + ( inclusion-Full-Subcategory C P)) + is-emb-obj-inclusion-Full-Subcategory = + is-emb-inclusion-subtype (subtype-obj-Full-Subcategory C P) + + is-embedding-inclusion-Full-Subcategory : + is-embedding-functor-Precategory + ( precategory-Full-Subcategory C P) + ( precategory-Category C) + ( inclusion-Full-Subcategory C P) + pr1 is-embedding-inclusion-Full-Subcategory = + is-emb-obj-inclusion-Full-Subcategory + pr2 is-embedding-inclusion-Full-Subcategory = + is-fully-faithful-inclusion-Full-Subcategory +``` diff --git a/src/category-theory/full-subprecategories.lagda.md b/src/category-theory/full-subprecategories.lagda.md index d25968ced0..38eb94f874 100644 --- a/src/category-theory/full-subprecategories.lagda.md +++ b/src/category-theory/full-subprecategories.lagda.md @@ -268,13 +268,6 @@ module _ (P : Full-Subprecategory l3 C) where - is-faithful-inclusion-Full-Subprecategory : - is-faithful-functor-Precategory - ( precategory-Full-Subprecategory C P) - ( C) - ( inclusion-Full-Subprecategory C P) - is-faithful-inclusion-Full-Subprecategory x y = is-emb-id - is-fully-faithful-inclusion-Full-Subprecategory : is-fully-faithful-functor-Precategory ( precategory-Full-Subprecategory C P) From 7a0895efb694f8297ade7b046e12514582924341 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 02:46:35 +0200 Subject: [PATCH 18/89] remove unused imports --- .../embedding-maps-precategories.lagda.md | 4 ---- src/category-theory/embeddings-precategories.lagda.md | 3 --- .../faithful-functors-precategories.lagda.md | 3 --- .../faithful-maps-precategories.lagda.md | 1 - .../full-functors-precategories.lagda.md | 7 ------- src/category-theory/full-maps-precategories.lagda.md | 4 ---- src/category-theory/full-subcategories.lagda.md | 7 ------- src/category-theory/full-subprecategories.lagda.md | 3 --- .../fully-faithful-functors-precategories.lagda.md | 5 ----- .../fully-faithful-maps-precategories.lagda.md | 3 --- .../isomorphism-induction-categories.lagda.md | 3 --- src/category-theory/preunivalent-categories.lagda.md | 1 - src/category-theory/subcategories.lagda.md | 11 ----------- src/category-theory/subprecategories.lagda.md | 2 -- .../precategory-of-finite-posets.lagda.md | 2 -- .../precategory-of-finite-total-orders.lagda.md | 3 --- ...category-of-inhabited-finite-total-orders.lagda.md | 4 ---- 17 files changed, 66 deletions(-) diff --git a/src/category-theory/embedding-maps-precategories.lagda.md b/src/category-theory/embedding-maps-precategories.lagda.md index 769d6c7ae3..8212659c8a 100644 --- a/src/category-theory/embedding-maps-precategories.lagda.md +++ b/src/category-theory/embedding-maps-precategories.lagda.md @@ -8,15 +8,11 @@ module category-theory.embedding-maps-precategories where ```agda open import category-theory.fully-faithful-maps-precategories -open import category-theory.functors-precategories open import category-theory.maps-precategories open import category-theory.precategories -open import foundation.cartesian-product-types open import foundation.dependent-pair-types open import foundation.embeddings -open import foundation.equivalences -open import foundation.injective-maps open import foundation.propositions open import foundation.universe-levels ``` diff --git a/src/category-theory/embeddings-precategories.lagda.md b/src/category-theory/embeddings-precategories.lagda.md index 0159743c45..65b93ae7bf 100644 --- a/src/category-theory/embeddings-precategories.lagda.md +++ b/src/category-theory/embeddings-precategories.lagda.md @@ -12,10 +12,7 @@ open import category-theory.functors-precategories open import category-theory.maps-precategories open import category-theory.precategories -open import foundation.cartesian-product-types open import foundation.dependent-pair-types -open import foundation.embeddings -open import foundation.equivalences open import foundation.propositions open import foundation.universe-levels ``` diff --git a/src/category-theory/faithful-functors-precategories.lagda.md b/src/category-theory/faithful-functors-precategories.lagda.md index 4d93a122e0..b5f754bce9 100644 --- a/src/category-theory/faithful-functors-precategories.lagda.md +++ b/src/category-theory/faithful-functors-precategories.lagda.md @@ -9,14 +9,11 @@ module category-theory.faithful-functors-precategories where ```agda open import category-theory.faithful-maps-precategories open import category-theory.functors-precategories -open import category-theory.maps-precategories open import category-theory.precategories open import foundation.dependent-pair-types -open import foundation.embeddings open import foundation.equivalences open import foundation.function-types -open import foundation.injective-maps open import foundation.propositions open import foundation.universe-levels ``` diff --git a/src/category-theory/faithful-maps-precategories.lagda.md b/src/category-theory/faithful-maps-precategories.lagda.md index fc050d4398..d4376bf7cd 100644 --- a/src/category-theory/faithful-maps-precategories.lagda.md +++ b/src/category-theory/faithful-maps-precategories.lagda.md @@ -7,7 +7,6 @@ module category-theory.faithful-maps-precategories where
Imports ```agda -open import category-theory.functors-precategories open import category-theory.maps-precategories open import category-theory.precategories diff --git a/src/category-theory/full-functors-precategories.lagda.md b/src/category-theory/full-functors-precategories.lagda.md index b5f808eb3e..eae23c838f 100644 --- a/src/category-theory/full-functors-precategories.lagda.md +++ b/src/category-theory/full-functors-precategories.lagda.md @@ -9,17 +9,10 @@ module category-theory.full-functors-precategories where ```agda open import category-theory.full-maps-precategories open import category-theory.functors-precategories -open import category-theory.isomorphisms-in-precategories -open import category-theory.maps-precategories open import category-theory.precategories -open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types -open import foundation.embeddings -open import foundation.equivalences open import foundation.function-types -open import foundation.identity-types -open import foundation.injective-maps open import foundation.propositions open import foundation.universe-levels ``` diff --git a/src/category-theory/full-maps-precategories.lagda.md b/src/category-theory/full-maps-precategories.lagda.md index ff66787da8..aac8e8fb73 100644 --- a/src/category-theory/full-maps-precategories.lagda.md +++ b/src/category-theory/full-maps-precategories.lagda.md @@ -7,15 +7,11 @@ module category-theory.full-maps-precategories where
Imports ```agda -open import category-theory.functors-precategories open import category-theory.maps-precategories open import category-theory.precategories open import foundation.dependent-pair-types -open import foundation.embeddings -open import foundation.equivalences open import foundation.function-types -open import foundation.injective-maps open import foundation.propositions open import foundation.surjective-maps open import foundation.universe-levels diff --git a/src/category-theory/full-subcategories.lagda.md b/src/category-theory/full-subcategories.lagda.md index 5a351c3c94..16db93e6eb 100644 --- a/src/category-theory/full-subcategories.lagda.md +++ b/src/category-theory/full-subcategories.lagda.md @@ -9,28 +9,21 @@ module category-theory.full-subcategories where ```agda open import category-theory.categories open import category-theory.embeddings-precategories -open import category-theory.faithful-functors-precategories -open import category-theory.faithful-maps-precategories open import category-theory.full-subprecategories open import category-theory.fully-faithful-functors-precategories open import category-theory.functors-categories -open import category-theory.functors-precategories open import category-theory.isomorphisms-in-categories open import category-theory.isomorphisms-in-precategories open import category-theory.maps-categories -open import category-theory.maps-precategories open import category-theory.precategories -open import category-theory.subcategories open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.equivalences open import foundation.function-types -open import foundation.fundamental-theorem-of-identity-types open import foundation.identity-types open import foundation.propositions open import foundation.sets -open import foundation.subtype-identity-principle open import foundation.subtypes open import foundation.universe-levels ``` diff --git a/src/category-theory/full-subprecategories.lagda.md b/src/category-theory/full-subprecategories.lagda.md index 38eb94f874..e5fcb0e0fc 100644 --- a/src/category-theory/full-subprecategories.lagda.md +++ b/src/category-theory/full-subprecategories.lagda.md @@ -9,15 +9,12 @@ module category-theory.full-subprecategories where ```agda open import category-theory.categories open import category-theory.embeddings-precategories -open import category-theory.faithful-functors-precategories -open import category-theory.faithful-maps-precategories open import category-theory.fully-faithful-functors-precategories open import category-theory.functors-precategories open import category-theory.isomorphisms-in-categories open import category-theory.isomorphisms-in-precategories open import category-theory.maps-precategories open import category-theory.precategories -open import category-theory.subprecategories open import foundation.dependent-pair-types open import foundation.embeddings diff --git a/src/category-theory/fully-faithful-functors-precategories.lagda.md b/src/category-theory/fully-faithful-functors-precategories.lagda.md index 9ca36f19d0..13ac4dfc30 100644 --- a/src/category-theory/fully-faithful-functors-precategories.lagda.md +++ b/src/category-theory/fully-faithful-functors-precategories.lagda.md @@ -11,16 +11,11 @@ open import category-theory.faithful-functors-precategories open import category-theory.full-functors-precategories open import category-theory.fully-faithful-maps-precategories open import category-theory.functors-precategories -open import category-theory.isomorphisms-in-precategories open import category-theory.precategories -open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types -open import foundation.embeddings open import foundation.equivalences open import foundation.function-types -open import foundation.identity-types -open import foundation.injective-maps open import foundation.propositions open import foundation.surjective-maps open import foundation.universe-levels diff --git a/src/category-theory/fully-faithful-maps-precategories.lagda.md b/src/category-theory/fully-faithful-maps-precategories.lagda.md index 4eb65ec5b1..436aa3ecaf 100644 --- a/src/category-theory/fully-faithful-maps-precategories.lagda.md +++ b/src/category-theory/fully-faithful-maps-precategories.lagda.md @@ -9,15 +9,12 @@ module category-theory.fully-faithful-maps-precategories where ```agda open import category-theory.faithful-maps-precategories open import category-theory.full-maps-precategories -open import category-theory.functors-precategories open import category-theory.maps-precategories open import category-theory.precategories open import foundation.dependent-pair-types -open import foundation.embeddings open import foundation.equivalences open import foundation.function-types -open import foundation.injective-maps open import foundation.propositions open import foundation.surjective-maps open import foundation.universe-levels diff --git a/src/category-theory/isomorphism-induction-categories.lagda.md b/src/category-theory/isomorphism-induction-categories.lagda.md index e69d93f845..061af3c3d2 100644 --- a/src/category-theory/isomorphism-induction-categories.lagda.md +++ b/src/category-theory/isomorphism-induction-categories.lagda.md @@ -12,9 +12,6 @@ open import category-theory.isomorphisms-in-categories open import foundation.contractible-types open import foundation.dependent-pair-types -open import foundation.identity-systems -open import foundation.subuniverses -open import foundation.univalence open import foundation.universal-property-dependent-pair-types open import foundation.universe-levels diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md index 2b6d26ef1a..24d1d80329 100644 --- a/src/category-theory/preunivalent-categories.lagda.md +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -13,7 +13,6 @@ open import category-theory.precategories open import foundation.1-types open import foundation.dependent-pair-types open import foundation.embeddings -open import foundation.equivalences open import foundation.identity-types open import foundation.propositions open import foundation.sets diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index 092e636ae1..21957d2ca8 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -8,34 +8,23 @@ module category-theory.subcategories where ```agda open import category-theory.categories -open import category-theory.embeddings-precategories open import category-theory.faithful-functors-precategories -open import category-theory.functors-categories open import category-theory.functors-precategories open import category-theory.isomorphism-induction-categories open import category-theory.isomorphisms-in-categories open import category-theory.isomorphisms-in-precategories -open import category-theory.maps-categories open import category-theory.maps-precategories open import category-theory.precategories -open import category-theory.preunivalent-categories open import category-theory.subprecategories -open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.embeddings -open import foundation.equivalences open import foundation.function-types -open import foundation.fundamental-theorem-of-identity-types -open import foundation.homotopies open import foundation.identity-types open import foundation.propositions open import foundation.sets open import foundation.singleton-induction -open import foundation.structure-identity-principle -open import foundation.subtype-identity-principle open import foundation.subtypes -open import foundation.transport-along-identifications open import foundation.universe-levels ``` diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index ea03985a9d..199cb24148 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -7,9 +7,7 @@ module category-theory.subprecategories where
Imports ```agda -open import category-theory.embeddings-precategories open import category-theory.faithful-functors-precategories -open import category-theory.faithful-maps-precategories open import category-theory.functors-precategories open import category-theory.maps-precategories open import category-theory.precategories diff --git a/src/order-theory/precategory-of-finite-posets.lagda.md b/src/order-theory/precategory-of-finite-posets.lagda.md index d992226f6e..e475f7c516 100644 --- a/src/order-theory/precategory-of-finite-posets.lagda.md +++ b/src/order-theory/precategory-of-finite-posets.lagda.md @@ -11,8 +11,6 @@ open import category-theory.full-large-subprecategories open import category-theory.large-precategories open import category-theory.precategories -open import foundation.cartesian-product-types -open import foundation.propositions open import foundation.universe-levels open import order-theory.finite-posets diff --git a/src/order-theory/precategory-of-finite-total-orders.lagda.md b/src/order-theory/precategory-of-finite-total-orders.lagda.md index 9e98270f0f..918834f04d 100644 --- a/src/order-theory/precategory-of-finite-total-orders.lagda.md +++ b/src/order-theory/precategory-of-finite-total-orders.lagda.md @@ -11,13 +11,10 @@ open import category-theory.full-large-subprecategories open import category-theory.large-precategories open import category-theory.precategories -open import foundation.cartesian-product-types -open import foundation.propositions open import foundation.universe-levels open import order-theory.finite-total-orders open import order-theory.precategory-of-posets -open import order-theory.precategory-of-total-orders ```
diff --git a/src/order-theory/precategory-of-inhabited-finite-total-orders.lagda.md b/src/order-theory/precategory-of-inhabited-finite-total-orders.lagda.md index d71b8d8b7e..397a77dda8 100644 --- a/src/order-theory/precategory-of-inhabited-finite-total-orders.lagda.md +++ b/src/order-theory/precategory-of-inhabited-finite-total-orders.lagda.md @@ -11,14 +11,10 @@ open import category-theory.full-large-subprecategories open import category-theory.large-precategories open import category-theory.precategories -open import foundation.cartesian-product-types -open import foundation.propositions open import foundation.universe-levels -open import order-theory.finite-total-orders open import order-theory.inhabited-finite-total-orders open import order-theory.precategory-of-posets -open import order-theory.precategory-of-total-orders ```
From d7b00e7a2cc481f90375c825377dcb1d4be828cc Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 02:46:43 +0200 Subject: [PATCH 19/89] remove unused imports --- src/order-theory/finite-total-orders.lagda.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/order-theory/finite-total-orders.lagda.md b/src/order-theory/finite-total-orders.lagda.md index 5d960e0ae0..91f43ea066 100644 --- a/src/order-theory/finite-total-orders.lagda.md +++ b/src/order-theory/finite-total-orders.lagda.md @@ -14,7 +14,6 @@ open import foundation.propositions open import foundation.universe-levels open import order-theory.finite-posets -open import order-theory.finite-preorders open import order-theory.posets open import order-theory.total-orders From c81a9c5a3bd9de8f32cf8f7c6110c1d4e13c5309 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 13:05:16 +0200 Subject: [PATCH 20/89] subsingleton induction --- src/category-theory/subcategories.lagda.md | 17 ++-- .../singleton-induction.lagda.md | 14 +-- src/foundation.lagda.md | 1 + src/foundation/contractible-types.lagda.md | 10 +- src/foundation/singleton-induction.lagda.md | 74 +++++--------- .../subsingleton-induction.lagda.md | 97 +++++++++++++++++++ ...e-arithmetic-dependent-pair-types.lagda.md | 8 +- 7 files changed, 147 insertions(+), 74 deletions(-) create mode 100644 src/foundation/subsingleton-induction.lagda.md diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index 21957d2ca8..7fe77fcbfa 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -23,7 +23,7 @@ open import foundation.function-types open import foundation.identity-types open import foundation.propositions open import foundation.sets -open import foundation.singleton-induction +open import foundation.subsingleton-induction open import foundation.subtypes open import foundation.universe-levels ``` @@ -366,7 +366,6 @@ module _ contains-is-iso-Subcategory : is-iso-Subcategory C P f contains-is-iso-Subcategory = ind-iso-Category C - { inclusion-obj-Subcategory C P x} ( λ Y e → ( p : is-in-obj-Subcategory C P Y) ( q : @@ -375,20 +374,20 @@ module _ ( Y) ( hom-iso-Category C e)) → is-iso-Subcategory C P {x} {Y , p} (hom-iso-Category C e , q)) - ( ( ind-singleton-is-prop - ( contains-id-Subcategory C P - ( inclusion-obj-Subcategory C P x) - ( is-in-obj-inclusion-obj-Subcategory C P x)) + ( ( ind-subsingleton ( is-prop-is-in-hom-Subcategory C P ( inclusion-obj-Subcategory C P x) ( inclusion-obj-Subcategory C P x) ( id-hom-Category C)) - ( λ q → is-iso-Subcategory C P (id-hom-Category C , q))) ∘ - ( ind-singleton-is-prop - ( is-in-obj-inclusion-obj-Subcategory C P x) + ( λ q → is-iso-Subcategory C P (id-hom-Category C , q)) + ( contains-id-Subcategory C P + ( inclusion-obj-Subcategory C P x) + ( is-in-obj-inclusion-obj-Subcategory C P x))) ∘ + ( ind-subsingleton ( is-prop-is-in-obj-Subcategory C P ( inclusion-obj-Subcategory C P x)) ( _) + ( is-in-obj-inclusion-obj-Subcategory C P x) ( is-iso-id-hom-Precategory (precategory-Subcategory C P) {x}))) ( inclusion-hom-Subcategory C P x y f , is-iso-f) ( is-in-obj-inclusion-obj-Subcategory C P y) diff --git a/src/foundation-core/singleton-induction.lagda.md b/src/foundation-core/singleton-induction.lagda.md index 636f391214..6fd39c4753 100644 --- a/src/foundation-core/singleton-induction.lagda.md +++ b/src/foundation-core/singleton-induction.lagda.md @@ -51,25 +51,25 @@ compute-ind-is-singleton a H B = pr2 (H B) ### A type satisfies singleton induction if and only if it is contractible ```agda -ind-singleton-is-contr : +ind-singleton : {l1 l2 : Level} {A : UU l1} (a : A) (is-contr-A : is-contr A) (B : A → UU l2) → B a → (x : A) → B x -ind-singleton-is-contr a is-contr-A B b x = +ind-singleton a is-contr-A B b x = tr B ((inv (contraction is-contr-A a)) ∙ (contraction is-contr-A x)) b -compute-ind-singleton-is-contr : +compute-ind-singleton : {l1 l2 : Level} {A : UU l1} (a : A) (is-contr-A : is-contr A) (B : A → UU l2) → - ((ev-point a {B}) ∘ (ind-singleton-is-contr a is-contr-A B)) ~ id -compute-ind-singleton-is-contr a is-contr-A B b = + ((ev-point a {B}) ∘ (ind-singleton a is-contr-A B)) ~ id +compute-ind-singleton a is-contr-A B b = ap (λ ω → tr B ω b) (left-inv (contraction is-contr-A a)) is-singleton-is-contr : {l1 l2 : Level} {A : UU l1} (a : A) → is-contr A → is-singleton l2 A a pr1 (is-singleton-is-contr a is-contr-A B) = - ind-singleton-is-contr a is-contr-A B + ind-singleton a is-contr-A B pr2 (is-singleton-is-contr a is-contr-A B) = - compute-ind-singleton-is-contr a is-contr-A B + compute-ind-singleton a is-contr-A B abstract is-contr-ind-singleton : diff --git a/src/foundation.lagda.md b/src/foundation.lagda.md index c9860687d7..b7cc4add14 100644 --- a/src/foundation.lagda.md +++ b/src/foundation.lagda.md @@ -267,6 +267,7 @@ open import foundation.strongly-extensional-maps public open import foundation.structure public open import foundation.structure-identity-principle public open import foundation.structured-type-duality public +open import foundation.subsingleton-induction public open import foundation.subterminal-types public open import foundation.subtype-duality public open import foundation.subtype-identity-principle public diff --git a/src/foundation/contractible-types.lagda.md b/src/foundation/contractible-types.lagda.md index 211b99fc95..60102a7b8c 100644 --- a/src/foundation/contractible-types.lagda.md +++ b/src/foundation/contractible-types.lagda.md @@ -227,13 +227,13 @@ module _ {l : Level} → dependent-universal-property-contr l a dependent-universal-property-contr-is-contr a H {l} P = is-equiv-is-invertible - ( ind-singleton-is-contr a H P) - ( compute-ind-singleton-is-contr a H P) + ( ind-singleton a H P) + ( compute-ind-singleton a H P) ( λ f → eq-htpy - ( ind-singleton-is-contr a H - ( λ x → ind-singleton-is-contr a H P (f a) x = f x) - ( compute-ind-singleton-is-contr a H P (f a)))) + ( ind-singleton a H + ( λ x → ind-singleton a H P (f a) x = f x) + ( compute-ind-singleton a H P (f a)))) equiv-dependent-universal-property-contr : (a : A) → is-contr A → {l : Level} (B : A → UU l) → ((x : A) → B x) ≃ B a diff --git a/src/foundation/singleton-induction.lagda.md b/src/foundation/singleton-induction.lagda.md index 5a64763545..09200608ef 100644 --- a/src/foundation/singleton-induction.lagda.md +++ b/src/foundation/singleton-induction.lagda.md @@ -24,12 +24,15 @@ open import foundation-core.transport-along-identifications ## Idea -Singleton induction on a type `A` equipped with a point `a : A` is a principle -analogous to the induction principle of the unit type. A type satisfies -singleton induction if and only if it is contractible. +**Singleton induction** on a type `A` equipped with a point `a : A` is a +principle analogous to the induction principle of the +[unit type](foundation.unit-type.md). A type satisfies singleton induction if +and only if it is [contractible](foundation-core.contractible-types.md). ## Definition +### Singleton induction + ```agda is-singleton : (l1 : Level) {l2 : Level} (A : UU l2) → A → UU (lsuc l1 ⊔ l2) @@ -49,30 +52,34 @@ compute-ind-is-singleton a H B = pr2 (H B) ## Properties -### A type satisfies singleton induction if and only if it is contractible +### Contractible types satisfy singleton induction ```agda abstract - ind-singleton-is-contr : + ind-singleton : {l1 l2 : Level} {A : UU l1} (a : A) (is-contr-A : is-contr A) (B : A → UU l2) → B a → (x : A) → B x - ind-singleton-is-contr a is-contr-A B b x = + ind-singleton a is-contr-A B b x = tr B (inv (contraction is-contr-A a) ∙ contraction is-contr-A x) b abstract - compute-ind-singleton-is-contr : + compute-ind-singleton : {l1 l2 : Level} {A : UU l1} (a : A) (is-contr-A : is-contr A) (B : A → UU l2) → - (ev-point a {B} ∘ ind-singleton-is-contr a is-contr-A B) ~ id - compute-ind-singleton-is-contr a is-contr-A B b = + (ev-point a {B} ∘ ind-singleton a is-contr-A B) ~ id + compute-ind-singleton a is-contr-A B b = ap (λ p → tr B p b) (left-inv (contraction is-contr-A a)) +``` +### A type satisfies singleton induction if and only if it is contractible + +```agda is-singleton-is-contr : {l1 l2 : Level} {A : UU l1} (a : A) → is-contr A → is-singleton l2 A a pr1 (is-singleton-is-contr a is-contr-A B) = - ind-singleton-is-contr a is-contr-A B + ind-singleton a is-contr-A B pr2 (is-singleton-is-contr a is-contr-A B) = - compute-ind-singleton-is-contr a is-contr-A B + compute-ind-singleton a is-contr-A B abstract is-contr-ind-singleton : @@ -88,42 +95,6 @@ abstract is-contr-is-singleton A a S = is-contr-ind-singleton A a (pr1 ∘ S) ``` -### Singleton induction for propositions - -```agda -abstract - ind-singleton-is-prop : - {l1 l2 : Level} {A : UU l1} (a : A) (is-prop-A : is-prop A) - (B : A → UU l2) → B a → (x : A) → B x - ind-singleton-is-prop a is-prop-A = - ind-singleton-is-contr a (is-proof-irrelevant-is-prop is-prop-A a) - -abstract - compute-ind-singleton-is-prop : - {l1 l2 : Level} {A : UU l1} - (a : A) (is-prop-A : is-prop A) (B : A → UU l2) → - (ev-point a {B} ∘ ind-singleton-is-prop a is-prop-A B) ~ id - compute-ind-singleton-is-prop a is-prop-A = - compute-ind-singleton-is-contr a (is-proof-irrelevant-is-prop is-prop-A a) - -is-singleton-is-prop : - {l1 l2 : Level} {A : UU l1} (a : A) → is-prop A → is-singleton l2 A a -is-singleton-is-prop a is-prop-A = - is-singleton-is-contr a (is-proof-irrelevant-is-prop is-prop-A a) - -abstract - is-prop-ind-singleton : - {l1 : Level} (A : UU l1) (a : A) → - ({l2 : Level} (P : A → UU l2) → P a → (x : A) → P x) → is-prop A - is-prop-ind-singleton A a S = is-prop-is-contr (is-contr-ind-singleton A a S) - -abstract - is-prop-is-singleton : - {l1 : Level} (A : UU l1) (a : A) → - ({l2 : Level} → is-singleton l2 A a) → is-prop A - is-prop-is-singleton A a S = is-prop-ind-singleton A a (pr1 ∘ S) -``` - ## Examples ### The total space of an identity type satisfies singleton induction @@ -132,7 +103,12 @@ abstract abstract is-singleton-total-path : {l1 l2 : Level} (A : UU l1) (a : A) → - is-singleton l2 (Σ A (λ x → a = x)) (pair a refl) - pr1 (is-singleton-total-path A a B) = ind-Σ ∘ (ind-Id a _) + is-singleton l2 (Σ A (λ x → a = x)) (a , refl) + pr1 (is-singleton-total-path A a B) = ind-Σ ∘ ind-Id a _ pr2 (is-singleton-total-path A a B) = refl-htpy ``` + +## See also + +- The equivalent principle of + [subsingleton induction](foundation.subsingleton-induction.md) diff --git a/src/foundation/subsingleton-induction.lagda.md b/src/foundation/subsingleton-induction.lagda.md new file mode 100644 index 0000000000..61c5f19477 --- /dev/null +++ b/src/foundation/subsingleton-induction.lagda.md @@ -0,0 +1,97 @@ +# Subsingleton induction + +```agda +module foundation.subsingleton-induction where +``` + +
Imports + +```agda +open import foundation.action-on-identifications-functions +open import foundation.dependent-pair-types +open import foundation.singleton-induction +open import foundation.universe-levels + +open import foundation-core.contractible-types +open import foundation-core.function-types +open import foundation-core.homotopies +open import foundation-core.identity-types +open import foundation-core.propositions +open import foundation-core.sections +open import foundation-core.transport-along-identifications +``` + +
+ +## Idea + +**Subsingleton induction** on a type `A` equipped with an element `a : A` is a +slight variant of [singleton induction](foundation.singleton-induction.md) which +in turn is a principle analogous to induction for the +[unit type](foundation.unit-type.md). Subsingleton induction uses the +observation that a type equipped with an element is +[contractible](foundation-core.contractible-types.md) if and only if it is a +[proposition](foundation-core.propositions.md). + +## Definition + +### Subsingleton induction + +```agda +is-subsingleton : + (l1 : Level) {l2 : Level} (A : UU l2) → UU (lsuc l1 ⊔ l2) +is-subsingleton l A = (B : A → UU l) (a : A) → section (ev-point a {B}) + +ind-is-subsingleton : + {l1 l2 : Level} {A : UU l1} → + ({l : Level} → is-subsingleton l A) → (B : A → UU l2) (a : A) → + B a → (x : A) → B x +ind-is-subsingleton is-subsingleton-A B a = pr1 (is-subsingleton-A B a) + +compute-ind-is-subsingleton : + {l1 l2 : Level} {A : UU l1} (H : {l : Level} → is-subsingleton l A) → + (B : A → UU l2) (a : A) → (ev-point a {B} ∘ ind-is-subsingleton H B a) ~ id +compute-ind-is-subsingleton is-subsingleton-A B a = pr2 (is-subsingleton-A B a) +``` + +## Properties + +### Propositions satisfy subsingleton induction + +```agda +abstract + ind-subsingleton : + {l1 l2 : Level} {A : UU l1} (is-prop-A : is-prop A) + (B : A → UU l2) → (a : A) → B a → (x : A) → B x + ind-subsingleton is-prop-A B a = + ind-singleton a (is-proof-irrelevant-is-prop is-prop-A a) B + +abstract + compute-ind-subsingleton : + {l1 l2 : Level} {A : UU l1} + (is-prop-A : is-prop A) (B : A → UU l2) (a : A) → + (ev-point a {B} ∘ ind-subsingleton is-prop-A B a) ~ id + compute-ind-subsingleton is-prop-A B a = + compute-ind-singleton a (is-proof-irrelevant-is-prop is-prop-A a) B +``` + +### A type satisfies subsingleton induction if and only if it is a proposition + +```agda +is-subsingleton-is-prop : + {l1 l2 : Level} {A : UU l1} → is-prop A → (a : A) → is-singleton l2 A a +is-subsingleton-is-prop is-prop-A a = + is-singleton-is-contr a (is-proof-irrelevant-is-prop is-prop-A a) + +abstract + is-prop-ind-singleton : + {l1 : Level} (A : UU l1) (a : A) → + ({l2 : Level} (P : A → UU l2) → P a → (x : A) → P x) → is-prop A + is-prop-ind-singleton A a S = is-prop-is-contr (is-contr-ind-singleton A a S) + +abstract + is-prop-is-subsingleton : + {l1 : Level} (A : UU l1) (a : A) → + ({l2 : Level} → is-singleton l2 A a) → is-prop A + is-prop-is-subsingleton A a S = is-prop-ind-singleton A a (pr1 ∘ S) +``` diff --git a/src/foundation/type-arithmetic-dependent-pair-types.lagda.md b/src/foundation/type-arithmetic-dependent-pair-types.lagda.md index 51c2cd68dd..2645dad961 100644 --- a/src/foundation/type-arithmetic-dependent-pair-types.lagda.md +++ b/src/foundation/type-arithmetic-dependent-pair-types.lagda.md @@ -45,7 +45,7 @@ module _ map-left-unit-law-Σ-is-contr : Σ A B → B a map-left-unit-law-Σ-is-contr = ind-Σ - ( ind-singleton-is-contr a C + ( ind-singleton a C ( λ x → B x → B a) ( id)) @@ -54,13 +54,13 @@ module _ is-section-map-inv-left-unit-law-Σ-is-contr b = ap ( λ (f : B a → B a) → f b) - ( compute-ind-singleton-is-contr a C (λ x → B x → B a) id) + ( compute-ind-singleton a C (λ x → B x → B a) id) is-retraction-map-inv-left-unit-law-Σ-is-contr : ( map-inv-left-unit-law-Σ-is-contr ∘ map-left-unit-law-Σ-is-contr) ~ id is-retraction-map-inv-left-unit-law-Σ-is-contr = ind-Σ - ( ind-singleton-is-contr a C + ( ind-singleton a C ( λ x → ( y : B x) → Id @@ -72,7 +72,7 @@ module _ ( map-inv-left-unit-law-Σ-is-contr) ( ap ( λ f → f y) - ( compute-ind-singleton-is-contr a C (λ x → B x → B a) id)))) + ( compute-ind-singleton a C (λ x → B x → B a) id)))) is-equiv-map-left-unit-law-Σ-is-contr : is-equiv map-left-unit-law-Σ-is-contr From 14c441eaf184977018322ce18f3975c680cae7a2 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 13:34:53 +0200 Subject: [PATCH 21/89] explanation (sub)singleton induction --- src/foundation/singleton-induction.lagda.md | 3 +++ src/foundation/subsingleton-induction.lagda.md | 15 +++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/foundation/singleton-induction.lagda.md b/src/foundation/singleton-induction.lagda.md index 09200608ef..5ca96f3fac 100644 --- a/src/foundation/singleton-induction.lagda.md +++ b/src/foundation/singleton-induction.lagda.md @@ -29,6 +29,9 @@ principle analogous to the induction principle of the [unit type](foundation.unit-type.md). A type satisfies singleton induction if and only if it is [contractible](foundation-core.contractible-types.md). +Singelton induction states that given a type family `P` over `A`, to construct a +section of `P` it suffices to construct a section over `a`. + ## Definition ### Singleton induction diff --git a/src/foundation/subsingleton-induction.lagda.md b/src/foundation/subsingleton-induction.lagda.md index 61c5f19477..ac91a89635 100644 --- a/src/foundation/subsingleton-induction.lagda.md +++ b/src/foundation/subsingleton-induction.lagda.md @@ -25,14 +25,17 @@ open import foundation-core.transport-along-identifications ## Idea -**Subsingleton induction** on a type `A` equipped with an element `a : A` is a -slight variant of [singleton induction](foundation.singleton-induction.md) which -in turn is a principle analogous to induction for the -[unit type](foundation.unit-type.md). Subsingleton induction uses the -observation that a type equipped with an element is -[contractible](foundation-core.contractible-types.md) if and only if it is a +**Subsingleton induction** on a type `A` is a slight variant of +[singleton induction](foundation.singleton-induction.md) which in turn is a +principle analogous to induction for the [unit type](foundation.unit-type.md). +Subsingleton induction uses the observation that a type equipped with an element +is [contractible](foundation-core.contractible-types.md) if and only if it is a [proposition](foundation-core.propositions.md). +Subsingelton induction states that given a type family `P` over `A`, to +construct a section of `P` it suffices to provide a section over `a` for some +`a : A`. + ## Definition ### Subsingleton induction From 6a317e9b7c44d9668423761c8e1aa8f9e5b08b5a Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 13:36:35 +0200 Subject: [PATCH 22/89] consistent variable naming --- src/foundation/singleton-induction.lagda.md | 6 +++--- src/foundation/subsingleton-induction.lagda.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/foundation/singleton-induction.lagda.md b/src/foundation/singleton-induction.lagda.md index 5ca96f3fac..bce8c67f2f 100644 --- a/src/foundation/singleton-induction.lagda.md +++ b/src/foundation/singleton-induction.lagda.md @@ -29,8 +29,8 @@ principle analogous to the induction principle of the [unit type](foundation.unit-type.md). A type satisfies singleton induction if and only if it is [contractible](foundation-core.contractible-types.md). -Singelton induction states that given a type family `P` over `A`, to construct a -section of `P` it suffices to construct a section over `a`. +Singelton induction states that given a type family `B` over `A`, to construct a +section of `B` it suffices to construct a section over `a`. ## Definition @@ -87,7 +87,7 @@ pr2 (is-singleton-is-contr a is-contr-A B) = abstract is-contr-ind-singleton : {l1 : Level} (A : UU l1) (a : A) → - ({l2 : Level} (P : A → UU l2) → P a → (x : A) → P x) → is-contr A + ({l2 : Level} (B : A → UU l2) → B a → (x : A) → B x) → is-contr A pr1 (is-contr-ind-singleton A a S) = a pr2 (is-contr-ind-singleton A a S) = S (λ x → a = x) refl diff --git a/src/foundation/subsingleton-induction.lagda.md b/src/foundation/subsingleton-induction.lagda.md index ac91a89635..71ee1db622 100644 --- a/src/foundation/subsingleton-induction.lagda.md +++ b/src/foundation/subsingleton-induction.lagda.md @@ -32,8 +32,8 @@ Subsingleton induction uses the observation that a type equipped with an element is [contractible](foundation-core.contractible-types.md) if and only if it is a [proposition](foundation-core.propositions.md). -Subsingelton induction states that given a type family `P` over `A`, to -construct a section of `P` it suffices to provide a section over `a` for some +Subsingelton induction states that given a type family `B` over `A`, to +construct a section of `B` it suffices to provide a section over `a` for some `a : A`. ## Definition @@ -89,7 +89,7 @@ is-subsingleton-is-prop is-prop-A a = abstract is-prop-ind-singleton : {l1 : Level} (A : UU l1) (a : A) → - ({l2 : Level} (P : A → UU l2) → P a → (x : A) → P x) → is-prop A + ({l2 : Level} (B : A → UU l2) → B a → (x : A) → B x) → is-prop A is-prop-ind-singleton A a S = is-prop-is-contr (is-contr-ind-singleton A a S) abstract From 87f4a92bf547a811407b6c2715741ff8ba38b760 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 15:25:16 +0200 Subject: [PATCH 23/89] use `Full-Subprecategory` definitions --- .../full-subcategories.lagda.md | 114 +++++++++--------- .../full-subprecategories.lagda.md | 7 ++ 2 files changed, 64 insertions(+), 57 deletions(-) diff --git a/src/category-theory/full-subcategories.lagda.md b/src/category-theory/full-subcategories.lagda.md index 16db93e6eb..46d2d2fc78 100644 --- a/src/category-theory/full-subcategories.lagda.md +++ b/src/category-theory/full-subcategories.lagda.md @@ -56,29 +56,31 @@ module _ where subtype-obj-Full-Subcategory : subtype l3 (obj-Category C) - subtype-obj-Full-Subcategory = P + subtype-obj-Full-Subcategory = + subtype-obj-Full-Subprecategory (precategory-Category C) P obj-Full-Subcategory : UU (l1 ⊔ l3) - obj-Full-Subcategory = type-subtype subtype-obj-Full-Subcategory + obj-Full-Subcategory = obj-Full-Subprecategory (precategory-Category C) P inclusion-obj-Full-Subcategory : obj-Full-Subcategory → obj-Category C inclusion-obj-Full-Subcategory = - inclusion-subtype subtype-obj-Full-Subcategory + inclusion-obj-Full-Subprecategory (precategory-Category C) P is-in-obj-Full-Subcategory : (x : obj-Category C) → UU l3 - is-in-obj-Full-Subcategory = is-in-subtype subtype-obj-Full-Subcategory + is-in-obj-Full-Subcategory = + is-in-obj-Full-Subprecategory (precategory-Category C) P is-prop-is-in-obj-Full-Subcategory : (x : obj-Category C) → is-prop (is-in-obj-Full-Subcategory x) is-prop-is-in-obj-Full-Subcategory = - is-prop-is-in-subtype subtype-obj-Full-Subcategory + is-prop-is-in-obj-Full-Subprecategory (precategory-Category C) P is-in-obj-inclusion-obj-Full-Subcategory : (x : obj-Full-Subcategory) → is-in-obj-Full-Subcategory (inclusion-obj-Full-Subcategory x) is-in-obj-inclusion-obj-Full-Subcategory = - is-in-subtype-inclusion-subtype subtype-obj-Full-Subcategory + is-in-obj-inclusion-obj-Full-Subprecategory (precategory-Category C) P ``` ### The precategory structure of a full subcategory @@ -91,29 +93,29 @@ module _ where hom-set-Full-Subcategory : (x y : obj-Full-Subcategory C P) → Set l2 - hom-set-Full-Subcategory x y = - hom-set-Category C - ( inclusion-obj-Full-Subcategory C P x) - ( inclusion-obj-Full-Subcategory C P y) + hom-set-Full-Subcategory = + hom-set-Full-Subprecategory (precategory-Category C) P hom-Full-Subcategory : (x y : obj-Full-Subcategory C P) → UU l2 - hom-Full-Subcategory x y = type-Set (hom-set-Full-Subcategory x y) + hom-Full-Subcategory = hom-Full-Subprecategory (precategory-Category C) P is-set-hom-Full-Subcategory : (x y : obj-Full-Subcategory C P) → is-set (hom-Full-Subcategory x y) - is-set-hom-Full-Subcategory x y = - is-set-type-Set (hom-set-Full-Subcategory x y) + is-set-hom-Full-Subcategory = + is-set-hom-Full-Subprecategory (precategory-Category C) P id-hom-Full-Subcategory : {x : obj-Full-Subcategory C P} → hom-Full-Subcategory x x - id-hom-Full-Subcategory = id-hom-Category C + id-hom-Full-Subcategory {x} = + id-hom-Full-Subprecategory (precategory-Category C) P {x} comp-hom-Full-Subcategory : {x y z : obj-Full-Subcategory C P} → hom-Full-Subcategory y z → hom-Full-Subcategory x y → hom-Full-Subcategory x z - comp-hom-Full-Subcategory = comp-hom-Category C + comp-hom-Full-Subcategory {x} {y} {z} = + comp-hom-Full-Subprecategory (precategory-Category C) P {x} {y} {z} associative-comp-hom-Full-Subcategory : {x y z w : obj-Full-Subcategory C P} @@ -124,8 +126,9 @@ module _ ( comp-hom-Full-Subcategory {y} {z} {w} h g) f) = ( comp-hom-Full-Subcategory {x} {z} {w} h ( comp-hom-Full-Subcategory {x} {y} {z} g f)) - associative-comp-hom-Full-Subcategory = - associative-comp-hom-Category C + associative-comp-hom-Full-Subcategory {x} {y} {z} {w} = + associative-comp-hom-Full-Subprecategory + ( precategory-Category C) P {x} {y} {z} {w} left-unit-law-comp-hom-Full-Subcategory : {x y : obj-Full-Subcategory C P} @@ -134,8 +137,9 @@ module _ ( id-hom-Full-Subcategory {y}) ( f) = f - left-unit-law-comp-hom-Full-Subcategory = - left-unit-law-comp-hom-Category C + left-unit-law-comp-hom-Full-Subcategory {x} {y} = + left-unit-law-comp-hom-Full-Subprecategory + ( precategory-Category C) P {x} {y} right-unit-law-comp-hom-Full-Subcategory : {x y : obj-Full-Subcategory C P} @@ -144,34 +148,29 @@ module _ ( f) ( id-hom-Full-Subcategory {x}) = f - right-unit-law-comp-hom-Full-Subcategory = - right-unit-law-comp-hom-Category C + right-unit-law-comp-hom-Full-Subcategory {x} {y} = + right-unit-law-comp-hom-Full-Subprecategory + ( precategory-Category C) P {x} {y} associative-composition-structure-Full-Subcategory : associative-composition-structure-Set hom-set-Full-Subcategory - pr1 associative-composition-structure-Full-Subcategory {x} {y} {z} = - comp-hom-Full-Subcategory {x} {y} {z} - pr2 associative-composition-structure-Full-Subcategory {x} {y} {z} {w} = - associative-comp-hom-Full-Subcategory {x} {y} {z} {w} + associative-composition-structure-Full-Subcategory = + associative-composition-structure-Full-Subprecategory + ( precategory-Category C) + ( P) is-unital-composition-structure-Full-Subcategory : is-unital-composition-structure-Set ( hom-set-Full-Subcategory) ( associative-composition-structure-Full-Subcategory) - pr1 is-unital-composition-structure-Full-Subcategory x = - id-hom-Full-Subcategory {x} - pr1 (pr2 is-unital-composition-structure-Full-Subcategory) {x} {y} = - left-unit-law-comp-hom-Full-Subcategory {x} {y} - pr2 (pr2 is-unital-composition-structure-Full-Subcategory) {x} {y} = - right-unit-law-comp-hom-Full-Subcategory {x} {y} + is-unital-composition-structure-Full-Subcategory = + is-unital-composition-structure-Full-Subprecategory + ( precategory-Category C) + ( P) precategory-Full-Subcategory : Precategory (l1 ⊔ l3) l2 - pr1 precategory-Full-Subcategory = obj-Full-Subcategory C P - pr1 (pr2 precategory-Full-Subcategory) = hom-set-Full-Subcategory - pr1 (pr2 (pr2 precategory-Full-Subcategory)) = - associative-composition-structure-Full-Subcategory - pr2 (pr2 (pr2 precategory-Full-Subcategory)) = - is-unital-composition-structure-Full-Subcategory + precategory-Full-Subcategory = + precategory-Full-Subprecategory (precategory-Category C) P ``` ### Isomorphisms in full subcategories @@ -183,15 +182,13 @@ module _ (P : Full-Subcategory l3 C) where - iso-Full-Subcategory : - (X Y : obj-Full-Subcategory C P) → UU l2 - iso-Full-Subcategory X Y = - iso-Category C (inclusion-subtype P X) (inclusion-subtype P Y) + iso-Full-Subcategory : (X Y : obj-Full-Subcategory C P) → UU l2 + iso-Full-Subcategory = iso-Full-Subprecategory (precategory-Category C) P iso-eq-Full-Subcategory : (X Y : obj-Full-Subcategory C P) → X = Y → iso-Full-Subcategory X Y iso-eq-Full-Subcategory = - iso-eq-Precategory (precategory-Full-Subcategory C P) + iso-eq-Full-Subprecategory (precategory-Category C) P ``` ## Properties @@ -221,24 +218,21 @@ module _ inclusion-map-Full-Subcategory : map-Category (category-Full-Subcategory C P) C - pr1 inclusion-map-Full-Subcategory = inclusion-obj-Full-Subcategory C P - pr2 inclusion-map-Full-Subcategory = id + inclusion-map-Full-Subcategory = + inclusion-map-Full-Subprecategory (precategory-Category C) P is-functor-inclusion-Full-Subcategory : is-functor-map-Category ( category-Full-Subcategory C P) ( C) ( inclusion-map-Full-Subcategory) - pr1 is-functor-inclusion-Full-Subcategory g f = refl - pr2 is-functor-inclusion-Full-Subcategory x = refl + is-functor-inclusion-Full-Subcategory = + is-functor-inclusion-Full-Subprecategory (precategory-Category C) P inclusion-Full-Subcategory : functor-Category (category-Full-Subcategory C P) C - pr1 inclusion-Full-Subcategory = - inclusion-obj-Full-Subcategory C P - pr1 (pr2 inclusion-Full-Subcategory) = id - pr2 (pr2 inclusion-Full-Subcategory) = - is-functor-inclusion-Full-Subcategory + inclusion-Full-Subcategory = + inclusion-Full-Subprecategory (precategory-Category C) P module _ {l1 l2 l3 : Level} @@ -251,7 +245,8 @@ module _ ( precategory-Full-Subcategory C P) ( precategory-Category C) ( inclusion-Full-Subcategory C P) - is-fully-faithful-inclusion-Full-Subcategory x y = is-equiv-id + is-fully-faithful-inclusion-Full-Subcategory = + is-fully-faithful-inclusion-Full-Subprecategory (precategory-Category C) P is-emb-obj-inclusion-Full-Subcategory : is-emb @@ -260,15 +255,20 @@ module _ ( C) ( inclusion-Full-Subcategory C P)) is-emb-obj-inclusion-Full-Subcategory = - is-emb-inclusion-subtype (subtype-obj-Full-Subcategory C P) + is-emb-obj-inclusion-Full-Subprecategory (precategory-Category C) P is-embedding-inclusion-Full-Subcategory : is-embedding-functor-Precategory ( precategory-Full-Subcategory C P) ( precategory-Category C) ( inclusion-Full-Subcategory C P) - pr1 is-embedding-inclusion-Full-Subcategory = - is-emb-obj-inclusion-Full-Subcategory - pr2 is-embedding-inclusion-Full-Subcategory = - is-fully-faithful-inclusion-Full-Subcategory + is-embedding-inclusion-Full-Subcategory = + is-embedding-inclusion-Full-Subprecategory (precategory-Category C) P + + embedding-Full-Subcategory : + embedding-Precategory + ( precategory-Full-Subcategory C P) + ( precategory-Category C) + embedding-Full-Subcategory = + embedding-Full-Subprecategory (precategory-Category C) P ``` diff --git a/src/category-theory/full-subprecategories.lagda.md b/src/category-theory/full-subprecategories.lagda.md index e5fcb0e0fc..159e69ac3e 100644 --- a/src/category-theory/full-subprecategories.lagda.md +++ b/src/category-theory/full-subprecategories.lagda.md @@ -290,4 +290,11 @@ module _ is-emb-obj-inclusion-Full-Subprecategory pr2 is-embedding-inclusion-Full-Subprecategory = is-fully-faithful-inclusion-Full-Subprecategory + + embedding-Full-Subprecategory : + embedding-Precategory + ( precategory-Full-Subprecategory C P) + ( C) + pr1 embedding-Full-Subprecategory = inclusion-Full-Subprecategory C P + pr2 embedding-Full-Subprecategory = is-embedding-inclusion-Full-Subprecategory ``` From d92715bbfe53a9bccf450831ed851a2cb20b3ed7 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 16:31:27 +0200 Subject: [PATCH 24/89] nonunital precategories --- src/category-theory.lagda.md | 1 + .../augmented-simplex-category.lagda.md | 14 +- src/category-theory/categories.lagda.md | 10 +- .../dependent-products-of-categories.lagda.md | 6 +- ...pendent-products-of-precategories.lagda.md | 4 +- .../full-subcategories.lagda.md | 10 +- .../full-subprecategories.lagda.md | 14 +- .../function-categories.lagda.md | 6 +- .../function-precategories.lagda.md | 6 +- .../nonunital-precategories.lagda.md | 255 ++++++++++++++++++ .../one-object-precategories.lagda.md | 14 +- src/category-theory/precategories.lagda.md | 96 +------ .../precategory-of-functors.lagda.md | 14 +- ...precategory-of-maps-precategories.lagda.md | 14 +- .../preunivalent-categories.lagda.md | 10 +- .../representing-arrow-category.lagda.md | 14 +- src/category-theory/simplex-category.lagda.md | 14 +- src/category-theory/subcategories.lagda.md | 10 +- src/category-theory/subprecategories.lagda.md | 14 +- 19 files changed, 353 insertions(+), 173 deletions(-) create mode 100644 src/category-theory/nonunital-precategories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index dcbe23e916..3d82b269c5 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -93,6 +93,7 @@ open import category-theory.natural-transformations-functors-precategories publi open import category-theory.natural-transformations-maps-categories public open import category-theory.natural-transformations-maps-from-small-to-large-precategories public open import category-theory.natural-transformations-maps-precategories public +open import category-theory.nonunital-precategories public open import category-theory.one-object-precategories public open import category-theory.opposite-precategories public open import category-theory.precategories public diff --git a/src/category-theory/augmented-simplex-category.lagda.md b/src/category-theory/augmented-simplex-category.lagda.md index 03eaf5a276..13f90d95dd 100644 --- a/src/category-theory/augmented-simplex-category.lagda.md +++ b/src/category-theory/augmented-simplex-category.lagda.md @@ -112,15 +112,15 @@ right-unit-law-comp-hom-augmented-simplex-Category : right-unit-law-comp-hom-augmented-simplex-Category {n} {m} = right-unit-law-comp-hom-Poset (Fin-Poset n) (Fin-Poset m) -is-unital-composition-structure-augmented-simplex-Category : - is-unital-composition-structure-Set +is-unital-composition-operation-augmented-simplex-Category : + is-unital-composition-operation-Set ( hom-set-augmented-simplex-Category) - ( associative-composition-structure-augmented-simplex-Category) -pr1 is-unital-composition-structure-augmented-simplex-Category = + ( λ {n} {m} {r} → comp-hom-augmented-simplex-Category {n} {m} {r}) +pr1 is-unital-composition-operation-augmented-simplex-Category = id-hom-augmented-simplex-Category -pr1 (pr2 is-unital-composition-structure-augmented-simplex-Category) {n} {m} = +pr1 (pr2 is-unital-composition-operation-augmented-simplex-Category) {n} {m} = left-unit-law-comp-hom-augmented-simplex-Category {n} {m} -pr2 (pr2 is-unital-composition-structure-augmented-simplex-Category) {n} {m} = +pr2 (pr2 is-unital-composition-operation-augmented-simplex-Category) {n} {m} = right-unit-law-comp-hom-augmented-simplex-Category {n} {m} augmented-simplex-Precategory : Precategory lzero lzero @@ -129,7 +129,7 @@ pr1 (pr2 augmented-simplex-Precategory) = hom-set-augmented-simplex-Category pr1 (pr2 (pr2 augmented-simplex-Precategory)) = associative-composition-structure-augmented-simplex-Category pr2 (pr2 (pr2 augmented-simplex-Precategory)) = - is-unital-composition-structure-augmented-simplex-Category + is-unital-composition-operation-augmented-simplex-Category ``` ### The augmented simplex category diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index b6f529c779..220fe85870 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -110,12 +110,10 @@ module _ right-unit-law-comp-hom-Category = right-unit-law-comp-hom-Precategory precategory-Category - is-unital-composition-structure-Category : - is-unital-composition-structure-Set - hom-set-Category - associative-composition-structure-Category - is-unital-composition-structure-Category = - is-unital-composition-structure-Precategory precategory-Category + is-unital-composition-operation-Category : + is-unital-composition-operation-Set hom-set-Category comp-hom-Category + is-unital-composition-operation-Category = + is-unital-composition-operation-Precategory precategory-Category is-category-Category : is-category-Precategory precategory-Category diff --git a/src/category-theory/dependent-products-of-categories.lagda.md b/src/category-theory/dependent-products-of-categories.lagda.md index 6c44867c5b..3bea6aa8bf 100644 --- a/src/category-theory/dependent-products-of-categories.lagda.md +++ b/src/category-theory/dependent-products-of-categories.lagda.md @@ -107,10 +107,8 @@ module _ right-unit-law-comp-hom-Category Π-Category is-unital-Π-Category : - is-unital-composition-structure-Set - hom-set-Π-Category - associative-composition-structure-Π-Category - is-unital-Π-Category = is-unital-composition-structure-Category Π-Category + is-unital-composition-operation-Set hom-set-Π-Category comp-hom-Π-Category + is-unital-Π-Category = is-unital-composition-operation-Category Π-Category extensionality-obj-Π-Category : (x y : obj-Category Π-Category) → (x = y) ≃ iso-Category Π-Category x y diff --git a/src/category-theory/dependent-products-of-precategories.lagda.md b/src/category-theory/dependent-products-of-precategories.lagda.md index 16acf7a123..863e15ad2f 100644 --- a/src/category-theory/dependent-products-of-precategories.lagda.md +++ b/src/category-theory/dependent-products-of-precategories.lagda.md @@ -86,9 +86,9 @@ module _ eq-htpy (λ i → right-unit-law-comp-hom-Precategory (C i) (f i)) is-unital-Π-Precategory : - is-unital-composition-structure-Set + is-unital-composition-operation-Set hom-set-Π-Precategory - associative-composition-structure-Π-Precategory + comp-hom-Π-Precategory pr1 is-unital-Π-Precategory x = id-hom-Π-Precategory pr1 (pr2 is-unital-Π-Precategory) = left-unit-law-comp-hom-Π-Precategory pr2 (pr2 is-unital-Π-Precategory) = right-unit-law-comp-hom-Π-Precategory diff --git a/src/category-theory/full-subcategories.lagda.md b/src/category-theory/full-subcategories.lagda.md index 46d2d2fc78..12212aef27 100644 --- a/src/category-theory/full-subcategories.lagda.md +++ b/src/category-theory/full-subcategories.lagda.md @@ -159,12 +159,12 @@ module _ ( precategory-Category C) ( P) - is-unital-composition-structure-Full-Subcategory : - is-unital-composition-structure-Set + is-unital-composition-operation-Full-Subcategory : + is-unital-composition-operation-Set ( hom-set-Full-Subcategory) - ( associative-composition-structure-Full-Subcategory) - is-unital-composition-structure-Full-Subcategory = - is-unital-composition-structure-Full-Subprecategory + ( λ {x} {y} {z} → comp-hom-Full-Subcategory {x} {y} {z}) + is-unital-composition-operation-Full-Subcategory = + is-unital-composition-operation-Full-Subprecategory ( precategory-Category C) ( P) diff --git a/src/category-theory/full-subprecategories.lagda.md b/src/category-theory/full-subprecategories.lagda.md index 159e69ac3e..ecc40a409a 100644 --- a/src/category-theory/full-subprecategories.lagda.md +++ b/src/category-theory/full-subprecategories.lagda.md @@ -155,15 +155,15 @@ module _ pr2 associative-composition-structure-Full-Subprecategory {x} {y} {z} {w} = associative-comp-hom-Full-Subprecategory {x} {y} {z} {w} - is-unital-composition-structure-Full-Subprecategory : - is-unital-composition-structure-Set + is-unital-composition-operation-Full-Subprecategory : + is-unital-composition-operation-Set ( hom-set-Full-Subprecategory) - ( associative-composition-structure-Full-Subprecategory) - pr1 is-unital-composition-structure-Full-Subprecategory x = + ( λ {x} {y} {z} → comp-hom-Full-Subprecategory {x} {y} {z}) + pr1 is-unital-composition-operation-Full-Subprecategory x = id-hom-Full-Subprecategory {x} - pr1 (pr2 is-unital-composition-structure-Full-Subprecategory) {x} {y} = + pr1 (pr2 is-unital-composition-operation-Full-Subprecategory) {x} {y} = left-unit-law-comp-hom-Full-Subprecategory {x} {y} - pr2 (pr2 is-unital-composition-structure-Full-Subprecategory) {x} {y} = + pr2 (pr2 is-unital-composition-operation-Full-Subprecategory) {x} {y} = right-unit-law-comp-hom-Full-Subprecategory {x} {y} precategory-Full-Subprecategory : Precategory (l1 ⊔ l3) l2 @@ -172,7 +172,7 @@ module _ pr1 (pr2 (pr2 precategory-Full-Subprecategory)) = associative-composition-structure-Full-Subprecategory pr2 (pr2 (pr2 precategory-Full-Subprecategory)) = - is-unital-composition-structure-Full-Subprecategory + is-unital-composition-operation-Full-Subprecategory ``` ### Isomorphisms in full subprecategories diff --git a/src/category-theory/function-categories.lagda.md b/src/category-theory/function-categories.lagda.md index dd833763aa..7bd39eade2 100644 --- a/src/category-theory/function-categories.lagda.md +++ b/src/category-theory/function-categories.lagda.md @@ -95,11 +95,11 @@ module _ right-unit-law-comp-hom-Category function-Category is-unital-function-Category : - is-unital-composition-structure-Set + is-unital-composition-operation-Set hom-set-function-Category - associative-composition-structure-function-Category + comp-hom-function-Category is-unital-function-Category = - is-unital-composition-structure-Category function-Category + is-unital-composition-operation-Category function-Category extensionality-obj-function-Category : (x y : obj-Category function-Category) → diff --git a/src/category-theory/function-precategories.lagda.md b/src/category-theory/function-precategories.lagda.md index b9190dc943..25d632bad9 100644 --- a/src/category-theory/function-precategories.lagda.md +++ b/src/category-theory/function-precategories.lagda.md @@ -87,11 +87,11 @@ module _ right-unit-law-comp-hom-Precategory function-Precategory is-unital-function-Precategory : - is-unital-composition-structure-Set + is-unital-composition-operation-Set hom-set-function-Precategory - associative-composition-structure-function-Precategory + comp-hom-function-Precategory is-unital-function-Precategory = - is-unital-composition-structure-Precategory function-Precategory + is-unital-composition-operation-Precategory function-Precategory ``` ### Isomorphisms in the function precategory are fiberwise isomorphisms diff --git a/src/category-theory/nonunital-precategories.lagda.md b/src/category-theory/nonunital-precategories.lagda.md new file mode 100644 index 0000000000..74cc03d176 --- /dev/null +++ b/src/category-theory/nonunital-precategories.lagda.md @@ -0,0 +1,255 @@ +# Nonunital precategories + +```agda +module category-theory.nonunital-precategories where +``` + +
Imports + +```agda +open import foundation.cartesian-product-types +open import foundation.dependent-pair-types +open import foundation.function-extensionality +open import foundation.function-types +open import foundation.identity-types +open import foundation.propositions +open import foundation.sets +open import foundation.subtypes +open import foundation.universe-levels +``` + +
+ +## Idea + +A **nonunital precategory** is a [precategory](category-theory.precategories.md) +that may not have identity maps. Such an object may also rightfully be called a +_semiprecategory_. + +## Definition + +### Associative composition structures on sets + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (hom : A → A → Set l2) + where + + composition-operation-Set : UU (l1 ⊔ l2) + composition-operation-Set = + {x y z : A} → type-Set (hom y z) → type-Set (hom x y) → type-Set (hom x z) + + associativity-composition-operation-Set : + composition-operation-Set → UU (l1 ⊔ l2) + associativity-composition-operation-Set μ = + {x y z w : A} (h : type-Set (hom z w)) (g : type-Set (hom y z)) + (f : type-Set (hom x y)) → μ (μ h g) f = μ h (μ g f) + + associative-composition-structure-Set : UU (l1 ⊔ l2) + associative-composition-structure-Set = + Σ ( composition-operation-Set) + ( associativity-composition-operation-Set) +``` + +### Nonunital precategories + +```agda +Nonunital-Precategory : + (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2) +Nonunital-Precategory l1 l2 = + Σ ( UU l1) + ( λ A → + Σ ( A → A → Set l2) + ( associative-composition-structure-Set)) + +module _ + {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) + where + + obj-Nonunital-Precategory : UU l1 + obj-Nonunital-Precategory = pr1 C + + hom-set-Nonunital-Precategory : (x y : obj-Nonunital-Precategory) → Set l2 + hom-set-Nonunital-Precategory = pr1 (pr2 C) + + hom-Nonunital-Precategory : (x y : obj-Nonunital-Precategory) → UU l2 + hom-Nonunital-Precategory x y = type-Set (hom-set-Nonunital-Precategory x y) + + is-set-hom-Nonunital-Precategory : + (x y : obj-Nonunital-Precategory) → is-set (hom-Nonunital-Precategory x y) + is-set-hom-Nonunital-Precategory x y = + is-set-type-Set (hom-set-Nonunital-Precategory x y) + + associative-composition-structure-Nonunital-Precategory : + associative-composition-structure-Set hom-set-Nonunital-Precategory + associative-composition-structure-Nonunital-Precategory = pr2 (pr2 C) + + comp-hom-Nonunital-Precategory : + {x y z : obj-Nonunital-Precategory} → + hom-Nonunital-Precategory y z → + hom-Nonunital-Precategory x y → + hom-Nonunital-Precategory x z + comp-hom-Nonunital-Precategory = + pr1 associative-composition-structure-Nonunital-Precategory + + comp-hom-Nonunital-Precategory' : + {x y z : obj-Nonunital-Precategory} → + hom-Nonunital-Precategory x y → + hom-Nonunital-Precategory y z → + hom-Nonunital-Precategory x z + comp-hom-Nonunital-Precategory' f g = comp-hom-Nonunital-Precategory g f + + associative-comp-hom-Nonunital-Precategory : + {x y z w : obj-Nonunital-Precategory} + (h : hom-Nonunital-Precategory z w) + (g : hom-Nonunital-Precategory y z) + (f : hom-Nonunital-Precategory x y) → + ( comp-hom-Nonunital-Precategory (comp-hom-Nonunital-Precategory h g) f) = + ( comp-hom-Nonunital-Precategory h (comp-hom-Nonunital-Precategory g f)) + associative-comp-hom-Nonunital-Precategory = + pr2 associative-composition-structure-Nonunital-Precategory +``` + +### The total hom-type of a nonunital precategory + +```agda +total-hom-Nonunital-Precategory : + {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) → UU (l1 ⊔ l2) +total-hom-Nonunital-Precategory C = + Σ ( obj-Nonunital-Precategory C) + ( λ x → Σ (obj-Nonunital-Precategory C) (hom-Nonunital-Precategory C x)) + +obj-total-hom-Nonunital-Precategory : + {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) → + total-hom-Nonunital-Precategory C → + obj-Nonunital-Precategory C × obj-Nonunital-Precategory C +pr1 (obj-total-hom-Nonunital-Precategory C (x , y , f)) = x +pr2 (obj-total-hom-Nonunital-Precategory C (x , y , f)) = y +``` + +### Precomposition by a morphism + +```agda +precomp-hom-Nonunital-Precategory : + {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) + {x y : obj-Nonunital-Precategory C} + (f : hom-Nonunital-Precategory C x y) (z : obj-Nonunital-Precategory C) → + hom-Nonunital-Precategory C y z → hom-Nonunital-Precategory C x z +precomp-hom-Nonunital-Precategory C f z g = comp-hom-Nonunital-Precategory C g f +``` + +### Postcomposition by a morphism + +```agda +postcomp-hom-Nonunital-Precategory : + {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) + {x y : obj-Nonunital-Precategory C} + (f : hom-Nonunital-Precategory C x y) (z : obj-Nonunital-Precategory C) → + hom-Nonunital-Precategory C z x → hom-Nonunital-Precategory C z y +postcomp-hom-Nonunital-Precategory C f z = comp-hom-Nonunital-Precategory C f +``` + +### Unital composition structures + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (hom : A → A → Set l2) + where + + is-unital-composition-operation-Set : + composition-operation-Set hom → UU (l1 ⊔ l2) + is-unital-composition-operation-Set μ = + Σ ( (x : A) → type-Set (hom x x)) + ( λ e → + ( {x y : A} (f : type-Set (hom x y)) → μ (e y) f = f) × + ( {x y : A} (f : type-Set (hom x y)) → μ f (e x) = f)) + +module _ + {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) + where + + is-unital-Nonunital-Precategory : UU (l1 ⊔ l2) + is-unital-Nonunital-Precategory = + is-unital-composition-operation-Set + ( hom-set-Nonunital-Precategory C) + ( comp-hom-Nonunital-Precategory C) +``` + +## Properties + +### Being unital is a property + +Suppose `e e' : (x : A) → hom x x` are both right and left units with regard to +composition. It is enough to show that `e = e'` since the right and left unit +laws are propositions (because all hom-types are sets). By function +extensionality, it is enough to show that `e x = e' x` for all `x : A`. But by +the unit laws we have the following chain of equalities: +`e x = (e' x) ∘ (e x) = e' x.` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (hom : A → A → Set l2) + where + + abstract + all-elements-equal-is-unital-composition-operation-Set : + ( μ : composition-operation-Set hom) → + all-elements-equal (is-unital-composition-operation-Set hom μ) + all-elements-equal-is-unital-composition-operation-Set + ( μ) + ( e , left-unit-law-e , right-unit-law-e) + ( e' , left-unit-law-e' , right-unit-law-e') = + eq-type-subtype + ( λ x → + prod-Prop + ( Π-Prop' A + ( λ a → + Π-Prop' A + ( λ b → + Π-Prop + ( type-Set (hom a b)) + ( λ f' → Id-Prop (hom a b) (μ (x b) f') f')))) + ( Π-Prop' A + ( λ a → + Π-Prop' A + ( λ b → + Π-Prop + ( type-Set (hom a b)) + ( λ f' → Id-Prop (hom a b) (μ f' (x a)) f'))))) + ( eq-htpy + ( λ x → inv (left-unit-law-e' (e x)) ∙ right-unit-law-e (e' x))) + + is-prop-is-unital-composition-operation-Set : + ( μ : composition-operation-Set hom) → + is-prop (is-unital-composition-operation-Set hom μ) + is-prop-is-unital-composition-operation-Set μ = + is-prop-all-elements-equal + ( all-elements-equal-is-unital-composition-operation-Set μ) + + is-unital-prop-composition-operation-Set : + ( μ : composition-operation-Set hom) → Prop (l1 ⊔ l2) + pr1 (is-unital-prop-composition-operation-Set μ) = + is-unital-composition-operation-Set hom μ + pr2 (is-unital-prop-composition-operation-Set μ) = + is-prop-is-unital-composition-operation-Set μ + +module _ + {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) + where + + is-prop-is-unital-Nonunital-Precategory : + is-prop + ( is-unital-composition-operation-Set + ( hom-set-Nonunital-Precategory C) + ( comp-hom-Nonunital-Precategory C)) + is-prop-is-unital-Nonunital-Precategory = + is-prop-is-unital-composition-operation-Set + ( hom-set-Nonunital-Precategory C) + ( comp-hom-Nonunital-Precategory C) + + is-unital-prop-Nonunital-Precategory : Prop (l1 ⊔ l2) + is-unital-prop-Nonunital-Precategory = + is-unital-prop-composition-operation-Set + ( hom-set-Nonunital-Precategory C) + ( comp-hom-Nonunital-Precategory C) +``` diff --git a/src/category-theory/one-object-precategories.lagda.md b/src/category-theory/one-object-precategories.lagda.md index 94483f34cb..3ea1015631 100644 --- a/src/category-theory/one-object-precategories.lagda.md +++ b/src/category-theory/one-object-precategories.lagda.md @@ -123,15 +123,15 @@ module _ right-unit-law-comp-hom-one-object-precategory-Monoid {star} {star} = right-unit-law-mul-Monoid M - is-unital-composition-structure-one-object-precategory-Monoid : - is-unital-composition-structure-Set + is-unital-composition-operation-one-object-precategory-Monoid : + is-unital-composition-operation-Set hom-set-one-object-precategory-Monoid - associative-composition-structure-one-object-precategory-Monoid - pr1 is-unital-composition-structure-one-object-precategory-Monoid = + comp-hom-one-object-precategory-Monoid + pr1 is-unital-composition-operation-one-object-precategory-Monoid = id-hom-one-object-precategory-Monoid - pr1 (pr2 is-unital-composition-structure-one-object-precategory-Monoid) = + pr1 (pr2 is-unital-composition-operation-one-object-precategory-Monoid) = left-unit-law-comp-hom-one-object-precategory-Monoid - pr2 (pr2 is-unital-composition-structure-one-object-precategory-Monoid) = + pr2 (pr2 is-unital-composition-operation-one-object-precategory-Monoid) = right-unit-law-comp-hom-one-object-precategory-Monoid precategory-one-object-precategory-Monoid : Precategory lzero l @@ -141,7 +141,7 @@ module _ pr1 (pr2 (pr2 precategory-one-object-precategory-Monoid)) = associative-composition-structure-one-object-precategory-Monoid pr2 (pr2 (pr2 precategory-one-object-precategory-Monoid)) = - is-unital-composition-structure-one-object-precategory-Monoid + is-unital-composition-operation-one-object-precategory-Monoid one-object-precategory-Monoid : One-Object-Precategory lzero l pr1 one-object-precategory-Monoid = precategory-one-object-precategory-Monoid diff --git a/src/category-theory/precategories.lagda.md b/src/category-theory/precategories.lagda.md index e6804555a4..db18d37062 100644 --- a/src/category-theory/precategories.lagda.md +++ b/src/category-theory/precategories.lagda.md @@ -2,11 +2,15 @@ ```agda module category-theory.precategories where + +open import category-theory.nonunital-precategories public ```
Imports ```agda +open import category-theory.nonunital-precategories + open import foundation.cartesian-product-types open import foundation.dependent-pair-types open import foundation.function-extensionality @@ -41,26 +45,6 @@ identities between the objects are exactly the isomorphisms. ## Definition ```agda -module _ - {l1 l2 : Level} {A : UU l1} (hom : A → A → Set l2) - where - - associative-composition-structure-Set : UU (l1 ⊔ l2) - associative-composition-structure-Set = - Σ ( {x y z : A} → - type-Set (hom y z) → type-Set (hom x y) → type-Set (hom x z)) - ( λ μ → - {x y z w : A} (h : type-Set (hom z w)) (g : type-Set (hom y z)) - (f : type-Set (hom x y)) → μ (μ h g) f = μ h (μ g f)) - - is-unital-composition-structure-Set : - associative-composition-structure-Set → UU (l1 ⊔ l2) - is-unital-composition-structure-Set μ = - Σ ( (x : A) → type-Set (hom x x)) - ( λ e → - ( {x y : A} (f : type-Set (hom x y)) → pr1 μ (e y) f = f) × - ( {x y : A} (f : type-Set (hom x y)) → pr1 μ f (e x) = f)) - Precategory : (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2) Precategory l1 l2 = @@ -69,7 +53,7 @@ Precategory l1 l2 = Σ ( A → A → Set l2) ( λ hom → Σ ( associative-composition-structure-Set hom) - ( is-unital-composition-structure-Set hom))) + ( λ μ → is-unital-composition-operation-Set hom (pr1 μ)))) module _ {l1 l2 : Level} (C : Precategory l1 l2) @@ -116,26 +100,26 @@ module _ associative-comp-hom-Precategory = pr2 associative-composition-structure-Precategory - is-unital-composition-structure-Precategory : - is-unital-composition-structure-Set + is-unital-composition-operation-Precategory : + is-unital-composition-operation-Set hom-set-Precategory - associative-composition-structure-Precategory - is-unital-composition-structure-Precategory = pr2 (pr2 (pr2 C)) + comp-hom-Precategory + is-unital-composition-operation-Precategory = pr2 (pr2 (pr2 C)) id-hom-Precategory : {x : obj-Precategory} → hom-Precategory x x - id-hom-Precategory {x} = pr1 is-unital-composition-structure-Precategory x + id-hom-Precategory {x} = pr1 is-unital-composition-operation-Precategory x left-unit-law-comp-hom-Precategory : {x y : obj-Precategory} (f : hom-Precategory x y) → comp-hom-Precategory id-hom-Precategory f = f left-unit-law-comp-hom-Precategory = - pr1 (pr2 is-unital-composition-structure-Precategory) + pr1 (pr2 is-unital-composition-operation-Precategory) right-unit-law-comp-hom-Precategory : {x y : obj-Precategory} (f : hom-Precategory x y) → comp-hom-Precategory f id-hom-Precategory = f right-unit-law-comp-hom-Precategory = - pr2 (pr2 is-unital-composition-structure-Precategory) + pr2 (pr2 is-unital-composition-operation-Precategory) ``` ### The total hom-type of a precategory @@ -189,59 +173,3 @@ module _ (x y : obj-Precategory C) → x = y → hom-Precategory C y x hom-inv-eq-Precategory x y = hom-eq-Precategory y x ∘ inv ``` - -## Properties - -### The property of having identity morphisms is a proposition - -Suppose `e e' : (x : A) → hom x x` are both right and left units with regard to -composition. It is enough to show that `e = e'` since the right and left unit -laws are propositions (because all hom-types are sets). By function -extensionality, it is enough to show that `e x = e' x` for all `x : A`. But by -the unit laws we have the following chain of equalities: -`e x = (e' x) ∘ (e x) = e' x.` - -```agda -module _ - {l1 l2 : Level} {A : UU l1} (hom : A → A → Set l2) - where - - abstract - all-elements-equal-is-unital-composition-structure-Set : - ( μ : associative-composition-structure-Set hom) → - all-elements-equal (is-unital-composition-structure-Set hom μ) - all-elements-equal-is-unital-composition-structure-Set - ( pair μ associative-μ) - ( pair e (pair left-unit-law-e right-unit-law-e)) - ( pair e' (pair left-unit-law-e' right-unit-law-e')) = - eq-type-subtype - ( λ x → - prod-Prop - ( Π-Prop' A - ( λ a → - Π-Prop' A - ( λ b → - Π-Prop - ( type-Set (hom a b)) - ( λ f' → - Id-Prop (hom a b) (μ (x b) f') f')))) - ( Π-Prop' A - ( λ a → - Π-Prop' A - ( λ b → - Π-Prop - ( type-Set (hom a b)) - ( λ f' → - Id-Prop (hom a b) (μ f' (x a)) f'))))) - ( eq-htpy - ( λ x → - ( inv (left-unit-law-e' (e x))) ∙ - ( right-unit-law-e (e' x)))) - - is-prop-is-unital-composition-structure-Set : - ( μ : associative-composition-structure-Set hom) → - is-prop (is-unital-composition-structure-Set hom μ) - is-prop-is-unital-composition-structure-Set μ = - is-prop-all-elements-equal - ( all-elements-equal-is-unital-composition-structure-Set μ) -``` diff --git a/src/category-theory/precategory-of-functors.lagda.md b/src/category-theory/precategory-of-functors.lagda.md index f42784d714..2943342830 100644 --- a/src/category-theory/precategory-of-functors.lagda.md +++ b/src/category-theory/precategory-of-functors.lagda.md @@ -99,18 +99,18 @@ module _ right-unit-law-comp-hom-functor-precategory-Precategory {F} {G} = right-unit-law-comp-natural-transformation-Precategory C D F G - is-unital-composition-structure-functor-precategory-Precategory : - is-unital-composition-structure-Set + is-unital-composition-operation-functor-precategory-Precategory : + is-unital-composition-operation-Set ( natural-transformation-set-Precategory C D) - ( associative-composition-structure-functor-precategory-Precategory) - pr1 is-unital-composition-structure-functor-precategory-Precategory = + ( λ {F} {G} {H} → comp-hom-functor-precategory-Precategory {F} {G} {H}) + pr1 is-unital-composition-operation-functor-precategory-Precategory = id-hom-functor-precategory-Precategory pr1 - ( pr2 is-unital-composition-structure-functor-precategory-Precategory) + ( pr2 is-unital-composition-operation-functor-precategory-Precategory) { F} {G} = left-unit-law-comp-hom-functor-precategory-Precategory {F} {G} pr2 - ( pr2 is-unital-composition-structure-functor-precategory-Precategory) + ( pr2 is-unital-composition-operation-functor-precategory-Precategory) { F} {G} = right-unit-law-comp-hom-functor-precategory-Precategory {F} {G} @@ -122,7 +122,7 @@ module _ pr1 (pr2 (pr2 functor-precategory-Precategory)) = associative-composition-structure-functor-precategory-Precategory pr2 (pr2 (pr2 functor-precategory-Precategory)) = - is-unital-composition-structure-functor-precategory-Precategory + is-unital-composition-operation-functor-precategory-Precategory ``` ## Properties diff --git a/src/category-theory/precategory-of-maps-precategories.lagda.md b/src/category-theory/precategory-of-maps-precategories.lagda.md index 6cc2ef6e9b..faca32bc1c 100644 --- a/src/category-theory/precategory-of-maps-precategories.lagda.md +++ b/src/category-theory/precategory-of-maps-precategories.lagda.md @@ -99,18 +99,18 @@ module _ right-unit-law-comp-hom-map-precategory-Precategory {F} {G} = right-unit-law-comp-natural-transformation-map-Precategory C D F G - is-unital-composition-structure-map-precategory-Precategory : - is-unital-composition-structure-Set + is-unital-composition-operation-map-precategory-Precategory : + is-unital-composition-operation-Set ( natural-transformation-map-set-Precategory C D) - ( associative-composition-structure-map-precategory-Precategory) - pr1 is-unital-composition-structure-map-precategory-Precategory = + ( comp-hom-map-precategory-Precategory) + pr1 is-unital-composition-operation-map-precategory-Precategory = id-hom-map-precategory-Precategory pr1 - ( pr2 is-unital-composition-structure-map-precategory-Precategory) + ( pr2 is-unital-composition-operation-map-precategory-Precategory) { F} {G} = left-unit-law-comp-hom-map-precategory-Precategory {F} {G} pr2 - ( pr2 is-unital-composition-structure-map-precategory-Precategory) + ( pr2 is-unital-composition-operation-map-precategory-Precategory) { F} {G} = right-unit-law-comp-hom-map-precategory-Precategory {F} {G} @@ -122,7 +122,7 @@ module _ pr1 (pr2 (pr2 map-precategory-Precategory)) = associative-composition-structure-map-precategory-Precategory pr2 (pr2 (pr2 map-precategory-Precategory)) = - is-unital-composition-structure-map-precategory-Precategory + is-unital-composition-operation-map-precategory-Precategory ``` ## Properties diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md index 24d1d80329..e6fbba0297 100644 --- a/src/category-theory/preunivalent-categories.lagda.md +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -126,12 +126,12 @@ module _ right-unit-law-comp-hom-Preunivalent-Category = right-unit-law-comp-hom-Precategory precategory-Preunivalent-Category - is-unital-composition-structure-Preunivalent-Category : - is-unital-composition-structure-Set + is-unital-composition-operation-Preunivalent-Category : + is-unital-composition-operation-Set hom-set-Preunivalent-Category - associative-composition-structure-Preunivalent-Category - is-unital-composition-structure-Preunivalent-Category = - is-unital-composition-structure-Precategory + comp-hom-Preunivalent-Category + is-unital-composition-operation-Preunivalent-Category = + is-unital-composition-operation-Precategory ( precategory-Preunivalent-Category) is-preunivalent-Preunivalent-Category : diff --git a/src/category-theory/representing-arrow-category.lagda.md b/src/category-theory/representing-arrow-category.lagda.md index 09280c03da..4a40e31d7f 100644 --- a/src/category-theory/representing-arrow-category.lagda.md +++ b/src/category-theory/representing-arrow-category.lagda.md @@ -97,15 +97,15 @@ right-unit-law-comp-hom-representing-arrow : right-unit-law-comp-hom-representing-arrow {true} {true} f = refl right-unit-law-comp-hom-representing-arrow {false} f = refl -is-unital-composition-structure-representing-arrow : - is-unital-composition-structure-Set +is-unital-composition-operation-representing-arrow : + is-unital-composition-operation-Set ( hom-set-representing-arrow) - ( associative-composition-structure-representing-arrow) -pr1 is-unital-composition-structure-representing-arrow x = + ( λ {x} {y} {z} → comp-hom-representing-arrow {x} {y} {z}) +pr1 is-unital-composition-operation-representing-arrow x = id-hom-representing-arrow {x} -pr1 (pr2 is-unital-composition-structure-representing-arrow) = +pr1 (pr2 is-unital-composition-operation-representing-arrow) = left-unit-law-comp-hom-representing-arrow -pr2 (pr2 is-unital-composition-structure-representing-arrow) = +pr2 (pr2 is-unital-composition-operation-representing-arrow) = right-unit-law-comp-hom-representing-arrow representing-arrow-Precategory : Precategory lzero lzero @@ -114,7 +114,7 @@ pr1 (pr2 representing-arrow-Precategory) = hom-set-representing-arrow pr1 (pr2 (pr2 representing-arrow-Precategory)) = associative-composition-structure-representing-arrow pr2 (pr2 (pr2 representing-arrow-Precategory)) = - is-unital-composition-structure-representing-arrow + is-unital-composition-operation-representing-arrow ``` ### The representing arrow category diff --git a/src/category-theory/simplex-category.lagda.md b/src/category-theory/simplex-category.lagda.md index d711836f67..0da1e2c3ad 100644 --- a/src/category-theory/simplex-category.lagda.md +++ b/src/category-theory/simplex-category.lagda.md @@ -103,14 +103,14 @@ right-unit-law-comp-hom-simplex-Category : right-unit-law-comp-hom-simplex-Category {n} {m} = right-unit-law-comp-hom-Poset (Fin-Poset (succ-ℕ n)) (Fin-Poset (succ-ℕ m)) -is-unital-composition-structure-simplex-Category : - is-unital-composition-structure-Set +is-unital-composition-operation-simplex-Category : + is-unital-composition-operation-Set ( hom-set-simplex-Category) - ( associative-composition-structure-simplex-Category) -pr1 is-unital-composition-structure-simplex-Category = id-hom-simplex-Category -pr1 (pr2 is-unital-composition-structure-simplex-Category) {n} {m} = + ( comp-hom-simplex-Category) +pr1 is-unital-composition-operation-simplex-Category = id-hom-simplex-Category +pr1 (pr2 is-unital-composition-operation-simplex-Category) {n} {m} = left-unit-law-comp-hom-simplex-Category {n} {m} -pr2 (pr2 is-unital-composition-structure-simplex-Category) {n} {m} = +pr2 (pr2 is-unital-composition-operation-simplex-Category) {n} {m} = right-unit-law-comp-hom-simplex-Category {n} {m} simplex-Precategory : Precategory lzero lzero @@ -119,7 +119,7 @@ pr1 (pr2 simplex-Precategory) = hom-set-simplex-Category pr1 (pr2 (pr2 simplex-Precategory)) = associative-composition-structure-simplex-Category pr2 (pr2 (pr2 simplex-Precategory)) = - is-unital-composition-structure-simplex-Category + is-unital-composition-operation-simplex-Category ``` ### The simplex category diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index 7fe77fcbfa..858c457db6 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -264,12 +264,12 @@ module _ associative-composition-structure-Subcategory = associative-composition-structure-Subprecategory (precategory-Category C) P - is-unital-composition-structure-Subcategory : - is-unital-composition-structure-Set + is-unital-composition-operation-Subcategory : + is-unital-composition-operation-Set ( hom-set-Subcategory) - ( associative-composition-structure-Subcategory) - is-unital-composition-structure-Subcategory = - is-unital-composition-structure-Subprecategory (precategory-Category C) P + ( comp-hom-Subcategory) + is-unital-composition-operation-Subcategory = + is-unital-composition-operation-Subprecategory (precategory-Category C) P precategory-Subcategory : Precategory (l1 ⊔ l3) (l2 ⊔ l4) precategory-Subcategory = diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index 199cb24148..74e8e52fae 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -336,15 +336,15 @@ module _ pr2 associative-composition-structure-Subprecategory {x} {y} {z} {w} = associative-comp-hom-Subprecategory {x} {y} {z} {w} - is-unital-composition-structure-Subprecategory : - is-unital-composition-structure-Set + is-unital-composition-operation-Subprecategory : + is-unital-composition-operation-Set ( hom-set-Subprecategory) - ( associative-composition-structure-Subprecategory) - pr1 is-unital-composition-structure-Subprecategory x = + ( comp-hom-Subprecategory) + pr1 is-unital-composition-operation-Subprecategory x = id-hom-Subprecategory {x} - pr1 (pr2 is-unital-composition-structure-Subprecategory) {x} {y} = + pr1 (pr2 is-unital-composition-operation-Subprecategory) {x} {y} = left-unit-law-comp-hom-Subprecategory {x} {y} - pr2 (pr2 is-unital-composition-structure-Subprecategory) {x} {y} = + pr2 (pr2 is-unital-composition-operation-Subprecategory) {x} {y} = right-unit-law-comp-hom-Subprecategory {x} {y} precategory-Subprecategory : Precategory (l1 ⊔ l3) (l2 ⊔ l4) @@ -353,7 +353,7 @@ module _ pr1 (pr2 (pr2 precategory-Subprecategory)) = associative-composition-structure-Subprecategory pr2 (pr2 (pr2 precategory-Subprecategory)) = - is-unital-composition-structure-Subprecategory + is-unital-composition-operation-Subprecategory ``` ### The inclusion functor of a subprecategory From cda71461552b0a41ea67095e0ff18c2d5e339e38 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 16:56:47 +0200 Subject: [PATCH 25/89] associativity is a property --- .../nonunital-precategories.lagda.md | 106 ++++++++++++------ 1 file changed, 71 insertions(+), 35 deletions(-) diff --git a/src/category-theory/nonunital-precategories.lagda.md b/src/category-theory/nonunital-precategories.lagda.md index 74cc03d176..c77360f4cb 100644 --- a/src/category-theory/nonunital-precategories.lagda.md +++ b/src/category-theory/nonunital-precategories.lagda.md @@ -32,23 +32,23 @@ _semiprecategory_. ```agda module _ - {l1 l2 : Level} {A : UU l1} (hom : A → A → Set l2) + {l1 l2 : Level} {A : UU l1} (hom-set : A → A → Set l2) where composition-operation-Set : UU (l1 ⊔ l2) composition-operation-Set = - {x y z : A} → type-Set (hom y z) → type-Set (hom x y) → type-Set (hom x z) + {x y z : A} → type-Set (hom-set y z) → type-Set (hom-set x y) → type-Set (hom-set x z) - associativity-composition-operation-Set : + is-associative-composition-operation-Set : composition-operation-Set → UU (l1 ⊔ l2) - associativity-composition-operation-Set μ = - {x y z w : A} (h : type-Set (hom z w)) (g : type-Set (hom y z)) - (f : type-Set (hom x y)) → μ (μ h g) f = μ h (μ g f) + is-associative-composition-operation-Set comp-hom = + {x y z w : A} (h : type-Set (hom-set z w)) (g : type-Set (hom-set y z)) + (f : type-Set (hom-set x y)) → comp-hom (comp-hom h g) f = comp-hom h (comp-hom g f) associative-composition-structure-Set : UU (l1 ⊔ l2) associative-composition-structure-Set = Σ ( composition-operation-Set) - ( associativity-composition-operation-Set) + ( is-associative-composition-operation-Set) ``` ### Nonunital precategories @@ -153,16 +153,16 @@ postcomp-hom-Nonunital-Precategory C f z = comp-hom-Nonunital-Precategory C f ```agda module _ - {l1 l2 : Level} {A : UU l1} (hom : A → A → Set l2) + {l1 l2 : Level} {A : UU l1} (hom-set : A → A → Set l2) where is-unital-composition-operation-Set : - composition-operation-Set hom → UU (l1 ⊔ l2) - is-unital-composition-operation-Set μ = - Σ ( (x : A) → type-Set (hom x x)) + composition-operation-Set hom-set → UU (l1 ⊔ l2) + is-unital-composition-operation-Set comp-hom = + Σ ( (x : A) → type-Set (hom-set x x)) ( λ e → - ( {x y : A} (f : type-Set (hom x y)) → μ (e y) f = f) × - ( {x y : A} (f : type-Set (hom x y)) → μ f (e x) = f)) + ( {x y : A} (f : type-Set (hom-set x y)) → comp-hom (e y) f = f) × + ( {x y : A} (f : type-Set (hom-set x y)) → comp-hom f (e x) = f)) module _ {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) @@ -177,10 +177,48 @@ module _ ## Properties -### Being unital is a property +### Being associative is a property of composition operations in sets -Suppose `e e' : (x : A) → hom x x` are both right and left units with regard to -composition. It is enough to show that `e = e'` since the right and left unit +```agda +module _ + {l1 l2 : Level} {A : UU l1} + (hom-set : A → A → Set l2) (comp-hom : composition-operation-Set hom-set) + where + + associativity-prop-composition-operation-Set : Prop (l1 ⊔ l2) + associativity-prop-composition-operation-Set = + Π-Prop' A + ( λ x → + Π-Prop' A + ( λ y → + Π-Prop' A + ( λ z → + Π-Prop' A + ( λ w → + Π-Prop + ( type-Set (hom-set z w)) + ( λ h → + Π-Prop + ( type-Set (hom-set y z)) + ( λ g → + Π-Prop + ( type-Set (hom-set x y)) + ( λ f → + Id-Prop + ( hom-set x w) + ( comp-hom (comp-hom h g) f) + ( comp-hom h (comp-hom g f))))))))) + + is-prop-is-associative-composition-operation-Set : + is-prop (is-associative-composition-operation-Set hom-set comp-hom) + is-prop-is-associative-composition-operation-Set = + is-prop-type-Prop associativity-prop-composition-operation-Set +``` + +### Being unital is a property of composition operations in sets + +Suppose `e e' : (x : A) → hom-set x x` are both right and left units with regard +to composition. It is enough to show that `e = e'` since the right and left unit laws are propositions (because all hom-types are sets). By function extensionality, it is enough to show that `e x = e' x` for all `x : A`. But by the unit laws we have the following chain of equalities: @@ -188,15 +226,15 @@ the unit laws we have the following chain of equalities: ```agda module _ - {l1 l2 : Level} {A : UU l1} (hom : A → A → Set l2) + {l1 l2 : Level} {A : UU l1} + (hom-set : A → A → Set l2) + ( comp-hom : composition-operation-Set hom-set) where abstract all-elements-equal-is-unital-composition-operation-Set : - ( μ : composition-operation-Set hom) → - all-elements-equal (is-unital-composition-operation-Set hom μ) + all-elements-equal (is-unital-composition-operation-Set hom-set comp-hom) all-elements-equal-is-unital-composition-operation-Set - ( μ) ( e , left-unit-law-e , right-unit-law-e) ( e' , left-unit-law-e' , right-unit-law-e') = eq-type-subtype @@ -207,31 +245,29 @@ module _ Π-Prop' A ( λ b → Π-Prop - ( type-Set (hom a b)) - ( λ f' → Id-Prop (hom a b) (μ (x b) f') f')))) + ( type-Set (hom-set a b)) + ( λ f' → Id-Prop (hom-set a b) (comp-hom (x b) f') f')))) ( Π-Prop' A ( λ a → Π-Prop' A ( λ b → Π-Prop - ( type-Set (hom a b)) - ( λ f' → Id-Prop (hom a b) (μ f' (x a)) f'))))) + ( type-Set (hom-set a b)) + ( λ f' → Id-Prop (hom-set a b) (comp-hom f' (x a)) f'))))) ( eq-htpy ( λ x → inv (left-unit-law-e' (e x)) ∙ right-unit-law-e (e' x))) is-prop-is-unital-composition-operation-Set : - ( μ : composition-operation-Set hom) → - is-prop (is-unital-composition-operation-Set hom μ) - is-prop-is-unital-composition-operation-Set μ = + is-prop (is-unital-composition-operation-Set hom-set comp-hom) + is-prop-is-unital-composition-operation-Set = is-prop-all-elements-equal - ( all-elements-equal-is-unital-composition-operation-Set μ) - - is-unital-prop-composition-operation-Set : - ( μ : composition-operation-Set hom) → Prop (l1 ⊔ l2) - pr1 (is-unital-prop-composition-operation-Set μ) = - is-unital-composition-operation-Set hom μ - pr2 (is-unital-prop-composition-operation-Set μ) = - is-prop-is-unital-composition-operation-Set μ + all-elements-equal-is-unital-composition-operation-Set + + is-unital-prop-composition-operation-Set : Prop (l1 ⊔ l2) + pr1 is-unital-prop-composition-operation-Set = + is-unital-composition-operation-Set hom-set comp-hom + pr2 is-unital-prop-composition-operation-Set = + is-prop-is-unital-composition-operation-Set module _ {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) From b4270922df160602eb8ef2e1b2afe6cd85b57b97 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 17:22:16 +0200 Subject: [PATCH 26/89] comment --- .../nonunital-precategories.lagda.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/category-theory/nonunital-precategories.lagda.md b/src/category-theory/nonunital-precategories.lagda.md index c77360f4cb..2cb0e330f9 100644 --- a/src/category-theory/nonunital-precategories.lagda.md +++ b/src/category-theory/nonunital-precategories.lagda.md @@ -289,3 +289,16 @@ module _ ( hom-set-Nonunital-Precategory C) ( comp-hom-Nonunital-Precategory C) ``` + +## Comments + +As discussed in [Semicategories](https://ncatlab.org/nlab/show/semicategory) at +nlab, it seems that a nonunital precategory should be the underlying nonunital +precategory of a [category](category-theory.categories.md) if and only if the +projection map + +```text + pr1 : (Σ (a : A) Σ (f : hom a a) (is-unit f)) → A +``` + +is an [equivalence](foundation-core.equivalences.md). From bb686406edcabdbef98c0b92826c59ac82a5b1e2 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 18:44:19 +0200 Subject: [PATCH 27/89] underlying categorical structures --- src/category-theory/categories.lagda.md | 41 ++++++++++++++++------ src/category-theory/precategories.lagda.md | 21 +++++++++-- 2 files changed, 49 insertions(+), 13 deletions(-) diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index 220fe85870..5cb71c84c7 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -9,6 +9,7 @@ module category-theory.categories where ```agda open import category-theory.isomorphisms-in-precategories open import category-theory.precategories +open import category-theory.preunivalent-categories open import foundation.1-types open import foundation.dependent-pair-types @@ -144,8 +145,7 @@ postcomp-hom-Category C = postcomp-hom-Precategory (precategory-Category C) ```agda module _ - {l1 l2 : Level} - (C : Category l1 l2) + {l1 l2 : Level} (C : Category l1 l2) where hom-eq-Category : @@ -157,6 +157,31 @@ module _ hom-inv-eq-Category = hom-inv-eq-Precategory (precategory-Category C) ``` +### The underlying nonunital precategory of a category + +```agda +module _ + {l1 l2 : Level} (C : Category l1 l2) + where + + nonunital-precategory-Category : Nonunital-Precategory l1 l2 + nonunital-precategory-Category = + nonunital-precategory-Precategory (precategory-Category C) +``` + +### The underlying preunivalent category of a category + +```agda +module _ + {l1 l2 : Level} (C : Category l1 l2) + where + + preunivalent-category-Category : Preunivalent-Category l1 l2 + pr1 preunivalent-category-Category = precategory-Category C + pr2 preunivalent-category-Category x y = + is-emb-is-equiv (is-category-Category C x y) +``` + ## Properties ### The objects in a category form a 1-type @@ -171,14 +196,10 @@ module _ where is-1-type-obj-Category : is-1-type (obj-Category C) - is-1-type-obj-Category x y = - is-set-is-equiv - ( iso-Precategory (precategory-Category C) x y) - ( iso-eq-Precategory (precategory-Category C) x y) - ( is-category-Category C x y) - ( is-set-iso-Precategory (precategory-Category C)) + is-1-type-obj-Category = + is-1-type-obj-Preunivalent-Category (preunivalent-category-Category C) obj-1-type-Category : 1-Type l1 - pr1 obj-1-type-Category = obj-Category C - pr2 obj-1-type-Category = is-1-type-obj-Category + obj-1-type-Category = + obj-1-type-Preunivalent-Category (preunivalent-category-Category C) ``` diff --git a/src/category-theory/precategories.lagda.md b/src/category-theory/precategories.lagda.md index db18d37062..36d403aec3 100644 --- a/src/category-theory/precategories.lagda.md +++ b/src/category-theory/precategories.lagda.md @@ -122,19 +122,34 @@ module _ pr2 (pr2 is-unital-composition-operation-Precategory) ``` +### The underlying nonunital precategory of a precategory + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) + where + + nonunital-precategory-Precategory : Nonunital-Precategory l1 l2 + pr1 nonunital-precategory-Precategory = obj-Precategory C + pr1 (pr2 nonunital-precategory-Precategory) = hom-set-Precategory C + pr1 (pr2 (pr2 nonunital-precategory-Precategory)) = comp-hom-Precategory C + pr2 (pr2 (pr2 nonunital-precategory-Precategory)) = + associative-comp-hom-Precategory C +``` + ### The total hom-type of a precategory ```agda total-hom-Precategory : {l1 l2 : Level} (C : Precategory l1 l2) → UU (l1 ⊔ l2) total-hom-Precategory C = - Σ (obj-Precategory C) (λ x → Σ (obj-Precategory C) (hom-Precategory C x)) + total-hom-Nonunital-Precategory (nonunital-precategory-Precategory C) obj-total-hom-Precategory : {l1 l2 : Level} (C : Precategory l1 l2) → total-hom-Precategory C → obj-Precategory C × obj-Precategory C -pr1 (obj-total-hom-Precategory C (x , y , f)) = x -pr2 (obj-total-hom-Precategory C (x , y , f)) = y +obj-total-hom-Precategory C = + obj-total-hom-Nonunital-Precategory (nonunital-precategory-Precategory C) ``` ### Precomposition by a morphism From 841c218ad5275252cd922fffd4976f63cd9aaeac Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 19:14:09 +0200 Subject: [PATCH 28/89] Update src/category-theory/full-subcategories.lagda.md Co-authored-by: Egbert Rijke --- src/category-theory/full-subcategories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/full-subcategories.lagda.md b/src/category-theory/full-subcategories.lagda.md index 46d2d2fc78..7d41efafcd 100644 --- a/src/category-theory/full-subcategories.lagda.md +++ b/src/category-theory/full-subcategories.lagda.md @@ -32,7 +32,7 @@ open import foundation.universe-levels ## Idea -A **subcategory** of a [precategory](category-theory.precategories.md) `C` +A **full subcategory** of a [precategory](category-theory.precategories.md) `C` consists of a [subtype](foundation-core.subtypes.md) `P₀` of the objects of `C`. Alternatively, we say that a [subcategory](category-theory.subcategories.md) From 0874bd28bca097c8cb2af2a53869f3527c636411 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 19:14:17 +0200 Subject: [PATCH 29/89] Update src/category-theory/full-subcategories.lagda.md Co-authored-by: Egbert Rijke --- src/category-theory/full-subcategories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/full-subcategories.lagda.md b/src/category-theory/full-subcategories.lagda.md index 7d41efafcd..ab627a5d4c 100644 --- a/src/category-theory/full-subcategories.lagda.md +++ b/src/category-theory/full-subcategories.lagda.md @@ -42,7 +42,7 @@ of homomorphisms from `X` to `Y` in the subcategory is ## Definition -### Subprecategories +### Full subcategories ```agda Full-Subcategory : From 15bcd1782a0c2487dc7148347b45b98fd77c0266 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 19:14:35 +0200 Subject: [PATCH 30/89] Update src/category-theory/full-subprecategories.lagda.md Co-authored-by: Egbert Rijke --- src/category-theory/full-subprecategories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/full-subprecategories.lagda.md b/src/category-theory/full-subprecategories.lagda.md index 159e69ac3e..879b89217e 100644 --- a/src/category-theory/full-subprecategories.lagda.md +++ b/src/category-theory/full-subprecategories.lagda.md @@ -33,7 +33,7 @@ open import foundation.universe-levels ## Idea -A **subprecategory** of a [precategory](category-theory.precategories.md) `C` +A **full subprecategory** of a [precategory](category-theory.precategories.md) `C` consists of a [subtype](foundation-core.subtypes.md) `P₀` of the objects of `C`. Alternatively, we say that a From 77bd6b16a8fc1a980cee23250b9c561e0f2f9491 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 19:15:28 +0200 Subject: [PATCH 31/89] Update src/category-theory/full-subprecategories.lagda.md Co-authored-by: Egbert Rijke --- src/category-theory/full-subprecategories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/full-subprecategories.lagda.md b/src/category-theory/full-subprecategories.lagda.md index 879b89217e..3d6efd632d 100644 --- a/src/category-theory/full-subprecategories.lagda.md +++ b/src/category-theory/full-subprecategories.lagda.md @@ -38,7 +38,7 @@ consists of a [subtype](foundation-core.subtypes.md) `P₀` of the objects of `C Alternatively, we say that a [subprecategory](category-theory.subprecategories.md) **is full** if for every -two objects `X` and `Y` in the subprecategory, the subtype of homomorphisms from +two objects `X` and `Y` in the subprecategory, the subtype of morphisms from `X` to `Y` in the subprecategory is [full](foundation.full-subtypes.md). ## Definition From d558b8aaf923e7149c4ae75fe94ae4c06a69ec4c Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 19:15:35 +0200 Subject: [PATCH 32/89] Update src/category-theory/full-subcategories.lagda.md Co-authored-by: Egbert Rijke --- src/category-theory/full-subcategories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/full-subcategories.lagda.md b/src/category-theory/full-subcategories.lagda.md index ab627a5d4c..edf3f6fd04 100644 --- a/src/category-theory/full-subcategories.lagda.md +++ b/src/category-theory/full-subcategories.lagda.md @@ -37,7 +37,7 @@ consists of a [subtype](foundation-core.subtypes.md) `P₀` of the objects of `C Alternatively, we say that a [subcategory](category-theory.subcategories.md) **is full** if for every two objects `X` and `Y` in the subcategory, the subtype -of homomorphisms from `X` to `Y` in the subcategory is +of morphisms from `X` to `Y` in the subcategory is [full](foundation.full-subtypes.md). ## Definition From 23a157f000243ec50c59089142a99e4ecf006d67 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 19:15:44 +0200 Subject: [PATCH 33/89] Update src/category-theory/full-subprecategories.lagda.md Co-authored-by: Egbert Rijke --- src/category-theory/full-subprecategories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/full-subprecategories.lagda.md b/src/category-theory/full-subprecategories.lagda.md index 3d6efd632d..7810953913 100644 --- a/src/category-theory/full-subprecategories.lagda.md +++ b/src/category-theory/full-subprecategories.lagda.md @@ -43,7 +43,7 @@ two objects `X` and `Y` in the subprecategory, the subtype of morphisms from ## Definition -### Subprecategories +### Full subprecategories ```agda Full-Subprecategory : From d95ff98ad19c3b77cd107b0fec5639d35fd3ee3a Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 19:16:51 +0200 Subject: [PATCH 34/89] Update src/category-theory/fully-faithful-functors-precategories.lagda.md Co-authored-by: Egbert Rijke --- .../fully-faithful-functors-precategories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/fully-faithful-functors-precategories.lagda.md b/src/category-theory/fully-faithful-functors-precategories.lagda.md index 13ac4dfc30..9250189172 100644 --- a/src/category-theory/fully-faithful-functors-precategories.lagda.md +++ b/src/category-theory/fully-faithful-functors-precategories.lagda.md @@ -33,7 +33,7 @@ hom-sets, or equivalently, a [faithful](category-theory.faithful-functors-precategories.md) functor on precategories. -## Definition +## Definitions ### The predicate of being fully faithful on functors between precategories From 33b8b1a0b7f1a85d006819dcc68b10b0bdaa487d Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 19:16:58 +0200 Subject: [PATCH 35/89] Update src/category-theory/full-subprecategories.lagda.md Co-authored-by: Egbert Rijke --- src/category-theory/full-subprecategories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/full-subprecategories.lagda.md b/src/category-theory/full-subprecategories.lagda.md index 7810953913..4403824ee2 100644 --- a/src/category-theory/full-subprecategories.lagda.md +++ b/src/category-theory/full-subprecategories.lagda.md @@ -41,7 +41,7 @@ Alternatively, we say that a two objects `X` and `Y` in the subprecategory, the subtype of morphisms from `X` to `Y` in the subprecategory is [full](foundation.full-subtypes.md). -## Definition +## Definitions ### Full subprecategories From 429c90460e9c1a97c9de5d9317ffd07c2d9bc12e Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 19:19:30 +0200 Subject: [PATCH 36/89] Update src/category-theory/full-subcategories.lagda.md Co-authored-by: Egbert Rijke --- src/category-theory/full-subcategories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/full-subcategories.lagda.md b/src/category-theory/full-subcategories.lagda.md index edf3f6fd04..2474eac92c 100644 --- a/src/category-theory/full-subcategories.lagda.md +++ b/src/category-theory/full-subcategories.lagda.md @@ -40,7 +40,7 @@ Alternatively, we say that a [subcategory](category-theory.subcategories.md) of morphisms from `X` to `Y` in the subcategory is [full](foundation.full-subtypes.md). -## Definition +## Definitions ### Full subcategories From e258229b8b94c94c6481beb1b69f685f081bdb20 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 19:38:37 +0200 Subject: [PATCH 37/89] "underlying precategory" and move univalence proofs for full subcats --- .../full-large-subcategories.lagda.md | 19 ++++++++-- .../full-large-subprecategories.lagda.md | 26 +++++++------- .../full-subcategories.lagda.md | 16 ++++++--- .../full-subprecategories.lagda.md | 36 +++++++++---------- .../representing-arrow-category.lagda.md | 2 +- src/category-theory/subcategories.lagda.md | 2 +- src/category-theory/subprecategories.lagda.md | 2 +- 7 files changed, 60 insertions(+), 43 deletions(-) diff --git a/src/category-theory/full-large-subcategories.lagda.md b/src/category-theory/full-large-subcategories.lagda.md index 7506f4a09d..96b78f8d03 100644 --- a/src/category-theory/full-large-subcategories.lagda.md +++ b/src/category-theory/full-large-subcategories.lagda.md @@ -176,18 +176,31 @@ module _ iso-eq-Full-Large-Subprecategory ( large-precategory-Large-Category C) ( P) +``` + +### The underlying large category of a full large subcategory + +```agda +module _ + {α : Level → Level} {β : Level → Level → Level} {γ : Level → Level} + (C : Large-Category α β) + (P : Full-Large-Subcategory γ C) + where is-large-category-Full-Large-Subcategory : is-large-category-Large-Precategory - ( large-precategory-Full-Large-Subcategory) + ( large-precategory-Full-Large-Subcategory C P) is-large-category-Full-Large-Subcategory = - is-large-category-large-precategory-Full-Large-Subcategory C P + is-large-category-large-precategory-is-large-category-Full-Large-Subprecategory + ( large-precategory-Large-Category C) + ( P) + ( is-large-category-Large-Category C) large-category-Full-Large-Subcategory : Large-Category (λ l → α l ⊔ γ l) β large-precategory-Large-Category large-category-Full-Large-Subcategory = - large-precategory-Full-Large-Subcategory + large-precategory-Full-Large-Subcategory C P is-large-category-Large-Category large-category-Full-Large-Subcategory = is-large-category-Full-Large-Subcategory diff --git a/src/category-theory/full-large-subprecategories.lagda.md b/src/category-theory/full-large-subprecategories.lagda.md index d811435b6a..4687c63eba 100644 --- a/src/category-theory/full-large-subprecategories.lagda.md +++ b/src/category-theory/full-large-subprecategories.lagda.md @@ -12,6 +12,7 @@ open import category-theory.isomorphisms-in-large-precategories open import category-theory.large-categories open import category-theory.large-precategories +open import foundation.dependent-pair-types open import foundation.fundamental-theorem-of-identity-types open import foundation.identity-types open import foundation.propositions @@ -197,25 +198,24 @@ module _ ```agda module _ {α : Level → Level} {β : Level → Level → Level} {γ : Level → Level} - (C : Large-Category α β) - (P : Full-Large-Subprecategory γ (large-precategory-Large-Category C)) + (C : Large-Precategory α β) + (P : Full-Large-Subprecategory γ C) where - is-large-category-large-precategory-Full-Large-Subcategory : + is-large-category-large-precategory-is-large-category-Full-Large-Subprecategory : + is-large-category-Large-Precategory C → is-large-category-Large-Precategory - ( large-precategory-Full-Large-Subprecategory - ( large-precategory-Large-Category C) - ( P)) - is-large-category-large-precategory-Full-Large-Subcategory X = + ( large-precategory-Full-Large-Subprecategory C P) + is-large-category-large-precategory-is-large-category-Full-Large-Subprecategory + is-large-category-C X = fundamental-theorem-id ( is-contr-total-Eq-subtype - ( is-contr-total-iso-Large-Category C (inclusion-subtype P X)) + ( is-contr-total-iso-Large-Category + ( make-Large-Category C is-large-category-C) + ( inclusion-subtype P X)) ( is-prop-is-in-subtype P) ( inclusion-subtype P X) - ( id-iso-Large-Category C) + ( id-iso-Large-Precategory C) ( is-in-subtype-inclusion-subtype P X)) - ( iso-eq-Full-Large-Subprecategory - ( large-precategory-Large-Category C) - ( P) - ( X)) + ( iso-eq-Full-Large-Subprecategory C P X) ``` diff --git a/src/category-theory/full-subcategories.lagda.md b/src/category-theory/full-subcategories.lagda.md index 2474eac92c..1b28fa1fc5 100644 --- a/src/category-theory/full-subcategories.lagda.md +++ b/src/category-theory/full-subcategories.lagda.md @@ -83,7 +83,7 @@ module _ is-in-obj-inclusion-obj-Full-Subprecategory (precategory-Category C) P ``` -### The precategory structure of a full subcategory +### The underlying precategory of a full subcategory ```agda module _ @@ -191,9 +191,7 @@ module _ iso-eq-Full-Subprecategory (precategory-Category C) P ``` -## Properties - -### Full subcategories are categories +### The underlying category of a full subcategory ```agda module _ @@ -202,11 +200,19 @@ module _ (P : Full-Subcategory l3 C) where + is-category-precategory-Full-Subcategory : + is-category-Precategory (precategory-Full-Subcategory C P) + is-category-precategory-Full-Subcategory = + is-category-precategory-is-category-Full-Subprecategory + ( precategory-Category C) P (is-category-Category C) + category-Full-Subcategory : Category (l1 ⊔ l3) l2 pr1 category-Full-Subcategory = precategory-Full-Subcategory C P - pr2 category-Full-Subcategory = is-category-precategory-Full-Subcategory C P + pr2 category-Full-Subcategory = is-category-precategory-Full-Subcategory ``` +## Properties + ### The inclusion functor is an embedding ```agda diff --git a/src/category-theory/full-subprecategories.lagda.md b/src/category-theory/full-subprecategories.lagda.md index 4403824ee2..a72f1c41a6 100644 --- a/src/category-theory/full-subprecategories.lagda.md +++ b/src/category-theory/full-subprecategories.lagda.md @@ -33,13 +33,14 @@ open import foundation.universe-levels ## Idea -A **full subprecategory** of a [precategory](category-theory.precategories.md) `C` -consists of a [subtype](foundation-core.subtypes.md) `P₀` of the objects of `C`. +A **full subprecategory** of a [precategory](category-theory.precategories.md) +`C` consists of a [subtype](foundation-core.subtypes.md) `P₀` of the objects of +`C`. Alternatively, we say that a [subprecategory](category-theory.subprecategories.md) **is full** if for every -two objects `X` and `Y` in the subprecategory, the subtype of morphisms from -`X` to `Y` in the subprecategory is [full](foundation.full-subtypes.md). +two objects `X` and `Y` in the subprecategory, the subtype of morphisms from `X` +to `Y` in the subprecategory is [full](foundation.full-subtypes.md). ## Definitions @@ -82,7 +83,7 @@ module _ is-in-subtype-inclusion-subtype subtype-obj-Full-Subprecategory ``` -### The precategory structure of a full subprecategory +### The underlying precategory of a full subprecategory ```agda module _ @@ -233,27 +234,24 @@ module _ ```agda module _ {l1 l2 l3 : Level} - (C : Category l1 l2) - (P : Full-Subprecategory l3 (precategory-Category C)) + (C : Precategory l1 l2) + (P : Full-Subprecategory l3 C) where - is-category-precategory-Full-Subcategory : - is-category-Precategory - ( precategory-Full-Subprecategory - ( precategory-Category C) - ( P)) - is-category-precategory-Full-Subcategory X = + is-category-precategory-is-category-Full-Subprecategory : + is-category-Precategory C → + is-category-Precategory (precategory-Full-Subprecategory C P) + is-category-precategory-is-category-Full-Subprecategory is-category-C X = fundamental-theorem-id ( is-contr-total-Eq-subtype - ( is-contr-total-iso-Category C (inclusion-subtype P X)) + ( is-contr-total-iso-Category + ( C , is-category-C) + ( inclusion-subtype P X)) ( is-prop-is-in-subtype P) ( inclusion-subtype P X) - ( id-iso-Category C) + ( id-iso-Precategory C) ( is-in-subtype-inclusion-subtype P X)) - ( iso-eq-Full-Subprecategory - ( precategory-Category C) - ( P) - ( X)) + ( iso-eq-Full-Subprecategory C P X) ``` ### The inclusion functor is an embedding diff --git a/src/category-theory/representing-arrow-category.lagda.md b/src/category-theory/representing-arrow-category.lagda.md index 09280c03da..504a536d58 100644 --- a/src/category-theory/representing-arrow-category.lagda.md +++ b/src/category-theory/representing-arrow-category.lagda.md @@ -50,7 +50,7 @@ hom-representing-arrow : hom-representing-arrow x y = type-Set (hom-set-representing-arrow x y) ``` -### The precategory structure of the representing arrow +### The underlying precategory of the representing arrow ```agda comp-hom-representing-arrow : diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index 7fe77fcbfa..59051a42d1 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -205,7 +205,7 @@ module _ is-closed-under-composition-Subprecategory (precategory-Category C) P ``` -### The precategory structure of a subcategory +### The underlying precategory of a subcategory ```agda module _ diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index 199cb24148..bc73d4e864 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -233,7 +233,7 @@ module _ ( is-subprecategory-Subprecategory) ``` -### The precategory structure of a subprecategory +### The underlying precategory of a subprecategory ```agda module _ From 9d2212bc555fd1ad15a3894b6d90e5cc964bdb87 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 19:42:09 +0200 Subject: [PATCH 38/89] hom-[sets] --- .../fully-faithful-functors-precategories.lagda.md | 4 ++-- src/order-theory/large-posets.lagda.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/category-theory/fully-faithful-functors-precategories.lagda.md b/src/category-theory/fully-faithful-functors-precategories.lagda.md index 9250189172..f8dc85ce2e 100644 --- a/src/category-theory/fully-faithful-functors-precategories.lagda.md +++ b/src/category-theory/fully-faithful-functors-precategories.lagda.md @@ -28,7 +28,7 @@ open import foundation.universe-levels A [functor](category-theory.functors-precategories.md) between [precategories](category-theory.precategories.md) `C` and `D` is **fully faithful** if it's an [equivalence](foundation-core.equivalences.md) on -hom-sets, or equivalently, a +hom-[sets](foundation-core.sets.md), or equivalently, a [full](category-theory.full-functors-precategories.md) and [faithful](category-theory.faithful-functors-precategories.md) functor on precategories. @@ -164,7 +164,7 @@ module _ ## Properties -### Fully faithful functors of precategories are full and faithful functors +### Fully faithful functors are the same as full and faithful functors ```agda module _ diff --git a/src/order-theory/large-posets.lagda.md b/src/order-theory/large-posets.lagda.md index 32715957a5..ccd905d046 100644 --- a/src/order-theory/large-posets.lagda.md +++ b/src/order-theory/large-posets.lagda.md @@ -91,8 +91,8 @@ module _ A [large category](category-theory.large-categories.md) is said to be a **large poset** if `hom X Y` is a proposition for every two objects `X` and `Y`. -**Lemma**. _Any large category of which the hom-sets are propositions is a large -poset._ +**Lemma**. _Any large category of which the hom-[sets](foundation-core.sets.md) +are [propositions](foundation-core.propositions.md) is a large poset._ **Proof:** The condition that `C` is a large poset immediately gives us a [large precategory](category-theory.large-precategories.md). The interesting From c67d9ca7686a633b9bf8813f99799bd22508ede1 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 19:45:09 +0200 Subject: [PATCH 39/89] Fully faithful maps are the same as full and faithful maps --- src/category-theory/fully-faithful-maps-precategories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/fully-faithful-maps-precategories.lagda.md b/src/category-theory/fully-faithful-maps-precategories.lagda.md index 436aa3ecaf..e2cdc1758d 100644 --- a/src/category-theory/fully-faithful-maps-precategories.lagda.md +++ b/src/category-theory/fully-faithful-maps-precategories.lagda.md @@ -156,7 +156,7 @@ module _ ## Properties -### Fully faithful maps of precategories are full and faithful maps +### Fully faithful maps are the same as full and faithful maps ```agda module _ From 08f411a91bb31faa08e53817771c2f6cfb2fc86f Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 19:46:08 +0200 Subject: [PATCH 40/89] intro `A` --- src/category-theory/isomorphism-induction-categories.lagda.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/category-theory/isomorphism-induction-categories.lagda.md b/src/category-theory/isomorphism-induction-categories.lagda.md index 061af3c3d2..694773767a 100644 --- a/src/category-theory/isomorphism-induction-categories.lagda.md +++ b/src/category-theory/isomorphism-induction-categories.lagda.md @@ -29,8 +29,8 @@ open import foundation-core.singleton-induction ## Idea -**Isomorphism induction** in a category `𝒞` is the principle asserting that for -any type family +**Isomorphism induction** in a category `𝒞` is the principle asserting that, +given an object `A : 𝒞` and any type family ```text P : (B : 𝒞) (ϕ : A ≅ B) → 𝒰 From da6f65e24b7acd90f17006d4fa93718cda6ab8dc Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 20:04:02 +0200 Subject: [PATCH 41/89] a typo --- src/category-theory/preunivalent-categories.lagda.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md index 24d1d80329..fd026c2d24 100644 --- a/src/category-theory/preunivalent-categories.lagda.md +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -28,11 +28,11 @@ for which the [identifications](foundation-core.identity-types.md) between the objects [embed](foundation-core.embeddings.md) into the [isomorphisms](category-theory.isomorphisms-in-precategories.md). More specifically, an equality between objects gives rise to an isomorphism between -them, by the J-rule. A precategory is a category if this function, called -`iso-eq`, is an embedding. In particular. being preunivalent is a +them, by the J-rule. A precategory is a preunivalent category if this function, +called `iso-eq`, is an embedding. In particular. being preunivalent is a [proposition](foundation-core.propositions.md) since `is-emb` is a proposition. -The idea of preunivalence is that it is a common generalization univalent +The idea of preunivalence is that it is a common generalization of univalent mathematics and mathematics with Axiom K. Hence preunivalent categories generalize both [categories](category-theory.categories.md) in the sense we have defined them (as univalent categories), and strict categories, which are From 7c0416b27f215c8ae4ada281a98970f6cdf20ce4 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 20:04:38 +0200 Subject: [PATCH 42/89] Update src/category-theory/preunivalent-categories.lagda.md Co-authored-by: Egbert Rijke --- src/category-theory/preunivalent-categories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md index fd026c2d24..9eaa5b1a80 100644 --- a/src/category-theory/preunivalent-categories.lagda.md +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -38,7 +38,7 @@ generalize both [categories](category-theory.categories.md) in the sense we have defined them (as univalent categories), and strict categories, which are precategories whose objects form a [set](foundation-core.sets.md). -## Definition +## Definitions ```agda module _ From 5b3f1dd3be66ebc4ff04e64bea807d90571ea59a Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 20:04:49 +0200 Subject: [PATCH 43/89] Update src/category-theory/subcategories.lagda.md Co-authored-by: Egbert Rijke --- src/category-theory/subcategories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index 59051a42d1..fb4e4bb065 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -35,7 +35,7 @@ open import foundation.universe-levels A **subcategory** of a [category](category-theory.categories.md) `C` is simply a [subprecategory](category-theory.subprecategories.md). It consists of a [subtype](foundation-core.subtypes.md) `P₀` of the objects of `C`, and a family -of subtypes `P₁` +of subtypes ```text P₁ : (X Y : obj C) → P₀ X → P₀ Y → subtype (hom X Y) From e726233072e54ba1f83c8d0f6bd048cbe2d46dfb Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 20:04:58 +0200 Subject: [PATCH 44/89] Update src/category-theory/preunivalent-categories.lagda.md Co-authored-by: Egbert Rijke --- src/category-theory/preunivalent-categories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md index 9eaa5b1a80..a5bfdb03c3 100644 --- a/src/category-theory/preunivalent-categories.lagda.md +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -190,7 +190,7 @@ module _ ## Properties -### The objects in a category form a 1-type +### The objects in a preunivalent category form a 1-type The type of identities between two objects in a preunivalent category embeds into the type of isomorphisms between them. But this type is a set, and thus the From 9aa24590fd473a7bf3667a320cdfd0644baf6632 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 20:05:06 +0200 Subject: [PATCH 45/89] Update src/category-theory/preunivalent-categories.lagda.md Co-authored-by: Egbert Rijke --- src/category-theory/preunivalent-categories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md index a5bfdb03c3..f38d6229e7 100644 --- a/src/category-theory/preunivalent-categories.lagda.md +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -167,7 +167,7 @@ postcomp-hom-Preunivalent-Category C = postcomp-hom-Precategory (precategory-Preunivalent-Category C) ``` -### Equalities give rise to homomorphisms +### Equalities give rise to morphisms ```agda module _ From 2f68fb75ed67ef04eb90c41aa51b216d2b7d36b7 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 21:01:54 +0200 Subject: [PATCH 46/89] Update src/foundation/symmetric-difference.lagda.md Co-authored-by: Egbert Rijke --- src/foundation/symmetric-difference.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/foundation/symmetric-difference.lagda.md b/src/foundation/symmetric-difference.lagda.md index 2a4e22b528..f26bb7bf07 100644 --- a/src/foundation/symmetric-difference.lagda.md +++ b/src/foundation/symmetric-difference.lagda.md @@ -29,7 +29,7 @@ open import foundation-core.transport-along-identifications ## Idea The **symmetric difference** of two [subtypes](foundation-core.subtypes.md) `A` -and `B` is the subtypes that contains the elements that are either in `A` or in +and `B` is the subtype that contains the elements that are either in `A` or in `B` but not in both. ## Definition From f814ed54dcc2eced238412e7d7c2e2d1f61e9c1d Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 21:02:03 +0200 Subject: [PATCH 47/89] Update src/foundation/symmetric-difference.lagda.md Co-authored-by: Egbert Rijke --- src/foundation/symmetric-difference.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/foundation/symmetric-difference.lagda.md b/src/foundation/symmetric-difference.lagda.md index f26bb7bf07..806c2bbce1 100644 --- a/src/foundation/symmetric-difference.lagda.md +++ b/src/foundation/symmetric-difference.lagda.md @@ -53,7 +53,7 @@ module _ ### The coproduct of two decidable subtypes is equivalent to their symmetric difference plus two times their intersection -This is also known as the _inclusion-exclusion principle_. +This is closely related to the _inclusion-exclusion principle_. ```agda module _ From 08805c3a14b171b2798f55b6568739c4a4b7aa37 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 21:04:00 +0200 Subject: [PATCH 48/89] Update src/foundation/complements-subtypes.lagda.md Co-authored-by: Egbert Rijke --- src/foundation/complements-subtypes.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/foundation/complements-subtypes.lagda.md b/src/foundation/complements-subtypes.lagda.md index 34d296f6b8..f105addb16 100644 --- a/src/foundation/complements-subtypes.lagda.md +++ b/src/foundation/complements-subtypes.lagda.md @@ -23,7 +23,7 @@ open import foundation-core.subtypes ## Idea -The **complement** of a [subtypes](foundation-core.subtypes.md) `P` of `A` +The **complement** of a [subtype](foundation-core.subtypes.md) `P` of `A` consists of the elements that are not in `P`. ## Definition From e0c19121083f47e899c0c247fd45119b9ceb2336 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 21:27:16 +0200 Subject: [PATCH 49/89] contains-is-iso-is-category-Subprecategory --- src/category-theory/subcategories.lagda.md | 53 ++------------ src/category-theory/subprecategories.lagda.md | 72 ++++++++++++++++++- 2 files changed, 77 insertions(+), 48 deletions(-) diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index fb4e4bb065..c0a1c5a5ef 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -276,6 +276,10 @@ module _ precategory-Subprecategory (precategory-Category C) P ``` +### The underlying category of a subcategory + +It remains to show that subprecategories of categories are categories. + ### The inclusion functor of a subcategory ```agda @@ -315,11 +319,11 @@ module _ is-iso-Subcategory : {x y : obj-Subcategory C P} → hom-Subcategory C P x y → UU (l2 ⊔ l4) is-iso-Subcategory {x} {y} = - is-iso-Precategory (precategory-Subcategory C P) {x} {y} + is-iso-Subprecategory (precategory-Category C) P {x} {y} iso-Subcategory : (x y : obj-Subcategory C P) → UU (l2 ⊔ l4) - iso-Subcategory = iso-Precategory (precategory-Subcategory C P) + iso-Subcategory = iso-Subprecategory (precategory-Category C) P ``` ## Properties @@ -350,48 +354,3 @@ module _ is-emb-obj-inclusion-Category = is-emb-obj-inclusion-Subprecategory (precategory-Category C) P ``` - -### Subcategories are categories - -```agda -module _ - {l1 l2 l3 l4 : Level} - (C : Category l1 l2) - (P : Subcategory l3 l4 C) - {x y : obj-Subcategory C P} - (f : hom-Subcategory C P x y) - (is-iso-f : is-iso-Category C (inclusion-hom-Subcategory C P x y f)) - where - - contains-is-iso-Subcategory : is-iso-Subcategory C P f - contains-is-iso-Subcategory = - ind-iso-Category C - ( λ Y e → - ( p : is-in-obj-Subcategory C P Y) - ( q : - is-in-hom-Subcategory C P - ( inclusion-obj-Subcategory C P x) - ( Y) - ( hom-iso-Category C e)) → - is-iso-Subcategory C P {x} {Y , p} (hom-iso-Category C e , q)) - ( ( ind-subsingleton - ( is-prop-is-in-hom-Subcategory C P - ( inclusion-obj-Subcategory C P x) - ( inclusion-obj-Subcategory C P x) - ( id-hom-Category C)) - ( λ q → is-iso-Subcategory C P (id-hom-Category C , q)) - ( contains-id-Subcategory C P - ( inclusion-obj-Subcategory C P x) - ( is-in-obj-inclusion-obj-Subcategory C P x))) ∘ - ( ind-subsingleton - ( is-prop-is-in-obj-Subcategory C P - ( inclusion-obj-Subcategory C P x)) - ( _) - ( is-in-obj-inclusion-obj-Subcategory C P x) - ( is-iso-id-hom-Precategory (precategory-Subcategory C P) {x}))) - ( inclusion-hom-Subcategory C P x y f , is-iso-f) - ( is-in-obj-inclusion-obj-Subcategory C P y) - ( is-in-hom-inclusion-hom-Subcategory C P x y f) -``` - -It remains to show that subcategories indeed define categories. diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index bc73d4e864..1db03a97e3 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -10,11 +10,16 @@ module category-theory.subprecategories where open import category-theory.faithful-functors-precategories open import category-theory.functors-precategories open import category-theory.maps-precategories +open import category-theory.isomorphisms-in-precategories +open import category-theory.isomorphism-induction-categories open import category-theory.precategories +open import category-theory.categories open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.identity-types +open import foundation.function-types +open import foundation.subsingleton-induction open import foundation.propositions open import foundation.sets open import foundation.subtypes @@ -390,9 +395,28 @@ module _ is-functor-inclusion-Subprecategory ``` +### Isomorphisms in subprecategories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (P : Subprecategory l3 l4 C) + where + + is-iso-Subprecategory : + {x y : obj-Subprecategory C P} → hom-Subprecategory C P x y → UU (l2 ⊔ l4) + is-iso-Subprecategory {x} {y} = + is-iso-Precategory (precategory-Subprecategory C P) {x} {y} + + iso-Subprecategory : + (x y : obj-Subprecategory C P) → UU (l2 ⊔ l4) + iso-Subprecategory = iso-Precategory (precategory-Subprecategory C P) +``` + ## Properties -### The inclusion functor is an embedding +### The inclusion functor is an embedding on objects and hom-sets ```agda module _ @@ -421,3 +445,49 @@ module _ is-emb-obj-inclusion-Subprecategory = is-emb-inclusion-subtype (subtype-obj-Subprecategory C P) ``` + +### Subprecategories of categories are categories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (P : Subprecategory l3 l4 C) + (is-category-C : is-category-Precategory C) + {x y : obj-Subprecategory C P} + (f : hom-Subprecategory C P x y) + (is-iso-f : is-iso-Precategory C (inclusion-hom-Subprecategory C P x y f)) + where + + contains-is-iso-is-category-Subprecategory : is-iso-Subprecategory C P f + contains-is-iso-is-category-Subprecategory = + ind-iso-Category (C , is-category-C) + ( λ Y e → + ( p : is-in-obj-Subprecategory C P Y) + ( q : + is-in-hom-Subprecategory C P + ( inclusion-obj-Subprecategory C P x) + ( Y) + ( hom-iso-Precategory C e)) → + is-iso-Subprecategory C P {x} {Y , p} (hom-iso-Precategory C e , q)) + ( ( ind-subsingleton + ( is-prop-is-in-hom-Subprecategory C P + ( inclusion-obj-Subprecategory C P x) + ( inclusion-obj-Subprecategory C P x) + ( id-hom-Precategory C)) + ( λ q → is-iso-Subprecategory C P (id-hom-Precategory C , q)) + ( contains-id-Subprecategory C P + ( inclusion-obj-Subprecategory C P x) + ( is-in-obj-inclusion-obj-Subprecategory C P x))) ∘ + ( ind-subsingleton + ( is-prop-is-in-obj-Subprecategory C P + ( inclusion-obj-Subprecategory C P x)) + ( _) + ( is-in-obj-inclusion-obj-Subprecategory C P x) + ( is-iso-id-hom-Precategory (precategory-Subprecategory C P) {x}))) + ( inclusion-hom-Subprecategory C P x y f , is-iso-f) + ( is-in-obj-inclusion-obj-Subprecategory C P y) + ( is-in-hom-inclusion-hom-Subprecategory C P x y f) +``` + +It remains to show that subprecategories of categories indeed are categories. From a220ff51c002ffc6fb9c92d99f7b40f128756352 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 22:32:18 +0200 Subject: [PATCH 50/89] fixes subsingleton induction --- src/category-theory/subprecategories.lagda.md | 2 - src/foundation/equivalence-induction.lagda.md | 3 +- .../subsingleton-induction.lagda.md | 45 ++++++++++--------- 3 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index 1db03a97e3..b2cf6d85c4 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -475,14 +475,12 @@ module _ ( inclusion-obj-Subprecategory C P x) ( inclusion-obj-Subprecategory C P x) ( id-hom-Precategory C)) - ( λ q → is-iso-Subprecategory C P (id-hom-Precategory C , q)) ( contains-id-Subprecategory C P ( inclusion-obj-Subprecategory C P x) ( is-in-obj-inclusion-obj-Subprecategory C P x))) ∘ ( ind-subsingleton ( is-prop-is-in-obj-Subprecategory C P ( inclusion-obj-Subprecategory C P x)) - ( _) ( is-in-obj-inclusion-obj-Subprecategory C P x) ( is-iso-id-hom-Precategory (precategory-Subprecategory C P) {x}))) ( inclusion-hom-Subprecategory C P x y f , is-iso-f) diff --git a/src/foundation/equivalence-induction.lagda.md b/src/foundation/equivalence-induction.lagda.md index 5ea3b1be33..0ee1394b7d 100644 --- a/src/foundation/equivalence-induction.lagda.md +++ b/src/foundation/equivalence-induction.lagda.md @@ -101,8 +101,7 @@ module _ ( is-singleton-is-contr ( A , id-equiv) ( ( A , id-equiv) , - ( λ t → - ( inv (contraction c (A , id-equiv))) ∙ (contraction c t))) + ( λ t → inv (contraction c (A , id-equiv)) ∙ contraction c t)) ( P)) ``` diff --git a/src/foundation/subsingleton-induction.lagda.md b/src/foundation/subsingleton-induction.lagda.md index 71ee1db622..fbe5d523ba 100644 --- a/src/foundation/subsingleton-induction.lagda.md +++ b/src/foundation/subsingleton-induction.lagda.md @@ -32,8 +32,8 @@ Subsingleton induction uses the observation that a type equipped with an element is [contractible](foundation-core.contractible-types.md) if and only if it is a [proposition](foundation-core.propositions.md). -Subsingelton induction states that given a type family `B` over `A`, to -construct a section of `B` it suffices to provide a section over `a` for some +Subsingleton induction states that given a type family `B` over `A`, to +construct a section of `B` it suffices to provide an element of `B a` for some `a : A`. ## Definition @@ -43,18 +43,18 @@ construct a section of `B` it suffices to provide a section over `a` for some ```agda is-subsingleton : (l1 : Level) {l2 : Level} (A : UU l2) → UU (lsuc l1 ⊔ l2) -is-subsingleton l A = (B : A → UU l) (a : A) → section (ev-point a {B}) +is-subsingleton l A = {B : A → UU l} (a : A) → section (ev-point a {B}) ind-is-subsingleton : {l1 l2 : Level} {A : UU l1} → - ({l : Level} → is-subsingleton l A) → (B : A → UU l2) (a : A) → + ({l : Level} → is-subsingleton l A) → {B : A → UU l2} (a : A) → B a → (x : A) → B x -ind-is-subsingleton is-subsingleton-A B a = pr1 (is-subsingleton-A B a) +ind-is-subsingleton is-subsingleton-A a = pr1 (is-subsingleton-A a) compute-ind-is-subsingleton : {l1 l2 : Level} {A : UU l1} (H : {l : Level} → is-subsingleton l A) → - (B : A → UU l2) (a : A) → (ev-point a {B} ∘ ind-is-subsingleton H B a) ~ id -compute-ind-is-subsingleton is-subsingleton-A B a = pr2 (is-subsingleton-A B a) + {B : A → UU l2} (a : A) → ev-point a {B} ∘ ind-is-subsingleton H {B} a ~ id +compute-ind-is-subsingleton is-subsingleton-A a = pr2 (is-subsingleton-A a) ``` ## Properties @@ -65,16 +65,16 @@ compute-ind-is-subsingleton is-subsingleton-A B a = pr2 (is-subsingleton-A B a) abstract ind-subsingleton : {l1 l2 : Level} {A : UU l1} (is-prop-A : is-prop A) - (B : A → UU l2) → (a : A) → B a → (x : A) → B x - ind-subsingleton is-prop-A B a = + {B : A → UU l2} (a : A) → B a → (x : A) → B x + ind-subsingleton is-prop-A {B} a = ind-singleton a (is-proof-irrelevant-is-prop is-prop-A a) B abstract compute-ind-subsingleton : {l1 l2 : Level} {A : UU l1} - (is-prop-A : is-prop A) (B : A → UU l2) (a : A) → - (ev-point a {B} ∘ ind-subsingleton is-prop-A B a) ~ id - compute-ind-subsingleton is-prop-A B a = + (is-prop-A : is-prop A) {B : A → UU l2} (a : A) → + ev-point a {B} ∘ ind-subsingleton is-prop-A {B} a ~ id + compute-ind-subsingleton is-prop-A {B} a = compute-ind-singleton a (is-proof-irrelevant-is-prop is-prop-A a) B ``` @@ -82,19 +82,20 @@ abstract ```agda is-subsingleton-is-prop : - {l1 l2 : Level} {A : UU l1} → is-prop A → (a : A) → is-singleton l2 A a -is-subsingleton-is-prop is-prop-A a = - is-singleton-is-contr a (is-proof-irrelevant-is-prop is-prop-A a) + {l1 l2 : Level} {A : UU l1} → is-prop A → is-subsingleton l2 A +is-subsingleton-is-prop is-prop-A {B} a = + is-singleton-is-contr a (is-proof-irrelevant-is-prop is-prop-A a) B abstract - is-prop-ind-singleton : - {l1 : Level} (A : UU l1) (a : A) → - ({l2 : Level} (B : A → UU l2) → B a → (x : A) → B x) → is-prop A - is-prop-ind-singleton A a S = is-prop-is-contr (is-contr-ind-singleton A a S) + is-prop-ind-subsingleton : + {l1 : Level} (A : UU l1) → + ({l2 : Level} {B : A → UU l2} (a : A) → B a → (x : A) → B x) → is-prop A + is-prop-ind-subsingleton A S = + is-prop-is-proof-irrelevant + ( λ a → is-contr-ind-singleton A a (λ B → S {B = B} a)) abstract is-prop-is-subsingleton : - {l1 : Level} (A : UU l1) (a : A) → - ({l2 : Level} → is-singleton l2 A a) → is-prop A - is-prop-is-subsingleton A a S = is-prop-ind-singleton A a (pr1 ∘ S) + {l1 : Level} (A : UU l1) → ({l2 : Level} → is-subsingleton l2 A) → is-prop A + is-prop-is-subsingleton A S = is-prop-ind-subsingleton A (pr1 ∘ S) ``` From 7e5f58f70961c728f3e77b0a01eb585272a6a619 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 22:59:11 +0200 Subject: [PATCH 51/89] revert `is-identity-system-is-contr-total-equiv` --- .../isomorphism-induction-categories.lagda.md | 50 ++++++++++++++++--- src/foundation/equivalence-induction.lagda.md | 6 +-- 2 files changed, 45 insertions(+), 11 deletions(-) diff --git a/src/category-theory/isomorphism-induction-categories.lagda.md b/src/category-theory/isomorphism-induction-categories.lagda.md index 694773767a..9979b2a5c5 100644 --- a/src/category-theory/isomorphism-induction-categories.lagda.md +++ b/src/category-theory/isomorphism-induction-categories.lagda.md @@ -8,6 +8,8 @@ module category-theory.isomorphism-induction-categories where ```agda open import category-theory.categories +open import category-theory.precategories +open import category-theory.isomorphisms-in-precategories open import category-theory.isomorphisms-in-categories open import foundation.contractible-types @@ -49,6 +51,36 @@ categories. ## Statement +### For Precategories + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) {A : obj-Precategory C} + where + + ev-id-iso-Precategory : + {l : Level} (P : (B : obj-Precategory C) → (iso-Precategory C A B) → UU l) → + ((B : obj-Precategory C) (e : iso-Precategory C A B) → P B e) → + P A (id-iso-Precategory C) + ev-id-iso-Precategory P f = f A (id-iso-Precategory C) + + induction-principle-iso-Precategory : + {l : Level} (P : (B : obj-Precategory C) (e : iso-Precategory C A B) → UU l) → + UU (l1 ⊔ l2 ⊔ l) + induction-principle-iso-Precategory P = section (ev-id-iso-Precategory P) + + triangle-ev-id-iso-Precategory : + {l : Level} + (P : (B : obj-Precategory C) → iso-Precategory C A B → UU l) → + coherence-triangle-maps + ( ev-point (A , id-iso-Precategory C) {λ (X , e) → P X e}) + ( ev-id-iso-Precategory P) + ( ev-pair {A = obj-Precategory C} {B = iso-Precategory C A} {C = λ (X , e) → P X e}) + triangle-ev-id-iso-Precategory P f = refl +``` + +### For categories + ```agda module _ {l1 l2 : Level} (C : Category l1 l2) {A : obj-Category C} @@ -58,21 +90,23 @@ module _ {l : Level} (P : (B : obj-Category C) → (iso-Category C A B) → UU l) → ((B : obj-Category C) (e : iso-Category C A B) → P B e) → P A (id-iso-Category C) - ev-id-iso-Category P f = f A (id-iso-Category C) + ev-id-iso-Category = ev-id-iso-Precategory (precategory-Category C) induction-principle-iso-Category : {l : Level} (P : (B : obj-Category C) (e : iso-Category C A B) → UU l) → UU (l1 ⊔ l2 ⊔ l) - induction-principle-iso-Category P = section (ev-id-iso-Category P) + induction-principle-iso-Category = + induction-principle-iso-Precategory (precategory-Category C) triangle-ev-id-iso-Category : {l : Level} - (P : (Σ (obj-Category C) (iso-Category C A)) → UU l) → + (P : (B : obj-Category C) → iso-Category C A B → UU l) → coherence-triangle-maps - ( ev-point (A , id-iso-Category C) {P}) - ( ev-id-iso-Category (λ X e → P (X , e))) - ( ev-pair {A = obj-Category C} {B = iso-Category C A} {C = P}) - triangle-ev-id-iso-Category P f = refl + ( ev-point (A , id-iso-Category C) {λ (X , e) → P X e}) + ( ev-id-iso-Category P) + ( ev-pair {A = obj-Category C} {B = iso-Category C A} {C = λ (X , e) → P X e}) + triangle-ev-id-iso-Category = + triangle-ev-id-iso-Precategory (precategory-Category C) ``` ## Properties @@ -164,7 +198,7 @@ module _ ( ev-point (A , id-iso-Category C)) ( ev-id-iso-Category C P) ( ev-pair) - ( triangle-ev-id-iso-Category C (λ u → P (pr1 u) (pr2 u))) + ( triangle-ev-id-iso-Category C P) ( dependent-universal-property-contr-is-contr ( A , id-iso-Category C) ( is-contr-total-iso-Category C A) diff --git a/src/foundation/equivalence-induction.lagda.md b/src/foundation/equivalence-induction.lagda.md index 0ee1394b7d..e055c3d4f5 100644 --- a/src/foundation/equivalence-induction.lagda.md +++ b/src/foundation/equivalence-induction.lagda.md @@ -89,12 +89,12 @@ module _ where abstract - induction-principle-equivalences-is-contr-total-equiv : + is-identity-system-is-contr-total-equiv : is-contr (Σ (UU l1) (λ X → A ≃ X)) → {l : Level} → (P : (Σ (UU l1) (λ X → A ≃ X)) → UU l) → induction-principle-equivalences (λ B e → P (B , e)) - induction-principle-equivalences-is-contr-total-equiv c P = + is-identity-system-is-contr-total-equiv c P = section-left-factor ( ev-id-equiv (λ X e → P (X , e))) ( ev-pair) @@ -152,7 +152,7 @@ module _ abstract is-identity-system-equiv : section (ev-id-equiv P) is-identity-system-equiv = - induction-principle-equivalences-is-contr-total-equiv + is-identity-system-is-contr-total-equiv ( is-contr-total-equiv _) ( λ t → P (pr1 t) (pr2 t)) From 80ee49bb60e6eaa20a1ab79d2217949e577b7b43 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 23:02:06 +0200 Subject: [PATCH 52/89] revert `is-identity-system-is-contr-total-equiv` --- .../isomorphism-induction-categories.lagda.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/category-theory/isomorphism-induction-categories.lagda.md b/src/category-theory/isomorphism-induction-categories.lagda.md index 9979b2a5c5..ea88931d51 100644 --- a/src/category-theory/isomorphism-induction-categories.lagda.md +++ b/src/category-theory/isomorphism-induction-categories.lagda.md @@ -119,12 +119,12 @@ module _ where abstract - induction-principle-iso-is-contr-total-iso-Category : + is-identity-system-iso-is-contr-total-iso-Category : is-contr (Σ (obj-Category C) (iso-Category C A)) → {l : Level} → (P : (Σ (obj-Category C) (iso-Category C A)) → UU l) → induction-principle-iso-Category C (λ B e → P (B , e)) - induction-principle-iso-is-contr-total-iso-Category c P = + is-identity-system-iso-is-contr-total-iso-Category c P = section-left-factor ( ev-id-iso-Category C (λ X e → P (X , e))) ( ev-pair) @@ -170,7 +170,7 @@ module _ abstract is-identity-system-iso-Category : section (ev-id-iso-Category C P) is-identity-system-iso-Category = - induction-principle-iso-is-contr-total-iso-Category C + is-identity-system-iso-is-contr-total-iso-Category C ( is-contr-total-iso-Category C _) ( λ t → P (pr1 t) (pr2 t)) From f2af23d013af8f0eba007dfded5e319c3a98bd72 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 23:58:00 +0200 Subject: [PATCH 53/89] element instead of section --- src/foundation/singleton-induction.lagda.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/foundation/singleton-induction.lagda.md b/src/foundation/singleton-induction.lagda.md index bce8c67f2f..17978917ad 100644 --- a/src/foundation/singleton-induction.lagda.md +++ b/src/foundation/singleton-induction.lagda.md @@ -29,8 +29,8 @@ principle analogous to the induction principle of the [unit type](foundation.unit-type.md). A type satisfies singleton induction if and only if it is [contractible](foundation-core.contractible-types.md). -Singelton induction states that given a type family `B` over `A`, to construct a -section of `B` it suffices to construct a section over `a`. +Singleton induction states that given a type family `B` over `A`, to construct a +section of `B` it suffices to construct an element in `B a`. ## Definition From a6f61ca08613ca7322f51614df03db16a494b10b Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 00:55:58 +0200 Subject: [PATCH 54/89] refactor isomorphism induction --- src/category-theory.lagda.md | 1 + .../isomorphism-induction-categories.lagda.md | 112 +++++------------- ...omorphism-induction-precategories.lagda.md | 112 ++++++++++++++++++ src/category-theory/subprecategories.lagda.md | 10 +- src/foundation/identity-systems.lagda.md | 8 +- 5 files changed, 153 insertions(+), 90 deletions(-) create mode 100644 src/category-theory/isomorphism-induction-precategories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index dcbe23e916..d885a5de57 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -64,6 +64,7 @@ open import category-theory.initial-objects-large-categories public open import category-theory.initial-objects-large-precategories public open import category-theory.initial-objects-precategories public open import category-theory.isomorphism-induction-categories public +open import category-theory.isomorphism-induction-precategories public open import category-theory.isomorphisms-in-categories public open import category-theory.isomorphisms-in-large-categories public open import category-theory.isomorphisms-in-large-precategories public diff --git a/src/category-theory/isomorphism-induction-categories.lagda.md b/src/category-theory/isomorphism-induction-categories.lagda.md index ea88931d51..bb32407a01 100644 --- a/src/category-theory/isomorphism-induction-categories.lagda.md +++ b/src/category-theory/isomorphism-induction-categories.lagda.md @@ -8,23 +8,25 @@ module category-theory.isomorphism-induction-categories where ```agda open import category-theory.categories -open import category-theory.precategories -open import category-theory.isomorphisms-in-precategories +open import category-theory.isomorphism-induction-precategories open import category-theory.isomorphisms-in-categories +open import category-theory.isomorphisms-in-precategories +open import category-theory.precategories +open import foundation.commuting-triangles-of-maps +open import foundation.contractible-maps open import foundation.contractible-types open import foundation.dependent-pair-types +open import foundation.equivalences +open import foundation.function-types +open import foundation.homotopies +open import foundation.identity-systems +open import foundation.identity-types +open import foundation.sections +open import foundation.singleton-induction open import foundation.universal-property-dependent-pair-types +open import foundation.universal-property-identity-systems open import foundation.universe-levels - -open import foundation-core.commuting-triangles-of-maps -open import foundation-core.contractible-maps -open import foundation-core.equivalences -open import foundation-core.function-types -open import foundation-core.homotopies -open import foundation-core.identity-types -open import foundation-core.sections -open import foundation-core.singleton-induction ```
@@ -51,36 +53,6 @@ categories. ## Statement -### For Precategories - -```agda -module _ - {l1 l2 : Level} (C : Precategory l1 l2) {A : obj-Precategory C} - where - - ev-id-iso-Precategory : - {l : Level} (P : (B : obj-Precategory C) → (iso-Precategory C A B) → UU l) → - ((B : obj-Precategory C) (e : iso-Precategory C A B) → P B e) → - P A (id-iso-Precategory C) - ev-id-iso-Precategory P f = f A (id-iso-Precategory C) - - induction-principle-iso-Precategory : - {l : Level} (P : (B : obj-Precategory C) (e : iso-Precategory C A B) → UU l) → - UU (l1 ⊔ l2 ⊔ l) - induction-principle-iso-Precategory P = section (ev-id-iso-Precategory P) - - triangle-ev-id-iso-Precategory : - {l : Level} - (P : (B : obj-Precategory C) → iso-Precategory C A B → UU l) → - coherence-triangle-maps - ( ev-point (A , id-iso-Precategory C) {λ (X , e) → P X e}) - ( ev-id-iso-Precategory P) - ( ev-pair {A = obj-Precategory C} {B = iso-Precategory C A} {C = λ (X , e) → P X e}) - triangle-ev-id-iso-Precategory P f = refl -``` - -### For categories - ```agda module _ {l1 l2 : Level} (C : Category l1 l2) {A : obj-Category C} @@ -102,9 +74,9 @@ module _ {l : Level} (P : (B : obj-Category C) → iso-Category C A B → UU l) → coherence-triangle-maps - ( ev-point (A , id-iso-Category C) {λ (X , e) → P X e}) + ( ev-point (A , id-iso-Category C)) ( ev-id-iso-Category P) - ( ev-pair {A = obj-Category C} {B = iso-Category C A} {C = λ (X , e) → P X e}) + ( ev-pair) triangle-ev-id-iso-Category = triangle-ev-id-iso-Precategory (precategory-Category C) ``` @@ -122,18 +94,10 @@ module _ is-identity-system-iso-is-contr-total-iso-Category : is-contr (Σ (obj-Category C) (iso-Category C A)) → {l : Level} → - (P : (Σ (obj-Category C) (iso-Category C A)) → UU l) → - induction-principle-iso-Category C (λ B e → P (B , e)) - is-identity-system-iso-is-contr-total-iso-Category c P = - section-left-factor - ( ev-id-iso-Category C (λ X e → P (X , e))) - ( ev-pair) - ( is-singleton-is-contr - ( A , id-iso-Category C) - ( ( A , id-iso-Category C) , - ( λ t → - inv (contraction c (A , id-iso-Category C)) ∙ contraction c t)) - ( P)) + is-identity-system l (iso-Category C A) A (id-iso-Category C) + is-identity-system-iso-is-contr-total-iso-Category = + is-identity-system-iso-is-contr-total-iso-Precategory + ( precategory-Category C) ``` ### Isomorphism induction implies contractibility of the total space of isomorphisms @@ -143,20 +107,13 @@ module _ {l1 l2 : Level} (C : Category l1 l2) {A : obj-Category C} where - abstract - is-contr-total-equiv-induction-principle-iso-Category : - ( {l : Level} (P : (Σ (obj-Category C) (iso-Category C A)) → UU l) → - induction-principle-iso-Category C (λ B e → P (B , e))) → - is-contr (Σ (obj-Category C) (iso-Category C A)) - is-contr-total-equiv-induction-principle-iso-Category ind = - is-contr-is-singleton - ( Σ (obj-Category C) (iso-Category C A)) - ( A , id-iso-Category C) - ( λ P → section-comp - ( ev-id-iso-Category C (λ X e → P (X , e))) - ( ev-pair {A = obj-Category C} {B = iso-Category C A} {C = P}) - ( ind-Σ , refl-htpy) - ( ind P)) + is-contr-total-equiv-induction-principle-iso-Category : + ( {l : Level} → + is-identity-system l (iso-Category C A) A (id-iso-Category C)) → + is-contr (Σ (obj-Category C) (iso-Category C A)) + is-contr-total-equiv-induction-principle-iso-Category = + is-contr-total-equiv-induction-principle-iso-Precategory + ( precategory-Category C) ``` ### Isomorphism induction in a category @@ -171,8 +128,7 @@ module _ is-identity-system-iso-Category : section (ev-id-iso-Category C P) is-identity-system-iso-Category = is-identity-system-iso-is-contr-total-iso-Category C - ( is-contr-total-iso-Category C _) - ( λ t → P (pr1 t) (pr2 t)) + ( is-contr-total-iso-Category C A) P ind-iso-Category : P A (id-iso-Category C) → @@ -194,16 +150,10 @@ module _ is-equiv-ev-id-iso-Category : is-equiv (ev-id-iso-Category C P) is-equiv-ev-id-iso-Category = - is-equiv-left-factor-htpy - ( ev-point (A , id-iso-Category C)) - ( ev-id-iso-Category C P) - ( ev-pair) - ( triangle-ev-id-iso-Category C P) - ( dependent-universal-property-contr-is-contr - ( A , id-iso-Category C) - ( is-contr-total-iso-Category C A) - ( λ u → P (pr1 u) (pr2 u))) - ( is-equiv-ev-pair) + dependent-universal-property-identity-system-is-torsorial + ( id-iso-Category C) + ( is-contr-total-iso-Category C A) + ( P) is-contr-map-ev-id-iso-Category : is-contr-map (ev-id-iso-Category C P) diff --git a/src/category-theory/isomorphism-induction-precategories.lagda.md b/src/category-theory/isomorphism-induction-precategories.lagda.md new file mode 100644 index 0000000000..0ee20bbb15 --- /dev/null +++ b/src/category-theory/isomorphism-induction-precategories.lagda.md @@ -0,0 +1,112 @@ +# Isomorphism induction in precategories + +```agda +module category-theory.isomorphism-induction-precategories where +``` + +
Imports + +```agda +open import category-theory.categories +open import category-theory.isomorphisms-in-categories +open import category-theory.isomorphisms-in-precategories +open import category-theory.precategories + +open import foundation.commuting-triangles-of-maps +open import foundation.contractible-maps +open import foundation.contractible-types +open import foundation.dependent-pair-types +open import foundation.equivalences +open import foundation.function-types +open import foundation.homotopies +open import foundation.identity-systems +open import foundation.identity-types +open import foundation.sections +open import foundation.singleton-induction +open import foundation.universal-property-dependent-pair-types +open import foundation.universal-property-identity-systems +open import foundation.universe-levels +``` + +
+ +## Idea + +**Isomorphism induction** in a precategory `𝒞` is the principle asserting that, +given an object `A : 𝒞` and any type family + +```text + P : (B : 𝒞) (ϕ : A ≅ B) → 𝒰 +``` + +of types indexed by all +[isomorphisms](category-theory.isomorphisms-in-categories.md) with domain `A`, +there is a [section](foundation.sections.md) of the evaluation map + +```text + ((B : 𝒞) (ϕ : A ≅ B) → P B ϕ) → P A id-iso. +``` + +The principle of isomorphism induction is equivalent to the univalence axiom for +categories. + +## Statement + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) {A : obj-Precategory C} + where + + ev-id-iso-Precategory : + {l : Level} (P : (B : obj-Precategory C) → (iso-Precategory C A B) → UU l) → + ((B : obj-Precategory C) (e : iso-Precategory C A B) → P B e) → + P A (id-iso-Precategory C) + ev-id-iso-Precategory P f = f A (id-iso-Precategory C) + + induction-principle-iso-Precategory : + {l : Level} (P : (B : obj-Precategory C) → iso-Precategory C A B → UU l) → + UU (l1 ⊔ l2 ⊔ l) + induction-principle-iso-Precategory P = section (ev-id-iso-Precategory P) + + triangle-ev-id-iso-Precategory : + {l : Level} + (P : (B : obj-Precategory C) → iso-Precategory C A B → UU l) → + coherence-triangle-maps + ( ev-point (A , id-iso-Precategory C)) + ( ev-id-iso-Precategory P) + ( ev-pair) + triangle-ev-id-iso-Precategory P f = refl +``` + +## Properties + +### Contractibility of the total space of isomorphisms implies isomorphism induction + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) {A : obj-Precategory C} + where + + abstract + is-identity-system-iso-is-contr-total-iso-Precategory : + is-contr (Σ (obj-Precategory C) (iso-Precategory C A)) → + {l : Level} → + is-identity-system l (iso-Precategory C A) A (id-iso-Precategory C) + is-identity-system-iso-is-contr-total-iso-Precategory = + is-identity-system-is-torsorial A (id-iso-Precategory C) +``` + +### Isomorphism induction implies contractibility of the total space of isomorphisms + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) {A : obj-Precategory C} + where + + is-contr-total-equiv-induction-principle-iso-Precategory : + ( {l : Level} → + is-identity-system l (iso-Precategory C A) A (id-iso-Precategory C)) → + is-contr (Σ (obj-Precategory C) (iso-Precategory C A)) + is-contr-total-equiv-induction-principle-iso-Precategory = + is-torsorial-is-identity-system A (id-iso-Precategory C) +``` diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index b2cf6d85c4..cf72d04ea8 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -7,21 +7,21 @@ module category-theory.subprecategories where
Imports ```agda +open import category-theory.categories open import category-theory.faithful-functors-precategories open import category-theory.functors-precategories -open import category-theory.maps-precategories -open import category-theory.isomorphisms-in-precategories open import category-theory.isomorphism-induction-categories +open import category-theory.isomorphisms-in-precategories +open import category-theory.maps-precategories open import category-theory.precategories -open import category-theory.categories open import foundation.dependent-pair-types open import foundation.embeddings -open import foundation.identity-types open import foundation.function-types -open import foundation.subsingleton-induction +open import foundation.identity-types open import foundation.propositions open import foundation.sets +open import foundation.subsingleton-induction open import foundation.subtypes open import foundation.universe-levels ``` diff --git a/src/foundation/identity-systems.lagda.md b/src/foundation/identity-systems.lagda.md index b3622001da..ac4eb24b00 100644 --- a/src/foundation/identity-systems.lagda.md +++ b/src/foundation/identity-systems.lagda.md @@ -39,7 +39,7 @@ ev-refl-identity-system : {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {a : A} (b : B a) {P : (x : A) (y : B x) → UU l3} → ((x : A) (y : B x) → P x y) → P a b -ev-refl-identity-system b f = f _ b +ev-refl-identity-system {a = a} b f = f a b module _ {l1 l2 : Level} (l : Level) {A : UU l1} (B : A → UU l2) (a : A) (b : B a) @@ -75,7 +75,7 @@ module _ ap ( λ t → tr (fam-Σ P) t p) ( eq-is-contr' - ( is-prop-is-contr H (pair a b) (pair a b)) + ( is-prop-is-contr H (a , b) (a , b)) ( eq-is-contr H) ( refl)) @@ -84,8 +84,8 @@ module _ ({l : Level} → is-identity-system l B a b) → is-contr (Σ A B) pr1 (pr1 (is-torsorial-is-identity-system H)) = a pr2 (pr1 (is-torsorial-is-identity-system H)) = b - pr2 (is-torsorial-is-identity-system H) (pair x y) = - pr1 (H (λ x' y' → (pair a b) = (pair x' y'))) refl x y + pr2 (is-torsorial-is-identity-system H) (x , y) = + pr1 (H (λ x' y' → (a , b) = (x' , y'))) refl x y abstract fundamental-theorem-id-is-identity-system : From 42e30150e6fbf6f6d669ad55f61b44d3ba8ec243 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 01:16:12 +0200 Subject: [PATCH 55/89] refactor `equivalence-inducton` --- src/foundation/equivalence-induction.lagda.md | 77 ++++++------------- 1 file changed, 22 insertions(+), 55 deletions(-) diff --git a/src/foundation/equivalence-induction.lagda.md b/src/foundation/equivalence-induction.lagda.md index e055c3d4f5..80a72a766b 100644 --- a/src/foundation/equivalence-induction.lagda.md +++ b/src/foundation/equivalence-induction.lagda.md @@ -13,6 +13,7 @@ open import foundation.identity-systems open import foundation.subuniverses open import foundation.univalence open import foundation.universal-property-dependent-pair-types +open import foundation.universal-property-identity-systems open import foundation.universe-levels open import foundation-core.commuting-triangles-of-maps @@ -71,11 +72,11 @@ module _ triangle-ev-id-equiv : {l : Level} - (P : (Σ (UU l1) (λ X → A ≃ X)) → UU l) → + (P : (Σ (UU l1) (A ≃_)) → UU l) → coherence-triangle-maps - ( ev-point (A , id-equiv) {P}) + ( ev-point (A , id-equiv)) ( ev-id-equiv (λ X e → P (X , e))) - ( ev-pair {A = UU l1} {B = λ X → A ≃ X} {C = P}) + ( ev-pair) triangle-ev-id-equiv P f = refl ``` @@ -90,19 +91,10 @@ module _ abstract is-identity-system-is-contr-total-equiv : - is-contr (Σ (UU l1) (λ X → A ≃ X)) → - {l : Level} → - (P : (Σ (UU l1) (λ X → A ≃ X)) → UU l) → - induction-principle-equivalences (λ B e → P (B , e)) - is-identity-system-is-contr-total-equiv c P = - section-left-factor - ( ev-id-equiv (λ X e → P (X , e))) - ( ev-pair) - ( is-singleton-is-contr - ( A , id-equiv) - ( ( A , id-equiv) , - ( λ t → inv (contraction c (A , id-equiv)) ∙ contraction c t)) - ( P)) + is-contr (Σ (UU l1) (A ≃_)) → + {l : Level} → is-identity-system l (A ≃_) A id-equiv + is-identity-system-is-contr-total-equiv = + is-identity-system-is-torsorial A id-equiv ``` ### Equivalence induction implies contractibility of the total space of equivalences @@ -114,32 +106,25 @@ module _ abstract is-contr-total-equiv-induction-principle-equivalences : - ( {l : Level} (P : (Σ (UU l1) (λ X → A ≃ X)) → UU l) → + ( {l : Level} (P : (Σ (UU l1) (A ≃_)) → UU l) → induction-principle-equivalences (λ B e → P (B , e))) → - is-contr (Σ (UU l1) (λ X → A ≃ X)) + is-contr (Σ (UU l1) (A ≃_)) is-contr-total-equiv-induction-principle-equivalences ind = is-contr-is-singleton - ( Σ (UU l1) (λ X → A ≃ X)) + ( Σ (UU l1) (A ≃_)) ( A , id-equiv) ( λ P → section-comp ( ev-id-equiv (λ X e → P (X , e))) - ( ev-pair {A = UU l1} {B = λ X → A ≃ X} {C = P}) + ( ev-pair) ( ind-Σ , refl-htpy) ( ind P)) abstract is-contr-total-is-identity-system-equiv : - ( {l : Level} → is-identity-system l (λ X → A ≃ X) A id-equiv) → - is-contr (Σ (UU l1) (λ X → A ≃ X)) - is-contr-total-is-identity-system-equiv ind = - is-contr-is-singleton - ( Σ (UU l1) (λ X → A ≃ X)) - ( A , id-equiv) - ( λ P → section-comp - ( ev-id-equiv (λ X e → P (X , e))) - ( ev-pair {A = UU l1} {B = λ X → A ≃ X} {C = P}) - ( ind-Σ , refl-htpy) - ( ind (λ X e → P (X , e)))) + ( {l : Level} → is-identity-system l (A ≃_) A id-equiv) → + is-contr (Σ (UU l1) (A ≃_)) + is-contr-total-is-identity-system-equiv = + is-torsorial-is-identity-system A id-equiv ``` ### Equivalence induction in a universe @@ -152,9 +137,7 @@ module _ abstract is-identity-system-equiv : section (ev-id-equiv P) is-identity-system-equiv = - is-identity-system-is-contr-total-equiv - ( is-contr-total-equiv _) - ( λ t → P (pr1 t) (pr2 t)) + is-identity-system-is-contr-total-equiv (is-contr-total-equiv A) P ind-equiv : P A id-equiv → {B : UU l1} (e : A ≃ B) → P B e @@ -218,16 +201,8 @@ module _ is-equiv-ev-id-equiv : is-equiv (ev-id-equiv P) is-equiv-ev-id-equiv = - is-equiv-left-factor-htpy - ( ev-point (A , id-equiv)) - ( ev-id-equiv P) - ( ev-pair) - ( triangle-ev-id-equiv (λ u → P (pr1 u) (pr2 u))) - ( dependent-universal-property-contr-is-contr - ( A , id-equiv) - ( is-contr-total-equiv A) - ( λ u → P (pr1 u) (pr2 u))) - ( is-equiv-ev-pair) + dependent-universal-property-identity-system-is-torsorial + id-equiv (is-contr-total-equiv A) P is-contr-map-ev-id-equiv : is-contr-map (ev-id-equiv P) is-contr-map-ev-id-equiv = is-contr-map-is-equiv is-equiv-ev-id-equiv @@ -244,16 +219,8 @@ module _ is-equiv-ev-id-equiv-subuniverse : is-equiv (ev-id-equiv-subuniverse P X {F}) is-equiv-ev-id-equiv-subuniverse = - is-equiv-left-factor-htpy - ( ev-point (X , id-equiv)) - ( ev-id-equiv-subuniverse P X) - ( ev-pair) - ( triangle-ev-id-equiv-subuniverse P X F) - ( dependent-universal-property-contr-is-contr - ( X , id-equiv) - ( is-contr-total-equiv-subuniverse P X) - ( λ E → F (pr1 E) (pr2 E))) - ( is-equiv-ev-pair) + dependent-universal-property-identity-system-is-torsorial + ( id-equiv) (is-contr-total-equiv-subuniverse P X) F is-contr-map-ev-id-equiv-subuniverse : is-contr-map (ev-id-equiv-subuniverse P X {F}) @@ -273,6 +240,6 @@ abstract is-equiv-postcomp-univalence : {l1 l2 : Level} {X Y : UU l1} (A : UU l2) (e : X ≃ Y) → is-equiv (postcomp A (map-equiv e)) - is-equiv-postcomp-univalence {X = X} A = + is-equiv-postcomp-univalence A = ind-equiv (λ Y e → is-equiv (postcomp A (map-equiv e))) is-equiv-id ``` From 9dec60cd45b566b1abcd77d11111fb26f6a3b2ee Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 01:17:48 +0200 Subject: [PATCH 56/89] use `is-torsorial` --- src/foundation/equivalence-induction.lagda.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/foundation/equivalence-induction.lagda.md b/src/foundation/equivalence-induction.lagda.md index 80a72a766b..b5eea12007 100644 --- a/src/foundation/equivalence-induction.lagda.md +++ b/src/foundation/equivalence-induction.lagda.md @@ -90,10 +90,10 @@ module _ where abstract - is-identity-system-is-contr-total-equiv : + is-identity-system-is-torsorial-equiv : is-contr (Σ (UU l1) (A ≃_)) → {l : Level} → is-identity-system l (A ≃_) A id-equiv - is-identity-system-is-contr-total-equiv = + is-identity-system-is-torsorial-equiv = is-identity-system-is-torsorial A id-equiv ``` @@ -105,11 +105,11 @@ module _ where abstract - is-contr-total-equiv-induction-principle-equivalences : + is-torsorial-equiv-induction-principle-equivalences : ( {l : Level} (P : (Σ (UU l1) (A ≃_)) → UU l) → induction-principle-equivalences (λ B e → P (B , e))) → is-contr (Σ (UU l1) (A ≃_)) - is-contr-total-equiv-induction-principle-equivalences ind = + is-torsorial-equiv-induction-principle-equivalences ind = is-contr-is-singleton ( Σ (UU l1) (A ≃_)) ( A , id-equiv) @@ -120,10 +120,10 @@ module _ ( ind P)) abstract - is-contr-total-is-identity-system-equiv : + is-torsorial-is-identity-system-equiv : ( {l : Level} → is-identity-system l (A ≃_) A id-equiv) → is-contr (Σ (UU l1) (A ≃_)) - is-contr-total-is-identity-system-equiv = + is-torsorial-is-identity-system-equiv = is-torsorial-is-identity-system A id-equiv ``` @@ -137,7 +137,7 @@ module _ abstract is-identity-system-equiv : section (ev-id-equiv P) is-identity-system-equiv = - is-identity-system-is-contr-total-equiv (is-contr-total-equiv A) P + is-identity-system-is-torsorial-equiv (is-contr-total-equiv A) P ind-equiv : P A id-equiv → {B : UU l1} (e : A ≃ B) → P B e From e09b32cdb0e3ee4117d7047ba6ac0b7a4a7398e0 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 01:20:07 +0200 Subject: [PATCH 57/89] pre-commit --- src/foundation/equivalence-induction.lagda.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/foundation/equivalence-induction.lagda.md b/src/foundation/equivalence-induction.lagda.md index b5eea12007..7409d139b8 100644 --- a/src/foundation/equivalence-induction.lagda.md +++ b/src/foundation/equivalence-induction.lagda.md @@ -201,8 +201,8 @@ module _ is-equiv-ev-id-equiv : is-equiv (ev-id-equiv P) is-equiv-ev-id-equiv = - dependent-universal-property-identity-system-is-torsorial - id-equiv (is-contr-total-equiv A) P + dependent-universal-property-identity-system-is-torsorial + ( id-equiv) (is-contr-total-equiv A) P is-contr-map-ev-id-equiv : is-contr-map (ev-id-equiv P) is-contr-map-ev-id-equiv = is-contr-map-is-equiv is-equiv-ev-id-equiv From b4ceeb63038f06d1607e8a77f5d36438c94a59bc Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 10:49:04 +0200 Subject: [PATCH 58/89] rename "axiom L" to "preunivalence axiom" and refactor univalence --- .../preunivalent-categories.lagda.md | 2 +- src/foundation-core/sets.lagda.md | 14 ++-- src/foundation-core/univalence.lagda.md | 19 +++-- src/foundation.lagda.md | 2 +- src/foundation/axiom-l.lagda.md | 67 --------------- src/foundation/preunivalence.lagda.md | 82 +++++++++++++++++++ src/foundation/univalence.lagda.md | 4 +- ...universal-property-identity-types.lagda.md | 33 ++++---- 8 files changed, 123 insertions(+), 100 deletions(-) delete mode 100644 src/foundation/axiom-l.lagda.md create mode 100644 src/foundation/preunivalence.lagda.md diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md index f38d6229e7..a489e184de 100644 --- a/src/category-theory/preunivalent-categories.lagda.md +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -215,4 +215,4 @@ module _ ## See also -- [Axiom L](foundation.axiom-l.md) +- [Axiom L](foundation.preunivalence.md) diff --git a/src/foundation-core/sets.lagda.md b/src/foundation-core/sets.lagda.md index 848a34532e..5ce7e3374c 100644 --- a/src/foundation-core/sets.lagda.md +++ b/src/foundation-core/sets.lagda.md @@ -55,24 +55,28 @@ module _ ### A type is a set if and only if it satisfies Streicher's axiom K ```agda -axiom-K : {l : Level} → UU l → UU l -axiom-K A = (x : A) (p : x = x) → refl = p +statement-axiom-K : {l : Level} → UU l → UU l +statement-axiom-K A = (x : A) (p : x = x) → refl = p + +axiom-K : (l : Level) → UU (lsuc l) +axiom-K l = (A : UU l) → statement-axiom-K A module _ {l : Level} {A : UU l} where abstract - is-set-axiom-K' : axiom-K A → (x y : A) → all-elements-equal (x = y) + is-set-axiom-K' : + statement-axiom-K A → (x y : A) → all-elements-equal (x = y) is-set-axiom-K' K x .x refl q with K x q ... | refl = refl abstract - is-set-axiom-K : axiom-K A → is-set A + is-set-axiom-K : statement-axiom-K A → is-set A is-set-axiom-K H x y = is-prop-all-elements-equal (is-set-axiom-K' H x y) abstract - axiom-K-is-set : is-set A → axiom-K A + axiom-K-is-set : is-set A → statement-axiom-K A axiom-K-is-set H x p = ( inv (contraction (is-proof-irrelevant-is-prop (H x x) refl) refl)) ∙ ( contraction (is-proof-irrelevant-is-prop (H x x) refl) p) diff --git a/src/foundation-core/univalence.lagda.md b/src/foundation-core/univalence.lagda.md index 1192ecd6e2..3bc7bb2cd1 100644 --- a/src/foundation-core/univalence.lagda.md +++ b/src/foundation-core/univalence.lagda.md @@ -39,8 +39,11 @@ equiv-eq refl = id-equiv map-eq : {l : Level} {A : UU l} {B : UU l} → A = B → A → B map-eq = map-equiv ∘ equiv-eq -UNIVALENCE : {l : Level} (A B : UU l) → UU (lsuc l) -UNIVALENCE A B = is-equiv (equiv-eq {A = A} {B = B}) +statement-univalence : {l : Level} (A B : UU l) → UU (lsuc l) +statement-univalence A B = is-equiv (equiv-eq {A = A} {B = B}) + +axiom-univalence : (l : Level) → UU (lsuc l) +axiom-univalence l = (A B : UU l) → statement-univalence A B ``` ## Properties @@ -49,10 +52,10 @@ UNIVALENCE A B = is-equiv (equiv-eq {A = A} {B = B}) ```agda abstract - is-contr-total-equiv-UNIVALENCE : + is-contr-total-equiv-univalence : {l : Level} (A : UU l) → - ((B : UU l) → UNIVALENCE A B) → is-contr (Σ (UU l) (λ X → A ≃ X)) - is-contr-total-equiv-UNIVALENCE A UA = + ((B : UU l) → statement-univalence A B) → is-contr (Σ (UU l) (A ≃_)) + is-contr-total-equiv-univalence A UA = fundamental-theorem-id' (λ B → equiv-eq) UA ``` @@ -60,10 +63,10 @@ abstract ```agda abstract - UNIVALENCE-is-contr-total-equiv : + univalence-is-contr-total-equiv : {l : Level} (A : UU l) → - is-contr (Σ (UU l) (λ X → A ≃ X)) → (B : UU l) → UNIVALENCE A B - UNIVALENCE-is-contr-total-equiv A c = + is-contr (Σ (UU l) (A ≃_)) → (B : UU l) → statement-univalence A B + univalence-is-contr-total-equiv A c = fundamental-theorem-id c (λ B → equiv-eq) ``` diff --git a/src/foundation.lagda.md b/src/foundation.lagda.md index b7cc4add14..bd2b7271aa 100644 --- a/src/foundation.lagda.md +++ b/src/foundation.lagda.md @@ -21,7 +21,6 @@ open import foundation.apartness-relations public open import foundation.arithmetic-law-coproduct-and-sigma-decompositions public open import foundation.arithmetic-law-product-and-pi-decompositions public open import foundation.automorphisms public -open import foundation.axiom-l public open import foundation.axiom-of-choice public open import foundation.bands public open import foundation.binary-embeddings public @@ -214,6 +213,7 @@ open import foundation.pointed-torsorial-type-families public open import foundation.powersets public open import foundation.preidempotent-maps public open import foundation.preimages-of-subtypes public +open import foundation.preunivalence public open import foundation.principle-of-omniscience public open import foundation.product-decompositions public open import foundation.product-decompositions-subuniverse public diff --git a/src/foundation/axiom-l.lagda.md b/src/foundation/axiom-l.lagda.md deleted file mode 100644 index 5879beede4..0000000000 --- a/src/foundation/axiom-l.lagda.md +++ /dev/null @@ -1,67 +0,0 @@ -# Axiom L - -```agda -module foundation.axiom-l where -``` - -
Imports - -```agda -open import foundation.dependent-pair-types -open import foundation.sets -open import foundation.universe-levels - -open import foundation-core.embeddings -open import foundation-core.equivalences -open import foundation-core.identity-types -open import foundation-core.univalence -``` - -
- -## Idea - -Axiom L, which is due to Peter Lumsdaine, asserts that for any two types `X` and -`Y` in a common universe, the map `X = Y → X ≃ Y` is an embedding. This axiom -is a common generalization of the univalence axiom and axiom K, in the sense -that both univalence and axiom K imply axiom L. - -## Definition - -```agda -axiom-L : (l : Level) → UU (lsuc l) -axiom-L l = (X Y : UU l) → is-emb (equiv-eq {A = X} {B = Y}) - -emb-L : {l : Level} → axiom-L l → (X Y : UU l) → (X = Y) ↪ (X ≃ Y) -pr1 (emb-L H X Y) = equiv-eq -pr2 (emb-L H X Y) = H X Y -``` - -## Properties - -### Axiom L generalizes the univalence axiom - -```agda -axiom-L-univalence : - {l : Level} → ((A B : UU l) → UNIVALENCE A B) → axiom-L l -axiom-L-univalence ua A B = is-emb-is-equiv (ua A B) -``` - -### Axiom L generalizes axiom K - -```agda -axiom-L-axiom-K : - {l : Level} → ((A : UU l) → axiom-K A) → axiom-K (UU l) → axiom-L l -axiom-L-axiom-K K K-UU A B = - is-emb-is-prop-is-set - ( is-set-axiom-K K-UU A B) - ( is-set-equiv-is-set - ( is-set-axiom-K (K A)) - ( is-set-axiom-K (K B))) -``` - -## See also - -- Axiom L is sufficient to prove that `Id : A → (A → 𝒰)` is an embedding. This - fact is proven in - [`foundation.universal-property-identity-types`](foundation.universal-property-identity-types.md) diff --git a/src/foundation/preunivalence.lagda.md b/src/foundation/preunivalence.lagda.md new file mode 100644 index 0000000000..20aadd38da --- /dev/null +++ b/src/foundation/preunivalence.lagda.md @@ -0,0 +1,82 @@ +# The preunivalence axiom + +```agda +module foundation.preunivalence where +``` + +
Imports + +```agda +open import foundation.dependent-pair-types +open import foundation.embeddings +open import foundation.equivalences +open import foundation.sets +open import foundation.subtypes +open import foundation.universe-levels + +open import foundation-core.identity-types +open import foundation-core.univalence +``` + +
+ +## Idea + +**The preunivalence axiom**, or **axiom L**, which is due to Peter Lumsdaine, +asserts that for any two types `X` and `Y` in a common universe, the map +`X = Y → X ≃ Y` is an [embedding](foundation-core.embeddings.md). This axiom is +a common generalization of the [univalence axiom](foundation.univalence.md) and +[axiom K](foundation-core.sets.md), in the sense that both univalence and axiom +K imply axiom L. + +## Definition + +```agda +statement-preunivalence : {l : Level} (X Y : UU l) → UU (lsuc l) +statement-preunivalence X Y = is-emb (equiv-eq {A = X} {B = Y}) + +axiom-preunivalence : (l : Level) → UU (lsuc l) +axiom-preunivalence l = (X Y : UU l) → statement-preunivalence X Y + +emb-preunivalence : + {l : Level} → axiom-preunivalence l → (X Y : UU l) → (X = Y) ↪ (X ≃ Y) +pr1 (emb-preunivalence preuniv X Y) = equiv-eq +pr2 (emb-preunivalence preuniv X Y) = preuniv X Y + +emb-map-preunivalence : + {l : Level} → axiom-preunivalence l → (X Y : UU l) → (X = Y) ↪ (X → Y) +emb-map-preunivalence preuniv X Y = + comp-emb (emb-subtype is-equiv-Prop) (emb-preunivalence preuniv X Y) +``` + +## Properties + +### Preunivalence generalizes univalence + +```agda +preunivalence-univalence : + {l : Level} → axiom-univalence l → axiom-preunivalence l +preunivalence-univalence ua A B = is-emb-is-equiv (ua A B) +``` + +### Preunivalence generalizes axiom K + +To show that preunivalence generalizes axiom K, we assume axiom K both for +types, and for the universe itself. + +```agda +preunivalence-axiom-K : + {l : Level} → axiom-K l → statement-axiom-K (UU l) → axiom-preunivalence l +preunivalence-axiom-K K K-Type A B = + is-emb-is-prop-is-set + ( is-set-axiom-K K-Type A B) + ( is-set-equiv-is-set + ( is-set-axiom-K (K A)) + ( is-set-axiom-K (K B))) +``` + +## See also + +- Preunivalence is sufficient to prove that `Id : A → (A → 𝒰)` is an embedding. + This fact is proven in + [`foundation.universal-property-identity-types`](foundation.universal-property-identity-types.md) diff --git a/src/foundation/univalence.lagda.md b/src/foundation/univalence.lagda.md index 98638395e7..15f2058a79 100644 --- a/src/foundation/univalence.lagda.md +++ b/src/foundation/univalence.lagda.md @@ -39,7 +39,7 @@ In this file we postulate the univalence axiom. Its statement is defined in ## Postulate ```agda -postulate univalence : {l : Level} (A B : UU l) → UNIVALENCE A B +postulate univalence : {l : Level} → axiom-univalence l ``` ## Properties @@ -86,7 +86,7 @@ module _ is-contr-total-equiv : (A : UU l) → is-contr (Σ (UU l) (λ X → A ≃ X)) is-contr-total-equiv A = - is-contr-total-equiv-UNIVALENCE A (univalence A) + is-contr-total-equiv-univalence A (univalence A) is-contr-total-equiv' : (A : UU l) → is-contr (Σ (UU l) (λ X → X ≃ A)) diff --git a/src/foundation/universal-property-identity-types.lagda.md b/src/foundation/universal-property-identity-types.lagda.md index 220e0b2a8e..3b5eee9400 100644 --- a/src/foundation/universal-property-identity-types.lagda.md +++ b/src/foundation/universal-property-identity-types.lagda.md @@ -8,7 +8,6 @@ module foundation.universal-property-identity-types where ```agda open import foundation.action-on-identifications-functions -open import foundation.axiom-l open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.equivalences @@ -17,6 +16,7 @@ open import foundation.function-extensionality open import foundation.functoriality-dependent-function-types open import foundation.fundamental-theorem-of-identity-types open import foundation.identity-types +open import foundation.preunivalence open import foundation.type-theoretic-principle-of-choice open import foundation.univalence open import foundation.universe-levels @@ -34,9 +34,9 @@ open import foundation-core.propositions ## Idea -The universal property of identity types characterizes families of maps out of -the identity type. This universal property is also known as the type theoretic -Yoneda lemma. +The **universal property of identity types** characterizes families of maps out +of the [identity type](foundation-core.identity-types.md). This universal +property is also known as the type theoretic Yoneda lemma. ## Theorem @@ -76,7 +76,7 @@ equiv-ev-refl' a {B} = ### `Id : A → (A → 𝒰)` is an embedding -We first show that [axiom L](foundation.axiom-l.md) implies that the map +We first show that [axiom L](foundation.preunivalence.md) implies that the map `Id : A → (A → 𝒰)` is an [embedding](foundation.embeddings.md). Since the [univalence axiom](foundation.univalence.md) implies axiom L, it follows that `Id : A → (A → 𝒰)` is an embedding under the postulates of agda-unimath. @@ -112,14 +112,13 @@ In this composite, we used axiom L at the second step. ```agda module _ - {l : Level} (L : axiom-L l) (A : UU l) + {l : Level} (L : axiom-preunivalence l) (A : UU l) where - is-emb-Id-axiom-L : is-emb (Id {A = A}) - is-emb-Id-axiom-L a = + is-emb-Id-axiom-preunivalence : is-emb (Id {A = A}) + is-emb-Id-axiom-preunivalence a = fundamental-theorem-id - ( pair - ( pair a refl) + ( ( a , refl) , ( λ _ → is-injective-emb ( emb-fiber a) @@ -143,7 +142,7 @@ module _ ( id-emb) ( λ x → comp-emb - ( emb-Π (λ y → emb-L L (Id x y) (Id a y))) + ( emb-Π (λ y → emb-preunivalence L (Id x y) (Id a y))) ( emb-equiv equiv-funext)))) ( emb-equiv (inv-equiv (equiv-fiber Id (Id a)))) ``` @@ -156,7 +155,8 @@ module _ where is-emb-Id : is-emb (Id {A = A}) - is-emb-Id = is-emb-Id-axiom-L (axiom-L-univalence univalence) A + is-emb-Id = + is-emb-Id-axiom-preunivalence (preunivalence-univalence univalence) A ``` #### For any type family `B` over `A`, the type of pairs `(a , e)` consisting of `a : A` and a family of equivalences `e : (x : A) → (a = x) ≃ B x` is a proposition @@ -195,11 +195,12 @@ module _ - In [`foundation.torsorial-type-families`](foundation.torsorial-type-families.md) - we will show that the fiber of `Id : A → (A → 𝒰)`at`B : A → 𝒰`is equivalent - to`is-contr (Σ A B)`. + we will show that the fiber of `Id : A → (A → 𝒰)` at `B : A → 𝒰` is equivalent + to `is-contr (Σ A B)`. ## References -- The fact that axiom L is sufficient to prove that `Id : A → (A → 𝒰)` is an - embedding was first observed and formalized by Martín Escardó, +- The fact that preunivalence, or axiom L, is sufficient to prove that + `Id : A → (A → 𝒰)` is an embedding was first observed and formalized by Martín + Escardó, [https://www.cs.bham.ac.uk//~mhe/TypeTopology/UF.IdEmbedding.html](https://www.cs.bham.ac.uk//~mhe/TypeTopology/UF.IdEmbedding.html). From e5c649fb7225b4a541917cae8a3d8d9a27835b1e Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 16:31:27 +0200 Subject: [PATCH 59/89] nonunital precategories --- src/category-theory.lagda.md | 1 + .../augmented-simplex-category.lagda.md | 14 +- src/category-theory/categories.lagda.md | 10 +- .../dependent-products-of-categories.lagda.md | 6 +- ...pendent-products-of-precategories.lagda.md | 4 +- .../full-subcategories.lagda.md | 10 +- .../full-subprecategories.lagda.md | 14 +- .../function-categories.lagda.md | 6 +- .../function-precategories.lagda.md | 6 +- .../nonunital-precategories.lagda.md | 255 ++++++++++++++++++ .../one-object-precategories.lagda.md | 14 +- src/category-theory/precategories.lagda.md | 96 +------ .../precategory-of-functors.lagda.md | 14 +- ...precategory-of-maps-precategories.lagda.md | 14 +- .../preunivalent-categories.lagda.md | 10 +- .../representing-arrow-category.lagda.md | 14 +- src/category-theory/simplex-category.lagda.md | 14 +- src/category-theory/subcategories.lagda.md | 10 +- src/category-theory/subprecategories.lagda.md | 14 +- 19 files changed, 353 insertions(+), 173 deletions(-) create mode 100644 src/category-theory/nonunital-precategories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index d885a5de57..c90df0b52d 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -94,6 +94,7 @@ open import category-theory.natural-transformations-functors-precategories publi open import category-theory.natural-transformations-maps-categories public open import category-theory.natural-transformations-maps-from-small-to-large-precategories public open import category-theory.natural-transformations-maps-precategories public +open import category-theory.nonunital-precategories public open import category-theory.one-object-precategories public open import category-theory.opposite-precategories public open import category-theory.precategories public diff --git a/src/category-theory/augmented-simplex-category.lagda.md b/src/category-theory/augmented-simplex-category.lagda.md index 03eaf5a276..13f90d95dd 100644 --- a/src/category-theory/augmented-simplex-category.lagda.md +++ b/src/category-theory/augmented-simplex-category.lagda.md @@ -112,15 +112,15 @@ right-unit-law-comp-hom-augmented-simplex-Category : right-unit-law-comp-hom-augmented-simplex-Category {n} {m} = right-unit-law-comp-hom-Poset (Fin-Poset n) (Fin-Poset m) -is-unital-composition-structure-augmented-simplex-Category : - is-unital-composition-structure-Set +is-unital-composition-operation-augmented-simplex-Category : + is-unital-composition-operation-Set ( hom-set-augmented-simplex-Category) - ( associative-composition-structure-augmented-simplex-Category) -pr1 is-unital-composition-structure-augmented-simplex-Category = + ( λ {n} {m} {r} → comp-hom-augmented-simplex-Category {n} {m} {r}) +pr1 is-unital-composition-operation-augmented-simplex-Category = id-hom-augmented-simplex-Category -pr1 (pr2 is-unital-composition-structure-augmented-simplex-Category) {n} {m} = +pr1 (pr2 is-unital-composition-operation-augmented-simplex-Category) {n} {m} = left-unit-law-comp-hom-augmented-simplex-Category {n} {m} -pr2 (pr2 is-unital-composition-structure-augmented-simplex-Category) {n} {m} = +pr2 (pr2 is-unital-composition-operation-augmented-simplex-Category) {n} {m} = right-unit-law-comp-hom-augmented-simplex-Category {n} {m} augmented-simplex-Precategory : Precategory lzero lzero @@ -129,7 +129,7 @@ pr1 (pr2 augmented-simplex-Precategory) = hom-set-augmented-simplex-Category pr1 (pr2 (pr2 augmented-simplex-Precategory)) = associative-composition-structure-augmented-simplex-Category pr2 (pr2 (pr2 augmented-simplex-Precategory)) = - is-unital-composition-structure-augmented-simplex-Category + is-unital-composition-operation-augmented-simplex-Category ``` ### The augmented simplex category diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index b6f529c779..220fe85870 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -110,12 +110,10 @@ module _ right-unit-law-comp-hom-Category = right-unit-law-comp-hom-Precategory precategory-Category - is-unital-composition-structure-Category : - is-unital-composition-structure-Set - hom-set-Category - associative-composition-structure-Category - is-unital-composition-structure-Category = - is-unital-composition-structure-Precategory precategory-Category + is-unital-composition-operation-Category : + is-unital-composition-operation-Set hom-set-Category comp-hom-Category + is-unital-composition-operation-Category = + is-unital-composition-operation-Precategory precategory-Category is-category-Category : is-category-Precategory precategory-Category diff --git a/src/category-theory/dependent-products-of-categories.lagda.md b/src/category-theory/dependent-products-of-categories.lagda.md index 6c44867c5b..3bea6aa8bf 100644 --- a/src/category-theory/dependent-products-of-categories.lagda.md +++ b/src/category-theory/dependent-products-of-categories.lagda.md @@ -107,10 +107,8 @@ module _ right-unit-law-comp-hom-Category Π-Category is-unital-Π-Category : - is-unital-composition-structure-Set - hom-set-Π-Category - associative-composition-structure-Π-Category - is-unital-Π-Category = is-unital-composition-structure-Category Π-Category + is-unital-composition-operation-Set hom-set-Π-Category comp-hom-Π-Category + is-unital-Π-Category = is-unital-composition-operation-Category Π-Category extensionality-obj-Π-Category : (x y : obj-Category Π-Category) → (x = y) ≃ iso-Category Π-Category x y diff --git a/src/category-theory/dependent-products-of-precategories.lagda.md b/src/category-theory/dependent-products-of-precategories.lagda.md index 16acf7a123..863e15ad2f 100644 --- a/src/category-theory/dependent-products-of-precategories.lagda.md +++ b/src/category-theory/dependent-products-of-precategories.lagda.md @@ -86,9 +86,9 @@ module _ eq-htpy (λ i → right-unit-law-comp-hom-Precategory (C i) (f i)) is-unital-Π-Precategory : - is-unital-composition-structure-Set + is-unital-composition-operation-Set hom-set-Π-Precategory - associative-composition-structure-Π-Precategory + comp-hom-Π-Precategory pr1 is-unital-Π-Precategory x = id-hom-Π-Precategory pr1 (pr2 is-unital-Π-Precategory) = left-unit-law-comp-hom-Π-Precategory pr2 (pr2 is-unital-Π-Precategory) = right-unit-law-comp-hom-Π-Precategory diff --git a/src/category-theory/full-subcategories.lagda.md b/src/category-theory/full-subcategories.lagda.md index 1b28fa1fc5..632c3b9b89 100644 --- a/src/category-theory/full-subcategories.lagda.md +++ b/src/category-theory/full-subcategories.lagda.md @@ -159,12 +159,12 @@ module _ ( precategory-Category C) ( P) - is-unital-composition-structure-Full-Subcategory : - is-unital-composition-structure-Set + is-unital-composition-operation-Full-Subcategory : + is-unital-composition-operation-Set ( hom-set-Full-Subcategory) - ( associative-composition-structure-Full-Subcategory) - is-unital-composition-structure-Full-Subcategory = - is-unital-composition-structure-Full-Subprecategory + ( λ {x} {y} {z} → comp-hom-Full-Subcategory {x} {y} {z}) + is-unital-composition-operation-Full-Subcategory = + is-unital-composition-operation-Full-Subprecategory ( precategory-Category C) ( P) diff --git a/src/category-theory/full-subprecategories.lagda.md b/src/category-theory/full-subprecategories.lagda.md index a72f1c41a6..3f8dcb0a83 100644 --- a/src/category-theory/full-subprecategories.lagda.md +++ b/src/category-theory/full-subprecategories.lagda.md @@ -156,15 +156,15 @@ module _ pr2 associative-composition-structure-Full-Subprecategory {x} {y} {z} {w} = associative-comp-hom-Full-Subprecategory {x} {y} {z} {w} - is-unital-composition-structure-Full-Subprecategory : - is-unital-composition-structure-Set + is-unital-composition-operation-Full-Subprecategory : + is-unital-composition-operation-Set ( hom-set-Full-Subprecategory) - ( associative-composition-structure-Full-Subprecategory) - pr1 is-unital-composition-structure-Full-Subprecategory x = + ( λ {x} {y} {z} → comp-hom-Full-Subprecategory {x} {y} {z}) + pr1 is-unital-composition-operation-Full-Subprecategory x = id-hom-Full-Subprecategory {x} - pr1 (pr2 is-unital-composition-structure-Full-Subprecategory) {x} {y} = + pr1 (pr2 is-unital-composition-operation-Full-Subprecategory) {x} {y} = left-unit-law-comp-hom-Full-Subprecategory {x} {y} - pr2 (pr2 is-unital-composition-structure-Full-Subprecategory) {x} {y} = + pr2 (pr2 is-unital-composition-operation-Full-Subprecategory) {x} {y} = right-unit-law-comp-hom-Full-Subprecategory {x} {y} precategory-Full-Subprecategory : Precategory (l1 ⊔ l3) l2 @@ -173,7 +173,7 @@ module _ pr1 (pr2 (pr2 precategory-Full-Subprecategory)) = associative-composition-structure-Full-Subprecategory pr2 (pr2 (pr2 precategory-Full-Subprecategory)) = - is-unital-composition-structure-Full-Subprecategory + is-unital-composition-operation-Full-Subprecategory ``` ### Isomorphisms in full subprecategories diff --git a/src/category-theory/function-categories.lagda.md b/src/category-theory/function-categories.lagda.md index dd833763aa..7bd39eade2 100644 --- a/src/category-theory/function-categories.lagda.md +++ b/src/category-theory/function-categories.lagda.md @@ -95,11 +95,11 @@ module _ right-unit-law-comp-hom-Category function-Category is-unital-function-Category : - is-unital-composition-structure-Set + is-unital-composition-operation-Set hom-set-function-Category - associative-composition-structure-function-Category + comp-hom-function-Category is-unital-function-Category = - is-unital-composition-structure-Category function-Category + is-unital-composition-operation-Category function-Category extensionality-obj-function-Category : (x y : obj-Category function-Category) → diff --git a/src/category-theory/function-precategories.lagda.md b/src/category-theory/function-precategories.lagda.md index b9190dc943..25d632bad9 100644 --- a/src/category-theory/function-precategories.lagda.md +++ b/src/category-theory/function-precategories.lagda.md @@ -87,11 +87,11 @@ module _ right-unit-law-comp-hom-Precategory function-Precategory is-unital-function-Precategory : - is-unital-composition-structure-Set + is-unital-composition-operation-Set hom-set-function-Precategory - associative-composition-structure-function-Precategory + comp-hom-function-Precategory is-unital-function-Precategory = - is-unital-composition-structure-Precategory function-Precategory + is-unital-composition-operation-Precategory function-Precategory ``` ### Isomorphisms in the function precategory are fiberwise isomorphisms diff --git a/src/category-theory/nonunital-precategories.lagda.md b/src/category-theory/nonunital-precategories.lagda.md new file mode 100644 index 0000000000..74cc03d176 --- /dev/null +++ b/src/category-theory/nonunital-precategories.lagda.md @@ -0,0 +1,255 @@ +# Nonunital precategories + +```agda +module category-theory.nonunital-precategories where +``` + +
Imports + +```agda +open import foundation.cartesian-product-types +open import foundation.dependent-pair-types +open import foundation.function-extensionality +open import foundation.function-types +open import foundation.identity-types +open import foundation.propositions +open import foundation.sets +open import foundation.subtypes +open import foundation.universe-levels +``` + +
+ +## Idea + +A **nonunital precategory** is a [precategory](category-theory.precategories.md) +that may not have identity maps. Such an object may also rightfully be called a +_semiprecategory_. + +## Definition + +### Associative composition structures on sets + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (hom : A → A → Set l2) + where + + composition-operation-Set : UU (l1 ⊔ l2) + composition-operation-Set = + {x y z : A} → type-Set (hom y z) → type-Set (hom x y) → type-Set (hom x z) + + associativity-composition-operation-Set : + composition-operation-Set → UU (l1 ⊔ l2) + associativity-composition-operation-Set μ = + {x y z w : A} (h : type-Set (hom z w)) (g : type-Set (hom y z)) + (f : type-Set (hom x y)) → μ (μ h g) f = μ h (μ g f) + + associative-composition-structure-Set : UU (l1 ⊔ l2) + associative-composition-structure-Set = + Σ ( composition-operation-Set) + ( associativity-composition-operation-Set) +``` + +### Nonunital precategories + +```agda +Nonunital-Precategory : + (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2) +Nonunital-Precategory l1 l2 = + Σ ( UU l1) + ( λ A → + Σ ( A → A → Set l2) + ( associative-composition-structure-Set)) + +module _ + {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) + where + + obj-Nonunital-Precategory : UU l1 + obj-Nonunital-Precategory = pr1 C + + hom-set-Nonunital-Precategory : (x y : obj-Nonunital-Precategory) → Set l2 + hom-set-Nonunital-Precategory = pr1 (pr2 C) + + hom-Nonunital-Precategory : (x y : obj-Nonunital-Precategory) → UU l2 + hom-Nonunital-Precategory x y = type-Set (hom-set-Nonunital-Precategory x y) + + is-set-hom-Nonunital-Precategory : + (x y : obj-Nonunital-Precategory) → is-set (hom-Nonunital-Precategory x y) + is-set-hom-Nonunital-Precategory x y = + is-set-type-Set (hom-set-Nonunital-Precategory x y) + + associative-composition-structure-Nonunital-Precategory : + associative-composition-structure-Set hom-set-Nonunital-Precategory + associative-composition-structure-Nonunital-Precategory = pr2 (pr2 C) + + comp-hom-Nonunital-Precategory : + {x y z : obj-Nonunital-Precategory} → + hom-Nonunital-Precategory y z → + hom-Nonunital-Precategory x y → + hom-Nonunital-Precategory x z + comp-hom-Nonunital-Precategory = + pr1 associative-composition-structure-Nonunital-Precategory + + comp-hom-Nonunital-Precategory' : + {x y z : obj-Nonunital-Precategory} → + hom-Nonunital-Precategory x y → + hom-Nonunital-Precategory y z → + hom-Nonunital-Precategory x z + comp-hom-Nonunital-Precategory' f g = comp-hom-Nonunital-Precategory g f + + associative-comp-hom-Nonunital-Precategory : + {x y z w : obj-Nonunital-Precategory} + (h : hom-Nonunital-Precategory z w) + (g : hom-Nonunital-Precategory y z) + (f : hom-Nonunital-Precategory x y) → + ( comp-hom-Nonunital-Precategory (comp-hom-Nonunital-Precategory h g) f) = + ( comp-hom-Nonunital-Precategory h (comp-hom-Nonunital-Precategory g f)) + associative-comp-hom-Nonunital-Precategory = + pr2 associative-composition-structure-Nonunital-Precategory +``` + +### The total hom-type of a nonunital precategory + +```agda +total-hom-Nonunital-Precategory : + {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) → UU (l1 ⊔ l2) +total-hom-Nonunital-Precategory C = + Σ ( obj-Nonunital-Precategory C) + ( λ x → Σ (obj-Nonunital-Precategory C) (hom-Nonunital-Precategory C x)) + +obj-total-hom-Nonunital-Precategory : + {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) → + total-hom-Nonunital-Precategory C → + obj-Nonunital-Precategory C × obj-Nonunital-Precategory C +pr1 (obj-total-hom-Nonunital-Precategory C (x , y , f)) = x +pr2 (obj-total-hom-Nonunital-Precategory C (x , y , f)) = y +``` + +### Precomposition by a morphism + +```agda +precomp-hom-Nonunital-Precategory : + {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) + {x y : obj-Nonunital-Precategory C} + (f : hom-Nonunital-Precategory C x y) (z : obj-Nonunital-Precategory C) → + hom-Nonunital-Precategory C y z → hom-Nonunital-Precategory C x z +precomp-hom-Nonunital-Precategory C f z g = comp-hom-Nonunital-Precategory C g f +``` + +### Postcomposition by a morphism + +```agda +postcomp-hom-Nonunital-Precategory : + {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) + {x y : obj-Nonunital-Precategory C} + (f : hom-Nonunital-Precategory C x y) (z : obj-Nonunital-Precategory C) → + hom-Nonunital-Precategory C z x → hom-Nonunital-Precategory C z y +postcomp-hom-Nonunital-Precategory C f z = comp-hom-Nonunital-Precategory C f +``` + +### Unital composition structures + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (hom : A → A → Set l2) + where + + is-unital-composition-operation-Set : + composition-operation-Set hom → UU (l1 ⊔ l2) + is-unital-composition-operation-Set μ = + Σ ( (x : A) → type-Set (hom x x)) + ( λ e → + ( {x y : A} (f : type-Set (hom x y)) → μ (e y) f = f) × + ( {x y : A} (f : type-Set (hom x y)) → μ f (e x) = f)) + +module _ + {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) + where + + is-unital-Nonunital-Precategory : UU (l1 ⊔ l2) + is-unital-Nonunital-Precategory = + is-unital-composition-operation-Set + ( hom-set-Nonunital-Precategory C) + ( comp-hom-Nonunital-Precategory C) +``` + +## Properties + +### Being unital is a property + +Suppose `e e' : (x : A) → hom x x` are both right and left units with regard to +composition. It is enough to show that `e = e'` since the right and left unit +laws are propositions (because all hom-types are sets). By function +extensionality, it is enough to show that `e x = e' x` for all `x : A`. But by +the unit laws we have the following chain of equalities: +`e x = (e' x) ∘ (e x) = e' x.` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (hom : A → A → Set l2) + where + + abstract + all-elements-equal-is-unital-composition-operation-Set : + ( μ : composition-operation-Set hom) → + all-elements-equal (is-unital-composition-operation-Set hom μ) + all-elements-equal-is-unital-composition-operation-Set + ( μ) + ( e , left-unit-law-e , right-unit-law-e) + ( e' , left-unit-law-e' , right-unit-law-e') = + eq-type-subtype + ( λ x → + prod-Prop + ( Π-Prop' A + ( λ a → + Π-Prop' A + ( λ b → + Π-Prop + ( type-Set (hom a b)) + ( λ f' → Id-Prop (hom a b) (μ (x b) f') f')))) + ( Π-Prop' A + ( λ a → + Π-Prop' A + ( λ b → + Π-Prop + ( type-Set (hom a b)) + ( λ f' → Id-Prop (hom a b) (μ f' (x a)) f'))))) + ( eq-htpy + ( λ x → inv (left-unit-law-e' (e x)) ∙ right-unit-law-e (e' x))) + + is-prop-is-unital-composition-operation-Set : + ( μ : composition-operation-Set hom) → + is-prop (is-unital-composition-operation-Set hom μ) + is-prop-is-unital-composition-operation-Set μ = + is-prop-all-elements-equal + ( all-elements-equal-is-unital-composition-operation-Set μ) + + is-unital-prop-composition-operation-Set : + ( μ : composition-operation-Set hom) → Prop (l1 ⊔ l2) + pr1 (is-unital-prop-composition-operation-Set μ) = + is-unital-composition-operation-Set hom μ + pr2 (is-unital-prop-composition-operation-Set μ) = + is-prop-is-unital-composition-operation-Set μ + +module _ + {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) + where + + is-prop-is-unital-Nonunital-Precategory : + is-prop + ( is-unital-composition-operation-Set + ( hom-set-Nonunital-Precategory C) + ( comp-hom-Nonunital-Precategory C)) + is-prop-is-unital-Nonunital-Precategory = + is-prop-is-unital-composition-operation-Set + ( hom-set-Nonunital-Precategory C) + ( comp-hom-Nonunital-Precategory C) + + is-unital-prop-Nonunital-Precategory : Prop (l1 ⊔ l2) + is-unital-prop-Nonunital-Precategory = + is-unital-prop-composition-operation-Set + ( hom-set-Nonunital-Precategory C) + ( comp-hom-Nonunital-Precategory C) +``` diff --git a/src/category-theory/one-object-precategories.lagda.md b/src/category-theory/one-object-precategories.lagda.md index 94483f34cb..3ea1015631 100644 --- a/src/category-theory/one-object-precategories.lagda.md +++ b/src/category-theory/one-object-precategories.lagda.md @@ -123,15 +123,15 @@ module _ right-unit-law-comp-hom-one-object-precategory-Monoid {star} {star} = right-unit-law-mul-Monoid M - is-unital-composition-structure-one-object-precategory-Monoid : - is-unital-composition-structure-Set + is-unital-composition-operation-one-object-precategory-Monoid : + is-unital-composition-operation-Set hom-set-one-object-precategory-Monoid - associative-composition-structure-one-object-precategory-Monoid - pr1 is-unital-composition-structure-one-object-precategory-Monoid = + comp-hom-one-object-precategory-Monoid + pr1 is-unital-composition-operation-one-object-precategory-Monoid = id-hom-one-object-precategory-Monoid - pr1 (pr2 is-unital-composition-structure-one-object-precategory-Monoid) = + pr1 (pr2 is-unital-composition-operation-one-object-precategory-Monoid) = left-unit-law-comp-hom-one-object-precategory-Monoid - pr2 (pr2 is-unital-composition-structure-one-object-precategory-Monoid) = + pr2 (pr2 is-unital-composition-operation-one-object-precategory-Monoid) = right-unit-law-comp-hom-one-object-precategory-Monoid precategory-one-object-precategory-Monoid : Precategory lzero l @@ -141,7 +141,7 @@ module _ pr1 (pr2 (pr2 precategory-one-object-precategory-Monoid)) = associative-composition-structure-one-object-precategory-Monoid pr2 (pr2 (pr2 precategory-one-object-precategory-Monoid)) = - is-unital-composition-structure-one-object-precategory-Monoid + is-unital-composition-operation-one-object-precategory-Monoid one-object-precategory-Monoid : One-Object-Precategory lzero l pr1 one-object-precategory-Monoid = precategory-one-object-precategory-Monoid diff --git a/src/category-theory/precategories.lagda.md b/src/category-theory/precategories.lagda.md index e6804555a4..db18d37062 100644 --- a/src/category-theory/precategories.lagda.md +++ b/src/category-theory/precategories.lagda.md @@ -2,11 +2,15 @@ ```agda module category-theory.precategories where + +open import category-theory.nonunital-precategories public ```
Imports ```agda +open import category-theory.nonunital-precategories + open import foundation.cartesian-product-types open import foundation.dependent-pair-types open import foundation.function-extensionality @@ -41,26 +45,6 @@ identities between the objects are exactly the isomorphisms. ## Definition ```agda -module _ - {l1 l2 : Level} {A : UU l1} (hom : A → A → Set l2) - where - - associative-composition-structure-Set : UU (l1 ⊔ l2) - associative-composition-structure-Set = - Σ ( {x y z : A} → - type-Set (hom y z) → type-Set (hom x y) → type-Set (hom x z)) - ( λ μ → - {x y z w : A} (h : type-Set (hom z w)) (g : type-Set (hom y z)) - (f : type-Set (hom x y)) → μ (μ h g) f = μ h (μ g f)) - - is-unital-composition-structure-Set : - associative-composition-structure-Set → UU (l1 ⊔ l2) - is-unital-composition-structure-Set μ = - Σ ( (x : A) → type-Set (hom x x)) - ( λ e → - ( {x y : A} (f : type-Set (hom x y)) → pr1 μ (e y) f = f) × - ( {x y : A} (f : type-Set (hom x y)) → pr1 μ f (e x) = f)) - Precategory : (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2) Precategory l1 l2 = @@ -69,7 +53,7 @@ Precategory l1 l2 = Σ ( A → A → Set l2) ( λ hom → Σ ( associative-composition-structure-Set hom) - ( is-unital-composition-structure-Set hom))) + ( λ μ → is-unital-composition-operation-Set hom (pr1 μ)))) module _ {l1 l2 : Level} (C : Precategory l1 l2) @@ -116,26 +100,26 @@ module _ associative-comp-hom-Precategory = pr2 associative-composition-structure-Precategory - is-unital-composition-structure-Precategory : - is-unital-composition-structure-Set + is-unital-composition-operation-Precategory : + is-unital-composition-operation-Set hom-set-Precategory - associative-composition-structure-Precategory - is-unital-composition-structure-Precategory = pr2 (pr2 (pr2 C)) + comp-hom-Precategory + is-unital-composition-operation-Precategory = pr2 (pr2 (pr2 C)) id-hom-Precategory : {x : obj-Precategory} → hom-Precategory x x - id-hom-Precategory {x} = pr1 is-unital-composition-structure-Precategory x + id-hom-Precategory {x} = pr1 is-unital-composition-operation-Precategory x left-unit-law-comp-hom-Precategory : {x y : obj-Precategory} (f : hom-Precategory x y) → comp-hom-Precategory id-hom-Precategory f = f left-unit-law-comp-hom-Precategory = - pr1 (pr2 is-unital-composition-structure-Precategory) + pr1 (pr2 is-unital-composition-operation-Precategory) right-unit-law-comp-hom-Precategory : {x y : obj-Precategory} (f : hom-Precategory x y) → comp-hom-Precategory f id-hom-Precategory = f right-unit-law-comp-hom-Precategory = - pr2 (pr2 is-unital-composition-structure-Precategory) + pr2 (pr2 is-unital-composition-operation-Precategory) ``` ### The total hom-type of a precategory @@ -189,59 +173,3 @@ module _ (x y : obj-Precategory C) → x = y → hom-Precategory C y x hom-inv-eq-Precategory x y = hom-eq-Precategory y x ∘ inv ``` - -## Properties - -### The property of having identity morphisms is a proposition - -Suppose `e e' : (x : A) → hom x x` are both right and left units with regard to -composition. It is enough to show that `e = e'` since the right and left unit -laws are propositions (because all hom-types are sets). By function -extensionality, it is enough to show that `e x = e' x` for all `x : A`. But by -the unit laws we have the following chain of equalities: -`e x = (e' x) ∘ (e x) = e' x.` - -```agda -module _ - {l1 l2 : Level} {A : UU l1} (hom : A → A → Set l2) - where - - abstract - all-elements-equal-is-unital-composition-structure-Set : - ( μ : associative-composition-structure-Set hom) → - all-elements-equal (is-unital-composition-structure-Set hom μ) - all-elements-equal-is-unital-composition-structure-Set - ( pair μ associative-μ) - ( pair e (pair left-unit-law-e right-unit-law-e)) - ( pair e' (pair left-unit-law-e' right-unit-law-e')) = - eq-type-subtype - ( λ x → - prod-Prop - ( Π-Prop' A - ( λ a → - Π-Prop' A - ( λ b → - Π-Prop - ( type-Set (hom a b)) - ( λ f' → - Id-Prop (hom a b) (μ (x b) f') f')))) - ( Π-Prop' A - ( λ a → - Π-Prop' A - ( λ b → - Π-Prop - ( type-Set (hom a b)) - ( λ f' → - Id-Prop (hom a b) (μ f' (x a)) f'))))) - ( eq-htpy - ( λ x → - ( inv (left-unit-law-e' (e x))) ∙ - ( right-unit-law-e (e' x)))) - - is-prop-is-unital-composition-structure-Set : - ( μ : associative-composition-structure-Set hom) → - is-prop (is-unital-composition-structure-Set hom μ) - is-prop-is-unital-composition-structure-Set μ = - is-prop-all-elements-equal - ( all-elements-equal-is-unital-composition-structure-Set μ) -``` diff --git a/src/category-theory/precategory-of-functors.lagda.md b/src/category-theory/precategory-of-functors.lagda.md index f42784d714..2943342830 100644 --- a/src/category-theory/precategory-of-functors.lagda.md +++ b/src/category-theory/precategory-of-functors.lagda.md @@ -99,18 +99,18 @@ module _ right-unit-law-comp-hom-functor-precategory-Precategory {F} {G} = right-unit-law-comp-natural-transformation-Precategory C D F G - is-unital-composition-structure-functor-precategory-Precategory : - is-unital-composition-structure-Set + is-unital-composition-operation-functor-precategory-Precategory : + is-unital-composition-operation-Set ( natural-transformation-set-Precategory C D) - ( associative-composition-structure-functor-precategory-Precategory) - pr1 is-unital-composition-structure-functor-precategory-Precategory = + ( λ {F} {G} {H} → comp-hom-functor-precategory-Precategory {F} {G} {H}) + pr1 is-unital-composition-operation-functor-precategory-Precategory = id-hom-functor-precategory-Precategory pr1 - ( pr2 is-unital-composition-structure-functor-precategory-Precategory) + ( pr2 is-unital-composition-operation-functor-precategory-Precategory) { F} {G} = left-unit-law-comp-hom-functor-precategory-Precategory {F} {G} pr2 - ( pr2 is-unital-composition-structure-functor-precategory-Precategory) + ( pr2 is-unital-composition-operation-functor-precategory-Precategory) { F} {G} = right-unit-law-comp-hom-functor-precategory-Precategory {F} {G} @@ -122,7 +122,7 @@ module _ pr1 (pr2 (pr2 functor-precategory-Precategory)) = associative-composition-structure-functor-precategory-Precategory pr2 (pr2 (pr2 functor-precategory-Precategory)) = - is-unital-composition-structure-functor-precategory-Precategory + is-unital-composition-operation-functor-precategory-Precategory ``` ## Properties diff --git a/src/category-theory/precategory-of-maps-precategories.lagda.md b/src/category-theory/precategory-of-maps-precategories.lagda.md index 6cc2ef6e9b..faca32bc1c 100644 --- a/src/category-theory/precategory-of-maps-precategories.lagda.md +++ b/src/category-theory/precategory-of-maps-precategories.lagda.md @@ -99,18 +99,18 @@ module _ right-unit-law-comp-hom-map-precategory-Precategory {F} {G} = right-unit-law-comp-natural-transformation-map-Precategory C D F G - is-unital-composition-structure-map-precategory-Precategory : - is-unital-composition-structure-Set + is-unital-composition-operation-map-precategory-Precategory : + is-unital-composition-operation-Set ( natural-transformation-map-set-Precategory C D) - ( associative-composition-structure-map-precategory-Precategory) - pr1 is-unital-composition-structure-map-precategory-Precategory = + ( comp-hom-map-precategory-Precategory) + pr1 is-unital-composition-operation-map-precategory-Precategory = id-hom-map-precategory-Precategory pr1 - ( pr2 is-unital-composition-structure-map-precategory-Precategory) + ( pr2 is-unital-composition-operation-map-precategory-Precategory) { F} {G} = left-unit-law-comp-hom-map-precategory-Precategory {F} {G} pr2 - ( pr2 is-unital-composition-structure-map-precategory-Precategory) + ( pr2 is-unital-composition-operation-map-precategory-Precategory) { F} {G} = right-unit-law-comp-hom-map-precategory-Precategory {F} {G} @@ -122,7 +122,7 @@ module _ pr1 (pr2 (pr2 map-precategory-Precategory)) = associative-composition-structure-map-precategory-Precategory pr2 (pr2 (pr2 map-precategory-Precategory)) = - is-unital-composition-structure-map-precategory-Precategory + is-unital-composition-operation-map-precategory-Precategory ``` ## Properties diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md index a489e184de..f6e0eca2f4 100644 --- a/src/category-theory/preunivalent-categories.lagda.md +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -126,12 +126,12 @@ module _ right-unit-law-comp-hom-Preunivalent-Category = right-unit-law-comp-hom-Precategory precategory-Preunivalent-Category - is-unital-composition-structure-Preunivalent-Category : - is-unital-composition-structure-Set + is-unital-composition-operation-Preunivalent-Category : + is-unital-composition-operation-Set hom-set-Preunivalent-Category - associative-composition-structure-Preunivalent-Category - is-unital-composition-structure-Preunivalent-Category = - is-unital-composition-structure-Precategory + comp-hom-Preunivalent-Category + is-unital-composition-operation-Preunivalent-Category = + is-unital-composition-operation-Precategory ( precategory-Preunivalent-Category) is-preunivalent-Preunivalent-Category : diff --git a/src/category-theory/representing-arrow-category.lagda.md b/src/category-theory/representing-arrow-category.lagda.md index 504a536d58..19c450422a 100644 --- a/src/category-theory/representing-arrow-category.lagda.md +++ b/src/category-theory/representing-arrow-category.lagda.md @@ -97,15 +97,15 @@ right-unit-law-comp-hom-representing-arrow : right-unit-law-comp-hom-representing-arrow {true} {true} f = refl right-unit-law-comp-hom-representing-arrow {false} f = refl -is-unital-composition-structure-representing-arrow : - is-unital-composition-structure-Set +is-unital-composition-operation-representing-arrow : + is-unital-composition-operation-Set ( hom-set-representing-arrow) - ( associative-composition-structure-representing-arrow) -pr1 is-unital-composition-structure-representing-arrow x = + ( λ {x} {y} {z} → comp-hom-representing-arrow {x} {y} {z}) +pr1 is-unital-composition-operation-representing-arrow x = id-hom-representing-arrow {x} -pr1 (pr2 is-unital-composition-structure-representing-arrow) = +pr1 (pr2 is-unital-composition-operation-representing-arrow) = left-unit-law-comp-hom-representing-arrow -pr2 (pr2 is-unital-composition-structure-representing-arrow) = +pr2 (pr2 is-unital-composition-operation-representing-arrow) = right-unit-law-comp-hom-representing-arrow representing-arrow-Precategory : Precategory lzero lzero @@ -114,7 +114,7 @@ pr1 (pr2 representing-arrow-Precategory) = hom-set-representing-arrow pr1 (pr2 (pr2 representing-arrow-Precategory)) = associative-composition-structure-representing-arrow pr2 (pr2 (pr2 representing-arrow-Precategory)) = - is-unital-composition-structure-representing-arrow + is-unital-composition-operation-representing-arrow ``` ### The representing arrow category diff --git a/src/category-theory/simplex-category.lagda.md b/src/category-theory/simplex-category.lagda.md index d711836f67..0da1e2c3ad 100644 --- a/src/category-theory/simplex-category.lagda.md +++ b/src/category-theory/simplex-category.lagda.md @@ -103,14 +103,14 @@ right-unit-law-comp-hom-simplex-Category : right-unit-law-comp-hom-simplex-Category {n} {m} = right-unit-law-comp-hom-Poset (Fin-Poset (succ-ℕ n)) (Fin-Poset (succ-ℕ m)) -is-unital-composition-structure-simplex-Category : - is-unital-composition-structure-Set +is-unital-composition-operation-simplex-Category : + is-unital-composition-operation-Set ( hom-set-simplex-Category) - ( associative-composition-structure-simplex-Category) -pr1 is-unital-composition-structure-simplex-Category = id-hom-simplex-Category -pr1 (pr2 is-unital-composition-structure-simplex-Category) {n} {m} = + ( comp-hom-simplex-Category) +pr1 is-unital-composition-operation-simplex-Category = id-hom-simplex-Category +pr1 (pr2 is-unital-composition-operation-simplex-Category) {n} {m} = left-unit-law-comp-hom-simplex-Category {n} {m} -pr2 (pr2 is-unital-composition-structure-simplex-Category) {n} {m} = +pr2 (pr2 is-unital-composition-operation-simplex-Category) {n} {m} = right-unit-law-comp-hom-simplex-Category {n} {m} simplex-Precategory : Precategory lzero lzero @@ -119,7 +119,7 @@ pr1 (pr2 simplex-Precategory) = hom-set-simplex-Category pr1 (pr2 (pr2 simplex-Precategory)) = associative-composition-structure-simplex-Category pr2 (pr2 (pr2 simplex-Precategory)) = - is-unital-composition-structure-simplex-Category + is-unital-composition-operation-simplex-Category ``` ### The simplex category diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index c0a1c5a5ef..108cd2aab0 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -264,12 +264,12 @@ module _ associative-composition-structure-Subcategory = associative-composition-structure-Subprecategory (precategory-Category C) P - is-unital-composition-structure-Subcategory : - is-unital-composition-structure-Set + is-unital-composition-operation-Subcategory : + is-unital-composition-operation-Set ( hom-set-Subcategory) - ( associative-composition-structure-Subcategory) - is-unital-composition-structure-Subcategory = - is-unital-composition-structure-Subprecategory (precategory-Category C) P + ( comp-hom-Subcategory) + is-unital-composition-operation-Subcategory = + is-unital-composition-operation-Subprecategory (precategory-Category C) P precategory-Subcategory : Precategory (l1 ⊔ l3) (l2 ⊔ l4) precategory-Subcategory = diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index cf72d04ea8..172b6e7eec 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -341,15 +341,15 @@ module _ pr2 associative-composition-structure-Subprecategory {x} {y} {z} {w} = associative-comp-hom-Subprecategory {x} {y} {z} {w} - is-unital-composition-structure-Subprecategory : - is-unital-composition-structure-Set + is-unital-composition-operation-Subprecategory : + is-unital-composition-operation-Set ( hom-set-Subprecategory) - ( associative-composition-structure-Subprecategory) - pr1 is-unital-composition-structure-Subprecategory x = + ( comp-hom-Subprecategory) + pr1 is-unital-composition-operation-Subprecategory x = id-hom-Subprecategory {x} - pr1 (pr2 is-unital-composition-structure-Subprecategory) {x} {y} = + pr1 (pr2 is-unital-composition-operation-Subprecategory) {x} {y} = left-unit-law-comp-hom-Subprecategory {x} {y} - pr2 (pr2 is-unital-composition-structure-Subprecategory) {x} {y} = + pr2 (pr2 is-unital-composition-operation-Subprecategory) {x} {y} = right-unit-law-comp-hom-Subprecategory {x} {y} precategory-Subprecategory : Precategory (l1 ⊔ l3) (l2 ⊔ l4) @@ -358,7 +358,7 @@ module _ pr1 (pr2 (pr2 precategory-Subprecategory)) = associative-composition-structure-Subprecategory pr2 (pr2 (pr2 precategory-Subprecategory)) = - is-unital-composition-structure-Subprecategory + is-unital-composition-operation-Subprecategory ``` ### The inclusion functor of a subprecategory From 16bb50852a391c894905364ae6cfca61e00e1f97 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 16:56:47 +0200 Subject: [PATCH 60/89] associativity is a property --- .../nonunital-precategories.lagda.md | 106 ++++++++++++------ 1 file changed, 71 insertions(+), 35 deletions(-) diff --git a/src/category-theory/nonunital-precategories.lagda.md b/src/category-theory/nonunital-precategories.lagda.md index 74cc03d176..c77360f4cb 100644 --- a/src/category-theory/nonunital-precategories.lagda.md +++ b/src/category-theory/nonunital-precategories.lagda.md @@ -32,23 +32,23 @@ _semiprecategory_. ```agda module _ - {l1 l2 : Level} {A : UU l1} (hom : A → A → Set l2) + {l1 l2 : Level} {A : UU l1} (hom-set : A → A → Set l2) where composition-operation-Set : UU (l1 ⊔ l2) composition-operation-Set = - {x y z : A} → type-Set (hom y z) → type-Set (hom x y) → type-Set (hom x z) + {x y z : A} → type-Set (hom-set y z) → type-Set (hom-set x y) → type-Set (hom-set x z) - associativity-composition-operation-Set : + is-associative-composition-operation-Set : composition-operation-Set → UU (l1 ⊔ l2) - associativity-composition-operation-Set μ = - {x y z w : A} (h : type-Set (hom z w)) (g : type-Set (hom y z)) - (f : type-Set (hom x y)) → μ (μ h g) f = μ h (μ g f) + is-associative-composition-operation-Set comp-hom = + {x y z w : A} (h : type-Set (hom-set z w)) (g : type-Set (hom-set y z)) + (f : type-Set (hom-set x y)) → comp-hom (comp-hom h g) f = comp-hom h (comp-hom g f) associative-composition-structure-Set : UU (l1 ⊔ l2) associative-composition-structure-Set = Σ ( composition-operation-Set) - ( associativity-composition-operation-Set) + ( is-associative-composition-operation-Set) ``` ### Nonunital precategories @@ -153,16 +153,16 @@ postcomp-hom-Nonunital-Precategory C f z = comp-hom-Nonunital-Precategory C f ```agda module _ - {l1 l2 : Level} {A : UU l1} (hom : A → A → Set l2) + {l1 l2 : Level} {A : UU l1} (hom-set : A → A → Set l2) where is-unital-composition-operation-Set : - composition-operation-Set hom → UU (l1 ⊔ l2) - is-unital-composition-operation-Set μ = - Σ ( (x : A) → type-Set (hom x x)) + composition-operation-Set hom-set → UU (l1 ⊔ l2) + is-unital-composition-operation-Set comp-hom = + Σ ( (x : A) → type-Set (hom-set x x)) ( λ e → - ( {x y : A} (f : type-Set (hom x y)) → μ (e y) f = f) × - ( {x y : A} (f : type-Set (hom x y)) → μ f (e x) = f)) + ( {x y : A} (f : type-Set (hom-set x y)) → comp-hom (e y) f = f) × + ( {x y : A} (f : type-Set (hom-set x y)) → comp-hom f (e x) = f)) module _ {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) @@ -177,10 +177,48 @@ module _ ## Properties -### Being unital is a property +### Being associative is a property of composition operations in sets -Suppose `e e' : (x : A) → hom x x` are both right and left units with regard to -composition. It is enough to show that `e = e'` since the right and left unit +```agda +module _ + {l1 l2 : Level} {A : UU l1} + (hom-set : A → A → Set l2) (comp-hom : composition-operation-Set hom-set) + where + + associativity-prop-composition-operation-Set : Prop (l1 ⊔ l2) + associativity-prop-composition-operation-Set = + Π-Prop' A + ( λ x → + Π-Prop' A + ( λ y → + Π-Prop' A + ( λ z → + Π-Prop' A + ( λ w → + Π-Prop + ( type-Set (hom-set z w)) + ( λ h → + Π-Prop + ( type-Set (hom-set y z)) + ( λ g → + Π-Prop + ( type-Set (hom-set x y)) + ( λ f → + Id-Prop + ( hom-set x w) + ( comp-hom (comp-hom h g) f) + ( comp-hom h (comp-hom g f))))))))) + + is-prop-is-associative-composition-operation-Set : + is-prop (is-associative-composition-operation-Set hom-set comp-hom) + is-prop-is-associative-composition-operation-Set = + is-prop-type-Prop associativity-prop-composition-operation-Set +``` + +### Being unital is a property of composition operations in sets + +Suppose `e e' : (x : A) → hom-set x x` are both right and left units with regard +to composition. It is enough to show that `e = e'` since the right and left unit laws are propositions (because all hom-types are sets). By function extensionality, it is enough to show that `e x = e' x` for all `x : A`. But by the unit laws we have the following chain of equalities: @@ -188,15 +226,15 @@ the unit laws we have the following chain of equalities: ```agda module _ - {l1 l2 : Level} {A : UU l1} (hom : A → A → Set l2) + {l1 l2 : Level} {A : UU l1} + (hom-set : A → A → Set l2) + ( comp-hom : composition-operation-Set hom-set) where abstract all-elements-equal-is-unital-composition-operation-Set : - ( μ : composition-operation-Set hom) → - all-elements-equal (is-unital-composition-operation-Set hom μ) + all-elements-equal (is-unital-composition-operation-Set hom-set comp-hom) all-elements-equal-is-unital-composition-operation-Set - ( μ) ( e , left-unit-law-e , right-unit-law-e) ( e' , left-unit-law-e' , right-unit-law-e') = eq-type-subtype @@ -207,31 +245,29 @@ module _ Π-Prop' A ( λ b → Π-Prop - ( type-Set (hom a b)) - ( λ f' → Id-Prop (hom a b) (μ (x b) f') f')))) + ( type-Set (hom-set a b)) + ( λ f' → Id-Prop (hom-set a b) (comp-hom (x b) f') f')))) ( Π-Prop' A ( λ a → Π-Prop' A ( λ b → Π-Prop - ( type-Set (hom a b)) - ( λ f' → Id-Prop (hom a b) (μ f' (x a)) f'))))) + ( type-Set (hom-set a b)) + ( λ f' → Id-Prop (hom-set a b) (comp-hom f' (x a)) f'))))) ( eq-htpy ( λ x → inv (left-unit-law-e' (e x)) ∙ right-unit-law-e (e' x))) is-prop-is-unital-composition-operation-Set : - ( μ : composition-operation-Set hom) → - is-prop (is-unital-composition-operation-Set hom μ) - is-prop-is-unital-composition-operation-Set μ = + is-prop (is-unital-composition-operation-Set hom-set comp-hom) + is-prop-is-unital-composition-operation-Set = is-prop-all-elements-equal - ( all-elements-equal-is-unital-composition-operation-Set μ) - - is-unital-prop-composition-operation-Set : - ( μ : composition-operation-Set hom) → Prop (l1 ⊔ l2) - pr1 (is-unital-prop-composition-operation-Set μ) = - is-unital-composition-operation-Set hom μ - pr2 (is-unital-prop-composition-operation-Set μ) = - is-prop-is-unital-composition-operation-Set μ + all-elements-equal-is-unital-composition-operation-Set + + is-unital-prop-composition-operation-Set : Prop (l1 ⊔ l2) + pr1 is-unital-prop-composition-operation-Set = + is-unital-composition-operation-Set hom-set comp-hom + pr2 is-unital-prop-composition-operation-Set = + is-prop-is-unital-composition-operation-Set module _ {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) From ad3dba70be2b3e9c55a9c448d3cae6cc1960aae6 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 17:22:16 +0200 Subject: [PATCH 61/89] comment --- .../nonunital-precategories.lagda.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/category-theory/nonunital-precategories.lagda.md b/src/category-theory/nonunital-precategories.lagda.md index c77360f4cb..2cb0e330f9 100644 --- a/src/category-theory/nonunital-precategories.lagda.md +++ b/src/category-theory/nonunital-precategories.lagda.md @@ -289,3 +289,16 @@ module _ ( hom-set-Nonunital-Precategory C) ( comp-hom-Nonunital-Precategory C) ``` + +## Comments + +As discussed in [Semicategories](https://ncatlab.org/nlab/show/semicategory) at +nlab, it seems that a nonunital precategory should be the underlying nonunital +precategory of a [category](category-theory.categories.md) if and only if the +projection map + +```text + pr1 : (Σ (a : A) Σ (f : hom a a) (is-unit f)) → A +``` + +is an [equivalence](foundation-core.equivalences.md). From bbf3f10220a7949d475a2dfb9d0c20d5a057c442 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Thu, 19 Oct 2023 18:44:19 +0200 Subject: [PATCH 62/89] underlying categorical structures --- src/category-theory/categories.lagda.md | 41 ++++++++++++++++------ src/category-theory/precategories.lagda.md | 21 +++++++++-- 2 files changed, 49 insertions(+), 13 deletions(-) diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index 220fe85870..5cb71c84c7 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -9,6 +9,7 @@ module category-theory.categories where ```agda open import category-theory.isomorphisms-in-precategories open import category-theory.precategories +open import category-theory.preunivalent-categories open import foundation.1-types open import foundation.dependent-pair-types @@ -144,8 +145,7 @@ postcomp-hom-Category C = postcomp-hom-Precategory (precategory-Category C) ```agda module _ - {l1 l2 : Level} - (C : Category l1 l2) + {l1 l2 : Level} (C : Category l1 l2) where hom-eq-Category : @@ -157,6 +157,31 @@ module _ hom-inv-eq-Category = hom-inv-eq-Precategory (precategory-Category C) ``` +### The underlying nonunital precategory of a category + +```agda +module _ + {l1 l2 : Level} (C : Category l1 l2) + where + + nonunital-precategory-Category : Nonunital-Precategory l1 l2 + nonunital-precategory-Category = + nonunital-precategory-Precategory (precategory-Category C) +``` + +### The underlying preunivalent category of a category + +```agda +module _ + {l1 l2 : Level} (C : Category l1 l2) + where + + preunivalent-category-Category : Preunivalent-Category l1 l2 + pr1 preunivalent-category-Category = precategory-Category C + pr2 preunivalent-category-Category x y = + is-emb-is-equiv (is-category-Category C x y) +``` + ## Properties ### The objects in a category form a 1-type @@ -171,14 +196,10 @@ module _ where is-1-type-obj-Category : is-1-type (obj-Category C) - is-1-type-obj-Category x y = - is-set-is-equiv - ( iso-Precategory (precategory-Category C) x y) - ( iso-eq-Precategory (precategory-Category C) x y) - ( is-category-Category C x y) - ( is-set-iso-Precategory (precategory-Category C)) + is-1-type-obj-Category = + is-1-type-obj-Preunivalent-Category (preunivalent-category-Category C) obj-1-type-Category : 1-Type l1 - pr1 obj-1-type-Category = obj-Category C - pr2 obj-1-type-Category = is-1-type-obj-Category + obj-1-type-Category = + obj-1-type-Preunivalent-Category (preunivalent-category-Category C) ``` diff --git a/src/category-theory/precategories.lagda.md b/src/category-theory/precategories.lagda.md index db18d37062..36d403aec3 100644 --- a/src/category-theory/precategories.lagda.md +++ b/src/category-theory/precategories.lagda.md @@ -122,19 +122,34 @@ module _ pr2 (pr2 is-unital-composition-operation-Precategory) ``` +### The underlying nonunital precategory of a precategory + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) + where + + nonunital-precategory-Precategory : Nonunital-Precategory l1 l2 + pr1 nonunital-precategory-Precategory = obj-Precategory C + pr1 (pr2 nonunital-precategory-Precategory) = hom-set-Precategory C + pr1 (pr2 (pr2 nonunital-precategory-Precategory)) = comp-hom-Precategory C + pr2 (pr2 (pr2 nonunital-precategory-Precategory)) = + associative-comp-hom-Precategory C +``` + ### The total hom-type of a precategory ```agda total-hom-Precategory : {l1 l2 : Level} (C : Precategory l1 l2) → UU (l1 ⊔ l2) total-hom-Precategory C = - Σ (obj-Precategory C) (λ x → Σ (obj-Precategory C) (hom-Precategory C x)) + total-hom-Nonunital-Precategory (nonunital-precategory-Precategory C) obj-total-hom-Precategory : {l1 l2 : Level} (C : Precategory l1 l2) → total-hom-Precategory C → obj-Precategory C × obj-Precategory C -pr1 (obj-total-hom-Precategory C (x , y , f)) = x -pr2 (obj-total-hom-Precategory C (x , y , f)) = y +obj-total-hom-Precategory C = + obj-total-hom-Nonunital-Precategory (nonunital-precategory-Precategory C) ``` ### Precomposition by a morphism From 3b2470190581c1c853042e78c1cd30b542621e8f Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 11:01:04 +0200 Subject: [PATCH 63/89] factor out file on composition operations --- src/category-theory.lagda.md | 1 + src/category-theory/categories.lagda.md | 50 ++--- ...ations-on-binary-families-of-sets.lagda.md | 175 ++++++++++++++++++ .../nonunital-precategories.lagda.md | 160 +++------------- 4 files changed, 222 insertions(+), 164 deletions(-) create mode 100644 src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index c90df0b52d..6c839cd7ee 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -25,6 +25,7 @@ open import category-theory.category-of-maps-categories public open import category-theory.category-of-maps-from-small-to-large-categories public open import category-theory.commuting-squares-of-morphisms-in-large-precategories public open import category-theory.commuting-squares-of-morphisms-in-precategories public +open import category-theory.composition-operations-on-binary-families-of-sets public open import category-theory.coproducts-in-precategories public open import category-theory.dependent-products-of-categories public open import category-theory.dependent-products-of-large-categories public diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index 5cb71c84c7..fd28b4e61e 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -121,6 +121,31 @@ module _ is-category-Category = pr2 C ``` +### The underlying nonunital precategory of a category + +```agda +module _ + {l1 l2 : Level} (C : Category l1 l2) + where + + nonunital-precategory-Category : Nonunital-Precategory l1 l2 + nonunital-precategory-Category = + nonunital-precategory-Precategory (precategory-Category C) +``` + +### The underlying preunivalent category of a category + +```agda +module _ + {l1 l2 : Level} (C : Category l1 l2) + where + + preunivalent-category-Category : Preunivalent-Category l1 l2 + pr1 preunivalent-category-Category = precategory-Category C + pr2 preunivalent-category-Category x y = + is-emb-is-equiv (is-category-Category C x y) +``` + ### Precomposition by a morphism ```agda @@ -157,31 +182,6 @@ module _ hom-inv-eq-Category = hom-inv-eq-Precategory (precategory-Category C) ``` -### The underlying nonunital precategory of a category - -```agda -module _ - {l1 l2 : Level} (C : Category l1 l2) - where - - nonunital-precategory-Category : Nonunital-Precategory l1 l2 - nonunital-precategory-Category = - nonunital-precategory-Precategory (precategory-Category C) -``` - -### The underlying preunivalent category of a category - -```agda -module _ - {l1 l2 : Level} (C : Category l1 l2) - where - - preunivalent-category-Category : Preunivalent-Category l1 l2 - pr1 preunivalent-category-Category = precategory-Category C - pr2 preunivalent-category-Category x y = - is-emb-is-equiv (is-category-Category C x y) -``` - ## Properties ### The objects in a category form a 1-type diff --git a/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md b/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md new file mode 100644 index 0000000000..ca7d454629 --- /dev/null +++ b/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md @@ -0,0 +1,175 @@ +# Composition operations on binary families of sets + +```agda +module category-theory.composition-operations-on-binary-families-of-sets where +``` + +
Imports + +```agda +open import foundation.cartesian-product-types +open import foundation.dependent-pair-types +open import foundation.function-extensionality +open import foundation.function-types +open import foundation.identity-types +open import foundation.propositions +open import foundation.sets +open import foundation.subtypes +open import foundation.universe-levels +``` + +
+ +## Idea + +A **nonunital precategory** is a [precategory](category-theory.precategories.md) +that may not have identity maps. Such an object may also rightfully be called a +_semiprecategory_. + +## Definition + +### Composition operations + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (hom-set : A → A → Set l2) + where + + composition-operation-Set : UU (l1 ⊔ l2) + composition-operation-Set = + {x y z : A} → + type-Set (hom-set y z) → type-Set (hom-set x y) → type-Set (hom-set x z) +``` + +### Associative composition operations + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (hom-set : A → A → Set l2) + where + + is-associative-composition-operation-Set : + composition-operation-Set hom-set → UU (l1 ⊔ l2) + is-associative-composition-operation-Set comp-hom = + {x y z w : A} + (h : type-Set (hom-set z w)) + (g : type-Set (hom-set y z)) + (f : type-Set (hom-set x y)) → + comp-hom (comp-hom h g) f = comp-hom h (comp-hom g f) + + associative-composition-structure-Set : UU (l1 ⊔ l2) + associative-composition-structure-Set = + Σ ( composition-operation-Set hom-set) + ( is-associative-composition-operation-Set) +``` + +### Unital composition operations + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (hom-set : A → A → Set l2) + where + + is-unital-composition-operation-Set : + composition-operation-Set hom-set → UU (l1 ⊔ l2) + is-unital-composition-operation-Set comp-hom = + Σ ( (x : A) → type-Set (hom-set x x)) + ( λ e → + ( {x y : A} (f : type-Set (hom-set x y)) → comp-hom (e y) f = f) × + ( {x y : A} (f : type-Set (hom-set x y)) → comp-hom f (e x) = f)) +``` + +## Properties + +### Being associative is a property of composition operations in sets + +```agda +module _ + {l1 l2 : Level} {A : UU l1} + (hom-set : A → A → Set l2) (comp-hom : composition-operation-Set hom-set) + where + + associativity-prop-composition-operation-Set : Prop (l1 ⊔ l2) + associativity-prop-composition-operation-Set = + Π-Prop' A + ( λ x → + Π-Prop' A + ( λ y → + Π-Prop' A + ( λ z → + Π-Prop' A + ( λ w → + Π-Prop + ( type-Set (hom-set z w)) + ( λ h → + Π-Prop + ( type-Set (hom-set y z)) + ( λ g → + Π-Prop + ( type-Set (hom-set x y)) + ( λ f → + Id-Prop + ( hom-set x w) + ( comp-hom (comp-hom h g) f) + ( comp-hom h (comp-hom g f))))))))) + + is-prop-is-associative-composition-operation-Set : + is-prop (is-associative-composition-operation-Set hom-set comp-hom) + is-prop-is-associative-composition-operation-Set = + is-prop-type-Prop associativity-prop-composition-operation-Set +``` + +### Being unital is a property of composition operations in sets + +Suppose `e e' : (x : A) → hom-set x x` are both right and left units with regard +to composition. It is enough to show that `e = e'` since the right and left unit +laws are propositions (because all hom-types are sets). By function +extensionality, it is enough to show that `e x = e' x` for all `x : A`. But by +the unit laws we have the following chain of equalities: +`e x = (e' x) ∘ (e x) = e' x.` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} + (hom-set : A → A → Set l2) + ( comp-hom : composition-operation-Set hom-set) + where + + abstract + all-elements-equal-is-unital-composition-operation-Set : + all-elements-equal (is-unital-composition-operation-Set hom-set comp-hom) + all-elements-equal-is-unital-composition-operation-Set + ( e , left-unit-law-e , right-unit-law-e) + ( e' , left-unit-law-e' , right-unit-law-e') = + eq-type-subtype + ( λ x → + prod-Prop + ( Π-Prop' A + ( λ a → + Π-Prop' A + ( λ b → + Π-Prop + ( type-Set (hom-set a b)) + ( λ f' → Id-Prop (hom-set a b) (comp-hom (x b) f') f')))) + ( Π-Prop' A + ( λ a → + Π-Prop' A + ( λ b → + Π-Prop + ( type-Set (hom-set a b)) + ( λ f' → Id-Prop (hom-set a b) (comp-hom f' (x a)) f'))))) + ( eq-htpy + ( λ x → inv (left-unit-law-e' (e x)) ∙ right-unit-law-e (e' x))) + + is-prop-is-unital-composition-operation-Set : + is-prop (is-unital-composition-operation-Set hom-set comp-hom) + is-prop-is-unital-composition-operation-Set = + is-prop-all-elements-equal + all-elements-equal-is-unital-composition-operation-Set + + is-unital-prop-composition-operation-Set : Prop (l1 ⊔ l2) + pr1 is-unital-prop-composition-operation-Set = + is-unital-composition-operation-Set hom-set comp-hom + pr2 is-unital-prop-composition-operation-Set = + is-prop-is-unital-composition-operation-Set +``` diff --git a/src/category-theory/nonunital-precategories.lagda.md b/src/category-theory/nonunital-precategories.lagda.md index 2cb0e330f9..b88a09c341 100644 --- a/src/category-theory/nonunital-precategories.lagda.md +++ b/src/category-theory/nonunital-precategories.lagda.md @@ -2,6 +2,8 @@ ```agda module category-theory.nonunital-precategories where + +open import category-theory.composition-operations-on-binary-families-of-sets public ```
Imports @@ -28,29 +30,6 @@ _semiprecategory_. ## Definition -### Associative composition structures on sets - -```agda -module _ - {l1 l2 : Level} {A : UU l1} (hom-set : A → A → Set l2) - where - - composition-operation-Set : UU (l1 ⊔ l2) - composition-operation-Set = - {x y z : A} → type-Set (hom-set y z) → type-Set (hom-set x y) → type-Set (hom-set x z) - - is-associative-composition-operation-Set : - composition-operation-Set → UU (l1 ⊔ l2) - is-associative-composition-operation-Set comp-hom = - {x y z w : A} (h : type-Set (hom-set z w)) (g : type-Set (hom-set y z)) - (f : type-Set (hom-set x y)) → comp-hom (comp-hom h g) f = comp-hom h (comp-hom g f) - - associative-composition-structure-Set : UU (l1 ⊔ l2) - associative-composition-structure-Set = - Σ ( composition-operation-Set) - ( is-associative-composition-operation-Set) -``` - ### Nonunital precategories ```agda @@ -133,9 +112,11 @@ pr2 (obj-total-hom-Nonunital-Precategory C (x , y , f)) = y precomp-hom-Nonunital-Precategory : {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) {x y : obj-Nonunital-Precategory C} - (f : hom-Nonunital-Precategory C x y) (z : obj-Nonunital-Precategory C) → + (f : hom-Nonunital-Precategory C x y) + (z : obj-Nonunital-Precategory C) → hom-Nonunital-Precategory C y z → hom-Nonunital-Precategory C x z -precomp-hom-Nonunital-Precategory C f z g = comp-hom-Nonunital-Precategory C g f +precomp-hom-Nonunital-Precategory C f z g = + comp-hom-Nonunital-Precategory C g f ``` ### Postcomposition by a morphism @@ -144,78 +125,14 @@ precomp-hom-Nonunital-Precategory C f z g = comp-hom-Nonunital-Precategory C g f postcomp-hom-Nonunital-Precategory : {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) {x y : obj-Nonunital-Precategory C} - (f : hom-Nonunital-Precategory C x y) (z : obj-Nonunital-Precategory C) → + (f : hom-Nonunital-Precategory C x y) + (z : obj-Nonunital-Precategory C) → hom-Nonunital-Precategory C z x → hom-Nonunital-Precategory C z y -postcomp-hom-Nonunital-Precategory C f z = comp-hom-Nonunital-Precategory C f -``` - -### Unital composition structures - -```agda -module _ - {l1 l2 : Level} {A : UU l1} (hom-set : A → A → Set l2) - where - - is-unital-composition-operation-Set : - composition-operation-Set hom-set → UU (l1 ⊔ l2) - is-unital-composition-operation-Set comp-hom = - Σ ( (x : A) → type-Set (hom-set x x)) - ( λ e → - ( {x y : A} (f : type-Set (hom-set x y)) → comp-hom (e y) f = f) × - ( {x y : A} (f : type-Set (hom-set x y)) → comp-hom f (e x) = f)) - -module _ - {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) - where - - is-unital-Nonunital-Precategory : UU (l1 ⊔ l2) - is-unital-Nonunital-Precategory = - is-unital-composition-operation-Set - ( hom-set-Nonunital-Precategory C) - ( comp-hom-Nonunital-Precategory C) -``` - -## Properties - -### Being associative is a property of composition operations in sets - -```agda -module _ - {l1 l2 : Level} {A : UU l1} - (hom-set : A → A → Set l2) (comp-hom : composition-operation-Set hom-set) - where - - associativity-prop-composition-operation-Set : Prop (l1 ⊔ l2) - associativity-prop-composition-operation-Set = - Π-Prop' A - ( λ x → - Π-Prop' A - ( λ y → - Π-Prop' A - ( λ z → - Π-Prop' A - ( λ w → - Π-Prop - ( type-Set (hom-set z w)) - ( λ h → - Π-Prop - ( type-Set (hom-set y z)) - ( λ g → - Π-Prop - ( type-Set (hom-set x y)) - ( λ f → - Id-Prop - ( hom-set x w) - ( comp-hom (comp-hom h g) f) - ( comp-hom h (comp-hom g f))))))))) - - is-prop-is-associative-composition-operation-Set : - is-prop (is-associative-composition-operation-Set hom-set comp-hom) - is-prop-is-associative-composition-operation-Set = - is-prop-type-Prop associativity-prop-composition-operation-Set +postcomp-hom-Nonunital-Precategory C f z = + comp-hom-Nonunital-Precategory C f ``` -### Being unital is a property of composition operations in sets +### The predicate of being unital on nonunital precategories Suppose `e e' : (x : A) → hom-set x x` are both right and left units with regard to composition. It is enough to show that `e = e'` since the right and left unit @@ -225,54 +142,16 @@ the unit laws we have the following chain of equalities: `e x = (e' x) ∘ (e x) = e' x.` ```agda -module _ - {l1 l2 : Level} {A : UU l1} - (hom-set : A → A → Set l2) - ( comp-hom : composition-operation-Set hom-set) - where - - abstract - all-elements-equal-is-unital-composition-operation-Set : - all-elements-equal (is-unital-composition-operation-Set hom-set comp-hom) - all-elements-equal-is-unital-composition-operation-Set - ( e , left-unit-law-e , right-unit-law-e) - ( e' , left-unit-law-e' , right-unit-law-e') = - eq-type-subtype - ( λ x → - prod-Prop - ( Π-Prop' A - ( λ a → - Π-Prop' A - ( λ b → - Π-Prop - ( type-Set (hom-set a b)) - ( λ f' → Id-Prop (hom-set a b) (comp-hom (x b) f') f')))) - ( Π-Prop' A - ( λ a → - Π-Prop' A - ( λ b → - Π-Prop - ( type-Set (hom-set a b)) - ( λ f' → Id-Prop (hom-set a b) (comp-hom f' (x a)) f'))))) - ( eq-htpy - ( λ x → inv (left-unit-law-e' (e x)) ∙ right-unit-law-e (e' x))) - - is-prop-is-unital-composition-operation-Set : - is-prop (is-unital-composition-operation-Set hom-set comp-hom) - is-prop-is-unital-composition-operation-Set = - is-prop-all-elements-equal - all-elements-equal-is-unital-composition-operation-Set - - is-unital-prop-composition-operation-Set : Prop (l1 ⊔ l2) - pr1 is-unital-prop-composition-operation-Set = - is-unital-composition-operation-Set hom-set comp-hom - pr2 is-unital-prop-composition-operation-Set = - is-prop-is-unital-composition-operation-Set - module _ {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) where + is-unital-Nonunital-Precategory : UU (l1 ⊔ l2) + is-unital-Nonunital-Precategory = + is-unital-composition-operation-Set + ( hom-set-Nonunital-Precategory C) + ( comp-hom-Nonunital-Precategory C) + is-prop-is-unital-Nonunital-Precategory : is-prop ( is-unital-composition-operation-Set @@ -298,7 +177,10 @@ precategory of a [category](category-theory.categories.md) if and only if the projection map ```text - pr1 : (Σ (a : A) Σ (f : hom a a) (is-unit f)) → A + pr1 : (Σ (a : A) Σ (f : hom a a) (is-neutral f)) → A ``` is an [equivalence](foundation-core.equivalences.md). + +We can also define a notion of "isomorphism" as those that induce equivalences +of hom-sets by pre- and postcomposition. From 858c2c66afe4c49d33f2aecce15eb54a3957ce9c Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 11:06:20 +0200 Subject: [PATCH 64/89] fix imports --- .../augmented-simplex-category.lagda.md | 1 + src/category-theory/categories.lagda.md | 2 ++ .../dependent-products-of-categories.lagda.md | 1 + .../dependent-products-of-precategories.lagda.md | 1 + src/category-theory/full-subcategories.lagda.md | 1 + src/category-theory/full-subprecategories.lagda.md | 1 + src/category-theory/function-categories.lagda.md | 1 + src/category-theory/function-precategories.lagda.md | 1 + src/category-theory/nonunital-precategories.lagda.md | 2 ++ src/category-theory/one-object-precategories.lagda.md | 1 + src/category-theory/precategories.lagda.md | 10 +++++----- src/category-theory/precategory-of-functors.lagda.md | 1 + .../precategory-of-maps-precategories.lagda.md | 1 + src/category-theory/preunivalent-categories.lagda.md | 1 + .../representing-arrow-category.lagda.md | 1 + src/category-theory/simplex-category.lagda.md | 1 + src/category-theory/subcategories.lagda.md | 1 + src/category-theory/subprecategories.lagda.md | 1 + 18 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/category-theory/augmented-simplex-category.lagda.md b/src/category-theory/augmented-simplex-category.lagda.md index 13f90d95dd..5ee072309e 100644 --- a/src/category-theory/augmented-simplex-category.lagda.md +++ b/src/category-theory/augmented-simplex-category.lagda.md @@ -7,6 +7,7 @@ module category-theory.augmented-simplex-category where
Imports ```agda +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.precategories open import elementary-number-theory.inequality-standard-finite-types diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index fd28b4e61e..10520930e8 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -7,7 +7,9 @@ module category-theory.categories where
Imports ```agda +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.isomorphisms-in-precategories +open import category-theory.nonunital-precategories open import category-theory.precategories open import category-theory.preunivalent-categories diff --git a/src/category-theory/dependent-products-of-categories.lagda.md b/src/category-theory/dependent-products-of-categories.lagda.md index 3bea6aa8bf..d561c2e1c9 100644 --- a/src/category-theory/dependent-products-of-categories.lagda.md +++ b/src/category-theory/dependent-products-of-categories.lagda.md @@ -8,6 +8,7 @@ module category-theory.dependent-products-of-categories where ```agda open import category-theory.categories +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.dependent-products-of-precategories open import category-theory.isomorphisms-in-categories open import category-theory.precategories diff --git a/src/category-theory/dependent-products-of-precategories.lagda.md b/src/category-theory/dependent-products-of-precategories.lagda.md index 863e15ad2f..b7b4c9f3aa 100644 --- a/src/category-theory/dependent-products-of-precategories.lagda.md +++ b/src/category-theory/dependent-products-of-precategories.lagda.md @@ -7,6 +7,7 @@ module category-theory.dependent-products-of-precategories where
Imports ```agda +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.isomorphisms-in-precategories open import category-theory.precategories diff --git a/src/category-theory/full-subcategories.lagda.md b/src/category-theory/full-subcategories.lagda.md index 632c3b9b89..156ebdddbb 100644 --- a/src/category-theory/full-subcategories.lagda.md +++ b/src/category-theory/full-subcategories.lagda.md @@ -8,6 +8,7 @@ module category-theory.full-subcategories where ```agda open import category-theory.categories +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.embeddings-precategories open import category-theory.full-subprecategories open import category-theory.fully-faithful-functors-precategories diff --git a/src/category-theory/full-subprecategories.lagda.md b/src/category-theory/full-subprecategories.lagda.md index 3f8dcb0a83..52f60d2fb1 100644 --- a/src/category-theory/full-subprecategories.lagda.md +++ b/src/category-theory/full-subprecategories.lagda.md @@ -8,6 +8,7 @@ module category-theory.full-subprecategories where ```agda open import category-theory.categories +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.embeddings-precategories open import category-theory.fully-faithful-functors-precategories open import category-theory.functors-precategories diff --git a/src/category-theory/function-categories.lagda.md b/src/category-theory/function-categories.lagda.md index 7bd39eade2..b28d881f57 100644 --- a/src/category-theory/function-categories.lagda.md +++ b/src/category-theory/function-categories.lagda.md @@ -8,6 +8,7 @@ module category-theory.function-categories where ```agda open import category-theory.categories +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.dependent-products-of-categories open import category-theory.isomorphisms-in-categories open import category-theory.precategories diff --git a/src/category-theory/function-precategories.lagda.md b/src/category-theory/function-precategories.lagda.md index 25d632bad9..b0b43a4590 100644 --- a/src/category-theory/function-precategories.lagda.md +++ b/src/category-theory/function-precategories.lagda.md @@ -7,6 +7,7 @@ module category-theory.function-precategories where
Imports ```agda +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.dependent-products-of-precategories open import category-theory.isomorphisms-in-precategories open import category-theory.precategories diff --git a/src/category-theory/nonunital-precategories.lagda.md b/src/category-theory/nonunital-precategories.lagda.md index b88a09c341..d3f0960eaf 100644 --- a/src/category-theory/nonunital-precategories.lagda.md +++ b/src/category-theory/nonunital-precategories.lagda.md @@ -9,6 +9,8 @@ open import category-theory.composition-operations-on-binary-families-of-sets pu
Imports ```agda +open import category-theory.composition-operations-on-binary-families-of-sets + open import foundation.cartesian-product-types open import foundation.dependent-pair-types open import foundation.function-extensionality diff --git a/src/category-theory/one-object-precategories.lagda.md b/src/category-theory/one-object-precategories.lagda.md index 3ea1015631..d9f7165fa0 100644 --- a/src/category-theory/one-object-precategories.lagda.md +++ b/src/category-theory/one-object-precategories.lagda.md @@ -7,6 +7,7 @@ module category-theory.one-object-precategories where
Imports ```agda +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.endomorphisms-in-precategories open import category-theory.precategories diff --git a/src/category-theory/precategories.lagda.md b/src/category-theory/precategories.lagda.md index 36d403aec3..20ef1562ee 100644 --- a/src/category-theory/precategories.lagda.md +++ b/src/category-theory/precategories.lagda.md @@ -2,13 +2,12 @@ ```agda module category-theory.precategories where - -open import category-theory.nonunital-precategories public ```
Imports ```agda +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.nonunital-precategories open import foundation.cartesian-product-types @@ -51,9 +50,10 @@ Precategory l1 l2 = Σ ( UU l1) ( λ A → Σ ( A → A → Set l2) - ( λ hom → - Σ ( associative-composition-structure-Set hom) - ( λ μ → is-unital-composition-operation-Set hom (pr1 μ)))) + ( λ hom-set → + Σ ( associative-composition-structure-Set hom-set) + ( λ (comp-hom , assoc-comp) → + is-unital-composition-operation-Set hom-set comp-hom))) module _ {l1 l2 : Level} (C : Precategory l1 l2) diff --git a/src/category-theory/precategory-of-functors.lagda.md b/src/category-theory/precategory-of-functors.lagda.md index 2943342830..f782cb9838 100644 --- a/src/category-theory/precategory-of-functors.lagda.md +++ b/src/category-theory/precategory-of-functors.lagda.md @@ -7,6 +7,7 @@ module category-theory.precategory-of-functors where
Imports ```agda +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.functors-precategories open import category-theory.isomorphisms-in-precategories open import category-theory.natural-isomorphisms-functors-precategories diff --git a/src/category-theory/precategory-of-maps-precategories.lagda.md b/src/category-theory/precategory-of-maps-precategories.lagda.md index faca32bc1c..ef1526ec76 100644 --- a/src/category-theory/precategory-of-maps-precategories.lagda.md +++ b/src/category-theory/precategory-of-maps-precategories.lagda.md @@ -7,6 +7,7 @@ module category-theory.precategory-of-maps-precategories where
Imports ```agda +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.isomorphisms-in-precategories open import category-theory.maps-precategories open import category-theory.natural-isomorphisms-maps-precategories diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md index 34aad03332..5ca0e535f2 100644 --- a/src/category-theory/preunivalent-categories.lagda.md +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -7,6 +7,7 @@ module category-theory.preunivalent-categories where
Imports ```agda +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.isomorphisms-in-precategories open import category-theory.precategories diff --git a/src/category-theory/representing-arrow-category.lagda.md b/src/category-theory/representing-arrow-category.lagda.md index 19c450422a..7541939eb0 100644 --- a/src/category-theory/representing-arrow-category.lagda.md +++ b/src/category-theory/representing-arrow-category.lagda.md @@ -8,6 +8,7 @@ module category-theory.representing-arrow-category where ```agda open import category-theory.categories +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.isomorphisms-in-precategories open import category-theory.precategories diff --git a/src/category-theory/simplex-category.lagda.md b/src/category-theory/simplex-category.lagda.md index 0da1e2c3ad..95c235b7e1 100644 --- a/src/category-theory/simplex-category.lagda.md +++ b/src/category-theory/simplex-category.lagda.md @@ -7,6 +7,7 @@ module category-theory.simplex-category where
Imports ```agda +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.precategories open import elementary-number-theory.inequality-standard-finite-types diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index 108cd2aab0..975e39a8a5 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -8,6 +8,7 @@ module category-theory.subcategories where ```agda open import category-theory.categories +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.faithful-functors-precategories open import category-theory.functors-precategories open import category-theory.isomorphism-induction-categories diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index 172b6e7eec..1cbf2dc7b1 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -8,6 +8,7 @@ module category-theory.subprecategories where ```agda open import category-theory.categories +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.faithful-functors-precategories open import category-theory.functors-precategories open import category-theory.isomorphism-induction-categories From 0593b0249b0d8d9890d1f397b5766543c2ec614e Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 12:21:09 +0200 Subject: [PATCH 65/89] define strict categories --- src/category-theory.lagda.md | 1 + src/category-theory/categories.lagda.md | 2 +- .../preunivalent-categories.lagda.md | 2 +- .../strict-categories.lagda.md | 170 ++++++++++++++++++ 4 files changed, 173 insertions(+), 2 deletions(-) create mode 100644 src/category-theory/strict-categories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index 6c839cd7ee..3b99e5908a 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -116,6 +116,7 @@ open import category-theory.representing-arrow-category public open import category-theory.sieves-in-categories public open import category-theory.simplex-category public open import category-theory.slice-precategories public +open import category-theory.strict-categories public open import category-theory.subcategories public open import category-theory.subprecategories public open import category-theory.terminal-objects-precategories public diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index 434ba9a7ca..7f8afd2c9b 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -32,7 +32,7 @@ A **category** in Homotopy Type Theory is a [isomorphisms](category-theory.isomorphisms-in-precategories.md). More specifically, an equality between objects gives rise to an isomorphism between them, by the J-rule. A precategory is a category if this function, called -`iso-eq`, is an [equivalence](foundation-core.equivalences.md). In particular. +`iso-eq`, is an [equivalence](foundation-core.equivalences.md). In particular, being a category is a [proposition](foundation-core.propositions.md) since `is-equiv` is a proposition. diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md index 5cd69dabd2..cea3a13915 100644 --- a/src/category-theory/preunivalent-categories.lagda.md +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -30,7 +30,7 @@ objects [embed](foundation-core.embeddings.md) into the [isomorphisms](category-theory.isomorphisms-in-precategories.md). More specifically, an equality between objects gives rise to an isomorphism between them, by the J-rule. A precategory is a preunivalent category if this function, -called `iso-eq`, is an embedding. In particular. being preunivalent is a +called `iso-eq`, is an embedding. In particular, being preunivalent is a [proposition](foundation-core.propositions.md) since `is-emb` is a proposition. The idea of preunivalence is that it is a common generalization of univalent diff --git a/src/category-theory/strict-categories.lagda.md b/src/category-theory/strict-categories.lagda.md new file mode 100644 index 0000000000..4626f99d53 --- /dev/null +++ b/src/category-theory/strict-categories.lagda.md @@ -0,0 +1,170 @@ +# Strict categories + +```agda +module category-theory.strict-categories where +``` + +
Imports + +```agda +open import category-theory.composition-operations-on-binary-families-of-sets +open import category-theory.isomorphisms-in-precategories +open import category-theory.nonunital-precategories +open import category-theory.precategories +open import category-theory.preunivalent-categories + +open import foundation.1-types +open import foundation.dependent-pair-types +open import foundation.equivalences +open import foundation.identity-types +open import foundation.injective-maps +open import foundation.propositions +open import foundation.sets +open import foundation.universe-levels +``` + +
+ +## Idea + +A **strict category** in Homotopy Type Theory is a +[precategory](category-theory.precategories.md) for which the type of objects +form a [set](foundation-core.sets.md). In particular, being a strict category is +a [proposition](foundation-core.propositions.md) since being a set is a +proposition. + +## Definition + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) + where + + is-strict-category-prop-Precategory : Prop l1 + is-strict-category-prop-Precategory = + is-set-Prop (obj-Precategory C) + + is-strict-category-Precategory : UU l1 + is-strict-category-Precategory = type-Prop is-strict-category-prop-Precategory + +Strict-Category : (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2) +Strict-Category l1 l2 = Σ (Precategory l1 l2) is-strict-category-Precategory + +module _ + {l1 l2 : Level} (C : Strict-Category l1 l2) + where + + precategory-Strict-Category : Precategory l1 l2 + precategory-Strict-Category = pr1 C + + obj-Strict-Category : UU l1 + obj-Strict-Category = obj-Precategory precategory-Strict-Category + + hom-set-Strict-Category : obj-Strict-Category → obj-Strict-Category → Set l2 + hom-set-Strict-Category = hom-set-Precategory precategory-Strict-Category + + hom-Strict-Category : obj-Strict-Category → obj-Strict-Category → UU l2 + hom-Strict-Category = hom-Precategory precategory-Strict-Category + + is-set-hom-Strict-Category : + (x y : obj-Strict-Category) → is-set (hom-Strict-Category x y) + is-set-hom-Strict-Category = + is-set-hom-Precategory precategory-Strict-Category + + comp-hom-Strict-Category : + {x y z : obj-Strict-Category} → + hom-Strict-Category y z → hom-Strict-Category x y → hom-Strict-Category x z + comp-hom-Strict-Category = comp-hom-Precategory precategory-Strict-Category + + associative-comp-hom-Strict-Category : + {x y z w : obj-Strict-Category} + (h : hom-Strict-Category z w) + (g : hom-Strict-Category y z) + (f : hom-Strict-Category x y) → + comp-hom-Strict-Category (comp-hom-Strict-Category h g) f = + comp-hom-Strict-Category h (comp-hom-Strict-Category g f) + associative-comp-hom-Strict-Category = + associative-comp-hom-Precategory precategory-Strict-Category + + associative-composition-structure-Strict-Category : + associative-composition-structure-Set hom-set-Strict-Category + associative-composition-structure-Strict-Category = + associative-composition-structure-Precategory precategory-Strict-Category + + id-hom-Strict-Category : {x : obj-Strict-Category} → hom-Strict-Category x x + id-hom-Strict-Category = id-hom-Precategory precategory-Strict-Category + + left-unit-law-comp-hom-Strict-Category : + {x y : obj-Strict-Category} (f : hom-Strict-Category x y) → + comp-hom-Strict-Category id-hom-Strict-Category f = f + left-unit-law-comp-hom-Strict-Category = + left-unit-law-comp-hom-Precategory precategory-Strict-Category + + right-unit-law-comp-hom-Strict-Category : + {x y : obj-Strict-Category} (f : hom-Strict-Category x y) → + comp-hom-Strict-Category f id-hom-Strict-Category = f + right-unit-law-comp-hom-Strict-Category = + right-unit-law-comp-hom-Precategory precategory-Strict-Category + + is-unital-composition-operation-Strict-Category : + is-unital-composition-operation-Set + hom-set-Strict-Category + comp-hom-Strict-Category + is-unital-composition-operation-Strict-Category = + is-unital-composition-operation-Precategory precategory-Strict-Category + + is-strict-category-Strict-Category : + is-strict-category-Precategory precategory-Strict-Category + is-strict-category-Strict-Category = pr2 C +``` + +### The underlying nonunital precategory of a strict category + +```agda +module _ + {l1 l2 : Level} (C : Strict-Category l1 l2) + where + + nonunital-precategory-Strict-Category : Nonunital-Precategory l1 l2 + nonunital-precategory-Strict-Category = + nonunital-precategory-Precategory (precategory-Strict-Category C) +``` + +### Precomposition by a morphism + +```agda +precomp-hom-Strict-Category : + {l1 l2 : Level} (C : Strict-Category l1 l2) {x y : obj-Strict-Category C} + (f : hom-Strict-Category C x y) (z : obj-Strict-Category C) → + hom-Strict-Category C y z → hom-Strict-Category C x z +precomp-hom-Strict-Category C = + precomp-hom-Precategory (precategory-Strict-Category C) +``` + +### Postcomposition by a morphism + +```agda +postcomp-hom-Strict-Category : + {l1 l2 : Level} (C : Strict-Category l1 l2) {x y : obj-Strict-Category C} + (f : hom-Strict-Category C x y) (z : obj-Strict-Category C) → + hom-Strict-Category C z x → hom-Strict-Category C z y +postcomp-hom-Strict-Category C = + postcomp-hom-Precategory (precategory-Strict-Category C) +``` + +### Equalities give rise to homomorphisms + +```agda +module _ + {l1 l2 : Level} (C : Strict-Category l1 l2) + where + + hom-eq-Strict-Category : + (x y : obj-Strict-Category C) → x = y → hom-Strict-Category C x y + hom-eq-Strict-Category = hom-eq-Precategory (precategory-Strict-Category C) + + hom-inv-eq-Strict-Category : + (x y : obj-Strict-Category C) → x = y → hom-Strict-Category C y x + hom-inv-eq-Strict-Category = + hom-inv-eq-Precategory (precategory-Strict-Category C) +``` From 61f6a0c0e63f3cea5169eb0fec93c731f89c44ac Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 11:15:42 +0200 Subject: [PATCH 66/89] Small subcategories (#861) Co-authored-by: Egbert Rijke --- .../isomorphism-induction-precategories.lagda.md | 3 ++- src/category-theory/preunivalent-categories.lagda.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/category-theory/isomorphism-induction-precategories.lagda.md b/src/category-theory/isomorphism-induction-precategories.lagda.md index 0ee20bbb15..4a3bbc26c6 100644 --- a/src/category-theory/isomorphism-induction-precategories.lagda.md +++ b/src/category-theory/isomorphism-induction-precategories.lagda.md @@ -48,7 +48,8 @@ there is a [section](foundation.sections.md) of the evaluation map ``` The principle of isomorphism induction is equivalent to the univalence axiom for -categories. +categories, hence this is one approach to proving that a precategory is a +category. ## Statement diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md index cea3a13915..424018a843 100644 --- a/src/category-theory/preunivalent-categories.lagda.md +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -216,4 +216,4 @@ module _ ## See also -- [Axiom L](foundation.preunivalence.md) +- [The preunivalence axiom](foundation.preunivalence.md) From 0555a91f7d12b60eebae97f139508778bbf1f088 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 12:22:45 +0200 Subject: [PATCH 67/89] Equalities induce --- src/category-theory/categories.lagda.md | 2 +- src/category-theory/isomorphisms-in-categories.lagda.md | 2 +- src/category-theory/isomorphisms-in-large-categories.lagda.md | 2 +- .../isomorphisms-in-large-precategories.lagda.md | 2 +- src/category-theory/isomorphisms-in-precategories.lagda.md | 2 +- .../natural-isomorphisms-functors-categories.lagda.md | 2 +- .../natural-isomorphisms-functors-precategories.lagda.md | 2 +- .../natural-isomorphisms-maps-categories.lagda.md | 2 +- .../natural-isomorphisms-maps-precategories.lagda.md | 2 +- src/category-theory/precategories.lagda.md | 2 +- src/category-theory/preunivalent-categories.lagda.md | 2 +- src/group-theory/isomorphisms-monoids.lagda.md | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index 7f8afd2c9b..f8987e8cc5 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -168,7 +168,7 @@ postcomp-hom-Category : postcomp-hom-Category C = postcomp-hom-Precategory (precategory-Category C) ``` -### Equalities give rise to homomorphisms +### Equalities induce morphisms ```agda module _ diff --git a/src/category-theory/isomorphisms-in-categories.lagda.md b/src/category-theory/isomorphisms-in-categories.lagda.md index 5ccd19595c..1bbfd370db 100644 --- a/src/category-theory/isomorphisms-in-categories.lagda.md +++ b/src/category-theory/isomorphisms-in-categories.lagda.md @@ -138,7 +138,7 @@ module _ id-iso-Category = id-iso-Precategory (precategory-Category C) ``` -### Equalities give rise to isomorphisms +### Equalities induce isomorphisms An equality between objects `x y : A` gives rise to an isomorphism between them. This is because, by the J-rule, it is enough to construct an isomorphism given diff --git a/src/category-theory/isomorphisms-in-large-categories.lagda.md b/src/category-theory/isomorphisms-in-large-categories.lagda.md index af9003a2ff..977618cd15 100644 --- a/src/category-theory/isomorphisms-in-large-categories.lagda.md +++ b/src/category-theory/isomorphisms-in-large-categories.lagda.md @@ -149,7 +149,7 @@ module _ id-iso-Large-Precategory (large-precategory-Large-Category C) ``` -### Equalities give rise to isomorphisms +### Equalities induce isomorphisms An equality between objects `X Y : A` gives rise to an isomorphism between them. This is because, by the J-rule, it is enough to construct an isomorphism given diff --git a/src/category-theory/isomorphisms-in-large-precategories.lagda.md b/src/category-theory/isomorphisms-in-large-precategories.lagda.md index d17af4517c..239e7d3aac 100644 --- a/src/category-theory/isomorphisms-in-large-precategories.lagda.md +++ b/src/category-theory/isomorphisms-in-large-precategories.lagda.md @@ -140,7 +140,7 @@ module _ pr2 id-iso-Large-Precategory = is-iso-id-hom-Large-Precategory ``` -### Equalities give rise to isomorphisms +### Equalities induce isomorphisms An equality between objects `X Y : A` gives rise to an isomorphism between them. This is because, by the J-rule, it is enough to construct an isomorphism given diff --git a/src/category-theory/isomorphisms-in-precategories.lagda.md b/src/category-theory/isomorphisms-in-precategories.lagda.md index 3398176efe..c5a843dd8c 100644 --- a/src/category-theory/isomorphisms-in-precategories.lagda.md +++ b/src/category-theory/isomorphisms-in-precategories.lagda.md @@ -148,7 +148,7 @@ module _ pr2 id-iso-Precategory = is-iso-id-hom-Precategory ``` -### Equalities give rise to isomorphisms +### Equalities induce isomorphisms An equality between objects `x y : A` gives rise to an isomorphism between them. This is because, by the J-rule, it is enough to construct an isomorphism given diff --git a/src/category-theory/natural-isomorphisms-functors-categories.lagda.md b/src/category-theory/natural-isomorphisms-functors-categories.lagda.md index 191237c0e8..74a02c09b1 100644 --- a/src/category-theory/natural-isomorphisms-functors-categories.lagda.md +++ b/src/category-theory/natural-isomorphisms-functors-categories.lagda.md @@ -266,7 +266,7 @@ module _ ( precategory-Category D) ``` -### Equalities give rise to natural isomorphisms +### Equalities induce natural isomorphisms An equality between functors `F` and `G` gives rise to a natural isomorphism between them. This is because, by the J-rule, it is enough to construct a diff --git a/src/category-theory/natural-isomorphisms-functors-precategories.lagda.md b/src/category-theory/natural-isomorphisms-functors-precategories.lagda.md index 67f3cfefc4..a7ca42e597 100644 --- a/src/category-theory/natural-isomorphisms-functors-precategories.lagda.md +++ b/src/category-theory/natural-isomorphisms-functors-precategories.lagda.md @@ -247,7 +247,7 @@ module _ ( map-functor-Precategory C D F) ``` -### Equalities give rise to natural isomorphisms +### Equalities induce natural isomorphisms An equality between functors `F` and `G` gives rise to a natural isomorphism between them. This is because, by the J-rule, it is enough to construct a diff --git a/src/category-theory/natural-isomorphisms-maps-categories.lagda.md b/src/category-theory/natural-isomorphisms-maps-categories.lagda.md index d4a343a8dd..af45614ba5 100644 --- a/src/category-theory/natural-isomorphisms-maps-categories.lagda.md +++ b/src/category-theory/natural-isomorphisms-maps-categories.lagda.md @@ -265,7 +265,7 @@ module _ ( precategory-Category D) ``` -### Equalities give rise to natural isomorphisms +### Equalities induce natural isomorphisms An equality between maps `F` and `G` gives rise to a natural isomorphism between them. This is because, by the J-rule, it is enough to construct a natural diff --git a/src/category-theory/natural-isomorphisms-maps-precategories.lagda.md b/src/category-theory/natural-isomorphisms-maps-precategories.lagda.md index c765491264..420e96b26f 100644 --- a/src/category-theory/natural-isomorphisms-maps-precategories.lagda.md +++ b/src/category-theory/natural-isomorphisms-maps-precategories.lagda.md @@ -232,7 +232,7 @@ module _ is-iso-id-hom-Precategory D ``` -### Equalities give rise to natural isomorphisms +### Equalities induce natural isomorphisms An equality between maps `F` and `G` gives rise to a natural isomorphism between them. This is because, by the J-rule, it is enough to construct a natural diff --git a/src/category-theory/precategories.lagda.md b/src/category-theory/precategories.lagda.md index 26fc79cc6b..4d1881b10d 100644 --- a/src/category-theory/precategories.lagda.md +++ b/src/category-theory/precategories.lagda.md @@ -174,7 +174,7 @@ postcomp-hom-Precategory : postcomp-hom-Precategory C f z = comp-hom-Precategory C f ``` -### Equalities give rise to homomorphisms +### Equalities induce morphisms ```agda module _ diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md index 424018a843..a8058579cc 100644 --- a/src/category-theory/preunivalent-categories.lagda.md +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -168,7 +168,7 @@ postcomp-hom-Preunivalent-Category C = postcomp-hom-Precategory (precategory-Preunivalent-Category C) ``` -### Equalities give rise to morphisms +### Equalities induce morphisms ```agda module _ diff --git a/src/group-theory/isomorphisms-monoids.lagda.md b/src/group-theory/isomorphisms-monoids.lagda.md index 5036cfe96a..1200c0d8ae 100644 --- a/src/group-theory/isomorphisms-monoids.lagda.md +++ b/src/group-theory/isomorphisms-monoids.lagda.md @@ -187,7 +187,7 @@ module _ { X = M} ``` -### Equalities give rise to isomorphisms +### Equalities induce isomorphisms An equality between objects `x y : A` gives rise to an isomorphism between them. This is because by the J-rule, it is enough to construct an isomorphism given From c1da3054975a46776167340047d633d3a54541a9 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 12:24:27 +0200 Subject: [PATCH 68/89] associative composition _structure_ -> _operation_ --- .../augmented-simplex-category.lagda.md | 10 +++++----- src/category-theory/categories.lagda.md | 8 ++++---- ...on-operations-on-binary-families-of-sets.lagda.md | 4 ++-- .../dependent-products-of-categories.lagda.md | 8 ++++---- .../dependent-products-of-precategories.lagda.md | 10 +++++----- src/category-theory/full-subcategories.lagda.md | 8 ++++---- src/category-theory/full-subprecategories.lagda.md | 10 +++++----- src/category-theory/function-categories.lagda.md | 8 ++++---- src/category-theory/function-precategories.lagda.md | 8 ++++---- src/category-theory/nonunital-precategories.lagda.md | 12 ++++++------ .../one-object-precategories.lagda.md | 10 +++++----- src/category-theory/precategories.lagda.md | 12 ++++++------ src/category-theory/precategory-of-functors.lagda.md | 10 +++++----- .../precategory-of-maps-precategories.lagda.md | 10 +++++----- src/category-theory/preunivalent-categories.lagda.md | 8 ++++---- .../representing-arrow-category.lagda.md | 10 +++++----- src/category-theory/simplex-category.lagda.md | 10 +++++----- src/category-theory/strict-categories.lagda.md | 10 +++++----- src/category-theory/subcategories.lagda.md | 8 ++++---- src/category-theory/subprecategories.lagda.md | 10 +++++----- 20 files changed, 92 insertions(+), 92 deletions(-) diff --git a/src/category-theory/augmented-simplex-category.lagda.md b/src/category-theory/augmented-simplex-category.lagda.md index 5ee072309e..769dcac48d 100644 --- a/src/category-theory/augmented-simplex-category.lagda.md +++ b/src/category-theory/augmented-simplex-category.lagda.md @@ -81,12 +81,12 @@ associative-comp-hom-augmented-simplex-Category {n} {m} {r} {s} = ( Fin-Poset r) ( Fin-Poset s) -associative-composition-structure-augmented-simplex-Category : - associative-composition-structure-Set hom-set-augmented-simplex-Category -pr1 associative-composition-structure-augmented-simplex-Category {n} {m} {r} = +associative-composition-operation-augmented-simplex-Category : + associative-composition-operation-Set hom-set-augmented-simplex-Category +pr1 associative-composition-operation-augmented-simplex-Category {n} {m} {r} = comp-hom-augmented-simplex-Category {n} {m} {r} pr2 - associative-composition-structure-augmented-simplex-Category {n} {m} {r} {s} = + associative-composition-operation-augmented-simplex-Category {n} {m} {r} {s} = associative-comp-hom-augmented-simplex-Category {n} {m} {r} {s} id-hom-augmented-simplex-Category : @@ -128,7 +128,7 @@ augmented-simplex-Precategory : Precategory lzero lzero pr1 augmented-simplex-Precategory = obj-augmented-simplex-Category pr1 (pr2 augmented-simplex-Precategory) = hom-set-augmented-simplex-Category pr1 (pr2 (pr2 augmented-simplex-Precategory)) = - associative-composition-structure-augmented-simplex-Category + associative-composition-operation-augmented-simplex-Category pr2 (pr2 (pr2 augmented-simplex-Precategory)) = is-unital-composition-operation-augmented-simplex-Category ``` diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index f8987e8cc5..b5c92e35e2 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -93,10 +93,10 @@ module _ associative-comp-hom-Category = associative-comp-hom-Precategory precategory-Category - associative-composition-structure-Category : - associative-composition-structure-Set hom-set-Category - associative-composition-structure-Category = - associative-composition-structure-Precategory precategory-Category + associative-composition-operation-Category : + associative-composition-operation-Set hom-set-Category + associative-composition-operation-Category = + associative-composition-operation-Precategory precategory-Category id-hom-Category : {x : obj-Category} → hom-Category x x id-hom-Category = id-hom-Precategory precategory-Category diff --git a/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md b/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md index ca7d454629..35985eb3e8 100644 --- a/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md +++ b/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md @@ -57,8 +57,8 @@ module _ (f : type-Set (hom-set x y)) → comp-hom (comp-hom h g) f = comp-hom h (comp-hom g f) - associative-composition-structure-Set : UU (l1 ⊔ l2) - associative-composition-structure-Set = + associative-composition-operation-Set : UU (l1 ⊔ l2) + associative-composition-operation-Set = Σ ( composition-operation-Set hom-set) ( is-associative-composition-operation-Set) ``` diff --git a/src/category-theory/dependent-products-of-categories.lagda.md b/src/category-theory/dependent-products-of-categories.lagda.md index d561c2e1c9..e38ad4e422 100644 --- a/src/category-theory/dependent-products-of-categories.lagda.md +++ b/src/category-theory/dependent-products-of-categories.lagda.md @@ -85,10 +85,10 @@ module _ associative-comp-hom-Π-Category = associative-comp-hom-Category Π-Category - associative-composition-structure-Π-Category : - associative-composition-structure-Set hom-set-Π-Category - associative-composition-structure-Π-Category = - associative-composition-structure-Category Π-Category + associative-composition-operation-Π-Category : + associative-composition-operation-Set hom-set-Π-Category + associative-composition-operation-Π-Category = + associative-composition-operation-Category Π-Category id-hom-Π-Category : {x : obj-Π-Category} → hom-Π-Category x x diff --git a/src/category-theory/dependent-products-of-precategories.lagda.md b/src/category-theory/dependent-products-of-precategories.lagda.md index b7b4c9f3aa..f1e4630955 100644 --- a/src/category-theory/dependent-products-of-precategories.lagda.md +++ b/src/category-theory/dependent-products-of-precategories.lagda.md @@ -64,10 +64,10 @@ module _ associative-comp-hom-Π-Precategory h g f = eq-htpy (λ i → associative-comp-hom-Precategory (C i) (h i) (g i) (f i)) - associative-composition-structure-Π-Precategory : - associative-composition-structure-Set hom-set-Π-Precategory - pr1 associative-composition-structure-Π-Precategory = comp-hom-Π-Precategory - pr2 associative-composition-structure-Π-Precategory = + associative-composition-operation-Π-Precategory : + associative-composition-operation-Set hom-set-Π-Precategory + pr1 associative-composition-operation-Π-Precategory = comp-hom-Π-Precategory + pr2 associative-composition-operation-Π-Precategory = associative-comp-hom-Π-Precategory id-hom-Π-Precategory : {x : obj-Π-Precategory} → hom-Π-Precategory x x @@ -98,7 +98,7 @@ module _ pr1 Π-Precategory = obj-Π-Precategory pr1 (pr2 Π-Precategory) = hom-set-Π-Precategory pr1 (pr2 (pr2 Π-Precategory)) = - associative-composition-structure-Π-Precategory + associative-composition-operation-Π-Precategory pr2 (pr2 (pr2 Π-Precategory)) = is-unital-Π-Precategory ``` diff --git a/src/category-theory/full-subcategories.lagda.md b/src/category-theory/full-subcategories.lagda.md index 156ebdddbb..fa892f80ae 100644 --- a/src/category-theory/full-subcategories.lagda.md +++ b/src/category-theory/full-subcategories.lagda.md @@ -153,10 +153,10 @@ module _ right-unit-law-comp-hom-Full-Subprecategory ( precategory-Category C) P {x} {y} - associative-composition-structure-Full-Subcategory : - associative-composition-structure-Set hom-set-Full-Subcategory - associative-composition-structure-Full-Subcategory = - associative-composition-structure-Full-Subprecategory + associative-composition-operation-Full-Subcategory : + associative-composition-operation-Set hom-set-Full-Subcategory + associative-composition-operation-Full-Subcategory = + associative-composition-operation-Full-Subprecategory ( precategory-Category C) ( P) diff --git a/src/category-theory/full-subprecategories.lagda.md b/src/category-theory/full-subprecategories.lagda.md index 52f60d2fb1..ec36ef2c67 100644 --- a/src/category-theory/full-subprecategories.lagda.md +++ b/src/category-theory/full-subprecategories.lagda.md @@ -150,11 +150,11 @@ module _ right-unit-law-comp-hom-Full-Subprecategory = right-unit-law-comp-hom-Precategory C - associative-composition-structure-Full-Subprecategory : - associative-composition-structure-Set hom-set-Full-Subprecategory - pr1 associative-composition-structure-Full-Subprecategory {x} {y} {z} = + associative-composition-operation-Full-Subprecategory : + associative-composition-operation-Set hom-set-Full-Subprecategory + pr1 associative-composition-operation-Full-Subprecategory {x} {y} {z} = comp-hom-Full-Subprecategory {x} {y} {z} - pr2 associative-composition-structure-Full-Subprecategory {x} {y} {z} {w} = + pr2 associative-composition-operation-Full-Subprecategory {x} {y} {z} {w} = associative-comp-hom-Full-Subprecategory {x} {y} {z} {w} is-unital-composition-operation-Full-Subprecategory : @@ -172,7 +172,7 @@ module _ pr1 precategory-Full-Subprecategory = obj-Full-Subprecategory C P pr1 (pr2 precategory-Full-Subprecategory) = hom-set-Full-Subprecategory pr1 (pr2 (pr2 precategory-Full-Subprecategory)) = - associative-composition-structure-Full-Subprecategory + associative-composition-operation-Full-Subprecategory pr2 (pr2 (pr2 precategory-Full-Subprecategory)) = is-unital-composition-operation-Full-Subprecategory ``` diff --git a/src/category-theory/function-categories.lagda.md b/src/category-theory/function-categories.lagda.md index b28d881f57..8b6f88c4fa 100644 --- a/src/category-theory/function-categories.lagda.md +++ b/src/category-theory/function-categories.lagda.md @@ -73,10 +73,10 @@ module _ associative-comp-hom-function-Category = associative-comp-hom-Category function-Category - associative-composition-structure-function-Category : - associative-composition-structure-Set hom-set-function-Category - associative-composition-structure-function-Category = - associative-composition-structure-Category function-Category + associative-composition-operation-function-Category : + associative-composition-operation-Set hom-set-function-Category + associative-composition-operation-function-Category = + associative-composition-operation-Category function-Category id-hom-function-Category : {x : obj-function-Category} → hom-function-Category x x diff --git a/src/category-theory/function-precategories.lagda.md b/src/category-theory/function-precategories.lagda.md index b0b43a4590..555e62f21e 100644 --- a/src/category-theory/function-precategories.lagda.md +++ b/src/category-theory/function-precategories.lagda.md @@ -65,10 +65,10 @@ module _ associative-comp-hom-function-Precategory = associative-comp-hom-Precategory function-Precategory - associative-composition-structure-function-Precategory : - associative-composition-structure-Set hom-set-function-Precategory - associative-composition-structure-function-Precategory = - associative-composition-structure-Precategory function-Precategory + associative-composition-operation-function-Precategory : + associative-composition-operation-Set hom-set-function-Precategory + associative-composition-operation-function-Precategory = + associative-composition-operation-Precategory function-Precategory id-hom-function-Precategory : {x : obj-function-Precategory} → hom-function-Precategory x x diff --git a/src/category-theory/nonunital-precategories.lagda.md b/src/category-theory/nonunital-precategories.lagda.md index d3f0960eaf..b9182b7778 100644 --- a/src/category-theory/nonunital-precategories.lagda.md +++ b/src/category-theory/nonunital-precategories.lagda.md @@ -41,7 +41,7 @@ Nonunital-Precategory l1 l2 = Σ ( UU l1) ( λ A → Σ ( A → A → Set l2) - ( associative-composition-structure-Set)) + ( associative-composition-operation-Set)) module _ {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) @@ -61,9 +61,9 @@ module _ is-set-hom-Nonunital-Precategory x y = is-set-type-Set (hom-set-Nonunital-Precategory x y) - associative-composition-structure-Nonunital-Precategory : - associative-composition-structure-Set hom-set-Nonunital-Precategory - associative-composition-structure-Nonunital-Precategory = pr2 (pr2 C) + associative-composition-operation-Nonunital-Precategory : + associative-composition-operation-Set hom-set-Nonunital-Precategory + associative-composition-operation-Nonunital-Precategory = pr2 (pr2 C) comp-hom-Nonunital-Precategory : {x y z : obj-Nonunital-Precategory} → @@ -71,7 +71,7 @@ module _ hom-Nonunital-Precategory x y → hom-Nonunital-Precategory x z comp-hom-Nonunital-Precategory = - pr1 associative-composition-structure-Nonunital-Precategory + pr1 associative-composition-operation-Nonunital-Precategory comp-hom-Nonunital-Precategory' : {x y z : obj-Nonunital-Precategory} → @@ -88,7 +88,7 @@ module _ ( comp-hom-Nonunital-Precategory (comp-hom-Nonunital-Precategory h g) f) = ( comp-hom-Nonunital-Precategory h (comp-hom-Nonunital-Precategory g f)) associative-comp-hom-Nonunital-Precategory = - pr2 associative-composition-structure-Nonunital-Precategory + pr2 associative-composition-operation-Nonunital-Precategory ``` ### The total hom-type of a nonunital precategory diff --git a/src/category-theory/one-object-precategories.lagda.md b/src/category-theory/one-object-precategories.lagda.md index d9f7165fa0..a383d55773 100644 --- a/src/category-theory/one-object-precategories.lagda.md +++ b/src/category-theory/one-object-precategories.lagda.md @@ -94,12 +94,12 @@ module _ {star} {star} {star} {star} = associative-mul-Monoid M - associative-composition-structure-one-object-precategory-Monoid : - associative-composition-structure-Set + associative-composition-operation-one-object-precategory-Monoid : + associative-composition-operation-Set hom-set-one-object-precategory-Monoid - pr1 associative-composition-structure-one-object-precategory-Monoid = + pr1 associative-composition-operation-one-object-precategory-Monoid = comp-hom-one-object-precategory-Monoid - pr2 associative-composition-structure-one-object-precategory-Monoid = + pr2 associative-composition-operation-one-object-precategory-Monoid = associative-comp-hom-one-object-precategory-Monoid id-hom-one-object-precategory-Monoid : @@ -140,7 +140,7 @@ module _ pr1 (pr2 precategory-one-object-precategory-Monoid) = hom-set-one-object-precategory-Monoid pr1 (pr2 (pr2 precategory-one-object-precategory-Monoid)) = - associative-composition-structure-one-object-precategory-Monoid + associative-composition-operation-one-object-precategory-Monoid pr2 (pr2 (pr2 precategory-one-object-precategory-Monoid)) = is-unital-composition-operation-one-object-precategory-Monoid diff --git a/src/category-theory/precategories.lagda.md b/src/category-theory/precategories.lagda.md index 4d1881b10d..3cc6262598 100644 --- a/src/category-theory/precategories.lagda.md +++ b/src/category-theory/precategories.lagda.md @@ -53,7 +53,7 @@ Precategory l1 l2 = ( λ A → Σ ( A → A → Set l2) ( λ hom-set → - Σ ( associative-composition-structure-Set hom-set) + Σ ( associative-composition-operation-Set hom-set) ( λ (comp-hom , assoc-comp) → is-unital-composition-operation-Set hom-set comp-hom))) @@ -74,16 +74,16 @@ module _ (x y : obj-Precategory) → is-set (hom-Precategory x y) is-set-hom-Precategory x y = is-set-type-Set (hom-set-Precategory x y) - associative-composition-structure-Precategory : - associative-composition-structure-Set hom-set-Precategory - associative-composition-structure-Precategory = pr1 (pr2 (pr2 C)) + associative-composition-operation-Precategory : + associative-composition-operation-Set hom-set-Precategory + associative-composition-operation-Precategory = pr1 (pr2 (pr2 C)) comp-hom-Precategory : {x y z : obj-Precategory} → hom-Precategory y z → hom-Precategory x y → hom-Precategory x z - comp-hom-Precategory = pr1 associative-composition-structure-Precategory + comp-hom-Precategory = pr1 associative-composition-operation-Precategory comp-hom-Precategory' : {x y z : obj-Precategory} → @@ -100,7 +100,7 @@ module _ ( comp-hom-Precategory (comp-hom-Precategory h g) f) = ( comp-hom-Precategory h (comp-hom-Precategory g f)) associative-comp-hom-Precategory = - pr2 associative-composition-structure-Precategory + pr2 associative-composition-operation-Precategory is-unital-composition-operation-Precategory : is-unital-composition-operation-Set diff --git a/src/category-theory/precategory-of-functors.lagda.md b/src/category-theory/precategory-of-functors.lagda.md index f782cb9838..93f07a9850 100644 --- a/src/category-theory/precategory-of-functors.lagda.md +++ b/src/category-theory/precategory-of-functors.lagda.md @@ -67,13 +67,13 @@ module _ associative-comp-natural-transformation-Precategory C D F G H I f g h - associative-composition-structure-functor-precategory-Precategory : - associative-composition-structure-Set + associative-composition-operation-functor-precategory-Precategory : + associative-composition-operation-Set ( natural-transformation-set-Precategory C D) - pr1 associative-composition-structure-functor-precategory-Precategory + pr1 associative-composition-operation-functor-precategory-Precategory {F} {G} {H} = comp-hom-functor-precategory-Precategory {F} {G} {H} - pr2 associative-composition-structure-functor-precategory-Precategory + pr2 associative-composition-operation-functor-precategory-Precategory {F} {G} {H} {I} = associative-comp-hom-functor-precategory-Precategory {F} {G} {H} {I} @@ -121,7 +121,7 @@ module _ pr1 (pr2 functor-precategory-Precategory) = natural-transformation-set-Precategory C D pr1 (pr2 (pr2 functor-precategory-Precategory)) = - associative-composition-structure-functor-precategory-Precategory + associative-composition-operation-functor-precategory-Precategory pr2 (pr2 (pr2 functor-precategory-Precategory)) = is-unital-composition-operation-functor-precategory-Precategory ``` diff --git a/src/category-theory/precategory-of-maps-precategories.lagda.md b/src/category-theory/precategory-of-maps-precategories.lagda.md index ef1526ec76..44a1bb7ef5 100644 --- a/src/category-theory/precategory-of-maps-precategories.lagda.md +++ b/src/category-theory/precategory-of-maps-precategories.lagda.md @@ -67,13 +67,13 @@ module _ associative-comp-natural-transformation-map-Precategory C D F G H I f g h - associative-composition-structure-map-precategory-Precategory : - associative-composition-structure-Set + associative-composition-operation-map-precategory-Precategory : + associative-composition-operation-Set ( natural-transformation-map-set-Precategory C D) - pr1 associative-composition-structure-map-precategory-Precategory + pr1 associative-composition-operation-map-precategory-Precategory {F} {G} {H} = comp-hom-map-precategory-Precategory {F} {G} {H} - pr2 associative-composition-structure-map-precategory-Precategory + pr2 associative-composition-operation-map-precategory-Precategory {F} {G} {H} {I} = associative-comp-hom-map-precategory-Precategory {F} {G} {H} {I} @@ -121,7 +121,7 @@ module _ pr1 (pr2 map-precategory-Precategory) = natural-transformation-map-set-Precategory C D pr1 (pr2 (pr2 map-precategory-Precategory)) = - associative-composition-structure-map-precategory-Precategory + associative-composition-operation-map-precategory-Precategory pr2 (pr2 (pr2 map-precategory-Precategory)) = is-unital-composition-operation-map-precategory-Precategory ``` diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md index a8058579cc..26b7fb07bf 100644 --- a/src/category-theory/preunivalent-categories.lagda.md +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -104,10 +104,10 @@ module _ associative-comp-hom-Preunivalent-Category = associative-comp-hom-Precategory precategory-Preunivalent-Category - associative-composition-structure-Preunivalent-Category : - associative-composition-structure-Set hom-set-Preunivalent-Category - associative-composition-structure-Preunivalent-Category = - associative-composition-structure-Precategory + associative-composition-operation-Preunivalent-Category : + associative-composition-operation-Set hom-set-Preunivalent-Category + associative-composition-operation-Preunivalent-Category = + associative-composition-operation-Precategory ( precategory-Preunivalent-Category) id-hom-Preunivalent-Category : diff --git a/src/category-theory/representing-arrow-category.lagda.md b/src/category-theory/representing-arrow-category.lagda.md index 7541939eb0..faae278e8e 100644 --- a/src/category-theory/representing-arrow-category.lagda.md +++ b/src/category-theory/representing-arrow-category.lagda.md @@ -72,11 +72,11 @@ associative-comp-hom-representing-arrow : associative-comp-hom-representing-arrow {true} {true} {true} {true} h g f = refl associative-comp-hom-representing-arrow {false} h g f = refl -associative-composition-structure-representing-arrow : - associative-composition-structure-Set hom-set-representing-arrow -pr1 associative-composition-structure-representing-arrow {x} = +associative-composition-operation-representing-arrow : + associative-composition-operation-Set hom-set-representing-arrow +pr1 associative-composition-operation-representing-arrow {x} = comp-hom-representing-arrow {x} -pr2 associative-composition-structure-representing-arrow = +pr2 associative-composition-operation-representing-arrow = associative-comp-hom-representing-arrow id-hom-representing-arrow : @@ -113,7 +113,7 @@ representing-arrow-Precategory : Precategory lzero lzero pr1 representing-arrow-Precategory = obj-representing-arrow pr1 (pr2 representing-arrow-Precategory) = hom-set-representing-arrow pr1 (pr2 (pr2 representing-arrow-Precategory)) = - associative-composition-structure-representing-arrow + associative-composition-operation-representing-arrow pr2 (pr2 (pr2 representing-arrow-Precategory)) = is-unital-composition-operation-representing-arrow ``` diff --git a/src/category-theory/simplex-category.lagda.md b/src/category-theory/simplex-category.lagda.md index 95c235b7e1..834fd941d9 100644 --- a/src/category-theory/simplex-category.lagda.md +++ b/src/category-theory/simplex-category.lagda.md @@ -82,11 +82,11 @@ associative-comp-hom-simplex-Category {n} {m} {r} {s} = ( Fin-Poset (succ-ℕ r)) ( Fin-Poset (succ-ℕ s)) -associative-composition-structure-simplex-Category : - associative-composition-structure-Set hom-set-simplex-Category -pr1 associative-composition-structure-simplex-Category {n} {m} {r} = +associative-composition-operation-simplex-Category : + associative-composition-operation-Set hom-set-simplex-Category +pr1 associative-composition-operation-simplex-Category {n} {m} {r} = comp-hom-simplex-Category {n} {m} {r} -pr2 associative-composition-structure-simplex-Category {n} {m} {r} {s} = +pr2 associative-composition-operation-simplex-Category {n} {m} {r} {s} = associative-comp-hom-simplex-Category {n} {m} {r} {s} id-hom-simplex-Category : (n : obj-simplex-Category) → hom-simplex-Category n n @@ -118,7 +118,7 @@ simplex-Precategory : Precategory lzero lzero pr1 simplex-Precategory = obj-simplex-Category pr1 (pr2 simplex-Precategory) = hom-set-simplex-Category pr1 (pr2 (pr2 simplex-Precategory)) = - associative-composition-structure-simplex-Category + associative-composition-operation-simplex-Category pr2 (pr2 (pr2 simplex-Precategory)) = is-unital-composition-operation-simplex-Category ``` diff --git a/src/category-theory/strict-categories.lagda.md b/src/category-theory/strict-categories.lagda.md index 4626f99d53..900a64d2af 100644 --- a/src/category-theory/strict-categories.lagda.md +++ b/src/category-theory/strict-categories.lagda.md @@ -86,10 +86,10 @@ module _ associative-comp-hom-Strict-Category = associative-comp-hom-Precategory precategory-Strict-Category - associative-composition-structure-Strict-Category : - associative-composition-structure-Set hom-set-Strict-Category - associative-composition-structure-Strict-Category = - associative-composition-structure-Precategory precategory-Strict-Category + associative-composition-operation-Strict-Category : + associative-composition-operation-Set hom-set-Strict-Category + associative-composition-operation-Strict-Category = + associative-composition-operation-Precategory precategory-Strict-Category id-hom-Strict-Category : {x : obj-Strict-Category} → hom-Strict-Category x x id-hom-Strict-Category = id-hom-Precategory precategory-Strict-Category @@ -152,7 +152,7 @@ postcomp-hom-Strict-Category C = postcomp-hom-Precategory (precategory-Strict-Category C) ``` -### Equalities give rise to homomorphisms +### Equalities induce morphisms ```agda module _ diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index 975e39a8a5..03d630e53d 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -260,10 +260,10 @@ module _ right-unit-law-comp-hom-Subcategory = right-unit-law-comp-hom-Subprecategory (precategory-Category C) P - associative-composition-structure-Subcategory : - associative-composition-structure-Set hom-set-Subcategory - associative-composition-structure-Subcategory = - associative-composition-structure-Subprecategory (precategory-Category C) P + associative-composition-operation-Subcategory : + associative-composition-operation-Set hom-set-Subcategory + associative-composition-operation-Subcategory = + associative-composition-operation-Subprecategory (precategory-Category C) P is-unital-composition-operation-Subcategory : is-unital-composition-operation-Set diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index 1cbf2dc7b1..04474f07e2 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -335,11 +335,11 @@ module _ ( right-unit-law-comp-hom-Precategory C ( inclusion-hom-Subprecategory C P x y f)) - associative-composition-structure-Subprecategory : - associative-composition-structure-Set hom-set-Subprecategory - pr1 associative-composition-structure-Subprecategory {x} {y} {z} = + associative-composition-operation-Subprecategory : + associative-composition-operation-Set hom-set-Subprecategory + pr1 associative-composition-operation-Subprecategory {x} {y} {z} = comp-hom-Subprecategory {x} {y} {z} - pr2 associative-composition-structure-Subprecategory {x} {y} {z} {w} = + pr2 associative-composition-operation-Subprecategory {x} {y} {z} {w} = associative-comp-hom-Subprecategory {x} {y} {z} {w} is-unital-composition-operation-Subprecategory : @@ -357,7 +357,7 @@ module _ pr1 precategory-Subprecategory = obj-Subprecategory C P pr1 (pr2 precategory-Subprecategory) = hom-set-Subprecategory pr1 (pr2 (pr2 precategory-Subprecategory)) = - associative-composition-structure-Subprecategory + associative-composition-operation-Subprecategory pr2 (pr2 (pr2 precategory-Subprecategory)) = is-unital-composition-operation-Subprecategory ``` From 4b5f36e96743cd0f6b6a0641ec90c52d56826c9c Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 12:28:00 +0200 Subject: [PATCH 69/89] no more homo(morphisms) --- src/category-theory/full-large-subprecategories.lagda.md | 4 ++-- src/category-theory/isomorphisms-in-categories.lagda.md | 2 +- src/category-theory/isomorphisms-in-precategories.lagda.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/category-theory/full-large-subprecategories.lagda.md b/src/category-theory/full-large-subprecategories.lagda.md index 4687c63eba..de18f19d66 100644 --- a/src/category-theory/full-large-subprecategories.lagda.md +++ b/src/category-theory/full-large-subprecategories.lagda.md @@ -33,8 +33,8 @@ family of [subtypes](foundation.subtypes.md) of the types Alternatively, we say that a [large subcategory](category-theory.large-subcategories.md) **is full** if for -every two objects `X` and `Y` in the subcategory, the subtype of homomorphisms -from `X` to `Y` in the subcategory is [full](foundation.full-subtypes.md). +every two objects `X` and `Y` in the subcategory, the subtype of morphisms from +`X` to `Y` in the subcategory is [full](foundation.full-subtypes.md). Note that full large subprecategories are not assumed to be closed under isomorphisms. diff --git a/src/category-theory/isomorphisms-in-categories.lagda.md b/src/category-theory/isomorphisms-in-categories.lagda.md index 1bbfd370db..fad18a4392 100644 --- a/src/category-theory/isomorphisms-in-categories.lagda.md +++ b/src/category-theory/isomorphisms-in-categories.lagda.md @@ -565,7 +565,7 @@ module _ iso-prop-Category = iso-prop-Precategory (precategory-Category C) ``` -### When `hom x y` and `hom y x` are propositions, it suffices to provide a homomorphism in each direction to construct an isomorphism +### When `hom x y` and `hom y x` are propositions, it suffices to provide a morphism in each direction to construct an isomorphism ```agda module _ diff --git a/src/category-theory/isomorphisms-in-precategories.lagda.md b/src/category-theory/isomorphisms-in-precategories.lagda.md index c5a843dd8c..70ac5e0d07 100644 --- a/src/category-theory/isomorphisms-in-precategories.lagda.md +++ b/src/category-theory/isomorphisms-in-precategories.lagda.md @@ -696,7 +696,7 @@ module _ is-prop-iso-Precategory is-prop-hom-C-x-y ``` -### When `hom x y` and `hom y x` are propositions, it suffices to provide a homomorphism in each direction to construct an isomorphism +### When `hom x y` and `hom y x` are propositions, it suffices to provide a morphism in each direction to construct an isomorphism ```agda module _ From b91179f584ec903e07418a088300ef81d06dfad2 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 12:33:53 +0200 Subject: [PATCH 70/89] some headers categories and precategories --- src/category-theory/categories.lagda.md | 8 +- src/category-theory/precategories.lagda.md | 4 +- .../strict-categories.lagda.md | 170 ------------------ 3 files changed, 10 insertions(+), 172 deletions(-) delete mode 100644 src/category-theory/strict-categories.lagda.md diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index b5c92e35e2..0cf48a34a4 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -36,7 +36,9 @@ them, by the J-rule. A precategory is a category if this function, called being a category is a [proposition](foundation-core.propositions.md) since `is-equiv` is a proposition. -## Definition +## Definitions + +### The predicate of being a category on precategories ```agda module _ @@ -54,7 +56,11 @@ module _ is-category-Precategory : UU (l1 ⊔ l2) is-category-Precategory = type-Prop is-category-prop-Precategory +``` +### The type of categories + +```agda Category : (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2) Category l1 l2 = Σ (Precategory l1 l2) is-category-Precategory diff --git a/src/category-theory/precategories.lagda.md b/src/category-theory/precategories.lagda.md index 3cc6262598..852c646b4d 100644 --- a/src/category-theory/precategories.lagda.md +++ b/src/category-theory/precategories.lagda.md @@ -43,7 +43,9 @@ The reason this is called a *pre*category and not a category in Homotopy Type Theory is that we want to reserve that name for precategories where the identities between the objects are exactly the isomorphisms. -## Definition +## Definitions + +### The type of precategories ```agda Precategory : diff --git a/src/category-theory/strict-categories.lagda.md b/src/category-theory/strict-categories.lagda.md deleted file mode 100644 index 900a64d2af..0000000000 --- a/src/category-theory/strict-categories.lagda.md +++ /dev/null @@ -1,170 +0,0 @@ -# Strict categories - -```agda -module category-theory.strict-categories where -``` - -
Imports - -```agda -open import category-theory.composition-operations-on-binary-families-of-sets -open import category-theory.isomorphisms-in-precategories -open import category-theory.nonunital-precategories -open import category-theory.precategories -open import category-theory.preunivalent-categories - -open import foundation.1-types -open import foundation.dependent-pair-types -open import foundation.equivalences -open import foundation.identity-types -open import foundation.injective-maps -open import foundation.propositions -open import foundation.sets -open import foundation.universe-levels -``` - -
- -## Idea - -A **strict category** in Homotopy Type Theory is a -[precategory](category-theory.precategories.md) for which the type of objects -form a [set](foundation-core.sets.md). In particular, being a strict category is -a [proposition](foundation-core.propositions.md) since being a set is a -proposition. - -## Definition - -```agda -module _ - {l1 l2 : Level} (C : Precategory l1 l2) - where - - is-strict-category-prop-Precategory : Prop l1 - is-strict-category-prop-Precategory = - is-set-Prop (obj-Precategory C) - - is-strict-category-Precategory : UU l1 - is-strict-category-Precategory = type-Prop is-strict-category-prop-Precategory - -Strict-Category : (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2) -Strict-Category l1 l2 = Σ (Precategory l1 l2) is-strict-category-Precategory - -module _ - {l1 l2 : Level} (C : Strict-Category l1 l2) - where - - precategory-Strict-Category : Precategory l1 l2 - precategory-Strict-Category = pr1 C - - obj-Strict-Category : UU l1 - obj-Strict-Category = obj-Precategory precategory-Strict-Category - - hom-set-Strict-Category : obj-Strict-Category → obj-Strict-Category → Set l2 - hom-set-Strict-Category = hom-set-Precategory precategory-Strict-Category - - hom-Strict-Category : obj-Strict-Category → obj-Strict-Category → UU l2 - hom-Strict-Category = hom-Precategory precategory-Strict-Category - - is-set-hom-Strict-Category : - (x y : obj-Strict-Category) → is-set (hom-Strict-Category x y) - is-set-hom-Strict-Category = - is-set-hom-Precategory precategory-Strict-Category - - comp-hom-Strict-Category : - {x y z : obj-Strict-Category} → - hom-Strict-Category y z → hom-Strict-Category x y → hom-Strict-Category x z - comp-hom-Strict-Category = comp-hom-Precategory precategory-Strict-Category - - associative-comp-hom-Strict-Category : - {x y z w : obj-Strict-Category} - (h : hom-Strict-Category z w) - (g : hom-Strict-Category y z) - (f : hom-Strict-Category x y) → - comp-hom-Strict-Category (comp-hom-Strict-Category h g) f = - comp-hom-Strict-Category h (comp-hom-Strict-Category g f) - associative-comp-hom-Strict-Category = - associative-comp-hom-Precategory precategory-Strict-Category - - associative-composition-operation-Strict-Category : - associative-composition-operation-Set hom-set-Strict-Category - associative-composition-operation-Strict-Category = - associative-composition-operation-Precategory precategory-Strict-Category - - id-hom-Strict-Category : {x : obj-Strict-Category} → hom-Strict-Category x x - id-hom-Strict-Category = id-hom-Precategory precategory-Strict-Category - - left-unit-law-comp-hom-Strict-Category : - {x y : obj-Strict-Category} (f : hom-Strict-Category x y) → - comp-hom-Strict-Category id-hom-Strict-Category f = f - left-unit-law-comp-hom-Strict-Category = - left-unit-law-comp-hom-Precategory precategory-Strict-Category - - right-unit-law-comp-hom-Strict-Category : - {x y : obj-Strict-Category} (f : hom-Strict-Category x y) → - comp-hom-Strict-Category f id-hom-Strict-Category = f - right-unit-law-comp-hom-Strict-Category = - right-unit-law-comp-hom-Precategory precategory-Strict-Category - - is-unital-composition-operation-Strict-Category : - is-unital-composition-operation-Set - hom-set-Strict-Category - comp-hom-Strict-Category - is-unital-composition-operation-Strict-Category = - is-unital-composition-operation-Precategory precategory-Strict-Category - - is-strict-category-Strict-Category : - is-strict-category-Precategory precategory-Strict-Category - is-strict-category-Strict-Category = pr2 C -``` - -### The underlying nonunital precategory of a strict category - -```agda -module _ - {l1 l2 : Level} (C : Strict-Category l1 l2) - where - - nonunital-precategory-Strict-Category : Nonunital-Precategory l1 l2 - nonunital-precategory-Strict-Category = - nonunital-precategory-Precategory (precategory-Strict-Category C) -``` - -### Precomposition by a morphism - -```agda -precomp-hom-Strict-Category : - {l1 l2 : Level} (C : Strict-Category l1 l2) {x y : obj-Strict-Category C} - (f : hom-Strict-Category C x y) (z : obj-Strict-Category C) → - hom-Strict-Category C y z → hom-Strict-Category C x z -precomp-hom-Strict-Category C = - precomp-hom-Precategory (precategory-Strict-Category C) -``` - -### Postcomposition by a morphism - -```agda -postcomp-hom-Strict-Category : - {l1 l2 : Level} (C : Strict-Category l1 l2) {x y : obj-Strict-Category C} - (f : hom-Strict-Category C x y) (z : obj-Strict-Category C) → - hom-Strict-Category C z x → hom-Strict-Category C z y -postcomp-hom-Strict-Category C = - postcomp-hom-Precategory (precategory-Strict-Category C) -``` - -### Equalities induce morphisms - -```agda -module _ - {l1 l2 : Level} (C : Strict-Category l1 l2) - where - - hom-eq-Strict-Category : - (x y : obj-Strict-Category C) → x = y → hom-Strict-Category C x y - hom-eq-Strict-Category = hom-eq-Precategory (precategory-Strict-Category C) - - hom-inv-eq-Strict-Category : - (x y : obj-Strict-Category C) → x = y → hom-Strict-Category C y x - hom-inv-eq-Strict-Category = - hom-inv-eq-Precategory (precategory-Strict-Category C) -``` From 37cb168beaced133c480e073433a50534cd34137 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 12:40:29 +0200 Subject: [PATCH 71/89] The predicate on a composition operation on a binary family of sets of defining a precategory --- ...perations-on-binary-families-of-sets.lagda.md | 6 +++--- src/category-theory/precategories.lagda.md | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md b/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md index 35985eb3e8..cce08daaf8 100644 --- a/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md +++ b/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md @@ -89,8 +89,8 @@ module _ (hom-set : A → A → Set l2) (comp-hom : composition-operation-Set hom-set) where - associativity-prop-composition-operation-Set : Prop (l1 ⊔ l2) - associativity-prop-composition-operation-Set = + is-associative-prop-composition-operation-Set : Prop (l1 ⊔ l2) + is-associative-prop-composition-operation-Set = Π-Prop' A ( λ x → Π-Prop' A @@ -116,7 +116,7 @@ module _ is-prop-is-associative-composition-operation-Set : is-prop (is-associative-composition-operation-Set hom-set comp-hom) is-prop-is-associative-composition-operation-Set = - is-prop-type-Prop associativity-prop-composition-operation-Set + is-prop-type-Prop is-associative-prop-composition-operation-Set ``` ### Being unital is a property of composition operations in sets diff --git a/src/category-theory/precategories.lagda.md b/src/category-theory/precategories.lagda.md index 852c646b4d..14239c2e7e 100644 --- a/src/category-theory/precategories.lagda.md +++ b/src/category-theory/precategories.lagda.md @@ -45,6 +45,22 @@ identities between the objects are exactly the isomorphisms. ## Definitions +### The predicate on a composition operation on a binary family of sets of defining a precategory + +```agda +module _ + {l1 l2 : Level} {A : UU l1} + (hom-set : A → A → Set l2) + (comp-hom : composition-operation-Set hom-set) + where + + is-precategory-prop-composition-operation-Set : Prop (l1 ⊔ l2) + is-precategory-prop-composition-operation-Set = + prod-Prop + ( is-associative-prop-composition-operation-Set hom-set comp-hom) + ( is-unital-prop-composition-operation-Set hom-set comp-hom) +``` + ### The type of precategories ```agda From 1b9848da174f0c7af54477627e86aae8bc5ba294 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 12:44:27 +0200 Subject: [PATCH 72/89] `composition-operation-(binary-family)-Set` --- .../augmented-simplex-category.lagda.md | 5 +- src/category-theory/categories.lagda.md | 6 +- ...ations-on-binary-families-of-sets.lagda.md | 69 ++++++++++--------- .../dependent-products-of-categories.lagda.md | 6 +- ...pendent-products-of-precategories.lagda.md | 4 +- .../full-subcategories.lagda.md | 4 +- .../full-subprecategories.lagda.md | 5 +- .../function-categories.lagda.md | 5 +- .../function-precategories.lagda.md | 5 +- .../nonunital-precategories.lagda.md | 13 ++-- .../one-object-precategories.lagda.md | 4 +- src/category-theory/precategories.lagda.md | 22 +++--- .../precategory-of-functors.lagda.md | 4 +- ...precategory-of-maps-precategories.lagda.md | 4 +- .../preunivalent-categories.lagda.md | 5 +- .../representing-arrow-category.lagda.md | 4 +- src/category-theory/simplex-category.lagda.md | 4 +- src/category-theory/subcategories.lagda.md | 4 +- src/category-theory/subprecategories.lagda.md | 4 +- 19 files changed, 98 insertions(+), 79 deletions(-) diff --git a/src/category-theory/augmented-simplex-category.lagda.md b/src/category-theory/augmented-simplex-category.lagda.md index 769dcac48d..40bae99786 100644 --- a/src/category-theory/augmented-simplex-category.lagda.md +++ b/src/category-theory/augmented-simplex-category.lagda.md @@ -82,7 +82,8 @@ associative-comp-hom-augmented-simplex-Category {n} {m} {r} {s} = ( Fin-Poset s) associative-composition-operation-augmented-simplex-Category : - associative-composition-operation-Set hom-set-augmented-simplex-Category + associative-composition-operation-binary-family-Set + hom-set-augmented-simplex-Category pr1 associative-composition-operation-augmented-simplex-Category {n} {m} {r} = comp-hom-augmented-simplex-Category {n} {m} {r} pr2 @@ -114,7 +115,7 @@ right-unit-law-comp-hom-augmented-simplex-Category {n} {m} = right-unit-law-comp-hom-Poset (Fin-Poset n) (Fin-Poset m) is-unital-composition-operation-augmented-simplex-Category : - is-unital-composition-operation-Set + is-unital-composition-operation-binary-family-Set ( hom-set-augmented-simplex-Category) ( λ {n} {m} {r} → comp-hom-augmented-simplex-Category {n} {m} {r}) pr1 is-unital-composition-operation-augmented-simplex-Category = diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index 0cf48a34a4..230599011a 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -100,7 +100,7 @@ module _ associative-comp-hom-Precategory precategory-Category associative-composition-operation-Category : - associative-composition-operation-Set hom-set-Category + associative-composition-operation-binary-family-Set hom-set-Category associative-composition-operation-Category = associative-composition-operation-Precategory precategory-Category @@ -120,7 +120,9 @@ module _ right-unit-law-comp-hom-Precategory precategory-Category is-unital-composition-operation-Category : - is-unital-composition-operation-Set hom-set-Category comp-hom-Category + is-unital-composition-operation-binary-family-Set + hom-set-Category + comp-hom-Category is-unital-composition-operation-Category = is-unital-composition-operation-Precategory precategory-Category diff --git a/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md b/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md index cce08daaf8..181bdddd25 100644 --- a/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md +++ b/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md @@ -35,8 +35,8 @@ module _ {l1 l2 : Level} {A : UU l1} (hom-set : A → A → Set l2) where - composition-operation-Set : UU (l1 ⊔ l2) - composition-operation-Set = + composition-operation-binary-family-Set : UU (l1 ⊔ l2) + composition-operation-binary-family-Set = {x y z : A} → type-Set (hom-set y z) → type-Set (hom-set x y) → type-Set (hom-set x z) ``` @@ -48,19 +48,19 @@ module _ {l1 l2 : Level} {A : UU l1} (hom-set : A → A → Set l2) where - is-associative-composition-operation-Set : - composition-operation-Set hom-set → UU (l1 ⊔ l2) - is-associative-composition-operation-Set comp-hom = + is-associative-composition-operation-binary-family-Set : + composition-operation-binary-family-Set hom-set → UU (l1 ⊔ l2) + is-associative-composition-operation-binary-family-Set comp-hom = {x y z w : A} (h : type-Set (hom-set z w)) (g : type-Set (hom-set y z)) (f : type-Set (hom-set x y)) → comp-hom (comp-hom h g) f = comp-hom h (comp-hom g f) - associative-composition-operation-Set : UU (l1 ⊔ l2) - associative-composition-operation-Set = - Σ ( composition-operation-Set hom-set) - ( is-associative-composition-operation-Set) + associative-composition-operation-binary-family-Set : UU (l1 ⊔ l2) + associative-composition-operation-binary-family-Set = + Σ ( composition-operation-binary-family-Set hom-set) + ( is-associative-composition-operation-binary-family-Set) ``` ### Unital composition operations @@ -70,9 +70,9 @@ module _ {l1 l2 : Level} {A : UU l1} (hom-set : A → A → Set l2) where - is-unital-composition-operation-Set : - composition-operation-Set hom-set → UU (l1 ⊔ l2) - is-unital-composition-operation-Set comp-hom = + is-unital-composition-operation-binary-family-Set : + composition-operation-binary-family-Set hom-set → UU (l1 ⊔ l2) + is-unital-composition-operation-binary-family-Set comp-hom = Σ ( (x : A) → type-Set (hom-set x x)) ( λ e → ( {x y : A} (f : type-Set (hom-set x y)) → comp-hom (e y) f = f) × @@ -86,11 +86,12 @@ module _ ```agda module _ {l1 l2 : Level} {A : UU l1} - (hom-set : A → A → Set l2) (comp-hom : composition-operation-Set hom-set) + (hom-set : A → A → Set l2) + (comp-hom : composition-operation-binary-family-Set hom-set) where - is-associative-prop-composition-operation-Set : Prop (l1 ⊔ l2) - is-associative-prop-composition-operation-Set = + is-associative-prop-composition-operation-binary-family-Set : Prop (l1 ⊔ l2) + is-associative-prop-composition-operation-binary-family-Set = Π-Prop' A ( λ x → Π-Prop' A @@ -113,10 +114,12 @@ module _ ( comp-hom (comp-hom h g) f) ( comp-hom h (comp-hom g f))))))))) - is-prop-is-associative-composition-operation-Set : - is-prop (is-associative-composition-operation-Set hom-set comp-hom) - is-prop-is-associative-composition-operation-Set = - is-prop-type-Prop is-associative-prop-composition-operation-Set + is-prop-is-associative-composition-operation-binary-family-Set : + is-prop + ( is-associative-composition-operation-binary-family-Set hom-set comp-hom) + is-prop-is-associative-composition-operation-binary-family-Set = + is-prop-type-Prop + is-associative-prop-composition-operation-binary-family-Set ``` ### Being unital is a property of composition operations in sets @@ -132,13 +135,14 @@ the unit laws we have the following chain of equalities: module _ {l1 l2 : Level} {A : UU l1} (hom-set : A → A → Set l2) - ( comp-hom : composition-operation-Set hom-set) + ( comp-hom : composition-operation-binary-family-Set hom-set) where abstract - all-elements-equal-is-unital-composition-operation-Set : - all-elements-equal (is-unital-composition-operation-Set hom-set comp-hom) - all-elements-equal-is-unital-composition-operation-Set + all-elements-equal-is-unital-composition-operation-binary-family-Set : + all-elements-equal + ( is-unital-composition-operation-binary-family-Set hom-set comp-hom) + all-elements-equal-is-unital-composition-operation-binary-family-Set ( e , left-unit-law-e , right-unit-law-e) ( e' , left-unit-law-e' , right-unit-law-e') = eq-type-subtype @@ -161,15 +165,16 @@ module _ ( eq-htpy ( λ x → inv (left-unit-law-e' (e x)) ∙ right-unit-law-e (e' x))) - is-prop-is-unital-composition-operation-Set : - is-prop (is-unital-composition-operation-Set hom-set comp-hom) - is-prop-is-unital-composition-operation-Set = + is-prop-is-unital-composition-operation-binary-family-Set : + is-prop + ( is-unital-composition-operation-binary-family-Set hom-set comp-hom) + is-prop-is-unital-composition-operation-binary-family-Set = is-prop-all-elements-equal - all-elements-equal-is-unital-composition-operation-Set + all-elements-equal-is-unital-composition-operation-binary-family-Set - is-unital-prop-composition-operation-Set : Prop (l1 ⊔ l2) - pr1 is-unital-prop-composition-operation-Set = - is-unital-composition-operation-Set hom-set comp-hom - pr2 is-unital-prop-composition-operation-Set = - is-prop-is-unital-composition-operation-Set + is-unital-prop-composition-operation-binary-family-Set : Prop (l1 ⊔ l2) + pr1 is-unital-prop-composition-operation-binary-family-Set = + is-unital-composition-operation-binary-family-Set hom-set comp-hom + pr2 is-unital-prop-composition-operation-binary-family-Set = + is-prop-is-unital-composition-operation-binary-family-Set ``` diff --git a/src/category-theory/dependent-products-of-categories.lagda.md b/src/category-theory/dependent-products-of-categories.lagda.md index e38ad4e422..a87c5163cc 100644 --- a/src/category-theory/dependent-products-of-categories.lagda.md +++ b/src/category-theory/dependent-products-of-categories.lagda.md @@ -86,7 +86,7 @@ module _ associative-comp-hom-Category Π-Category associative-composition-operation-Π-Category : - associative-composition-operation-Set hom-set-Π-Category + associative-composition-operation-binary-family-Set hom-set-Π-Category associative-composition-operation-Π-Category = associative-composition-operation-Category Π-Category @@ -108,7 +108,9 @@ module _ right-unit-law-comp-hom-Category Π-Category is-unital-Π-Category : - is-unital-composition-operation-Set hom-set-Π-Category comp-hom-Π-Category + is-unital-composition-operation-binary-family-Set + hom-set-Π-Category + comp-hom-Π-Category is-unital-Π-Category = is-unital-composition-operation-Category Π-Category extensionality-obj-Π-Category : diff --git a/src/category-theory/dependent-products-of-precategories.lagda.md b/src/category-theory/dependent-products-of-precategories.lagda.md index f1e4630955..ea88eba29e 100644 --- a/src/category-theory/dependent-products-of-precategories.lagda.md +++ b/src/category-theory/dependent-products-of-precategories.lagda.md @@ -65,7 +65,7 @@ module _ eq-htpy (λ i → associative-comp-hom-Precategory (C i) (h i) (g i) (f i)) associative-composition-operation-Π-Precategory : - associative-composition-operation-Set hom-set-Π-Precategory + associative-composition-operation-binary-family-Set hom-set-Π-Precategory pr1 associative-composition-operation-Π-Precategory = comp-hom-Π-Precategory pr2 associative-composition-operation-Π-Precategory = associative-comp-hom-Π-Precategory @@ -87,7 +87,7 @@ module _ eq-htpy (λ i → right-unit-law-comp-hom-Precategory (C i) (f i)) is-unital-Π-Precategory : - is-unital-composition-operation-Set + is-unital-composition-operation-binary-family-Set hom-set-Π-Precategory comp-hom-Π-Precategory pr1 is-unital-Π-Precategory x = id-hom-Π-Precategory diff --git a/src/category-theory/full-subcategories.lagda.md b/src/category-theory/full-subcategories.lagda.md index fa892f80ae..88519cef6c 100644 --- a/src/category-theory/full-subcategories.lagda.md +++ b/src/category-theory/full-subcategories.lagda.md @@ -154,14 +154,14 @@ module _ ( precategory-Category C) P {x} {y} associative-composition-operation-Full-Subcategory : - associative-composition-operation-Set hom-set-Full-Subcategory + associative-composition-operation-binary-family-Set hom-set-Full-Subcategory associative-composition-operation-Full-Subcategory = associative-composition-operation-Full-Subprecategory ( precategory-Category C) ( P) is-unital-composition-operation-Full-Subcategory : - is-unital-composition-operation-Set + is-unital-composition-operation-binary-family-Set ( hom-set-Full-Subcategory) ( λ {x} {y} {z} → comp-hom-Full-Subcategory {x} {y} {z}) is-unital-composition-operation-Full-Subcategory = diff --git a/src/category-theory/full-subprecategories.lagda.md b/src/category-theory/full-subprecategories.lagda.md index ec36ef2c67..7f6b65345c 100644 --- a/src/category-theory/full-subprecategories.lagda.md +++ b/src/category-theory/full-subprecategories.lagda.md @@ -151,14 +151,15 @@ module _ right-unit-law-comp-hom-Precategory C associative-composition-operation-Full-Subprecategory : - associative-composition-operation-Set hom-set-Full-Subprecategory + associative-composition-operation-binary-family-Set + hom-set-Full-Subprecategory pr1 associative-composition-operation-Full-Subprecategory {x} {y} {z} = comp-hom-Full-Subprecategory {x} {y} {z} pr2 associative-composition-operation-Full-Subprecategory {x} {y} {z} {w} = associative-comp-hom-Full-Subprecategory {x} {y} {z} {w} is-unital-composition-operation-Full-Subprecategory : - is-unital-composition-operation-Set + is-unital-composition-operation-binary-family-Set ( hom-set-Full-Subprecategory) ( λ {x} {y} {z} → comp-hom-Full-Subprecategory {x} {y} {z}) pr1 is-unital-composition-operation-Full-Subprecategory x = diff --git a/src/category-theory/function-categories.lagda.md b/src/category-theory/function-categories.lagda.md index 8b6f88c4fa..273df40fb8 100644 --- a/src/category-theory/function-categories.lagda.md +++ b/src/category-theory/function-categories.lagda.md @@ -74,7 +74,8 @@ module _ associative-comp-hom-Category function-Category associative-composition-operation-function-Category : - associative-composition-operation-Set hom-set-function-Category + associative-composition-operation-binary-family-Set + hom-set-function-Category associative-composition-operation-function-Category = associative-composition-operation-Category function-Category @@ -96,7 +97,7 @@ module _ right-unit-law-comp-hom-Category function-Category is-unital-function-Category : - is-unital-composition-operation-Set + is-unital-composition-operation-binary-family-Set hom-set-function-Category comp-hom-function-Category is-unital-function-Category = diff --git a/src/category-theory/function-precategories.lagda.md b/src/category-theory/function-precategories.lagda.md index 555e62f21e..04cc8abb84 100644 --- a/src/category-theory/function-precategories.lagda.md +++ b/src/category-theory/function-precategories.lagda.md @@ -66,7 +66,8 @@ module _ associative-comp-hom-Precategory function-Precategory associative-composition-operation-function-Precategory : - associative-composition-operation-Set hom-set-function-Precategory + associative-composition-operation-binary-family-Set + hom-set-function-Precategory associative-composition-operation-function-Precategory = associative-composition-operation-Precategory function-Precategory @@ -88,7 +89,7 @@ module _ right-unit-law-comp-hom-Precategory function-Precategory is-unital-function-Precategory : - is-unital-composition-operation-Set + is-unital-composition-operation-binary-family-Set hom-set-function-Precategory comp-hom-function-Precategory is-unital-function-Precategory = diff --git a/src/category-theory/nonunital-precategories.lagda.md b/src/category-theory/nonunital-precategories.lagda.md index b9182b7778..6abf552fae 100644 --- a/src/category-theory/nonunital-precategories.lagda.md +++ b/src/category-theory/nonunital-precategories.lagda.md @@ -41,7 +41,7 @@ Nonunital-Precategory l1 l2 = Σ ( UU l1) ( λ A → Σ ( A → A → Set l2) - ( associative-composition-operation-Set)) + ( associative-composition-operation-binary-family-Set)) module _ {l1 l2 : Level} (C : Nonunital-Precategory l1 l2) @@ -62,7 +62,8 @@ module _ is-set-type-Set (hom-set-Nonunital-Precategory x y) associative-composition-operation-Nonunital-Precategory : - associative-composition-operation-Set hom-set-Nonunital-Precategory + associative-composition-operation-binary-family-Set + hom-set-Nonunital-Precategory associative-composition-operation-Nonunital-Precategory = pr2 (pr2 C) comp-hom-Nonunital-Precategory : @@ -150,23 +151,23 @@ module _ is-unital-Nonunital-Precategory : UU (l1 ⊔ l2) is-unital-Nonunital-Precategory = - is-unital-composition-operation-Set + is-unital-composition-operation-binary-family-Set ( hom-set-Nonunital-Precategory C) ( comp-hom-Nonunital-Precategory C) is-prop-is-unital-Nonunital-Precategory : is-prop - ( is-unital-composition-operation-Set + ( is-unital-composition-operation-binary-family-Set ( hom-set-Nonunital-Precategory C) ( comp-hom-Nonunital-Precategory C)) is-prop-is-unital-Nonunital-Precategory = - is-prop-is-unital-composition-operation-Set + is-prop-is-unital-composition-operation-binary-family-Set ( hom-set-Nonunital-Precategory C) ( comp-hom-Nonunital-Precategory C) is-unital-prop-Nonunital-Precategory : Prop (l1 ⊔ l2) is-unital-prop-Nonunital-Precategory = - is-unital-prop-composition-operation-Set + is-unital-prop-composition-operation-binary-family-Set ( hom-set-Nonunital-Precategory C) ( comp-hom-Nonunital-Precategory C) ``` diff --git a/src/category-theory/one-object-precategories.lagda.md b/src/category-theory/one-object-precategories.lagda.md index a383d55773..4861e6eb1f 100644 --- a/src/category-theory/one-object-precategories.lagda.md +++ b/src/category-theory/one-object-precategories.lagda.md @@ -95,7 +95,7 @@ module _ associative-mul-Monoid M associative-composition-operation-one-object-precategory-Monoid : - associative-composition-operation-Set + associative-composition-operation-binary-family-Set hom-set-one-object-precategory-Monoid pr1 associative-composition-operation-one-object-precategory-Monoid = comp-hom-one-object-precategory-Monoid @@ -125,7 +125,7 @@ module _ right-unit-law-mul-Monoid M is-unital-composition-operation-one-object-precategory-Monoid : - is-unital-composition-operation-Set + is-unital-composition-operation-binary-family-Set hom-set-one-object-precategory-Monoid comp-hom-one-object-precategory-Monoid pr1 is-unital-composition-operation-one-object-precategory-Monoid = diff --git a/src/category-theory/precategories.lagda.md b/src/category-theory/precategories.lagda.md index 14239c2e7e..a37bee1780 100644 --- a/src/category-theory/precategories.lagda.md +++ b/src/category-theory/precategories.lagda.md @@ -51,14 +51,16 @@ identities between the objects are exactly the isomorphisms. module _ {l1 l2 : Level} {A : UU l1} (hom-set : A → A → Set l2) - (comp-hom : composition-operation-Set hom-set) + (comp-hom : composition-operation-binary-family-Set hom-set) where - is-precategory-prop-composition-operation-Set : Prop (l1 ⊔ l2) - is-precategory-prop-composition-operation-Set = + is-precategory-prop-composition-operation-binary-family-Set : Prop (l1 ⊔ l2) + is-precategory-prop-composition-operation-binary-family-Set = prod-Prop - ( is-associative-prop-composition-operation-Set hom-set comp-hom) - ( is-unital-prop-composition-operation-Set hom-set comp-hom) + ( is-associative-prop-composition-operation-binary-family-Set + ( hom-set) + ( comp-hom)) + ( is-unital-prop-composition-operation-binary-family-Set hom-set comp-hom) ``` ### The type of precategories @@ -71,9 +73,11 @@ Precategory l1 l2 = ( λ A → Σ ( A → A → Set l2) ( λ hom-set → - Σ ( associative-composition-operation-Set hom-set) + Σ ( associative-composition-operation-binary-family-Set hom-set) ( λ (comp-hom , assoc-comp) → - is-unital-composition-operation-Set hom-set comp-hom))) + is-unital-composition-operation-binary-family-Set + ( hom-set) + ( comp-hom)))) module _ {l1 l2 : Level} (C : Precategory l1 l2) @@ -93,7 +97,7 @@ module _ is-set-hom-Precategory x y = is-set-type-Set (hom-set-Precategory x y) associative-composition-operation-Precategory : - associative-composition-operation-Set hom-set-Precategory + associative-composition-operation-binary-family-Set hom-set-Precategory associative-composition-operation-Precategory = pr1 (pr2 (pr2 C)) comp-hom-Precategory : @@ -121,7 +125,7 @@ module _ pr2 associative-composition-operation-Precategory is-unital-composition-operation-Precategory : - is-unital-composition-operation-Set + is-unital-composition-operation-binary-family-Set hom-set-Precategory comp-hom-Precategory is-unital-composition-operation-Precategory = pr2 (pr2 (pr2 C)) diff --git a/src/category-theory/precategory-of-functors.lagda.md b/src/category-theory/precategory-of-functors.lagda.md index 93f07a9850..e750055ea6 100644 --- a/src/category-theory/precategory-of-functors.lagda.md +++ b/src/category-theory/precategory-of-functors.lagda.md @@ -68,7 +68,7 @@ module _ C D F G H I f g h associative-composition-operation-functor-precategory-Precategory : - associative-composition-operation-Set + associative-composition-operation-binary-family-Set ( natural-transformation-set-Precategory C D) pr1 associative-composition-operation-functor-precategory-Precategory {F} {G} {H} = @@ -101,7 +101,7 @@ module _ right-unit-law-comp-natural-transformation-Precategory C D F G is-unital-composition-operation-functor-precategory-Precategory : - is-unital-composition-operation-Set + is-unital-composition-operation-binary-family-Set ( natural-transformation-set-Precategory C D) ( λ {F} {G} {H} → comp-hom-functor-precategory-Precategory {F} {G} {H}) pr1 is-unital-composition-operation-functor-precategory-Precategory = diff --git a/src/category-theory/precategory-of-maps-precategories.lagda.md b/src/category-theory/precategory-of-maps-precategories.lagda.md index 44a1bb7ef5..1c5b7ce4df 100644 --- a/src/category-theory/precategory-of-maps-precategories.lagda.md +++ b/src/category-theory/precategory-of-maps-precategories.lagda.md @@ -68,7 +68,7 @@ module _ C D F G H I f g h associative-composition-operation-map-precategory-Precategory : - associative-composition-operation-Set + associative-composition-operation-binary-family-Set ( natural-transformation-map-set-Precategory C D) pr1 associative-composition-operation-map-precategory-Precategory {F} {G} {H} = @@ -101,7 +101,7 @@ module _ right-unit-law-comp-natural-transformation-map-Precategory C D F G is-unital-composition-operation-map-precategory-Precategory : - is-unital-composition-operation-Set + is-unital-composition-operation-binary-family-Set ( natural-transformation-map-set-Precategory C D) ( comp-hom-map-precategory-Precategory) pr1 is-unital-composition-operation-map-precategory-Precategory = diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md index 26b7fb07bf..597bb9ecb7 100644 --- a/src/category-theory/preunivalent-categories.lagda.md +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -105,7 +105,8 @@ module _ associative-comp-hom-Precategory precategory-Preunivalent-Category associative-composition-operation-Preunivalent-Category : - associative-composition-operation-Set hom-set-Preunivalent-Category + associative-composition-operation-binary-family-Set + hom-set-Preunivalent-Category associative-composition-operation-Preunivalent-Category = associative-composition-operation-Precategory ( precategory-Preunivalent-Category) @@ -128,7 +129,7 @@ module _ right-unit-law-comp-hom-Precategory precategory-Preunivalent-Category is-unital-composition-operation-Preunivalent-Category : - is-unital-composition-operation-Set + is-unital-composition-operation-binary-family-Set hom-set-Preunivalent-Category comp-hom-Preunivalent-Category is-unital-composition-operation-Preunivalent-Category = diff --git a/src/category-theory/representing-arrow-category.lagda.md b/src/category-theory/representing-arrow-category.lagda.md index faae278e8e..aa8febbb7d 100644 --- a/src/category-theory/representing-arrow-category.lagda.md +++ b/src/category-theory/representing-arrow-category.lagda.md @@ -73,7 +73,7 @@ associative-comp-hom-representing-arrow {true} {true} {true} {true} h g f = refl associative-comp-hom-representing-arrow {false} h g f = refl associative-composition-operation-representing-arrow : - associative-composition-operation-Set hom-set-representing-arrow + associative-composition-operation-binary-family-Set hom-set-representing-arrow pr1 associative-composition-operation-representing-arrow {x} = comp-hom-representing-arrow {x} pr2 associative-composition-operation-representing-arrow = @@ -99,7 +99,7 @@ right-unit-law-comp-hom-representing-arrow {true} {true} f = refl right-unit-law-comp-hom-representing-arrow {false} f = refl is-unital-composition-operation-representing-arrow : - is-unital-composition-operation-Set + is-unital-composition-operation-binary-family-Set ( hom-set-representing-arrow) ( λ {x} {y} {z} → comp-hom-representing-arrow {x} {y} {z}) pr1 is-unital-composition-operation-representing-arrow x = diff --git a/src/category-theory/simplex-category.lagda.md b/src/category-theory/simplex-category.lagda.md index 834fd941d9..4c01f161a3 100644 --- a/src/category-theory/simplex-category.lagda.md +++ b/src/category-theory/simplex-category.lagda.md @@ -83,7 +83,7 @@ associative-comp-hom-simplex-Category {n} {m} {r} {s} = ( Fin-Poset (succ-ℕ s)) associative-composition-operation-simplex-Category : - associative-composition-operation-Set hom-set-simplex-Category + associative-composition-operation-binary-family-Set hom-set-simplex-Category pr1 associative-composition-operation-simplex-Category {n} {m} {r} = comp-hom-simplex-Category {n} {m} {r} pr2 associative-composition-operation-simplex-Category {n} {m} {r} {s} = @@ -105,7 +105,7 @@ right-unit-law-comp-hom-simplex-Category {n} {m} = right-unit-law-comp-hom-Poset (Fin-Poset (succ-ℕ n)) (Fin-Poset (succ-ℕ m)) is-unital-composition-operation-simplex-Category : - is-unital-composition-operation-Set + is-unital-composition-operation-binary-family-Set ( hom-set-simplex-Category) ( comp-hom-simplex-Category) pr1 is-unital-composition-operation-simplex-Category = id-hom-simplex-Category diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index 03d630e53d..cdf02b9b5e 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -261,12 +261,12 @@ module _ right-unit-law-comp-hom-Subprecategory (precategory-Category C) P associative-composition-operation-Subcategory : - associative-composition-operation-Set hom-set-Subcategory + associative-composition-operation-binary-family-Set hom-set-Subcategory associative-composition-operation-Subcategory = associative-composition-operation-Subprecategory (precategory-Category C) P is-unital-composition-operation-Subcategory : - is-unital-composition-operation-Set + is-unital-composition-operation-binary-family-Set ( hom-set-Subcategory) ( comp-hom-Subcategory) is-unital-composition-operation-Subcategory = diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index 04474f07e2..c5a972b724 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -336,14 +336,14 @@ module _ ( inclusion-hom-Subprecategory C P x y f)) associative-composition-operation-Subprecategory : - associative-composition-operation-Set hom-set-Subprecategory + associative-composition-operation-binary-family-Set hom-set-Subprecategory pr1 associative-composition-operation-Subprecategory {x} {y} {z} = comp-hom-Subprecategory {x} {y} {z} pr2 associative-composition-operation-Subprecategory {x} {y} {z} {w} = associative-comp-hom-Subprecategory {x} {y} {z} {w} is-unital-composition-operation-Subprecategory : - is-unital-composition-operation-Set + is-unital-composition-operation-binary-family-Set ( hom-set-Subprecategory) ( comp-hom-Subprecategory) pr1 is-unital-composition-operation-Subprecategory x = From 4c68f5a9682f818ad2954e2683ecec2c67941018 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 13:11:21 +0200 Subject: [PATCH 73/89] text and references `composition-operations-on-binary-families-of-sets` --- ...ations-on-binary-families-of-sets.lagda.md | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md b/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md index 181bdddd25..e6f87d431d 100644 --- a/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md +++ b/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md @@ -22,9 +22,16 @@ open import foundation.universe-levels ## Idea -A **nonunital precategory** is a [precategory](category-theory.precategories.md) -that may not have identity maps. Such an object may also rightfully be called a -_semiprecategory_. +Given a type `A`, a **composition operation on a binary family of sets** +`hom : A → A → Set ` is a map + +```text + hom y z → hom x y → hom x z. +``` + +For such operations, we can consider +[properties](foundation-core.propositions.md) such as **associativity** and +**unitality**. ## Definition @@ -178,3 +185,10 @@ module _ pr2 is-unital-prop-composition-operation-binary-family-Set = is-prop-is-unital-composition-operation-binary-family-Set ``` + +## See also + +- [Precategories](category-theory.precategories.md) are associative unital + composition operations on binary families of sets. +- [Nonunital precategories](category-theory.precategories.md) are associative + composition operations on binary families of sets. From 9c4d597b5faca8c5b3d8b8a49565d7958969ab2c Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 14:07:57 +0200 Subject: [PATCH 74/89] remove unused imports --- src/category-theory/categories.lagda.md | 1 - src/category-theory/full-large-subcategories.lagda.md | 2 -- src/category-theory/full-large-subprecategories.lagda.md | 1 - src/category-theory/full-subcategories.lagda.md | 4 ---- .../isomorphism-induction-categories.lagda.md | 5 ----- .../isomorphism-induction-precategories.lagda.md | 8 -------- src/category-theory/subcategories.lagda.md | 5 ----- src/foundation/equivalence-induction.lagda.md | 1 - src/foundation/singleton-induction.lagda.md | 1 - src/foundation/subsingleton-induction.lagda.md | 4 ---- 10 files changed, 32 deletions(-) diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index 230599011a..276004df13 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -7,7 +7,6 @@ module category-theory.categories where
Imports ```agda -open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.isomorphisms-in-precategories open import category-theory.nonunital-precategories open import category-theory.precategories diff --git a/src/category-theory/full-large-subcategories.lagda.md b/src/category-theory/full-large-subcategories.lagda.md index 96b78f8d03..42b4cab605 100644 --- a/src/category-theory/full-large-subcategories.lagda.md +++ b/src/category-theory/full-large-subcategories.lagda.md @@ -8,14 +8,12 @@ module category-theory.full-large-subcategories where ```agda open import category-theory.full-large-subprecategories -open import category-theory.isomorphisms-in-large-categories open import category-theory.large-categories open import category-theory.large-precategories open import foundation.identity-types open import foundation.propositions open import foundation.sets -open import foundation.subtypes open import foundation.universe-levels ``` diff --git a/src/category-theory/full-large-subprecategories.lagda.md b/src/category-theory/full-large-subprecategories.lagda.md index de18f19d66..0a0a04fe96 100644 --- a/src/category-theory/full-large-subprecategories.lagda.md +++ b/src/category-theory/full-large-subprecategories.lagda.md @@ -12,7 +12,6 @@ open import category-theory.isomorphisms-in-large-precategories open import category-theory.large-categories open import category-theory.large-precategories -open import foundation.dependent-pair-types open import foundation.fundamental-theorem-of-identity-types open import foundation.identity-types open import foundation.propositions diff --git a/src/category-theory/full-subcategories.lagda.md b/src/category-theory/full-subcategories.lagda.md index 88519cef6c..a6e55047bc 100644 --- a/src/category-theory/full-subcategories.lagda.md +++ b/src/category-theory/full-subcategories.lagda.md @@ -13,15 +13,11 @@ open import category-theory.embeddings-precategories open import category-theory.full-subprecategories open import category-theory.fully-faithful-functors-precategories open import category-theory.functors-categories -open import category-theory.isomorphisms-in-categories -open import category-theory.isomorphisms-in-precategories open import category-theory.maps-categories open import category-theory.precategories open import foundation.dependent-pair-types open import foundation.embeddings -open import foundation.equivalences -open import foundation.function-types open import foundation.identity-types open import foundation.propositions open import foundation.sets diff --git a/src/category-theory/isomorphism-induction-categories.lagda.md b/src/category-theory/isomorphism-induction-categories.lagda.md index bb32407a01..18812edc7c 100644 --- a/src/category-theory/isomorphism-induction-categories.lagda.md +++ b/src/category-theory/isomorphism-induction-categories.lagda.md @@ -10,8 +10,6 @@ module category-theory.isomorphism-induction-categories where open import category-theory.categories open import category-theory.isomorphism-induction-precategories open import category-theory.isomorphisms-in-categories -open import category-theory.isomorphisms-in-precategories -open import category-theory.precategories open import foundation.commuting-triangles-of-maps open import foundation.contractible-maps @@ -19,12 +17,9 @@ open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.equivalences open import foundation.function-types -open import foundation.homotopies open import foundation.identity-systems open import foundation.identity-types open import foundation.sections -open import foundation.singleton-induction -open import foundation.universal-property-dependent-pair-types open import foundation.universal-property-identity-systems open import foundation.universe-levels ``` diff --git a/src/category-theory/isomorphism-induction-precategories.lagda.md b/src/category-theory/isomorphism-induction-precategories.lagda.md index 4a3bbc26c6..fa763c064c 100644 --- a/src/category-theory/isomorphism-induction-precategories.lagda.md +++ b/src/category-theory/isomorphism-induction-precategories.lagda.md @@ -7,24 +7,16 @@ module category-theory.isomorphism-induction-precategories where
Imports ```agda -open import category-theory.categories -open import category-theory.isomorphisms-in-categories open import category-theory.isomorphisms-in-precategories open import category-theory.precategories open import foundation.commuting-triangles-of-maps -open import foundation.contractible-maps open import foundation.contractible-types open import foundation.dependent-pair-types -open import foundation.equivalences open import foundation.function-types -open import foundation.homotopies open import foundation.identity-systems open import foundation.identity-types open import foundation.sections -open import foundation.singleton-induction -open import foundation.universal-property-dependent-pair-types -open import foundation.universal-property-identity-systems open import foundation.universe-levels ``` diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index cdf02b9b5e..f359b8bf77 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -11,20 +11,15 @@ open import category-theory.categories open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.faithful-functors-precategories open import category-theory.functors-precategories -open import category-theory.isomorphism-induction-categories -open import category-theory.isomorphisms-in-categories -open import category-theory.isomorphisms-in-precategories open import category-theory.maps-precategories open import category-theory.precategories open import category-theory.subprecategories open import foundation.dependent-pair-types open import foundation.embeddings -open import foundation.function-types open import foundation.identity-types open import foundation.propositions open import foundation.sets -open import foundation.subsingleton-induction open import foundation.subtypes open import foundation.universe-levels ``` diff --git a/src/foundation/equivalence-induction.lagda.md b/src/foundation/equivalence-induction.lagda.md index 7409d139b8..ed3324cf20 100644 --- a/src/foundation/equivalence-induction.lagda.md +++ b/src/foundation/equivalence-induction.lagda.md @@ -12,7 +12,6 @@ open import foundation.dependent-pair-types open import foundation.identity-systems open import foundation.subuniverses open import foundation.univalence -open import foundation.universal-property-dependent-pair-types open import foundation.universal-property-identity-systems open import foundation.universe-levels diff --git a/src/foundation/singleton-induction.lagda.md b/src/foundation/singleton-induction.lagda.md index 17978917ad..aaf9e87c6e 100644 --- a/src/foundation/singleton-induction.lagda.md +++ b/src/foundation/singleton-induction.lagda.md @@ -15,7 +15,6 @@ open import foundation-core.contractible-types open import foundation-core.function-types open import foundation-core.homotopies open import foundation-core.identity-types -open import foundation-core.propositions open import foundation-core.sections open import foundation-core.transport-along-identifications ``` diff --git a/src/foundation/subsingleton-induction.lagda.md b/src/foundation/subsingleton-induction.lagda.md index fbe5d523ba..1e6b1f0c7d 100644 --- a/src/foundation/subsingleton-induction.lagda.md +++ b/src/foundation/subsingleton-induction.lagda.md @@ -7,18 +7,14 @@ module foundation.subsingleton-induction where
Imports ```agda -open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.singleton-induction open import foundation.universe-levels -open import foundation-core.contractible-types open import foundation-core.function-types open import foundation-core.homotopies -open import foundation-core.identity-types open import foundation-core.propositions open import foundation-core.sections -open import foundation-core.transport-along-identifications ```
From 256f6242ee46f9607c5703ff09f7aa1a39cdcd6e Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 14:15:45 +0200 Subject: [PATCH 75/89] self-review --- src/category-theory/categories.lagda.md | 3 +- ...ations-on-binary-families-of-sets.lagda.md | 51 ++++++++++--------- .../nonunital-precategories.lagda.md | 28 +++++----- src/category-theory/precategories.lagda.md | 16 ++++-- 4 files changed, 52 insertions(+), 46 deletions(-) diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index 276004df13..b77e1efe11 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -7,6 +7,7 @@ module category-theory.categories where
Imports ```agda +open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.isomorphisms-in-precategories open import category-theory.nonunital-precategories open import category-theory.precategories @@ -61,7 +62,7 @@ module _ ```agda Category : (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2) -Category l1 l2 = Σ (Precategory l1 l2) is-category-Precategory +Category l1 l2 = Σ (Precategory l1 l2) (is-category-Precategory) module _ {l1 l2 : Level} (C : Category l1 l2) diff --git a/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md b/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md index e6f87d431d..7bfa225096 100644 --- a/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md +++ b/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md @@ -35,7 +35,7 @@ For such operations, we can consider ## Definition -### Composition operations +### Composition operations in binary families of sets ```agda module _ @@ -48,7 +48,7 @@ module _ type-Set (hom-set y z) → type-Set (hom-set x y) → type-Set (hom-set x z) ``` -### Associative composition operations +### Associative composition operations in binary families of sets ```agda module _ @@ -70,7 +70,7 @@ module _ ( is-associative-composition-operation-binary-family-Set) ``` -### Unital composition operations +### Unital composition operations in binary families of sets ```agda module _ @@ -88,7 +88,7 @@ module _ ## Properties -### Being associative is a property of composition operations in sets +### Being associative is a property of composition operations in binary families of sets ```agda module _ @@ -129,20 +129,20 @@ module _ is-associative-prop-composition-operation-binary-family-Set ``` -### Being unital is a property of composition operations in sets +### Being unital is a property of composition operations in binary families of sets Suppose `e e' : (x : A) → hom-set x x` are both right and left units with regard -to composition. It is enough to show that `e = e'` since the right and left unit +to composition. It is enough to show that `e e'` since the right and left unit laws are propositions (because all hom-types are sets). By function -extensionality, it is enough to show that `e x = e' x` for all `x : A`. But by +extensionality, it is enough to show that `e x = e' x` for all `x : A`. But by the unit laws we have the following chain of equalities: -`e x = (e' x) ∘ (e x) = e' x.` +`e x = (e' x) ∘ (e x) = e' x.` ```agda module _ {l1 l2 : Level} {A : UU l1} (hom-set : A → A → Set l2) - ( comp-hom : composition-operation-binary-family-Set hom-set) + (comp-hom : composition-operation-binary-family-Set hom-set) where abstract @@ -158,20 +158,21 @@ module _ ( Π-Prop' A ( λ a → Π-Prop' A - ( λ b → - Π-Prop - ( type-Set (hom-set a b)) - ( λ f' → Id-Prop (hom-set a b) (comp-hom (x b) f') f')))) + ( λ b → + Π-Prop + ( type-Set (hom-set a b)) + ( λ f' → Id-Prop (hom-set a b) (comp-hom (x b) f') f')))) ( Π-Prop' A ( λ a → Π-Prop' A - ( λ b → - Π-Prop - ( type-Set (hom-set a b)) - ( λ f' → Id-Prop (hom-set a b) (comp-hom f' (x a)) f'))))) + ( λ b → + Π-Prop + ( type-Set (hom-set a b)) + ( λ f' → Id-Prop (hom-set a b) (comp-hom f' (x a)) f'))))) ( eq-htpy ( λ x → inv (left-unit-law-e' (e x)) ∙ right-unit-law-e (e' x))) + abstract is-prop-is-unital-composition-operation-binary-family-Set : is-prop ( is-unital-composition-operation-binary-family-Set hom-set comp-hom) @@ -179,16 +180,16 @@ module _ is-prop-all-elements-equal all-elements-equal-is-unital-composition-operation-binary-family-Set - is-unital-prop-composition-operation-binary-family-Set : Prop (l1 ⊔ l2) - pr1 is-unital-prop-composition-operation-binary-family-Set = - is-unital-composition-operation-binary-family-Set hom-set comp-hom - pr2 is-unital-prop-composition-operation-binary-family-Set = - is-prop-is-unital-composition-operation-binary-family-Set + is-unital-prop-composition-operation-binary-family-Set : Prop (l1 ⊔ l2) + pr1 is-unital-prop-composition-operation-binary-family-Set = + is-unital-composition-operation-binary-family-Set hom-set comp-hom + pr2 is-unital-prop-composition-operation-binary-family-Set = + is-prop-is-unital-composition-operation-binary-family-Set ``` ## See also -- [Precategories](category-theory.precategories.md) are associative unital - composition operations on binary families of sets. -- [Nonunital precategories](category-theory.precategories.md) are associative +- [Precategories](category-theory.precategories.md) are associative and unital composition operations on binary families of sets. +- [Nonunital precategories](category-theory.nonunital-precategories.md) are + associative composition operations on binary families of sets. diff --git a/src/category-theory/nonunital-precategories.lagda.md b/src/category-theory/nonunital-precategories.lagda.md index 6abf552fae..46909e55af 100644 --- a/src/category-theory/nonunital-precategories.lagda.md +++ b/src/category-theory/nonunital-precategories.lagda.md @@ -2,8 +2,6 @@ ```agda module category-theory.nonunital-precategories where - -open import category-theory.composition-operations-on-binary-families-of-sets public ```
Imports @@ -13,12 +11,9 @@ open import category-theory.composition-operations-on-binary-families-of-sets open import foundation.cartesian-product-types open import foundation.dependent-pair-types -open import foundation.function-extensionality -open import foundation.function-types open import foundation.identity-types open import foundation.propositions open import foundation.sets -open import foundation.subtypes open import foundation.universe-levels ``` @@ -27,12 +22,13 @@ open import foundation.universe-levels ## Idea A **nonunital precategory** is a [precategory](category-theory.precategories.md) -that may not have identity maps. Such an object may also rightfully be called a -_semiprecategory_. +that may not have identity maps. In other words, it is an associative +[composition operation on binary families of sets](category-theory.composition-operations-on-binary-families-of-sets.md). +Such an object may also be called a **semiprecategory**. ## Definition -### Nonunital precategories +### The type of nonunital precategories ```agda Nonunital-Precategory : @@ -137,12 +133,12 @@ postcomp-hom-Nonunital-Precategory C f z = ### The predicate of being unital on nonunital precategories -Suppose `e e' : (x : A) → hom-set x x` are both right and left units with regard -to composition. It is enough to show that `e = e'` since the right and left unit -laws are propositions (because all hom-types are sets). By function -extensionality, it is enough to show that `e x = e' x` for all `x : A`. But by -the unit laws we have the following chain of equalities: -`e x = (e' x) ∘ (e x) = e' x.` +To show that unitality is a proposition, suppose `e e' : (x : A) → hom-set x x` +are both right and left units with regard to composition. It is enough to show +that `e = e'` since the right and left unit laws are propositions (because all +hom-types are sets). By function extensionality, it is enough to show that +`e x = e' x` for all `x : A`. But by the unit laws we have the following chain +of equalities: `e x = (e' x) ∘ (e x) = e' x.` ```agda module _ @@ -185,5 +181,5 @@ projection map is an [equivalence](foundation-core.equivalences.md). -We can also define a notion of "isomorphism" as those that induce equivalences -of hom-sets by pre- and postcomposition. +We can also define one notion of "isomorphism" as those morphisms that induce +equivalences of hom-[sets](foundation-core.sets.md) by pre- and postcomposition. diff --git a/src/category-theory/precategories.lagda.md b/src/category-theory/precategories.lagda.md index a37bee1780..e74b8a2895 100644 --- a/src/category-theory/precategories.lagda.md +++ b/src/category-theory/precategories.lagda.md @@ -14,12 +14,10 @@ open import category-theory.nonunital-precategories open import foundation.cartesian-product-types open import foundation.dependent-pair-types -open import foundation.function-extensionality open import foundation.function-types open import foundation.identity-types open import foundation.propositions open import foundation.sets -open import foundation.subtypes open import foundation.universe-levels ``` @@ -45,7 +43,7 @@ identities between the objects are exactly the isomorphisms. ## Definitions -### The predicate on a composition operation on a binary family of sets of defining a precategory +### The predicate of being a precategory on composition operations on binary families of sets ```agda module _ @@ -57,10 +55,20 @@ module _ is-precategory-prop-composition-operation-binary-family-Set : Prop (l1 ⊔ l2) is-precategory-prop-composition-operation-binary-family-Set = prod-Prop + ( is-unital-prop-composition-operation-binary-family-Set hom-set comp-hom) ( is-associative-prop-composition-operation-binary-family-Set ( hom-set) ( comp-hom)) - ( is-unital-prop-composition-operation-binary-family-Set hom-set comp-hom) + + is-precategory-composition-operation-binary-family-Set : UU (l1 ⊔ l2) + is-precategory-composition-operation-binary-family-Set = + type-Prop is-precategory-prop-composition-operation-binary-family-Set + + is-prop-is-precategory-composition-operation-binary-family-Set : + is-prop is-precategory-composition-operation-binary-family-Set + is-prop-is-precategory-composition-operation-binary-family-Set = + is-prop-type-Prop + is-precategory-prop-composition-operation-binary-family-Set ``` ### The type of precategories From 4bfa15453fba2ad7f76859615a0a3ab7748c2549 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 14:27:53 +0200 Subject: [PATCH 76/89] Update src/category-theory/categories.lagda.md Co-authored-by: Egbert Rijke --- src/category-theory/categories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index b77e1efe11..079ff9d0af 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -38,7 +38,7 @@ being a category is a [proposition](foundation-core.propositions.md) since ## Definitions -### The predicate of being a category on precategories +### The predicate on precategories of being a category ```agda module _ From 1f8eac6bf1a0286b733e26c31abcda235ba61ec3 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 14:50:05 +0200 Subject: [PATCH 77/89] review --- ...osition-operations-on-binary-families-of-sets.lagda.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md b/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md index 7bfa225096..3360c0973f 100644 --- a/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md +++ b/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md @@ -26,9 +26,11 @@ Given a type `A`, a **composition operation on a binary family of sets** `hom : A → A → Set ` is a map ```text - hom y z → hom x y → hom x z. + hom y z → hom x y → hom x z ``` +for every triple of elements `x y z : A`. + For such operations, we can consider [properties](foundation-core.propositions.md) such as **associativity** and **unitality**. @@ -132,8 +134,8 @@ module _ ### Being unital is a property of composition operations in binary families of sets Suppose `e e' : (x : A) → hom-set x x` are both right and left units with regard -to composition. It is enough to show that `e e'` since the right and left unit -laws are propositions (because all hom-types are sets). By function +to composition. It is enough to show that `e = e'` since the right and left +unit laws are propositions (because all hom-types are sets). By function extensionality, it is enough to show that `e x = e' x` for all `x : A`. But by the unit laws we have the following chain of equalities: `e x = (e' x) ∘ (e x) = e' x.` From 5ff143401e11927921d01353c54507df6793ee31 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 14:53:34 +0200 Subject: [PATCH 78/89] **Proof:** --- ...tion-operations-on-binary-families-of-sets.lagda.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md b/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md index 3360c0973f..826aa53c43 100644 --- a/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md +++ b/src/category-theory/composition-operations-on-binary-families-of-sets.lagda.md @@ -133,11 +133,11 @@ module _ ### Being unital is a property of composition operations in binary families of sets -Suppose `e e' : (x : A) → hom-set x x` are both right and left units with regard -to composition. It is enough to show that `e = e'` since the right and left -unit laws are propositions (because all hom-types are sets). By function -extensionality, it is enough to show that `e x = e' x` for all `x : A`. But by -the unit laws we have the following chain of equalities: +**Proof:** Suppose `e e' : (x : A) → hom-set x x` are both right and left units +with regard to composition. It is enough to show that `e = e'` since the right +and left unit laws are propositions (because all hom-types are sets). By +function extensionality, it is enough to show that `e x = e' x` for all +`x : A`. But by the unit laws we have the following chain of equalities: `e x = (e' x) ∘ (e x) = e' x.` ```agda From abf8e2211f8cc6eded254b2730897049853dd2cf Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 14:53:56 +0200 Subject: [PATCH 79/89] Update src/category-theory/nonunital-precategories.lagda.md Co-authored-by: Egbert Rijke --- src/category-theory/nonunital-precategories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/nonunital-precategories.lagda.md b/src/category-theory/nonunital-precategories.lagda.md index 46909e55af..53371065aa 100644 --- a/src/category-theory/nonunital-precategories.lagda.md +++ b/src/category-theory/nonunital-precategories.lagda.md @@ -131,7 +131,7 @@ postcomp-hom-Nonunital-Precategory C f z = comp-hom-Nonunital-Precategory C f ``` -### The predicate of being unital on nonunital precategories +### The predicate on nonunital precategories of being unital To show that unitality is a proposition, suppose `e e' : (x : A) → hom-set x x` are both right and left units with regard to composition. It is enough to show From 05df0f3eaf542f0a2a2daf613fd6089022f4c056 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 14:54:02 +0200 Subject: [PATCH 80/89] Update src/category-theory/nonunital-precategories.lagda.md Co-authored-by: Egbert Rijke --- src/category-theory/nonunital-precategories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/nonunital-precategories.lagda.md b/src/category-theory/nonunital-precategories.lagda.md index 53371065aa..44e11bcd1f 100644 --- a/src/category-theory/nonunital-precategories.lagda.md +++ b/src/category-theory/nonunital-precategories.lagda.md @@ -133,7 +133,7 @@ postcomp-hom-Nonunital-Precategory C f z = ### The predicate on nonunital precategories of being unital -To show that unitality is a proposition, suppose `e e' : (x : A) → hom-set x x` +**Proof:** To show that unitality is a proposition, suppose `e e' : (x : A) → hom-set x x` are both right and left units with regard to composition. It is enough to show that `e = e'` since the right and left unit laws are propositions (because all hom-types are sets). By function extensionality, it is enough to show that From 767800144eea3f033577a80080f9f95528602dcc Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 14:58:02 +0200 Subject: [PATCH 81/89] pre-commit --- .../nonunital-precategories.lagda.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/category-theory/nonunital-precategories.lagda.md b/src/category-theory/nonunital-precategories.lagda.md index 44e11bcd1f..57edb55811 100644 --- a/src/category-theory/nonunital-precategories.lagda.md +++ b/src/category-theory/nonunital-precategories.lagda.md @@ -133,12 +133,13 @@ postcomp-hom-Nonunital-Precategory C f z = ### The predicate on nonunital precategories of being unital -**Proof:** To show that unitality is a proposition, suppose `e e' : (x : A) → hom-set x x` -are both right and left units with regard to composition. It is enough to show -that `e = e'` since the right and left unit laws are propositions (because all -hom-types are sets). By function extensionality, it is enough to show that -`e x = e' x` for all `x : A`. But by the unit laws we have the following chain -of equalities: `e x = (e' x) ∘ (e x) = e' x.` +**Proof:** To show that unitality is a proposition, suppose +`e e' : (x : A) → hom-set x x` are both right and left units with regard to +composition. It is enough to show that `e = e'` since the right and left unit +laws are propositions (because all hom-types are sets). By function +extensionality, it is enough to show that `e x = e' x` for all `x : A`. But by +the unit laws we have the following chain of equalities: +`e x = (e' x) ∘ (e x) = e' x.` ```agda module _ From 9cd8155ffc88b1f9541d31f2079850d91f6f45d1 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 11:15:42 +0200 Subject: [PATCH 82/89] Small subcategories (#861) Co-authored-by: Egbert Rijke --- src/category-theory/full-large-subprecategories.lagda.md | 1 + src/foundation/singleton-induction.lagda.md | 1 + 2 files changed, 2 insertions(+) diff --git a/src/category-theory/full-large-subprecategories.lagda.md b/src/category-theory/full-large-subprecategories.lagda.md index 0a0a04fe96..de18f19d66 100644 --- a/src/category-theory/full-large-subprecategories.lagda.md +++ b/src/category-theory/full-large-subprecategories.lagda.md @@ -12,6 +12,7 @@ open import category-theory.isomorphisms-in-large-precategories open import category-theory.large-categories open import category-theory.large-precategories +open import foundation.dependent-pair-types open import foundation.fundamental-theorem-of-identity-types open import foundation.identity-types open import foundation.propositions diff --git a/src/foundation/singleton-induction.lagda.md b/src/foundation/singleton-induction.lagda.md index aaf9e87c6e..17978917ad 100644 --- a/src/foundation/singleton-induction.lagda.md +++ b/src/foundation/singleton-induction.lagda.md @@ -15,6 +15,7 @@ open import foundation-core.contractible-types open import foundation-core.function-types open import foundation-core.homotopies open import foundation-core.identity-types +open import foundation-core.propositions open import foundation-core.sections open import foundation-core.transport-along-identifications ``` From 122b997b11e4a53f38fc1ef62b9a82d914f8fe77 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 15:08:38 +0200 Subject: [PATCH 83/89] Nonunital precategories (#864) Co-authored-by: Egbert Rijke --- src/category-theory/full-large-subprecategories.lagda.md | 1 - src/foundation/singleton-induction.lagda.md | 1 - 2 files changed, 2 deletions(-) diff --git a/src/category-theory/full-large-subprecategories.lagda.md b/src/category-theory/full-large-subprecategories.lagda.md index de18f19d66..0a0a04fe96 100644 --- a/src/category-theory/full-large-subprecategories.lagda.md +++ b/src/category-theory/full-large-subprecategories.lagda.md @@ -12,7 +12,6 @@ open import category-theory.isomorphisms-in-large-precategories open import category-theory.large-categories open import category-theory.large-precategories -open import foundation.dependent-pair-types open import foundation.fundamental-theorem-of-identity-types open import foundation.identity-types open import foundation.propositions diff --git a/src/foundation/singleton-induction.lagda.md b/src/foundation/singleton-induction.lagda.md index 17978917ad..aaf9e87c6e 100644 --- a/src/foundation/singleton-induction.lagda.md +++ b/src/foundation/singleton-induction.lagda.md @@ -15,7 +15,6 @@ open import foundation-core.contractible-types open import foundation-core.function-types open import foundation-core.homotopies open import foundation-core.identity-types -open import foundation-core.propositions open import foundation-core.sections open import foundation-core.transport-along-identifications ``` From cb1e84b9e3e9dc1e639070485a9f52adc6ac7171 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 15:24:58 +0200 Subject: [PATCH 84/89] remove wrong stuff --- src/category-theory.lagda.md | 1 - src/category-theory/categories.lagda.md | 25 ---------------------- src/category-theory/precategories.lagda.md | 2 -- 3 files changed, 28 deletions(-) diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index 3b99e5908a..6c839cd7ee 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -116,7 +116,6 @@ open import category-theory.representing-arrow-category public open import category-theory.sieves-in-categories public open import category-theory.simplex-category public open import category-theory.slice-precategories public -open import category-theory.strict-categories public open import category-theory.subcategories public open import category-theory.subprecategories public open import category-theory.terminal-objects-precategories public diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index 079ff9d0af..b246664d7d 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -192,31 +192,6 @@ module _ hom-inv-eq-Category = hom-inv-eq-Precategory (precategory-Category C) ``` -### The underlying nonunital precategory of a category - -```agda -module _ - {l1 l2 : Level} (C : Category l1 l2) - where - - nonunital-precategory-Category : Nonunital-Precategory l1 l2 - nonunital-precategory-Category = - nonunital-precategory-Precategory (precategory-Category C) -``` - -### The underlying preunivalent category of a category - -```agda -module _ - {l1 l2 : Level} (C : Category l1 l2) - where - - preunivalent-category-Category : Preunivalent-Category l1 l2 - pr1 preunivalent-category-Category = precategory-Category C - pr2 preunivalent-category-Category x y = - is-emb-is-equiv (is-category-Category C x y) -``` - ## Properties ### The objects in a category form a 1-type diff --git a/src/category-theory/precategories.lagda.md b/src/category-theory/precategories.lagda.md index e74b8a2895..713e6a2123 100644 --- a/src/category-theory/precategories.lagda.md +++ b/src/category-theory/precategories.lagda.md @@ -2,8 +2,6 @@ ```agda module category-theory.precategories where - -open import category-theory.nonunital-precategories public ```
Imports From d400430ced777a524f157f0e3b8c05b2a414b6ba Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 15:27:23 +0200 Subject: [PATCH 85/89] preunivalence, not axiom L --- src/foundation/preunivalence.lagda.md | 2 +- .../universal-property-identity-types.lagda.md | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/foundation/preunivalence.lagda.md b/src/foundation/preunivalence.lagda.md index 20aadd38da..2d748eac83 100644 --- a/src/foundation/preunivalence.lagda.md +++ b/src/foundation/preunivalence.lagda.md @@ -27,7 +27,7 @@ asserts that for any two types `X` and `Y` in a common universe, the map `X = Y → X ≃ Y` is an [embedding](foundation-core.embeddings.md). This axiom is a common generalization of the [univalence axiom](foundation.univalence.md) and [axiom K](foundation-core.sets.md), in the sense that both univalence and axiom -K imply axiom L. +K imply preunivalence. ## Definition diff --git a/src/foundation/universal-property-identity-types.lagda.md b/src/foundation/universal-property-identity-types.lagda.md index 3b5eee9400..7d12a6b25f 100644 --- a/src/foundation/universal-property-identity-types.lagda.md +++ b/src/foundation/universal-property-identity-types.lagda.md @@ -76,15 +76,16 @@ equiv-ev-refl' a {B} = ### `Id : A → (A → 𝒰)` is an embedding -We first show that [axiom L](foundation.preunivalence.md) implies that the map -`Id : A → (A → 𝒰)` is an [embedding](foundation.embeddings.md). Since the -[univalence axiom](foundation.univalence.md) implies axiom L, it follows that -`Id : A → (A → 𝒰)` is an embedding under the postulates of agda-unimath. +We first show that [the preunivalence axiom](foundation.preunivalence.md) +implies that the map `Id : A → (A → 𝒰)` is an +[embedding](foundation.embeddings.md). Since the +[univalence axiom](foundation.univalence.md) implies preunivalence, it follows +that `Id : A → (A → 𝒰)` is an embedding under the postulates of agda-unimath. -#### Axiom L implies that `Id : A → (A → 𝒰)` is an embedding +#### Preunivalence implies that `Id : A → (A → 𝒰)` is an embedding -The proof that axiom L implies that `Id : A → (A → 𝒰)` is an embedding proceeds -via the +The proof that preunivalence implies that `Id : A → (A → 𝒰)` is an embedding +proceeds via the [fundamental theorem of identity types](foundation.fundamental-theorem-of-identity-types.md) by showing that the [fiber](foundation.fibers-of-maps.md) of `Id` at `Id a` is [contractible](foundation.contractible-types.md) for each `a : A`. To see this, @@ -108,7 +109,7 @@ above embedding is constructed as the composite of the following embeddings ↪ Σ (x : A), a = x. ``` -In this composite, we used axiom L at the second step. +In this composite, we used preunivalence at the second step. ```agda module _ From 108643b5ed45433e6742ef9230a7c4edc1f8e54a Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 15:31:49 +0200 Subject: [PATCH 86/89] `L` --- src/foundation/preunivalence.lagda.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/foundation/preunivalence.lagda.md b/src/foundation/preunivalence.lagda.md index 2d748eac83..a5027d3ee2 100644 --- a/src/foundation/preunivalence.lagda.md +++ b/src/foundation/preunivalence.lagda.md @@ -40,12 +40,12 @@ axiom-preunivalence l = (X Y : UU l) → statement-preunivalence X Y emb-preunivalence : {l : Level} → axiom-preunivalence l → (X Y : UU l) → (X = Y) ↪ (X ≃ Y) -pr1 (emb-preunivalence preuniv X Y) = equiv-eq -pr2 (emb-preunivalence preuniv X Y) = preuniv X Y +pr1 (emb-preunivalence L X Y) = equiv-eq +pr2 (emb-preunivalence L X Y) = L X Y emb-map-preunivalence : {l : Level} → axiom-preunivalence l → (X Y : UU l) → (X = Y) ↪ (X → Y) -emb-map-preunivalence preuniv X Y = +emb-map-preunivalence L X Y = comp-emb (emb-subtype is-equiv-Prop) (emb-preunivalence preuniv X Y) ``` From 70eeccad17ce43fd78463394e1cac27aabbb9942 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 16:10:59 +0200 Subject: [PATCH 87/89] Update src/foundation/universal-property-identity-types.lagda.md Co-authored-by: Egbert Rijke --- src/foundation/universal-property-identity-types.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/foundation/universal-property-identity-types.lagda.md b/src/foundation/universal-property-identity-types.lagda.md index 7d12a6b25f..5b1be62ef1 100644 --- a/src/foundation/universal-property-identity-types.lagda.md +++ b/src/foundation/universal-property-identity-types.lagda.md @@ -36,7 +36,7 @@ open import foundation-core.propositions The **universal property of identity types** characterizes families of maps out of the [identity type](foundation-core.identity-types.md). This universal -property is also known as the type theoretic Yoneda lemma. +property is also known as the **type theoretic Yoneda lemma**. ## Theorem From 09837f53361789131312979a725a0229460a4ab5 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 17:17:09 +0200 Subject: [PATCH 88/89] rename axioms --- src/foundation-core/sets.lagda.md | 17 +++++++----- src/foundation-core/univalence.lagda.md | 26 ++++++++++++------- src/foundation/preunivalence.lagda.md | 25 +++++++++++------- src/foundation/univalence.lagda.md | 2 +- ...universal-property-identity-types.lagda.md | 8 +++--- 5 files changed, 47 insertions(+), 31 deletions(-) diff --git a/src/foundation-core/sets.lagda.md b/src/foundation-core/sets.lagda.md index 5ce7e3374c..cecd9e33de 100644 --- a/src/foundation-core/sets.lagda.md +++ b/src/foundation-core/sets.lagda.md @@ -55,11 +55,14 @@ module _ ### A type is a set if and only if it satisfies Streicher's axiom K ```agda -statement-axiom-K : {l : Level} → UU l → UU l -statement-axiom-K A = (x : A) (p : x = x) → refl = p +instance-axiom-K : {l : Level} → UU l → UU l +instance-axiom-K A = (x : A) (p : x = x) → refl = p -axiom-K : (l : Level) → UU (lsuc l) -axiom-K l = (A : UU l) → statement-axiom-K A +axiom-K-Level : (l : Level) → UU (lsuc l) +axiom-K-Level l = (A : UU l) → instance-axiom-K A + +axiom-K : UUω +axiom-K = {l : Level} → axiom-K-Level l module _ {l : Level} {A : UU l} @@ -67,16 +70,16 @@ module _ abstract is-set-axiom-K' : - statement-axiom-K A → (x y : A) → all-elements-equal (x = y) + instance-axiom-K A → (x y : A) → all-elements-equal (x = y) is-set-axiom-K' K x .x refl q with K x q ... | refl = refl abstract - is-set-axiom-K : statement-axiom-K A → is-set A + is-set-axiom-K : instance-axiom-K A → is-set A is-set-axiom-K H x y = is-prop-all-elements-equal (is-set-axiom-K' H x y) abstract - axiom-K-is-set : is-set A → statement-axiom-K A + axiom-K-is-set : is-set A → instance-axiom-K A axiom-K-is-set H x p = ( inv (contraction (is-proof-irrelevant-is-prop (H x x) refl) refl)) ∙ ( contraction (is-proof-irrelevant-is-prop (H x x) refl) p) diff --git a/src/foundation-core/univalence.lagda.md b/src/foundation-core/univalence.lagda.md index 3bc7bb2cd1..8bceae69f9 100644 --- a/src/foundation-core/univalence.lagda.md +++ b/src/foundation-core/univalence.lagda.md @@ -39,11 +39,17 @@ equiv-eq refl = id-equiv map-eq : {l : Level} {A : UU l} {B : UU l} → A = B → A → B map-eq = map-equiv ∘ equiv-eq -statement-univalence : {l : Level} (A B : UU l) → UU (lsuc l) -statement-univalence A B = is-equiv (equiv-eq {A = A} {B = B}) +instance-univalence : {l : Level} (A B : UU l) → UU (lsuc l) +instance-univalence A B = is-equiv (equiv-eq {A = A} {B = B}) -axiom-univalence : (l : Level) → UU (lsuc l) -axiom-univalence l = (A B : UU l) → statement-univalence A B +axiom-based-univalence : {l : Level} (A : UU l) → UU (lsuc l) +axiom-based-univalence {l} A = (B : UU l) → instance-univalence A B + +axiom-univalence-Level : (l : Level) → UU (lsuc l) +axiom-univalence-Level l = (A B : UU l) → instance-univalence A B + +axiom-univalence : UUω +axiom-univalence = {l : Level} → axiom-univalence-Level l ``` ## Properties @@ -52,10 +58,10 @@ axiom-univalence l = (A B : UU l) → statement-univalence A B ```agda abstract - is-contr-total-equiv-univalence : + is-contr-total-equiv-based-univalence : {l : Level} (A : UU l) → - ((B : UU l) → statement-univalence A B) → is-contr (Σ (UU l) (A ≃_)) - is-contr-total-equiv-univalence A UA = + axiom-based-univalence A → is-contr (Σ (UU l) (A ≃_)) + is-contr-total-equiv-based-univalence A UA = fundamental-theorem-id' (λ B → equiv-eq) UA ``` @@ -63,10 +69,10 @@ abstract ```agda abstract - univalence-is-contr-total-equiv : + based-univalence-is-contr-total-equiv : {l : Level} (A : UU l) → - is-contr (Σ (UU l) (A ≃_)) → (B : UU l) → statement-univalence A B - univalence-is-contr-total-equiv A c = + is-contr (Σ (UU l) (A ≃_)) → axiom-based-univalence A + based-univalence-is-contr-total-equiv A c = fundamental-theorem-id c (λ B → equiv-eq) ``` diff --git a/src/foundation/preunivalence.lagda.md b/src/foundation/preunivalence.lagda.md index a5027d3ee2..aee63e5691 100644 --- a/src/foundation/preunivalence.lagda.md +++ b/src/foundation/preunivalence.lagda.md @@ -32,21 +32,27 @@ K imply preunivalence. ## Definition ```agda -statement-preunivalence : {l : Level} (X Y : UU l) → UU (lsuc l) -statement-preunivalence X Y = is-emb (equiv-eq {A = X} {B = Y}) +instance-preunivalence : {l : Level} (X Y : UU l) → UU (lsuc l) +instance-preunivalence X Y = is-emb (equiv-eq {A = X} {B = Y}) -axiom-preunivalence : (l : Level) → UU (lsuc l) -axiom-preunivalence l = (X Y : UU l) → statement-preunivalence X Y +axiom-based-preunivalence : {l : Level} (X : UU l) → UU (lsuc l) +axiom-based-preunivalence {l} X = (Y : UU l) → instance-preunivalence X Y + +axiom-preunivalence-Level : (l : Level) → UU (lsuc l) +axiom-preunivalence-Level l = (X Y : UU l) → instance-preunivalence X Y + +axiom-preunivalence : UUω +axiom-preunivalence = {l : Level} → axiom-preunivalence-Level l emb-preunivalence : - {l : Level} → axiom-preunivalence l → (X Y : UU l) → (X = Y) ↪ (X ≃ Y) + {l : Level} → axiom-preunivalence-Level l → (X Y : UU l) → (X = Y) ↪ (X ≃ Y) pr1 (emb-preunivalence L X Y) = equiv-eq pr2 (emb-preunivalence L X Y) = L X Y emb-map-preunivalence : - {l : Level} → axiom-preunivalence l → (X Y : UU l) → (X = Y) ↪ (X → Y) + {l : Level} → axiom-preunivalence-Level l → (X Y : UU l) → (X = Y) ↪ (X → Y) emb-map-preunivalence L X Y = - comp-emb (emb-subtype is-equiv-Prop) (emb-preunivalence preuniv X Y) + comp-emb (emb-subtype is-equiv-Prop) (emb-preunivalence L X Y) ``` ## Properties @@ -55,7 +61,7 @@ emb-map-preunivalence L X Y = ```agda preunivalence-univalence : - {l : Level} → axiom-univalence l → axiom-preunivalence l + {l : Level} → axiom-univalence-Level l → axiom-preunivalence-Level l preunivalence-univalence ua A B = is-emb-is-equiv (ua A B) ``` @@ -66,7 +72,8 @@ types, and for the universe itself. ```agda preunivalence-axiom-K : - {l : Level} → axiom-K l → statement-axiom-K (UU l) → axiom-preunivalence l + {l : Level} → + axiom-K-Level l → instance-axiom-K (UU l) → axiom-preunivalence-Level l preunivalence-axiom-K K K-Type A B = is-emb-is-prop-is-set ( is-set-axiom-K K-Type A B) diff --git a/src/foundation/univalence.lagda.md b/src/foundation/univalence.lagda.md index 15f2058a79..e0804edd00 100644 --- a/src/foundation/univalence.lagda.md +++ b/src/foundation/univalence.lagda.md @@ -39,7 +39,7 @@ In this file we postulate the univalence axiom. Its statement is defined in ## Postulate ```agda -postulate univalence : {l : Level} → axiom-univalence l +postulate univalence : {l : Level} → axiom-univalence-Level l ``` ## Properties diff --git a/src/foundation/universal-property-identity-types.lagda.md b/src/foundation/universal-property-identity-types.lagda.md index 5b1be62ef1..1a4d46a125 100644 --- a/src/foundation/universal-property-identity-types.lagda.md +++ b/src/foundation/universal-property-identity-types.lagda.md @@ -113,11 +113,11 @@ In this composite, we used preunivalence at the second step. ```agda module _ - {l : Level} (L : axiom-preunivalence l) (A : UU l) + {l : Level} (L : axiom-preunivalence-Level l) (A : UU l) where - is-emb-Id-axiom-preunivalence : is-emb (Id {A = A}) - is-emb-Id-axiom-preunivalence a = + is-emb-Id-axiom-preunivalence-Level : is-emb (Id {A = A}) + is-emb-Id-axiom-preunivalence-Level a = fundamental-theorem-id ( ( a , refl) , ( λ _ → @@ -157,7 +157,7 @@ module _ is-emb-Id : is-emb (Id {A = A}) is-emb-Id = - is-emb-Id-axiom-preunivalence (preunivalence-univalence univalence) A + is-emb-Id-axiom-preunivalence-Level (preunivalence-univalence univalence) A ``` #### For any type family `B` over `A`, the type of pairs `(a , e)` consisting of `a : A` and a family of equivalences `e : (x : A) → (a = x) ≃ B x` is a proposition From a6dfec066a7c6d927c0bb2272465abf6a5f55f79 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 20 Oct 2023 17:18:18 +0200 Subject: [PATCH 89/89] oops --- src/foundation/univalence.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/foundation/univalence.lagda.md b/src/foundation/univalence.lagda.md index e0804edd00..f175d248cb 100644 --- a/src/foundation/univalence.lagda.md +++ b/src/foundation/univalence.lagda.md @@ -86,7 +86,7 @@ module _ is-contr-total-equiv : (A : UU l) → is-contr (Σ (UU l) (λ X → A ≃ X)) is-contr-total-equiv A = - is-contr-total-equiv-univalence A (univalence A) + is-contr-total-equiv-based-univalence A (univalence A) is-contr-total-equiv' : (A : UU l) → is-contr (Σ (UU l) (λ X → X ≃ A))