From 4f72ec1d0c72e6f3bce4214425b2ca480ac9126f Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Mon, 11 Sep 2023 12:58:28 +0200 Subject: [PATCH 01/19] pulling changes from beyond-finite-sets --- .../coherently-invertible-maps.lagda.md | 152 +++++---- .../contractible-maps.lagda.md | 10 +- .../contractible-types.lagda.md | 2 +- .../diagonal-maps-of-types.lagda.md | 4 +- src/foundation-core/empty-types.lagda.md | 2 +- .../equality-dependent-pair-types.lagda.md | 4 +- .../equivalence-relations.lagda.md | 2 +- src/foundation-core/equivalences.lagda.md | 43 +-- src/foundation-core/fibers-of-maps.lagda.md | 24 +- src/foundation-core/function-types.lagda.md | 18 +- ...oriality-dependent-function-types.lagda.md | 60 +++- ...unctoriality-dependent-pair-types.lagda.md | 6 +- .../functoriality-function-types.lagda.md | 212 +++++++++++- src/foundation-core/injective-maps.lagda.md | 2 +- src/foundation-core/invertible-maps.lagda.md | 145 +++++++++ src/foundation-core/propositions.lagda.md | 4 +- src/foundation-core/pullbacks.lagda.md | 20 +- src/foundation-core/small-types.lagda.md | 4 +- src/foundation-core/subtypes.lagda.md | 2 +- src/foundation-core/truncated-types.lagda.md | 4 +- .../universal-property-truncation.lagda.md | 5 +- src/foundation/0-images-of-maps.lagda.md | 2 +- ...ion-on-equivalences-type-families.lagda.md | 169 ++++++++++ ...oproduct-and-sigma-decompositions.lagda.md | 4 +- ...law-product-and-pi-decompositions.lagda.md | 4 +- ...inary-functoriality-set-quotients.lagda.md | 6 +- src/foundation/binary-relations.lagda.md | 11 + src/foundation/booleans.lagda.md | 2 +- ...resentatives-equivalence-relation.lagda.md | 2 +- .../coherently-invertible-maps.lagda.md | 97 ++---- ...mmuting-3-simplices-of-homotopies.lagda.md | 4 +- .../commuting-squares-of-maps.lagda.md | 2 +- .../commuting-triangles-of-maps.lagda.md | 17 +- src/foundation/conjunction.lagda.md | 2 +- src/foundation/contractible-maps.lagda.md | 2 +- src/foundation/contractible-types.lagda.md | 4 +- ...roduct-decompositions-subuniverse.lagda.md | 4 +- .../coproduct-decompositions.lagda.md | 4 +- src/foundation/coproduct-types.lagda.md | 4 +- src/foundation/coslice.lagda.md | 22 +- src/foundation/decidable-embeddings.lagda.md | 3 +- .../decidable-equivalence-relations.lagda.md | 4 +- .../decidable-propositions.lagda.md | 15 +- src/foundation/decidable-relations.lagda.md | 2 +- src/foundation/decidable-subtypes.lagda.md | 2 +- .../dependent-binomial-theorem.lagda.md | 14 +- .../dependent-identifications.lagda.md | 2 +- src/foundation/diagonals-of-maps.lagda.md | 2 +- .../double-negation-modality.lagda.md | 2 +- .../equality-cartesian-product-types.lagda.md | 4 +- .../equality-coproduct-types.lagda.md | 4 +- .../equality-fibers-of-maps.lagda.md | 6 +- src/foundation/equivalence-classes.lagda.md | 2 +- .../equivalence-extensionality.lagda.md | 35 ++ src/foundation/equivalence-induction.lagda.md | 247 ++++++++++++-- src/foundation/equivalence-relations.lagda.md | 6 +- src/foundation/equivalences-maybe.lagda.md | 4 +- src/foundation/equivalences.lagda.md | 256 ++++----------- src/foundation/exclusive-disjunction.lagda.md | 4 +- .../existential-quantification.lagda.md | 2 +- src/foundation/fibered-equivalences.lagda.md | 100 +++++- src/foundation/fibered-involutions.lagda.md | 6 +- src/foundation/fibered-maps.lagda.md | 111 ++++++- .../functional-correspondences.lagda.md | 2 +- ...toriality-cartesian-product-types.lagda.md | 4 +- .../functoriality-coproduct-types.lagda.md | 16 +- ...oriality-dependent-function-types.lagda.md | 84 +++-- ...unctoriality-dependent-pair-types.lagda.md | 6 +- .../functoriality-fibers-of-maps.lagda.md | 2 +- .../functoriality-function-types.lagda.md | 114 +++++-- .../functoriality-set-quotients.lagda.md | 2 +- src/foundation/homotopies.lagda.md | 30 +- src/foundation/identity-systems.lagda.md | 70 ++-- src/foundation/identity-types.lagda.md | 8 +- .../impredicative-encodings.lagda.md | 2 +- src/foundation/invertible-maps.lagda.md | 304 ++++++++++++++++++ src/foundation/involutions.lagda.md | 190 ++++++++++- src/foundation/isolated-points.lagda.md | 2 +- src/foundation/isomorphisms-of-sets.lagda.md | 2 +- src/foundation/iterating-involutions.lagda.md | 2 +- src/foundation/logical-equivalences.lagda.md | 209 ++++++++++-- src/foundation/monomorphisms.lagda.md | 11 +- .../multivariable-operations.lagda.md | 2 +- src/foundation/negation.lagda.md | 2 +- .../pairs-of-distinct-elements.lagda.md | 2 +- src/foundation/partitions.lagda.md | 2 +- src/foundation/path-algebra.lagda.md | 125 +++++-- .../pi-decompositions-subuniverse.lagda.md | 2 +- .../pointed-torsorial-type-families.lagda.md | 2 +- ...roduct-decompositions-subuniverse.lagda.md | 4 +- .../propositional-extensionality.lagda.md | 2 +- src/foundation/propositional-maps.lagda.md | 2 +- src/foundation/pullbacks.lagda.md | 10 +- .../raising-universe-levels.lagda.md | 4 +- .../relaxed-sigma-decompositions.lagda.md | 2 +- src/foundation/retractions.lagda.md | 17 +- src/foundation/russells-paradox.lagda.md | 3 +- src/foundation/sections.lagda.md | 17 +- src/foundation/set-quotients.lagda.md | 4 +- src/foundation/set-truncations.lagda.md | 2 +- .../sigma-closed-subuniverses.lagda.md | 5 +- .../sigma-decomposition-subuniverse.lagda.md | 2 +- src/foundation/sigma-decompositions.lagda.md | 2 +- src/foundation/singleton-subtypes.lagda.md | 2 +- src/foundation/slice.lagda.md | 23 +- .../standard-apartness-relations.lagda.md | 2 +- .../structure-identity-principle.lagda.md | 8 +- .../structured-type-duality.lagda.md | 2 +- .../subtype-identity-principle.lagda.md | 13 +- src/foundation/subtypes.lagda.md | 2 +- src/foundation/surjective-maps.lagda.md | 4 +- .../symmetric-binary-relations.lagda.md | 264 +++++++++++++++ src/foundation/symmetric-difference.lagda.md | 2 +- .../symmetric-identity-types.lagda.md | 5 +- src/foundation/symmetric-operations.lagda.md | 170 +++++++++- .../torsorial-type-families.lagda.md | 2 +- src/foundation/transport.lagda.md | 2 +- .../truncation-equivalences.lagda.md | 3 +- src/foundation/truncations.lagda.md | 10 +- .../type-arithmetic-booleans.lagda.md | 4 +- ...rithmetic-cartesian-product-types.lagda.md | 4 +- .../type-arithmetic-coproduct-types.lagda.md | 10 +- ...ithmetic-dependent-function-types.lagda.md | 2 +- ...e-arithmetic-dependent-pair-types.lagda.md | 20 +- .../type-arithmetic-empty-type.lagda.md | 16 +- .../type-arithmetic-unit-type.lagda.md | 14 +- src/foundation/type-duality.lagda.md | 13 +- ...ype-theoretic-principle-of-choice.lagda.md | 12 +- .../uniqueness-set-quotients.lagda.md | 3 +- src/foundation/uniqueness-truncation.lagda.md | 4 +- .../universal-property-booleans.lagda.md | 2 +- ...-property-cartesian-product-types.lagda.md | 4 +- ...niversal-property-coproduct-types.lagda.md | 5 +- .../universal-property-empty-type.lagda.md | 3 +- ...universal-property-fiber-products.lagda.md | 8 +- ...iversal-property-identity-systems.lagda.md | 102 ++++++ ...universal-property-identity-types.lagda.md | 16 +- .../universal-property-image.lagda.md | 5 +- .../universal-property-maybe.lagda.md | 2 +- ...ropositional-truncation-into-sets.lagda.md | 2 +- ...property-propositional-truncation.lagda.md | 3 +- ...universal-property-set-truncation.lagda.md | 3 +- .../universal-property-truncation.lagda.md | 10 +- .../universal-property-unit-type.lagda.md | 3 +- .../unordered-pairs-of-types.lagda.md | 2 +- src/foundation/unordered-pairs.lagda.md | 213 ++++++++++-- 146 files changed, 3304 insertions(+), 888 deletions(-) create mode 100644 src/foundation-core/invertible-maps.lagda.md create mode 100644 src/foundation/action-on-equivalences-type-families.lagda.md create mode 100644 src/foundation/invertible-maps.lagda.md create mode 100644 src/foundation/symmetric-binary-relations.lagda.md create mode 100644 src/foundation/universal-property-identity-systems.lagda.md diff --git a/src/foundation-core/coherently-invertible-maps.lagda.md b/src/foundation-core/coherently-invertible-maps.lagda.md index 384c6be77f..702c411a18 100644 --- a/src/foundation-core/coherently-invertible-maps.lagda.md +++ b/src/foundation-core/coherently-invertible-maps.lagda.md @@ -12,22 +12,26 @@ open import foundation.commuting-squares-of-identifications open import foundation.dependent-pair-types open import foundation.universe-levels -open import foundation-core.cartesian-product-types open import foundation-core.function-types open import foundation-core.homotopies open import foundation-core.identity-types +open import foundation-core.invertible-maps +open import foundation-core.retractions +open import foundation-core.sections ``` ## Idea -An inverse for a map `f : A → B` is a map `g : B → A` equipped with homotopies -` (f ∘ g) ~ id` and `(g ∘ f) ~ id`. Such data, however is structure on the map -`f`, and not a property. Therefore we include an coherence condition for the -homotopies of an inverse. Coherently invertible map `f : A → B` is a map -equipped with a two-sided inverse and this additional coherence law. They are -also called half-adjoint equivalences. +An [inverse](foundation-core.invertible-maps.md) for a map `f : A → B` is a map +`g : B → A` equipped with [homotopies](foundation-core.homotopies.md) +` (f ∘ g) ~ id` and `(g ∘ f) ~ id`. Such data, however is +[structure](foundation.structure.md) on the map `f`, and not generally a +[property](foundation-core.propositions.md). Therefore we include a coherence +condition for the homotopies of an inverse. A **coherently invertible map** +`f : A → B` is a map equipped with a two-sided inverse and this additional +coherence law. They are also called half-adjoint equivalences. ## Definition @@ -36,9 +40,6 @@ module _ {l1 l2 : Level} {A : UU l1} {B : UU l2} where - has-inverse : (A → B) → UU (l1 ⊔ l2) - has-inverse f = Σ (B → A) (λ g → ((f ∘ g) ~ id) × ((g ∘ f) ~ id)) - coherence-is-coherently-invertible : (f : A → B) (g : B → A) (G : (f ∘ g) ~ id) (H : (g ∘ f) ~ id) → UU (l1 ⊔ l2) coherence-is-coherently-invertible f g G H = (G ·r f) ~ (f ·l H) @@ -48,30 +49,46 @@ module _ Σ ( B → A) ( λ g → Σ ((f ∘ g) ~ id) ( λ G → Σ ((g ∘ f) ~ id) - (λ H → coherence-is-coherently-invertible f g G H))) + ( λ H → coherence-is-coherently-invertible f g G H))) module _ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} + (H : is-coherently-invertible f) where - inv-is-coherently-invertible : is-coherently-invertible f → B → A - inv-is-coherently-invertible = pr1 + map-inv-is-coherently-invertible : B → A + map-inv-is-coherently-invertible = pr1 H - is-section-inv-is-coherently-invertible : - (H : is-coherently-invertible f) → (f ∘ inv-is-coherently-invertible H) ~ id - is-section-inv-is-coherently-invertible H = pr1 (pr2 H) + is-retraction-is-coherently-invertible : + (f ∘ map-inv-is-coherently-invertible) ~ id + is-retraction-is-coherently-invertible = pr1 (pr2 H) - is-retraction-inv-is-coherently-invertible : - (H : is-coherently-invertible f) → (inv-is-coherently-invertible H ∘ f) ~ id - is-retraction-inv-is-coherently-invertible H = pr1 (pr2 (pr2 H)) + is-section-is-coherently-invertible : + (map-inv-is-coherently-invertible ∘ f) ~ id + is-section-is-coherently-invertible = pr1 (pr2 (pr2 H)) - coh-inv-is-coherently-invertible : - (H : is-coherently-invertible f) → + coh-is-coherently-invertible : coherence-is-coherently-invertible f - ( inv-is-coherently-invertible H) - ( is-section-inv-is-coherently-invertible H) - ( is-retraction-inv-is-coherently-invertible H) - coh-inv-is-coherently-invertible H = pr2 (pr2 (pr2 H)) + ( map-inv-is-coherently-invertible) + ( is-retraction-is-coherently-invertible) + ( is-section-is-coherently-invertible) + coh-is-coherently-invertible = pr2 (pr2 (pr2 H)) + + is-invertible-is-coherently-invertible : is-invertible f + pr1 is-invertible-is-coherently-invertible = + map-inv-is-coherently-invertible + pr1 (pr2 is-invertible-is-coherently-invertible) = + is-retraction-is-coherently-invertible + pr2 (pr2 is-invertible-is-coherently-invertible) = + is-section-is-coherently-invertible + + section-is-coherently-invertible : section f + pr1 section-is-coherently-invertible = map-inv-is-coherently-invertible + pr2 section-is-coherently-invertible = is-retraction-is-coherently-invertible + + retraction-is-coherently-invertible : retraction f + pr1 retraction-is-coherently-invertible = map-inv-is-coherently-invertible + pr2 retraction-is-coherently-invertible = is-section-is-coherently-invertible ``` ## Properties @@ -97,51 +114,60 @@ module _ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} where - inv-has-inverse : has-inverse f → B → A - inv-has-inverse H = pr1 H - abstract - is-section-inv-has-inverse : - (H : has-inverse f) → (f ∘ inv-has-inverse H) ~ id - is-section-inv-has-inverse H y = - ( inv (pr1 (pr2 H) (f (inv-has-inverse H y)))) ∙ - ( ap f (pr2 (pr2 H) (inv-has-inverse H y)) ∙ (pr1 (pr2 H) y)) - - is-retraction-inv-has-inverse : - (H : has-inverse f) → (inv-has-inverse H ∘ f) ~ id - is-retraction-inv-has-inverse H = pr2 (pr2 H) - - coherence-inv-has-inverse : - ( H : has-inverse f) → - ( is-section-inv-has-inverse H ·r f) ~ - ( f ·l is-retraction-inv-has-inverse H) - coherence-inv-has-inverse H x = + is-section-map-inv-is-invertible : + (H : is-invertible f) → (f ∘ map-inv-is-invertible H) ~ id + is-section-map-inv-is-invertible H y = + ( inv (is-retraction-is-invertible H (f (map-inv-is-invertible H y)))) ∙ + ( ( ap f (is-section-is-invertible H (map-inv-is-invertible H y))) ∙ + ( is-retraction-is-invertible H y)) + + is-retraction-map-inv-is-invertible : + (H : is-invertible f) → (map-inv-is-invertible H ∘ f) ~ id + is-retraction-map-inv-is-invertible = is-section-is-invertible + + coherence-map-inv-is-invertible : + ( H : is-invertible f) → + ( is-section-map-inv-is-invertible H ·r f) ~ + ( f ·l is-retraction-map-inv-is-invertible H) + coherence-map-inv-is-invertible H x = inv ( left-transpose-eq-concat - ( pr1 (pr2 H) (f (inv-has-inverse H (f x)))) - ( ap f (pr2 (pr2 H) x)) - ( ( ap f (pr2 (pr2 H) (inv-has-inverse H (f x)))) ∙ - ( pr1 (pr2 H) (f x))) + ( is-retraction-is-invertible H (f (map-inv-is-invertible H (f x)))) + ( ap f (is-section-is-invertible H x)) + ( ( ap f + ( is-section-is-invertible H (map-inv-is-invertible H (f x)))) ∙ + ( is-retraction-is-invertible H (f x))) ( coherence-square-identifications-top-paste - ( pr1 (pr2 H) (f (inv-has-inverse H (f x)))) - ( ap f (pr2 (pr2 H) x)) - ( (ap (f ∘ (inv-has-inverse H ∘ f)) (pr2 (pr2 H) x))) - ( pr1 (pr2 H) (f x)) - ( ( ap-comp f (inv-has-inverse H ∘ f) (pr2 (pr2 H) x)) ∙ + ( is-retraction-is-invertible H (f (map-inv-is-invertible H (f x)))) + ( ap f (is-section-is-invertible H x)) + ( ( ap + ( f ∘ (map-inv-is-invertible H ∘ f)) + ( is-section-is-invertible H x))) + ( is-retraction-is-invertible H (f x)) + ( ( ap-comp f + ( map-inv-is-invertible H ∘ f) + ( is-section-is-invertible H x)) ∙ ( inv - ( ap (ap f) (coh-is-coherently-invertible-id (pr2 (pr2 H)) x)))) - ( nat-htpy (htpy-right-whisk (pr1 (pr2 H)) f) (pr2 (pr2 H) x)))) + ( ap + ( ap f) + ( coh-is-coherently-invertible-id + ( is-section-is-invertible H) x)))) + ( nat-htpy + ( htpy-right-whisk (is-retraction-is-invertible H) f) + ( is-section-is-invertible H x)))) abstract - is-coherently-invertible-has-inverse : - (H : has-inverse f) → is-coherently-invertible f - pr1 (is-coherently-invertible-has-inverse H) = inv-has-inverse H - pr1 (pr2 (is-coherently-invertible-has-inverse H)) = - is-section-inv-has-inverse H - pr1 (pr2 (pr2 (is-coherently-invertible-has-inverse H))) = - is-retraction-inv-has-inverse H - pr2 (pr2 (pr2 (is-coherently-invertible-has-inverse H))) = - coherence-inv-has-inverse H + is-coherently-invertible-is-invertible : + (H : is-invertible f) → is-coherently-invertible f + pr1 (is-coherently-invertible-is-invertible H) = + map-inv-is-invertible H + pr1 (pr2 (is-coherently-invertible-is-invertible H)) = + is-section-map-inv-is-invertible H + pr1 (pr2 (pr2 (is-coherently-invertible-is-invertible H))) = + is-retraction-map-inv-is-invertible H + pr2 (pr2 (pr2 (is-coherently-invertible-is-invertible H))) = + coherence-map-inv-is-invertible H ``` ## See also diff --git a/src/foundation-core/contractible-maps.lagda.md b/src/foundation-core/contractible-maps.lagda.md index 751c90219e..4016cecbd3 100644 --- a/src/foundation-core/contractible-maps.lagda.md +++ b/src/foundation-core/contractible-maps.lagda.md @@ -74,7 +74,7 @@ module _ abstract is-equiv-is-contr-map : is-contr-map f → is-equiv f is-equiv-is-contr-map H = - is-equiv-has-inverse + is-equiv-is-invertible ( map-inv-is-contr-map H) ( is-section-map-inv-is-contr-map H) ( is-retraction-map-inv-is-contr-map H) @@ -91,18 +91,18 @@ module _ center-fiber-is-coherently-invertible : is-coherently-invertible f → (y : B) → fiber f y pr1 (center-fiber-is-coherently-invertible H y) = - inv-is-coherently-invertible H y + map-inv-is-coherently-invertible H y pr2 (center-fiber-is-coherently-invertible H y) = - is-section-inv-is-coherently-invertible H y + is-retraction-is-coherently-invertible H y contraction-fiber-is-coherently-invertible : (H : is-coherently-invertible f) → (y : B) → (t : fiber f y) → (center-fiber-is-coherently-invertible H y) = t contraction-fiber-is-coherently-invertible H y (pair x refl) = eq-Eq-fiber f y - ( is-retraction-inv-is-coherently-invertible H x) + ( is-section-is-coherently-invertible H x) ( ( right-unit) ∙ - ( inv ( coh-inv-is-coherently-invertible H x))) + ( inv ( coh-is-coherently-invertible H x))) is-contr-map-is-coherently-invertible : is-coherently-invertible f → is-contr-map f diff --git a/src/foundation-core/contractible-types.lagda.md b/src/foundation-core/contractible-types.lagda.md index cfa56145e5..f9309add78 100644 --- a/src/foundation-core/contractible-types.lagda.md +++ b/src/foundation-core/contractible-types.lagda.md @@ -147,7 +147,7 @@ module _ is-equiv-is-contr : (f : A → B) → is-contr A → is-contr B → is-equiv f is-equiv-is-contr f is-contr-A is-contr-B = - is-equiv-has-inverse + is-equiv-is-invertible ( λ y → center is-contr-A) ( λ y → eq-is-contr is-contr-B) ( contraction is-contr-A) diff --git a/src/foundation-core/diagonal-maps-of-types.lagda.md b/src/foundation-core/diagonal-maps-of-types.lagda.md index 85bc61b487..3c28b887c5 100644 --- a/src/foundation-core/diagonal-maps-of-types.lagda.md +++ b/src/foundation-core/diagonal-maps-of-types.lagda.md @@ -70,7 +70,7 @@ module _ is-prop A → A ≃ (A × A) pr1 (equiv-diagonal-is-prop is-prop-A) = diagonal A pr2 (equiv-diagonal-is-prop is-prop-A) = - is-equiv-has-inverse + is-equiv-is-invertible ( pr1) ( λ pair-a → eq-pair (eq-is-prop is-prop-A) (eq-is-prop is-prop-A)) ( λ a → eq-is-prop is-prop-A) @@ -101,7 +101,7 @@ module _ abstract is-equiv-eq-fiber-diagonal : (t : A × A) → is-equiv (eq-fiber-diagonal t) is-equiv-eq-fiber-diagonal t = - is-equiv-has-inverse + is-equiv-is-invertible ( fiber-diagonal-eq t) ( is-section-fiber-diagonal-eq t) ( is-retraction-fiber-diagonal-eq t) diff --git a/src/foundation-core/empty-types.lagda.md b/src/foundation-core/empty-types.lagda.md index c6e97dd980..221ce34fe9 100644 --- a/src/foundation-core/empty-types.lagda.md +++ b/src/foundation-core/empty-types.lagda.md @@ -74,7 +74,7 @@ abstract {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → is-empty B → is-equiv f is-equiv-is-empty f H = - is-equiv-has-inverse + is-equiv-is-invertible ( ex-falso ∘ H) ( λ y → ex-falso (H y)) ( λ x → ex-falso (H (f x))) diff --git a/src/foundation-core/equality-dependent-pair-types.lagda.md b/src/foundation-core/equality-dependent-pair-types.lagda.md index d9b33e2faa..1e4bb29d48 100644 --- a/src/foundation-core/equality-dependent-pair-types.lagda.md +++ b/src/foundation-core/equality-dependent-pair-types.lagda.md @@ -70,7 +70,7 @@ module _ abstract is-equiv-eq-pair-Σ : (s t : Σ A B) → is-equiv (eq-pair-Σ' {s} {t}) is-equiv-eq-pair-Σ s t = - is-equiv-has-inverse + is-equiv-is-invertible ( pair-eq-Σ) ( is-section-pair-eq-Σ s t) ( is-retraction-pair-eq-Σ s t) @@ -81,7 +81,7 @@ module _ abstract is-equiv-pair-eq-Σ : (s t : Σ A B) → is-equiv (pair-eq-Σ {s} {t}) is-equiv-pair-eq-Σ s t = - is-equiv-has-inverse + is-equiv-is-invertible ( eq-pair-Σ') ( is-retraction-pair-eq-Σ s t) ( is-section-pair-eq-Σ s t) diff --git a/src/foundation-core/equivalence-relations.lagda.md b/src/foundation-core/equivalence-relations.lagda.md index a4983ba2d9..ffd556bfdc 100644 --- a/src/foundation-core/equivalence-relations.lagda.md +++ b/src/foundation-core/equivalence-relations.lagda.md @@ -10,13 +10,13 @@ module foundation-core.equivalence-relations where open import foundation.binary-relations open import foundation.dependent-pair-types open import foundation.inhabited-subtypes +open import foundation.logical-equivalences open import foundation.propositional-truncations open import foundation.unit-type open import foundation.universe-levels open import foundation-core.cartesian-product-types open import foundation-core.equivalences -open import foundation-core.logical-equivalences open import foundation-core.propositions ``` diff --git a/src/foundation-core/equivalences.lagda.md b/src/foundation-core/equivalences.lagda.md index 88f303611a..f43047ed6b 100644 --- a/src/foundation-core/equivalences.lagda.md +++ b/src/foundation-core/equivalences.lagda.md @@ -17,6 +17,7 @@ open import foundation-core.coherently-invertible-maps open import foundation-core.function-types open import foundation-core.homotopies open import foundation-core.identity-types +open import foundation-core.invertible-maps open import foundation-core.retractions open import foundation-core.sections ``` @@ -150,21 +151,21 @@ module _ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} where - is-equiv-has-inverse' : has-inverse f → is-equiv f - pr1 (pr1 (is-equiv-has-inverse' (pair g (pair H K)))) = g - pr2 (pr1 (is-equiv-has-inverse' (pair g (pair H K)))) = H - pr1 (pr2 (is-equiv-has-inverse' (pair g (pair H K)))) = g - pr2 (pr2 (is-equiv-has-inverse' (pair g (pair H K)))) = K + is-equiv-is-invertible' : is-invertible f → is-equiv f + pr1 (pr1 (is-equiv-is-invertible' (pair g (pair H K)))) = g + pr2 (pr1 (is-equiv-is-invertible' (pair g (pair H K)))) = H + pr1 (pr2 (is-equiv-is-invertible' (pair g (pair H K)))) = g + pr2 (pr2 (is-equiv-is-invertible' (pair g (pair H K)))) = K - is-equiv-has-inverse : + is-equiv-is-invertible : (g : B → A) (H : (f ∘ g) ~ id) (K : (g ∘ f) ~ id) → is-equiv f - is-equiv-has-inverse g H K = - is-equiv-has-inverse' (pair g (pair H K)) + is-equiv-is-invertible g H K = + is-equiv-is-invertible' (pair g (pair H K)) - has-inverse-is-equiv : is-equiv f → has-inverse f - pr1 (has-inverse-is-equiv (pair (pair g G) (pair h H))) = g - pr1 (pr2 (has-inverse-is-equiv (pair (pair g G) (pair h H)))) = G - pr2 (pr2 (has-inverse-is-equiv (pair (pair g G) (pair h H)))) = + is-invertible-is-equiv : is-equiv f → is-invertible f + pr1 (is-invertible-is-equiv (pair (pair g G) (pair h H))) = g + pr1 (pr2 (is-invertible-is-equiv (pair (pair g G) (pair h H)))) = G + pr2 (pr2 (is-invertible-is-equiv (pair (pair g G) (pair h H)))) = (((inv-htpy (H ·r g)) ∙h (h ·l G)) ·r f) ∙h H ``` @@ -178,13 +179,13 @@ module _ abstract is-coherently-invertible-is-equiv : is-equiv f → is-coherently-invertible f is-coherently-invertible-is-equiv = - is-coherently-invertible-has-inverse ∘ has-inverse-is-equiv + is-coherently-invertible-is-invertible ∘ is-invertible-is-equiv abstract is-equiv-is-coherently-invertible : is-coherently-invertible f → is-equiv f - is-equiv-is-coherently-invertible (pair g (pair G (pair H K))) = - is-equiv-has-inverse g G H + is-equiv-is-coherently-invertible (g , G , H , K) = + is-equiv-is-invertible g G H ``` ### Structure obtained from being coherently invertible @@ -195,24 +196,24 @@ module _ where map-inv-is-equiv : B → A - map-inv-is-equiv = pr1 (has-inverse-is-equiv H) + map-inv-is-equiv = pr1 (is-invertible-is-equiv H) is-section-map-inv-is-equiv : (f ∘ map-inv-is-equiv) ~ id is-section-map-inv-is-equiv = - is-section-inv-has-inverse (has-inverse-is-equiv H) + is-section-map-inv-is-invertible (is-invertible-is-equiv H) is-retraction-map-inv-is-equiv : (map-inv-is-equiv ∘ f) ~ id is-retraction-map-inv-is-equiv = - is-retraction-inv-has-inverse (has-inverse-is-equiv H) + is-retraction-map-inv-is-invertible (is-invertible-is-equiv H) coherence-map-inv-is-equiv : ( is-section-map-inv-is-equiv ·r f) ~ (f ·l is-retraction-map-inv-is-equiv) coherence-map-inv-is-equiv = - coherence-inv-has-inverse (has-inverse-is-equiv H) + coherence-map-inv-is-invertible (is-invertible-is-equiv H) is-equiv-map-inv-is-equiv : is-equiv map-inv-is-equiv is-equiv-map-inv-is-equiv = - is-equiv-has-inverse f + is-equiv-is-invertible f ( is-retraction-map-inv-is-equiv) ( is-section-map-inv-is-equiv) ``` @@ -549,7 +550,7 @@ module _ is-emb-is-equiv : {f : A → B} → is-equiv f → (x y : A) → is-equiv (ap f {x} {y}) is-emb-is-equiv {f} H x y = - is-equiv-has-inverse + is-equiv-is-invertible ( λ p → ( inv (is-retraction-map-inv-is-equiv H x)) ∙ ( ( ap (map-inv-is-equiv H) p) ∙ diff --git a/src/foundation-core/fibers-of-maps.lagda.md b/src/foundation-core/fibers-of-maps.lagda.md index 13a2586ffc..cd073f11df 100644 --- a/src/foundation-core/fibers-of-maps.lagda.md +++ b/src/foundation-core/fibers-of-maps.lagda.md @@ -81,7 +81,7 @@ module _ abstract is-equiv-Eq-eq-fiber : {s t : fiber f b} → is-equiv (Eq-eq-fiber {s} {t}) is-equiv-Eq-eq-fiber = - is-equiv-has-inverse + is-equiv-is-invertible eq-Eq-fiber-uncurry is-section-eq-Eq-fiber is-retraction-eq-Eq-fiber @@ -94,7 +94,7 @@ module _ is-equiv-eq-Eq-fiber : {s t : fiber f b} → is-equiv (eq-Eq-fiber-uncurry {s} {t}) is-equiv-eq-Eq-fiber = - is-equiv-has-inverse + is-equiv-is-invertible Eq-eq-fiber is-retraction-eq-Eq-fiber is-section-eq-Eq-fiber @@ -144,7 +144,7 @@ module _ is-equiv-Eq-eq-fiber' : {s t : fiber' f b} → is-equiv (Eq-eq-fiber' {s} {t}) is-equiv-Eq-eq-fiber' = - is-equiv-has-inverse + is-equiv-is-invertible eq-Eq-fiber-uncurry' is-section-eq-Eq-fiber' is-retraction-eq-Eq-fiber' @@ -157,7 +157,7 @@ module _ is-equiv-eq-Eq-fiber' : {s t : fiber' f b} → is-equiv (eq-Eq-fiber-uncurry' {s} {t}) is-equiv-eq-Eq-fiber' = - is-equiv-has-inverse + is-equiv-is-invertible Eq-eq-fiber' is-retraction-eq-Eq-fiber' is-section-eq-Eq-fiber' @@ -191,7 +191,7 @@ module _ is-equiv-map-equiv-fiber : is-equiv map-equiv-fiber is-equiv-map-equiv-fiber = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-equiv-fiber is-section-map-inv-equiv-fiber is-retraction-map-inv-equiv-fiber @@ -225,7 +225,7 @@ module _ abstract is-equiv-map-fiber-pr1 : is-equiv map-fiber-pr1 is-equiv-map-fiber-pr1 = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-fiber-pr1 is-retraction-map-inv-fiber-pr1 is-section-map-inv-fiber-pr1 @@ -237,7 +237,7 @@ module _ abstract is-equiv-map-inv-fiber-pr1 : is-equiv map-inv-fiber-pr1 is-equiv-map-inv-fiber-pr1 = - is-equiv-has-inverse + is-equiv-is-invertible map-fiber-pr1 is-section-map-inv-fiber-pr1 is-retraction-map-inv-fiber-pr1 @@ -276,14 +276,14 @@ module _ abstract is-equiv-map-equiv-total-fiber : is-equiv map-equiv-total-fiber is-equiv-map-equiv-total-fiber = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-equiv-total-fiber is-section-map-inv-equiv-total-fiber is-retraction-map-inv-equiv-total-fiber is-equiv-map-inv-equiv-total-fiber : is-equiv map-inv-equiv-total-fiber is-equiv-map-inv-equiv-total-fiber = - is-equiv-has-inverse + is-equiv-is-invertible map-equiv-total-fiber is-retraction-map-inv-equiv-total-fiber is-section-map-inv-equiv-total-fiber @@ -331,7 +331,7 @@ module _ is-equiv-map-compute-fiber-comp : is-equiv map-compute-fiber-comp is-equiv-map-compute-fiber-comp = - is-equiv-has-inverse + is-equiv-is-invertible ( inv-map-compute-fiber-comp) ( is-section-inv-map-compute-fiber-comp) ( is-retraction-inv-map-compute-fiber-comp) @@ -345,7 +345,7 @@ module _ is-equiv-inv-map-compute-fiber-comp : is-equiv inv-map-compute-fiber-comp is-equiv-inv-map-compute-fiber-comp = - is-equiv-has-inverse + is-equiv-is-invertible ( map-compute-fiber-comp) ( is-retraction-inv-map-compute-fiber-comp) ( is-section-inv-map-compute-fiber-comp) @@ -388,7 +388,7 @@ module _ is-equiv-map-reduce-Π-fiber : is-equiv map-reduce-Π-fiber is-equiv-map-reduce-Π-fiber = - is-equiv-has-inverse + is-equiv-is-invertible ( inv-map-reduce-Π-fiber) ( is-section-inv-map-reduce-Π-fiber) ( is-retraction-inv-map-reduce-Π-fiber) diff --git a/src/foundation-core/function-types.lagda.md b/src/foundation-core/function-types.lagda.md index b23105eb5a..975410d292 100644 --- a/src/foundation-core/function-types.lagda.md +++ b/src/foundation-core/function-types.lagda.md @@ -69,19 +69,25 @@ precomp f C = precomp-Π f (λ b → C) ```agda postcomp : - {l1 l2 l3 : Level} {X : UU l1} {Y : UU l2} (A : UU l3) → + {l1 l2 l3 : Level} + {X : UU l1} {Y : UU l2} (A : UU l3) → (X → Y) → (A → X) → (A → Y) postcomp A f h = f ∘ h map-Π : - {l1 l2 l3 : Level} {I : UU l1} {A : I → UU l2} {B : I → UU l3} + {l1 l2 l3 : Level} + {I : UU l1} {A : I → UU l2} {B : I → UU l3} (f : (i : I) → A i → B i) → - ((i : I) → A i) → ((i : I) → B i) + ((i : I) → A i) → + ((i : I) → B i) map-Π f h i = f i (h i) map-Π' : - {l1 l2 l3 l4 : Level} {I : UU l1} {A : I → UU l2} {B : I → UU l3} + {l1 l2 l3 l4 : Level} + {I : UU l1} {A : I → UU l2} {B : I → UU l3} {J : UU l4} (α : J → I) → - ((i : I) → A i → B i) → ((j : J) → A (α j)) → ((j : J) → B (α j)) -map-Π' α f = map-Π (λ j → f (α j)) + ((i : I) → A i → B i) → + ((j : J) → A (α j)) → + ((j : J) → B (α j)) +map-Π' α f = map-Π (f ∘ α) ``` diff --git a/src/foundation-core/functoriality-dependent-function-types.lagda.md b/src/foundation-core/functoriality-dependent-function-types.lagda.md index b0c1874edc..b2d10f0ab2 100644 --- a/src/foundation-core/functoriality-dependent-function-types.lagda.md +++ b/src/foundation-core/functoriality-dependent-function-types.lagda.md @@ -18,6 +18,7 @@ open import foundation-core.coherently-invertible-maps open import foundation-core.constant-maps open import foundation-core.contractible-maps open import foundation-core.contractible-types +open import foundation-core.dependent-identifications open import foundation-core.equivalences open import foundation-core.fibers-of-maps open import foundation-core.function-types @@ -45,43 +46,68 @@ htpy-map-Π' : {l1 l2 l3 l4 : Level} {I : UU l1} {A : I → UU l2} {B : I → UU l3} {J : UU l4} (α : J → I) {f f' : (i : I) → A i → B i} → ((i : I) → (f i) ~ (f' i)) → (map-Π' α f ~ map-Π' α f') -htpy-map-Π' α H = htpy-map-Π (λ j → H (α j)) +htpy-map-Π' α H = htpy-map-Π (H ∘ α) ``` -### We compute the fibers of map-Π +### The fibers of `map-Π` ```agda -equiv-fiber-map-Π : +compute-fiber-map-Π : {l1 l2 l3 : Level} {I : UU l1} {A : I → UU l2} {B : I → UU l3} (f : (i : I) → A i → B i) (h : (i : I) → B i) → ((i : I) → fiber (f i) (h i)) ≃ fiber (map-Π f) h -equiv-fiber-map-Π f h = - equiv-tot (λ x → equiv-eq-htpy) ∘e distributive-Π-Σ +compute-fiber-map-Π f h = + equiv-tot (λ _ → equiv-eq-htpy) ∘e distributive-Π-Σ + +compute-fiber-map-Π' : + {l1 l2 l3 l4 : Level} {I : UU l1} {A : I → UU l2} {B : I → UU l3} + {J : UU l4} (α : J → I) (f : (i : I) → A i → B i) + (h : (j : J) → B (α j)) → + ((j : J) → fiber (f (α j)) (h j)) ≃ fiber (map-Π' α f) h +compute-fiber-map-Π' α f = compute-fiber-map-Π (f ∘ α) +``` + +### Dependent precomposition preserves homotopies + +```agda +htpy-precomp-Π : + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} + {f g : A → B} (H : f ~ g) (C : B → UU l3) → + (h : (y : B) → C y) (x : A) → + dependent-identification C (H x) (h (f x)) (h (g x)) +htpy-precomp-Π H C h x = apd h (H x) ``` -### Families of equivalences induce equivalences on dependent function types +### Postcomposition and equivalences + +#### Families of equivalences induce equivalences on dependent function types ```agda abstract - is-equiv-map-Π : + is-equiv-map-equiv-Π-equiv-family : {l1 l2 l3 : Level} {I : UU l1} {A : I → UU l2} {B : I → UU l3} (f : (i : I) → A i → B i) (is-equiv-f : is-fiberwise-equiv f) → is-equiv (map-Π f) - is-equiv-map-Π f is-equiv-f = + is-equiv-map-equiv-Π-equiv-family f is-equiv-f = is-equiv-is-contr-map ( λ g → is-contr-equiv' _ - ( equiv-fiber-map-Π f g) + ( compute-fiber-map-Π f g) ( is-contr-Π (λ i → is-contr-map-is-equiv (is-equiv-f i) (g i)))) -equiv-map-Π : +equiv-Π-equiv-family : {l1 l2 l3 : Level} {I : UU l1} {A : I → UU l2} {B : I → UU l3} (e : (i : I) → (A i) ≃ (B i)) → ((i : I) → A i) ≃ ((i : I) → B i) -pr1 (equiv-map-Π e) = map-Π (λ i → map-equiv (e i)) -pr2 (equiv-map-Π e) = is-equiv-map-Π _ (λ i → is-equiv-map-equiv (e i)) +pr1 (equiv-Π-equiv-family e) = map-Π (λ i → map-equiv (e i)) +pr2 (equiv-Π-equiv-family e) = + is-equiv-map-equiv-Π-equiv-family + ( λ i → map-equiv (e i)) + ( λ i → is-equiv-map-equiv (e i)) ``` -### For any map `f : A → B` and any family `C` over `B`, if `f` satisfies the property that `C b → (fiber f b → C b)` is an equivalence for every `b : B` then the precomposition function `((b : B) → C b) → ((a : A) → C (f a))` is an equivalence +### Precomposition and equivalences + +#### For any map `f : A → B` and any family `C` over `B`, if `f` satisfies the property that `C b → (fiber f b → C b)` is an equivalence for every `b : B` then the precomposition function `((b : B) → C b) → ((a : A) → C (f a))` is an equivalence This condition simplifies, for example, the proof that connected maps satisfy a dependent universal property. @@ -95,11 +121,11 @@ is-equiv-precomp-Π-fiber-condition {f = f} {C} H = is-equiv-comp ( map-reduce-Π-fiber f (λ b u → C b)) ( map-Π (λ b u t → u)) - ( is-equiv-map-Π (λ b u t → u) H) + ( is-equiv-map-equiv-Π-equiv-family (λ b u t → u) H) ( is-equiv-map-reduce-Π-fiber f (λ b u → C b)) ``` -### If `f` is coherently invertible, then precomposing by `f` is an equivalence +#### If `f` is coherently invertible, then precomposing by `f` is an equivalence ```agda tr-precompose-fam : @@ -114,7 +140,7 @@ abstract (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 = - is-equiv-has-inverse + is-equiv-is-invertible (λ s y → tr C (is-section-g y) (s (g y))) ( λ s → eq-htpy (λ x → ( ap (λ t → tr C t (s (g (f x)))) (coh x)) ∙ @@ -123,7 +149,7 @@ abstract ( λ s → eq-htpy λ y → apd s (is-section-g y)) ``` -### If `f` is an equivalence, then precomposing by `f` is an equivalence +#### If `f` is an equivalence, then dependent precomposition by `f` is an equivalence ```agda module _ diff --git a/src/foundation-core/functoriality-dependent-pair-types.lagda.md b/src/foundation-core/functoriality-dependent-pair-types.lagda.md index 63415941f4..d07321c3d6 100644 --- a/src/foundation-core/functoriality-dependent-pair-types.lagda.md +++ b/src/foundation-core/functoriality-dependent-pair-types.lagda.md @@ -165,7 +165,7 @@ module _ is-equiv-map-compute-fiber-tot : (t : Σ A C) → is-equiv (map-compute-fiber-tot t) is-equiv-map-compute-fiber-tot t = - is-equiv-has-inverse + is-equiv-is-invertible ( map-inv-compute-fiber-tot t) ( is-section-map-inv-compute-fiber-tot t) ( is-retraction-map-inv-compute-fiber-tot t) @@ -178,7 +178,7 @@ module _ is-equiv-map-inv-compute-fiber-tot : (t : Σ A C) → is-equiv (map-inv-compute-fiber-tot t) is-equiv-map-inv-compute-fiber-tot t = - is-equiv-has-inverse + is-equiv-is-invertible ( map-compute-fiber-tot t) ( is-retraction-map-inv-compute-fiber-tot t) ( is-section-map-inv-compute-fiber-tot t) @@ -270,7 +270,7 @@ module _ is-equiv-fiber-map-Σ-map-base-fiber : (t : Σ B C) → is-equiv (fiber-map-Σ-map-base-fiber t) is-equiv-fiber-map-Σ-map-base-fiber t = - is-equiv-has-inverse + is-equiv-is-invertible ( fiber-fiber-map-Σ-map-base t) ( is-section-fiber-fiber-map-Σ-map-base t) ( is-retraction-fiber-fiber-map-Σ-map-base t) diff --git a/src/foundation-core/functoriality-function-types.lagda.md b/src/foundation-core/functoriality-function-types.lagda.md index 23c0c652f9..b29d2ed8fa 100644 --- a/src/foundation-core/functoriality-function-types.lagda.md +++ b/src/foundation-core/functoriality-function-types.lagda.md @@ -10,21 +10,71 @@ module foundation-core.functoriality-function-types where open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.function-extensionality +open import foundation.type-theoretic-principle-of-choice open import foundation.universe-levels open import foundation-core.contractible-maps open import foundation-core.contractible-types open import foundation-core.equivalences +open import foundation-core.fibers-of-maps open import foundation-core.function-types +open import foundation-core.functoriality-dependent-function-types +open import foundation-core.functoriality-dependent-pair-types open import foundation-core.homotopies 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 ``` ## Properties -### A map `f` is an equivalence if and only if postcomposing by `f` is an equivalence +### Postcomposition preserves homotopies + +```agda +htpy-postcomp : + {l1 l2 l3 : Level} {X : UU l1} {Y : UU l2} (A : UU l3) → + {f g : X → Y} → (f ~ g) → postcomp A f ~ postcomp A g +htpy-postcomp A H h = eq-htpy (H ∘ h) + +compute-htpy-postcomp-refl-htpy : + {l1 l2 l3 : Level} (A : UU l1) {B : UU l2} {C : UU l3} (f : B → C) → + (htpy-postcomp A (refl-htpy' f)) ~ refl-htpy +compute-htpy-postcomp-refl-htpy A f h = eq-htpy-refl-htpy (f ∘ h) +``` + +### The fibers of `postcomp` + +```agda +compute-fiber-postcomp : + {l1 l2 l3 : Level} {X : UU l1} {Y : UU l2} (A : UU l3) → + (f : X → Y) (h : A → Y) → + ((x : A) → fiber f (h x)) ≃ fiber (postcomp A f) h +compute-fiber-postcomp A f h = + equiv-tot (λ _ → equiv-eq-htpy) ∘e distributive-Π-Σ +``` + +### Precomposition preserves homotopies + +```agda +htpy-precomp : + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} + {f g : A → B} (H : f ~ g) (C : UU l3) → + (precomp f C) ~ (precomp g C) +htpy-precomp H C h = eq-htpy (h ·l H) + +compute-htpy-precomp-refl-htpy : + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} (f : A → B) (C : UU l3) → + (htpy-precomp (refl-htpy' f) C) ~ refl-htpy +compute-htpy-precomp-refl-htpy f C h = eq-htpy-refl-htpy (h ∘ f) +``` + +### Postcomposition and equivalences + +#### A map `f` is an equivalence if and only if postcomposing by `f` is an equivalence ```agda module _ @@ -57,13 +107,13 @@ module _ abstract is-equiv-is-equiv-postcomp : is-equiv f is-equiv-is-equiv-postcomp = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-is-equiv-is-equiv-postcomp is-section-map-inv-is-equiv-is-equiv-postcomp is-retraction-map-inv-is-equiv-is-equiv-postcomp ``` -The following version of the same theorem works when X and Y are in the same +The following version of the same theorem works when `X` and `Y` are in the same universe. The condition of inducing equivalences by postcomposition is simplified to that universe. @@ -75,7 +125,7 @@ is-equiv-is-equiv-postcomp' {l} {X} {Y} f is-equiv-postcomp-f = let section-f = center (is-contr-map-is-equiv (is-equiv-postcomp-f Y) id) in - is-equiv-has-inverse + is-equiv-is-invertible ( pr1 section-f) ( htpy-eq (pr2 section-f)) ( htpy-eq @@ -89,16 +139,18 @@ is-equiv-is-equiv-postcomp' abstract is-equiv-postcomp-is-equiv : {l1 l2 : Level} {X : UU l1} {Y : UU l2} (f : X → Y) → is-equiv f → - ({l3 : Level} (A : UU l3) → is-equiv (postcomp A f)) + {l3 : Level} (A : UU l3) → is-equiv (postcomp A f) is-equiv-postcomp-is-equiv {X = X} {Y = Y} f is-equiv-f A = - is-equiv-has-inverse + is-equiv-is-invertible ( postcomp A (map-inv-is-equiv is-equiv-f)) - ( λ g → - eq-htpy - ( htpy-right-whisk (is-section-map-inv-is-equiv is-equiv-f) g)) - ( λ h → - eq-htpy - ( htpy-right-whisk (is-retraction-map-inv-is-equiv is-equiv-f) h)) + ( eq-htpy ∘ htpy-right-whisk (is-section-map-inv-is-equiv is-equiv-f)) + ( eq-htpy ∘ htpy-right-whisk (is-retraction-map-inv-is-equiv is-equiv-f)) + + is-equiv-postcomp-equiv : + {l1 l2 : Level} {X : UU l1} {Y : UU l2} (f : X ≃ Y) → + {l3 : Level} (A : UU l3) → is-equiv (postcomp A (map-equiv f)) + is-equiv-postcomp-equiv f = + is-equiv-postcomp-is-equiv (map-equiv f) (is-equiv-map-equiv f) equiv-postcomp : {l1 l2 l3 : Level} {X : UU l1} {Y : UU l2} (A : UU l3) → @@ -108,6 +160,142 @@ pr2 (equiv-postcomp A e) = is-equiv-postcomp-is-equiv (map-equiv e) (is-equiv-map-equiv e) A ``` +### Precomposition and equivalences + +#### If dependent precomposition by `f` is an equivalence, then precomposition by `f` is an equivalence + +```agda +abstract + is-equiv-precomp-is-equiv-precomp-Π : + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} (f : A → B) → + ((C : B → UU l3) → is-equiv (precomp-Π f C)) → + ((C : UU l3) → is-equiv (precomp f C)) + is-equiv-precomp-is-equiv-precomp-Π f is-equiv-precomp-Π-f C = + is-equiv-precomp-Π-f (λ y → C) +``` + +#### If `f` is an equivalence, then precomposition by `f` is an equivalence + +```agda +abstract + is-equiv-precomp-is-equiv : + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} (f : A → B) → is-equiv f → + (C : UU l3) → is-equiv (precomp f C) + is-equiv-precomp-is-equiv f is-equiv-f = + is-equiv-precomp-is-equiv-precomp-Π f + ( is-equiv-precomp-Π-is-equiv f is-equiv-f) + + is-equiv-precomp-equiv : + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} (f : A ≃ B) → + (C : UU l3) → is-equiv (precomp (map-equiv f) C) + is-equiv-precomp-equiv f = + is-equiv-precomp-is-equiv (map-equiv f) (is-equiv-map-equiv f) + +equiv-precomp : + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} (e : A ≃ B) (C : UU l3) → + (B → C) ≃ (A → C) +pr1 (equiv-precomp e C) = precomp (map-equiv e) C +pr2 (equiv-precomp e C) = + is-equiv-precomp-is-equiv (map-equiv e) (is-equiv-map-equiv e) C +``` + +#### If precomposing by `f` is an equivalence, then `f` is an equivalence + +First, we prove this relative to a subuniverse, such that `f` is a map between +two types in that subuniverse. + +```agda +module _ + { l1 l2 : Level} + ( α : Level → Level) (P : (l : Level) → UU l → UU (α l)) + ( A : Σ (UU l1) (P l1)) (B : Σ (UU l2) (P l2)) (f : pr1 A → pr1 B) + ( H : (l : Level) (C : Σ (UU l) (P l)) → is-equiv (precomp f (pr1 C))) + where + + map-inv-is-equiv-precomp-subuniverse : pr1 B → pr1 A + map-inv-is-equiv-precomp-subuniverse = + pr1 (center (is-contr-map-is-equiv (H _ A) id)) + + is-section-map-inv-is-equiv-precomp-subuniverse : + ( f ∘ map-inv-is-equiv-precomp-subuniverse) ~ id + is-section-map-inv-is-equiv-precomp-subuniverse = + htpy-eq + ( ap + ( pr1) + ( eq-is-contr' + ( is-contr-map-is-equiv (H _ B) f) + ( ( f ∘ (pr1 (center (is-contr-map-is-equiv (H _ A) id)))) , + ( ap + ( λ (g : pr1 A → pr1 A) → f ∘ g) + ( pr2 (center (is-contr-map-is-equiv (H _ A) id))))) + ( id , refl))) + + is-retraction-map-inv-is-equiv-precomp-subuniverse : + ( map-inv-is-equiv-precomp-subuniverse ∘ f) ~ id + is-retraction-map-inv-is-equiv-precomp-subuniverse = + htpy-eq (pr2 (center (is-contr-map-is-equiv (H _ A) id))) + + abstract + is-equiv-is-equiv-precomp-subuniverse : + is-equiv f + is-equiv-is-equiv-precomp-subuniverse = + is-equiv-is-invertible + ( map-inv-is-equiv-precomp-subuniverse) + ( is-section-map-inv-is-equiv-precomp-subuniverse) + ( is-retraction-map-inv-is-equiv-precomp-subuniverse) +``` + +Now we prove the usual statement, without the subuniverse + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where + + abstract + is-equiv-is-equiv-precomp : + (f : A → B) → ((l : Level) (C : UU l) → is-equiv (precomp f C)) → + is-equiv f + is-equiv-is-equiv-precomp f is-equiv-precomp-f = + is-equiv-is-equiv-precomp-subuniverse + ( λ l → l1 ⊔ l2) + ( λ l X → A → B) + ( A , f) + ( B , f) + ( f) + ( λ l C → is-equiv-precomp-f l (pr1 C)) +``` + +#### Corollaries for particular subuniverses + +```agda +is-equiv-is-equiv-precomp-Prop : + {l1 l2 : Level} (P : Prop l1) (Q : Prop l2) + (f : type-Prop P → type-Prop Q) → + ({l : Level} (R : Prop l) → is-equiv (precomp f (type-Prop R))) → + is-equiv f +is-equiv-is-equiv-precomp-Prop P Q f H = + is-equiv-is-equiv-precomp-subuniverse id (λ l → is-prop) P Q f (λ l → H {l}) + +is-equiv-is-equiv-precomp-Set : + {l1 l2 : Level} (A : Set l1) (B : Set l2) + (f : type-Set A → type-Set B) → + ({l : Level} (C : Set l) → is-equiv (precomp f (type-Set C))) → + is-equiv f +is-equiv-is-equiv-precomp-Set A B f H = + is-equiv-is-equiv-precomp-subuniverse id (λ l → is-set) A B f (λ l → H {l}) + +is-equiv-is-equiv-precomp-Truncated-Type : + {l1 l2 : Level} (k : 𝕋) + (A : Truncated-Type l1 k) (B : Truncated-Type l2 k) + (f : type-Truncated-Type A → type-Truncated-Type B) → + ({l : Level} (C : Truncated-Type l k) → is-equiv (precomp f (pr1 C))) → + is-equiv f +is-equiv-is-equiv-precomp-Truncated-Type k A B f H = + is-equiv-is-equiv-precomp-subuniverse id (λ l → is-trunc k) A B f + ( λ l → H {l}) +``` + ## See also - Functorial properties of dependent function types are recorded in diff --git a/src/foundation-core/injective-maps.lagda.md b/src/foundation-core/injective-maps.lagda.md index 892432a927..12f4928751 100644 --- a/src/foundation-core/injective-maps.lagda.md +++ b/src/foundation-core/injective-maps.lagda.md @@ -127,7 +127,7 @@ module _ is-equiv-is-injective : {f : A → B} → section f → is-injective f → is-equiv f is-equiv-is-injective {f} (pair g G) H = - is-equiv-has-inverse g G (λ x → H (G (f x))) + is-equiv-is-invertible g G (λ x → H (G (f x))) ``` ### Any embedding is injective diff --git a/src/foundation-core/invertible-maps.lagda.md b/src/foundation-core/invertible-maps.lagda.md new file mode 100644 index 0000000000..3392fd1794 --- /dev/null +++ b/src/foundation-core/invertible-maps.lagda.md @@ -0,0 +1,145 @@ +# Invertible maps + +```agda +module foundation-core.invertible-maps where +``` + +
Imports + +```agda +open import foundation.dependent-pair-types +open import foundation.universe-levels + +open import foundation-core.cartesian-product-types +open import foundation-core.function-types +open import foundation-core.homotopies +open import foundation-core.retractions +open import foundation-core.sections +``` + +
+ +## Idea + +An **inverse** for a map `f : A → B` is a map `g : B → A` equipped with +[homotopies](foundation-core.homotopies.md) ` (f ∘ g) ~ id` and `(g ∘ f) ~ id`. +Such data, however is [structure](foundation.structure.md) on the map `f`, and +not generally a [property](foundation-core.propositions.md). + +## Definition + +### The predicate that a map `g` is an inverse of a map `f` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where + + is-inverse : (A → B) → (B → A) → UU (l1 ⊔ l2) + is-inverse f g = ((f ∘ g) ~ id) × ((g ∘ f) ~ id) + + is-section-is-inverse : + {f : A → B} {g : B → A} → is-inverse f g → (f ∘ g) ~ id + is-section-is-inverse = pr1 + + is-retraction-is-inverse : + {f : A → B} {g : B → A} → is-inverse f g → (g ∘ f) ~ id + is-retraction-is-inverse = pr2 +``` + +### The predicate that a map `f` is invertible + +```agda +is-invertible : + {l1 l2 : Level} {A : UU l1} {B : UU l2} → (A → B) → UU (l1 ⊔ l2) +is-invertible {A = A} {B} f = Σ (B → A) (is-inverse f) + +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} (g : is-invertible f) + where + + map-inv-is-invertible : B → A + map-inv-is-invertible = pr1 g + + is-inverse-map-inv-is-invertible : is-inverse f map-inv-is-invertible + is-inverse-map-inv-is-invertible = pr2 g + + is-retraction-is-invertible : (f ∘ map-inv-is-invertible) ~ id + is-retraction-is-invertible = pr1 is-inverse-map-inv-is-invertible + + is-section-is-invertible : (map-inv-is-invertible ∘ f) ~ id + is-section-is-invertible = pr2 is-inverse-map-inv-is-invertible + + section-is-invertible : section f + pr1 section-is-invertible = map-inv-is-invertible + pr2 section-is-invertible = is-retraction-is-invertible + + retraction-is-invertible : retraction f + pr1 retraction-is-invertible = map-inv-is-invertible + pr2 retraction-is-invertible = is-section-is-invertible +``` + +### The type of invertible maps + +```agda +invertible-map : {l1 l2 : Level} (A : UU l1) (B : UU l2) → UU (l1 ⊔ l2) +invertible-map A B = Σ (A → B) (is-invertible) + +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where + + map-invertible-map : invertible-map A B → A → B + map-invertible-map = pr1 + + is-invertible-map-invertible-map : + (f : invertible-map A B) → is-invertible (map-invertible-map f) + is-invertible-map-invertible-map = pr2 + + map-inv-invertible-map : invertible-map A B → B → A + map-inv-invertible-map = + map-inv-is-invertible ∘ is-invertible-map-invertible-map + + is-section-map-invertible-map : + (f : invertible-map A B) → + (map-inv-invertible-map f ∘ map-invertible-map f) ~ id + is-section-map-invertible-map = + is-section-is-invertible ∘ is-invertible-map-invertible-map + + is-retraction-map-invertible-map : + (f : invertible-map A B) → + (map-invertible-map f ∘ map-inv-invertible-map f) ~ id + is-retraction-map-invertible-map = + is-retraction-is-invertible ∘ is-invertible-map-invertible-map +``` + +## Properties + +### The invertible inverse of an invertible map + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} + where + + inv-is-inverse : {g : B → A} → is-inverse f g → is-inverse g f + pr1 (inv-is-inverse {g} H) = is-section-is-invertible (g , H) + pr2 (inv-is-inverse {g} H) = is-retraction-is-invertible (g , H) + + inv-is-invertible : + (g : is-invertible f) → is-invertible (map-inv-is-invertible g) + pr1 (inv-is-invertible g) = f + pr2 (inv-is-invertible g) = + inv-is-inverse (is-inverse-map-inv-is-invertible g) +``` + +## See also + +- For the coherent notion of invertible maps see + [`foundation.coherently-invertible-maps`](foundation.coherently-invertible-maps.md). +- For the notion of biinvertible maps see + [`foundation.equivalences`](foundation.equivalences.md). +- For the notion of maps with contractible fibers see + [`foundation.contractible-maps`](foundation.contractible-maps.md). +- For the notion of path-split maps see + [`foundation.path-split-maps`](foundation.path-split-maps.md). diff --git a/src/foundation-core/propositions.lagda.md b/src/foundation-core/propositions.lagda.md index 45a5b25af2..0e54842642 100644 --- a/src/foundation-core/propositions.lagda.md +++ b/src/foundation-core/propositions.lagda.md @@ -133,7 +133,7 @@ module _ is-equiv-is-prop : is-prop A → is-prop B → {f : A → B} → (B → A) → is-equiv f is-equiv-is-prop is-prop-A is-prop-B {f} g = - is-equiv-has-inverse + is-equiv-is-invertible ( g) ( λ y → eq-is-prop is-prop-B) ( λ x → eq-is-prop is-prop-A) @@ -252,7 +252,7 @@ abstract is-prop-equiv ( pair ( λ f x → f {x}) - ( is-equiv-has-inverse + ( is-equiv-is-invertible ( λ g {x} → g x) ( refl-htpy) ( refl-htpy))) diff --git a/src/foundation-core/pullbacks.lagda.md b/src/foundation-core/pullbacks.lagda.md index bbb708746b..56822e160a 100644 --- a/src/foundation-core/pullbacks.lagda.md +++ b/src/foundation-core/pullbacks.lagda.md @@ -91,9 +91,9 @@ module _ ### The `is-pullback` property -The proposition is-pullback is the assertion that the gap map is an equivalence. -Note that this proposition is small, whereas the universal property is a large -proposition. +The proposition `is-pullback` is the assertion that the gap map is an +equivalence. Note that this proposition is small, whereas the universal property +is a large proposition. ```agda module _ @@ -120,6 +120,14 @@ module _ pr1 (pr2 (map-canonical-pullback (hA , hB , _) (a' , b' , _))) = hB b' pr2 (pr2 (map-canonical-pullback (hA , hB , hX , HA , HB) (a' , b' , p'))) = (HA a') ∙ ((ap hX p') ∙ (inv (HB b'))) + + map-is-pullback : + {l4 l4' : Level} {C : UU l4} {C' : UU l4'} → + (c : cone f g C) (c' : cone f' g' C') → + is-pullback f g c → is-pullback f' g' c' → + hom-cospan f' g' f g → C' → C + map-is-pullback c c' is-pb-c is-pb-c' h x = + map-inv-is-equiv is-pb-c (map-canonical-pullback h (gap f' g' c' x)) ``` ## Properties @@ -284,7 +292,7 @@ module _ is-pullback-cone-canonical-pullback-Σ : is-pullback f (pr1 {B = Q}) cone-canonical-pullback-Σ is-pullback-cone-canonical-pullback-Σ = - is-equiv-has-inverse + is-equiv-is-invertible inv-gap-cone-canonical-pullback-Σ is-section-inv-gap-cone-canonical-pullback-Σ is-retraction-inv-gap-cone-canonical-pullback-Σ @@ -318,7 +326,7 @@ abstract {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3} (f : A → X) (g : B → X) → is-equiv (map-commutative-canonical-pullback f g) is-equiv-map-commutative-canonical-pullback f g = - is-equiv-has-inverse + is-equiv-is-invertible ( map-commutative-canonical-pullback g f) ( inv-inv-map-commutative-canonical-pullback f g) ( inv-inv-map-commutative-canonical-pullback g f) @@ -454,7 +462,7 @@ abstract {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3} (f : A → X) (g : B → X) → is-equiv (map-fold-cone f g) is-equiv-map-fold-cone f g = - is-equiv-has-inverse + is-equiv-is-invertible ( inv-map-fold-cone f g) ( is-section-inv-map-fold-cone f g) ( is-retraction-inv-map-fold-cone f g) diff --git a/src/foundation-core/small-types.lagda.md b/src/foundation-core/small-types.lagda.md index 0c01b6c305..ec2e2c8072 100644 --- a/src/foundation-core/small-types.lagda.md +++ b/src/foundation-core/small-types.lagda.md @@ -11,7 +11,7 @@ open import foundation.dependent-pair-types open import foundation.equivalences open import foundation.functoriality-coproduct-types open import foundation.functoriality-dependent-function-types -open import foundation.identity-types +open import foundation.logical-equivalences open import foundation.mere-equivalences open import foundation.propositional-truncations open import foundation.raising-universe-levels @@ -25,7 +25,7 @@ open import foundation-core.cartesian-product-types open import foundation-core.contractible-types open import foundation-core.coproduct-types open import foundation-core.functoriality-dependent-pair-types -open import foundation-core.logical-equivalences +open import foundation-core.identity-types open import foundation-core.propositions ``` diff --git a/src/foundation-core/subtypes.lagda.md b/src/foundation-core/subtypes.lagda.md index 7ced2657c8..5ee7b28e79 100644 --- a/src/foundation-core/subtypes.lagda.md +++ b/src/foundation-core/subtypes.lagda.md @@ -9,6 +9,7 @@ module foundation-core.subtypes where ```agda open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types +open import foundation.logical-equivalences open import foundation.subtype-identity-principle open import foundation.universe-levels @@ -18,7 +19,6 @@ open import foundation-core.fibers-of-maps open import foundation-core.function-types open import foundation-core.functoriality-dependent-pair-types open import foundation-core.identity-types -open import foundation-core.logical-equivalences open import foundation-core.propositional-maps open import foundation-core.propositions open import foundation-core.sets diff --git a/src/foundation-core/truncated-types.lagda.md b/src/foundation-core/truncated-types.lagda.md index 77b40c7c75..083ca3b4b2 100644 --- a/src/foundation-core/truncated-types.lagda.md +++ b/src/foundation-core/truncated-types.lagda.md @@ -204,12 +204,12 @@ pr2 (Σ-Truncated-Type A B) = ( is-trunc-type-Truncated-Type A) ( λ a → is-trunc-type-Truncated-Type (B a)) -fib-Truncated-Type : +fiber-Truncated-Type : {l1 l2 : Level} {k : 𝕋} (A : Truncated-Type l1 k) (B : Truncated-Type l2 k) (f : type-Truncated-Type A → type-Truncated-Type B) → type-Truncated-Type B → Truncated-Type (l1 ⊔ l2) k -fib-Truncated-Type A B f b = +fiber-Truncated-Type A B f b = Σ-Truncated-Type A (λ a → Id-Truncated-Type' B (f a) b) ``` diff --git a/src/foundation-core/universal-property-truncation.lagda.md b/src/foundation-core/universal-property-truncation.lagda.md index a72e204770..a9268c4ebe 100644 --- a/src/foundation-core/universal-property-truncation.lagda.md +++ b/src/foundation-core/universal-property-truncation.lagda.md @@ -8,15 +8,16 @@ module foundation-core.universal-property-truncation where ```agda open import foundation.dependent-pair-types -open import foundation.equivalences open import foundation.function-extensionality open import foundation.type-theoretic-principle-of-choice open import foundation.universe-levels open import foundation-core.contractible-maps open import foundation-core.contractible-types +open import foundation-core.equivalences open import foundation-core.function-types open import foundation-core.functoriality-dependent-pair-types +open import foundation-core.functoriality-function-types open import foundation-core.homotopies open import foundation-core.identity-types open import foundation-core.sections @@ -203,6 +204,6 @@ module _ map-distributive-Π-Σ ( map-inv-is-equiv ( dependent-universal-property-truncation-is-truncation H - ( fib-Truncated-Type C B g)) + ( fiber-Truncated-Type C B g)) ( λ a → h a , inv (K a))) ``` diff --git a/src/foundation/0-images-of-maps.lagda.md b/src/foundation/0-images-of-maps.lagda.md index 7bc34f1213..3ba7cb1bd1 100644 --- a/src/foundation/0-images-of-maps.lagda.md +++ b/src/foundation/0-images-of-maps.lagda.md @@ -18,7 +18,7 @@ open import foundation-core.truncation-levels ## Idea The 0-image of a map `f : A → B` is the type -`0-im f := Σ (b : B), type-trunc-Set (fib f b)`. The map `A → 0-im f` is +`0-im f := Σ (b : B), type-trunc-Set (fiber f b)`. The map `A → 0-im f` is 0-connected and the map `0-im f → B` is `0`-truncated. ## Definition diff --git a/src/foundation/action-on-equivalences-type-families.lagda.md b/src/foundation/action-on-equivalences-type-families.lagda.md new file mode 100644 index 0000000000..7153285ad8 --- /dev/null +++ b/src/foundation/action-on-equivalences-type-families.lagda.md @@ -0,0 +1,169 @@ +# Action on equivalences of type families + +```agda +module foundation.action-on-equivalences-type-families where +``` + +
Imports + +```agda +open import foundation.action-on-identifications-functions +open import foundation.commuting-squares-of-maps +open import foundation.dependent-pair-types +open import foundation.equivalence-induction +open import foundation.fibers-of-maps +open import foundation.function-extensionality +open import foundation.identity-types +open import foundation.sets +open import foundation.subuniverses +open import foundation.transport +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.equivalences +open import foundation-core.injective-maps +open import foundation-core.propositions +open import foundation-core.subtypes +``` + +
+ +## Ideas + +Given a [subuniverse](foundation.subuniverses.md) `P`, any family of types `B` +indexed by types of `P` has an **action on equivalences** + +```text + (A ≃ B) → P A ≃ P B +``` + +obtained by [equivalence induction](foundation.equivalence-induction.md). The +acion on equivalences of a type family `B` on a subuniverse `P` of `𝒰` is such +that `B id-equiv = id-equiv`, and fits in a +[commuting square](foundation.commuting-squares-of-maps.md) + +```text + ap B + (X = Y) --------> (B X = B Y) + | | + equiv-eq | | equiv-eq + V V + (X ≃ Y) ---------> (B X ≃ B Y). + B +``` + +## Definitions + +### The action on equivalences of a family of types over a subuniverse + +```agda +module _ + { l1 l2 l3 : Level} + ( P : subuniverse l1 l2) (B : type-subuniverse P → UU l3) + where + + unique-action-on-equivalences-family-of-types-subuniverse : + (X : type-subuniverse P) → + is-contr (fiber (ev-id-equiv-subuniverse P X {λ Y e → B X ≃ B Y}) id-equiv) + unique-action-on-equivalences-family-of-types-subuniverse X = + is-contr-map-ev-id-equiv-subuniverse P X (λ Y e → B X ≃ B Y) id-equiv + + action-on-equivalences-family-of-types-subuniverse : + (X Y : type-subuniverse P) → pr1 X ≃ pr1 Y → B X ≃ B Y + action-on-equivalences-family-of-types-subuniverse X = + pr1 (center (unique-action-on-equivalences-family-of-types-subuniverse X)) + + compute-id-equiv-action-on-equivalences-family-of-types-subuniverse : + (X : type-subuniverse P) → + action-on-equivalences-family-of-types-subuniverse X X id-equiv = id-equiv + compute-id-equiv-action-on-equivalences-family-of-types-subuniverse X = + pr2 (center (unique-action-on-equivalences-family-of-types-subuniverse X)) +``` + +### The action on equivalences of a family of types over a universe + +```agda +module _ + {l1 l2 : Level} (B : UU l1 → UU l2) + where + + unique-action-on-equivalences-family-of-types-universe : + {X : UU l1} → + is-contr (fiber (ev-id-equiv (λ Y e → B X ≃ B Y)) id-equiv) + unique-action-on-equivalences-family-of-types-universe = + is-contr-map-ev-id-equiv (λ Y e → B _ ≃ B Y) id-equiv + + action-on-equivalences-family-of-types-universe : + {X Y : UU l1} → (X ≃ Y) → B X ≃ B Y + action-on-equivalences-family-of-types-universe {X} {Y} = + pr1 (center (unique-action-on-equivalences-family-of-types-universe {X})) Y + + compute-id-equiv-action-on-equivalences-family-of-types-universe : + {X : UU l1} → + action-on-equivalences-family-of-types-universe {X} {X} id-equiv = id-equiv + compute-id-equiv-action-on-equivalences-family-of-types-universe {X} = + pr2 (center (unique-action-on-equivalences-family-of-types-universe {X})) +``` + +## Properties + +### The action on equivalences of a family of types over a subuniverse fits in a commuting square with `equiv-eq` + +We claim that the square + +```text + ap B + (X = Y) --------> (B X = B Y) + | | + equiv-eq | | equiv-eq + V V + (X ≃ Y) ---------> (B X ≃ B Y). + B +``` + +commutes for any two types `X Y : type-subuniverse P` and any family of types +`B` over the subuniverse `P`. + +```agda +coherence-square-action-on-equivalences-family-of-types-subuniverse : + {l1 l2 l3 : Level} (P : subuniverse l1 l2) (B : type-subuniverse P → UU l3) → + (X Y : type-subuniverse P) → + coherence-square-maps + ( ap B {X} {Y}) + ( equiv-eq-subuniverse P X Y) + ( equiv-eq) + ( action-on-equivalences-family-of-types-subuniverse P B X Y) +coherence-square-action-on-equivalences-family-of-types-subuniverse + P B X .X refl = + compute-id-equiv-action-on-equivalences-family-of-types-subuniverse P B X +``` + +### The action on equivalences of a family of types over a universe fits in a commuting square with `equiv-eq` + +We claim that the square + +```text + ap B + (X = Y) --------> (B X = B Y) + | | + equiv-eq | | equiv-eq + V V + (X ≃ Y) ---------> (B X ≃ B Y). + B +``` + +commutes for any two types `X Y : 𝒰` and any type family `B` over `𝒰`. + +```agda +coherence-square-action-on-equivalences-family-of-types-universe : + {l1 l2 : Level} (B : UU l1 → UU l2) (X Y : UU l1) → + coherence-square-maps + ( ap B {X} {Y}) + ( equiv-eq) + ( equiv-eq) + ( action-on-equivalences-family-of-types-universe B) +coherence-square-action-on-equivalences-family-of-types-universe B X .X refl = + compute-id-equiv-action-on-equivalences-family-of-types-universe B +``` diff --git a/src/foundation/arithmetic-law-coproduct-and-sigma-decompositions.lagda.md b/src/foundation/arithmetic-law-coproduct-and-sigma-decompositions.lagda.md index 8e76432c07..5c05ab8072 100644 --- a/src/foundation/arithmetic-law-coproduct-and-sigma-decompositions.lagda.md +++ b/src/foundation/arithmetic-law-coproduct-and-sigma-decompositions.lagda.md @@ -66,7 +66,7 @@ module _ ( λ U → Σ (pr1 U → UU l) (λ Y → X ≃ Σ (pr1 U) Y)))) pr1 reassociate ((U , V , f) , A , B , e) = (A , B , (U , e) , V , f) pr2 reassociate = - is-equiv-has-inverse + is-equiv-is-invertible ( λ (A , B , (U , e) , V , f) → ((U , V , f) , A , B , e)) ( refl-htpy) ( refl-htpy) @@ -91,7 +91,7 @@ module _ pr1 reassociate' (A , B , (YA , YB) , (A' , eA) , (B' , eB) , e) = (A' , B' , e) , ((A , YA , eA) , B , YB , eB) pr2 reassociate' = - is-equiv-has-inverse + is-equiv-is-invertible ( λ ((A' , B' , e) , ((A , YA , eA) , B , YB , eB)) → (A , B , (YA , YB) , (A' , eA) , (B' , eB) , e)) ( refl-htpy) diff --git a/src/foundation/arithmetic-law-product-and-pi-decompositions.lagda.md b/src/foundation/arithmetic-law-product-and-pi-decompositions.lagda.md index 5a34d34c97..021e304199 100644 --- a/src/foundation/arithmetic-law-product-and-pi-decompositions.lagda.md +++ b/src/foundation/arithmetic-law-product-and-pi-decompositions.lagda.md @@ -66,7 +66,7 @@ module _ ( λ U → Σ (pr1 U → UU l) (λ Y → X ≃ Π (pr1 U) Y)))) pr1 reassociate ((U , V , f) , A , B , e) = (A , B , (U , e) , V , f) pr2 reassociate = - is-equiv-has-inverse + is-equiv-is-invertible ( λ (A , B , (U , e) , V , f) → ((U , V , f) , A , B , e)) ( refl-htpy) ( refl-htpy) @@ -91,7 +91,7 @@ module _ pr1 reassociate' (A , B , (YA , YB) , (A' , eA) , (B' , eB) , e) = (A' , B' , e) , ((A , YA , eA) , B , YB , eB) pr2 reassociate' = - is-equiv-has-inverse + is-equiv-is-invertible ( λ ((A' , B' , e) , ((A , YA , eA) , B , YB , eB)) → (A , B , (YA , YB) , (A' , eA) , (B' , eB) , e)) ( refl-htpy) diff --git a/src/foundation/binary-functoriality-set-quotients.lagda.md b/src/foundation/binary-functoriality-set-quotients.lagda.md index 6b69449656..697dca54ae 100644 --- a/src/foundation/binary-functoriality-set-quotients.lagda.md +++ b/src/foundation/binary-functoriality-set-quotients.lagda.md @@ -278,7 +278,7 @@ module _ is-equiv-hom-binary-hom-Equivalence-Relation : is-equiv hom-binary-hom-Equivalence-Relation is-equiv-hom-binary-hom-Equivalence-Relation = - is-equiv-has-inverse + is-equiv-is-invertible binary-hom-hom-Equivalence-Relation is-section-binary-hom-hom-Equivalence-Relation is-retraction-binary-hom-hom-Equivalence-Relation @@ -373,7 +373,7 @@ module _ S T)))) ∘e ( equiv-tot ( λ h → - equiv-map-Π + equiv-Π-equiv-family ( λ x → ( inv-equiv equiv-funext) ∘e ( inv-equiv @@ -396,7 +396,7 @@ module _ ( h ( map-reflecting-map-Equivalence-Relation R qR x) ( u)))) ∘e - ( equiv-map-Π + ( equiv-Π-equiv-family ( λ y → ( equiv-inv _ _) ∘e ( equiv-concat' diff --git a/src/foundation/binary-relations.lagda.md b/src/foundation/binary-relations.lagda.md index 961d012bda..6e73fbb572 100644 --- a/src/foundation/binary-relations.lagda.md +++ b/src/foundation/binary-relations.lagda.md @@ -124,6 +124,17 @@ module _ is-antisymmetric-Relation-Prop = is-antisymmetric (type-Relation-Prop R) ``` +### Morphisms of binary relations + +```agda +module _ + {l1 l2 l3 : Level} {A : UU l1} + where + + hom-Relation : Relation l2 A → Relation l3 A → UU (l1 ⊔ l2 ⊔ l3) + hom-Relation R S = (x y : A) → R x y → S x y +``` + ## Properties ### Characterization of equality of binary relations diff --git a/src/foundation/booleans.lagda.md b/src/foundation/booleans.lagda.md index 8408bd4c4b..642450a817 100644 --- a/src/foundation/booleans.lagda.md +++ b/src/foundation/booleans.lagda.md @@ -163,7 +163,7 @@ abstract equiv-bool-Fin-two-ℕ : Fin 2 ≃ bool pr1 equiv-bool-Fin-two-ℕ = bool-Fin-two-ℕ pr2 equiv-bool-Fin-two-ℕ = - is-equiv-has-inverse + is-equiv-is-invertible ( Fin-two-ℕ-bool) ( is-section-Fin-two-ℕ-bool) ( is-retraction-Fin-two-ℕ-bool) diff --git a/src/foundation/choice-of-representatives-equivalence-relation.lagda.md b/src/foundation/choice-of-representatives-equivalence-relation.lagda.md index 9c6a2394cb..b964dbdb76 100644 --- a/src/foundation/choice-of-representatives-equivalence-relation.lagda.md +++ b/src/foundation/choice-of-representatives-equivalence-relation.lagda.md @@ -11,6 +11,7 @@ open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.equivalence-classes open import foundation.fundamental-theorem-of-identity-types +open import foundation.logical-equivalences open import foundation.propositional-truncations open import foundation.surjective-maps open import foundation.type-arithmetic-dependent-pair-types @@ -24,7 +25,6 @@ open import foundation-core.equivalences open import foundation-core.fibers-of-maps open import foundation-core.functoriality-dependent-pair-types open import foundation-core.identity-types -open import foundation-core.logical-equivalences ``` diff --git a/src/foundation/coherently-invertible-maps.lagda.md b/src/foundation/coherently-invertible-maps.lagda.md index e85d222a31..dcc41935c1 100644 --- a/src/foundation/coherently-invertible-maps.lagda.md +++ b/src/foundation/coherently-invertible-maps.lagda.md @@ -38,41 +38,49 @@ abstract is-prop-is-coherently-invertible : {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → is-prop (is-coherently-invertible f) - is-prop-is-coherently-invertible {l1} {l2} {A} {B} f = + is-prop-is-coherently-invertible {A = A} {B} f = is-prop-is-proof-irrelevant ( λ H → is-contr-equiv' - ( Σ (section f) - ( λ sf → Σ (((pr1 sf) ∘ f) ~ id) - ( λ H → (htpy-right-whisk (pr2 sf) f) ~ (htpy-left-whisk f H)))) - ( associative-Σ (B → A) - ( λ g → ((f ∘ g) ~ id)) - ( λ sf → Σ (((pr1 sf) ∘ f) ~ id) - ( λ H → (htpy-right-whisk (pr2 sf) f) ~ (htpy-left-whisk f H)))) + ( Σ ( section f) + ( λ s → + Σ ( ( map-section f s ∘ f) ~ id) + ( λ H → + ( htpy-right-whisk (is-section-map-section f s) f) ~ + ( htpy-left-whisk f H)))) + ( associative-Σ + ( B → A) + ( λ g → (f ∘ g) ~ id) + ( λ s → + Σ ( ( map-section f s ∘ f) ~ id) + ( λ H → + ( htpy-right-whisk (is-section-map-section f s) f) ~ + ( htpy-left-whisk f H)))) ( is-contr-Σ - ( is-contr-section-is-equiv (E H)) - ( pair (g H) (G H)) + ( is-contr-section-is-equiv (is-equiv-is-coherently-invertible H)) + ( section-is-coherently-invertible H) ( is-contr-equiv' ( (x : A) → - Σ ( Id (g H (f x)) x) - ( λ p → Id (G H (f x)) (ap f p))) + Σ ( map-inv-is-coherently-invertible H (f x) = x) + ( λ p → + is-retraction-is-coherently-invertible H (f x) = ap f p)) ( distributive-Π-Σ) ( is-contr-Π ( λ x → is-contr-equiv' - ( fiber (ap f) (G H (f x))) + ( fiber + ( ap f) + ( is-retraction-is-coherently-invertible H (f x))) ( equiv-tot - ( λ p → equiv-inv (ap f p) (G H (f x)))) + ( λ p → + equiv-inv + ( ap f p) + ( is-retraction-is-coherently-invertible H (f x)))) ( is-contr-map-is-equiv - ( is-emb-is-equiv (E H) (g H (f x)) x) - ( (G H) (f x)))))))) - where - E : is-coherently-invertible f → is-equiv f - E H = is-equiv-is-coherently-invertible H - g : is-coherently-invertible f → (B → A) - g H = pr1 H - G : (H : is-coherently-invertible f) → (f ∘ g H) ~ id - G H = pr1 (pr2 H) + ( is-emb-is-equiv + ( is-equiv-is-coherently-invertible H) + ( map-inv-is-coherently-invertible H (f x)) x) + ( is-retraction-is-coherently-invertible H (f x)))))))) abstract is-equiv-is-coherently-invertible-is-equiv : @@ -85,49 +93,6 @@ abstract ( is-equiv-is-coherently-invertible) ``` -### The type `has-inverse id` is equivalent to `id ~ id` - -```agda -is-invertible-id-htpy-id-id : - {l : Level} (A : UU l) → - (id {A = A} ~ id {A = A}) → has-inverse (id {A = A}) -pr1 (is-invertible-id-htpy-id-id A H) = id -pr1 (pr2 (is-invertible-id-htpy-id-id A H)) = refl-htpy -pr2 (pr2 (is-invertible-id-htpy-id-id A H)) = H - -triangle-is-invertible-id-htpy-id-id : - {l : Level} (A : UU l) → - ( is-invertible-id-htpy-id-id A) ~ - ( ( map-associative-Σ - ( A → A) - ( λ g → (id ∘ g) ~ id) - ( λ s → (pr1 s ∘ id) ~ id)) ∘ - ( map-inv-left-unit-law-Σ-is-contr - { B = λ s → (pr1 s ∘ id) ~ id} - ( is-contr-section-is-equiv (is-equiv-id {_} {A})) - ( pair id refl-htpy))) -triangle-is-invertible-id-htpy-id-id A H = refl - -abstract - is-equiv-invertible-id-htpy-id-id : - {l : Level} (A : UU l) → is-equiv (is-invertible-id-htpy-id-id A) - is-equiv-invertible-id-htpy-id-id A = - is-equiv-comp-htpy - ( is-invertible-id-htpy-id-id A) - ( map-associative-Σ - ( A → A) - ( λ g → (id ∘ g) ~ id) - ( λ s → (pr1 s ∘ id) ~ id)) - ( map-inv-left-unit-law-Σ-is-contr - ( is-contr-section-is-equiv is-equiv-id) - ( pair id refl-htpy)) - ( triangle-is-invertible-id-htpy-id-id A) - ( is-equiv-map-inv-left-unit-law-Σ-is-contr - ( is-contr-section-is-equiv is-equiv-id) - ( pair id refl-htpy)) - ( is-equiv-map-associative-Σ _ _ _) -``` - ## See also - For the notion of biinvertible maps see diff --git a/src/foundation/commuting-3-simplices-of-homotopies.lagda.md b/src/foundation/commuting-3-simplices-of-homotopies.lagda.md index 0d554d24b2..ac93597b73 100644 --- a/src/foundation/commuting-3-simplices-of-homotopies.lagda.md +++ b/src/foundation/commuting-3-simplices-of-homotopies.lagda.md @@ -17,7 +17,7 @@ open import foundation-core.homotopies ## Idea -A commuting 3-simplex of homotopies is a commuting diagram of the form +A **commuting 3-simplex of homotopies** is a commuting diagram of the form ```text f ----------> g @@ -29,7 +29,7 @@ A commuting 3-simplex of homotopies is a commuting diagram of the form h ----------> i. ``` -where f, g, h, and i are functions. +where `f`, `g`, `h`, and `i` are functions. ## Definition diff --git a/src/foundation/commuting-squares-of-maps.lagda.md b/src/foundation/commuting-squares-of-maps.lagda.md index 0becaa1653..783bc9bb64 100644 --- a/src/foundation/commuting-squares-of-maps.lagda.md +++ b/src/foundation/commuting-squares-of-maps.lagda.md @@ -11,10 +11,10 @@ open import foundation-core.commuting-squares-of-maps public ```agda open import foundation.action-on-identifications-functions open import foundation.equivalences -open import foundation.functoriality-function-types open import foundation.universe-levels open import foundation-core.function-types +open import foundation-core.functoriality-function-types open import foundation-core.identity-types ``` diff --git a/src/foundation/commuting-triangles-of-maps.lagda.md b/src/foundation/commuting-triangles-of-maps.lagda.md index b1f54b0fe3..9ddf15431b 100644 --- a/src/foundation/commuting-triangles-of-maps.lagda.md +++ b/src/foundation/commuting-triangles-of-maps.lagda.md @@ -11,10 +11,12 @@ open import foundation-core.commuting-triangles-of-maps public ```agda open import foundation.action-on-identifications-functions open import foundation.functoriality-dependent-function-types +open import foundation.homotopies open import foundation.identity-types open import foundation.universe-levels open import foundation-core.equivalences +open import foundation-core.function-types ``` @@ -50,13 +52,22 @@ module _ equiv-coherence-triangle-maps-inv-top : coherence-triangle-maps left right (map-equiv e) ≃ - coherence-triangle-maps' right left (map-inv-equiv e) + coherence-triangle-maps right left (map-inv-equiv e) equiv-coherence-triangle-maps-inv-top = - equiv-Π + ( equiv-inv-htpy + ( left ∘ (map-inv-equiv e)) + ( right)) ∘e + ( equiv-Π ( λ b → left (map-inv-equiv e b) = right b) ( e) ( λ a → equiv-concat ( ap left (is-retraction-map-inv-equiv e a)) - ( right (map-equiv e a))) + ( right (map-equiv e a)))) + + coherence-triangle-maps-inv-top : + coherence-triangle-maps left right (map-equiv e) → + coherence-triangle-maps right left (map-inv-equiv e) + coherence-triangle-maps-inv-top = + map-equiv equiv-coherence-triangle-maps-inv-top ``` diff --git a/src/foundation/conjunction.lagda.md b/src/foundation/conjunction.lagda.md index d2ef76cdb4..6ca1acc58d 100644 --- a/src/foundation/conjunction.lagda.md +++ b/src/foundation/conjunction.lagda.md @@ -9,12 +9,12 @@ module foundation.conjunction where ```agda open import foundation.decidable-types open import foundation.dependent-pair-types +open import foundation.logical-equivalences open import foundation.universe-levels open import foundation-core.cartesian-product-types open import foundation-core.decidable-propositions open import foundation-core.equivalences -open import foundation-core.logical-equivalences open import foundation-core.propositions ``` diff --git a/src/foundation/contractible-maps.lagda.md b/src/foundation/contractible-maps.lagda.md index 18f0b23fb7..e1f2e8c459 100644 --- a/src/foundation/contractible-maps.lagda.md +++ b/src/foundation/contractible-maps.lagda.md @@ -11,10 +11,10 @@ open import foundation-core.contractible-maps public ```agda open import foundation.dependent-pair-types open import foundation.equivalences +open import foundation.logical-equivalences open import foundation.truncated-maps open import foundation.universe-levels -open import foundation-core.logical-equivalences open import foundation-core.propositions open import foundation-core.truncation-levels ``` diff --git a/src/foundation/contractible-types.lagda.md b/src/foundation/contractible-types.lagda.md index 26e506ead8..211b99fc95 100644 --- a/src/foundation/contractible-types.lagda.md +++ b/src/foundation/contractible-types.lagda.md @@ -226,7 +226,7 @@ module _ (a : A) → is-contr A → {l : Level} → dependent-universal-property-contr l a dependent-universal-property-contr-is-contr a H {l} P = - is-equiv-has-inverse + is-equiv-is-invertible ( ind-singleton-is-contr a H P) ( compute-ind-singleton-is-contr a H P) ( λ f → @@ -288,7 +288,7 @@ module _ is-contr A → {l : Level} (X : UU l) → is-equiv (λ x → const A X x) is-equiv-diagonal-is-contr H X = - is-equiv-has-inverse + is-equiv-is-invertible ( ev-point' (center H)) ( λ f → eq-htpy (λ x → ap f (contraction H x))) ( λ x → refl) diff --git a/src/foundation/coproduct-decompositions-subuniverse.lagda.md b/src/foundation/coproduct-decompositions-subuniverse.lagda.md index 02f9433697..16e7edb589 100644 --- a/src/foundation/coproduct-decompositions-subuniverse.lagda.md +++ b/src/foundation/coproduct-decompositions-subuniverse.lagda.md @@ -376,7 +376,7 @@ module _ pr1 equiv-reassociate-left-iterated-coproduct-Decomposition-subuniverse = map-reassociate-left-iterated-coproduct-Decomposition-subuniverse pr2 equiv-reassociate-left-iterated-coproduct-Decomposition-subuniverse = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-reassociate-left-iterated-coproduct-Decomposition-subuniverse refl-htpy refl-htpy @@ -452,7 +452,7 @@ module _ pr1 equiv-reassociate-right-iterated-coproduct-Decomposition-subuniverse = map-reassociate-right-iterated-coproduct-Decomposition-subuniverse pr2 equiv-reassociate-right-iterated-coproduct-Decomposition-subuniverse = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-reassociate-right-iterated-coproduct-Decomposition-subuniverse refl-htpy refl-htpy diff --git a/src/foundation/coproduct-decompositions.lagda.md b/src/foundation/coproduct-decompositions.lagda.md index 23d357a41d..e836a86eb1 100644 --- a/src/foundation/coproduct-decompositions.lagda.md +++ b/src/foundation/coproduct-decompositions.lagda.md @@ -85,7 +85,7 @@ pr1 (equiv-coproduct-Decomposition-full-subuniverse X) d = ( right-summand-binary-coproduct-Decomposition d , star) , ( matching-correspondence-binary-coproduct-Decomposition d) pr2 (equiv-coproduct-Decomposition-full-subuniverse X) = - is-equiv-has-inverse + is-equiv-is-invertible ( λ d → type-left-summand-binary-coproduct-Decomposition-subuniverse ( λ _ → unit-Prop) @@ -868,7 +868,7 @@ module _ is-equiv-map-equiv-binary-coproduct-Decomposition-map-into-Fin-Two-ℕ : is-equiv map-equiv-binary-coproduct-Decomposition-map-into-Fin-Two-ℕ is-equiv-map-equiv-binary-coproduct-Decomposition-map-into-Fin-Two-ℕ = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-equiv-binary-coproduct-Decomposition-map-into-Fin-Two-ℕ ( is-section-map-inv-equiv-binary-coproduct-Decomposition-map-into-Fin-Two-ℕ) ( is-retraction-map-inv-equiv-binary-coproduct-Decomposition-map-into-Fin-Two-ℕ) diff --git a/src/foundation/coproduct-types.lagda.md b/src/foundation/coproduct-types.lagda.md index 115b3231a7..3ff69e17ba 100644 --- a/src/foundation/coproduct-types.lagda.md +++ b/src/foundation/coproduct-types.lagda.md @@ -128,7 +128,7 @@ module _ equiv-left-summand : (Σ (X + Y) is-left) ≃ X pr1 equiv-left-summand = map-equiv-left-summand pr2 equiv-left-summand = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-equiv-left-summand is-section-map-inv-equiv-left-summand is-retraction-map-inv-equiv-left-summand @@ -160,7 +160,7 @@ module _ equiv-right-summand : (Σ (X + Y) is-right) ≃ Y pr1 equiv-right-summand = map-equiv-right-summand pr2 equiv-right-summand = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-equiv-right-summand is-section-map-inv-equiv-right-summand is-retraction-map-inv-equiv-right-summand diff --git a/src/foundation/coslice.lagda.md b/src/foundation/coslice.lagda.md index bc9452e0e2..d0c36dd590 100644 --- a/src/foundation/coslice.lagda.md +++ b/src/foundation/coslice.lagda.md @@ -7,6 +7,7 @@ module foundation.coslice where
Imports ```agda +open import foundation.commuting-triangles-of-homotopies open import foundation.dependent-pair-types open import foundation.function-extensionality open import foundation.structure-identity-principle @@ -74,16 +75,24 @@ module _ {l1 l2 l3 : Level} {X : UU l1} {A : UU l2} {B : UU l3} {f : X → A} {g : X → B} where + coherence-htpy-hom-coslice : + (h k : hom-coslice f g) → + map-hom-coslice h ~ map-hom-coslice k → UU (l1 ⊔ l3) + coherence-htpy-hom-coslice h k H = + coherence-triangle-homotopies + ( triangle-hom-coslice h) + ( triangle-hom-coslice k) + ( H ·r f) + htpy-hom-coslice : (h k : hom-coslice f g) → UU (l1 ⊔ l2 ⊔ l3) htpy-hom-coslice h k = Σ ( map-hom-coslice h ~ map-hom-coslice k) - ( λ H → - (triangle-hom-coslice h) ~ ((H ·r f) ∙h (triangle-hom-coslice k))) + ( coherence-htpy-hom-coslice h k) extensionality-hom-coslice : (h k : hom-coslice f g) → (h = k) ≃ htpy-hom-coslice h k - extensionality-hom-coslice (pair h H) = + extensionality-hom-coslice (h , H) = extensionality-Σ ( λ {h' : A → B} (H' : (h' ∘ f) ~ g) (K : h ~ h') → H ~ ((K ·r f) ∙h H')) ( refl-htpy) @@ -92,9 +101,10 @@ module _ ( λ H' → equiv-funext) eq-htpy-hom-coslice : - (h k : hom-coslice f g) (H : map-hom-coslice h ~ map-hom-coslice k) - (K : (triangle-hom-coslice h) ~ ((H ·r f) ∙h (triangle-hom-coslice k))) → + ( h k : hom-coslice f g) + ( H : map-hom-coslice h ~ map-hom-coslice k) + ( K : coherence-htpy-hom-coslice h k H) → h = k eq-htpy-hom-coslice h k H K = - map-inv-equiv (extensionality-hom-coslice h k) (pair H K) + map-inv-equiv (extensionality-hom-coslice h k) (H , K) ``` diff --git a/src/foundation/decidable-embeddings.lagda.md b/src/foundation/decidable-embeddings.lagda.md index 236e23c7ee..4f4944b6fa 100644 --- a/src/foundation/decidable-embeddings.lagda.md +++ b/src/foundation/decidable-embeddings.lagda.md @@ -13,7 +13,6 @@ open import foundation.decidable-subtypes open import foundation.decidable-types open import foundation.dependent-pair-types open import foundation.embeddings -open import foundation.equivalences open import foundation.functoriality-cartesian-product-types open import foundation.fundamental-theorem-of-identity-types open import foundation.homotopies @@ -31,9 +30,11 @@ open import foundation-core.contractible-types open import foundation-core.coproduct-types open import foundation-core.decidable-propositions open import foundation-core.empty-types +open import foundation-core.equivalences open import foundation-core.fibers-of-maps open import foundation-core.function-types open import foundation-core.functoriality-dependent-pair-types +open import foundation-core.functoriality-function-types open import foundation-core.propositions ``` diff --git a/src/foundation/decidable-equivalence-relations.lagda.md b/src/foundation/decidable-equivalence-relations.lagda.md index f9a42e3ad8..91c206e11e 100644 --- a/src/foundation/decidable-equivalence-relations.lagda.md +++ b/src/foundation/decidable-equivalence-relations.lagda.md @@ -22,6 +22,7 @@ open import foundation.function-extensionality open import foundation.functoriality-cartesian-product-types open import foundation.fundamental-theorem-of-identity-types open import foundation.images +open import foundation.logical-equivalences open import foundation.propositional-truncations open import foundation.reflecting-maps-equivalence-relations open import foundation.sets @@ -42,7 +43,6 @@ open import foundation-core.function-types open import foundation-core.functoriality-dependent-pair-types open import foundation-core.homotopies open import foundation-core.identity-types -open import foundation-core.logical-equivalences open import foundation-core.propositions open import foundation-core.subtypes open import foundation-core.transport @@ -149,7 +149,7 @@ pr1 equiv-equivalence-relation-is-decidable-Dec-Equivalence-Relation R = ( equivalence-relation-Decidable-Equivalence-Relation R , is-decidable-sim-Decidable-Equivalence-Relation R) pr2 equiv-equivalence-relation-is-decidable-Dec-Equivalence-Relation = - is-equiv-has-inverse + is-equiv-is-invertible ( λ (R , d) → ( map-inv-equiv ( equiv-relation-is-decidable-Decidable-Relation) diff --git a/src/foundation/decidable-propositions.lagda.md b/src/foundation/decidable-propositions.lagda.md index 6bed5895cd..728c37f471 100644 --- a/src/foundation/decidable-propositions.lagda.md +++ b/src/foundation/decidable-propositions.lagda.md @@ -16,6 +16,7 @@ open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.empty-types open import foundation.equivalences +open import foundation.logical-equivalences open import foundation.negation open import foundation.propositional-extensionality open import foundation.raising-universe-levels @@ -29,7 +30,6 @@ open import foundation-core.coproduct-types open import foundation-core.function-types open import foundation-core.homotopies open import foundation-core.identity-types -open import foundation-core.logical-equivalences open import foundation-core.propositions open import foundation-core.sets open import foundation-core.small-types @@ -106,7 +106,7 @@ module _ is-equiv-map-equiv-bool-Decidable-Prop' : is-equiv map-equiv-bool-Decidable-Prop' is-equiv-map-equiv-bool-Decidable-Prop' = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-equiv-bool-Decidable-Prop' is-section-map-inv-equiv-bool-Decidable-Prop' is-retraction-map-inv-equiv-bool-Decidable-Prop' @@ -170,6 +170,10 @@ pr2 (iff-universes-Decidable-Prop l l' P) p = is-set-Decidable-Prop : {l : Level} → is-set (Decidable-Prop l) is-set-Decidable-Prop {l} = is-set-equiv bool equiv-bool-Decidable-Prop is-set-bool + +Decidable-Prop-Set : (l : Level) → Set (lsuc l) +pr1 (Decidable-Prop-Set l) = Decidable-Prop l +pr2 (Decidable-Prop-Set l) = is-set-Decidable-Prop ``` ### Extensionality of decidable propositions @@ -230,6 +234,13 @@ abstract is-decidable (type-Prop P) → is-finite (type-Prop P) is-finite-is-decidable-Prop P x = is-finite-count (count-is-decidable-Prop P x) + +is-finite-type-Decidable-Prop : + {l : Level} (P : Decidable-Prop l) → is-finite (type-Decidable-Prop P) +is-finite-type-Decidable-Prop P = + is-finite-is-decidable-Prop + ( prop-Decidable-Prop P) + ( is-decidable-Decidable-Prop P) ``` ### The type of decidable propositions of any universe level is finite diff --git a/src/foundation/decidable-relations.lagda.md b/src/foundation/decidable-relations.lagda.md index 1aa55aff6d..770d4b5f81 100644 --- a/src/foundation/decidable-relations.lagda.md +++ b/src/foundation/decidable-relations.lagda.md @@ -74,7 +74,7 @@ pr1 equiv-relation-is-decidable-Decidable-Relation dec-R = ( relation-Decidable-Relation dec-R , is-decidable-Decidable-Relation dec-R) pr2 equiv-relation-is-decidable-Decidable-Relation = - is-equiv-has-inverse + is-equiv-is-invertible ( map-inv-equiv-relation-is-decidable-Decidable-Relation) ( refl-htpy) ( refl-htpy) diff --git a/src/foundation/decidable-subtypes.lagda.md b/src/foundation/decidable-subtypes.lagda.md index 611ae47d43..ef938cc668 100644 --- a/src/foundation/decidable-subtypes.lagda.md +++ b/src/foundation/decidable-subtypes.lagda.md @@ -14,6 +14,7 @@ open import foundation.decidable-types open import foundation.dependent-pair-types open import foundation.equality-dependent-function-types open import foundation.functoriality-dependent-function-types +open import foundation.logical-equivalences open import foundation.sets open import foundation.subtypes open import foundation.universe-levels @@ -23,7 +24,6 @@ open import foundation-core.equivalences open import foundation-core.function-types open import foundation-core.identity-types open import foundation-core.injective-maps -open import foundation-core.logical-equivalences open import foundation-core.propositions open import foundation-core.transport open import foundation-core.truncated-types diff --git a/src/foundation/dependent-binomial-theorem.lagda.md b/src/foundation/dependent-binomial-theorem.lagda.md index ccd5203beb..a502d6f2ef 100644 --- a/src/foundation/dependent-binomial-theorem.lagda.md +++ b/src/foundation/dependent-binomial-theorem.lagda.md @@ -75,7 +75,7 @@ module _ is-equiv-map-compute-total-fam-coprod : is-equiv map-compute-total-fam-coprod is-equiv-map-compute-total-fam-coprod = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-compute-total-fam-coprod is-section-map-inv-compute-total-fam-coprod is-retraction-map-inv-compute-total-fam-coprod @@ -106,20 +106,20 @@ module _ ( ( equiv-tot ( λ f → ( ( equiv-prod - ( equiv-map-Π + ( equiv-Π-equiv-family ( λ x → - equiv-map-Π + equiv-Π-equiv-family ( λ p → ( inv-equiv (compute-raise l3 (A x))) ∘e ( equiv-tr (fam-coprod (A x) (B x)) p)))) - ( equiv-map-Π + ( equiv-Π-equiv-family ( λ x → - equiv-map-Π + equiv-Π-equiv-family ( λ p → ( inv-equiv (compute-raise l2 (B x))) ∘e ( equiv-tr (fam-coprod (A x) (B x)) p))))) ∘e ( distributive-Π-Σ)) ∘e - ( equiv-map-Π + ( equiv-Π-equiv-family ( λ x → ( equiv-universal-property-coprod ( fam-coprod (A x) (B x) (f x))) ∘e @@ -127,7 +127,7 @@ module _ ( fam-coprod (A x) (B x) (f x)) ( is-contr-is-zero-or-one-Fin-two-ℕ (f x))))))) ∘e ( distributive-Π-Σ)) ∘e - ( equiv-map-Π + ( equiv-Π-equiv-family ( λ x → inv-compute-total-fam-coprod (A x) (B x))) type-distributive-Π-coprod-binary-coproduct-Decomposition : diff --git a/src/foundation/dependent-identifications.lagda.md b/src/foundation/dependent-identifications.lagda.md index a194b8477e..c94dc0698c 100644 --- a/src/foundation/dependent-identifications.lagda.md +++ b/src/foundation/dependent-identifications.lagda.md @@ -81,7 +81,7 @@ module _ (q' : dependent-identification B q x' y') → is-equiv (map-compute-dependent-identification² α p' q') is-equiv-map-compute-dependent-identification² α p' q' = - is-equiv-has-inverse + is-equiv-is-invertible ( map-inv-compute-dependent-identification² α p' q') ( is-section-map-inv-compute-dependent-identification² α p' q') ( is-retraction-map-inv-compute-dependent-identification² α p' q') diff --git a/src/foundation/diagonals-of-maps.lagda.md b/src/foundation/diagonals-of-maps.lagda.md index 868abcc546..c9decab525 100644 --- a/src/foundation/diagonals-of-maps.lagda.md +++ b/src/foundation/diagonals-of-maps.lagda.md @@ -78,7 +78,7 @@ abstract (t : canonical-pullback f f) → is-equiv (fiber-ap-fiber-diagonal-map f t) is-equiv-fiber-ap-fiber-diagonal-map f t = - is-equiv-has-inverse + is-equiv-is-invertible ( fiber-diagonal-map-fiber-ap f t) ( is-section-fiber-diagonal-map-fiber-ap f t) ( is-retraction-fiber-diagonal-map-fiber-ap f t) diff --git a/src/foundation/double-negation-modality.lagda.md b/src/foundation/double-negation-modality.lagda.md index 8420266ab1..b956347b64 100644 --- a/src/foundation/double-negation-modality.lagda.md +++ b/src/foundation/double-negation-modality.lagda.md @@ -47,7 +47,7 @@ is-uniquely-eliminating-modality-double-negation-modality : {l : Level} → is-uniquely-eliminating-modality (unit-double-negation-modality {l}) is-uniquely-eliminating-modality-double-negation-modality {l} A P = - is-local-family-is-prop + is-local-dependent-type-is-prop ( unit-double-negation-modality) ( operator-double-negation-modality l ∘ P) ( λ _ → is-prop-double-negation) diff --git a/src/foundation/equality-cartesian-product-types.lagda.md b/src/foundation/equality-cartesian-product-types.lagda.md index 5a4a6c6137..e4bba6a073 100644 --- a/src/foundation/equality-cartesian-product-types.lagda.md +++ b/src/foundation/equality-cartesian-product-types.lagda.md @@ -71,7 +71,7 @@ module _ is-equiv-eq-pair : (s t : A × B) → is-equiv (eq-pair' {s} {t}) is-equiv-eq-pair s t = - is-equiv-has-inverse pair-eq is-section-pair-eq is-retraction-pair-eq + is-equiv-is-invertible pair-eq is-section-pair-eq is-retraction-pair-eq equiv-eq-pair : (s t : A × B) → Eq-prod s t ≃ (s = t) @@ -82,7 +82,7 @@ module _ is-equiv-pair-eq : (s t : A × B) → is-equiv (pair-eq {s} {t}) is-equiv-pair-eq s t = - is-equiv-has-inverse eq-pair' is-retraction-pair-eq is-section-pair-eq + is-equiv-is-invertible eq-pair' is-retraction-pair-eq is-section-pair-eq equiv-pair-eq : (s t : A × B) → (s = t) ≃ Eq-prod s t diff --git a/src/foundation/equality-coproduct-types.lagda.md b/src/foundation/equality-coproduct-types.lagda.md index aefac28970..f8f9cd1d0f 100644 --- a/src/foundation/equality-coproduct-types.lagda.md +++ b/src/foundation/equality-coproduct-types.lagda.md @@ -122,7 +122,7 @@ module _ is-equiv-map-compute-Eq-coprod-inl-inl : is-equiv map-compute-Eq-coprod-inl-inl is-equiv-map-compute-Eq-coprod-inl-inl = - is-equiv-has-inverse + is-equiv-is-invertible ( Eq-eq-coprod-inl) ( is-section-Eq-eq-coprod-inl) ( is-retraction-Eq-eq-coprod-inl) @@ -202,7 +202,7 @@ module _ is-equiv-map-compute-Eq-coprod-inr-inr : is-equiv map-compute-Eq-coprod-inr-inr is-equiv-map-compute-Eq-coprod-inr-inr = - is-equiv-has-inverse + is-equiv-is-invertible ( Eq-eq-coprod-inr) ( is-section-Eq-eq-coprod-inr) ( is-retraction-Eq-eq-coprod-inr) diff --git a/src/foundation/equality-fibers-of-maps.lagda.md b/src/foundation/equality-fibers-of-maps.lagda.md index 0921d60ba4..3d2de326e7 100644 --- a/src/foundation/equality-fibers-of-maps.lagda.md +++ b/src/foundation/equality-fibers-of-maps.lagda.md @@ -27,17 +27,17 @@ open import foundation-core.homotopies In the file [`foundation-core.fibers-of-maps`](foundation-core.fibers-of-maps.md) we already -gave one characterization of the identity type of `fib f b`, for an arbitrary +gave one characterization of the identity type of `fiber f b`, for an arbitrary map `f : A → B`. Here we give a second characterization, using the fibers of the action on identifications of `f`. ## Theorem -For any map `f : A → B` any `b : B` and any `x y : fib f b`, there is an +For any map `f : A → B` any `b : B` and any `x y : fiber f b`, there is an equivalence ```text -(x = y) ≃ fib (ap f) ((pr2 x) ∙ (inv (pr2 y))) +(x = y) ≃ fiber (ap f) ((pr2 x) ∙ (inv (pr2 y))) ``` ### Proof diff --git a/src/foundation/equivalence-classes.lagda.md b/src/foundation/equivalence-classes.lagda.md index fe87b61d19..41aa39cd1e 100644 --- a/src/foundation/equivalence-classes.lagda.md +++ b/src/foundation/equivalence-classes.lagda.md @@ -14,6 +14,7 @@ open import foundation.functoriality-propositional-truncation open import foundation.fundamental-theorem-of-identity-types open import foundation.inhabited-subtypes open import foundation.locally-small-types +open import foundation.logical-equivalences open import foundation.propositional-truncations open import foundation.reflecting-maps-equivalence-relations open import foundation.slice @@ -31,7 +32,6 @@ open import foundation-core.equivalence-relations open import foundation-core.equivalences open import foundation-core.functoriality-dependent-pair-types open import foundation-core.identity-types -open import foundation-core.logical-equivalences open import foundation-core.propositions open import foundation-core.sets ``` diff --git a/src/foundation/equivalence-extensionality.lagda.md b/src/foundation/equivalence-extensionality.lagda.md index 5a278438e0..7d8ad2c455 100644 --- a/src/foundation/equivalence-extensionality.lagda.md +++ b/src/foundation/equivalence-extensionality.lagda.md @@ -10,6 +10,7 @@ module foundation.equivalence-extensionality where open import foundation.dependent-pair-types open import foundation.function-extensionality open import foundation.fundamental-theorem-of-identity-types +open import foundation.identity-systems open import foundation.subtype-identity-principle open import foundation.type-theoretic-principle-of-choice open import foundation.universe-levels @@ -24,6 +25,7 @@ open import foundation-core.functoriality-dependent-pair-types open import foundation-core.homotopies open import foundation-core.identity-types open import foundation-core.propositions +open import foundation-core.sections ```
@@ -38,6 +40,8 @@ module _ htpy-equiv : A ≃ B → A ≃ B → UU (l1 ⊔ l2) htpy-equiv e e' = (map-equiv e) ~ (map-equiv e') + _~e_ = htpy-equiv + extensionality-equiv : (f g : A ≃ B) → (f = g) ≃ htpy-equiv f g extensionality-equiv f = extensionality-type-subtype @@ -86,3 +90,34 @@ module _ {e e' : A ≃ B} → (map-equiv e) = (map-equiv e') → htpy-equiv e e' htpy-eq-map-equiv = htpy-eq ``` + +### Homotopy induction for homotopies between equivalences + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where + + abstract + Ind-htpy-equiv : + {l3 : Level} (e : A ≃ B) + (P : (e' : A ≃ B) (H : htpy-equiv e e') → UU l3) → + section + ( λ (h : (e' : A ≃ B) (H : htpy-equiv e e') → P e' H) → + h e (refl-htpy-equiv e)) + Ind-htpy-equiv e = + is-identity-system-is-torsorial e + ( refl-htpy-equiv e) + ( is-contr-total-htpy-equiv e) + + ind-htpy-equiv : + {l3 : Level} (e : A ≃ B) (P : (e' : A ≃ B) (H : htpy-equiv e e') → UU l3) → + P e (refl-htpy-equiv e) → (e' : A ≃ B) (H : htpy-equiv e e') → P e' H + ind-htpy-equiv e P = pr1 (Ind-htpy-equiv e P) + + compute-ind-htpy-equiv : + {l3 : Level} (e : A ≃ B) (P : (e' : A ≃ B) (H : htpy-equiv e e') → UU l3) + (p : P e (refl-htpy-equiv e)) → + ind-htpy-equiv e P p e (refl-htpy-equiv e) = p + compute-ind-htpy-equiv e P = pr2 (Ind-htpy-equiv e P) +``` diff --git a/src/foundation/equivalence-induction.lagda.md b/src/foundation/equivalence-induction.lagda.md index 5fe4716a37..11fd12ad76 100644 --- a/src/foundation/equivalence-induction.lagda.md +++ b/src/foundation/equivalence-induction.lagda.md @@ -2,53 +2,258 @@ ```agda module foundation.equivalence-induction where - -open import foundation-core.equivalence-induction public ```
Imports ```agda +open import foundation.contractible-maps +open import foundation.contractible-types open import foundation.dependent-pair-types +open import foundation.identity-systems +open import foundation.identity-types +open import foundation.subuniverses open import foundation.univalence +open import foundation.universal-property-dependent-pair-types open import foundation.universe-levels +open import foundation-core.commuting-triangles-of-maps open import foundation-core.equivalences open import foundation-core.function-types +open import foundation-core.homotopies open import foundation-core.sections +open import foundation-core.singleton-induction ```
## Idea -Equivalence induction is a condition equivalent to the univalence axiom +**Equivalence induction** is the principle asserting that for any type family + +```text + P : (B : 𝒰) (e : A ≃ B) → 𝒰 +``` + +of types indexed by all [equivalences](foundation.equivalences.md) with domain +`A`, there is a [section](foundation.sections.md) of the evaluation map + +```text + ((B : 𝒰) (e : A ≃ B) → P B e) → P A id-equiv. +``` + +The principle of equivalence induction is equivalent to the +[univalence axiom](foundation.univalence.md). -## Theorem +By equivalence induction, it follows that any type family `P : 𝒰 → 𝒱` on the +universe has an +[action on equivalences](foundation.action-on-equivalences-type-families.md) + +```text + (A ≃ B) → P A ≃ P B. +``` + +## Statement ```agda -abstract - Ind-equiv : - {l1 l2 : Level} (A : UU l1) (P : (B : UU l1) (e : A ≃ B) → UU l2) → - section (ev-id P) - Ind-equiv A P = - IND-EQUIV-is-contr-total-equiv - ( is-contr-total-equiv A) - ( λ t → P (pr1 t) (pr2 t)) +module _ + {l1 : Level} {A : UU l1} + where + + ev-id-equiv : + {l : Level} (P : (B : UU l1) → (A ≃ B) → UU l) → + ((B : UU l1) (e : A ≃ B) → P B e) → P A id-equiv + ev-id-equiv P f = f A id-equiv + + IND-EQUIV : + {l : Level} (P : (B : UU l1) (e : A ≃ B) → UU l) → UU (lsuc l1 ⊔ l) + IND-EQUIV P = section (ev-id-equiv P) + + triangle-ev-id-equiv : + {l : Level} + (P : (Σ (UU l1) (λ X → A ≃ X)) → UU l) → + coherence-triangle-maps + ( ev-point (A , id-equiv) {P}) + ( ev-id-equiv (λ X e → P (X , e))) + ( ev-pair {A = UU l1} {B = λ X → A ≃ X} {C = P}) + triangle-ev-id-equiv P f = refl +``` + +## Properties + +### Equivalence induction is equivalent to the contractibility of the total space of equivalences + +#### Contractibility of the total space of equivalences implies equivalence induction + +```agda +module _ + {l1 : Level} {A : UU l1} + where + + abstract + is-identity-system-is-contr-total-equiv : + is-contr (Σ (UU l1) (λ X → A ≃ X)) → + {l : Level} → + (P : (Σ (UU l1) (λ X → A ≃ X)) → UU l) → IND-EQUIV (λ B e → P (B , e)) + is-identity-system-is-contr-total-equiv c P = + section-left-factor + ( ev-id-equiv (λ X e → P (X , e))) + ( ev-pair) + ( is-singleton-is-contr + ( A , id-equiv) + ( ( A , id-equiv) , + ( λ t → + ( inv (contraction c (A , id-equiv))) ∙ (contraction c t))) + ( P)) +``` + +#### Equivalence induction implies contractibility of the total space of equivalences + +```agda +module _ + {l1 : Level} {A : UU l1} + where + + abstract + is-contr-total-is-identity-system-equiv : + ( {l : Level} → is-identity-system l (λ X → A ≃ X) A id-equiv) → + is-contr (Σ (UU l1) (λ X → A ≃ X)) + is-contr-total-is-identity-system-equiv ind = + is-contr-is-singleton + ( Σ (UU l1) (λ X → A ≃ X)) + ( A , id-equiv) + ( λ P → section-comp + ( ev-id-equiv (λ X e → P (X , e))) + ( ev-pair {A = UU l1} {B = λ X → A ≃ X} {C = P}) + ( ind-Σ , refl-htpy) + ( ind (λ X e → P (X , e)))) +``` + +### Equivalence induction in a universe + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (P : (B : UU l1) (e : A ≃ B) → UU l2) + where + + abstract + is-identity-system-equiv : section (ev-id-equiv P) + is-identity-system-equiv = + is-identity-system-is-contr-total-equiv + ( is-contr-total-equiv _) + ( λ t → P (pr1 t) (pr2 t)) + + ind-equiv : + P A id-equiv → {B : UU l1} (e : A ≃ B) → P B e + ind-equiv p {B} = pr1 is-identity-system-equiv p B + + compute-ind-equiv : + (u : P A id-equiv) → ind-equiv u id-equiv = u + compute-ind-equiv = pr2 is-identity-system-equiv +``` + +### Equivalence induction in a subuniverse + +```agda +module _ + {l1 l2 l3 : Level} (P : subuniverse l1 l2) (A : type-subuniverse P) + where + + ev-id-equiv-subuniverse : + {F : (B : type-subuniverse P) → equiv-subuniverse P A B → UU l3} → + ((B : type-subuniverse P) (e : equiv-subuniverse P A B) → F B e) → + F A id-equiv + ev-id-equiv-subuniverse f = f A id-equiv + + triangle-ev-id-equiv-subuniverse : + (F : (B : type-subuniverse P) → equiv-subuniverse P A B → UU l3) → + coherence-triangle-maps + ( ev-point (A , id-equiv)) + ( ev-id-equiv-subuniverse {F}) + ( ev-pair) + triangle-ev-id-equiv-subuniverse F E = refl -ind-equiv : - {l1 l2 : Level} (A : UU l1) (P : (B : UU l1) (e : A ≃ B) → UU l2) → - P A id-equiv → {B : UU l1} (e : A ≃ B) → P B e -ind-equiv A P p {B} = pr1 (Ind-equiv A P) p B + abstract + is-identity-system-equiv-subuniverse : + (F : (B : type-subuniverse P) → equiv-subuniverse P A B → UU l3) → + section (ev-id-equiv-subuniverse {F}) + is-identity-system-equiv-subuniverse = + is-identity-system-is-torsorial A id-equiv + ( is-contr-total-equiv-subuniverse P A) + + ind-equiv-subuniverse : + (F : (B : type-subuniverse P) → equiv-subuniverse P A B → UU l3) → + F A id-equiv → (B : type-subuniverse P) (e : equiv-subuniverse P A B) → + F B e + ind-equiv-subuniverse F = + pr1 (is-identity-system-equiv-subuniverse F) + + compute-ind-equiv-subuniverse : + (F : (B : type-subuniverse P) → equiv-subuniverse P A B → UU l3) → + (u : F A id-equiv) → + ind-equiv-subuniverse F u A id-equiv = u + compute-ind-equiv-subuniverse F = + pr2 (is-identity-system-equiv-subuniverse F) ``` -## Corollaries +### The evaluation map `ev-id-equiv` is an equivalence + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (P : (B : UU l1) (e : A ≃ B) → UU l2) + where + + is-equiv-ev-id-equiv : is-equiv (ev-id-equiv P) + is-equiv-ev-id-equiv = + is-equiv-left-factor-htpy + ( ev-point (A , id-equiv)) + ( ev-id-equiv P) + ( ev-pair) + ( triangle-ev-id-equiv (λ u → P (pr1 u) (pr2 u))) + ( dependent-universal-property-contr-is-contr + ( A , id-equiv) + ( is-contr-total-equiv A) + ( λ u → P (pr1 u) (pr2 u))) + ( is-equiv-ev-pair) + + is-contr-map-ev-id-equiv : is-contr-map (ev-id-equiv P) + is-contr-map-ev-id-equiv = is-contr-map-is-equiv is-equiv-ev-id-equiv +``` + +### The evaluation map `ev-id-equiv-subuniverse` is an equivalence + +```agda +module _ + {l1 l2 l3 : Level} (P : subuniverse l1 l2) (X : type-subuniverse P) + (F : (Y : type-subuniverse P) (e : equiv-subuniverse P X Y) → UU l3) + where + + is-equiv-ev-id-equiv-subuniverse : + is-equiv (ev-id-equiv-subuniverse P X {F}) + is-equiv-ev-id-equiv-subuniverse = + is-equiv-left-factor-htpy + ( ev-point (X , id-equiv)) + ( ev-id-equiv-subuniverse P X) + ( ev-pair) + ( triangle-ev-id-equiv-subuniverse P X F) + ( dependent-universal-property-contr-is-contr + ( X , id-equiv) + ( is-contr-total-equiv-subuniverse P X) + ( λ E → F (pr1 E) (pr2 E))) + ( is-equiv-ev-pair) + + is-contr-map-ev-id-equiv-subuniverse : + is-contr-map (ev-id-equiv-subuniverse P X {F}) + is-contr-map-ev-id-equiv-subuniverse = + is-contr-map-is-equiv is-equiv-ev-id-equiv-subuniverse +``` ### Equivalence induction implies that postcomposing by an equivalence is an equivalence -Of course we already know this fact from function extensionality, but we prove -it again from equivalence induction so that we can prove that univalence implies -function extensionality. +Of course we already know that this fact follows from +[function extensionality](foundation.function-extensionality.md). However, we +prove it again from equivalence induction so that we can prove that +[univalence implies function extensionality](foundation.univalence-implies-function-extensionality.md). ```agda abstract @@ -56,5 +261,5 @@ abstract {l1 l2 : Level} {X Y : UU l1} (A : UU l2) (e : X ≃ Y) → is-equiv (postcomp A (map-equiv e)) is-equiv-postcomp-univalence {X = X} A = - ind-equiv X (λ Y e → is-equiv (postcomp A (map-equiv e))) is-equiv-id + ind-equiv (λ Y e → is-equiv (postcomp A (map-equiv e))) is-equiv-id ``` diff --git a/src/foundation/equivalence-relations.lagda.md b/src/foundation/equivalence-relations.lagda.md index 05bf364beb..d06d05ef3b 100644 --- a/src/foundation/equivalence-relations.lagda.md +++ b/src/foundation/equivalence-relations.lagda.md @@ -17,6 +17,7 @@ open import foundation.equivalence-classes open import foundation.full-subtypes open import foundation.fundamental-theorem-of-identity-types open import foundation.inhabited-subtypes +open import foundation.logical-equivalences open import foundation.partitions open import foundation.propositional-truncations open import foundation.reflecting-maps-equivalence-relations @@ -36,7 +37,6 @@ open import foundation-core.equivalences open import foundation-core.function-types open import foundation-core.functoriality-dependent-pair-types open import foundation-core.identity-types -open import foundation-core.logical-equivalences open import foundation-core.propositions open import foundation-core.sets open import foundation-core.transport @@ -421,7 +421,7 @@ is-retraction-eq-rel-partition-Equivalence-Relation P = is-equiv-eq-rel-partition : {l : Level} {A : UU l} → is-equiv (eq-rel-partition {l} {l} {l} {A}) is-equiv-eq-rel-partition = - is-equiv-has-inverse + is-equiv-is-invertible partition-Equivalence-Relation is-section-eq-rel-partition-Equivalence-Relation is-retraction-eq-rel-partition-Equivalence-Relation @@ -579,7 +579,7 @@ is-equiv-surjection-into-set-Equivalence-Relation : {l1 : Level} {A : UU l1} → is-equiv (surjection-into-set-Equivalence-Relation {l1} {l1} {A}) is-equiv-surjection-into-set-Equivalence-Relation {l1} {A} = - is-equiv-has-inverse + is-equiv-is-invertible ( eq-rel-Surjection-Into-Set {l1} {l1} {A}) ( is-section-eq-rel-Surjection-Into-Set {l1} {l1} {A}) ( is-retraction-eq-rel-Surjection-Into-Set {l1} {l1} {A}) diff --git a/src/foundation/equivalences-maybe.lagda.md b/src/foundation/equivalences-maybe.lagda.md index b9bd747433..fea02e6755 100644 --- a/src/foundation/equivalences-maybe.lagda.md +++ b/src/foundation/equivalences-maybe.lagda.md @@ -371,7 +371,7 @@ abstract {l1 l2 : Level} {X : UU l1} {Y : UU l2} (e : Maybe X ≃ Maybe Y) → is-equiv (map-equiv-equiv-Maybe e) is-equiv-map-equiv-equiv-Maybe e = - is-equiv-has-inverse + is-equiv-is-invertible ( map-inv-equiv-equiv-Maybe e) ( is-section-map-inv-equiv-equiv-Maybe e) ( is-retraction-map-inv-equiv-equiv-Maybe e) @@ -396,7 +396,7 @@ module _ pr1 (pr1 extend-equiv-Maybe f) = equiv-coprod f id-equiv pr2 (pr1 extend-equiv-Maybe f) = refl pr2 extend-equiv-Maybe = - is-equiv-has-inverse + is-equiv-is-invertible ( λ f → pr1 (retraction-equiv-coprod (pr1 f) id-equiv (p f))) ( λ f → ( eq-pair-Σ diff --git a/src/foundation/equivalences.lagda.md b/src/foundation/equivalences.lagda.md index eb4e3bd097..47fb87b058 100644 --- a/src/foundation/equivalences.lagda.md +++ b/src/foundation/equivalences.lagda.md @@ -15,7 +15,6 @@ open import foundation.dependent-pair-types open import foundation.equivalence-extensionality open import foundation.function-extensionality open import foundation.functoriality-fibers-of-maps -open import foundation.identity-systems open import foundation.identity-types open import foundation.truncated-maps open import foundation.type-theoretic-principle-of-choice @@ -26,16 +25,14 @@ open import foundation-core.contractible-types open import foundation-core.embeddings open import foundation-core.fibers-of-maps open import foundation-core.function-types -open import foundation-core.functoriality-dependent-function-types open import foundation-core.functoriality-dependent-pair-types +open import foundation-core.functoriality-function-types open import foundation-core.homotopies open import foundation-core.propositions open import foundation-core.pullbacks open import foundation-core.retractions open import foundation-core.sections -open import foundation-core.sets open import foundation-core.subtypes -open import foundation-core.truncated-types open import foundation-core.truncation-levels ``` @@ -142,132 +139,6 @@ module _ ( ap-inv (map-equiv e) (map-eq-transpose-equiv' p)))) ``` -## If dependent precomposition by `f` is an equivalence, then precomposition by `f` is an equivalence - -```agda -abstract - is-equiv-precomp-is-equiv-precomp-Π : - {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} (f : A → B) → - ((C : B → UU l3) → is-equiv (precomp-Π f C)) → - ((C : UU l3) → is-equiv (precomp f C)) - is-equiv-precomp-is-equiv-precomp-Π f is-equiv-precomp-Π-f C = - is-equiv-precomp-Π-f (λ y → C) -``` - -### If `f` is an equivalence, then precomposition by `f` is an equivalence - -```agda -abstract - is-equiv-precomp-is-equiv : - {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} (f : A → B) → is-equiv f → - (C : UU l3) → is-equiv (precomp f C) - is-equiv-precomp-is-equiv f is-equiv-f = - is-equiv-precomp-is-equiv-precomp-Π f - ( is-equiv-precomp-Π-is-equiv f is-equiv-f) - -equiv-precomp : - {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} (e : A ≃ B) (C : UU l3) → - (B → C) ≃ (A → C) -pr1 (equiv-precomp e C) = precomp (map-equiv e) C -pr2 (equiv-precomp e C) = - is-equiv-precomp-is-equiv (map-equiv e) (is-equiv-map-equiv e) C -``` - -### If precomposing by `f` is an equivalence, then `f` is an equivalence - -First, we prove this relative to a subuniverse, such that `f` is a map between -two types in that subuniverse. - -```agda -module _ - { l1 l2 : Level} - ( α : Level → Level) (P : (l : Level) → UU l → UU (α l)) - ( A : Σ (UU l1) (P l1)) (B : Σ (UU l2) (P l2)) (f : pr1 A → pr1 B) - ( H : (l : Level) (C : Σ (UU l) (P l)) → is-equiv (precomp f (pr1 C))) - where - - map-inv-is-equiv-precomp-subuniverse : pr1 B → pr1 A - map-inv-is-equiv-precomp-subuniverse = - pr1 (center (is-contr-map-is-equiv (H _ A) id)) - - is-section-map-inv-is-equiv-precomp-subuniverse : - ( f ∘ map-inv-is-equiv-precomp-subuniverse) ~ id - is-section-map-inv-is-equiv-precomp-subuniverse = - htpy-eq - ( ap - ( pr1) - ( eq-is-contr' - ( is-contr-map-is-equiv (H _ B) f) - ( ( f ∘ (pr1 (center (is-contr-map-is-equiv (H _ A) id)))) , - ( ap - ( λ (g : pr1 A → pr1 A) → f ∘ g) - ( pr2 (center (is-contr-map-is-equiv (H _ A) id))))) - ( id , refl))) - - is-retraction-map-inv-is-equiv-precomp-subuniverse : - ( map-inv-is-equiv-precomp-subuniverse ∘ f) ~ id - is-retraction-map-inv-is-equiv-precomp-subuniverse = - htpy-eq (pr2 (center (is-contr-map-is-equiv (H _ A) id))) - - abstract - is-equiv-is-equiv-precomp-subuniverse : - is-equiv f - is-equiv-is-equiv-precomp-subuniverse = - is-equiv-has-inverse - ( map-inv-is-equiv-precomp-subuniverse) - ( is-section-map-inv-is-equiv-precomp-subuniverse) - ( is-retraction-map-inv-is-equiv-precomp-subuniverse) -``` - -Now we prove the usual statement, without the subuniverse - -```agda -module _ - {l1 l2 : Level} {A : UU l1} {B : UU l2} - where - - abstract - is-equiv-is-equiv-precomp : - (f : A → B) → ((l : Level) (C : UU l) → is-equiv (precomp f C)) → - is-equiv f - is-equiv-is-equiv-precomp f is-equiv-precomp-f = - is-equiv-is-equiv-precomp-subuniverse - ( λ l → l1 ⊔ l2) - ( λ l X → A → B) - ( pair A f) - ( pair B f) - ( f) - ( λ l C → is-equiv-precomp-f l (pr1 C)) -``` - -```agda -is-equiv-is-equiv-precomp-Prop : - {l1 l2 : Level} (P : Prop l1) (Q : Prop l2) - (f : type-Prop P → type-Prop Q) → - ({l : Level} (R : Prop l) → is-equiv (precomp f (type-Prop R))) → - is-equiv f -is-equiv-is-equiv-precomp-Prop P Q f H = - is-equiv-is-equiv-precomp-subuniverse id (λ l → is-prop) P Q f (λ l → H {l}) - -is-equiv-is-equiv-precomp-Set : - {l1 l2 : Level} (A : Set l1) (B : Set l2) - (f : type-Set A → type-Set B) → - ({l : Level} (C : Set l) → is-equiv (precomp f (type-Set C))) → - is-equiv f -is-equiv-is-equiv-precomp-Set A B f H = - is-equiv-is-equiv-precomp-subuniverse id (λ l → is-set) A B f (λ l → H {l}) - -is-equiv-is-equiv-precomp-Truncated-Type : - {l1 l2 : Level} (k : 𝕋) - (A : Truncated-Type l1 k) (B : Truncated-Type l2 k) - (f : type-Truncated-Type A → type-Truncated-Type B) → - ({l : Level} (C : Truncated-Type l k) → is-equiv (precomp f (pr1 C))) → - is-equiv f -is-equiv-is-equiv-precomp-Truncated-Type k A B f H = - is-equiv-is-equiv-precomp-subuniverse id (λ l → is-trunc k) A B f - ( λ l → H {l}) -``` - ### Equivalences have a contractible type of sections ```agda @@ -391,46 +262,21 @@ module _ equiv-is-equiv-right-factor-htpy e (f ∘ map-equiv e) refl-htpy ``` -### Homotopy induction for homotopies between equivalences - -```agda -module _ - {l1 l2 : Level} {A : UU l1} {B : UU l2} - where - - abstract - Ind-htpy-equiv : - {l3 : Level} (e : A ≃ B) - (P : (e' : A ≃ B) (H : htpy-equiv e e') → UU l3) → - section - ( λ (h : (e' : A ≃ B) (H : htpy-equiv e e') → P e' H) → - h e (refl-htpy-equiv e)) - Ind-htpy-equiv e = - Ind-identity-system e - ( refl-htpy-equiv e) - ( is-contr-total-htpy-equiv e) - - ind-htpy-equiv : - {l3 : Level} (e : A ≃ B) (P : (e' : A ≃ B) (H : htpy-equiv e e') → UU l3) → - P e (refl-htpy-equiv e) → (e' : A ≃ B) (H : htpy-equiv e e') → P e' H - ind-htpy-equiv e P = pr1 (Ind-htpy-equiv e P) - - compute-ind-htpy-equiv : - {l3 : Level} (e : A ≃ B) (P : (e' : A ≃ B) (H : htpy-equiv e e') → UU l3) - (p : P e (refl-htpy-equiv e)) → - ind-htpy-equiv e P p e (refl-htpy-equiv e) = p - compute-ind-htpy-equiv e P = pr2 (Ind-htpy-equiv e P) -``` - ### The groupoid laws for equivalences +#### Composition of equivalences is associative + ```agda associative-comp-equiv : {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {C : UU l3} {D : UU l4} → (e : A ≃ B) (f : B ≃ C) (g : C ≃ D) → ((g ∘e f) ∘e e) = (g ∘e (f ∘e e)) associative-comp-equiv e f g = eq-equiv-eq-map-equiv refl +``` +#### Unit laws for composition of equivalences + +```agda module _ {l1 l2 : Level} {X : UU l1} {Y : UU l2} where @@ -440,7 +286,11 @@ module _ right-unit-law-equiv : (e : X ≃ Y) → (e ∘e id-equiv) = e right-unit-law-equiv e = eq-equiv-eq-map-equiv refl +``` + +#### Inverse laws for composition of equivalences +```agda left-inverse-law-equiv : (e : X ≃ Y) → ((inv-equiv e) ∘e e) = id-equiv left-inverse-law-equiv e = eq-htpy-equiv (is-retraction-map-inv-is-equiv (is-equiv-map-equiv e)) @@ -448,7 +298,11 @@ module _ right-inverse-law-equiv : (e : X ≃ Y) → (e ∘e (inv-equiv e)) = id-equiv right-inverse-law-equiv e = eq-htpy-equiv (is-section-map-inv-is-equiv (is-equiv-map-equiv e)) +``` +#### `inv-equiv` is a fibered involution on equivalences + +```agda inv-inv-equiv : (e : X ≃ Y) → (inv-equiv (inv-equiv e)) = e inv-inv-equiv e = eq-equiv-eq-map-equiv refl @@ -457,7 +311,7 @@ module _ is-equiv-inv-equiv : is-equiv (inv-equiv {A = X} {B = Y}) is-equiv-inv-equiv = - is-equiv-has-inverse + is-equiv-is-invertible ( inv-equiv) ( inv-inv-equiv') ( inv-inv-equiv) @@ -465,13 +319,21 @@ module _ equiv-inv-equiv : (X ≃ Y) ≃ (Y ≃ X) pr1 equiv-inv-equiv = inv-equiv pr2 equiv-inv-equiv = is-equiv-inv-equiv +``` + +#### A coherence law for the unit laws for composition of equivalences +```agda coh-unit-laws-equiv : {l : Level} {X : UU l} → left-unit-law-equiv (id-equiv {A = X}) = right-unit-law-equiv (id-equiv {A = X}) -coh-unit-laws-equiv {l} {X} = ap eq-equiv-eq-map-equiv refl +coh-unit-laws-equiv = ap eq-equiv-eq-map-equiv refl +``` +#### Taking the inverse equivalence distributes over composition + +```agda module _ {l1 l2 l3 : Level} {X : UU l1} {Y : UU l2} {Z : UU l3} where @@ -488,51 +350,73 @@ module _ ( ap ( λ g → map-equiv (f ∘e (g ∘e (inv-equiv f))) x) ( inv (right-inverse-law-equiv e))))) +``` + +#### Iterated inverse laws for equivalence composition -comp-inv-equiv-comp-equiv : +```agda +is-retraction-postcomp-equiv-inv-equiv : {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3} (f : B ≃ C) (e : A ≃ B) → (inv-equiv f ∘e (f ∘e e)) = e -comp-inv-equiv-comp-equiv f e = +is-retraction-postcomp-equiv-inv-equiv f e = eq-htpy-equiv (λ x → is-retraction-map-inv-equiv f (map-equiv e x)) -comp-equiv-comp-inv-equiv : +is-section-postcomp-equiv-inv-equiv : {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3} (f : B ≃ C) (e : A ≃ C) → (f ∘e (inv-equiv f ∘e e)) = e -comp-equiv-comp-inv-equiv f e = +is-section-postcomp-equiv-inv-equiv f e = eq-htpy-equiv (λ x → is-section-map-inv-equiv f (map-equiv e x)) -is-equiv-comp-equiv : +is-section-precomp-equiv-inv-equiv : + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3} + (f : B ≃ C) (e : A ≃ B) → + ((f ∘e e) ∘e inv-equiv e) = f +is-section-precomp-equiv-inv-equiv f e = + eq-htpy-equiv (λ x → ap (map-equiv f) (is-section-map-inv-equiv e x)) + +is-retraction-precomp-equiv-inv-equiv : + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3} + (f : B ≃ C) (e : B ≃ A) → + ((f ∘e inv-equiv e) ∘e e) = f +is-retraction-precomp-equiv-inv-equiv f e = + eq-htpy-equiv (λ x → ap (map-equiv f) (is-retraction-map-inv-equiv e x)) +``` + +### The post- and precomposition operations by an equivalence are equivalences + +```agda +is-equiv-postcomp-equiv-equiv : {l1 l2 l3 : Level} {B : UU l2} {C : UU l3} (f : B ≃ C) (A : UU l1) → is-equiv (λ (e : A ≃ B) → f ∘e e) -is-equiv-comp-equiv f A = - is-equiv-has-inverse - ( λ e → inv-equiv f ∘e e) - ( comp-equiv-comp-inv-equiv f) - ( comp-inv-equiv-comp-equiv f) +is-equiv-postcomp-equiv-equiv f A = + is-equiv-is-invertible + ( inv-equiv f ∘e_) + ( is-section-postcomp-equiv-inv-equiv f) + ( is-retraction-postcomp-equiv-inv-equiv f) + +is-equiv-precomp-equiv-equiv : + {l1 l2 l3 : Level} {A : UU l2} {B : UU l3} + (C : UU l1) (e : A ≃ B) → is-equiv (λ (f : B ≃ C) → f ∘e e) +is-equiv-precomp-equiv-equiv A e = + is-equiv-is-invertible + ( _∘e inv-equiv e) + ( λ f → is-retraction-precomp-equiv-inv-equiv f e) + ( λ f → is-section-precomp-equiv-inv-equiv f e) equiv-postcomp-equiv : {l1 l2 l3 : Level} {B : UU l2} {C : UU l3} → (f : B ≃ C) → (A : UU l1) → (A ≃ B) ≃ (A ≃ C) -pr1 (equiv-postcomp-equiv f A) e = f ∘e e -pr2 (equiv-postcomp-equiv f A) = is-equiv-comp-equiv f A +pr1 (equiv-postcomp-equiv f A) = f ∘e_ +pr2 (equiv-postcomp-equiv f A) = is-equiv-postcomp-equiv-equiv f A ``` ```agda equiv-precomp-equiv : {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} → (A ≃ B) → (C : UU l3) → (B ≃ C) ≃ (A ≃ C) -equiv-precomp-equiv e C = - equiv-subtype-equiv - ( equiv-precomp e C) - ( is-equiv-Prop) - ( is-equiv-Prop) - ( λ g → - pair - ( is-equiv-comp g (map-equiv e) (is-equiv-map-equiv e)) - ( λ is-equiv-eg → - is-equiv-left-factor - g (map-equiv e) is-equiv-eg (is-equiv-map-equiv e))) +pr1 (equiv-precomp-equiv e C) = _∘e e +pr2 (equiv-precomp-equiv e C) = is-equiv-precomp-equiv-equiv C e ``` ### A cospan in which one of the legs is an equivalence is a pullback if and only if the corresponding map on the cone is an equivalence diff --git a/src/foundation/exclusive-disjunction.lagda.md b/src/foundation/exclusive-disjunction.lagda.md index 3e1431893c..e52f13f134 100644 --- a/src/foundation/exclusive-disjunction.lagda.md +++ b/src/foundation/exclusive-disjunction.lagda.md @@ -179,7 +179,7 @@ module _ ( equiv-coprod ( equiv-tot ( λ p → - ( ( equiv-map-Π + ( ( equiv-Π-equiv-family ( λ q → compute-eq-coprod-inl-inr p q)) ∘e ( left-unit-law-prod-is-contr ( is-contr-Π @@ -191,7 +191,7 @@ module _ ( equiv-dependent-universal-property-coprod (λ x → inl p = x)))) ( equiv-tot ( λ q → - ( ( equiv-map-Π + ( ( equiv-Π-equiv-family ( λ p → compute-eq-coprod-inr-inl q p)) ∘e ( right-unit-law-prod-is-contr ( is-contr-Π diff --git a/src/foundation/existential-quantification.lagda.md b/src/foundation/existential-quantification.lagda.md index cfaefb2c24..f348d97260 100644 --- a/src/foundation/existential-quantification.lagda.md +++ b/src/foundation/existential-quantification.lagda.md @@ -9,13 +9,13 @@ module foundation.existential-quantification where ```agda open import foundation.conjunction open import foundation.dependent-pair-types +open import foundation.logical-equivalences open import foundation.propositional-extensionality open import foundation.propositional-truncations open import foundation.universe-levels open import foundation-core.equivalences open import foundation-core.identity-types -open import foundation-core.logical-equivalences open import foundation-core.propositions ``` diff --git a/src/foundation/fibered-equivalences.lagda.md b/src/foundation/fibered-equivalences.lagda.md index c4aa8781c9..4d21a74f8c 100644 --- a/src/foundation/fibered-equivalences.lagda.md +++ b/src/foundation/fibered-equivalences.lagda.md @@ -7,6 +7,7 @@ module foundation.fibered-equivalences where
Imports ```agda +open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.equivalences @@ -109,7 +110,7 @@ module _ is-equiv-map-Σ-is-equiv-equiv-over : is-equiv map-Σ-is-equiv-equiv-over is-equiv-map-Σ-is-equiv-equiv-over = - is-equiv-has-inverse map-equiv-over-Σ-is-equiv refl-htpy refl-htpy + is-equiv-is-invertible map-equiv-over-Σ-is-equiv refl-htpy refl-htpy equiv-Σ-is-equiv-equiv-over : (equiv-over f g i) ≃ Σ (map-over f g i) (is-equiv ∘ pr1) @@ -118,7 +119,7 @@ module _ is-equiv-map-equiv-over-Σ-is-equiv : is-equiv map-equiv-over-Σ-is-equiv is-equiv-map-equiv-over-Σ-is-equiv = - is-equiv-has-inverse map-Σ-is-equiv-equiv-over refl-htpy refl-htpy + is-equiv-is-invertible map-Σ-is-equiv-equiv-over refl-htpy refl-htpy equiv-equiv-over-Σ-is-equiv : Σ (map-over f g i) (is-equiv ∘ pr1) ≃ (equiv-over f g i) @@ -131,8 +132,11 @@ module _ ( emb-subtype (is-equiv-Prop ∘ pr1)) ( emb-equiv equiv-Σ-is-equiv-equiv-over) - map-emb-map-over-equiv-over : equiv-over f g i → map-over f g i - map-emb-map-over-equiv-over = map-emb emb-map-over-equiv-over + map-over-equiv-over : equiv-over f g i → map-over f g i + map-over-equiv-over = map-emb emb-map-over-equiv-over + + is-emb-map-over-equiv-over : is-emb map-over-equiv-over + is-emb-map-over-equiv-over = is-emb-map-emb emb-map-over-equiv-over module _ {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3} {Y : UU l4} @@ -171,7 +175,7 @@ module _ is-equiv-map-Σ-is-fibered-equiv-fibered-map-fibered-equiv : is-equiv (map-Σ-is-fibered-equiv-fibered-map-fibered-equiv) is-equiv-map-Σ-is-fibered-equiv-fibered-map-fibered-equiv = - is-equiv-has-inverse + is-equiv-is-invertible ( map-fibered-equiv-Σ-is-fibered-equiv-fibered-map) ( refl-htpy) ( refl-htpy) @@ -186,7 +190,7 @@ module _ is-equiv-map-fibered-equiv-Σ-is-fibered-equiv-fibered-map : is-equiv (map-fibered-equiv-Σ-is-fibered-equiv-fibered-map) is-equiv-map-fibered-equiv-Σ-is-fibered-equiv-fibered-map = - is-equiv-has-inverse + is-equiv-is-invertible ( map-Σ-is-fibered-equiv-fibered-map-fibered-equiv) ( refl-htpy) ( refl-htpy) @@ -216,8 +220,86 @@ module _ ( emb-subtype is-fibered-equiv-fibered-map-Prop) ( emb-equiv equiv-Σ-is-fibered-equiv-fibered-map-fibered-equiv) - map-fibered-map-fibered-equiv : fibered-equiv f g → fibered-map f g - map-fibered-map-fibered-equiv = map-emb emb-fibered-map-fibered-equiv + fibered-map-fibered-equiv : fibered-equiv f g → fibered-map f g + fibered-map-fibered-equiv = map-emb emb-fibered-map-fibered-equiv + + is-emb-fibered-map-fibered-equiv : is-emb fibered-map-fibered-equiv + is-emb-fibered-map-fibered-equiv = + is-emb-map-emb emb-fibered-map-fibered-equiv +``` + +### Extensionality for equivalences over + +```agda +module _ + {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3} {Y : UU l4} + (f : A → X) (g : B → Y) (i : X → Y) + where + + extensionality-equiv-over : + (e e' : equiv-over f g i) → + ( e = e') ≃ + ( htpy-map-over f g i + ( map-over-equiv-over f g i e) + ( map-over-equiv-over f g i e')) + extensionality-equiv-over e e' = + ( extensionality-map-over f g i + ( map-over-equiv-over f g i e) + ( map-over-equiv-over f g i e')) ∘e + ( equiv-ap-emb (emb-map-over-equiv-over f g i)) + + htpy-eq-equiv-over : + (e e' : equiv-over f g i) → + ( e = e') → + ( htpy-map-over f g i + ( map-over-equiv-over f g i e) + ( map-over-equiv-over f g i e')) + htpy-eq-equiv-over e e' = map-equiv (extensionality-equiv-over e e') + + eq-htpy-equiv-over : + (e e' : equiv-over f g i) → + htpy-map-over f g i + ( map-over-equiv-over f g i e) + ( map-over-equiv-over f g i e') → + e = e' + eq-htpy-equiv-over e e' = map-inv-equiv (extensionality-equiv-over e e') +``` + +### Extensionality for fibered equivalences + +```agda +module _ + {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3} {Y : UU l4} + (f : A → X) (g : B → Y) + where + + extensionality-fibered-equiv : + (e e' : fibered-equiv f g) → + ( e = e') ≃ + ( htpy-fibered-map f g + ( fibered-map-fibered-equiv f g e) + ( fibered-map-fibered-equiv f g e')) + extensionality-fibered-equiv e e' = + ( extensionality-fibered-map f g + ( fibered-map-fibered-equiv f g e) + ( fibered-map-fibered-equiv f g e')) ∘e + ( equiv-ap-emb (emb-fibered-map-fibered-equiv f g)) + + htpy-eq-fibered-equiv : + (e e' : fibered-equiv f g) → + ( e = e') → + ( htpy-fibered-map f g + ( fibered-map-fibered-equiv f g e) + ( fibered-map-fibered-equiv f g e')) + htpy-eq-fibered-equiv e e' = map-equiv (extensionality-fibered-equiv e e') + + eq-htpy-fibered-equiv : + (e e' : fibered-equiv f g) → + htpy-fibered-map f g + ( fibered-map-fibered-equiv f g e) + ( fibered-map-fibered-equiv f g e') → + e = e' + eq-htpy-fibered-equiv e e' = map-inv-equiv (extensionality-fibered-equiv e e') ``` ### Fibered equivalences are pullback squares @@ -279,7 +361,7 @@ is-pullback-fibered-equiv : is-pullback ( pr1 (pr1 e)) ( g) - ( cone-fibered-map f g (map-fibered-map-fibered-equiv f g e)) + ( cone-fibered-map f g (fibered-map-fibered-equiv f g e)) is-pullback-fibered-equiv f g ((i , is-equiv-i) , (h , is-equiv-h) , H) = is-pullback-is-fibered-equiv f g (i , h , H) (is-equiv-i , is-equiv-h) ``` diff --git a/src/foundation/fibered-involutions.lagda.md b/src/foundation/fibered-involutions.lagda.md index d6f0e5c1b4..7ac675eebc 100644 --- a/src/foundation/fibered-involutions.lagda.md +++ b/src/foundation/fibered-involutions.lagda.md @@ -9,13 +9,13 @@ module foundation.fibered-involutions where ```agda open import foundation.dependent-pair-types open import foundation.fibered-maps +open import foundation.involutions open import foundation.universe-levels open import foundation-core.cartesian-product-types open import foundation-core.equivalences open import foundation-core.function-types open import foundation-core.homotopies -open import foundation-core.involutions ```
@@ -103,7 +103,7 @@ module _ is-equiv-map-Σ-is-fibered-involution-fibered-map-fibered-involution : is-equiv (map-Σ-is-fibered-involution-fibered-map-fibered-involution) is-equiv-map-Σ-is-fibered-involution-fibered-map-fibered-involution = - is-equiv-has-inverse + is-equiv-is-invertible ( map-fibered-involution-Σ-is-fibered-involution-fibered-map) ( refl-htpy) ( refl-htpy) @@ -119,7 +119,7 @@ module _ is-equiv-map-fibered-involution-Σ-is-fibered-involution-fibered-map : is-equiv (map-fibered-involution-Σ-is-fibered-involution-fibered-map) is-equiv-map-fibered-involution-Σ-is-fibered-involution-fibered-map = - is-equiv-has-inverse + is-equiv-is-invertible ( map-Σ-is-fibered-involution-fibered-map-fibered-involution) ( refl-htpy) ( refl-htpy) diff --git a/src/foundation/fibered-maps.lagda.md b/src/foundation/fibered-maps.lagda.md index 5899823075..fa9614a5c3 100644 --- a/src/foundation/fibered-maps.lagda.md +++ b/src/foundation/fibered-maps.lagda.md @@ -14,10 +14,14 @@ open import foundation.fundamental-theorem-of-identity-types open import foundation.homotopies open import foundation.slice open import foundation.structure-identity-principle +open import foundation.type-arithmetic-dependent-pair-types +open import foundation.unit-type +open import foundation.universal-property-empty-type open import foundation.universe-levels open import foundation-core.commuting-squares-of-maps open import foundation-core.contractible-types +open import foundation-core.empty-types open import foundation-core.equality-dependent-pair-types open import foundation-core.equivalences open import foundation-core.fibers-of-maps @@ -56,7 +60,7 @@ module _ where is-map-over : (X → Y) → (A → B) → UU (l1 ⊔ l4) - is-map-over i h = coherence-square-maps h f g i -- (i ∘ f) ~ (g ∘ h) + is-map-over i h = coherence-square-maps h f g i map-over : (X → Y) → UU (l1 ⊔ l2 ⊔ l4) map-over i = Σ (A → B) (is-map-over i) @@ -261,7 +265,7 @@ module _ is-equiv-fiberwise-map-over-map-over : is-equiv (fiberwise-map-over-map-over) is-equiv-fiberwise-map-over-map-over = - is-equiv-has-inverse + is-equiv-is-invertible ( map-over-fiberwise-map-over) ( is-section-map-over-fiberwise-map-over) ( is-retraction-map-over-fiberwise-map-over) @@ -270,7 +274,7 @@ module _ is-equiv-map-over-fiberwise-map-over : is-equiv (map-over-fiberwise-map-over) is-equiv-map-over-fiberwise-map-over = - is-equiv-has-inverse + is-equiv-is-invertible ( fiberwise-map-over-map-over) ( is-retraction-map-over-fiberwise-map-over) ( is-section-map-over-fiberwise-map-over) @@ -433,6 +437,94 @@ module _ transpose-map-over f g i hH ``` +### If the top left corner is empty, the type of fibered maps is equivalent to maps `X → Y` + +```text + ! +empty ---> B + | | + !| |g + V V + X -----> Y + i +``` + +```agda +module _ + {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3} {Y : UU l4} + (f : A → X) (g : B → Y) (is-empty-A : is-empty A) + where + + inv-compute-fibered-map-is-empty : (fibered-map f g) ≃ (X → Y) + inv-compute-fibered-map-is-empty = + right-unit-law-Σ-is-contr + ( λ i → + is-contr-Σ + ( universal-property-empty-is-empty A is-empty-A B) + ( ex-falso ∘ is-empty-A) + ( dependent-universal-property-empty-is-empty A is-empty-A + ( λ z → (i ∘ f) z = (g ∘ (ex-falso ∘ is-empty-A)) z))) + + compute-fibered-map-is-empty : (X → Y) ≃ (fibered-map f g) + compute-fibered-map-is-empty = inv-equiv inv-compute-fibered-map-is-empty + +module _ + { l2 l3 l4 : Level} {B : UU l2} {X : UU l3} {Y : UU l4} + {f : empty → X} (g : B → Y) + where + + inv-compute-fibered-map-empty : (fibered-map f g) ≃ (X → Y) + inv-compute-fibered-map-empty = inv-compute-fibered-map-is-empty f g id + + compute-fibered-map-empty : (X → Y) ≃ (fibered-map f g) + compute-fibered-map-empty = compute-fibered-map-is-empty f g id +``` + +### If the bottom right corner is contractible, the type of fibered maps is equivalent to maps `A → B` + +```text + A -----> B + | | + f| |! + V V + X ---> unit + ! +``` + +```agda +module _ + {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3} {Y : UU l4} + (f : A → X) (g : B → Y) (is-contr-Y : is-contr Y) + where + + inv-compute-fibered-map-is-contr : (fibered-map f g) ≃ (A → B) + inv-compute-fibered-map-is-contr = + ( right-unit-law-Σ-is-contr + ( λ j → + is-contr-Π + ( λ x → + is-prop-is-contr + is-contr-Y (((λ _ → center is-contr-Y) ∘ f) x) ((g ∘ j) x)))) ∘e + ( left-unit-law-Σ-is-contr + ( is-contr-function-type is-contr-Y) + ( λ _ → center is-contr-Y)) + + compute-fibered-map-is-contr : (A → B) ≃ (fibered-map f g) + compute-fibered-map-is-contr = inv-equiv inv-compute-fibered-map-is-contr + +module _ + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3} + (f : A → X) {g : B → unit} + where + + inv-compute-fibered-map-unit : (fibered-map f g) ≃ (A → B) + inv-compute-fibered-map-unit = + inv-compute-fibered-map-is-contr f g is-contr-unit + + compute-fibered-map-unit : (A → B) ≃ (fibered-map f g) + compute-fibered-map-unit = compute-fibered-map-is-contr f g is-contr-unit +``` + ## Examples ```agda @@ -464,14 +556,7 @@ module _ pr2 id-fibered-map = id-map-over ``` -```agda -module _ - {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3} {Y : UU l4} - (f : A → X) (g : B → Y) (j : X → B) - where +## See also - diagonal-fibered-map : fibered-map f g - pr1 diagonal-fibered-map = g ∘ j - pr1 (pr2 diagonal-fibered-map) = j ∘ f - pr2 (pr2 diagonal-fibered-map) = refl-htpy -``` +- For the pullback property of the type of fibered maps, see + [the pullback-hom](orthogonal-factorization-systems.pullback-hom.md) diff --git a/src/foundation/functional-correspondences.lagda.md b/src/foundation/functional-correspondences.lagda.md index 61318be8f4..4b16d09458 100644 --- a/src/foundation/functional-correspondences.lagda.md +++ b/src/foundation/functional-correspondences.lagda.md @@ -225,7 +225,7 @@ module _ is-equiv-functional-correspondence-function : is-equiv functional-correspondence-function is-equiv-functional-correspondence-function = - is-equiv-has-inverse + is-equiv-is-invertible function-functional-correspondence is-section-function-functional-correspondence is-retraction-function-functional-correspondence diff --git a/src/foundation/functoriality-cartesian-product-types.lagda.md b/src/foundation/functoriality-cartesian-product-types.lagda.md index 5e5ec5eb4b..61734a6a0d 100644 --- a/src/foundation/functoriality-cartesian-product-types.lagda.md +++ b/src/foundation/functoriality-cartesian-product-types.lagda.md @@ -114,7 +114,7 @@ module _ (f : A → C) (g : B → D) → is-equiv f → is-equiv g → is-equiv (map-prod f g) is-equiv-map-prod f g H K = - is-equiv-has-inverse + is-equiv-is-invertible ( map-inv-map-prod f g H K) ( is-section-map-inv-map-prod f g H K) ( is-retraction-map-inv-map-prod f g H K) @@ -166,7 +166,7 @@ module _ is-equiv-map-compute-fiber-map-prod : (t : C × D) → is-equiv (map-compute-fiber-map-prod t) is-equiv-map-compute-fiber-map-prod t = - is-equiv-has-inverse + is-equiv-is-invertible ( map-inv-compute-fiber-map-prod t) ( is-section-map-inv-compute-fiber-map-prod t) ( is-retraction-map-inv-compute-fiber-map-prod t) diff --git a/src/foundation/functoriality-coproduct-types.lagda.md b/src/foundation/functoriality-coproduct-types.lagda.md index 001633b0fc..9a8b67cce7 100644 --- a/src/foundation/functoriality-coproduct-types.lagda.md +++ b/src/foundation/functoriality-coproduct-types.lagda.md @@ -140,7 +140,7 @@ module _ is-equiv-fiber-map-coprod-inl-fiber : (x : A) → is-equiv (fiber-map-coprod-inl-fiber x) is-equiv-fiber-map-coprod-inl-fiber x = - is-equiv-has-inverse + is-equiv-is-invertible ( fiber-fiber-map-coprod-inl x) ( is-section-fiber-fiber-map-coprod-inl x) ( is-retraction-fiber-fiber-map-coprod-inl x) @@ -176,7 +176,7 @@ module _ is-equiv-fiber-map-coprod-inr-fiber : (y : B) → is-equiv (fiber-map-coprod-inr-fiber y) is-equiv-fiber-map-coprod-inr-fiber y = - is-equiv-has-inverse + is-equiv-is-invertible ( fiber-fiber-map-coprod-inr y) ( is-section-fiber-fiber-map-coprod-inr y) ( is-retraction-fiber-fiber-map-coprod-inr y) @@ -270,9 +270,9 @@ is-contr-fiber-map-coprod {A = A} {B} {C} {D} f g = ( equiv-tot ( λ fg' → ( ( equiv-prod - ( equiv-map-Π + ( equiv-Π-equiv-family ( λ a → compute-eq-coprod-inl-inl (pr1 fg' a) (f a))) - ( equiv-map-Π + ( equiv-Π-equiv-family ( λ c → compute-eq-coprod-inr-inr (pr2 fg' c) (g c)))) ∘e ( equiv-dependent-universal-property-coprod ( λ x → @@ -401,7 +401,7 @@ module _ pr1 (pr1 (retraction-equiv-coprod f g p)) x = cases-retraction-equiv-coprod f g p x (map-equiv f (inl x)) refl pr2 (pr1 (retraction-equiv-coprod f g p)) = - is-equiv-has-inverse + is-equiv-is-invertible ( λ x → inv-cases-retraction-equiv-coprod f g p x ( map-inv-equiv f (inl x)) @@ -479,7 +479,7 @@ module _ (e : (P + Q) ≃ (P' + Q')) (u : P + Q) → is-left u ≃ is-left (map-equiv e u) pr1 (equiv-left-to-left e u) = left-to-left ¬PQ' e u pr2 (equiv-left-to-left e u) = - is-equiv-has-inverse + is-equiv-is-invertible ( tr is-left (is-retraction-map-inv-equiv e u) ∘ left-to-left ¬P'Q (inv-equiv e) (map-equiv e u)) ( λ _ → eq-is-prop (is-prop-is-left (map-equiv e u))) @@ -490,7 +490,7 @@ module _ is-right u ≃ is-right (map-equiv e u) pr1 (equiv-right-to-right e u) = right-to-right ¬P'Q e u pr2 (equiv-right-to-right e u) = - is-equiv-has-inverse + is-equiv-is-invertible ( tr is-right (is-retraction-map-inv-equiv e u) ∘ right-to-right ¬PQ' (inv-equiv e) (map-equiv e u)) (λ _ → eq-is-prop (is-prop-is-right (map-equiv e u))) @@ -535,7 +535,7 @@ module _ ((P + Q) ≃ (P' + Q')) ≃ ((P ≃ P') × (Q ≃ Q')) pr1 equiv-mutually-exclusive-coprod = map-mutually-exclusive-coprod pr2 equiv-mutually-exclusive-coprod = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-mutually-exclusive-coprod is-retraction-map-inv-mutually-exclusive-coprod is-section-map-inv-mutually-exclusive-coprod diff --git a/src/foundation/functoriality-dependent-function-types.lagda.md b/src/foundation/functoriality-dependent-function-types.lagda.md index 0c7f48813c..fd4fd354e3 100644 --- a/src/foundation/functoriality-dependent-function-types.lagda.md +++ b/src/foundation/functoriality-dependent-function-types.lagda.md @@ -15,7 +15,6 @@ open import foundation.equivalence-extensionality open import foundation.equivalences open import foundation.function-extensionality open import foundation.transport -open import foundation.type-theoretic-principle-of-choice open import foundation.unit-type open import foundation.universal-property-unit-type open import foundation.universe-levels @@ -60,6 +59,40 @@ module _ ( map-equiv (f (map-inv-equiv e a))))) ∘ ( precomp-Π (map-inv-equiv e) B') + abstract + is-equiv-map-equiv-Π : is-equiv map-equiv-Π + is-equiv-map-equiv-Π = + is-equiv-comp + ( map-Π + ( λ a → + ( tr B (is-section-map-inv-is-equiv (is-equiv-map-equiv e) a)) ∘ + ( map-equiv (f (map-inv-is-equiv (is-equiv-map-equiv e) a))))) + ( precomp-Π (map-inv-is-equiv (is-equiv-map-equiv e)) B') + ( is-equiv-precomp-Π-is-equiv + ( map-inv-is-equiv (is-equiv-map-equiv e)) + ( is-equiv-map-inv-is-equiv (is-equiv-map-equiv e)) + ( B')) + ( is-equiv-map-equiv-Π-equiv-family + ( λ a → + ( tr B (is-section-map-inv-is-equiv (is-equiv-map-equiv e) a)) ∘ + ( map-equiv (f (map-inv-is-equiv (is-equiv-map-equiv e) a)))) + ( λ a → + is-equiv-comp + ( tr B (is-section-map-inv-is-equiv (is-equiv-map-equiv e) a)) + ( map-equiv (f (map-inv-is-equiv (is-equiv-map-equiv e) a))) + ( is-equiv-map-equiv + ( f (map-inv-is-equiv (is-equiv-map-equiv e) a))) + ( is-equiv-tr B + ( is-section-map-inv-is-equiv (is-equiv-map-equiv e) a)))) + + equiv-Π : ((a' : A') → B' a') ≃ ((a : A) → B a) + pr1 equiv-Π = map-equiv-Π + pr2 equiv-Π = is-equiv-map-equiv-Π +``` + +#### Computing `map-equiv-Π` + +```agda compute-map-equiv-Π : (h : (a' : A') → B' a') (a' : A') → map-equiv-Π h (map-equiv e a') = map-equiv (f a') (h a') @@ -86,51 +119,10 @@ module _ tr (B ∘ map-equiv e) p (map-equiv (f x) (h x)) = map-equiv (f a') (h a') α x refl = refl - abstract - is-equiv-map-equiv-Π : is-equiv map-equiv-Π - is-equiv-map-equiv-Π = - is-equiv-comp - ( map-Π (λ a → - ( tr B (is-section-map-inv-is-equiv (is-equiv-map-equiv e) a)) ∘ - ( map-equiv (f (map-inv-is-equiv (is-equiv-map-equiv e) a))))) - ( precomp-Π (map-inv-is-equiv (is-equiv-map-equiv e)) B') - ( is-equiv-precomp-Π-is-equiv - ( map-inv-is-equiv (is-equiv-map-equiv e)) - ( is-equiv-map-inv-is-equiv (is-equiv-map-equiv e)) - ( B')) - ( is-equiv-map-Π _ - ( λ a → is-equiv-comp - ( tr B (is-section-map-inv-is-equiv (is-equiv-map-equiv e) a)) - ( map-equiv (f (map-inv-is-equiv (is-equiv-map-equiv e) a))) - ( is-equiv-map-equiv - ( f (map-inv-is-equiv (is-equiv-map-equiv e) a))) - ( is-equiv-tr B - ( is-section-map-inv-is-equiv (is-equiv-map-equiv e) a)))) - - equiv-Π : ((a' : A') → B' a') ≃ ((a : A) → B a) - pr1 equiv-Π = map-equiv-Π - pr2 equiv-Π = is-equiv-map-equiv-Π -``` - -### The functorial action of dependent function types preserves identity morphisms - -```agda id-map-equiv-Π : { l1 l2 : Level} {A : UU l1} (B : A → UU l2) → ( map-equiv-Π B (id-equiv {A = A}) (λ a → id-equiv {A = B a})) ~ id -id-map-equiv-Π B h = eq-htpy (compute-map-equiv-Π B id-equiv (λ a → id-equiv) h) -``` - -### The fibers of `map-Π'` - -```agda -equiv-fiber-map-Π' : - {l1 l2 l3 l4 : Level} {I : UU l1} {A : I → UU l2} {B : I → UU l3} - {J : UU l4} (α : J → I) (f : (i : I) → A i → B i) - (h : (j : J) → B (α j)) → - ((j : J) → fiber (f (α j)) (h j)) ≃ fiber (map-Π' α f) h -equiv-fiber-map-Π' α f h = - equiv-tot (λ x → equiv-eq-htpy) ∘e distributive-Π-Σ +id-map-equiv-Π B h = eq-htpy (compute-map-equiv-Π B id-equiv (λ _ → id-equiv) h) ``` ### Truncated families of maps induce truncated maps on dependent function types @@ -144,7 +136,7 @@ abstract is-trunc-map-map-Π k {I = I} f H h = is-trunc-equiv' k ( (i : I) → fiber (f i) (h i)) - ( equiv-fiber-map-Π f h) + ( compute-fiber-map-Π f h) ( is-trunc-Π k (λ i → H i (h i))) abstract @@ -174,7 +166,7 @@ is-trunc-map-map-Π-is-trunc-map' : is-trunc-map-map-Π-is-trunc-map' k {J = J} α f H h = is-trunc-equiv' k ( (j : J) → fiber (f (α j)) (h j)) - ( equiv-fiber-map-Π' α f h) + ( compute-fiber-map-Π' α f h) ( is-trunc-Π k (λ j → H (α j) (h j))) is-trunc-map-is-trunc-map-map-Π' : @@ -270,7 +262,7 @@ abstract is-equiv-map-automorphism-Π {B = B} e f = is-equiv-comp _ _ ( is-equiv-precomp-Π-is-equiv _ (is-equiv-map-equiv e) B) - ( is-equiv-map-Π _ + ( is-equiv-map-equiv-Π-equiv-family _ ( λ a → is-equiv-map-inv-is-equiv (is-equiv-map-equiv (f a)))) automorphism-Π : diff --git a/src/foundation/functoriality-dependent-pair-types.lagda.md b/src/foundation/functoriality-dependent-pair-types.lagda.md index c5896ad8ed..c13a0d0134 100644 --- a/src/foundation/functoriality-dependent-pair-types.lagda.md +++ b/src/foundation/functoriality-dependent-pair-types.lagda.md @@ -9,14 +9,14 @@ open import foundation-core.functoriality-dependent-pair-types public
Imports ```agda -open import foundation.commuting-squares-of-maps open import foundation.cones-over-cospans -open import foundation.dependent-identifications open import foundation.dependent-pair-types -open import foundation.equality-dependent-pair-types open import foundation.type-arithmetic-dependent-pair-types open import foundation.universe-levels +open import foundation-core.commuting-squares-of-maps +open import foundation-core.dependent-identifications +open import foundation-core.equality-dependent-pair-types open import foundation-core.equivalences open import foundation-core.function-types open import foundation-core.homotopies diff --git a/src/foundation/functoriality-fibers-of-maps.lagda.md b/src/foundation/functoriality-fibers-of-maps.lagda.md index 5cf7416969..83691df19a 100644 --- a/src/foundation/functoriality-fibers-of-maps.lagda.md +++ b/src/foundation/functoriality-fibers-of-maps.lagda.md @@ -1,4 +1,4 @@ -# The functoriality of `fib` +# The functoriality of `fiber` ```agda module foundation.functoriality-fibers-of-maps where diff --git a/src/foundation/functoriality-function-types.lagda.md b/src/foundation/functoriality-function-types.lagda.md index d55a9df047..400f1ea750 100644 --- a/src/foundation/functoriality-function-types.lagda.md +++ b/src/foundation/functoriality-function-types.lagda.md @@ -9,14 +9,18 @@ open import foundation-core.functoriality-function-types public
Imports ```agda -open import foundation.function-extensionality +open import foundation.action-on-identifications-functions +open import foundation.dependent-pair-types open import foundation.functoriality-dependent-function-types open import foundation.unit-type open import foundation.universe-levels open import foundation-core.constant-maps +open import foundation-core.embeddings +open import foundation-core.equivalences open import foundation-core.function-types -open import foundation-core.homotopies +open import foundation-core.identity-types +open import foundation-core.propositional-maps open import foundation-core.truncated-maps open import foundation-core.truncation-levels ``` @@ -25,40 +29,88 @@ open import foundation-core.truncation-levels ## Properties +### Equivalent types have equivalent function types + ```agda -is-trunc-map-postcomp-is-trunc-map : - {l1 l2 l3 : Level} (k : 𝕋) (A : UU l3) {X : UU l1} {Y : UU l2} (f : X → Y) → - is-trunc-map k f → is-trunc-map k (postcomp A f) -is-trunc-map-postcomp-is-trunc-map k A {X} {Y} f is-trunc-f = - is-trunc-map-map-Π-is-trunc-map' k - ( const A unit star) - ( const unit (X → Y) f) - ( const unit (is-trunc-map k f) is-trunc-f) - -is-trunc-map-is-trunc-map-postcomp : - {l1 l2 : Level} (k : 𝕋) {X : UU l1} {Y : UU l2} (f : X → Y) → - ( {l3 : Level} (A : UU l3) → is-trunc-map k (postcomp A f)) → - is-trunc-map k f -is-trunc-map-is-trunc-map-postcomp k {X} {Y} f is-trunc-post-f = - is-trunc-map-is-trunc-map-map-Π' k - ( const unit (X → Y) f) - ( λ {l} {J} α → is-trunc-post-f {l} J) - ( star) +module _ + { l1 l2 l3 l4 : Level} + { A' : UU l1} {B' : UU l2} {A : UU l3} (B : UU l4) + ( e : A' ≃ A) (f : B' ≃ B) + where + + map-equiv-function-type : (A' → B') → (A → B) + map-equiv-function-type h = map-equiv f ∘ (h ∘ map-inv-equiv e) + + compute-map-equiv-function-type : + (h : A' → B') (x : A') → + map-equiv-function-type h (map-equiv e x) = map-equiv f (h x) + compute-map-equiv-function-type h x = + ap (map-equiv f ∘ h) (is-retraction-map-inv-equiv e x) + + is-equiv-map-equiv-function-type : is-equiv map-equiv-function-type + is-equiv-map-equiv-function-type = + is-equiv-comp + ( precomp (map-equiv (inv-equiv e)) B) + ( postcomp A' (map-equiv f)) + ( is-equiv-postcomp-equiv f A') + ( is-equiv-precomp-equiv (inv-equiv e) B) + + equiv-function-type : (A' → B') ≃ (A → B) + pr1 equiv-function-type = map-equiv-function-type + pr2 equiv-function-type = is-equiv-map-equiv-function-type ``` -### The precomposition function preserves homotopies +### A map is truncated iff postcomposition by it is truncated ```agda -htpy-precomp : - {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} - {f g : A → B} (H : f ~ g) (C : UU l3) → - (precomp f C) ~ (precomp g C) -htpy-precomp H C h = eq-htpy (h ·l H) - -compute-htpy-precomp : - {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} (f : A → B) (C : UU l3) → - (htpy-precomp (refl-htpy' f) C) ~ refl-htpy -compute-htpy-precomp f C h = eq-htpy-refl-htpy (h ∘ f) +module _ + {l1 l2 : Level} (k : 𝕋) {X : UU l1} {Y : UU l2} (f : X → Y) + where + + is-trunc-map-postcomp-is-trunc-map : + is-trunc-map k f → + {l3 : Level} (A : UU l3) → is-trunc-map k (postcomp A f) + is-trunc-map-postcomp-is-trunc-map is-trunc-f A = + is-trunc-map-map-Π-is-trunc-map' k + ( const A unit star) + ( const unit (X → Y) f) + ( const unit (is-trunc-map k f) is-trunc-f) + + is-trunc-map-is-trunc-map-postcomp : + ({l3 : Level} (A : UU l3) → is-trunc-map k (postcomp A f)) → + is-trunc-map k f + is-trunc-map-is-trunc-map-postcomp is-trunc-postcomp-f = + is-trunc-map-is-trunc-map-map-Π' k + ( const unit (X → Y) f) + ( λ {l} {J} α → is-trunc-postcomp-f {l} J) + ( star) + +module _ + {l1 l2 : Level} {X : UU l1} {Y : UU l2} (f : X → Y) + where + + is-emb-postcomp-is-emb : + is-emb f → + {l3 : Level} (A : UU l3) → is-emb (postcomp A f) + is-emb-postcomp-is-emb is-emb-f A = + is-emb-is-prop-map + ( is-trunc-map-postcomp-is-trunc-map neg-one-𝕋 f + ( is-prop-map-is-emb is-emb-f) + ( A)) + + is-emb-is-emb-postcomp : + ({l3 : Level} (A : UU l3) → is-emb (postcomp A f)) → + is-emb f + is-emb-is-emb-postcomp is-emb-postcomp-f = + is-emb-is-prop-map + ( is-trunc-map-is-trunc-map-postcomp neg-one-𝕋 f + ( is-prop-map-is-emb ∘ is-emb-postcomp-f)) + +emb-postcomp : + {l1 l2 l3 : Level} {X : UU l1} {Y : UU l2} (f : X ↪ Y) (A : UU l3) → + (A → X) ↪ (A → Y) +pr1 (emb-postcomp f A) = postcomp A (map-emb f) +pr2 (emb-postcomp f A) = is-emb-postcomp-is-emb (map-emb f) (is-emb-map-emb f) A ``` ## See also diff --git a/src/foundation/functoriality-set-quotients.lagda.md b/src/foundation/functoriality-set-quotients.lagda.md index 3ec44a0412..2c8e5c3d24 100644 --- a/src/foundation/functoriality-set-quotients.lagda.md +++ b/src/foundation/functoriality-set-quotients.lagda.md @@ -14,6 +14,7 @@ open import foundation.dependent-pair-types open import foundation.equivalence-extensionality open import foundation.fundamental-theorem-of-identity-types open import foundation.homotopies +open import foundation.logical-equivalences open import foundation.reflecting-maps-equivalence-relations open import foundation.set-quotients open import foundation.subtype-identity-principle @@ -28,7 +29,6 @@ open import foundation-core.equivalence-relations open import foundation-core.equivalences open import foundation-core.function-types open import foundation-core.identity-types -open import foundation-core.logical-equivalences open import foundation-core.propositions open import foundation-core.sets open import foundation-core.subtypes diff --git a/src/foundation/homotopies.lagda.md b/src/foundation/homotopies.lagda.md index eff798154e..e0a9f72d34 100644 --- a/src/foundation/homotopies.lagda.md +++ b/src/foundation/homotopies.lagda.md @@ -85,7 +85,7 @@ abstract {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} (f : (x : A) → B x) → FUNEXT f → IND-HTPY {l3 = l3} f IND-HTPY-FUNEXT {l3 = l3} {A = A} {B = B} f funext-f = - Ind-identity-system f + is-identity-system-is-torsorial f ( refl-htpy) ( is-contr-total-htpy f) @@ -94,7 +94,7 @@ abstract {l1 l2 : Level} {A : UU l1} {B : A → UU l2} (f : (x : A) → B x) → ({l : Level} → IND-HTPY {l3 = l} f) → FUNEXT f FUNEXT-IND-HTPY f ind-htpy-f = - fundamental-theorem-id-IND-identity-system f + fundamental-theorem-id-is-identity-system f ( refl-htpy) ( ind-htpy-f) ( λ g → htpy-eq) @@ -130,7 +130,7 @@ is-equiv-inv-htpy : {l1 l2 : Level} {A : UU l1} {B : A → UU l2} (f g : (x : A) → B x) → is-equiv (inv-htpy {f = f} {g = g}) is-equiv-inv-htpy f g = - is-equiv-has-inverse + is-equiv-is-invertible ( inv-htpy) ( λ H → eq-htpy (λ x → inv-inv (H x))) ( λ H → eq-htpy (λ x → inv-inv (H x))) @@ -185,7 +185,7 @@ module _ is-equiv-concat-htpy' : is-equiv (concat-htpy' f K) is-equiv-concat-htpy' = - is-equiv-has-inverse + is-equiv-is-invertible ( concat-inv-htpy' f K) ( is-section-concat-inv-htpy') ( is-retraction-concat-inv-htpy') @@ -206,7 +206,8 @@ module _ is-equiv-left-transpose-htpy-concat : is-equiv (left-transpose-htpy-concat H K L) is-equiv-left-transpose-htpy-concat = - is-equiv-map-Π _ (λ x → is-equiv-left-transpose-eq-concat (H x) (K x) (L x)) + is-equiv-map-equiv-Π-equiv-family _ + ( λ x → is-equiv-left-transpose-eq-concat (H x) (K x) (L x)) equiv-left-transpose-htpy-concat : ((H ∙h K) ~ L) ≃ (K ~ ((inv-htpy H) ∙h L)) equiv-left-transpose-htpy-concat = @@ -215,12 +216,29 @@ module _ is-equiv-right-transpose-htpy-concat : is-equiv (right-transpose-htpy-concat H K L) is-equiv-right-transpose-htpy-concat = - is-equiv-map-Π _ + is-equiv-map-equiv-Π-equiv-family _ ( λ x → is-equiv-right-transpose-eq-concat (H x) (K x) (L x)) equiv-right-transpose-htpy-concat : ((H ∙h K) ~ L) ≃ (H ~ (L ∙h (inv-htpy K))) pr1 equiv-right-transpose-htpy-concat = right-transpose-htpy-concat H K L pr2 equiv-right-transpose-htpy-concat = is-equiv-right-transpose-htpy-concat + +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h : (x : A) → B x} + (H : f ~ h) (K : f ~ g) (L : g ~ h) + where + + equiv-left-transpose-htpy-concat' : (H ~ K ∙h L) ≃ (inv-htpy K ∙h H ~ L) + equiv-left-transpose-htpy-concat' = + ( equiv-inv-htpy L ((inv-htpy K) ∙h H)) ∘e + ( equiv-left-transpose-htpy-concat K L H) ∘e + ( equiv-inv-htpy H (K ∙h L)) + + equiv-right-transpose-htpy-concat' : (H ~ K ∙h L) ≃ (H ∙h inv-htpy L ~ K) + equiv-right-transpose-htpy-concat' = + ( equiv-inv-htpy K (H ∙h (inv-htpy L))) ∘e + ( equiv-right-transpose-htpy-concat K L H) ∘e + ( equiv-inv-htpy H (K ∙h L)) ``` ### Computing dependent-identifications in the type family `eq-value` of dependent functions diff --git a/src/foundation/identity-systems.lagda.md b/src/foundation/identity-systems.lagda.md index da6502913b..f43f47f342 100644 --- a/src/foundation/identity-systems.lagda.md +++ b/src/foundation/identity-systems.lagda.md @@ -1,6 +1,8 @@ # Identity systems ```agda +{-# OPTIONS --allow-unsolved-metas #-} + module foundation.identity-systems where ``` @@ -23,25 +25,39 @@ open import foundation-core.transport ## Idea -A unary identity system on a type `A` equipped with a point `a : A` consists of -a type family `B` over `A` equipped with a point `b : B a` that satisfies an -induction principle analogous to the induction principle of the identity type at -`a`. +A **(unary) identity system** on a type `A` equipped with a point `a : A` +consists of a type family `B` over `A` equipped with a point `b : B a` that +satisfies an induction principle analogous to the induction principle of the +[identity type](foundation.identity-types.md) at `a`. The +[dependent universal property of identity types](foundation.universal-property-identity-types.md) +also follows for identity systems. + +## Definitions + +### The predicate of being an identity system ```agda +ev-refl-identity-system : + {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {a : A} (b : B a) + {P : (x : A) (y : B x) → UU l3} → + ((x : A) (y : B x) → P x y) → P a b +ev-refl-identity-system b f = f _ b + module _ {l1 l2 : Level} (l : Level) {A : UU l1} (B : A → UU l2) (a : A) (b : B a) where - IND-identity-system : UU (l1 ⊔ l2 ⊔ lsuc l) - IND-identity-system = - ( P : (x : A) (y : B x) → UU l) → - section (λ (h : (x : A) (y : B x) → P x y) → h a b) + is-identity-system : UU (l1 ⊔ l2 ⊔ lsuc l) + is-identity-system = + (P : (x : A) (y : B x) → UU l) → section (ev-refl-identity-system b {P}) ``` ## Properties -### A type family over `A` is an identity system if and only if it is equivalent to the identity type +### A type family over `A` is an identity system if and only if its total space is contractible + +In [`foundation.torsorial-type-families`](foundation.torsorial-type-families.md) +we will start calling type families with contractible total space torsorial. ```agda module _ @@ -49,36 +65,36 @@ module _ where abstract - Ind-identity-system : - (is-contr-AB : is-contr (Σ A B)) → - {l : Level} → IND-identity-system l B a b - pr1 (Ind-identity-system is-contr-AB P) p x y = + is-identity-system-is-torsorial : + (H : is-contr (Σ A B)) → + {l : Level} → is-identity-system l B a b + pr1 (is-identity-system-is-torsorial H P) p x y = tr ( fam-Σ P) - ( eq-is-contr is-contr-AB) + ( eq-is-contr H) ( p) - pr2 (Ind-identity-system is-contr-AB P) p = + pr2 (is-identity-system-is-torsorial H P) p = ap ( λ t → tr (fam-Σ P) t p) ( eq-is-contr' - ( is-prop-is-contr is-contr-AB (pair a b) (pair a b)) - ( eq-is-contr is-contr-AB) + ( is-prop-is-contr H (pair a b) (pair a b)) + ( eq-is-contr H) ( refl)) abstract - is-contr-total-space-IND-identity-system : - ({l : Level} → IND-identity-system l B a b) → is-contr (Σ A B) - pr1 (pr1 (is-contr-total-space-IND-identity-system ind)) = a - pr2 (pr1 (is-contr-total-space-IND-identity-system ind)) = b - pr2 (is-contr-total-space-IND-identity-system ind) (pair x y) = - pr1 (ind (λ x' y' → (pair a b) = (pair x' y'))) refl x y + is-torsorial-is-identity-system : + ({l : Level} → is-identity-system l B a b) → is-contr (Σ A B) + pr1 (pr1 (is-torsorial-is-identity-system H)) = a + pr2 (pr1 (is-torsorial-is-identity-system H)) = b + pr2 (is-torsorial-is-identity-system H) (pair x y) = + pr1 (H (λ x' y' → (pair a b) = (pair x' y'))) refl x y abstract - fundamental-theorem-id-IND-identity-system : - ({l : Level} → IND-identity-system l B a b) → + fundamental-theorem-id-is-identity-system : + ({l : Level} → is-identity-system l B a b) → (f : (x : A) → a = x → B x) → (x : A) → is-equiv (f x) - fundamental-theorem-id-IND-identity-system ind f = + fundamental-theorem-id-is-identity-system H f = fundamental-theorem-id - ( is-contr-total-space-IND-identity-system ind) + ( is-torsorial-is-identity-system H) ( f) ``` diff --git a/src/foundation/identity-types.lagda.md b/src/foundation/identity-types.lagda.md index 0e1a93879b..c2a206f503 100644 --- a/src/foundation/identity-types.lagda.md +++ b/src/foundation/identity-types.lagda.md @@ -86,7 +86,7 @@ module _ abstract is-equiv-inv : (x y : A) → is-equiv (λ (p : x = y) → inv p) - is-equiv-inv x y = is-equiv-has-inverse inv inv-inv inv-inv + is-equiv-inv x y = is-equiv-is-invertible inv inv-inv inv-inv equiv-inv : (x y : A) → (x = y) ≃ (y = x) pr1 (equiv-inv x y) = inv @@ -107,7 +107,7 @@ module _ is-equiv-concat : {x y : A} (p : x = y) (z : A) → is-equiv (concat p z) is-equiv-concat p z = - is-equiv-has-inverse + is-equiv-is-invertible ( inv-concat p z) ( is-section-inv-concat p z) ( is-retraction-inv-concat p z) @@ -121,7 +121,7 @@ module _ {x x' : A} → ((y : A) → (x = y) ≃ (x' = y)) ≃ (x' = x) pr1 (equiv-concat-equiv {x}) e = map-equiv (e x) refl pr2 equiv-concat-equiv = - is-equiv-has-inverse + is-equiv-is-invertible equiv-concat (λ { refl → refl}) (λ e → eq-htpy (λ y → eq-htpy-equiv (λ { refl → right-unit}))) @@ -141,7 +141,7 @@ module _ is-equiv-concat' : (x : A) {y z : A} (q : y = z) → is-equiv (concat' x q) is-equiv-concat' x q = - is-equiv-has-inverse + is-equiv-is-invertible ( inv-concat' x q) ( is-section-inv-concat' x q) ( is-retraction-inv-concat' x q) diff --git a/src/foundation/impredicative-encodings.lagda.md b/src/foundation/impredicative-encodings.lagda.md index 6bea18ab02..c25a790a7f 100644 --- a/src/foundation/impredicative-encodings.lagda.md +++ b/src/foundation/impredicative-encodings.lagda.md @@ -11,6 +11,7 @@ open import foundation.conjunction open import foundation.dependent-pair-types open import foundation.disjunction open import foundation.existential-quantification +open import foundation.logical-equivalences open import foundation.negation open import foundation.propositional-truncations open import foundation.universe-levels @@ -19,7 +20,6 @@ open import foundation-core.coproduct-types open import foundation-core.empty-types open import foundation-core.equivalences open import foundation-core.identity-types -open import foundation-core.logical-equivalences open import foundation-core.propositions open import foundation-core.sets ``` diff --git a/src/foundation/invertible-maps.lagda.md b/src/foundation/invertible-maps.lagda.md new file mode 100644 index 0000000000..a5ded35fbb --- /dev/null +++ b/src/foundation/invertible-maps.lagda.md @@ -0,0 +1,304 @@ +# Invertible maps + +```agda +module foundation.invertible-maps where + +open import foundation-core.invertible-maps public +``` + +
Imports + +```agda +open import foundation.commuting-triangles-of-homotopies +open import foundation.dependent-pair-types +open import foundation.equality-cartesian-product-types +open import foundation.equivalences +open import foundation.function-extensionality +open import foundation.functoriality-cartesian-product-types +open import foundation.fundamental-theorem-of-identity-types +open import foundation.homotopies +open import foundation.retractions +open import foundation.sections +open import foundation.structure-identity-principle +open import foundation.type-arithmetic-dependent-pair-types +open import foundation.universe-levels + +open import foundation-core.cartesian-product-types +open import foundation-core.contractible-types +open import foundation-core.function-types +open import foundation-core.identity-types +open import foundation-core.truncated-types +open import foundation-core.truncation-levels +``` + +
+ +## Properties + +### Characterizing equality of invertible maps + +#### Characterizing equality of `is-inverse` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} {g : B → A} + where + + htpy-is-inverse : (s t : is-inverse f g) → UU (l1 ⊔ l2) + htpy-is-inverse s t = (pr1 s ~ pr1 t) × (pr2 s ~ pr2 t) + + extensionality-is-inverse : + {s t : is-inverse f g} → (s = t) ≃ htpy-is-inverse s t + extensionality-is-inverse {s} {t} = + equiv-prod equiv-funext equiv-funext ∘e equiv-pair-eq s t + + htpy-eq-is-inverse : {s t : is-inverse f g} → s = t → htpy-is-inverse s t + htpy-eq-is-inverse = map-equiv extensionality-is-inverse + + eq-htpy-is-inverse : {s t : is-inverse f g} → htpy-is-inverse s t → s = t + eq-htpy-is-inverse = map-inv-equiv extensionality-is-inverse +``` + +#### Characterizing equality of `is-invertible` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} + where + + coherence-htpy-is-invertible : + (s t : is-invertible f) → + map-inv-is-invertible s ~ map-inv-is-invertible t → UU (l1 ⊔ l2) + coherence-htpy-is-invertible s t H = + ( coherence-htpy-section {f = f} + ( section-is-invertible s) + ( section-is-invertible t) + ( H)) × + ( coherence-htpy-retraction + ( retraction-is-invertible s) + ( retraction-is-invertible t) + ( H)) + + htpy-is-invertible : (s t : is-invertible f) → UU (l1 ⊔ l2) + htpy-is-invertible s t = + Σ ( map-inv-is-invertible s ~ map-inv-is-invertible t) + ( coherence-htpy-is-invertible s t) + + refl-htpy-is-invertible : (s : is-invertible f) → htpy-is-invertible s s + pr1 (refl-htpy-is-invertible s) = refl-htpy + pr1 (pr2 (refl-htpy-is-invertible s)) = refl-htpy + pr2 (pr2 (refl-htpy-is-invertible s)) = refl-htpy + + htpy-eq-is-invertible : + (s t : is-invertible f) → s = t → htpy-is-invertible s t + htpy-eq-is-invertible s .s refl = refl-htpy-is-invertible s + + is-contr-total-htpy-is-invertible : + (s : is-invertible f) → + is-contr (Σ (is-invertible f) (htpy-is-invertible s)) + is-contr-total-htpy-is-invertible s = + is-contr-total-Eq-structure + ( λ x z → coherence-htpy-is-invertible s (x , z)) + ( is-contr-total-htpy (map-inv-is-invertible s)) + ( map-inv-is-invertible s , refl-htpy) + ( is-contr-total-Eq-structure + ( λ x z a → + coherence-htpy-retraction + ( retraction-is-invertible s) + ( retraction-is-invertible (map-inv-is-invertible s , x , z)) + ( refl-htpy)) + ( is-contr-total-htpy (is-retraction-is-invertible s)) + ( is-retraction-is-invertible s , refl-htpy) + (is-contr-total-htpy (is-section-is-invertible s))) + + is-equiv-htpy-eq-is-invertible : + (s t : is-invertible f) → is-equiv (htpy-eq-is-invertible s t) + is-equiv-htpy-eq-is-invertible s = + fundamental-theorem-id + ( is-contr-total-htpy-is-invertible s) + ( htpy-eq-is-invertible s) + + extensionality-is-invertible : + (s t : is-invertible f) → (s = t) ≃ (htpy-is-invertible s t) + pr1 (extensionality-is-invertible s t) = htpy-eq-is-invertible s t + pr2 (extensionality-is-invertible s t) = is-equiv-htpy-eq-is-invertible s t + + eq-htpy-is-invertible : + (s t : is-invertible f) → htpy-is-invertible s t → s = t + eq-htpy-is-invertible s t = map-inv-equiv (extensionality-is-invertible s t) +``` + +#### Characterizing equality of `invertible-map` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where + + coherence-htpy-invertible-map : + (s t : invertible-map A B) → + map-invertible-map s ~ map-invertible-map t → + map-inv-invertible-map s ~ map-inv-invertible-map t → UU (l1 ⊔ l2) + coherence-htpy-invertible-map s t H I = + ( coherence-triangle-homotopies + ( is-retraction-map-invertible-map s) + ( is-retraction-map-invertible-map t) + ( htpy-comp-horizontal I H)) × + ( coherence-triangle-homotopies + ( is-section-map-invertible-map s) + ( is-section-map-invertible-map t) + ( htpy-comp-horizontal H I)) + + htpy-invertible-map : (s t : invertible-map A B) → UU (l1 ⊔ l2) + htpy-invertible-map s t = + Σ ( map-invertible-map s ~ map-invertible-map t) + ( λ H → + Σ ( map-inv-invertible-map s ~ map-inv-invertible-map t) + ( coherence-htpy-invertible-map s t H)) + + refl-htpy-invertible-map : (s : invertible-map A B) → htpy-invertible-map s s + pr1 (refl-htpy-invertible-map s) = refl-htpy + pr1 (pr2 (refl-htpy-invertible-map s)) = refl-htpy + pr1 (pr2 (pr2 (refl-htpy-invertible-map s))) = refl-htpy + pr2 (pr2 (pr2 (refl-htpy-invertible-map s))) = refl-htpy + + htpy-eq-invertible-map : + (s t : invertible-map A B) → s = t → htpy-invertible-map s t + htpy-eq-invertible-map s .s refl = refl-htpy-invertible-map s + + is-contr-total-htpy-invertible-map : + (s : invertible-map A B) → + is-contr (Σ (invertible-map A B) (htpy-invertible-map s)) + is-contr-total-htpy-invertible-map s = + is-contr-total-Eq-structure + ( λ x z H → + Σ ( map-inv-invertible-map s ~ map-inv-invertible-map (x , z)) + ( coherence-htpy-invertible-map s (x , z) H)) + ( is-contr-total-htpy (map-invertible-map s)) + ( map-invertible-map s , refl-htpy) + ( is-contr-total-Eq-structure + ( λ x z → + coherence-htpy-invertible-map s + ( map-invertible-map s , x , z) + ( refl-htpy)) + ( is-contr-total-htpy (map-inv-invertible-map s)) + ( map-inv-invertible-map s , refl-htpy) + ( is-contr-total-Eq-structure + ( λ x z a → + ( is-section-map-invertible-map s) ~ + ( is-section-map-invertible-map + ( map-invertible-map s , map-inv-invertible-map s , x , z))) + ( is-contr-total-htpy (is-retraction-map-invertible-map s)) + ( is-retraction-map-invertible-map s , refl-htpy) + ( is-contr-total-htpy (is-section-map-invertible-map s)))) + + is-equiv-htpy-eq-invertible-map : + (s t : invertible-map A B) → is-equiv (htpy-eq-invertible-map s t) + is-equiv-htpy-eq-invertible-map s = + fundamental-theorem-id + ( is-contr-total-htpy-invertible-map s) + ( htpy-eq-invertible-map s) + + extensionality-invertible-map : + (s t : invertible-map A B) → (s = t) ≃ (htpy-invertible-map s t) + pr1 (extensionality-invertible-map s t) = htpy-eq-invertible-map s t + pr2 (extensionality-invertible-map s t) = is-equiv-htpy-eq-invertible-map s t + + eq-htpy-invertible-map : + (s t : invertible-map A B) → htpy-invertible-map s t → s = t + eq-htpy-invertible-map s t = map-inv-equiv (extensionality-invertible-map s t) +``` + +### If the domains are `k`-truncated, then the type of inverses is `k`-truncated + +```agda +module _ + {l1 l2 : Level} (k : 𝕋) {A : UU l1} {B : UU l2} + where + + is-trunc-is-inverse : + (f : A → B) (g : B → A) → + is-trunc (succ-𝕋 k) A → is-trunc (succ-𝕋 k) B → + is-trunc k (is-inverse f g) + is-trunc-is-inverse f g is-trunc-A is-trunc-B = + is-trunc-prod k + ( is-trunc-Π k (λ x → is-trunc-B (f (g x)) x)) + ( is-trunc-Π k (λ x → is-trunc-A (g (f x)) x)) + + is-trunc-is-invertible : + (f : A → B) → + is-trunc k A → is-trunc (succ-𝕋 k) B → + is-trunc k (is-invertible f) + is-trunc-is-invertible f is-trunc-A is-trunc-B = + is-trunc-Σ + ( is-trunc-function-type k is-trunc-A) + ( λ g → + is-trunc-is-inverse f g + ( is-trunc-succ-is-trunc k is-trunc-A) + ( is-trunc-B)) + + is-trunc-invertible-map : + is-trunc k A → is-trunc k B → + is-trunc k (invertible-map A B) + is-trunc-invertible-map is-trunc-A is-trunc-B = + is-trunc-Σ + ( is-trunc-function-type k is-trunc-B) + ( λ f → + is-trunc-is-invertible f + ( is-trunc-A) + ( is-trunc-succ-is-trunc k is-trunc-B)) +``` + +### The type `is-invertible id` is equivalent to `id ~ id` + +```agda +is-invertible-id-htpy-id-id : + {l : Level} (A : UU l) → + (id {A = A} ~ id {A = A}) → is-invertible (id {A = A}) +pr1 (is-invertible-id-htpy-id-id A H) = id +pr1 (pr2 (is-invertible-id-htpy-id-id A H)) = refl-htpy +pr2 (pr2 (is-invertible-id-htpy-id-id A H)) = H + +triangle-is-invertible-id-htpy-id-id : + {l : Level} (A : UU l) → + ( is-invertible-id-htpy-id-id A) ~ + ( ( map-associative-Σ + ( A → A) + ( λ g → (id ∘ g) ~ id) + ( λ s → (pr1 s ∘ id) ~ id)) ∘ + ( map-inv-left-unit-law-Σ-is-contr + { B = λ s → (pr1 s ∘ id) ~ id} + ( is-contr-section-is-equiv (is-equiv-id {_} {A})) + ( pair id refl-htpy))) +triangle-is-invertible-id-htpy-id-id A H = refl + +abstract + is-equiv-is-invertible-id-htpy-id-id : + {l : Level} (A : UU l) → is-equiv (is-invertible-id-htpy-id-id A) + is-equiv-is-invertible-id-htpy-id-id A = + is-equiv-comp-htpy + ( is-invertible-id-htpy-id-id A) + ( map-associative-Σ + ( A → A) + ( λ g → (id ∘ g) ~ id) + ( λ s → (pr1 s ∘ id) ~ id)) + ( map-inv-left-unit-law-Σ-is-contr + ( is-contr-section-is-equiv is-equiv-id) + ( pair id refl-htpy)) + ( triangle-is-invertible-id-htpy-id-id A) + ( is-equiv-map-inv-left-unit-law-Σ-is-contr + ( is-contr-section-is-equiv is-equiv-id) + ( pair id refl-htpy)) + ( is-equiv-map-associative-Σ _ _ _) +``` + +## See also + +- For the coherent notion of invertible maps see + [`foundation.coherently-invertible-maps`](foundation.coherently-invertible-maps.md). +- For the notion of biinvertible maps see + [`foundation.equivalences`](foundation.equivalences.md). +- For the notion of maps with contractible fibers see + [`foundation.contractible-maps`](foundation.contractible-maps.md). +- For the notion of path-split maps see + [`foundation.path-split-maps`](foundation.path-split-maps.md). diff --git a/src/foundation/involutions.lagda.md b/src/foundation/involutions.lagda.md index 32cf391b53..2aba4c58a3 100644 --- a/src/foundation/involutions.lagda.md +++ b/src/foundation/involutions.lagda.md @@ -2,33 +2,94 @@ ```agda module foundation.involutions where - -open import foundation-core.involutions public ```
Imports ```agda open import foundation.automorphisms +open import foundation.dependent-pair-types open import foundation.equivalence-extensionality open import foundation.equivalences +open import foundation.function-extensionality +open import foundation.fundamental-theorem-of-identity-types +open import foundation.homotopies +open import foundation.structure-identity-principle open import foundation.universe-levels +open import foundation-core.contractible-types open import foundation-core.function-types -open import foundation-core.homotopies open import foundation-core.identity-types open import foundation-core.injective-maps +open import foundation-core.truncated-types +open import foundation-core.truncation-levels + +open import structured-types.pointed-types ```
## Idea -An involution on a type `A` is a map (or an equivalence) `f : A → A` such that -`(f ∘ f) ~ id` +An **involution** on a type `A` is a map `f : A → A` such that `(f ∘ f) ~ id`. + +## Definition + +```agda +module _ + {l : Level} {A : UU l} + where + + is-involution : (A → A) → UU l + is-involution f = (f ∘ f) ~ id + + is-involution-aut : Aut A → UU l + is-involution-aut e = is-involution (map-equiv e) +``` + +### The type of involutions on `A` + +```agda +involution : {l : Level} → UU l → UU l +involution A = Σ (A → A) is-involution + +module _ + {l : Level} {A : UU l} (f : involution A) + where + + map-involution : A → A + map-involution = pr1 f + + is-involution-map-involution : is-involution map-involution + is-involution-map-involution = pr2 f +``` ## Properties +### Involutions are equivalences + +```agda +is-equiv-is-involution : + {l : Level} {A : UU l} {f : A → A} → is-involution f → is-equiv f +is-equiv-is-involution {f = f} is-involution-f = + is-equiv-is-invertible f is-involution-f is-involution-f + +is-equiv-map-involution : + {l : Level} {A : UU l} (f : involution A) → is-equiv (map-involution f) +is-equiv-map-involution = is-equiv-is-involution ∘ is-involution-map-involution + +equiv-is-involution : + {l : Level} {A : UU l} {f : A → A} → is-involution f → A ≃ A +pr1 (equiv-is-involution {f = f} is-involution-f) = f +pr2 (equiv-is-involution is-involution-f) = + is-equiv-is-involution is-involution-f + +equiv-involution : + {l : Level} {A : UU l} → involution A → A ≃ A +equiv-involution f = + equiv-is-involution {f = map-involution f} (is-involution-map-involution f) +``` + ### Involutions are their own inverse ```agda @@ -36,9 +97,9 @@ htpy-own-inverse-is-involution : {l : Level} {A : UU l} {f : Aut A} → is-involution-aut f → map-inv-equiv f ~ map-equiv f htpy-own-inverse-is-involution {f = f} is-involution-f x = - is-injective-map-equiv f - ( htpy-eq-equiv (right-inverse-law-equiv f) x ∙ - inv (is-involution-f x)) + is-injective-map-equiv f + ( htpy-eq-equiv (right-inverse-law-equiv f) x ∙ + inv (is-involution-f x)) own-inverse-is-involution : {l : Level} {A : UU l} {f : Aut A} → @@ -46,3 +107,116 @@ own-inverse-is-involution : own-inverse-is-involution {f = f} = eq-htpy-equiv ∘ htpy-own-inverse-is-involution {f = f} ``` + +### Characterizing equality of involutions + +```agda +module _ + {l : Level} {A : UU l} + where + + coherence-htpy-involution : + (s t : involution A) → map-involution s ~ map-involution t → UU l + coherence-htpy-involution s t H = + ( is-involution-map-involution s) ~ + ( htpy-comp-horizontal H H ∙h is-involution-map-involution t) + + htpy-involution : (s t : involution A) → UU l + htpy-involution s t = + Σ ( map-involution s ~ map-involution t) + ( coherence-htpy-involution s t) + + refl-htpy-involution : (s : involution A) → htpy-involution s s + pr1 (refl-htpy-involution s) = refl-htpy + pr2 (refl-htpy-involution s) = refl-htpy + + htpy-eq-involution : (s t : involution A) → s = t → htpy-involution s t + htpy-eq-involution s .s refl = refl-htpy-involution s + + is-contr-total-htpy-involution : + (s : involution A) → is-contr (Σ (involution A) (htpy-involution s)) + is-contr-total-htpy-involution s = + is-contr-total-Eq-structure + ( λ x z → coherence-htpy-involution s (x , z)) + ( is-contr-total-htpy (map-involution s)) + ( map-involution s , refl-htpy) + ( is-contr-total-htpy (is-involution-map-involution s)) + + is-equiv-htpy-eq-involution : + (s t : involution A) → is-equiv (htpy-eq-involution s t) + is-equiv-htpy-eq-involution s = + fundamental-theorem-id + ( is-contr-total-htpy-involution s) + ( htpy-eq-involution s) + + extensionality-involution : + (s t : involution A) → (s = t) ≃ (htpy-involution s t) + pr1 (extensionality-involution s t) = htpy-eq-involution s t + pr2 (extensionality-involution s t) = is-equiv-htpy-eq-involution s t + + eq-htpy-involution : (s t : involution A) → htpy-involution s t → s = t + eq-htpy-involution s t = map-inv-equiv (extensionality-involution s t) +``` + +### If `A` is `k`-truncated then the type of involutions is `k`-truncated + +```agda +is-trunc-is-involution : + {l : Level} (k : 𝕋) {A : UU l} → + is-trunc (succ-𝕋 k) A → (f : A → A) → is-trunc k (is-involution f) +is-trunc-is-involution k is-trunc-A f = + is-trunc-Π k λ x → is-trunc-A (f (f x)) x + +is-involution-Truncated-Type : + {l : Level} (k : 𝕋) {A : UU l} → + is-trunc (succ-𝕋 k) A → (A → A) → Truncated-Type l k +pr1 (is-involution-Truncated-Type k is-trunc-A f) = is-involution f +pr2 (is-involution-Truncated-Type k is-trunc-A f) = + is-trunc-is-involution k is-trunc-A f + +is-trunc-involution : + {l : Level} (k : 𝕋) {A : UU l} → + is-trunc k A → is-trunc k (involution A) +is-trunc-involution k is-trunc-A = + is-trunc-Σ + ( is-trunc-function-type k is-trunc-A) + ( is-trunc-is-involution k (is-trunc-succ-is-trunc k is-trunc-A)) + +involution-Truncated-Type : + {l : Level} (k : 𝕋) → Truncated-Type l k → Truncated-Type l k +pr1 (involution-Truncated-Type k (A , is-trunc-A)) = involution A +pr2 (involution-Truncated-Type k (A , is-trunc-A)) = + is-trunc-involution k is-trunc-A +``` + +### Involutions on dependent function types + +```agda +involution-Π-involution-fam : + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} → + ((x : A) → involution (B x)) → involution ((x : A) → B x) +pr1 (involution-Π-involution-fam i) f x = + map-involution (i x) (f x) +pr2 (involution-Π-involution-fam i) f = + eq-htpy (λ x → is-involution-map-involution (i x) (f x)) +``` + +## Examples + +### The identity function is an involution + +```agda +is-involution-id : + {l : Level} {A : UU l} → is-involution (id {A = A}) +is-involution-id = refl-htpy + +id-involution : + {l : Level} {A : UU l} → involution A +pr1 id-involution = id +pr2 id-involution = is-involution-id + +involution-Pointed-Type : + {l : Level} (A : UU l) → Pointed-Type l +pr1 (involution-Pointed-Type A) = involution A +pr2 (involution-Pointed-Type A) = id-involution +``` diff --git a/src/foundation/isolated-points.lagda.md b/src/foundation/isolated-points.lagda.md index f75be0c318..9c4c806248 100644 --- a/src/foundation/isolated-points.lagda.md +++ b/src/foundation/isolated-points.lagda.md @@ -317,7 +317,7 @@ is-equiv-map-maybe-structure-isolated-point : {l1 : Level} (X : UU l1) (x : isolated-point X) → is-equiv (map-maybe-structure-isolated-point X x) is-equiv-map-maybe-structure-isolated-point X x = - is-equiv-has-inverse + is-equiv-is-invertible ( map-inv-maybe-structure-isolated-point X x) ( is-section-map-inv-maybe-structure-isolated-point X x) ( is-retraction-map-inv-maybe-structure-isolated-point X x) diff --git a/src/foundation/isomorphisms-of-sets.lagda.md b/src/foundation/isomorphisms-of-sets.lagda.md index 7bc6ef1787..ab7614b8e9 100644 --- a/src/foundation/isomorphisms-of-sets.lagda.md +++ b/src/foundation/isomorphisms-of-sets.lagda.md @@ -71,7 +71,7 @@ module _ is-equiv-is-iso-Set : {f : type-hom-Set A B} → is-iso-Set f → is-equiv f is-equiv-is-iso-Set H = - is-equiv-has-inverse + is-equiv-is-invertible ( pr1 H) ( htpy-eq (pr1 (pr2 H))) ( htpy-eq (pr2 (pr2 H))) diff --git a/src/foundation/iterating-involutions.lagda.md b/src/foundation/iterating-involutions.lagda.md index 15c0a1d809..1c79cd0bd7 100644 --- a/src/foundation/iterating-involutions.lagda.md +++ b/src/foundation/iterating-involutions.lagda.md @@ -11,12 +11,12 @@ open import elementary-number-theory.modular-arithmetic-standard-finite-types open import elementary-number-theory.natural-numbers open import foundation.action-on-identifications-functions +open import foundation.involutions open import foundation.iterating-functions open import foundation.universe-levels open import foundation-core.coproduct-types open import foundation-core.identity-types -open import foundation-core.involutions open import univalent-combinatorics.standard-finite-types ``` diff --git a/src/foundation/logical-equivalences.lagda.md b/src/foundation/logical-equivalences.lagda.md index 96c146e8a7..11c1f55a6b 100644 --- a/src/foundation/logical-equivalences.lagda.md +++ b/src/foundation/logical-equivalences.lagda.md @@ -2,26 +2,173 @@ ```agda module foundation.logical-equivalences where - -open import foundation-core.logical-equivalences public ```
Imports ```agda open import foundation.dependent-pair-types +open import foundation.equality-cartesian-product-types +open import foundation.equivalence-extensionality +open import foundation.function-extensionality +open import foundation.functoriality-cartesian-product-types +open import foundation.type-arithmetic-dependent-pair-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.fibers-of-maps open import foundation-core.function-types +open import foundation-core.functoriality-dependent-pair-types +open import foundation-core.homotopies open import foundation-core.identity-types +open import foundation-core.injective-maps open import foundation-core.propositions ```
+## Idea + +**Logical equivalences** between two types `A` and `B` consist of a map `A → B` +and a map `B → A`. The type of logical equivalences between types is the +Curry-Howard interpretation of logical equivalences between +[propositions](foundation-core.propositions.md). + +## Definition + +### Logical equivalences between types + +```agda +infix 6 _↔_ + +_↔_ : {l1 l2 : Level} → UU l1 → UU l2 → UU (l1 ⊔ l2) +A ↔ B = (A → B) × (B → A) + +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (H : A ↔ B) + where + + forward-implication : A → B + forward-implication = pr1 H + + backward-implication : B → A + backward-implication = pr2 H +``` + +### Logical equivalences between propositions + +```agda +infix 6 _⇔_ + +_⇔_ : + {l1 l2 : Level} → Prop l1 → Prop l2 → UU (l1 ⊔ l2) +P ⇔ Q = type-Prop P ↔ type-Prop Q + +is-prop-iff-Prop : + {l1 l2 : Level} (P : Prop l1) (Q : Prop l2) → + is-prop (P ⇔ Q) +is-prop-iff-Prop P Q = + is-prop-prod + ( is-prop-function-type (is-prop-type-Prop Q)) + ( is-prop-function-type (is-prop-type-Prop P)) + +iff-Prop : + {l1 l2 : Level} → Prop l1 → Prop l2 → Prop (l1 ⊔ l2) +pr1 (iff-Prop P Q) = P ⇔ Q +pr2 (iff-Prop P Q) = is-prop-iff-Prop P Q +``` + +### Composition of logical equivalences + +```agda +infixr 15 _∘iff_ + +_∘iff_ : + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3} → + (B ↔ C) → (A ↔ B) → (A ↔ C) +pr1 ((g1 , g2) ∘iff (f1 , f2)) = g1 ∘ f1 +pr2 ((g1 , g2) ∘iff (f1 , f2)) = f2 ∘ g2 +``` + +### Inverting a logical equivalence + +```agda +inv-iff : + {l1 l2 : Level} {A : UU l1} {B : UU l2} → (A ↔ B) → (B ↔ A) +pr1 (inv-iff (f , g)) = g +pr2 (inv-iff (f , g)) = f +``` + ## Properties +### Characterizing equality of logical equivalences + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where + + htpy-iff : (f g : A ↔ B) → UU (l1 ⊔ l2) + htpy-iff f g = + ( forward-implication f ~ forward-implication g) × + ( backward-implication f ~ backward-implication g) + + ext-iff : (f g : A ↔ B) → (f = g) ≃ htpy-iff f g + ext-iff f g = equiv-prod equiv-funext equiv-funext ∘e equiv-pair-eq f g + + refl-htpy-iff : (f : A ↔ B) → htpy-iff f f + pr1 (refl-htpy-iff f) = refl-htpy + pr2 (refl-htpy-iff f) = refl-htpy + + htpy-eq-iff : {f g : A ↔ B} → f = g → htpy-iff f g + htpy-eq-iff {f} {g} = map-equiv (ext-iff f g) + + eq-htpy-iff : (f g : A ↔ B) → htpy-iff f g → (f = g) + eq-htpy-iff f g = map-inv-equiv (ext-iff f g) +``` + +### Logical equivalences between propositions induce equivalences + +```agda +module _ + {l1 l2 : Level} (P : Prop l1) (Q : Prop l2) + where + + equiv-iff' : (P ⇔ Q) → (type-Prop P ≃ type-Prop Q) + pr1 (equiv-iff' t) = pr1 t + pr2 (equiv-iff' t) = is-equiv-is-prop (pr2 P) (pr2 Q) (pr2 t) + + equiv-iff : + (type-Prop P → type-Prop Q) → (type-Prop Q → type-Prop P) → + type-Prop P ≃ type-Prop Q + equiv-iff f g = equiv-iff' (f , g) +``` + +### Equivalences are logical equivalences + +```agda +iff-equiv : {l1 l2 : Level} {A : UU l1} {B : UU l2} → (A ≃ B) → (A ↔ B) +pr1 (iff-equiv e) = map-equiv e +pr2 (iff-equiv e) = map-inv-equiv e + +is-injective-iff-equiv : + {l1 l2 : Level} {A : UU l1} {B : UU l2} → is-injective (iff-equiv {A = A} {B}) +is-injective-iff-equiv p = eq-htpy-equiv (pr1 (htpy-eq-iff p)) + +compute-fiber-iff-equiv : + {l1 l2 : Level} {A : UU l1} {B : UU l2} ((f , g) : A ↔ B) → + fiber (iff-equiv) (f , g) ≃ Σ (is-equiv f) (λ f' → map-inv-is-equiv f' ~ g) +compute-fiber-iff-equiv {A = A} {B} (f , g) = + ( ( ( ( ( equiv-tot (λ _ → equiv-funext)) ∘e + ( left-unit-law-Σ-is-contr (is-contr-total-path' f) (f , refl))) ∘e + ( inv-associative-Σ (A → B) (_= f) _)) ∘e + ( equiv-tot (λ _ → equiv-left-swap-Σ))) ∘e + ( associative-Σ (A → B) _ _)) ∘e + ( equiv-tot (λ e → equiv-pair-eq (iff-equiv e) (f , g))) +``` + ### Two equal propositions are logically equivalent ```agda @@ -31,18 +178,6 @@ pr1 (iff-eq refl) = id pr2 (iff-eq refl) = id ``` -### The type of logical equivalences between propositions is a proposition - -```agda -abstract - is-prop-iff : - {l1 l2 : Level} (P : Prop l1) (Q : Prop l2) → is-prop (P ⇔ Q) - is-prop-iff P Q = - is-prop-prod - ( is-prop-function-type (is-prop-type-Prop Q)) - ( is-prop-function-type (is-prop-type-Prop P)) -``` - ### Logical equivalence of propositions is equivalent to equivalence of propositions ```agda @@ -52,7 +187,7 @@ abstract is-equiv (equiv-iff' P Q) is-equiv-equiv-iff P Q = is-equiv-is-prop - ( is-prop-iff P Q) + ( is-prop-iff-Prop P Q) ( is-prop-type-equiv-Prop P Q) ( iff-equiv) @@ -63,13 +198,43 @@ pr1 (equiv-equiv-iff P Q) = equiv-iff' P Q pr2 (equiv-equiv-iff P Q) = is-equiv-equiv-iff P Q ``` -### The type of logical equivalences between propositions is a proposition +## Logical equivalences between dependent function types ```agda -is-prop-logical-equivalence : - {l1 l2 : Level} (P : Prop l1) (Q : Prop l2) → is-prop (P ⇔ Q) -is-prop-logical-equivalence P Q = - is-prop-prod - ( is-prop-function-type (is-prop-type-Prop Q)) - ( is-prop-function-type (is-prop-type-Prop P)) +module _ + {l1 l2 l3 : Level} {I : UU l1} {A : I → UU l2} {B : I → UU l3} + where + + iff-Π-iff-family : ((i : I) → A i ↔ B i) → ((i : I) → A i) ↔ ((i : I) → B i) + pr1 (iff-Π-iff-family e) a i = forward-implication (e i) (a i) + pr2 (iff-Π-iff-family e) b i = backward-implication (e i) (b i) +``` + +## Reasoning with logical equivalences + +Logical equivalences can be constructed by equational reasoning in the following +way: + +```text +logical-equivalence-reasoning + X ↔ Y by equiv-1 + ↔ Z by equiv-2 + ↔ V by equiv-3 +``` + +```agda +infixl 1 logical-equivalence-reasoning_ +infixl 0 step-logical-equivalence-reasoning + +logical-equivalence-reasoning_ : + {l1 : Level} (X : UU l1) → X ↔ X +pr1 (logical-equivalence-reasoning X) = id +pr2 (logical-equivalence-reasoning X) = id + +step-logical-equivalence-reasoning : + {l1 l2 l3 : Level} {X : UU l1} {Y : UU l2} → + (X ↔ Y) → (Z : UU l3) → (Y ↔ Z) → (X ↔ Z) +step-logical-equivalence-reasoning e Z f = f ∘iff e + +syntax step-logical-equivalence-reasoning e Z f = e ↔ Z by f ``` diff --git a/src/foundation/monomorphisms.lagda.md b/src/foundation/monomorphisms.lagda.md index 922ee2bed2..3c36d291d5 100644 --- a/src/foundation/monomorphisms.lagda.md +++ b/src/foundation/monomorphisms.lagda.md @@ -77,14 +77,15 @@ module _ where is-mono-is-emb : is-emb f → {l3 : Level} → is-mono l3 f - is-mono-is-emb f-is-emb X = + is-mono-is-emb is-emb-f X = is-emb-is-prop-map - ( is-trunc-map-postcomp-is-trunc-map neg-one-𝕋 X f - ( is-prop-map-is-emb f-is-emb)) + ( is-trunc-map-postcomp-is-trunc-map neg-one-𝕋 f + ( is-prop-map-is-emb is-emb-f) + ( X)) is-emb-is-mono : ({l3 : Level} → is-mono l3 f) → is-emb f - is-emb-is-mono f-is-mono = + is-emb-is-mono is-mono-f = is-emb-is-prop-map ( is-trunc-map-is-trunc-map-postcomp neg-one-𝕋 f - ( λ X → is-prop-map-is-emb (f-is-mono X))) + ( λ X → is-prop-map-is-emb (is-mono-f X))) ``` diff --git a/src/foundation/multivariable-operations.lagda.md b/src/foundation/multivariable-operations.lagda.md index 0fc5ab77cd..fe71b9e834 100644 --- a/src/foundation/multivariable-operations.lagda.md +++ b/src/foundation/multivariable-operations.lagda.md @@ -141,7 +141,7 @@ is-equiv-vector-multivariable-input : (A : UU l) → is-equiv (vector-multivariable-input n A) is-equiv-vector-multivariable-input n A = - is-equiv-has-inverse + is-equiv-is-invertible ( multivariable-input-vector n A) ( is-section-multivariable-input-vector n A) ( is-retraction-multivariable-input-vector n A) diff --git a/src/foundation/negation.lagda.md b/src/foundation/negation.lagda.md index f83225d7cb..aa4a880ec6 100644 --- a/src/foundation/negation.lagda.md +++ b/src/foundation/negation.lagda.md @@ -10,11 +10,11 @@ open import foundation-core.negation public ```agda open import foundation.dependent-pair-types +open import foundation.logical-equivalences open import foundation.universe-levels open import foundation-core.empty-types open import foundation-core.equivalences -open import foundation-core.logical-equivalences open import foundation-core.propositions ``` diff --git a/src/foundation/pairs-of-distinct-elements.lagda.md b/src/foundation/pairs-of-distinct-elements.lagda.md index c0b1c108ff..6d1910f014 100644 --- a/src/foundation/pairs-of-distinct-elements.lagda.md +++ b/src/foundation/pairs-of-distinct-elements.lagda.md @@ -159,7 +159,7 @@ module _ is-equiv-map-equiv-pair-of-distinct-elements : is-equiv map-equiv-pair-of-distinct-elements is-equiv-map-equiv-pair-of-distinct-elements = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-equiv-pair-of-distinct-elements is-section-map-inv-equiv-pair-of-distinct-elements is-retraction-map-inv-equiv-pair-of-distinct-elements diff --git a/src/foundation/partitions.lagda.md b/src/foundation/partitions.lagda.md index ad15dacf80..ad50cd08da 100644 --- a/src/foundation/partitions.lagda.md +++ b/src/foundation/partitions.lagda.md @@ -630,7 +630,7 @@ module _ ( unit-trunc-Prop (pair a refl))))) ( ( equiv-tot ( λ Q → - ( ( ( equiv-map-Π + ( ( ( equiv-Π-equiv-family ( λ x → inv-equiv ( equiv-equiv-iff diff --git a/src/foundation/path-algebra.lagda.md b/src/foundation/path-algebra.lagda.md index 19321b3063..c5b9f15133 100644 --- a/src/foundation/path-algebra.lagda.md +++ b/src/foundation/path-algebra.lagda.md @@ -45,7 +45,7 @@ coherences on the boundary 1-paths. ## Properties -### the unit laws of concatination induce homotopies +### The unit laws of concatenation induce homotopies ```agda module _ @@ -59,7 +59,7 @@ module _ htpy-right-unit p = right-unit ``` -### squares +### Squares ```agda horizontal-concat-square : @@ -114,33 +114,104 @@ vertical-concat-square {a = a} {f = f} ( assoc p-ttop p-tright p-bright)))) ``` -### Unit laws for the associator +### Unit laws for `assoc` + +We give two treatments of the unit laws for the associator. One for computing +with the associator, and one for coherences between the unit laws. + +#### Computing `assoc` at a reflexivity + +```agda +module _ + {l : Level} {A : UU l} {x y z : A} + where + + left-unit-law-assoc : + (p : x = y) (q : y = z) → + assoc refl p q = refl + left-unit-law-assoc p q = refl + + middle-unit-law-assoc : + (p : x = y) (q : y = z) → + assoc p refl q = ap (_∙ q) (right-unit) + middle-unit-law-assoc refl q = refl + + right-unit-law-assoc : + (p : x = y) (q : y = z) → + assoc p q refl = (right-unit ∙ ap (p ∙_) (inv right-unit)) + right-unit-law-assoc refl refl = refl +``` + +#### Unit laws for `assoc` and their coherence + +We use a binary naming scheme for the (higher) unit laws of the associator. For +each 3-digit binary number except when all digits are `1`, there is a +corresponding unit law. A `0` reflects that the unit of the operator is present +in the corresponding position. More generally, there is for each `n`-digit +binary number (except all `1`s) a unit law for the `n`-ary coherence operator. ```agda -unit-law-assoc-011 : - {l : Level} {X : UU l} {x y z : X} (p : x = y) (q : y = z) → - assoc refl p q = refl -unit-law-assoc-011 p q = refl - -unit-law-assoc-101 : - {l : Level} {X : UU l} {x y z : X} (p : x = y) (q : y = z) → - assoc p refl q = ap (concat' x q) right-unit -unit-law-assoc-101 refl refl = refl - -unit-law-assoc-101' : - {l : Level} {X : UU l} {x y z : X} (p : x = y) (q : y = z) → - inv (assoc p refl q) = ap (concat' x q) (inv right-unit) -unit-law-assoc-101' refl refl = refl - -unit-law-assoc-110 : - {l : Level} {X : UU l} {x y z : X} (p : x = y) (q : y = z) → - (assoc p q refl ∙ ap (concat p z) right-unit) = right-unit -unit-law-assoc-110 refl refl = refl - -unit-law-assoc-110' : - {l : Level} {X : UU l} {x y z : X} (p : x = y) (q : y = z) → - (inv right-unit ∙ assoc p q refl) = ap (concat p z) (inv right-unit) -unit-law-assoc-110' refl refl = refl +module _ + {l : Level} {A : UU l} {x y z : A} + where + + unit-law-assoc-011 : + (p : x = y) (q : y = z) → + assoc refl p q = refl + unit-law-assoc-011 p q = refl + + unit-law-assoc-101 : + (p : x = y) (q : y = z) → + assoc p refl q = ap (_∙ q) (right-unit) + unit-law-assoc-101 refl q = refl + + unit-law-assoc-101' : + (p : x = y) (q : y = z) → + inv (assoc p refl q) = ap (_∙ q) (inv right-unit) + unit-law-assoc-101' refl q = refl + + unit-law-assoc-110 : + (p : x = y) (q : y = z) → + (assoc p q refl ∙ ap (p ∙_) right-unit) = right-unit + unit-law-assoc-110 refl refl = refl + + unit-law-assoc-110' : + (p : x = y) (q : y = z) → + (inv right-unit ∙ assoc p q refl) = ap (p ∙_) (inv right-unit) + unit-law-assoc-110' refl refl = refl +``` + +### Unit laws for `ap-concat-eq` + +```agda +ap-concat-eq-inv-right-unit : + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) {x y : A} + (p : x = y) → inv right-unit = ap-concat-eq f p refl p (inv right-unit) +ap-concat-eq-inv-right-unit f refl = refl +``` + +### Iterated inverse laws + +```agda +module _ + {l : Level} {A : UU l} + where + + is-section-left-concat-inv : + {x y z : A} (p : x = y) (q : y = z) → (inv p ∙ (p ∙ q)) = q + is-section-left-concat-inv refl q = refl + + is-retraction-left-concat-inv : + {x y z : A} (p : x = y) (q : x = z) → (p ∙ (inv p ∙ q)) = q + is-retraction-left-concat-inv refl q = refl + + is-section-right-concat-inv : + {x y z : A} (p : x = y) (q : z = y) → ((p ∙ inv q) ∙ q) = p + is-section-right-concat-inv refl refl = refl + + is-retraction-right-concat-inv : + {x y z : A} (p : x = y) (q : y = z) → ((p ∙ q) ∙ inv q) = p + is-retraction-right-concat-inv refl refl = refl ``` ## Properties of 2-paths diff --git a/src/foundation/pi-decompositions-subuniverse.lagda.md b/src/foundation/pi-decompositions-subuniverse.lagda.md index 3244ca8045..940decfffb 100644 --- a/src/foundation/pi-decompositions-subuniverse.lagda.md +++ b/src/foundation/pi-decompositions-subuniverse.lagda.md @@ -134,7 +134,7 @@ equiv-total-is-in-subuniverse-Π-Decomposition : pr1 (equiv-total-is-in-subuniverse-Π-Decomposition P A) = map-equiv-total-is-in-subuniverse-Π-Decomposition P A pr2 (equiv-total-is-in-subuniverse-Π-Decomposition P A) = - is-equiv-has-inverse + is-equiv-is-invertible ( map-inv-equiv-Π-Decomposition-Π-Decomposition-Subuniverse P A) ( refl-htpy) ( refl-htpy) diff --git a/src/foundation/pointed-torsorial-type-families.lagda.md b/src/foundation/pointed-torsorial-type-families.lagda.md index 968bfbf1ca..ae36b9109a 100644 --- a/src/foundation/pointed-torsorial-type-families.lagda.md +++ b/src/foundation/pointed-torsorial-type-families.lagda.md @@ -12,6 +12,7 @@ open import foundation.dependent-pair-types open import foundation.equivalences open import foundation.fundamental-theorem-of-identity-types open import foundation.locally-small-types +open import foundation.logical-equivalences open import foundation.propositional-truncations open import foundation.sorial-type-families open import foundation.transport @@ -22,7 +23,6 @@ open import foundation-core.cartesian-product-types open import foundation-core.contractible-types open import foundation-core.functoriality-dependent-pair-types open import foundation-core.identity-types -open import foundation-core.logical-equivalences open import foundation-core.propositions open import foundation-core.small-types diff --git a/src/foundation/product-decompositions-subuniverse.lagda.md b/src/foundation/product-decompositions-subuniverse.lagda.md index 044928907a..f5812be70a 100644 --- a/src/foundation/product-decompositions-subuniverse.lagda.md +++ b/src/foundation/product-decompositions-subuniverse.lagda.md @@ -241,7 +241,7 @@ module _ pr1 equiv-reassociate-left-iterated-product-Decomposition-Subuniverse = map-reassociate-left-iterated-product-Decomposition-Subuniverse pr2 equiv-reassociate-left-iterated-product-Decomposition-Subuniverse = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-reassociate-left-iterated-product-Decomposition-Subuniverse refl-htpy refl-htpy @@ -318,7 +318,7 @@ module _ pr1 equiv-reassociate-right-iterated-product-Decomposition-Subuniverse = map-reassociate-right-iterated-product-Decomposition-Subuniverse pr2 equiv-reassociate-right-iterated-product-Decomposition-Subuniverse = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-reassociate-right-iterated-product-Decomposition-Subuniverse refl-htpy refl-htpy diff --git a/src/foundation/propositional-extensionality.lagda.md b/src/foundation/propositional-extensionality.lagda.md index f1c2fd96b1..b081d7b420 100644 --- a/src/foundation/propositional-extensionality.lagda.md +++ b/src/foundation/propositional-extensionality.lagda.md @@ -107,7 +107,7 @@ is-set-type-Prop : {l : Level} → is-set (Prop l) is-set-type-Prop {l} P Q = is-prop-equiv ( propositional-extensionality P Q) - ( is-prop-logical-equivalence P Q) + ( is-prop-iff-Prop P Q) Prop-Set : (l : Level) → Set (lsuc l) pr1 (Prop-Set l) = Prop l diff --git a/src/foundation/propositional-maps.lagda.md b/src/foundation/propositional-maps.lagda.md index 49b4dcbc1d..2de2a40078 100644 --- a/src/foundation/propositional-maps.lagda.md +++ b/src/foundation/propositional-maps.lagda.md @@ -11,11 +11,11 @@ open import foundation-core.propositional-maps public ```agda open import foundation.dependent-pair-types open import foundation.embeddings +open import foundation.logical-equivalences open import foundation.truncated-maps open import foundation.universe-levels open import foundation-core.equivalences -open import foundation-core.logical-equivalences open import foundation-core.propositions open import foundation-core.truncation-levels ``` diff --git a/src/foundation/pullbacks.lagda.md b/src/foundation/pullbacks.lagda.md index 8d502eb5ea..ee18d81d39 100644 --- a/src/foundation/pullbacks.lagda.md +++ b/src/foundation/pullbacks.lagda.md @@ -112,7 +112,7 @@ abstract is-equiv-right-factor-htpy ( cone-map f g c) ( map-canonical-pullback-exponent f g T) - ( gap (_∘_ f) (_∘_ g) (exponent-cone T f g c)) + ( gap (f ∘_) (g ∘_) (exponent-cone T f g c)) ( triangle-map-canonical-pullback-exponent T f g c) ( is-equiv-map-canonical-pullback-exponent f g T) ( universal-property-pullback-is-pullback f g c is-pb-c T) @@ -170,7 +170,7 @@ abstract {l : Level} {A : UU l} (x y : A) → is-pullback (const unit A x) (const unit A y) (cone-Id x y) is-pullback-cone-Id x y = - is-equiv-has-inverse + is-equiv-is-invertible ( inv-gap-cone-Id x y) ( is-section-inv-gap-cone-Id x y) ( is-retraction-inv-gap-cone-Id x y) @@ -209,7 +209,7 @@ abstract {l : Level} {A : UU l} (t : A × A) → is-pullback (const unit (A × A) t) (diagonal A) (cone-Id' t) is-pullback-cone-Id' t = - is-equiv-has-inverse + is-equiv-is-invertible ( inv-gap-cone-Id' t) ( is-section-inv-gap-cone-Id' t) ( is-retraction-inv-gap-cone-Id' t) @@ -656,7 +656,7 @@ abstract (f : (i : I) → A i → X i) (g : (i : I) → B i → X i) → is-equiv (map-canonical-pullback-Π f g) is-equiv-map-canonical-pullback-Π f g = - is-equiv-has-inverse + is-equiv-is-invertible ( inv-map-canonical-pullback-Π f g) ( is-section-inv-map-canonical-pullback-Π f g) ( is-retraction-inv-map-canonical-pullback-Π f g) @@ -692,7 +692,7 @@ abstract ( gap (map-Π f) (map-Π g) (cone-Π f g c)) ( triangle-map-canonical-pullback-Π f g c) ( is-equiv-map-canonical-pullback-Π f g) - ( is-equiv-map-Π _ is-pb-c) + ( is-equiv-map-equiv-Π-equiv-family _ is-pb-c) ``` ```agda diff --git a/src/foundation/raising-universe-levels.lagda.md b/src/foundation/raising-universe-levels.lagda.md index 2570385227..d924f72023 100644 --- a/src/foundation/raising-universe-levels.lagda.md +++ b/src/foundation/raising-universe-levels.lagda.md @@ -57,7 +57,7 @@ module _ is-equiv-map-raise : is-equiv (map-raise {l} {l1} {A}) is-equiv-map-raise = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-raise is-section-map-inv-raise is-retraction-map-inv-raise @@ -114,7 +114,7 @@ module _ is-equiv-map-equiv-raise : is-equiv map-equiv-raise is-equiv-map-equiv-raise = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-equiv-raise is-section-map-inv-equiv-raise is-retraction-map-inv-equiv-raise diff --git a/src/foundation/relaxed-sigma-decompositions.lagda.md b/src/foundation/relaxed-sigma-decompositions.lagda.md index 1aa037fdd1..f78f28e9c9 100644 --- a/src/foundation/relaxed-sigma-decompositions.lagda.md +++ b/src/foundation/relaxed-sigma-decompositions.lagda.md @@ -824,7 +824,7 @@ is-equiv-map-displayed-fibered-Relaxed-Σ-Decomposition : is-equiv ( map-displayed-fibered-Relaxed-Σ-Decomposition {l1} {l} {l} {l} {l} {A}) is-equiv-map-displayed-fibered-Relaxed-Σ-Decomposition = - is-equiv-has-inverse + is-equiv-is-invertible ( map-inv-displayed-fibered-Relaxed-Σ-Decomposition) ( is-section-map-inv-displayed-fibered-Relaxed-Σ-Decomposition) ( is-retraction-map-inv-displayed-fibered-Relaxed-Σ-Decomposition) diff --git a/src/foundation/retractions.lagda.md b/src/foundation/retractions.lagda.md index c567edac1d..83aaebe0fe 100644 --- a/src/foundation/retractions.lagda.md +++ b/src/foundation/retractions.lagda.md @@ -32,18 +32,25 @@ module _ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} where + coherence-htpy-retraction : + (g h : retraction f) → map-retraction f g ~ map-retraction f h → UU l1 + coherence-htpy-retraction = coherence-htpy-hom-coslice + htpy-retraction : retraction f → retraction f → UU (l1 ⊔ l2) htpy-retraction = htpy-hom-coslice extensionality-retraction : - (g h : retraction f) → Id g h ≃ htpy-retraction g h - extensionality-retraction g h = extensionality-hom-coslice g h + (g h : retraction f) → (g = h) ≃ htpy-retraction g h + extensionality-retraction = extensionality-hom-coslice eq-htpy-retraction : - ( g h : retraction f) (H : pr1 g ~ pr1 h) - ( K : (pr2 g) ~ ((H ·r f) ∙h pr2 h)) → + ( g h : retraction f) + ( H : map-retraction f g ~ map-retraction f h) + ( K : + ( is-retraction-map-retraction f g) ~ + ( (H ·r f) ∙h is-retraction-map-retraction f h)) → g = h - eq-htpy-retraction g h = eq-htpy-hom-coslice g h + eq-htpy-retraction = eq-htpy-hom-coslice ``` ### If the left factor of a composite has a retraction, then the type of retractions of the right factor is a retract of the type of retractions of the composite diff --git a/src/foundation/russells-paradox.lagda.md b/src/foundation/russells-paradox.lagda.md index 28d47163ac..2a24d52393 100644 --- a/src/foundation/russells-paradox.lagda.md +++ b/src/foundation/russells-paradox.lagda.md @@ -10,7 +10,6 @@ module foundation.russells-paradox where ```agda open import foundation.dependent-pair-types -open import foundation.equivalences open import foundation.functoriality-cartesian-product-types open import foundation.identity-types open import foundation.locally-small-types @@ -24,7 +23,9 @@ open import foundation.universe-levels open import foundation-core.contractible-types open import foundation-core.empty-types +open import foundation-core.equivalences open import foundation-core.functoriality-dependent-pair-types +open import foundation-core.functoriality-function-types open import trees.multisets open import trees.small-multisets diff --git a/src/foundation/sections.lagda.md b/src/foundation/sections.lagda.md index b670565dab..f7cdb2fd0e 100644 --- a/src/foundation/sections.lagda.md +++ b/src/foundation/sections.lagda.md @@ -10,6 +10,7 @@ open import foundation-core.sections public ```agda open import foundation.action-on-identifications-functions +open import foundation.commuting-triangles-of-homotopies open import foundation.dependent-pair-types open import foundation.function-extensionality open import foundation.structure-identity-principle @@ -19,7 +20,6 @@ open import foundation.universe-levels open import foundation-core.contractible-types open import foundation-core.equivalences -open import foundation-core.fibers-of-maps open import foundation-core.function-types open import foundation-core.functoriality-dependent-pair-types open import foundation-core.homotopies @@ -61,8 +61,17 @@ module _ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} where + coherence-htpy-section : + (s t : section f) → (map-section f s ~ map-section f t) → UU l2 + coherence-htpy-section s t H = + coherence-triangle-homotopies + ( is-section-map-section f s) + ( is-section-map-section f t) + ( f ·l H) + htpy-section : (s t : section f) → UU (l1 ⊔ l2) - htpy-section s t = Σ (pr1 s ~ pr1 t) (λ H → pr2 s ~ ((f ·l H) ∙h pr2 t)) + htpy-section s t = + Σ (map-section f s ~ map-section f t) (coherence-htpy-section s t) extensionality-section : (s t : section f) → (s = t) ≃ htpy-section s t extensionality-section (s , H) = @@ -75,7 +84,9 @@ module _ eq-htpy-section : (s t : section f) - (H : (pr1 s) ~ (pr1 t)) (K : (pr2 s) ~ ((f ·l H) ∙h (pr2 t))) → s = t + (H : map-section f s ~ map-section f t) + (K : coherence-htpy-section s t H) → + s = t eq-htpy-section s t H K = map-inv-equiv (extensionality-section s t) (H , K) ``` diff --git a/src/foundation/set-quotients.lagda.md b/src/foundation/set-quotients.lagda.md index 427de28584..68ee04df0c 100644 --- a/src/foundation/set-quotients.lagda.md +++ b/src/foundation/set-quotients.lagda.md @@ -301,7 +301,7 @@ module _ ( (x : A) (y : B) → type-Prop (P (quotient-map R x) (quotient-map S y))) equiv-double-induction-set-quotient = - ( equiv-map-Π + ( equiv-Π-equiv-family ( λ x → equiv-induction-set-quotient S (P (quotient-map R x)))) ∘e ( equiv-induction-set-quotient R @@ -357,7 +357,7 @@ module _ type-Prop ( P (quotient-map R x) (quotient-map S y) (quotient-map T z))) equiv-triple-induction-set-quotient = - ( equiv-map-Π + ( equiv-Π-equiv-family ( λ x → equiv-double-induction-set-quotient S T ( P (quotient-map R x)))) ∘e diff --git a/src/foundation/set-truncations.lagda.md b/src/foundation/set-truncations.lagda.md index 2e11d42269..77cd20148d 100644 --- a/src/foundation/set-truncations.lagda.md +++ b/src/foundation/set-truncations.lagda.md @@ -519,7 +519,7 @@ module _ ( precomp-Set (unit-trunc-Set ∘ tot (λ x → unit-trunc-Set)) C) ( is-equiv-ev-pair) ( is-equiv-htpy-equiv - ( ( equiv-map-Π + ( ( equiv-Π-equiv-family ( λ x → equiv-universal-property-trunc-Set (B x) C)) ∘e ( ( equiv-ev-pair) ∘e ( equiv-universal-property-trunc-Set diff --git a/src/foundation/sigma-closed-subuniverses.lagda.md b/src/foundation/sigma-closed-subuniverses.lagda.md index c40b63f348..f0218d5e58 100644 --- a/src/foundation/sigma-closed-subuniverses.lagda.md +++ b/src/foundation/sigma-closed-subuniverses.lagda.md @@ -8,10 +8,11 @@ module foundation.sigma-closed-subuniverses where ```agda open import foundation.dependent-pair-types -open import foundation.function-types -open import foundation.propositions open import foundation.subuniverses open import foundation.universe-levels + +open import foundation-core.function-types +open import foundation-core.propositions ```
diff --git a/src/foundation/sigma-decomposition-subuniverse.lagda.md b/src/foundation/sigma-decomposition-subuniverse.lagda.md index 6ec0af7de5..ef0e6e73f6 100644 --- a/src/foundation/sigma-decomposition-subuniverse.lagda.md +++ b/src/foundation/sigma-decomposition-subuniverse.lagda.md @@ -134,7 +134,7 @@ equiv-total-is-in-subuniverse-Σ-Decomposition : pr1 (equiv-total-is-in-subuniverse-Σ-Decomposition P A) = map-equiv-total-is-in-subuniverse-Σ-Decomposition P A pr2 (equiv-total-is-in-subuniverse-Σ-Decomposition P A) = - is-equiv-has-inverse + is-equiv-is-invertible ( map-inv-equiv-Relaxed-Σ-Decomposition-Σ-Decomposition-Subuniverse P A) ( refl-htpy) ( refl-htpy) diff --git a/src/foundation/sigma-decompositions.lagda.md b/src/foundation/sigma-decompositions.lagda.md index df27fa994b..786629cb76 100644 --- a/src/foundation/sigma-decompositions.lagda.md +++ b/src/foundation/sigma-decompositions.lagda.md @@ -1019,7 +1019,7 @@ is-equiv-map-displayed-fibered-Σ-Decomposition : is-equiv ( map-displayed-fibered-Σ-Decomposition {l1} {l} {l} {l} {l} {A}) is-equiv-map-displayed-fibered-Σ-Decomposition = - is-equiv-has-inverse + is-equiv-is-invertible ( map-inv-displayed-fibered-Σ-Decomposition) ( is-section-map-inv-displayed-fibered-Σ-Decomposition) ( is-retraction-map-inv-displayed-fibered-Σ-Decomposition) diff --git a/src/foundation/singleton-subtypes.lagda.md b/src/foundation/singleton-subtypes.lagda.md index 9a471ac6fe..3bf8693a04 100644 --- a/src/foundation/singleton-subtypes.lagda.md +++ b/src/foundation/singleton-subtypes.lagda.md @@ -12,12 +12,12 @@ open import foundation.dependent-pair-types open import foundation.inhabited-subtypes open import foundation.logical-equivalences open import foundation.propositional-truncations -open import foundation.subtypes open import foundation.universe-levels open import foundation-core.identity-types open import foundation-core.propositions open import foundation-core.sets +open import foundation-core.subtypes ```
diff --git a/src/foundation/slice.lagda.md b/src/foundation/slice.lagda.md index 4b2da0a378..1d96f72f16 100644 --- a/src/foundation/slice.lagda.md +++ b/src/foundation/slice.lagda.md @@ -7,6 +7,7 @@ module foundation.slice where
Imports ```agda +open import foundation.commuting-triangles-of-homotopies open import foundation.dependent-pair-types open import foundation.equivalences open import foundation.function-extensionality @@ -67,7 +68,7 @@ module _ triangle-hom-slice : (f : A → X) (g : B → X) (h : hom-slice f g) → - f ~ (g ∘ (map-hom-slice f g h)) + f ~ g ∘ map-hom-slice f g h triangle-hom-slice f g h = pr2 h ``` @@ -81,12 +82,20 @@ module _ (f : A → X) (g : B → X) where + coherence-htpy-hom-slice : + (h h' : hom-slice f g) → + map-hom-slice f g h ~ map-hom-slice f g h' → + UU (l1 ⊔ l2) + coherence-htpy-hom-slice h h' H = + coherence-triangle-homotopies' + ( triangle-hom-slice f g h') + ( g ·l H) + ( triangle-hom-slice f g h) + htpy-hom-slice : (h h' : hom-slice f g) → UU (l1 ⊔ l2 ⊔ l3) htpy-hom-slice h h' = Σ ( map-hom-slice f g h ~ map-hom-slice f g h') - ( λ K → - ( (triangle-hom-slice f g h) ∙h (g ·l K)) ~ - ( triangle-hom-slice f g h')) + ( coherence-htpy-hom-slice h h') extensionality-hom-slice : (h h' : hom-slice f g) → (h = h') ≃ htpy-hom-slice h h' @@ -165,7 +174,7 @@ module _ abstract is-equiv-fiberwise-hom-hom-slice : is-equiv (fiberwise-hom-hom-slice) is-equiv-fiberwise-hom-hom-slice = - is-equiv-has-inverse + is-equiv-is-invertible ( hom-slice-fiberwise-hom) ( is-section-hom-slice-fiberwise-hom) ( is-retraction-hom-slice-fiberwise-hom) @@ -177,7 +186,7 @@ module _ abstract is-equiv-hom-slice-fiberwise-hom : is-equiv hom-slice-fiberwise-hom is-equiv-hom-slice-fiberwise-hom = - is-equiv-has-inverse + is-equiv-is-invertible ( fiberwise-hom-hom-slice) ( is-retraction-hom-slice-fiberwise-hom) ( is-section-hom-slice-fiberwise-hom) @@ -279,7 +288,7 @@ module _ hom-slice (map-emb g) (map-emb f) → is-equiv-hom-slice (map-emb f) (map-emb g) h is-equiv-hom-slice-emb f g h i = - is-equiv-has-inverse + is-equiv-is-invertible ( map-hom-slice (map-emb g) (map-emb f) i) ( λ y → is-injective-emb g diff --git a/src/foundation/standard-apartness-relations.lagda.md b/src/foundation/standard-apartness-relations.lagda.md index eeb57dd90c..cdacdfcac6 100644 --- a/src/foundation/standard-apartness-relations.lagda.md +++ b/src/foundation/standard-apartness-relations.lagda.md @@ -11,11 +11,11 @@ open import foundation.apartness-relations open import foundation.decidable-types open import foundation.dependent-pair-types open import foundation.law-of-excluded-middle +open import foundation.logical-equivalences open import foundation.tight-apartness-relations open import foundation.universe-levels open import foundation-core.identity-types -open import foundation-core.logical-equivalences open import foundation-core.negation ``` diff --git a/src/foundation/structure-identity-principle.lagda.md b/src/foundation/structure-identity-principle.lagda.md index d2b5e07e54..052bce2795 100644 --- a/src/foundation/structure-identity-principle.lagda.md +++ b/src/foundation/structure-identity-principle.lagda.md @@ -21,9 +21,11 @@ open import foundation-core.identity-types ## Idea -Structure is presented in type theory by dependent pair types. The structure -identity principle is a way to characterize the identity type of a structure, -using characterizations of the identity types of its components. +[Structure](foundation.structure.md) is presented in type theory by +[dependent pair types](foundation.dependent-pair-types.md). The **structure +identity principle** is a way to characterize the +[identity type](foundation-core.identity-types.md) of a structure, using +characterizations of the identity types of its components. ## Lemma diff --git a/src/foundation/structured-type-duality.lagda.md b/src/foundation/structured-type-duality.lagda.md index 563b0d06ff..f5f8d22056 100644 --- a/src/foundation/structured-type-duality.lagda.md +++ b/src/foundation/structured-type-duality.lagda.md @@ -42,7 +42,7 @@ equiv-Fiber-structure {l1} {l3} l P B = ( equiv-Σ ( λ C → (b : B) → P (C b)) ( equiv-Fiber l B) - ( λ f → equiv-map-Π (λ b → id-equiv)))) ∘e + ( λ f → equiv-Π-equiv-family (λ b → id-equiv)))) ∘e ( inv-associative-Σ ( UU (l1 ⊔ l)) ( λ A → A → B) diff --git a/src/foundation/subtype-identity-principle.lagda.md b/src/foundation/subtype-identity-principle.lagda.md index 5b7189520e..0de413cf41 100644 --- a/src/foundation/subtype-identity-principle.lagda.md +++ b/src/foundation/subtype-identity-principle.lagda.md @@ -23,16 +23,19 @@ open import foundation-core.propositions ## Idea -The subtype identity principle allows us to efficiently characterize the -identity type of a subtype, using a characterization of the identity type of the -base type. +The **subtype identity principle** allows us to efficiently characterize the +[identity type](foundation-core.identity-types.md) of a +[subtype](foundation-core.subtypes.md), using a characterization of the identity +type of the base type. ## Lemma The following is a general construction that will help us show that the identity type of a subtype agrees with the identity type of the original type. We already -know that the first projection of a family of propositions is an embedding, but -the following lemma still has its uses. +know that the first projection of a family of +[propositions](foundation-core.propositions.md) is an +[embedding](foundation-core.embeddings.md), but the following lemma still has +its uses. ```agda module _ diff --git a/src/foundation/subtypes.lagda.md b/src/foundation/subtypes.lagda.md index a958dea8a8..2b48c27cb3 100644 --- a/src/foundation/subtypes.lagda.md +++ b/src/foundation/subtypes.lagda.md @@ -12,6 +12,7 @@ open import foundation-core.subtypes public open import foundation.dependent-pair-types open import foundation.equality-dependent-function-types open import foundation.fundamental-theorem-of-identity-types +open import foundation.logical-equivalences open import foundation.propositional-extensionality open import foundation.universe-levels @@ -22,7 +23,6 @@ open import foundation-core.function-types open import foundation-core.homotopies open import foundation-core.identity-types open import foundation-core.injective-maps -open import foundation-core.logical-equivalences open import foundation-core.propositions open import foundation-core.sets ``` diff --git a/src/foundation/surjective-maps.lagda.md b/src/foundation/surjective-maps.lagda.md index 07989160da..6bd6f4f31c 100644 --- a/src/foundation/surjective-maps.lagda.md +++ b/src/foundation/surjective-maps.lagda.md @@ -271,7 +271,7 @@ abstract ( is-equiv-comp ( λ h y → (h y) ∘ unit-trunc-Prop) ( λ h y → const (type-trunc-Prop (fiber f y)) (type-Prop (P y)) (h y)) - ( is-equiv-map-Π + ( is-equiv-map-equiv-Π-equiv-family ( λ y p z → p) ( λ y → is-equiv-diagonal-is-contr @@ -279,7 +279,7 @@ abstract ( is-prop-type-trunc-Prop) ( is-surj-f y)) ( type-Prop (P y)))) - ( is-equiv-map-Π + ( is-equiv-map-equiv-Π-equiv-family ( λ b g → g ∘ unit-trunc-Prop) ( λ b → is-propositional-truncation-trunc-Prop (fiber f b) (P b)))) ( is-equiv-map-reduce-Π-fiber f ( λ y z → type-Prop (P y))) diff --git a/src/foundation/symmetric-binary-relations.lagda.md b/src/foundation/symmetric-binary-relations.lagda.md new file mode 100644 index 0000000000..af1a198db2 --- /dev/null +++ b/src/foundation/symmetric-binary-relations.lagda.md @@ -0,0 +1,264 @@ +# Symmetric binary relations + +```agda +{-# OPTIONS --allow-unsolved-metas #-} + +module foundation.symmetric-binary-relations where +``` + +
Imports + +```agda +open import foundation.action-on-equivalences-type-families +open import foundation.action-on-identifications-functions +open import foundation.binary-relations +open import foundation.binary-transport +open import foundation.dependent-pair-types +open import foundation.equivalence-extensionality +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.symmetric-operations +open import foundation.transport +open import foundation.universe-levels +open import foundation.unordered-pairs + +open import univalent-combinatorics.standard-finite-types +``` + +
+ +## Idea + +A **symmetric binary relation** on a type `A` is a type family `R` over the type +of [unordered pairs](foundation.unordered-pairs.md) of elements of `A`. Given a +symmetric binary relation `R` on `A` and an equivalence of unordered pairs +`p = q`, we have `R p ≃ R q`. In particular, we have + +```text + R ({x,y}) ≃ R ({y,x}) +``` + +for any two elements `x y : A`, where `{x,y}` is the _standard unordered pair_ +consisting of `x` and `y`. + +Note that a symmetric binary relation R on a type is just a +[symmetric operation](foundation.symmetric-operations.md) from `A` into a +universe `𝒰`. + +## Definitions + +### Symmetric binary relations + +```agda +symmetric-binary-relation : + {l1 : Level} (l2 : Level) → UU l1 → UU (l1 ⊔ lsuc l2) +symmetric-binary-relation l2 A = symmetric-operation A (UU l2) +``` + +### Action on symmetries of symmetric binary relations + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (R : symmetric-binary-relation l2 A) + where + + abstract + equiv-tr-symmetric-binary-relation : + (p q : unordered-pair A) → Eq-unordered-pair p q → R p ≃ R q + equiv-tr-symmetric-binary-relation p = + ind-Eq-unordered-pair p (λ q e → R p ≃ R q) id-equiv + + compute-refl-equiv-tr-symmetric-binary-relation : + (p : unordered-pair A) → + equiv-tr-symmetric-binary-relation p p (refl-Eq-unordered-pair p) = + id-equiv + compute-refl-equiv-tr-symmetric-binary-relation p = + compute-refl-ind-Eq-unordered-pair p (λ q e → R p ≃ R q) id-equiv + + htpy-compute-refl-equiv-tr-symmetric-binary-relation : + (p : unordered-pair A) → + htpy-equiv + ( equiv-tr-symmetric-binary-relation p p (refl-Eq-unordered-pair p)) + ( id-equiv) + htpy-compute-refl-equiv-tr-symmetric-binary-relation p = + htpy-eq-equiv (compute-refl-equiv-tr-symmetric-binary-relation p) + + abstract + tr-symmetric-binary-relation : + (p q : unordered-pair A) → Eq-unordered-pair p q → R p → R q + tr-symmetric-binary-relation p q e = + map-equiv (equiv-tr-symmetric-binary-relation p q e) + + tr-inv-symmetric-binary-relation : + (p q : unordered-pair A) → Eq-unordered-pair p q → R q → R p + tr-inv-symmetric-binary-relation p q e = + map-inv-equiv (equiv-tr-symmetric-binary-relation p q e) + + is-section-tr-inv-symmetric-binary-relation : + (p q : unordered-pair A) (e : Eq-unordered-pair p q) → + ( tr-symmetric-binary-relation p q e ∘ + tr-inv-symmetric-binary-relation p q e) ~ id + is-section-tr-inv-symmetric-binary-relation p q e = + is-section-map-inv-equiv (equiv-tr-symmetric-binary-relation p q e) + + is-retraction-tr-inv-symmetric-binary-relation : + (p q : unordered-pair A) (e : Eq-unordered-pair p q) → + ( tr-inv-symmetric-binary-relation p q e ∘ + tr-symmetric-binary-relation p q e) ~ id + is-retraction-tr-inv-symmetric-binary-relation p q e = + is-retraction-map-inv-equiv (equiv-tr-symmetric-binary-relation p q e) + + compute-refl-tr-symmetric-binary-relation : + (p : unordered-pair A) → + tr-symmetric-binary-relation p p (refl-Eq-unordered-pair p) = id + compute-refl-tr-symmetric-binary-relation p = + ap map-equiv (compute-refl-equiv-tr-symmetric-binary-relation p) + + htpy-compute-refl-tr-symmetric-binary-relation : + (p : unordered-pair A) → + tr-symmetric-binary-relation p p (refl-Eq-unordered-pair p) ~ id + htpy-compute-refl-tr-symmetric-binary-relation p = + htpy-eq (compute-refl-tr-symmetric-binary-relation p) +``` + +### The underlying binary relation of a symmetric binary relation + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (R : symmetric-binary-relation l2 A) + where + + relation-symmetric-binary-relation : Relation l2 A + relation-symmetric-binary-relation x y = R (standard-unordered-pair x y) + + equiv-symmetric-relation-symmetric-binary-relation : + {x y : A} → + relation-symmetric-binary-relation x y ≃ relation-symmetric-binary-relation y x + equiv-symmetric-relation-symmetric-binary-relation {x} {y} = + equiv-tr-symmetric-binary-relation R + ( standard-unordered-pair x y) + ( standard-unordered-pair y x) + ( swap-standard-unordered-pair x y) + + symmetric-relation-symmetric-binary-relation : + {x y : A} → + relation-symmetric-binary-relation x y → + relation-symmetric-binary-relation y x + symmetric-relation-symmetric-binary-relation = + map-equiv equiv-symmetric-relation-symmetric-binary-relation +``` + +### The forgetful functor from binary relations to symmetric binary relations + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (R : Relation l2 A) + where + + symmetric-binary-relation-Relation : symmetric-binary-relation l2 A + symmetric-binary-relation-Relation p = + Σ ( type-unordered-pair p) + ( λ i → + R (element-unordered-pair p i) (other-element-unordered-pair p i)) + + unit-symmetric-binary-relation-Relation : + (x y : A) → R x y → + relation-symmetric-binary-relation symmetric-binary-relation-Relation x y + pr1 (unit-symmetric-binary-relation-Relation x y r) = zero-Fin 1 + pr2 (unit-symmetric-binary-relation-Relation x y r) = + tr + ( R x) + ( inv (compute-other-element-standard-unordered-pair x y (zero-Fin 1))) + ( r) +``` + +### The symmetric core of a binary relation + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (R : Relation l2 A) + where + + symmetric-core-Relation : symmetric-binary-relation l2 A + symmetric-core-Relation p = + (i : type-unordered-pair p) → + R (element-unordered-pair p i) (other-element-unordered-pair p i) + + counit-symmetric-core-Relation : + {x y : A} → + relation-symmetric-binary-relation symmetric-core-Relation x y → R x y + counit-symmetric-core-Relation {x} {y} r = + tr + ( R x) + ( compute-other-element-standard-unordered-pair x y (zero-Fin 1)) + ( r (zero-Fin 1)) +``` + +### Morphisms of symmetric binary relations + +```agda +module _ + {l1 l2 l3 : Level} {A : UU l1} + where + + hom-symmetric-binary-relation : + symmetric-binary-relation l2 A → symmetric-binary-relation l3 A → + UU (lsuc lzero ⊔ l1 ⊔ l2 ⊔ l3) + hom-symmetric-binary-relation R S = + (p : unordered-pair A) → R p → S p + + hom-relation-hom-symmetric-binary-relation : + (R : symmetric-binary-relation l2 A) (S : symmetric-binary-relation l3 A) → + hom-symmetric-binary-relation R S → + hom-Relation + ( relation-symmetric-binary-relation R) + ( relation-symmetric-binary-relation S) + hom-relation-hom-symmetric-binary-relation R S f x y = + f (standard-unordered-pair x y) +``` + +## Properties + +### The universal property of the symmetric core of a binary relation + +```agda +module _ + {l1 l2 l3 : Level} {A : UU l1} (R : Relation l2 A) + (S : symmetric-binary-relation l3 A) + where + + map-universal-property-symmetric-core-Relation : + hom-symmetric-binary-relation S (symmetric-core-Relation R) → + hom-Relation (relation-symmetric-binary-relation S) R + map-universal-property-symmetric-core-Relation f x y s = + counit-symmetric-core-Relation R (f (standard-unordered-pair x y) s) + + map-inv-universal-property-symmetric-core-Relation : + hom-Relation (relation-symmetric-binary-relation S) R → + hom-symmetric-binary-relation S (symmetric-core-Relation R) + map-inv-universal-property-symmetric-core-Relation f p s i = + f ( element-unordered-pair p i) + ( other-element-unordered-pair p i) + ( tr-inv-symmetric-binary-relation S + ( standard-unordered-pair + ( element-unordered-pair p i) + ( other-element-unordered-pair p i)) + ( p) + ( compute-standard-unordered-pair-element-unordered-pair p i) + ( s)) + + is-section-map-inv-universal-property-symmetric-core-Relation : + ( map-universal-property-symmetric-core-Relation ∘ + map-inv-universal-property-symmetric-core-Relation) ~ id + is-section-map-inv-universal-property-symmetric-core-Relation f = + eq-htpy + ( λ p → + eq-htpy + ( λ s → + eq-htpy + ( λ i → + {! !}))) +``` diff --git a/src/foundation/symmetric-difference.lagda.md b/src/foundation/symmetric-difference.lagda.md index 80f7687779..6ae37f58b1 100644 --- a/src/foundation/symmetric-difference.lagda.md +++ b/src/foundation/symmetric-difference.lagda.md @@ -96,7 +96,7 @@ module _ right-cases-equiv-symmetric-difference P Q x q ( is-decidable-Decidable-Prop (P x)) pr2 (equiv-symmetric-difference P Q) = - is-equiv-has-inverse i r s + is-equiv-is-invertible i r s where i : ( type-decidable-subtype (symmetric-difference-decidable-subtype P Q)) + diff --git a/src/foundation/symmetric-identity-types.lagda.md b/src/foundation/symmetric-identity-types.lagda.md index ee34c5c3dc..1b7d4b74ff 100644 --- a/src/foundation/symmetric-identity-types.lagda.md +++ b/src/foundation/symmetric-identity-types.lagda.md @@ -122,7 +122,7 @@ module _ is-equiv-map-compute-symmetric-Id : is-equiv (map-compute-symmetric-Id) is-equiv-map-compute-symmetric-Id = - is-equiv-has-inverse + is-equiv-is-invertible ( map-inv-compute-symmetric-Id) ( is-section-map-inv-compute-symmetric-Id) ( is-retraction-map-inv-compute-symmetric-Id) @@ -168,7 +168,8 @@ module _ (x : type-unordered-pair a) → b = map-equiv e (element-unordered-pair a x)) ( e) - ( λ x → equiv-map-Π (λ i → equiv-ap e x (element-unordered-pair a i))) + ( λ x → + equiv-Π-equiv-family (λ i → equiv-ap e x (element-unordered-pair a i))) map-equiv-symmetric-Id : (e : A ≃ B) (a : unordered-pair A) → diff --git a/src/foundation/symmetric-operations.lagda.md b/src/foundation/symmetric-operations.lagda.md index 5e779b56c8..f409c97a64 100644 --- a/src/foundation/symmetric-operations.lagda.md +++ b/src/foundation/symmetric-operations.lagda.md @@ -1,6 +1,8 @@ # Symmetric operations ```agda +{-# OPTIONS --allow-unsolved-metas #-} + module foundation.symmetric-operations where ``` @@ -9,9 +11,17 @@ module foundation.symmetric-operations where ```agda open import foundation.action-on-identifications-binary-functions open import foundation.action-on-identifications-functions +open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.equivalence-extensionality +open import foundation.function-extensionality +open import foundation.function-types open import foundation.functoriality-coproduct-types +open import foundation.fundamental-theorem-of-identity-types +open import foundation.homotopies +open import foundation.propositional-truncations +open import foundation.propositions +open import foundation.subtypes open import foundation.universal-property-propositional-truncation-into-sets open import foundation.universe-levels open import foundation.unordered-pairs @@ -56,14 +66,27 @@ module _ is-commutative : (A → A → B) → UU (l1 ⊔ l2) is-commutative f = (x y : A) → f x y = f y x + +is-commutative-Prop : + {l1 l2 : Level} {A : UU l1} (B : Set l2) → + (A → A → type-Set B) → Prop (l1 ⊔ l2) +is-commutative-Prop B f = + Π-Prop _ (λ x → Π-Prop _ (λ y → Id-Prop B (f x y) (f y x))) ``` ### Commutative operations ```agda -symmetric-operation : - {l1 l2 : Level} (A : UU l1) (B : UU l2) → UU (lsuc lzero ⊔ l1 ⊔ l2) -symmetric-operation A B = unordered-pair A → B +module _ + {l1 l2 : Level} (A : UU l1) (B : UU l2) + where + + symmetric-operation : UU (lsuc lzero ⊔ l1 ⊔ l2) + symmetric-operation = unordered-pair A → B + + map-symmetric-operation : symmetric-operation → A → A → B + map-symmetric-operation f x y = + f (standard-unordered-pair x y) ``` ## Properties @@ -143,3 +166,144 @@ module _ p : Fin 2 → A p = pr2 (standard-unordered-pair x y) ``` + +### Characterization of equality of symmetric operations into sets + +```agda +module _ + {l1 l2 : Level} (A : UU l1) (B : Set l2) + (f : symmetric-operation A (type-Set B)) + where + + htpy-symmetric-operation-Set-Prop : + (g : symmetric-operation A (type-Set B)) → Prop (l1 ⊔ l2) + htpy-symmetric-operation-Set-Prop g = + Π-Prop A + ( λ x → + Π-Prop A + ( λ y → + Id-Prop B + ( map-symmetric-operation A (type-Set B) f x y) + ( map-symmetric-operation A (type-Set B) g x y))) + + htpy-symmetric-operation-Set : + (g : symmetric-operation A (type-Set B)) → UU (l1 ⊔ l2) + htpy-symmetric-operation-Set g = + type-Prop (htpy-symmetric-operation-Set-Prop g) + + center-total-htpy-symmetric-operation-Set : + Σ ( symmetric-operation A (type-Set B)) + ( htpy-symmetric-operation-Set) + pr1 center-total-htpy-symmetric-operation-Set = f + pr2 center-total-htpy-symmetric-operation-Set x y = refl + + contraction-total-htpy-symmetric-operation-Set : + ( t : + Σ ( symmetric-operation A (type-Set B)) + ( htpy-symmetric-operation-Set)) → + center-total-htpy-symmetric-operation-Set = t + contraction-total-htpy-symmetric-operation-Set (g , H) = + eq-type-subtype + htpy-symmetric-operation-Set-Prop + ( eq-htpy + ( λ p → + apply-universal-property-trunc-Prop + ( is-surjective-standard-unordered-pair p) + ( Id-Prop B (f p) (g p)) + ( λ { (x , y , refl) → H x y}))) + + is-contr-total-htpy-symmetric-operation-Set : + is-contr + ( Σ ( symmetric-operation A (type-Set B)) + ( htpy-symmetric-operation-Set)) + pr1 is-contr-total-htpy-symmetric-operation-Set = + center-total-htpy-symmetric-operation-Set + pr2 is-contr-total-htpy-symmetric-operation-Set = + contraction-total-htpy-symmetric-operation-Set + + htpy-eq-symmetric-operation-Set : + (g : symmetric-operation A (type-Set B)) → + (f = g) → htpy-symmetric-operation-Set g + htpy-eq-symmetric-operation-Set g refl x y = refl + + is-equiv-htpy-eq-symmetric-operation-Set : + (g : symmetric-operation A (type-Set B)) → + is-equiv (htpy-eq-symmetric-operation-Set g) + is-equiv-htpy-eq-symmetric-operation-Set = + fundamental-theorem-id + is-contr-total-htpy-symmetric-operation-Set + htpy-eq-symmetric-operation-Set + + extensionality-symmetric-operation-Set : + (g : symmetric-operation A (type-Set B)) → + (f = g) ≃ htpy-symmetric-operation-Set g + pr1 (extensionality-symmetric-operation-Set g) = + htpy-eq-symmetric-operation-Set g + pr2 (extensionality-symmetric-operation-Set g) = + is-equiv-htpy-eq-symmetric-operation-Set g + + eq-htpy-symmetric-operation-Set : + (g : symmetric-operation A (type-Set B)) → + htpy-symmetric-operation-Set g → (f = g) + eq-htpy-symmetric-operation-Set g = + map-inv-equiv (extensionality-symmetric-operation-Set g) +``` + +### The type of commutative operations into a set is equivalent to the type of symmetric operations + +```agda +module _ + {l1 l2 : Level} (A : UU l1) (B : Set l2) + where + + map-compute-symmetric-operation-Set : + symmetric-operation A (type-Set B) → Σ (A → A → type-Set B) is-commutative + pr1 (map-compute-symmetric-operation-Set f) = + map-symmetric-operation A (type-Set B) f + pr2 (map-compute-symmetric-operation-Set f) = + is-commutative-symmetric-operation f + + map-inv-compute-symmetric-operation-Set : + Σ (A → A → type-Set B) is-commutative → symmetric-operation A (type-Set B) + map-inv-compute-symmetric-operation-Set (f , H) = + symmetric-operation-is-commutative B f H + + is-section-map-inv-compute-symmetric-operation-Set : + ( map-compute-symmetric-operation-Set ∘ + map-inv-compute-symmetric-operation-Set) ~ id + is-section-map-inv-compute-symmetric-operation-Set (f , H) = + eq-type-subtype + ( is-commutative-Prop B) + ( eq-htpy + ( λ x → + eq-htpy + ( λ y → + compute-symmetric-operation-is-commutative B f H x y))) + + is-retraction-map-inv-compute-symmetric-operation-Set : + ( map-inv-compute-symmetric-operation-Set ∘ + map-compute-symmetric-operation-Set) ~ id + is-retraction-map-inv-compute-symmetric-operation-Set g = + eq-htpy-symmetric-operation-Set A B + ( map-inv-compute-symmetric-operation-Set + ( map-compute-symmetric-operation-Set g)) + ( g) + ( compute-symmetric-operation-is-commutative B + ( map-symmetric-operation A (type-Set B) g) + ( is-commutative-symmetric-operation g)) + + is-equiv-map-compute-symmetric-operation-Set : + is-equiv map-compute-symmetric-operation-Set + is-equiv-map-compute-symmetric-operation-Set = + is-equiv-is-invertible + map-inv-compute-symmetric-operation-Set + is-section-map-inv-compute-symmetric-operation-Set + is-retraction-map-inv-compute-symmetric-operation-Set + + compute-symmetric-operation-Set : + symmetric-operation A (type-Set B) ≃ Σ (A → A → type-Set B) is-commutative + pr1 compute-symmetric-operation-Set = + map-compute-symmetric-operation-Set + pr2 compute-symmetric-operation-Set = + is-equiv-map-compute-symmetric-operation-Set +``` diff --git a/src/foundation/torsorial-type-families.lagda.md b/src/foundation/torsorial-type-families.lagda.md index 9722ac06b6..73415e4bf7 100644 --- a/src/foundation/torsorial-type-families.lagda.md +++ b/src/foundation/torsorial-type-families.lagda.md @@ -10,13 +10,13 @@ module foundation.torsorial-type-families where open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.fundamental-theorem-of-identity-types +open import foundation.logical-equivalences open import foundation.type-theoretic-principle-of-choice open import foundation.universal-property-identity-types open import foundation.universe-levels open import foundation-core.equivalences open import foundation-core.identity-types -open import foundation-core.logical-equivalences open import foundation-core.propositions ``` diff --git a/src/foundation/transport.lagda.md b/src/foundation/transport.lagda.md index 585d1725e8..f1d2d9a9cb 100644 --- a/src/foundation/transport.lagda.md +++ b/src/foundation/transport.lagda.md @@ -74,7 +74,7 @@ module _ is-equiv-tr : (p : x = y) → is-equiv (tr B p) is-equiv-tr p = - is-equiv-has-inverse + is-equiv-is-invertible ( inv-tr p) ( is-section-inv-tr p) ( is-retraction-inv-tr p) diff --git a/src/foundation/truncation-equivalences.lagda.md b/src/foundation/truncation-equivalences.lagda.md index 572a23aa50..a9b20104ed 100644 --- a/src/foundation/truncation-equivalences.lagda.md +++ b/src/foundation/truncation-equivalences.lagda.md @@ -9,12 +9,13 @@ module foundation.truncation-equivalences where ```agda open import foundation.commuting-squares-of-maps open import foundation.dependent-pair-types -open import foundation.equivalences open import foundation.functoriality-truncation open import foundation.truncations open import foundation.universe-levels +open import foundation-core.equivalences open import foundation-core.function-types +open import foundation-core.functoriality-function-types open import foundation-core.homotopies open import foundation-core.truncated-types open import foundation-core.truncation-levels diff --git a/src/foundation/truncations.lagda.md b/src/foundation/truncations.lagda.md index 56e5cf6312..638977f015 100644 --- a/src/foundation/truncations.lagda.md +++ b/src/foundation/truncations.lagda.md @@ -187,7 +187,7 @@ unique-truncated-fam-trunc {l1} {l2} {k} {A} B = ( λ C → (C ∘ unit-trunc) ~ B)) ( equiv-tot ( λ C → - equiv-map-Π + equiv-Π-equiv-family ( λ x → ( extensionality-Truncated-Type (B x) (C (unit-trunc x))) ∘e ( equiv-inv (C (unit-trunc x)) (B x))))) @@ -254,7 +254,7 @@ module _ ( f x))) ( equiv-ev-pair) ( λ g → - equiv-map-Π + equiv-Π-equiv-family ( λ x → ( inv-equiv equiv-funext) ∘e ( equiv-Π @@ -342,7 +342,7 @@ module _ is-equiv-unit-trunc : is-equiv unit-trunc is-equiv-unit-trunc = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-unit-trunc is-section-map-inv-unit-trunc is-retraction-map-inv-unit-trunc @@ -547,7 +547,7 @@ module _ type-trunc k (Σ A B) ≃ type-trunc k (Σ A (λ x → type-trunc k (B x))) pr1 equiv-trunc-Σ = map-trunc-Σ pr2 equiv-trunc-Σ = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-trunc-Σ is-section-map-inv-trunc-Σ is-retraction-map-inv-trunc-Σ @@ -556,7 +556,7 @@ module _ type-trunc k (Σ A (λ x → type-trunc k (B x))) ≃ type-trunc k (Σ A B) pr1 inv-equiv-trunc-Σ = map-inv-trunc-Σ pr2 inv-equiv-trunc-Σ = - is-equiv-has-inverse + is-equiv-is-invertible map-trunc-Σ is-retraction-map-inv-trunc-Σ is-section-map-inv-trunc-Σ diff --git a/src/foundation/type-arithmetic-booleans.lagda.md b/src/foundation/type-arithmetic-booleans.lagda.md index 7cd94add5a..2a38db0bf9 100644 --- a/src/foundation/type-arithmetic-booleans.lagda.md +++ b/src/foundation/type-arithmetic-booleans.lagda.md @@ -53,7 +53,7 @@ module _ is-equiv-map-Σ-bool-coprod : is-equiv map-Σ-bool-coprod is-equiv-map-Σ-bool-coprod = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-Σ-bool-coprod is-section-map-inv-Σ-bool-coprod is-retraction-map-inv-Σ-bool-coprod @@ -64,7 +64,7 @@ module _ is-equiv-map-inv-Σ-bool-coprod : is-equiv map-inv-Σ-bool-coprod is-equiv-map-inv-Σ-bool-coprod = - is-equiv-has-inverse + is-equiv-is-invertible map-Σ-bool-coprod is-retraction-map-inv-Σ-bool-coprod is-section-map-inv-Σ-bool-coprod diff --git a/src/foundation/type-arithmetic-cartesian-product-types.lagda.md b/src/foundation/type-arithmetic-cartesian-product-types.lagda.md index 87ba9cdddf..915886e467 100644 --- a/src/foundation/type-arithmetic-cartesian-product-types.lagda.md +++ b/src/foundation/type-arithmetic-cartesian-product-types.lagda.md @@ -55,7 +55,7 @@ module _ is-equiv-map-commutative-prod : is-equiv map-commutative-prod is-equiv-map-commutative-prod = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-commutative-prod is-section-map-inv-commutative-prod is-retraction-map-inv-commutative-prod @@ -135,7 +135,7 @@ equiv-add-redundant-prop : (is-prop B) → (f : A → B) → (A ≃ (A × B)) pr1 (equiv-add-redundant-prop is-prop-B f) a = a , f a pr2 (equiv-add-redundant-prop is-prop-B f) = - is-equiv-has-inverse + is-equiv-is-invertible ( pr1) ( λ p → eq-pair refl (eq-is-prop is-prop-B)) ( λ a → refl) diff --git a/src/foundation/type-arithmetic-coproduct-types.lagda.md b/src/foundation/type-arithmetic-coproduct-types.lagda.md index 3b2cb56cb1..a334b91e56 100644 --- a/src/foundation/type-arithmetic-coproduct-types.lagda.md +++ b/src/foundation/type-arithmetic-coproduct-types.lagda.md @@ -57,7 +57,7 @@ module _ is-equiv-map-commutative-coprod : is-equiv map-commutative-coprod is-equiv-map-commutative-coprod = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-commutative-coprod is-section-map-inv-commutative-coprod is-retraction-map-inv-commutative-coprod @@ -98,14 +98,14 @@ module _ is-equiv-map-associative-coprod : is-equiv map-associative-coprod is-equiv-map-associative-coprod = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-associative-coprod is-section-map-inv-associative-coprod is-retraction-map-inv-associative-coprod is-equiv-map-inv-associative-coprod : is-equiv map-inv-associative-coprod is-equiv-map-inv-associative-coprod = - is-equiv-has-inverse + is-equiv-is-invertible map-associative-coprod is-retraction-map-inv-associative-coprod is-section-map-inv-associative-coprod @@ -154,7 +154,7 @@ module _ is-equiv-map-right-distributive-Σ-coprod : is-equiv map-right-distributive-Σ-coprod is-equiv-map-right-distributive-Σ-coprod = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-right-distributive-Σ-coprod is-section-map-inv-right-distributive-Σ-coprod is-retraction-map-inv-right-distributive-Σ-coprod @@ -197,7 +197,7 @@ module _ is-equiv-map-left-distributive-Σ-coprod : is-equiv map-left-distributive-Σ-coprod is-equiv-map-left-distributive-Σ-coprod = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-left-distributive-Σ-coprod is-section-map-inv-left-distributive-Σ-coprod is-retraction-map-inv-left-distributive-Σ-coprod diff --git a/src/foundation/type-arithmetic-dependent-function-types.lagda.md b/src/foundation/type-arithmetic-dependent-function-types.lagda.md index ba5787b863..8ea2ca0e6e 100644 --- a/src/foundation/type-arithmetic-dependent-function-types.lagda.md +++ b/src/foundation/type-arithmetic-dependent-function-types.lagda.md @@ -56,7 +56,7 @@ module _ where is-equiv-swap-Π : is-equiv (swap-Π {C = C}) - is-equiv-swap-Π = is-equiv-has-inverse swap-Π refl-htpy refl-htpy + is-equiv-swap-Π = is-equiv-is-invertible swap-Π refl-htpy refl-htpy equiv-swap-Π : ((x : A) (y : B) → C x y) ≃ ((y : B) (x : A) → C x y) pr1 equiv-swap-Π = swap-Π diff --git a/src/foundation/type-arithmetic-dependent-pair-types.lagda.md b/src/foundation/type-arithmetic-dependent-pair-types.lagda.md index 99bb4f0253..51c2cd68dd 100644 --- a/src/foundation/type-arithmetic-dependent-pair-types.lagda.md +++ b/src/foundation/type-arithmetic-dependent-pair-types.lagda.md @@ -77,7 +77,7 @@ module _ is-equiv-map-left-unit-law-Σ-is-contr : is-equiv map-left-unit-law-Σ-is-contr is-equiv-map-left-unit-law-Σ-is-contr = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-left-unit-law-Σ-is-contr is-section-map-inv-left-unit-law-Σ-is-contr is-retraction-map-inv-left-unit-law-Σ-is-contr @@ -90,7 +90,7 @@ module _ is-equiv-map-inv-left-unit-law-Σ-is-contr : is-equiv map-inv-left-unit-law-Σ-is-contr is-equiv-map-inv-left-unit-law-Σ-is-contr = - is-equiv-has-inverse + is-equiv-is-invertible map-left-unit-law-Σ-is-contr is-retraction-map-inv-left-unit-law-Σ-is-contr is-section-map-inv-left-unit-law-Σ-is-contr @@ -150,7 +150,7 @@ module _ (H : (a : A) → is-contr (B a)) → is-equiv (map-inv-right-unit-law-Σ-is-contr H) is-equiv-map-inv-right-unit-law-Σ-is-contr H = - is-equiv-has-inverse + is-equiv-is-invertible ( pr1) ( is-retraction-map-inv-right-unit-law-Σ-is-contr H) ( is-section-map-inv-right-unit-law-Σ-is-contr H) @@ -193,7 +193,7 @@ module _ abstract is-equiv-map-associative-Σ : is-equiv map-associative-Σ is-equiv-map-associative-Σ = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-associative-Σ is-section-map-inv-associative-Σ is-retraction-map-inv-associative-Σ @@ -205,7 +205,7 @@ module _ inv-associative-Σ : Σ A (λ x → Σ (B x) (λ y → C (pair x y))) ≃ Σ (Σ A B) C pr1 inv-associative-Σ = map-inv-associative-Σ pr2 inv-associative-Σ = - is-equiv-has-inverse + is-equiv-is-invertible map-associative-Σ is-retraction-map-inv-associative-Σ is-section-map-inv-associative-Σ @@ -240,7 +240,7 @@ module _ is-equiv-map-associative-Σ' : is-equiv map-associative-Σ' is-equiv-map-associative-Σ' = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-associative-Σ' is-section-map-inv-associative-Σ' is-retraction-map-inv-associative-Σ' @@ -254,7 +254,7 @@ module _ Σ A (λ x → Σ (B x) (C x)) ≃ Σ (Σ A B) (λ w → C (pr1 w) (pr2 w)) pr1 inv-associative-Σ' = map-inv-associative-Σ' pr2 inv-associative-Σ' = - is-equiv-has-inverse + is-equiv-is-invertible map-associative-Σ' is-retraction-map-inv-associative-Σ' is-section-map-inv-associative-Σ' @@ -295,7 +295,7 @@ module _ abstract is-equiv-map-interchange-Σ-Σ : is-equiv map-interchange-Σ-Σ is-equiv-map-interchange-Σ-Σ = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-interchange-Σ-Σ is-section-map-inv-interchange-Σ-Σ is-retraction-map-inv-interchange-Σ-Σ @@ -343,7 +343,7 @@ module _ abstract is-equiv-map-left-swap-Σ : is-equiv map-left-swap-Σ is-equiv-map-left-swap-Σ = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-left-swap-Σ is-section-map-inv-left-swap-Σ is-retraction-map-inv-left-swap-Σ @@ -380,7 +380,7 @@ module _ is-equiv-map-right-swap-Σ : is-equiv map-right-swap-Σ is-equiv-map-right-swap-Σ = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-right-swap-Σ is-section-map-inv-right-swap-Σ is-retraction-map-inv-right-swap-Σ diff --git a/src/foundation/type-arithmetic-empty-type.lagda.md b/src/foundation/type-arithmetic-empty-type.lagda.md index 2034f1d7d6..4107a1747d 100644 --- a/src/foundation/type-arithmetic-empty-type.lagda.md +++ b/src/foundation/type-arithmetic-empty-type.lagda.md @@ -47,7 +47,7 @@ module _ is-equiv-pr1-prod-empty : is-equiv (pr1 {A = empty} {B = λ t → X}) is-equiv-pr1-prod-empty = - is-equiv-has-inverse + is-equiv-is-invertible inv-pr1-prod-empty is-section-inv-pr1-prod-empty is-retraction-inv-pr1-prod-empty @@ -70,7 +70,7 @@ module _ is-equiv-pr1-prod-is-empty : is-equiv (pr1 {A = A} {B = λ a → B}) is-equiv-pr1-prod-is-empty = - is-equiv-has-inverse + is-equiv-is-invertible inv-pr1-prod-is-empty is-section-inv-pr1-prod-is-empty is-retraction-inv-pr1-prod-is-empty @@ -98,7 +98,7 @@ module _ is-equiv-pr2-prod-empty : is-equiv (pr2 {A = X} {B = λ x → empty}) is-equiv-pr2-prod-empty = - is-equiv-has-inverse + is-equiv-is-invertible inv-pr2-prod-empty is-section-inv-pr2-prod-empty is-retraction-inv-pr2-prod-empty @@ -121,7 +121,7 @@ module _ is-equiv-pr2-prod-is-empty : is-equiv (pr2 {A = A} {B = λ a → B}) is-equiv-pr2-prod-is-empty = - is-equiv-has-inverse + is-equiv-is-invertible inv-pr2-prod-is-empty is-section-inv-pr2-prod-is-empty is-retraction-inv-pr2-prod-is-empty @@ -239,7 +239,7 @@ module _ is-equiv-map-left-unit-law-coprod-is-empty : is-equiv map-left-unit-law-coprod-is-empty is-equiv-map-left-unit-law-coprod-is-empty = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-left-unit-law-coprod-is-empty is-section-map-inv-left-unit-law-coprod-is-empty is-retraction-map-inv-left-unit-law-coprod-is-empty @@ -251,7 +251,7 @@ module _ is-equiv-inr-is-empty : is-equiv inr is-equiv-inr-is-empty = - is-equiv-has-inverse + is-equiv-is-invertible ( map-left-unit-law-coprod-is-empty) ( is-retraction-map-inv-left-unit-law-coprod-is-empty) ( is-section-map-inv-left-unit-law-coprod-is-empty) @@ -338,14 +338,14 @@ module _ is-equiv-map-right-unit-law-coprod-is-empty : is-equiv map-right-unit-law-coprod-is-empty is-equiv-map-right-unit-law-coprod-is-empty = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-right-unit-law-coprod-is-empty is-section-map-inv-right-unit-law-coprod-is-empty is-retraction-map-inv-right-unit-law-coprod-is-empty is-equiv-inl-is-empty : is-equiv (inl {l1} {l2} {A} {B}) is-equiv-inl-is-empty = - is-equiv-has-inverse + is-equiv-is-invertible ( map-right-unit-law-coprod-is-empty) ( is-retraction-map-inv-right-unit-law-coprod-is-empty) ( is-section-map-inv-right-unit-law-coprod-is-empty) diff --git a/src/foundation/type-arithmetic-unit-type.lagda.md b/src/foundation/type-arithmetic-unit-type.lagda.md index 54484b793d..a83bf154ad 100644 --- a/src/foundation/type-arithmetic-unit-type.lagda.md +++ b/src/foundation/type-arithmetic-unit-type.lagda.md @@ -51,7 +51,7 @@ module _ is-equiv-map-left-unit-law-Σ : is-equiv map-left-unit-law-Σ is-equiv-map-left-unit-law-Σ = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-left-unit-law-Σ is-section-map-inv-left-unit-law-Σ is-retraction-map-inv-left-unit-law-Σ @@ -62,7 +62,7 @@ module _ is-equiv-map-inv-left-unit-law-Σ : is-equiv map-inv-left-unit-law-Σ is-equiv-map-inv-left-unit-law-Σ = - is-equiv-has-inverse + is-equiv-is-invertible map-left-unit-law-Σ is-retraction-map-inv-left-unit-law-Σ is-section-map-inv-left-unit-law-Σ @@ -96,7 +96,7 @@ module _ is-equiv-map-left-unit-law-prod : is-equiv map-left-unit-law-prod is-equiv-map-left-unit-law-prod = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-left-unit-law-prod is-section-map-inv-left-unit-law-prod is-retraction-map-inv-left-unit-law-prod @@ -107,7 +107,7 @@ module _ is-equiv-map-inv-left-unit-law-prod : is-equiv map-inv-left-unit-law-prod is-equiv-map-inv-left-unit-law-prod = - is-equiv-has-inverse + is-equiv-is-invertible map-left-unit-law-prod is-retraction-map-inv-left-unit-law-prod is-section-map-inv-left-unit-law-prod @@ -137,7 +137,7 @@ module _ is-equiv-map-right-unit-law-prod : is-equiv map-right-unit-law-prod is-equiv-map-right-unit-law-prod = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-right-unit-law-prod is-section-map-inv-right-unit-law-prod is-retraction-map-inv-right-unit-law-prod @@ -170,7 +170,7 @@ module _ is-equiv-map-left-unit-law-Π : is-equiv map-left-unit-law-Π is-equiv-map-left-unit-law-Π = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-left-unit-law-Π is-section-map-inv-left-unit-law-Π is-retraction-map-inv-left-unit-law-Π @@ -181,7 +181,7 @@ module _ is-equiv-map-inv-left-unit-law-Π : is-equiv map-inv-left-unit-law-Π is-equiv-map-inv-left-unit-law-Π = - is-equiv-has-inverse + is-equiv-is-invertible map-left-unit-law-Π is-retraction-map-inv-left-unit-law-Π is-section-map-inv-left-unit-law-Π diff --git a/src/foundation/type-duality.lagda.md b/src/foundation/type-duality.lagda.md index 61c04c1fca..144673560a 100644 --- a/src/foundation/type-duality.lagda.md +++ b/src/foundation/type-duality.lagda.md @@ -26,6 +26,7 @@ open import foundation-core.fibers-of-maps open import foundation-core.function-types open import foundation-core.functoriality-dependent-function-types open import foundation-core.functoriality-dependent-pair-types +open import foundation-core.functoriality-function-types open import foundation-core.homotopies open import foundation-core.identity-types open import foundation-core.injective-maps @@ -116,18 +117,18 @@ is-emb-map-type-duality ≃ ( (a : A) → Σ X (λ x → type-is-small (H (f x) a)) ≃ Σ Y (λ y → type-is-small (H (g y) a))) - by equiv-map-Π (λ a → equiv-univalence) + by equiv-Π-equiv-family (λ a → equiv-univalence) ≃ ( (a : A) → fiber f a ≃ Σ Y (λ y → type-is-small (H (g y) a))) by - equiv-map-Π + equiv-Π-equiv-family ( λ a → equiv-precomp-equiv ( equiv-tot (λ x → equiv-is-small (H (f x) a))) ( Σ Y (λ y → type-is-small (H (g y) a)))) ≃ ( (a : A) → fiber f a ≃ fiber g a) by - equiv-map-Π + equiv-Π-equiv-family ( λ a → equiv-postcomp-equiv ( equiv-tot (λ y → inv-equiv (equiv-is-small (H (g y) a)))) @@ -225,7 +226,7 @@ module _ is-equiv-map-type-duality : is-equiv (map-type-duality (is-locally-small-is-small H)) is-equiv-map-type-duality = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-type-duality is-section-map-inv-type-duality is-retraction-map-inv-type-duality @@ -290,7 +291,7 @@ is-retraction-Pr1 {A = A} (pair X f) = is-equiv-Fiber : {l1 : Level} (l2 : Level) (A : UU l1) → is-equiv (Fiber {l1 ⊔ l2} A) is-equiv-Fiber l2 A = - is-equiv-has-inverse + is-equiv-is-invertible ( Pr1 A) ( is-section-Pr1 {l2 = l2}) ( is-retraction-Pr1 {l2 = l2}) @@ -303,7 +304,7 @@ pr2 (equiv-Fiber l2 A) = is-equiv-Fiber l2 A is-equiv-Pr1 : {l1 : Level} (l2 : Level) (A : UU l1) → is-equiv (Pr1 {l1 ⊔ l2} A) is-equiv-Pr1 {l1} l2 A = - is-equiv-has-inverse + is-equiv-is-invertible ( Fiber A) ( is-retraction-Pr1 {l2 = l2}) ( is-section-Pr1 {l2 = l2}) diff --git a/src/foundation/type-theoretic-principle-of-choice.lagda.md b/src/foundation/type-theoretic-principle-of-choice.lagda.md index 1a1a7ef294..d463a83f92 100644 --- a/src/foundation/type-theoretic-principle-of-choice.lagda.md +++ b/src/foundation/type-theoretic-principle-of-choice.lagda.md @@ -115,7 +115,7 @@ abstract {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : (x : A) → B x → UU l3} → is-equiv (map-distributive-Π-Σ {A = A} {B = B} {C = C}) is-equiv-map-distributive-Π-Σ {A = A} {B = B} {C = C} = - is-equiv-has-inverse + is-equiv-is-invertible ( map-inv-distributive-Π-Σ {A = A} {B = B} {C = C}) ( is-section-map-inv-distributive-Π-Σ {A = A} {B = B} {C = C}) ( is-retraction-map-inv-distributive-Π-Σ {A = A} {B = B} {C = C}) @@ -131,7 +131,7 @@ abstract {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : (x : A) → B x → UU l3} → is-equiv (map-inv-distributive-Π-Σ {A = A} {B = B} {C = C}) is-equiv-map-inv-distributive-Π-Σ {A = A} {B = B} {C = C} = - is-equiv-has-inverse + is-equiv-is-invertible ( map-distributive-Π-Σ {A = A} {B = B} {C = C}) ( is-retraction-map-inv-distributive-Π-Σ {A = A} {B = B} {C = C}) ( is-section-map-inv-distributive-Π-Σ {A = A} {B = B} {C = C}) @@ -177,11 +177,17 @@ eq-Eq-Π-total-fam C f g = map-inv-equiv (extensionality-Π-total-fam C f g) mapping-into-Σ : {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : B → UU l3} → (A → Σ B C) → Σ (A → B) (λ f → (x : A) → C (f x)) -mapping-into-Σ {B = B} = map-distributive-Π-Σ {B = λ x → B} +mapping-into-Σ {B = B} = map-distributive-Π-Σ {B = λ _ → B} abstract is-equiv-mapping-into-Σ : {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : B → UU l3} → is-equiv (mapping-into-Σ {A = A} {C = C}) is-equiv-mapping-into-Σ = is-equiv-map-distributive-Π-Σ + +equiv-mapping-into-Σ : + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : B → UU l3} → + (A → Σ B C) ≃ Σ (A → B) (λ f → (x : A) → C (f x)) +pr1 equiv-mapping-into-Σ = mapping-into-Σ +pr2 equiv-mapping-into-Σ = is-equiv-mapping-into-Σ ``` diff --git a/src/foundation/uniqueness-set-quotients.lagda.md b/src/foundation/uniqueness-set-quotients.lagda.md index 2efffc203b..cbc66d4eb4 100644 --- a/src/foundation/uniqueness-set-quotients.lagda.md +++ b/src/foundation/uniqueness-set-quotients.lagda.md @@ -20,6 +20,7 @@ open import foundation-core.contractible-types open import foundation-core.equivalence-relations open import foundation-core.function-extensionality open import foundation-core.function-types +open import foundation-core.functoriality-function-types open import foundation-core.homotopies open import foundation-core.identity-types open import foundation-core.injective-maps @@ -126,7 +127,7 @@ module _ ({l : Level} → is-set-quotient l R C g) → is-equiv h is-equiv-is-set-quotient-is-set-quotient Uf Ug = - is-equiv-has-inverse + is-equiv-is-invertible ( map-inv-is-equiv-is-set-quotient-is-set-quotient Uf Ug) ( is-section-map-inv-is-equiv-is-set-quotient-is-set-quotient Uf Ug) ( is-retraction-map-inv-is-equiv-is-set-quotient-is-set-quotient Uf Ug) diff --git a/src/foundation/uniqueness-truncation.lagda.md b/src/foundation/uniqueness-truncation.lagda.md index 0493587d43..2b526f05c2 100644 --- a/src/foundation/uniqueness-truncation.lagda.md +++ b/src/foundation/uniqueness-truncation.lagda.md @@ -38,12 +38,12 @@ module _ ({l : Level} → is-truncation l C g) → is-equiv h is-equiv-is-truncation-is-truncation K L = - is-equiv-has-inverse + is-equiv-is-invertible ( map-inv-is-equiv (L B) f) ( {!!}) {!!} - is-equiv-has-inverse + is-equiv-is-invertible ( pr1 (center K)) ( htpy-eq ( is-injective-is-equiv diff --git a/src/foundation/universal-property-booleans.lagda.md b/src/foundation/universal-property-booleans.lagda.md index 92e56622dc..3bf8a1a28f 100644 --- a/src/foundation/universal-property-booleans.lagda.md +++ b/src/foundation/universal-property-booleans.lagda.md @@ -59,7 +59,7 @@ abstract {l : Level} (A : UU l) → is-equiv (λ (f : bool → A) → pair (f true) (f false)) universal-property-bool A = - is-equiv-has-inverse + is-equiv-is-invertible map-universal-property-bool is-section-map-universal-property-bool is-retraction-map-universal-property-bool diff --git a/src/foundation/universal-property-cartesian-product-types.lagda.md b/src/foundation/universal-property-cartesian-product-types.lagda.md index 2fd54ce24a..3409e6f96d 100644 --- a/src/foundation/universal-property-cartesian-product-types.lagda.md +++ b/src/foundation/universal-property-cartesian-product-types.lagda.md @@ -41,7 +41,7 @@ universal-property-product : ((x : X) → A x × B x) ≃ (((x : X) → A x) × ((x : X) → B x)) pr1 universal-property-product f = (λ x → pr1 (f x)) , (λ x → pr2 (f x)) pr2 universal-property-product = - is-equiv-has-inverse + is-equiv-is-invertible ( λ (f , g) → (λ x → (f x , g x))) ( refl-htpy) ( refl-htpy) @@ -89,7 +89,7 @@ Cartesian products are a special case of pullbacks. is-pullback-prod : is-pullback (const A unit star) (const B unit star) cone-prod is-pullback-prod = - is-equiv-has-inverse + is-equiv-is-invertible inv-gap-prod is-section-inv-gap-prod is-retraction-inv-gap-prod diff --git a/src/foundation/universal-property-coproduct-types.lagda.md b/src/foundation/universal-property-coproduct-types.lagda.md index 1d1b757f45..6e7e651745 100644 --- a/src/foundation/universal-property-coproduct-types.lagda.md +++ b/src/foundation/universal-property-coproduct-types.lagda.md @@ -9,13 +9,14 @@ module foundation.universal-property-coproduct-types where ```agda open import foundation.dependent-pair-types open import foundation.equality-cartesian-product-types -open import foundation.equivalences open import foundation.function-extensionality open import foundation.universe-levels open import foundation-core.cartesian-product-types open import foundation-core.coproduct-types +open import foundation-core.equivalences open import foundation-core.function-types +open import foundation-core.functoriality-function-types open import foundation-core.identity-types ``` @@ -39,7 +40,7 @@ module _ dependent-universal-property-coprod : {l3 : Level} (P : A + B → UU l3) → is-equiv (ev-inl-inr P) dependent-universal-property-coprod P = - is-equiv-has-inverse + is-equiv-is-invertible ( λ p → ind-coprod P (pr1 p) (pr2 p)) ( ind-Σ (λ f g → eq-pair refl refl)) ( λ s → eq-htpy (ind-coprod _ (λ x → refl) λ y → refl)) diff --git a/src/foundation/universal-property-empty-type.lagda.md b/src/foundation/universal-property-empty-type.lagda.md index a8520ea604..eecff84f21 100644 --- a/src/foundation/universal-property-empty-type.lagda.md +++ b/src/foundation/universal-property-empty-type.lagda.md @@ -8,13 +8,14 @@ module foundation.universal-property-empty-type where ```agda open import foundation.dependent-pair-types -open import foundation.equivalences open import foundation.function-extensionality open import foundation.universe-levels open import foundation-core.contractible-types open import foundation-core.empty-types +open import foundation-core.equivalences open import foundation-core.function-types +open import foundation-core.functoriality-function-types ```
diff --git a/src/foundation/universal-property-fiber-products.lagda.md b/src/foundation/universal-property-fiber-products.lagda.md index ca894b39a0..a3c3571684 100644 --- a/src/foundation/universal-property-fiber-products.lagda.md +++ b/src/foundation/universal-property-fiber-products.lagda.md @@ -30,8 +30,8 @@ open import foundation-core.universal-property-pullbacks The fiberwise product of two families `P` and `Q` over a type `X` is the family of types `(P x) × (Q x)` over `X`. Similarly, the fiber product of two maps -`f :A → X` and `g : B → X` is the type `Σ X (λ x → fib f x × fib g x)`, which -fits in a pullback diagram on `f` and `g`. +`f :A → X` and `g : B → X` is the type `Σ X (λ x → fiber f x × fiber g x)`, +which fits in a pullback diagram on `f` and `g`. ```agda module _ @@ -75,7 +75,7 @@ map. is-pullback-fiberwise-prod : is-pullback (pr1 {B = P}) (pr1 {B = Q}) cone-fiberwise-prod is-pullback-fiberwise-prod = - is-equiv-has-inverse + is-equiv-is-invertible inv-gap-fiberwise-prod is-section-inv-gap-fiberwise-prod is-retraction-inv-gap-fiberwise-prod @@ -131,7 +131,7 @@ module _ is-pullback-total-prod-fibers : is-pullback f g cone-total-prod-fibers is-pullback-total-prod-fibers = - is-equiv-has-inverse + is-equiv-is-invertible inv-gap-total-prod-fibers is-section-inv-gap-total-prod-fibers is-retraction-inv-gap-total-prod-fibers diff --git a/src/foundation/universal-property-identity-systems.lagda.md b/src/foundation/universal-property-identity-systems.lagda.md new file mode 100644 index 0000000000..0d427fc9c1 --- /dev/null +++ b/src/foundation/universal-property-identity-systems.lagda.md @@ -0,0 +1,102 @@ +# The universal property of identity systems + +```agda +module foundation.universal-property-identity-systems where +``` + +
Imports + +```agda +open import foundation.action-on-identifications-functions +open import foundation.contractible-types +open import foundation.dependent-pair-types +open import foundation.fundamental-theorem-of-identity-types +open import foundation.identity-systems +open import foundation.torsorial-type-families +open import foundation.universal-property-dependent-pair-types +open import foundation.universe-levels + +open import foundation-core.equivalences +open import foundation-core.identity-types +open import foundation-core.sections +open import foundation-core.transport +``` + +
+ +## Idea + +A **(unary) identity system** on a type `A` equipped with a point `a : A` +consists of a type family `B` over `A` equipped with a point `b : B a` that +satisfies an induction principle analogous to the induction principle of the +[identity type](foundation.identity-types.md) at `a`. The +[dependent universal property of identity types](foundation.universal-property-identity-types.md) +also follows for identity systems. + +## Definition + +### The universal property of identity systems + +```agda +dependent-universal-property-identity-system : + {l1 l2 : Level} (l3 : Level) {A : UU l1} {B : A → UU l2} {a : A} (b : B a) → + UU (l1 ⊔ l2 ⊔ lsuc l3) +dependent-universal-property-identity-system l3 {A} {B} b = + (P : (x : A) (y : B x) → UU l3) → is-equiv (ev-refl-identity-system b {P}) +``` + +## Properties + +### A type family satisfies the dependent universal property of identity systems if and only if it is torsorial + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {a : A} (b : B a) + where + + dependent-universal-property-identity-system-is-torsorial : + is-torsorial B → + {l3 : Level} → dependent-universal-property-identity-system l3 {A} {B} b + dependent-universal-property-identity-system-is-torsorial + H P = + is-equiv-left-factor + ( ev-refl-identity-system b) + ( ev-pair) + ( dependent-universal-property-contr-is-contr + ( a , b) + ( H) + ( λ u → P (pr1 u) (pr2 u))) + ( is-equiv-ev-pair) + + is-torsorial-dependent-universal-property-identity-system : + ({l3 : Level} → dependent-universal-property-identity-system l3 {A} {B} b) → + is-torsorial B + pr1 (is-torsorial-dependent-universal-property-identity-system H) = (a , b) + pr2 (is-torsorial-dependent-universal-property-identity-system H) u = + map-inv-is-equiv + ( H (λ x y → (a , b) = (x , y))) + ( refl) + ( pr1 u) + ( pr2 u) +``` + +### A type family satisfies the dependent universal property of identity systems if and only if it is an identity system + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {a : A} (b : B a) + where + + dependent-universal-property-identity-system-is-identity-system : + ({l : Level} → is-identity-system l {A} B a b) → + ({l : Level} → dependent-universal-property-identity-system l {A} {B} b) + dependent-universal-property-identity-system-is-identity-system H = + dependent-universal-property-identity-system-is-torsorial b + ( is-torsorial-is-identity-system a b H) + + is-identity-system-dependent-universal-property-identity-system : + ({l : Level} → dependent-universal-property-identity-system l {A} {B} b) → + ({l : Level} → is-identity-system l {A} B a b) + is-identity-system-dependent-universal-property-identity-system H P = + section-is-equiv (H P) +``` diff --git a/src/foundation/universal-property-identity-types.lagda.md b/src/foundation/universal-property-identity-types.lagda.md index 26d8847a0b..220e0b2a8e 100644 --- a/src/foundation/universal-property-identity-types.lagda.md +++ b/src/foundation/universal-property-identity-types.lagda.md @@ -15,10 +15,8 @@ open import foundation.equivalences open import foundation.full-subtypes open import foundation.function-extensionality open import foundation.functoriality-dependent-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.propositional-maps open import foundation.type-theoretic-principle-of-choice open import foundation.univalence open import foundation.universe-levels @@ -26,7 +24,9 @@ open import foundation.universe-levels open import foundation-core.contractible-types open import foundation-core.fibers-of-maps open import foundation-core.function-types +open import foundation-core.functoriality-dependent-pair-types open import foundation-core.injective-maps +open import foundation-core.propositional-maps open import foundation-core.propositions ``` @@ -51,7 +51,7 @@ abstract {l1 l2 : Level} {A : UU l1} (a : A) {B : (x : A) → a = x → UU l2} → is-equiv (ev-refl a {B = B}) is-equiv-ev-refl a = - is-equiv-has-inverse + is-equiv-is-invertible ( ind-Id a _) ( λ b → refl) ( λ f → eq-htpy @@ -70,7 +70,8 @@ equiv-ev-refl' : {l1 l2 : Level} {A : UU l1} (a : A) {B : (x : A) → x = a → UU l2} → ((x : A) (p : x = a) → B x p) ≃ B a refl equiv-ev-refl' a {B} = - equiv-ev-refl a ∘e equiv-map-Π (λ x → equiv-precomp-Π (equiv-inv a x) (B x)) + ( equiv-ev-refl a) ∘e + ( equiv-Π-equiv-family (λ x → equiv-precomp-Π (equiv-inv a x) (B x))) ``` ### `Id : A → (A → 𝒰)` is an embedding @@ -92,7 +93,7 @@ to show that this fiber is a proposition. We do this by constructing an embedding ```text - fib Id (Id a) ↪ Σ A (Id a). + fiber Id (Id a) ↪ Σ A (Id a). ``` Since the codomain of this embedding is contractible, the claim follows. The @@ -172,12 +173,13 @@ module _ ( Σ A (λ b → (x : A) → (b = x) ≃ (a = x))) ( equiv-tot ( λ b → - equiv-map-Π + equiv-Π-equiv-family ( λ x → equiv-postcomp-equiv (inv-equiv (e x)) (b = x)))) ( is-contr-equiv' ( fiber Id (Id a)) ( equiv-tot - ( λ b → equiv-map-Π (λ x → equiv-univalence) ∘e equiv-funext)) + ( λ b → + equiv-Π-equiv-family (λ x → equiv-univalence) ∘e equiv-funext)) ( is-proof-irrelevant-is-prop ( is-prop-map-is-emb (is-emb-Id A) (Id a)) ( a , refl))) diff --git a/src/foundation/universal-property-image.lagda.md b/src/foundation/universal-property-image.lagda.md index a298877f4e..6f57b0faf3 100644 --- a/src/foundation/universal-property-image.lagda.md +++ b/src/foundation/universal-property-image.lagda.md @@ -10,6 +10,7 @@ module foundation.universal-property-image where open import foundation.dependent-pair-types open import foundation.embeddings open import foundation.images +open import foundation.logical-equivalences open import foundation.propositional-truncations open import foundation.slice open import foundation.surjective-maps @@ -26,7 +27,6 @@ open import foundation-core.functoriality-dependent-pair-types open import foundation-core.homotopies open import foundation-core.identity-types open import foundation-core.injective-maps -open import foundation-core.logical-equivalences open import foundation-core.propositional-maps open import foundation-core.propositions open import foundation-core.sections @@ -330,7 +330,8 @@ abstract pair ( fiber (map-emb m) (pr1 i b)) ( is-prop-map-emb m (pr1 i b)))) ∘e - ( ( equiv-map-Π (λ a → equiv-tr (fiber (map-emb m)) (pr2 q a))) ∘e + ( ( equiv-Π-equiv-family + ( λ a → equiv-tr (fiber (map-emb m)) (pr2 q a))) ∘e ( ( reduce-Π-fiber f (fiber (map-emb m))) ∘e ( equiv-fiberwise-hom-hom-slice f (map-emb m))))))) diff --git a/src/foundation/universal-property-maybe.lagda.md b/src/foundation/universal-property-maybe.lagda.md index 66f784e733..5dbc444db8 100644 --- a/src/foundation/universal-property-maybe.lagda.md +++ b/src/foundation/universal-property-maybe.lagda.md @@ -59,7 +59,7 @@ module _ dependent-universal-property-Maybe : is-equiv ev-Maybe dependent-universal-property-Maybe = - is-equiv-has-inverse + is-equiv-is-invertible ind-Maybe is-section-ind-Maybe is-retraction-ind-Maybe diff --git a/src/foundation/universal-property-propositional-truncation-into-sets.lagda.md b/src/foundation/universal-property-propositional-truncation-into-sets.lagda.md index a7441c3dcd..156b5631cc 100644 --- a/src/foundation/universal-property-propositional-truncation-into-sets.lagda.md +++ b/src/foundation/universal-property-propositional-truncation-into-sets.lagda.md @@ -158,7 +158,7 @@ abstract {l1 l2 : Level} {A : UU l1} (B : Set l2) → is-equiv (precomp-universal-property-set-quotient-trunc-Prop {A = A} B) universal-property-set-quotient-trunc-Prop {A = A} B = - is-equiv-has-inverse + is-equiv-is-invertible ( map-universal-property-set-quotient-trunc-Prop' B) ( is-section-map-universal-property-set-quotient-trunc-Prop B) ( is-retraction-map-universal-property-set-quotient-trunc-Prop B) diff --git a/src/foundation/universal-property-propositional-truncation.lagda.md b/src/foundation/universal-property-propositional-truncation.lagda.md index 31c5843201..90d997f279 100644 --- a/src/foundation/universal-property-propositional-truncation.lagda.md +++ b/src/foundation/universal-property-propositional-truncation.lagda.md @@ -22,6 +22,7 @@ open import foundation-core.contractible-types open import foundation-core.function-types open import foundation-core.functoriality-dependent-function-types open import foundation-core.functoriality-dependent-pair-types +open import foundation-core.functoriality-function-types open import foundation-core.homotopies open import foundation-core.identity-types open import foundation-core.propositions @@ -344,7 +345,7 @@ abstract ( λ h a a' → h a (f' a')) ( λ h a p' → h (f a) p') ( is-ptr-f (pair (type-hom-Prop P' Q) (is-prop-type-hom-Prop P' Q))) - ( is-equiv-map-Π + ( is-equiv-map-equiv-Π-equiv-family ( λ a g a' → g (f' a')) ( λ a → is-ptr-f' Q))) ``` diff --git a/src/foundation/universal-property-set-truncation.lagda.md b/src/foundation/universal-property-set-truncation.lagda.md index 49a43de7b0..a298e3c511 100644 --- a/src/foundation/universal-property-set-truncation.lagda.md +++ b/src/foundation/universal-property-set-truncation.lagda.md @@ -8,7 +8,6 @@ module foundation.universal-property-set-truncation where ```agda open import foundation.dependent-pair-types -open import foundation.equivalences open import foundation.function-extensionality open import foundation.mere-equality open import foundation.reflecting-maps-equivalence-relations @@ -20,8 +19,10 @@ open import foundation.universe-levels open import foundation-core.contractible-maps open import foundation-core.contractible-types +open import foundation-core.equivalences open import foundation-core.function-types open import foundation-core.functoriality-dependent-pair-types +open import foundation-core.functoriality-function-types open import foundation-core.homotopies open import foundation-core.identity-types open import foundation-core.propositions diff --git a/src/foundation/universal-property-truncation.lagda.md b/src/foundation/universal-property-truncation.lagda.md index ce0ad6cc64..2610019cc4 100644 --- a/src/foundation/universal-property-truncation.lagda.md +++ b/src/foundation/universal-property-truncation.lagda.md @@ -61,7 +61,7 @@ module _ ( equiv-tot ( λ z → ( ( equiv-ev-refl' x) ∘e - ( equiv-map-Π + ( equiv-Π-equiv-family ( λ x' → equiv-is-truncation ( Id-Truncated-Type B (f x') (f x)) @@ -83,11 +83,11 @@ module _ ( ( equiv-tot ( λ h → ( ( ( inv-equiv (equiv-funext)) ∘e - ( equiv-map-Π + ( equiv-Π-equiv-family ( λ x → equiv-inv (g x) (h (f x)) ∘e equiv-ev-refl (f x)))) ∘e ( equiv-swap-Π)) ∘e - ( equiv-map-Π (λ x → equiv-ev-pair)))) ∘e + ( equiv-Π-equiv-family (λ x → equiv-ev-pair)))) ∘e ( distributive-Π-Σ)) ( is-contr-Π ( unique-extension-fiber-is-truncation-is-truncation-ap C g))) @@ -570,7 +570,7 @@ module _ ( precomp-Set (unit-trunc-Set ∘ tot (λ x → unit-trunc-Set)) C) ( is-equiv-ev-pair) ( is-equiv-htpy-equiv - ( ( equiv-map-Π + ( ( equiv-Π-equiv-family ( λ x → equiv-universal-property-trunc-Set (B x) C)) ∘e ( ( equiv-ev-pair) ∘e ( equiv-universal-property-trunc-Set @@ -788,7 +788,7 @@ module _ ( equiv-precomp-Π e (type-trunc-Set ∘ B)) ( type-trunc-Set ((x : A) → B x))) ( λ f → - equiv-map-Π + equiv-Π-equiv-family ( λ h → ( ( inv-equiv equiv-funext) ∘e ( equiv-precomp-Π e diff --git a/src/foundation/universal-property-unit-type.lagda.md b/src/foundation/universal-property-unit-type.lagda.md index d351b55dff..4a7e67fd87 100644 --- a/src/foundation/universal-property-unit-type.lagda.md +++ b/src/foundation/universal-property-unit-type.lagda.md @@ -9,12 +9,13 @@ module foundation.universal-property-unit-type where ```agda open import foundation.contractible-types open import foundation.dependent-pair-types -open import foundation.equivalences open import foundation.unit-type open import foundation.universe-levels open import foundation-core.constant-maps +open import foundation-core.equivalences open import foundation-core.function-types +open import foundation-core.functoriality-function-types open import foundation-core.homotopies ``` diff --git a/src/foundation/unordered-pairs-of-types.lagda.md b/src/foundation/unordered-pairs-of-types.lagda.md index 6819cbe635..491d79e352 100644 --- a/src/foundation/unordered-pairs-of-types.lagda.md +++ b/src/foundation/unordered-pairs-of-types.lagda.md @@ -71,7 +71,7 @@ module _ ## Properties -### Univalence for unordered pairs of types +### Extensionality of unordered pairs of types ```agda module _ diff --git a/src/foundation/unordered-pairs.lagda.md b/src/foundation/unordered-pairs.lagda.md index 38e3743fd0..c3de4e1b57 100644 --- a/src/foundation/unordered-pairs.lagda.md +++ b/src/foundation/unordered-pairs.lagda.md @@ -8,6 +8,9 @@ module foundation.unordered-pairs where ```agda open import foundation.action-on-identifications-functions +open import foundation.commuting-triangles-of-maps +open import foundation.contractible-maps +open import foundation.contractible-types open import foundation.decidable-equality open import foundation.dependent-pair-types open import foundation.existential-quantification @@ -17,9 +20,10 @@ open import foundation.homotopies open import foundation.mere-equivalences open import foundation.propositional-truncations open import foundation.structure-identity-principle +open import foundation.unit-type +open import foundation.universal-property-dependent-pair-types 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.equivalences @@ -124,21 +128,34 @@ Any two elements `x` and `y` in a type `A` define a standard unordered pair ```agda module _ - {l1 : Level} {A : UU l1} + {l1 : Level} {A : UU l1} (x y : A) where - element-standard-unordered-pair : (x y : A) → Fin 2 → A - element-standard-unordered-pair x y (inl (inr star)) = x - element-standard-unordered-pair x y (inr star) = y - - standard-unordered-pair : A → A → unordered-pair A - pr1 (standard-unordered-pair x y) = Fin-UU-Fin' 2 - pr2 (standard-unordered-pair x y) = element-standard-unordered-pair x y + element-standard-unordered-pair : Fin 2 → A + element-standard-unordered-pair (inl (inr star)) = x + element-standard-unordered-pair (inr star) = y + + standard-unordered-pair : unordered-pair A + pr1 standard-unordered-pair = Fin-UU-Fin' 2 + pr2 standard-unordered-pair = element-standard-unordered-pair + + other-element-standard-unordered-pair : Fin 2 → A + other-element-standard-unordered-pair (inl (inr star)) = y + other-element-standard-unordered-pair (inr star) = x + + compute-other-element-standard-unordered-pair : + (u : Fin 2) → + other-element-unordered-pair standard-unordered-pair u = + other-element-standard-unordered-pair u + compute-other-element-standard-unordered-pair (inl (inr star)) = + ap element-standard-unordered-pair (compute-swap-Fin-two-ℕ (inl (inr star))) + compute-other-element-standard-unordered-pair (inr star) = + ap element-standard-unordered-pair (compute-swap-Fin-two-ℕ (inr star)) ``` ## Properties -### Equality of unordered pairs +### Extensionality of unordered pairs ```agda module _ @@ -149,7 +166,10 @@ module _ Eq-unordered-pair p q = Σ ( type-unordered-pair p ≃ type-unordered-pair q) ( λ e → - (element-unordered-pair p) ~ (element-unordered-pair q ∘ map-equiv e)) + coherence-triangle-maps + ( element-unordered-pair p) + ( element-unordered-pair q) + ( map-equiv e)) refl-Eq-unordered-pair : (p : unordered-pair A) → Eq-unordered-pair p p pr1 (refl-Eq-unordered-pair (pair X p)) = id-equiv-UU-Fin {k = 2} X @@ -210,6 +230,78 @@ module _ eq-Eq-refl-unordered-pair p = is-retraction-eq-Eq-unordered-pair p p refl ``` +### Induction on equality of unordered pairs + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (p : unordered-pair A) + (B : (q : unordered-pair A) → Eq-unordered-pair p q → UU l2) + where + + ev-refl-Eq-unordered-pair : + ((q : unordered-pair A) (e : Eq-unordered-pair p q) → B q e) → + B p (refl-Eq-unordered-pair p) + ev-refl-Eq-unordered-pair f = f p (refl-Eq-unordered-pair p) + + triangle-ev-refl-Eq-unordered-pair : + coherence-triangle-maps + ( ev-point (p , refl-Eq-unordered-pair p)) + ( ev-refl-Eq-unordered-pair) + ( ev-pair) + triangle-ev-refl-Eq-unordered-pair = refl-htpy + + abstract + is-equiv-ev-refl-Eq-unordered-pair : is-equiv ev-refl-Eq-unordered-pair + is-equiv-ev-refl-Eq-unordered-pair = + is-equiv-left-factor-htpy + ( ev-point (p , refl-Eq-unordered-pair p)) + ( ev-refl-Eq-unordered-pair) + ( ev-pair) + ( triangle-ev-refl-Eq-unordered-pair) + ( dependent-universal-property-contr-is-contr + ( p , refl-Eq-unordered-pair p) + ( is-contr-total-Eq-unordered-pair p) + ( λ u → B (pr1 u) (pr2 u))) + ( is-equiv-ev-pair) + + abstract + is-contr-map-ev-refl-Eq-unordered-pair : + is-contr-map ev-refl-Eq-unordered-pair + is-contr-map-ev-refl-Eq-unordered-pair = + is-contr-map-is-equiv is-equiv-ev-refl-Eq-unordered-pair + + abstract + ind-Eq-unordered-pair : + B p (refl-Eq-unordered-pair p) → + ((q : unordered-pair A) (e : Eq-unordered-pair p q) → B q e) + ind-Eq-unordered-pair u = + pr1 (center (is-contr-map-ev-refl-Eq-unordered-pair u)) + + compute-refl-ind-Eq-unordered-pair : + (u : B p (refl-Eq-unordered-pair p)) → + ind-Eq-unordered-pair u p (refl-Eq-unordered-pair p) = u + compute-refl-ind-Eq-unordered-pair u = + pr2 (center (is-contr-map-ev-refl-Eq-unordered-pair u)) +``` + +### Inverting extensional equality of unordered pairs + +```agda +module _ + {l : Level} {A : UU l} (p q : unordered-pair A) + where + + inv-Eq-unordered-pair : + Eq-unordered-pair p q → Eq-unordered-pair q p + pr1 (inv-Eq-unordered-pair (e , H)) = inv-equiv e + pr2 (inv-Eq-unordered-pair (e , H)) = + coherence-triangle-maps-inv-top + ( element-unordered-pair p) + ( element-unordered-pair q) + ( e) + ( H) +``` + ### Mere equality of unordered pairs ```agda @@ -237,15 +329,25 @@ module _ ### A standard unordered pair `{x,y}` is equal to the standard unordered pair `{y,x}` ```agda -is-commutative-standard-unordered-pair : - {l : Level} {A : UU l} (x y : A) → - standard-unordered-pair x y = standard-unordered-pair y x -is-commutative-standard-unordered-pair x y = - eq-Eq-unordered-pair - ( standard-unordered-pair x y) - ( standard-unordered-pair y x) - ( equiv-succ-Fin 2) - ( λ { (inl (inr star)) → refl ; (inr star) → refl}) +module _ + {l1 : Level} {A : UU l1} (x y : A) + where + + swap-standard-unordered-pair : + Eq-unordered-pair + ( standard-unordered-pair x y) + ( standard-unordered-pair y x) + pr1 swap-standard-unordered-pair = equiv-succ-Fin 2 + pr2 swap-standard-unordered-pair (inl (inr star)) = refl + pr2 swap-standard-unordered-pair (inr star) = refl + + is-commutative-standard-unordered-pair : + standard-unordered-pair x y = standard-unordered-pair y x + is-commutative-standard-unordered-pair = + eq-Eq-unordered-pair' + ( standard-unordered-pair x y) + ( standard-unordered-pair y x) + ( swap-standard-unordered-pair) ``` ### Functoriality of unordered pairs @@ -345,5 +447,74 @@ id-equiv-standard-unordered-pair x y = unordered-distinct-pair : {l : Level} (A : UU l) → UU (lsuc lzero ⊔ l) -unordered-distinct-pair A = Σ (UU-Fin lzero 2) (λ X → pr1 X ↪ A) +unordered-distinct-pair A = + Σ (UU-Fin lzero 2) (λ X → pr1 X ↪ A) +``` + +### Every unordered pair is merely equal to a standard unordered pair + +```agda +is-surjective-standard-unordered-pair : + {l : Level} {A : UU l} (p : unordered-pair A) → + type-trunc-Prop + ( Σ A (λ x → Σ A (λ y → standard-unordered-pair x y = p))) +is-surjective-standard-unordered-pair (I , a) = + apply-universal-property-trunc-Prop + ( has-two-elements-type-2-Element-Type I) + ( trunc-Prop + ( Σ _ (λ x → Σ _ (λ y → standard-unordered-pair x y = (I , a))))) + ( λ e → + unit-trunc-Prop + ( a (map-equiv e (zero-Fin 1)) , + a (map-equiv e (one-Fin 1)) , + eq-Eq-unordered-pair + ( standard-unordered-pair _ _) + ( I , a) + ( e) + ( λ { (inl (inr star)) → refl ; (inr star) → refl}))) +``` + +### For every unordered pair `p` and every element `i` in its underlying type, `p` is equal to a standard unordered pair + +```agda +module _ + {l : Level} {A : UU l} (p : unordered-pair A) (i : type-unordered-pair p) + where + + compute-standard-unordered-pair-element-unordered-pair : + Eq-unordered-pair + ( standard-unordered-pair + ( element-unordered-pair p i) + ( other-element-unordered-pair p i)) + ( p) + pr1 compute-standard-unordered-pair-element-unordered-pair = + equiv-point-2-Element-Type + ( 2-element-type-unordered-pair p) + ( i) + pr2 compute-standard-unordered-pair-element-unordered-pair (inl (inr star)) = + ap + ( element-unordered-pair p) + ( inv + ( compute-map-equiv-point-2-Element-Type + ( 2-element-type-unordered-pair p) + ( i))) + pr2 compute-standard-unordered-pair-element-unordered-pair (inr star) = + ap + ( element-unordered-pair p) + ( inv + ( compute-map-equiv-point-2-Element-Type' + ( 2-element-type-unordered-pair p) + ( i))) + + eq-compute-standard-unordered-pair-element-unordered-pair : + standard-unordered-pair + ( element-unordered-pair p i) + ( other-element-unordered-pair p i) = p + eq-compute-standard-unordered-pair-element-unordered-pair = + eq-Eq-unordered-pair' + ( standard-unordered-pair + ( element-unordered-pair p i) + ( other-element-unordered-pair p i)) + ( p) + ( compute-standard-unordered-pair-element-unordered-pair) ``` From 8ea2c66aced156b08eb67d40798097c41408457c Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Mon, 11 Sep 2023 13:03:02 +0200 Subject: [PATCH 02/19] pulling changes from beyond-finite-sets --- src/elementary-number-theory/natural-numbers.lagda.md | 2 +- src/foundation-core.lagda.md | 1 + src/foundation.lagda.md | 4 ++++ src/orthogonal-factorization-systems/local-types.lagda.md | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/elementary-number-theory/natural-numbers.lagda.md b/src/elementary-number-theory/natural-numbers.lagda.md index fbde11e16e..86bbbe9325 100644 --- a/src/elementary-number-theory/natural-numbers.lagda.md +++ b/src/elementary-number-theory/natural-numbers.lagda.md @@ -220,7 +220,7 @@ is-section-map-inv-equiv-ℕ (inr n) = refl equiv-ℕ : ℕ ≃ (unit + ℕ) pr1 equiv-ℕ = map-equiv-ℕ pr2 equiv-ℕ = - is-equiv-has-inverse + is-equiv-is-invertible map-inv-equiv-ℕ is-section-map-inv-equiv-ℕ is-retraction-map-inv-equiv-ℕ diff --git a/src/foundation-core.lagda.md b/src/foundation-core.lagda.md index 72aaa8803c..81ebd87805 100644 --- a/src/foundation-core.lagda.md +++ b/src/foundation-core.lagda.md @@ -35,6 +35,7 @@ open import foundation-core.functoriality-function-types public open import foundation-core.homotopies public open import foundation-core.identity-types public open import foundation-core.injective-maps public +open import foundation-core.invertible-maps public open import foundation-core.involutions public open import foundation-core.logical-equivalences public open import foundation-core.negation public diff --git a/src/foundation.lagda.md b/src/foundation.lagda.md index c251b52600..8e87b518ca 100644 --- a/src/foundation.lagda.md +++ b/src/foundation.lagda.md @@ -10,6 +10,7 @@ open import foundation.0-images-of-maps public open import foundation.0-maps public open import foundation.1-types public open import foundation.2-types public +open import foundation.action-on-equivalences-type-families public open import foundation.action-on-identifications-binary-functions public open import foundation.action-on-identifications-dependent-functions public open import foundation.action-on-identifications-functions public @@ -148,6 +149,7 @@ open import foundation.inhabited-types public open import foundation.injective-maps public open import foundation.interchange-law public open import foundation.intersections-subtypes public +open import foundation.invertible-maps public open import foundation.involutions public open import foundation.isolated-points public open import foundation.isomorphisms-of-sets public @@ -248,6 +250,7 @@ open import foundation.subtype-identity-principle public open import foundation.subtypes public open import foundation.subuniverses public open import foundation.surjective-maps public +open import foundation.symmetric-binary-relations public open import foundation.symmetric-difference public open import foundation.symmetric-identity-types public open import foundation.symmetric-operations public @@ -292,6 +295,7 @@ open import foundation.universal-property-coproduct-types public open import foundation.universal-property-dependent-pair-types public open import foundation.universal-property-empty-type public open import foundation.universal-property-fiber-products public +open import foundation.universal-property-identity-systems public open import foundation.universal-property-identity-types public open import foundation.universal-property-image public open import foundation.universal-property-maybe public diff --git a/src/orthogonal-factorization-systems/local-types.lagda.md b/src/orthogonal-factorization-systems/local-types.lagda.md index f9000d0ba4..cecc73ce22 100644 --- a/src/orthogonal-factorization-systems/local-types.lagda.md +++ b/src/orthogonal-factorization-systems/local-types.lagda.md @@ -101,7 +101,7 @@ module _ map-distributive-Π-is-local-family B f-loc = is-equiv-map-equiv ( equiv-swap-Π ∘e - ( equiv-map-Π (λ a → precomp-Π f (B a) , (f-loc a)) ∘e + ( equiv-Π-equiv-family (λ a → precomp-Π f (B a) , (f-loc a)) ∘e equiv-swap-Π)) ``` From 107e2467bce9eddee30db578e7086591b5e1c58e Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Mon, 11 Sep 2023 13:46:29 +0200 Subject: [PATCH 03/19] removing unnecessary --allow-unsolved-metas --- src/foundation/identity-systems.lagda.md | 2 -- src/foundation/symmetric-operations.lagda.md | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/foundation/identity-systems.lagda.md b/src/foundation/identity-systems.lagda.md index f43f47f342..89f584facf 100644 --- a/src/foundation/identity-systems.lagda.md +++ b/src/foundation/identity-systems.lagda.md @@ -1,8 +1,6 @@ # Identity systems ```agda -{-# OPTIONS --allow-unsolved-metas #-} - module foundation.identity-systems where ``` diff --git a/src/foundation/symmetric-operations.lagda.md b/src/foundation/symmetric-operations.lagda.md index f409c97a64..804aa8eaa0 100644 --- a/src/foundation/symmetric-operations.lagda.md +++ b/src/foundation/symmetric-operations.lagda.md @@ -1,8 +1,6 @@ # Symmetric operations ```agda -{-# OPTIONS --allow-unsolved-metas #-} - module foundation.symmetric-operations where ``` From 122a75464ade99b937f7fb6f3db87327d961f038 Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Mon, 11 Sep 2023 14:11:37 +0200 Subject: [PATCH 04/19] factoring out symmetric cores --- .../symmetric-binary-relations.lagda.md | 77 +------------ .../symmetric-cores-binary-relations.lagda.md | 109 ++++++++++++++++++ 2 files changed, 115 insertions(+), 71 deletions(-) create mode 100644 src/foundation/symmetric-cores-binary-relations.lagda.md diff --git a/src/foundation/symmetric-binary-relations.lagda.md b/src/foundation/symmetric-binary-relations.lagda.md index e965621c7d..8881cf4197 100644 --- a/src/foundation/symmetric-binary-relations.lagda.md +++ b/src/foundation/symmetric-binary-relations.lagda.md @@ -1,8 +1,6 @@ # Symmetric binary relations ```agda -{-# OPTIONS --allow-unsolved-metas #-} - module foundation.symmetric-binary-relations where ``` @@ -99,15 +97,17 @@ module _ is-section-tr-inv-symmetric-binary-relation : (p q : unordered-pair A) (e : Eq-unordered-pair p q) → - ( tr-symmetric-binary-relation p q e ∘ - tr-inv-symmetric-binary-relation p q e) ~ id + tr-symmetric-binary-relation p q e ∘ + tr-inv-symmetric-binary-relation p q e ~ + id is-section-tr-inv-symmetric-binary-relation p q e = is-section-map-inv-equiv (equiv-tr-symmetric-binary-relation p q e) is-retraction-tr-inv-symmetric-binary-relation : (p q : unordered-pair A) (e : Eq-unordered-pair p q) → - ( tr-inv-symmetric-binary-relation p q e ∘ - tr-symmetric-binary-relation p q e) ~ id + tr-inv-symmetric-binary-relation p q e ∘ + tr-symmetric-binary-relation p q e ~ + id is-retraction-tr-inv-symmetric-binary-relation p q e = is-retraction-map-inv-equiv (equiv-tr-symmetric-binary-relation p q e) @@ -176,28 +176,6 @@ module _ ( r) ``` -### The symmetric core of a binary relation - -```agda -module _ - {l1 l2 : Level} {A : UU l1} (R : Relation l2 A) - where - - symmetric-core-Relation : symmetric-binary-relation l2 A - symmetric-core-Relation p = - (i : type-unordered-pair p) → - R (element-unordered-pair p i) (other-element-unordered-pair p i) - - counit-symmetric-core-Relation : - {x y : A} → - relation-symmetric-binary-relation symmetric-core-Relation x y → R x y - counit-symmetric-core-Relation {x} {y} r = - tr - ( R x) - ( compute-other-element-standard-unordered-pair x y (zero-Fin 1)) - ( r (zero-Fin 1)) -``` - ### Morphisms of symmetric binary relations ```agda @@ -220,46 +198,3 @@ module _ hom-relation-hom-symmetric-binary-relation R S f x y = f (standard-unordered-pair x y) ``` - -## Properties - -### The universal property of the symmetric core of a binary relation - -```agda -module _ - {l1 l2 l3 : Level} {A : UU l1} (R : Relation l2 A) - (S : symmetric-binary-relation l3 A) - where - - map-universal-property-symmetric-core-Relation : - hom-symmetric-binary-relation S (symmetric-core-Relation R) → - hom-Relation (relation-symmetric-binary-relation S) R - map-universal-property-symmetric-core-Relation f x y s = - counit-symmetric-core-Relation R (f (standard-unordered-pair x y) s) - - map-inv-universal-property-symmetric-core-Relation : - hom-Relation (relation-symmetric-binary-relation S) R → - hom-symmetric-binary-relation S (symmetric-core-Relation R) - map-inv-universal-property-symmetric-core-Relation f p s i = - f ( element-unordered-pair p i) - ( other-element-unordered-pair p i) - ( tr-inv-symmetric-binary-relation S - ( standard-unordered-pair - ( element-unordered-pair p i) - ( other-element-unordered-pair p i)) - ( p) - ( compute-standard-unordered-pair-element-unordered-pair p i) - ( s)) - - is-section-map-inv-universal-property-symmetric-core-Relation : - ( map-universal-property-symmetric-core-Relation ∘ - map-inv-universal-property-symmetric-core-Relation) ~ id - is-section-map-inv-universal-property-symmetric-core-Relation f = - eq-htpy - ( λ p → - eq-htpy - ( λ s → - eq-htpy - ( λ i → - {! !}))) -``` diff --git a/src/foundation/symmetric-cores-binary-relations.lagda.md b/src/foundation/symmetric-cores-binary-relations.lagda.md new file mode 100644 index 0000000000..bbb746f3d8 --- /dev/null +++ b/src/foundation/symmetric-cores-binary-relations.lagda.md @@ -0,0 +1,109 @@ +# Symmetric cores of binary relations + +```agda +{-# OPTIONS --allow-unsolved-metas #-} + +module foundation.symmetric-cores-binary-relations where +``` + +
Imports + +```agda +open import foundation.binary-relations +open import foundation.function-extensionality +open import foundation.function-types +open import foundation.homotopies +open import foundation.symmetric-binary-relations +open import foundation.transport +open import foundation.universe-levels +open import foundation.unordered-pairs + +open import univalent-combinatorics.standard-finite-types +``` + +
+ +## Idea + +The **symmetric core** of a [binary relation](foundation.binary-relations.md) `R : A → A → 𝒰` on a type `A` is a [symmetric binary relation](foundation.symmetric-binary-relations.md) `core R` equipped with a counit + +```text + (x y : A) → core R {x , y} → R x y +``` + +that satisfyies the universal property of the symmetric core, i.e., it satisfies the property that for any symmetric relation `S : unordered-pair A → 𝒰` such that the precomposition function + +```text + hom-Symmetric-Relation S (core R) → hom-Relation (rel S) R +``` + +is an [equivalence](foundation-core.equivalences.md). + +## Definitions + +### The symmetric core of a binary relation + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (R : Relation l2 A) + where + + symmetric-core-Relation : symmetric-binary-relation l2 A + symmetric-core-Relation p = + (i : type-unordered-pair p) → + R (element-unordered-pair p i) (other-element-unordered-pair p i) + + counit-symmetric-core-Relation : + {x y : A} → + relation-symmetric-binary-relation symmetric-core-Relation x y → R x y + counit-symmetric-core-Relation {x} {y} r = + tr + ( R x) + ( compute-other-element-standard-unordered-pair x y (zero-Fin 1)) + ( r (zero-Fin 1)) +``` + +## Properties + +### The universal property of the symmetric core of a binary relation + +```agda +module _ + {l1 l2 l3 : Level} {A : UU l1} (R : Relation l2 A) + (S : symmetric-binary-relation l3 A) + where + + map-universal-property-symmetric-core-Relation : + hom-symmetric-binary-relation S (symmetric-core-Relation R) → + hom-Relation (relation-symmetric-binary-relation S) R + map-universal-property-symmetric-core-Relation f x y s = + counit-symmetric-core-Relation R (f (standard-unordered-pair x y) s) + + map-inv-universal-property-symmetric-core-Relation : + hom-Relation (relation-symmetric-binary-relation S) R → + hom-symmetric-binary-relation S (symmetric-core-Relation R) + map-inv-universal-property-symmetric-core-Relation f p s i = + f ( element-unordered-pair p i) + ( other-element-unordered-pair p i) + ( tr-inv-symmetric-binary-relation S + ( standard-unordered-pair + ( element-unordered-pair p i) + ( other-element-unordered-pair p i)) + ( p) + ( compute-standard-unordered-pair-element-unordered-pair p i) + ( s)) + + is-section-map-inv-universal-property-symmetric-core-Relation : + map-universal-property-symmetric-core-Relation ∘ + map-inv-universal-property-symmetric-core-Relation ~ + id + is-section-map-inv-universal-property-symmetric-core-Relation f = + eq-htpy + ( λ p → + eq-htpy + ( λ s → + eq-htpy + ( λ i → + {! !}))) +``` + From 0f76f56217886d3104f674a46beaf95351a1f0d0 Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Mon, 11 Sep 2023 14:12:14 +0200 Subject: [PATCH 05/19] make pre-commit --- src/foundation.lagda.md | 1 + .../symmetric-cores-binary-relations.lagda.md | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/foundation.lagda.md b/src/foundation.lagda.md index 8e87b518ca..2ebe9dda0e 100644 --- a/src/foundation.lagda.md +++ b/src/foundation.lagda.md @@ -251,6 +251,7 @@ open import foundation.subtypes public open import foundation.subuniverses public open import foundation.surjective-maps public open import foundation.symmetric-binary-relations public +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 diff --git a/src/foundation/symmetric-cores-binary-relations.lagda.md b/src/foundation/symmetric-cores-binary-relations.lagda.md index bbb746f3d8..018fc4808b 100644 --- a/src/foundation/symmetric-cores-binary-relations.lagda.md +++ b/src/foundation/symmetric-cores-binary-relations.lagda.md @@ -25,13 +25,18 @@ open import univalent-combinatorics.standard-finite-types ## Idea -The **symmetric core** of a [binary relation](foundation.binary-relations.md) `R : A → A → 𝒰` on a type `A` is a [symmetric binary relation](foundation.symmetric-binary-relations.md) `core R` equipped with a counit +The **symmetric core** of a [binary relation](foundation.binary-relations.md) +`R : A → A → 𝒰` on a type `A` is a +[symmetric binary relation](foundation.symmetric-binary-relations.md) `core R` +equipped with a counit ```text (x y : A) → core R {x , y} → R x y ``` -that satisfyies the universal property of the symmetric core, i.e., it satisfies the property that for any symmetric relation `S : unordered-pair A → 𝒰` such that the precomposition function +that satisfyies the universal property of the symmetric core, i.e., it satisfies +the property that for any symmetric relation `S : unordered-pair A → 𝒰` such +that the precomposition function ```text hom-Symmetric-Relation S (core R) → hom-Relation (rel S) R @@ -106,4 +111,3 @@ module _ ( λ i → {! !}))) ``` - From e5c94abc223edcb8685e55c29eb40d094ad49516 Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Mon, 11 Sep 2023 15:40:55 +0200 Subject: [PATCH 06/19] delete unfinished file --- .../symmetric-cores-binary-relations.lagda.md | 113 ------------------ 1 file changed, 113 deletions(-) delete mode 100644 src/foundation/symmetric-cores-binary-relations.lagda.md diff --git a/src/foundation/symmetric-cores-binary-relations.lagda.md b/src/foundation/symmetric-cores-binary-relations.lagda.md deleted file mode 100644 index 018fc4808b..0000000000 --- a/src/foundation/symmetric-cores-binary-relations.lagda.md +++ /dev/null @@ -1,113 +0,0 @@ -# Symmetric cores of binary relations - -```agda -{-# OPTIONS --allow-unsolved-metas #-} - -module foundation.symmetric-cores-binary-relations where -``` - -
Imports - -```agda -open import foundation.binary-relations -open import foundation.function-extensionality -open import foundation.function-types -open import foundation.homotopies -open import foundation.symmetric-binary-relations -open import foundation.transport -open import foundation.universe-levels -open import foundation.unordered-pairs - -open import univalent-combinatorics.standard-finite-types -``` - -
- -## Idea - -The **symmetric core** of a [binary relation](foundation.binary-relations.md) -`R : A → A → 𝒰` on a type `A` is a -[symmetric binary relation](foundation.symmetric-binary-relations.md) `core R` -equipped with a counit - -```text - (x y : A) → core R {x , y} → R x y -``` - -that satisfyies the universal property of the symmetric core, i.e., it satisfies -the property that for any symmetric relation `S : unordered-pair A → 𝒰` such -that the precomposition function - -```text - hom-Symmetric-Relation S (core R) → hom-Relation (rel S) R -``` - -is an [equivalence](foundation-core.equivalences.md). - -## Definitions - -### The symmetric core of a binary relation - -```agda -module _ - {l1 l2 : Level} {A : UU l1} (R : Relation l2 A) - where - - symmetric-core-Relation : symmetric-binary-relation l2 A - symmetric-core-Relation p = - (i : type-unordered-pair p) → - R (element-unordered-pair p i) (other-element-unordered-pair p i) - - counit-symmetric-core-Relation : - {x y : A} → - relation-symmetric-binary-relation symmetric-core-Relation x y → R x y - counit-symmetric-core-Relation {x} {y} r = - tr - ( R x) - ( compute-other-element-standard-unordered-pair x y (zero-Fin 1)) - ( r (zero-Fin 1)) -``` - -## Properties - -### The universal property of the symmetric core of a binary relation - -```agda -module _ - {l1 l2 l3 : Level} {A : UU l1} (R : Relation l2 A) - (S : symmetric-binary-relation l3 A) - where - - map-universal-property-symmetric-core-Relation : - hom-symmetric-binary-relation S (symmetric-core-Relation R) → - hom-Relation (relation-symmetric-binary-relation S) R - map-universal-property-symmetric-core-Relation f x y s = - counit-symmetric-core-Relation R (f (standard-unordered-pair x y) s) - - map-inv-universal-property-symmetric-core-Relation : - hom-Relation (relation-symmetric-binary-relation S) R → - hom-symmetric-binary-relation S (symmetric-core-Relation R) - map-inv-universal-property-symmetric-core-Relation f p s i = - f ( element-unordered-pair p i) - ( other-element-unordered-pair p i) - ( tr-inv-symmetric-binary-relation S - ( standard-unordered-pair - ( element-unordered-pair p i) - ( other-element-unordered-pair p i)) - ( p) - ( compute-standard-unordered-pair-element-unordered-pair p i) - ( s)) - - is-section-map-inv-universal-property-symmetric-core-Relation : - map-universal-property-symmetric-core-Relation ∘ - map-inv-universal-property-symmetric-core-Relation ~ - id - is-section-map-inv-universal-property-symmetric-core-Relation f = - eq-htpy - ( λ p → - eq-htpy - ( λ s → - eq-htpy - ( λ i → - {! !}))) -``` From 5a063021aa9c17d3efaf7d5037d5cc26e0a43578 Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Mon, 11 Sep 2023 15:42:04 +0200 Subject: [PATCH 07/19] make pre-commit --- src/foundation.lagda.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/foundation.lagda.md b/src/foundation.lagda.md index 2ebe9dda0e..8e87b518ca 100644 --- a/src/foundation.lagda.md +++ b/src/foundation.lagda.md @@ -251,7 +251,6 @@ open import foundation.subtypes public open import foundation.subuniverses public open import foundation.surjective-maps public open import foundation.symmetric-binary-relations public -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 From d66978a6187bee61c2b4644c20dab691f812a023 Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Mon, 11 Sep 2023 18:11:46 +0200 Subject: [PATCH 08/19] make this PR compile --- src/foundation/action-on-equivalences-type-families.lagda.md | 2 +- src/foundation/symmetric-binary-relations.lagda.md | 2 +- src/foundation/transport-along-equivalences.lagda.md | 2 +- src/foundation/universal-property-identity-systems.lagda.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/foundation/action-on-equivalences-type-families.lagda.md b/src/foundation/action-on-equivalences-type-families.lagda.md index 7153285ad8..b59d82ec07 100644 --- a/src/foundation/action-on-equivalences-type-families.lagda.md +++ b/src/foundation/action-on-equivalences-type-families.lagda.md @@ -16,7 +16,7 @@ open import foundation.function-extensionality open import foundation.identity-types open import foundation.sets open import foundation.subuniverses -open import foundation.transport +open import foundation.transport-along-identifications open import foundation.univalence open import foundation.universe-levels diff --git a/src/foundation/symmetric-binary-relations.lagda.md b/src/foundation/symmetric-binary-relations.lagda.md index 8881cf4197..a64a57ed21 100644 --- a/src/foundation/symmetric-binary-relations.lagda.md +++ b/src/foundation/symmetric-binary-relations.lagda.md @@ -19,7 +19,7 @@ open import foundation.function-types open import foundation.homotopies open import foundation.identity-types open import foundation.symmetric-operations -open import foundation.transport +open import foundation.transport-along-identifications open import foundation.universe-levels open import foundation.unordered-pairs diff --git a/src/foundation/transport-along-equivalences.lagda.md b/src/foundation/transport-along-equivalences.lagda.md index ebf2304b5c..73b5db6216 100644 --- a/src/foundation/transport-along-equivalences.lagda.md +++ b/src/foundation/transport-along-equivalences.lagda.md @@ -182,7 +182,7 @@ eq-tr-equiv-action-equiv-family : {l1 l2 : Level} (f : UU l1 → UU l2) {X Y : UU l1} → (e : X ≃ Y) → tr-equiv f e = action-equiv-family f e eq-tr-equiv-action-equiv-family f {X} = - ind-equiv X + ind-equiv ( λ Y e → tr-equiv f e = action-equiv-family f e) ( compute-tr-equiv-id-equiv f ∙ inv (compute-action-equiv-family-id-equiv f X)) diff --git a/src/foundation/universal-property-identity-systems.lagda.md b/src/foundation/universal-property-identity-systems.lagda.md index 0d427fc9c1..0414909b40 100644 --- a/src/foundation/universal-property-identity-systems.lagda.md +++ b/src/foundation/universal-property-identity-systems.lagda.md @@ -19,7 +19,7 @@ open import foundation.universe-levels open import foundation-core.equivalences open import foundation-core.identity-types open import foundation-core.sections -open import foundation-core.transport +open import foundation-core.transport-along-identifications ``` From 29dd81c53b656c78d421d113435e799abed34957 Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Mon, 11 Sep 2023 19:21:27 +0200 Subject: [PATCH 09/19] refactor --- ...lences-families-over-subuniverses.lagda.md | 75 ++++++++- .../action-on-equivalences-functions.lagda.md | 72 --------- ...ion-on-equivalences-type-families.lagda.md | 147 +++++++++++------- .../transport-along-equivalences.lagda.md | 1 + 4 files changed, 162 insertions(+), 133 deletions(-) diff --git a/src/foundation/action-on-equivalences-families-over-subuniverses.lagda.md b/src/foundation/action-on-equivalences-families-over-subuniverses.lagda.md index fc3b20eb18..0d8ddd2f56 100644 --- a/src/foundation/action-on-equivalences-families-over-subuniverses.lagda.md +++ b/src/foundation/action-on-equivalences-families-over-subuniverses.lagda.md @@ -8,7 +8,10 @@ module foundation.action-on-equivalences-families-over-subuniverses where ```agda open import foundation.action-on-identifications-functions +open import foundation.commuting-squares-of-maps open import foundation.dependent-pair-types +open import foundation.equivalence-induction +open import foundation.fibers-of-maps open import foundation.function-extensionality open import foundation.sets open import foundation.subuniverses @@ -34,7 +37,33 @@ indexed by types of `P` has an [action on equivalences](foundation.action-on-equivalences-functions.md) obtained by using the [univalence axiom](foundation.univalence.md). -## Definition +## Definitions + +### The action on equivalences of a family of types over a subuniverse + +```agda +module _ + { l1 l2 l3 : Level} + ( P : subuniverse l1 l2) (B : type-subuniverse P → UU l3) + where + + unique-action-on-equivalences-family-of-types-subuniverse : + (X : type-subuniverse P) → + is-contr (fiber (ev-id-equiv-subuniverse P X {λ Y e → B X ≃ B Y}) id-equiv) + unique-action-on-equivalences-family-of-types-subuniverse X = + is-contr-map-ev-id-equiv-subuniverse P X (λ Y e → B X ≃ B Y) id-equiv + + action-on-equivalences-family-of-types-subuniverse : + (X Y : type-subuniverse P) → pr1 X ≃ pr1 Y → B X ≃ B Y + action-on-equivalences-family-of-types-subuniverse X = + pr1 (center (unique-action-on-equivalences-family-of-types-subuniverse X)) + + compute-id-equiv-action-on-equivalences-family-of-types-subuniverse : + (X : type-subuniverse P) → + action-on-equivalences-family-of-types-subuniverse X X id-equiv = id-equiv + compute-id-equiv-action-on-equivalences-family-of-types-subuniverse X = + pr2 (center (unique-action-on-equivalences-family-of-types-subuniverse X)) +``` ```agda module _ @@ -50,10 +79,46 @@ module _ ## Properties +### The action on equivalences of a family of types over a subuniverse fits in a commuting square with `equiv-eq` + +We claim that the square + +```text + ap B + (X = Y) --------> (B X = B Y) + | | + equiv-eq | | equiv-eq + V V + (X ≃ Y) ---------> (B X ≃ B Y). + B +``` + +commutes for any two types `X Y : type-subuniverse P` and any family of types +`B` over the subuniverse `P`. + ```agda +coherence-square-action-on-equivalences-family-of-types-subuniverse : + {l1 l2 l3 : Level} (P : subuniverse l1 l2) (B : type-subuniverse P → UU l3) → + (X Y : type-subuniverse P) → + coherence-square-maps + ( ap B {X} {Y}) + ( equiv-eq-subuniverse P X Y) + ( equiv-eq) + ( action-on-equivalences-family-of-types-subuniverse P B X Y) +coherence-square-action-on-equivalences-family-of-types-subuniverse + P B X .X refl = + compute-id-equiv-action-on-equivalences-family-of-types-subuniverse P B X +``` + +```agda +module _ + { l1 l2 l3 : Level} + ( P : subuniverse l1 l2) (B : type-subuniverse P → UU l3) + where + preserves-id-equiv-action-equiv-family-on-subuniverse : (X : type-subuniverse P) → - action-equiv-family-on-subuniverse X X id-equiv = id-equiv + action-equiv-family-on-subuniverse P B X X id-equiv = id-equiv preserves-id-equiv-action-equiv-family-on-subuniverse X = ( ap (equiv-tr B) ( is-injective-map-equiv @@ -77,7 +142,7 @@ module _ ( X : type-subuniverse P) ( F : (Y : type-subuniverse P) → B X ≃ B Y → UU l4) → F X id-equiv → (Y : type-subuniverse P) (e : pr1 X ≃ pr1 Y) → - F Y (action-equiv-family-on-subuniverse X Y e) + F Y (action-equiv-family-on-subuniverse P B X Y e) Ind-action-equiv-family-on-subuniverse X F p Y e = Ind-path-action-equiv-family-on-subuniverse X F p Y ( eq-equiv-subuniverse P e) @@ -89,13 +154,13 @@ module _ ( (X Y : type-subuniverse P) → pr1 X ≃ pr1 Y → B X ≃ B Y) ( λ D → (X : type-subuniverse P) → D X X id-equiv = id-equiv)) pr1 (pr1 (is-contr-preserves-id-action-equiv-family-on-subuniverse H)) = - action-equiv-family-on-subuniverse + action-equiv-family-on-subuniverse P B pr2 (pr1 (is-contr-preserves-id-action-equiv-family-on-subuniverse H)) = preserves-id-equiv-action-equiv-family-on-subuniverse pr2 (is-contr-preserves-id-action-equiv-family-on-subuniverse H) (D , p) = eq-pair-Σ ( eq-htpy (λ X → eq-htpy (λ Y → eq-htpy (λ e → - lemma2 action-equiv-family-on-subuniverse D + lemma2 (action-equiv-family-on-subuniverse P B) D ( λ X → preserves-id-equiv-action-equiv-family-on-subuniverse X ∙ inv (p X)) X Y e)))) diff --git a/src/foundation/action-on-equivalences-functions.lagda.md b/src/foundation/action-on-equivalences-functions.lagda.md index 1fa32b1f30..3cf27c3318 100644 --- a/src/foundation/action-on-equivalences-functions.lagda.md +++ b/src/foundation/action-on-equivalences-functions.lagda.md @@ -41,50 +41,10 @@ action-equiv-function : {l1 l2 : Level} {B : UU l2} (f : UU l1 → B) {X Y : UU l1} → X ≃ Y → f X = f Y action-equiv-function f {X} {Y} e = ap f (eq-equiv X Y e) - -action-equiv-family : - {l1 l2 : Level} (f : UU l1 → UU l2) {X Y : UU l1} → - X ≃ Y → f X ≃ f Y -action-equiv-family f = equiv-eq ∘ action-equiv-function f - -map-action-equiv-family : - {l1 l2 : Level} (f : UU l1 → UU l2) {X Y : UU l1} → - X ≃ Y → f X → f Y -map-action-equiv-family f = map-equiv ∘ action-equiv-family f ``` ## Properties -### The identity function acts trivially on equivalences - -```agda -compute-action-equiv-family-id : - {l : Level} {X Y : UU l} (e : X ≃ Y) → (action-equiv-family id e) = e -compute-action-equiv-family-id {l} {X} {Y} e = - (ap equiv-eq (ap-id (eq-equiv X Y e))) ∙ (is-section-eq-equiv e) -``` - -### The action on equivalences of a composite function is the composite of the actions - -```agda -distributive-action-equiv-function-comp : - {l1 l2 l3 : Level} {C : UU l3} (g : UU l2 → C) (f : UU l1 → UU l2) - {X Y : UU l1} → - action-equiv-function (g ∘ f) ~ - action-equiv-function g ∘ action-equiv-family f -distributive-action-equiv-function-comp g f {X} {Y} e = - ( ap-comp g f (eq-equiv X Y e)) ∙ - ( ap (ap g) (inv (is-retraction-eq-equiv (action-equiv-function f e)))) - -distributive-action-equiv-family-comp : - {l1 l2 l3 : Level} (g : UU l2 → UU l3) (f : UU l1 → UU l2) - {X Y : UU l1} → - action-equiv-family (g ∘ f) ~ - action-equiv-family g ∘ action-equiv-family f -distributive-action-equiv-family-comp g f {X} {Y} e = - ap equiv-eq (distributive-action-equiv-function-comp g f {X} {Y} e) -``` - ### The action on equivalences of any map preserves `id-equiv` ```agda @@ -93,12 +53,6 @@ compute-action-equiv-function-id-equiv : (action-equiv-function f id-equiv) = refl compute-action-equiv-function-id-equiv f A = ap (ap f) (compute-eq-equiv-id-equiv A) - -compute-action-equiv-family-id-equiv : - {l1 l2 : Level} (f : UU l1 → UU l2) (A : UU l1) → - (action-equiv-family f id-equiv) = id-equiv -compute-action-equiv-family-id-equiv f A = - ap equiv-eq (compute-action-equiv-function-id-equiv f A) ``` ### The action on equivalences of a constant map is constant @@ -108,12 +62,6 @@ compute-action-equiv-function-const : {l1 l2 : Level} {B : UU l2} (b : B) {X Y : UU l1} (e : X ≃ Y) → (action-equiv-function (const (UU l1) B b) e) = refl compute-action-equiv-function-const b {X} {Y} e = ap-const b (eq-equiv X Y e) - -compute-action-equiv-family-const : - {l1 l2 : Level} (B : UU l2) {X Y : UU l1} - (e : X ≃ Y) → (action-equiv-family (const (UU l1) (UU l2) B) e) = id-equiv -compute-action-equiv-family-const B {X} {Y} e = - ap equiv-eq (compute-action-equiv-function-const B e) ``` ### The action on equivalences of any map preserves composition of equivalences @@ -127,18 +75,6 @@ distributive-action-equiv-function-comp-equiv : distributive-action-equiv-function-comp-equiv f {X} {Y} {Z} e e' = ( ap (ap f) (inv (compute-eq-equiv-comp-equiv X Y Z e e'))) ∙ ( ap-concat f (eq-equiv X Y e) (eq-equiv Y Z e')) - -distributive-action-equiv-family-comp-equiv : - {l1 l2 : Level} (f : UU l1 → UU l2) {X Y Z : UU l1} → - (e : X ≃ Y) (e' : Y ≃ Z) → - action-equiv-family f (e' ∘e e) = - action-equiv-family f e' ∘e action-equiv-family f e -distributive-action-equiv-family-comp-equiv f e e' = - ( ap equiv-eq (distributive-action-equiv-function-comp-equiv f e e')) ∙ - ( inv - ( compute-equiv-eq-concat - ( action-equiv-function f e) - ( action-equiv-function f e'))) ``` ### The action on equivalences of any map preserves inverses @@ -151,12 +87,4 @@ compute-action-equiv-function-inv-equiv : compute-action-equiv-function-inv-equiv f {X} {Y} e = ( ap (ap f) (inv (commutativity-inv-eq-equiv X Y e))) ∙ ( ap-inv f (eq-equiv X Y e)) - -compute-action-equiv-family-inv-equiv : - {l1 l2 : Level} (f : UU l1 → UU l2) {X Y : UU l1} - (e : X ≃ Y) → - action-equiv-family f (inv-equiv e) = inv-equiv (action-equiv-family f e) -compute-action-equiv-family-inv-equiv f {X} {Y} e = - ( ap equiv-eq (compute-action-equiv-function-inv-equiv f e)) ∙ - ( inv (commutativity-inv-equiv-eq (f X) (f Y) (action-equiv-function f e))) ``` diff --git a/src/foundation/action-on-equivalences-type-families.lagda.md b/src/foundation/action-on-equivalences-type-families.lagda.md index b59d82ec07..f217140d22 100644 --- a/src/foundation/action-on-equivalences-type-families.lagda.md +++ b/src/foundation/action-on-equivalences-type-families.lagda.md @@ -7,12 +7,16 @@ module foundation.action-on-equivalences-type-families where
Imports ```agda +open import foundation.action-on-equivalences-functions open import foundation.action-on-identifications-functions open import foundation.commuting-squares-of-maps +open import foundation.constant-maps open import foundation.dependent-pair-types open import foundation.equivalence-induction open import foundation.fibers-of-maps open import foundation.function-extensionality +open import foundation.function-types +open import foundation.homotopies open import foundation.identity-types open import foundation.sets open import foundation.subuniverses @@ -56,32 +60,6 @@ that `B id-equiv = id-equiv`, and fits in a ## Definitions -### The action on equivalences of a family of types over a subuniverse - -```agda -module _ - { l1 l2 l3 : Level} - ( P : subuniverse l1 l2) (B : type-subuniverse P → UU l3) - where - - unique-action-on-equivalences-family-of-types-subuniverse : - (X : type-subuniverse P) → - is-contr (fiber (ev-id-equiv-subuniverse P X {λ Y e → B X ≃ B Y}) id-equiv) - unique-action-on-equivalences-family-of-types-subuniverse X = - is-contr-map-ev-id-equiv-subuniverse P X (λ Y e → B X ≃ B Y) id-equiv - - action-on-equivalences-family-of-types-subuniverse : - (X Y : type-subuniverse P) → pr1 X ≃ pr1 Y → B X ≃ B Y - action-on-equivalences-family-of-types-subuniverse X = - pr1 (center (unique-action-on-equivalences-family-of-types-subuniverse X)) - - compute-id-equiv-action-on-equivalences-family-of-types-subuniverse : - (X : type-subuniverse P) → - action-on-equivalences-family-of-types-subuniverse X X id-equiv = id-equiv - compute-id-equiv-action-on-equivalences-family-of-types-subuniverse X = - pr2 (center (unique-action-on-equivalences-family-of-types-subuniverse X)) -``` - ### The action on equivalences of a family of types over a universe ```agda @@ -105,40 +83,19 @@ module _ action-on-equivalences-family-of-types-universe {X} {X} id-equiv = id-equiv compute-id-equiv-action-on-equivalences-family-of-types-universe {X} = pr2 (center (unique-action-on-equivalences-family-of-types-universe {X})) -``` - -## Properties -### The action on equivalences of a family of types over a subuniverse fits in a commuting square with `equiv-eq` +action-equiv-family : + {l1 l2 : Level} (f : UU l1 → UU l2) {X Y : UU l1} → + X ≃ Y → f X ≃ f Y +action-equiv-family f = equiv-eq ∘ action-equiv-function f -We claim that the square - -```text - ap B - (X = Y) --------> (B X = B Y) - | | - equiv-eq | | equiv-eq - V V - (X ≃ Y) ---------> (B X ≃ B Y). - B +map-action-equiv-family : + {l1 l2 : Level} (f : UU l1 → UU l2) {X Y : UU l1} → + X ≃ Y → f X → f Y +map-action-equiv-family f = map-equiv ∘ action-equiv-family f ``` -commutes for any two types `X Y : type-subuniverse P` and any family of types -`B` over the subuniverse `P`. - -```agda -coherence-square-action-on-equivalences-family-of-types-subuniverse : - {l1 l2 l3 : Level} (P : subuniverse l1 l2) (B : type-subuniverse P → UU l3) → - (X Y : type-subuniverse P) → - coherence-square-maps - ( ap B {X} {Y}) - ( equiv-eq-subuniverse P X Y) - ( equiv-eq) - ( action-on-equivalences-family-of-types-subuniverse P B X Y) -coherence-square-action-on-equivalences-family-of-types-subuniverse - P B X .X refl = - compute-id-equiv-action-on-equivalences-family-of-types-subuniverse P B X -``` +## Properties ### The action on equivalences of a family of types over a universe fits in a commuting square with `equiv-eq` @@ -167,3 +124,81 @@ coherence-square-action-on-equivalences-family-of-types-universe : coherence-square-action-on-equivalences-family-of-types-universe B X .X refl = compute-id-equiv-action-on-equivalences-family-of-types-universe B ``` + +### The identity function acts trivially on equivalences + +```agda +compute-action-equiv-family-id : + {l : Level} {X Y : UU l} (e : X ≃ Y) → (action-equiv-family id e) = e +compute-action-equiv-family-id {l} {X} {Y} e = + (ap equiv-eq (ap-id (eq-equiv X Y e))) ∙ (is-section-eq-equiv e) +``` + +### The action on equivalences of a composite function is the composite of the actions + +```agda +distributive-action-equiv-function-comp : + {l1 l2 l3 : Level} {C : UU l3} (g : UU l2 → C) (f : UU l1 → UU l2) + {X Y : UU l1} → + action-equiv-function (g ∘ f) ~ + action-equiv-function g ∘ action-equiv-family f +distributive-action-equiv-function-comp g f {X} {Y} e = + ( ap-comp g f (eq-equiv X Y e)) ∙ + ( ap (ap g) (inv (is-retraction-eq-equiv (action-equiv-function f e)))) + +distributive-action-equiv-family-comp : + {l1 l2 l3 : Level} (g : UU l2 → UU l3) (f : UU l1 → UU l2) + {X Y : UU l1} → + action-equiv-family (g ∘ f) ~ + action-equiv-family g ∘ action-equiv-family f +distributive-action-equiv-family-comp g f {X} {Y} e = + ap equiv-eq (distributive-action-equiv-function-comp g f {X} {Y} e) +``` + +### The action on equivalences of any map preserves `id-equiv` + +```agda +compute-action-equiv-family-id-equiv : + {l1 l2 : Level} (f : UU l1 → UU l2) (A : UU l1) → + (action-equiv-family f id-equiv) = id-equiv +compute-action-equiv-family-id-equiv f A = + ap equiv-eq (compute-action-equiv-function-id-equiv f A) +``` + +### The action on equivalences of a constant map is constant + +```agda +compute-action-equiv-family-const : + {l1 l2 : Level} (B : UU l2) {X Y : UU l1} + (e : X ≃ Y) → (action-equiv-family (const (UU l1) (UU l2) B) e) = id-equiv +compute-action-equiv-family-const B {X} {Y} e = + ap equiv-eq (compute-action-equiv-function-const B e) +``` + +### The action on equivalences of any map preserves composition of equivalences + +```agda +distributive-action-equiv-family-comp-equiv : + {l1 l2 : Level} (f : UU l1 → UU l2) {X Y Z : UU l1} → + (e : X ≃ Y) (e' : Y ≃ Z) → + action-equiv-family f (e' ∘e e) = + action-equiv-family f e' ∘e action-equiv-family f e +distributive-action-equiv-family-comp-equiv f e e' = + ( ap equiv-eq (distributive-action-equiv-function-comp-equiv f e e')) ∙ + ( inv + ( compute-equiv-eq-concat + ( action-equiv-function f e) + ( action-equiv-function f e'))) +``` + +### The action on equivalences of any map preserves inverses + +```agda +compute-action-equiv-family-inv-equiv : + {l1 l2 : Level} (f : UU l1 → UU l2) {X Y : UU l1} + (e : X ≃ Y) → + action-equiv-family f (inv-equiv e) = inv-equiv (action-equiv-family f e) +compute-action-equiv-family-inv-equiv f {X} {Y} e = + ( ap equiv-eq (compute-action-equiv-function-inv-equiv f e)) ∙ + ( inv (commutativity-inv-equiv-eq (f X) (f Y) (action-equiv-function f e))) +``` diff --git a/src/foundation/transport-along-equivalences.lagda.md b/src/foundation/transport-along-equivalences.lagda.md index 73b5db6216..840b82fae8 100644 --- a/src/foundation/transport-along-equivalences.lagda.md +++ b/src/foundation/transport-along-equivalences.lagda.md @@ -8,6 +8,7 @@ module foundation.transport-along-equivalences where ```agda open import foundation.action-on-equivalences-functions +open import foundation.action-on-equivalences-type-families open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.equivalence-extensionality From 0bd0fee51a94ccb3f44b0b733d7c869657beae21 Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Mon, 11 Sep 2023 20:00:18 +0200 Subject: [PATCH 10/19] renaming action-on-equivalences-families-over-subuniverses to action-on-equivalences-type-families-over-subuniverses to make the use of the word families in file names consistent, at least within the foundation folder --- .../cartier-delooping-sign-homomorphism.lagda.md | 2 +- src/finite-group-theory/delooping-sign-homomorphism.lagda.md | 2 +- .../simpson-delooping-sign-homomorphism.lagda.md | 2 +- src/foundation.lagda.md | 2 +- ...on-on-equivalences-type-families-over-subuniverses.lagda.md} | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename src/foundation/{action-on-equivalences-families-over-subuniverses.lagda.md => action-on-equivalences-type-families-over-subuniverses.lagda.md} (98%) diff --git a/src/finite-group-theory/cartier-delooping-sign-homomorphism.lagda.md b/src/finite-group-theory/cartier-delooping-sign-homomorphism.lagda.md index 5c0505d499..4737670344 100644 --- a/src/finite-group-theory/cartier-delooping-sign-homomorphism.lagda.md +++ b/src/finite-group-theory/cartier-delooping-sign-homomorphism.lagda.md @@ -17,7 +17,7 @@ open import finite-group-theory.finite-type-groups open import finite-group-theory.sign-homomorphism open import finite-group-theory.transpositions -open import foundation.action-on-equivalences-families-over-subuniverses +open import foundation.action-on-equivalences-type-families-over-subuniverses open import foundation.action-on-identifications-functions open import foundation.contractible-types open import foundation.dependent-pair-types diff --git a/src/finite-group-theory/delooping-sign-homomorphism.lagda.md b/src/finite-group-theory/delooping-sign-homomorphism.lagda.md index 5e28858730..91ceb4db14 100644 --- a/src/finite-group-theory/delooping-sign-homomorphism.lagda.md +++ b/src/finite-group-theory/delooping-sign-homomorphism.lagda.md @@ -18,7 +18,7 @@ open import finite-group-theory.permutations open import finite-group-theory.sign-homomorphism open import finite-group-theory.transpositions -open import foundation.action-on-equivalences-families-over-subuniverses +open import foundation.action-on-equivalences-type-families-over-subuniverses open import foundation.action-on-identifications-functions open import foundation.commuting-squares-of-maps open import foundation.contractible-types diff --git a/src/finite-group-theory/simpson-delooping-sign-homomorphism.lagda.md b/src/finite-group-theory/simpson-delooping-sign-homomorphism.lagda.md index f85e3e3227..6278f11872 100644 --- a/src/finite-group-theory/simpson-delooping-sign-homomorphism.lagda.md +++ b/src/finite-group-theory/simpson-delooping-sign-homomorphism.lagda.md @@ -21,7 +21,7 @@ open import finite-group-theory.permutations open import finite-group-theory.sign-homomorphism open import finite-group-theory.transpositions -open import foundation.action-on-equivalences-families-over-subuniverses +open import foundation.action-on-equivalences-type-families-over-subuniverses open import foundation.action-on-identifications-functions open import foundation.contractible-types open import foundation.coproduct-types diff --git a/src/foundation.lagda.md b/src/foundation.lagda.md index 4cd53d3ec0..78d34ecd7d 100644 --- a/src/foundation.lagda.md +++ b/src/foundation.lagda.md @@ -10,9 +10,9 @@ open import foundation.0-images-of-maps public open import foundation.0-maps public open import foundation.1-types public open import foundation.2-types public -open import foundation.action-on-equivalences-families-over-subuniverses public open import foundation.action-on-equivalences-functions public open import foundation.action-on-equivalences-type-families public +open import foundation.action-on-equivalences-type-families-over-subuniverses public open import foundation.action-on-identifications-binary-functions public open import foundation.action-on-identifications-dependent-functions public open import foundation.action-on-identifications-functions public diff --git a/src/foundation/action-on-equivalences-families-over-subuniverses.lagda.md b/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md similarity index 98% rename from src/foundation/action-on-equivalences-families-over-subuniverses.lagda.md rename to src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md index 0d8ddd2f56..a6d82a6abd 100644 --- a/src/foundation/action-on-equivalences-families-over-subuniverses.lagda.md +++ b/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md @@ -1,7 +1,7 @@ # Action on equivalences in type families over subuniverses ```agda -module foundation.action-on-equivalences-families-over-subuniverses where +module foundation.action-on-equivalences-type-families-over-subuniverses where ```
Imports From aa28e94a4971082ea0ffeedcd91eae234be454ce Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Mon, 11 Sep 2023 20:59:54 +0200 Subject: [PATCH 11/19] factor out stuff that influences the deloopings of the sign homomorphism --- ...rtier-delooping-sign-homomorphism.lagda.md | 17 ++- .../delooping-sign-homomorphism.lagda.md | 74 ++++++---- ...mpson-delooping-sign-homomorphism.lagda.md | 20 +-- ...s-type-families-over-subuniverses.lagda.md | 126 +++--------------- 4 files changed, 84 insertions(+), 153 deletions(-) diff --git a/src/finite-group-theory/cartier-delooping-sign-homomorphism.lagda.md b/src/finite-group-theory/cartier-delooping-sign-homomorphism.lagda.md index 4737670344..7a1ba6b3a1 100644 --- a/src/finite-group-theory/cartier-delooping-sign-homomorphism.lagda.md +++ b/src/finite-group-theory/cartier-delooping-sign-homomorphism.lagda.md @@ -29,6 +29,7 @@ open import foundation.negation open import foundation.propositional-truncations open import foundation.raising-universe-levels open import foundation.transport-along-identifications +open import foundation.type-theoretic-principle-of-choice open import foundation.unit-type open import foundation.universe-levels @@ -69,7 +70,7 @@ module _ ( star) ( transposition Y)) ( map-equiv - ( action-equiv-family-on-subuniverse + ( action-equiv-family-over-subuniverse ( mere-equiv-Prop (Fin (n +ℕ 2))) ( orientation-Complete-Undirected-Graph (n +ℕ 2)) ( raise l (Fin (n +ℕ 2)) , @@ -110,17 +111,19 @@ module _ preserves-id-equiv-orientation-complete-undirected-graph-equiv ( n +ℕ 2)} { y = - ( action-equiv-family-on-subuniverse + ( action-equiv-family-over-subuniverse ( mere-equiv-Prop (Fin (n +ℕ 2))) ( orientation-Complete-Undirected-Graph (n +ℕ 2))) , - ( preserves-id-equiv-action-equiv-family-on-subuniverse + ( compute-id-equiv-action-equiv-family-over-subuniverse ( mere-equiv-Prop (Fin (n +ℕ 2))) ( orientation-Complete-Undirected-Graph (n +ℕ 2)))} ( eq-is-contr - ( is-contr-preserves-id-action-equiv-family-on-subuniverse - ( mere-equiv-Prop (Fin (n +ℕ 2))) - ( orientation-Complete-Undirected-Graph (n +ℕ 2)) - ( is-set-orientation-Complete-Undirected-Graph (n +ℕ 2))))) + ( is-contr-equiv' _ + ( distributive-Π-Σ) + ( is-contr-Π + ( unique-action-equiv-family-over-subuniverse + ( mere-equiv-Prop (Fin (n +ℕ 2))) + ( orientation-Complete-Undirected-Graph (n +ℕ 2))))))) ( not-even-difference-orientation-aut-transposition-count (n +ℕ 2 , (compute-raise l (Fin (n +ℕ 2)))) (star)) diff --git a/src/finite-group-theory/delooping-sign-homomorphism.lagda.md b/src/finite-group-theory/delooping-sign-homomorphism.lagda.md index 91ceb4db14..0df76282fe 100644 --- a/src/finite-group-theory/delooping-sign-homomorphism.lagda.md +++ b/src/finite-group-theory/delooping-sign-homomorphism.lagda.md @@ -20,6 +20,7 @@ open import finite-group-theory.transpositions open import foundation.action-on-equivalences-type-families-over-subuniverses open import foundation.action-on-identifications-functions +open import foundation.binary-transport open import foundation.commuting-squares-of-maps open import foundation.contractible-types open import foundation.coproduct-types @@ -31,6 +32,7 @@ open import foundation.empty-types open import foundation.equality-dependent-pair-types open import foundation.equivalence-classes open import foundation.equivalence-extensionality +open import foundation.equivalence-induction open import foundation.equivalence-relations open import foundation.equivalences open import foundation.function-extensionality @@ -129,7 +131,7 @@ module _ unit-trunc-Prop (compute-raise-Fin l1 (n +ℕ 2)))) ( quotient-aut-succ-succ-Fin n (transposition Y)) ( map-equiv - ( action-equiv-family-on-subuniverse + ( action-equiv-family-over-subuniverse ( mere-equiv-Prop (Fin (n +ℕ 2))) ( D (n +ℕ 2)) ( raise l1 (Fin (n +ℕ 2)) , @@ -146,9 +148,8 @@ module _ eq-counting-equivalence-class-R : (n : ℕ) → - Id - ( equivalence-class (R (n +ℕ 2) (Fin-UU-Fin l1 (n +ℕ 2)))) - ( raise (l2 ⊔ lsuc l3) (Fin 2)) + equivalence-class (R (n +ℕ 2) (Fin-UU-Fin l1 (n +ℕ 2))) = + raise (l2 ⊔ lsuc l3) (Fin 2) eq-counting-equivalence-class-R n = eq-equiv ( equivalence-class (R (n +ℕ 2) (Fin-UU-Fin l1 (n +ℕ 2)))) @@ -165,34 +166,57 @@ module _ (n : ℕ) (X X' : UU-Fin l1 n) → type-UU-Fin n X ≃ type-UU-Fin n X' → D n X ≃ D n X' invertible-action-D-equiv n = - action-equiv-family-on-subuniverse (mere-equiv-Prop (Fin n)) (D n) + action-equiv-family-over-subuniverse (mere-equiv-Prop (Fin n)) (D n) preserves-id-equiv-invertible-action-D-equiv : (n : ℕ) (X : UU-Fin l1 n) → Id (invertible-action-D-equiv n X X id-equiv) id-equiv preserves-id-equiv-invertible-action-D-equiv n = - preserves-id-equiv-action-equiv-family-on-subuniverse + compute-id-equiv-action-equiv-family-over-subuniverse ( mere-equiv-Prop (Fin n)) ( D n) - preserves-R-invertible-action-D-equiv : - ( n : ℕ) → - ( X X' : UU-Fin l1 n) - ( e : type-UU-Fin n X ≃ type-UU-Fin n X') → - ( a a' : D n X) → - ( sim-Equivalence-Relation (R n X) a a' ↔ - sim-Equivalence-Relation - ( R n X') - ( map-equiv (invertible-action-D-equiv n X X' e) a) - ( map-equiv (invertible-action-D-equiv n X X' e) a')) - preserves-R-invertible-action-D-equiv n X X' = - Ind-action-equiv-family-on-subuniverse (mere-equiv-Prop (Fin n)) (D n) X - ( λ Y f → - ( a a' : D n X) → - ( sim-Equivalence-Relation (R n X) a a' ↔ - sim-Equivalence-Relation (R n Y) (map-equiv f a) (map-equiv f a'))) - ( λ a a' → id , id) - ( X') + abstract + preserves-R-invertible-action-D-equiv : + ( n : ℕ) → + ( X X' : UU-Fin l1 n) + ( e : type-UU-Fin n X ≃ type-UU-Fin n X') → + ( a a' : D n X) → + ( sim-Equivalence-Relation (R n X) a a' ↔ + sim-Equivalence-Relation + ( R n X') + ( map-equiv (invertible-action-D-equiv n X X' e) a) + ( map-equiv (invertible-action-D-equiv n X X' e) a')) + preserves-R-invertible-action-D-equiv n X = + ind-equiv-subuniverse + ( mere-equiv-Prop (Fin n)) + ( X) + ( λ Y f → + ( a a' : D n X) → + ( sim-Equivalence-Relation (R n X) a a' ↔ + sim-Equivalence-Relation + ( R n Y) + ( map-equiv (invertible-action-D-equiv n X Y f) a) + ( map-equiv (invertible-action-D-equiv n X Y f) a'))) + ( λ a a' → + ( binary-tr + ( sim-Equivalence-Relation (R n X)) + ( inv + ( htpy-eq-equiv + ( preserves-id-equiv-invertible-action-D-equiv n X) + ( a))) + ( inv + ( htpy-eq-equiv + ( preserves-id-equiv-invertible-action-D-equiv n X) + ( a')))) , + ( binary-tr + ( sim-Equivalence-Relation (R n X)) + ( htpy-eq-equiv + ( preserves-id-equiv-invertible-action-D-equiv n X) + ( a)) + ( htpy-eq-equiv + ( preserves-id-equiv-invertible-action-D-equiv n X) + ( a')))) raise-UU-Fin-Fin : (n : ℕ) → UU-Fin l1 n pr1 (raise-UU-Fin-Fin n) = raise l1 (Fin n) @@ -1490,7 +1514,7 @@ module _ unit-trunc-Prop (compute-raise-Fin l1 (n +ℕ 2))))) → ¬ ( x = ( map-equiv - ( action-equiv-family-on-subuniverse + ( action-equiv-family-over-subuniverse ( mere-equiv-Prop (Fin (n +ℕ 2))) ( type-UU-Fin 2 ∘ Q (n +ℕ 2)) ( raise l1 (Fin (n +ℕ 2)) , diff --git a/src/finite-group-theory/simpson-delooping-sign-homomorphism.lagda.md b/src/finite-group-theory/simpson-delooping-sign-homomorphism.lagda.md index 6278f11872..7a90598c0b 100644 --- a/src/finite-group-theory/simpson-delooping-sign-homomorphism.lagda.md +++ b/src/finite-group-theory/simpson-delooping-sign-homomorphism.lagda.md @@ -43,6 +43,7 @@ open import foundation.propositional-truncations open import foundation.raising-universe-levels open import foundation.sets open import foundation.transport-along-identifications +open import foundation.type-theoretic-principle-of-choice open import foundation.unit-type open import foundation.universe-levels @@ -683,7 +684,7 @@ module _ unit-trunc-Prop (compute-raise-Fin l (n +ℕ 2)))) ( sign-comp-aut-succ-succ-Fin n (transposition Y)) ( map-equiv - ( action-equiv-family-on-subuniverse + ( action-equiv-family-over-subuniverse ( mere-equiv-Prop (Fin (n +ℕ 2))) ( λ X → Fin (n +ℕ 2) ≃ pr1 X) ( raise l (Fin (n +ℕ 2)) , @@ -716,20 +717,19 @@ module _ simpson-comp-equiv (n +ℕ 2) , preserves-id-equiv-simpson-comp-equiv (n +ℕ 2)} { y = - ( action-equiv-family-on-subuniverse + ( action-equiv-family-over-subuniverse ( mere-equiv-Prop (Fin (n +ℕ 2))) ( λ X → Fin (n +ℕ 2) ≃ type-UU-Fin (n +ℕ 2) X) , - ( preserves-id-equiv-action-equiv-family-on-subuniverse + ( compute-id-equiv-action-equiv-family-over-subuniverse ( mere-equiv-Prop (Fin (n +ℕ 2))) ( λ X → Fin (n +ℕ 2) ≃ type-UU-Fin (n +ℕ 2) X)))} ( eq-is-contr - ( is-contr-preserves-id-action-equiv-family-on-subuniverse - ( mere-equiv-Prop (Fin (n +ℕ 2))) - ( λ X → Fin (n +ℕ 2) ≃ type-UU-Fin (n +ℕ 2) X) - ( λ X → - is-set-equiv-is-set - ( is-set-Fin (n +ℕ 2)) - ( is-set-type-UU-Fin (n +ℕ 2) X))))) + ( is-contr-equiv' _ + ( distributive-Π-Σ) + ( is-contr-Π + ( unique-action-equiv-family-over-subuniverse + ( mere-equiv-Prop (Fin (n +ℕ 2))) + ( λ Y → Fin (n +ℕ 2) ≃ type-UU-Fin (n +ℕ 2) Y)))))) ( not-sign-comp-transposition-count (n +ℕ 2 , (compute-raise l (Fin (n +ℕ 2)))) (star)) diff --git a/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md b/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md index a6d82a6abd..9272b77517 100644 --- a/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md +++ b/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md @@ -47,22 +47,22 @@ module _ ( P : subuniverse l1 l2) (B : type-subuniverse P → UU l3) where - unique-action-on-equivalences-family-of-types-subuniverse : + unique-action-equiv-family-over-subuniverse : (X : type-subuniverse P) → is-contr (fiber (ev-id-equiv-subuniverse P X {λ Y e → B X ≃ B Y}) id-equiv) - unique-action-on-equivalences-family-of-types-subuniverse X = + unique-action-equiv-family-over-subuniverse X = is-contr-map-ev-id-equiv-subuniverse P X (λ Y e → B X ≃ B Y) id-equiv - action-on-equivalences-family-of-types-subuniverse : + action-equiv-family-over-subuniverse : (X Y : type-subuniverse P) → pr1 X ≃ pr1 Y → B X ≃ B Y - action-on-equivalences-family-of-types-subuniverse X = - pr1 (center (unique-action-on-equivalences-family-of-types-subuniverse X)) + action-equiv-family-over-subuniverse X = + pr1 (center (unique-action-equiv-family-over-subuniverse X)) - compute-id-equiv-action-on-equivalences-family-of-types-subuniverse : + compute-id-equiv-action-equiv-family-over-subuniverse : (X : type-subuniverse P) → - action-on-equivalences-family-of-types-subuniverse X X id-equiv = id-equiv - compute-id-equiv-action-on-equivalences-family-of-types-subuniverse X = - pr2 (center (unique-action-on-equivalences-family-of-types-subuniverse X)) + action-equiv-family-over-subuniverse X X id-equiv = id-equiv + compute-id-equiv-action-equiv-family-over-subuniverse X = + pr2 (center (unique-action-equiv-family-over-subuniverse X)) ``` ```agda @@ -71,10 +71,12 @@ module _ ( P : subuniverse l1 l2) (B : type-subuniverse P → UU l3) where +{- action-equiv-family-on-subuniverse : (X Y : type-subuniverse P) → pr1 X ≃ pr1 Y → B X ≃ B Y action-equiv-family-on-subuniverse X Y e = equiv-tr B (eq-equiv-subuniverse P e) + -} ``` ## Properties @@ -97,113 +99,15 @@ commutes for any two types `X Y : type-subuniverse P` and any family of types `B` over the subuniverse `P`. ```agda -coherence-square-action-on-equivalences-family-of-types-subuniverse : +coherence-square-action-equiv-family-over-subuniverse : {l1 l2 l3 : Level} (P : subuniverse l1 l2) (B : type-subuniverse P → UU l3) → (X Y : type-subuniverse P) → coherence-square-maps ( ap B {X} {Y}) ( equiv-eq-subuniverse P X Y) ( equiv-eq) - ( action-on-equivalences-family-of-types-subuniverse P B X Y) -coherence-square-action-on-equivalences-family-of-types-subuniverse + ( action-equiv-family-over-subuniverse P B X Y) +coherence-square-action-equiv-family-over-subuniverse P B X .X refl = - compute-id-equiv-action-on-equivalences-family-of-types-subuniverse P B X -``` - -```agda -module _ - { l1 l2 l3 : Level} - ( P : subuniverse l1 l2) (B : type-subuniverse P → UU l3) - where - - preserves-id-equiv-action-equiv-family-on-subuniverse : - (X : type-subuniverse P) → - action-equiv-family-on-subuniverse P B X X id-equiv = id-equiv - preserves-id-equiv-action-equiv-family-on-subuniverse X = - ( ap (equiv-tr B) - ( is-injective-map-equiv - ( extensionality-subuniverse P X X) - ( is-section-map-inv-is-equiv - ( is-equiv-equiv-eq-subuniverse P X X) - ( id-equiv)))) ∙ - ( equiv-tr-refl B) - - Ind-path-action-equiv-family-on-subuniverse : - { l4 : Level} - ( X : type-subuniverse P) - ( F : (Y : type-subuniverse P) → B X ≃ B Y → UU l4) → - F X id-equiv → ( Y : type-subuniverse P) (p : X = Y) → - F Y (equiv-tr B p) - Ind-path-action-equiv-family-on-subuniverse X F p .X refl = - tr (F X) (inv (equiv-tr-refl B)) p - - Ind-action-equiv-family-on-subuniverse : - { l4 : Level} - ( X : type-subuniverse P) - ( F : (Y : type-subuniverse P) → B X ≃ B Y → UU l4) → - F X id-equiv → (Y : type-subuniverse P) (e : pr1 X ≃ pr1 Y) → - F Y (action-equiv-family-on-subuniverse P B X Y e) - Ind-action-equiv-family-on-subuniverse X F p Y e = - Ind-path-action-equiv-family-on-subuniverse X F p Y - ( eq-equiv-subuniverse P e) - - is-contr-preserves-id-action-equiv-family-on-subuniverse : - ( (X : type-subuniverse P) → is-set (B X)) → - is-contr - ( Σ - ( (X Y : type-subuniverse P) → pr1 X ≃ pr1 Y → B X ≃ B Y) - ( λ D → (X : type-subuniverse P) → D X X id-equiv = id-equiv)) - pr1 (pr1 (is-contr-preserves-id-action-equiv-family-on-subuniverse H)) = - action-equiv-family-on-subuniverse P B - pr2 (pr1 (is-contr-preserves-id-action-equiv-family-on-subuniverse H)) = - preserves-id-equiv-action-equiv-family-on-subuniverse - pr2 (is-contr-preserves-id-action-equiv-family-on-subuniverse H) (D , p) = - eq-pair-Σ - ( eq-htpy (λ X → eq-htpy (λ Y → eq-htpy (λ e → - lemma2 (action-equiv-family-on-subuniverse P B) D - ( λ X → - preserves-id-equiv-action-equiv-family-on-subuniverse X ∙ inv (p X)) - X Y e)))) - ( eq-is-prop - ( is-prop-Π - ( λ X → - is-set-type-Set - ( B X ≃ B X , is-set-equiv-is-set (H X) (H X)) - ( D X X id-equiv) - ( id-equiv)))) - where - lemma1 : - (f g : (X Y : UU l1) → (pX : is-in-subuniverse P X) → - ( pY : is-in-subuniverse P Y) → X = Y → - B (X , pX) ≃ B (Y , pY)) → - ( (X : UU l1) (pX : is-in-subuniverse P X) - (pX' : is-in-subuniverse P X) → - f X X pX pX' refl = g X X pX pX' refl) → - ( X Y : UU l1) (pX : is-in-subuniverse P X) - ( pY : is-in-subuniverse P Y) (p : X = Y) → - f X Y pX pY p = g X Y pX pY p - lemma1 f g h X .X pX pX' refl = h X pX pX' - lemma2 : - ( f g : (X Y : type-subuniverse P) → pr1 X ≃ pr1 Y → B X ≃ B Y) → - ( (X : type-subuniverse P) → f X X id-equiv = g X X id-equiv) → - ( X Y : type-subuniverse P) (e : pr1 X ≃ pr1 Y) → - f X Y e = g X Y e - lemma2 f g h X Y e = - tr - ( λ e' → f X Y e' = g X Y e') - ( is-section-map-inv-is-equiv (univalence (pr1 X) (pr1 Y)) e) - ( lemma1 - ( λ X Y pX pY p → f (X , pX) (Y , pY) (equiv-eq p)) - ( λ X Y pX pY p → g (X , pX) (Y , pY) (equiv-eq p)) - ( λ X pX pX' → - tr - ( λ p → f (X , pX) (X , p) id-equiv = - g (X , pX) (X , p) id-equiv) - ( eq-is-prop (is-prop-is-in-subtype P X)) - ( h ( X , pX))) - ( pr1 X) - ( pr1 Y) - ( pr2 X) - ( pr2 Y) - ( eq-equiv (pr1 X) (pr1 Y) e)) + compute-id-equiv-action-equiv-family-over-subuniverse P B X ``` From 6e326093b83159601b8476c3eea722d07d73c4d0 Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Mon, 11 Sep 2023 21:07:45 +0200 Subject: [PATCH 12/19] equivalence-induction --- src/foundation/equivalence-induction.lagda.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/foundation/equivalence-induction.lagda.md b/src/foundation/equivalence-induction.lagda.md index 11fd12ad76..735792e8a7 100644 --- a/src/foundation/equivalence-induction.lagda.md +++ b/src/foundation/equivalence-induction.lagda.md @@ -65,9 +65,9 @@ module _ ((B : UU l1) (e : A ≃ B) → P B e) → P A id-equiv ev-id-equiv P f = f A id-equiv - IND-EQUIV : + equivalence-induction : {l : Level} (P : (B : UU l1) (e : A ≃ B) → UU l) → UU (lsuc l1 ⊔ l) - IND-EQUIV P = section (ev-id-equiv P) + equivalence-induction P = section (ev-id-equiv P) triangle-ev-id-equiv : {l : Level} @@ -94,7 +94,8 @@ module _ is-identity-system-is-contr-total-equiv : is-contr (Σ (UU l1) (λ X → A ≃ X)) → {l : Level} → - (P : (Σ (UU l1) (λ X → A ≃ X)) → UU l) → IND-EQUIV (λ B e → P (B , e)) + (P : (Σ (UU l1) (λ X → A ≃ X)) → UU l) → + equivalence-induction (λ B e → P (B , e)) is-identity-system-is-contr-total-equiv c P = section-left-factor ( ev-id-equiv (λ X e → P (X , e))) From c2d91d472b328915438225df0deb207c7848c9a1 Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Mon, 11 Sep 2023 22:16:33 +0200 Subject: [PATCH 13/19] more changes --- ...s-type-families-over-subuniverses.lagda.md | 21 ++------ ...ion-on-equivalences-type-families.lagda.md | 49 ++++++------------- src/foundation/subuniverses.lagda.md | 6 +++ .../transport-along-equivalences.lagda.md | 2 +- 4 files changed, 27 insertions(+), 51 deletions(-) diff --git a/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md b/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md index 9272b77517..921058d269 100644 --- a/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md +++ b/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md @@ -13,6 +13,7 @@ open import foundation.dependent-pair-types open import foundation.equivalence-induction open import foundation.fibers-of-maps open import foundation.function-extensionality +open import foundation.function-types open import foundation.sets open import foundation.subuniverses open import foundation.transport-along-identifications @@ -55,28 +56,14 @@ module _ action-equiv-family-over-subuniverse : (X Y : type-subuniverse P) → pr1 X ≃ pr1 Y → B X ≃ B Y - action-equiv-family-over-subuniverse X = - pr1 (center (unique-action-equiv-family-over-subuniverse X)) + action-equiv-family-over-subuniverse X Y = + equiv-eq ∘ ap B ∘ eq-equiv-subuniverse P compute-id-equiv-action-equiv-family-over-subuniverse : (X : type-subuniverse P) → action-equiv-family-over-subuniverse X X id-equiv = id-equiv compute-id-equiv-action-equiv-family-over-subuniverse X = - pr2 (center (unique-action-equiv-family-over-subuniverse X)) -``` - -```agda -module _ - { l1 l2 l3 : Level} - ( P : subuniverse l1 l2) (B : type-subuniverse P → UU l3) - where - -{- - action-equiv-family-on-subuniverse : - (X Y : type-subuniverse P) → pr1 X ≃ pr1 Y → B X ≃ B Y - action-equiv-family-on-subuniverse X Y e = - equiv-tr B (eq-equiv-subuniverse P e) - -} + ap (equiv-eq ∘ ap B) (compute-eq-equiv-id-equiv-subuniverse P) ``` ## Properties diff --git a/src/foundation/action-on-equivalences-type-families.lagda.md b/src/foundation/action-on-equivalences-type-families.lagda.md index f217140d22..1ff9d8d632 100644 --- a/src/foundation/action-on-equivalences-type-families.lagda.md +++ b/src/foundation/action-on-equivalences-type-families.lagda.md @@ -67,32 +67,25 @@ module _ {l1 l2 : Level} (B : UU l1 → UU l2) where - unique-action-on-equivalences-family-of-types-universe : + unique-action-equiv-family : {X : UU l1} → is-contr (fiber (ev-id-equiv (λ Y e → B X ≃ B Y)) id-equiv) - unique-action-on-equivalences-family-of-types-universe = + unique-action-equiv-family = is-contr-map-ev-id-equiv (λ Y e → B _ ≃ B Y) id-equiv - action-on-equivalences-family-of-types-universe : + action-equiv-family : {X Y : UU l1} → (X ≃ Y) → B X ≃ B Y - action-on-equivalences-family-of-types-universe {X} {Y} = - pr1 (center (unique-action-on-equivalences-family-of-types-universe {X})) Y + action-equiv-family {X} {Y} = + equiv-eq ∘ action-equiv-function B - compute-id-equiv-action-on-equivalences-family-of-types-universe : + compute-action-equiv-family-id-equiv : {X : UU l1} → - action-on-equivalences-family-of-types-universe {X} {X} id-equiv = id-equiv - compute-id-equiv-action-on-equivalences-family-of-types-universe {X} = - pr2 (center (unique-action-on-equivalences-family-of-types-universe {X})) - -action-equiv-family : - {l1 l2 : Level} (f : UU l1 → UU l2) {X Y : UU l1} → - X ≃ Y → f X ≃ f Y -action-equiv-family f = equiv-eq ∘ action-equiv-function f - -map-action-equiv-family : - {l1 l2 : Level} (f : UU l1 → UU l2) {X Y : UU l1} → - X ≃ Y → f X → f Y -map-action-equiv-family f = map-equiv ∘ action-equiv-family f + action-equiv-family {X} {X} id-equiv = id-equiv + compute-action-equiv-family-id-equiv {X} = + ap equiv-eq (compute-action-equiv-function-id-equiv B X) + + map-action-equiv-family : {X Y : UU l1} → X ≃ Y → B X → B Y + map-action-equiv-family = map-equiv ∘ action-equiv-family ``` ## Properties @@ -114,15 +107,15 @@ We claim that the square commutes for any two types `X Y : 𝒰` and any type family `B` over `𝒰`. ```agda -coherence-square-action-on-equivalences-family-of-types-universe : +coherence-square-action-equiv-family : {l1 l2 : Level} (B : UU l1 → UU l2) (X Y : UU l1) → coherence-square-maps ( ap B {X} {Y}) ( equiv-eq) ( equiv-eq) - ( action-on-equivalences-family-of-types-universe B) -coherence-square-action-on-equivalences-family-of-types-universe B X .X refl = - compute-id-equiv-action-on-equivalences-family-of-types-universe B + ( action-equiv-family B) +coherence-square-action-equiv-family B X .X refl = + compute-action-equiv-family-id-equiv B ``` ### The identity function acts trivially on equivalences @@ -155,16 +148,6 @@ distributive-action-equiv-family-comp g f {X} {Y} e = ap equiv-eq (distributive-action-equiv-function-comp g f {X} {Y} e) ``` -### The action on equivalences of any map preserves `id-equiv` - -```agda -compute-action-equiv-family-id-equiv : - {l1 l2 : Level} (f : UU l1 → UU l2) (A : UU l1) → - (action-equiv-family f id-equiv) = id-equiv -compute-action-equiv-family-id-equiv f A = - ap equiv-eq (compute-action-equiv-function-id-equiv f A) -``` - ### The action on equivalences of a constant map is constant ```agda diff --git a/src/foundation/subuniverses.lagda.md b/src/foundation/subuniverses.lagda.md index 5c1d434904..07d686f36f 100644 --- a/src/foundation/subuniverses.lagda.md +++ b/src/foundation/subuniverses.lagda.md @@ -169,6 +169,12 @@ module _ {s t : type-subuniverse P} → equiv-subuniverse s t → s = t eq-equiv-subuniverse {s} {t} = map-inv-is-equiv (is-equiv-equiv-eq-subuniverse s t) + + compute-eq-equiv-id-equiv-subuniverse : + {s : type-subuniverse P} → + eq-equiv-subuniverse {s} {s} (id-equiv {A = pr1 s}) = refl + compute-eq-equiv-id-equiv-subuniverse = + is-retraction-map-inv-equiv (extensionality-subuniverse _ _) refl ``` ### Equivalences of families of types in a subuniverse diff --git a/src/foundation/transport-along-equivalences.lagda.md b/src/foundation/transport-along-equivalences.lagda.md index 840b82fae8..14fe60c409 100644 --- a/src/foundation/transport-along-equivalences.lagda.md +++ b/src/foundation/transport-along-equivalences.lagda.md @@ -186,7 +186,7 @@ eq-tr-equiv-action-equiv-family f {X} = ind-equiv ( λ Y e → tr-equiv f e = action-equiv-family f e) ( compute-tr-equiv-id-equiv f ∙ - inv (compute-action-equiv-family-id-equiv f X)) + inv (compute-action-equiv-family-id-equiv f)) eq-map-tr-equiv-map-action-equiv-family : {l1 l2 : Level} (f : UU l1 → UU l2) {X Y : UU l1} → From 20e0e81d02fe6212900652a87a2b5ca9258067dd Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Mon, 11 Sep 2023 22:23:51 +0200 Subject: [PATCH 14/19] move lemma --- ...ion-on-equivalences-type-families.lagda.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/foundation/action-on-equivalences-type-families.lagda.md b/src/foundation/action-on-equivalences-type-families.lagda.md index 1ff9d8d632..8ee120e566 100644 --- a/src/foundation/action-on-equivalences-type-families.lagda.md +++ b/src/foundation/action-on-equivalences-type-families.lagda.md @@ -127,6 +127,16 @@ compute-action-equiv-family-id {l} {X} {Y} e = (ap equiv-eq (ap-id (eq-equiv X Y e))) ∙ (is-section-eq-equiv e) ``` +### The action on equivalences of a constant map is constant + +```agda +compute-action-equiv-family-const : + {l1 l2 : Level} (B : UU l2) {X Y : UU l1} + (e : X ≃ Y) → (action-equiv-family (const (UU l1) (UU l2) B) e) = id-equiv +compute-action-equiv-family-const B {X} {Y} e = + ap equiv-eq (compute-action-equiv-function-const B e) +``` + ### The action on equivalences of a composite function is the composite of the actions ```agda @@ -148,16 +158,6 @@ distributive-action-equiv-family-comp g f {X} {Y} e = ap equiv-eq (distributive-action-equiv-function-comp g f {X} {Y} e) ``` -### The action on equivalences of a constant map is constant - -```agda -compute-action-equiv-family-const : - {l1 l2 : Level} (B : UU l2) {X Y : UU l1} - (e : X ≃ Y) → (action-equiv-family (const (UU l1) (UU l2) B) e) = id-equiv -compute-action-equiv-family-const B {X} {Y} e = - ap equiv-eq (compute-action-equiv-function-const B e) -``` - ### The action on equivalences of any map preserves composition of equivalences ```agda From dc9a2e2bd36f48680e606ceed673b71867f7b0de Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Tue, 12 Sep 2023 21:03:22 +0200 Subject: [PATCH 15/19] remove some unused imports --- .../action-on-equivalences-functions.lagda.md | 2 -- ...s-type-families-over-subuniverses.lagda.md | 7 ----- ...ion-on-equivalences-type-families.lagda.md | 9 ------- src/foundation/axiom-of-choice.lagda.md | 1 - .../symmetric-binary-relations.lagda.md | 2 -- .../transport-along-equivalences.lagda.md | 1 - ...iversal-property-identity-systems.lagda.md | 4 --- src/foundation/unordered-pairs.lagda.md | 1 - .../commuting-elements-groups.lagda.md | 2 -- ...endomorphism-rings-abelian-groups.lagda.md | 2 -- .../free-groups-with-one-generator.lagda.md | 3 --- .../images-of-group-homomorphisms.lagda.md | 2 -- ...tiples-of-elements-abelian-groups.lagda.md | 5 ---- ...integer-powers-of-elements-groups.lagda.md | 1 - ...tiples-of-elements-abelian-groups.lagda.md | 10 ------- .../powers-of-elements-groups.lagda.md | 9 ------- ...oups-generated-by-elements-groups.lagda.md | 3 --- .../cyclic-higher-groups.lagda.md | 3 --- .../local-families.lagda.md | 17 ------------ .../local-maps.lagda.md | 20 -------------- src/ring-theory/category-of-rings.lagda.md | 1 - ...teger-multiples-of-elements-rings.lagda.md | 1 - src/ring-theory/isomorphisms-rings.lagda.md | 2 -- .../powers-of-elements-semirings.lagda.md | 1 - .../dependent-suspension-structures.lagda.md | 12 --------- ...nt-universal-property-suspensions.lagda.md | 22 --------------- ...scent-circle-dependent-pair-types.lagda.md | 1 - .../pullback-property-pushouts.lagda.md | 1 - .../suspension-structures.lagda.md | 16 ----------- .../suspensions-of-pointed-types.lagda.md | 27 ------------------- .../suspensions-of-types.lagda.md | 8 ------ .../universal-cover-circle.lagda.md | 2 -- ...erty-suspensions-of-pointed-types.lagda.md | 23 ---------------- .../universal-property-suspensions.lagda.md | 17 ------------ .../pigeonhole-principle.lagda.md | 1 - 35 files changed, 239 deletions(-) diff --git a/src/foundation/action-on-equivalences-functions.lagda.md b/src/foundation/action-on-equivalences-functions.lagda.md index 3cf27c3318..438680b69f 100644 --- a/src/foundation/action-on-equivalences-functions.lagda.md +++ b/src/foundation/action-on-equivalences-functions.lagda.md @@ -13,8 +13,6 @@ open import foundation.univalence open import foundation.universe-levels open import foundation-core.constant-maps -open import foundation-core.function-types -open import foundation-core.homotopies open import foundation-core.identity-types ``` diff --git a/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md b/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md index 921058d269..38a9588e77 100644 --- a/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md +++ b/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md @@ -12,21 +12,14 @@ open import foundation.commuting-squares-of-maps open import foundation.dependent-pair-types open import foundation.equivalence-induction open import foundation.fibers-of-maps -open import foundation.function-extensionality open import foundation.function-types -open import foundation.sets open import foundation.subuniverses -open import foundation.transport-along-identifications 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.equivalences open import foundation-core.identity-types -open import foundation-core.injective-maps -open import foundation-core.propositions -open import foundation-core.subtypes ```
diff --git a/src/foundation/action-on-equivalences-type-families.lagda.md b/src/foundation/action-on-equivalences-type-families.lagda.md index 8ee120e566..e5f02ba0ab 100644 --- a/src/foundation/action-on-equivalences-type-families.lagda.md +++ b/src/foundation/action-on-equivalences-type-families.lagda.md @@ -11,25 +11,16 @@ open import foundation.action-on-equivalences-functions open import foundation.action-on-identifications-functions open import foundation.commuting-squares-of-maps open import foundation.constant-maps -open import foundation.dependent-pair-types open import foundation.equivalence-induction open import foundation.fibers-of-maps -open import foundation.function-extensionality open import foundation.function-types open import foundation.homotopies open import foundation.identity-types -open import foundation.sets -open import foundation.subuniverses -open import foundation.transport-along-identifications 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.equivalences -open import foundation-core.injective-maps -open import foundation-core.propositions -open import foundation-core.subtypes ```
diff --git a/src/foundation/axiom-of-choice.lagda.md b/src/foundation/axiom-of-choice.lagda.md index 54c5a7a8eb..9312e81445 100644 --- a/src/foundation/axiom-of-choice.lagda.md +++ b/src/foundation/axiom-of-choice.lagda.md @@ -21,7 +21,6 @@ open import foundation-core.equivalences open import foundation-core.fibers-of-maps open import foundation-core.function-types open import foundation-core.functoriality-dependent-pair-types -open import foundation-core.homotopies open import foundation-core.identity-types open import foundation-core.sets open import foundation-core.whiskering-homotopies diff --git a/src/foundation/symmetric-binary-relations.lagda.md b/src/foundation/symmetric-binary-relations.lagda.md index a64a57ed21..2af23d658b 100644 --- a/src/foundation/symmetric-binary-relations.lagda.md +++ b/src/foundation/symmetric-binary-relations.lagda.md @@ -7,10 +7,8 @@ module foundation.symmetric-binary-relations where
Imports ```agda -open import foundation.action-on-equivalences-type-families open import foundation.action-on-identifications-functions open import foundation.binary-relations -open import foundation.binary-transport open import foundation.dependent-pair-types open import foundation.equivalence-extensionality open import foundation.equivalences diff --git a/src/foundation/transport-along-equivalences.lagda.md b/src/foundation/transport-along-equivalences.lagda.md index 14fe60c409..316a911c17 100644 --- a/src/foundation/transport-along-equivalences.lagda.md +++ b/src/foundation/transport-along-equivalences.lagda.md @@ -14,7 +14,6 @@ open import foundation.dependent-pair-types open import foundation.equivalence-extensionality open import foundation.equivalence-induction open import foundation.equivalences -open import foundation.function-extensionality open import foundation.transport-along-identifications open import foundation.univalence open import foundation.universe-levels diff --git a/src/foundation/universal-property-identity-systems.lagda.md b/src/foundation/universal-property-identity-systems.lagda.md index 0414909b40..a31939e189 100644 --- a/src/foundation/universal-property-identity-systems.lagda.md +++ b/src/foundation/universal-property-identity-systems.lagda.md @@ -7,10 +7,8 @@ module foundation.universal-property-identity-systems where
Imports ```agda -open import foundation.action-on-identifications-functions open import foundation.contractible-types open import foundation.dependent-pair-types -open import foundation.fundamental-theorem-of-identity-types open import foundation.identity-systems open import foundation.torsorial-type-families open import foundation.universal-property-dependent-pair-types @@ -18,8 +16,6 @@ open import foundation.universe-levels open import foundation-core.equivalences open import foundation-core.identity-types -open import foundation-core.sections -open import foundation-core.transport-along-identifications ```
diff --git a/src/foundation/unordered-pairs.lagda.md b/src/foundation/unordered-pairs.lagda.md index bd5edca703..e69737ea60 100644 --- a/src/foundation/unordered-pairs.lagda.md +++ b/src/foundation/unordered-pairs.lagda.md @@ -20,7 +20,6 @@ open import foundation.homotopies open import foundation.mere-equivalences open import foundation.propositional-truncations open import foundation.structure-identity-principle -open import foundation.unit-type open import foundation.universal-property-dependent-pair-types open import foundation.universe-levels diff --git a/src/group-theory/commuting-elements-groups.lagda.md b/src/group-theory/commuting-elements-groups.lagda.md index 5b20cee33a..9e76af7d68 100644 --- a/src/group-theory/commuting-elements-groups.lagda.md +++ b/src/group-theory/commuting-elements-groups.lagda.md @@ -7,10 +7,8 @@ module group-theory.commuting-elements-groups where
Imports ```agda -open import foundation.action-on-identifications-functions open import foundation.identity-types open import foundation.propositions -open import foundation.sets open import foundation.universe-levels open import group-theory.commuting-elements-monoids diff --git a/src/group-theory/endomorphism-rings-abelian-groups.lagda.md b/src/group-theory/endomorphism-rings-abelian-groups.lagda.md index 8ae3888a1a..d3dfb679a9 100644 --- a/src/group-theory/endomorphism-rings-abelian-groups.lagda.md +++ b/src/group-theory/endomorphism-rings-abelian-groups.lagda.md @@ -8,8 +8,6 @@ module group-theory.endomorphism-rings-abelian-groups where ```agda open import foundation.dependent-pair-types -open import foundation.propositional-truncations -open import foundation.surjective-maps open import foundation.universe-levels open import group-theory.abelian-groups diff --git a/src/group-theory/free-groups-with-one-generator.lagda.md b/src/group-theory/free-groups-with-one-generator.lagda.md index 82e51078e9..c500185cbc 100644 --- a/src/group-theory/free-groups-with-one-generator.lagda.md +++ b/src/group-theory/free-groups-with-one-generator.lagda.md @@ -10,16 +10,13 @@ module group-theory.free-groups-with-one-generator where open import elementary-number-theory.addition-integers open import elementary-number-theory.group-of-integers open import elementary-number-theory.integers -open import elementary-number-theory.natural-numbers open import foundation.action-on-identifications-functions open import foundation.contractible-maps open import foundation.contractible-types -open import foundation.coproduct-types open import foundation.dependent-pair-types open import foundation.equivalences open import foundation.identity-types -open import foundation.iterating-automorphisms open import foundation.sets open import foundation.subtypes open import foundation.universe-levels diff --git a/src/group-theory/images-of-group-homomorphisms.lagda.md b/src/group-theory/images-of-group-homomorphisms.lagda.md index 420c28599e..c8bde8b2fa 100644 --- a/src/group-theory/images-of-group-homomorphisms.lagda.md +++ b/src/group-theory/images-of-group-homomorphisms.lagda.md @@ -7,13 +7,11 @@ module group-theory.images-of-group-homomorphisms where
Imports ```agda -open import foundation.commuting-triangles-of-maps open import foundation.dependent-pair-types open import foundation.identity-types open import foundation.images open import foundation.logical-equivalences open import foundation.propositional-truncations -open import foundation.surjective-maps open import foundation.universal-property-image open import foundation.universe-levels diff --git a/src/group-theory/integer-multiples-of-elements-abelian-groups.lagda.md b/src/group-theory/integer-multiples-of-elements-abelian-groups.lagda.md index 3251509447..8520bd3ff2 100644 --- a/src/group-theory/integer-multiples-of-elements-abelian-groups.lagda.md +++ b/src/group-theory/integer-multiples-of-elements-abelian-groups.lagda.md @@ -13,19 +13,14 @@ open import elementary-number-theory.multiplication-integers open import elementary-number-theory.natural-numbers open import foundation.action-on-identifications-functions -open import foundation.coproduct-types open import foundation.dependent-pair-types open import foundation.identity-types -open import foundation.iterating-automorphisms open import foundation.universe-levels open import group-theory.abelian-groups open import group-theory.homomorphisms-abelian-groups open import group-theory.integer-powers-of-elements-groups open import group-theory.multiples-of-elements-abelian-groups - -open import structured-types.initial-pointed-type-equipped-with-automorphism -open import structured-types.pointed-types-equipped-with-automorphisms ```
diff --git a/src/group-theory/integer-powers-of-elements-groups.lagda.md b/src/group-theory/integer-powers-of-elements-groups.lagda.md index c82108f187..5315782812 100644 --- a/src/group-theory/integer-powers-of-elements-groups.lagda.md +++ b/src/group-theory/integer-powers-of-elements-groups.lagda.md @@ -16,7 +16,6 @@ open import foundation.action-on-identifications-functions open import foundation.coproduct-types open import foundation.identity-types open import foundation.iterating-automorphisms -open import foundation.unit-type open import foundation.universe-levels open import group-theory.commuting-elements-groups diff --git a/src/group-theory/multiples-of-elements-abelian-groups.lagda.md b/src/group-theory/multiples-of-elements-abelian-groups.lagda.md index 7423a3fc0c..e2f024ab58 100644 --- a/src/group-theory/multiples-of-elements-abelian-groups.lagda.md +++ b/src/group-theory/multiples-of-elements-abelian-groups.lagda.md @@ -7,25 +7,15 @@ module group-theory.multiples-of-elements-abelian-groups where
Imports ```agda -open import elementary-number-theory.addition-integers open import elementary-number-theory.addition-natural-numbers -open import elementary-number-theory.integers open import elementary-number-theory.multiplication-natural-numbers open import elementary-number-theory.natural-numbers -open import foundation.action-on-identifications-functions -open import foundation.coproduct-types -open import foundation.dependent-pair-types open import foundation.identity-types -open import foundation.iterating-automorphisms open import foundation.universe-levels open import group-theory.abelian-groups -open import group-theory.groups -open import group-theory.homomorphisms-abelian-groups open import group-theory.powers-of-elements-groups - -open import structured-types.initial-pointed-type-equipped-with-automorphism ```
diff --git a/src/group-theory/powers-of-elements-groups.lagda.md b/src/group-theory/powers-of-elements-groups.lagda.md index 2b55097976..e0583295d3 100644 --- a/src/group-theory/powers-of-elements-groups.lagda.md +++ b/src/group-theory/powers-of-elements-groups.lagda.md @@ -7,26 +7,17 @@ module group-theory.powers-of-elements-groups where
Imports ```agda -open import elementary-number-theory.addition-integers open import elementary-number-theory.addition-natural-numbers -open import elementary-number-theory.integers open import elementary-number-theory.multiplication-natural-numbers open import elementary-number-theory.natural-numbers -open import foundation.action-on-identifications-functions -open import foundation.coproduct-types -open import foundation.dependent-pair-types open import foundation.identity-types -open import foundation.iterating-automorphisms -open import foundation.unit-type open import foundation.universe-levels open import group-theory.commuting-elements-groups open import group-theory.groups open import group-theory.homomorphisms-groups open import group-theory.powers-of-elements-monoids - -open import structured-types.initial-pointed-type-equipped-with-automorphism ```
diff --git a/src/group-theory/subgroups-generated-by-elements-groups.lagda.md b/src/group-theory/subgroups-generated-by-elements-groups.lagda.md index 71fbafefa0..e03f34a3a7 100644 --- a/src/group-theory/subgroups-generated-by-elements-groups.lagda.md +++ b/src/group-theory/subgroups-generated-by-elements-groups.lagda.md @@ -9,15 +9,12 @@ module group-theory.subgroups-generated-by-elements-groups where ```agda open import elementary-number-theory.group-of-integers open import elementary-number-theory.integers -open import elementary-number-theory.natural-numbers -open import foundation.coproduct-types open import foundation.dependent-pair-types open import foundation.identity-types open import foundation.logical-equivalences open import foundation.singleton-subtypes open import foundation.subtypes -open import foundation.unit-type open import foundation.universe-levels open import group-theory.free-groups-with-one-generator diff --git a/src/higher-group-theory/cyclic-higher-groups.lagda.md b/src/higher-group-theory/cyclic-higher-groups.lagda.md index fe27880197..8870924523 100644 --- a/src/higher-group-theory/cyclic-higher-groups.lagda.md +++ b/src/higher-group-theory/cyclic-higher-groups.lagda.md @@ -14,9 +14,6 @@ open import foundation.universe-levels open import higher-group-theory.higher-groups open import higher-group-theory.homomorphisms-higher-groups - -open import synthetic-homotopy-theory.functoriality-loop-spaces -open import synthetic-homotopy-theory.loop-spaces ```
diff --git a/src/orthogonal-factorization-systems/local-families.lagda.md b/src/orthogonal-factorization-systems/local-families.lagda.md index fa92bac793..7fcf5faa64 100644 --- a/src/orthogonal-factorization-systems/local-families.lagda.md +++ b/src/orthogonal-factorization-systems/local-families.lagda.md @@ -7,27 +7,10 @@ module orthogonal-factorization-systems.local-families where
Imports ```agda -open import foundation.action-on-identifications-functions -open import foundation.contractible-maps -open import foundation.contractible-types open import foundation.dependent-pair-types -open import foundation.empty-types open import foundation.equivalences -open import foundation.fibers-of-maps -open import foundation.function-extensionality open import foundation.function-types -open import foundation.functoriality-dependent-function-types -open import foundation.functoriality-dependent-pair-types -open import foundation.functoriality-function-types -open import foundation.identity-types open import foundation.propositions -open import foundation.retractions -open import foundation.sections -open import foundation.transport-along-identifications -open import foundation.type-arithmetic-dependent-function-types -open import foundation.type-arithmetic-unit-type -open import foundation.unit-type -open import foundation.universal-property-empty-type open import foundation.universe-levels open import orthogonal-factorization-systems.local-types diff --git a/src/orthogonal-factorization-systems/local-maps.lagda.md b/src/orthogonal-factorization-systems/local-maps.lagda.md index 14a6b71b46..414018dfb5 100644 --- a/src/orthogonal-factorization-systems/local-maps.lagda.md +++ b/src/orthogonal-factorization-systems/local-maps.lagda.md @@ -7,31 +7,11 @@ module orthogonal-factorization-systems.local-maps where
Imports ```agda -open import foundation.action-on-identifications-functions -open import foundation.contractible-maps -open import foundation.contractible-types -open import foundation.dependent-pair-types -open import foundation.empty-types -open import foundation.equivalences open import foundation.fibers-of-maps -open import foundation.function-extensionality -open import foundation.function-types -open import foundation.functoriality-dependent-function-types -open import foundation.functoriality-dependent-pair-types -open import foundation.functoriality-function-types -open import foundation.identity-types open import foundation.propositions -open import foundation.retractions -open import foundation.sections -open import foundation.transport-along-identifications -open import foundation.type-arithmetic-dependent-function-types -open import foundation.type-arithmetic-unit-type -open import foundation.unit-type -open import foundation.universal-property-empty-type open import foundation.universe-levels open import orthogonal-factorization-systems.local-families -open import orthogonal-factorization-systems.local-types ```
diff --git a/src/ring-theory/category-of-rings.lagda.md b/src/ring-theory/category-of-rings.lagda.md index b947694e21..864f8110f8 100644 --- a/src/ring-theory/category-of-rings.lagda.md +++ b/src/ring-theory/category-of-rings.lagda.md @@ -10,7 +10,6 @@ module ring-theory.category-of-rings where open import category-theory.categories open import category-theory.large-categories -open import foundation.fundamental-theorem-of-identity-types open import foundation.universe-levels open import ring-theory.isomorphisms-rings diff --git a/src/ring-theory/integer-multiples-of-elements-rings.lagda.md b/src/ring-theory/integer-multiples-of-elements-rings.lagda.md index 5f2d652de3..aefe4acb6d 100644 --- a/src/ring-theory/integer-multiples-of-elements-rings.lagda.md +++ b/src/ring-theory/integer-multiples-of-elements-rings.lagda.md @@ -16,7 +16,6 @@ open import foundation.action-on-identifications-functions open import foundation.coproduct-types open import foundation.identity-types open import foundation.transport-along-identifications -open import foundation.unit-type open import foundation.universe-levels open import group-theory.homomorphisms-abelian-groups diff --git a/src/ring-theory/isomorphisms-rings.lagda.md b/src/ring-theory/isomorphisms-rings.lagda.md index f36a5fb094..aeff4276e6 100644 --- a/src/ring-theory/isomorphisms-rings.lagda.md +++ b/src/ring-theory/isomorphisms-rings.lagda.md @@ -10,7 +10,6 @@ module ring-theory.isomorphisms-rings where open import category-theory.isomorphisms-large-precategories 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.equality-dependent-function-types @@ -21,7 +20,6 @@ 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.structure-identity-principle open import foundation.subtype-identity-principle open import foundation.subtypes diff --git a/src/ring-theory/powers-of-elements-semirings.lagda.md b/src/ring-theory/powers-of-elements-semirings.lagda.md index d85e2984a0..ca2f29b47c 100644 --- a/src/ring-theory/powers-of-elements-semirings.lagda.md +++ b/src/ring-theory/powers-of-elements-semirings.lagda.md @@ -11,7 +11,6 @@ open import elementary-number-theory.addition-natural-numbers open import elementary-number-theory.multiplication-natural-numbers open import elementary-number-theory.natural-numbers -open import foundation.action-on-identifications-functions open import foundation.identity-types open import foundation.universe-levels diff --git a/src/synthetic-homotopy-theory/dependent-suspension-structures.lagda.md b/src/synthetic-homotopy-theory/dependent-suspension-structures.lagda.md index a2096ced2b..e113b5a80e 100644 --- a/src/synthetic-homotopy-theory/dependent-suspension-structures.lagda.md +++ b/src/synthetic-homotopy-theory/dependent-suspension-structures.lagda.md @@ -7,12 +7,9 @@ module synthetic-homotopy-theory.dependent-suspension-structures where
Imports ```agda -open import foundation.action-on-identifications-dependent-functions open import foundation.action-on-identifications-functions open import foundation.commuting-squares-of-identifications -open import foundation.commuting-squares-of-maps open import foundation.constant-maps -open import foundation.contractible-types open import foundation.dependent-identifications open import foundation.dependent-pair-types open import foundation.equivalences @@ -20,25 +17,16 @@ open import foundation.function-extensionality open import foundation.function-types open import foundation.functoriality-dependent-pair-types open import foundation.homotopies -open import foundation.identity-systems open import foundation.identity-types open import foundation.injective-maps open import foundation.structure-identity-principle open import foundation.transport-along-identifications -open import foundation.type-arithmetic-dependent-pair-types open import foundation.unit-type open import foundation.universal-property-unit-type open import foundation.universe-levels -open import synthetic-homotopy-theory.cocones-under-spans -open import synthetic-homotopy-theory.conjugation-loops open import synthetic-homotopy-theory.dependent-cocones-under-spans -open import synthetic-homotopy-theory.dependent-universal-property-pushouts -open import synthetic-homotopy-theory.functoriality-loop-spaces -open import synthetic-homotopy-theory.loop-spaces -open import synthetic-homotopy-theory.pushouts open import synthetic-homotopy-theory.suspension-structures -open import synthetic-homotopy-theory.universal-property-pushouts ```
diff --git a/src/synthetic-homotopy-theory/dependent-universal-property-suspensions.lagda.md b/src/synthetic-homotopy-theory/dependent-universal-property-suspensions.lagda.md index fd85921d9e..e4b40dc9c1 100644 --- a/src/synthetic-homotopy-theory/dependent-universal-property-suspensions.lagda.md +++ b/src/synthetic-homotopy-theory/dependent-universal-property-suspensions.lagda.md @@ -8,39 +8,17 @@ module synthetic-homotopy-theory.dependent-universal-property-suspensions where ```agda open import foundation.action-on-identifications-dependent-functions -open import foundation.action-on-identifications-functions -open import foundation.commuting-squares-of-identifications -open import foundation.commuting-squares-of-maps open import foundation.constant-maps -open import foundation.contractible-types -open import foundation.dependent-identifications open import foundation.dependent-pair-types open import foundation.equivalences -open import foundation.function-extensionality open import foundation.function-types -open import foundation.functoriality-dependent-pair-types open import foundation.homotopies -open import foundation.identity-systems -open import foundation.identity-types -open import foundation.structure-identity-principle -open import foundation.transport-along-identifications -open import foundation.type-arithmetic-dependent-pair-types open import foundation.unit-type -open import foundation.universal-property-unit-type open import foundation.universe-levels -open import structured-types.pointed-equivalences -open import structured-types.pointed-maps -open import structured-types.pointed-types - -open import synthetic-homotopy-theory.cocones-under-spans open import synthetic-homotopy-theory.dependent-cocones-under-spans open import synthetic-homotopy-theory.dependent-suspension-structures -open import synthetic-homotopy-theory.dependent-universal-property-pushouts -open import synthetic-homotopy-theory.pushouts open import synthetic-homotopy-theory.suspension-structures -open import synthetic-homotopy-theory.universal-property-pushouts -open import synthetic-homotopy-theory.universal-property-suspensions ```
diff --git a/src/synthetic-homotopy-theory/descent-circle-dependent-pair-types.lagda.md b/src/synthetic-homotopy-theory/descent-circle-dependent-pair-types.lagda.md index e0cc330f78..412d79e16b 100644 --- a/src/synthetic-homotopy-theory/descent-circle-dependent-pair-types.lagda.md +++ b/src/synthetic-homotopy-theory/descent-circle-dependent-pair-types.lagda.md @@ -9,7 +9,6 @@ module synthetic-homotopy-theory.descent-circle-dependent-pair-types where ```agda open import foundation.dependent-pair-types open import foundation.equality-dependent-pair-types -open import foundation.equivalences open import foundation.functoriality-dependent-pair-types open import foundation.identity-types open import foundation.universe-levels diff --git a/src/synthetic-homotopy-theory/pullback-property-pushouts.lagda.md b/src/synthetic-homotopy-theory/pullback-property-pushouts.lagda.md index 41ccd22018..7b328268d2 100644 --- a/src/synthetic-homotopy-theory/pullback-property-pushouts.lagda.md +++ b/src/synthetic-homotopy-theory/pullback-property-pushouts.lagda.md @@ -11,7 +11,6 @@ open import foundation.commuting-squares-of-maps open import foundation.cones-over-cospans open import foundation.dependent-pair-types open import foundation.function-types -open import foundation.functoriality-function-types open import foundation.pullbacks open import foundation.universe-levels diff --git a/src/synthetic-homotopy-theory/suspension-structures.lagda.md b/src/synthetic-homotopy-theory/suspension-structures.lagda.md index dd68fe1f4c..3e73a38685 100644 --- a/src/synthetic-homotopy-theory/suspension-structures.lagda.md +++ b/src/synthetic-homotopy-theory/suspension-structures.lagda.md @@ -7,15 +7,10 @@ module synthetic-homotopy-theory.suspension-structures where
Imports ```agda -open import foundation.action-on-identifications-dependent-functions open import foundation.action-on-identifications-functions -open import foundation.commuting-squares-of-identifications -open import foundation.commuting-squares-of-maps open import foundation.constant-maps open import foundation.contractible-types -open import foundation.dependent-identifications open import foundation.dependent-pair-types -open import foundation.embeddings open import foundation.equivalences open import foundation.function-extensionality open import foundation.function-types @@ -25,22 +20,11 @@ open import foundation.identity-systems open import foundation.identity-types open import foundation.injective-maps open import foundation.structure-identity-principle -open import foundation.transport-along-identifications -open import foundation.type-arithmetic-dependent-pair-types open import foundation.unit-type open import foundation.universal-property-unit-type open import foundation.universe-levels -open import structured-types.pointed-equivalences -open import structured-types.pointed-maps -open import structured-types.pointed-types - open import synthetic-homotopy-theory.cocones-under-spans -open import synthetic-homotopy-theory.dependent-cocones-under-spans -open import synthetic-homotopy-theory.dependent-universal-property-pushouts -open import synthetic-homotopy-theory.loop-spaces -open import synthetic-homotopy-theory.pushouts -open import synthetic-homotopy-theory.universal-property-pushouts ```
diff --git a/src/synthetic-homotopy-theory/suspensions-of-pointed-types.lagda.md b/src/synthetic-homotopy-theory/suspensions-of-pointed-types.lagda.md index 66d7735858..b6959c312d 100644 --- a/src/synthetic-homotopy-theory/suspensions-of-pointed-types.lagda.md +++ b/src/synthetic-homotopy-theory/suspensions-of-pointed-types.lagda.md @@ -7,43 +7,16 @@ module synthetic-homotopy-theory.suspensions-of-pointed-types where
Imports ```agda -open import foundation.action-on-identifications-dependent-functions -open import foundation.action-on-identifications-functions -open import foundation.commuting-squares-of-identifications -open import foundation.commuting-squares-of-maps open import foundation.constant-maps -open import foundation.contractible-types -open import foundation.dependent-identifications open import foundation.dependent-pair-types -open import foundation.equivalences -open import foundation.function-extensionality -open import foundation.function-types -open import foundation.functoriality-dependent-pair-types -open import foundation.homotopies -open import foundation.identity-systems open import foundation.identity-types -open import foundation.structure-identity-principle -open import foundation.transport-along-identifications -open import foundation.type-arithmetic-dependent-pair-types -open import foundation.unit-type -open import foundation.universal-property-unit-type open import foundation.universe-levels -open import structured-types.pointed-equivalences -open import structured-types.pointed-maps open import structured-types.pointed-types -open import synthetic-homotopy-theory.cocones-under-spans -open import synthetic-homotopy-theory.dependent-cocones-under-spans -open import synthetic-homotopy-theory.dependent-suspension-structures -open import synthetic-homotopy-theory.dependent-universal-property-pushouts -open import synthetic-homotopy-theory.dependent-universal-property-suspensions open import synthetic-homotopy-theory.loop-spaces -open import synthetic-homotopy-theory.pushouts open import synthetic-homotopy-theory.suspension-structures open import synthetic-homotopy-theory.suspensions-of-types -open import synthetic-homotopy-theory.universal-property-pushouts -open import synthetic-homotopy-theory.universal-property-suspensions ```
diff --git a/src/synthetic-homotopy-theory/suspensions-of-types.lagda.md b/src/synthetic-homotopy-theory/suspensions-of-types.lagda.md index 517d08df40..1c37e70746 100644 --- a/src/synthetic-homotopy-theory/suspensions-of-types.lagda.md +++ b/src/synthetic-homotopy-theory/suspensions-of-types.lagda.md @@ -10,29 +10,21 @@ module synthetic-homotopy-theory.suspensions-of-types where open import foundation.action-on-identifications-dependent-functions open import foundation.action-on-identifications-functions open import foundation.commuting-squares-of-identifications -open import foundation.commuting-squares-of-maps open import foundation.constant-maps open import foundation.contractible-types -open import foundation.dependent-identifications open import foundation.dependent-pair-types open import foundation.equivalences -open import foundation.function-extensionality open import foundation.function-types open import foundation.functoriality-dependent-function-types open import foundation.functoriality-dependent-pair-types open import foundation.homotopies -open import foundation.identity-systems open import foundation.identity-types -open import foundation.structure-identity-principle open import foundation.transport-along-identifications -open import foundation.type-arithmetic-dependent-pair-types open import foundation.unit-type -open import foundation.universal-property-unit-type open import foundation.universe-levels open import synthetic-homotopy-theory.dependent-cocones-under-spans open import synthetic-homotopy-theory.dependent-suspension-structures -open import synthetic-homotopy-theory.dependent-universal-property-pushouts open import synthetic-homotopy-theory.dependent-universal-property-suspensions open import synthetic-homotopy-theory.pushouts open import synthetic-homotopy-theory.suspension-structures diff --git a/src/synthetic-homotopy-theory/universal-cover-circle.lagda.md b/src/synthetic-homotopy-theory/universal-cover-circle.lagda.md index 940f31faf7..9c3de244af 100644 --- a/src/synthetic-homotopy-theory/universal-cover-circle.lagda.md +++ b/src/synthetic-homotopy-theory/universal-cover-circle.lagda.md @@ -12,7 +12,6 @@ open import elementary-number-theory.universal-property-integers open import foundation.action-on-identifications-dependent-functions open import foundation.action-on-identifications-functions -open import foundation.cartesian-product-types open import foundation.commuting-squares-of-maps open import foundation.contractible-types open import foundation.dependent-identifications @@ -28,7 +27,6 @@ open import foundation.homotopies open import foundation.identity-types open import foundation.raising-universe-levels open import foundation.sets -open import foundation.structure-identity-principle open import foundation.transport-along-identifications open import foundation.truncated-types open import foundation.truncation-levels diff --git a/src/synthetic-homotopy-theory/universal-property-suspensions-of-pointed-types.lagda.md b/src/synthetic-homotopy-theory/universal-property-suspensions-of-pointed-types.lagda.md index aa892fc08a..38ab886c89 100644 --- a/src/synthetic-homotopy-theory/universal-property-suspensions-of-pointed-types.lagda.md +++ b/src/synthetic-homotopy-theory/universal-property-suspensions-of-pointed-types.lagda.md @@ -7,46 +7,23 @@ module synthetic-homotopy-theory.universal-property-suspensions-of-pointed-types
Imports ```agda -open import foundation.action-on-identifications-dependent-functions -open import foundation.action-on-identifications-functions -open import foundation.commuting-squares-of-identifications -open import foundation.commuting-squares-of-maps -open import foundation.constant-maps open import foundation.contractible-types -open import foundation.dependent-identifications open import foundation.dependent-pair-types open import foundation.equivalences -open import foundation.function-extensionality open import foundation.function-types open import foundation.functoriality-dependent-pair-types -open import foundation.homotopies -open import foundation.identity-systems open import foundation.identity-types -open import foundation.structure-identity-principle -open import foundation.transport-along-identifications open import foundation.type-arithmetic-dependent-pair-types -open import foundation.unit-type -open import foundation.universal-property-unit-type open import foundation.universe-levels open import structured-types.pointed-equivalences open import structured-types.pointed-maps open import structured-types.pointed-types -open import synthetic-homotopy-theory.cocones-under-spans -open import synthetic-homotopy-theory.conjugation-loops -open import synthetic-homotopy-theory.dependent-cocones-under-spans -open import synthetic-homotopy-theory.dependent-suspension-structures -open import synthetic-homotopy-theory.dependent-universal-property-pushouts -open import synthetic-homotopy-theory.dependent-universal-property-suspensions open import synthetic-homotopy-theory.functoriality-loop-spaces open import synthetic-homotopy-theory.loop-spaces -open import synthetic-homotopy-theory.pushouts -open import synthetic-homotopy-theory.suspension-structures open import synthetic-homotopy-theory.suspensions-of-pointed-types open import synthetic-homotopy-theory.suspensions-of-types -open import synthetic-homotopy-theory.universal-property-pushouts -open import synthetic-homotopy-theory.universal-property-suspensions ```
diff --git a/src/synthetic-homotopy-theory/universal-property-suspensions.lagda.md b/src/synthetic-homotopy-theory/universal-property-suspensions.lagda.md index a8a1066c3b..af2d5a2e74 100644 --- a/src/synthetic-homotopy-theory/universal-property-suspensions.lagda.md +++ b/src/synthetic-homotopy-theory/universal-property-suspensions.lagda.md @@ -7,34 +7,17 @@ module synthetic-homotopy-theory.universal-property-suspensions where
Imports ```agda -open import foundation.action-on-identifications-dependent-functions -open import foundation.action-on-identifications-functions -open import foundation.commuting-squares-of-identifications -open import foundation.commuting-squares-of-maps open import foundation.constant-maps -open import foundation.contractible-types -open import foundation.dependent-identifications open import foundation.dependent-pair-types open import foundation.equivalences -open import foundation.function-extensionality open import foundation.function-types -open import foundation.functoriality-dependent-pair-types open import foundation.homotopies -open import foundation.identity-systems open import foundation.identity-types -open import foundation.structure-identity-principle -open import foundation.transport-along-identifications -open import foundation.type-arithmetic-dependent-pair-types open import foundation.unit-type -open import foundation.universal-property-unit-type open import foundation.universe-levels open import foundation.whiskering-homotopies open import synthetic-homotopy-theory.cocones-under-spans -open import synthetic-homotopy-theory.dependent-cocones-under-spans -open import synthetic-homotopy-theory.dependent-suspension-structures -open import synthetic-homotopy-theory.dependent-universal-property-pushouts -open import synthetic-homotopy-theory.pushouts open import synthetic-homotopy-theory.suspension-structures open import synthetic-homotopy-theory.universal-property-pushouts ``` diff --git a/src/univalent-combinatorics/pigeonhole-principle.lagda.md b/src/univalent-combinatorics/pigeonhole-principle.lagda.md index 4324e51af9..0e822632fb 100644 --- a/src/univalent-combinatorics/pigeonhole-principle.lagda.md +++ b/src/univalent-combinatorics/pigeonhole-principle.lagda.md @@ -17,7 +17,6 @@ open import foundation.embeddings open import foundation.empty-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.negation From dfdd1af9ca9497e3112f72e386fbbe909a8c14be Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Tue, 12 Sep 2023 21:16:02 +0200 Subject: [PATCH 16/19] uniqueness of action on equivalences of functions --- .../action-on-equivalences-functions.lagda.md | 37 ++++++++++++------- ...ion-on-equivalences-type-families.lagda.md | 14 +++++-- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/src/foundation/action-on-equivalences-functions.lagda.md b/src/foundation/action-on-equivalences-functions.lagda.md index 438680b69f..04fabc9a59 100644 --- a/src/foundation/action-on-equivalences-functions.lagda.md +++ b/src/foundation/action-on-equivalences-functions.lagda.md @@ -8,6 +8,9 @@ module foundation.action-on-equivalences-functions where ```agda open import foundation.action-on-identifications-functions +open import foundation.contractible-types +open import foundation.dependent-pair-types +open import foundation.equivalence-induction open import foundation.equivalences open import foundation.univalence open import foundation.universe-levels @@ -35,24 +38,30 @@ luckily, these two notions coincide. ## Definition ```agda -action-equiv-function : - {l1 l2 : Level} {B : UU l2} (f : UU l1 → B) {X Y : UU l1} → - X ≃ Y → f X = f Y -action-equiv-function f {X} {Y} e = ap f (eq-equiv X Y e) +module _ + {l1 l2 : Level} {B : UU l2} (f : UU l1 → B) + where + + unique-action-equiv-function : + (X : UU l1) → + is-contr (Σ ((Y : UU l1) → X ≃ Y → f X = f Y) (λ h → h X id-equiv = refl)) + unique-action-equiv-function X = + is-contr-map-ev-id-equiv + ( λ Y e → f X = f Y) + ( refl) + + action-equiv-function : + {X Y : UU l1} → X ≃ Y → f X = f Y + action-equiv-function {X} {Y} e = ap f (eq-equiv X Y e) + + compute-action-equiv-function-id-equiv : + (X : UU l1) → action-equiv-function id-equiv = refl + compute-action-equiv-function-id-equiv X = + ap (ap f) (compute-eq-equiv-id-equiv X) ``` ## Properties -### The action on equivalences of any map preserves `id-equiv` - -```agda -compute-action-equiv-function-id-equiv : - {l1 l2 : Level} {B : UU l2} (f : UU l1 → B) (A : UU l1) → - (action-equiv-function f id-equiv) = refl -compute-action-equiv-function-id-equiv f A = - ap (ap f) (compute-eq-equiv-id-equiv A) -``` - ### The action on equivalences of a constant map is constant ```agda diff --git a/src/foundation/action-on-equivalences-type-families.lagda.md b/src/foundation/action-on-equivalences-type-families.lagda.md index e5f02ba0ab..2c4f802531 100644 --- a/src/foundation/action-on-equivalences-type-families.lagda.md +++ b/src/foundation/action-on-equivalences-type-families.lagda.md @@ -27,16 +27,16 @@ open import foundation-core.equivalences ## Ideas -Given a [subuniverse](foundation.subuniverses.md) `P`, any family of types `B` -indexed by types of `P` has an **action on equivalences** +Any family of types `B : 𝒰 → 𝒱` over a universe `𝒰` has an **action on +equivalences** ```text (A ≃ B) → P A ≃ P B ``` obtained by [equivalence induction](foundation.equivalence-induction.md). The -acion on equivalences of a type family `B` on a subuniverse `P` of `𝒰` is such -that `B id-equiv = id-equiv`, and fits in a +acion on equivalences of a type family `B` on a universe `𝒰` is uniquely +determined by the identification `B id-equiv = id-equiv`, and fits in a [commuting square](foundation.commuting-squares-of-maps.md) ```text @@ -49,6 +49,12 @@ that `B id-equiv = id-equiv`, and fits in a B ``` +Note that in general -- in particular in our general constructions below -- we +need the univalence axiom to construct the action on equivalences of a family of +types. However, for many specific type families that are defined in terms of the +basic type constructors, we can construct the action on equivalences directly +without invoking the univalence axiom. + ## Definitions ### The action on equivalences of a family of types over a universe From 4689d546ad6ae384745094dbb580fac81720b743 Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Tue, 12 Sep 2023 21:40:55 +0200 Subject: [PATCH 17/19] action on equivalences of functions out of subuniverses --- src/foundation.lagda.md | 1 + ...ces-functions-out-of-subuniverses.lagda.md | 76 +++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 src/foundation/action-on-equivalences-functions-out-of-subuniverses.lagda.md diff --git a/src/foundation.lagda.md b/src/foundation.lagda.md index dae79b2fc5..606923be30 100644 --- a/src/foundation.lagda.md +++ b/src/foundation.lagda.md @@ -11,6 +11,7 @@ open import foundation.0-maps public open import foundation.1-types public open import foundation.2-types public open import foundation.action-on-equivalences-functions public +open import foundation.action-on-equivalences-functions-out-of-subuniverses public open import foundation.action-on-equivalences-type-families public open import foundation.action-on-equivalences-type-families-over-subuniverses public open import foundation.action-on-identifications-binary-functions public diff --git a/src/foundation/action-on-equivalences-functions-out-of-subuniverses.lagda.md b/src/foundation/action-on-equivalences-functions-out-of-subuniverses.lagda.md new file mode 100644 index 0000000000..9044d8cba1 --- /dev/null +++ b/src/foundation/action-on-equivalences-functions-out-of-subuniverses.lagda.md @@ -0,0 +1,76 @@ +# The action on equivalences of functions out of subuniverses + +```agda +module foundation.action-on-equivalences-functions-out-of-subuniverses where +``` + +
Imports + +```agda +open import foundation.action-on-identifications-functions +open import foundation.contractible-types +open import foundation.dependent-pair-types +open import foundation.equivalence-induction +open import foundation.equivalences +open import foundation.function-types +open import foundation.identity-types +open import foundation.subuniverses +open import foundation.universe-levels +``` + +
+ +## Idea + +Consider a [subuniverse](foundation.subuniverses.md) `P` of `𝒰` and a map +`f : P → B` from the subuniverse `P` into some type `B`. Then `f` has an +**action on equivalences** + +```text + (X ≃ Y) → (f X = f Y) +``` + +which is uniquely determined by the +[identification](foundation-core.identity-types.md) +`action-equiv f id-equiv = refl`. The action on equivalences fits in a +[commuting square](foundation.commuting-squares-of-maps.md) of maps + +```text + ap f + (X = Y) ---------------> (f X = f Y) + | | + equiv-eq | | id + V V + (X ≃ Y) ---------------> (f X = f Y) + action-equiv f +``` + +## Definitions + +```agda +module _ + {l1 l2 l3 : Level} (P : subuniverse l1 l2) + {B : UU l3} (f : type-subuniverse P → B) + where + + unique-action-equiv-function-subuniverse : + (X : type-subuniverse P) → + is-contr + ( Σ ( (Y : type-subuniverse P) → equiv-subuniverse P X Y → f X = f Y) + ( λ h → h X id-equiv = refl)) + unique-action-equiv-function-subuniverse X = + is-contr-map-ev-id-equiv-subuniverse P X + ( λ Y e → f X = f Y) + ( refl) + + action-equiv-function-subuniverse : + (X Y : type-subuniverse P) → equiv-subuniverse P X Y → f X = f Y + action-equiv-function-subuniverse X Y = + ap f ∘ eq-equiv-subuniverse P + + compute-action-equiv-function-subuniverse-id-equiv : + (X : type-subuniverse P) → + action-equiv-function-subuniverse X X id-equiv = refl + compute-action-equiv-function-subuniverse-id-equiv X = + ap (ap f) (compute-eq-equiv-id-equiv-subuniverse P) +``` From 63c807b423c510109e243d89ab9d0caa555cea79 Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Tue, 12 Sep 2023 21:44:12 +0200 Subject: [PATCH 18/19] make uniqueness defintions abstract --- ...ces-functions-out-of-subuniverses.lagda.md | 19 ++++++++++--------- .../action-on-equivalences-functions.lagda.md | 16 +++++++++------- ...s-type-families-over-subuniverses.lagda.md | 12 +++++++----- ...ion-on-equivalences-type-families.lagda.md | 11 ++++++----- 4 files changed, 32 insertions(+), 26 deletions(-) diff --git a/src/foundation/action-on-equivalences-functions-out-of-subuniverses.lagda.md b/src/foundation/action-on-equivalences-functions-out-of-subuniverses.lagda.md index 9044d8cba1..e1ce00fc21 100644 --- a/src/foundation/action-on-equivalences-functions-out-of-subuniverses.lagda.md +++ b/src/foundation/action-on-equivalences-functions-out-of-subuniverses.lagda.md @@ -53,15 +53,16 @@ module _ {B : UU l3} (f : type-subuniverse P → B) where - unique-action-equiv-function-subuniverse : - (X : type-subuniverse P) → - is-contr - ( Σ ( (Y : type-subuniverse P) → equiv-subuniverse P X Y → f X = f Y) - ( λ h → h X id-equiv = refl)) - unique-action-equiv-function-subuniverse X = - is-contr-map-ev-id-equiv-subuniverse P X - ( λ Y e → f X = f Y) - ( refl) + abstract + unique-action-equiv-function-subuniverse : + (X : type-subuniverse P) → + is-contr + ( Σ ( (Y : type-subuniverse P) → equiv-subuniverse P X Y → f X = f Y) + ( λ h → h X id-equiv = refl)) + unique-action-equiv-function-subuniverse X = + is-contr-map-ev-id-equiv-subuniverse P X + ( λ Y e → f X = f Y) + ( refl) action-equiv-function-subuniverse : (X Y : type-subuniverse P) → equiv-subuniverse P X Y → f X = f Y diff --git a/src/foundation/action-on-equivalences-functions.lagda.md b/src/foundation/action-on-equivalences-functions.lagda.md index 04fabc9a59..704c34b224 100644 --- a/src/foundation/action-on-equivalences-functions.lagda.md +++ b/src/foundation/action-on-equivalences-functions.lagda.md @@ -42,13 +42,15 @@ module _ {l1 l2 : Level} {B : UU l2} (f : UU l1 → B) where - unique-action-equiv-function : - (X : UU l1) → - is-contr (Σ ((Y : UU l1) → X ≃ Y → f X = f Y) (λ h → h X id-equiv = refl)) - unique-action-equiv-function X = - is-contr-map-ev-id-equiv - ( λ Y e → f X = f Y) - ( refl) + abstract + unique-action-equiv-function : + (X : UU l1) → + is-contr + ( Σ ((Y : UU l1) → X ≃ Y → f X = f Y) (λ h → h X id-equiv = refl)) + unique-action-equiv-function X = + is-contr-map-ev-id-equiv + ( λ Y e → f X = f Y) + ( refl) action-equiv-function : {X Y : UU l1} → X ≃ Y → f X = f Y diff --git a/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md b/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md index 38a9588e77..8d9235e946 100644 --- a/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md +++ b/src/foundation/action-on-equivalences-type-families-over-subuniverses.lagda.md @@ -41,11 +41,13 @@ module _ ( P : subuniverse l1 l2) (B : type-subuniverse P → UU l3) where - unique-action-equiv-family-over-subuniverse : - (X : type-subuniverse P) → - is-contr (fiber (ev-id-equiv-subuniverse P X {λ Y e → B X ≃ B Y}) id-equiv) - unique-action-equiv-family-over-subuniverse X = - is-contr-map-ev-id-equiv-subuniverse P X (λ Y e → B X ≃ B Y) id-equiv + abstract + unique-action-equiv-family-over-subuniverse : + (X : type-subuniverse P) → + is-contr + ( fiber (ev-id-equiv-subuniverse P X {λ Y e → B X ≃ B Y}) id-equiv) + unique-action-equiv-family-over-subuniverse X = + is-contr-map-ev-id-equiv-subuniverse P X (λ Y e → B X ≃ B Y) id-equiv action-equiv-family-over-subuniverse : (X Y : type-subuniverse P) → pr1 X ≃ pr1 Y → B X ≃ B Y diff --git a/src/foundation/action-on-equivalences-type-families.lagda.md b/src/foundation/action-on-equivalences-type-families.lagda.md index 2c4f802531..2fa7aff0f7 100644 --- a/src/foundation/action-on-equivalences-type-families.lagda.md +++ b/src/foundation/action-on-equivalences-type-families.lagda.md @@ -64,11 +64,12 @@ module _ {l1 l2 : Level} (B : UU l1 → UU l2) where - unique-action-equiv-family : - {X : UU l1} → - is-contr (fiber (ev-id-equiv (λ Y e → B X ≃ B Y)) id-equiv) - unique-action-equiv-family = - is-contr-map-ev-id-equiv (λ Y e → B _ ≃ B Y) id-equiv + abstract + unique-action-equiv-family : + {X : UU l1} → + is-contr (fiber (ev-id-equiv (λ Y e → B X ≃ B Y)) id-equiv) + unique-action-equiv-family = + is-contr-map-ev-id-equiv (λ Y e → B _ ≃ B Y) id-equiv action-equiv-family : {X Y : UU l1} → (X ≃ Y) → B X ≃ B Y From 4bf206b97eb09b4c2bc184ade0b2503106729750 Mon Sep 17 00:00:00 2001 From: Egbert Rijke Date: Tue, 12 Sep 2023 21:52:09 +0200 Subject: [PATCH 19/19] capitalization --- .../symmetric-binary-relations.lagda.md | 128 +++++++++--------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/src/foundation/symmetric-binary-relations.lagda.md b/src/foundation/symmetric-binary-relations.lagda.md index 2af23d658b..c9688b1722 100644 --- a/src/foundation/symmetric-binary-relations.lagda.md +++ b/src/foundation/symmetric-binary-relations.lagda.md @@ -49,105 +49,105 @@ universe `𝒰`. ### Symmetric binary relations ```agda -symmetric-binary-relation : +Symmetric-Relation : {l1 : Level} (l2 : Level) → UU l1 → UU (l1 ⊔ lsuc l2) -symmetric-binary-relation l2 A = symmetric-operation A (UU l2) +Symmetric-Relation l2 A = symmetric-operation A (UU l2) ``` ### Action on symmetries of symmetric binary relations ```agda module _ - {l1 l2 : Level} {A : UU l1} (R : symmetric-binary-relation l2 A) + {l1 l2 : Level} {A : UU l1} (R : Symmetric-Relation l2 A) where abstract - equiv-tr-symmetric-binary-relation : + equiv-tr-Symmetric-Relation : (p q : unordered-pair A) → Eq-unordered-pair p q → R p ≃ R q - equiv-tr-symmetric-binary-relation p = + equiv-tr-Symmetric-Relation p = ind-Eq-unordered-pair p (λ q e → R p ≃ R q) id-equiv - compute-refl-equiv-tr-symmetric-binary-relation : + compute-refl-equiv-tr-Symmetric-Relation : (p : unordered-pair A) → - equiv-tr-symmetric-binary-relation p p (refl-Eq-unordered-pair p) = + equiv-tr-Symmetric-Relation p p (refl-Eq-unordered-pair p) = id-equiv - compute-refl-equiv-tr-symmetric-binary-relation p = + compute-refl-equiv-tr-Symmetric-Relation p = compute-refl-ind-Eq-unordered-pair p (λ q e → R p ≃ R q) id-equiv - htpy-compute-refl-equiv-tr-symmetric-binary-relation : + htpy-compute-refl-equiv-tr-Symmetric-Relation : (p : unordered-pair A) → htpy-equiv - ( equiv-tr-symmetric-binary-relation p p (refl-Eq-unordered-pair p)) + ( equiv-tr-Symmetric-Relation p p (refl-Eq-unordered-pair p)) ( id-equiv) - htpy-compute-refl-equiv-tr-symmetric-binary-relation p = - htpy-eq-equiv (compute-refl-equiv-tr-symmetric-binary-relation p) + htpy-compute-refl-equiv-tr-Symmetric-Relation p = + htpy-eq-equiv (compute-refl-equiv-tr-Symmetric-Relation p) abstract - tr-symmetric-binary-relation : + tr-Symmetric-Relation : (p q : unordered-pair A) → Eq-unordered-pair p q → R p → R q - tr-symmetric-binary-relation p q e = - map-equiv (equiv-tr-symmetric-binary-relation p q e) + tr-Symmetric-Relation p q e = + map-equiv (equiv-tr-Symmetric-Relation p q e) - tr-inv-symmetric-binary-relation : + tr-inv-Symmetric-Relation : (p q : unordered-pair A) → Eq-unordered-pair p q → R q → R p - tr-inv-symmetric-binary-relation p q e = - map-inv-equiv (equiv-tr-symmetric-binary-relation p q e) + tr-inv-Symmetric-Relation p q e = + map-inv-equiv (equiv-tr-Symmetric-Relation p q e) - is-section-tr-inv-symmetric-binary-relation : + is-section-tr-inv-Symmetric-Relation : (p q : unordered-pair A) (e : Eq-unordered-pair p q) → - tr-symmetric-binary-relation p q e ∘ - tr-inv-symmetric-binary-relation p q e ~ + tr-Symmetric-Relation p q e ∘ + tr-inv-Symmetric-Relation p q e ~ id - is-section-tr-inv-symmetric-binary-relation p q e = - is-section-map-inv-equiv (equiv-tr-symmetric-binary-relation p q e) + is-section-tr-inv-Symmetric-Relation p q e = + is-section-map-inv-equiv (equiv-tr-Symmetric-Relation p q e) - is-retraction-tr-inv-symmetric-binary-relation : + is-retraction-tr-inv-Symmetric-Relation : (p q : unordered-pair A) (e : Eq-unordered-pair p q) → - tr-inv-symmetric-binary-relation p q e ∘ - tr-symmetric-binary-relation p q e ~ + tr-inv-Symmetric-Relation p q e ∘ + tr-Symmetric-Relation p q e ~ id - is-retraction-tr-inv-symmetric-binary-relation p q e = - is-retraction-map-inv-equiv (equiv-tr-symmetric-binary-relation p q e) + is-retraction-tr-inv-Symmetric-Relation p q e = + is-retraction-map-inv-equiv (equiv-tr-Symmetric-Relation p q e) - compute-refl-tr-symmetric-binary-relation : + compute-refl-tr-Symmetric-Relation : (p : unordered-pair A) → - tr-symmetric-binary-relation p p (refl-Eq-unordered-pair p) = id - compute-refl-tr-symmetric-binary-relation p = - ap map-equiv (compute-refl-equiv-tr-symmetric-binary-relation p) + tr-Symmetric-Relation p p (refl-Eq-unordered-pair p) = id + compute-refl-tr-Symmetric-Relation p = + ap map-equiv (compute-refl-equiv-tr-Symmetric-Relation p) - htpy-compute-refl-tr-symmetric-binary-relation : + htpy-compute-refl-tr-Symmetric-Relation : (p : unordered-pair A) → - tr-symmetric-binary-relation p p (refl-Eq-unordered-pair p) ~ id - htpy-compute-refl-tr-symmetric-binary-relation p = - htpy-eq (compute-refl-tr-symmetric-binary-relation p) + tr-Symmetric-Relation p p (refl-Eq-unordered-pair p) ~ id + htpy-compute-refl-tr-Symmetric-Relation p = + htpy-eq (compute-refl-tr-Symmetric-Relation p) ``` ### The underlying binary relation of a symmetric binary relation ```agda module _ - {l1 l2 : Level} {A : UU l1} (R : symmetric-binary-relation l2 A) + {l1 l2 : Level} {A : UU l1} (R : Symmetric-Relation l2 A) where - relation-symmetric-binary-relation : Relation l2 A - relation-symmetric-binary-relation x y = R (standard-unordered-pair x y) + relation-Symmetric-Relation : Relation l2 A + relation-Symmetric-Relation x y = R (standard-unordered-pair x y) - equiv-symmetric-relation-symmetric-binary-relation : + equiv-symmetric-relation-Symmetric-Relation : {x y : A} → - relation-symmetric-binary-relation x y ≃ - relation-symmetric-binary-relation y x - equiv-symmetric-relation-symmetric-binary-relation {x} {y} = - equiv-tr-symmetric-binary-relation R + relation-Symmetric-Relation x y ≃ + relation-Symmetric-Relation y x + equiv-symmetric-relation-Symmetric-Relation {x} {y} = + equiv-tr-Symmetric-Relation R ( standard-unordered-pair x y) ( standard-unordered-pair y x) ( swap-standard-unordered-pair x y) - symmetric-relation-symmetric-binary-relation : + symmetric-relation-Symmetric-Relation : {x y : A} → - relation-symmetric-binary-relation x y → - relation-symmetric-binary-relation y x - symmetric-relation-symmetric-binary-relation = - map-equiv equiv-symmetric-relation-symmetric-binary-relation + relation-Symmetric-Relation x y → + relation-Symmetric-Relation y x + symmetric-relation-Symmetric-Relation = + map-equiv equiv-symmetric-relation-Symmetric-Relation ``` ### The forgetful functor from binary relations to symmetric binary relations @@ -157,17 +157,17 @@ module _ {l1 l2 : Level} {A : UU l1} (R : Relation l2 A) where - symmetric-binary-relation-Relation : symmetric-binary-relation l2 A - symmetric-binary-relation-Relation p = + symmetric-relation-Relation : Symmetric-Relation l2 A + symmetric-relation-Relation p = Σ ( type-unordered-pair p) ( λ i → R (element-unordered-pair p i) (other-element-unordered-pair p i)) - unit-symmetric-binary-relation-Relation : + unit-symmetric-relation-Relation : (x y : A) → R x y → - relation-symmetric-binary-relation symmetric-binary-relation-Relation x y - pr1 (unit-symmetric-binary-relation-Relation x y r) = zero-Fin 1 - pr2 (unit-symmetric-binary-relation-Relation x y r) = + relation-Symmetric-Relation symmetric-relation-Relation x y + pr1 (unit-symmetric-relation-Relation x y r) = zero-Fin 1 + pr2 (unit-symmetric-relation-Relation x y r) = tr ( R x) ( inv (compute-other-element-standard-unordered-pair x y (zero-Fin 1))) @@ -181,18 +181,18 @@ module _ {l1 l2 l3 : Level} {A : UU l1} where - hom-symmetric-binary-relation : - symmetric-binary-relation l2 A → symmetric-binary-relation l3 A → + hom-Symmetric-Relation : + Symmetric-Relation l2 A → Symmetric-Relation l3 A → UU (lsuc lzero ⊔ l1 ⊔ l2 ⊔ l3) - hom-symmetric-binary-relation R S = + hom-Symmetric-Relation R S = (p : unordered-pair A) → R p → S p - hom-relation-hom-symmetric-binary-relation : - (R : symmetric-binary-relation l2 A) (S : symmetric-binary-relation l3 A) → - hom-symmetric-binary-relation R S → + hom-relation-hom-Symmetric-Relation : + (R : Symmetric-Relation l2 A) (S : Symmetric-Relation l3 A) → + hom-Symmetric-Relation R S → hom-Relation - ( relation-symmetric-binary-relation R) - ( relation-symmetric-binary-relation S) - hom-relation-hom-symmetric-binary-relation R S f x y = + ( relation-Symmetric-Relation R) + ( relation-Symmetric-Relation S) + hom-relation-hom-Symmetric-Relation R S f x y = f (standard-unordered-pair x y) ```