From c7315bb4ca97445d848af67624a38da5b6eb3579 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 21 Oct 2023 22:31:04 +0200 Subject: [PATCH 01/49] yo --- src/category-theory/yoneda-lemma-precategories.lagda.md | 2 +- src/foundation/decidable-equality.lagda.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/category-theory/yoneda-lemma-precategories.lagda.md b/src/category-theory/yoneda-lemma-precategories.lagda.md index 1c388211fc..fe3898b842 100644 --- a/src/category-theory/yoneda-lemma-precategories.lagda.md +++ b/src/category-theory/yoneda-lemma-precategories.lagda.md @@ -31,7 +31,7 @@ open import foundation.universe-levels Given a [precategory](category-theory.precategories.md) `C`, an object `c`, and a [functor](category-theory.functors-precategories.md) `F` from `C` to the -[precategory of sets](foundation.category-of-sets.md), there is an +[category of sets](foundation.category-of-sets.md), there is an [equivalence](foundation-core.equivalences.md) between the [set of natural transformations](category-theory.natural-transformations-functors-precategories.md) from the functor diff --git a/src/foundation/decidable-equality.lagda.md b/src/foundation/decidable-equality.lagda.md index c61914611a..b5201d0a38 100644 --- a/src/foundation/decidable-equality.lagda.md +++ b/src/foundation/decidable-equality.lagda.md @@ -35,8 +35,8 @@ open import foundation-core.transport-along-identifications ## Definition -A type `A` is said to have decidable equality if `Id x y` is a decidable type -for every `x y : A`. +A type `A` is said to have **decidable equality** if `x = y` is a +[decidable type](foundation-core.decidable-types.md) for every `x y : A`. ```agda has-decidable-equality : {l : Level} (A : UU l) → UU l @@ -274,7 +274,7 @@ abstract ( is-set-has-decidable-equality dA (pr1 t) x))) ``` -### If B is a family of types with decidable equality, the total space has decidable equality, and B has a section, then the base type has decidable equality +### If `B` is a family of types with decidable equality, the total space has decidable equality, and `B` has a section, then the base type has decidable equality ```agda abstract From 282b8db4659b3b3712ef5c8c204a4c5397e5ada1 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 21 Oct 2023 22:11:39 +0200 Subject: [PATCH 02/49] Preunivalence holds in univalent foundations (#874) --- src/foundation-core/univalence.lagda.md | 16 ++-- src/foundation/embeddings.lagda.md | 6 +- src/foundation/preunivalence.lagda.md | 75 ++++++++++++------- src/foundation/replacement.lagda.md | 28 ++++--- src/foundation/small-types.lagda.md | 2 +- src/foundation/univalence.lagda.md | 2 +- ...universal-property-identity-types.lagda.md | 61 ++++++++------- .../finitely-graded-posets.lagda.md | 2 +- 8 files changed, 115 insertions(+), 77 deletions(-) diff --git a/src/foundation-core/univalence.lagda.md b/src/foundation-core/univalence.lagda.md index f44c19349e..6ef9000ce0 100644 --- a/src/foundation-core/univalence.lagda.md +++ b/src/foundation-core/univalence.lagda.md @@ -43,14 +43,14 @@ map-eq = map-equiv ∘ equiv-eq instance-univalence : {l : Level} (A B : UU l) → UU (lsuc l) instance-univalence A B = is-equiv (equiv-eq {A = A} {B = B}) -axiom-based-univalence : {l : Level} (A : UU l) → UU (lsuc l) -axiom-based-univalence {l} A = (B : UU l) → instance-univalence A B +based-univalence-axiom : {l : Level} (A : UU l) → UU (lsuc l) +based-univalence-axiom {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 +univalence-axiom-Level : (l : Level) → UU (lsuc l) +univalence-axiom-Level l = (A B : UU l) → instance-univalence A B -axiom-univalence : UUω -axiom-univalence = {l : Level} → axiom-univalence-Level l +univalence-axiom : UUω +univalence-axiom = {l : Level} → univalence-axiom-Level l ``` ## Properties @@ -61,7 +61,7 @@ axiom-univalence = {l : Level} → axiom-univalence-Level l abstract is-torsorial-equiv-based-univalence : {l : Level} (A : UU l) → - axiom-based-univalence A → is-torsorial (λ (B : UU l) → A ≃ B) + based-univalence-axiom A → is-torsorial (λ (B : UU l) → A ≃ B) is-torsorial-equiv-based-univalence A UA = fundamental-theorem-id' (λ B → equiv-eq) UA ``` @@ -72,7 +72,7 @@ abstract abstract based-univalence-is-torsorial-equiv : {l : Level} (A : UU l) → - is-torsorial (λ (B : UU l) → A ≃ B) → axiom-based-univalence A + is-torsorial (λ (B : UU l) → A ≃ B) → based-univalence-axiom A based-univalence-is-torsorial-equiv A c = fundamental-theorem-id c (λ B → equiv-eq) ``` diff --git a/src/foundation/embeddings.lagda.md b/src/foundation/embeddings.lagda.md index cc1ff93d45..5ee493c330 100644 --- a/src/foundation/embeddings.lagda.md +++ b/src/foundation/embeddings.lagda.md @@ -195,9 +195,9 @@ module _ is-emb-tot H = is-emb-is-prop-map (is-prop-map-tot (λ x → is-prop-map-is-emb (H x))) - tot-emb : ((x : A) → B x ↪ C x) → Σ A B ↪ Σ A C - pr1 (tot-emb f) = tot (λ x → map-emb (f x)) - pr2 (tot-emb f) = is-emb-tot (λ x → is-emb-map-emb (f x)) + emb-tot : ((x : A) → B x ↪ C x) → Σ A B ↪ Σ A C + pr1 (emb-tot f) = tot (λ x → map-emb (f x)) + pr2 (emb-tot f) = is-emb-tot (λ x → is-emb-map-emb (f x)) ``` ### The functoriality of dependent pair types preserves embeddings diff --git a/src/foundation/preunivalence.lagda.md b/src/foundation/preunivalence.lagda.md index aee63e5691..94c5755d56 100644 --- a/src/foundation/preunivalence.lagda.md +++ b/src/foundation/preunivalence.lagda.md @@ -12,10 +12,10 @@ open import foundation.embeddings open import foundation.equivalences open import foundation.sets open import foundation.subtypes +open import foundation.univalence open import foundation.universe-levels open import foundation-core.identity-types -open import foundation-core.univalence ``` @@ -26,8 +26,7 @@ open import foundation-core.univalence 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 preunivalence. +[axiom K](foundation-core.sets.md). ## Definition @@ -35,51 +34,72 @@ K imply preunivalence. instance-preunivalence : {l : Level} (X Y : UU l) → UU (lsuc l) instance-preunivalence X Y = is-emb (equiv-eq {A = X} {B = Y}) -axiom-based-preunivalence : {l : Level} (X : UU l) → UU (lsuc l) -axiom-based-preunivalence {l} X = (Y : UU l) → instance-preunivalence X Y +based-preunivalence-axiom : {l : Level} (X : UU l) → UU (lsuc l) +based-preunivalence-axiom {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 +preunivalence-axiom-Level : (l : Level) → UU (lsuc l) +preunivalence-axiom-Level l = (X Y : UU l) → instance-preunivalence X Y -axiom-preunivalence : UUω -axiom-preunivalence = {l : Level} → axiom-preunivalence-Level l +preunivalence-axiom : UUω +preunivalence-axiom = {l : Level} → preunivalence-axiom-Level l emb-preunivalence : - {l : Level} → axiom-preunivalence-Level l → (X Y : UU l) → (X = Y) ↪ (X ≃ Y) + preunivalence-axiom → {l : Level} (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-Level l → (X Y : UU l) → (X = Y) ↪ (X → Y) + preunivalence-axiom → {l : Level} (X Y : UU l) → (X = Y) ↪ (X → Y) emb-map-preunivalence L X Y = comp-emb (emb-subtype is-equiv-Prop) (emb-preunivalence L X Y) ``` ## Properties -### Preunivalence generalizes univalence +### Preunivalence generalizes axiom K + +To show that preunivalence generalizes axiom K, we assume axiom K for the types +in question and for the universe itself. ```agda -preunivalence-univalence : - {l : Level} → axiom-univalence-Level l → axiom-preunivalence-Level l -preunivalence-univalence ua A B = is-emb-is-equiv (ua A B) +module _ + {l : Level} (A B : UU l) + where + + instance-preunivalence-instance-axiom-K : + instance-axiom-K (UU l) → instance-axiom-K A → instance-axiom-K B → + instance-preunivalence A B + instance-preunivalence-instance-axiom-K K-Type K-A K-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)) + +preunivalence-axiom-axiom-K : axiom-K → preunivalence-axiom +preunivalence-axiom-axiom-K K {l} X Y = + instance-preunivalence-instance-axiom-K X Y (K (UU l)) (K X) (K Y) ``` -### Preunivalence generalizes axiom K +### Preunivalence generalizes univalence + +```agda +module _ + {l : Level} (A B : UU l) + where + + instance-preunivalence-instance-univalence : + instance-univalence A B → instance-preunivalence A B + instance-preunivalence-instance-univalence = is-emb-is-equiv + +preunivalence-axiom-univalence-axiom : univalence-axiom → preunivalence-axiom +preunivalence-axiom-univalence-axiom UA X Y = + instance-preunivalence-instance-univalence X Y (UA X Y) +``` -To show that preunivalence generalizes axiom K, we assume axiom K both for -types, and for the universe itself. +### Preunivalence holds in univalent foundations ```agda -preunivalence-axiom-K : - {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) - ( is-set-equiv-is-set - ( is-set-axiom-K (K A)) - ( is-set-axiom-K (K B))) +preunivalence : preunivalence-axiom +preunivalence = preunivalence-axiom-univalence-axiom univalence ``` ## See also @@ -87,3 +107,4 @@ preunivalence-axiom-K K K-Type A B = - 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) +- [Preunivalent categories](category-theory.preunivalent-categories.md) diff --git a/src/foundation/replacement.lagda.md b/src/foundation/replacement.lagda.md index db864b5613..8283b21027 100644 --- a/src/foundation/replacement.lagda.md +++ b/src/foundation/replacement.lagda.md @@ -1,4 +1,4 @@ -# The replacement axiom for type theory +# The type theoretic replacement axiom ```agda module foundation.replacement where @@ -18,30 +18,40 @@ open import foundation-core.small-types ## Idea -The **type theoretic replacement axiom** asserts that the image of a map -`f : A → B` from a small type `A` into a locally small type `B` is small. +The **type theoretic replacement axiom** asserts that the +[image](foundation.images.md) of a map `f : A → B` from a +[small type](foundation-core.small-types.md) `A` into a +[locally small type](foundation.locally-small-types.md) `B` is small. ## Statement ```agda -Replacement : (l : Level) → UUω -Replacement l = - {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → +instance-replacement : + (l : Level) {l1 l2 : Level} {A : UU l1} {B : UU l2} → (A → B) → + UU (lsuc l ⊔ l1 ⊔ l2) +instance-replacement l {A = A} {B} f = is-small l A → is-locally-small l B → is-small l (im f) + +replacement-axiom-Level : (l l1 l2 : Level) → UU (lsuc l ⊔ lsuc l1 ⊔ lsuc l2) +replacement-axiom-Level l l1 l2 = + {A : UU l1} {B : UU l2} → (f : A → B) → instance-replacement l f + +replacement-axiom : UUω +replacement-axiom = {l l1 l2 : Level} → replacement-axiom-Level l l1 l2 ``` ## Postulate ```agda postulate - replacement : {l : Level} → Replacement l + replacement : replacement-axiom ``` ```agda -replacement-UU : +replacement' : {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → is-locally-small l1 B → is-small l1 (im f) -replacement-UU f = replacement f is-small' +replacement' f = replacement f is-small' ``` ## References diff --git a/src/foundation/small-types.lagda.md b/src/foundation/small-types.lagda.md index dced6bbeaa..7ed5faf654 100644 --- a/src/foundation/small-types.lagda.md +++ b/src/foundation/small-types.lagda.md @@ -26,7 +26,7 @@ open import foundation-core.homotopies ## Properties -### If `f` is a surjective map from a small type into a locally small type, then `Replacement` implies that the codomain is small +### If `f` is a surjective map from a small type into a locally small type, then replacement implies that the codomain is small ```agda is-small-is-surjective : diff --git a/src/foundation/univalence.lagda.md b/src/foundation/univalence.lagda.md index f4b5b68578..d0f561ec71 100644 --- a/src/foundation/univalence.lagda.md +++ b/src/foundation/univalence.lagda.md @@ -41,7 +41,7 @@ In this file we postulate the univalence axiom. Its statement is defined in ```agda postulate - univalence : axiom-univalence + univalence : univalence-axiom ``` ## Properties diff --git a/src/foundation/universal-property-identity-types.lagda.md b/src/foundation/universal-property-identity-types.lagda.md index c6a39da892..19a6c512d8 100644 --- a/src/foundation/universal-property-identity-types.lagda.md +++ b/src/foundation/universal-property-identity-types.lagda.md @@ -113,39 +113,47 @@ In this composite, we used preunivalence at the second step. ```agda module _ - {l : Level} (L : axiom-preunivalence-Level l) (A : UU l) + {l : Level} (A : UU l) + (L : (a x y : A) → instance-preunivalence (Id x y) (Id a y)) where - is-emb-Id-axiom-preunivalence-Level : is-emb (Id {A = A}) - is-emb-Id-axiom-preunivalence-Level a = + emb-fiber-Id-preunivalent-Id : + (a : A) → fiber' Id (Id a) ↪ Σ A (Id a) + emb-fiber-Id-preunivalent-Id a = + comp-emb + ( comp-emb + ( emb-equiv + ( equiv-tot + ( λ x → + ( equiv-ev-refl x) ∘e + ( equiv-inclusion-is-full-subtype + ( Π-Prop A ∘ (is-equiv-Prop ∘_)) + ( fundamental-theorem-id (is-torsorial-path a))) ∘e + ( distributive-Π-Σ)))) + ( emb-tot + ( λ x → + comp-emb + ( emb-Π (λ y → _ , L a x y)) + ( emb-equiv equiv-funext)))) + ( emb-equiv (inv-equiv (equiv-fiber Id (Id a)))) + + is-emb-Id-preunivalent-Id : is-emb (Id {A = A}) + is-emb-Id-preunivalent-Id a = fundamental-theorem-id ( ( a , refl) , ( λ _ → is-injective-emb - ( emb-fiber a) + ( emb-fiber-Id-preunivalent-Id a) ( eq-is-contr (is-torsorial-path a)))) ( λ _ → ap Id) - where - emb-fiber : (a : A) → fiber' Id (Id a) ↪ Σ A (Id a) - emb-fiber a = - comp-emb - ( comp-emb - ( emb-equiv - ( equiv-tot - ( λ x → - ( equiv-ev-refl x) ∘e - ( ( equiv-inclusion-is-full-subtype - ( Π-Prop A ∘ (is-equiv-Prop ∘_)) - ( fundamental-theorem-id (is-torsorial-path a))) ∘e - ( distributive-Π-Σ))))) - ( emb-Σ - ( λ x → (y : A) → Id x y ≃ Id a y) - ( id-emb) - ( λ x → - comp-emb - ( emb-Π (λ y → emb-preunivalence L (Id x y) (Id a y))) - ( emb-equiv equiv-funext)))) - ( emb-equiv (inv-equiv (equiv-fiber Id (Id a)))) + +module _ + (L : preunivalence-axiom) {l : Level} (A : UU l) + where + + is-emb-Id-preunivalence-axiom : is-emb (Id {A = A}) + is-emb-Id-preunivalence-axiom = + is-emb-Id-preunivalent-Id A (λ a x y → L (Id x y) (Id a y)) ``` #### `Id : A → (A → 𝒰)` is an embedding @@ -156,8 +164,7 @@ module _ where is-emb-Id : is-emb (Id {A = A}) - is-emb-Id = - is-emb-Id-axiom-preunivalence-Level (preunivalence-univalence univalence) A + is-emb-Id = is-emb-Id-preunivalence-axiom preunivalence 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 diff --git a/src/order-theory/finitely-graded-posets.lagda.md b/src/order-theory/finitely-graded-posets.lagda.md index 7534d942df..94e6c00be2 100644 --- a/src/order-theory/finitely-graded-posets.lagda.md +++ b/src/order-theory/finitely-graded-posets.lagda.md @@ -536,7 +536,7 @@ module _ emb-type-Finitely-Graded-Subposet : type-Finitely-Graded-Subposet ↪ type-Finitely-Graded-Poset X emb-type-Finitely-Graded-Subposet = - tot-emb emb-face-Finitely-Graded-Subposet + emb-tot emb-face-Finitely-Graded-Subposet map-emb-type-Finitely-Graded-Subposet : type-Finitely-Graded-Subposet → type-Finitely-Graded-Poset X From ffe2dc7f658fed2839c3e5c22ae697bc06c5c658 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sun, 22 Oct 2023 00:38:04 +0200 Subject: [PATCH 03/49] Peano arithmetic (#876) Co-authored-by: Egbert Rijke --- src/elementary-number-theory.lagda.md | 1 + .../addition-natural-numbers.lagda.md | 1 + ...-strong-induction-natural-numbers.lagda.md | 1 + .../equality-natural-numbers.lagda.md | 81 ++++++++- .../factorials.lagda.md | 1 + .../integers.lagda.md | 1 + ...-of-natural-numbers-with-addition.lagda.md | 2 +- ...d-of-natural-numbers-with-maximum.lagda.md | 1 + .../multiplication-natural-numbers.lagda.md | 1 + ...icative-monoid-of-natural-numbers.lagda.md | 2 +- .../natural-numbers.lagda.md | 137 +++------------ .../parity-natural-numbers.lagda.md | 1 + .../peano-arithmetic.lagda.md | 159 ++++++++++++++++++ ...l-numbers-ordered-by-divisibility.lagda.md | 1 + .../strong-induction-natural-numbers.lagda.md | 1 + .../type-arithmetic-natural-numbers.lagda.md | 31 ++++ src/lists/functoriality-lists.lagda.md | 1 + src/lists/permutation-lists.lagda.md | 1 + src/set-theory/baire-space.lagda.md | 1 + src/set-theory/countable-sets.lagda.md | 1 + .../2-element-types.lagda.md | 1 + .../standard-finite-types.lagda.md | 1 + 22 files changed, 304 insertions(+), 124 deletions(-) create mode 100644 src/elementary-number-theory/peano-arithmetic.lagda.md diff --git a/src/elementary-number-theory.lagda.md b/src/elementary-number-theory.lagda.md index aea0990e94..7dedc2874e 100644 --- a/src/elementary-number-theory.lagda.md +++ b/src/elementary-number-theory.lagda.md @@ -92,6 +92,7 @@ open import elementary-number-theory.nonzero-integers public open import elementary-number-theory.nonzero-natural-numbers public open import elementary-number-theory.ordinal-induction-natural-numbers public open import elementary-number-theory.parity-natural-numbers public +open import elementary-number-theory.peano-arithmetic public open import elementary-number-theory.pisano-periods public open import elementary-number-theory.poset-of-natural-numbers-ordered-by-divisibility public open import elementary-number-theory.powers-integers public diff --git a/src/elementary-number-theory/addition-natural-numbers.lagda.md b/src/elementary-number-theory/addition-natural-numbers.lagda.md index e9a2ab1be9..c9422348b7 100644 --- a/src/elementary-number-theory/addition-natural-numbers.lagda.md +++ b/src/elementary-number-theory/addition-natural-numbers.lagda.md @@ -7,6 +7,7 @@ module elementary-number-theory.addition-natural-numbers where
Imports ```agda +open import elementary-number-theory.equality-natural-numbers open import elementary-number-theory.natural-numbers open import foundation.action-on-identifications-binary-functions diff --git a/src/elementary-number-theory/based-strong-induction-natural-numbers.lagda.md b/src/elementary-number-theory/based-strong-induction-natural-numbers.lagda.md index 2d927e209e..870b728345 100644 --- a/src/elementary-number-theory/based-strong-induction-natural-numbers.lagda.md +++ b/src/elementary-number-theory/based-strong-induction-natural-numbers.lagda.md @@ -8,6 +8,7 @@ module elementary-number-theory.based-strong-induction-natural-numbers where ```agda open import elementary-number-theory.based-induction-natural-numbers +open import elementary-number-theory.equality-natural-numbers open import elementary-number-theory.inequality-natural-numbers open import elementary-number-theory.natural-numbers diff --git a/src/elementary-number-theory/equality-natural-numbers.lagda.md b/src/elementary-number-theory/equality-natural-numbers.lagda.md index ea577853bb..d5724e8633 100644 --- a/src/elementary-number-theory/equality-natural-numbers.lagda.md +++ b/src/elementary-number-theory/equality-natural-numbers.lagda.md @@ -10,16 +10,19 @@ module elementary-number-theory.equality-natural-numbers where open import elementary-number-theory.natural-numbers open import foundation.action-on-identifications-functions -open import foundation.contractible-types open import foundation.coproduct-types open import foundation.decidable-equality open import foundation.decidable-types open import foundation.dependent-pair-types +open import foundation.empty-types 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.set-truncations +open import foundation.sets open import foundation.unit-type open import foundation.universe-levels @@ -29,8 +32,78 @@ open import foundation-core.torsorial-type-families
+## Definitions + +### Observational equality on the natural numbers + +```agda +Eq-ℕ : ℕ → ℕ → UU lzero +Eq-ℕ zero-ℕ zero-ℕ = unit +Eq-ℕ zero-ℕ (succ-ℕ n) = empty +Eq-ℕ (succ-ℕ m) zero-ℕ = empty +Eq-ℕ (succ-ℕ m) (succ-ℕ n) = Eq-ℕ m n +``` + ## Properties +### The type of natural numbers is a set + +```agda +abstract + is-prop-Eq-ℕ : + (n m : ℕ) → is-prop (Eq-ℕ n m) + is-prop-Eq-ℕ zero-ℕ zero-ℕ = is-prop-unit + is-prop-Eq-ℕ zero-ℕ (succ-ℕ m) = is-prop-empty + is-prop-Eq-ℕ (succ-ℕ n) zero-ℕ = is-prop-empty + is-prop-Eq-ℕ (succ-ℕ n) (succ-ℕ m) = is-prop-Eq-ℕ n m + +refl-Eq-ℕ : (n : ℕ) → Eq-ℕ n n +refl-Eq-ℕ zero-ℕ = star +refl-Eq-ℕ (succ-ℕ n) = refl-Eq-ℕ n + +Eq-eq-ℕ : {x y : ℕ} → x = y → Eq-ℕ x y +Eq-eq-ℕ {x} {.x} refl = refl-Eq-ℕ x + +eq-Eq-ℕ : (x y : ℕ) → Eq-ℕ x y → x = y +eq-Eq-ℕ zero-ℕ zero-ℕ e = refl +eq-Eq-ℕ (succ-ℕ x) (succ-ℕ y) e = ap succ-ℕ (eq-Eq-ℕ x y e) + +abstract + is-set-ℕ : is-set ℕ + is-set-ℕ = + is-set-prop-in-id + Eq-ℕ + is-prop-Eq-ℕ + refl-Eq-ℕ + eq-Eq-ℕ + +ℕ-Set : Set lzero +pr1 ℕ-Set = ℕ +pr2 ℕ-Set = is-set-ℕ +``` + +### The property of being zero + +```agda +is-prop-is-zero-ℕ : (n : ℕ) → is-prop (is-zero-ℕ n) +is-prop-is-zero-ℕ n = is-set-ℕ n zero-ℕ + +is-zero-ℕ-Prop : ℕ → Prop lzero +pr1 (is-zero-ℕ-Prop n) = is-zero-ℕ n +pr2 (is-zero-ℕ-Prop n) = is-prop-is-zero-ℕ n +``` + +### The property of being one + +```agda +is-prop-is-one-ℕ : (n : ℕ) → is-prop (is-one-ℕ n) +is-prop-is-one-ℕ n = is-set-ℕ n 1 + +is-one-ℕ-Prop : ℕ → Prop lzero +pr1 (is-one-ℕ-Prop n) = is-one-ℕ n +pr2 (is-one-ℕ-Prop n) = is-prop-is-one-ℕ n +``` + ### The type of natural numbers has decidable equality ```agda @@ -72,13 +145,13 @@ is-decidable-is-not-one-ℕ x = is-decidable-neg (is-decidable-is-one-ℕ x) ``` -## The full characterization of the identity type of ℕ +## The full characterization of the identity type of `ℕ` ```agda map-total-Eq-ℕ : (m : ℕ) → Σ ℕ (Eq-ℕ m) → Σ ℕ (Eq-ℕ (succ-ℕ m)) -pr1 (map-total-Eq-ℕ m (pair n e)) = succ-ℕ n -pr2 (map-total-Eq-ℕ m (pair n e)) = e +pr1 (map-total-Eq-ℕ m (n , e)) = succ-ℕ n +pr2 (map-total-Eq-ℕ m (n , e)) = e is-torsorial-Eq-ℕ : (m : ℕ) → is-torsorial (Eq-ℕ m) diff --git a/src/elementary-number-theory/factorials.lagda.md b/src/elementary-number-theory/factorials.lagda.md index d4373c26c0..7affe83e4f 100644 --- a/src/elementary-number-theory/factorials.lagda.md +++ b/src/elementary-number-theory/factorials.lagda.md @@ -8,6 +8,7 @@ module elementary-number-theory.factorials where ```agda open import elementary-number-theory.divisibility-natural-numbers +open import elementary-number-theory.equality-natural-numbers open import elementary-number-theory.inequality-natural-numbers open import elementary-number-theory.multiplication-natural-numbers open import elementary-number-theory.natural-numbers diff --git a/src/elementary-number-theory/integers.lagda.md b/src/elementary-number-theory/integers.lagda.md index 701ab8ae36..028aaf75e1 100644 --- a/src/elementary-number-theory/integers.lagda.md +++ b/src/elementary-number-theory/integers.lagda.md @@ -7,6 +7,7 @@ module elementary-number-theory.integers where
Imports ```agda +open import elementary-number-theory.equality-natural-numbers open import elementary-number-theory.natural-numbers open import foundation.action-on-identifications-functions diff --git a/src/elementary-number-theory/monoid-of-natural-numbers-with-addition.lagda.md b/src/elementary-number-theory/monoid-of-natural-numbers-with-addition.lagda.md index fbb5403e86..da4c41ed15 100644 --- a/src/elementary-number-theory/monoid-of-natural-numbers-with-addition.lagda.md +++ b/src/elementary-number-theory/monoid-of-natural-numbers-with-addition.lagda.md @@ -8,7 +8,7 @@ module elementary-number-theory.monoid-of-natural-numbers-with-addition where ```agda open import elementary-number-theory.addition-natural-numbers -open import elementary-number-theory.natural-numbers +open import elementary-number-theory.equality-natural-numbers open import foundation.dependent-pair-types open import foundation.universe-levels diff --git a/src/elementary-number-theory/monoid-of-natural-numbers-with-maximum.lagda.md b/src/elementary-number-theory/monoid-of-natural-numbers-with-maximum.lagda.md index 665a980534..ae0b8fe991 100644 --- a/src/elementary-number-theory/monoid-of-natural-numbers-with-maximum.lagda.md +++ b/src/elementary-number-theory/monoid-of-natural-numbers-with-maximum.lagda.md @@ -7,6 +7,7 @@ module elementary-number-theory.monoid-of-natural-numbers-with-maximum where
Imports ```agda +open import elementary-number-theory.equality-natural-numbers open import elementary-number-theory.initial-segments-natural-numbers open import elementary-number-theory.maximum-natural-numbers open import elementary-number-theory.natural-numbers diff --git a/src/elementary-number-theory/multiplication-natural-numbers.lagda.md b/src/elementary-number-theory/multiplication-natural-numbers.lagda.md index dedb9e2c64..67a9323edd 100644 --- a/src/elementary-number-theory/multiplication-natural-numbers.lagda.md +++ b/src/elementary-number-theory/multiplication-natural-numbers.lagda.md @@ -8,6 +8,7 @@ module elementary-number-theory.multiplication-natural-numbers where ```agda open import elementary-number-theory.addition-natural-numbers +open import elementary-number-theory.equality-natural-numbers open import elementary-number-theory.natural-numbers open import foundation.action-on-identifications-binary-functions diff --git a/src/elementary-number-theory/multiplicative-monoid-of-natural-numbers.lagda.md b/src/elementary-number-theory/multiplicative-monoid-of-natural-numbers.lagda.md index a22ff159e2..691a9935fd 100644 --- a/src/elementary-number-theory/multiplicative-monoid-of-natural-numbers.lagda.md +++ b/src/elementary-number-theory/multiplicative-monoid-of-natural-numbers.lagda.md @@ -7,8 +7,8 @@ module elementary-number-theory.multiplicative-monoid-of-natural-numbers where
Imports ```agda +open import elementary-number-theory.equality-natural-numbers open import elementary-number-theory.multiplication-natural-numbers -open import elementary-number-theory.natural-numbers open import foundation.dependent-pair-types open import foundation.universe-levels diff --git a/src/elementary-number-theory/natural-numbers.lagda.md b/src/elementary-number-theory/natural-numbers.lagda.md index 1f055ae982..9e6f400bbd 100644 --- a/src/elementary-number-theory/natural-numbers.lagda.md +++ b/src/elementary-number-theory/natural-numbers.lagda.md @@ -7,31 +7,21 @@ module elementary-number-theory.natural-numbers where
Imports ```agda -open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types -open import foundation.equivalences -open import foundation.function-types -open import foundation.homotopies -open import foundation.identity-types -open import foundation.injective-maps -open import foundation.logical-equivalences -open import foundation.negated-equality -open import foundation.negation -open import foundation.unit-type open import foundation.universe-levels -open import foundation-core.coproduct-types open import foundation-core.empty-types -open import foundation-core.propositions -open import foundation-core.sets +open import foundation-core.identity-types +open import foundation-core.injective-maps +open import foundation-core.negation ```
## Idea -The type of natural numbers is inductively generated by the zero element and the -successor function. The induction principle for the natural numbers works to +The **natural numbers** is an inductively generated type by the zero element and +the successor function. The induction principle for the natural numbers works to construct sections of type families over the natural numbers. ## Definitions @@ -86,30 +76,27 @@ is-not-one-ℕ' n = ¬ (is-one-ℕ' n) ind-ℕ : {l : Level} {P : ℕ → UU l} → P 0 → ((n : ℕ) → P n → P (succ-ℕ n)) → ((n : ℕ) → P n) -ind-ℕ p0 pS 0 = p0 -ind-ℕ p0 pS (succ-ℕ n) = pS n (ind-ℕ p0 pS n) +ind-ℕ p-zero p-succ 0 = p-zero +ind-ℕ p-zero p-succ (succ-ℕ n) = p-succ n (ind-ℕ p-zero p-succ n) ``` -### Peano's 7th axiom +### The recursion principle of ℕ + +```agda +rec-ℕ : {l : Level} {A : UU l} → A → (ℕ → A → A) → (ℕ → A) +rec-ℕ = ind-ℕ +``` + +### The successor function on ℕ is injective ```agda is-injective-succ-ℕ : is-injective succ-ℕ is-injective-succ-ℕ refl = refl - -private - Peano-7 : - (x y : ℕ) → (x = y) ↔ (succ-ℕ x = succ-ℕ y) - pr1 (Peano-7 x y) refl = refl - pr2 (Peano-7 x y) = is-injective-succ-ℕ ``` -### Peano's 8th axiom +### Successors are nonzero ```agda -private - Peano-8 : (x : ℕ) → is-nonzero-ℕ (succ-ℕ x) - Peano-8 x () - is-nonzero-succ-ℕ : (x : ℕ) → is-nonzero-ℕ (succ-ℕ x) is-nonzero-succ-ℕ x () @@ -121,11 +108,11 @@ is-successor-is-nonzero-ℕ {zero-ℕ} H = ex-falso (H refl) pr1 (is-successor-is-nonzero-ℕ {succ-ℕ x} H) = x pr2 (is-successor-is-nonzero-ℕ {succ-ℕ x} H) = refl -has-no-fixed-points-succ-ℕ : (x : ℕ) → succ-ℕ x ≠ x +has-no-fixed-points-succ-ℕ : (x : ℕ) → ¬ (succ-ℕ x = x) has-no-fixed-points-succ-ℕ x () ``` -### Basic inequalities +### Basic nonequalities ```agda is-nonzero-one-ℕ : is-nonzero-ℕ 1 @@ -135,98 +122,12 @@ is-not-one-zero-ℕ : is-not-one-ℕ zero-ℕ is-not-one-zero-ℕ () is-nonzero-two-ℕ : is-nonzero-ℕ 2 -is-nonzero-two-ℕ = is-nonzero-succ-ℕ 1 +is-nonzero-two-ℕ () is-not-one-two-ℕ : is-not-one-ℕ 2 is-not-one-two-ℕ () ``` -### The type of natural numbers is a set - -```agda -Eq-ℕ : ℕ → ℕ → UU lzero -Eq-ℕ zero-ℕ zero-ℕ = unit -Eq-ℕ zero-ℕ (succ-ℕ n) = empty -Eq-ℕ (succ-ℕ m) zero-ℕ = empty -Eq-ℕ (succ-ℕ m) (succ-ℕ n) = Eq-ℕ m n - -abstract - is-prop-Eq-ℕ : - (n m : ℕ) → is-prop (Eq-ℕ n m) - is-prop-Eq-ℕ zero-ℕ zero-ℕ = is-prop-unit - is-prop-Eq-ℕ zero-ℕ (succ-ℕ m) = is-prop-empty - is-prop-Eq-ℕ (succ-ℕ n) zero-ℕ = is-prop-empty - is-prop-Eq-ℕ (succ-ℕ n) (succ-ℕ m) = is-prop-Eq-ℕ n m - -refl-Eq-ℕ : (n : ℕ) → Eq-ℕ n n -refl-Eq-ℕ zero-ℕ = star -refl-Eq-ℕ (succ-ℕ n) = refl-Eq-ℕ n - -Eq-eq-ℕ : {x y : ℕ} → x = y → Eq-ℕ x y -Eq-eq-ℕ {x} {.x} refl = refl-Eq-ℕ x - -eq-Eq-ℕ : (x y : ℕ) → Eq-ℕ x y → x = y -eq-Eq-ℕ zero-ℕ zero-ℕ e = refl -eq-Eq-ℕ (succ-ℕ x) (succ-ℕ y) e = ap succ-ℕ (eq-Eq-ℕ x y e) - -abstract - is-set-ℕ : is-set ℕ - is-set-ℕ = - is-set-prop-in-id - Eq-ℕ - is-prop-Eq-ℕ - refl-Eq-ℕ - eq-Eq-ℕ - -ℕ-Set : Set lzero -pr1 ℕ-Set = ℕ -pr2 ℕ-Set = is-set-ℕ - -is-prop-is-zero-ℕ : (n : ℕ) → is-prop (is-zero-ℕ n) -is-prop-is-zero-ℕ n = is-set-ℕ n zero-ℕ - -is-zero-ℕ-Prop : ℕ → Prop lzero -pr1 (is-zero-ℕ-Prop n) = is-zero-ℕ n -pr2 (is-zero-ℕ-Prop n) = is-prop-is-zero-ℕ n - -is-prop-is-one-ℕ : (n : ℕ) → is-prop (is-one-ℕ n) -is-prop-is-one-ℕ n = is-set-ℕ n 1 - -is-one-ℕ-Prop : ℕ → Prop lzero -pr1 (is-one-ℕ-Prop n) = is-one-ℕ n -pr2 (is-one-ℕ-Prop n) = is-prop-is-one-ℕ n -``` - -### The natural numbers is a fixpoint to the functor `X ↦ 1 + X` - -```agda -map-equiv-ℕ : ℕ → unit + ℕ -map-equiv-ℕ zero-ℕ = inl star -map-equiv-ℕ (succ-ℕ n) = inr n - -map-inv-equiv-ℕ : unit + ℕ → ℕ -map-inv-equiv-ℕ (inl x) = zero-ℕ -map-inv-equiv-ℕ (inr n) = succ-ℕ n - -is-retraction-map-inv-equiv-ℕ : - ( map-inv-equiv-ℕ ∘ map-equiv-ℕ) ~ id -is-retraction-map-inv-equiv-ℕ zero-ℕ = refl -is-retraction-map-inv-equiv-ℕ (succ-ℕ n) = refl - -is-section-map-inv-equiv-ℕ : - ( map-equiv-ℕ ∘ map-inv-equiv-ℕ) ~ id -is-section-map-inv-equiv-ℕ (inl star) = refl -is-section-map-inv-equiv-ℕ (inr n) = refl - -equiv-ℕ : ℕ ≃ (unit + ℕ) -pr1 equiv-ℕ = map-equiv-ℕ -pr2 equiv-ℕ = - is-equiv-is-invertible - map-inv-equiv-ℕ - is-section-map-inv-equiv-ℕ - is-retraction-map-inv-equiv-ℕ -``` - ## See also - The based induction principle is defined in diff --git a/src/elementary-number-theory/parity-natural-numbers.lagda.md b/src/elementary-number-theory/parity-natural-numbers.lagda.md index 2d03ec41d7..78da36cfb4 100644 --- a/src/elementary-number-theory/parity-natural-numbers.lagda.md +++ b/src/elementary-number-theory/parity-natural-numbers.lagda.md @@ -8,6 +8,7 @@ module elementary-number-theory.parity-natural-numbers where ```agda open import elementary-number-theory.divisibility-natural-numbers +open import elementary-number-theory.equality-natural-numbers open import elementary-number-theory.modular-arithmetic-standard-finite-types open import elementary-number-theory.multiplication-natural-numbers open import elementary-number-theory.natural-numbers diff --git a/src/elementary-number-theory/peano-arithmetic.lagda.md b/src/elementary-number-theory/peano-arithmetic.lagda.md new file mode 100644 index 0000000000..cb43d0bc30 --- /dev/null +++ b/src/elementary-number-theory/peano-arithmetic.lagda.md @@ -0,0 +1,159 @@ +# Peano arithmetic + +```agda +module elementary-number-theory.peano-arithmetic where +``` + +
Imports + +```agda +open import elementary-number-theory.natural-numbers + +open import foundation.dependent-pair-types +open import foundation.function-types +open import foundation.identity-types +open import foundation.logical-equivalences +open import foundation.negated-equality +open import foundation.propositions +open import foundation.universe-levels +``` + +
+ +## Axioms + +We state the Peano axioms in type theory, using the +[identity type](foundation-core.identity-types.md) as equality, and prove that +they hold for the +[natural numbers `ℕ`](elementary-number-theory.natural-numbers.md). + +### Peano's 1st axiom + +There is an element **zero** of the natural numbers. + +```agda +peano-axiom-1 : {l : Level} → UU l → UU l +peano-axiom-1 N = N + +peano-1-ℕ : peano-axiom-1 ℕ +peano-1-ℕ = zero-ℕ +``` + +## Peano's 2nd axiom + +The identity relation on the natural numbers is reflexive. + +```agda +peano-axiom-2 : {l : Level} → UU l → UU l +peano-axiom-2 N = (x : N) → x = x + +peano-2-ℕ : peano-axiom-2 ℕ +peano-2-ℕ x = refl +``` + +### Peano's 3rd axiom + +The identity relation on the natural numbers is symmetric. + +```agda +peano-axiom-3 : {l : Level} → UU l → UU l +peano-axiom-3 N = (x y : N) → x = y → y = x + +peano-3-ℕ : peano-axiom-3 ℕ +peano-3-ℕ x y = inv +``` + +### Peano's 4th axiom + +The identity relation on the natural numbers is transitive. + +```agda +peano-axiom-4 : {l : Level} → UU l → UU l +peano-axiom-4 N = (x y z : N) → y = z → x = y → x = z + +peano-4-ℕ : peano-axiom-4 ℕ +peano-4-ℕ x y z = concat' x +``` + +### Peano's 5th axiom + +The 5th axiom of peano's arithmetic states that for every `x` and `y`, if +`x = y` and `y` is a natural number, then `x` is a natural number. This axiom +does not make sense in type theory, as every element by definition lives in a +specified type. + +### Peano's 6th axiom + +For every natural number, there is a **successor** natural number. + +```agda +peano-axiom-6 : {l : Level} → UU l → UU l +peano-axiom-6 N = N → N + +peano-6-ℕ : peano-axiom-6 ℕ +peano-6-ℕ = succ-ℕ +``` + +### Peano's 7th axiom + +For two natural numbers `x` and `y`, if the successor of `x` is identified with +the successor of `y`, then `x` is identified with `y`. + +```agda +peano-axiom-7 : {l : Level} (N : UU l) → peano-axiom-6 N → UU l +peano-axiom-7 N succ = (x y : N) → (x = y) ↔ (succ x = succ y) + +peano-7-ℕ : peano-axiom-7 ℕ peano-6-ℕ +pr1 (peano-7-ℕ x y) refl = refl +pr2 (peano-7-ℕ x y) = is-injective-succ-ℕ +``` + +### Peano's 8th axiom + +The zero natural number may not be identified with any successor natural number. + +```agda +peano-axiom-8 : + {l : Level} (N : UU l) → peano-axiom-1 N → peano-axiom-6 N → UU l +peano-axiom-8 N zero succ = (x : N) → succ x ≠ zero + +peano-8-ℕ : peano-axiom-8 ℕ peano-1-ℕ peano-6-ℕ +peano-8-ℕ = is-nonzero-succ-ℕ +``` + +### Peano's 9th axiom + +The natural numbers satisfy the following +[propositional](foundation-core.propositions.md) induction principle: + +Given a predicate on the natural numbers `P : N → Prop`, if + +- `P zero` holds, + +and + +- if `P x` holds then `P (succ x)` holds, + +then `P x` holds for all natural numbers `x`. + +```agda +peano-axiom-9 : + {l : Level} (N : UU l) → peano-axiom-1 N → peano-axiom-6 N → UUω +peano-axiom-9 N zero succ = + {l' : Level} (P : N → Prop l') → + type-Prop (P zero) → + ((x : N) → type-Prop (P x) → type-Prop (P (succ x))) → + ((x : N) → type-Prop (P x)) + +peano-9-ℕ : peano-axiom-9 ℕ peano-1-ℕ peano-6-ℕ +peano-9-ℕ P = ind-ℕ {P = type-Prop ∘ P} +``` + +## External links + +- [Peano arithmetic](https://ncatlab.org/nlab/show/Peano+arithmetic) at nlab +- [Peano axioms](https://www.wikidata.org/wiki/Q842755) at Wikidata +- [Peano axioms](https://www.britannica.com/science/Peano-axioms) at Britannica +- [Peano axioms](https://en.wikipedia.org/wiki/Peano_axioms) at Wikipedia +- [Peano's Axioms](https://mathworld.wolfram.com/PeanosAxioms.html) at Wolfram + Mathworld diff --git a/src/elementary-number-theory/poset-of-natural-numbers-ordered-by-divisibility.lagda.md b/src/elementary-number-theory/poset-of-natural-numbers-ordered-by-divisibility.lagda.md index 79e1694477..4977a5e18b 100644 --- a/src/elementary-number-theory/poset-of-natural-numbers-ordered-by-divisibility.lagda.md +++ b/src/elementary-number-theory/poset-of-natural-numbers-ordered-by-divisibility.lagda.md @@ -10,6 +10,7 @@ module ```agda open import elementary-number-theory.divisibility-natural-numbers +open import elementary-number-theory.equality-natural-numbers open import elementary-number-theory.multiplication-natural-numbers open import elementary-number-theory.natural-numbers diff --git a/src/elementary-number-theory/strong-induction-natural-numbers.lagda.md b/src/elementary-number-theory/strong-induction-natural-numbers.lagda.md index 238d234dc4..5d18f2317f 100644 --- a/src/elementary-number-theory/strong-induction-natural-numbers.lagda.md +++ b/src/elementary-number-theory/strong-induction-natural-numbers.lagda.md @@ -7,6 +7,7 @@ module elementary-number-theory.strong-induction-natural-numbers where
Imports ```agda +open import elementary-number-theory.equality-natural-numbers open import elementary-number-theory.inequality-natural-numbers open import elementary-number-theory.natural-numbers diff --git a/src/elementary-number-theory/type-arithmetic-natural-numbers.lagda.md b/src/elementary-number-theory/type-arithmetic-natural-numbers.lagda.md index fa66b213b0..eb7b538f25 100644 --- a/src/elementary-number-theory/type-arithmetic-natural-numbers.lagda.md +++ b/src/elementary-number-theory/type-arithmetic-natural-numbers.lagda.md @@ -31,6 +31,7 @@ open import foundation-core.cartesian-product-types open import foundation-core.coproduct-types open import foundation-core.empty-types open import foundation-core.equivalences +open import foundation-core.homotopies open import foundation-core.identity-types open import foundation-core.injective-maps open import foundation-core.negation @@ -46,6 +47,36 @@ We prove arithmetical laws involving the natural numbers ## Laws +### The natural numbers is a fixpoint to the functor `X ↦ 1 + X` + +```agda +map-equiv-ℕ : ℕ → unit + ℕ +map-equiv-ℕ zero-ℕ = inl star +map-equiv-ℕ (succ-ℕ n) = inr n + +map-inv-equiv-ℕ : unit + ℕ → ℕ +map-inv-equiv-ℕ (inl x) = zero-ℕ +map-inv-equiv-ℕ (inr n) = succ-ℕ n + +is-retraction-map-inv-equiv-ℕ : + ( map-inv-equiv-ℕ ∘ map-equiv-ℕ) ~ id +is-retraction-map-inv-equiv-ℕ zero-ℕ = refl +is-retraction-map-inv-equiv-ℕ (succ-ℕ n) = refl + +is-section-map-inv-equiv-ℕ : + ( map-equiv-ℕ ∘ map-inv-equiv-ℕ) ~ id +is-section-map-inv-equiv-ℕ (inl star) = refl +is-section-map-inv-equiv-ℕ (inr n) = refl + +equiv-ℕ : ℕ ≃ (unit + ℕ) +pr1 equiv-ℕ = map-equiv-ℕ +pr2 equiv-ℕ = + is-equiv-is-invertible + map-inv-equiv-ℕ + is-section-map-inv-equiv-ℕ + is-retraction-map-inv-equiv-ℕ +``` + ### The coproduct `ℕ + ℕ` is equivalent to `ℕ` ```agda diff --git a/src/lists/functoriality-lists.lagda.md b/src/lists/functoriality-lists.lagda.md index fe70813734..ce61ae6805 100644 --- a/src/lists/functoriality-lists.lagda.md +++ b/src/lists/functoriality-lists.lagda.md @@ -7,6 +7,7 @@ module lists.functoriality-lists where
Imports ```agda +open import elementary-number-theory.equality-natural-numbers open import elementary-number-theory.natural-numbers open import foundation.action-on-identifications-functions diff --git a/src/lists/permutation-lists.lagda.md b/src/lists/permutation-lists.lagda.md index 875d7f1700..46e1953a89 100644 --- a/src/lists/permutation-lists.lagda.md +++ b/src/lists/permutation-lists.lagda.md @@ -7,6 +7,7 @@ module lists.permutation-lists where
Imports ```agda +open import elementary-number-theory.equality-natural-numbers open import elementary-number-theory.natural-numbers open import finite-group-theory.permutations-standard-finite-types diff --git a/src/set-theory/baire-space.lagda.md b/src/set-theory/baire-space.lagda.md index f039035726..805f0d48df 100644 --- a/src/set-theory/baire-space.lagda.md +++ b/src/set-theory/baire-space.lagda.md @@ -7,6 +7,7 @@ module set-theory.baire-space where
Imports ```agda +open import elementary-number-theory.equality-natural-numbers open import elementary-number-theory.natural-numbers open import foundation.action-on-identifications-functions diff --git a/src/set-theory/countable-sets.lagda.md b/src/set-theory/countable-sets.lagda.md index 44accd6a8c..7a878b8886 100644 --- a/src/set-theory/countable-sets.lagda.md +++ b/src/set-theory/countable-sets.lagda.md @@ -7,6 +7,7 @@ module set-theory.countable-sets where
Imports ```agda +open import elementary-number-theory.equality-natural-numbers open import elementary-number-theory.integers open import elementary-number-theory.natural-numbers open import elementary-number-theory.type-arithmetic-natural-numbers diff --git a/src/univalent-combinatorics/2-element-types.lagda.md b/src/univalent-combinatorics/2-element-types.lagda.md index ea0b36608d..8b5d4f8be9 100644 --- a/src/univalent-combinatorics/2-element-types.lagda.md +++ b/src/univalent-combinatorics/2-element-types.lagda.md @@ -7,6 +7,7 @@ module univalent-combinatorics.2-element-types where
Imports ```agda +open import elementary-number-theory.equality-natural-numbers open import elementary-number-theory.modular-arithmetic-standard-finite-types open import elementary-number-theory.natural-numbers diff --git a/src/univalent-combinatorics/standard-finite-types.lagda.md b/src/univalent-combinatorics/standard-finite-types.lagda.md index 79ed19d89b..ee86b556ee 100644 --- a/src/univalent-combinatorics/standard-finite-types.lagda.md +++ b/src/univalent-combinatorics/standard-finite-types.lagda.md @@ -7,6 +7,7 @@ module univalent-combinatorics.standard-finite-types where
Imports ```agda +open import elementary-number-theory.equality-natural-numbers open import elementary-number-theory.inequality-natural-numbers open import elementary-number-theory.natural-numbers open import elementary-number-theory.strict-inequality-natural-numbers From 3a845b2d938bfe099931b92736ad472ac41544c6 Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Sun, 22 Oct 2023 01:26:56 +0200 Subject: [PATCH 04/49] Iterated type families (#797) This is an experimental attempt to get some sort of uniform treatment of iterated type families going. Work in progress, and ideas are very welcome. --------- Co-authored-by: Fredrik Bakke --- src/category-theory/groupoids.lagda.md | 12 +- src/foundation-core/homotopies.lagda.md | 5 +- src/foundation.lagda.md | 5 + src/foundation/binary-relations.lagda.md | 7 +- src/foundation/dependent-telescopes.lagda.md | 102 ++ src/foundation/empty-types.lagda.md | 4 +- .../equality-coproduct-types.lagda.md | 2 +- src/foundation/homotopies.lagda.md | 6 +- .../iterated-dependent-pair-types.lagda.md | 102 ++ .../iterated-dependent-product-types.lagda.md | 154 +++ .../multivariable-homotopies.lagda.md | 85 ++ src/foundation/path-split-maps.lagda.md | 11 +- src/foundation/telescopes.lagda.md | 883 ++++++++++++++++++ src/trees.lagda.md | 10 + src/trees/bounded-multisets.lagda.md | 115 +++ src/trees/empty-multisets.lagda.md | 69 ++ ...dexed-dependent-products-of-types.lagda.md | 38 + src/trees/multisets.lagda.md | 11 +- src/trees/universal-tree.lagda.md | 50 + 19 files changed, 1649 insertions(+), 22 deletions(-) create mode 100644 src/foundation/dependent-telescopes.lagda.md create mode 100644 src/foundation/iterated-dependent-pair-types.lagda.md create mode 100644 src/foundation/iterated-dependent-product-types.lagda.md create mode 100644 src/foundation/multivariable-homotopies.lagda.md create mode 100644 src/foundation/telescopes.lagda.md create mode 100644 src/trees/bounded-multisets.lagda.md create mode 100644 src/trees/empty-multisets.lagda.md create mode 100644 src/trees/multiset-indexed-dependent-products-of-types.lagda.md create mode 100644 src/trees/universal-tree.lagda.md diff --git a/src/category-theory/groupoids.lagda.md b/src/category-theory/groupoids.lagda.md index b582d6ef84..1a6a69141c 100644 --- a/src/category-theory/groupoids.lagda.md +++ b/src/category-theory/groupoids.lagda.md @@ -22,6 +22,7 @@ open import foundation.function-types open import foundation.functoriality-dependent-pair-types open import foundation.fundamental-theorem-of-identity-types open import foundation.identity-types +open import foundation.iterated-dependent-pair-types open import foundation.propositions open import foundation.sets open import foundation.type-arithmetic-dependent-pair-types @@ -151,16 +152,15 @@ module _ ( λ yp → Σ ( Σ (pr1 yp = x) (λ q → (q ∙ pr2 yp) = refl)) ( λ ql → (pr2 yp ∙ pr1 ql) = refl)))) - ( is-contr-Σ - ( is-torsorial-path x) - ( x , refl) - ( is-contr-Σ + ( is-contr-iterated-Σ 2 + ( is-torsorial-path x , + ( x , refl) , ( is-contr-equiv ( Σ (x = x) (λ q → q = refl)) ( equiv-tot ( λ q → equiv-concat (inv right-unit) refl)) - ( is-torsorial-path' refl)) - ( refl , refl) + ( is-torsorial-path' refl)) , + ( refl , refl) , ( is-proof-irrelevant-is-prop ( is-1-type-type-1-Type X x x refl refl) ( refl))))) diff --git a/src/foundation-core/homotopies.lagda.md b/src/foundation-core/homotopies.lagda.md index 98d62c6957..de3ee5e483 100644 --- a/src/foundation-core/homotopies.lagda.md +++ b/src/foundation-core/homotopies.lagda.md @@ -336,5 +336,6 @@ syntax step-homotopy-reasoning p h q = p ~ h by q - We postulate that homotopies characterize identifications of (dependent) functions in the file [`foundation-core.function-extensionality`](foundation-core.function-extensionality.md). -- The whiskering operations on homotopies are defined in the file - [`foundation.whiskering-homotopies`](foundation.whiskering-homotopies.md). +- [Multivariable homotopies](foundation.multivariable-homotopies.md). +- The [whiskering operations](foundation.whiskering-homotopies.md) on + homotopies. diff --git a/src/foundation.lagda.md b/src/foundation.lagda.md index bd2b7271aa..98b8aa8bd7 100644 --- a/src/foundation.lagda.md +++ b/src/foundation.lagda.md @@ -86,6 +86,7 @@ open import foundation.dependent-epimorphisms public open import foundation.dependent-identifications public open import foundation.dependent-pair-types public open import foundation.dependent-sequences public +open import foundation.dependent-telescopes public open import foundation.dependent-towers public open import foundation.descent-coproduct-types public open import foundation.descent-dependent-pair-types public @@ -169,6 +170,8 @@ open import foundation.involutions public open import foundation.isolated-elements public open import foundation.isomorphisms-of-sets public open import foundation.iterated-cartesian-product-types public +open import foundation.iterated-dependent-pair-types public +open import foundation.iterated-dependent-product-types public open import foundation.iterating-automorphisms public open import foundation.iterating-functions public open import foundation.iterating-involutions public @@ -196,6 +199,7 @@ open import foundation.multisubsets public open import foundation.multivariable-correspondences public open import foundation.multivariable-decidable-relations public open import foundation.multivariable-functoriality-set-quotients public +open import foundation.multivariable-homotopies public open import foundation.multivariable-operations public open import foundation.multivariable-relations public open import foundation.negated-equality public @@ -279,6 +283,7 @@ open import foundation.symmetric-cores-binary-relations public open import foundation.symmetric-difference public open import foundation.symmetric-identity-types public open import foundation.symmetric-operations public +open import foundation.telescopes public open import foundation.tight-apartness-relations public open import foundation.torsorial-type-families public open import foundation.towers public diff --git a/src/foundation/binary-relations.lagda.md b/src/foundation/binary-relations.lagda.md index f38f5f8d1b..a8d57fb25c 100644 --- a/src/foundation/binary-relations.lagda.md +++ b/src/foundation/binary-relations.lagda.md @@ -10,6 +10,8 @@ module foundation.binary-relations where open import foundation.dependent-pair-types open import foundation.equality-dependent-function-types open import foundation.fundamental-theorem-of-identity-types +open import foundation.iterated-dependent-product-types +open import foundation.propositions open import foundation.subtypes open import foundation.univalence open import foundation.universe-levels @@ -18,7 +20,6 @@ open import foundation-core.cartesian-product-types open import foundation-core.contractible-types open import foundation-core.equivalences open import foundation-core.identity-types -open import foundation-core.propositions open import foundation-core.torsorial-type-families ``` @@ -102,8 +103,8 @@ module _ is-prop-is-symmetric-Relation-Prop : is-prop is-symmetric-Relation-Prop is-prop-is-symmetric-Relation-Prop = - is-prop-Π² - ( λ x y → is-prop-function-type (is-prop-type-Relation-Prop R y x)) + is-prop-iterated-Π 3 + ( λ x y r → is-prop-type-Relation-Prop R y x) is-transitive-Relation-Prop : UU (l1 ⊔ l2) is-transitive-Relation-Prop = is-transitive (type-Relation-Prop R) diff --git a/src/foundation/dependent-telescopes.lagda.md b/src/foundation/dependent-telescopes.lagda.md new file mode 100644 index 0000000000..6ce1023857 --- /dev/null +++ b/src/foundation/dependent-telescopes.lagda.md @@ -0,0 +1,102 @@ +# Dependent telescopes + +```agda +module foundation.dependent-telescopes where +``` + +
Imports + +```agda +open import elementary-number-theory.multiplication-natural-numbers +open import elementary-number-theory.natural-numbers + +open import foundation.dependent-pair-types +open import foundation.telescopes +open import foundation.universe-levels +``` + +
+ +## Idea + +A **dependent telescope** over a [telescope](foundation.telescopes.md) `A` of +length `n` is a dependent list of dependent types over each of the entries in +`A`. For example, a dependent telescope over the telescope + +```text + A₀ : 𝒰 l₀ + A₁ : A₀ → 𝒰 l₁ + A₂ : (x₀ : A₀) → A₁ x₀ → 𝒰 l₂ +``` + +consists of + +```text + B₀ : A₀ → 𝒰 k₀ + B₁ : (x₀ : A₀) (x₁ : A₁ x₀) → B₀ x₀ → UU k₁ + B₂ : (x₀ : A₀) (x₁ : A₁ x₀) (x₂ : A₂ x₀ x₁) (y₀ : B x₀) → B₁ x₀ → UU k₂ +``` + +## Definitions + +### Dependent telescopes + +```agda +data + dependent-telescope : + {l : Level} (k : Level) → {n : ℕ} → telescope l n → UUω + where + base-dependent-telescope : + {l1 k1 : Level} {A : UU l1} → (A → UU k1) → + dependent-telescope k1 (base-telescope A) + cons-dependent-telescope : + {l1 l2 k1 k2 : Level} {n : ℕ} {X : UU l1} {A : X → telescope l2 n} + {Y : X → UU k1} (B : (x : X) → Y x → dependent-telescope k2 (A x)) → + dependent-telescope (k1 ⊔ k2) (cons-telescope A) +``` + +### Expansion of telescopes + +An **expansion** of a telescope `A` by a dependent telescope `B` over it is a +new telescope of the same length as `A`, constructed by taking +[dependent pairs](foundation.dependent-pair-types.md) componentwise. + +```agda +expand-telescope : + {l1 l2 : Level} {n : ℕ} {A : telescope l1 n} → + dependent-telescope l2 A → telescope (l1 ⊔ l2) n +expand-telescope (base-dependent-telescope Y) = + base-telescope (Σ _ Y) +expand-telescope (cons-dependent-telescope B) = + cons-telescope (λ x → expand-telescope (B (pr1 x) (pr2 x))) +``` + +### Interleaving telescopes + +Given a telescope `A` of length `n` and a dependent telescope `B` over it, we +can define the **interleaved telescope** whose length is `2n`. + +```agda +interleave-telescope : + {l1 l2 : Level} {n : ℕ} {A : telescope l1 n} → + dependent-telescope l2 A → telescope (l1 ⊔ l2) (succ-ℕ (n *ℕ 2)) +interleave-telescope (base-dependent-telescope A) = + cons-telescope (λ x → base-telescope (A x)) +interleave-telescope (cons-dependent-telescope B) = + cons-telescope (λ x → cons-telescope λ y → interleave-telescope (B x y)) +``` + +### Mapping telescopes + +Given a telescope `A` and a dependent telescope `B` over it, we can define the +**mapping telescope** by taking dependent function types componentwise. + +```agda +telescope-Π : + {l1 l2 : Level} {n : ℕ} {A : telescope l1 n} → + dependent-telescope l2 A → telescope (l1 ⊔ l2) n +telescope-Π (base-dependent-telescope Y) = + base-telescope ((x : _) → Y x) +telescope-Π (cons-dependent-telescope B) = + cons-telescope (λ x → telescope-Π (B (pr1 x) (pr2 x))) +``` diff --git a/src/foundation/empty-types.lagda.md b/src/foundation/empty-types.lagda.md index 5f689d7bfa..f96f8a47e3 100644 --- a/src/foundation/empty-types.lagda.md +++ b/src/foundation/empty-types.lagda.md @@ -13,15 +13,17 @@ open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.equivalences open import foundation.propositional-truncations +open import foundation.propositions open import foundation.raising-universe-levels open import foundation.subuniverses +open import foundation.truncated-types +open import foundation.truncation-levels open import foundation.univalence open import foundation.universe-levels open import foundation-core.contractible-types open import foundation-core.equality-dependent-pair-types open import foundation-core.function-types -open import foundation-core.propositions ```
diff --git a/src/foundation/equality-coproduct-types.lagda.md b/src/foundation/equality-coproduct-types.lagda.md index fc02f6ebd6..aca0640a80 100644 --- a/src/foundation/equality-coproduct-types.lagda.md +++ b/src/foundation/equality-coproduct-types.lagda.md @@ -9,6 +9,7 @@ module foundation.equality-coproduct-types where ```agda open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types +open import foundation.empty-types open import foundation.fundamental-theorem-of-identity-types open import foundation.negated-equality open import foundation.universe-levels @@ -16,7 +17,6 @@ open import foundation.universe-levels open import foundation-core.contractible-types open import foundation-core.coproduct-types open import foundation-core.embeddings -open import foundation-core.empty-types open import foundation-core.equivalences open import foundation-core.function-types open import foundation-core.functoriality-dependent-pair-types diff --git a/src/foundation/homotopies.lagda.md b/src/foundation/homotopies.lagda.md index 8a633d18f8..ceb2020f8b 100644 --- a/src/foundation/homotopies.lagda.md +++ b/src/foundation/homotopies.lagda.md @@ -311,6 +311,6 @@ module _ ## See also -- We postulate that homotopies characterize identifications in (dependent) - function types in the file - [`foundation-core.function-extensionality`](foundation-core.function-extensionality.md). +- [Multivariable homotopies](foundation.multivariable-homotopies.md). +- The [whiskering operations](foundation.whiskering-homotopies.md) on + homotopies. diff --git a/src/foundation/iterated-dependent-pair-types.lagda.md b/src/foundation/iterated-dependent-pair-types.lagda.md new file mode 100644 index 0000000000..1aea0c9bec --- /dev/null +++ b/src/foundation/iterated-dependent-pair-types.lagda.md @@ -0,0 +1,102 @@ +# Iterated dependent pair types + +```agda +module foundation.iterated-dependent-pair-types where + +open import foundation.telescopes public +``` + +
Imports + +```agda +open import elementary-number-theory.natural-numbers + +open import foundation.dependent-pair-types +open import foundation.universe-levels + +open import foundation-core.cartesian-product-types +open import foundation-core.contractible-types +``` + +
+ +## Idea + +**Iterated dependent pair types** are defined by iteratively applying the +[dependent pair](foundation.dependent-pair-types.md) operator `Σ`. More +formally, `iterated-Σ` is defined as an operation `telescope l n → UU l` from +the type of [telescopes](foundation.telescopes.md) to the universe of types of +universe level `l`. For example, the iterated dependent pair type of the +telescope + +```text + A₀ : 𝒰 l₀ + A₁ : A₀ → 𝒰 l₁ + A₂ : (x₀ : A₀) → A₁ x₀ → 𝒰 l₂ + A₃ : (x₀ : A₀) (x₁ : A₁ x₀) → A₂ x₀ x₁ → 𝒰 l₃ +``` + +is the dependent pair type + +```text + Σ A₀ (λ x₀ → Σ (A₁ x₀) (λ x₁ → Σ (A₂ x₀ x₁) (A₃ x₀ x₁))) +``` + +of universe level `l₀ ⊔ l₁ ⊔ l₂ ⊔ l₃`. + +## Definitions + +### Iterated dependent products of iterated type families + +```agda +iterated-Σ : {l : Level} {n : ℕ} → telescope l n → UU l +iterated-Σ (base-telescope A) = A +iterated-Σ (cons-telescope A) = Σ _ (λ x → iterated-Σ (A x)) +``` + +### Iterated elements of iterated type families + +```agda +data + iterated-element : {l : Level} {n : ℕ} → telescope l n → UUω + where + base-iterated-element : + {l1 : Level} {A : UU l1} → A → iterated-element (base-telescope A) + cons-iterated-element : + {l1 l2 : Level} {n : ℕ} {X : UU l1} {Y : X → telescope l2 n} → + (x : X) → iterated-element (Y x) → iterated-element (cons-telescope Y) +``` + +### Iterated pairing + +```agda +iterated-pair : + {l : Level} {n : ℕ} {A : telescope l n} → + iterated-element A → iterated-Σ A +iterated-pair (base-iterated-element x) = x +pr1 (iterated-pair (cons-iterated-element y a)) = y +pr2 (iterated-pair (cons-iterated-element y a)) = iterated-pair a +``` + +## Properties + +### Contractiblity of iterated Σ-types + +```agda +is-contr-Σ-telescope : {l : Level} {n : ℕ} → telescope l n → UU l +is-contr-Σ-telescope (base-telescope A) = is-contr A +is-contr-Σ-telescope (cons-telescope A) = + (is-contr X) × (Σ X (λ x → is-contr-Σ-telescope (A x))) + where X = _ + +is-contr-iterated-Σ : + {l : Level} (n : ℕ) {{A : telescope l n}} → + is-contr-Σ-telescope A → is-contr (iterated-Σ A) +is-contr-iterated-Σ ._ {{base-telescope A}} is-contr-A = is-contr-A +is-contr-iterated-Σ ._ {{cons-telescope A}} (is-contr-X , x , H) = + is-contr-Σ is-contr-X x (is-contr-iterated-Σ _ {{A x}} H) +``` + +## See also + +- [Iterated Π-types](foundation.iterated-dependent-product-types.md) diff --git a/src/foundation/iterated-dependent-product-types.lagda.md b/src/foundation/iterated-dependent-product-types.lagda.md new file mode 100644 index 0000000000..17879e23f3 --- /dev/null +++ b/src/foundation/iterated-dependent-product-types.lagda.md @@ -0,0 +1,154 @@ +# Iterated dependent product types + +```agda +module foundation.iterated-dependent-product-types where + +open import foundation.telescopes public +``` + +
Imports + +```agda +open import elementary-number-theory.natural-numbers + +open import foundation.universe-levels + +open import foundation-core.contractible-types +open import foundation-core.propositions +open import foundation-core.truncated-types +open import foundation-core.truncation-levels +``` + +
+ +## Idea + +**Iterated dependent products** are defined by iteratively applying the built in +dependent function type operator. More formally, `iterated-Π` is defined as an +operation `telescope l n → UU l` from the type of +[telescopes](foundation.telescopes.md) to the universe of types of universe +level `l`. For example, the iterated dependent product of the telescope + +```text + A₀ : 𝒰 l₀ + A₁ : A₀ → 𝒰 l₁ + A₂ : (x₀ : A₀) → A₁ x₀ → 𝒰 l₂ + A₃ : (x₀ : A₀) (x₁ : A₁ x₀) → A₂ x₀ x₁ → 𝒰 l₃ +``` + +is the dependent product type + +```text + (x₀ : A₀) (x₁ : A₁ x₀) (x₂ : A₂ x₀ x₁) → A₃ x₀ x₁ x₂ +``` + +of universe level `l₀ ⊔ l₁ ⊔ l₂ ⊔ l₃`. + +## Definitions + +### Iterated dependent products of iterated type families + +```agda +iterated-Π : + {l : Level} {n : ℕ} → telescope l n → UU l +iterated-Π (base-telescope A) = A +iterated-Π (cons-telescope A) = (x : _) → iterated-Π (A x) + +iterated-implicit-Π : + {l : Level} {n : ℕ} → telescope l n → UU l +iterated-implicit-Π (base-telescope A) = A +iterated-implicit-Π (cons-telescope A) = {x : _} → iterated-implicit-Π (A x) +``` + +### Iterated sections of type families + +```agda +data + iterated-section : {l : Level} {n : ℕ} → telescope l n → UUω + where + base-iterated-section : + {l1 : Level} {A : UU l1} → A → iterated-section (base-telescope A) + cons-iterated-section : + {l1 l2 : Level} {n : ℕ} {X : UU l1} {Y : X → telescope l2 n} → + ((x : X) → iterated-section (Y x)) → iterated-section (cons-telescope Y) +``` + +### Iterated λ-abstractions + +```agda +iterated-λ : + {l : Level} {n : ℕ} {A : telescope l n} → + iterated-section A → iterated-Π A +iterated-λ (base-iterated-section a) = a +iterated-λ (cons-iterated-section f) x = iterated-λ (f x) +``` + +### Transforming iterated products + +Given an operation on universes, we can apply it at the codomain of the iterated +product. + +```agda +apply-codomain-iterated-Π : + {l1 : Level} {n : ℕ} + (P : {l : Level} → UU l → UU l) → telescope l1 n → UU l1 +apply-codomain-iterated-Π P A = iterated-Π (apply-base-telescope P A) + +apply-codomain-iterated-implicit-Π : + {l1 : Level} {n : ℕ} + (P : {l : Level} → UU l → UU l) → telescope l1 n → UU l1 +apply-codomain-iterated-implicit-Π P A = + iterated-implicit-Π (apply-base-telescope P A) +``` + +## Properties + +### If a dependent product satisfies a property if its codomain does, then iterated dependent products satisfy that property if the codomain does + +```agda +section-iterated-Π-section-Π-section-codomain : + (P : {l : Level} → UU l → UU l) → + ( {l1 l2 : Level} {A : UU l1} {B : A → UU l2} → + ((x : A) → P (B x)) → P ((x : A) → B x)) → + {l : Level} (n : ℕ) {{A : telescope l n}} → + apply-codomain-iterated-Π P A → P (iterated-Π A) +section-iterated-Π-section-Π-section-codomain P f ._ {{base-telescope A}} H = + H +section-iterated-Π-section-Π-section-codomain P f ._ {{cons-telescope A}} H = + f (λ x → section-iterated-Π-section-Π-section-codomain P f _ {{A x}} (H x)) +``` + +### Iterated products of contractible types is contractible + +```agda +is-contr-iterated-Π : + {l : Level} (n : ℕ) {{A : telescope l n}} → + apply-codomain-iterated-Π is-contr A → is-contr (iterated-Π A) +is-contr-iterated-Π = + section-iterated-Π-section-Π-section-codomain is-contr is-contr-Π +``` + +### Iterated products of propositions are propositions + +```agda +is-prop-iterated-Π : + {l : Level} (n : ℕ) {{A : telescope l n}} → + apply-codomain-iterated-Π is-prop A → is-prop (iterated-Π A) +is-prop-iterated-Π = + section-iterated-Π-section-Π-section-codomain is-prop is-prop-Π +``` + +### Iterated products of truncated types are truncated + +```agda +is-trunc-iterated-Π : + {l : Level} (k : 𝕋) (n : ℕ) {{A : telescope l n}} → + apply-codomain-iterated-Π (is-trunc k) A → is-trunc k (iterated-Π A) +is-trunc-iterated-Π k = + section-iterated-Π-section-Π-section-codomain (is-trunc k) (is-trunc-Π k) +``` + +## See also + +- [Iterated Σ-types](foundation.iterated-dependent-pair-types.md) +- [Multivariable homotopies](foundation.multivariable-homotopies.md) diff --git a/src/foundation/multivariable-homotopies.lagda.md b/src/foundation/multivariable-homotopies.lagda.md new file mode 100644 index 0000000000..dcb6b9cc61 --- /dev/null +++ b/src/foundation/multivariable-homotopies.lagda.md @@ -0,0 +1,85 @@ +# Multivariable homotopies + +```agda +module foundation.multivariable-homotopies where + +open import foundation.telescopes public +``` + +
Imports + +```agda +open import elementary-number-theory.natural-numbers + +open import foundation.function-extensionality +open import foundation.iterated-dependent-product-types +open import foundation.universe-levels + +open import foundation-core.contractible-types +open import foundation-core.equivalences +open import foundation-core.functoriality-dependent-function-types +open import foundation-core.identity-types +open import foundation-core.propositions +open import foundation-core.truncated-types +open import foundation-core.truncation-levels +``` + +
+ +## Idea + +Given an +[iterated dependent product](foundation.iterated-dependent-product-types.md) we +can consider [homotopies](foundation-core.homotopies.md) of its elements. By +[function extensionality](foundation.function-extensionality.md), +**multivariable homotopies** are [equivalent](foundation-core.equivalences.md) +to [identifications](foundation-core.identity-types.md). + +## Definitions + +### Multivariable homotopies + +```agda +multivariable-htpy : + {l : Level} {n : ℕ} {{A : telescope l n}} (f g : iterated-Π A) → UU l +multivariable-htpy {{base-telescope A}} f g = f = g +multivariable-htpy {{cons-telescope A}} f g = + (x : _) → multivariable-htpy {{A x}} (f x) (g x) +``` + +### Iterated function extensionality + +```agda +refl-multivariable-htpy : + {l : Level} (n : ℕ) {{A : telescope l n}} + {f : iterated-Π A} → multivariable-htpy {{A}} f f +refl-multivariable-htpy .0 {{base-telescope A}} = refl +refl-multivariable-htpy ._ {{cons-telescope A}} x = + refl-multivariable-htpy _ {{A x}} + +multivariable-htpy-eq : + {l : Level} (n : ℕ) {{A : telescope l n}} + {f g : iterated-Π A} → f = g → multivariable-htpy {{A}} f g +multivariable-htpy-eq .0 {{base-telescope A}} p = p +multivariable-htpy-eq ._ {{cons-telescope A}} p x = + multivariable-htpy-eq _ {{A x}} (htpy-eq p x) + +eq-multivariable-htpy : + {l : Level} (n : ℕ) {{A : telescope l n}} + {f g : iterated-Π A} → multivariable-htpy {{A}} f g → f = g +eq-multivariable-htpy .0 {{base-telescope A}} H = H +eq-multivariable-htpy ._ {{cons-telescope A}} H = + eq-htpy (λ x → eq-multivariable-htpy _ {{A x}} (H x)) + +equiv-iterated-funext : + {l : Level} (n : ℕ) {{A : telescope l n}} + {f g : iterated-Π A} → (f = g) ≃ multivariable-htpy {{A}} f g +equiv-iterated-funext .0 {{base-telescope A}} = id-equiv +equiv-iterated-funext ._ {{cons-telescope A}} = + equiv-Π-equiv-family (λ x → equiv-iterated-funext _ {{A x}}) ∘e equiv-funext +``` + +## See also + +- [Binary homotopies](foundation.binary-homotopies.md) for once-iterated + homotopies. diff --git a/src/foundation/path-split-maps.lagda.md b/src/foundation/path-split-maps.lagda.md index d20bcbf853..9397e307b2 100644 --- a/src/foundation/path-split-maps.lagda.md +++ b/src/foundation/path-split-maps.lagda.md @@ -9,11 +9,12 @@ open import foundation-core.path-split-maps public
Imports ```agda +open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.equivalences +open import foundation.iterated-dependent-product-types open import foundation.universe-levels -open import foundation-core.contractible-types open import foundation-core.propositions ``` @@ -36,11 +37,11 @@ module _ ( is-contr-prod ( is-contr-section-is-equiv ( is-equiv-is-path-split f is-path-split-f)) - ( is-contr-Π - ( λ x → is-contr-Π - ( λ y → is-contr-section-is-equiv + ( is-contr-iterated-Π 2 + ( λ x y → + is-contr-section-is-equiv ( is-emb-is-equiv - ( is-equiv-is-path-split f is-path-split-f) x y)))))) + ( is-equiv-is-path-split f is-path-split-f) x y))))) abstract is-equiv-is-path-split-is-equiv : diff --git a/src/foundation/telescopes.lagda.md b/src/foundation/telescopes.lagda.md new file mode 100644 index 0000000000..1d1afb39af --- /dev/null +++ b/src/foundation/telescopes.lagda.md @@ -0,0 +1,883 @@ +# Telescopes + +```agda +module foundation.telescopes where +``` + +
Imports + +```agda +open import elementary-number-theory.natural-numbers + +open import foundation.universe-levels +``` + +
+ +## Idea + +A **telescope**, or **iterated type family**, is a list of type families +`(A₀, A₁, A₂, ..., A_n)` consisting of + +- a type `A₀`, +- a type family `A₁ : A₀ → 𝒰`, +- a type family `A₂ : (x₀ : A₀) → A₁ x₀ → 𝒰`, +- ... +- a type family `A_n : (x₀ : A₀) ... (x_(n-1) : A_(n-1) x₀ ... x_(n-2)) → 𝒰`. + +We say that a telescope `(A₀,...,A_n)` has **length** `n+1`. In other words, the +length of the telescope `(A₀,...,A_n)` is the length of the (dependent) list +`(A₀,...,A_n)`. + +We encode the type of telescopes as a family of inductive types + +```text + telescope : (l : Level) → ℕ → UUω +``` + +The type of telescopes is a [directed tree](trees.directed-trees.md) + +```text + ... → T₃ → T₂ → T₁ → T₀, +``` + +where `T_n` is the type of all telescopes of length `n`, and the map from +`T_(n+1)` to `T_n` maps `(A₀,...,A_n)` to `(A₀,...,A_(n-1))`. The type of such +directed trees can be defined as a coinductive record type, and we will define +the tree `T` of telescopes as a particular element of this tree. + +## Definitions + +### Telescopes + +```agda +data + telescope : (l : Level) → ℕ → UUω + where + base-telescope : + {l1 : Level} → UU l1 → telescope l1 0 + cons-telescope : + {l1 l2 : Level} {n : ℕ} {X : UU l1} → + (X → telescope l2 n) → telescope (l1 ⊔ l2) (succ-ℕ n) + +open telescope public +``` + +### Transformations on telescopes + +Given an operation on universes, we can apply it at the base of the telescope. + +```agda +apply-base-telescope : + {l1 : Level} {n : ℕ} + (P : {l : Level} → UU l → UU l) → telescope l1 n → telescope l1 n +apply-base-telescope P (base-telescope A) = base-telescope (P A) +apply-base-telescope P (cons-telescope A) = + cons-telescope (λ x → apply-base-telescope P (A x)) +``` + +### Telescopes as instance arguments + +To get Agda to infer telescopes, we help it along a little using +[instance arguments](https://agda.readthedocs.io/en/latest/language/instance-arguments.html). +These are a special kind of implicit argument in Agda that are resolved by the +instance resolution algorithm. We register building blocks for this algorithm to +use below, i.e. _instances_. Then Agda will attempt to use those to construct +telescopes of the appropriate kind when asked to. + +In the case of telescopes, this has the unfortunate disadvantage that we can +only define instances for fixed length telescopes. We have defined instances of +telescopes up to length 18, so although Agda cannot infer a telescope of a +general length using this approach, it can infer them up to this given length. + +In the case of telescopes, this has the unfortunate disadvantage that we can +only define instances for fixed length telescopes. We have defined instances of +telescopes up to length 18, so although Agda cannot infer a telescope of a +general length using this approach, it can infer them up to this given length. + +```agda +instance-telescope : {l : Level} {n : ℕ} → {{telescope l n}} → telescope l n +instance-telescope {{x}} = x + +instance + instance-telescope⁰ : {l : Level} {X : UU l} → telescope l 0 + instance-telescope⁰ {X = X} = base-telescope X + + instance-telescope¹ : + { l1 l : Level} {A1 : UU l1} {X : A1 → UU l} → telescope (l1 ⊔ l) 1 + instance-telescope¹ {X = X} = + cons-telescope (λ x → instance-telescope⁰ {X = X x}) + + instance-telescope² : + { l1 l2 l : Level} {A1 : UU l1} {A2 : A1 → UU l2} + { X : (x1 : A1) → A2 x1 → UU l} → telescope (l1 ⊔ l2 ⊔ l) 2 + instance-telescope² {X = X} = + cons-telescope (λ x → instance-telescope¹ {X = X x}) + + instance-telescope³ : + { l1 l2 l3 l : Level} + { A1 : UU l1} {A2 : A1 → UU l2} {A3 : (x1 : A1) → A2 x1 → UU l3} + { X : (x1 : A1) (x2 : A2 x1) (x2 : A3 x1 x2) → UU l} → + telescope (l1 ⊔ l2 ⊔ l3 ⊔ l) 3 + instance-telescope³ {X = X} = + cons-telescope (λ x → instance-telescope² {X = X x}) + + instance-telescope⁴ : + { l1 l2 l3 l4 l : Level} + { A1 : UU l1} {A2 : A1 → UU l2} {A3 : (x1 : A1) → A2 x1 → UU l3} + { A4 : (x1 : A1) (x2 : A2 x1) → A3 x1 x2 → UU l4} + { X : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l} → + telescope (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ l) 4 + instance-telescope⁴ {X = X} = + cons-telescope (λ x → instance-telescope³ {X = X x}) + + instance-telescope⁵ : + { l1 l2 l3 l4 l5 l : Level} + { A1 : UU l1} {A2 : A1 → UU l2} {A3 : (x1 : A1) → A2 x1 → UU l3} + { A4 : (x1 : A1) (x2 : A2 x1) → A3 x1 x2 → UU l4} + { A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} + { X : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) → UU l} → + telescope (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l) 5 + instance-telescope⁵ {X = X} = + cons-telescope (λ x → instance-telescope⁴ {X = X x}) + + instance-telescope⁶ : + { l1 l2 l3 l4 l5 l6 l : Level} + { A1 : UU l1} {A2 : A1 → UU l2} {A3 : (x1 : A1) → A2 x1 → UU l3} + { A4 : (x1 : A1) (x2 : A2 x1) → A3 x1 x2 → UU l4} + { A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} + { A6 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) → UU l6} + { X : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l} → + telescope (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6 ⊔ l) 6 + instance-telescope⁶ {X = X} = + cons-telescope (λ x → instance-telescope⁵ {X = X x}) + + instance-telescope⁷ : + { l1 l2 l3 l4 l5 l6 l7 l : Level} + { A1 : UU l1} {A2 : A1 → UU l2} {A3 : (x1 : A1) → A2 x1 → UU l3} + { A4 : (x1 : A1) (x2 : A2 x1) → A3 x1 x2 → UU l4} + { A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} + { A6 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) → UU l6} + { A7 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l7} + { X : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) → UU l} → + telescope (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6 ⊔ l7 ⊔ l) 7 + instance-telescope⁷ {X = X} = + cons-telescope (λ x → instance-telescope⁶ {X = X x}) + + instance-telescope⁸ : + { l1 l2 l3 l4 l5 l6 l7 l8 l : Level} + { A1 : UU l1} {A2 : A1 → UU l2} {A3 : (x1 : A1) → A2 x1 → UU l3} + { A4 : (x1 : A1) (x2 : A2 x1) → A3 x1 x2 → UU l4} + { A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} + { A6 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) → UU l6} + { A7 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l7} + { A8 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) → UU l8} + { X : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) → UU l} → + telescope (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6 ⊔ l7 ⊔ l8 ⊔ l) 8 + instance-telescope⁸ {X = X} = + cons-telescope (λ x → instance-telescope⁷ {X = X x}) + + instance-telescope⁹ : + { l1 l2 l3 l4 l5 l6 l7 l8 l9 l : Level} + { A1 : UU l1} {A2 : A1 → UU l2} {A3 : (x1 : A1) → A2 x1 → UU l3} + { A4 : (x1 : A1) (x2 : A2 x1) → A3 x1 x2 → UU l4} + { A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} + { A6 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) → UU l6} + { A7 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l7} + { A8 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) → UU l8} + { A9 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) → + UU l9} + { X : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) → UU l} → + telescope (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6 ⊔ l7 ⊔ l8 ⊔ l9 ⊔ l) 9 + instance-telescope⁹ {X = X} = + cons-telescope (λ x → instance-telescope⁸ {X = X x}) + + instance-telescope¹⁰ : + { l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 l : Level} + { A1 : UU l1} {A2 : A1 → UU l2} {A3 : (x1 : A1) → A2 x1 → UU l3} + { A4 : (x1 : A1) (x2 : A2 x1) → A3 x1 x2 → UU l4} + { A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} + { A6 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) → UU l6} + { A7 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l7} + { A8 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) → UU l8} + { A9 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) → + UU l9} + { A10 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) → + UU l10} + { X : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) → + UU l} → + telescope (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6 ⊔ l7 ⊔ l8 ⊔ l9 ⊔ l10 ⊔ l) 10 + instance-telescope¹⁰ {X = X} = + cons-telescope (λ x → instance-telescope⁹ {X = X x}) + + instance-telescope¹¹ : + { l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 l11 l : Level} + { A1 : UU l1} {A2 : A1 → UU l2} {A3 : (x1 : A1) → A2 x1 → UU l3} + { A4 : (x1 : A1) (x2 : A2 x1) → A3 x1 x2 → UU l4} + { A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} + { A6 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) → UU l6} + { A7 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l7} + { A8 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) → UU l8} + { A9 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) → + UU l9} + { A10 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) → + UU l10} + { A11 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) → + UU l11} + { X : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) → UU l} → + telescope (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6 ⊔ l7 ⊔ l8 ⊔ l9 ⊔ l10 ⊔ l11 ⊔ l) 11 + instance-telescope¹¹ {X = X} = + cons-telescope (λ x → instance-telescope¹⁰ {X = X x}) + + instance-telescope¹² : + { l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 l11 l12 l : Level} + { A1 : UU l1} {A2 : A1 → UU l2} {A3 : (x1 : A1) → A2 x1 → UU l3} + { A4 : (x1 : A1) (x2 : A2 x1) → A3 x1 x2 → UU l4} + { A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} + { A6 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) → UU l6} + { A7 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l7} + { A8 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) → UU l8} + { A9 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) → + UU l9} + { A10 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) → + UU l10} + { A11 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) → + UU l11} + { A12 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) → UU l12} + { X : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) → UU l} → + telescope + ( l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6 ⊔ l7 ⊔ l8 ⊔ l9 ⊔ l10 ⊔ l11 ⊔ l12 ⊔ l) + ( 12) + instance-telescope¹² {X = X} = + cons-telescope (λ x → instance-telescope¹¹ {X = X x}) + + instance-telescope¹³ : + { l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 l11 l12 l13 l : Level} + { A1 : UU l1} {A2 : A1 → UU l2} {A3 : (x1 : A1) → A2 x1 → UU l3} + { A4 : (x1 : A1) (x2 : A2 x1) → A3 x1 x2 → UU l4} + { A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} + { A6 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) → UU l6} + { A7 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l7} + { A8 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) → UU l8} + { A9 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) → + UU l9} + { A10 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) → + UU l10} + { A11 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) → + UU l11} + { A12 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) → UU l12} + { A13 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) → UU l13} + { X : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) → UU l} → + telescope + ( l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6 ⊔ l7 ⊔ l8 ⊔ l9 ⊔ l10 ⊔ l11 ⊔ l12 ⊔ l13 ⊔ l) + ( 13) + instance-telescope¹³ {X = X} = + cons-telescope (λ x → instance-telescope¹² {X = X x}) + + instance-telescope¹⁴ : + { l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 l11 l12 l13 l14 l : Level} + { A1 : UU l1} {A2 : A1 → UU l2} {A3 : (x1 : A1) → A2 x1 → UU l3} + { A4 : (x1 : A1) (x2 : A2 x1) → A3 x1 x2 → UU l4} + { A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} + { A6 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) → UU l6} + { A7 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l7} + { A8 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) → UU l8} + { A9 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) → + UU l9} + { A10 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) → + UU l10} + { A11 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) → + UU l11} + { A12 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) → UU l12} + { A13 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) → UU l13} + { A14 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) → UU l14} + { X : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) + (x14 : A14 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) → UU l} → + telescope + ( l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6 ⊔ l7 ⊔ l8 ⊔ l9 ⊔ l10 ⊔ l11 ⊔ l12 ⊔ l13 ⊔ + l14 ⊔ l) + ( 14) + instance-telescope¹⁴ {X = X} = + cons-telescope (λ x → instance-telescope¹³ {X = X x}) + + instance-telescope¹⁵ : + { l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 l11 l12 l13 l14 l15 l : Level} + { A1 : UU l1} {A2 : A1 → UU l2} {A3 : (x1 : A1) → A2 x1 → UU l3} + { A4 : (x1 : A1) (x2 : A2 x1) → A3 x1 x2 → UU l4} + { A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} + { A6 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) → UU l6} + { A7 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l7} + { A8 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) → UU l8} + { A9 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) → + UU l9} + { A10 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) → + UU l10} + { A11 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) → + UU l11} + { A12 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) → UU l12} + { A13 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) → UU l13} + { A14 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) → UU l14} + { A15 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) + (x14 : A14 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) → UU l15} + { X : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) + (x14 : A14 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) + (x15 : A15 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) → UU l} → + telescope + ( l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6 ⊔ l7 ⊔ l8 ⊔ l9 ⊔ l10 ⊔ l11 ⊔ l12 ⊔ l13 ⊔ + l14 ⊔ l15 ⊔ l) + ( 15) + instance-telescope¹⁵ {X = X} = + cons-telescope (λ x → instance-telescope¹⁴ {X = X x}) + + instance-telescope¹⁶ : + { l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 l11 l12 l13 l14 l15 l16 l : Level} + { A1 : UU l1} {A2 : A1 → UU l2} {A3 : (x1 : A1) → A2 x1 → UU l3} + { A4 : (x1 : A1) (x2 : A2 x1) → A3 x1 x2 → UU l4} + { A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} + { A6 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) → UU l6} + { A7 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l7} + { A8 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) → UU l8} + { A9 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) → + UU l9} + { A10 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) → + UU l10} + { A11 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) → + UU l11} + { A12 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) → UU l12} + { A13 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) → UU l13} + { A14 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) → UU l14} + { A15 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) + (x14 : A14 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) → UU l15} + { A16 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) + (x14 : A14 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) + (x15 : A15 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) → UU l16} + { X : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) + (x14 : A14 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) + (x15 : A15 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) + (x16 : A16 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15) → UU l} → + telescope + ( l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6 ⊔ l7 ⊔ l8 ⊔ l9 ⊔ l10 ⊔ l11 ⊔ l12 ⊔ l13 ⊔ + l14 ⊔ l15 ⊔ l16 ⊔ l) + ( 16) + instance-telescope¹⁶ {X = X} = + cons-telescope (λ x → instance-telescope¹⁵ {X = X x}) + + instance-telescope¹⁷ : + { l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 l11 l12 l13 l14 l15 l16 l17 l : Level} + { A1 : UU l1} {A2 : A1 → UU l2} {A3 : (x1 : A1) → A2 x1 → UU l3} + { A4 : (x1 : A1) (x2 : A2 x1) → A3 x1 x2 → UU l4} + { A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} + { A6 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) → UU l6} + { A7 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l7} + { A8 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) → UU l8} + { A9 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) → + UU l9} + { A10 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) → + UU l10} + { A11 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) → + UU l11} + { A12 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) → UU l12} + { A13 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) → UU l13} + { A14 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) → UU l14} + { A15 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) + (x14 : A14 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) → UU l15} + { A16 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) + (x14 : A14 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) + (x15 : A15 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) → UU l16} + { A17 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) + (x14 : A14 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) + (x15 : A15 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) + (x16 : A16 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15) → UU l17} + { X : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) + (x14 : A14 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) + (x15 : A15 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) + (x16 : A16 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15) + (x17 : A17 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) → + UU l} → + telescope + ( l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6 ⊔ l7 ⊔ l8 ⊔ l9 ⊔ l10 ⊔ l11 ⊔ l12 ⊔ l13 ⊔ + l14 ⊔ l15 ⊔ l16 ⊔ l17 ⊔ l) + ( 17) + instance-telescope¹⁷ {X = X} = + cons-telescope (λ x → instance-telescope¹⁶ {X = X x}) + + instance-telescope¹⁸ : + { l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 l11 l12 l13 l14 l15 l16 l17 l18 l : Level} + { A1 : UU l1} {A2 : A1 → UU l2} {A3 : (x1 : A1) → A2 x1 → UU l3} + { A4 : (x1 : A1) (x2 : A2 x1) → A3 x1 x2 → UU l4} + { A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} + { A6 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) → UU l6} + { A7 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l7} + { A8 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) → UU l8} + { A9 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) → + UU l9} + { A10 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) → + UU l10} + { A11 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) → + UU l11} + { A12 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) → UU l12} + { A13 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) → UU l13} + { A14 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) → UU l14} + { A15 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) + (x14 : A14 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) → UU l15} + { A16 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) + (x14 : A14 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) + (x15 : A15 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) → UU l16} + { A17 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) + (x14 : A14 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) + (x15 : A15 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) + (x16 : A16 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15) → UU l17} + { A18 : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) + (x14 : A14 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) + (x15 : A15 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) + (x16 : A16 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15) + (x17 : A17 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) → + UU l18} + { X : + (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) + (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) + (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) + (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) + (x11 : A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) + (x12 : A12 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) + (x13 : A13 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) + (x14 : A14 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) + (x15 : A15 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) + (x16 : A16 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15) + (x17 : A17 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) + (x18 : A18 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17) → + UU l} → + telescope + ( l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6 ⊔ l7 ⊔ l8 ⊔ l9 ⊔ l10 ⊔ l11 ⊔ l12 ⊔ l13 ⊔ + l14 ⊔ l15 ⊔ l16 ⊔ l17 ⊔ l18 ⊔ l) + ( 18) + instance-telescope¹⁸ {X = X} = + cons-telescope (λ x → instance-telescope¹⁷ {X = X x}) +``` + +## See also + +- [Dependent telescopes](foundation.dependent-telescopes.md) +- [Iterated Σ-types](foundation.iterated-dependent-pair-types.md) +- [Iterated Π-types](foundation.iterated-dependent-product-types.md) diff --git a/src/trees.lagda.md b/src/trees.lagda.md index 334f39df41..a2f7fd445b 100644 --- a/src/trees.lagda.md +++ b/src/trees.lagda.md @@ -1,11 +1,18 @@ # Trees +```agda +{-# OPTIONS --guardedness #-} +``` + +## Files in the `trees` module + ```agda module trees where open import trees.algebras-polynomial-endofunctors public open import trees.bases-directed-trees public open import trees.bases-enriched-directed-trees public +open import trees.bounded-multisets public open import trees.coalgebra-of-directed-trees public open import trees.coalgebra-of-enriched-directed-trees public open import trees.coalgebras-polynomial-endofunctors public @@ -14,6 +21,7 @@ open import trees.combinator-enriched-directed-trees public open import trees.directed-trees public open import trees.elementhood-relation-coalgebras-polynomial-endofunctors public open import trees.elementhood-relation-w-types public +open import trees.empty-multisets public open import trees.enriched-directed-trees public open import trees.equivalences-directed-trees public open import trees.equivalences-enriched-directed-trees public @@ -31,6 +39,7 @@ open import trees.morphisms-algebras-polynomial-endofunctors public open import trees.morphisms-coalgebras-polynomial-endofunctors public open import trees.morphisms-directed-trees public open import trees.morphisms-enriched-directed-trees public +open import trees.multiset-indexed-dependent-products-of-types public open import trees.multisets public open import trees.planar-binary-trees public open import trees.polynomial-endofunctors public @@ -47,6 +56,7 @@ open import trees.underlying-trees-elements-coalgebras-polynomial-endofunctors p open import trees.underlying-trees-of-elements-of-w-types public open import trees.undirected-trees public open import trees.universal-multiset public +open import trees.universal-tree public open import trees.w-type-of-natural-numbers public open import trees.w-type-of-propositions public open import trees.w-types public diff --git a/src/trees/bounded-multisets.lagda.md b/src/trees/bounded-multisets.lagda.md new file mode 100644 index 0000000000..ada81ad1ab --- /dev/null +++ b/src/trees/bounded-multisets.lagda.md @@ -0,0 +1,115 @@ +# Bounded multisets + +```agda +module trees.bounded-multisets where +``` + +
Imports + +```agda +open import elementary-number-theory.natural-numbers + +open import foundation.dependent-pair-types +open import foundation.empty-types +open import foundation.existential-quantification +open import foundation.universe-levels + +open import trees.empty-multisets +open import trees.multisets +open import trees.w-types +``` + +
+ +## Idea + +A [multiset](trees.multisets.md) `X` is said to be of **natural height** `0` if +`X` has no elements, and of natural height `n+1` if every +[element](trees.elementhood-relation-w-types.md) in `X` is of natural height +`n`. Multisets of finite natural height are said to be **naturally bounded**. + +Note that finite multisets, which consist of finitely many elements, each of +which are finite multisets, are automatically naturally bounded. Nonfinite +multisets, however, need not be naturally bounded. + +We also note that there should exist a more general notion of height, in which +heights are measured by upwards closed subsets of the natural numbers. This is +why we speak of _naturally_ bounded multisets here. On the other hand, every +multiset is bounded in this more general sense, and this bound is unique. + +## Definitions + +### The predicate of being a multiset of natural height `n` + +```agda +module _ + {l : Level} + where + + is-of-natural-height-𝕍 : ℕ → 𝕍 l → UU l + is-of-natural-height-𝕍 zero-ℕ X = + is-empty-𝕍 X + is-of-natural-height-𝕍 (succ-ℕ n) (tree-𝕎 X Y) = + (x : X) → is-of-natural-height-𝕍 n (Y x) +``` + +### Explicitly bounded multisets + +An **explicitly bounded multiset** is a multiset of specified natural height. +Note that, as we will show below, every multiset of natural height `n` is also a +multiset of natural height `n + 1`, so the type of natural numbers `n` equipped +with a proof that `X` is of natural height `n` is far from a proposition. + +```agda +Explicitly-Bounded-𝕍 : (l : Level) → UU (lsuc l) +Explicitly-Bounded-𝕍 l = + Σ (𝕍 l) (λ X → Σ ℕ (λ n → is-of-natural-height-𝕍 n X)) +``` + +### Bounded multisets + +A **bounded multiset** is a multiset for which a natural bound +[merely exists](foundation.existential-quantification.md) + +```agda +data + Bounded-𝕍 (l : Level) : ℕ → UU (lsuc l) + where + empty-multiset-Bounded-𝕍 : Bounded-𝕍 l 0 + tree-multiset-Bounded-𝕍 : + {n : ℕ} {X : UU l} (Y : X → Bounded-𝕍 l n) → Bounded-𝕍 l (succ-ℕ n) + +Bounded-𝕍' : (l : Level) → UU (lsuc l) +Bounded-𝕍' l = Σ (𝕍 l) (λ X → ∃ ℕ (λ n → is-of-natural-height-𝕍 n X)) +``` + +## Properties + +### The empty multiset is of any natural height + +```agda +module _ + {l : Level} + where + + is-of-natural-height-is-empty-𝕍 : + (n : ℕ) (X : 𝕍 l) → is-empty-𝕍 X → is-of-natural-height-𝕍 n X + is-of-natural-height-is-empty-𝕍 zero-ℕ X H = H + is-of-natural-height-is-empty-𝕍 (succ-ℕ n) (tree-𝕎 X Y) H x = ex-falso (H x) +``` + +### A multiset of natural height `n` is a multiset of natural height `n + 1` + +```agda +module _ + {l : Level} + where + + is-of-natural-height-succ-𝕍 : + (n : ℕ) (X : 𝕍 l) → + is-of-natural-height-𝕍 n X → is-of-natural-height-𝕍 (succ-ℕ n) X + is-of-natural-height-succ-𝕍 zero-ℕ X H = + is-of-natural-height-is-empty-𝕍 1 X H + is-of-natural-height-succ-𝕍 (succ-ℕ n) (tree-𝕎 X Y) H x = + is-of-natural-height-succ-𝕍 n (Y x) (H x) +``` diff --git a/src/trees/empty-multisets.lagda.md b/src/trees/empty-multisets.lagda.md new file mode 100644 index 0000000000..880a5c680b --- /dev/null +++ b/src/trees/empty-multisets.lagda.md @@ -0,0 +1,69 @@ +# Empty multisets + +```agda +module trees.empty-multisets where +``` + +
Imports + +```agda +open import foundation.dependent-pair-types +open import foundation.empty-types +open import foundation.identity-types +open import foundation.universe-levels + +open import trees.elementhood-relation-w-types +open import trees.multisets +open import trees.w-types +``` + +
+ +## Idea + +A [multiset](trees.multisets.md) is said to be **empty** if it has no +[elements](trees.elementhood-relation-w-types.md). + +## Definition + +### The predicate of being an empty multiset + +```agda +module _ + {l : Level} + where + + is-empty-𝕍 : 𝕍 l → UU l + is-empty-𝕍 (tree-𝕎 X Y) = is-empty X +``` + +### The predicate of being a multiset with no elements + +However, note that this predicate returns a type of universe level `lsuc l`. + +```agda +module _ + {l : Level} + where + + has-no-elements-𝕍 : 𝕍 l → UU (lsuc l) + has-no-elements-𝕍 X = (Y : 𝕍 l) → Y ∉-𝕎 X +``` + +## Properties + +### A multiset `X` is empty if and only if it has no elements + +```agda +module _ + {l : Level} + where + + is-empty-has-no-elements-𝕍 : + (X : 𝕍 l) → has-no-elements-𝕍 X → is-empty-𝕍 X + is-empty-has-no-elements-𝕍 (tree-𝕎 X Y) H x = H (Y x) (x , refl) + + has-no-elements-is-empty-𝕍 : + (X : 𝕍 l) → is-empty-𝕍 X → has-no-elements-𝕍 X + has-no-elements-is-empty-𝕍 (tree-𝕎 X Y) H ._ (x , refl) = H x +``` diff --git a/src/trees/multiset-indexed-dependent-products-of-types.lagda.md b/src/trees/multiset-indexed-dependent-products-of-types.lagda.md new file mode 100644 index 0000000000..906028b27a --- /dev/null +++ b/src/trees/multiset-indexed-dependent-products-of-types.lagda.md @@ -0,0 +1,38 @@ +# Multiset-indexed dependent products of types + +```agda +module trees.multiset-indexed-dependent-products-of-types where +``` + +
Imports + +```agda +open import elementary-number-theory.natural-numbers + +open import foundation.empty-types +open import foundation.universe-levels + +open import trees.multisets +open import trees.w-types +``` + +
+ +## Idea + +Consider a [multiset](trees.multisets.md) `M`. Then `M` can be seen as a tower +of type families, via the inclusion from the type of all multisets, which are +the well-founded trees, into the type of all trees. + +This leads to the idea that we should be able to take the iterated dependent +product of this tower of type families. + +## Definitions + +### The iterated dependent product of types indexed by a multiset + +```agda +iterated-Π-𝕍 : {l : Level} → ℕ → 𝕍 l → UU l +iterated-Π-𝕍 zero-ℕ (tree-𝕎 X Y) = X +iterated-Π-𝕍 (succ-ℕ n) (tree-𝕎 X Y) = (x : X) → iterated-Π-𝕍 n (Y x) +``` diff --git a/src/trees/multisets.lagda.md b/src/trees/multisets.lagda.md index 63d52836ae..57c1a96671 100644 --- a/src/trees/multisets.lagda.md +++ b/src/trees/multisets.lagda.md @@ -25,13 +25,22 @@ family over the universe `UU l`. ## Definitions -### The type of multisets +### The type of small multisets ```agda 𝕍 : (l : Level) → UU (lsuc l) 𝕍 l = 𝕎 (UU l) (λ X → X) ``` +### The large type of all multisets + +```agda +data + Large-𝕍 : UUω + where + tree-Large-𝕍 : {l : Level} (X : UU l) → (X → Large-𝕍) → Large-𝕍 +``` + ### The elementhood relation on multisets ```agda diff --git a/src/trees/universal-tree.lagda.md b/src/trees/universal-tree.lagda.md new file mode 100644 index 0000000000..6c22b5d9b5 --- /dev/null +++ b/src/trees/universal-tree.lagda.md @@ -0,0 +1,50 @@ +# The universal tree + +```agda +{-# OPTIONS --guardedness #-} + +module trees.universal-tree where +``` + +
Imports + +```agda +open import foundation.unit-type +open import foundation.universe-levels +``` + +
+ +## Idea + +The universal tree is the coinductive type associated to the +[polynomial endofunctor](trees.polynomial-endofunctors.md) + +```text + X ↦ Σ 𝒰 (λ T → Xᵀ). +``` + +Note that this is the same polynomial endofunctor that we used to define the +type of [multisets](trees.multisets.md), which is the universal _well-founded_ +tree. + +## Definitions + +### The universal tree of small trees + +```agda +module _ + (l : Level) + where + + record Universal-Tree : UU (lsuc l) + where + coinductive + field + type-Universal-Tree : + UU l + branch-Universal-Tree : + (x : type-Universal-Tree) → Universal-Tree + + open Universal-Tree public +``` From c9f2714ee982bc2052d69f6b8eda30b3be2a401a Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sun, 22 Oct 2023 05:53:28 +0200 Subject: [PATCH 05/49] peano additions --- .../peano-arithmetic.lagda.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/elementary-number-theory/peano-arithmetic.lagda.md b/src/elementary-number-theory/peano-arithmetic.lagda.md index cb43d0bc30..ef15756228 100644 --- a/src/elementary-number-theory/peano-arithmetic.lagda.md +++ b/src/elementary-number-theory/peano-arithmetic.lagda.md @@ -41,7 +41,8 @@ peano-1-ℕ = zero-ℕ ## Peano's 2nd axiom -The identity relation on the natural numbers is reflexive. +The identity relation on the natural numbers is reflexive. I.e. for every +natural number `x`, it is true that `x = x`. ```agda peano-axiom-2 : {l : Level} → UU l → UU l @@ -53,7 +54,8 @@ peano-2-ℕ x = refl ### Peano's 3rd axiom -The identity relation on the natural numbers is symmetric. +The identity relation on the natural numbers is symmetric. I.e. if `x = y`, +then `y = x`. ```agda peano-axiom-3 : {l : Level} → UU l → UU l @@ -65,7 +67,8 @@ peano-3-ℕ x y = inv ### Peano's 4th axiom -The identity relation on the natural numbers is transitive. +The identity relation on the natural numbers is transitive. I.e. if `y = z` and +`x = y`, then `x = z`. ```agda peano-axiom-4 : {l : Level} → UU l → UU l @@ -80,7 +83,8 @@ peano-4-ℕ x y z = concat' x The 5th axiom of peano's arithmetic states that for every `x` and `y`, if `x = y` and `y` is a natural number, then `x` is a natural number. This axiom does not make sense in type theory, as every element by definition lives in a -specified type. +specified type. To even pose the question of whether two elements are equal, we +must already know that they are elements of the same type. ### Peano's 6th axiom From 23b995e95b71dab6ee525e2a9c975c5bbc3b86aa Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sun, 22 Oct 2023 06:44:05 +0200 Subject: [PATCH 06/49] refactor yoneda lemma, generalize a universe level --- ...-isomorphisms-functors-categories.lagda.md | 2 +- ...omorphisms-functors-precategories.lagda.md | 2 +- ...ural-isomorphisms-maps-categories.lagda.md | 2 +- ...l-isomorphisms-maps-precategories.lagda.md | 4 +- ...ansformations-functors-categories.lagda.md | 6 +- ...from-small-to-large-precategories.lagda.md | 6 +- ...formations-functors-precategories.lagda.md | 6 +- ...l-transformations-maps-categories.lagda.md | 6 +- ...from-small-to-large-precategories.lagda.md | 8 +- ...ransformations-maps-precategories.lagda.md | 8 +- .../yoneda-lemma-categories.lagda.md | 114 +++++++++++---- .../yoneda-lemma-precategories.lagda.md | 138 +++++++++++++----- 12 files changed, 212 insertions(+), 90 deletions(-) diff --git a/src/category-theory/natural-isomorphisms-functors-categories.lagda.md b/src/category-theory/natural-isomorphisms-functors-categories.lagda.md index 74a02c09b1..f8f8894aea 100644 --- a/src/category-theory/natural-isomorphisms-functors-categories.lagda.md +++ b/src/category-theory/natural-isomorphisms-functors-categories.lagda.md @@ -195,7 +195,7 @@ module _ ( hom-family-natural-transformation-Category C D F G ( natural-transformation-natural-isomorphism-Category)) coherence-square-natural-isomorphism-Category = - coherence-square-natural-transformation-Category C D F G + naturality-natural-transformation-Category C D F G ( natural-transformation-natural-isomorphism-Category) is-natural-isomorphism-natural-isomorphism-Category : diff --git a/src/category-theory/natural-isomorphisms-functors-precategories.lagda.md b/src/category-theory/natural-isomorphisms-functors-precategories.lagda.md index a7ca42e597..35a1b71552 100644 --- a/src/category-theory/natural-isomorphisms-functors-precategories.lagda.md +++ b/src/category-theory/natural-isomorphisms-functors-precategories.lagda.md @@ -177,7 +177,7 @@ module _ ( hom-family-natural-transformation-Precategory C D F G ( natural-transformation-natural-isomorphism-Precategory)) coherence-square-natural-isomorphism-Precategory = - coherence-square-natural-transformation-Precategory C D F G + naturality-natural-transformation-Precategory C D F G ( natural-transformation-natural-isomorphism-Precategory) is-natural-isomorphism-natural-isomorphism-Precategory : diff --git a/src/category-theory/natural-isomorphisms-maps-categories.lagda.md b/src/category-theory/natural-isomorphisms-maps-categories.lagda.md index af45614ba5..571c2723dc 100644 --- a/src/category-theory/natural-isomorphisms-maps-categories.lagda.md +++ b/src/category-theory/natural-isomorphisms-maps-categories.lagda.md @@ -194,7 +194,7 @@ module _ ( hom-family-natural-transformation-map-Category C D F G ( natural-transformation-map-natural-isomorphism-map-Category)) coherence-square-natural-isomorphism-map-Category = - coherence-square-natural-transformation-map-Category C D F G + naturality-natural-transformation-map-Category C D F G ( natural-transformation-map-natural-isomorphism-map-Category) is-natural-isomorphism-map-natural-isomorphism-map-Category : diff --git a/src/category-theory/natural-isomorphisms-maps-precategories.lagda.md b/src/category-theory/natural-isomorphisms-maps-precategories.lagda.md index 420e96b26f..1e2ff1ccc6 100644 --- a/src/category-theory/natural-isomorphisms-maps-precategories.lagda.md +++ b/src/category-theory/natural-isomorphisms-maps-precategories.lagda.md @@ -161,7 +161,7 @@ module _ ( hom-family-natural-transformation-map-Precategory C D F G ( natural-transformation-map-natural-isomorphism-map-Precategory)) coherence-square-natural-isomorphism-map-Precategory = - coherence-square-natural-transformation-map-Precategory C D F G + naturality-natural-transformation-map-Precategory C D F G ( natural-transformation-map-natural-isomorphism-map-Precategory) is-natural-isomorphism-map-natural-isomorphism-map-Precategory : @@ -415,7 +415,7 @@ module _ ( ap ( comp-hom-Precategory' D _) ( inv - ( coherence-square-natural-transformation-map-Precategory + ( naturality-natural-transformation-map-Precategory C D F G f g))) ∙ ( associative-comp-hom-Precategory D ( hom-map-Precategory C D G g) diff --git a/src/category-theory/natural-transformations-functors-categories.lagda.md b/src/category-theory/natural-transformations-functors-categories.lagda.md index 66303411bd..31ddf1de0b 100644 --- a/src/category-theory/natural-transformations-functors-categories.lagda.md +++ b/src/category-theory/natural-transformations-functors-categories.lagda.md @@ -74,12 +74,12 @@ module _ ( F) ( G) - coherence-square-natural-transformation-Category : + naturality-natural-transformation-Category : (γ : natural-transformation-Category) → is-natural-transformation-Category ( hom-family-natural-transformation-Category γ) - coherence-square-natural-transformation-Category = - coherence-square-natural-transformation-Precategory + naturality-natural-transformation-Category = + naturality-natural-transformation-Precategory ( precategory-Category C) ( precategory-Category D) ( F) diff --git a/src/category-theory/natural-transformations-functors-from-small-to-large-precategories.lagda.md b/src/category-theory/natural-transformations-functors-from-small-to-large-precategories.lagda.md index 1df426695b..b74325623b 100644 --- a/src/category-theory/natural-transformations-functors-from-small-to-large-precategories.lagda.md +++ b/src/category-theory/natural-transformations-functors-from-small-to-large-precategories.lagda.md @@ -74,12 +74,12 @@ module _ ( map-functor-Small-Large-Precategory C D F) ( map-functor-Small-Large-Precategory C D G) - coherence-square-natural-transformation-Small-Large-Precategory : + naturality-natural-transformation-Small-Large-Precategory : (γ : natural-transformation-Small-Large-Precategory) → is-natural-transformation-Small-Large-Precategory ( hom-family-natural-transformation-Small-Large-Precategory γ) - coherence-square-natural-transformation-Small-Large-Precategory = - coherence-square-natural-transformation-map-Small-Large-Precategory C D + naturality-natural-transformation-Small-Large-Precategory = + naturality-natural-transformation-map-Small-Large-Precategory C D ( map-functor-Small-Large-Precategory C D F) ( map-functor-Small-Large-Precategory C D G) ``` diff --git a/src/category-theory/natural-transformations-functors-precategories.lagda.md b/src/category-theory/natural-transformations-functors-precategories.lagda.md index fc103c786c..b2e8a178af 100644 --- a/src/category-theory/natural-transformations-functors-precategories.lagda.md +++ b/src/category-theory/natural-transformations-functors-precategories.lagda.md @@ -69,12 +69,12 @@ module _ ( map-functor-Precategory C D F) ( map-functor-Precategory C D G) - coherence-square-natural-transformation-Precategory : + naturality-natural-transformation-Precategory : (γ : natural-transformation-Precategory) → is-natural-transformation-Precategory ( hom-family-natural-transformation-Precategory γ) - coherence-square-natural-transformation-Precategory = - coherence-square-natural-transformation-map-Precategory C D + naturality-natural-transformation-Precategory = + naturality-natural-transformation-map-Precategory C D ( map-functor-Precategory C D F) ( map-functor-Precategory C D G) ``` diff --git a/src/category-theory/natural-transformations-maps-categories.lagda.md b/src/category-theory/natural-transformations-maps-categories.lagda.md index 8cb719604a..04e78aa05e 100644 --- a/src/category-theory/natural-transformations-maps-categories.lagda.md +++ b/src/category-theory/natural-transformations-maps-categories.lagda.md @@ -74,12 +74,12 @@ module _ ( F) ( G) - coherence-square-natural-transformation-map-Category : + naturality-natural-transformation-map-Category : (γ : natural-transformation-map-Category) → is-natural-transformation-map-Category ( hom-family-natural-transformation-map-Category γ) - coherence-square-natural-transformation-map-Category = - coherence-square-natural-transformation-map-Precategory + naturality-natural-transformation-map-Category = + naturality-natural-transformation-map-Precategory ( precategory-Category C) ( precategory-Category D) ( F) diff --git a/src/category-theory/natural-transformations-maps-from-small-to-large-precategories.lagda.md b/src/category-theory/natural-transformations-maps-from-small-to-large-precategories.lagda.md index 1e5424b966..a8913b09a5 100644 --- a/src/category-theory/natural-transformations-maps-from-small-to-large-precategories.lagda.md +++ b/src/category-theory/natural-transformations-maps-from-small-to-large-precategories.lagda.md @@ -84,11 +84,11 @@ module _ hom-family-map-Small-Large-Precategory hom-family-natural-transformation-map-Small-Large-Precategory = pr1 - coherence-square-natural-transformation-map-Small-Large-Precategory : + naturality-natural-transformation-map-Small-Large-Precategory : (γ : natural-transformation-map-Small-Large-Precategory) → is-natural-transformation-map-Small-Large-Precategory ( hom-family-natural-transformation-map-Small-Large-Precategory γ) - coherence-square-natural-transformation-map-Small-Large-Precategory = pr2 + naturality-natural-transformation-map-Small-Large-Precategory = pr2 ``` ## Composition and identity of natural transformations @@ -140,7 +140,7 @@ module _ ( comp-hom-Large-Precategory' D ( hom-family-natural-transformation-map-Small-Large-Precategory C D F G α X)) - ( coherence-square-natural-transformation-map-Small-Large-Precategory + ( naturality-natural-transformation-map-Small-Large-Precategory C D G H β f)) ∙ ( associative-comp-hom-Large-Precategory D ( hom-family-natural-transformation-map-Small-Large-Precategory @@ -152,7 +152,7 @@ module _ ( comp-hom-Large-Precategory D ( hom-family-natural-transformation-map-Small-Large-Precategory C D G H β Y)) - ( coherence-square-natural-transformation-map-Small-Large-Precategory + ( naturality-natural-transformation-map-Small-Large-Precategory C D F G α f)) ∙ ( inv ( associative-comp-hom-Large-Precategory D diff --git a/src/category-theory/natural-transformations-maps-precategories.lagda.md b/src/category-theory/natural-transformations-maps-precategories.lagda.md index 060154f9a0..8c0e2f5ea4 100644 --- a/src/category-theory/natural-transformations-maps-precategories.lagda.md +++ b/src/category-theory/natural-transformations-maps-precategories.lagda.md @@ -80,11 +80,11 @@ module _ natural-transformation-map-Precategory → hom-family-map-Precategory hom-family-natural-transformation-map-Precategory = pr1 - coherence-square-natural-transformation-map-Precategory : + naturality-natural-transformation-map-Precategory : (γ : natural-transformation-map-Precategory) → is-natural-transformation-map-Precategory ( hom-family-natural-transformation-map-Precategory γ) - coherence-square-natural-transformation-map-Precategory = pr2 + naturality-natural-transformation-map-Precategory = pr2 ``` ## Composition and identity of natural transformations @@ -124,7 +124,7 @@ module _ ( ap ( comp-hom-Precategory' D ( hom-family-natural-transformation-map-Precategory C D F G α X)) - ( coherence-square-natural-transformation-map-Precategory C D G H β f)) ∙ + ( naturality-natural-transformation-map-Precategory C D G H β f)) ∙ ( associative-comp-hom-Precategory D ( hom-family-natural-transformation-map-Precategory C D G H β Y) ( hom-map-Precategory C D G f) @@ -132,7 +132,7 @@ module _ ( ap ( comp-hom-Precategory D ( hom-family-natural-transformation-map-Precategory C D G H β Y)) - ( coherence-square-natural-transformation-map-Precategory C D F G α f)) ∙ + ( naturality-natural-transformation-map-Precategory C D F G α f)) ∙ ( inv ( associative-comp-hom-Precategory D ( hom-family-natural-transformation-map-Precategory C D G H β Y) diff --git a/src/category-theory/yoneda-lemma-categories.lagda.md b/src/category-theory/yoneda-lemma-categories.lagda.md index 41533f11f5..abb006ecff 100644 --- a/src/category-theory/yoneda-lemma-categories.lagda.md +++ b/src/category-theory/yoneda-lemma-categories.lagda.md @@ -9,7 +9,9 @@ module category-theory.yoneda-lemma-categories where ```agda open import category-theory.categories open import category-theory.functors-categories +open import category-theory.functors-from-small-to-large-precategories open import category-theory.natural-transformations-functors-categories +open import category-theory.natural-transformations-functors-from-small-to-large-precategories open import category-theory.representable-functors-categories open import category-theory.yoneda-lemma-precategories @@ -40,7 +42,77 @@ natural transformations to the type `F c` defined by evaluating the component of the natural transformation at the object `c` at the identity arrow on `c` is an equivalence. -## Definition +## The yoneda lemma into the large category of sets + +```agda +module _ + {l1 l2 l3 : Level} (C : Category l1 l2) (c : obj-Category C) + (F : + functor-Small-Large-Precategory + ( precategory-Category C) + ( Set-Large-Precategory) + ( l3)) + where + + map-yoneda-Small-Large-Category : + natural-transformation-Small-Large-Precategory + ( precategory-Category C) + ( Set-Large-Precategory) + ( representable-functor-Category C c) + ( F) → + type-Set + ( obj-functor-Small-Large-Precategory + ( precategory-Category C) + ( Set-Large-Precategory) + ( F) + ( c)) + map-yoneda-Small-Large-Category σ = + hom-family-natural-transformation-Small-Large-Precategory + ( precategory-Category C) + ( Set-Large-Precategory) + ( representable-functor-Category C c) + ( F) + ( σ) + ( c) + ( id-hom-Category C) + + extension-yoneda-Small-Large-Category : + type-Set + ( obj-functor-Small-Large-Precategory + ( precategory-Category C) + ( Set-Large-Precategory) + ( F) + ( c)) → + natural-transformation-Small-Large-Precategory + ( precategory-Category C) + ( Set-Large-Precategory) + ( representable-functor-Category C c) + ( F) + extension-yoneda-Small-Large-Category = + extension-yoneda-Small-Large-Precategory (precategory-Category C) c F + + lemma-yoneda-Small-Large-Category : + is-equiv map-yoneda-Small-Large-Category + lemma-yoneda-Small-Large-Category = + lemma-yoneda-Small-Large-Precategory (precategory-Category C) c F + + equiv-lemma-yoneda-Small-Large-Category : + ( natural-transformation-Small-Large-Precategory + ( precategory-Category C) + ( Set-Large-Precategory) + ( representable-functor-Category C c) + ( F)) ≃ + ( type-Set + ( obj-functor-Small-Large-Precategory + ( precategory-Category C) + ( Set-Large-Precategory) + ( F) + ( c))) + equiv-lemma-yoneda-Small-Large-Category = + equiv-lemma-yoneda-Small-Large-Precategory (precategory-Category C) c F +``` + +## The yoneda lemma into the small category of sets ```agda module _ @@ -48,41 +120,33 @@ module _ (F : functor-Category C (Set-Category l2)) where - yoneda-evid-Category : + map-yoneda-Category : natural-transformation-Category ( C) ( Set-Category l2) ( representable-functor-Category C c) ( F) → type-Set (obj-functor-Category C (Set-Category l2) F c) - yoneda-evid-Category = yoneda-evid-Precategory (precategory-Category C) c F + map-yoneda-Category = map-yoneda-Precategory (precategory-Category C) c F - yoneda-extension-Category : + extension-yoneda-Category : type-Set (obj-functor-Category C (Set-Category l2) F c) → natural-transformation-Category C (Set-Category l2) (representable-functor-Category C c) F - yoneda-extension-Category = - yoneda-extension-Precategory (precategory-Category C) c F - - section-yoneda-evid-Category : - section yoneda-evid-Category - section-yoneda-evid-Category = - section-yoneda-evid-Precategory (precategory-Category C) c F - - retraction-yoneda-evid-Category : - retraction yoneda-evid-Category - retraction-yoneda-evid-Category = - retraction-yoneda-evid-Precategory (precategory-Category C) c F + extension-yoneda-Category = + extension-yoneda-Precategory (precategory-Category C) c F - yoneda-lemma-Category : is-equiv yoneda-evid-Category - yoneda-lemma-Category = yoneda-lemma-Precategory (precategory-Category C) c F + lemma-yoneda-Category : is-equiv map-yoneda-Category + lemma-yoneda-Category = lemma-yoneda-Precategory (precategory-Category C) c F - equiv-yoneda-lemma-Category : - ( natural-transformation-Category - ( C) - ( Set-Category l2) - ( representable-functor-Category C c) (F)) ≃ + equiv-lemma-yoneda-Category : + ( natural-transformation-Category C (Set-Category l2) + ( representable-functor-Category C c) F) ≃ ( type-Set (obj-functor-Category C (Set-Category l2) F c)) - pr1 equiv-yoneda-lemma-Category = yoneda-evid-Category - pr2 equiv-yoneda-lemma-Category = yoneda-lemma-Category + equiv-lemma-yoneda-Category = + equiv-lemma-yoneda-Precategory (precategory-Category C) c F ``` + +## See also + +- [Presheaf categories](category-theory.presheaf-categories.md) diff --git a/src/category-theory/yoneda-lemma-precategories.lagda.md b/src/category-theory/yoneda-lemma-precategories.lagda.md index fe3898b842..0522c0bcfe 100644 --- a/src/category-theory/yoneda-lemma-precategories.lagda.md +++ b/src/category-theory/yoneda-lemma-precategories.lagda.md @@ -7,7 +7,9 @@ module category-theory.yoneda-lemma-precategories where
Imports ```agda +open import category-theory.functors-from-small-to-large-precategories open import category-theory.functors-precategories +open import category-theory.natural-transformations-functors-from-small-to-large-precategories open import category-theory.natural-transformations-functors-precategories open import category-theory.precategories open import category-theory.representable-functors-precategories @@ -43,75 +45,131 @@ natural transformations to the type `F c` defined by evaluating the component of the natural transformation at the object `c` at the identity arrow on `c` is an equivalence. -## Definition +## The yoneda lemma into the large category of sets ```agda module _ - {l1 l2 : Level} (C : Precategory l1 l2) (c : obj-Precategory C) - (F : functor-Precategory C (Set-Precategory l2)) + {l1 l2 l3 : Level} (C : Precategory l1 l2) (c : obj-Precategory C) + (F : functor-Small-Large-Precategory C Set-Large-Precategory l3) where - yoneda-evid-Precategory : - natural-transformation-Precategory + map-yoneda-Small-Large-Precategory : + natural-transformation-Small-Large-Precategory ( C) - ( Set-Precategory l2) + ( Set-Large-Precategory) ( representable-functor-Precategory C c) ( F) → - type-Set (obj-functor-Precategory C (Set-Precategory l2) F c) - yoneda-evid-Precategory α = - hom-family-natural-transformation-Precategory + type-Set (obj-functor-Small-Large-Precategory C Set-Large-Precategory F c) + map-yoneda-Small-Large-Precategory σ = + hom-family-natural-transformation-Small-Large-Precategory ( C) - ( Set-Precategory l2) + ( Set-Large-Precategory) ( representable-functor-Precategory C c) ( F) - ( α) + ( σ) ( c) ( id-hom-Precategory C) - yoneda-extension-Precategory : - type-Set (obj-functor-Precategory C (Set-Precategory l2) F c) → - natural-transformation-Precategory - C (Set-Precategory l2) (representable-functor-Precategory C c) F - pr1 (yoneda-extension-Precategory u) x f = - hom-functor-Precategory C (Set-Precategory l2) F f u - pr2 (yoneda-extension-Precategory u) g = + extension-yoneda-Small-Large-Precategory : + type-Set (obj-functor-Small-Large-Precategory C Set-Large-Precategory F c) → + natural-transformation-Small-Large-Precategory + C Set-Large-Precategory (representable-functor-Precategory C c) F + pr1 (extension-yoneda-Small-Large-Precategory u) x f = + hom-functor-Small-Large-Precategory C Set-Large-Precategory F f u + pr2 (extension-yoneda-Small-Large-Precategory u) g = eq-htpy ( λ f → htpy-eq ( inv - ( preserves-comp-functor-Precategory C (Set-Precategory l2) F g f)) + ( preserves-comp-functor-Small-Large-Precategory + ( C) + ( Set-Large-Precategory) + ( F) + ( g) + ( f))) ( u)) - section-yoneda-evid-Precategory : - section yoneda-evid-Precategory - pr1 section-yoneda-evid-Precategory = yoneda-extension-Precategory - pr2 section-yoneda-evid-Precategory = - htpy-eq (preserves-id-functor-Precategory C (Set-Precategory l2) F c) - - retraction-yoneda-evid-Precategory : - retraction yoneda-evid-Precategory - pr1 retraction-yoneda-evid-Precategory = yoneda-extension-Precategory - pr2 retraction-yoneda-evid-Precategory α = + section-map-yoneda-Small-Large-Precategory : + section map-yoneda-Small-Large-Precategory + pr1 section-map-yoneda-Small-Large-Precategory = + extension-yoneda-Small-Large-Precategory + pr2 section-map-yoneda-Small-Large-Precategory = + htpy-eq + ( preserves-id-functor-Small-Large-Precategory + ( C) + ( Set-Large-Precategory) + ( F) + ( c)) + + retraction-map-yoneda-Small-Large-Precategory : + retraction map-yoneda-Small-Large-Precategory + pr1 retraction-map-yoneda-Small-Large-Precategory = + extension-yoneda-Small-Large-Precategory + pr2 retraction-map-yoneda-Small-Large-Precategory σ = eq-type-subtype - ( is-natural-transformation-prop-Precategory - ( C) (Set-Precategory l2) (representable-functor-Precategory C c) F) + ( is-natural-transformation-prop-Small-Large-Precategory + ( C) Set-Large-Precategory (representable-functor-Precategory C c) F) ( eq-htpy ( λ x → eq-htpy ( λ f → ( htpy-eq - ( (pr2 α) f) + ( pr2 σ f) ( (id-hom-Precategory C))) ∙ - ( ap (pr1 α x) (right-unit-law-comp-hom-Precategory C f))))) + ( ap (pr1 σ x) (right-unit-law-comp-hom-Precategory C f))))) - yoneda-lemma-Precategory : is-equiv yoneda-evid-Precategory - pr1 yoneda-lemma-Precategory = section-yoneda-evid-Precategory - pr2 yoneda-lemma-Precategory = retraction-yoneda-evid-Precategory + lemma-yoneda-Small-Large-Precategory : + is-equiv map-yoneda-Small-Large-Precategory + pr1 lemma-yoneda-Small-Large-Precategory = + section-map-yoneda-Small-Large-Precategory + pr2 lemma-yoneda-Small-Large-Precategory = + retraction-map-yoneda-Small-Large-Precategory - equiv-yoneda-lemma-Precategory : - ( natural-transformation-Precategory C (Set-Precategory l2) + equiv-lemma-yoneda-Small-Large-Precategory : + ( natural-transformation-Small-Large-Precategory C Set-Large-Precategory ( representable-functor-Precategory C c) (F)) ≃ + ( type-Set + ( obj-functor-Small-Large-Precategory C Set-Large-Precategory F c)) + pr1 equiv-lemma-yoneda-Small-Large-Precategory = + map-yoneda-Small-Large-Precategory + pr2 equiv-lemma-yoneda-Small-Large-Precategory = + lemma-yoneda-Small-Large-Precategory +``` + +## The yoneda lemma into the small category of sets + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) (c : obj-Precategory C) + (F : functor-Precategory C (Set-Precategory l2)) + where + + map-yoneda-Precategory : + natural-transformation-Precategory + ( C) + ( Set-Precategory l2) + ( representable-functor-Precategory C c) + ( F) → + type-Set (obj-functor-Precategory C (Set-Precategory l2) F c) + map-yoneda-Precategory = map-yoneda-Small-Large-Precategory C c F + + extension-yoneda-Precategory : + type-Set (obj-functor-Precategory C (Set-Precategory l2) F c) → + natural-transformation-Precategory + C (Set-Precategory l2) (representable-functor-Precategory C c) F + extension-yoneda-Precategory = extension-yoneda-Small-Large-Precategory C c F + + lemma-yoneda-Precategory : is-equiv map-yoneda-Precategory + lemma-yoneda-Precategory = lemma-yoneda-Small-Large-Precategory C c F + + equiv-lemma-yoneda-Precategory : + ( natural-transformation-Precategory C (Set-Precategory l2) + ( representable-functor-Precategory C c) F) ≃ ( type-Set (obj-functor-Precategory C (Set-Precategory l2) F c)) - pr1 equiv-yoneda-lemma-Precategory = yoneda-evid-Precategory - pr2 equiv-yoneda-lemma-Precategory = yoneda-lemma-Precategory + equiv-lemma-yoneda-Precategory = + equiv-lemma-yoneda-Small-Large-Precategory C c F ``` + +## See also + +- [Presheaf categories](category-theory.presheaf-categories.md) From 78c0f23404cc83031254878f9c425de18d6db9a3 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sun, 22 Oct 2023 14:55:58 +0200 Subject: [PATCH 07/49] wip yoneda --- ...from-small-to-large-precategories.lagda.md | 6 +- ...ransformations-maps-precategories.lagda.md | 6 +- .../opposite-precategories.lagda.md | 82 +++++++++-- .../presheaf-categories.lagda.md | 21 +++ ...representable-functors-categories.lagda.md | 4 +- ...resentable-functors-precategories.lagda.md | 138 +++++++++++++++--- .../yoneda-lemma-precategories.lagda.md | 13 ++ src/foundation-core/identity-types.lagda.md | 12 +- 8 files changed, 234 insertions(+), 48 deletions(-) diff --git a/src/category-theory/natural-transformations-maps-from-small-to-large-precategories.lagda.md b/src/category-theory/natural-transformations-maps-from-small-to-large-precategories.lagda.md index a8913b09a5..054aa20477 100644 --- a/src/category-theory/natural-transformations-maps-from-small-to-large-precategories.lagda.md +++ b/src/category-theory/natural-transformations-maps-from-small-to-large-precategories.lagda.md @@ -58,10 +58,10 @@ module _ ( obj-map-Small-Large-Precategory C D F x) ( obj-map-Small-Large-Precategory C D G x) - coherence-square-hom-family-map-Small-Large-Precategory : + naturality-hom-family-map-Small-Large-Precategory : hom-family-map-Small-Large-Precategory → {x y : obj-Precategory C} (f : hom-Precategory C x y) → UU (β γF γG) - coherence-square-hom-family-map-Small-Large-Precategory γ {x} {y} f = + naturality-hom-family-map-Small-Large-Precategory γ {x} {y} f = coherence-square-hom-Large-Precategory D ( hom-map-Small-Large-Precategory C D F f) ( γ x) @@ -72,7 +72,7 @@ module _ hom-family-map-Small-Large-Precategory → UU (l1 ⊔ l2 ⊔ β γF γG) is-natural-transformation-map-Small-Large-Precategory γ = {x y : obj-Precategory C} (f : hom-Precategory C x y) → - coherence-square-hom-family-map-Small-Large-Precategory γ f + naturality-hom-family-map-Small-Large-Precategory γ f natural-transformation-map-Small-Large-Precategory : UU (l1 ⊔ l2 ⊔ β γF γG) natural-transformation-map-Small-Large-Precategory = diff --git a/src/category-theory/natural-transformations-maps-precategories.lagda.md b/src/category-theory/natural-transformations-maps-precategories.lagda.md index 8c0e2f5ea4..f130e7ef49 100644 --- a/src/category-theory/natural-transformations-maps-precategories.lagda.md +++ b/src/category-theory/natural-transformations-maps-precategories.lagda.md @@ -55,10 +55,10 @@ module _ ( obj-map-Precategory C D F x) ( obj-map-Precategory C D G x) - coherence-square-hom-family-map-Precategory : + naturality-hom-family-map-Precategory : hom-family-map-Precategory → {x y : obj-Precategory C} (f : hom-Precategory C x y) → UU l4 - coherence-square-hom-family-map-Precategory γ {x} {y} f = + naturality-hom-family-map-Precategory γ {x} {y} f = coherence-square-hom-Precategory D ( hom-map-Precategory C D F f) ( γ x) @@ -69,7 +69,7 @@ module _ hom-family-map-Precategory → UU (l1 ⊔ l2 ⊔ l4) is-natural-transformation-map-Precategory γ = {x y : obj-Precategory C} (f : hom-Precategory C x y) → - coherence-square-hom-family-map-Precategory γ f + naturality-hom-family-map-Precategory γ f natural-transformation-map-Precategory : UU (l1 ⊔ l2 ⊔ l4) natural-transformation-map-Precategory = diff --git a/src/category-theory/opposite-precategories.lagda.md b/src/category-theory/opposite-precategories.lagda.md index 6c1304e2e5..ece7ffc763 100644 --- a/src/category-theory/opposite-precategories.lagda.md +++ b/src/category-theory/opposite-precategories.lagda.md @@ -10,7 +10,11 @@ module category-theory.opposite-precategories where open import category-theory.precategories open import foundation.dependent-pair-types +open import foundation.equality-dependent-pair-types +open import foundation.function-extensionality open import foundation.identity-types +open import foundation.involutions +open import foundation.sets open import foundation.universe-levels ``` @@ -28,15 +32,73 @@ module _ {l1 l2 : Level} (C : Precategory l1 l2) where + obj-opposite-Precategory : UU l1 + obj-opposite-Precategory = obj-Precategory C + + hom-set-opposite-Precategory : (x y : obj-opposite-Precategory) → Set l2 + hom-set-opposite-Precategory x y = hom-set-Precategory C y x + + hom-opposite-Precategory : (x y : obj-opposite-Precategory) → UU l2 + hom-opposite-Precategory x y = type-Set (hom-set-opposite-Precategory x y) + + comp-hom-opposite-Precategory : + {x y z : obj-opposite-Precategory} → + hom-opposite-Precategory y z → + hom-opposite-Precategory x y → + hom-opposite-Precategory x z + comp-hom-opposite-Precategory g f = comp-hom-Precategory C f g + + associative-comp-hom-opposite-Precategory : + {x y z w : obj-opposite-Precategory} + (h : hom-opposite-Precategory z w) + (g : hom-opposite-Precategory y z) + (f : hom-opposite-Precategory x y) → + ( comp-hom-opposite-Precategory (comp-hom-opposite-Precategory h g) f) = + ( comp-hom-opposite-Precategory h (comp-hom-opposite-Precategory g f)) + associative-comp-hom-opposite-Precategory h g f = + inv (associative-comp-hom-Precategory C f g h) + + id-hom-opposite-Precategory : + {x : obj-opposite-Precategory} → hom-opposite-Precategory x x + id-hom-opposite-Precategory = id-hom-Precategory C + + left-unit-law-comp-hom-opposite-Precategory : + {x y : obj-opposite-Precategory} + (f : hom-opposite-Precategory x y) → + comp-hom-opposite-Precategory id-hom-opposite-Precategory f = f + left-unit-law-comp-hom-opposite-Precategory = + right-unit-law-comp-hom-Precategory C + + right-unit-law-comp-hom-opposite-Precategory : + {x y : obj-opposite-Precategory} (f : hom-opposite-Precategory x y) → + comp-hom-opposite-Precategory f id-hom-opposite-Precategory = f + right-unit-law-comp-hom-opposite-Precategory = + left-unit-law-comp-hom-Precategory C + opposite-Precategory : Precategory l1 l2 - pr1 opposite-Precategory = obj-Precategory C - pr1 (pr2 opposite-Precategory) x y = hom-set-Precategory C y x - pr1 (pr1 (pr2 (pr2 opposite-Precategory))) f g = comp-hom-Precategory C g f - pr2 (pr1 (pr2 (pr2 opposite-Precategory))) f g h = - inv (associative-comp-hom-Precategory C h g f) - pr1 (pr2 (pr2 (pr2 opposite-Precategory))) x = id-hom-Precategory C {x} - pr1 (pr2 (pr2 (pr2 (pr2 opposite-Precategory)))) f = - right-unit-law-comp-hom-Precategory C f - pr2 (pr2 (pr2 (pr2 (pr2 opposite-Precategory)))) f = - left-unit-law-comp-hom-Precategory C f + pr1 opposite-Precategory = obj-opposite-Precategory + pr1 (pr2 opposite-Precategory) = hom-set-opposite-Precategory + pr1 (pr1 (pr2 (pr2 opposite-Precategory))) = comp-hom-opposite-Precategory + pr2 (pr1 (pr2 (pr2 opposite-Precategory))) = + associative-comp-hom-opposite-Precategory + pr1 (pr2 (pr2 (pr2 opposite-Precategory))) x = id-hom-opposite-Precategory + pr1 (pr2 (pr2 (pr2 (pr2 opposite-Precategory)))) = + left-unit-law-comp-hom-opposite-Precategory + pr2 (pr2 (pr2 (pr2 (pr2 opposite-Precategory)))) = + right-unit-law-comp-hom-opposite-Precategory +``` + +## Properties + +### The opposite precategory construction is an involution on the type of precategories + +```agda +is-involution-opposite-Precategory : + {l1 l2 : Level} → is-involution (opposite-Precategory {l1} {l2}) +is-involution-opposite-Precategory C = + eq-pair-Σ-eq-pr2 + ( eq-pair-Σ-eq-pr2 + ( eq-pair-Σ + ( eq-pair-Σ-eq-pr2 {! htpy-eq ?!}) + {! !})) ``` diff --git a/src/category-theory/presheaf-categories.lagda.md b/src/category-theory/presheaf-categories.lagda.md index f5e7ddd193..a740fdb3ef 100644 --- a/src/category-theory/presheaf-categories.lagda.md +++ b/src/category-theory/presheaf-categories.lagda.md @@ -7,6 +7,7 @@ module category-theory.presheaf-categories where
Imports ```agda +open import category-theory.categories open import category-theory.category-of-functors-from-small-to-large-categories open import category-theory.large-categories open import category-theory.large-precategories @@ -63,6 +64,16 @@ module _ ( C) ( Set-Large-Precategory) ( is-large-category-Set-Large-Precategory) + + copresheaf-precategory-Large-Precategory : + (l : Level) → Precategory (l1 ⊔ l2 ⊔ lsuc l) (l1 ⊔ l2 ⊔ l) + copresheaf-precategory-Large-Precategory = + precategory-Large-Precategory copresheaf-Large-Precategory + + copresheaf-category-Large-Category : + (l : Level) → Category (l1 ⊔ l2 ⊔ lsuc l) (l1 ⊔ l2 ⊔ l) + copresheaf-category-Large-Category = + category-Large-Category copresheaf-Large-Category ``` ### The presheaf category of a precategory @@ -81,4 +92,14 @@ module _ Large-Category (λ l → l1 ⊔ l2 ⊔ lsuc l) (λ l l' → l1 ⊔ l2 ⊔ l ⊔ l') presheaf-Large-Category = copresheaf-Large-Category (opposite-Precategory C) + + presheaf-precategory-Large-Precategory : + (l : Level) → Precategory (l1 ⊔ l2 ⊔ lsuc l) (l1 ⊔ l2 ⊔ l) + presheaf-precategory-Large-Precategory = + precategory-Large-Precategory presheaf-Large-Precategory + + presheaf-category-Large-Category : + (l : Level) → Category (l1 ⊔ l2 ⊔ lsuc l) (l1 ⊔ l2 ⊔ l) + presheaf-category-Large-Category = + category-Large-Category presheaf-Large-Category ``` diff --git a/src/category-theory/representable-functors-categories.lagda.md b/src/category-theory/representable-functors-categories.lagda.md index 289bb57e8b..038c508ad3 100644 --- a/src/category-theory/representable-functors-categories.lagda.md +++ b/src/category-theory/representable-functors-categories.lagda.md @@ -38,8 +38,8 @@ associativity and the left unit law for the category `C`. representable-functor-Category : {l1 l2 : Level} (C : Category l1 l2) (c : obj-Category C) → functor-Category C (Set-Category l2) -representable-functor-Category C c = - representable-functor-Precategory (precategory-Category C) c +representable-functor-Category C = + representable-functor-Precategory (precategory-Category C) ``` ## Natural transformations between representable functors diff --git a/src/category-theory/representable-functors-precategories.lagda.md b/src/category-theory/representable-functors-precategories.lagda.md index 5015e85c0f..de141a092d 100644 --- a/src/category-theory/representable-functors-precategories.lagda.md +++ b/src/category-theory/representable-functors-precategories.lagda.md @@ -8,13 +8,19 @@ module category-theory.representable-functors-precategories where ```agda open import category-theory.functors-precategories +open import category-theory.maps-from-small-to-large-precategories +open import category-theory.maps-precategories open import category-theory.natural-transformations-functors-precategories +open import category-theory.opposite-precategories open import category-theory.precategories +open import category-theory.precategory-of-functors +open import category-theory.presheaf-categories open import foundation.category-of-sets open import foundation.dependent-pair-types open import foundation.function-extensionality open import foundation.homotopies +open import foundation.sets open import foundation.universe-levels ``` @@ -28,8 +34,8 @@ there is a [functor](category-theory.functors-precategories.md) from `C` to the that: - sends an object `x` of `C` to the [set](foundation-core.sets.md) `hom c x` and -- sends a morphism `g : hom x y` of `C` to the function `hom c x → hom c y` - defined by postcomposition with `g`. +- sends a morphism `f : hom x y` of `C` to the function `hom c x → hom c y` + defined by postcomposition with `f`. The functoriality axioms follow, by [function extensionality](foundation.function-extensionality.md), from @@ -38,16 +44,47 @@ associativity and the left unit law for the precategory `C`. ## Definition ```agda -representable-functor-Precategory : - {l1 l2 : Level} (C : Precategory l1 l2) (c : obj-Precategory C) → - functor-Precategory C (Set-Precategory l2) -pr1 (representable-functor-Precategory C c) = hom-set-Precategory C c -pr1 (pr2 (representable-functor-Precategory C c)) g = - postcomp-hom-Precategory C g c -pr1 (pr2 (pr2 (representable-functor-Precategory C c))) h g = - eq-htpy (associative-comp-hom-Precategory C h g) -pr2 (pr2 (pr2 (representable-functor-Precategory C c))) _ = - eq-htpy (left-unit-law-comp-hom-Precategory C) +module _ + {l1 l2 : Level} (C : Precategory l1 l2) (c : obj-Precategory C) + where + + obj-representable-functor-Precategory : obj-Precategory C → Set l2 + obj-representable-functor-Precategory = hom-set-Precategory C c + + hom-representable-functor-Precategory : + {x y : obj-Precategory C} (f : hom-Precategory C x y) → + hom-Precategory C c x → hom-Precategory C c y + hom-representable-functor-Precategory f = postcomp-hom-Precategory C f c + + representable-map-Precategory : map-Precategory C (Set-Precategory l2) + pr1 representable-map-Precategory = obj-representable-functor-Precategory + pr2 representable-map-Precategory = hom-representable-functor-Precategory + + preserves-comp-representable-functor-Precategory : + preserves-comp-hom-map-Precategory + ( C) + ( Set-Precategory l2) + ( representable-map-Precategory) + preserves-comp-representable-functor-Precategory g f = + eq-htpy (associative-comp-hom-Precategory C g f) + + preserves-id-representable-functor-Precategory : + preserves-id-hom-map-Precategory + ( C) + ( Set-Precategory l2) + ( representable-map-Precategory) + preserves-id-representable-functor-Precategory x = + eq-htpy (left-unit-law-comp-hom-Precategory C) + + representable-functor-Precategory : functor-Precategory C (Set-Precategory l2) + pr1 representable-functor-Precategory = + obj-representable-functor-Precategory + pr1 (pr2 representable-functor-Precategory) = + hom-representable-functor-Precategory + pr1 (pr2 (pr2 representable-functor-Precategory)) = + preserves-comp-representable-functor-Precategory + pr2 (pr2 (pr2 representable-functor-Precategory)) = + preserves-id-representable-functor-Precategory ``` ## Natural transformations between representable functors @@ -58,16 +95,69 @@ from the functor represented by `c` to the functor represented by `b`. Its components `hom c x → hom b x` are defined by precomposition with `f`. ```agda -representable-natural-transformation-Precategory : - {l1 l2 : Level} (C : Precategory l1 l2) (b c : obj-Precategory C) - (f : hom-Precategory C b c) → - natural-transformation-Precategory - ( C) - ( Set-Precategory l2) - ( representable-functor-Precategory C c) - ( representable-functor-Precategory C b) -pr1 (representable-natural-transformation-Precategory C b c f) = - precomp-hom-Precategory C f -pr2 (representable-natural-transformation-Precategory C b c f) h = - eq-htpy (inv-htpy (λ g → associative-comp-hom-Precategory C h g f)) +module _ + {l1 l2 : Level} (C : Precategory l1 l2) + {b c : obj-Precategory C} (f : hom-Precategory C b c) + where + + hom-family-representable-natural-transformation-Precategory : + hom-family-functor-Precategory + ( C) + ( Set-Precategory l2) + ( representable-functor-Precategory C c) + ( representable-functor-Precategory C b) + hom-family-representable-natural-transformation-Precategory = + precomp-hom-Precategory C f + + is-natural-transformation-representable-natural-transformation-Precategory : + is-natural-transformation-Precategory + ( C) + ( Set-Precategory l2) + ( representable-functor-Precategory C c) + ( representable-functor-Precategory C b) + ( hom-family-representable-natural-transformation-Precategory) + is-natural-transformation-representable-natural-transformation-Precategory h = + eq-htpy (inv-htpy (λ g → associative-comp-hom-Precategory C h g f)) + + representable-natural-transformation-Precategory : + natural-transformation-Precategory + ( C) + ( Set-Precategory l2) + ( representable-functor-Precategory C c) + ( representable-functor-Precategory C b) + pr1 (representable-natural-transformation-Precategory) = + hom-family-representable-natural-transformation-Precategory + pr2 (representable-natural-transformation-Precategory) = + is-natural-transformation-representable-natural-transformation-Precategory +``` + +## Properties + +### Taking representable functors defines a functor into the presheaf category + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) + where + + map-representable-functor-copresheaf-Precategory : + map-Precategory + ( opposite-Precategory C) + ( copresheaf-precategory-Large-Precategory C l2) + pr1 map-representable-functor-copresheaf-Precategory = + representable-functor-Precategory C + pr2 map-representable-functor-copresheaf-Precategory = + representable-natural-transformation-Precategory C + + functor-representable-functor-copresheaf-Precategory : + functor-Precategory + ( opposite-Precategory C) + ( copresheaf-precategory-Large-Precategory C l2) + pr1 functor-representable-functor-copresheaf-Precategory = + representable-functor-Precategory C + pr1 (pr2 functor-representable-functor-copresheaf-Precategory) = + representable-natural-transformation-Precategory C + pr1 (pr2 (pr2 functor-representable-functor-copresheaf-Precategory)) = + {! !} + pr2 (pr2 (pr2 functor-representable-functor-copresheaf-Precategory)) = {! !} ``` diff --git a/src/category-theory/yoneda-lemma-precategories.lagda.md b/src/category-theory/yoneda-lemma-precategories.lagda.md index 0522c0bcfe..eed27e6680 100644 --- a/src/category-theory/yoneda-lemma-precategories.lagda.md +++ b/src/category-theory/yoneda-lemma-precategories.lagda.md @@ -136,6 +136,19 @@ module _ lemma-yoneda-Small-Large-Precategory ``` +### The yoneda embedding into the large category of sets + +#### Taking representable functors is a functor + +```agda +module _ + {l1 l2 l3 : Level} (C : Precategory l1 l2) (c : obj-Precategory C) + (F : functor-Small-Large-Precategory C Set-Large-Precategory l3) + where + + map-yoneda-Small-Large-Precategory : +``` + ## The yoneda lemma into the small category of sets ```agda diff --git a/src/foundation-core/identity-types.lagda.md b/src/foundation-core/identity-types.lagda.md index 5fd87e8523..236c8d76ea 100644 --- a/src/foundation-core/identity-types.lagda.md +++ b/src/foundation-core/identity-types.lagda.md @@ -132,24 +132,24 @@ module _ ((p ∙ q) ∙ r) = (p ∙ (q ∙ r)) assoc refl q r = refl - left-unit : {x y : A} {p : x = y} → (refl ∙ p) = p + left-unit : {x y : A} {p : x = y} → refl ∙ p = p left-unit = refl - right-unit : {x y : A} {p : x = y} → (p ∙ refl) = p + right-unit : {x y : A} {p : x = y} → p ∙ refl = p right-unit {p = refl} = refl - left-inv : {x y : A} (p : x = y) → ((inv p) ∙ p) = refl + left-inv : {x y : A} (p : x = y) → inv p ∙ p = refl left-inv refl = refl - right-inv : {x y : A} (p : x = y) → (p ∙ (inv p)) = refl + right-inv : {x y : A} (p : x = y) → p ∙ (inv p) = refl right-inv refl = refl - inv-inv : {x y : A} (p : x = y) → (inv (inv p)) = p + inv-inv : {x y : A} (p : x = y) → inv (inv p) = p inv-inv refl = refl distributive-inv-concat : {x y : A} (p : x = y) {z : A} (q : y = z) → - (inv (p ∙ q)) = ((inv q) ∙ (inv p)) + inv (p ∙ q) = inv q ∙ inv p distributive-inv-concat refl refl = refl ``` From 7753dcf229d438555fcd5c81ab57f7b5dbc73027 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sun, 22 Oct 2023 22:52:06 +0200 Subject: [PATCH 08/49] lemmas about opposite precategories --- .../isomorphisms-in-precategories.lagda.md | 35 ++++++ .../opposite-precategories.lagda.md | 116 +++++++++++++++++- 2 files changed, 149 insertions(+), 2 deletions(-) diff --git a/src/category-theory/isomorphisms-in-precategories.lagda.md b/src/category-theory/isomorphisms-in-precategories.lagda.md index dce1b6d1aa..9e73afaa67 100644 --- a/src/category-theory/isomorphisms-in-precategories.lagda.md +++ b/src/category-theory/isomorphisms-in-precategories.lagda.md @@ -14,6 +14,7 @@ open import foundation.cartesian-product-types open import foundation.dependent-pair-types open import foundation.equivalences open import foundation.function-types +open import foundation.homotopies open import foundation.identity-types open import foundation.injective-maps open import foundation.propositions @@ -432,6 +433,12 @@ module _ pr1 (inv-iso-Precategory f) = hom-inv-iso-Precategory C f pr2 (inv-iso-Precategory f) = is-iso-inv-is-iso-Precategory C (is-iso-iso-Precategory C f) + + is-iso-inv-iso-Precategory : + (f : iso-Precategory C x y) → + is-iso-Precategory C (hom-inv-iso-Precategory C f) + is-iso-inv-iso-Precategory f = + is-iso-iso-Precategory C (inv-iso-Precategory f) ``` ### Groupoid laws of isomorphisms in precategories @@ -519,6 +526,34 @@ module _ ( is-section-hom-inv-iso-Precategory C f) ``` +### The inverse operation is a fibered involution on isomorphisms + +```agda +module _ + {l1 l2 : Level} + (C : Precategory l1 l2) + where + + is-fibered-involution-inv-iso-Precategory : + {x y : obj-Precategory C} → + inv-iso-Precategory C {y} {x} ∘ inv-iso-Precategory C {x} {y} ~ id + is-fibered-involution-inv-iso-Precategory f = refl + + is-equiv-inv-iso-Precategory : + {x y : obj-Precategory C} → is-equiv (inv-iso-Precategory C {x} {y}) + pr1 (pr1 is-equiv-inv-iso-Precategory) = inv-iso-Precategory C + pr2 (pr1 is-equiv-inv-iso-Precategory) = + is-fibered-involution-inv-iso-Precategory + pr1 (pr2 is-equiv-inv-iso-Precategory) = inv-iso-Precategory C + pr2 (pr2 is-equiv-inv-iso-Precategory) = + is-fibered-involution-inv-iso-Precategory + + equiv-inv-iso-Precategory : + {x y : obj-Precategory C} → iso-Precategory C x y ≃ iso-Precategory C y x + pr1 equiv-inv-iso-Precategory = inv-iso-Precategory C + pr2 equiv-inv-iso-Precategory = is-equiv-inv-iso-Precategory +``` + ### A morphism `f` is an isomorphism if and only if precomposition by `f` is an equivalence **Proof:** If `f` is an isomorphism with inverse `f⁻¹`, then precomposing with diff --git a/src/category-theory/opposite-precategories.lagda.md b/src/category-theory/opposite-precategories.lagda.md index ece7ffc763..dd2db0cf96 100644 --- a/src/category-theory/opposite-precategories.lagda.md +++ b/src/category-theory/opposite-precategories.lagda.md @@ -7,14 +7,24 @@ module category-theory.opposite-precategories where
Imports ```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 open import foundation.dependent-pair-types open import foundation.equality-dependent-pair-types +open import foundation.equivalences open import foundation.function-extensionality +open import foundation.function-types +open import foundation.homotopies open import foundation.identity-types open import foundation.involutions +open import foundation.multivariable-homotopies +open import foundation.propositions open import foundation.sets +open import foundation.subtypes +open import foundation.transport-along-identifications open import foundation.universe-levels ``` @@ -99,6 +109,108 @@ is-involution-opposite-Precategory C = eq-pair-Σ-eq-pr2 ( eq-pair-Σ-eq-pr2 ( eq-pair-Σ - ( eq-pair-Σ-eq-pr2 {! htpy-eq ?!}) - {! !})) + ( eq-pair-Σ-eq-pr2 + ( eq-is-prop + ( is-prop-is-associative-composition-operation-binary-family-Set + ( hom-set-Precategory C) + ( comp-hom-Precategory C)))) + ( eq-is-prop + ( is-prop-is-unital-composition-operation-binary-family-Set + ( hom-set-Precategory C) + ( comp-hom-Precategory C))))) + +involution-opposite-Precategory : + (l1 l2 : Level) → involution (Precategory l1 l2) +pr1 (involution-opposite-Precategory l1 l2) = opposite-Precategory +pr2 (involution-opposite-Precategory l1 l2) = is-involution-opposite-Precategory + +is-equiv-opposite-Precategory : + {l1 l2 : Level} → is-equiv (opposite-Precategory {l1} {l2}) +is-equiv-opposite-Precategory = + is-equiv-is-involution is-involution-opposite-Precategory + +equiv-opposite-Precategory : + (l1 l2 : Level) → Precategory l1 l2 ≃ Precategory l1 l2 +equiv-opposite-Precategory l1 l2 = + equiv-involution (involution-opposite-Precategory l1 l2) +``` + +### Computing the isomorphism sets of the opposite precategory + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) + where + + map-compute-iso-inv-opposite-Precategory : + {x y : obj-Precategory C} → + iso-Precategory C x y → iso-Precategory (opposite-Precategory C) x y + pr1 (map-compute-iso-inv-opposite-Precategory f) = hom-inv-iso-Precategory C f + pr1 (pr2 (map-compute-iso-inv-opposite-Precategory f)) = + hom-iso-Precategory C f + pr1 (pr2 (pr2 (map-compute-iso-inv-opposite-Precategory f))) = + is-section-hom-inv-iso-Precategory C f + pr2 (pr2 (pr2 (map-compute-iso-inv-opposite-Precategory f))) = + is-retraction-hom-inv-iso-Precategory C f + + map-inv-compute-iso-inv-opposite-Precategory : + {x y : obj-Precategory C} → + iso-Precategory (opposite-Precategory C) x y → iso-Precategory C x y + pr1 (map-inv-compute-iso-inv-opposite-Precategory f) = + hom-inv-iso-Precategory (opposite-Precategory C) f + pr1 (pr2 (map-inv-compute-iso-inv-opposite-Precategory f)) = + hom-iso-Precategory (opposite-Precategory C) f + pr1 (pr2 (pr2 (map-inv-compute-iso-inv-opposite-Precategory f))) = + is-section-hom-inv-iso-Precategory (opposite-Precategory C) f + pr2 (pr2 (pr2 (map-inv-compute-iso-inv-opposite-Precategory f))) = + is-retraction-hom-inv-iso-Precategory (opposite-Precategory C) f + + is-equiv-map-compute-iso-inv-opposite-Precategory : + {x y : obj-Precategory C} → + is-equiv (map-compute-iso-inv-opposite-Precategory {x} {y}) + pr1 (pr1 is-equiv-map-compute-iso-inv-opposite-Precategory) = + map-inv-compute-iso-inv-opposite-Precategory + pr2 (pr1 is-equiv-map-compute-iso-inv-opposite-Precategory) = refl-htpy + pr1 (pr2 is-equiv-map-compute-iso-inv-opposite-Precategory) = + map-inv-compute-iso-inv-opposite-Precategory + pr2 (pr2 is-equiv-map-compute-iso-inv-opposite-Precategory) = refl-htpy + + compute-iso-inv-opposite-Precategory : + {x y : obj-Precategory C} → + iso-Precategory C x y ≃ iso-Precategory (opposite-Precategory C) x y + pr1 compute-iso-inv-opposite-Precategory = + map-compute-iso-inv-opposite-Precategory + pr2 compute-iso-inv-opposite-Precategory = + is-equiv-map-compute-iso-inv-opposite-Precategory +``` + +### The underlying precategory is a category if and only if the opposite is a category + +```agda +abstract + is-category-opposite-is-category-Precategory : + {l1 l2 : Level} (C : Precategory l1 l2) → + is-category-Precategory C → + is-category-Precategory (opposite-Precategory C) + is-category-opposite-is-category-Precategory C is-category-C x y = + is-equiv-htpy-equiv + ( compute-iso-inv-opposite-Precategory C ∘e (_ , is-category-C x y)) + ( λ where + refl → + eq-type-subtype + ( is-iso-prop-Precategory (opposite-Precategory C)) + ( refl)) + +abstract + is-category-is-category-opposite-Precategory : + {l1 l2 : Level} (C : Precategory l1 l2) → + is-category-Precategory (opposite-Precategory C) → + is-category-Precategory C + is-category-is-category-opposite-Precategory C is-category-op-C = + tr + ( is-category-Precategory) + ( is-involution-opposite-Precategory C) + ( is-category-opposite-is-category-Precategory + ( opposite-Precategory C) + ( is-category-op-C)) ``` From e1c2d1675784250cc9a1c04b3509b745570802b3 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sun, 22 Oct 2023 22:52:19 +0200 Subject: [PATCH 09/49] multivariable implicit homotopies --- .../multivariable-homotopies.lagda.md | 68 ++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/src/foundation/multivariable-homotopies.lagda.md b/src/foundation/multivariable-homotopies.lagda.md index dcb6b9cc61..59f9d12050 100644 --- a/src/foundation/multivariable-homotopies.lagda.md +++ b/src/foundation/multivariable-homotopies.lagda.md @@ -11,13 +11,14 @@ open import foundation.telescopes public ```agda open import elementary-number-theory.natural-numbers +open import foundation.equivalences open import foundation.function-extensionality open import foundation.iterated-dependent-product-types open import foundation.universe-levels open import foundation-core.contractible-types -open import foundation-core.equivalences open import foundation-core.functoriality-dependent-function-types +open import foundation-core.homotopies open import foundation-core.identity-types open import foundation-core.propositions open import foundation-core.truncated-types @@ -47,6 +48,16 @@ multivariable-htpy {{cons-telescope A}} f g = (x : _) → multivariable-htpy {{A x}} (f x) (g x) ``` +### Multivariable homotopies between implicit functions + +```agda +multivariable-htpy-implicit : + {l : Level} {n : ℕ} {{A : telescope l n}} (f g : iterated-implicit-Π A) → UU l +multivariable-htpy-implicit {{base-telescope A}} f g = f = g +multivariable-htpy-implicit {{cons-telescope A}} f g = + (x : _) → multivariable-htpy-implicit {{A x}} (f {x}) (g {x}) +``` + ### Iterated function extensionality ```agda @@ -79,6 +90,61 @@ equiv-iterated-funext ._ {{cons-telescope A}} = equiv-Π-equiv-family (λ x → equiv-iterated-funext _ {{A x}}) ∘e equiv-funext ``` +### Iterated function extensionality for implicit functions + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g : {x : A} → B x} + where + + equiv-funext-implicit : + (Id {A = {x : A} → B x} f g) ≃ ((x : A) → f {x} = g {x}) + equiv-funext-implicit = + equiv-funext ∘e equiv-ap equiv-explicit-implicit-Π f g + + htpy-eq-implicit : + Id {A = {x : A} → B x} f g → (x : A) → f {x} = g {x} + htpy-eq-implicit = map-equiv equiv-funext-implicit + + funext-implicit : is-equiv htpy-eq-implicit + funext-implicit = is-equiv-map-equiv equiv-funext-implicit + + eq-htpy-implicit : + ((x : A) → f {x} = g {x}) → Id {A = {x : A} → B x} f g + eq-htpy-implicit = map-inv-equiv equiv-funext-implicit +``` + +```agda +refl-multivariable-htpy-implicit : + {l : Level} (n : ℕ) {{A : telescope l n}} {f : iterated-implicit-Π A} → + multivariable-htpy-implicit {{A}} f f +refl-multivariable-htpy-implicit .0 {{base-telescope A}} = refl +refl-multivariable-htpy-implicit ._ {{cons-telescope A}} x = + refl-multivariable-htpy-implicit _ {{A x}} + +multivariable-htpy-eq-implicit : + {l : Level} (n : ℕ) {{A : telescope l n}} {f g : iterated-implicit-Π A} → + Id {A = iterated-implicit-Π A} f g → multivariable-htpy-implicit {{A}} f g +multivariable-htpy-eq-implicit .0 {{base-telescope A}} p = p +multivariable-htpy-eq-implicit ._ {{cons-telescope A}} p x = + multivariable-htpy-eq-implicit _ {{A x}} (htpy-eq-implicit p x) + +eq-multivariable-htpy-implicit : + {l : Level} (n : ℕ) {{A : telescope l n}} {f g : iterated-implicit-Π A} → + multivariable-htpy-implicit {{A}} f g → Id {A = iterated-implicit-Π A} f g +eq-multivariable-htpy-implicit .0 {{base-telescope A}} H = H +eq-multivariable-htpy-implicit ._ {{cons-telescope A}} H = + eq-htpy-implicit (λ x → eq-multivariable-htpy-implicit _ {{A x}} (H x)) + +equiv-iterated-funext-implicit : + {l : Level} (n : ℕ) {{A : telescope l n}} {f g : iterated-implicit-Π A} → + (Id {A = iterated-implicit-Π A} f g) ≃ multivariable-htpy-implicit {{A}} f g +equiv-iterated-funext-implicit .0 {{base-telescope A}} = id-equiv +equiv-iterated-funext-implicit ._ {{cons-telescope A}} = + ( equiv-Π-equiv-family (λ x → equiv-iterated-funext-implicit _ {{A x}})) ∘e + ( equiv-funext-implicit) +``` + ## See also - [Binary homotopies](foundation.binary-homotopies.md) for once-iterated From d29c9cdda372c4883fb87e804035abd0552cee3b Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sun, 22 Oct 2023 23:16:07 +0200 Subject: [PATCH 10/49] refactor implicit function extensionality --- ...oriality-dependent-function-types.lagda.md | 37 +----------- src/foundation.lagda.md | 1 + ...equality-dependent-function-types.lagda.md | 1 + .../function-extensionality.lagda.md | 25 ++++++++ .../implicit-function-types.lagda.md | 58 +++++++++++++++++++ .../multivariable-homotopies.lagda.md | 22 ------- 6 files changed, 87 insertions(+), 57 deletions(-) create mode 100644 src/foundation/implicit-function-types.lagda.md diff --git a/src/foundation-core/functoriality-dependent-function-types.lagda.md b/src/foundation-core/functoriality-dependent-function-types.lagda.md index 354fdfb0b1..a9f519510a 100644 --- a/src/foundation-core/functoriality-dependent-function-types.lagda.md +++ b/src/foundation-core/functoriality-dependent-function-types.lagda.md @@ -11,6 +11,7 @@ open import foundation.action-on-identifications-dependent-functions open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.function-extensionality +open import foundation.implicit-function-types open import foundation.type-theoretic-principle-of-choice open import foundation.universe-levels @@ -33,40 +34,6 @@ open import foundation-core.transport-along-identifications ## Properties -### Dependent function types taking implicit arguments are equivalent to dependent function types taking explicit arguments - -```agda -module _ - {l1 l2 : Level} {A : UU l1} {B : A → UU l2} - where - - implicit-explicit-Π : ((x : A) → B x) → {x : A} → B x - implicit-explicit-Π f {x} = f x - - explicit-implicit-Π : ({x : A} → B x) → (x : A) → B x - explicit-implicit-Π f x = f {x} - - is-equiv-implicit-explicit-Π : is-equiv implicit-explicit-Π - pr1 (pr1 is-equiv-implicit-explicit-Π) = explicit-implicit-Π - pr2 (pr1 is-equiv-implicit-explicit-Π) = refl-htpy - pr1 (pr2 is-equiv-implicit-explicit-Π) = explicit-implicit-Π - pr2 (pr2 is-equiv-implicit-explicit-Π) = refl-htpy - - is-equiv-explicit-implicit-Π : is-equiv explicit-implicit-Π - pr1 (pr1 is-equiv-explicit-implicit-Π) = implicit-explicit-Π - pr2 (pr1 is-equiv-explicit-implicit-Π) = refl-htpy - pr1 (pr2 is-equiv-explicit-implicit-Π) = implicit-explicit-Π - pr2 (pr2 is-equiv-explicit-implicit-Π) = refl-htpy - - equiv-implicit-explicit-Π : ((x : A) → B x) ≃ ({x : A} → B x) - pr1 equiv-implicit-explicit-Π = implicit-explicit-Π - pr2 equiv-implicit-explicit-Π = is-equiv-implicit-explicit-Π - - equiv-explicit-implicit-Π : ({x : A} → B x) ≃ ((x : A) → B x) - pr1 equiv-explicit-implicit-Π = explicit-implicit-Π - pr2 equiv-explicit-implicit-Π = is-equiv-explicit-implicit-Π -``` - ### The operation `map-Π` preserves homotopies ```agda @@ -184,7 +151,7 @@ abstract is-coherently-invertible f → (C : B → UU l3) → is-equiv (precomp-Π f C) is-equiv-precomp-Π-is-coherently-invertible f - ( pair g (pair is-section-g (pair is-retraction-g coh))) C = + ( g , is-section-g , is-retraction-g , coh) C = is-equiv-is-invertible (λ s y → tr C (is-section-g y) (s (g y))) ( λ s → eq-htpy (λ x → diff --git a/src/foundation.lagda.md b/src/foundation.lagda.md index 1d473c3b33..3568a211d2 100644 --- a/src/foundation.lagda.md +++ b/src/foundation.lagda.md @@ -158,6 +158,7 @@ open import foundation.identity-truncated-types public open import foundation.identity-types public open import foundation.images public open import foundation.images-subtypes public +open import foundation.implicit-function-types public open import foundation.impredicative-encodings public open import foundation.impredicative-universes public open import foundation.induction-principle-propositional-truncation public diff --git a/src/foundation/equality-dependent-function-types.lagda.md b/src/foundation/equality-dependent-function-types.lagda.md index 5f424d53fc..963b0063ed 100644 --- a/src/foundation/equality-dependent-function-types.lagda.md +++ b/src/foundation/equality-dependent-function-types.lagda.md @@ -9,6 +9,7 @@ module foundation.equality-dependent-function-types where ```agda open import foundation.dependent-pair-types open import foundation.fundamental-theorem-of-identity-types +open import foundation.implicit-function-types open import foundation.type-theoretic-principle-of-choice open import foundation.universe-levels diff --git a/src/foundation/function-extensionality.lagda.md b/src/foundation/function-extensionality.lagda.md index af9e61b9f9..e601cc421c 100644 --- a/src/foundation/function-extensionality.lagda.md +++ b/src/foundation/function-extensionality.lagda.md @@ -10,6 +10,7 @@ module foundation.function-extensionality where open import foundation.action-on-identifications-binary-functions open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types +open import foundation.implicit-function-types open import foundation.universe-levels open import foundation-core.equivalences @@ -132,6 +133,30 @@ module _ pr2 (equiv-eq-htpy {f} {g}) = is-equiv-eq-htpy f g ``` +### Function extensionality for implicit functions + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g : {x : A} → B x} + where + + equiv-funext-implicit : + (Id {A = {x : A} → B x} f g) ≃ ((x : A) → f {x} = g {x}) + equiv-funext-implicit = + equiv-funext ∘e equiv-ap equiv-explicit-implicit-Π f g + + htpy-eq-implicit : + Id {A = {x : A} → B x} f g → (x : A) → f {x} = g {x} + htpy-eq-implicit = map-equiv equiv-funext-implicit + + funext-implicit : is-equiv htpy-eq-implicit + funext-implicit = is-equiv-map-equiv equiv-funext-implicit + + eq-htpy-implicit : + ((x : A) → f {x} = g {x}) → Id {A = {x : A} → B x} f g + eq-htpy-implicit = map-inv-equiv equiv-funext-implicit +``` + ## Properties ### Naturality of `htpy-eq` diff --git a/src/foundation/implicit-function-types.lagda.md b/src/foundation/implicit-function-types.lagda.md new file mode 100644 index 0000000000..23e5b1cd65 --- /dev/null +++ b/src/foundation/implicit-function-types.lagda.md @@ -0,0 +1,58 @@ +# Implicit function types + +```agda +module foundation.implicit-function-types where +``` + +
Imports + +```agda +open import foundation.dependent-pair-types +open import foundation.universe-levels + +open import foundation-core.equivalences +open import foundation-core.homotopies +``` + +
+ +## Properties + +### Dependent function types taking implicit arguments are equivalent to dependent function types taking explicit arguments + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} + where + + implicit-explicit-Π : ((x : A) → B x) → {x : A} → B x + implicit-explicit-Π f {x} = f x + + explicit-implicit-Π : ({x : A} → B x) → (x : A) → B x + explicit-implicit-Π f x = f {x} + + is-equiv-implicit-explicit-Π : is-equiv implicit-explicit-Π + pr1 (pr1 is-equiv-implicit-explicit-Π) = explicit-implicit-Π + pr2 (pr1 is-equiv-implicit-explicit-Π) = refl-htpy + pr1 (pr2 is-equiv-implicit-explicit-Π) = explicit-implicit-Π + pr2 (pr2 is-equiv-implicit-explicit-Π) = refl-htpy + + is-equiv-explicit-implicit-Π : is-equiv explicit-implicit-Π + pr1 (pr1 is-equiv-explicit-implicit-Π) = implicit-explicit-Π + pr2 (pr1 is-equiv-explicit-implicit-Π) = refl-htpy + pr1 (pr2 is-equiv-explicit-implicit-Π) = implicit-explicit-Π + pr2 (pr2 is-equiv-explicit-implicit-Π) = refl-htpy + + equiv-implicit-explicit-Π : ((x : A) → B x) ≃ ({x : A} → B x) + pr1 equiv-implicit-explicit-Π = implicit-explicit-Π + pr2 equiv-implicit-explicit-Π = is-equiv-implicit-explicit-Π + + equiv-explicit-implicit-Π : ({x : A} → B x) ≃ ((x : A) → B x) + pr1 equiv-explicit-implicit-Π = explicit-implicit-Π + pr2 equiv-explicit-implicit-Π = is-equiv-explicit-implicit-Π +``` + +## See also + +- Function extensionality for implicit function types is established in + [`foundation.function-extensionality`](foundation.function-extensionality.md). diff --git a/src/foundation/multivariable-homotopies.lagda.md b/src/foundation/multivariable-homotopies.lagda.md index 59f9d12050..9448c51548 100644 --- a/src/foundation/multivariable-homotopies.lagda.md +++ b/src/foundation/multivariable-homotopies.lagda.md @@ -92,28 +92,6 @@ equiv-iterated-funext ._ {{cons-telescope A}} = ### Iterated function extensionality for implicit functions -```agda -module _ - {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g : {x : A} → B x} - where - - equiv-funext-implicit : - (Id {A = {x : A} → B x} f g) ≃ ((x : A) → f {x} = g {x}) - equiv-funext-implicit = - equiv-funext ∘e equiv-ap equiv-explicit-implicit-Π f g - - htpy-eq-implicit : - Id {A = {x : A} → B x} f g → (x : A) → f {x} = g {x} - htpy-eq-implicit = map-equiv equiv-funext-implicit - - funext-implicit : is-equiv htpy-eq-implicit - funext-implicit = is-equiv-map-equiv equiv-funext-implicit - - eq-htpy-implicit : - ((x : A) → f {x} = g {x}) → Id {A = {x : A} → B x} f g - eq-htpy-implicit = map-inv-equiv equiv-funext-implicit -``` - ```agda refl-multivariable-htpy-implicit : {l : Level} (n : ℕ) {{A : telescope l n}} {f : iterated-implicit-Π A} → From d66ecbf65b030da26bb0647cde6c993d473299f1 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sun, 22 Oct 2023 23:25:06 +0200 Subject: [PATCH 11/49] opposite categories --- src/category-theory.lagda.md | 1 + .../opposite-categories.lagda.md | 130 ++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 src/category-theory/opposite-categories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index 3b99e5908a..d798cc5c05 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -97,6 +97,7 @@ open import category-theory.natural-transformations-maps-from-small-to-large-pre 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-categories public open import category-theory.opposite-precategories public open import category-theory.precategories public open import category-theory.precategory-of-functors public diff --git a/src/category-theory/opposite-categories.lagda.md b/src/category-theory/opposite-categories.lagda.md new file mode 100644 index 0000000000..a8fe41c292 --- /dev/null +++ b/src/category-theory/opposite-categories.lagda.md @@ -0,0 +1,130 @@ +# Opposite categories + +```agda +module category-theory.opposite-categories where +``` + +
Imports + +```agda +open import category-theory.categories +open import category-theory.composition-operations-on-binary-families-of-sets +open import category-theory.isomorphisms-in-categories +open import category-theory.isomorphisms-in-precategories +open import category-theory.opposite-precategories +open import category-theory.precategories + +open import foundation.dependent-pair-types +open import foundation.equality-dependent-pair-types +open import foundation.equivalences +open import foundation.function-extensionality +open import foundation.function-types +open import foundation.homotopies +open import foundation.identity-types +open import foundation.involutions +open import foundation.multivariable-homotopies +open import foundation.propositions +open import foundation.sets +open import foundation.subtypes +open import foundation.transport-along-identifications +open import foundation.universe-levels +``` + +
+ +## Idea + +Let `C` be a [category](category-theory.categories.md), its **opposite +category** `Cᵒᵖ` is given by reversing every morphism. + +## Definition + +```agda +module _ + {l1 l2 : Level} (C : Category l1 l2) + where + + obj-opposite-Category : UU l1 + obj-opposite-Category = obj-opposite-Precategory (precategory-Category C) + + hom-set-opposite-Category : (x y : obj-opposite-Category) → Set l2 + hom-set-opposite-Category = + hom-set-opposite-Precategory (precategory-Category C) + + hom-opposite-Category : (x y : obj-opposite-Category) → UU l2 + hom-opposite-Category = hom-opposite-Precategory (precategory-Category C) + + comp-hom-opposite-Category : + {x y z : obj-opposite-Category} → + hom-opposite-Category y z → + hom-opposite-Category x y → + hom-opposite-Category x z + comp-hom-opposite-Category = + comp-hom-opposite-Precategory (precategory-Category C) + + associative-comp-hom-opposite-Category : + {x y z w : obj-opposite-Category} + (h : hom-opposite-Category z w) + (g : hom-opposite-Category y z) + (f : hom-opposite-Category x y) → + ( comp-hom-opposite-Category (comp-hom-opposite-Category h g) f) = + ( comp-hom-opposite-Category h (comp-hom-opposite-Category g f)) + associative-comp-hom-opposite-Category = + associative-comp-hom-opposite-Precategory (precategory-Category C) + + id-hom-opposite-Category : + {x : obj-opposite-Category} → hom-opposite-Category x x + id-hom-opposite-Category = + id-hom-opposite-Precategory (precategory-Category C) + + left-unit-law-comp-hom-opposite-Category : + {x y : obj-opposite-Category} + (f : hom-opposite-Category x y) → + comp-hom-opposite-Category id-hom-opposite-Category f = f + left-unit-law-comp-hom-opposite-Category = + left-unit-law-comp-hom-opposite-Precategory (precategory-Category C) + + right-unit-law-comp-hom-opposite-Category : + {x y : obj-opposite-Category} (f : hom-opposite-Category x y) → + comp-hom-opposite-Category f id-hom-opposite-Category = f + right-unit-law-comp-hom-opposite-Category = + right-unit-law-comp-hom-opposite-Precategory (precategory-Category C) + + precategory-opposite-Category : Precategory l1 l2 + precategory-opposite-Category = opposite-Precategory (precategory-Category C) + + opposite-Category : Category l1 l2 + pr1 opposite-Category = precategory-opposite-Category + pr2 opposite-Category = + is-category-opposite-is-category-Precategory + ( precategory-Category C) + ( is-category-Category C) +``` + +## Properties + +### The opposite category construction is an involution on the type of categories + +```agda +is-involution-opposite-Category : + {l1 l2 : Level} → is-involution (opposite-Category {l1} {l2}) +is-involution-opposite-Category C = + eq-type-subtype + ( is-category-prop-Precategory) + ( is-involution-opposite-Precategory (precategory-Category C)) + +involution-opposite-Category : + (l1 l2 : Level) → involution (Category l1 l2) +pr1 (involution-opposite-Category l1 l2) = opposite-Category +pr2 (involution-opposite-Category l1 l2) = is-involution-opposite-Category + +is-equiv-opposite-Category : + {l1 l2 : Level} → is-equiv (opposite-Category {l1} {l2}) +is-equiv-opposite-Category = + is-equiv-is-involution is-involution-opposite-Category + +equiv-opposite-Category : + (l1 l2 : Level) → Category l1 l2 ≃ Category l1 l2 +equiv-opposite-Category l1 l2 = + equiv-involution (involution-opposite-Category l1 l2) +``` From 1e2b453f1f095f85e9257af59dbd32554579a251 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sun, 22 Oct 2023 23:43:23 +0200 Subject: [PATCH 12/49] manage some unfinished work --- .../opposite-categories.lagda.md | 10 -------- ...representable-functors-categories.lagda.md | 2 +- ...resentable-functors-precategories.lagda.md | 23 ++++++++----------- .../yoneda-lemma-categories.lagda.md | 3 --- .../yoneda-lemma-precategories.lagda.md | 13 ----------- ...equality-dependent-function-types.lagda.md | 1 - .../multivariable-homotopies.lagda.md | 5 ---- 7 files changed, 11 insertions(+), 46 deletions(-) diff --git a/src/category-theory/opposite-categories.lagda.md b/src/category-theory/opposite-categories.lagda.md index a8fe41c292..b89260cc53 100644 --- a/src/category-theory/opposite-categories.lagda.md +++ b/src/category-theory/opposite-categories.lagda.md @@ -8,25 +8,15 @@ module category-theory.opposite-categories where ```agda open import category-theory.categories -open import category-theory.composition-operations-on-binary-families-of-sets -open import category-theory.isomorphisms-in-categories -open import category-theory.isomorphisms-in-precategories open import category-theory.opposite-precategories open import category-theory.precategories open import foundation.dependent-pair-types -open import foundation.equality-dependent-pair-types open import foundation.equivalences -open import foundation.function-extensionality -open import foundation.function-types -open import foundation.homotopies open import foundation.identity-types open import foundation.involutions -open import foundation.multivariable-homotopies -open import foundation.propositions open import foundation.sets open import foundation.subtypes -open import foundation.transport-along-identifications open import foundation.universe-levels ``` diff --git a/src/category-theory/representable-functors-categories.lagda.md b/src/category-theory/representable-functors-categories.lagda.md index 038c508ad3..22014d5f9d 100644 --- a/src/category-theory/representable-functors-categories.lagda.md +++ b/src/category-theory/representable-functors-categories.lagda.md @@ -51,7 +51,7 @@ components `hom c x → hom b x` are defined by precomposition with `f`. ```agda representable-natural-transformation-Category : - {l1 l2 : Level} (C : Category l1 l2) (b c : obj-Category C) + {l1 l2 : Level} (C : Category l1 l2) {b c : obj-Category C} (f : hom-Category C b c) → natural-transformation-Category ( C) diff --git a/src/category-theory/representable-functors-precategories.lagda.md b/src/category-theory/representable-functors-precategories.lagda.md index de141a092d..ab47eba09c 100644 --- a/src/category-theory/representable-functors-precategories.lagda.md +++ b/src/category-theory/representable-functors-precategories.lagda.md @@ -8,12 +8,10 @@ module category-theory.representable-functors-precategories where ```agda open import category-theory.functors-precategories -open import category-theory.maps-from-small-to-large-precategories open import category-theory.maps-precategories open import category-theory.natural-transformations-functors-precategories open import category-theory.opposite-precategories open import category-theory.precategories -open import category-theory.precategory-of-functors open import category-theory.presheaf-categories open import foundation.category-of-sets @@ -149,15 +147,14 @@ module _ pr2 map-representable-functor-copresheaf-Precategory = representable-natural-transformation-Precategory C - functor-representable-functor-copresheaf-Precategory : - functor-Precategory - ( opposite-Precategory C) - ( copresheaf-precategory-Large-Precategory C l2) - pr1 functor-representable-functor-copresheaf-Precategory = - representable-functor-Precategory C - pr1 (pr2 functor-representable-functor-copresheaf-Precategory) = - representable-natural-transformation-Precategory C - pr1 (pr2 (pr2 functor-representable-functor-copresheaf-Precategory)) = - {! !} - pr2 (pr2 (pr2 functor-representable-functor-copresheaf-Precategory)) = {! !} + -- functor-representable-functor-copresheaf-Precategory : + -- functor-Precategory + -- ( opposite-Precategory C) + -- ( copresheaf-precategory-Large-Precategory C l2) + -- pr1 functor-representable-functor-copresheaf-Precategory = + -- representable-functor-Precategory C + -- pr1 (pr2 functor-representable-functor-copresheaf-Precategory) = + -- representable-natural-transformation-Precategory C + -- pr1 (pr2 (pr2 functor-representable-functor-copresheaf-Precategory)) = {! !} + -- pr2 (pr2 (pr2 functor-representable-functor-copresheaf-Precategory)) = {! !} ``` diff --git a/src/category-theory/yoneda-lemma-categories.lagda.md b/src/category-theory/yoneda-lemma-categories.lagda.md index abb006ecff..4c45298d69 100644 --- a/src/category-theory/yoneda-lemma-categories.lagda.md +++ b/src/category-theory/yoneda-lemma-categories.lagda.md @@ -16,10 +16,7 @@ open import category-theory.representable-functors-categories open import category-theory.yoneda-lemma-precategories open import foundation.category-of-sets -open import foundation.dependent-pair-types open import foundation.equivalences -open import foundation.retractions -open import foundation.sections open import foundation.sets open import foundation.universe-levels ``` diff --git a/src/category-theory/yoneda-lemma-precategories.lagda.md b/src/category-theory/yoneda-lemma-precategories.lagda.md index eed27e6680..0522c0bcfe 100644 --- a/src/category-theory/yoneda-lemma-precategories.lagda.md +++ b/src/category-theory/yoneda-lemma-precategories.lagda.md @@ -136,19 +136,6 @@ module _ lemma-yoneda-Small-Large-Precategory ``` -### The yoneda embedding into the large category of sets - -#### Taking representable functors is a functor - -```agda -module _ - {l1 l2 l3 : Level} (C : Precategory l1 l2) (c : obj-Precategory C) - (F : functor-Small-Large-Precategory C Set-Large-Precategory l3) - where - - map-yoneda-Small-Large-Precategory : -``` - ## The yoneda lemma into the small category of sets ```agda diff --git a/src/foundation/equality-dependent-function-types.lagda.md b/src/foundation/equality-dependent-function-types.lagda.md index 963b0063ed..bd8b9c4386 100644 --- a/src/foundation/equality-dependent-function-types.lagda.md +++ b/src/foundation/equality-dependent-function-types.lagda.md @@ -15,7 +15,6 @@ open import foundation.universe-levels open import foundation-core.contractible-types open import foundation-core.equivalences -open import foundation-core.functoriality-dependent-function-types open import foundation-core.functoriality-dependent-pair-types open import foundation-core.identity-types open import foundation-core.torsorial-type-families diff --git a/src/foundation/multivariable-homotopies.lagda.md b/src/foundation/multivariable-homotopies.lagda.md index 9448c51548..a5aaf2529f 100644 --- a/src/foundation/multivariable-homotopies.lagda.md +++ b/src/foundation/multivariable-homotopies.lagda.md @@ -16,13 +16,8 @@ open import foundation.function-extensionality open import foundation.iterated-dependent-product-types open import foundation.universe-levels -open import foundation-core.contractible-types open import foundation-core.functoriality-dependent-function-types -open import foundation-core.homotopies open import foundation-core.identity-types -open import foundation-core.propositions -open import foundation-core.truncated-types -open import foundation-core.truncation-levels ```
From dbac747765ffcacea034f8358d58bc124c130e70 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sun, 22 Oct 2023 23:48:53 +0200 Subject: [PATCH 13/49] =?UTF-8?q?rename=20`eq-pair(-=CE=A3)-eq-pr2`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/category-theory/opposite-precategories.lagda.md | 6 +++--- .../equality-dependent-pair-types.lagda.md | 12 ++++++------ src/foundation-core/pullbacks.lagda.md | 10 +++++----- src/foundation/functoriality-fibers-of-maps.lagda.md | 4 ++-- src/foundation/pullbacks.lagda.md | 6 +++--- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/category-theory/opposite-precategories.lagda.md b/src/category-theory/opposite-precategories.lagda.md index dd2db0cf96..a068c80db8 100644 --- a/src/category-theory/opposite-precategories.lagda.md +++ b/src/category-theory/opposite-precategories.lagda.md @@ -106,10 +106,10 @@ module _ is-involution-opposite-Precategory : {l1 l2 : Level} → is-involution (opposite-Precategory {l1} {l2}) is-involution-opposite-Precategory C = - eq-pair-Σ-eq-pr2 - ( eq-pair-Σ-eq-pr2 + eq-pair-eq-pr2 + ( eq-pair-eq-pr2 ( eq-pair-Σ - ( eq-pair-Σ-eq-pr2 + ( eq-pair-eq-pr2 ( eq-is-prop ( is-prop-is-associative-composition-operation-binary-family-Set ( hom-set-Precategory C) diff --git a/src/foundation-core/equality-dependent-pair-types.lagda.md b/src/foundation-core/equality-dependent-pair-types.lagda.md index 4c48dcb81a..75906345a1 100644 --- a/src/foundation-core/equality-dependent-pair-types.lagda.md +++ b/src/foundation-core/equality-dependent-pair-types.lagda.md @@ -60,17 +60,17 @@ module _ eq-pair-Σ' : {s t : Σ A B} → Eq-Σ s t → s = t eq-pair-Σ' p = eq-pair-Σ (pr1 p) (pr2 p) - eq-pair-Σ-eq-pr1 : + eq-pair-eq-pr1 : {x y : A} {s : B x} (p : x = y) → (x , s) = (y , tr B p s) - eq-pair-Σ-eq-pr1 refl = refl + eq-pair-eq-pr1 refl = refl - eq-pair-Σ-eq-pr1' : + eq-pair-eq-pr1' : {x y : A} {t : B y} (p : x = y) → (x , tr B (inv p) t) = (y , t) - eq-pair-Σ-eq-pr1' refl = refl + eq-pair-eq-pr1' refl = refl - eq-pair-Σ-eq-pr2 : + eq-pair-eq-pr2 : {x : A} {s t : B x} → s = t → (x , s) = (x , t) - eq-pair-Σ-eq-pr2 {x} = ap {B = Σ A B} (pair x) + eq-pair-eq-pr2 {x} = ap {B = Σ A B} (pair x) is-retraction-pair-eq-Σ : (s t : Σ A B) → diff --git a/src/foundation-core/pullbacks.lagda.md b/src/foundation-core/pullbacks.lagda.md index 4573e9cffc..e047eee49c 100644 --- a/src/foundation-core/pullbacks.lagda.md +++ b/src/foundation-core/pullbacks.lagda.md @@ -298,8 +298,8 @@ inv-inv-map-commutative-standard-pullback : ( map-commutative-standard-pullback f g ∘ map-commutative-standard-pullback g f) ~ id inv-inv-map-commutative-standard-pullback f g x = - eq-pair-Σ-eq-pr2 - ( eq-pair-Σ-eq-pr2 + eq-pair-eq-pr2 + ( eq-pair-eq-pr2 ( inv-inv (coherence-square-standard-pullback x))) abstract @@ -522,7 +522,7 @@ triangle-map-prod-cone : ( gap (map-prod f f') (map-prod g g') (prod-cone f g f' g' c c')) ~ ( map-prod-cone f g f' g' ∘ map-prod (gap f g c) (gap f' g' c')) triangle-map-prod-cone f g c f' g' c' z = - eq-pair-Σ-eq-pr2 (eq-pair-Σ-eq-pr2 right-unit) + eq-pair-eq-pr2 (eq-pair-eq-pr2 right-unit) abstract is-equiv-map-prod-cone : @@ -688,8 +688,8 @@ module _ ( gap f g c ∘ map-equiv-total-fiber (pr1 c)) ~ ( tot (λ a → tot (λ b → inv)) ∘ tot (map-fiber-cone f g c)) square-tot-map-fiber-cone (.(vertical-map-cone f g c x) , x , refl) = - eq-pair-Σ-eq-pr2 - ( eq-pair-Σ-eq-pr2 + eq-pair-eq-pr2 + ( eq-pair-eq-pr2 ( inv (ap inv right-unit ∙ inv-inv (coherence-square-cone f g c x)))) abstract diff --git a/src/foundation/functoriality-fibers-of-maps.lagda.md b/src/foundation/functoriality-fibers-of-maps.lagda.md index 96c0770060..48b82c08ac 100644 --- a/src/foundation/functoriality-fibers-of-maps.lagda.md +++ b/src/foundation/functoriality-fibers-of-maps.lagda.md @@ -65,7 +65,7 @@ module _ ( map-fiber-cone j h c (i x) ∘ map-fiber-cone i (pr1 c) d x) map-fiber-pasting-horizontal-cone (g , q , K) (f , p , H) .(f a) (a , refl) = - eq-pair-Σ-eq-pr2 + eq-pair-eq-pr2 ( ( ap ( concat' (h (q (p a))) refl) ( distributive-inv-concat (ap j (H a)) (K (p a)))) ∙ @@ -97,7 +97,7 @@ module _ map-fiber-pasting-vertical-cone (p , q , H) (p' , q' , H') .(p (p' a)) ((.(p' a) , refl) , (a , refl)) = - eq-pair-Σ-eq-pr2 + eq-pair-eq-pr2 ( ( right-unit) ∙ ( distributive-inv-concat (H (p' a)) (ap g (H' a))) ∙ ( ap diff --git a/src/foundation/pullbacks.lagda.md b/src/foundation/pullbacks.lagda.md index 4be90935f3..679af1bdf8 100644 --- a/src/foundation/pullbacks.lagda.md +++ b/src/foundation/pullbacks.lagda.md @@ -99,8 +99,8 @@ triangle-map-standard-pullback-exponent : ( exponent-cone T f g c))) triangle-map-standard-pullback-exponent {A = A} {B} T f g c h = - eq-pair-Σ-eq-pr2 - ( eq-pair-Σ-eq-pr2 + eq-pair-eq-pr2 + ( eq-pair-eq-pr2 ( inv (is-section-eq-htpy (coherence-square-cone f g c ·r h)))) abstract @@ -186,7 +186,7 @@ cone-Id' : cone (const unit (A × A) t) (diagonal A) (pr1 t = pr2 t) pr1 (cone-Id' {A = A} (x , y)) = const (x = y) unit star pr1 (pr2 (cone-Id' {A = A} (x , y))) = const (x = y) A x -pr2 (pr2 (cone-Id' {A = A} (x , y))) p = eq-pair-Σ-eq-pr2 (inv p) +pr2 (pr2 (cone-Id' {A = A} (x , y))) p = eq-pair-eq-pr2 (inv p) inv-gap-cone-Id' : {l : Level} {A : UU l} (t : A × A) → From 4e676f2d2acee5747aa6674861961482366b8324 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Mon, 23 Oct 2023 13:48:18 +0200 Subject: [PATCH 14/49] additions 1-types --- src/foundation-core/1-types.lagda.md | 26 ++++++++- src/foundation-core/truncated-types.lagda.md | 2 +- .../truncation-levels.lagda.md | 14 ++++- src/foundation/1-types.lagda.md | 55 +++++++++++++++---- src/foundation/truncated-types.lagda.md | 24 +++++++- src/foundation/truncation-levels.lagda.md | 15 +++++ 6 files changed, 120 insertions(+), 16 deletions(-) diff --git a/src/foundation-core/1-types.lagda.md b/src/foundation-core/1-types.lagda.md index f38795650c..9086e32a3c 100644 --- a/src/foundation-core/1-types.lagda.md +++ b/src/foundation-core/1-types.lagda.md @@ -7,13 +7,15 @@ module foundation-core.1-types where
Imports ```agda +open import foundation.contractible-types open import foundation.dependent-pair-types +open import foundation.truncated-types open import foundation.universe-levels open import foundation-core.equivalences open import foundation-core.identity-types +open import foundation-core.propositions open import foundation-core.sets -open import foundation-core.truncated-types open import foundation-core.truncation-levels ``` @@ -57,6 +59,28 @@ pr2 (Id-Set X x y) = is-1-type-type-1-Type X x y 1-type-Set A = truncated-type-succ-Truncated-Type zero-𝕋 A ``` +### Any proposition is a 1-type + +```agda +abstract + is-1-type-is-prop : + {l : Level} {P : UU l} → is-prop P → is-1-type P + is-1-type-is-prop = is-trunc-iterated-succ-is-trunc neg-one-𝕋 2 + +1-type-Prop : + {l : Level} → Prop l → 1-Type l +1-type-Prop P = truncated-type-iterated-succ-Truncated-Type neg-one-𝕋 2 P +``` + +### Any contractible type is a 1-type + +```agda +abstract + is-1-type-is-contr : + {l : Level} {A : UU l} → is-contr A → is-1-type A + is-1-type-is-contr = is-trunc-is-contr one-𝕋 +``` + ### The 1-types are closed under equivalences ```agda diff --git a/src/foundation-core/truncated-types.lagda.md b/src/foundation-core/truncated-types.lagda.md index bb510df533..942900bcbe 100644 --- a/src/foundation-core/truncated-types.lagda.md +++ b/src/foundation-core/truncated-types.lagda.md @@ -159,7 +159,7 @@ abstract is-trunc-is-equiv' k A f is-equiv-f ``` -### If a type embeds into a `k+1`-truncated type, then it is (k+1)-truncated +### If a type embeds into a `k+1`-truncated type, then it is `k+1`-truncated ```agda abstract diff --git a/src/foundation-core/truncation-levels.lagda.md b/src/foundation-core/truncation-levels.lagda.md index 00874df41c..ef346ace6e 100644 --- a/src/foundation-core/truncation-levels.lagda.md +++ b/src/foundation-core/truncation-levels.lagda.md @@ -14,16 +14,24 @@ open import foundation.universe-levels ## Idea -The type of truncation levels is a type similar to the type of natural numbers, -but starting the count at -2, so that sets have truncation level 0. +The type of **truncation levels** is a type similar to the type of +[natural numbers](elementary-number-theory.natural-numbers.md), but starting the +count at -2, so that [sets](foundation-core.sets.md) have +[truncation](foundation-core.truncated-types.md) level 0. -## Definition +## Definitions + +### The type of truncation levels ```agda data 𝕋 : UU lzero where neg-two-𝕋 : 𝕋 succ-𝕋 : 𝕋 → 𝕋 +``` +### Aliases for common truncation levels + +```agda neg-one-𝕋 : 𝕋 neg-one-𝕋 = succ-𝕋 neg-two-𝕋 diff --git a/src/foundation/1-types.lagda.md b/src/foundation/1-types.lagda.md index db5068c076..28952dbfe0 100644 --- a/src/foundation/1-types.lagda.md +++ b/src/foundation/1-types.lagda.md @@ -11,15 +11,16 @@ open import foundation-core.1-types public ```agda open import foundation.dependent-pair-types open import foundation.subuniverses +open import foundation.truncated-types open import foundation.universe-levels +open import foundation-core.cartesian-product-types open import foundation-core.contractible-types open import foundation-core.equivalences open import foundation-core.identity-types open import foundation-core.propositions open import foundation-core.subtypes open import foundation-core.torsorial-type-families -open import foundation-core.truncated-types open import foundation-core.truncation-levels ``` @@ -35,8 +36,17 @@ abstract is-1-type-Prop : {l : Level} → UU l → Prop l -pr1 (is-1-type-Prop A) = is-1-type A -pr2 (is-1-type-Prop A) = is-prop-is-1-type A +is-1-type-Prop = is-trunc-Prop one-𝕋 +``` + +### The type of all 1-types in a universe is a 2-type + +```agda +is-trunc-1-Type : {l : Level} → is-trunc two-𝕋 (1-Type l) +is-trunc-1-Type = is-trunc-Truncated-Type one-𝕋 + +1-Type-Truncated-Type : (l : Level) → Truncated-Type (lsuc l) two-𝕋 +1-Type-Truncated-Type l = Truncated-Type-Truncated-Type l one-𝕋 ``` ### Products of families of 1-types are 1-types @@ -66,19 +76,17 @@ pr2 (Π-1-Type' A B) = is-1-type-type-Π-1-Type' A B type-Π-1-Type : {l1 l2 : Level} (A : 1-Type l1) (B : type-1-Type A → 1-Type l2) → UU (l1 ⊔ l2) -type-Π-1-Type A B = type-Π-1-Type' (type-1-Type A) B +type-Π-1-Type A = type-Π-1-Type' (type-1-Type A) is-1-type-type-Π-1-Type : {l1 l2 : Level} (A : 1-Type l1) (B : type-1-Type A → 1-Type l2) → is-1-type (type-Π-1-Type A B) -is-1-type-type-Π-1-Type A B = - is-1-type-type-Π-1-Type' (type-1-Type A) B +is-1-type-type-Π-1-Type A = is-1-type-type-Π-1-Type' (type-1-Type A) Π-1-Type : {l1 l2 : Level} (A : 1-Type l1) (B : type-1-Type A → 1-Type l2) → 1-Type (l1 ⊔ l2) -pr1 (Π-1-Type A B) = type-Π-1-Type A B -pr2 (Π-1-Type A B) = is-1-type-type-Π-1-Type A B +Π-1-Type = Π-Truncated-Type one-𝕋 ``` ### The type of functions into a 1-type is a 1-type @@ -102,8 +110,35 @@ is-1-type-type-hom-1-Type A B = hom-1-Type : {l1 l2 : Level} (A : 1-Type l1) (B : 1-Type l2) → 1-Type (l1 ⊔ l2) -pr1 (hom-1-Type A B) = type-hom-1-Type A B -pr2 (hom-1-Type A B) = is-1-type-type-hom-1-Type A B +hom-1-Type = hom-Truncated-Type one-𝕋 +``` + +### 1-Types are closed under dependent pair types + +```agda +abstract + is-1-type-Σ : + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} → + is-1-type A → ((x : A) → is-1-type (B x)) → is-1-type (Σ A B) + is-1-type-Σ = is-trunc-Σ {k = one-𝕋} + +Σ-1-Type : + {l1 l2 : Level} (A : 1-Type l1) (B : pr1 A → 1-Type l2) → 1-Type (l1 ⊔ l2) +Σ-1-Type = Σ-Truncated-Type +``` + +### 1-Types are closed under cartesian product types + +```agda +abstract + is-1-type-prod : + {l1 l2 : Level} {A : UU l1} {B : UU l2} → + is-1-type A → is-1-type B → is-1-type (A × B) + is-1-type-prod = is-trunc-prod one-𝕋 + +prod-1-Type : + {l1 l2 : Level} (A : 1-Type l1) (B : 1-Type l2) → 1-Type (l1 ⊔ l2) +prod-1-Type A B = Σ-1-Type A (λ x → B) ``` ### Subtypes of 1-types are 1-types diff --git a/src/foundation/truncated-types.lagda.md b/src/foundation/truncated-types.lagda.md index 2043af39ba..6324e38022 100644 --- a/src/foundation/truncated-types.lagda.md +++ b/src/foundation/truncated-types.lagda.md @@ -9,8 +9,11 @@ open import foundation-core.truncated-types public
Imports ```agda +open import elementary-number-theory.natural-numbers + open import foundation.dependent-pair-types open import foundation.subtype-identity-principle +open import foundation.truncation-levels open import foundation.univalence open import foundation.universe-levels @@ -20,7 +23,6 @@ open import foundation-core.equivalences open import foundation-core.identity-types open import foundation-core.subtypes open import foundation-core.torsorial-type-families -open import foundation-core.truncation-levels ```
@@ -72,3 +74,23 @@ pr2 (Truncated-Type-Truncated-Type l k) = is-trunc-Truncated-Type k emb-type-Truncated-Type : (l : Level) (k : 𝕋) → Truncated-Type l k ↪ UU l emb-type-Truncated-Type l k = emb-subtype (is-trunc-Prop k) ``` + +### If a type is `k`-truncated, then it is `k+r`-truncated + +```agda +abstract + is-trunc-iterated-succ-is-trunc : + (k : 𝕋) (r : ℕ) {l : Level} {A : UU l} → + is-trunc k A → is-trunc (iterated-succ-𝕋' k r) A + is-trunc-iterated-succ-is-trunc k zero-ℕ is-trunc-A = is-trunc-A + is-trunc-iterated-succ-is-trunc k (succ-ℕ r) is-trunc-A = + is-trunc-iterated-succ-is-trunc (succ-𝕋 k) r + ( is-trunc-succ-is-trunc k is-trunc-A) + +truncated-type-iterated-succ-Truncated-Type : + (k : 𝕋) (r : ℕ) {l : Level} → + Truncated-Type l k → Truncated-Type l (iterated-succ-𝕋' k r) +pr1 (truncated-type-iterated-succ-Truncated-Type k r A) = type-Truncated-Type A +pr2 (truncated-type-iterated-succ-Truncated-Type k r A) = + is-trunc-iterated-succ-is-trunc k r (is-trunc-type-Truncated-Type A) +``` diff --git a/src/foundation/truncation-levels.lagda.md b/src/foundation/truncation-levels.lagda.md index d2421c55b4..d5c8d02cbb 100644 --- a/src/foundation/truncation-levels.lagda.md +++ b/src/foundation/truncation-levels.lagda.md @@ -52,6 +52,21 @@ infixl 35 _+𝕋_ _+𝕋_ = add-𝕋 ``` +### Iterated successor functions on truncation levels + +Although we can define an addition operation on truncation levels, when it comes +to doing induction on them, it is more natural to speak in terms of an iterated +successor: + +```agda +iterated-succ-𝕋 : ℕ → 𝕋 → 𝕋 +iterated-succ-𝕋 zero-ℕ x = x +iterated-succ-𝕋 (succ-ℕ n) x = iterated-succ-𝕋 n (succ-𝕋 x) + +iterated-succ-𝕋' : 𝕋 → ℕ → 𝕋 +iterated-succ-𝕋' x n = iterated-succ-𝕋 n x +``` + ## Properties ### Unit laws for addition of truncation levels From 1f8a184918b3366be44ea4c6da36c2f2f2c4e398 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Mon, 23 Oct 2023 14:28:09 +0200 Subject: [PATCH 15/49] computing truncation levels of total hom-types --- src/category-theory/categories.lagda.md | 32 +++++++++++ .../nonunital-precategories.lagda.md | 35 ++++++++++++ src/category-theory/precategories.lagda.md | 54 +++++++++++++------ .../preunivalent-categories.lagda.md | 38 +++++++++++++ .../strict-categories.lagda.md | 31 +++++++++++ src/foundation-core/1-types.lagda.md | 7 ++- src/foundation/sets.lagda.md | 20 ++++++- src/foundation/truncation-levels.lagda.md | 8 +++ 8 files changed, 207 insertions(+), 18 deletions(-) diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index b668dda0c3..40815d1431 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -14,6 +14,7 @@ open import category-theory.precategories open import category-theory.preunivalent-categories open import foundation.1-types +open import foundation.cartesian-product-types open import foundation.dependent-pair-types open import foundation.equivalences open import foundation.identity-types @@ -156,6 +157,20 @@ module _ is-emb-is-equiv (is-category-Category C x y) ``` +### The total hom-type of a preunivalent category + +```agda +total-hom-Category : + {l1 l2 : Level} (C : Category l1 l2) → UU (l1 ⊔ l2) +total-hom-Category C = total-hom-Precategory (precategory-Category C) + +obj-total-hom-Category : + {l1 l2 : Level} (C : Category l1 l2) → + total-hom-Category C → + obj-Category C × obj-Category C +obj-total-hom-Category C = obj-total-hom-Precategory (precategory-Category C) +``` + ### Equalities induce morphisms ```agda @@ -207,3 +222,20 @@ module _ obj-1-type-Category = obj-1-type-Preunivalent-Category (preunivalent-category-Category C) ``` + +### The total hom-type of a category is a 1-type + +```agda +module _ + {l1 l2 : Level} (C : Category l1 l2) + where + + is-1-type-total-hom-Category : + is-1-type (total-hom-Category C) + is-1-type-total-hom-Category = + is-1-type-total-hom-Preunivalent-Category (preunivalent-category-Category C) + + total-hom-1-type-Category : 1-Type (l1 ⊔ l2) + total-hom-1-type-Category = + total-hom-1-type-Preunivalent-Category (preunivalent-category-Category C) +``` diff --git a/src/category-theory/nonunital-precategories.lagda.md b/src/category-theory/nonunital-precategories.lagda.md index 57edb55811..87660a59f1 100644 --- a/src/category-theory/nonunital-precategories.lagda.md +++ b/src/category-theory/nonunital-precategories.lagda.md @@ -14,6 +14,8 @@ open import foundation.dependent-pair-types open import foundation.identity-types open import foundation.propositions open import foundation.sets +open import foundation.truncated-types +open import foundation.truncation-levels open import foundation.universe-levels ``` @@ -169,6 +171,39 @@ module _ ( comp-hom-Nonunital-Precategory C) ``` +## Properties + +## If the objects of a nonunital precategory are `k`-truncated for non-negative `k`, the total hom-type is `k`-truncated + +```agda +module _ + {l1 l2 : Level} {k : 𝕋} (C : Nonunital-Precategory l1 l2) + where + + is-trunc-total-hom-is-trunc-obj-Nonunital-Precategory : + is-trunc (succ-𝕋 (succ-𝕋 k)) (obj-Nonunital-Precategory C) → + is-trunc (succ-𝕋 (succ-𝕋 k)) (total-hom-Nonunital-Precategory C) + is-trunc-total-hom-is-trunc-obj-Nonunital-Precategory is-trunc-obj-C = + is-trunc-Σ + ( is-trunc-obj-C) + ( λ x → + is-trunc-Σ + ( is-trunc-obj-C) + ( λ y → is-trunc-is-set k (is-set-hom-Nonunital-Precategory C x y))) + + total-hom-truncated-type-is-trunc-obj-Nonunital-Precategory : + is-trunc (succ-𝕋 (succ-𝕋 k)) (obj-Nonunital-Precategory C) → + Truncated-Type (l1 ⊔ l2) (succ-𝕋 (succ-𝕋 k)) + pr1 + ( total-hom-truncated-type-is-trunc-obj-Nonunital-Precategory + is-trunc-obj-C) = + total-hom-Nonunital-Precategory C + pr2 + ( total-hom-truncated-type-is-trunc-obj-Nonunital-Precategory + is-trunc-obj-C) = + is-trunc-total-hom-is-trunc-obj-Nonunital-Precategory is-trunc-obj-C +``` + ## Comments As discussed in [Semicategories](https://ncatlab.org/nlab/show/semicategory) at diff --git a/src/category-theory/precategories.lagda.md b/src/category-theory/precategories.lagda.md index eee5a8b052..1df30c30d4 100644 --- a/src/category-theory/precategories.lagda.md +++ b/src/category-theory/precategories.lagda.md @@ -16,6 +16,8 @@ open import foundation.function-types open import foundation.identity-types open import foundation.propositions open import foundation.sets +open import foundation.truncated-types +open import foundation.truncation-levels open import foundation.universe-levels ``` @@ -167,6 +169,21 @@ module _ 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 = + 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 +obj-total-hom-Precategory C = + obj-total-hom-Nonunital-Precategory (nonunital-precategory-Precategory C) +``` + ### Equalities induce morphisms ```agda @@ -184,21 +201,6 @@ module _ hom-inv-eq-Precategory x y = hom-eq-Precategory y x ∘ inv ``` -### 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 = - 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 -obj-total-hom-Precategory C = - obj-total-hom-Nonunital-Precategory (nonunital-precategory-Precategory C) -``` - ### Pre- and postcomposition by a morphism ```agda @@ -214,3 +216,25 @@ postcomp-hom-Precategory : hom-Precategory C z x → hom-Precategory C z y postcomp-hom-Precategory C f z = comp-hom-Precategory C f ``` + +## If the objects of a precategory are `k`-truncated for non-negative `k`, the total hom-type is `k`-truncated + +```agda +module _ + {l1 l2 : Level} {k : 𝕋} (C : Precategory l1 l2) + where + + is-trunc-total-hom-is-trunc-obj-Precategory : + is-trunc (succ-𝕋 (succ-𝕋 k)) (obj-Precategory C) → + is-trunc (succ-𝕋 (succ-𝕋 k)) (total-hom-Precategory C) + is-trunc-total-hom-is-trunc-obj-Precategory = + is-trunc-total-hom-is-trunc-obj-Nonunital-Precategory + ( nonunital-precategory-Precategory C) + + total-hom-truncated-type-is-trunc-obj-Precategory : + is-trunc (succ-𝕋 (succ-𝕋 k)) (obj-Precategory C) → + Truncated-Type (l1 ⊔ l2) (succ-𝕋 (succ-𝕋 k)) + total-hom-truncated-type-is-trunc-obj-Precategory = + total-hom-truncated-type-is-trunc-obj-Nonunital-Precategory + ( nonunital-precategory-Precategory C) +``` diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md index 79e238fea8..5f81fd838f 100644 --- a/src/category-theory/preunivalent-categories.lagda.md +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -12,6 +12,7 @@ open import category-theory.isomorphisms-in-precategories open import category-theory.precategories open import foundation.1-types +open import foundation.cartesian-product-types open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.identity-types @@ -153,6 +154,22 @@ module _ is-preunivalent-Preunivalent-Category = pr2 C ``` +### The total hom-type of a preunivalent category + +```agda +total-hom-Preunivalent-Category : + {l1 l2 : Level} (C : Preunivalent-Category l1 l2) → UU (l1 ⊔ l2) +total-hom-Preunivalent-Category C = + total-hom-Precategory (precategory-Preunivalent-Category C) + +obj-total-hom-Preunivalent-Category : + {l1 l2 : Level} (C : Preunivalent-Category l1 l2) → + total-hom-Preunivalent-Category C → + obj-Preunivalent-Category C × obj-Preunivalent-Category C +obj-total-hom-Preunivalent-Category C = + obj-total-hom-Precategory (precategory-Preunivalent-Category C) +``` + ### Equalities induce morphisms ```agda @@ -223,6 +240,27 @@ module _ pr2 obj-1-type-Preunivalent-Category = is-1-type-obj-Preunivalent-Category ``` +### The total hom-type of a preunivalent category is a 1-type + +```agda +module _ + {l1 l2 : Level} (C : Preunivalent-Category l1 l2) + where + + is-1-type-total-hom-Preunivalent-Category : + is-1-type (total-hom-Preunivalent-Category C) + is-1-type-total-hom-Preunivalent-Category = + is-trunc-total-hom-is-trunc-obj-Precategory + ( precategory-Preunivalent-Category C) + ( is-1-type-obj-Preunivalent-Category C) + + total-hom-1-type-Preunivalent-Category : 1-Type (l1 ⊔ l2) + total-hom-1-type-Preunivalent-Category = + total-hom-truncated-type-is-trunc-obj-Precategory + ( precategory-Preunivalent-Category C) + ( is-1-type-obj-Preunivalent-Category C) +``` + ## See also - [The preunivalence axiom](foundation.preunivalence.md) diff --git a/src/category-theory/strict-categories.lagda.md b/src/category-theory/strict-categories.lagda.md index 90d251a46f..a0eccfad76 100644 --- a/src/category-theory/strict-categories.lagda.md +++ b/src/category-theory/strict-categories.lagda.md @@ -14,6 +14,7 @@ open import category-theory.precategories open import category-theory.preunivalent-categories open import foundation.1-types +open import foundation.cartesian-product-types open import foundation.dependent-pair-types open import foundation.equivalences open import foundation.identity-types @@ -162,6 +163,36 @@ module _ pr2 preunivalent-category-Strict-Category = is-preunivalent-Strict-Category ``` +### The total hom-set of a strict category + +```agda +module _ + {l1 l2 : Level} (C : Strict-Category l1 l2) + where + + total-hom-Strict-Category : UU (l1 ⊔ l2) + total-hom-Strict-Category = + total-hom-Precategory (precategory-Strict-Category C) + + obj-total-hom-Strict-Category : + total-hom-Strict-Category → obj-Strict-Category C × obj-Strict-Category C + obj-total-hom-Strict-Category = + obj-total-hom-Precategory (precategory-Strict-Category C) + + is-set-total-hom-Strict-Category : + is-set total-hom-Strict-Category + is-set-total-hom-Strict-Category = + is-trunc-total-hom-is-trunc-obj-Precategory + ( precategory-Strict-Category C) + ( is-set-obj-Strict-Category C) + + total-hom-set-Strict-Category : Set (l1 ⊔ l2) + total-hom-set-Strict-Category = + total-hom-truncated-type-is-trunc-obj-Precategory + ( precategory-Strict-Category C) + ( is-set-obj-Strict-Category C) +``` + ### Equalities induce morphisms ```agda diff --git a/src/foundation-core/1-types.lagda.md b/src/foundation-core/1-types.lagda.md index 9086e32a3c..79ac7bd491 100644 --- a/src/foundation-core/1-types.lagda.md +++ b/src/foundation-core/1-types.lagda.md @@ -54,9 +54,14 @@ pr2 (Id-Set X x y) = is-1-type-type-1-Type X x y ### Any set is a 1-type ```agda +abstract + is-1-type-is-set : + {l : Level} {A : UU l} → is-set A → is-1-type A + is-1-type-is-set = is-trunc-succ-is-trunc zero-𝕋 + 1-type-Set : {l : Level} → Set l → 1-Type l -1-type-Set A = truncated-type-succ-Truncated-Type zero-𝕋 A +1-type-Set = truncated-type-succ-Truncated-Type zero-𝕋 ``` ### Any proposition is a 1-type diff --git a/src/foundation/sets.lagda.md b/src/foundation/sets.lagda.md index 27bdece44f..c3af2ae117 100644 --- a/src/foundation/sets.lagda.md +++ b/src/foundation/sets.lagda.md @@ -13,6 +13,7 @@ open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.subuniverses open import foundation.truncated-types +open import foundation.truncation-levels open import foundation.universe-levels open import foundation-core.1-types @@ -24,7 +25,6 @@ open import foundation-core.identity-types open import foundation-core.propositional-maps open import foundation-core.propositions open import foundation-core.torsorial-type-families -open import foundation-core.truncation-levels ```
@@ -241,9 +241,25 @@ abstract ```agda module _ - {l1 l2 : Level} {A : UU l1} {B : UU l2} where + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where is-emb-is-prop-is-set : is-prop A → is-set B → {f : A → B} → is-emb f is-emb-is-prop-is-set is-prop-A is-set-B {f} = is-emb-is-prop-map (λ b → is-prop-Σ is-prop-A (λ a → is-set-B (f a) b)) ``` + +### Sets are `k`-truncated for every `k ≥ 0` + +```agda +is-trunc-is-set : + {l : Level} (k : 𝕋) {A : UU l} → is-set A → is-trunc (succ-𝕋 (succ-𝕋 k)) A +is-trunc-is-set neg-two-𝕋 is-set-A = is-set-A +is-trunc-is-set (succ-𝕋 k) is-set-A = + is-trunc-succ-is-trunc (succ-𝕋 (succ-𝕋 k)) (is-trunc-is-set k is-set-A) + +set-Truncated-Type : + {l : Level} (k : 𝕋) → Set l → Truncated-Type l (succ-𝕋 (succ-𝕋 k)) +pr1 (set-Truncated-Type k A) = type-Set A +pr2 (set-Truncated-Type k A) = is-trunc-is-set k (is-set-type-Set A) +``` diff --git a/src/foundation/truncation-levels.lagda.md b/src/foundation/truncation-levels.lagda.md index d5c8d02cbb..9b45dff830 100644 --- a/src/foundation/truncation-levels.lagda.md +++ b/src/foundation/truncation-levels.lagda.md @@ -36,6 +36,14 @@ truncation-level-ℕ : ℕ → 𝕋 truncation-level-ℕ = succ-𝕋 ∘ truncation-level-minus-one-ℕ ``` +### The inclusion of double successors of truncation levels into the natural numbers + +```agda +nat-succ-succ-𝕋 : 𝕋 → ℕ +nat-succ-succ-𝕋 neg-two-𝕋 = zero-ℕ +nat-succ-succ-𝕋 (succ-𝕋 k) = succ-ℕ (nat-succ-succ-𝕋 k) +``` + ### Addition of truncation levels ```agda From 3bcde6f118681e14fc0b9428fc018cb693982676 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Mon, 23 Oct 2023 14:40:51 +0200 Subject: [PATCH 16/49] gaunt precategories --- src/category-theory.lagda.md | 1 + .../gaunt-precategories.lagda.md | 200 ++++++++++++++++++ .../nonunital-precategories.lagda.md | 2 +- 3 files changed, 202 insertions(+), 1 deletion(-) create mode 100644 src/category-theory/gaunt-precategories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index d798cc5c05..b3e52c2497 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -59,6 +59,7 @@ open import category-theory.functors-from-small-to-large-precategories public open import category-theory.functors-large-categories public open import category-theory.functors-large-precategories public open import category-theory.functors-precategories public +open import category-theory.gaunt-precategories public open import category-theory.groupoids public open import category-theory.homotopies-natural-transformations-large-precategories public open import category-theory.initial-objects-large-categories public diff --git a/src/category-theory/gaunt-precategories.lagda.md b/src/category-theory/gaunt-precategories.lagda.md new file mode 100644 index 0000000000..254b6b517a --- /dev/null +++ b/src/category-theory/gaunt-precategories.lagda.md @@ -0,0 +1,200 @@ +# Gaunt precategories + +```agda +module category-theory.gaunt-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 + +open import foundation.1-types +open import foundation.cartesian-product-types +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.universe-levels +``` + +
+ +## Idea + +A **gaunt precategory** is a [precategory](category-theory.precategories.md) for +which the +[isomorphism](category-theory.isomorphisms-in-precategories.md)-[sets](foundation-core.sets.md) +are [propositions](foundation-core.propositions.md). + +## Definitions + +### The predicate on precategories of being gaunt + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) + where + + is-gaunt-prop-Precategory : Prop (l1 ⊔ l2) + is-gaunt-prop-Precategory = + Π-Prop + ( obj-Precategory C) + ( λ x → + Π-Prop + ( obj-Precategory C) + ( λ y → is-prop-Prop (iso-Precategory C x y))) + + is-gaunt-Precategory : UU (l1 ⊔ l2) + is-gaunt-Precategory = type-Prop is-gaunt-prop-Precategory +``` + +### The type of gaunt precategories + +```agda +Gaunt-Precategory : (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2) +Gaunt-Precategory l1 l2 = + Σ (Precategory l1 l2) (is-gaunt-Precategory) + +module _ + {l1 l2 : Level} (C : Gaunt-Precategory l1 l2) + where + + precategory-Gaunt-Precategory : Precategory l1 l2 + precategory-Gaunt-Precategory = pr1 C + + obj-Gaunt-Precategory : UU l1 + obj-Gaunt-Precategory = obj-Precategory precategory-Gaunt-Precategory + + hom-set-Gaunt-Precategory : + obj-Gaunt-Precategory → obj-Gaunt-Precategory → Set l2 + hom-set-Gaunt-Precategory = + hom-set-Precategory precategory-Gaunt-Precategory + + hom-Gaunt-Precategory : + obj-Gaunt-Precategory → obj-Gaunt-Precategory → UU l2 + hom-Gaunt-Precategory = hom-Precategory precategory-Gaunt-Precategory + + is-set-hom-Gaunt-Precategory : + (x y : obj-Gaunt-Precategory) → is-set (hom-Gaunt-Precategory x y) + is-set-hom-Gaunt-Precategory = + is-set-hom-Precategory precategory-Gaunt-Precategory + + comp-hom-Gaunt-Precategory : + {x y z : obj-Gaunt-Precategory} → + hom-Gaunt-Precategory y z → + hom-Gaunt-Precategory x y → + hom-Gaunt-Precategory x z + comp-hom-Gaunt-Precategory = + comp-hom-Precategory precategory-Gaunt-Precategory + + associative-comp-hom-Gaunt-Precategory : + {x y z w : obj-Gaunt-Precategory} + (h : hom-Gaunt-Precategory z w) + (g : hom-Gaunt-Precategory y z) + (f : hom-Gaunt-Precategory x y) → + comp-hom-Gaunt-Precategory (comp-hom-Gaunt-Precategory h g) f = + comp-hom-Gaunt-Precategory h (comp-hom-Gaunt-Precategory g f) + associative-comp-hom-Gaunt-Precategory = + associative-comp-hom-Precategory precategory-Gaunt-Precategory + + associative-composition-operation-Gaunt-Precategory : + associative-composition-operation-binary-family-Set + hom-set-Gaunt-Precategory + associative-composition-operation-Gaunt-Precategory = + associative-composition-operation-Precategory + ( precategory-Gaunt-Precategory) + + id-hom-Gaunt-Precategory : + {x : obj-Gaunt-Precategory} → hom-Gaunt-Precategory x x + id-hom-Gaunt-Precategory = + id-hom-Precategory precategory-Gaunt-Precategory + + left-unit-law-comp-hom-Gaunt-Precategory : + {x y : obj-Gaunt-Precategory} (f : hom-Gaunt-Precategory x y) → + comp-hom-Gaunt-Precategory id-hom-Gaunt-Precategory f = f + left-unit-law-comp-hom-Gaunt-Precategory = + left-unit-law-comp-hom-Precategory precategory-Gaunt-Precategory + + right-unit-law-comp-hom-Gaunt-Precategory : + {x y : obj-Gaunt-Precategory} (f : hom-Gaunt-Precategory x y) → + comp-hom-Gaunt-Precategory f id-hom-Gaunt-Precategory = f + right-unit-law-comp-hom-Gaunt-Precategory = + right-unit-law-comp-hom-Precategory precategory-Gaunt-Precategory + + is-unital-composition-operation-Gaunt-Precategory : + is-unital-composition-operation-binary-family-Set + hom-set-Gaunt-Precategory + comp-hom-Gaunt-Precategory + is-unital-composition-operation-Gaunt-Precategory = + is-unital-composition-operation-Precategory + ( precategory-Gaunt-Precategory) + + is-gaunt-Gaunt-Precategory : + is-gaunt-Precategory precategory-Gaunt-Precategory + is-gaunt-Gaunt-Precategory = pr2 C +``` + +### The total hom-type of a gaunt category + +```agda +total-hom-Gaunt-Precategory : + {l1 l2 : Level} (C : Gaunt-Precategory l1 l2) → UU (l1 ⊔ l2) +total-hom-Gaunt-Precategory C = + total-hom-Precategory (precategory-Gaunt-Precategory C) + +obj-total-hom-Gaunt-Precategory : + {l1 l2 : Level} (C : Gaunt-Precategory l1 l2) → + total-hom-Gaunt-Precategory C → + obj-Gaunt-Precategory C × obj-Gaunt-Precategory C +obj-total-hom-Gaunt-Precategory C = + obj-total-hom-Precategory (precategory-Gaunt-Precategory C) +``` + +### Equalities induce morphisms + +```agda +module _ + {l1 l2 : Level} + (C : Gaunt-Precategory l1 l2) + where + + hom-eq-Gaunt-Precategory : + (x y : obj-Gaunt-Precategory C) → + x = y → hom-Gaunt-Precategory C x y + hom-eq-Gaunt-Precategory = + hom-eq-Precategory (precategory-Gaunt-Precategory C) + + hom-inv-eq-Gaunt-Precategory : + (x y : obj-Gaunt-Precategory C) → + x = y → hom-Gaunt-Precategory C y x + hom-inv-eq-Gaunt-Precategory = + hom-inv-eq-Precategory (precategory-Gaunt-Precategory C) +``` + +### Pre- and postcomposition by a morphism + +```agda +precomp-hom-Gaunt-Precategory : + {l1 l2 : Level} (C : Gaunt-Precategory l1 l2) + {x y : obj-Gaunt-Precategory C} + (f : hom-Gaunt-Precategory C x y) + (z : obj-Gaunt-Precategory C) → + hom-Gaunt-Precategory C y z → + hom-Gaunt-Precategory C x z +precomp-hom-Gaunt-Precategory C = + precomp-hom-Precategory (precategory-Gaunt-Precategory C) + +postcomp-hom-Gaunt-Precategory : + {l1 l2 : Level} (C : Gaunt-Precategory l1 l2) + {x y : obj-Gaunt-Precategory C} + (f : hom-Gaunt-Precategory C x y) + (z : obj-Gaunt-Precategory C) → + hom-Gaunt-Precategory C z x → + hom-Gaunt-Precategory C z y +postcomp-hom-Gaunt-Precategory C = + postcomp-hom-Precategory (precategory-Gaunt-Precategory C) +``` diff --git a/src/category-theory/nonunital-precategories.lagda.md b/src/category-theory/nonunital-precategories.lagda.md index 87660a59f1..f758d636a4 100644 --- a/src/category-theory/nonunital-precategories.lagda.md +++ b/src/category-theory/nonunital-precategories.lagda.md @@ -173,7 +173,7 @@ module _ ## Properties -## If the objects of a nonunital precategory are `k`-truncated for non-negative `k`, the total hom-type is `k`-truncated +### If the objects of a nonunital precategory are `k`-truncated for non-negative `k`, the total hom-type is `k`-truncated ```agda module _ From 111f0e87fd8f5c3b1dbba44cd53f426f9b6f2fe9 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Mon, 23 Oct 2023 17:03:00 +0200 Subject: [PATCH 17/49] gaunt categories --- src/category-theory.lagda.md | 2 +- src/category-theory/categories.lagda.md | 89 +++++ .../faithful-maps-precategories.lagda.md | 2 +- src/category-theory/gaunt-categories.lagda.md | 321 ++++++++++++++++++ .../gaunt-precategories.lagda.md | 200 ----------- .../isomorphisms-in-categories.lagda.md | 10 +- .../isomorphisms-in-precategories.lagda.md | 14 +- .../preunivalent-categories.lagda.md | 8 + src/foundation/decidable-embeddings.lagda.md | 2 +- src/foundation/embeddings.lagda.md | 6 +- src/foundation/propositions.lagda.md | 16 + src/foundation/sets.lagda.md | 2 +- src/foundation/surjective-maps.lagda.md | 2 +- src/order-theory/large-posets.lagda.md | 2 +- src/order-theory/posets.lagda.md | 2 +- 15 files changed, 458 insertions(+), 220 deletions(-) create mode 100644 src/category-theory/gaunt-categories.lagda.md delete mode 100644 src/category-theory/gaunt-precategories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index b3e52c2497..35f95696ed 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -59,7 +59,7 @@ open import category-theory.functors-from-small-to-large-precategories public open import category-theory.functors-large-categories public open import category-theory.functors-large-precategories public open import category-theory.functors-precategories public -open import category-theory.gaunt-precategories public +open import category-theory.gaunt-categories public open import category-theory.groupoids public open import category-theory.homotopies-natural-transformations-large-precategories public open import category-theory.initial-objects-large-categories public diff --git a/src/category-theory/categories.lagda.md b/src/category-theory/categories.lagda.md index 40815d1431..c0994b4ba5 100644 --- a/src/category-theory/categories.lagda.md +++ b/src/category-theory/categories.lagda.md @@ -20,6 +20,7 @@ open import foundation.equivalences open import foundation.identity-types open import foundation.propositions open import foundation.sets +open import foundation.surjective-maps open import foundation.universe-levels ``` @@ -57,6 +58,10 @@ module _ is-category-Precategory : UU (l1 ⊔ l2) is-category-Precategory = type-Prop is-category-prop-Precategory + + is-prop-is-category-Precategory : is-prop is-category-Precategory + is-prop-is-category-Precategory = + is-prop-type-Prop is-category-prop-Precategory ``` ### The type of categories @@ -239,3 +244,87 @@ module _ total-hom-1-type-Category = total-hom-1-type-Preunivalent-Category (preunivalent-category-Category C) ``` + +### A preunivalent category is a category if and only if `iso-eq` is surjective + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) + where + + is-surjective-iso-eq-prop-Precategory : Prop (l1 ⊔ l2) + is-surjective-iso-eq-prop-Precategory = + Π-Prop + ( obj-Precategory C) + ( λ x → + Π-Prop + ( obj-Precategory C) + ( λ y → + is-surjective-Prop + ( iso-eq-Precategory C x y))) + + is-surjective-iso-eq-Precategory : UU (l1 ⊔ l2) + is-surjective-iso-eq-Precategory = + type-Prop is-surjective-iso-eq-prop-Precategory + + is-prop-is-surjective-iso-eq-Precategory : + is-prop is-surjective-iso-eq-Precategory + is-prop-is-surjective-iso-eq-Precategory = + is-prop-type-Prop is-surjective-iso-eq-prop-Precategory +``` + +```agda +module _ + {l1 l2 : Level} (C : Preunivalent-Category l1 l2) + where + + is-category-is-surjective-iso-eq-Preunivalent-Category : + is-surjective-iso-eq-Precategory (precategory-Preunivalent-Category C) → + is-category-Precategory (precategory-Preunivalent-Category C) + is-category-is-surjective-iso-eq-Preunivalent-Category + is-surjective-iso-eq-C x y = + is-equiv-is-emb-is-surjective + ( is-surjective-iso-eq-C x y) + ( is-preunivalent-Preunivalent-Category C x y) + + is-surjective-iso-eq-is-category-Preunivalent-Category : + is-category-Precategory (precategory-Preunivalent-Category C) → + is-surjective-iso-eq-Precategory (precategory-Preunivalent-Category C) + is-surjective-iso-eq-is-category-Preunivalent-Category + is-category-C x y = + is-surjective-is-equiv (is-category-C x y) + + is-equiv-is-category-is-surjective-iso-eq-Preunivalent-Category : + is-equiv is-category-is-surjective-iso-eq-Preunivalent-Category + is-equiv-is-category-is-surjective-iso-eq-Preunivalent-Category = + is-equiv-is-prop + ( is-prop-is-surjective-iso-eq-Precategory + ( precategory-Preunivalent-Category C)) + ( is-prop-is-category-Precategory (precategory-Preunivalent-Category C)) + ( is-surjective-iso-eq-is-category-Preunivalent-Category) + + is-equiv-is-surjective-iso-eq-is-category-Preunivalent-Category : + is-equiv is-surjective-iso-eq-is-category-Preunivalent-Category + is-equiv-is-surjective-iso-eq-is-category-Preunivalent-Category = + is-equiv-is-prop + ( is-prop-is-category-Precategory (precategory-Preunivalent-Category C)) + ( is-prop-is-surjective-iso-eq-Precategory + ( precategory-Preunivalent-Category C)) + ( is-category-is-surjective-iso-eq-Preunivalent-Category) + + equiv-is-category-is-surjective-iso-eq-Preunivalent-Category : + is-surjective-iso-eq-Precategory (precategory-Preunivalent-Category C) ≃ + is-category-Precategory (precategory-Preunivalent-Category C) + pr1 equiv-is-category-is-surjective-iso-eq-Preunivalent-Category = + is-category-is-surjective-iso-eq-Preunivalent-Category + pr2 equiv-is-category-is-surjective-iso-eq-Preunivalent-Category = + is-equiv-is-category-is-surjective-iso-eq-Preunivalent-Category + + equiv-is-surjective-iso-eq-is-category-Preunivalent-Category : + is-category-Precategory (precategory-Preunivalent-Category C) ≃ + is-surjective-iso-eq-Precategory (precategory-Preunivalent-Category C) + pr1 equiv-is-surjective-iso-eq-is-category-Preunivalent-Category = + is-surjective-iso-eq-is-category-Preunivalent-Category + pr2 equiv-is-surjective-iso-eq-is-category-Preunivalent-Category = + is-equiv-is-surjective-iso-eq-is-category-Preunivalent-Category +``` diff --git a/src/category-theory/faithful-maps-precategories.lagda.md b/src/category-theory/faithful-maps-precategories.lagda.md index d4376bf7cd..e8799c78ed 100644 --- a/src/category-theory/faithful-maps-precategories.lagda.md +++ b/src/category-theory/faithful-maps-precategories.lagda.md @@ -49,7 +49,7 @@ module _ is-prop-is-faithful-map-Precategory : is-prop is-faithful-map-Precategory is-prop-is-faithful-map-Precategory = - is-prop-Π² (λ x y → is-prop-is-emb (hom-map-Precategory C D F {x} {y})) + is-prop-Π² (λ x y → is-property-is-emb (hom-map-Precategory C D F {x} {y})) is-faithful-prop-map-Precategory : Prop (l1 ⊔ l2 ⊔ l4) pr1 is-faithful-prop-map-Precategory = is-faithful-map-Precategory diff --git a/src/category-theory/gaunt-categories.lagda.md b/src/category-theory/gaunt-categories.lagda.md new file mode 100644 index 0000000000..c5dd691c04 --- /dev/null +++ b/src/category-theory/gaunt-categories.lagda.md @@ -0,0 +1,321 @@ +# Gaunt categories + +```agda +module category-theory.gaunt-categories where +``` + +
Imports + +```agda +open import category-theory.composition-operations-on-binary-families-of-sets +open import category-theory.isomorphisms-in-categories +open import category-theory.isomorphisms-in-precategories +open import category-theory.categories +open import category-theory.preunivalent-categories +open import category-theory.strict-categories +open import category-theory.precategories +open import category-theory.nonunital-precategories + +open import foundation.1-types +open import foundation.cartesian-product-types +open import foundation.dependent-pair-types +open import foundation.embeddings +open import foundation.identity-types +open import foundation.surjective-maps +open import foundation.propositions +open import foundation.sets +open import foundation.universe-levels +``` + +
+ +## Idea + +A **gaunt category** is a [category](category-theory.categories.md) for which +the +[isomorphism](category-theory.isomorphisms-in-categories.md)-[sets](foundation-core.sets.md) +are [propositions](foundation-core.propositions.md), or equivalently a category +such that the objects form a set. Thus, gaunt categories is the common +intersection if (univalent) categories and +[strict categories](category-theory.strict-categories.md). We have the following +diagram relating the different notions of "category": + +```text + Gaunt categories + / \ + / \ + v v + Categories Strict categories + \ / + \ / + v v + Preunivalent categories + | + | + v + Precategories +``` + +## Definitions + +### The predicate on precategories of being gaunt + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) + where + + is-prop-iso-prop-Precategory : Prop (l1 ⊔ l2) + is-prop-iso-prop-Precategory = + Π-Prop + ( obj-Precategory C) + ( λ x → + Π-Prop + ( obj-Precategory C) + ( λ y → is-prop-Prop (iso-Precategory C x y))) + + is-prop-iso-Precategory : UU (l1 ⊔ l2) + is-prop-iso-Precategory = type-Prop is-prop-iso-prop-Precategory + + is-property-is-prop-iso-Precategory : is-prop is-prop-iso-Precategory + is-property-is-prop-iso-Precategory = + is-prop-type-Prop is-prop-iso-prop-Precategory +``` + +### The predicate on precategories of being gaunt + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) + where + + is-gaunt-prop-Precategory : Prop (l1 ⊔ l2) + is-gaunt-prop-Precategory = + prod-Prop (is-category-prop-Precategory C) (is-prop-iso-prop-Precategory C) + + is-gaunt-Precategory : UU (l1 ⊔ l2) + is-gaunt-Precategory = type-Prop is-gaunt-prop-Precategory +``` + +### The predicate on categories of being gaunt + +```agda +module _ + {l1 l2 : Level} (C : Category l1 l2) + where + + is-gaunt-prop-Category : Prop (l1 ⊔ l2) + is-gaunt-prop-Category = is-prop-iso-prop-Precategory (precategory-Category C) + + is-gaunt-Category : UU (l1 ⊔ l2) + is-gaunt-Category = type-Prop is-gaunt-prop-Category +``` + +### The type of gaunt categories + +```agda +Gaunt-Category : (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2) +Gaunt-Category l1 l2 = + Σ (Category l1 l2) (is-gaunt-Category) + +module _ + {l1 l2 : Level} (C : Gaunt-Category l1 l2) + where + + category-Gaunt-Category : Category l1 l2 + category-Gaunt-Category = pr1 C + + obj-Gaunt-Category : UU l1 + obj-Gaunt-Category = obj-Category category-Gaunt-Category + + hom-set-Gaunt-Category : + obj-Gaunt-Category → obj-Gaunt-Category → Set l2 + hom-set-Gaunt-Category = + hom-set-Category category-Gaunt-Category + + hom-Gaunt-Category : + obj-Gaunt-Category → obj-Gaunt-Category → UU l2 + hom-Gaunt-Category = hom-Category category-Gaunt-Category + + is-set-hom-Gaunt-Category : + (x y : obj-Gaunt-Category) → is-set (hom-Gaunt-Category x y) + is-set-hom-Gaunt-Category = + is-set-hom-Category category-Gaunt-Category + + comp-hom-Gaunt-Category : + {x y z : obj-Gaunt-Category} → + hom-Gaunt-Category y z → + hom-Gaunt-Category x y → + hom-Gaunt-Category x z + comp-hom-Gaunt-Category = + comp-hom-Category category-Gaunt-Category + + associative-comp-hom-Gaunt-Category : + {x y z w : obj-Gaunt-Category} + (h : hom-Gaunt-Category z w) + (g : hom-Gaunt-Category y z) + (f : hom-Gaunt-Category x y) → + comp-hom-Gaunt-Category (comp-hom-Gaunt-Category h g) f = + comp-hom-Gaunt-Category h (comp-hom-Gaunt-Category g f) + associative-comp-hom-Gaunt-Category = + associative-comp-hom-Category category-Gaunt-Category + + associative-composition-operation-Gaunt-Category : + associative-composition-operation-binary-family-Set + hom-set-Gaunt-Category + associative-composition-operation-Gaunt-Category = + associative-composition-operation-Category + ( category-Gaunt-Category) + + id-hom-Gaunt-Category : + {x : obj-Gaunt-Category} → hom-Gaunt-Category x x + id-hom-Gaunt-Category = + id-hom-Category category-Gaunt-Category + + left-unit-law-comp-hom-Gaunt-Category : + {x y : obj-Gaunt-Category} (f : hom-Gaunt-Category x y) → + comp-hom-Gaunt-Category id-hom-Gaunt-Category f = f + left-unit-law-comp-hom-Gaunt-Category = + left-unit-law-comp-hom-Category category-Gaunt-Category + + right-unit-law-comp-hom-Gaunt-Category : + {x y : obj-Gaunt-Category} (f : hom-Gaunt-Category x y) → + comp-hom-Gaunt-Category f id-hom-Gaunt-Category = f + right-unit-law-comp-hom-Gaunt-Category = + right-unit-law-comp-hom-Category category-Gaunt-Category + + is-unital-composition-operation-Gaunt-Category : + is-unital-composition-operation-binary-family-Set + hom-set-Gaunt-Category + comp-hom-Gaunt-Category + is-unital-composition-operation-Gaunt-Category = + is-unital-composition-operation-Category + ( category-Gaunt-Category) + + is-gaunt-Gaunt-Category : + is-gaunt-Category category-Gaunt-Category + is-gaunt-Gaunt-Category = pr2 C +``` + +### The underlying nonunital precategory of a gaunt category + +```agda +nonunital-precategory-Gaunt-Category : + {l1 l2 : Level} → Gaunt-Category l1 l2 → Nonunital-Precategory l1 l2 +nonunital-precategory-Gaunt-Category C = + nonunital-precategory-Category (category-Gaunt-Category C) +``` + +### The underlying precategory of a gaunt category + +```agda +precategory-Gaunt-Category : + {l1 l2 : Level} → Gaunt-Category l1 l2 → Precategory l1 l2 +precategory-Gaunt-Category C = precategory-Category (category-Gaunt-Category C) +``` + +### The underlying preunivalent category of a gaunt category + +```agda +preunivalent-category-Gaunt-Category : + {l1 l2 : Level} → Gaunt-Category l1 l2 → Preunivalent-Category l1 l2 +preunivalent-category-Gaunt-Category C = + preunivalent-category-Category (category-Gaunt-Category C) +``` + +### The total hom-type of a gaunt category + +```agda +total-hom-Gaunt-Category : + {l1 l2 : Level} (C : Gaunt-Category l1 l2) → UU (l1 ⊔ l2) +total-hom-Gaunt-Category C = + total-hom-Category (category-Gaunt-Category C) + +obj-total-hom-Gaunt-Category : + {l1 l2 : Level} (C : Gaunt-Category l1 l2) → + total-hom-Gaunt-Category C → + obj-Gaunt-Category C × obj-Gaunt-Category C +obj-total-hom-Gaunt-Category C = + obj-total-hom-Category (category-Gaunt-Category C) +``` + +### Equalities induce morphisms + +```agda +module _ + {l1 l2 : Level} + (C : Gaunt-Category l1 l2) + where + + hom-eq-Gaunt-Category : + (x y : obj-Gaunt-Category C) → + x = y → hom-Gaunt-Category C x y + hom-eq-Gaunt-Category = + hom-eq-Category (category-Gaunt-Category C) + + hom-inv-eq-Gaunt-Category : + (x y : obj-Gaunt-Category C) → + x = y → hom-Gaunt-Category C y x + hom-inv-eq-Gaunt-Category = + hom-inv-eq-Category (category-Gaunt-Category C) +``` + +## Properties + +### Preunivalent categories whose isomorphism-sets are propositions are strict categories + +```agda +is-strict-category-is-prop-iso-Preunivalent-Category : + {l1 l2 : Level} (C : Preunivalent-Category l1 l2) → + is-prop-iso-Precategory (precategory-Preunivalent-Category C) → + is-strict-category-Precategory (precategory-Preunivalent-Category C) +is-strict-category-is-prop-iso-Preunivalent-Category C is-prop-iso-C x y = + is-prop-emb (emb-iso-eq-Preunivalent-Category C) (is-prop-iso-C x y) +``` + +### Gaunt categories are strict + +```agda +is-strict-category-is-gaunt-Category : + {l1 l2 : Level} (C : Category l1 l2) → + is-gaunt-Category C → is-strict-category-Precategory (precategory-Category C) +is-strict-category-is-gaunt-Category C = + is-strict-category-is-prop-iso-Preunivalent-Category + ( preunivalent-category-Category C) +``` + +### A strict category is gaunt if `iso-eq` is surjective + +```agda +module _ + {l1 l2 : Level} (C : Strict-Category l1 l2) + where + + is-category-is-surjective-iso-eq-Strict-Category : + is-surjective-iso-eq-Precategory (precategory-Strict-Category C) → + is-category-Precategory (precategory-Strict-Category C) + is-category-is-surjective-iso-eq-Strict-Category = + is-category-is-surjective-iso-eq-Preunivalent-Category + (preunivalent-category-Strict-Category C) + + is-prop-iso-is-category-Strict-Category : + is-category-Precategory (precategory-Strict-Category C) → + is-prop-iso-Precategory (precategory-Strict-Category C) + is-prop-iso-is-category-Strict-Category is-category-C x y = + is-prop-is-equiv' (is-category-C x y) (is-set-obj-Strict-Category C x y) + + is-prop-iso-is-surjective-iso-eq-Strict-Category : + is-surjective-iso-eq-Precategory (precategory-Strict-Category C) → + is-prop-iso-Precategory (precategory-Strict-Category C) + is-prop-iso-is-surjective-iso-eq-Strict-Category is-surj-iso-eq-C = + is-prop-iso-is-category-Strict-Category + ( is-category-is-surjective-iso-eq-Strict-Category is-surj-iso-eq-C) + + is-gaunt-is-surjective-iso-eq-Strict-Category : + is-surjective-iso-eq-Precategory (precategory-Strict-Category C) → + is-gaunt-Precategory (precategory-Strict-Category C) + pr1 (is-gaunt-is-surjective-iso-eq-Strict-Category is-surj-iso-eq-C) = + is-category-is-surjective-iso-eq-Strict-Category is-surj-iso-eq-C + pr2 (is-gaunt-is-surjective-iso-eq-Strict-Category is-surj-iso-eq-C) = + is-prop-iso-is-surjective-iso-eq-Strict-Category is-surj-iso-eq-C +``` diff --git a/src/category-theory/gaunt-precategories.lagda.md b/src/category-theory/gaunt-precategories.lagda.md deleted file mode 100644 index 254b6b517a..0000000000 --- a/src/category-theory/gaunt-precategories.lagda.md +++ /dev/null @@ -1,200 +0,0 @@ -# Gaunt precategories - -```agda -module category-theory.gaunt-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 - -open import foundation.1-types -open import foundation.cartesian-product-types -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.universe-levels -``` - -
- -## Idea - -A **gaunt precategory** is a [precategory](category-theory.precategories.md) for -which the -[isomorphism](category-theory.isomorphisms-in-precategories.md)-[sets](foundation-core.sets.md) -are [propositions](foundation-core.propositions.md). - -## Definitions - -### The predicate on precategories of being gaunt - -```agda -module _ - {l1 l2 : Level} (C : Precategory l1 l2) - where - - is-gaunt-prop-Precategory : Prop (l1 ⊔ l2) - is-gaunt-prop-Precategory = - Π-Prop - ( obj-Precategory C) - ( λ x → - Π-Prop - ( obj-Precategory C) - ( λ y → is-prop-Prop (iso-Precategory C x y))) - - is-gaunt-Precategory : UU (l1 ⊔ l2) - is-gaunt-Precategory = type-Prop is-gaunt-prop-Precategory -``` - -### The type of gaunt precategories - -```agda -Gaunt-Precategory : (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2) -Gaunt-Precategory l1 l2 = - Σ (Precategory l1 l2) (is-gaunt-Precategory) - -module _ - {l1 l2 : Level} (C : Gaunt-Precategory l1 l2) - where - - precategory-Gaunt-Precategory : Precategory l1 l2 - precategory-Gaunt-Precategory = pr1 C - - obj-Gaunt-Precategory : UU l1 - obj-Gaunt-Precategory = obj-Precategory precategory-Gaunt-Precategory - - hom-set-Gaunt-Precategory : - obj-Gaunt-Precategory → obj-Gaunt-Precategory → Set l2 - hom-set-Gaunt-Precategory = - hom-set-Precategory precategory-Gaunt-Precategory - - hom-Gaunt-Precategory : - obj-Gaunt-Precategory → obj-Gaunt-Precategory → UU l2 - hom-Gaunt-Precategory = hom-Precategory precategory-Gaunt-Precategory - - is-set-hom-Gaunt-Precategory : - (x y : obj-Gaunt-Precategory) → is-set (hom-Gaunt-Precategory x y) - is-set-hom-Gaunt-Precategory = - is-set-hom-Precategory precategory-Gaunt-Precategory - - comp-hom-Gaunt-Precategory : - {x y z : obj-Gaunt-Precategory} → - hom-Gaunt-Precategory y z → - hom-Gaunt-Precategory x y → - hom-Gaunt-Precategory x z - comp-hom-Gaunt-Precategory = - comp-hom-Precategory precategory-Gaunt-Precategory - - associative-comp-hom-Gaunt-Precategory : - {x y z w : obj-Gaunt-Precategory} - (h : hom-Gaunt-Precategory z w) - (g : hom-Gaunt-Precategory y z) - (f : hom-Gaunt-Precategory x y) → - comp-hom-Gaunt-Precategory (comp-hom-Gaunt-Precategory h g) f = - comp-hom-Gaunt-Precategory h (comp-hom-Gaunt-Precategory g f) - associative-comp-hom-Gaunt-Precategory = - associative-comp-hom-Precategory precategory-Gaunt-Precategory - - associative-composition-operation-Gaunt-Precategory : - associative-composition-operation-binary-family-Set - hom-set-Gaunt-Precategory - associative-composition-operation-Gaunt-Precategory = - associative-composition-operation-Precategory - ( precategory-Gaunt-Precategory) - - id-hom-Gaunt-Precategory : - {x : obj-Gaunt-Precategory} → hom-Gaunt-Precategory x x - id-hom-Gaunt-Precategory = - id-hom-Precategory precategory-Gaunt-Precategory - - left-unit-law-comp-hom-Gaunt-Precategory : - {x y : obj-Gaunt-Precategory} (f : hom-Gaunt-Precategory x y) → - comp-hom-Gaunt-Precategory id-hom-Gaunt-Precategory f = f - left-unit-law-comp-hom-Gaunt-Precategory = - left-unit-law-comp-hom-Precategory precategory-Gaunt-Precategory - - right-unit-law-comp-hom-Gaunt-Precategory : - {x y : obj-Gaunt-Precategory} (f : hom-Gaunt-Precategory x y) → - comp-hom-Gaunt-Precategory f id-hom-Gaunt-Precategory = f - right-unit-law-comp-hom-Gaunt-Precategory = - right-unit-law-comp-hom-Precategory precategory-Gaunt-Precategory - - is-unital-composition-operation-Gaunt-Precategory : - is-unital-composition-operation-binary-family-Set - hom-set-Gaunt-Precategory - comp-hom-Gaunt-Precategory - is-unital-composition-operation-Gaunt-Precategory = - is-unital-composition-operation-Precategory - ( precategory-Gaunt-Precategory) - - is-gaunt-Gaunt-Precategory : - is-gaunt-Precategory precategory-Gaunt-Precategory - is-gaunt-Gaunt-Precategory = pr2 C -``` - -### The total hom-type of a gaunt category - -```agda -total-hom-Gaunt-Precategory : - {l1 l2 : Level} (C : Gaunt-Precategory l1 l2) → UU (l1 ⊔ l2) -total-hom-Gaunt-Precategory C = - total-hom-Precategory (precategory-Gaunt-Precategory C) - -obj-total-hom-Gaunt-Precategory : - {l1 l2 : Level} (C : Gaunt-Precategory l1 l2) → - total-hom-Gaunt-Precategory C → - obj-Gaunt-Precategory C × obj-Gaunt-Precategory C -obj-total-hom-Gaunt-Precategory C = - obj-total-hom-Precategory (precategory-Gaunt-Precategory C) -``` - -### Equalities induce morphisms - -```agda -module _ - {l1 l2 : Level} - (C : Gaunt-Precategory l1 l2) - where - - hom-eq-Gaunt-Precategory : - (x y : obj-Gaunt-Precategory C) → - x = y → hom-Gaunt-Precategory C x y - hom-eq-Gaunt-Precategory = - hom-eq-Precategory (precategory-Gaunt-Precategory C) - - hom-inv-eq-Gaunt-Precategory : - (x y : obj-Gaunt-Precategory C) → - x = y → hom-Gaunt-Precategory C y x - hom-inv-eq-Gaunt-Precategory = - hom-inv-eq-Precategory (precategory-Gaunt-Precategory C) -``` - -### Pre- and postcomposition by a morphism - -```agda -precomp-hom-Gaunt-Precategory : - {l1 l2 : Level} (C : Gaunt-Precategory l1 l2) - {x y : obj-Gaunt-Precategory C} - (f : hom-Gaunt-Precategory C x y) - (z : obj-Gaunt-Precategory C) → - hom-Gaunt-Precategory C y z → - hom-Gaunt-Precategory C x z -precomp-hom-Gaunt-Precategory C = - precomp-hom-Precategory (precategory-Gaunt-Precategory C) - -postcomp-hom-Gaunt-Precategory : - {l1 l2 : Level} (C : Gaunt-Precategory l1 l2) - {x y : obj-Gaunt-Precategory C} - (f : hom-Gaunt-Precategory C x y) - (z : obj-Gaunt-Precategory C) → - hom-Gaunt-Precategory C z x → - hom-Gaunt-Precategory C z y -postcomp-hom-Gaunt-Precategory C = - postcomp-hom-Precategory (precategory-Gaunt-Precategory C) -``` diff --git a/src/category-theory/isomorphisms-in-categories.lagda.md b/src/category-theory/isomorphisms-in-categories.lagda.md index 4937a6170b..ed3292cb95 100644 --- a/src/category-theory/isomorphisms-in-categories.lagda.md +++ b/src/category-theory/isomorphisms-in-categories.lagda.md @@ -557,13 +557,15 @@ module _ {x y : obj-Category C} where - is-prop-iso-Category : + is-prop-iso-is-prop-hom-Category : is-prop (hom-Category C x y) → is-prop (iso-Category C x y) - is-prop-iso-Category = is-prop-iso-Precategory (precategory-Category C) + is-prop-iso-is-prop-hom-Category = + is-prop-iso-is-prop-hom-Precategory (precategory-Category C) - iso-prop-Category : + iso-prop-is-prop-hom-Category : is-prop (hom-Category C x y) → Prop l2 - iso-prop-Category = iso-prop-Precategory (precategory-Category C) + iso-prop-is-prop-hom-Category = + iso-prop-is-prop-hom-Precategory (precategory-Category C) ``` ### When `hom x y` and `hom y x` are propositions, it suffices to provide a morphism in each direction to construct an isomorphism diff --git a/src/category-theory/isomorphisms-in-precategories.lagda.md b/src/category-theory/isomorphisms-in-precategories.lagda.md index 9e73afaa67..599d3b0c9c 100644 --- a/src/category-theory/isomorphisms-in-precategories.lagda.md +++ b/src/category-theory/isomorphisms-in-precategories.lagda.md @@ -721,15 +721,17 @@ module _ {x y : obj-Precategory C} where - is-prop-iso-Precategory : + is-prop-iso-is-prop-hom-Precategory : is-prop (hom-Precategory C x y) → is-prop (iso-Precategory C x y) - is-prop-iso-Precategory = is-prop-type-subtype (is-iso-prop-Precategory C) + is-prop-iso-is-prop-hom-Precategory = + is-prop-type-subtype (is-iso-prop-Precategory C) - iso-prop-Precategory : + iso-prop-is-prop-hom-Precategory : is-prop (hom-Precategory C x y) → Prop l2 - pr1 (iso-prop-Precategory _) = iso-Precategory C x y - pr2 (iso-prop-Precategory is-prop-hom-C-x-y) = - is-prop-iso-Precategory is-prop-hom-C-x-y + pr1 (iso-prop-is-prop-hom-Precategory is-prop-hom-C-x-y) = + iso-Precategory C x y + pr2 (iso-prop-is-prop-hom-Precategory is-prop-hom-C-x-y) = + is-prop-iso-is-prop-hom-Precategory is-prop-hom-C-x-y ``` ### When `hom x y` and `hom y x` are propositions, it suffices to provide a morphism in each direction to construct an isomorphism diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md index 5f81fd838f..81409ad528 100644 --- a/src/category-theory/preunivalent-categories.lagda.md +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -152,6 +152,14 @@ module _ is-preunivalent-Preunivalent-Category : is-preunivalent-Precategory precategory-Preunivalent-Category is-preunivalent-Preunivalent-Category = pr2 C + + emb-iso-eq-Preunivalent-Category : + {x y : obj-Preunivalent-Category} → + (x = y) ↪ (iso-Precategory precategory-Preunivalent-Category x y) + pr1 (emb-iso-eq-Preunivalent-Category {x} {y}) = + iso-eq-Precategory precategory-Preunivalent-Category x y + pr2 (emb-iso-eq-Preunivalent-Category {x} {y}) = + is-preunivalent-Preunivalent-Category x y ``` ### The total hom-type of a preunivalent category diff --git a/src/foundation/decidable-embeddings.lagda.md b/src/foundation/decidable-embeddings.lagda.md index d13990b6db..2607d8a258 100644 --- a/src/foundation/decidable-embeddings.lagda.md +++ b/src/foundation/decidable-embeddings.lagda.md @@ -222,7 +222,7 @@ abstract is-prop-is-inhabited ( λ H → is-prop-prod - ( is-prop-is-emb f) + ( is-property-is-emb f) ( is-prop-Π ( λ y → is-prop-is-decidable (is-prop-map-is-emb (pr1 H) y)))) ``` diff --git a/src/foundation/embeddings.lagda.md b/src/foundation/embeddings.lagda.md index 5ee493c330..ca25414087 100644 --- a/src/foundation/embeddings.lagda.md +++ b/src/foundation/embeddings.lagda.md @@ -44,13 +44,13 @@ module _ {l1 l2 : Level} {A : UU l1} {B : UU l2} where - is-prop-is-emb : (f : A → B) → is-prop (is-emb f) - is-prop-is-emb f = + is-property-is-emb : (f : A → B) → is-prop (is-emb f) + is-property-is-emb f = is-prop-Π (λ x → is-prop-Π (λ y → is-property-is-equiv (ap f))) is-emb-Prop : (A → B) → Prop (l1 ⊔ l2) pr1 (is-emb-Prop f) = is-emb f - pr2 (is-emb-Prop f) = is-prop-is-emb f + pr2 (is-emb-Prop f) = is-property-is-emb f ``` ### Embeddings are closed under homotopies diff --git a/src/foundation/propositions.lagda.md b/src/foundation/propositions.lagda.md index 87c24471d8..563e24e52f 100644 --- a/src/foundation/propositions.lagda.md +++ b/src/foundation/propositions.lagda.md @@ -11,6 +11,7 @@ open import foundation-core.propositions public ```agda open import foundation.contractible-types open import foundation.dependent-pair-types +open import foundation.embeddings open import foundation.universe-levels open import foundation-core.retractions @@ -45,3 +46,18 @@ module _ is-prop-retract-of : A retract-of B → is-prop B → is-prop A is-prop-retract-of = is-trunc-retract-of ``` + +### If a type embeds into a proposition, then it is a proposition + +```agda +abstract + is-prop-is-emb : + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → + is-emb f → is-prop B → is-prop A + is-prop-is-emb = is-trunc-is-emb neg-two-𝕋 + +abstract + is-prop-emb : + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A ↪ B) → is-prop B → is-prop A + is-prop-emb = is-trunc-emb neg-two-𝕋 +``` diff --git a/src/foundation/sets.lagda.md b/src/foundation/sets.lagda.md index c3af2ae117..a43ea60edd 100644 --- a/src/foundation/sets.lagda.md +++ b/src/foundation/sets.lagda.md @@ -249,7 +249,7 @@ module _ is-emb-is-prop-map (λ b → is-prop-Σ is-prop-A (λ a → is-set-B (f a) b)) ``` -### Sets are `k`-truncated for every `k ≥ 0` +### Sets are `k+2`-truncated for any `k` ```agda is-trunc-is-set : diff --git a/src/foundation/surjective-maps.lagda.md b/src/foundation/surjective-maps.lagda.md index e51675cf33..84827e97d5 100644 --- a/src/foundation/surjective-maps.lagda.md +++ b/src/foundation/surjective-maps.lagda.md @@ -721,7 +721,7 @@ module _ ( ap ( concat' (g (i a)) (M (f a))) ( is-section-map-inv-is-equiv - ( K (i a) ((j (f a)))) + ( K (i a) (j (f a))) ( L a ∙ inv (M (f a))))) ∙ ( is-section-inv-concat' (g (i a)) (M (f a)) (L a))))) where diff --git a/src/order-theory/large-posets.lagda.md b/src/order-theory/large-posets.lagda.md index ccd905d046..fd55dfa299 100644 --- a/src/order-theory/large-posets.lagda.md +++ b/src/order-theory/large-posets.lagda.md @@ -174,7 +174,7 @@ module _ is-large-category-Large-Poset {l} x y = is-equiv-is-prop ( is-set-type-Large-Poset P x y) - ( is-prop-iso-Precategory + ( is-prop-iso-is-prop-hom-Precategory ( precategory-Large-Poset l) ( is-prop-leq-Large-Poset P x y)) ( λ f → diff --git a/src/order-theory/posets.lagda.md b/src/order-theory/posets.lagda.md index 1a3c6eb992..2aced8f627 100644 --- a/src/order-theory/posets.lagda.md +++ b/src/order-theory/posets.lagda.md @@ -157,7 +157,7 @@ module _ is-category-precategory-Poset x y = is-equiv-is-prop ( is-set-type-Poset X x y) - ( is-prop-iso-Precategory precategory-Poset (is-prop-leq-Poset X x y)) + ( is-prop-iso-is-prop-hom-Precategory precategory-Poset (is-prop-leq-Poset X x y)) ( λ f → antisymmetric-leq-Poset X x y ( hom-iso-Precategory precategory-Poset f) From 367a69c01131de1e07c5dc8a5b9785204c126be5 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Tue, 24 Oct 2023 01:53:00 +0200 Subject: [PATCH 18/49] fix subprecategories hehe --- .../coproducts-in-precategories.lagda.md | 3 +- .../faithful-maps-precategories.lagda.md | 6 +- .../full-maps-precategories.lagda.md | 3 +- .../full-subcategories.lagda.md | 6 +- .../full-subprecategories.lagda.md | 16 +- ...fully-faithful-maps-precategories.lagda.md | 2 +- .../functors-precategories.lagda.md | 3 +- src/category-theory/gaunt-categories.lagda.md | 8 +- .../large-subprecategories.lagda.md | 30 +- .../preunivalent-categories.lagda.md | 13 +- .../products-in-precategories.lagda.md | 1 + .../pullbacks-in-precategories.lagda.md | 4 +- src/category-theory/subcategories.lagda.md | 76 ++--- src/category-theory/subprecategories.lagda.md | 270 +++++++++++------- src/foundation-core/propositions.lagda.md | 223 --------------- src/foundation/binary-relations.lagda.md | 2 +- 16 files changed, 254 insertions(+), 412 deletions(-) diff --git a/src/category-theory/coproducts-in-precategories.lagda.md b/src/category-theory/coproducts-in-precategories.lagda.md index 18c02fc8a9..8a3667a076 100644 --- a/src/category-theory/coproducts-in-precategories.lagda.md +++ b/src/category-theory/coproducts-in-precategories.lagda.md @@ -13,6 +13,7 @@ open import foundation.action-on-identifications-functions open import foundation.cartesian-product-types open import foundation.contractible-types open import foundation.dependent-pair-types +open import foundation.iterated-dependent-product-types open import foundation.identity-types open import foundation.propositions open import foundation.unique-existence @@ -121,7 +122,7 @@ module _ is-prop-is-coproduct-Precategory : is-prop (is-coproduct-Precategory C x y p l r) is-prop-is-coproduct-Precategory = - is-prop-Π³ (λ z f g → is-property-is-contr) + is-prop-iterated-Π 3 (λ z f g → is-property-is-contr) is-coproduct-prop-Precategory : Prop (l1 ⊔ l2) pr1 is-coproduct-prop-Precategory = is-coproduct-Precategory C x y p l r diff --git a/src/category-theory/faithful-maps-precategories.lagda.md b/src/category-theory/faithful-maps-precategories.lagda.md index e8799c78ed..9b35d67dc4 100644 --- a/src/category-theory/faithful-maps-precategories.lagda.md +++ b/src/category-theory/faithful-maps-precategories.lagda.md @@ -14,6 +14,7 @@ open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.equivalences open import foundation.function-types +open import foundation.iterated-dependent-product-types open import foundation.injective-maps open import foundation.propositions open import foundation.universe-levels @@ -49,7 +50,8 @@ module _ is-prop-is-faithful-map-Precategory : is-prop is-faithful-map-Precategory is-prop-is-faithful-map-Precategory = - is-prop-Π² (λ x y → is-property-is-emb (hom-map-Precategory C D F {x} {y})) + is-prop-iterated-Π 2 + ( λ x y → is-property-is-emb (hom-map-Precategory C D F {x} {y})) is-faithful-prop-map-Precategory : Prop (l1 ⊔ l2 ⊔ l4) pr1 is-faithful-prop-map-Precategory = is-faithful-map-Precategory @@ -110,7 +112,7 @@ module _ is-prop-is-injective-hom-map-Precategory : is-prop is-injective-hom-map-Precategory is-prop-is-injective-hom-map-Precategory = - is-prop-Π² + is-prop-iterated-Π 2 ( λ x y → is-prop-is-injective ( is-set-hom-Precategory C x y) diff --git a/src/category-theory/full-maps-precategories.lagda.md b/src/category-theory/full-maps-precategories.lagda.md index aac8e8fb73..06d6cef6ce 100644 --- a/src/category-theory/full-maps-precategories.lagda.md +++ b/src/category-theory/full-maps-precategories.lagda.md @@ -12,6 +12,7 @@ open import category-theory.precategories open import foundation.dependent-pair-types open import foundation.function-types +open import foundation.iterated-dependent-product-types open import foundation.propositions open import foundation.surjective-maps open import foundation.universe-levels @@ -45,7 +46,7 @@ module _ is-prop-is-full-map-Precategory : is-prop is-full-map-Precategory is-prop-is-full-map-Precategory = - is-prop-Π² + is-prop-iterated-Π 2 ( λ x y → is-prop-is-surjective (hom-map-Precategory C D F {x} {y})) is-full-prop-map-Precategory : Prop (l1 ⊔ l2 ⊔ l4) diff --git a/src/category-theory/full-subcategories.lagda.md b/src/category-theory/full-subcategories.lagda.md index a6e55047bc..a3a24c72d4 100644 --- a/src/category-theory/full-subcategories.lagda.md +++ b/src/category-theory/full-subcategories.lagda.md @@ -52,9 +52,9 @@ module _ (P : Full-Subcategory l3 C) where - subtype-obj-Full-Subcategory : subtype l3 (obj-Category C) - subtype-obj-Full-Subcategory = - subtype-obj-Full-Subprecategory (precategory-Category C) P + subobj-Full-Subcategory : subtype l3 (obj-Category C) + subobj-Full-Subcategory = + subobj-Full-Subprecategory (precategory-Category C) P obj-Full-Subcategory : UU (l1 ⊔ l3) obj-Full-Subcategory = obj-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 96cc1399f8..09714817b5 100644 --- a/src/category-theory/full-subprecategories.lagda.md +++ b/src/category-theory/full-subprecategories.lagda.md @@ -58,30 +58,30 @@ module _ (P : Full-Subprecategory l3 C) where - subtype-obj-Full-Subprecategory : subtype l3 (obj-Precategory C) - subtype-obj-Full-Subprecategory = P + subobj-Full-Subprecategory : subtype l3 (obj-Precategory C) + subobj-Full-Subprecategory = P obj-Full-Subprecategory : UU (l1 ⊔ l3) - obj-Full-Subprecategory = type-subtype subtype-obj-Full-Subprecategory + obj-Full-Subprecategory = type-subtype subobj-Full-Subprecategory inclusion-obj-Full-Subprecategory : obj-Full-Subprecategory → obj-Precategory C inclusion-obj-Full-Subprecategory = - inclusion-subtype subtype-obj-Full-Subprecategory + inclusion-subtype subobj-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-in-obj-Full-Subprecategory = is-in-subtype subobj-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-prop-is-in-subtype subobj-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 + is-in-subtype-inclusion-subtype subobj-Full-Subprecategory ``` ### The underlying precategory of a full subprecategory @@ -279,7 +279,7 @@ module _ ( C) ( inclusion-Full-Subprecategory C P)) is-emb-obj-inclusion-Full-Subprecategory = - is-emb-inclusion-subtype (subtype-obj-Full-Subprecategory C P) + is-emb-inclusion-subtype (subobj-Full-Subprecategory C P) is-embedding-inclusion-Full-Subprecategory : is-embedding-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 e2cdc1758d..21dad3d36f 100644 --- a/src/category-theory/fully-faithful-maps-precategories.lagda.md +++ b/src/category-theory/fully-faithful-maps-precategories.lagda.md @@ -50,7 +50,7 @@ module _ is-prop-is-fully-faithful-map-Precategory : is-prop is-fully-faithful-map-Precategory is-prop-is-fully-faithful-map-Precategory = - is-prop-Π² + is-prop-iterated-Π 2 ( λ x y → is-property-is-equiv (hom-map-Precategory C D F {x} {y})) is-fully-faithful-prop-map-Precategory : Prop (l1 ⊔ l2 ⊔ l4) diff --git a/src/category-theory/functors-precategories.lagda.md b/src/category-theory/functors-precategories.lagda.md index 061e652f80..119ee40002 100644 --- a/src/category-theory/functors-precategories.lagda.md +++ b/src/category-theory/functors-precategories.lagda.md @@ -16,6 +16,7 @@ open import foundation.cartesian-product-types open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.equivalences +open import foundation.iterated-dependent-product-types open import foundation.function-types open import foundation.homotopies open import foundation.identity-types @@ -208,7 +209,7 @@ module _ ( λ y → is-prop-Π' ( λ z → - is-prop-Π² + is-prop-iterated-Π 2 ( λ g f → is-set-hom-Precategory D ( obj-map-Precategory C D F x) diff --git a/src/category-theory/gaunt-categories.lagda.md b/src/category-theory/gaunt-categories.lagda.md index c5dd691c04..274f578f5e 100644 --- a/src/category-theory/gaunt-categories.lagda.md +++ b/src/category-theory/gaunt-categories.lagda.md @@ -36,7 +36,7 @@ the [isomorphism](category-theory.isomorphisms-in-categories.md)-[sets](foundation-core.sets.md) are [propositions](foundation-core.propositions.md), or equivalently a category such that the objects form a set. Thus, gaunt categories is the common -intersection if (univalent) categories and +intersection of (univalent) categories and [strict categories](category-theory.strict-categories.md). We have the following diagram relating the different notions of "category": @@ -319,3 +319,9 @@ module _ pr2 (is-gaunt-is-surjective-iso-eq-Strict-Category is-surj-iso-eq-C) = is-prop-iso-is-surjective-iso-eq-Strict-Category is-surj-iso-eq-C ``` + +## External links + +- [Gaunt (pre)categories](https://1lab.dev/Cat.Gaunt.html) at 1lab +- [gaunt category](https://ncatlab.org/nlab/show/gaunt+category#in_type_theory) + at nlab diff --git a/src/category-theory/large-subprecategories.lagda.md b/src/category-theory/large-subprecategories.lagda.md index ecba71cf2f..13de3e41aa 100644 --- a/src/category-theory/large-subprecategories.lagda.md +++ b/src/category-theory/large-subprecategories.lagda.md @@ -50,19 +50,19 @@ module _ Large-Subprecategory : UUω where field - subtype-obj-Large-Subprecategory : + subobj-Large-Subprecategory : (l : Level) → subtype (γ l) (obj-Large-Precategory C l) - subtype-hom-Large-Subprecategory : + subhom-Large-Subprecategory : {l1 l2 : Level} (X : obj-Large-Precategory C l1) (Y : obj-Large-Precategory C l2) → - is-in-subtype (subtype-obj-Large-Subprecategory l1) X → - is-in-subtype (subtype-obj-Large-Subprecategory l2) Y → + is-in-subtype (subobj-Large-Subprecategory l1) X → + is-in-subtype (subobj-Large-Subprecategory l2) Y → subtype (β l1 l2) (hom-Large-Precategory C X Y) contains-id-Large-Subprecategory : {l1 : Level} (X : obj-Large-Precategory C l1) → - (H : is-in-subtype (subtype-obj-Large-Subprecategory l1) X) → + (H : is-in-subtype (subobj-Large-Subprecategory l1) X) → is-in-subtype - ( subtype-hom-Large-Subprecategory X X H H) + ( subhom-Large-Subprecategory X X H H) ( id-hom-Large-Precategory C) is-closed-under-composition-Large-Subprecategory : {l1 l2 l3 : Level} @@ -71,13 +71,13 @@ module _ (Z : obj-Large-Precategory C l3) (g : hom-Large-Precategory C Y Z) (f : hom-Large-Precategory C X Y) → - (K : is-in-subtype (subtype-obj-Large-Subprecategory l1) X) → - (L : is-in-subtype (subtype-obj-Large-Subprecategory l2) Y) → - (M : is-in-subtype (subtype-obj-Large-Subprecategory l3) Z) → - is-in-subtype (subtype-hom-Large-Subprecategory Y Z L M) g → - is-in-subtype (subtype-hom-Large-Subprecategory X Y K L) f → + (K : is-in-subtype (subobj-Large-Subprecategory l1) X) → + (L : is-in-subtype (subobj-Large-Subprecategory l2) Y) → + (M : is-in-subtype (subobj-Large-Subprecategory l3) Z) → + is-in-subtype (subhom-Large-Subprecategory Y Z L M) g → + is-in-subtype (subhom-Large-Subprecategory X Y K L) f → is-in-subtype - ( subtype-hom-Large-Subprecategory X Z K M) + ( subhom-Large-Subprecategory X Z K M) ( comp-hom-Large-Precategory C g f) open Large-Subprecategory public @@ -89,8 +89,8 @@ module _ (P : Large-Subprecategory γ δ C) where - is-in-subtype-obj-Large-Subprecategory : + is-in-obj-Large-Subprecategory : {l : Level} → obj-Large-Precategory C l → UU (γ l) - is-in-subtype-obj-Large-Subprecategory = - is-in-subtype (subtype-obj-Large-Subprecategory P _) + is-in-obj-Large-Subprecategory = + is-in-subtype (subobj-Large-Subprecategory P _) ``` diff --git a/src/category-theory/preunivalent-categories.lagda.md b/src/category-theory/preunivalent-categories.lagda.md index 81409ad528..718ba007bd 100644 --- a/src/category-theory/preunivalent-categories.lagda.md +++ b/src/category-theory/preunivalent-categories.lagda.md @@ -40,11 +40,14 @@ preunivalent categories generalize both [strict categories](category-theory.strict-categories.md), which are precategories whose objects form a [set](foundation-core.sets.md). -Summarized, the preunivalence condition on precategories states that the type of -objects is a subgroupoid of the [groupoid](category-theory.groupoids.md) of -isomorphisms. For univalent categories the groupoid of objects is equivalent to -the groupoid of isomorphisms, while for strict categories the groupoid of -objects is discrete. +The preunivalence condition on precategories states that the type of objects is +a subgroupoid of the [groupoid](category-theory.groupoids.md) of isomorphisms. +For univalent categories the groupoid of objects is equivalent to the groupoid +of isomorphisms, while for strict categories the groupoid of objects is +discrete. Indeed, in this sense preunivalence provides a generalization of both +notions of "category", with _no more structure_. This is opposed to the even +more general notion of precategory, where the homotopy structure on the objects +can be almost completely unrelated to the homotopy structure of the morphisms. ## Definitions diff --git a/src/category-theory/products-in-precategories.lagda.md b/src/category-theory/products-in-precategories.lagda.md index 9933dde857..b614da96d4 100644 --- a/src/category-theory/products-in-precategories.lagda.md +++ b/src/category-theory/products-in-precategories.lagda.md @@ -12,6 +12,7 @@ open import category-theory.precategories open import foundation.action-on-identifications-functions open import foundation.cartesian-product-types open import foundation.contractible-types +open import foundation.iterated-dependent-product-types open import foundation.dependent-pair-types open import foundation.identity-types open import foundation.propositions diff --git a/src/category-theory/pullbacks-in-precategories.lagda.md b/src/category-theory/pullbacks-in-precategories.lagda.md index 6a5d2efeb8..8c8c7dbdd7 100644 --- a/src/category-theory/pullbacks-in-precategories.lagda.md +++ b/src/category-theory/pullbacks-in-precategories.lagda.md @@ -13,6 +13,7 @@ open import foundation.action-on-identifications-functions open import foundation.cartesian-product-types open import foundation.contractible-types open import foundation.dependent-pair-types +open import foundation.iterated-dependent-product-types open import foundation.identity-types open import foundation.propositions open import foundation.unique-existence @@ -159,7 +160,8 @@ module _ is-prop-is-pullback-Precategory : is-prop (is-pullback-Precategory C x y z f g w p₁ p₂ α) is-prop-is-pullback-Precategory = - is-prop-Π³ (λ w' p₁' p₂' → is-prop-function-type is-property-is-contr) + is-prop-iterated-Π 3 + ( λ w' p₁' p₂' → is-prop-function-type is-property-is-contr) is-pullback-prop-Precategory : Prop (l1 ⊔ l2) pr1 is-pullback-prop-Precategory = diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index f359b8bf77..152c37859c 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -48,7 +48,7 @@ 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)) + (P₁ : subhom-Precategory l4 (precategory-Category C) P₀) where contains-id-subtype-Category : UU (l1 ⊔ l3 ⊔ l4) @@ -88,7 +88,7 @@ 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)) + (P₁ : subhom-Precategory l4 (precategory-Category C) P₀) where is-subcategory-Prop : Prop (l1 ⊔ l2 ⊔ l3 ⊔ l4) @@ -125,31 +125,31 @@ module _ (P : Subcategory l3 l4 C) where - subtype-obj-Subcategory : subtype l3 (obj-Category C) - subtype-obj-Subcategory = pr1 P + subobj-Subcategory : subtype l3 (obj-Category C) + subobj-Subcategory = pr1 P obj-Subcategory : UU (l1 ⊔ l3) - obj-Subcategory = type-subtype subtype-obj-Subcategory + obj-Subcategory = type-subtype subobj-Subcategory inclusion-obj-Subcategory : obj-Subcategory → obj-Category C - inclusion-obj-Subcategory = inclusion-subtype subtype-obj-Subcategory + inclusion-obj-Subcategory = inclusion-subtype subobj-Subcategory is-in-obj-Subcategory : (x : obj-Category C) → UU l3 - is-in-obj-Subcategory = is-in-subtype subtype-obj-Subcategory + is-in-obj-Subcategory = is-in-subtype subobj-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-prop-is-in-obj-Subcategory = is-prop-is-in-subtype subobj-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 + is-in-subtype-inclusion-subtype subobj-Subcategory - subtype-hom-Subcategory : - (x y : obj-Category C) → subtype l4 (hom-Category C x y) - subtype-hom-Subcategory = pr1 (pr2 P) + subhom-Subcategory : + subhom-Precategory l4 (precategory-Category C) subobj-Subcategory + subhom-Subcategory = pr1 (pr2 P) hom-Subcategory : (x y : obj-Subcategory) → UU (l2 ⊔ l4) hom-Subcategory = hom-Subprecategory (precategory-Category C) P @@ -165,13 +165,13 @@ module _ 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-Subcategory x y = is-in-subtype (subhom-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-prop-is-in-subtype (subhom-Subcategory x y) is-in-hom-inclusion-hom-Subcategory : (x y : obj-Subcategory) (f : hom-Subcategory x y) → @@ -183,20 +183,20 @@ module _ is-in-hom-inclusion-hom-Subprecategory (precategory-Category C) P is-subcategory-Subcategory : - is-subcategory C subtype-obj-Subcategory subtype-hom-Subcategory + is-subcategory C subobj-Subcategory subhom-Subcategory is-subcategory-Subcategory = pr2 (pr2 P) contains-id-Subcategory : contains-id-subtype-Category C - ( subtype-obj-Subcategory) - ( subtype-hom-Subcategory) + ( subobj-Subcategory) + ( subhom-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) + ( subobj-Subcategory) + ( subhom-Subcategory) is-closed-under-composition-Subcategory = is-closed-under-composition-Subprecategory (precategory-Category C) P ``` @@ -272,6 +272,25 @@ module _ precategory-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-Subprecategory (precategory-Category C) P {x} {y} + + iso-Subcategory : + (x y : obj-Subcategory C P) → UU (l2 ⊔ l4) + iso-Subcategory = iso-Subprecategory (precategory-Category C) P +``` + ### The underlying category of a subcategory It remains to show that subprecategories of categories are categories. @@ -303,25 +322,6 @@ 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-Subprecategory (precategory-Category C) P {x} {y} - - iso-Subcategory : - (x y : obj-Subcategory C P) → UU (l2 ⊔ l4) - iso-Subcategory = iso-Subprecategory (precategory-Category C) P -``` - ## Properties ### The inclusion functor is faithful and an embedding on objects diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index c5a972b724..36a3c6a8fb 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -18,6 +18,7 @@ open import category-theory.precategories open import foundation.dependent-pair-types open import foundation.embeddings +open import foundation.iterated-dependent-product-types open import foundation.function-types open import foundation.identity-types open import foundation.propositions @@ -44,24 +45,37 @@ objects in `P₀` and is closed under composition. ## Definition +### Sub-hom-families + +```agda +subhom-Precategory : + {l1 l2 l3 : Level} (l4 : Level) + (C : Precategory l1 l2) + (P₀ : subtype l3 (obj-Precategory C)) → UU (l1 ⊔ l2 ⊔ l3 ⊔ lsuc l4) +subhom-Precategory l4 C P₀ = + (x y : obj-Precategory C) → is-in-subtype P₀ x → is-in-subtype P₀ y → + subtype l4 (hom-Precategory C x y) +``` + ```agda module _ {l1 l2 l3 l4 : Level} (C : Precategory l1 l2) (P₀ : subtype l3 (obj-Precategory C)) - (P₁ : (x y : obj-Precategory C) → subtype l4 (hom-Precategory C x y)) + (P₁ : subhom-Precategory l4 C P₀) where contains-id-subtype-Precategory : UU (l1 ⊔ l3 ⊔ l4) contains-id-subtype-Precategory = (x : obj-Precategory C) → - is-in-subtype P₀ x → is-in-subtype (P₁ x x) (id-hom-Precategory C) + (x₀ : is-in-subtype P₀ x) → + is-in-subtype (P₁ x x x₀ x₀) (id-hom-Precategory C) is-prop-contains-id-subtype-Precategory : is-prop contains-id-subtype-Precategory is-prop-contains-id-subtype-Precategory = - is-prop-Π² - ( λ x _ → is-prop-is-in-subtype (P₁ x x) (id-hom-Precategory C)) + is-prop-iterated-Π 2 + ( λ x x₀ → is-prop-is-in-subtype (P₁ x x x₀ x₀) (id-hom-Precategory C)) contains-id-prop-subtype-Precategory : Prop (l1 ⊔ l3 ⊔ l4) pr1 contains-id-prop-subtype-Precategory = @@ -74,19 +88,19 @@ module _ (x y z : obj-Precategory C) → (g : hom-Precategory C y z) → (f : hom-Precategory C x y) → - is-in-subtype P₀ x → - is-in-subtype P₀ y → - is-in-subtype P₀ z → - is-in-subtype (P₁ y z) g → - is-in-subtype (P₁ x y) f → - is-in-subtype (P₁ x z) (comp-hom-Precategory C g f) + (x₀ : is-in-subtype P₀ x) → + (y₀ : is-in-subtype P₀ y) → + (z₀ : is-in-subtype P₀ z) → + is-in-subtype (P₁ y z y₀ z₀) g → + is-in-subtype (P₁ x y x₀ y₀) f → + is-in-subtype (P₁ x z x₀ z₀) (comp-hom-Precategory C g f) is-prop-is-closed-under-composition-subtype-Precategory : is-prop is-closed-under-composition-subtype-Precategory is-prop-is-closed-under-composition-subtype-Precategory = - is-prop-Π¹⁰ - ( λ x y z g f _ _ _ _ _ → - is-prop-is-in-subtype (P₁ x z) (comp-hom-Precategory C g f)) + is-prop-iterated-Π 10 + ( λ x y z g f x₀ _ z₀ _ _ → + is-prop-is-in-subtype (P₁ x z x₀ z₀) (comp-hom-Precategory C g f)) is-closed-under-composition-prop-subtype-Precategory : Prop (l1 ⊔ l2 ⊔ l3 ⊔ l4) @@ -103,7 +117,7 @@ module _ {l1 l2 l3 l4 : Level} (C : Precategory l1 l2) (P₀ : subtype l3 (obj-Precategory C)) - (P₁ : (x y : obj-Precategory C) → subtype l4 (hom-Precategory C x y)) + (P₁ : subhom-Precategory l4 C P₀) where is-subprecategory-Prop : Prop (l1 ⊔ l2 ⊔ l3 ⊔ l4) @@ -137,7 +151,7 @@ Subprecategory : Subprecategory l3 l4 C = Σ ( subtype l3 (obj-Precategory C)) ( λ P₀ → - Σ ( (x y : obj-Precategory C) → subtype l4 (hom-Precategory C x y)) + Σ ( subhom-Precategory l4 C P₀) ( is-subprecategory C P₀)) module _ @@ -146,39 +160,48 @@ module _ (P : Subprecategory l3 l4 C) where - subtype-obj-Subprecategory : subtype l3 (obj-Precategory C) - subtype-obj-Subprecategory = pr1 P + subobj-Subprecategory : subtype l3 (obj-Precategory C) + subobj-Subprecategory = pr1 P obj-Subprecategory : UU (l1 ⊔ l3) - obj-Subprecategory = type-subtype subtype-obj-Subprecategory + obj-Subprecategory = type-subtype subobj-Subprecategory inclusion-obj-Subprecategory : obj-Subprecategory → obj-Precategory C - inclusion-obj-Subprecategory = inclusion-subtype subtype-obj-Subprecategory + inclusion-obj-Subprecategory = inclusion-subtype subobj-Subprecategory is-in-obj-Subprecategory : (x : obj-Precategory C) → UU l3 - is-in-obj-Subprecategory = is-in-subtype subtype-obj-Subprecategory + is-in-obj-Subprecategory = is-in-subtype subobj-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-prop-is-in-subtype subobj-Subprecategory is-in-obj-inclusion-obj-Subprecategory : (x : obj-Subprecategory) → is-in-obj-Subprecategory (inclusion-obj-Subprecategory x) is-in-obj-inclusion-obj-Subprecategory = - is-in-subtype-inclusion-subtype subtype-obj-Subprecategory + is-in-subtype-inclusion-subtype subobj-Subprecategory - subtype-hom-Subprecategory : - (x y : obj-Precategory C) → subtype l4 (hom-Precategory C x y) - subtype-hom-Subprecategory = pr1 (pr2 P) + subhom-Subprecategory : subhom-Precategory l4 C subobj-Subprecategory + subhom-Subprecategory = pr1 (pr2 P) - hom-Subprecategory : (x y : obj-Subprecategory) → UU (l2 ⊔ l4) - hom-Subprecategory x y = - type-subtype - ( subtype-hom-Subprecategory + subhom-subobj-Subprecategory : + (x y : obj-Subprecategory) → + subtype l4 + ( hom-Precategory C ( inclusion-obj-Subprecategory x) ( inclusion-obj-Subprecategory y)) + subhom-subobj-Subprecategory x y = + subhom-Subprecategory + ( inclusion-obj-Subprecategory x) + ( inclusion-obj-Subprecategory y) + ( is-in-obj-inclusion-obj-Subprecategory x) + ( is-in-obj-inclusion-obj-Subprecategory y) + + hom-Subprecategory : (x y : obj-Subprecategory) → UU (l2 ⊔ l4) + hom-Subprecategory x y = + type-subtype (subhom-subobj-Subprecategory x y) inclusion-hom-Subprecategory : (x y : obj-Subprecategory) → @@ -187,55 +210,74 @@ module _ ( inclusion-obj-Subprecategory x) ( inclusion-obj-Subprecategory y) inclusion-hom-Subprecategory x y = - inclusion-subtype - ( subtype-hom-Subprecategory + inclusion-subtype (subhom-subobj-Subprecategory x y) + + is-in-hom-subobj-Subprecategory : + ( x y : obj-Subprecategory) + ( f : + hom-Precategory C ( inclusion-obj-Subprecategory x) - ( inclusion-obj-Subprecategory y)) + ( inclusion-obj-Subprecategory y)) → + UU l4 + is-in-hom-subobj-Subprecategory x y = + is-in-subtype (subhom-subobj-Subprecategory x y) is-in-hom-Subprecategory : - (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) + (x y : obj-Precategory C) (f : hom-Precategory C x y) → UU (l3 ⊔ l4) + is-in-hom-Subprecategory x y f = + Σ ( is-in-obj-Subprecategory x) + ( λ x₀ → + Σ ( is-in-obj-Subprecategory y) + ( λ y₀ → is-in-subtype (subhom-Subprecategory x y x₀ y₀) f)) + 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-prop-is-in-hom-Subprecategory x y f = + is-prop-Σ + ( is-prop-is-in-obj-Subprecategory x) + ( λ x₀ → + is-prop-Σ + ( is-prop-is-in-obj-Subprecategory y) + ( λ y₀ → + is-prop-is-in-subtype (subhom-Subprecategory x y x₀ y₀) f)) is-in-hom-inclusion-hom-Subprecategory : - (x y : obj-Subprecategory) (f : hom-Subprecategory x y) → + (x y : obj-Subprecategory) + (f : hom-Subprecategory x y) → is-in-hom-Subprecategory ( inclusion-obj-Subprecategory x) ( inclusion-obj-Subprecategory y) ( inclusion-hom-Subprecategory x y f) - is-in-hom-inclusion-hom-Subprecategory x y = - is-in-subtype-inclusion-subtype - ( subtype-hom-Subprecategory - ( inclusion-obj-Subprecategory x) - ( inclusion-obj-Subprecategory y)) + pr1 (is-in-hom-inclusion-hom-Subprecategory x y f) = + is-in-obj-inclusion-obj-Subprecategory x + pr1 (pr2 (is-in-hom-inclusion-hom-Subprecategory x y f)) = + is-in-obj-inclusion-obj-Subprecategory y + pr2 (pr2 (is-in-hom-inclusion-hom-Subprecategory x y f)) = pr2 f is-subprecategory-Subprecategory : - is-subprecategory C subtype-obj-Subprecategory subtype-hom-Subprecategory + is-subprecategory C subobj-Subprecategory subhom-Subprecategory is-subprecategory-Subprecategory = pr2 (pr2 P) contains-id-Subprecategory : contains-id-subtype-Precategory C - ( subtype-obj-Subprecategory) - ( subtype-hom-Subprecategory) + ( subobj-Subprecategory) + ( subhom-Subprecategory) contains-id-Subprecategory = contains-id-is-subprecategory C - ( subtype-obj-Subprecategory) - ( subtype-hom-Subprecategory) + ( subobj-Subprecategory) + ( subhom-Subprecategory) ( is-subprecategory-Subprecategory) is-closed-under-composition-Subprecategory : is-closed-under-composition-subtype-Precategory C - ( subtype-obj-Subprecategory) - ( subtype-hom-Subprecategory) + ( subobj-Subprecategory) + ( subhom-Subprecategory) is-closed-under-composition-Subprecategory = is-closed-under-composition-is-subprecategory C - ( subtype-obj-Subprecategory) - ( subtype-hom-Subprecategory) + ( subobj-Subprecategory) + ( subhom-Subprecategory) ( is-subprecategory-Subprecategory) ``` @@ -254,9 +296,7 @@ module _ ( hom-set-Precategory C ( inclusion-obj-Subprecategory C P x) ( inclusion-obj-Subprecategory C P y)) - ( subtype-hom-Subprecategory C P - ( inclusion-obj-Subprecategory C P x) - ( inclusion-obj-Subprecategory C P y)) + ( subhom-subobj-Subprecategory C P x y) is-set-hom-Subprecategory : (x y : obj-Subprecategory C P) → is-set (hom-Subprecategory C P x y) @@ -289,8 +329,8 @@ module _ ( is-in-obj-inclusion-obj-Subprecategory C P x) ( is-in-obj-inclusion-obj-Subprecategory C P y) ( is-in-obj-inclusion-obj-Subprecategory C P z) - ( is-in-hom-inclusion-hom-Subprecategory C P y z g) - ( is-in-hom-inclusion-hom-Subprecategory C P x y f) + ( pr2 g) + ( pr2 f) associative-comp-hom-Subprecategory : {x y z w : obj-Subprecategory C P} @@ -303,9 +343,11 @@ module _ ( comp-hom-Subprecategory {x} {y} {z} g f)) associative-comp-hom-Subprecategory {x} {y} {z} {w} h g f = eq-type-subtype - ( subtype-hom-Subprecategory C P + ( subhom-Subprecategory C P ( inclusion-obj-Subprecategory C P x) - ( inclusion-obj-Subprecategory C P w)) + ( inclusion-obj-Subprecategory C P w) + ( is-in-obj-inclusion-obj-Subprecategory C P x) + ( is-in-obj-inclusion-obj-Subprecategory C P w)) ( associative-comp-hom-Precategory C ( inclusion-hom-Subprecategory C P z w h) ( inclusion-hom-Subprecategory C P y z g) @@ -317,9 +359,11 @@ module _ comp-hom-Subprecategory {x} {y} {y} (id-hom-Subprecategory {y}) f = f left-unit-law-comp-hom-Subprecategory {x} {y} f = eq-type-subtype - ( subtype-hom-Subprecategory C P + ( subhom-Subprecategory C P ( inclusion-obj-Subprecategory C P x) - ( inclusion-obj-Subprecategory C P y)) + ( inclusion-obj-Subprecategory C P y) + ( is-in-obj-inclusion-obj-Subprecategory C P x) + ( is-in-obj-inclusion-obj-Subprecategory C P y)) ( left-unit-law-comp-hom-Precategory C ( inclusion-hom-Subprecategory C P x y f)) @@ -329,9 +373,11 @@ module _ comp-hom-Subprecategory {x} {x} {y} f (id-hom-Subprecategory {x}) = f right-unit-law-comp-hom-Subprecategory {x} {y} f = eq-type-subtype - ( subtype-hom-Subprecategory C P + ( subhom-Subprecategory C P ( inclusion-obj-Subprecategory C P x) - ( inclusion-obj-Subprecategory C P y)) + ( inclusion-obj-Subprecategory C P y) + ( is-in-obj-inclusion-obj-Subprecategory C P x) + ( is-in-obj-inclusion-obj-Subprecategory C P y)) ( right-unit-law-comp-hom-Precategory C ( inclusion-hom-Subprecategory C P x y f)) @@ -362,6 +408,25 @@ module _ is-unital-composition-operation-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) +``` + ### The inclusion functor of a subprecategory ```agda @@ -396,25 +461,6 @@ 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 on objects and hom-sets @@ -433,9 +479,11 @@ module _ ( inclusion-Subprecategory C P) is-faithful-inclusion-Subprecategory x y = is-emb-inclusion-subtype - ( subtype-hom-Subprecategory C P + ( subhom-Subprecategory C P ( inclusion-obj-Subprecategory C P x) - ( inclusion-obj-Subprecategory C P y)) + ( inclusion-obj-Subprecategory C P y) + ( is-in-obj-inclusion-obj-Subprecategory C P x) + ( is-in-obj-inclusion-obj-Subprecategory C P y)) is-emb-obj-inclusion-Subprecategory : is-emb @@ -444,7 +492,7 @@ module _ ( C) ( inclusion-Subprecategory C P)) is-emb-obj-inclusion-Subprecategory = - is-emb-inclusion-subtype (subtype-obj-Subprecategory C P) + is-emb-inclusion-subtype (subobj-Subprecategory C P) ``` ### Subprecategories of categories are categories @@ -460,33 +508,33 @@ module _ (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)) - ( 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) + -- 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)) + -- ( 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. diff --git a/src/foundation-core/propositions.lagda.md b/src/foundation-core/propositions.lagda.md index 1b394e0c5a..a7f898320f 100644 --- a/src/foundation-core/propositions.lagda.md +++ b/src/foundation-core/propositions.lagda.md @@ -270,229 +270,6 @@ pr1 (Π-Prop' A P) = type-Π-Prop' A P pr2 (Π-Prop' A P) = is-prop-Π' (λ x → is-prop-type-Prop (P x)) ``` -For convenience, we also record repeated applications of the above. - -#### Higher order products of families of propositions are propositions - -```agda -is-prop-Π² : - {l1 l2 l3 : Level} - {A1 : UU l1} {A2 : A1 → UU l2} {A3 : (x1 : A1) (x2 : A2 x1) → UU l3} → - ((x1 : A1) (x2 : A2 x1) → is-prop (A3 x1 x2)) → - is-prop ((x1 : A1) (x2 : A2 x1) → A3 x1 x2) -is-prop-Π² H = is-prop-Π (is-prop-Π ∘ H) - -is-prop-Π³ : - {l1 l2 l3 l4 : Level} - {A1 : UU l1} - {A2 : A1 → UU l2} - {A3 : (x1 : A1) (x2 : A2 x1) → UU l3} - {A4 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) → UU l4} → - ((x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) → is-prop (A4 x1 x2 x3)) → - is-prop ((x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) → A4 x1 x2 x3) -is-prop-Π³ H = is-prop-Π (is-prop-Π² ∘ H) - -is-prop-Π⁴ : - {l1 l2 l3 l4 l5 : Level} - {A1 : UU l1} - {A2 : A1 → UU l2} - {A3 : (x1 : A1) (x2 : A2 x1) → UU l3} - {A4 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) → UU l4} - {A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} → - ( (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → - is-prop (A5 x1 x2 x3 x4)) → - is-prop - ( (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → - A5 x1 x2 x3 x4) -is-prop-Π⁴ H = is-prop-Π (is-prop-Π³ ∘ H) - -is-prop-Π⁵ : - {l1 l2 l3 l4 l5 l6 : Level} - {A1 : UU l1} - {A2 : A1 → UU l2} - {A3 : (x1 : A1) (x2 : A2 x1) → UU l3} - {A4 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) → UU l4} - {A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} → - {A6 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) → - UU l6} → - ( (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) → - is-prop (A6 x1 x2 x3 x4 x5)) → - is-prop - ( (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) → - A6 x1 x2 x3 x4 x5) -is-prop-Π⁵ H = is-prop-Π (is-prop-Π⁴ ∘ H) - -is-prop-Π⁶ : - {l1 l2 l3 l4 l5 l6 l7 : Level} - {A1 : UU l1} - {A2 : A1 → UU l2} - {A3 : (x1 : A1) (x2 : A2 x1) → UU l3} - {A4 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) → UU l4} - {A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} → - {A6 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) → UU l6} → - {A7 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l7} → - ( (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → - is-prop (A7 x1 x2 x3 x4 x5 x6)) → - is-prop - ( (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → - A7 x1 x2 x3 x4 x5 x6) -is-prop-Π⁶ H = is-prop-Π (is-prop-Π⁵ ∘ H) - -is-prop-Π⁷ : - {l1 l2 l3 l4 l5 l6 l7 l8 : Level} - {A1 : UU l1} - {A2 : A1 → UU l2} - {A3 : (x1 : A1) (x2 : A2 x1) → UU l3} - {A4 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) → UU l4} - {A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} → - {A6 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) → UU l6} → - {A7 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l7} → - {A8 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) → UU l8} → - ( (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) → - is-prop (A8 x1 x2 x3 x4 x5 x6 x7)) → - is-prop - ( (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) → - A8 x1 x2 x3 x4 x5 x6 x7) -is-prop-Π⁷ H = is-prop-Π (is-prop-Π⁶ ∘ H) - -is-prop-Π⁸ : - {l1 l2 l3 l4 l5 l6 l7 l8 l9 : Level} - {A1 : UU l1} - {A2 : A1 → UU l2} - {A3 : (x1 : A1) (x2 : A2 x1) → UU l3} - {A4 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) → UU l4} - {A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} - {A6 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) → UU l6} → - {A7 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l7} - {A8 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) → UU l8} - {A9 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) → UU l9} → - ( (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) → - is-prop (A9 x1 x2 x3 x4 x5 x6 x7 x8)) → - is-prop - ( (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) → - A9 x1 x2 x3 x4 x5 x6 x7 x8) -is-prop-Π⁸ H = is-prop-Π (is-prop-Π⁷ ∘ H) - -is-prop-Π⁹ : - {l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 : Level} - {A1 : UU l1} - {A2 : A1 → UU l2} - {A3 : (x1 : A1) (x2 : A2 x1) → UU l3} - {A4 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) → UU l4} - {A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} - {A6 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) → UU l6} → - {A7 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l7} - {A8 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) → UU l8} - {A9 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) → UU l9} → - {A10 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) - (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) → UU l10} → - ( (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) - (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) → - is-prop (A10 x1 x2 x3 x4 x5 x6 x7 x8 x9)) → - is-prop - ( (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) - (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) → - A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) -is-prop-Π⁹ H = is-prop-Π (is-prop-Π⁸ ∘ H) - -is-prop-Π¹⁰ : - {l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 l11 : Level} - {A1 : UU l1} - {A2 : A1 → UU l2} - {A3 : (x1 : A1) (x2 : A2 x1) → UU l3} - {A4 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) → UU l4} - {A5 : (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) → UU l5} - {A6 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) → UU l6} → - {A7 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) → UU l7} - {A8 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) → UU l8} - {A9 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) → UU l9} → - {A10 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) - (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) → UU l10} - {A11 : - (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) - (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) → - UU l11} → - ( (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) - (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) → - is-prop (A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10)) → - is-prop - ( (x1 : A1) (x2 : A2 x1) (x3 : A3 x1 x2) (x4 : A4 x1 x2 x3) - (x5 : A5 x1 x2 x3 x4) (x6 : A6 x1 x2 x3 x4 x5) - (x7 : A7 x1 x2 x3 x4 x5 x6) (x8 : A8 x1 x2 x3 x4 x5 x6 x7) - (x9 : A9 x1 x2 x3 x4 x5 x6 x7 x8) (x10 : A10 x1 x2 x3 x4 x5 x6 x7 x8 x9) → - A11 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) -is-prop-Π¹⁰ H = is-prop-Π (is-prop-Π⁹ ∘ H) -``` - ### The type of functions into a proposition is a proposition ```agda diff --git a/src/foundation/binary-relations.lagda.md b/src/foundation/binary-relations.lagda.md index a8d57fb25c..ce4fcc5fc4 100644 --- a/src/foundation/binary-relations.lagda.md +++ b/src/foundation/binary-relations.lagda.md @@ -111,7 +111,7 @@ module _ is-prop-is-transitive-Relation-Prop : is-prop is-transitive-Relation-Prop is-prop-is-transitive-Relation-Prop = - is-prop-Π³ + is-prop-iterated-Π 3 ( λ x y z → is-prop-function-type ( is-prop-function-type (is-prop-type-Relation-Prop R x z))) From ef6336e55746228a0627a51e09cb560786311204 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Tue, 24 Oct 2023 20:45:23 +0200 Subject: [PATCH 19/49] opposite preunivalent categories --- .../coproducts-in-precategories.lagda.md | 2 +- .../faithful-maps-precategories.lagda.md | 2 +- src/category-theory/gaunt-categories.lagda.md | 8 +- .../opposite-precategories.lagda.md | 109 ++++++++++------ .../opposite-preunivalent-categories.lagda.md | 122 ++++++++++++++++++ .../products-in-precategories.lagda.md | 2 +- .../pullbacks-in-precategories.lagda.md | 2 +- src/category-theory/subprecategories.lagda.md | 3 +- .../commuting-cubes-of-maps.lagda.md | 2 +- src/foundation/identity-types.lagda.md | 8 +- src/group-theory/automorphism-groups.lagda.md | 3 +- src/group-theory/concrete-monoids.lagda.md | 2 +- src/group-theory/torsors.lagda.md | 5 +- 13 files changed, 214 insertions(+), 56 deletions(-) create mode 100644 src/category-theory/opposite-preunivalent-categories.lagda.md diff --git a/src/category-theory/coproducts-in-precategories.lagda.md b/src/category-theory/coproducts-in-precategories.lagda.md index 8a3667a076..ce33878ae2 100644 --- a/src/category-theory/coproducts-in-precategories.lagda.md +++ b/src/category-theory/coproducts-in-precategories.lagda.md @@ -13,8 +13,8 @@ open import foundation.action-on-identifications-functions open import foundation.cartesian-product-types open import foundation.contractible-types open import foundation.dependent-pair-types -open import foundation.iterated-dependent-product-types open import foundation.identity-types +open import foundation.iterated-dependent-product-types open import foundation.propositions open import foundation.unique-existence 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 9b35d67dc4..2fcbc71d8c 100644 --- a/src/category-theory/faithful-maps-precategories.lagda.md +++ b/src/category-theory/faithful-maps-precategories.lagda.md @@ -14,8 +14,8 @@ open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.equivalences open import foundation.function-types -open import foundation.iterated-dependent-product-types open import foundation.injective-maps +open import foundation.iterated-dependent-product-types open import foundation.propositions open import foundation.universe-levels ``` diff --git a/src/category-theory/gaunt-categories.lagda.md b/src/category-theory/gaunt-categories.lagda.md index 274f578f5e..1698b5d562 100644 --- a/src/category-theory/gaunt-categories.lagda.md +++ b/src/category-theory/gaunt-categories.lagda.md @@ -7,23 +7,23 @@ module category-theory.gaunt-categories where
Imports ```agda +open import category-theory.categories open import category-theory.composition-operations-on-binary-families-of-sets open import category-theory.isomorphisms-in-categories open import category-theory.isomorphisms-in-precategories -open import category-theory.categories +open import category-theory.nonunital-precategories +open import category-theory.precategories open import category-theory.preunivalent-categories open import category-theory.strict-categories -open import category-theory.precategories -open import category-theory.nonunital-precategories open import foundation.1-types open import foundation.cartesian-product-types open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.identity-types -open import foundation.surjective-maps open import foundation.propositions open import foundation.sets +open import foundation.surjective-maps open import foundation.universe-levels ``` diff --git a/src/category-theory/opposite-precategories.lagda.md b/src/category-theory/opposite-precategories.lagda.md index a068c80db8..2935799d90 100644 --- a/src/category-theory/opposite-precategories.lagda.md +++ b/src/category-theory/opposite-precategories.lagda.md @@ -11,8 +11,10 @@ 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 +open import category-theory.preunivalent-categories open import foundation.dependent-pair-types +open import foundation.embeddings open import foundation.equality-dependent-pair-types open import foundation.equivalences open import foundation.function-extensionality @@ -91,7 +93,7 @@ module _ pr1 (pr1 (pr2 (pr2 opposite-Precategory))) = comp-hom-opposite-Precategory pr2 (pr1 (pr2 (pr2 opposite-Precategory))) = associative-comp-hom-opposite-Precategory - pr1 (pr2 (pr2 (pr2 opposite-Precategory))) x = id-hom-opposite-Precategory + pr1 (pr2 (pr2 (pr2 opposite-Precategory))) x = id-hom-opposite-Precategory {x} pr1 (pr2 (pr2 (pr2 (pr2 opposite-Precategory)))) = left-unit-law-comp-hom-opposite-Precategory pr2 (pr2 (pr2 (pr2 (pr2 opposite-Precategory)))) = @@ -139,49 +141,46 @@ equiv-opposite-Precategory l1 l2 = ```agda module _ - {l1 l2 : Level} (C : Precategory l1 l2) + {l1 l2 : Level} (C : Precategory l1 l2) {x y : obj-Precategory C} where - map-compute-iso-inv-opposite-Precategory : - {x y : obj-Precategory C} → - iso-Precategory C x y → iso-Precategory (opposite-Precategory C) x y - pr1 (map-compute-iso-inv-opposite-Precategory f) = hom-inv-iso-Precategory C f - pr1 (pr2 (map-compute-iso-inv-opposite-Precategory f)) = + map-compute-iso-opposite-Precategory : + iso-Precategory C x y → iso-Precategory (opposite-Precategory C) y x + pr1 (map-compute-iso-opposite-Precategory f) = hom-iso-Precategory C f - pr1 (pr2 (pr2 (map-compute-iso-inv-opposite-Precategory f))) = - is-section-hom-inv-iso-Precategory C f - pr2 (pr2 (pr2 (map-compute-iso-inv-opposite-Precategory f))) = + pr1 (pr2 (map-compute-iso-opposite-Precategory f)) = + hom-inv-iso-Precategory C f + pr1 (pr2 (pr2 (map-compute-iso-opposite-Precategory f))) = is-retraction-hom-inv-iso-Precategory C f + pr2 (pr2 (pr2 (map-compute-iso-opposite-Precategory f))) = + is-section-hom-inv-iso-Precategory C f - map-inv-compute-iso-inv-opposite-Precategory : - {x y : obj-Precategory C} → - iso-Precategory (opposite-Precategory C) x y → iso-Precategory C x y - pr1 (map-inv-compute-iso-inv-opposite-Precategory f) = - hom-inv-iso-Precategory (opposite-Precategory C) f - pr1 (pr2 (map-inv-compute-iso-inv-opposite-Precategory f)) = + map-inv-compute-iso-opposite-Precategory : + iso-Precategory (opposite-Precategory C) y x → iso-Precategory C x y + pr1 (map-inv-compute-iso-opposite-Precategory f) = hom-iso-Precategory (opposite-Precategory C) f - pr1 (pr2 (pr2 (map-inv-compute-iso-inv-opposite-Precategory f))) = - is-section-hom-inv-iso-Precategory (opposite-Precategory C) f - pr2 (pr2 (pr2 (map-inv-compute-iso-inv-opposite-Precategory f))) = + pr1 (pr2 (map-inv-compute-iso-opposite-Precategory f)) = + hom-inv-iso-Precategory (opposite-Precategory C) f + pr1 (pr2 (pr2 (map-inv-compute-iso-opposite-Precategory f))) = is-retraction-hom-inv-iso-Precategory (opposite-Precategory C) f + pr2 (pr2 (pr2 (map-inv-compute-iso-opposite-Precategory f))) = + is-section-hom-inv-iso-Precategory (opposite-Precategory C) f - is-equiv-map-compute-iso-inv-opposite-Precategory : - {x y : obj-Precategory C} → - is-equiv (map-compute-iso-inv-opposite-Precategory {x} {y}) - pr1 (pr1 is-equiv-map-compute-iso-inv-opposite-Precategory) = - map-inv-compute-iso-inv-opposite-Precategory - pr2 (pr1 is-equiv-map-compute-iso-inv-opposite-Precategory) = refl-htpy - pr1 (pr2 is-equiv-map-compute-iso-inv-opposite-Precategory) = - map-inv-compute-iso-inv-opposite-Precategory - pr2 (pr2 is-equiv-map-compute-iso-inv-opposite-Precategory) = refl-htpy - - compute-iso-inv-opposite-Precategory : - {x y : obj-Precategory C} → - iso-Precategory C x y ≃ iso-Precategory (opposite-Precategory C) x y - pr1 compute-iso-inv-opposite-Precategory = - map-compute-iso-inv-opposite-Precategory - pr2 compute-iso-inv-opposite-Precategory = - is-equiv-map-compute-iso-inv-opposite-Precategory + is-equiv-map-compute-iso-opposite-Precategory : + is-equiv (map-compute-iso-opposite-Precategory) + pr1 (pr1 is-equiv-map-compute-iso-opposite-Precategory) = + map-inv-compute-iso-opposite-Precategory + pr2 (pr1 is-equiv-map-compute-iso-opposite-Precategory) = refl-htpy + pr1 (pr2 is-equiv-map-compute-iso-opposite-Precategory) = + map-inv-compute-iso-opposite-Precategory + pr2 (pr2 is-equiv-map-compute-iso-opposite-Precategory) = refl-htpy + + compute-iso-opposite-Precategory : + iso-Precategory C x y ≃ iso-Precategory (opposite-Precategory C) y x + pr1 compute-iso-opposite-Precategory = + map-compute-iso-opposite-Precategory + pr2 compute-iso-opposite-Precategory = + is-equiv-map-compute-iso-opposite-Precategory ``` ### The underlying precategory is a category if and only if the opposite is a category @@ -194,7 +193,9 @@ abstract is-category-Precategory (opposite-Precategory C) is-category-opposite-is-category-Precategory C is-category-C x y = is-equiv-htpy-equiv - ( compute-iso-inv-opposite-Precategory C ∘e (_ , is-category-C x y)) + ( compute-iso-opposite-Precategory C ∘e + equiv-inv-iso-Precategory C ∘e + (_ , is-category-C x y)) ( λ where refl → eq-type-subtype @@ -214,3 +215,37 @@ abstract ( opposite-Precategory C) ( is-category-op-C)) ``` + +### The underlying precategory is preunivalent if and only if the opposite is preunivalent + +```agda +abstract + is-preunivalent-opposite-is-preunivalent-Precategory : + {l1 l2 : Level} (C : Precategory l1 l2) → + is-preunivalent-Precategory C → + is-preunivalent-Precategory (opposite-Precategory C) + is-preunivalent-opposite-is-preunivalent-Precategory C is-preunivalent-C x y = + is-emb-htpy-emb + ( comp-emb + ( emb-equiv + ( compute-iso-opposite-Precategory C ∘e equiv-inv-iso-Precategory C)) + ( _ , is-preunivalent-C x y)) + ( λ where + refl → + eq-type-subtype + ( is-iso-prop-Precategory (opposite-Precategory C)) + ( refl)) + +abstract + is-preunivalent-is-preunivalent-opposite-Precategory : + {l1 l2 : Level} (C : Precategory l1 l2) → + is-preunivalent-Precategory (opposite-Precategory C) → + is-preunivalent-Precategory C + is-preunivalent-is-preunivalent-opposite-Precategory C is-preunivalent-op-C = + tr + ( is-preunivalent-Precategory) + ( is-involution-opposite-Precategory C) + ( is-preunivalent-opposite-is-preunivalent-Precategory + ( opposite-Precategory C) + ( is-preunivalent-op-C)) +``` diff --git a/src/category-theory/opposite-preunivalent-categories.lagda.md b/src/category-theory/opposite-preunivalent-categories.lagda.md new file mode 100644 index 0000000000..a3bfa1540d --- /dev/null +++ b/src/category-theory/opposite-preunivalent-categories.lagda.md @@ -0,0 +1,122 @@ +# Opposite preunivalent categories + +```agda +module category-theory.opposite-preunivalent-categories where +``` + +
Imports + +```agda +open import category-theory.categories +open import category-theory.preunivalent-categories +open import category-theory.opposite-precategories +open import category-theory.precategories + +open import foundation.dependent-pair-types +open import foundation.equivalences +open import foundation.identity-types +open import foundation.involutions +open import foundation.sets +open import foundation.subtypes +open import foundation.universe-levels +``` + +
+ +## Idea + +Let `C` be a +[preunivalent category](category-theory.preunivalent-categories.md), its +**opposite preunivalent category** `Cᵒᵖ` is given by reversing every morphism. + +## Definition + +```agda +module _ + {l1 l2 : Level} (C : Preunivalent-Category l1 l2) + where + + obj-opposite-Preunivalent-Category : UU l1 + obj-opposite-Preunivalent-Category = obj-opposite-Precategory (precategory-Preunivalent-Category C) + + hom-set-opposite-Preunivalent-Category : (x y : obj-opposite-Preunivalent-Category) → Set l2 + hom-set-opposite-Preunivalent-Category = + hom-set-opposite-Precategory (precategory-Preunivalent-Category C) + + hom-opposite-Preunivalent-Category : (x y : obj-opposite-Preunivalent-Category) → UU l2 + hom-opposite-Preunivalent-Category = hom-opposite-Precategory (precategory-Preunivalent-Category C) + + comp-hom-opposite-Preunivalent-Category : + {x y z : obj-opposite-Preunivalent-Category} → + hom-opposite-Preunivalent-Category y z → + hom-opposite-Preunivalent-Category x y → + hom-opposite-Preunivalent-Category x z + comp-hom-opposite-Preunivalent-Category = + comp-hom-opposite-Precategory (precategory-Preunivalent-Category C) + + associative-comp-hom-opposite-Preunivalent-Category : + {x y z w : obj-opposite-Preunivalent-Category} + (h : hom-opposite-Preunivalent-Category z w) + (g : hom-opposite-Preunivalent-Category y z) + (f : hom-opposite-Preunivalent-Category x y) → + ( comp-hom-opposite-Preunivalent-Category (comp-hom-opposite-Preunivalent-Category h g) f) = + ( comp-hom-opposite-Preunivalent-Category h (comp-hom-opposite-Preunivalent-Category g f)) + associative-comp-hom-opposite-Preunivalent-Category = + associative-comp-hom-opposite-Precategory (precategory-Preunivalent-Category C) + + id-hom-opposite-Preunivalent-Category : + {x : obj-opposite-Preunivalent-Category} → hom-opposite-Preunivalent-Category x x + id-hom-opposite-Preunivalent-Category = + id-hom-opposite-Precategory (precategory-Preunivalent-Category C) + + left-unit-law-comp-hom-opposite-Preunivalent-Category : + {x y : obj-opposite-Preunivalent-Category} + (f : hom-opposite-Preunivalent-Category x y) → + comp-hom-opposite-Preunivalent-Category id-hom-opposite-Preunivalent-Category f = f + left-unit-law-comp-hom-opposite-Preunivalent-Category = + left-unit-law-comp-hom-opposite-Precategory (precategory-Preunivalent-Category C) + + right-unit-law-comp-hom-opposite-Preunivalent-Category : + {x y : obj-opposite-Preunivalent-Category} (f : hom-opposite-Preunivalent-Category x y) → + comp-hom-opposite-Preunivalent-Category f id-hom-opposite-Preunivalent-Category = f + right-unit-law-comp-hom-opposite-Preunivalent-Category = + right-unit-law-comp-hom-opposite-Precategory (precategory-Preunivalent-Category C) + + precategory-opposite-Preunivalent-Category : Precategory l1 l2 + precategory-opposite-Preunivalent-Category = opposite-Precategory (precategory-Preunivalent-Category C) + + opposite-Preunivalent-Category : Preunivalent-Category l1 l2 + pr1 opposite-Preunivalent-Category = precategory-opposite-Preunivalent-Category + pr2 opposite-Preunivalent-Category = + is-preunivalent-opposite-is-preunivalent-Precategory + ( precategory-Preunivalent-Category C) + ( is-preunivalent-Preunivalent-Category C) +``` + +## Properties + +### The opposite preunivalent category construction is an involution on the type of preunivalent categories + +```agda +is-involution-opposite-Preunivalent-Category : + {l1 l2 : Level} → is-involution (opposite-Preunivalent-Category {l1} {l2}) +is-involution-opposite-Preunivalent-Category C = + eq-type-subtype + ( is-preunivalent-prop-Precategory) + ( is-involution-opposite-Precategory (precategory-Preunivalent-Category C)) + +involution-opposite-Preunivalent-Category : + (l1 l2 : Level) → involution (Preunivalent-Category l1 l2) +pr1 (involution-opposite-Preunivalent-Category l1 l2) = opposite-Preunivalent-Category +pr2 (involution-opposite-Preunivalent-Category l1 l2) = is-involution-opposite-Preunivalent-Category + +is-equiv-opposite-Preunivalent-Category : + {l1 l2 : Level} → is-equiv (opposite-Preunivalent-Category {l1} {l2}) +is-equiv-opposite-Preunivalent-Category = + is-equiv-is-involution is-involution-opposite-Preunivalent-Category + +equiv-opposite-Preunivalent-Category : + (l1 l2 : Level) → Preunivalent-Category l1 l2 ≃ Preunivalent-Category l1 l2 +equiv-opposite-Preunivalent-Category l1 l2 = + equiv-involution (involution-opposite-Preunivalent-Category l1 l2) +``` diff --git a/src/category-theory/products-in-precategories.lagda.md b/src/category-theory/products-in-precategories.lagda.md index b614da96d4..130b939a5a 100644 --- a/src/category-theory/products-in-precategories.lagda.md +++ b/src/category-theory/products-in-precategories.lagda.md @@ -12,9 +12,9 @@ open import category-theory.precategories open import foundation.action-on-identifications-functions open import foundation.cartesian-product-types open import foundation.contractible-types -open import foundation.iterated-dependent-product-types open import foundation.dependent-pair-types open import foundation.identity-types +open import foundation.iterated-dependent-product-types open import foundation.propositions open import foundation.unique-existence open import foundation.universe-levels diff --git a/src/category-theory/pullbacks-in-precategories.lagda.md b/src/category-theory/pullbacks-in-precategories.lagda.md index 8c8c7dbdd7..77bff5be49 100644 --- a/src/category-theory/pullbacks-in-precategories.lagda.md +++ b/src/category-theory/pullbacks-in-precategories.lagda.md @@ -13,8 +13,8 @@ open import foundation.action-on-identifications-functions open import foundation.cartesian-product-types open import foundation.contractible-types open import foundation.dependent-pair-types -open import foundation.iterated-dependent-product-types open import foundation.identity-types +open import foundation.iterated-dependent-product-types open import foundation.propositions open import foundation.unique-existence open import foundation.universe-levels diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index 36a3c6a8fb..6e4c84d6b4 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -18,9 +18,9 @@ open import category-theory.precategories open import foundation.dependent-pair-types open import foundation.embeddings -open import foundation.iterated-dependent-product-types open import foundation.function-types open import foundation.identity-types +open import foundation.iterated-dependent-product-types open import foundation.propositions open import foundation.sets open import foundation.subsingleton-induction @@ -230,7 +230,6 @@ module _ Σ ( is-in-obj-Subprecategory y) ( λ y₀ → is-in-subtype (subhom-Subprecategory x y x₀ y₀) f)) - 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) diff --git a/src/foundation/commuting-cubes-of-maps.lagda.md b/src/foundation/commuting-cubes-of-maps.lagda.md index 8f3fc76293..909c12b017 100644 --- a/src/foundation/commuting-cubes-of-maps.lagda.md +++ b/src/foundation/commuting-cubes-of-maps.lagda.md @@ -35,7 +35,7 @@ that the cube is presented as a lattice / | \ B' A C' |\ / \ /| - | \ ‌/ | + | \ / | |/ \ / \| B D' C' \ | / diff --git a/src/foundation/identity-types.lagda.md b/src/foundation/identity-types.lagda.md index 2d48de1898..bad4208824 100644 --- a/src/foundation/identity-types.lagda.md +++ b/src/foundation/identity-types.lagda.md @@ -44,17 +44,17 @@ identifications in arbitrary types. ### The Mac Lane pentagon for identity types ```agda -Mac-Lane-pentagon : +mac-lane-pentagon : {l : Level} {A : UU l} {a b c d e : A} (p : a = b) (q : b = c) (r : c = d) (s : d = e) → - let α₁ = (ap (λ t → t ∙ s) (assoc p q r)) + let α₁ = (ap (_∙ s) (assoc p q r)) α₂ = (assoc p (q ∙ r) s) - α₃ = (ap (λ t → p ∙ t) (assoc q r s)) + α₃ = (ap (p ∙_) (assoc q r s)) α₄ = (assoc (p ∙ q) r s) α₅ = (assoc p q (r ∙ s)) in ((α₁ ∙ α₂) ∙ α₃) = (α₄ ∙ α₅) -Mac-Lane-pentagon refl refl refl refl = refl +mac-lane-pentagon refl refl refl refl = refl ``` ### The groupoidal operations on identity types are equivalences diff --git a/src/group-theory/automorphism-groups.lagda.md b/src/group-theory/automorphism-groups.lagda.md index 6c7cc48feb..66a609eded 100644 --- a/src/group-theory/automorphism-groups.lagda.md +++ b/src/group-theory/automorphism-groups.lagda.md @@ -33,7 +33,8 @@ open import structured-types.pointed-types ## Idea -The automorphim group of `a : A` is the group of symmetries of `a` in `A`. +The **automorphim group** of `a : A` is the [group](group-theory.groups.md) of +symmetries of `a` in `A`. ## Definitions diff --git a/src/group-theory/concrete-monoids.lagda.md b/src/group-theory/concrete-monoids.lagda.md index e8c280734b..702c2b25d3 100644 --- a/src/group-theory/concrete-monoids.lagda.md +++ b/src/group-theory/concrete-monoids.lagda.md @@ -58,7 +58,7 @@ Given a monoid, we can define its associated concrete monoid. The type of objects is the [classifying type](group-theory.concrete-groups.md) of the [core](group-theory.cores-monoids.md) of the monoid. Moreover, we must take care in how we define the family of homomorphisms. They cannot simply be the constant -family, as [transporting](foundation.transport-along-identifications.md) along +family, as [transporting along](foundation.transport-along-identifications.md) an [invertible element](group-theory.invertible-elements-monoids.md) should correspond to multiplying by the element in the family. diff --git a/src/group-theory/torsors.lagda.md b/src/group-theory/torsors.lagda.md index 0a00390f75..8d49989e70 100644 --- a/src/group-theory/torsors.lagda.md +++ b/src/group-theory/torsors.lagda.md @@ -42,8 +42,9 @@ open import higher-group-theory.higher-groups ## Idea -A torsor of `G` is a group action wich merely equivalent to the principal group -action of `G`. +A **torsor** of `G` is a [group action](group-theory.group-actions.md) which is +[merely equivalent](foundation.mere-equivalence.md) to the +[principal group action](group-theory.principal-group-actions.md) of `G`. ## Definitions From beaae3af9a23478e300ceeaeafc36e89f56b1911 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 12:46:22 +0200 Subject: [PATCH 20/49] move proofs opposite categories --- .../opposite-categories.lagda.md | 41 +++++++- .../opposite-precategories.lagda.md | 69 +------------ .../opposite-preunivalent-categories.lagda.md | 99 +++++++++++++++---- src/order-theory/posets.lagda.md | 3 +- 4 files changed, 124 insertions(+), 88 deletions(-) diff --git a/src/category-theory/opposite-categories.lagda.md b/src/category-theory/opposite-categories.lagda.md index b89260cc53..b6b18e96af 100644 --- a/src/category-theory/opposite-categories.lagda.md +++ b/src/category-theory/opposite-categories.lagda.md @@ -8,6 +8,7 @@ module category-theory.opposite-categories where ```agda open import category-theory.categories +open import category-theory.isomorphisms-in-precategories open import category-theory.opposite-precategories open import category-theory.precategories @@ -17,6 +18,7 @@ open import foundation.identity-types open import foundation.involutions open import foundation.sets open import foundation.subtypes +open import foundation.transport-along-identifications open import foundation.universe-levels ``` @@ -27,7 +29,44 @@ open import foundation.universe-levels Let `C` be a [category](category-theory.categories.md), its **opposite category** `Cᵒᵖ` is given by reversing every morphism. -## Definition +## Lemma + +### The underlying precategory is a category if and only if the opposite is a category + +```agda +abstract + is-category-opposite-is-category-Precategory : + {l1 l2 : Level} (C : Precategory l1 l2) → + is-category-Precategory C → + is-category-Precategory (opposite-Precategory C) + is-category-opposite-is-category-Precategory C is-category-C x y = + is-equiv-htpy-equiv + ( compute-iso-opposite-Precategory C ∘e + equiv-inv-iso-Precategory C ∘e + (_ , is-category-C x y)) + ( λ where + refl → + eq-type-subtype + ( is-iso-prop-Precategory (opposite-Precategory C)) + ( refl)) + +abstract + is-category-is-category-opposite-Precategory : + {l1 l2 : Level} (C : Precategory l1 l2) → + is-category-Precategory (opposite-Precategory C) → + is-category-Precategory C + is-category-is-category-opposite-Precategory C is-category-op-C = + tr + ( is-category-Precategory) + ( is-involution-opposite-Precategory C) + ( is-category-opposite-is-category-Precategory + ( opposite-Precategory C) + ( is-category-op-C)) +``` + +## Definitions + +### The opposite category ```agda module _ diff --git a/src/category-theory/opposite-precategories.lagda.md b/src/category-theory/opposite-precategories.lagda.md index 2935799d90..350b2a4c3c 100644 --- a/src/category-theory/opposite-precategories.lagda.md +++ b/src/category-theory/opposite-precategories.lagda.md @@ -39,6 +39,8 @@ precategory** `Cᵒᵖ` is given by reversing every morphism. ## Definition +### The opposite precategory + ```agda module _ {l1 l2 : Level} (C : Precategory l1 l2) @@ -182,70 +184,3 @@ module _ pr2 compute-iso-opposite-Precategory = is-equiv-map-compute-iso-opposite-Precategory ``` - -### The underlying precategory is a category if and only if the opposite is a category - -```agda -abstract - is-category-opposite-is-category-Precategory : - {l1 l2 : Level} (C : Precategory l1 l2) → - is-category-Precategory C → - is-category-Precategory (opposite-Precategory C) - is-category-opposite-is-category-Precategory C is-category-C x y = - is-equiv-htpy-equiv - ( compute-iso-opposite-Precategory C ∘e - equiv-inv-iso-Precategory C ∘e - (_ , is-category-C x y)) - ( λ where - refl → - eq-type-subtype - ( is-iso-prop-Precategory (opposite-Precategory C)) - ( refl)) - -abstract - is-category-is-category-opposite-Precategory : - {l1 l2 : Level} (C : Precategory l1 l2) → - is-category-Precategory (opposite-Precategory C) → - is-category-Precategory C - is-category-is-category-opposite-Precategory C is-category-op-C = - tr - ( is-category-Precategory) - ( is-involution-opposite-Precategory C) - ( is-category-opposite-is-category-Precategory - ( opposite-Precategory C) - ( is-category-op-C)) -``` - -### The underlying precategory is preunivalent if and only if the opposite is preunivalent - -```agda -abstract - is-preunivalent-opposite-is-preunivalent-Precategory : - {l1 l2 : Level} (C : Precategory l1 l2) → - is-preunivalent-Precategory C → - is-preunivalent-Precategory (opposite-Precategory C) - is-preunivalent-opposite-is-preunivalent-Precategory C is-preunivalent-C x y = - is-emb-htpy-emb - ( comp-emb - ( emb-equiv - ( compute-iso-opposite-Precategory C ∘e equiv-inv-iso-Precategory C)) - ( _ , is-preunivalent-C x y)) - ( λ where - refl → - eq-type-subtype - ( is-iso-prop-Precategory (opposite-Precategory C)) - ( refl)) - -abstract - is-preunivalent-is-preunivalent-opposite-Precategory : - {l1 l2 : Level} (C : Precategory l1 l2) → - is-preunivalent-Precategory (opposite-Precategory C) → - is-preunivalent-Precategory C - is-preunivalent-is-preunivalent-opposite-Precategory C is-preunivalent-op-C = - tr - ( is-preunivalent-Precategory) - ( is-involution-opposite-Precategory C) - ( is-preunivalent-opposite-is-preunivalent-Precategory - ( opposite-Precategory C) - ( is-preunivalent-op-C)) -``` diff --git a/src/category-theory/opposite-preunivalent-categories.lagda.md b/src/category-theory/opposite-preunivalent-categories.lagda.md index a3bfa1540d..30a9cc43d4 100644 --- a/src/category-theory/opposite-preunivalent-categories.lagda.md +++ b/src/category-theory/opposite-preunivalent-categories.lagda.md @@ -8,16 +8,19 @@ module category-theory.opposite-preunivalent-categories where ```agda open import category-theory.categories -open import category-theory.preunivalent-categories +open import category-theory.isomorphisms-in-precategories open import category-theory.opposite-precategories open import category-theory.precategories +open import category-theory.preunivalent-categories open import foundation.dependent-pair-types +open import foundation.embeddings open import foundation.equivalences open import foundation.identity-types open import foundation.involutions open import foundation.sets open import foundation.subtypes +open import foundation.transport-along-identifications open import foundation.universe-levels ``` @@ -29,7 +32,45 @@ Let `C` be a [preunivalent category](category-theory.preunivalent-categories.md), its **opposite preunivalent category** `Cᵒᵖ` is given by reversing every morphism. -## Definition +## Lemma + +### A precategory is preunivalent if and only if the opposite is preunivalent + +```agda +abstract + is-preunivalent-opposite-is-preunivalent-Precategory : + {l1 l2 : Level} (C : Precategory l1 l2) → + is-preunivalent-Precategory C → + is-preunivalent-Precategory (opposite-Precategory C) + is-preunivalent-opposite-is-preunivalent-Precategory C is-preunivalent-C x y = + is-emb-htpy-emb + ( comp-emb + ( emb-equiv + ( compute-iso-opposite-Precategory C ∘e equiv-inv-iso-Precategory C)) + ( _ , is-preunivalent-C x y)) + ( λ where + refl → + eq-type-subtype + ( is-iso-prop-Precategory (opposite-Precategory C)) + ( refl)) + +abstract + is-preunivalent-is-preunivalent-opposite-Precategory : + {l1 l2 : Level} (C : Precategory l1 l2) → + is-preunivalent-Precategory (opposite-Precategory C) → + is-preunivalent-Precategory C + is-preunivalent-is-preunivalent-opposite-Precategory C is-preunivalent-op-C = + tr + ( is-preunivalent-Precategory) + ( is-involution-opposite-Precategory C) + ( is-preunivalent-opposite-is-preunivalent-Precategory + ( opposite-Precategory C) + ( is-preunivalent-op-C)) +``` + +## Definitions + +### The opposite preunivalent category ```agda module _ @@ -37,14 +78,18 @@ module _ where obj-opposite-Preunivalent-Category : UU l1 - obj-opposite-Preunivalent-Category = obj-opposite-Precategory (precategory-Preunivalent-Category C) + obj-opposite-Preunivalent-Category = + obj-opposite-Precategory (precategory-Preunivalent-Category C) - hom-set-opposite-Preunivalent-Category : (x y : obj-opposite-Preunivalent-Category) → Set l2 + hom-set-opposite-Preunivalent-Category : + (x y : obj-opposite-Preunivalent-Category) → Set l2 hom-set-opposite-Preunivalent-Category = hom-set-opposite-Precategory (precategory-Preunivalent-Category C) - hom-opposite-Preunivalent-Category : (x y : obj-opposite-Preunivalent-Category) → UU l2 - hom-opposite-Preunivalent-Category = hom-opposite-Precategory (precategory-Preunivalent-Category C) + hom-opposite-Preunivalent-Category : + (x y : obj-opposite-Preunivalent-Category) → UU l2 + hom-opposite-Preunivalent-Category = + hom-opposite-Precategory (precategory-Preunivalent-Category C) comp-hom-opposite-Preunivalent-Category : {x y z : obj-opposite-Preunivalent-Category} → @@ -59,34 +104,48 @@ module _ (h : hom-opposite-Preunivalent-Category z w) (g : hom-opposite-Preunivalent-Category y z) (f : hom-opposite-Preunivalent-Category x y) → - ( comp-hom-opposite-Preunivalent-Category (comp-hom-opposite-Preunivalent-Category h g) f) = - ( comp-hom-opposite-Preunivalent-Category h (comp-hom-opposite-Preunivalent-Category g f)) + ( comp-hom-opposite-Preunivalent-Category + ( comp-hom-opposite-Preunivalent-Category h g) (f)) = + ( comp-hom-opposite-Preunivalent-Category + ( h) (comp-hom-opposite-Preunivalent-Category g f)) associative-comp-hom-opposite-Preunivalent-Category = - associative-comp-hom-opposite-Precategory (precategory-Preunivalent-Category C) + associative-comp-hom-opposite-Precategory + ( precategory-Preunivalent-Category C) id-hom-opposite-Preunivalent-Category : - {x : obj-opposite-Preunivalent-Category} → hom-opposite-Preunivalent-Category x x + {x : obj-opposite-Preunivalent-Category} → + hom-opposite-Preunivalent-Category x x id-hom-opposite-Preunivalent-Category = id-hom-opposite-Precategory (precategory-Preunivalent-Category C) left-unit-law-comp-hom-opposite-Preunivalent-Category : {x y : obj-opposite-Preunivalent-Category} (f : hom-opposite-Preunivalent-Category x y) → - comp-hom-opposite-Preunivalent-Category id-hom-opposite-Preunivalent-Category f = f + comp-hom-opposite-Preunivalent-Category + ( id-hom-opposite-Preunivalent-Category) + ( f) = + f left-unit-law-comp-hom-opposite-Preunivalent-Category = - left-unit-law-comp-hom-opposite-Precategory (precategory-Preunivalent-Category C) + left-unit-law-comp-hom-opposite-Precategory + ( precategory-Preunivalent-Category C) right-unit-law-comp-hom-opposite-Preunivalent-Category : - {x y : obj-opposite-Preunivalent-Category} (f : hom-opposite-Preunivalent-Category x y) → - comp-hom-opposite-Preunivalent-Category f id-hom-opposite-Preunivalent-Category = f + {x y : obj-opposite-Preunivalent-Category} + (f : hom-opposite-Preunivalent-Category x y) → + comp-hom-opposite-Preunivalent-Category + ( f) (id-hom-opposite-Preunivalent-Category) = + ( f) right-unit-law-comp-hom-opposite-Preunivalent-Category = - right-unit-law-comp-hom-opposite-Precategory (precategory-Preunivalent-Category C) + right-unit-law-comp-hom-opposite-Precategory + ( precategory-Preunivalent-Category C) precategory-opposite-Preunivalent-Category : Precategory l1 l2 - precategory-opposite-Preunivalent-Category = opposite-Precategory (precategory-Preunivalent-Category C) + precategory-opposite-Preunivalent-Category = + opposite-Precategory (precategory-Preunivalent-Category C) opposite-Preunivalent-Category : Preunivalent-Category l1 l2 - pr1 opposite-Preunivalent-Category = precategory-opposite-Preunivalent-Category + pr1 opposite-Preunivalent-Category = + precategory-opposite-Preunivalent-Category pr2 opposite-Preunivalent-Category = is-preunivalent-opposite-is-preunivalent-Precategory ( precategory-Preunivalent-Category C) @@ -107,8 +166,10 @@ is-involution-opposite-Preunivalent-Category C = involution-opposite-Preunivalent-Category : (l1 l2 : Level) → involution (Preunivalent-Category l1 l2) -pr1 (involution-opposite-Preunivalent-Category l1 l2) = opposite-Preunivalent-Category -pr2 (involution-opposite-Preunivalent-Category l1 l2) = is-involution-opposite-Preunivalent-Category +pr1 (involution-opposite-Preunivalent-Category l1 l2) = + opposite-Preunivalent-Category +pr2 (involution-opposite-Preunivalent-Category l1 l2) = + is-involution-opposite-Preunivalent-Category is-equiv-opposite-Preunivalent-Category : {l1 l2 : Level} → is-equiv (opposite-Preunivalent-Category {l1} {l2}) diff --git a/src/order-theory/posets.lagda.md b/src/order-theory/posets.lagda.md index 2aced8f627..5d1f2d73e7 100644 --- a/src/order-theory/posets.lagda.md +++ b/src/order-theory/posets.lagda.md @@ -157,7 +157,8 @@ module _ is-category-precategory-Poset x y = is-equiv-is-prop ( is-set-type-Poset X x y) - ( is-prop-iso-is-prop-hom-Precategory precategory-Poset (is-prop-leq-Poset X x y)) + ( is-prop-iso-is-prop-hom-Precategory precategory-Poset + ( is-prop-leq-Poset X x y)) ( λ f → antisymmetric-leq-Poset X x y ( hom-iso-Precategory precategory-Poset f) From e8a8ef69c18e54ef5f066074611c86acf423f6a3 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 12:53:17 +0200 Subject: [PATCH 21/49] commuting pentagons of ids --- src/foundation.lagda.md | 1 + ...ting-pentagons-of-identifications.lagda.md | 55 +++++++++++++++++++ src/foundation/identity-types.lagda.md | 3 +- 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 src/foundation/commuting-pentagons-of-identifications.lagda.md diff --git a/src/foundation.lagda.md b/src/foundation.lagda.md index 3568a211d2..33279e54bb 100644 --- a/src/foundation.lagda.md +++ b/src/foundation.lagda.md @@ -46,6 +46,7 @@ open import foundation.commuting-3-simplices-of-homotopies public open import foundation.commuting-3-simplices-of-maps public open import foundation.commuting-cubes-of-maps public open import foundation.commuting-hexagons-of-identifications public +open import foundation.commuting-pentagons-of-identifications public open import foundation.commuting-squares-of-homotopies public open import foundation.commuting-squares-of-identifications public open import foundation.commuting-squares-of-maps public diff --git a/src/foundation/commuting-pentagons-of-identifications.lagda.md b/src/foundation/commuting-pentagons-of-identifications.lagda.md new file mode 100644 index 0000000000..61fcef98f6 --- /dev/null +++ b/src/foundation/commuting-pentagons-of-identifications.lagda.md @@ -0,0 +1,55 @@ +# Commuting pentagons of identifications + +```agda +module foundation.commuting-pentagons-of-identifications where +``` + +
Imports + +```agda +open import foundation.action-on-identifications-binary-functions +open import foundation.universe-levels + +open import foundation-core.function-types +open import foundation-core.identity-types +``` + +
+ +## Idea + +A pentagon of [identifications](foundation-core.identity-types.md) + +```text + top + x --- y +top-left / \ top-right + / \ + z w + \ / +bottom-left \ / bottom-right + v +``` + +is said to **commute** if there is an identification + +```text + top-left ∙ bottom-left = (top ∙ top-right) ∙ bottom-right. +``` + +Such an identification is called a **coherence** of the pentagon. + +## Definition + +```agda +module _ + {l : Level} {A : UU l} {x y z w v : A} + where + + coherence-pentagon-identifications : + (top : x = y) + (top-left : x = z) (top-right : y = w) + (bottom-left : z = v) (bottom-right : w = v) → UU l + coherence-pentagon-identifications top top-left top-right bottom-left bottom-right = + top-left ∙ bottom-left = (top ∙ top-right) ∙ bottom-right +``` diff --git a/src/foundation/identity-types.lagda.md b/src/foundation/identity-types.lagda.md index bad4208824..b15cec9771 100644 --- a/src/foundation/identity-types.lagda.md +++ b/src/foundation/identity-types.lagda.md @@ -11,6 +11,7 @@ open import foundation-core.identity-types public ```agda open import foundation.action-on-identifications-functions open import foundation.binary-equivalences +open import foundation.commuting-pentagons-of-identifications open import foundation.dependent-pair-types open import foundation.equivalence-extensionality open import foundation.function-extensionality @@ -53,7 +54,7 @@ mac-lane-pentagon : α₄ = (assoc (p ∙ q) r s) α₅ = (assoc p q (r ∙ s)) in - ((α₁ ∙ α₂) ∙ α₃) = (α₄ ∙ α₅) + coherence-pentagon-identifications α₁ α₄ α₂ α₅ α₃ mac-lane-pentagon refl refl refl refl = refl ``` From d3ebfa35052cfb535fbb321f2c9622e6fdff0ed4 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 12:54:10 +0200 Subject: [PATCH 22/49] iterated is-prop and is-contr for implicit Pis --- .../contractible-types.lagda.md | 8 +++++ .../iterated-dependent-product-types.lagda.md | 29 +++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/src/foundation-core/contractible-types.lagda.md b/src/foundation-core/contractible-types.lagda.md index 5575b7d19c..557639fa3c 100644 --- a/src/foundation-core/contractible-types.lagda.md +++ b/src/foundation-core/contractible-types.lagda.md @@ -11,6 +11,7 @@ open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.equality-cartesian-product-types open import foundation.function-extensionality +open import foundation.implicit-function-types open import foundation.universe-levels open import foundation-core.cartesian-product-types @@ -283,6 +284,13 @@ abstract map-inv-is-equiv ( funext (λ x → center (H x)) f) ( λ x → contraction (H x) (f x)) + +abstract + is-contr-implicit-Π : + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} → + ((x : A) → is-contr (B x)) → is-contr ({x : A} → B x) + is-contr-implicit-Π H = + is-contr-equiv _ equiv-explicit-implicit-Π (is-contr-Π H) ``` ### The type of functions into a contractible type is contractible diff --git a/src/foundation/iterated-dependent-product-types.lagda.md b/src/foundation/iterated-dependent-product-types.lagda.md index 17879e23f3..bf8f207f70 100644 --- a/src/foundation/iterated-dependent-product-types.lagda.md +++ b/src/foundation/iterated-dependent-product-types.lagda.md @@ -116,6 +116,21 @@ section-iterated-Π-section-Π-section-codomain P f ._ {{base-telescope A}} H = H section-iterated-Π-section-Π-section-codomain P f ._ {{cons-telescope A}} H = f (λ x → section-iterated-Π-section-Π-section-codomain P f _ {{A x}} (H x)) + +section-iterated-implicit-Π-section-Π-section-codomain : + (P : {l : Level} → UU l → UU l) → + ( {l1 l2 : Level} {A : UU l1} {B : A → UU l2} → + ((x : A) → P (B x)) → P ({x : A} → B x)) → + {l : Level} (n : ℕ) {{A : telescope l n}} → + apply-codomain-iterated-Π P A → P (iterated-implicit-Π A) +section-iterated-implicit-Π-section-Π-section-codomain + P f ._ {{base-telescope A}} H = + H +section-iterated-implicit-Π-section-Π-section-codomain + P f ._ {{cons-telescope A}} H = + f ( λ x → + section-iterated-implicit-Π-section-Π-section-codomain + P f _ {{A x}} (H x)) ``` ### Iterated products of contractible types is contractible @@ -126,6 +141,14 @@ is-contr-iterated-Π : apply-codomain-iterated-Π is-contr A → is-contr (iterated-Π A) is-contr-iterated-Π = section-iterated-Π-section-Π-section-codomain is-contr is-contr-Π + +is-contr-iterated-implicit-Π : + {l : Level} (n : ℕ) {{A : telescope l n}} → + apply-codomain-iterated-Π is-contr A → is-contr (iterated-implicit-Π A) +is-contr-iterated-implicit-Π = + section-iterated-implicit-Π-section-Π-section-codomain + ( is-contr) + ( is-contr-implicit-Π) ``` ### Iterated products of propositions are propositions @@ -136,6 +159,12 @@ is-prop-iterated-Π : apply-codomain-iterated-Π is-prop A → is-prop (iterated-Π A) is-prop-iterated-Π = section-iterated-Π-section-Π-section-codomain is-prop is-prop-Π + +is-prop-iterated-implicit-Π : + {l : Level} (n : ℕ) {{A : telescope l n}} → + apply-codomain-iterated-Π is-prop A → is-prop (iterated-implicit-Π A) +is-prop-iterated-implicit-Π = + section-iterated-implicit-Π-section-Π-section-codomain is-prop is-prop-Π' ``` ### Iterated products of truncated types are truncated From b1f7f6f981bc96a4a40b2827ba241c0d6c9bb21c Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 12:54:29 +0200 Subject: [PATCH 23/49] categorical laws for functor composition --- src/category-theory.lagda.md | 1 + .../functors-precategories.lagda.md | 210 +++++++++++++++--- 2 files changed, 174 insertions(+), 37 deletions(-) diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index 35f95696ed..b896687e21 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -100,6 +100,7 @@ open import category-theory.nonunital-precategories public open import category-theory.one-object-precategories public open import category-theory.opposite-categories public open import category-theory.opposite-precategories public +open import category-theory.opposite-preunivalent-categories public open import category-theory.precategories public open import category-theory.precategory-of-functors public open import category-theory.precategory-of-functors-from-small-to-large-precategories public diff --git a/src/category-theory/functors-precategories.lagda.md b/src/category-theory/functors-precategories.lagda.md index 119ee40002..2b062592f0 100644 --- a/src/category-theory/functors-precategories.lagda.md +++ b/src/category-theory/functors-precategories.lagda.md @@ -13,13 +13,15 @@ open import category-theory.precategories open import foundation.action-on-identifications-functions open import foundation.cartesian-product-types +open import foundation.commuting-pentagons-of-identifications open import foundation.dependent-pair-types open import foundation.embeddings +open import foundation.equality-dependent-pair-types open import foundation.equivalences -open import foundation.iterated-dependent-product-types open import foundation.function-types open import foundation.homotopies open import foundation.identity-types +open import foundation.iterated-dependent-product-types open import foundation.propositions open import foundation.subtypes open import foundation.type-arithmetic-dependent-pair-types @@ -162,27 +164,56 @@ pr2 (pr2 (pr2 (id-functor-Precategory C))) x = refl Any two compatible functors can be composed to a new functor. ```agda -comp-functor-Precategory : +module _ {l1 l2 l3 l4 l5 l6 : Level} - (C : Precategory l1 l2) (D : Precategory l3 l4) (E : Precategory l5 l6) → - functor-Precategory D E → functor-Precategory C D → functor-Precategory C E -pr1 (comp-functor-Precategory C D E G F) = - obj-functor-Precategory D E G ∘ obj-functor-Precategory C D F -pr1 (pr2 (comp-functor-Precategory C D E G F)) = - hom-functor-Precategory D E G ∘ hom-functor-Precategory C D F -pr1 (pr2 (pr2 (comp-functor-Precategory C D E G F))) g f = - ( ap - ( hom-functor-Precategory D E G) - ( preserves-comp-functor-Precategory C D F g f)) ∙ - ( preserves-comp-functor-Precategory D E G - ( hom-functor-Precategory C D F g) - ( hom-functor-Precategory C D F f)) -pr2 (pr2 (pr2 (comp-functor-Precategory C D E G F))) x = - ( ap - ( hom-functor-Precategory D E G) - ( preserves-id-functor-Precategory C D F x)) ∙ - ( preserves-id-functor-Precategory D E G - ( obj-functor-Precategory C D F x)) + (A : Precategory l1 l2) (B : Precategory l3 l4) (C : Precategory l5 l6) + (G : functor-Precategory B C) (F : functor-Precategory A B) + where + + obj-comp-functor-Precategory : obj-Precategory A → obj-Precategory C + obj-comp-functor-Precategory = + obj-functor-Precategory B C G ∘ obj-functor-Precategory A B F + + hom-comp-functor-Precategory : + {x y : obj-Precategory A} → + hom-Precategory A x y → + hom-Precategory C + ( obj-comp-functor-Precategory x) + ( obj-comp-functor-Precategory y) + hom-comp-functor-Precategory = + hom-functor-Precategory B C G ∘ hom-functor-Precategory A B F + + map-comp-functor-precategory : map-Precategory A C + pr1 map-comp-functor-precategory = obj-comp-functor-Precategory + pr2 map-comp-functor-precategory = hom-comp-functor-Precategory + + preserves-comp-comp-functor-Precategory : + preserves-comp-hom-map-Precategory A C map-comp-functor-precategory + preserves-comp-comp-functor-Precategory g f = + ( ap + ( hom-functor-Precategory B C G) + ( preserves-comp-functor-Precategory A B F g f)) ∙ + ( preserves-comp-functor-Precategory B C G + ( hom-functor-Precategory A B F g) + ( hom-functor-Precategory A B F f)) + + preserves-id-comp-functor-Precategory : + preserves-id-hom-map-Precategory A C map-comp-functor-precategory + preserves-id-comp-functor-Precategory x = + ( ap + ( hom-functor-Precategory B C G) + ( preserves-id-functor-Precategory A B F x)) ∙ + ( preserves-id-functor-Precategory B C G + ( obj-functor-Precategory A B F x)) + + comp-functor-Precategory : functor-Precategory A C + pr1 comp-functor-Precategory = obj-comp-functor-Precategory + pr1 (pr2 comp-functor-Precategory) = + hom-functor-Precategory B C G ∘ hom-functor-Precategory A B F + pr1 (pr2 (pr2 comp-functor-Precategory)) = + preserves-comp-comp-functor-Precategory + pr2 (pr2 (pr2 comp-functor-Precategory)) = + preserves-id-comp-functor-Precategory ``` ## Properties @@ -203,22 +234,17 @@ module _ is-prop-preserves-comp-hom-map-Precategory : is-prop (preserves-comp-hom-map-Precategory C D F) is-prop-preserves-comp-hom-map-Precategory = - is-prop-Π' - ( λ x → - is-prop-Π' - ( λ y → - is-prop-Π' - ( λ z → - is-prop-iterated-Π 2 - ( λ g f → - is-set-hom-Precategory D - ( obj-map-Precategory C D F x) - ( obj-map-Precategory C D F z) - ( hom-map-Precategory C D F - ( comp-hom-Precategory C g f)) - ( comp-hom-Precategory D - ( hom-map-Precategory C D F g) - ( hom-map-Precategory C D F f)))))) + is-prop-iterated-implicit-Π 3 + ( λ x y z → + is-prop-iterated-Π 2 + ( λ g f → + is-set-hom-Precategory D + ( obj-map-Precategory C D F x) + ( obj-map-Precategory C D F z) + ( hom-map-Precategory C D F (comp-hom-Precategory C g f)) + ( comp-hom-Precategory D + ( hom-map-Precategory C D F g) + ( hom-map-Precategory C D F f)))) preserves-comp-hom-prop-map-Precategory : Prop (l1 ⊔ l2 ⊔ l4) pr1 preserves-comp-hom-prop-map-Precategory = @@ -423,6 +449,116 @@ module _ ( is-iso-iso-Precategory C f) ``` +### Categorical laws for functor composition + +#### Unit laws for functor composition + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) (D : Precategory l3 l4) + (F : functor-Precategory C D) + where + + left-unit-law-comp-functor-Precategory : + comp-functor-Precategory C D D (id-functor-Precategory D) F = F + left-unit-law-comp-functor-Precategory = + eq-eq-map-functor-Precategory C D _ _ refl + + right-unit-law-comp-functor-Precategory : + comp-functor-Precategory C C D F (id-functor-Precategory C) = F + right-unit-law-comp-functor-Precategory = refl +``` + +#### Associativity of functor composition + +```agda +module _ + {l1 l1' l2 l2' l3 l3' l4 l4' : Level} + (A : Precategory l1 l1') + (B : Precategory l2 l2') + (C : Precategory l3 l3') + (D : Precategory l4 l4') + (F : functor-Precategory A B) + (G : functor-Precategory B C) + (H : functor-Precategory C D) + where + + associative-comp-functor-Precategory : + comp-functor-Precategory A B D (comp-functor-Precategory B C D H G) F = + comp-functor-Precategory A C D H (comp-functor-Precategory A B C G F) + associative-comp-functor-Precategory = + eq-eq-map-functor-Precategory A D _ _ refl +``` + +#### MacLane pentagon for functor composition + +```text + (I(GH))F ---- I((GH)F) + / \ + / \ + ((IH)G)F I(H(GF)) + \ / + \ / + (IH)(GF) +``` + +The proof remains to be formalized. + +```text +module _ + {l1 l1' l2 l2' l3 l3' l4 l4' : Level} + (A : Precategory l1 l1') + (B : Precategory l2 l2') + (C : Precategory l3 l3') + (D : Precategory l4 l4') + (E : Precategory l4 l4') + (F : functor-Precategory A B) + (G : functor-Precategory B C) + (H : functor-Precategory C D) + (I : functor-Precategory D E) + where + + mac-lane-pentagon-comp-functor-Precategory : + coherence-pentagon-identifications + { x = + comp-functor-Precategory A B E + ( comp-functor-Precategory B D E I + ( comp-functor-Precategory B C D H G)) + ( F)} + { comp-functor-Precategory A D E I + ( comp-functor-Precategory A B D + ( comp-functor-Precategory B C D H G) + ( F))} + { comp-functor-Precategory A B E + ( comp-functor-Precategory B C E + ( comp-functor-Precategory C D E I H) + ( G)) + ( F)} + { comp-functor-Precategory A D E + ( I) + ( comp-functor-Precategory A C D + ( H) + ( comp-functor-Precategory A B C G F))} + { comp-functor-Precategory A C E + ( comp-functor-Precategory C D E I H) + ( comp-functor-Precategory A B C G F)} + ( associative-comp-functor-Precategory A B D E + ( F) (comp-functor-Precategory B C D H G) (I)) + ( ap + ( λ p → comp-functor-Precategory A B E p F) + ( inv (associative-comp-functor-Precategory B C D E G H I))) + ( ap + ( λ p → comp-functor-Precategory A D E I p) + ( associative-comp-functor-Precategory A B C D F G H)) + ( associative-comp-functor-Precategory A B C E + ( F) (G) (comp-functor-Precategory C D E I H)) + ( inv + ( associative-comp-functor-Precategory A C D E + (comp-functor-Precategory A B C G F) H I)) + mac-lane-pentagon-comp-functor-Precategory = {!!} +``` + ## See also - [The precategory of functors and natural transformations between precategories](category-theory.precategory-of-functors.md) From 63a42e43be531e36dce542d8415e2c877238380c Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 13:09:59 +0200 Subject: [PATCH 24/49] fix references --- TEMPLATE.lagda.md | 3 +-- src/category-theory/functors-precategories.lagda.md | 10 ++++++++++ src/foundation-core/path-split-maps.lagda.md | 3 +-- .../cantor-schroder-bernstein-escardo.lagda.md | 2 +- src/foundation/double-negation-modality.lagda.md | 2 +- src/foundation/locally-small-types.lagda.md | 3 +-- src/foundation/path-split-maps.lagda.md | 3 +-- src/foundation/preidempotent-maps.lagda.md | 3 +-- src/foundation/replacement.lagda.md | 3 +-- .../closed-modalities.lagda.md | 2 +- .../higher-modalities.lagda.md | 2 +- .../localizations-maps.lagda.md | 5 ++--- .../localizations-subuniverses.lagda.md | 5 ++--- .../modal-operators.lagda.md | 2 +- .../orthogonal-factorization-systems.lagda.md | 2 +- .../reflective-subuniverses.lagda.md | 8 +++----- .../separated-types.lagda.md | 3 +-- .../sigma-closed-reflective-subuniverses.lagda.md | 2 +- .../stable-orthogonal-factorization-systems.lagda.md | 2 +- .../uniquely-eliminating-modalities.lagda.md | 2 +- src/set-theory/cumulative-hierarchy.lagda.md | 3 +-- src/synthetic-homotopy-theory/joins-of-types.lagda.md | 3 +-- 22 files changed, 35 insertions(+), 38 deletions(-) diff --git a/TEMPLATE.lagda.md b/TEMPLATE.lagda.md index ab7065acb1..407fdace78 100644 --- a/TEMPLATE.lagda.md +++ b/TEMPLATE.lagda.md @@ -55,5 +55,4 @@ concept-subconcept = ... 1. Univalent Foundations Project, _Homotopy Type Theory – Univalent Foundations of Mathematics_ (2013) ([website](https://homotopytypetheory.org/book/), - [arXiv:1308.0729](https://arxiv.org/abs/1308.0729), - [DOI:10.48550](https://doi.org/10.48550/arXiv.1308.0729)) + [arXiv:1308.0729](https://arxiv.org/abs/1308.0729)) diff --git a/src/category-theory/functors-precategories.lagda.md b/src/category-theory/functors-precategories.lagda.md index 2b062592f0..e5ac0168da 100644 --- a/src/category-theory/functors-precategories.lagda.md +++ b/src/category-theory/functors-precategories.lagda.md @@ -562,3 +562,13 @@ module _ ## See also - [The precategory of functors and natural transformations between precategories](category-theory.precategory-of-functors.md) + +## References + +1. Univalent Foundations Project, _Homotopy Type Theory – Univalent Foundations + of Mathematics_ (2013) ([website](https://homotopytypetheory.org/book/), + [arXiv:1308.0729](https://arxiv.org/abs/1308.0729)) +2. Benedikt Ahrens and Krzysztof Kapulkin and Michael Shulman, _Univalent + Categories and the Rezk completion_ (2015) + ([arXiv:1303.0584](https://arxiv.org/abs/1303.0584), + [DOI:10.1017/S0960129514000486](https://doi.org/10.1017/S0960129514000486)) diff --git a/src/foundation-core/path-split-maps.lagda.md b/src/foundation-core/path-split-maps.lagda.md index 126b395ea6..66ae437fa4 100644 --- a/src/foundation-core/path-split-maps.lagda.md +++ b/src/foundation-core/path-split-maps.lagda.md @@ -90,8 +90,7 @@ module _ 1. Univalent Foundations Project, _Homotopy Type Theory – Univalent Foundations of Mathematics_ (2013) ([website](https://homotopytypetheory.org/book/), - [arXiv:1308.0729](https://arxiv.org/abs/1308.0729), - [DOI:10.48550](https://doi.org/10.48550/arXiv.1308.0729)) + [arXiv:1308.0729](https://arxiv.org/abs/1308.0729)) 2. Mike Shulman, _Universal properties without function extensionality_ (November 2014) ([HoTT Blog](https://homotopytypetheory.org/2014/11/02/universal-properties-without-function-extensionality/)) diff --git a/src/foundation/cantor-schroder-bernstein-escardo.lagda.md b/src/foundation/cantor-schroder-bernstein-escardo.lagda.md index 1e526d26bd..4419efd46b 100644 --- a/src/foundation/cantor-schroder-bernstein-escardo.lagda.md +++ b/src/foundation/cantor-schroder-bernstein-escardo.lagda.md @@ -175,6 +175,6 @@ module _ - Martín H. Escardó, _The Cantor–Schröder–Bernstein Theorem for ∞-groupoids_, Journal of Homotopy and Related Structures, Volume 16, Issue 3, 2021 - ([arXiv:2002.07079](https://arxiv.org/abs/2002.07079),[DOI:10.1007](https://doi.org/10.1007/s40062-021-00284-6)) + ([arXiv:2002.07079](https://arxiv.org/abs/2002.07079),[DOI:10.1007/S40062-021-00284-6](https://doi.org/10.1007/s40062-021-00284-6)) - - diff --git a/src/foundation/double-negation-modality.lagda.md b/src/foundation/double-negation-modality.lagda.md index c62d92e0b0..2bd03a7af5 100644 --- a/src/foundation/double-negation-modality.lagda.md +++ b/src/foundation/double-negation-modality.lagda.md @@ -69,4 +69,4 @@ This proof follows Example 1.9 in _Modalities in homotopy type theory_. - Egbert Rijke, Michael Shulman, Bas Spitters, _Modalities in homotopy type theory_, Logical Methods in Computer Science, Volume 16, Issue 1, 2020 ([arXiv:1706.07526](https://arxiv.org/abs/1706.07526), - [doi:10.23638](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) + [DOI:10.23638/LMCS-16(1:2)2020](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) diff --git a/src/foundation/locally-small-types.lagda.md b/src/foundation/locally-small-types.lagda.md index f16321383d..a4835728c8 100644 --- a/src/foundation/locally-small-types.lagda.md +++ b/src/foundation/locally-small-types.lagda.md @@ -244,8 +244,7 @@ is-locally-small-inhabited-subtype H = ## References - Egbert Rijke, Theorem 4.6 in _The join construction_, 2017 - ([arXiv:1701.07538](https://arxiv.org/abs/1701.07538), - [DOI:10.48550](https://doi.org/10.48550/arXiv.1701.07538)) + ([arXiv:1701.07538](https://arxiv.org/abs/1701.07538)) - Marc Bezem, Ulrik Buchholtz, Pierre Cagne, Bjørn Ian Dundas, and Daniel R. Grayson, Section 2.19 of _Symmetry_ ([draft](https://unimath.github.io/SymmetryBook/book.pdf), diff --git a/src/foundation/path-split-maps.lagda.md b/src/foundation/path-split-maps.lagda.md index 9397e307b2..2d2df1f55e 100644 --- a/src/foundation/path-split-maps.lagda.md +++ b/src/foundation/path-split-maps.lagda.md @@ -84,8 +84,7 @@ module _ 1. Univalent Foundations Project, _Homotopy Type Theory – Univalent Foundations of Mathematics_ (2013) ([website](https://homotopytypetheory.org/book/), - [arXiv:1308.0729](https://arxiv.org/abs/1308.0729), - [DOI:10.48550](https://doi.org/10.48550/arXiv.1308.0729)) + [arXiv:1308.0729](https://arxiv.org/abs/1308.0729)) 2. Mike Shulman, _Universal properties without function extensionality_ (November 2014) ([HoTT Blog](https://homotopytypetheory.org/2014/11/02/universal-properties-without-function-extensionality/)) diff --git a/src/foundation/preidempotent-maps.lagda.md b/src/foundation/preidempotent-maps.lagda.md index 8599010dd5..0e3a918a15 100644 --- a/src/foundation/preidempotent-maps.lagda.md +++ b/src/foundation/preidempotent-maps.lagda.md @@ -48,7 +48,6 @@ is-prop-is-preidempotent-is-set is-set-A f = - Mike Shulman, _Idempotents in intensional type theory_, Logical Methods in Computer Science, Volume 12, Issue 3, 2017 - ([arXiv:1507.03634](https://arxiv.org/abs/1507.03634), - [DOI:10.48550](https://doi.org/10.48550/arXiv.1507.03634)) + ([arXiv:1507.03634](https://arxiv.org/abs/1507.03634)) - Mike Shulman, _Splitting Idempotents_, diff --git a/src/foundation/replacement.lagda.md b/src/foundation/replacement.lagda.md index 8283b21027..23bf1e829f 100644 --- a/src/foundation/replacement.lagda.md +++ b/src/foundation/replacement.lagda.md @@ -57,8 +57,7 @@ replacement' f = replacement f is-small' ## References - Egbert Rijke, Theorem 4.6 in _The join construction_, 2017 - ([arXiv:1701.07538](https://arxiv.org/abs/1701.07538), - [DOI:10.48550](https://doi.org/10.48550/arXiv.1701.07538)) + ([arXiv:1701.07538](https://arxiv.org/abs/1701.07538)) - Marc Bezem, Ulrik Buchholtz, Pierre Cagne, Bjørn Ian Dundas, and Daniel R. Grayson, Section 2.19 of _Symmetry_ ([newest version](https://unimath.github.io/SymmetryBook/book.pdf), diff --git a/src/orthogonal-factorization-systems/closed-modalities.lagda.md b/src/orthogonal-factorization-systems/closed-modalities.lagda.md index d8b6f9a452..d39203d1c0 100644 --- a/src/orthogonal-factorization-systems/closed-modalities.lagda.md +++ b/src/orthogonal-factorization-systems/closed-modalities.lagda.md @@ -122,4 +122,4 @@ module _ - Egbert Rijke, Michael Shulman, Bas Spitters, _Modalities in homotopy type theory_, Logical Methods in Computer Science, Volume 16, Issue 1, 2020 ([arXiv:1706.07526](https://arxiv.org/abs/1706.07526), - [doi:10.23638](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) + [DOI:10.23638/LMCS-16(1:2)2020](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) diff --git a/src/orthogonal-factorization-systems/higher-modalities.lagda.md b/src/orthogonal-factorization-systems/higher-modalities.lagda.md index 24b4ee3b68..26554e0958 100644 --- a/src/orthogonal-factorization-systems/higher-modalities.lagda.md +++ b/src/orthogonal-factorization-systems/higher-modalities.lagda.md @@ -354,4 +354,4 @@ The equivalent notions of - Egbert Rijke, Michael Shulman, Bas Spitters, _Modalities in homotopy type theory_, Logical Methods in Computer Science, Volume 16, Issue 1, 2020 ([arXiv:1706.07526](https://arxiv.org/abs/1706.07526), - [doi:10.23638](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) + [DOI:10.23638/LMCS-16(1:2)2020](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) diff --git a/src/orthogonal-factorization-systems/localizations-maps.lagda.md b/src/orthogonal-factorization-systems/localizations-maps.lagda.md index c904c96be9..afdb8a9d4b 100644 --- a/src/orthogonal-factorization-systems/localizations-maps.lagda.md +++ b/src/orthogonal-factorization-systems/localizations-maps.lagda.md @@ -92,7 +92,6 @@ It remains to construct a converse. 1. Egbert Rijke, Michael Shulman, Bas Spitters, _Modalities in homotopy type theory_, Logical Methods in Computer Science, Volume 16, Issue 1, 2020 ([arXiv:1706.07526](https://arxiv.org/abs/1706.07526), - [doi:10.23638](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) + [DOI:10.23638/LMCS-16(1:2)2020](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) 2. Egbert Rijke, _Classifying Types_ - ([arXiv:1906.09435](https://arxiv.org/abs/1906.09435), - [doi:10.48550](https://doi.org/10.48550/arXiv.1906.09435)) + ([arXiv:1906.09435](https://arxiv.org/abs/1906.09435)) diff --git a/src/orthogonal-factorization-systems/localizations-subuniverses.lagda.md b/src/orthogonal-factorization-systems/localizations-subuniverses.lagda.md index b48b595c6a..d5903a78da 100644 --- a/src/orthogonal-factorization-systems/localizations-subuniverses.lagda.md +++ b/src/orthogonal-factorization-systems/localizations-subuniverses.lagda.md @@ -119,7 +119,6 @@ This is Proposition 5.1.2 in _Classifying Types_, and remains to be formalized. 1. Egbert Rijke, Michael Shulman, Bas Spitters, _Modalities in homotopy type theory_, Logical Methods in Computer Science, Volume 16, Issue 1, 2020 ([arXiv:1706.07526](https://arxiv.org/abs/1706.07526), - [doi:10.23638](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) + [DOI:10.23638/LMCS-16(1:2)2020](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) 2. Egbert Rijke, _Classifying Types_ - ([arXiv:1906.09435](https://arxiv.org/abs/1906.09435), - [doi:10.48550](https://doi.org/10.48550/arXiv.1906.09435)) + ([arXiv:1906.09435](https://arxiv.org/abs/1906.09435)) diff --git a/src/orthogonal-factorization-systems/modal-operators.lagda.md b/src/orthogonal-factorization-systems/modal-operators.lagda.md index ea6b4b64dc..d178089800 100644 --- a/src/orthogonal-factorization-systems/modal-operators.lagda.md +++ b/src/orthogonal-factorization-systems/modal-operators.lagda.md @@ -147,4 +147,4 @@ module _ - Egbert Rijke, Michael Shulman, Bas Spitters, _Modalities in homotopy type theory_, Logical Methods in Computer Science, Volume 16, Issue 1, 2020 ([arXiv:1706.07526](https://arxiv.org/abs/1706.07526), - [doi:10.23638](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) + [DOI:10.23638/LMCS-16(1:2)2020](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) diff --git a/src/orthogonal-factorization-systems/orthogonal-factorization-systems.lagda.md b/src/orthogonal-factorization-systems/orthogonal-factorization-systems.lagda.md index 328d0a5873..e59c641fc3 100644 --- a/src/orthogonal-factorization-systems/orthogonal-factorization-systems.lagda.md +++ b/src/orthogonal-factorization-systems/orthogonal-factorization-systems.lagda.md @@ -189,4 +189,4 @@ This remains to be shown. - Egbert Rijke, Michael Shulman, Bas Spitters, _Modalities in homotopy type theory_, Logical Methods in Computer Science, Volume 16, Issue 1, 2020 ([arXiv:1706.07526](https://arxiv.org/abs/1706.07526), - [doi:10.23638](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) + [DOI:10.23638/LMCS-16(1:2)2020](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) diff --git a/src/orthogonal-factorization-systems/reflective-subuniverses.lagda.md b/src/orthogonal-factorization-systems/reflective-subuniverses.lagda.md index 49057ab99b..d2f588bdd1 100644 --- a/src/orthogonal-factorization-systems/reflective-subuniverses.lagda.md +++ b/src/orthogonal-factorization-systems/reflective-subuniverses.lagda.md @@ -187,12 +187,10 @@ module _ 1. Univalent Foundations Project, _Homotopy Type Theory – Univalent Foundations of Mathematics_ (2013) ([website](https://homotopytypetheory.org/book/), - [arXiv:1308.0729](https://arxiv.org/abs/1308.0729), - [DOI:10.48550](https://doi.org/10.48550/arXiv.1308.0729)) + [arXiv:1308.0729](https://arxiv.org/abs/1308.0729)) 2. Egbert Rijke, Michael Shulman, Bas Spitters, _Modalities in homotopy type theory_, Logical Methods in Computer Science, Volume 16, Issue 1, 2020 ([arXiv:1706.07526](https://arxiv.org/abs/1706.07526), - [doi:10.23638](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) + [DOI:10.23638/LMCS-16(1:2)2020](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) 3. Egbert Rijke, _Classifying Types_ - ([arXiv:1906.09435](https://arxiv.org/abs/1906.09435), - [doi:10.48550](https://doi.org/10.48550/arXiv.1906.09435)) + ([arXiv:1906.09435](https://arxiv.org/abs/1906.09435)) diff --git a/src/orthogonal-factorization-systems/separated-types.lagda.md b/src/orthogonal-factorization-systems/separated-types.lagda.md index 7402a89313..d773fc900e 100644 --- a/src/orthogonal-factorization-systems/separated-types.lagda.md +++ b/src/orthogonal-factorization-systems/separated-types.lagda.md @@ -38,5 +38,4 @@ module _ ## References 1. Egbert Rijke, _Classifying Types_ - ([arXiv:1906.09435](https://arxiv.org/abs/1906.09435), - [doi:10.48550](https://doi.org/10.48550/arXiv.1906.09435)) + ([arXiv:1906.09435](https://arxiv.org/abs/1906.09435)) diff --git a/src/orthogonal-factorization-systems/sigma-closed-reflective-subuniverses.lagda.md b/src/orthogonal-factorization-systems/sigma-closed-reflective-subuniverses.lagda.md index 5b037b7ed8..1f845ce440 100644 --- a/src/orthogonal-factorization-systems/sigma-closed-reflective-subuniverses.lagda.md +++ b/src/orthogonal-factorization-systems/sigma-closed-reflective-subuniverses.lagda.md @@ -52,4 +52,4 @@ The equivalent notions of - Egbert Rijke, Michael Shulman, Bas Spitters, _Modalities in homotopy type theory_, Logical Methods in Computer Science, Volume 16, Issue 1, 2020 ([arXiv:1706.07526](https://arxiv.org/abs/1706.07526), - [doi:10.23638](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) + [DOI:10.23638/LMCS-16(1:2)2020](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) diff --git a/src/orthogonal-factorization-systems/stable-orthogonal-factorization-systems.lagda.md b/src/orthogonal-factorization-systems/stable-orthogonal-factorization-systems.lagda.md index fad1c15f29..da36de111e 100644 --- a/src/orthogonal-factorization-systems/stable-orthogonal-factorization-systems.lagda.md +++ b/src/orthogonal-factorization-systems/stable-orthogonal-factorization-systems.lagda.md @@ -50,4 +50,4 @@ The equivalent notions of - Egbert Rijke, Michael Shulman, Bas Spitters, _Modalities in homotopy type theory_, Logical Methods in Computer Science, Volume 16, Issue 1, 2020 ([arXiv:1706.07526](https://arxiv.org/abs/1706.07526), - [doi:10.23638](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) + [DOI:10.23638/LMCS-16(1:2)2020](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) diff --git a/src/orthogonal-factorization-systems/uniquely-eliminating-modalities.lagda.md b/src/orthogonal-factorization-systems/uniquely-eliminating-modalities.lagda.md index f01cf72205..76f7bdfd1c 100644 --- a/src/orthogonal-factorization-systems/uniquely-eliminating-modalities.lagda.md +++ b/src/orthogonal-factorization-systems/uniquely-eliminating-modalities.lagda.md @@ -203,4 +203,4 @@ The equivalent notions of - Egbert Rijke, Michael Shulman, Bas Spitters, _Modalities in homotopy type theory_, Logical Methods in Computer Science, Volume 16, Issue 1, 2020 ([arXiv:1706.07526](https://arxiv.org/abs/1706.07526), - [doi:10.23638](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) + [DOI:10.23638/LMCS-16(1:2)2020](https://doi.org/10.23638/LMCS-16%281%3A2%292020)) diff --git a/src/set-theory/cumulative-hierarchy.lagda.md b/src/set-theory/cumulative-hierarchy.lagda.md index 7dae074724..95866ae5ba 100644 --- a/src/set-theory/cumulative-hierarchy.lagda.md +++ b/src/set-theory/cumulative-hierarchy.lagda.md @@ -764,8 +764,7 @@ needed. 1. Univalent Foundations Project, _Homotopy Type Theory – Univalent Foundations of Mathematics_ (2013) ([website](https://homotopytypetheory.org/book/), - [arXiv:1308.0729](https://arxiv.org/abs/1308.0729), - [DOI:10.48550](https://doi.org/10.48550/arXiv.1308.0729)) + [arXiv:1308.0729](https://arxiv.org/abs/1308.0729)) 2. Tom de Jong, in collaboration with Nicolai Kraus, Fredrik Nordvall Forsberg and Chuangjie Xu. diff --git a/src/synthetic-homotopy-theory/joins-of-types.lagda.md b/src/synthetic-homotopy-theory/joins-of-types.lagda.md index b1bf34beb5..4da4766e1e 100644 --- a/src/synthetic-homotopy-theory/joins-of-types.lagda.md +++ b/src/synthetic-homotopy-theory/joins-of-types.lagda.md @@ -361,5 +361,4 @@ module _ ## References - Egbert Rijke, _The join construction_, 2017 - ([arXiv:1701.07538](https://arxiv.org/abs/1701.07538), - [DOI:10.48550](https://doi.org/10.48550/arXiv.1701.07538)) + ([arXiv:1701.07538](https://arxiv.org/abs/1701.07538)) From 39be8f3f72e97d88634639445c6e1ae9f984f07b Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 15:25:43 +0200 Subject: [PATCH 25/49] move isomorphisms in subprecategories to own file --- .../isomorphisms-in-subprecategories.lagda.md | 167 +++++++++++++++++ src/category-theory/subcategories.lagda.md | 47 +++++ src/category-theory/subprecategories.lagda.md | 176 ++++++++---------- 3 files changed, 293 insertions(+), 97 deletions(-) create mode 100644 src/category-theory/isomorphisms-in-subprecategories.lagda.md diff --git a/src/category-theory/isomorphisms-in-subprecategories.lagda.md b/src/category-theory/isomorphisms-in-subprecategories.lagda.md new file mode 100644 index 0000000000..1f0e08754c --- /dev/null +++ b/src/category-theory/isomorphisms-in-subprecategories.lagda.md @@ -0,0 +1,167 @@ +# Isomorphisms in subprecategories + +```agda +module category-theory.isomorphisms-in-subprecategories where +``` + +
Imports + +```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 +open import category-theory.isomorphisms-in-precategories +open import category-theory.maps-precategories +open import category-theory.subprecategories +open import category-theory.precategories + +open import foundation.dependent-pair-types +open import foundation.embeddings +open import foundation.function-types +open import foundation.identity-types +open import foundation.iterated-dependent-product-types +open import foundation.propositions +open import foundation.sets +open import foundation.subsingleton-induction +open import foundation.subtypes +open import foundation.universe-levels +``` + +
+ +## Definitions + +### 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) +``` + +#### The predicate on an isomorphism proof of being contained in a subprecategory + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (P : Subprecategory l3 l4 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 + + is-in-is-iso-prop-Subprecategory : Prop l4 + is-in-is-iso-prop-Subprecategory = + subhom-subobj-Subprecategory C P y x (hom-inv-is-iso-Precategory C is-iso-f) + + is-in-is-iso-Subprecategory : UU l4 + is-in-is-iso-Subprecategory = + type-Prop is-in-is-iso-prop-Subprecategory + + is-prop-is-in-is-iso-Subprecategory : is-prop is-in-is-iso-Subprecategory + is-prop-is-in-is-iso-Subprecategory = + is-prop-type-Prop is-in-is-iso-prop-Subprecategory + + is-iso-is-in-is-iso-Subprecategory : + is-in-is-iso-Subprecategory → is-iso-Subprecategory C P f + pr1 (pr1 (is-iso-is-in-is-iso-Subprecategory is-in-is-iso-f)) = + hom-inv-is-iso-Precategory C is-iso-f + pr2 (pr1 (is-iso-is-in-is-iso-Subprecategory is-in-is-iso-f)) = is-in-is-iso-f + pr1 (pr2 (is-iso-is-in-is-iso-Subprecategory is-in-is-iso-f)) = + eq-type-subtype (subhom-subobj-Subprecategory C P y y) (pr1 (pr2 is-iso-f)) + pr2 (pr2 (is-iso-is-in-is-iso-Subprecategory is-in-is-iso-f)) = + eq-type-subtype (subhom-subobj-Subprecategory C P x x) (pr2 (pr2 is-iso-f)) +``` + +#### The predicate on an isomorphism between objects in the subprecategory of being contained in the subprecategory + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (P : Subprecategory l3 l4 C) + {x y : obj-Subprecategory C P} + (f : + iso-Precategory C + ( inclusion-obj-Subprecategory C P x) + ( inclusion-obj-Subprecategory C P y)) + where + + is-in-iso-subobj-prop-Subprecategory : Prop l4 + is-in-iso-subobj-prop-Subprecategory = + Σ-Prop + ( subhom-subobj-Subprecategory C P x y (hom-iso-Precategory C f)) + ( λ f₀ → + is-in-is-iso-prop-Subprecategory C P + ( hom-iso-Precategory C f , f₀) + ( is-iso-iso-Precategory C f)) + + is-in-iso-subobj-Subprecategory : UU l4 + is-in-iso-subobj-Subprecategory = + type-Prop is-in-iso-subobj-prop-Subprecategory + + is-prop-is-in-iso-subobj-Subprecategory : + is-prop is-in-iso-subobj-Subprecategory + is-prop-is-in-iso-subobj-Subprecategory = + is-prop-type-Prop is-in-iso-subobj-prop-Subprecategory + + iso-is-in-iso-subobj-Subprecategory : + is-in-iso-subobj-Subprecategory → iso-Subprecategory C P x y + pr1 (pr1 (iso-is-in-iso-subobj-Subprecategory is-in-iso-f)) = + hom-iso-Precategory C f + pr2 (pr1 (iso-is-in-iso-subobj-Subprecategory is-in-iso-f)) = + pr1 is-in-iso-f + pr2 (iso-is-in-iso-subobj-Subprecategory is-in-iso-f) = + is-iso-is-in-is-iso-Subprecategory C P _ + ( is-iso-iso-Precategory C f) + ( pr2 is-in-iso-f) +``` + +#### The predicate on an isomorphism between any objects of being contained in the subprecategory + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (P : Subprecategory l3 l4 C) + {x y : obj-Precategory C} + (f : iso-Precategory C x y) + where + + is-in-iso-prop-Subprecategory : Prop (l3 ⊔ l4) + is-in-iso-prop-Subprecategory = + Σ-Prop + ( subobj-Subprecategory C P x) + ( λ x₀ → + Σ-Prop + ( subobj-Subprecategory C P y) + ( λ y₀ → + is-in-iso-subobj-prop-Subprecategory C P {x , x₀} {y , y₀} f)) + + is-in-iso-Subprecategory : UU (l3 ⊔ l4) + is-in-iso-Subprecategory = type-Prop is-in-iso-prop-Subprecategory + + is-prop-is-in-iso-Subprecategory : is-prop is-in-iso-Subprecategory + is-prop-is-in-iso-Subprecategory = + is-prop-type-Prop is-in-iso-prop-Subprecategory + + iso-is-in-iso-Subprecategory : + (is-in-iso-f : is-in-iso-Subprecategory) → + iso-Subprecategory C P (x , pr1 is-in-iso-f) (y , pr1 (pr2 is-in-iso-f)) + iso-is-in-iso-Subprecategory is-in-iso-f = + iso-is-in-iso-subobj-Subprecategory C P f (pr2 (pr2 is-in-iso-f)) +``` diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index 152c37859c..b6b9c60c53 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -13,6 +13,7 @@ open import category-theory.faithful-functors-precategories open import category-theory.functors-precategories open import category-theory.maps-precategories open import category-theory.precategories +open import category-theory.isomorphisms-in-precategories open import category-theory.subprecategories open import foundation.dependent-pair-types @@ -350,3 +351,49 @@ module _ is-emb-obj-inclusion-Category = is-emb-obj-inclusion-Subprecategory (precategory-Category C) P ``` + +## Lemma + +### 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)) + -- ( 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. diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index 6e4c84d6b4..5ddeb87d14 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -57,6 +57,8 @@ subhom-Precategory l4 C P₀ = subtype l4 (hom-Precategory C x y) ``` +### Categorical predicates on sub-hom-families + ```agda module _ {l1 l2 l3 l4 : Level} @@ -153,7 +155,11 @@ Subprecategory l3 l4 C = ( λ P₀ → Σ ( subhom-Precategory l4 C P₀) ( is-subprecategory C P₀)) +``` +#### Objects in subprecategories + +```agda module _ {l1 l2 l3 l4 : Level} (C : Precategory l1 l2) @@ -182,52 +188,81 @@ module _ is-in-obj-Subprecategory (inclusion-obj-Subprecategory x) is-in-obj-inclusion-obj-Subprecategory = is-in-subtype-inclusion-subtype subobj-Subprecategory +``` + +#### Morphisms in subprecategories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (P : Subprecategory l3 l4 C) + where - subhom-Subprecategory : subhom-Precategory l4 C subobj-Subprecategory + subhom-Subprecategory : subhom-Precategory l4 C (subobj-Subprecategory C P) subhom-Subprecategory = pr1 (pr2 P) subhom-subobj-Subprecategory : - (x y : obj-Subprecategory) → + (x y : obj-Subprecategory C P) → subtype l4 ( hom-Precategory C - ( inclusion-obj-Subprecategory x) - ( inclusion-obj-Subprecategory y)) + ( inclusion-obj-Subprecategory C P x) + ( inclusion-obj-Subprecategory C P y)) subhom-subobj-Subprecategory x y = subhom-Subprecategory - ( inclusion-obj-Subprecategory x) - ( inclusion-obj-Subprecategory y) - ( is-in-obj-inclusion-obj-Subprecategory x) - ( is-in-obj-inclusion-obj-Subprecategory y) + ( inclusion-obj-Subprecategory C P x) + ( inclusion-obj-Subprecategory C P y) + ( is-in-obj-inclusion-obj-Subprecategory C P x) + ( is-in-obj-inclusion-obj-Subprecategory C P y) - hom-Subprecategory : (x y : obj-Subprecategory) → UU (l2 ⊔ l4) + hom-Subprecategory : (x y : obj-Subprecategory C P) → UU (l2 ⊔ l4) hom-Subprecategory x y = type-subtype (subhom-subobj-Subprecategory x y) inclusion-hom-Subprecategory : - (x y : obj-Subprecategory) → + (x y : obj-Subprecategory C P) → hom-Subprecategory x y → hom-Precategory C - ( inclusion-obj-Subprecategory x) - ( inclusion-obj-Subprecategory y) + ( inclusion-obj-Subprecategory C P x) + ( inclusion-obj-Subprecategory C P y) inclusion-hom-Subprecategory x y = inclusion-subtype (subhom-subobj-Subprecategory x y) +``` +The predicate on a morphism between subobjects of being contained in the +subprecategory: + +```agda is-in-hom-subobj-Subprecategory : - ( x y : obj-Subprecategory) - ( f : - hom-Precategory C - ( inclusion-obj-Subprecategory x) - ( inclusion-obj-Subprecategory y)) → + ( x y : obj-Subprecategory C P) → + hom-Precategory C + ( inclusion-obj-Subprecategory C P x) + ( inclusion-obj-Subprecategory C P y) → UU l4 is-in-hom-subobj-Subprecategory x y = is-in-subtype (subhom-subobj-Subprecategory x y) + is-prop-is-in-hom-subobj-Subprecategory : + ( x y : obj-Subprecategory C P) + ( f : + hom-Precategory C + ( inclusion-obj-Subprecategory C P x) + ( inclusion-obj-Subprecategory C P y)) → + is-prop (is-in-hom-subobj-Subprecategory x y f) + is-prop-is-in-hom-subobj-Subprecategory x y = + is-prop-is-in-subtype (subhom-subobj-Subprecategory x y) +``` + +The predicate on a morphism between any objects of being contained in the +subprecategory: + +```agda is-in-hom-Subprecategory : (x y : obj-Precategory C) (f : hom-Precategory C x y) → UU (l3 ⊔ l4) is-in-hom-Subprecategory x y f = - Σ ( is-in-obj-Subprecategory x) + Σ ( is-in-obj-Subprecategory C P x) ( λ x₀ → - Σ ( is-in-obj-Subprecategory y) + Σ ( is-in-obj-Subprecategory C P y) ( λ y₀ → is-in-subtype (subhom-Subprecategory x y x₀ y₀) f)) is-prop-is-in-hom-Subprecategory : @@ -235,47 +270,57 @@ module _ is-prop (is-in-hom-Subprecategory x y f) is-prop-is-in-hom-Subprecategory x y f = is-prop-Σ - ( is-prop-is-in-obj-Subprecategory x) + ( is-prop-is-in-obj-Subprecategory C P x) ( λ x₀ → is-prop-Σ - ( is-prop-is-in-obj-Subprecategory y) - ( λ y₀ → - is-prop-is-in-subtype (subhom-Subprecategory x y x₀ y₀) f)) + ( is-prop-is-in-obj-Subprecategory C P y) + ( λ y₀ → is-prop-is-in-hom-subobj-Subprecategory (x , x₀) (y , y₀) f)) + + is-in-hom-subobj-inclusion-hom-Subprecategory : + (x y : obj-Subprecategory C P) + (f : hom-Subprecategory x y) → + is-in-hom-subobj-Subprecategory x y (inclusion-hom-Subprecategory x y f) + is-in-hom-subobj-inclusion-hom-Subprecategory x y f = pr2 f is-in-hom-inclusion-hom-Subprecategory : - (x y : obj-Subprecategory) + (x y : obj-Subprecategory C P) (f : hom-Subprecategory x y) → is-in-hom-Subprecategory - ( inclusion-obj-Subprecategory x) - ( inclusion-obj-Subprecategory y) + ( inclusion-obj-Subprecategory C P x) + ( inclusion-obj-Subprecategory C P y) ( inclusion-hom-Subprecategory x y f) pr1 (is-in-hom-inclusion-hom-Subprecategory x y f) = - is-in-obj-inclusion-obj-Subprecategory x + is-in-obj-inclusion-obj-Subprecategory C P x pr1 (pr2 (is-in-hom-inclusion-hom-Subprecategory x y f)) = - is-in-obj-inclusion-obj-Subprecategory y - pr2 (pr2 (is-in-hom-inclusion-hom-Subprecategory x y f)) = pr2 f + is-in-obj-inclusion-obj-Subprecategory C P y + pr2 (pr2 (is-in-hom-inclusion-hom-Subprecategory x y f)) = + is-in-hom-subobj-inclusion-hom-Subprecategory x y f +``` +Subprecategories are subprecategories: + +```agda is-subprecategory-Subprecategory : - is-subprecategory C subobj-Subprecategory subhom-Subprecategory + is-subprecategory C (subobj-Subprecategory C P) subhom-Subprecategory is-subprecategory-Subprecategory = pr2 (pr2 P) contains-id-Subprecategory : contains-id-subtype-Precategory C - ( subobj-Subprecategory) + ( subobj-Subprecategory C P) ( subhom-Subprecategory) contains-id-Subprecategory = contains-id-is-subprecategory C - ( subobj-Subprecategory) + ( subobj-Subprecategory C P) ( subhom-Subprecategory) ( is-subprecategory-Subprecategory) is-closed-under-composition-Subprecategory : is-closed-under-composition-subtype-Precategory C - ( subobj-Subprecategory) + ( subobj-Subprecategory C P) ( subhom-Subprecategory) is-closed-under-composition-Subprecategory = is-closed-under-composition-is-subprecategory C - ( subobj-Subprecategory) + ( subobj-Subprecategory C P) ( subhom-Subprecategory) ( is-subprecategory-Subprecategory) ``` @@ -407,25 +452,6 @@ module _ is-unital-composition-operation-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) -``` - ### The inclusion functor of a subprecategory ```agda @@ -493,47 +519,3 @@ module _ is-emb-obj-inclusion-Subprecategory = is-emb-inclusion-subtype (subobj-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)) - -- ( 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 95702a3e78da5b3083a69b86b592eb51d70cb585 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 15:26:12 +0200 Subject: [PATCH 26/49] replete subprecategories --- src/category-theory.lagda.md | 2 + .../isomorphisms-in-subprecategories.lagda.md | 2 +- .../replete-subprecategories.lagda.md | 136 ++++++++++++++++++ src/category-theory/subcategories.lagda.md | 2 +- ...ting-pentagons-of-identifications.lagda.md | 3 +- 5 files changed, 142 insertions(+), 3 deletions(-) create mode 100644 src/category-theory/replete-subprecategories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index b896687e21..b81409da06 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -71,6 +71,7 @@ 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 open import category-theory.isomorphisms-in-precategories public +open import category-theory.isomorphisms-in-subprecategories public open import category-theory.large-categories public open import category-theory.large-function-categories public open import category-theory.large-function-precategories public @@ -112,6 +113,7 @@ 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 +open import category-theory.replete-subprecategories public open import category-theory.representable-functors-categories public open import category-theory.representable-functors-large-precategories public open import category-theory.representable-functors-precategories public diff --git a/src/category-theory/isomorphisms-in-subprecategories.lagda.md b/src/category-theory/isomorphisms-in-subprecategories.lagda.md index 1f0e08754c..7631e22d01 100644 --- a/src/category-theory/isomorphisms-in-subprecategories.lagda.md +++ b/src/category-theory/isomorphisms-in-subprecategories.lagda.md @@ -14,8 +14,8 @@ open import category-theory.functors-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.subprecategories 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/replete-subprecategories.lagda.md b/src/category-theory/replete-subprecategories.lagda.md new file mode 100644 index 0000000000..2ddd815894 --- /dev/null +++ b/src/category-theory/replete-subprecategories.lagda.md @@ -0,0 +1,136 @@ +# Replete subprecategories + +```agda +module category-theory.replete-subprecategories where +``` + +
Imports + +```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.maps-precategories +open import category-theory.isomorphisms-in-precategories +open import category-theory.isomorphisms-in-subprecategories +open import category-theory.precategories +open import category-theory.subprecategories + +open import foundation.dependent-pair-types +open import foundation.embeddings +open import foundation.iterated-dependent-product-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 **replete subprecategory** of a [precategory](category-theory.categories.md) +`C` is a [subprecategory](category-theory.subprecategories.md) `P` that is +closed under [isomorphisms](category-theory.isomorphisms-in-precategories.md): + +Given an object `x` in `P`, then every isomorphism `f : x ≅ y` in `C`, is +contained in `P`. + +## Definitions + +### The predicate on a subprecategory of being closed under isomorphic objects + +We can define what it means for subprecategories to have objects that are closed +under isomorphisms. Note, however, that this is not yet the correct definition +of a replete subprecategory. + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (P : Subprecategory l3 l4 C) + where + + contains-iso-obj-Subprecategory : UU (l1 ⊔ l2 ⊔ l3) + contains-iso-obj-Subprecategory = + (x : obj-Subprecategory C P) (y : obj-Precategory C) → + iso-Precategory C (inclusion-obj-Subprecategory C P x) y → + is-in-obj-Subprecategory C P y + + is-prop-contains-iso-obj-Subprecategory : + is-prop contains-iso-obj-Subprecategory + is-prop-contains-iso-obj-Subprecategory = + is-prop-iterated-Π 3 (λ x y f → is-prop-is-in-obj-Subprecategory C P y) + + contains-iso-obj-prop-Subprecategory : Prop (l1 ⊔ l2 ⊔ l3) + pr1 contains-iso-obj-prop-Subprecategory = contains-iso-obj-Subprecategory + pr2 contains-iso-obj-prop-Subprecategory = is-prop-contains-iso-obj-Subprecategory +``` + +### The predicate of being a replete subprecategory + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (P : Subprecategory l3 l4 C) + where + + is-replete-Subprecategory : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) + is-replete-Subprecategory = + (x : obj-Subprecategory C P) + (y : obj-Precategory C) + (f : iso-Precategory C (inclusion-obj-Subprecategory C P x) y) → + Σ ( is-in-obj-Subprecategory C P y) + ( λ y₀ → is-in-iso-subobj-Subprecategory C P {x} {y , y₀} f) + + is-prop-is-replete-Subprecategory : is-prop (is-replete-Subprecategory) + is-prop-is-replete-Subprecategory = + is-prop-iterated-Π 3 + ( λ x y f → + is-prop-Σ + ( is-prop-is-in-obj-Subprecategory C P y) + ( λ y₀ → is-prop-is-in-iso-subobj-Subprecategory C P {x} {y , y₀} f)) + + is-replete-prop-Subprecategory : Prop (l1 ⊔ l2 ⊔ l3 ⊔ l4) + pr1 is-replete-prop-Subprecategory = is-replete-Subprecategory + pr2 is-replete-prop-Subprecategory = is-prop-is-replete-Subprecategory +``` + +### Replete subprecategories + +```agda +Replete-Subprecategory : + {l1 l2 : Level} (l3 l4 : Level) + (C : Precategory l1 l2) → + UU (l1 ⊔ l2 ⊔ lsuc l3 ⊔ lsuc l4) +Replete-Subprecategory l3 l4 C = + Σ (Subprecategory l3 l4 C) (is-replete-Subprecategory C) + +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (P : Replete-Subprecategory l3 l4 C) + where + + subprecategory-Replete-Subprecategory : Subprecategory l3 l4 C + subprecategory-Replete-Subprecategory = pr1 P + + is-replete-Replete-Subprecategory : + is-replete-Subprecategory C subprecategory-Replete-Subprecategory + is-replete-Replete-Subprecategory = pr2 P +``` + +## See also + +- Every [subcategory](category-theory.subcategories.md) of a + [category](category-theory.categories.md) is replete. + +## External links + +- [replete subcategory](https://ncatlab.org/nlab/show/replete+replete-subprecategory) + at nlab +- [Isomorphism-closed subcategory](https://en.wikipedia.org/wiki/Isomorphism-closed_subcategory) + at Wikipedia diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index b6b9c60c53..f987c36fb7 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -11,9 +11,9 @@ 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.isomorphisms-in-precategories open import category-theory.maps-precategories open import category-theory.precategories -open import category-theory.isomorphisms-in-precategories open import category-theory.subprecategories open import foundation.dependent-pair-types diff --git a/src/foundation/commuting-pentagons-of-identifications.lagda.md b/src/foundation/commuting-pentagons-of-identifications.lagda.md index 61fcef98f6..281b6563d1 100644 --- a/src/foundation/commuting-pentagons-of-identifications.lagda.md +++ b/src/foundation/commuting-pentagons-of-identifications.lagda.md @@ -50,6 +50,7 @@ module _ (top : x = y) (top-left : x = z) (top-right : y = w) (bottom-left : z = v) (bottom-right : w = v) → UU l - coherence-pentagon-identifications top top-left top-right bottom-left bottom-right = + coherence-pentagon-identifications + top top-left top-right bottom-left bottom-right = top-left ∙ bottom-left = (top ∙ top-right) ∙ bottom-right ``` From f3ee42235a6bfa72509bba16e4e8b7af128b7d0b Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 15:33:40 +0200 Subject: [PATCH 27/49] change naming `subobj` --- .../full-subcategories.lagda.md | 6 +- .../full-subprecategories.lagda.md | 16 +-- .../isomorphisms-in-subprecategories.lagda.md | 52 +++++----- .../large-subprecategories.lagda.md | 26 ++--- .../replete-subprecategories.lagda.md | 13 ++- src/category-theory/subcategories.lagda.md | 42 ++++---- src/category-theory/subprecategories.lagda.md | 99 ++++++++++--------- 7 files changed, 134 insertions(+), 120 deletions(-) diff --git a/src/category-theory/full-subcategories.lagda.md b/src/category-theory/full-subcategories.lagda.md index a3a24c72d4..a6e55047bc 100644 --- a/src/category-theory/full-subcategories.lagda.md +++ b/src/category-theory/full-subcategories.lagda.md @@ -52,9 +52,9 @@ module _ (P : Full-Subcategory l3 C) where - subobj-Full-Subcategory : subtype l3 (obj-Category C) - subobj-Full-Subcategory = - subobj-Full-Subprecategory (precategory-Category C) P + subtype-obj-Full-Subcategory : subtype l3 (obj-Category C) + subtype-obj-Full-Subcategory = + subtype-obj-Full-Subprecategory (precategory-Category C) P obj-Full-Subcategory : UU (l1 ⊔ l3) obj-Full-Subcategory = obj-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 09714817b5..96cc1399f8 100644 --- a/src/category-theory/full-subprecategories.lagda.md +++ b/src/category-theory/full-subprecategories.lagda.md @@ -58,30 +58,30 @@ module _ (P : Full-Subprecategory l3 C) where - subobj-Full-Subprecategory : subtype l3 (obj-Precategory C) - subobj-Full-Subprecategory = P + 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 subobj-Full-Subprecategory + 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 subobj-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 subobj-Full-Subprecategory + 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 subobj-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 subobj-Full-Subprecategory + is-in-subtype-inclusion-subtype subtype-obj-Full-Subprecategory ``` ### The underlying precategory of a full subprecategory @@ -279,7 +279,7 @@ module _ ( C) ( inclusion-Full-Subprecategory C P)) is-emb-obj-inclusion-Full-Subprecategory = - is-emb-inclusion-subtype (subobj-Full-Subprecategory C P) + is-emb-inclusion-subtype (subtype-obj-Full-Subprecategory C P) is-embedding-inclusion-Full-Subprecategory : is-embedding-functor-Precategory diff --git a/src/category-theory/isomorphisms-in-subprecategories.lagda.md b/src/category-theory/isomorphisms-in-subprecategories.lagda.md index 7631e22d01..071a3f8d61 100644 --- a/src/category-theory/isomorphisms-in-subprecategories.lagda.md +++ b/src/category-theory/isomorphisms-in-subprecategories.lagda.md @@ -66,7 +66,8 @@ module _ is-in-is-iso-prop-Subprecategory : Prop l4 is-in-is-iso-prop-Subprecategory = - subhom-subobj-Subprecategory C P y x (hom-inv-is-iso-Precategory C is-iso-f) + subtype-hom-obj-subprecategory-Subprecategory C P y x + ( hom-inv-is-iso-Precategory C is-iso-f) is-in-is-iso-Subprecategory : UU l4 is-in-is-iso-Subprecategory = @@ -82,9 +83,13 @@ module _ hom-inv-is-iso-Precategory C is-iso-f pr2 (pr1 (is-iso-is-in-is-iso-Subprecategory is-in-is-iso-f)) = is-in-is-iso-f pr1 (pr2 (is-iso-is-in-is-iso-Subprecategory is-in-is-iso-f)) = - eq-type-subtype (subhom-subobj-Subprecategory C P y y) (pr1 (pr2 is-iso-f)) + eq-type-subtype + ( subtype-hom-obj-subprecategory-Subprecategory C P y y) + ( pr1 (pr2 is-iso-f)) pr2 (pr2 (is-iso-is-in-is-iso-Subprecategory is-in-is-iso-f)) = - eq-type-subtype (subhom-subobj-Subprecategory C P x x) (pr2 (pr2 is-iso-f)) + eq-type-subtype + ( subtype-hom-obj-subprecategory-Subprecategory C P x x) + ( pr2 (pr2 is-iso-f)) ``` #### The predicate on an isomorphism between objects in the subprecategory of being contained in the subprecategory @@ -101,31 +106,32 @@ module _ ( inclusion-obj-Subprecategory C P y)) where - is-in-iso-subobj-prop-Subprecategory : Prop l4 - is-in-iso-subobj-prop-Subprecategory = + is-in-iso-obj-subprecategory-prop-Subprecategory : Prop l4 + is-in-iso-obj-subprecategory-prop-Subprecategory = Σ-Prop - ( subhom-subobj-Subprecategory C P x y (hom-iso-Precategory C f)) + ( subtype-hom-obj-subprecategory-Subprecategory C P x y + ( hom-iso-Precategory C f)) ( λ f₀ → is-in-is-iso-prop-Subprecategory C P ( hom-iso-Precategory C f , f₀) ( is-iso-iso-Precategory C f)) - is-in-iso-subobj-Subprecategory : UU l4 - is-in-iso-subobj-Subprecategory = - type-Prop is-in-iso-subobj-prop-Subprecategory + is-in-iso-obj-subprecategory-Subprecategory : UU l4 + is-in-iso-obj-subprecategory-Subprecategory = + type-Prop is-in-iso-obj-subprecategory-prop-Subprecategory - is-prop-is-in-iso-subobj-Subprecategory : - is-prop is-in-iso-subobj-Subprecategory - is-prop-is-in-iso-subobj-Subprecategory = - is-prop-type-Prop is-in-iso-subobj-prop-Subprecategory + is-prop-is-in-iso-obj-subprecategory-Subprecategory : + is-prop is-in-iso-obj-subprecategory-Subprecategory + is-prop-is-in-iso-obj-subprecategory-Subprecategory = + is-prop-type-Prop is-in-iso-obj-subprecategory-prop-Subprecategory - iso-is-in-iso-subobj-Subprecategory : - is-in-iso-subobj-Subprecategory → iso-Subprecategory C P x y - pr1 (pr1 (iso-is-in-iso-subobj-Subprecategory is-in-iso-f)) = + iso-is-in-iso-obj-subprecategory-Subprecategory : + is-in-iso-obj-subprecategory-Subprecategory → iso-Subprecategory C P x y + pr1 (pr1 (iso-is-in-iso-obj-subprecategory-Subprecategory is-in-iso-f)) = hom-iso-Precategory C f - pr2 (pr1 (iso-is-in-iso-subobj-Subprecategory is-in-iso-f)) = + pr2 (pr1 (iso-is-in-iso-obj-subprecategory-Subprecategory is-in-iso-f)) = pr1 is-in-iso-f - pr2 (iso-is-in-iso-subobj-Subprecategory is-in-iso-f) = + pr2 (iso-is-in-iso-obj-subprecategory-Subprecategory is-in-iso-f) = is-iso-is-in-is-iso-Subprecategory C P _ ( is-iso-iso-Precategory C f) ( pr2 is-in-iso-f) @@ -145,12 +151,13 @@ module _ is-in-iso-prop-Subprecategory : Prop (l3 ⊔ l4) is-in-iso-prop-Subprecategory = Σ-Prop - ( subobj-Subprecategory C P x) + ( subtype-obj-Subprecategory C P x) ( λ x₀ → Σ-Prop - ( subobj-Subprecategory C P y) + ( subtype-obj-Subprecategory C P y) ( λ y₀ → - is-in-iso-subobj-prop-Subprecategory C P {x , x₀} {y , y₀} f)) + is-in-iso-obj-subprecategory-prop-Subprecategory C P + { x , x₀} {y , y₀} f)) is-in-iso-Subprecategory : UU (l3 ⊔ l4) is-in-iso-Subprecategory = type-Prop is-in-iso-prop-Subprecategory @@ -163,5 +170,6 @@ module _ (is-in-iso-f : is-in-iso-Subprecategory) → iso-Subprecategory C P (x , pr1 is-in-iso-f) (y , pr1 (pr2 is-in-iso-f)) iso-is-in-iso-Subprecategory is-in-iso-f = - iso-is-in-iso-subobj-Subprecategory C P f (pr2 (pr2 is-in-iso-f)) + iso-is-in-iso-obj-subprecategory-Subprecategory C P f + ( pr2 (pr2 is-in-iso-f)) ``` diff --git a/src/category-theory/large-subprecategories.lagda.md b/src/category-theory/large-subprecategories.lagda.md index 13de3e41aa..efeeebbc58 100644 --- a/src/category-theory/large-subprecategories.lagda.md +++ b/src/category-theory/large-subprecategories.lagda.md @@ -50,19 +50,19 @@ module _ Large-Subprecategory : UUω where field - subobj-Large-Subprecategory : + subtype-obj-Large-Subprecategory : (l : Level) → subtype (γ l) (obj-Large-Precategory C l) - subhom-Large-Subprecategory : + subtype-hom-Large-Subprecategory : {l1 l2 : Level} (X : obj-Large-Precategory C l1) (Y : obj-Large-Precategory C l2) → - is-in-subtype (subobj-Large-Subprecategory l1) X → - is-in-subtype (subobj-Large-Subprecategory l2) Y → + is-in-subtype (subtype-obj-Large-Subprecategory l1) X → + is-in-subtype (subtype-obj-Large-Subprecategory l2) Y → subtype (β l1 l2) (hom-Large-Precategory C X Y) contains-id-Large-Subprecategory : {l1 : Level} (X : obj-Large-Precategory C l1) → - (H : is-in-subtype (subobj-Large-Subprecategory l1) X) → + (H : is-in-subtype (subtype-obj-Large-Subprecategory l1) X) → is-in-subtype - ( subhom-Large-Subprecategory X X H H) + ( subtype-hom-Large-Subprecategory X X H H) ( id-hom-Large-Precategory C) is-closed-under-composition-Large-Subprecategory : {l1 l2 l3 : Level} @@ -71,13 +71,13 @@ module _ (Z : obj-Large-Precategory C l3) (g : hom-Large-Precategory C Y Z) (f : hom-Large-Precategory C X Y) → - (K : is-in-subtype (subobj-Large-Subprecategory l1) X) → - (L : is-in-subtype (subobj-Large-Subprecategory l2) Y) → - (M : is-in-subtype (subobj-Large-Subprecategory l3) Z) → - is-in-subtype (subhom-Large-Subprecategory Y Z L M) g → - is-in-subtype (subhom-Large-Subprecategory X Y K L) f → + (K : is-in-subtype (subtype-obj-Large-Subprecategory l1) X) → + (L : is-in-subtype (subtype-obj-Large-Subprecategory l2) Y) → + (M : is-in-subtype (subtype-obj-Large-Subprecategory l3) Z) → + is-in-subtype (subtype-hom-Large-Subprecategory Y Z L M) g → + is-in-subtype (subtype-hom-Large-Subprecategory X Y K L) f → is-in-subtype - ( subhom-Large-Subprecategory X Z K M) + ( subtype-hom-Large-Subprecategory X Z K M) ( comp-hom-Large-Precategory C g f) open Large-Subprecategory public @@ -92,5 +92,5 @@ module _ is-in-obj-Large-Subprecategory : {l : Level} → obj-Large-Precategory C l → UU (γ l) is-in-obj-Large-Subprecategory = - is-in-subtype (subobj-Large-Subprecategory P _) + is-in-subtype (subtype-obj-Large-Subprecategory P _) ``` diff --git a/src/category-theory/replete-subprecategories.lagda.md b/src/category-theory/replete-subprecategories.lagda.md index 2ddd815894..7a1d6463aa 100644 --- a/src/category-theory/replete-subprecategories.lagda.md +++ b/src/category-theory/replete-subprecategories.lagda.md @@ -11,16 +11,16 @@ 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.maps-precategories open import category-theory.isomorphisms-in-precategories open import category-theory.isomorphisms-in-subprecategories +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.iterated-dependent-product-types open import foundation.identity-types +open import foundation.iterated-dependent-product-types open import foundation.propositions open import foundation.sets open import foundation.subtypes @@ -66,7 +66,8 @@ module _ contains-iso-obj-prop-Subprecategory : Prop (l1 ⊔ l2 ⊔ l3) pr1 contains-iso-obj-prop-Subprecategory = contains-iso-obj-Subprecategory - pr2 contains-iso-obj-prop-Subprecategory = is-prop-contains-iso-obj-Subprecategory + pr2 contains-iso-obj-prop-Subprecategory = + is-prop-contains-iso-obj-Subprecategory ``` ### The predicate of being a replete subprecategory @@ -84,7 +85,7 @@ module _ (y : obj-Precategory C) (f : iso-Precategory C (inclusion-obj-Subprecategory C P x) y) → Σ ( is-in-obj-Subprecategory C P y) - ( λ y₀ → is-in-iso-subobj-Subprecategory C P {x} {y , y₀} f) + ( λ y₀ → is-in-iso-obj-subprecategory-Subprecategory C P {x} {y , y₀} f) is-prop-is-replete-Subprecategory : is-prop (is-replete-Subprecategory) is-prop-is-replete-Subprecategory = @@ -92,7 +93,9 @@ module _ ( λ x y f → is-prop-Σ ( is-prop-is-in-obj-Subprecategory C P y) - ( λ y₀ → is-prop-is-in-iso-subobj-Subprecategory C P {x} {y , y₀} f)) + ( λ y₀ → + is-prop-is-in-iso-obj-subprecategory-Subprecategory C P + { x} {y , y₀} f)) is-replete-prop-Subprecategory : Prop (l1 ⊔ l2 ⊔ l3 ⊔ l4) pr1 is-replete-prop-Subprecategory = is-replete-Subprecategory diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index f987c36fb7..a164b97ea5 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -49,7 +49,7 @@ module _ {l1 l2 l3 l4 : Level} (C : Category l1 l2) (P₀ : subtype l3 (obj-Category C)) - (P₁ : subhom-Precategory l4 (precategory-Category C) P₀) + (P₁ : subtype-hom-Precategory l4 (precategory-Category C) P₀) where contains-id-subtype-Category : UU (l1 ⊔ l3 ⊔ l4) @@ -89,7 +89,7 @@ module _ {l1 l2 l3 l4 : Level} (C : Category l1 l2) (P₀ : subtype l3 (obj-Category C)) - (P₁ : subhom-Precategory l4 (precategory-Category C) P₀) + (P₁ : subtype-hom-Precategory l4 (precategory-Category C) P₀) where is-subcategory-Prop : Prop (l1 ⊔ l2 ⊔ l3 ⊔ l4) @@ -126,31 +126,31 @@ module _ (P : Subcategory l3 l4 C) where - subobj-Subcategory : subtype l3 (obj-Category C) - subobj-Subcategory = pr1 P + subtype-obj-Subcategory : subtype l3 (obj-Category C) + subtype-obj-Subcategory = pr1 P obj-Subcategory : UU (l1 ⊔ l3) - obj-Subcategory = type-subtype subobj-Subcategory + obj-Subcategory = type-subtype subtype-obj-Subcategory inclusion-obj-Subcategory : obj-Subcategory → obj-Category C - inclusion-obj-Subcategory = inclusion-subtype subobj-Subcategory + 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 subobj-Subcategory + 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 subobj-Subcategory + 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) is-in-obj-inclusion-obj-Subcategory = - is-in-subtype-inclusion-subtype subobj-Subcategory + is-in-subtype-inclusion-subtype subtype-obj-Subcategory - subhom-Subcategory : - subhom-Precategory l4 (precategory-Category C) subobj-Subcategory - subhom-Subcategory = pr1 (pr2 P) + subtype-hom-Subcategory : + subtype-hom-Precategory l4 (precategory-Category C) subtype-obj-Subcategory + subtype-hom-Subcategory = pr1 (pr2 P) hom-Subcategory : (x y : obj-Subcategory) → UU (l2 ⊔ l4) hom-Subcategory = hom-Subprecategory (precategory-Category C) P @@ -166,13 +166,13 @@ module _ 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 (subhom-Subcategory x y) + 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 (subhom-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) → @@ -184,20 +184,20 @@ module _ is-in-hom-inclusion-hom-Subprecategory (precategory-Category C) P is-subcategory-Subcategory : - is-subcategory C subobj-Subcategory subhom-Subcategory + is-subcategory C subtype-obj-Subcategory subtype-hom-Subcategory is-subcategory-Subcategory = pr2 (pr2 P) contains-id-Subcategory : contains-id-subtype-Category C - ( subobj-Subcategory) - ( subhom-Subcategory) + ( 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 - ( subobj-Subcategory) - ( subhom-Subcategory) + ( subtype-obj-Subcategory) + ( subtype-hom-Subcategory) is-closed-under-composition-Subcategory = is-closed-under-composition-Subprecategory (precategory-Category C) P ``` @@ -352,9 +352,7 @@ module _ is-emb-obj-inclusion-Subprecategory (precategory-Category C) P ``` -## Lemma - -### Subprecategories of categories are categories +### Subprecategories of categories are replete ```agda module _ diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index 5ddeb87d14..0bd6dc1ddc 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -48,11 +48,11 @@ objects in `P₀` and is closed under composition. ### Sub-hom-families ```agda -subhom-Precategory : +subtype-hom-Precategory : {l1 l2 l3 : Level} (l4 : Level) (C : Precategory l1 l2) (P₀ : subtype l3 (obj-Precategory C)) → UU (l1 ⊔ l2 ⊔ l3 ⊔ lsuc l4) -subhom-Precategory l4 C P₀ = +subtype-hom-Precategory l4 C P₀ = (x y : obj-Precategory C) → is-in-subtype P₀ x → is-in-subtype P₀ y → subtype l4 (hom-Precategory C x y) ``` @@ -64,7 +64,7 @@ module _ {l1 l2 l3 l4 : Level} (C : Precategory l1 l2) (P₀ : subtype l3 (obj-Precategory C)) - (P₁ : subhom-Precategory l4 C P₀) + (P₁ : subtype-hom-Precategory l4 C P₀) where contains-id-subtype-Precategory : UU (l1 ⊔ l3 ⊔ l4) @@ -119,7 +119,7 @@ module _ {l1 l2 l3 l4 : Level} (C : Precategory l1 l2) (P₀ : subtype l3 (obj-Precategory C)) - (P₁ : subhom-Precategory l4 C P₀) + (P₁ : subtype-hom-Precategory l4 C P₀) where is-subprecategory-Prop : Prop (l1 ⊔ l2 ⊔ l3 ⊔ l4) @@ -153,7 +153,7 @@ Subprecategory : Subprecategory l3 l4 C = Σ ( subtype l3 (obj-Precategory C)) ( λ P₀ → - Σ ( subhom-Precategory l4 C P₀) + Σ ( subtype-hom-Precategory l4 C P₀) ( is-subprecategory C P₀)) ``` @@ -166,28 +166,28 @@ module _ (P : Subprecategory l3 l4 C) where - subobj-Subprecategory : subtype l3 (obj-Precategory C) - subobj-Subprecategory = pr1 P + subtype-obj-Subprecategory : subtype l3 (obj-Precategory C) + subtype-obj-Subprecategory = pr1 P obj-Subprecategory : UU (l1 ⊔ l3) - obj-Subprecategory = type-subtype subobj-Subprecategory + obj-Subprecategory = type-subtype subtype-obj-Subprecategory inclusion-obj-Subprecategory : obj-Subprecategory → obj-Precategory C - inclusion-obj-Subprecategory = inclusion-subtype subobj-Subprecategory + inclusion-obj-Subprecategory = inclusion-subtype subtype-obj-Subprecategory is-in-obj-Subprecategory : (x : obj-Precategory C) → UU l3 - is-in-obj-Subprecategory = is-in-subtype subobj-Subprecategory + 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 subobj-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) is-in-obj-inclusion-obj-Subprecategory = - is-in-subtype-inclusion-subtype subobj-Subprecategory + is-in-subtype-inclusion-subtype subtype-obj-Subprecategory ``` #### Morphisms in subprecategories @@ -199,17 +199,18 @@ module _ (P : Subprecategory l3 l4 C) where - subhom-Subprecategory : subhom-Precategory l4 C (subobj-Subprecategory C P) - subhom-Subprecategory = pr1 (pr2 P) + subtype-hom-Subprecategory : + subtype-hom-Precategory l4 C (subtype-obj-Subprecategory C P) + subtype-hom-Subprecategory = pr1 (pr2 P) - subhom-subobj-Subprecategory : + subtype-hom-obj-subprecategory-Subprecategory : (x y : obj-Subprecategory C P) → subtype l4 ( hom-Precategory C ( inclusion-obj-Subprecategory C P x) ( inclusion-obj-Subprecategory C P y)) - subhom-subobj-Subprecategory x y = - subhom-Subprecategory + subtype-hom-obj-subprecategory-Subprecategory x y = + subtype-hom-Subprecategory ( inclusion-obj-Subprecategory C P x) ( inclusion-obj-Subprecategory C P y) ( is-in-obj-inclusion-obj-Subprecategory C P x) @@ -217,7 +218,7 @@ module _ hom-Subprecategory : (x y : obj-Subprecategory C P) → UU (l2 ⊔ l4) hom-Subprecategory x y = - type-subtype (subhom-subobj-Subprecategory x y) + type-subtype (subtype-hom-obj-subprecategory-Subprecategory x y) inclusion-hom-Subprecategory : (x y : obj-Subprecategory C P) → @@ -226,31 +227,31 @@ module _ ( inclusion-obj-Subprecategory C P x) ( inclusion-obj-Subprecategory C P y) inclusion-hom-Subprecategory x y = - inclusion-subtype (subhom-subobj-Subprecategory x y) + inclusion-subtype (subtype-hom-obj-subprecategory-Subprecategory x y) ``` The predicate on a morphism between subobjects of being contained in the subprecategory: ```agda - is-in-hom-subobj-Subprecategory : + is-in-hom-obj-subprecategory-Subprecategory : ( x y : obj-Subprecategory C P) → hom-Precategory C ( inclusion-obj-Subprecategory C P x) ( inclusion-obj-Subprecategory C P y) → UU l4 - is-in-hom-subobj-Subprecategory x y = - is-in-subtype (subhom-subobj-Subprecategory x y) + is-in-hom-obj-subprecategory-Subprecategory x y = + is-in-subtype (subtype-hom-obj-subprecategory-Subprecategory x y) - is-prop-is-in-hom-subobj-Subprecategory : + is-prop-is-in-hom-obj-subprecategory-Subprecategory : ( x y : obj-Subprecategory C P) ( f : hom-Precategory C ( inclusion-obj-Subprecategory C P x) ( inclusion-obj-Subprecategory C P y)) → - is-prop (is-in-hom-subobj-Subprecategory x y f) - is-prop-is-in-hom-subobj-Subprecategory x y = - is-prop-is-in-subtype (subhom-subobj-Subprecategory x y) + is-prop (is-in-hom-obj-subprecategory-Subprecategory x y f) + is-prop-is-in-hom-obj-subprecategory-Subprecategory x y = + is-prop-is-in-subtype (subtype-hom-obj-subprecategory-Subprecategory x y) ``` The predicate on a morphism between any objects of being contained in the @@ -263,7 +264,7 @@ subprecategory: Σ ( is-in-obj-Subprecategory C P x) ( λ x₀ → Σ ( is-in-obj-Subprecategory C P y) - ( λ y₀ → is-in-subtype (subhom-Subprecategory x y x₀ y₀) f)) + ( λ y₀ → is-in-subtype (subtype-hom-Subprecategory x y x₀ y₀) f)) is-prop-is-in-hom-Subprecategory : (x y : obj-Precategory C) (f : hom-Precategory C x y) → @@ -274,13 +275,16 @@ subprecategory: ( λ x₀ → is-prop-Σ ( is-prop-is-in-obj-Subprecategory C P y) - ( λ y₀ → is-prop-is-in-hom-subobj-Subprecategory (x , x₀) (y , y₀) f)) + ( λ y₀ → + is-prop-is-in-hom-obj-subprecategory-Subprecategory + ( x , x₀) (y , y₀) f)) - is-in-hom-subobj-inclusion-hom-Subprecategory : + is-in-hom-obj-subprecategory-inclusion-hom-Subprecategory : (x y : obj-Subprecategory C P) (f : hom-Subprecategory x y) → - is-in-hom-subobj-Subprecategory x y (inclusion-hom-Subprecategory x y f) - is-in-hom-subobj-inclusion-hom-Subprecategory x y f = pr2 f + is-in-hom-obj-subprecategory-Subprecategory x y + ( inclusion-hom-Subprecategory x y f) + is-in-hom-obj-subprecategory-inclusion-hom-Subprecategory x y f = pr2 f is-in-hom-inclusion-hom-Subprecategory : (x y : obj-Subprecategory C P) @@ -294,34 +298,35 @@ subprecategory: pr1 (pr2 (is-in-hom-inclusion-hom-Subprecategory x y f)) = is-in-obj-inclusion-obj-Subprecategory C P y pr2 (pr2 (is-in-hom-inclusion-hom-Subprecategory x y f)) = - is-in-hom-subobj-inclusion-hom-Subprecategory x y f + is-in-hom-obj-subprecategory-inclusion-hom-Subprecategory x y f ``` Subprecategories are subprecategories: ```agda is-subprecategory-Subprecategory : - is-subprecategory C (subobj-Subprecategory C P) subhom-Subprecategory + is-subprecategory C + ( subtype-obj-Subprecategory C P) (subtype-hom-Subprecategory) is-subprecategory-Subprecategory = pr2 (pr2 P) contains-id-Subprecategory : contains-id-subtype-Precategory C - ( subobj-Subprecategory C P) - ( subhom-Subprecategory) + ( subtype-obj-Subprecategory C P) + ( subtype-hom-Subprecategory) contains-id-Subprecategory = contains-id-is-subprecategory C - ( subobj-Subprecategory C P) - ( subhom-Subprecategory) + ( subtype-obj-Subprecategory C P) + ( subtype-hom-Subprecategory) ( is-subprecategory-Subprecategory) is-closed-under-composition-Subprecategory : is-closed-under-composition-subtype-Precategory C - ( subobj-Subprecategory C P) - ( subhom-Subprecategory) + ( subtype-obj-Subprecategory C P) + ( subtype-hom-Subprecategory) is-closed-under-composition-Subprecategory = is-closed-under-composition-is-subprecategory C - ( subobj-Subprecategory C P) - ( subhom-Subprecategory) + ( subtype-obj-Subprecategory C P) + ( subtype-hom-Subprecategory) ( is-subprecategory-Subprecategory) ``` @@ -340,7 +345,7 @@ module _ ( hom-set-Precategory C ( inclusion-obj-Subprecategory C P x) ( inclusion-obj-Subprecategory C P y)) - ( subhom-subobj-Subprecategory C P x y) + ( subtype-hom-obj-subprecategory-Subprecategory C P x y) is-set-hom-Subprecategory : (x y : obj-Subprecategory C P) → is-set (hom-Subprecategory C P x y) @@ -387,7 +392,7 @@ module _ ( comp-hom-Subprecategory {x} {y} {z} g f)) associative-comp-hom-Subprecategory {x} {y} {z} {w} h g f = eq-type-subtype - ( subhom-Subprecategory C P + ( subtype-hom-Subprecategory C P ( inclusion-obj-Subprecategory C P x) ( inclusion-obj-Subprecategory C P w) ( is-in-obj-inclusion-obj-Subprecategory C P x) @@ -403,7 +408,7 @@ module _ comp-hom-Subprecategory {x} {y} {y} (id-hom-Subprecategory {y}) f = f left-unit-law-comp-hom-Subprecategory {x} {y} f = eq-type-subtype - ( subhom-Subprecategory C P + ( subtype-hom-Subprecategory C P ( inclusion-obj-Subprecategory C P x) ( inclusion-obj-Subprecategory C P y) ( is-in-obj-inclusion-obj-Subprecategory C P x) @@ -417,7 +422,7 @@ module _ comp-hom-Subprecategory {x} {x} {y} f (id-hom-Subprecategory {x}) = f right-unit-law-comp-hom-Subprecategory {x} {y} f = eq-type-subtype - ( subhom-Subprecategory C P + ( subtype-hom-Subprecategory C P ( inclusion-obj-Subprecategory C P x) ( inclusion-obj-Subprecategory C P y) ( is-in-obj-inclusion-obj-Subprecategory C P x) @@ -504,7 +509,7 @@ module _ ( inclusion-Subprecategory C P) is-faithful-inclusion-Subprecategory x y = is-emb-inclusion-subtype - ( subhom-Subprecategory C P + ( subtype-hom-Subprecategory C P ( inclusion-obj-Subprecategory C P x) ( inclusion-obj-Subprecategory C P y) ( is-in-obj-inclusion-obj-Subprecategory C P x) @@ -517,5 +522,5 @@ module _ ( C) ( inclusion-Subprecategory C P)) is-emb-obj-inclusion-Subprecategory = - is-emb-inclusion-subtype (subobj-Subprecategory C P) + is-emb-inclusion-subtype (subtype-obj-Subprecategory C P) ``` From 75e253225cf1a17300d5ede4eb4cfbf03adee945 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 15:56:31 +0200 Subject: [PATCH 28/49] fix subcategories --- src/category-theory/subcategories.lagda.md | 249 +++++++++++------- src/category-theory/subprecategories.lagda.md | 2 +- 2 files changed, 152 insertions(+), 99 deletions(-) diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index a164b97ea5..faac7171f8 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -10,8 +10,10 @@ module category-theory.subcategories where 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-categories open import category-theory.functors-precategories 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.subprecategories @@ -42,45 +44,7 @@ of the morphisms of `C`, such that `P₁` contains all identity morphisms of objects in `P₀` and is closed under composition. By univalence, it therefore contains the isomorphisms, and hence defines a category. -## Definitions - -```agda -module _ - {l1 l2 l3 l4 : Level} - (C : Category l1 l2) - (P₀ : subtype l3 (obj-Category C)) - (P₁ : subtype-hom-Precategory l4 (precategory-Category C) P₀) - 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₁ -``` +## Definition ### The predicate of being a subcategory @@ -93,8 +57,7 @@ module _ where is-subcategory-Prop : Prop (l1 ⊔ l2 ⊔ l3 ⊔ l4) - is-subcategory-Prop = - is-subprecategory-Prop (precategory-Category C) P₀ P₁ + 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 @@ -103,12 +66,17 @@ module _ 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-subcategory → + contains-id-subtype-Precategory (precategory-Category C) P₀ P₁ + contains-id-is-subcategory = + contains-id-is-subprecategory (precategory-Category C) P₀ P₁ is-closed-under-composition-is-subcategory : - is-subcategory → is-closed-under-composition-subtype-Category C P₀ P₁ - is-closed-under-composition-is-subcategory = pr2 + is-subcategory → + is-closed-under-composition-subtype-Precategory + ( precategory-Category C) P₀ P₁ + is-closed-under-composition-is-subcategory = + is-closed-under-composition-is-subprecategory (precategory-Category C) P₀ P₁ ``` ### Subcategories @@ -119,7 +87,11 @@ Subcategory : (C : Category l1 l2) → UU (l1 ⊔ l2 ⊔ lsuc l3 ⊔ lsuc l4) Subcategory l3 l4 C = Subprecategory l3 l4 (precategory-Category C) +``` + +#### Objects in subcategories +```agda module _ {l1 l2 l3 l4 : Level} (C : Category l1 l2) @@ -127,7 +99,8 @@ module _ where subtype-obj-Subcategory : subtype l3 (obj-Category C) - subtype-obj-Subcategory = pr1 P + subtype-obj-Subcategory = + subtype-obj-Subprecategory (precategory-Category C) P obj-Subcategory : UU (l1 ⊔ l3) obj-Subcategory = type-subtype subtype-obj-Subcategory @@ -140,63 +113,135 @@ module _ 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-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) is-in-obj-inclusion-obj-Subcategory = is-in-subtype-inclusion-subtype subtype-obj-Subcategory +``` - subtype-hom-Subcategory : - subtype-hom-Precategory l4 (precategory-Category C) subtype-obj-Subcategory - subtype-hom-Subcategory = pr1 (pr2 P) +#### Morphisms in subcategories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Category l1 l2) + (P : Subcategory l3 l4 C) + where - hom-Subcategory : (x y : obj-Subcategory) → UU (l2 ⊔ l4) - hom-Subcategory = hom-Subprecategory (precategory-Category C) P + subtype-hom-Subcategory : + subtype-hom-Precategory l4 + ( precategory-Category C) + ( subtype-obj-Subcategory C P) + subtype-hom-Subcategory = + subtype-hom-Subprecategory (precategory-Category C) P + + subtype-hom-obj-subcategory-Subcategory : + (x y : obj-Subcategory C P) → + subtype l4 + ( hom-Category C + ( inclusion-obj-Subcategory C P x) + ( inclusion-obj-Subcategory C P y)) + subtype-hom-obj-subcategory-Subcategory = + subtype-hom-obj-subprecategory-Subprecategory (precategory-Category C) P + + hom-Subcategory : (x y : obj-Subcategory C P) → UU (l2 ⊔ l4) + hom-Subcategory x y = + type-subtype (subtype-hom-obj-subcategory-Subcategory x y) inclusion-hom-Subcategory : - (x y : obj-Subcategory) → + (x y : obj-Subcategory C P) → 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 + ( inclusion-obj-Subcategory C P x) + ( inclusion-obj-Subcategory C P y) + inclusion-hom-Subcategory x y = + inclusion-subtype (subtype-hom-obj-subcategory-Subcategory x y) +``` + +The predicate on a morphism between subobjects of being contained in the +subcategory: +```agda + is-in-hom-obj-subcategory-Subcategory : + ( x y : obj-Subcategory C P) → + hom-Category C + ( inclusion-obj-Subcategory C P x) + ( inclusion-obj-Subcategory C P y) → + UU l4 + is-in-hom-obj-subcategory-Subcategory x y = + is-in-subtype (subtype-hom-obj-subcategory-Subcategory x y) + + is-prop-is-in-hom-obj-subcategory-Subcategory : + ( x y : obj-Subcategory C P) + ( f : + hom-Category C + ( inclusion-obj-Subcategory C P x) + ( inclusion-obj-Subcategory C P y)) → + is-prop (is-in-hom-obj-subcategory-Subcategory x y f) + is-prop-is-in-hom-obj-subcategory-Subcategory x y = + is-prop-is-in-subtype (subtype-hom-obj-subcategory-Subcategory x y) +``` + +The predicate on a morphism between any objects of being contained in the +subcategory: + +```agda 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) + (x y : obj-Category C) (f : hom-Category C x y) → UU (l3 ⊔ l4) + is-in-hom-Subcategory = + is-in-hom-Subprecategory (precategory-Category C) P 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-prop-is-in-hom-Subcategory = + is-prop-is-in-hom-Subprecategory (precategory-Category C) P + + is-in-hom-obj-subcategory-inclusion-hom-Subcategory : + (x y : obj-Subcategory C P) + (f : hom-Subcategory x y) → + is-in-hom-obj-subcategory-Subcategory x y + ( inclusion-hom-Subcategory x y f) + is-in-hom-obj-subcategory-inclusion-hom-Subcategory = + is-in-hom-obj-subprecategory-inclusion-hom-Subprecategory + ( precategory-Category C) P is-in-hom-inclusion-hom-Subcategory : - (x y : obj-Subcategory) (f : hom-Subcategory x y) → + (x y : obj-Subcategory C P) + (f : hom-Subcategory x y) → is-in-hom-Subcategory - ( inclusion-obj-Subcategory x) - ( inclusion-obj-Subcategory y) + ( inclusion-obj-Subcategory C P x) + ( inclusion-obj-Subcategory C P y) ( inclusion-hom-Subcategory x y f) is-in-hom-inclusion-hom-Subcategory = is-in-hom-inclusion-hom-Subprecategory (precategory-Category C) P +``` +#### Subcategories are subcategories + +```agda is-subcategory-Subcategory : - is-subcategory C subtype-obj-Subcategory subtype-hom-Subcategory - is-subcategory-Subcategory = pr2 (pr2 P) + is-subcategory C + ( subtype-obj-Subcategory C P) (subtype-hom-Subcategory) + is-subcategory-Subcategory = + is-subprecategory-Subprecategory (precategory-Category C) P contains-id-Subcategory : - contains-id-subtype-Category C - ( subtype-obj-Subcategory) + contains-id-subtype-Precategory + ( precategory-Category C) + ( subtype-obj-Subcategory C P) ( 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) + is-closed-under-composition-subtype-Precategory + ( precategory-Category C) + ( subtype-obj-Subcategory C P) ( subtype-hom-Subcategory) is-closed-under-composition-Subcategory = is-closed-under-composition-Subprecategory (precategory-Category C) P @@ -212,23 +257,25 @@ module _ where hom-set-Subcategory : (x y : obj-Subcategory C P) → Set (l2 ⊔ l4) - hom-set-Subcategory = hom-set-Subprecategory (precategory-Category C) P + 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 + is-set-hom-Subcategory x y = is-set-type-Set (hom-set-Subcategory x y) 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} + id-hom-Subcategory = + id-hom-Subprecategory (precategory-Category C) P 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} + comp-hom-Subcategory = + comp-hom-Subprecategory (precategory-Category C) P associative-comp-hom-Subcategory : {x y z w : obj-Subcategory C P} @@ -273,29 +320,6 @@ module _ precategory-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-Subprecategory (precategory-Category C) P {x} {y} - - iso-Subcategory : - (x y : obj-Subcategory C P) → UU (l2 ⊔ l4) - iso-Subcategory = iso-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 @@ -325,6 +349,35 @@ module _ ## Properties +### The inclusion functor is an embedding on objects and hom-sets + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Category l1 l2) + (P : Subcategory l3 l4 C) + where + + is-faithful-inclusion-Subcategory : + is-faithful-functor-Precategory + ( precategory-Subcategory C P) + ( precategory-Category C) + ( inclusion-Subcategory C P) + is-faithful-inclusion-Subcategory = + is-faithful-inclusion-Subprecategory (precategory-Category C) P + + is-emb-obj-inclusion-Subcategory : + is-emb + ( obj-functor-Precategory + ( precategory-Subcategory C P) + ( precategory-Category C) + ( inclusion-Subcategory C P)) + is-emb-obj-inclusion-Subcategory = + is-emb-obj-inclusion-Subprecategory (precategory-Category C) P +``` + +## Properties + ### The inclusion functor is faithful and an embedding on objects ```agda diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index 0bd6dc1ddc..fa102c0ec8 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -301,7 +301,7 @@ subprecategory: is-in-hom-obj-subprecategory-inclusion-hom-Subprecategory x y f ``` -Subprecategories are subprecategories: +#### Subprecategories are subprecategories ```agda is-subprecategory-Subprecategory : From 57178d8438766b42ab958a2730f6157b39278ed6 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 16:19:07 +0200 Subject: [PATCH 29/49] fixes --- .../fully-faithful-maps-precategories.lagda.md | 1 + .../products-in-precategories.lagda.md | 2 +- .../representable-functors-precategories.lagda.md | 13 ++----------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/category-theory/fully-faithful-maps-precategories.lagda.md b/src/category-theory/fully-faithful-maps-precategories.lagda.md index 21dad3d36f..2e532d64a4 100644 --- a/src/category-theory/fully-faithful-maps-precategories.lagda.md +++ b/src/category-theory/fully-faithful-maps-precategories.lagda.md @@ -15,6 +15,7 @@ open import category-theory.precategories open import foundation.dependent-pair-types open import foundation.equivalences open import foundation.function-types +open import foundation.iterated-dependent-product-types open import foundation.propositions open import foundation.surjective-maps open import foundation.universe-levels diff --git a/src/category-theory/products-in-precategories.lagda.md b/src/category-theory/products-in-precategories.lagda.md index 130b939a5a..cb10bb605d 100644 --- a/src/category-theory/products-in-precategories.lagda.md +++ b/src/category-theory/products-in-precategories.lagda.md @@ -127,7 +127,7 @@ module _ is-prop-is-product-Precategory : is-prop (is-product-Precategory C x y p l r) is-prop-is-product-Precategory = - is-prop-Π³ (λ z f g → is-property-is-contr) + is-prop-iterated-Π 3 (λ z f g → is-property-is-contr) is-product-prop-Precategory : Prop (l1 ⊔ l2) pr1 is-product-prop-Precategory = is-product-Precategory C x y p l r diff --git a/src/category-theory/representable-functors-precategories.lagda.md b/src/category-theory/representable-functors-precategories.lagda.md index ab47eba09c..8f60223161 100644 --- a/src/category-theory/representable-functors-precategories.lagda.md +++ b/src/category-theory/representable-functors-precategories.lagda.md @@ -146,15 +146,6 @@ module _ representable-functor-Precategory C pr2 map-representable-functor-copresheaf-Precategory = representable-natural-transformation-Precategory C - - -- functor-representable-functor-copresheaf-Precategory : - -- functor-Precategory - -- ( opposite-Precategory C) - -- ( copresheaf-precategory-Large-Precategory C l2) - -- pr1 functor-representable-functor-copresheaf-Precategory = - -- representable-functor-Precategory C - -- pr1 (pr2 functor-representable-functor-copresheaf-Precategory) = - -- representable-natural-transformation-Precategory C - -- pr1 (pr2 (pr2 functor-representable-functor-copresheaf-Precategory)) = {! !} - -- pr2 (pr2 (pr2 functor-representable-functor-copresheaf-Precategory)) = {! !} ``` + +It remains to show that this map is functorial. From 8a6134161c53e92b785a2762a1741a9e1463b839 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 16:19:51 +0200 Subject: [PATCH 30/49] commented code --- src/category-theory/subcategories.lagda.md | 58 +++++++++++----------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index faac7171f8..30a0b9def4 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -407,7 +407,7 @@ module _ ### Subprecategories of categories are replete -```agda +```text module _ {l1 l2 l3 l4 : Level} (C : Precategory l1 l2) @@ -418,33 +418,33 @@ module _ (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)) - -- ( 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) + 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)) + ( 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. +This remains to complete. From 5b02b8f3780eb673937348ac999a370d76946dee Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 16:37:22 +0200 Subject: [PATCH 31/49] move a lemma --- .../replete-subprecategories.lagda.md | 50 ++++++++++ src/category-theory/subcategories.lagda.md | 95 +++++++++---------- 2 files changed, 93 insertions(+), 52 deletions(-) diff --git a/src/category-theory/replete-subprecategories.lagda.md b/src/category-theory/replete-subprecategories.lagda.md index 7a1d6463aa..55c27e2169 100644 --- a/src/category-theory/replete-subprecategories.lagda.md +++ b/src/category-theory/replete-subprecategories.lagda.md @@ -126,6 +126,56 @@ module _ is-replete-Replete-Subprecategory = pr2 P ``` +## Properties + +### Subprecategories of categories are replete + +```text +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)) + ( 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) +``` + +This remains to complete. + +### If a full subprecategory is closed under isomorphic objects, then it is replete + +This remains to be formalized. + ## See also - Every [subcategory](category-theory.subcategories.md) of a diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index 30a0b9def4..36ee7bd9e9 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -44,7 +44,45 @@ of the morphisms of `C`, such that `P₁` contains all identity morphisms of objects in `P₀` and is closed under composition. By univalence, it therefore contains the isomorphisms, and hence defines a category. -## Definition +## Definitions + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Category l1 l2) + (P₀ : subtype l3 (obj-Category C)) + (P₁ : subtype-hom-Precategory l4 (precategory-Category C) P₀) + 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 @@ -67,14 +105,13 @@ module _ contains-id-is-subcategory : is-subcategory → - contains-id-subtype-Precategory (precategory-Category C) P₀ P₁ + contains-id-subtype-Category C P₀ P₁ contains-id-is-subcategory = contains-id-is-subprecategory (precategory-Category C) P₀ P₁ is-closed-under-composition-is-subcategory : is-subcategory → - is-closed-under-composition-subtype-Precategory - ( precategory-Category C) P₀ P₁ + is-closed-under-composition-subtype-Category C P₀ P₁ is-closed-under-composition-is-subcategory = is-closed-under-composition-is-subprecategory (precategory-Category C) P₀ P₁ ``` @@ -231,16 +268,14 @@ subcategory: is-subprecategory-Subprecategory (precategory-Category C) P contains-id-Subcategory : - contains-id-subtype-Precategory - ( precategory-Category C) + contains-id-subtype-Category C ( subtype-obj-Subcategory C P) ( subtype-hom-Subcategory) contains-id-Subcategory = contains-id-Subprecategory (precategory-Category C) P is-closed-under-composition-Subcategory : - is-closed-under-composition-subtype-Precategory - ( precategory-Category C) + is-closed-under-composition-subtype-Category C ( subtype-obj-Subcategory C P) ( subtype-hom-Subcategory) is-closed-under-composition-Subcategory = @@ -404,47 +439,3 @@ module _ is-emb-obj-inclusion-Category = is-emb-obj-inclusion-Subprecategory (precategory-Category C) P ``` - -### Subprecategories of categories are replete - -```text -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)) - ( 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) -``` - -This remains to complete. From 7eeaa3595048365ab1fb2a3ebd1c136dd70c4f46 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 16:40:19 +0200 Subject: [PATCH 32/49] remove a comma --- src/category-theory/replete-subprecategories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/replete-subprecategories.lagda.md b/src/category-theory/replete-subprecategories.lagda.md index 55c27e2169..d522da19c1 100644 --- a/src/category-theory/replete-subprecategories.lagda.md +++ b/src/category-theory/replete-subprecategories.lagda.md @@ -172,7 +172,7 @@ module _ This remains to complete. -### If a full subprecategory is closed under isomorphic objects, then it is replete +### If a full subprecategory is closed under isomorphic objects then it is replete This remains to be formalized. From ad0617dc1b2c96e010f0f2b26e63a010abff62ba Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 16:46:04 +0200 Subject: [PATCH 33/49] fix links --- src/foundation/decidable-equality.lagda.md | 2 +- src/group-theory/torsors.lagda.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/foundation/decidable-equality.lagda.md b/src/foundation/decidable-equality.lagda.md index b5201d0a38..aba53c004a 100644 --- a/src/foundation/decidable-equality.lagda.md +++ b/src/foundation/decidable-equality.lagda.md @@ -36,7 +36,7 @@ open import foundation-core.transport-along-identifications ## Definition A type `A` is said to have **decidable equality** if `x = y` is a -[decidable type](foundation-core.decidable-types.md) for every `x y : A`. +[decidable type](foundation.decidable-types.md) for every `x y : A`. ```agda has-decidable-equality : {l : Level} (A : UU l) → UU l diff --git a/src/group-theory/torsors.lagda.md b/src/group-theory/torsors.lagda.md index 8d49989e70..57c1ec3dac 100644 --- a/src/group-theory/torsors.lagda.md +++ b/src/group-theory/torsors.lagda.md @@ -43,7 +43,7 @@ open import higher-group-theory.higher-groups ## Idea A **torsor** of `G` is a [group action](group-theory.group-actions.md) which is -[merely equivalent](foundation.mere-equivalence.md) to the +[merely equivalent](foundation.mere-equivalences.md) to the [principal group action](group-theory.principal-group-actions.md) of `G`. ## Definitions From f0dd4cce80c243980863af5c490b583c277f1b79 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 16:56:42 +0200 Subject: [PATCH 34/49] remove unused imports --- src/category-theory/functors-precategories.lagda.md | 2 -- src/category-theory/gaunt-categories.lagda.md | 8 ++++---- .../isomorphisms-in-subprecategories.lagda.md | 12 ------------ src/category-theory/opposite-precategories.lagda.md | 8 -------- .../opposite-preunivalent-categories.lagda.md | 1 - .../replete-subprecategories.lagda.md | 9 --------- src/category-theory/strict-categories.lagda.md | 2 -- src/category-theory/subcategories.lagda.md | 4 ---- src/category-theory/subprecategories.lagda.md | 5 ----- src/foundation/1-types.lagda.md | 1 - src/foundation/binary-relations.lagda.md | 1 - .../commuting-pentagons-of-identifications.lagda.md | 2 -- .../transport-along-higher-identifications.lagda.md | 1 - .../transport-along-identifications.lagda.md | 4 ---- src/foundation/truncated-types.lagda.md | 1 - src/group-theory/torsors.lagda.md | 1 - 16 files changed, 4 insertions(+), 58 deletions(-) diff --git a/src/category-theory/functors-precategories.lagda.md b/src/category-theory/functors-precategories.lagda.md index e5ac0168da..1d7354c47c 100644 --- a/src/category-theory/functors-precategories.lagda.md +++ b/src/category-theory/functors-precategories.lagda.md @@ -13,10 +13,8 @@ open import category-theory.precategories open import foundation.action-on-identifications-functions open import foundation.cartesian-product-types -open import foundation.commuting-pentagons-of-identifications open import foundation.dependent-pair-types open import foundation.embeddings -open import foundation.equality-dependent-pair-types open import foundation.equivalences open import foundation.function-types open import foundation.homotopies diff --git a/src/category-theory/gaunt-categories.lagda.md b/src/category-theory/gaunt-categories.lagda.md index 1698b5d562..dc7101e7d1 100644 --- a/src/category-theory/gaunt-categories.lagda.md +++ b/src/category-theory/gaunt-categories.lagda.md @@ -9,21 +9,17 @@ module category-theory.gaunt-categories where ```agda open import category-theory.categories open import category-theory.composition-operations-on-binary-families-of-sets -open import category-theory.isomorphisms-in-categories 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 category-theory.strict-categories -open import foundation.1-types open import foundation.cartesian-product-types 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.surjective-maps open import foundation.universe-levels ``` @@ -320,6 +316,10 @@ module _ is-prop-iso-is-surjective-iso-eq-Strict-Category is-surj-iso-eq-C ``` +## See also + +- [Posets](order-theory.posets.md) are gaunt. + ## External links - [Gaunt (pre)categories](https://1lab.dev/Cat.Gaunt.html) at 1lab diff --git a/src/category-theory/isomorphisms-in-subprecategories.lagda.md b/src/category-theory/isomorphisms-in-subprecategories.lagda.md index 071a3f8d61..738979f2ac 100644 --- a/src/category-theory/isomorphisms-in-subprecategories.lagda.md +++ b/src/category-theory/isomorphisms-in-subprecategories.lagda.md @@ -7,24 +7,12 @@ module category-theory.isomorphisms-in-subprecategories where
Imports ```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 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.iterated-dependent-product-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/category-theory/opposite-precategories.lagda.md b/src/category-theory/opposite-precategories.lagda.md index 350b2a4c3c..7f5bb7e217 100644 --- a/src/category-theory/opposite-precategories.lagda.md +++ b/src/category-theory/opposite-precategories.lagda.md @@ -7,26 +7,18 @@ module category-theory.opposite-precategories where
Imports ```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 -open import category-theory.preunivalent-categories open import foundation.dependent-pair-types -open import foundation.embeddings open import foundation.equality-dependent-pair-types open import foundation.equivalences -open import foundation.function-extensionality -open import foundation.function-types open import foundation.homotopies open import foundation.identity-types open import foundation.involutions -open import foundation.multivariable-homotopies open import foundation.propositions open import foundation.sets -open import foundation.subtypes -open import foundation.transport-along-identifications open import foundation.universe-levels ``` diff --git a/src/category-theory/opposite-preunivalent-categories.lagda.md b/src/category-theory/opposite-preunivalent-categories.lagda.md index 30a9cc43d4..e599c994fb 100644 --- a/src/category-theory/opposite-preunivalent-categories.lagda.md +++ b/src/category-theory/opposite-preunivalent-categories.lagda.md @@ -7,7 +7,6 @@ module category-theory.opposite-preunivalent-categories where
Imports ```agda -open import category-theory.categories open import category-theory.isomorphisms-in-precategories open import category-theory.opposite-precategories open import category-theory.precategories diff --git a/src/category-theory/replete-subprecategories.lagda.md b/src/category-theory/replete-subprecategories.lagda.md index d522da19c1..41e7ecbe8c 100644 --- a/src/category-theory/replete-subprecategories.lagda.md +++ b/src/category-theory/replete-subprecategories.lagda.md @@ -7,23 +7,14 @@ module category-theory.replete-subprecategories where
Imports ```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.isomorphisms-in-precategories open import category-theory.isomorphisms-in-subprecategories -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.iterated-dependent-product-types open import foundation.propositions -open import foundation.sets -open import foundation.subtypes open import foundation.universe-levels ``` diff --git a/src/category-theory/strict-categories.lagda.md b/src/category-theory/strict-categories.lagda.md index a0eccfad76..f7df5f3fa4 100644 --- a/src/category-theory/strict-categories.lagda.md +++ b/src/category-theory/strict-categories.lagda.md @@ -13,10 +13,8 @@ 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.cartesian-product-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 diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index 36ee7bd9e9..fe8b29067d 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -10,15 +10,11 @@ module category-theory.subcategories where 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-categories open import category-theory.functors-precategories -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.subprecategories -open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.identity-types open import foundation.propositions diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index fa102c0ec8..cacef345d4 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -7,23 +7,18 @@ module category-theory.subprecategories where
Imports ```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 -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.identity-types open import foundation.iterated-dependent-product-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/1-types.lagda.md b/src/foundation/1-types.lagda.md index 28952dbfe0..bba84b193b 100644 --- a/src/foundation/1-types.lagda.md +++ b/src/foundation/1-types.lagda.md @@ -15,7 +15,6 @@ open import foundation.truncated-types open import foundation.universe-levels open import foundation-core.cartesian-product-types -open import foundation-core.contractible-types open import foundation-core.equivalences open import foundation-core.identity-types open import foundation-core.propositions diff --git a/src/foundation/binary-relations.lagda.md b/src/foundation/binary-relations.lagda.md index ce4fcc5fc4..e798315750 100644 --- a/src/foundation/binary-relations.lagda.md +++ b/src/foundation/binary-relations.lagda.md @@ -17,7 +17,6 @@ open import foundation.univalence open import foundation.universe-levels open import foundation-core.cartesian-product-types -open import foundation-core.contractible-types open import foundation-core.equivalences open import foundation-core.identity-types open import foundation-core.torsorial-type-families diff --git a/src/foundation/commuting-pentagons-of-identifications.lagda.md b/src/foundation/commuting-pentagons-of-identifications.lagda.md index 281b6563d1..eaf01a0440 100644 --- a/src/foundation/commuting-pentagons-of-identifications.lagda.md +++ b/src/foundation/commuting-pentagons-of-identifications.lagda.md @@ -7,10 +7,8 @@ module foundation.commuting-pentagons-of-identifications where
Imports ```agda -open import foundation.action-on-identifications-binary-functions open import foundation.universe-levels -open import foundation-core.function-types open import foundation-core.identity-types ``` diff --git a/src/foundation/transport-along-higher-identifications.lagda.md b/src/foundation/transport-along-higher-identifications.lagda.md index babae89b03..e4d361e0c1 100644 --- a/src/foundation/transport-along-higher-identifications.lagda.md +++ b/src/foundation/transport-along-higher-identifications.lagda.md @@ -9,7 +9,6 @@ module foundation.transport-along-higher-identifications where ```agda open import foundation.action-on-identifications-functions open import foundation.commuting-squares-of-identifications -open import foundation.dependent-pair-types open import foundation.homotopies open import foundation.identity-types open import foundation.path-algebra diff --git a/src/foundation/transport-along-identifications.lagda.md b/src/foundation/transport-along-identifications.lagda.md index 12cf640e41..134e8ff91d 100644 --- a/src/foundation/transport-along-identifications.lagda.md +++ b/src/foundation/transport-along-identifications.lagda.md @@ -10,17 +10,13 @@ open import foundation-core.transport-along-identifications public ```agda open import foundation.action-on-identifications-functions -open import foundation.commuting-squares-of-identifications open import foundation.dependent-pair-types open import foundation.homotopies -open import foundation.path-algebra -open import foundation.transport-along-higher-identifications open import foundation.universe-levels open import foundation-core.equivalences open import foundation-core.function-types open import foundation-core.identity-types -open import foundation-core.whiskering-homotopies ```
diff --git a/src/foundation/truncated-types.lagda.md b/src/foundation/truncated-types.lagda.md index 6324e38022..b9385ca2b3 100644 --- a/src/foundation/truncated-types.lagda.md +++ b/src/foundation/truncated-types.lagda.md @@ -17,7 +17,6 @@ open import foundation.truncation-levels open import foundation.univalence open import foundation.universe-levels -open import foundation-core.contractible-types open import foundation-core.embeddings open import foundation-core.equivalences open import foundation-core.identity-types diff --git a/src/group-theory/torsors.lagda.md b/src/group-theory/torsors.lagda.md index 57c1ec3dac..5516169b25 100644 --- a/src/group-theory/torsors.lagda.md +++ b/src/group-theory/torsors.lagda.md @@ -9,7 +9,6 @@ module group-theory.torsors where ```agda open import foundation.0-connected-types 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.function-types From 76ce2978d2afd1ceea3455eaa286655b02c27099 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 16:58:46 +0200 Subject: [PATCH 35/49] fix title gaunt cats --- src/category-theory/gaunt-categories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/gaunt-categories.lagda.md b/src/category-theory/gaunt-categories.lagda.md index dc7101e7d1..6067b47fc1 100644 --- a/src/category-theory/gaunt-categories.lagda.md +++ b/src/category-theory/gaunt-categories.lagda.md @@ -54,7 +54,7 @@ diagram relating the different notions of "category": ## Definitions -### The predicate on precategories of being gaunt +### The predicate on precategories that there is at most one isomorphism between any two objects ```agda module _ From 91f68304d28fc7a6fd02c3a7a6d9a5718206714b Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 17:23:48 +0200 Subject: [PATCH 36/49] define rigid objects --- src/category-theory.lagda.md | 1 + .../rigid-objects-precategories.lagda.md | 72 +++++++++++++++++++ .../terminal-objects-precategories.lagda.md | 5 +- 3 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 src/category-theory/rigid-objects-precategories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index b81409da06..cdc2880798 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -118,6 +118,7 @@ open import category-theory.representable-functors-categories public open import category-theory.representable-functors-large-precategories public open import category-theory.representable-functors-precategories public open import category-theory.representing-arrow-category public +open import category-theory.rigid-objects-precategories public open import category-theory.sieves-in-categories public open import category-theory.simplex-category public open import category-theory.slice-precategories public diff --git a/src/category-theory/rigid-objects-precategories.lagda.md b/src/category-theory/rigid-objects-precategories.lagda.md new file mode 100644 index 0000000000..6d7a1909c5 --- /dev/null +++ b/src/category-theory/rigid-objects-precategories.lagda.md @@ -0,0 +1,72 @@ +# Rigid objects in a precategory + +```agda +module category-theory.rigid-objects-precategories where +``` + +
Imports + +```agda +open import category-theory.isomorphisms-in-precategories +open import category-theory.precategories + +open import foundation.contractible-types +open import foundation.dependent-pair-types +open import foundation.function-types +open import foundation.identity-types +open import foundation.propositions +open import foundation.universe-levels + +open import group-theory.trivial-groups +``` + +
+ +## Idea + +A **rigid object** in a [precategory](category-theory.precategories.md) is an +object whose [automorphism group](group-theory.automorphism-groups.md) is +[trivial](group-theory.trivial-groups.md). + +## Definitions + +### The predicate of being rigid + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) (x : obj-Precategory C) + where + + is-rigid-obj-prop-Precategory : Prop l2 + is-rigid-obj-prop-Precategory = is-contr-Prop (iso-Precategory C x x) + + is-rigid-obj-Precategory : UU l2 + is-rigid-obj-Precategory = type-Prop is-rigid-obj-prop-Precategory + + is-prop-is-rigid-obj-Precategory : is-prop is-rigid-obj-Precategory + is-prop-is-rigid-obj-Precategory = + is-prop-type-Prop is-rigid-obj-prop-Precategory +``` + +### The type of rigid objects in a precategory + +```agda +rigid-obj-Precategory : {l1 l2 : Level} (C : Precategory l1 l2) → UU (l1 ⊔ l2) +rigid-obj-Precategory C = Σ (obj-Precategory C) (is-rigid-obj-Precategory C) + +module _ + {l1 l2 : Level} (C : Precategory l1 l2) + where + + obj-rigid-obj-Precategory : rigid-obj-Precategory C → obj-Precategory C + obj-rigid-obj-Precategory = pr1 + + is-rigid-rigid-obj-Precategory : + (x : rigid-obj-Precategory C) → + is-rigid-obj-Precategory C (obj-rigid-obj-Precategory x) + is-rigid-rigid-obj-Precategory = pr2 +``` + +## External links + +- [rigid object](https://ncatlab.org/nlab/show/rigid+object) at nlab diff --git a/src/category-theory/terminal-objects-precategories.lagda.md b/src/category-theory/terminal-objects-precategories.lagda.md index 22d9b360c7..5a1fcb7d9c 100644 --- a/src/category-theory/terminal-objects-precategories.lagda.md +++ b/src/category-theory/terminal-objects-precategories.lagda.md @@ -1,4 +1,4 @@ -# Terminal object in a precategory +# Terminal objects in a precategory ```agda module category-theory.terminal-objects-precategories where @@ -12,9 +12,8 @@ open import category-theory.precategories open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.function-types +open import foundation.identity-types open import foundation.universe-levels - -open import foundation-core.identity-types ```
From bc1bf79026edc1ce208cacc7d926420a8853a098 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 17:39:15 +0200 Subject: [PATCH 37/49] A category is gaunt if(f) every object is rigid --- src/category-theory/gaunt-categories.lagda.md | 44 ++++++++++++++++--- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/src/category-theory/gaunt-categories.lagda.md b/src/category-theory/gaunt-categories.lagda.md index 6067b47fc1..d0fc01c350 100644 --- a/src/category-theory/gaunt-categories.lagda.md +++ b/src/category-theory/gaunt-categories.lagda.md @@ -9,13 +9,17 @@ module category-theory.gaunt-categories where ```agda open import category-theory.categories open import category-theory.composition-operations-on-binary-families-of-sets +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.nonunital-precategories open import category-theory.precategories open import category-theory.preunivalent-categories +open import category-theory.rigid-objects-precategories open import category-theory.strict-categories open import foundation.cartesian-product-types +open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.identity-types open import foundation.propositions @@ -27,12 +31,18 @@ open import foundation.universe-levels ## Idea -A **gaunt category** is a [category](category-theory.categories.md) for which -the -[isomorphism](category-theory.isomorphisms-in-categories.md)-[sets](foundation-core.sets.md) -are [propositions](foundation-core.propositions.md), or equivalently a category -such that the objects form a set. Thus, gaunt categories is the common -intersection of (univalent) categories and +A **gaunt category** is a [category](category-theory.categories.md) for one of +the following equivalent conditions hold: + +1. The + [isomorphism](category-theory.isomorphisms-in-categories.md)-[sets](foundation-core.sets.md) + are [propositions](foundation-core.propositions.md). +2. The objects form a set. +3. Every object is [rigid](category-theory.rigid-objects.md), meaning its + [automorphism group](group-theory.automorphism-groups.md) is + [trivial](group-theory.trivial-groups.md). + +Thus, gaunt categories is the common intersection of (univalent) categories and [strict categories](category-theory.strict-categories.md). We have the following diagram relating the different notions of "category": @@ -316,6 +326,28 @@ module _ is-prop-iso-is-surjective-iso-eq-Strict-Category is-surj-iso-eq-C ``` +### A category is gaunt if every object is rigid + +**Proof:** Using the fact that a type is a +[proposition](foundation-core.propositions.md) if and only if having an +inhabitant implies it is [contractible](foundation-core.contractible-types.md), +we can apply +[isomorphism induction](category-theory.isomorphism-induction-categories.md) to +get our result. + +```agda +module _ + {l1 l2 : Level} (C : Category l1 l2) + where + + is-gaunt-is-rigid-Category : + ( (x : obj-Category C) → + is-rigid-obj-Precategory (precategory-Category C) x) → + is-gaunt-Category C + is-gaunt-is-rigid-Category is-rigid-obj-C x y = + is-prop-is-proof-irrelevant (ind-iso-Category C _ (is-rigid-obj-C x)) +``` + ## See also - [Posets](order-theory.posets.md) are gaunt. From dc16e3d0f2b6cb4cdb1015bea749a559694ba945 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 18:16:17 +0200 Subject: [PATCH 38/49] comments --- src/category-theory.lagda.md | 1 + src/category-theory/gaunt-categories.lagda.md | 17 ++-- .../isomorphism-induction-categories.lagda.md | 4 +- .../rigid-objects-categories.lagda.md | 81 +++++++++++++++++++ .../strict-categories.lagda.md | 58 ++++++++++++- 5 files changed, 148 insertions(+), 13 deletions(-) create mode 100644 src/category-theory/rigid-objects-categories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index cdc2880798..12f28d5b87 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -118,6 +118,7 @@ open import category-theory.representable-functors-categories public open import category-theory.representable-functors-large-precategories public open import category-theory.representable-functors-precategories public open import category-theory.representing-arrow-category public +open import category-theory.rigid-objects-categories public open import category-theory.rigid-objects-precategories public open import category-theory.sieves-in-categories public open import category-theory.simplex-category public diff --git a/src/category-theory/gaunt-categories.lagda.md b/src/category-theory/gaunt-categories.lagda.md index d0fc01c350..be9a9bafcc 100644 --- a/src/category-theory/gaunt-categories.lagda.md +++ b/src/category-theory/gaunt-categories.lagda.md @@ -15,7 +15,7 @@ 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 category-theory.rigid-objects-precategories +open import category-theory.rigid-objects-categories open import category-theory.strict-categories open import foundation.cartesian-product-types @@ -42,7 +42,7 @@ the following equivalent conditions hold: [automorphism group](group-theory.automorphism-groups.md) is [trivial](group-theory.trivial-groups.md). -Thus, gaunt categories is the common intersection of (univalent) categories and +Gaunt categories forms the common intersection of (univalent) categories and [strict categories](category-theory.strict-categories.md). We have the following diagram relating the different notions of "category": @@ -274,7 +274,7 @@ module _ is-strict-category-is-prop-iso-Preunivalent-Category : {l1 l2 : Level} (C : Preunivalent-Category l1 l2) → is-prop-iso-Precategory (precategory-Preunivalent-Category C) → - is-strict-category-Precategory (precategory-Preunivalent-Category C) + is-strict-category-Preunivalent-Category C is-strict-category-is-prop-iso-Preunivalent-Category C is-prop-iso-C x y = is-prop-emb (emb-iso-eq-Preunivalent-Category C) (is-prop-iso-C x y) ``` @@ -284,7 +284,7 @@ is-strict-category-is-prop-iso-Preunivalent-Category C is-prop-iso-C x y = ```agda is-strict-category-is-gaunt-Category : {l1 l2 : Level} (C : Category l1 l2) → - is-gaunt-Category C → is-strict-category-Precategory (precategory-Category C) + is-gaunt-Category C → is-strict-category-Category C is-strict-category-is-gaunt-Category C = is-strict-category-is-prop-iso-Preunivalent-Category ( preunivalent-category-Category C) @@ -341,11 +341,14 @@ module _ where is-gaunt-is-rigid-Category : - ( (x : obj-Category C) → - is-rigid-obj-Precategory (precategory-Category C) x) → - is-gaunt-Category C + ((x : obj-Category C) → is-rigid-obj-Category C x) → is-gaunt-Category C is-gaunt-is-rigid-Category is-rigid-obj-C x y = is-prop-is-proof-irrelevant (ind-iso-Category C _ (is-rigid-obj-C x)) + + is-rigid-is-gaunt-Category : + is-gaunt-Category C → (x : obj-Category C) → is-rigid-obj-Category C x + is-rigid-is-gaunt-Category is-gaunt-C x = + is-proof-irrelevant-is-prop (is-gaunt-C x x) (id-iso-Category C) ``` ## See also diff --git a/src/category-theory/isomorphism-induction-categories.lagda.md b/src/category-theory/isomorphism-induction-categories.lagda.md index 5a9dd08498..a736c05d8a 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.universe-levels ## Idea -**Isomorphism induction** in a category `𝒞` is the principle asserting that, -given an object `A : 𝒞` and any type family +**Isomorphism induction** in a [category](category-theory.categories.md) `𝒞` is +the principle asserting that, given an object `A : 𝒞` and any type family ```text P : (B : 𝒞) (ϕ : A ≅ B) → 𝒰 diff --git a/src/category-theory/rigid-objects-categories.lagda.md b/src/category-theory/rigid-objects-categories.lagda.md new file mode 100644 index 0000000000..6b27878c52 --- /dev/null +++ b/src/category-theory/rigid-objects-categories.lagda.md @@ -0,0 +1,81 @@ +# Rigid objects in a category + +```agda +module category-theory.rigid-objects-categories where +``` + +
Imports + +```agda +open import category-theory.categories +open import category-theory.isomorphisms-in-categories +open import category-theory.rigid-objects-precategories + +open import foundation.contractible-types +open import foundation.dependent-pair-types +open import foundation.function-types +open import foundation.identity-types +open import foundation.propositions +open import foundation.universe-levels + +open import group-theory.trivial-groups +``` + +
+ +## Idea + +A **rigid object** in a [category](category-theory.categories.md) is an object +whose [automorphism group](group-theory.automorphism-groups.md) is +[trivial](group-theory.trivial-groups.md). + +## Definitions + +### The predicate of being rigid + +```agda +module _ + {l1 l2 : Level} (C : Category l1 l2) (x : obj-Category C) + where + + is-rigid-obj-prop-Category : Prop l2 + is-rigid-obj-prop-Category = + is-rigid-obj-prop-Precategory (precategory-Category C) x + + is-rigid-obj-Category : UU l2 + is-rigid-obj-Category = type-Prop is-rigid-obj-prop-Category + + is-prop-is-rigid-obj-Category : is-prop is-rigid-obj-Category + is-prop-is-rigid-obj-Category = + is-prop-type-Prop is-rigid-obj-prop-Category +``` + +### The type of rigid objects in a category + +```agda +rigid-obj-Category : {l1 l2 : Level} (C : Category l1 l2) → UU (l1 ⊔ l2) +rigid-obj-Category C = + rigid-obj-Precategory (precategory-Category C) + +module _ + {l1 l2 : Level} (C : Category l1 l2) + where + + obj-rigid-obj-Category : rigid-obj-Category C → obj-Category C + obj-rigid-obj-Category = obj-rigid-obj-Precategory (precategory-Category C) + + is-rigid-rigid-obj-Category : + (x : rigid-obj-Category C) → + is-rigid-obj-Category C (obj-rigid-obj-Category x) + is-rigid-rigid-obj-Category = + is-rigid-rigid-obj-Precategory (precategory-Category C) +``` + +## See also + +- Every object in a category is rigid if and only if it is + [gaunt](category-theory.gaunt-categories.md). + +## External links + +- [rigid object](https://ncatlab.org/nlab/show/rigid+object) at nlab diff --git a/src/category-theory/strict-categories.lagda.md b/src/category-theory/strict-categories.lagda.md index f7df5f3fa4..91492df8c8 100644 --- a/src/category-theory/strict-categories.lagda.md +++ b/src/category-theory/strict-categories.lagda.md @@ -7,6 +7,7 @@ module category-theory.strict-categories where
Imports ```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.nonunital-precategories @@ -29,9 +30,10 @@ open import foundation.universe-levels A **strict category** is a [precategory](category-theory.precategories.md) for which the type of objects form a [set](foundation-core.sets.md). Such categories -are the set-theoretic analogue to (univalent) -[categories](category-theory.categories.md), and have the defect that strict -categorical constructions may generally fail to be invariant under isomorphisms. +are the set-theoretic analogue to +[(univalent) categories](category-theory.categories.md), and have the defect +that strict categorical constructions may generally fail to be invariant under +equivalences. ## Definitions @@ -47,7 +49,45 @@ module _ is-set-Prop (obj-Precategory C) is-strict-category-Precategory : UU l1 - is-strict-category-Precategory = type-Prop is-strict-category-prop-Precategory + is-strict-category-Precategory = + type-Prop is-strict-category-prop-Precategory +``` + +### The predicate on preunivalent categories of being a strict category + +```agda +module _ + {l1 l2 : Level} (C : Preunivalent-Category l1 l2) + where + + is-strict-category-prop-Preunivalent-Category : Prop l1 + is-strict-category-prop-Preunivalent-Category = + is-strict-category-prop-Precategory (precategory-Preunivalent-Category C) + + is-strict-category-Preunivalent-Category : UU l1 + is-strict-category-Preunivalent-Category = + type-Prop is-strict-category-prop-Preunivalent-Category +``` + +### The predicate on categories of being a strict category + +We note that [(univalent) categories](category-theory.categories.md) that are +strict form a very restricted class of strict categories where every +[isomorphism](category-theory.isomorphisms-in-categories.md)-set is a +[proposition](foundation-core.propositions.md). Such a category is called +[gaunt](category-theory.gaunt-categories.md). + +```agda +module _ + {l1 l2 : Level} (C : Category l1 l2) + where + + is-strict-category-prop-Category : Prop l1 + is-strict-category-prop-Category = + is-strict-category-prop-Precategory (precategory-Category C) + + is-strict-category-Category : UU l1 + is-strict-category-Category = type-Prop is-strict-category-prop-Category ``` ### The type of strict categories @@ -230,3 +270,13 @@ postcomp-hom-Strict-Category C = - [Preunivalent categories](category-theory.preunivalent-categories.md) for the common generalization of (univalent) categories and strict categories. +- [Gaunt categories](category-theory.gaunt-categories.md) for the common + intersection of (univalent) categories and strict categories. + +## External links + +- [Strict Precategories](https://1lab.dev/Cat.Strict.html#strict-precategories) + at 1lab +- [strict category](https://ncatlab.org/nlab/show/strict+category) at nlab +- [Category (mathematics)]() + at Wikipedia From 9c3d49e3f91b9c706fbb85dbeba4081cde5a2049 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 18:20:06 +0200 Subject: [PATCH 39/49] `is-equiv-is-invertible` --- .../isomorphisms-in-precategories.lagda.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/category-theory/isomorphisms-in-precategories.lagda.md b/src/category-theory/isomorphisms-in-precategories.lagda.md index 599d3b0c9c..3b06e59939 100644 --- a/src/category-theory/isomorphisms-in-precategories.lagda.md +++ b/src/category-theory/isomorphisms-in-precategories.lagda.md @@ -541,12 +541,11 @@ module _ is-equiv-inv-iso-Precategory : {x y : obj-Precategory C} → is-equiv (inv-iso-Precategory C {x} {y}) - pr1 (pr1 is-equiv-inv-iso-Precategory) = inv-iso-Precategory C - pr2 (pr1 is-equiv-inv-iso-Precategory) = - is-fibered-involution-inv-iso-Precategory - pr1 (pr2 is-equiv-inv-iso-Precategory) = inv-iso-Precategory C - pr2 (pr2 is-equiv-inv-iso-Precategory) = - is-fibered-involution-inv-iso-Precategory + is-equiv-inv-iso-Precategory = + is-equiv-is-invertible + ( inv-iso-Precategory C) + ( is-fibered-involution-inv-iso-Precategory) + ( is-fibered-involution-inv-iso-Precategory) equiv-inv-iso-Precategory : {x y : obj-Precategory C} → iso-Precategory C x y ≃ iso-Precategory C y x From 36a9b5fa60b1985c3ea9c2301ce6c3f079c991c6 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 18:21:49 +0200 Subject: [PATCH 40/49] idk --- src/order-theory/posets.lagda.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/order-theory/posets.lagda.md b/src/order-theory/posets.lagda.md index 5d1f2d73e7..8b9ee2314c 100644 --- a/src/order-theory/posets.lagda.md +++ b/src/order-theory/posets.lagda.md @@ -170,8 +170,7 @@ module _ module _ {l1 l2 : Level} (C : Category l1 l2) - ( is-prop-hom-C : - (x y : obj-Category C) → is-prop (hom-Category C x y)) + (is-prop-hom-C : (x y : obj-Category C) → is-prop (hom-Category C x y)) where preorder-is-prop-hom-Category : Preorder l1 l2 From b00e89e041d9a6ada833f8851d19eae7bd10512c Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 19:47:27 +0200 Subject: [PATCH 41/49] subprecategories of categories are replete --- src/category-theory/gaunt-categories.lagda.md | 4 +- .../isomorphisms-in-subprecategories.lagda.md | 43 +++++++++++++ .../replete-subprecategories.lagda.md | 62 ++++++++----------- 3 files changed, 72 insertions(+), 37 deletions(-) diff --git a/src/category-theory/gaunt-categories.lagda.md b/src/category-theory/gaunt-categories.lagda.md index be9a9bafcc..028a446e16 100644 --- a/src/category-theory/gaunt-categories.lagda.md +++ b/src/category-theory/gaunt-categories.lagda.md @@ -38,8 +38,8 @@ the following equivalent conditions hold: [isomorphism](category-theory.isomorphisms-in-categories.md)-[sets](foundation-core.sets.md) are [propositions](foundation-core.propositions.md). 2. The objects form a set. -3. Every object is [rigid](category-theory.rigid-objects.md), meaning its - [automorphism group](group-theory.automorphism-groups.md) is +3. Every object is [rigid](category-theory.rigid-objects-in-categories.md), + meaning its [automorphism group](group-theory.automorphism-groups.md) is [trivial](group-theory.trivial-groups.md). Gaunt categories forms the common intersection of (univalent) categories and diff --git a/src/category-theory/isomorphisms-in-subprecategories.lagda.md b/src/category-theory/isomorphisms-in-subprecategories.lagda.md index 738979f2ac..43f4cdf457 100644 --- a/src/category-theory/isomorphisms-in-subprecategories.lagda.md +++ b/src/category-theory/isomorphisms-in-subprecategories.lagda.md @@ -56,6 +56,7 @@ module _ is-in-is-iso-prop-Subprecategory = subtype-hom-obj-subprecategory-Subprecategory C P y x ( hom-inv-is-iso-Precategory C is-iso-f) + {-# INLINE is-in-is-iso-prop-Subprecategory #-} is-in-is-iso-Subprecategory : UU l4 is-in-is-iso-Subprecategory = @@ -104,6 +105,8 @@ module _ ( hom-iso-Precategory C f , f₀) ( is-iso-iso-Precategory C f)) + {-# INLINE is-in-iso-obj-subprecategory-prop-Subprecategory #-} + is-in-iso-obj-subprecategory-Subprecategory : UU l4 is-in-iso-obj-subprecategory-Subprecategory = type-Prop is-in-iso-obj-subprecategory-prop-Subprecategory @@ -146,6 +149,7 @@ module _ ( λ y₀ → is-in-iso-obj-subprecategory-prop-Subprecategory C P { x , x₀} {y , y₀} f)) + {-# INLINE is-in-iso-prop-Subprecategory #-} is-in-iso-Subprecategory : UU (l3 ⊔ l4) is-in-iso-Subprecategory = type-Prop is-in-iso-prop-Subprecategory @@ -161,3 +165,42 @@ module _ iso-is-in-iso-obj-subprecategory-Subprecategory C P f ( pr2 (pr2 is-in-iso-f)) ``` + +### If a subprecategory contains an object, it contains its identity ismorphism + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (P : Subprecategory l3 l4 C) + (x : obj-Subprecategory C P) + where + + is-iso-id-hom-Subprecategory : + is-iso-Subprecategory C P (id-hom-Subprecategory C P {x}) + is-iso-id-hom-Subprecategory = + is-iso-id-hom-Precategory (precategory-Subprecategory C P) + + is-in-is-iso-id-obj-subprecategory-Subprecategory : + is-in-is-iso-Subprecategory C P {x} + (id-hom-Subprecategory C P) (is-iso-id-hom-Precategory C) + is-in-is-iso-id-obj-subprecategory-Subprecategory = + contains-id-Subprecategory C P + ( inclusion-obj-Subprecategory C P x) + ( is-in-obj-inclusion-obj-Subprecategory C P x) + + is-in-iso-id-obj-subprecategory-Subprecategory : + is-in-iso-obj-subprecategory-Subprecategory C P (id-iso-Precategory C) + pr1 is-in-iso-id-obj-subprecategory-Subprecategory = + is-in-is-iso-id-obj-subprecategory-Subprecategory + pr2 is-in-iso-id-obj-subprecategory-Subprecategory = + is-in-is-iso-id-obj-subprecategory-Subprecategory + + is-in-iso-id-Subprecategory : + is-in-iso-Subprecategory C P (id-iso-Precategory C) + pr1 is-in-iso-id-Subprecategory = is-in-obj-inclusion-obj-Subprecategory C P x + pr1 (pr2 is-in-iso-id-Subprecategory) = + is-in-obj-inclusion-obj-Subprecategory C P x + pr2 (pr2 is-in-iso-id-Subprecategory) = + is-in-iso-id-obj-subprecategory-Subprecategory +``` diff --git a/src/category-theory/replete-subprecategories.lagda.md b/src/category-theory/replete-subprecategories.lagda.md index 41e7ecbe8c..cb4ffd26be 100644 --- a/src/category-theory/replete-subprecategories.lagda.md +++ b/src/category-theory/replete-subprecategories.lagda.md @@ -7,6 +7,8 @@ module category-theory.replete-subprecategories where
Imports ```agda +open import category-theory.categories +open import category-theory.isomorphism-induction-categories open import category-theory.isomorphisms-in-precategories open import category-theory.isomorphisms-in-subprecategories open import category-theory.precategories @@ -15,6 +17,7 @@ open import category-theory.subprecategories open import foundation.dependent-pair-types open import foundation.iterated-dependent-product-types open import foundation.propositions +open import foundation.transport-along-identifications open import foundation.universe-levels ``` @@ -121,56 +124,45 @@ module _ ### Subprecategories of categories are replete -```text +```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)) - ( 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) + based-is-in-iso-is-category-Subprecategory : + {x : obj-Subprecategory C P} + {y : obj-Precategory C} + (f : iso-Precategory C (inclusion-obj-Subprecategory C P x) y) → + is-in-iso-Subprecategory C P f + based-is-in-iso-is-category-Subprecategory {x} f = + ind-iso-Category + ( C , is-category-C) + ( λ B e → is-in-iso-Subprecategory C P e) + ( is-in-iso-id-Subprecategory C P x) + ( f) + + is-replete-is-category-Subprecategory : is-replete-Subprecategory C P + is-replete-is-category-Subprecategory x y f = + ind-iso-Category + ( C , is-category-C) + ( λ z e → + Σ ( is-in-obj-Subprecategory C P z) + ( λ z₀ → + is-in-iso-obj-subprecategory-Subprecategory C P {x} {z , z₀} e)) + ( pr2 (is-in-iso-id-Subprecategory C P x)) + ( f) ``` -This remains to complete. - ### If a full subprecategory is closed under isomorphic objects then it is replete This remains to be formalized. ## See also -- Every [subcategory](category-theory.subcategories.md) of a - [category](category-theory.categories.md) is replete. +- Every [subcategory](category-theory.subcategories.md) is replete. ## External links From 922e1ef8d8fdde5590d58599e0f545f181391aba Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 22:40:14 +0200 Subject: [PATCH 42/49] fixes --- .../full-subprecategories.lagda.md | 4 +-- src/category-theory/gaunt-categories.lagda.md | 4 +-- .../isomorphisms-in-subprecategories.lagda.md | 33 ++++++++++++++++--- 3 files changed, 31 insertions(+), 10 deletions(-) diff --git a/src/category-theory/full-subprecategories.lagda.md b/src/category-theory/full-subprecategories.lagda.md index 96cc1399f8..2437f2eda8 100644 --- a/src/category-theory/full-subprecategories.lagda.md +++ b/src/category-theory/full-subprecategories.lagda.md @@ -246,9 +246,7 @@ module _ is-category-precategory-is-category-Full-Subprecategory is-category-C X = fundamental-theorem-id ( is-torsorial-Eq-subtype - ( is-torsorial-iso-Category - ( C , is-category-C) - ( inclusion-subtype P X)) + ( is-torsorial-iso-Category (C , is-category-C) (inclusion-subtype P X)) ( is-prop-is-in-subtype P) ( inclusion-subtype P X) ( id-iso-Precategory C) diff --git a/src/category-theory/gaunt-categories.lagda.md b/src/category-theory/gaunt-categories.lagda.md index 028a446e16..d3b30a4005 100644 --- a/src/category-theory/gaunt-categories.lagda.md +++ b/src/category-theory/gaunt-categories.lagda.md @@ -38,8 +38,8 @@ the following equivalent conditions hold: [isomorphism](category-theory.isomorphisms-in-categories.md)-[sets](foundation-core.sets.md) are [propositions](foundation-core.propositions.md). 2. The objects form a set. -3. Every object is [rigid](category-theory.rigid-objects-in-categories.md), - meaning its [automorphism group](group-theory.automorphism-groups.md) is +3. Every object is [rigid](category-theory.rigid-objects-categories.md), meaning + its [automorphism group](group-theory.automorphism-groups.md) is [trivial](group-theory.trivial-groups.md). Gaunt categories forms the common intersection of (univalent) categories and diff --git a/src/category-theory/isomorphisms-in-subprecategories.lagda.md b/src/category-theory/isomorphisms-in-subprecategories.lagda.md index 43f4cdf457..4f6e546faa 100644 --- a/src/category-theory/isomorphisms-in-subprecategories.lagda.md +++ b/src/category-theory/isomorphisms-in-subprecategories.lagda.md @@ -14,6 +14,7 @@ open import category-theory.subprecategories open import foundation.dependent-pair-types open import foundation.propositions open import foundation.subtypes +open import foundation.action-on-identifications-functions open import foundation.universe-levels ``` @@ -56,7 +57,6 @@ module _ is-in-is-iso-prop-Subprecategory = subtype-hom-obj-subprecategory-Subprecategory C P y x ( hom-inv-is-iso-Precategory C is-iso-f) - {-# INLINE is-in-is-iso-prop-Subprecategory #-} is-in-is-iso-Subprecategory : UU l4 is-in-is-iso-Subprecategory = @@ -70,7 +70,8 @@ module _ is-in-is-iso-Subprecategory → is-iso-Subprecategory C P f pr1 (pr1 (is-iso-is-in-is-iso-Subprecategory is-in-is-iso-f)) = hom-inv-is-iso-Precategory C is-iso-f - pr2 (pr1 (is-iso-is-in-is-iso-Subprecategory is-in-is-iso-f)) = is-in-is-iso-f + pr2 (pr1 (is-iso-is-in-is-iso-Subprecategory is-in-is-iso-f)) = + is-in-is-iso-f pr1 (pr2 (is-iso-is-in-is-iso-Subprecategory is-in-is-iso-f)) = eq-type-subtype ( subtype-hom-obj-subprecategory-Subprecategory C P y y) @@ -105,8 +106,6 @@ module _ ( hom-iso-Precategory C f , f₀) ( is-iso-iso-Precategory C f)) - {-# INLINE is-in-iso-obj-subprecategory-prop-Subprecategory #-} - is-in-iso-obj-subprecategory-Subprecategory : UU l4 is-in-iso-obj-subprecategory-Subprecategory = type-Prop is-in-iso-obj-subprecategory-prop-Subprecategory @@ -149,7 +148,6 @@ module _ ( λ y₀ → is-in-iso-obj-subprecategory-prop-Subprecategory C P { x , x₀} {y , y₀} f)) - {-# INLINE is-in-iso-prop-Subprecategory #-} is-in-iso-Subprecategory : UU (l3 ⊔ l4) is-in-iso-Subprecategory = type-Prop is-in-iso-prop-Subprecategory @@ -204,3 +202,28 @@ module _ pr2 (pr2 is-in-iso-id-Subprecategory) = is-in-iso-id-obj-subprecategory-Subprecategory ``` + +## Properties + +### Isomorphisms in a subprecategory are isomorphisms in the base category + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (P : Subprecategory l3 l4 C) + {x y : obj-Subprecategory C P} + where + + is-iso-base-is-iso-Subprecategory : + {f : hom-Subprecategory C P x y} → + is-iso-Subprecategory C P f → + is-iso-Precategory C + ( inclusion-hom-Subprecategory C P x y f) + pr1 (is-iso-base-is-iso-Subprecategory is-iso-f) = + pr1 (pr1 is-iso-f) + pr1 (pr2 (is-iso-base-is-iso-Subprecategory is-iso-f)) = + ap pr1 (pr1 (pr2 (is-iso-f))) + pr2 (pr2 (is-iso-base-is-iso-Subprecategory is-iso-f)) = + ap pr1 (pr2 (pr2 (is-iso-f))) +``` From 8d4041cdf44f1dc688c76f9f01b8b4172aafd355 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 22:42:24 +0200 Subject: [PATCH 43/49] pre-commit --- src/category-theory/isomorphisms-in-subprecategories.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/category-theory/isomorphisms-in-subprecategories.lagda.md b/src/category-theory/isomorphisms-in-subprecategories.lagda.md index 4f6e546faa..7f3136f3d6 100644 --- a/src/category-theory/isomorphisms-in-subprecategories.lagda.md +++ b/src/category-theory/isomorphisms-in-subprecategories.lagda.md @@ -11,10 +11,10 @@ open import category-theory.isomorphisms-in-precategories open import category-theory.precategories open import category-theory.subprecategories +open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.propositions open import foundation.subtypes -open import foundation.action-on-identifications-functions open import foundation.universe-levels ``` From 6b8c71625195c77ff877423d4367c45c4157c7bb Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Wed, 25 Oct 2023 23:25:41 +0200 Subject: [PATCH 44/49] last fixes --- .../equivalences-of-precategories.lagda.md | 2 +- src/category-theory/gaunt-categories.lagda.md | 17 +++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/category-theory/equivalences-of-precategories.lagda.md b/src/category-theory/equivalences-of-precategories.lagda.md index d26d30138f..4487578e80 100644 --- a/src/category-theory/equivalences-of-precategories.lagda.md +++ b/src/category-theory/equivalences-of-precategories.lagda.md @@ -59,5 +59,5 @@ module _ ```agda equiv-Precategory : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) - equiv-Precategory = Σ (functor-Precategory C D) is-equiv-functor-Precategory + equiv-Precategory = Σ (functor-Precategory C D) (is-equiv-functor-Precategory) ``` diff --git a/src/category-theory/gaunt-categories.lagda.md b/src/category-theory/gaunt-categories.lagda.md index d3b30a4005..d902799dff 100644 --- a/src/category-theory/gaunt-categories.lagda.md +++ b/src/category-theory/gaunt-categories.lagda.md @@ -31,8 +31,8 @@ open import foundation.universe-levels ## Idea -A **gaunt category** is a [category](category-theory.categories.md) for one of -the following equivalent conditions hold: +A **gaunt category** is a [category](category-theory.categories.md) such that +one of the following equivalent conditions hold: 1. The [isomorphism](category-theory.isomorphisms-in-categories.md)-[sets](foundation-core.sets.md) @@ -121,8 +121,7 @@ module _ ```agda Gaunt-Category : (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2) -Gaunt-Category l1 l2 = - Σ (Category l1 l2) (is-gaunt-Category) +Gaunt-Category l1 l2 = Σ (Category l1 l2) (is-gaunt-Category) module _ {l1 l2 : Level} (C : Gaunt-Category l1 l2) @@ -254,14 +253,12 @@ module _ where hom-eq-Gaunt-Category : - (x y : obj-Gaunt-Category C) → - x = y → hom-Gaunt-Category C x y + (x y : obj-Gaunt-Category C) → x = y → hom-Gaunt-Category C x y hom-eq-Gaunt-Category = hom-eq-Category (category-Gaunt-Category C) hom-inv-eq-Gaunt-Category : - (x y : obj-Gaunt-Category C) → - x = y → hom-Gaunt-Category C y x + (x y : obj-Gaunt-Category C) → x = y → hom-Gaunt-Category C y x hom-inv-eq-Gaunt-Category = hom-inv-eq-Category (category-Gaunt-Category C) ``` @@ -302,7 +299,7 @@ module _ is-category-Precategory (precategory-Strict-Category C) is-category-is-surjective-iso-eq-Strict-Category = is-category-is-surjective-iso-eq-Preunivalent-Category - (preunivalent-category-Strict-Category C) + ( preunivalent-category-Strict-Category C) is-prop-iso-is-category-Strict-Category : is-category-Precategory (precategory-Strict-Category C) → @@ -326,7 +323,7 @@ module _ is-prop-iso-is-surjective-iso-eq-Strict-Category is-surj-iso-eq-C ``` -### A category is gaunt if every object is rigid +### A category is gaunt if and only if every object is rigid **Proof:** Using the fact that a type is a [proposition](foundation-core.propositions.md) if and only if having an From 05231eeffa711f9a67ae6247781744cf425cb6ec Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 28 Oct 2023 15:20:01 +0200 Subject: [PATCH 45/49] pre-commit --- src/foundation/multivariable-homotopies.lagda.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/foundation/multivariable-homotopies.lagda.md b/src/foundation/multivariable-homotopies.lagda.md index 8890e7bb93..a5aaf2529f 100644 --- a/src/foundation/multivariable-homotopies.lagda.md +++ b/src/foundation/multivariable-homotopies.lagda.md @@ -16,7 +16,6 @@ open import foundation.function-extensionality open import foundation.iterated-dependent-product-types open import foundation.universe-levels -open import foundation-core.equivalences open import foundation-core.functoriality-dependent-function-types open import foundation-core.identity-types ``` From 8dc6b590e36c5d8d779a08d08855a2120d6fb4b8 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 28 Oct 2023 15:41:33 +0200 Subject: [PATCH 46/49] merge stuff about yoneda to avoid double review --- src/category-theory.lagda.md | 2 + .../copresheaf-categories.lagda.md | 169 ++++++++++++ ...rs-from-small-to-large-categories.lagda.md | 245 ++++++++++++++++++ .../presheaf-categories.lagda.md | 167 ++++++++---- ...resentable-functors-precategories.lagda.md | 4 +- .../yoneda-lemma-categories.lagda.md | 142 ++++------ .../yoneda-lemma-precategories.lagda.md | 167 ++++++------ src/foundation/category-of-sets.lagda.md | 22 +- 8 files changed, 684 insertions(+), 234 deletions(-) create mode 100644 src/category-theory/copresheaf-categories.lagda.md create mode 100644 src/category-theory/natural-transformations-functors-from-small-to-large-categories.lagda.md diff --git a/src/category-theory.lagda.md b/src/category-theory.lagda.md index 12f28d5b87..246d29dd86 100644 --- a/src/category-theory.lagda.md +++ b/src/category-theory.lagda.md @@ -26,6 +26,7 @@ open import category-theory.category-of-maps-from-small-to-large-categories publ 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.copresheaf-categories 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 @@ -90,6 +91,7 @@ open import category-theory.natural-isomorphisms-maps-categories public open import category-theory.natural-isomorphisms-maps-precategories public open import category-theory.natural-numbers-object-precategories public open import category-theory.natural-transformations-functors-categories public +open import category-theory.natural-transformations-functors-from-small-to-large-categories public open import category-theory.natural-transformations-functors-from-small-to-large-precategories public open import category-theory.natural-transformations-functors-large-categories public open import category-theory.natural-transformations-functors-large-precategories public diff --git a/src/category-theory/copresheaf-categories.lagda.md b/src/category-theory/copresheaf-categories.lagda.md new file mode 100644 index 0000000000..66c99e5828 --- /dev/null +++ b/src/category-theory/copresheaf-categories.lagda.md @@ -0,0 +1,169 @@ +# Copresheaf categories + +```agda +module category-theory.copresheaf-categories where +``` + +
Imports + +```agda +open import category-theory.categories +open import category-theory.category-of-functors-from-small-to-large-categories +open import category-theory.functors-precategories +open import category-theory.large-categories +open import category-theory.large-precategories +open import category-theory.precategories +open import category-theory.precategory-of-functors-from-small-to-large-precategories + +open import foundation.category-of-sets +open import foundation.sets +open import foundation.universe-levels +``` + +
+ +## Idea + +Given a [precategory](category-theory.precategories.md) `C`, we can form its +**copresheaf [category](category-theory.large-categories.md)** as the +[large category of functors](category-theory.functors-from-small-to-large-precategories.md) +from `C`, into the [large category of sets](foundation.category-of-sets.md) + +```text + C → Set. +``` + +To this large category, there is an associated +[small category](category-theory.categories.md) of small copresheaves, taking +values in small [sets](foundation-core.sets.md). + +## Definitions + +### The large category of copresheaves on a precategory + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) + where + + copresheaf-Large-Precategory : + Large-Precategory (λ l → l1 ⊔ l2 ⊔ lsuc l) (λ l l' → l1 ⊔ l2 ⊔ l ⊔ l') + copresheaf-Large-Precategory = + functor-large-precategory-Small-Large-Precategory C Set-Large-Precategory + + is-large-category-copresheaf-Large-Category : + is-large-category-Large-Precategory copresheaf-Large-Precategory + is-large-category-copresheaf-Large-Category = + is-large-category-functor-large-precategory-is-large-category-Small-Large-Precategory + ( C) + ( Set-Large-Precategory) + ( is-large-category-Set-Large-Precategory) + + copresheaf-Large-Category : + Large-Category (λ l → l1 ⊔ l2 ⊔ lsuc l) (λ l l' → l1 ⊔ l2 ⊔ l ⊔ l') + large-precategory-Large-Category copresheaf-Large-Category = + copresheaf-Large-Precategory + is-large-category-Large-Category copresheaf-Large-Category = + is-large-category-copresheaf-Large-Category +``` + +We record the components of the large category of copresheaves on a precategory. + +```agda + obj-copresheaf-Large-Category = + obj-Large-Precategory copresheaf-Large-Precategory + + hom-set-copresheaf-Large-Category = + hom-set-Large-Precategory copresheaf-Large-Precategory + + hom-copresheaf-Large-Category = + hom-Large-Precategory copresheaf-Large-Precategory + + comp-hom-copresheaf-Large-Category = + comp-hom-Large-Precategory copresheaf-Large-Precategory + + id-hom-copresheaf-Large-Category = + id-hom-Large-Precategory copresheaf-Large-Precategory + + associative-comp-hom-copresheaf-Large-Category = + associative-comp-hom-Large-Precategory copresheaf-Large-Precategory + + left-unit-law-comp-hom-copresheaf-Large-Category = + left-unit-law-comp-hom-Large-Precategory copresheaf-Large-Precategory + + right-unit-law-comp-hom-copresheaf-Large-Category = + right-unit-law-comp-hom-Large-Precategory copresheaf-Large-Precategory +``` + +### The category of small copresheaves on a precategory + +```agda +module _ + {l1 l2 : Level} (C : Precategory l1 l2) (l : Level) + where + + copresheaf-Precategory : Precategory (l1 ⊔ l2 ⊔ lsuc l) (l1 ⊔ l2 ⊔ l) + copresheaf-Precategory = + precategory-Large-Precategory (copresheaf-Large-Precategory C) l + + copresheaf-Category : Category (l1 ⊔ l2 ⊔ lsuc l) (l1 ⊔ l2 ⊔ l) + copresheaf-Category = category-Large-Category (copresheaf-Large-Category C) l +``` + +We also record the components of the category of small copresheaves on a +precategory. + +```agda + obj-copresheaf-Category = + obj-Precategory copresheaf-Precategory + + hom-set-copresheaf-Category = + hom-set-Precategory copresheaf-Precategory + + hom-copresheaf-Category = + hom-Precategory copresheaf-Precategory + + comp-hom-copresheaf-Category = + comp-hom-Precategory copresheaf-Precategory + + id-hom-copresheaf-Category = + id-hom-Precategory copresheaf-Precategory + + associative-comp-hom-copresheaf-Category = + associative-comp-hom-Precategory copresheaf-Precategory + + left-unit-law-comp-hom-copresheaf-Category = + left-unit-law-comp-hom-Precategory copresheaf-Precategory + + right-unit-law-comp-hom-copresheaf-Category = + right-unit-law-comp-hom-Precategory copresheaf-Precategory +``` + +### Sections of copresheaves + +As a choice of universe level must be made to talk about sections of +copresheaves, this notion coincides for the large and small category of +copresheaves. + +```agda +module _ + {l1 l2 l3 : Level} (C : Precategory l1 l2) + where + + section-copresheaf-Category : + (F : obj-copresheaf-Category C l3) (c : obj-Precategory C) → UU l3 + section-copresheaf-Category F c = + type-Set (obj-functor-Precategory C (Set-Precategory l3) F c) +``` + +## See also + +- [The Yoneda lemma](category-theory.yoneda-lemma-precategories.md) + +## External links + +- [Presheaf precategories](https://1lab.dev/Cat.Functor.Base.html#presheaf-precategories) + at 1lab +- [category of presheaves](https://ncatlab.org/nlab/show/category+of+presheaves) + at nlab +- [copresheaf](https://ncatlab.org/nlab/show/copresheaf) at nlab diff --git a/src/category-theory/natural-transformations-functors-from-small-to-large-categories.lagda.md b/src/category-theory/natural-transformations-functors-from-small-to-large-categories.lagda.md new file mode 100644 index 0000000000..53da547b30 --- /dev/null +++ b/src/category-theory/natural-transformations-functors-from-small-to-large-categories.lagda.md @@ -0,0 +1,245 @@ +# Natural transformations between functors from small to large categories + +```agda +module category-theory.natural-transformations-functors-from-small-to-large-categories where +``` + +
Imports + +```agda +open import category-theory.categories +open import category-theory.functors-from-small-to-large-categories +open import category-theory.large-categories +open import category-theory.natural-transformations-functors-from-small-to-large-precategories + +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 +open import foundation.universe-levels +``` + +
+ +## Idea + +Given a small [category](category-theory.categories.md) `C` and a +[large category](category-theory.large-categories.md) `D`, a **natural +transformation** from a +[functor](category-theory.functors-from-small-to-large-categories.md) +`F : C → D` to `G : C → D` consists of : + +- a family of morphisms `a : (x : C) → hom (F x) (G x)` such that the following + identity holds: +- `(G f) ∘ (a x) = (a y) ∘ (F f)`, for all `f : hom x y`. + +## Definition + +```agda +module _ + {l1 l2 γF γG : Level} {α : Level → Level} {β : Level → Level → Level} + (C : Category l1 l2) + (D : Large-Category α β) + (F : functor-Small-Large-Category C D γF) + (G : functor-Small-Large-Category C D γG) + where + + hom-family-functor-Small-Large-Category : UU (l1 ⊔ β γF γG) + hom-family-functor-Small-Large-Category = + hom-family-functor-Small-Large-Precategory + ( precategory-Category C) (large-precategory-Large-Category D) F G + + is-natural-transformation-Small-Large-Category : + hom-family-functor-Small-Large-Category → UU (l1 ⊔ l2 ⊔ β γF γG) + is-natural-transformation-Small-Large-Category = + is-natural-transformation-Small-Large-Precategory + ( precategory-Category C) (large-precategory-Large-Category D) F G + + natural-transformation-Small-Large-Category : UU (l1 ⊔ l2 ⊔ β γF γG) + natural-transformation-Small-Large-Category = + natural-transformation-Small-Large-Precategory + ( precategory-Category C) (large-precategory-Large-Category D) F G + + hom-family-natural-transformation-Small-Large-Category : + natural-transformation-Small-Large-Category → + hom-family-functor-Small-Large-Category + hom-family-natural-transformation-Small-Large-Category = + hom-family-natural-transformation-Small-Large-Precategory + ( precategory-Category C) (large-precategory-Large-Category D) F G + + naturality-natural-transformation-Small-Large-Category : + (γ : natural-transformation-Small-Large-Category) → + is-natural-transformation-Small-Large-Category + ( hom-family-natural-transformation-Small-Large-Category γ) + naturality-natural-transformation-Small-Large-Category = + naturality-natural-transformation-Small-Large-Precategory + ( precategory-Category C) (large-precategory-Large-Category D) F G +``` + +## Composition and identity of natural transformations + +```agda +module _ + {l1 l2 : Level} {α : Level → Level} {β : Level → Level → Level} + (C : Category l1 l2) + (D : Large-Category α β) + where + + id-natural-transformation-Small-Large-Category : + {γF : Level} (F : functor-Small-Large-Category C D γF) → + natural-transformation-Small-Large-Category C D F F + id-natural-transformation-Small-Large-Category = + id-natural-transformation-Small-Large-Precategory + ( precategory-Category C) (large-precategory-Large-Category D) + + comp-natural-transformation-Small-Large-Category : + {γF γG γH : Level} + (F : functor-Small-Large-Category C D γF) + (G : functor-Small-Large-Category C D γG) + (H : functor-Small-Large-Category C D γH) → + natural-transformation-Small-Large-Category C D G H → + natural-transformation-Small-Large-Category C D F G → + natural-transformation-Small-Large-Category C D F H + comp-natural-transformation-Small-Large-Category = + comp-natural-transformation-Small-Large-Precategory + ( precategory-Category C) (large-precategory-Large-Category D) +``` + +## Properties + +### That a family of morphisms is a natural transformation is a proposition + +This follows from the fact that the hom-types are +[sets](foundation-core.sets.md). + +```agda +module _ + {l1 l2 γF γG : Level} {α : Level → Level} {β : Level → Level → Level} + (C : Category l1 l2) + (D : Large-Category α β) + (F : functor-Small-Large-Category C D γF) + (G : functor-Small-Large-Category C D γG) + where + + is-prop-is-natural-transformation-Small-Large-Category : + (γ : hom-family-functor-Small-Large-Category C D F G) → + is-prop (is-natural-transformation-Small-Large-Category C D F G γ) + is-prop-is-natural-transformation-Small-Large-Category = + is-prop-is-natural-transformation-Small-Large-Precategory + ( precategory-Category C) (large-precategory-Large-Category D) F G + + is-natural-transformation-prop-Small-Large-Category : + (γ : hom-family-functor-Small-Large-Category C D F G) → + Prop (l1 ⊔ l2 ⊔ β γF γG) + is-natural-transformation-prop-Small-Large-Category = + is-natural-transformation-prop-Small-Large-Precategory + ( precategory-Category C) (large-precategory-Large-Category D) F G +``` + +### The set of natural transformations + +```agda +module _ + {l1 l2 γF γG : Level} {α : Level → Level} {β : Level → Level → Level} + (C : Category l1 l2) + (D : Large-Category α β) + (F : functor-Small-Large-Category C D γF) + (G : functor-Small-Large-Category C D γG) + where + + is-emb-hom-family-natural-transformation-Small-Large-Category : + is-emb (hom-family-natural-transformation-Small-Large-Category C D F G) + is-emb-hom-family-natural-transformation-Small-Large-Category = + is-emb-hom-family-natural-transformation-Small-Large-Precategory + ( precategory-Category C) (large-precategory-Large-Category D) F G + + emb-hom-family-natural-transformation-Small-Large-Category : + natural-transformation-Small-Large-Category C D F G ↪ + hom-family-functor-Small-Large-Category C D F G + emb-hom-family-natural-transformation-Small-Large-Category = + emb-hom-family-natural-transformation-Small-Large-Precategory + ( precategory-Category C) (large-precategory-Large-Category D) F G + + is-set-natural-transformation-Small-Large-Category : + is-set (natural-transformation-Small-Large-Category C D F G) + is-set-natural-transformation-Small-Large-Category = + is-set-natural-transformation-Small-Large-Precategory + ( precategory-Category C) (large-precategory-Large-Category D) F G + + natural-transformation-set-Small-Large-Category : + Set (l1 ⊔ l2 ⊔ β γF γG) + pr1 (natural-transformation-set-Small-Large-Category) = + natural-transformation-Small-Large-Category C D F G + pr2 (natural-transformation-set-Small-Large-Category) = + is-set-natural-transformation-Small-Large-Category + + extensionality-natural-transformation-Small-Large-Category : + (a b : natural-transformation-Small-Large-Category C D F G) → + ( a = b) ≃ + ( hom-family-natural-transformation-Small-Large-Category C D F G a ~ + hom-family-natural-transformation-Small-Large-Category C D F G b) + extensionality-natural-transformation-Small-Large-Category = + extensionality-natural-transformation-Small-Large-Precategory + ( precategory-Category C) (large-precategory-Large-Category D) F G + + eq-htpy-hom-family-natural-transformation-Small-Large-Category : + (a b : natural-transformation-Small-Large-Category C D F G) → + ( hom-family-natural-transformation-Small-Large-Category C D F G a ~ + hom-family-natural-transformation-Small-Large-Category C D F G b) → + a = b + eq-htpy-hom-family-natural-transformation-Small-Large-Category = + eq-htpy-hom-family-natural-transformation-Small-Large-Precategory + ( precategory-Category C) (large-precategory-Large-Category D) F G +``` + +### Categorical laws for natural transformations + +```agda +module _ + {l1 l2 : Level} {α : Level → Level} {β : Level → Level → Level} + (C : Category l1 l2) + (D : Large-Category α β) + where + + right-unit-law-comp-natural-transformation-Small-Large-Category : + {γF γG : Level} + (F : functor-Small-Large-Category C D γF) + (G : functor-Small-Large-Category C D γG) + (a : natural-transformation-Small-Large-Category C D F G) → + comp-natural-transformation-Small-Large-Category C D F F G a + ( id-natural-transformation-Small-Large-Category C D F) = a + right-unit-law-comp-natural-transformation-Small-Large-Category = + right-unit-law-comp-natural-transformation-Small-Large-Precategory + ( precategory-Category C) (large-precategory-Large-Category D) + + left-unit-law-comp-natural-transformation-Small-Large-Category : + {γF γG : Level} + (F : functor-Small-Large-Category C D γF) + (G : functor-Small-Large-Category C D γG) + (a : natural-transformation-Small-Large-Category C D F G) → + comp-natural-transformation-Small-Large-Category C D F G G + ( id-natural-transformation-Small-Large-Category C D G) a = a + left-unit-law-comp-natural-transformation-Small-Large-Category = + left-unit-law-comp-natural-transformation-Small-Large-Precategory + ( precategory-Category C) (large-precategory-Large-Category D) + + associative-comp-natural-transformation-Small-Large-Category : + {γF γG γH γI : Level} + (F : functor-Small-Large-Category C D γF) + (G : functor-Small-Large-Category C D γG) + (H : functor-Small-Large-Category C D γH) + (I : functor-Small-Large-Category C D γI) + (a : natural-transformation-Small-Large-Category C D F G) + (b : natural-transformation-Small-Large-Category C D G H) + (c : natural-transformation-Small-Large-Category C D H I) → + comp-natural-transformation-Small-Large-Category C D F G I + ( comp-natural-transformation-Small-Large-Category C D G H I c b) a = + comp-natural-transformation-Small-Large-Category C D F H I c + ( comp-natural-transformation-Small-Large-Category C D F G H b a) + associative-comp-natural-transformation-Small-Large-Category = + associative-comp-natural-transformation-Small-Large-Precategory + ( precategory-Category C) (large-precategory-Large-Category D) +``` diff --git a/src/category-theory/presheaf-categories.lagda.md b/src/category-theory/presheaf-categories.lagda.md index a740fdb3ef..abf3a474e7 100644 --- a/src/category-theory/presheaf-categories.lagda.md +++ b/src/category-theory/presheaf-categories.lagda.md @@ -8,14 +8,12 @@ module category-theory.presheaf-categories where ```agda open import category-theory.categories -open import category-theory.category-of-functors-from-small-to-large-categories +open import category-theory.copresheaf-categories open import category-theory.large-categories open import category-theory.large-precategories open import category-theory.opposite-precategories open import category-theory.precategories -open import category-theory.precategory-of-functors-from-small-to-large-precategories -open import foundation.category-of-sets open import foundation.universe-levels ``` @@ -23,83 +21,140 @@ open import foundation.universe-levels ## Idea -Given any [precategory](category-theory.precategories.md) `C`, we can form its -**presheaf category** as the -[large category](category-theory.large-categories.md) of -[functors](category-theory.functors-from-small-to-large-precategories.md) from -the [opposite precategory](category-theory.opposite-precategories.md) of `C`, +Given a [precategory](category-theory.precategories.md) `C`, we can form its +**presheaf [category](category-theory.large-categories.md)** as the +[large category of functors](category-theory.functors-from-small-to-large-precategories.md) +from the [opposite of](category-theory.opposite-precategories.md) `C`, `Cᵒᵖ`, into the [large category of sets](foundation.category-of-sets.md) ```text Cᵒᵖ → Set. ``` -Dually, we can form the **copresheaf category** of `C` by taking the large -functor category - -```text - C → Set. -``` +To this large category, there is an associated +[small category](category-theory.categories.md) of small presheaves, taking +values in small [sets](foundation-core.sets.md). ## Definitions -### The copresheaf category of a precategory +### The large category of presheaves on a precategory ```agda module _ {l1 l2 : Level} (C : Precategory l1 l2) where - copresheaf-Large-Precategory : + presheaf-Large-Precategory : Large-Precategory (λ l → l1 ⊔ l2 ⊔ lsuc l) (λ l l' → l1 ⊔ l2 ⊔ l ⊔ l') - copresheaf-Large-Precategory = - functor-large-precategory-Small-Large-Precategory C Set-Large-Precategory + presheaf-Large-Precategory = + copresheaf-Large-Precategory (opposite-Precategory C) + + is-large-category-presheaf-Large-Category : + is-large-category-Large-Precategory presheaf-Large-Precategory + is-large-category-presheaf-Large-Category = + is-large-category-copresheaf-Large-Category (opposite-Precategory C) - copresheaf-Large-Category : + presheaf-Large-Category : Large-Category (λ l → l1 ⊔ l2 ⊔ lsuc l) (λ l l' → l1 ⊔ l2 ⊔ l ⊔ l') - large-precategory-Large-Category copresheaf-Large-Category = - copresheaf-Large-Precategory - is-large-category-Large-Category copresheaf-Large-Category = - is-large-category-functor-large-precategory-is-large-category-Small-Large-Precategory - ( C) - ( Set-Large-Precategory) - ( is-large-category-Set-Large-Precategory) - - copresheaf-precategory-Large-Precategory : - (l : Level) → Precategory (l1 ⊔ l2 ⊔ lsuc l) (l1 ⊔ l2 ⊔ l) - copresheaf-precategory-Large-Precategory = - precategory-Large-Precategory copresheaf-Large-Precategory - - copresheaf-category-Large-Category : - (l : Level) → Category (l1 ⊔ l2 ⊔ lsuc l) (l1 ⊔ l2 ⊔ l) - copresheaf-category-Large-Category = - category-Large-Category copresheaf-Large-Category + presheaf-Large-Category = copresheaf-Large-Category (opposite-Precategory C) ``` -### The presheaf category of a precategory +We record the components of the large category of presheaves on a precategory. + +```agda + obj-presheaf-Large-Category = + obj-Large-Precategory presheaf-Large-Precategory + + hom-set-presheaf-Large-Category = + hom-set-Large-Precategory presheaf-Large-Precategory + + hom-presheaf-Large-Category = + hom-Large-Precategory presheaf-Large-Precategory + + comp-hom-presheaf-Large-Category = + comp-hom-Large-Precategory presheaf-Large-Precategory + + id-hom-presheaf-Large-Category = + id-hom-Large-Precategory presheaf-Large-Precategory + + associative-comp-hom-presheaf-Large-Category = + associative-comp-hom-Large-Precategory presheaf-Large-Precategory + + left-unit-law-comp-hom-presheaf-Large-Category = + left-unit-law-comp-hom-Large-Precategory presheaf-Large-Precategory + + right-unit-law-comp-hom-presheaf-Large-Category = + right-unit-law-comp-hom-Large-Precategory presheaf-Large-Precategory +``` + +### The category of small presheaves on a precategory ```agda module _ - {l1 l2 : Level} (C : Precategory l1 l2) + {l1 l2 : Level} (C : Precategory l1 l2) (l : Level) where - presheaf-Large-Precategory : - Large-Precategory (λ l → l1 ⊔ l2 ⊔ lsuc l) (λ l l' → l1 ⊔ l2 ⊔ l ⊔ l') - presheaf-Large-Precategory = - copresheaf-Large-Precategory (opposite-Precategory C) + presheaf-Precategory : Precategory (l1 ⊔ l2 ⊔ lsuc l) (l1 ⊔ l2 ⊔ l) + presheaf-Precategory = + precategory-Large-Precategory (presheaf-Large-Precategory C) l - presheaf-Large-Category : - Large-Category (λ l → l1 ⊔ l2 ⊔ lsuc l) (λ l l' → l1 ⊔ l2 ⊔ l ⊔ l') - presheaf-Large-Category = - copresheaf-Large-Category (opposite-Precategory C) - - presheaf-precategory-Large-Precategory : - (l : Level) → Precategory (l1 ⊔ l2 ⊔ lsuc l) (l1 ⊔ l2 ⊔ l) - presheaf-precategory-Large-Precategory = - precategory-Large-Precategory presheaf-Large-Precategory - - presheaf-category-Large-Category : - (l : Level) → Category (l1 ⊔ l2 ⊔ lsuc l) (l1 ⊔ l2 ⊔ l) - presheaf-category-Large-Category = - category-Large-Category presheaf-Large-Category + presheaf-Category : Category (l1 ⊔ l2 ⊔ lsuc l) (l1 ⊔ l2 ⊔ l) + presheaf-Category = category-Large-Category (presheaf-Large-Category C) l +``` + +We also record the components of the category of small presheaves on a +precategory. + +```agda + obj-presheaf-Category = + obj-Precategory presheaf-Precategory + + hom-set-presheaf-Category = + hom-set-Precategory presheaf-Precategory + + hom-presheaf-Category = + hom-Precategory presheaf-Precategory + + comp-hom-presheaf-Category = + comp-hom-Precategory presheaf-Precategory + + id-hom-presheaf-Category = + id-hom-Precategory presheaf-Precategory + + associative-comp-hom-presheaf-Category = + associative-comp-hom-Precategory presheaf-Precategory + + left-unit-law-comp-hom-presheaf-Category = + left-unit-law-comp-hom-Precategory presheaf-Precategory + + right-unit-law-comp-hom-presheaf-Category = + right-unit-law-comp-hom-Precategory presheaf-Precategory ``` + +### Sections of presheaves + +As a choice of universe level must be made to talk about sections of presheaves, +this notion coincides for the large and small category of presheaves. + +```agda +module _ + {l1 l2 l3 : Level} (C : Precategory l1 l2) + where + + section-presheaf-Category : + (F : obj-presheaf-Category C l3) (c : obj-Precategory C) → UU l3 + section-presheaf-Category = + section-copresheaf-Category (opposite-Precategory C) +``` + +## See also + +- [The Yoneda lemma](category-theory.yoneda-lemma-precategories.md) + +## External links + +- [Presheaf precategories](https://1lab.dev/Cat.Functor.Base.html#presheaf-precategories) + at 1lab +- [category of presheaves](https://ncatlab.org/nlab/show/category+of+presheaves) + at nlab +- [presheaf](https://ncatlab.org/nlab/show/presheaf) at nlab diff --git a/src/category-theory/representable-functors-precategories.lagda.md b/src/category-theory/representable-functors-precategories.lagda.md index 8f60223161..4d7cf174de 100644 --- a/src/category-theory/representable-functors-precategories.lagda.md +++ b/src/category-theory/representable-functors-precategories.lagda.md @@ -7,12 +7,12 @@ module category-theory.representable-functors-precategories where
Imports ```agda +open import category-theory.copresheaf-categories open import category-theory.functors-precategories open import category-theory.maps-precategories open import category-theory.natural-transformations-functors-precategories open import category-theory.opposite-precategories open import category-theory.precategories -open import category-theory.presheaf-categories open import foundation.category-of-sets open import foundation.dependent-pair-types @@ -141,7 +141,7 @@ module _ map-representable-functor-copresheaf-Precategory : map-Precategory ( opposite-Precategory C) - ( copresheaf-precategory-Large-Precategory C l2) + ( copresheaf-Precategory C l2) pr1 map-representable-functor-copresheaf-Precategory = representable-functor-Precategory C pr2 map-representable-functor-copresheaf-Precategory = diff --git a/src/category-theory/yoneda-lemma-categories.lagda.md b/src/category-theory/yoneda-lemma-categories.lagda.md index 4c45298d69..87ebe92e2e 100644 --- a/src/category-theory/yoneda-lemma-categories.lagda.md +++ b/src/category-theory/yoneda-lemma-categories.lagda.md @@ -8,16 +8,13 @@ module category-theory.yoneda-lemma-categories where ```agda open import category-theory.categories -open import category-theory.functors-categories -open import category-theory.functors-from-small-to-large-precategories -open import category-theory.natural-transformations-functors-categories -open import category-theory.natural-transformations-functors-from-small-to-large-precategories +open import category-theory.copresheaf-categories +open import category-theory.natural-transformations-functors-from-small-to-large-categories open import category-theory.representable-functors-categories open import category-theory.yoneda-lemma-precategories open import foundation.category-of-sets open import foundation.equivalences -open import foundation.sets open import foundation.universe-levels ``` @@ -27,109 +24,67 @@ open import foundation.universe-levels Given a [category](category-theory.categories.md) `C`, an object `c`, and a [functor](category-theory.functors-categories.md) `F` from `C` to the -[category of sets](foundation.category-of-sets.md), there is an -[equivalence](foundation-core.equivalences.md) between the +[category of sets](foundation.category-of-sets.md) + +```text + F : C → Set, +``` + +there is an [equivalence](foundation-core.equivalences.md) between the [set of natural transformations](category-theory.natural-transformations-functors-categories.md) from the functor [represented](category-theory.representable-functors-categories.md) by `c` to `F` and the [set](foundation-core.sets.md) `F c`. +```text + Nat(Hom(c , -) , F) ≃ F c +``` + More precisely, the **Yoneda lemma** asserts that the map from the type of natural transformations to the type `F c` defined by evaluating the component of the natural transformation at the object `c` at the identity arrow on `c` is an equivalence. -## The yoneda lemma into the large category of sets +## Theorem + +### The yoneda lemma into the large category of sets ```agda module _ {l1 l2 l3 : Level} (C : Category l1 l2) (c : obj-Category C) - (F : - functor-Small-Large-Precategory - ( precategory-Category C) - ( Set-Large-Precategory) - ( l3)) + (F : obj-copresheaf-Large-Category (precategory-Category C) l3) where - map-yoneda-Small-Large-Category : - natural-transformation-Small-Large-Precategory - ( precategory-Category C) - ( Set-Large-Precategory) - ( representable-functor-Category C c) - ( F) → - type-Set - ( obj-functor-Small-Large-Precategory - ( precategory-Category C) - ( Set-Large-Precategory) - ( F) - ( c)) - map-yoneda-Small-Large-Category σ = - hom-family-natural-transformation-Small-Large-Precategory - ( precategory-Category C) - ( Set-Large-Precategory) - ( representable-functor-Category C c) - ( F) - ( σ) - ( c) - ( id-hom-Category C) - - extension-yoneda-Small-Large-Category : - type-Set - ( obj-functor-Small-Large-Precategory - ( precategory-Category C) - ( Set-Large-Precategory) - ( F) - ( c)) → - natural-transformation-Small-Large-Precategory - ( precategory-Category C) - ( Set-Large-Precategory) - ( representable-functor-Category C c) - ( F) - extension-yoneda-Small-Large-Category = - extension-yoneda-Small-Large-Precategory (precategory-Category C) c F - - lemma-yoneda-Small-Large-Category : - is-equiv map-yoneda-Small-Large-Category - lemma-yoneda-Small-Large-Category = - lemma-yoneda-Small-Large-Precategory (precategory-Category C) c F - - equiv-lemma-yoneda-Small-Large-Category : - ( natural-transformation-Small-Large-Precategory - ( precategory-Category C) - ( Set-Large-Precategory) - ( representable-functor-Category C c) - ( F)) ≃ - ( type-Set - ( obj-functor-Small-Large-Precategory - ( precategory-Category C) - ( Set-Large-Precategory) - ( F) - ( c))) - equiv-lemma-yoneda-Small-Large-Category = - equiv-lemma-yoneda-Small-Large-Precategory (precategory-Category C) c F + map-yoneda-Category : + hom-copresheaf-Large-Category + ( precategory-Category C) (representable-functor-Category C c) F → + section-copresheaf-Category (precategory-Category C) F c + map-yoneda-Category = + map-yoneda-Precategory (precategory-Category C) c F ``` -## The yoneda lemma into the small category of sets +The inverse to the Yoneda map: ```agda -module _ - {l1 l2 : Level} (C : Category l1 l2) (c : obj-Category C) - (F : functor-Category C (Set-Category l2)) - where - - map-yoneda-Category : - natural-transformation-Category - ( C) - ( Set-Category l2) - ( representable-functor-Category C c) - ( F) → - type-Set (obj-functor-Category C (Set-Category l2) F c) - map-yoneda-Category = map-yoneda-Precategory (precategory-Category C) c F + hom-family-extension-yoneda-Category : + (u : section-copresheaf-Category (precategory-Category C) F c) → + hom-family-functor-Small-Large-Category + C Set-Large-Category (representable-functor-Category C c) F + hom-family-extension-yoneda-Category = + hom-family-extension-yoneda-Precategory (precategory-Category C) c F + + naturality-extension-yoneda-Category : + (u : section-copresheaf-Category (precategory-Category C) F c) → + is-natural-transformation-Small-Large-Category + C Set-Large-Category (representable-functor-Category C c) F + ( hom-family-extension-yoneda-Category u) + naturality-extension-yoneda-Category = + naturality-extension-yoneda-Precategory (precategory-Category C) c F extension-yoneda-Category : - type-Set (obj-functor-Category C (Set-Category l2) F c) → - natural-transformation-Category - C (Set-Category l2) (representable-functor-Category C c) F + section-copresheaf-Category (precategory-Category C) F c → + hom-copresheaf-Large-Category + ( precategory-Category C) (representable-functor-Category C c) F extension-yoneda-Category = extension-yoneda-Precategory (precategory-Category C) c F @@ -137,9 +92,9 @@ module _ lemma-yoneda-Category = lemma-yoneda-Precategory (precategory-Category C) c F equiv-lemma-yoneda-Category : - ( natural-transformation-Category C (Set-Category l2) - ( representable-functor-Category C c) F) ≃ - ( type-Set (obj-functor-Category C (Set-Category l2) F c)) + hom-copresheaf-Large-Category + ( precategory-Category C) (representable-functor-Category C c) F ≃ + section-copresheaf-Category (precategory-Category C) F c equiv-lemma-yoneda-Category = equiv-lemma-yoneda-Precategory (precategory-Category C) c F ``` @@ -147,3 +102,12 @@ module _ ## See also - [Presheaf categories](category-theory.presheaf-categories.md) + +## External links + +- [The Yoneda embedding](https://1lab.dev/Cat.Functor.Hom.html#the-yoneda-embedding) + at 1lab +- [Yoneda lemma](https://ncatlab.org/nlab/show/Yoneda+lemma) at nlab +- [The Yoneda lemma](https://www.math3ma.com/blog/the-yoneda-lemma) at Math3ma +- [Yoneda lemma](https://en.wikipedia.org/wiki/Yoneda_lemma) at Wikipedia +- [Yoneda lemma](https://www.wikidata.org/wiki/Q320577) at Wikidata diff --git a/src/category-theory/yoneda-lemma-precategories.lagda.md b/src/category-theory/yoneda-lemma-precategories.lagda.md index 0522c0bcfe..e0e445ac2f 100644 --- a/src/category-theory/yoneda-lemma-precategories.lagda.md +++ b/src/category-theory/yoneda-lemma-precategories.lagda.md @@ -7,11 +7,13 @@ module category-theory.yoneda-lemma-precategories where
Imports ```agda +open import category-theory.copresheaf-categories open import category-theory.functors-from-small-to-large-precategories open import category-theory.functors-precategories open import category-theory.natural-transformations-functors-from-small-to-large-precategories open import category-theory.natural-transformations-functors-precategories open import category-theory.precategories +open import category-theory.presheaf-categories open import category-theory.representable-functors-precategories open import foundation.action-on-identifications-functions @@ -19,6 +21,8 @@ open import foundation.category-of-sets open import foundation.dependent-pair-types open import foundation.equivalences open import foundation.function-extensionality +open import foundation.function-types +open import foundation.homotopies open import foundation.identity-types open import foundation.retractions open import foundation.sections @@ -33,34 +37,41 @@ open import foundation.universe-levels Given a [precategory](category-theory.precategories.md) `C`, an object `c`, and a [functor](category-theory.functors-precategories.md) `F` from `C` to the -[category of sets](foundation.category-of-sets.md), there is an -[equivalence](foundation-core.equivalences.md) between the +[category of sets](foundation.category-of-sets.md) + +```text + F : C → Set, +``` + +there is an [equivalence](foundation-core.equivalences.md) between the [set of natural transformations](category-theory.natural-transformations-functors-precategories.md) from the functor [represented](category-theory.representable-functors-precategories.md) by `c` to `F` and the [set](foundation-core.sets.md) `F c`. +```text + Nat(Hom(c , -) , F) ≃ F c +``` + More precisely, the **Yoneda lemma** asserts that the map from the type of natural transformations to the type `F c` defined by evaluating the component of the natural transformation at the object `c` at the identity arrow on `c` is an equivalence. -## The yoneda lemma into the large category of sets +## Theorem + +### The yoneda lemma into the large category of sets ```agda module _ {l1 l2 l3 : Level} (C : Precategory l1 l2) (c : obj-Precategory C) - (F : functor-Small-Large-Precategory C Set-Large-Precategory l3) + (F : obj-copresheaf-Large-Category C l3) where - map-yoneda-Small-Large-Precategory : - natural-transformation-Small-Large-Precategory - ( C) - ( Set-Large-Precategory) - ( representable-functor-Precategory C c) - ( F) → - type-Set (obj-functor-Small-Large-Precategory C Set-Large-Precategory F c) - map-yoneda-Small-Large-Precategory σ = + map-yoneda-Precategory : + hom-copresheaf-Large-Category C (representable-functor-Precategory C c) F → + section-copresheaf-Category C F c + map-yoneda-Precategory σ = hom-family-natural-transformation-Small-Large-Precategory ( C) ( Set-Large-Precategory) @@ -69,43 +80,58 @@ module _ ( σ) ( c) ( id-hom-Precategory C) +``` + +The inverse to the Yoneda map: - extension-yoneda-Small-Large-Precategory : - type-Set (obj-functor-Small-Large-Precategory C Set-Large-Precategory F c) → - natural-transformation-Small-Large-Precategory +```agda + hom-family-extension-yoneda-Precategory : + (u : section-copresheaf-Category C F c) → + hom-family-functor-Small-Large-Precategory C Set-Large-Precategory (representable-functor-Precategory C c) F - pr1 (extension-yoneda-Small-Large-Precategory u) x f = + hom-family-extension-yoneda-Precategory u x f = hom-functor-Small-Large-Precategory C Set-Large-Precategory F f u - pr2 (extension-yoneda-Small-Large-Precategory u) g = + + naturality-extension-yoneda-Precategory : + (u : section-copresheaf-Category C F c) → + is-natural-transformation-Small-Large-Precategory + C Set-Large-Precategory (representable-functor-Precategory C c) F + ( hom-family-extension-yoneda-Precategory u) + naturality-extension-yoneda-Precategory u g = eq-htpy ( λ f → htpy-eq ( inv ( preserves-comp-functor-Small-Large-Precategory - ( C) - ( Set-Large-Precategory) - ( F) - ( g) - ( f))) + C Set-Large-Precategory F g f)) ( u)) - section-map-yoneda-Small-Large-Precategory : - section map-yoneda-Small-Large-Precategory - pr1 section-map-yoneda-Small-Large-Precategory = - extension-yoneda-Small-Large-Precategory - pr2 section-map-yoneda-Small-Large-Precategory = + extension-yoneda-Precategory : + section-copresheaf-Category C F c → + hom-copresheaf-Large-Category C (representable-functor-Precategory C c) F + pr1 (extension-yoneda-Precategory u) = + hom-family-extension-yoneda-Precategory u + pr2 (extension-yoneda-Precategory u) = + naturality-extension-yoneda-Precategory u +``` + +The inverse is an inverse: + +```agda + is-section-extension-yoneda-Precategory : + ( map-yoneda-Precategory ∘ + extension-yoneda-Precategory) ~ + id + is-section-extension-yoneda-Precategory = htpy-eq ( preserves-id-functor-Small-Large-Precategory - ( C) - ( Set-Large-Precategory) - ( F) - ( c)) - - retraction-map-yoneda-Small-Large-Precategory : - retraction map-yoneda-Small-Large-Precategory - pr1 retraction-map-yoneda-Small-Large-Precategory = - extension-yoneda-Small-Large-Precategory - pr2 retraction-map-yoneda-Small-Large-Precategory σ = + C Set-Large-Precategory F c) + + is-retraction-extension-yoneda-Precategory : + ( extension-yoneda-Precategory ∘ + map-yoneda-Precategory) ~ + id + is-retraction-extension-yoneda-Precategory σ = eq-type-subtype ( is-natural-transformation-prop-Small-Large-Precategory ( C) Set-Large-Precategory (representable-functor-Precategory C c) F) @@ -115,61 +141,32 @@ module _ ( λ f → ( htpy-eq ( pr2 σ f) - ( (id-hom-Precategory C))) ∙ + ( id-hom-Precategory C)) ∙ ( ap (pr1 σ x) (right-unit-law-comp-hom-Precategory C f))))) - lemma-yoneda-Small-Large-Precategory : - is-equiv map-yoneda-Small-Large-Precategory - pr1 lemma-yoneda-Small-Large-Precategory = - section-map-yoneda-Small-Large-Precategory - pr2 lemma-yoneda-Small-Large-Precategory = - retraction-map-yoneda-Small-Large-Precategory - - equiv-lemma-yoneda-Small-Large-Precategory : - ( natural-transformation-Small-Large-Precategory C Set-Large-Precategory - ( representable-functor-Precategory C c) (F)) ≃ - ( type-Set - ( obj-functor-Small-Large-Precategory C Set-Large-Precategory F c)) - pr1 equiv-lemma-yoneda-Small-Large-Precategory = - map-yoneda-Small-Large-Precategory - pr2 equiv-lemma-yoneda-Small-Large-Precategory = - lemma-yoneda-Small-Large-Precategory -``` - -## The yoneda lemma into the small category of sets - -```agda -module _ - {l1 l2 : Level} (C : Precategory l1 l2) (c : obj-Precategory C) - (F : functor-Precategory C (Set-Precategory l2)) - where - - map-yoneda-Precategory : - natural-transformation-Precategory - ( C) - ( Set-Precategory l2) - ( representable-functor-Precategory C c) - ( F) → - type-Set (obj-functor-Precategory C (Set-Precategory l2) F c) - map-yoneda-Precategory = map-yoneda-Small-Large-Precategory C c F - - extension-yoneda-Precategory : - type-Set (obj-functor-Precategory C (Set-Precategory l2) F c) → - natural-transformation-Precategory - C (Set-Precategory l2) (representable-functor-Precategory C c) F - extension-yoneda-Precategory = extension-yoneda-Small-Large-Precategory C c F - lemma-yoneda-Precategory : is-equiv map-yoneda-Precategory - lemma-yoneda-Precategory = lemma-yoneda-Small-Large-Precategory C c F + lemma-yoneda-Precategory = + is-equiv-is-invertible + ( extension-yoneda-Precategory) + ( is-section-extension-yoneda-Precategory) + ( is-retraction-extension-yoneda-Precategory) equiv-lemma-yoneda-Precategory : - ( natural-transformation-Precategory C (Set-Precategory l2) - ( representable-functor-Precategory C c) F) ≃ - ( type-Set (obj-functor-Precategory C (Set-Precategory l2) F c)) - equiv-lemma-yoneda-Precategory = - equiv-lemma-yoneda-Small-Large-Precategory C c F + hom-copresheaf-Large-Category C (representable-functor-Precategory C c) F ≃ + section-copresheaf-Category C F c + pr1 equiv-lemma-yoneda-Precategory = map-yoneda-Precategory + pr2 equiv-lemma-yoneda-Precategory = lemma-yoneda-Precategory ``` ## See also - [Presheaf categories](category-theory.presheaf-categories.md) + +## External links + +- [The Yoneda embedding](https://1lab.dev/Cat.Functor.Hom.html#the-yoneda-embedding) + at 1lab +- [Yoneda lemma](https://ncatlab.org/nlab/show/Yoneda+lemma) at nlab +- [The Yoneda lemma](https://www.math3ma.com/blog/the-yoneda-lemma) at Math3ma +- [Yoneda lemma](https://en.wikipedia.org/wiki/Yoneda_lemma) at Wikipedia +- [Yoneda lemma](https://www.wikidata.org/wiki/Q320577) at Wikidata diff --git a/src/foundation/category-of-sets.lagda.md b/src/foundation/category-of-sets.lagda.md index e8ee374ea4..efeaa27838 100644 --- a/src/foundation/category-of-sets.lagda.md +++ b/src/foundation/category-of-sets.lagda.md @@ -29,8 +29,10 @@ open import foundation-core.identity-types ## Idea -The **category of sets** consists of sets and functions. There is a category of -sets for each universe level, and there is a large category of sets. +The **category of [sets](foundation-core.sets.md)** consists of sets and +functions. There is a [category](category-theory.categories.md) of sets for each +universe level, and there is a +[large category](category-theory.large-categories.md) of sets. ## Definitions @@ -96,3 +98,19 @@ is-category-Set-Precategory : is-category-Set-Precategory l = is-category-Category (Set-Category l) ``` + +## Comments + +Since sets are equivalent to their set-truncations, the category of sets forms a +[full subprecategory](category-theory.full-large-subprecategories.md) of the +homotopy precategory of types. + +## See also + +- [Presheaf categories](category-theory.presheaf-categories.md) + +## External links + +- [Set](https://ncatlab.org/nlab/show/Set) at nlab +- [Category of sets](https://en.wikipedia.org/wiki/Category_of_sets) at + Wikipedia From b0b9156f4f34fa0a214afc85195068ef1f6ca3a5 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 28 Oct 2023 20:13:21 +0200 Subject: [PATCH 47/49] Isomorphism-sets in replete subprecategories are equivalent to isomorphism-sets in the base precategory --- .../isomorphisms-in-subprecategories.lagda.md | 53 ++++- .../replete-subprecategories.lagda.md | 192 ++++++++++++++++-- src/category-theory/subcategories.lagda.md | 14 ++ src/category-theory/subprecategories.lagda.md | 3 +- ...e-arithmetic-dependent-pair-types.lagda.md | 70 ++++--- 5 files changed, 270 insertions(+), 62 deletions(-) diff --git a/src/category-theory/isomorphisms-in-subprecategories.lagda.md b/src/category-theory/isomorphisms-in-subprecategories.lagda.md index 7f3136f3d6..e0d8560de0 100644 --- a/src/category-theory/isomorphisms-in-subprecategories.lagda.md +++ b/src/category-theory/isomorphisms-in-subprecategories.lagda.md @@ -14,6 +14,7 @@ open import category-theory.subprecategories open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.propositions +open import foundation.sets open import foundation.subtypes open import foundation.universe-levels ``` @@ -29,16 +30,38 @@ module _ {l1 l2 l3 l4 : Level} (C : Precategory l1 l2) (P : Subprecategory l3 l4 C) + {x y : obj-Subprecategory C P} + (f : hom-Subprecategory C P x y) + where + + is-iso-prop-Subprecategory : Prop (l2 ⊔ l4) + is-iso-prop-Subprecategory = + is-iso-prop-Precategory (precategory-Subprecategory C P) {x} {y} f + + is-iso-Subprecategory : UU (l2 ⊔ l4) + is-iso-Subprecategory = type-Prop is-iso-prop-Subprecategory + + is-prop-is-iso-Subprecategory : is-prop is-iso-Subprecategory + is-prop-is-iso-Subprecategory = is-prop-type-Prop is-iso-prop-Subprecategory +``` + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (P : Subprecategory l3 l4 C) + (x y : obj-Subprecategory C P) 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-set-Subprecategory : Set (l2 ⊔ l4) + iso-set-Subprecategory = + iso-set-Precategory (precategory-Subprecategory C P) {x} {y} + + iso-Subprecategory : UU (l2 ⊔ l4) + iso-Subprecategory = type-Set iso-set-Subprecategory - iso-Subprecategory : - (x y : obj-Subprecategory C P) → UU (l2 ⊔ l4) - iso-Subprecategory = iso-Precategory (precategory-Subprecategory C P) + is-set-iso-Subprecategory : is-set iso-Subprecategory + is-set-iso-Subprecategory = is-set-type-Set iso-set-Subprecategory ``` #### The predicate on an isomorphism proof of being contained in a subprecategory @@ -115,6 +138,12 @@ module _ is-prop-is-in-iso-obj-subprecategory-Subprecategory = is-prop-type-Prop is-in-iso-obj-subprecategory-prop-Subprecategory + is-iso-is-in-iso-obj-subprecategory-Subprecategory : + ((f₀ , f₁) : is-in-iso-obj-subprecategory-Subprecategory) → + is-iso-Subprecategory C P (hom-iso-Precategory C f , f₀) + is-iso-is-in-iso-obj-subprecategory-Subprecategory (f₀ , f₁) = + is-iso-is-in-is-iso-Subprecategory C P (pr1 f , f₀) (pr2 f) f₁ + iso-is-in-iso-obj-subprecategory-Subprecategory : is-in-iso-obj-subprecategory-Subprecategory → iso-Subprecategory C P x y pr1 (pr1 (iso-is-in-iso-obj-subprecategory-Subprecategory is-in-iso-f)) = @@ -162,6 +191,13 @@ module _ iso-is-in-iso-Subprecategory is-in-iso-f = iso-is-in-iso-obj-subprecategory-Subprecategory C P f ( pr2 (pr2 is-in-iso-f)) + + is-iso-is-in-iso-Subprecategory : + ( is-in-iso-f : is-in-iso-Subprecategory) → + is-iso-Subprecategory C P + ( pr1 f , pr2 (pr1 (iso-is-in-iso-Subprecategory is-in-iso-f))) + is-iso-is-in-iso-Subprecategory is-in-iso-f = + pr2 (iso-is-in-iso-Subprecategory is-in-iso-f) ``` ### If a subprecategory contains an object, it contains its identity ismorphism @@ -218,8 +254,7 @@ module _ is-iso-base-is-iso-Subprecategory : {f : hom-Subprecategory C P x y} → is-iso-Subprecategory C P f → - is-iso-Precategory C - ( inclusion-hom-Subprecategory C P x y f) + is-iso-Precategory C (inclusion-hom-Subprecategory C P x y f) pr1 (is-iso-base-is-iso-Subprecategory is-iso-f) = pr1 (pr1 is-iso-f) pr1 (pr2 (is-iso-base-is-iso-Subprecategory is-iso-f)) = diff --git a/src/category-theory/replete-subprecategories.lagda.md b/src/category-theory/replete-subprecategories.lagda.md index cb4ffd26be..4d3f14d5d9 100644 --- a/src/category-theory/replete-subprecategories.lagda.md +++ b/src/category-theory/replete-subprecategories.lagda.md @@ -14,10 +14,17 @@ open import category-theory.isomorphisms-in-subprecategories open import category-theory.precategories open import category-theory.subprecategories +open import foundation.cartesian-product-types open import foundation.dependent-pair-types +open import foundation.equivalences +open import foundation.functoriality-dependent-pair-types open import foundation.iterated-dependent-product-types open import foundation.propositions +open import foundation.subsingleton-induction +open import foundation.subtypes open import foundation.transport-along-identifications +open import foundation.type-arithmetic-cartesian-product-types +open import foundation.type-arithmetic-dependent-pair-types open import foundation.universe-levels ``` @@ -37,8 +44,8 @@ contained in `P`. ### The predicate on a subprecategory of being closed under isomorphic objects We can define what it means for subprecategories to have objects that are closed -under isomorphisms. Note, however, that this is not yet the correct definition -of a replete subprecategory. +under isomorphisms. Observe that this is not yet the correct definition of a +replete subprecategory. ```agda module _ @@ -81,27 +88,26 @@ module _ Σ ( is-in-obj-Subprecategory C P y) ( λ y₀ → is-in-iso-obj-subprecategory-Subprecategory C P {x} {y , y₀} f) - is-prop-is-replete-Subprecategory : is-prop (is-replete-Subprecategory) + is-prop-is-replete-Subprecategory : + is-prop is-replete-Subprecategory is-prop-is-replete-Subprecategory = is-prop-iterated-Π 3 ( λ x y f → is-prop-Σ ( is-prop-is-in-obj-Subprecategory C P y) - ( λ y₀ → - is-prop-is-in-iso-obj-subprecategory-Subprecategory C P - { x} {y , y₀} f)) + ( λ _ → is-prop-is-in-iso-obj-subprecategory-Subprecategory C P f)) is-replete-prop-Subprecategory : Prop (l1 ⊔ l2 ⊔ l3 ⊔ l4) pr1 is-replete-prop-Subprecategory = is-replete-Subprecategory - pr2 is-replete-prop-Subprecategory = is-prop-is-replete-Subprecategory + pr2 is-replete-prop-Subprecategory = + is-prop-is-replete-Subprecategory ``` -### Replete subprecategories +### The type of replete subprecategories ```agda Replete-Subprecategory : - {l1 l2 : Level} (l3 l4 : Level) - (C : Precategory l1 l2) → + {l1 l2 : Level} (l3 l4 : Level) (C : Precategory l1 l2) → UU (l1 ⊔ l2 ⊔ lsuc l3 ⊔ lsuc l4) Replete-Subprecategory l3 l4 C = Σ (Subprecategory l3 l4 C) (is-replete-Subprecategory C) @@ -122,6 +128,151 @@ module _ ## Properties +### A slight reformulation of repleteness + +In our main definition of repleteness, the containment proof of the isomorphism +must be fixed at the left end-point. This is of course not necessary, so we can +ask for a slighty relaxed proof of repleteness: + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (P : Subprecategory l3 l4 C) + where + + is-unfixed-replete-Subprecategory : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) + is-unfixed-replete-Subprecategory = + (x : obj-Subprecategory C P) + (y : obj-Precategory C) + (f : iso-Precategory C (inclusion-obj-Subprecategory C P x) y) → + is-in-iso-Subprecategory C P f + + is-prop-is-unfixed-replete-Subprecategory : + is-prop (is-unfixed-replete-Subprecategory) + is-prop-is-unfixed-replete-Subprecategory = + is-prop-iterated-Π 3 + ( λ x y f → is-prop-is-in-iso-Subprecategory C P f) + + is-unfixed-replete-prop-Subprecategory : Prop (l1 ⊔ l2 ⊔ l3 ⊔ l4) + pr1 is-unfixed-replete-prop-Subprecategory = + is-unfixed-replete-Subprecategory + pr2 is-unfixed-replete-prop-Subprecategory = + is-prop-is-unfixed-replete-Subprecategory + + is-unfixed-replete-is-replete-Subprecategory : + is-replete-Subprecategory C P → is-unfixed-replete-Subprecategory + pr1 (is-unfixed-replete-is-replete-Subprecategory replete' (x , x₀) y f) = x₀ + pr2 (is-unfixed-replete-is-replete-Subprecategory replete' x y f) = + replete' x y f + + is-replete-is-unfixed-replete-Subprecategory : + is-unfixed-replete-Subprecategory → is-replete-Subprecategory C P + is-replete-is-unfixed-replete-Subprecategory is-unfixed-replete-P x y f = + ind-subsingleton + ( is-prop-is-in-obj-Subprecategory C P (pr1 x)) + { λ x₀ → + Σ ( is-in-obj-Subprecategory C P y) + ( λ y₀ → + is-in-iso-obj-subprecategory-Subprecategory C P + { inclusion-obj-Subprecategory C P x , x₀} {y , y₀} f)} + ( pr1 (is-unfixed-replete-P x y f)) + ( pr2 (is-unfixed-replete-P x y f)) + ( is-in-obj-inclusion-obj-Subprecategory C P x) +``` + +### Isomorphism-sets in replete subprecategories are equivalent to isomorphism-sets in the base precategory + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (P : Subprecategory l3 l4 C) + (is-replete-P : is-replete-Subprecategory C P) + {x y : obj-Subprecategory C P} (f : hom-Subprecategory C P x y) + where + + is-iso-is-iso-base-is-replete-Subprecategory : + is-iso-Precategory C (inclusion-hom-Subprecategory C P x y f) → + is-iso-Subprecategory C P f + pr1 (pr1 (is-iso-is-iso-base-is-replete-Subprecategory is-iso-C-f)) = + hom-inv-is-iso-Precategory C is-iso-C-f + pr2 (pr1 (is-iso-is-iso-base-is-replete-Subprecategory is-iso-C-f)) = + ind-subsingleton + ( is-prop-is-in-obj-Subprecategory C P (pr1 y)) + { λ y₀ → + is-in-hom-obj-subprecategory-Subprecategory C P (pr1 y , y₀) x + ( hom-inv-is-iso-Precategory C is-iso-C-f)} + ( pr1 (is-replete-P x (pr1 y) (pr1 f , is-iso-C-f))) + ( pr2 (pr2 (is-replete-P x (pr1 y) (pr1 f , is-iso-C-f)))) + ( pr2 y) + pr1 (pr2 (is-iso-is-iso-base-is-replete-Subprecategory is-iso-C-f)) = + eq-type-subtype + ( subtype-hom-obj-subprecategory-Subprecategory C P y y) + ( is-section-hom-inv-is-iso-Precategory C is-iso-C-f) + pr2 (pr2 (is-iso-is-iso-base-is-replete-Subprecategory is-iso-C-f)) = + eq-type-subtype + ( subtype-hom-obj-subprecategory-Subprecategory C P x x) + ( is-retraction-hom-inv-is-iso-Precategory C is-iso-C-f) + + is-equiv-is-iso-is-iso-base-is-replete-Subprecategory : + is-equiv is-iso-is-iso-base-is-replete-Subprecategory + is-equiv-is-iso-is-iso-base-is-replete-Subprecategory = + is-equiv-is-prop + ( is-prop-is-iso-Precategory C (inclusion-hom-Subprecategory C P x y f)) + ( is-prop-is-iso-Subprecategory C P f) + ( is-iso-base-is-iso-Subprecategory C P) + + equiv-is-iso-is-iso-base-is-replete-Subprecategory : + is-iso-Precategory C (inclusion-hom-Subprecategory C P x y f) ≃ + is-iso-Subprecategory C P f + pr1 equiv-is-iso-is-iso-base-is-replete-Subprecategory = + is-iso-is-iso-base-is-replete-Subprecategory + pr2 equiv-is-iso-is-iso-base-is-replete-Subprecategory = + is-equiv-is-iso-is-iso-base-is-replete-Subprecategory + +module _ + {l1 l2 l3 l4 : Level} + (C : Precategory l1 l2) + (P : Subprecategory l3 l4 C) + (is-replete-P : is-replete-Subprecategory C P) + (x y : obj-Subprecategory C P) + where + + equiv-iso-iso-base-is-replete-Subprecategory : + iso-Precategory C + ( inclusion-obj-Subprecategory C P x) + ( inclusion-obj-Subprecategory C P y) ≃ + iso-Subprecategory C P x y + equiv-iso-iso-base-is-replete-Subprecategory = + ( equiv-tot + ( equiv-is-iso-is-iso-base-is-replete-Subprecategory + C P is-replete-P {x} {y})) ∘e + ( inv-associative-Σ _ _ _) ∘e + ( equiv-tot + ( λ f → + ( commutative-prod) ∘e + ( inv-right-unit-law-Σ-is-contr + ( λ is-iso-C-f → is-proof-irrelevant-is-prop + ( is-prop-is-in-hom-obj-subprecategory-Subprecategory C P x y f) + ( ind-subsingleton + ( is-prop-is-in-obj-Subprecategory C P (pr1 y)) + { λ y₀ → + is-in-hom-obj-subprecategory-Subprecategory + C P x (pr1 y , y₀) f} + ( is-replete-P x (pr1 y) (f , is-iso-C-f) .pr1) + ( is-replete-P x (pr1 y) (f , is-iso-C-f) .pr2 .pr1) + ( pr2 y)))))) + + equiv-iso-base-iso-is-replete-Subprecategory : + iso-Subprecategory C P x y ≃ + iso-Precategory C + ( inclusion-obj-Subprecategory C P x) + ( inclusion-obj-Subprecategory C P y) + equiv-iso-base-iso-is-replete-Subprecategory = + inv-equiv equiv-iso-iso-base-is-replete-Subprecategory +``` + ### Subprecategories of categories are replete ```agda @@ -132,20 +283,20 @@ module _ (is-category-C : is-category-Precategory C) where - based-is-in-iso-is-category-Subprecategory : + is-unfixed-replete-subprecategory-is-category-Subprecategory : {x : obj-Subprecategory C P} {y : obj-Precategory C} (f : iso-Precategory C (inclusion-obj-Subprecategory C P x) y) → is-in-iso-Subprecategory C P f - based-is-in-iso-is-category-Subprecategory {x} f = + is-unfixed-replete-subprecategory-is-category-Subprecategory {x} = ind-iso-Category ( C , is-category-C) ( λ B e → is-in-iso-Subprecategory C P e) ( is-in-iso-id-Subprecategory C P x) - ( f) - is-replete-is-category-Subprecategory : is-replete-Subprecategory C P - is-replete-is-category-Subprecategory x y f = + is-replete-subprecategory-is-category-Subprecategory : + is-replete-Subprecategory C P + is-replete-subprecategory-is-category-Subprecategory x y = ind-iso-Category ( C , is-category-C) ( λ z e → @@ -153,20 +304,29 @@ module _ ( λ z₀ → is-in-iso-obj-subprecategory-Subprecategory C P {x} {z , z₀} e)) ( pr2 (is-in-iso-id-Subprecategory C P x)) - ( f) ``` ### If a full subprecategory is closed under isomorphic objects then it is replete This remains to be formalized. +### The inclusion functor of a replete subprecategory is pseudomonic + +This remains to be formalized. + ## See also - Every [subcategory](category-theory.subcategories.md) is replete. +- Because of universe polymorphism, + [large subcategories](category-theory.large-subcategories.md) are not large + replete by construction, although they are levelwise replete. + ## External links - [replete subcategory](https://ncatlab.org/nlab/show/replete+replete-subprecategory) at nlab - [Isomorphism-closed subcategory](https://en.wikipedia.org/wiki/Isomorphism-closed_subcategory) at Wikipedia +- [isomorphism-closed subcategory](https://www.wikidata.org/wiki/Q6086096) at + Wikidata diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index fe8b29067d..c90a22718a 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -380,6 +380,20 @@ module _ ## Properties +### Subcategories are categories + +```agda +module _ + {l1 l2 l3 l4 : Level} + (C : Category l1 l2) + (P : Subcategory l3 l4 C) + where + + is-category-Subcategory : + is-category-Precategory (precategory-Subcategory C P) + is-category-Subcategory = {! !} +``` + ### The inclusion functor is an embedding on objects and hom-sets ```agda diff --git a/src/category-theory/subprecategories.lagda.md b/src/category-theory/subprecategories.lagda.md index cacef345d4..fa98a332c9 100644 --- a/src/category-theory/subprecategories.lagda.md +++ b/src/category-theory/subprecategories.lagda.md @@ -259,7 +259,8 @@ subprecategory: Σ ( is-in-obj-Subprecategory C P x) ( λ x₀ → Σ ( is-in-obj-Subprecategory C P y) - ( λ y₀ → is-in-subtype (subtype-hom-Subprecategory x y x₀ y₀) f)) + ( λ y₀ → + is-in-hom-obj-subprecategory-Subprecategory (x , x₀) (y , y₀) f)) is-prop-is-in-hom-Subprecategory : (x y : obj-Precategory C) (f : hom-Precategory C x y) → diff --git a/src/foundation/type-arithmetic-dependent-pair-types.lagda.md b/src/foundation/type-arithmetic-dependent-pair-types.lagda.md index c3b789a3cc..4e4bbb8561 100644 --- a/src/foundation/type-arithmetic-dependent-pair-types.lagda.md +++ b/src/foundation/type-arithmetic-dependent-pair-types.lagda.md @@ -41,24 +41,22 @@ module _ where map-inv-left-unit-law-Σ-is-contr : B a → Σ A B - map-inv-left-unit-law-Σ-is-contr b = pair a b + pr1 (map-inv-left-unit-law-Σ-is-contr b) = a + pr2 (map-inv-left-unit-law-Σ-is-contr b) = b map-left-unit-law-Σ-is-contr : Σ A B → B a map-left-unit-law-Σ-is-contr = - ind-Σ - ( ind-singleton a C - ( λ x → B x → B a) - ( id)) + ind-Σ (ind-singleton a C (λ x → B x → B a) (id)) is-section-map-inv-left-unit-law-Σ-is-contr : - ( map-left-unit-law-Σ-is-contr ∘ map-inv-left-unit-law-Σ-is-contr) ~ id + map-left-unit-law-Σ-is-contr ∘ map-inv-left-unit-law-Σ-is-contr ~ id is-section-map-inv-left-unit-law-Σ-is-contr b = ap ( λ (f : B a → B a) → f b) ( 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 + 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 a C @@ -67,8 +65,8 @@ module _ Id ( ( map-inv-left-unit-law-Σ-is-contr ∘ map-left-unit-law-Σ-is-contr) - ( pair x y)) - ( pair x y)) + ( x , y)) + ( x , y)) ( λ y → ap ( map-inv-left-unit-law-Σ-is-contr) ( ap @@ -138,12 +136,12 @@ module _ is-section-map-inv-right-unit-law-Σ-is-contr : (H : (a : A) → is-contr (B a)) → - ( pr1 ∘ map-inv-right-unit-law-Σ-is-contr H) ~ id + pr1 ∘ map-inv-right-unit-law-Σ-is-contr H ~ id is-section-map-inv-right-unit-law-Σ-is-contr H = refl-htpy is-retraction-map-inv-right-unit-law-Σ-is-contr : (H : (a : A) → is-contr (B a)) → - ( map-inv-right-unit-law-Σ-is-contr H ∘ pr1) ~ id + map-inv-right-unit-law-Σ-is-contr H ∘ pr1 ~ id is-retraction-map-inv-right-unit-law-Σ-is-contr H (a , b) = eq-pair-Σ refl (eq-is-contr (H a)) @@ -173,23 +171,23 @@ module _ {l1 l2 l3 : Level} (A : UU l1) (B : A → UU l2) (C : Σ A B → UU l3) where - map-associative-Σ : Σ (Σ A B) C → Σ A (λ x → Σ (B x) (λ y → C (pair x y))) + map-associative-Σ : Σ (Σ A B) C → Σ A (λ x → Σ (B x) (λ y → C (x , y))) pr1 (map-associative-Σ ((x , y) , z)) = x pr1 (pr2 (map-associative-Σ ((x , y) , z))) = y pr2 (pr2 (map-associative-Σ ((x , y) , z))) = z - map-inv-associative-Σ : Σ A (λ x → Σ (B x) (λ y → C (pair x y))) → Σ (Σ A B) C + map-inv-associative-Σ : Σ A (λ x → Σ (B x) (λ y → C (x , y))) → Σ (Σ A B) C pr1 (pr1 (map-inv-associative-Σ (x , y , z))) = x pr2 (pr1 (map-inv-associative-Σ (x , y , z))) = y pr2 (map-inv-associative-Σ (x , y , z)) = z is-retraction-map-inv-associative-Σ : - (map-inv-associative-Σ ∘ map-associative-Σ) ~ id - is-retraction-map-inv-associative-Σ (pair (pair x y) z) = refl + map-inv-associative-Σ ∘ map-associative-Σ ~ id + is-retraction-map-inv-associative-Σ ((x , y) , z) = refl is-section-map-inv-associative-Σ : - (map-associative-Σ ∘ map-inv-associative-Σ) ~ id - is-section-map-inv-associative-Σ (pair x (pair y z)) = refl + map-associative-Σ ∘ map-inv-associative-Σ ~ id + is-section-map-inv-associative-Σ (x , (y , z)) = refl abstract is-equiv-map-associative-Σ : is-equiv map-associative-Σ @@ -199,11 +197,11 @@ module _ is-section-map-inv-associative-Σ is-retraction-map-inv-associative-Σ - associative-Σ : Σ (Σ A B) C ≃ Σ A (λ x → Σ (B x) (λ y → C (pair x y))) + associative-Σ : Σ (Σ A B) C ≃ Σ A (λ x → Σ (B x) (λ y → C (x , y))) pr1 associative-Σ = map-associative-Σ pr2 associative-Σ = is-equiv-map-associative-Σ - inv-associative-Σ : Σ A (λ x → Σ (B x) (λ y → C (pair x y))) ≃ Σ (Σ A B) C + inv-associative-Σ : Σ A (λ x → Σ (B x) (λ y → C (x , y))) ≃ Σ (Σ A B) C pr1 inv-associative-Σ = map-inv-associative-Σ pr2 inv-associative-Σ = is-equiv-is-invertible @@ -232,12 +230,12 @@ module _ pr2 (map-inv-associative-Σ' (x , y , z)) = z is-section-map-inv-associative-Σ' : - (map-associative-Σ' ∘ map-inv-associative-Σ') ~ id - is-section-map-inv-associative-Σ' (pair x (pair y z)) = refl + map-associative-Σ' ∘ map-inv-associative-Σ' ~ id + is-section-map-inv-associative-Σ' (x , (y , z)) = refl is-retraction-map-inv-associative-Σ' : - ( map-inv-associative-Σ' ∘ map-associative-Σ') ~ id - is-retraction-map-inv-associative-Σ' (pair (pair x y) z) = refl + map-inv-associative-Σ' ∘ map-associative-Σ' ~ id + is-retraction-map-inv-associative-Σ' ((x , y) , z) = refl is-equiv-map-associative-Σ' : is-equiv map-associative-Σ' is-equiv-map-associative-Σ' = @@ -265,7 +263,7 @@ module _ ```agda module _ - { l1 l2 l3 l4 : Level} { A : UU l1} {B : A → UU l2} {C : A → UU l3} + { l1 l2 l3 l4 : Level} {A : UU l1} {B : A → UU l2} {C : A → UU l3} ( D : (x : A) → B x → C x → UU l4) where @@ -286,12 +284,12 @@ module _ pr2 (pr2 (map-inv-interchange-Σ-Σ t)) = pr2 (pr2 t) is-section-map-inv-interchange-Σ-Σ : - ( map-interchange-Σ-Σ ∘ map-inv-interchange-Σ-Σ) ~ id - is-section-map-inv-interchange-Σ-Σ (pair (pair a c) (pair b d)) = refl + map-interchange-Σ-Σ ∘ map-inv-interchange-Σ-Σ ~ id + is-section-map-inv-interchange-Σ-Σ ((a , c) , (b , d)) = refl is-retraction-map-inv-interchange-Σ-Σ : - ( map-inv-interchange-Σ-Σ ∘ map-interchange-Σ-Σ) ~ id - is-retraction-map-inv-interchange-Σ-Σ (pair (pair a b) (pair c d)) = refl + map-inv-interchange-Σ-Σ ∘ map-interchange-Σ-Σ ~ id + is-retraction-map-inv-interchange-Σ-Σ ((a , b) , (c , d)) = refl abstract is-equiv-map-interchange-Σ-Σ : is-equiv map-interchange-Σ-Σ @@ -335,11 +333,11 @@ module _ pr2 (pr2 (map-inv-left-swap-Σ (b , a , c))) = c is-retraction-map-inv-left-swap-Σ : - (map-inv-left-swap-Σ ∘ map-left-swap-Σ) ~ id - is-retraction-map-inv-left-swap-Σ (pair a (pair b c)) = refl + map-inv-left-swap-Σ ∘ map-left-swap-Σ ~ id + is-retraction-map-inv-left-swap-Σ (a , (b , c)) = refl - is-section-map-inv-left-swap-Σ : (map-left-swap-Σ ∘ map-inv-left-swap-Σ) ~ id - is-section-map-inv-left-swap-Σ (pair b (pair a c)) = refl + is-section-map-inv-left-swap-Σ : map-left-swap-Σ ∘ map-inv-left-swap-Σ ~ id + is-section-map-inv-left-swap-Σ (b , (a , c)) = refl abstract is-equiv-map-left-swap-Σ : is-equiv map-left-swap-Σ @@ -372,12 +370,12 @@ module _ pr2 (map-inv-right-swap-Σ ((a , c) , b)) = c is-section-map-inv-right-swap-Σ : - (map-right-swap-Σ ∘ map-inv-right-swap-Σ) ~ id - is-section-map-inv-right-swap-Σ (pair (pair x y) z) = refl + map-right-swap-Σ ∘ map-inv-right-swap-Σ ~ id + is-section-map-inv-right-swap-Σ ((x , y) , z) = refl is-retraction-map-inv-right-swap-Σ : - (map-inv-right-swap-Σ ∘ map-right-swap-Σ) ~ id - is-retraction-map-inv-right-swap-Σ (pair (pair x z) y) = refl + map-inv-right-swap-Σ ∘ map-right-swap-Σ ~ id + is-retraction-map-inv-right-swap-Σ ((x , z) , y) = refl is-equiv-map-right-swap-Σ : is-equiv map-right-swap-Σ is-equiv-map-right-swap-Σ = From deb178cccec8027438518aae4aa5254f5be316cb Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 28 Oct 2023 20:41:16 +0200 Subject: [PATCH 48/49] Subcategories are categories --- .../replete-subprecategories.lagda.md | 10 +- src/category-theory/subcategories.lagda.md | 93 +++++++++++++------ 2 files changed, 70 insertions(+), 33 deletions(-) diff --git a/src/category-theory/replete-subprecategories.lagda.md b/src/category-theory/replete-subprecategories.lagda.md index 4d3f14d5d9..f438e35093 100644 --- a/src/category-theory/replete-subprecategories.lagda.md +++ b/src/category-theory/replete-subprecategories.lagda.md @@ -239,12 +239,12 @@ module _ (x y : obj-Subprecategory C P) where - equiv-iso-iso-base-is-replete-Subprecategory : + compute-iso-is-replete-Subprecategory : iso-Precategory C ( inclusion-obj-Subprecategory C P x) ( inclusion-obj-Subprecategory C P y) ≃ iso-Subprecategory C P x y - equiv-iso-iso-base-is-replete-Subprecategory = + compute-iso-is-replete-Subprecategory = ( equiv-tot ( equiv-is-iso-is-iso-base-is-replete-Subprecategory C P is-replete-P {x} {y})) ∘e @@ -264,13 +264,13 @@ module _ ( is-replete-P x (pr1 y) (f , is-iso-C-f) .pr2 .pr1) ( pr2 y)))))) - equiv-iso-base-iso-is-replete-Subprecategory : + inv-compute-iso-is-replete-Subprecategory : iso-Subprecategory C P x y ≃ iso-Precategory C ( inclusion-obj-Subprecategory C P x) ( inclusion-obj-Subprecategory C P y) - equiv-iso-base-iso-is-replete-Subprecategory = - inv-equiv equiv-iso-iso-base-is-replete-Subprecategory + inv-compute-iso-is-replete-Subprecategory = + inv-equiv compute-iso-is-replete-Subprecategory ``` ### Subprecategories of categories are replete diff --git a/src/category-theory/subcategories.lagda.md b/src/category-theory/subcategories.lagda.md index c90a22718a..997fd62db7 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -11,14 +11,25 @@ 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.isomorphisms-in-categories +open import category-theory.isomorphisms-in-precategories +open import category-theory.isomorphisms-in-subprecategories open import category-theory.maps-precategories open import category-theory.precategories +open import category-theory.replete-subprecategories 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.functoriality-dependent-pair-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.subtype-identity-principle open import foundation.subtypes open import foundation.universe-levels ``` @@ -380,7 +391,7 @@ module _ ## Properties -### Subcategories are categories +### Subcategories are replete ```agda module _ @@ -389,12 +400,35 @@ module _ (P : Subcategory l3 l4 C) where - is-category-Subcategory : - is-category-Precategory (precategory-Subcategory C P) - is-category-Subcategory = {! !} + is-replete-Subcategory : is-replete-Subprecategory (precategory-Category C) P + is-replete-Subcategory = + is-replete-subprecategory-is-category-Subprecategory + ( precategory-Category C) + ( P) + ( is-category-Category C) + + compute-iso-Subcategory : + {x y : obj-Subcategory C P} → + iso-Category C + ( inclusion-obj-Subcategory C P x) + ( inclusion-obj-Subcategory C P y) ≃ + iso-Subprecategory (precategory-Category C) P x y + compute-iso-Subcategory {x} {y} = + compute-iso-is-replete-Subprecategory + ( precategory-Category C) P is-replete-Subcategory x y + + inv-compute-iso-Subcategory : + {x y : obj-Subcategory C P} → + iso-Subprecategory (precategory-Category C) P x y ≃ + iso-Category C + ( inclusion-obj-Subcategory C P x) + ( inclusion-obj-Subcategory C P y) + inv-compute-iso-Subcategory {x} {y} = + inv-compute-iso-is-replete-Subprecategory + ( precategory-Category C) P is-replete-Subcategory x y ``` -### The inclusion functor is an embedding on objects and hom-sets +### Subcategories are categories ```agda module _ @@ -403,27 +437,26 @@ module _ (P : Subcategory l3 l4 C) where - is-faithful-inclusion-Subcategory : - is-faithful-functor-Precategory - ( precategory-Subcategory C P) - ( precategory-Category C) - ( inclusion-Subcategory C P) - is-faithful-inclusion-Subcategory = - is-faithful-inclusion-Subprecategory (precategory-Category C) P - - is-emb-obj-inclusion-Subcategory : - is-emb - ( obj-functor-Precategory - ( precategory-Subcategory C P) - ( precategory-Category C) - ( inclusion-Subcategory C P)) - is-emb-obj-inclusion-Subcategory = - is-emb-obj-inclusion-Subprecategory (precategory-Category C) P + is-category-Subcategory : + is-category-Precategory (precategory-Subcategory C P) + is-category-Subcategory x = + fundamental-theorem-id + ( is-contr-equiv _ + ( equiv-tot (λ y → inv-compute-iso-Subcategory C P {x} {y})) + ( is-torsorial-Eq-subtype + (is-torsorial-iso-Category C (inclusion-obj-Subcategory C P x)) + ( is-prop-is-in-obj-Subcategory C P) + ( inclusion-obj-Subcategory C P x) + ( id-iso-Category C) + ( is-in-obj-inclusion-obj-Subcategory C P x))) + ( iso-eq-Precategory (precategory-Subcategory C P) x) + + category-Subcategory : Category (l1 ⊔ l3) (l2 ⊔ l4) + pr1 category-Subcategory = precategory-Subcategory C P + pr2 category-Subcategory = is-category-Subcategory ``` -## Properties - -### The inclusion functor is faithful and an embedding on objects +### The inclusion functor is an embedding on objects and hom-sets ```agda module _ @@ -432,20 +465,24 @@ module _ (P : Subcategory l3 l4 C) where - is-faithful-inclusion-Category : + is-faithful-inclusion-Subcategory : is-faithful-functor-Precategory ( precategory-Subcategory C P) ( precategory-Category C) ( inclusion-Subcategory C P) - is-faithful-inclusion-Category = + is-faithful-inclusion-Subcategory = is-faithful-inclusion-Subprecategory (precategory-Category C) P - is-emb-obj-inclusion-Category : + is-emb-obj-inclusion-Subcategory : 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-Subcategory = is-emb-obj-inclusion-Subprecategory (precategory-Category C) P ``` + +### The inclusion functor is pseudomonic + +This is another consequence of repleteness. From efbac8b5d7de911d5ebefd7eb81385df58eaa798 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Mon, 30 Oct 2023 16:12:11 +0100 Subject: [PATCH 49/49] Update src/category-theory/subcategories.lagda.md --- 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 997fd62db7..79218bd947 100644 --- a/src/category-theory/subcategories.lagda.md +++ b/src/category-theory/subcategories.lagda.md @@ -444,7 +444,7 @@ module _ ( is-contr-equiv _ ( equiv-tot (λ y → inv-compute-iso-Subcategory C P {x} {y})) ( is-torsorial-Eq-subtype - (is-torsorial-iso-Category C (inclusion-obj-Subcategory C P x)) + ( is-torsorial-iso-Category C (inclusion-obj-Subcategory C P x)) ( is-prop-is-in-obj-Subcategory C P) ( inclusion-obj-Subcategory C P x) ( id-iso-Category C)