diff --git a/src/category-theory/adjunctions-large-precategories.lagda.md b/src/category-theory/adjunctions-large-precategories.lagda.md
index 0f3ddc0d82..d98a4ff347 100644
--- a/src/category-theory/adjunctions-large-precategories.lagda.md
+++ b/src/category-theory/adjunctions-large-precategories.lagda.md
@@ -160,7 +160,7 @@ module _
( map-inv-equiv-is-adjoint-pair-Large-Precategory H X2 Y2)
naturality-inv-equiv-is-adjoint-pair-Large-Precategory
H {X1 = X1} {X2} {Y1} {Y2} f g =
- coherence-square-maps-inv-equiv-horizontal
+ horizontal-inv-equiv-coherence-square-maps
( equiv-is-adjoint-pair-Large-Precategory H X1 Y1)
( λ h →
comp-hom-Large-Precategory D
diff --git a/src/finite-group-theory/delooping-sign-homomorphism.lagda.md b/src/finite-group-theory/delooping-sign-homomorphism.lagda.md
index dbcbe3991e..cd43fb75bf 100644
--- a/src/finite-group-theory/delooping-sign-homomorphism.lagda.md
+++ b/src/finite-group-theory/delooping-sign-homomorphism.lagda.md
@@ -85,7 +85,7 @@ open import univalent-combinatorics.standard-finite-types
## Ideas
The delooping of a group homomorphism `f : G → H` is a pointed map
-`Bf : BG → BH` equiped with an homotopy witnessing that the following square
+`Bf : BG → BH` equiped with a homotopy witnessing that the following square
commutes :
```text
diff --git a/src/foundation-core.lagda.md b/src/foundation-core.lagda.md
index 5244d7271e..7f25f3e438 100644
--- a/src/foundation-core.lagda.md
+++ b/src/foundation-core.lagda.md
@@ -10,6 +10,7 @@ open import foundation-core.cartesian-product-types public
open import foundation-core.coherently-invertible-maps public
open import foundation-core.commuting-prisms-of-maps public
open import foundation-core.commuting-squares-of-homotopies public
+open import foundation-core.commuting-squares-of-identifications public
open import foundation-core.commuting-squares-of-maps public
open import foundation-core.commuting-triangles-of-maps public
open import foundation-core.constant-maps public
@@ -59,4 +60,6 @@ open import foundation-core.type-theoretic-principle-of-choice public
open import foundation-core.univalence public
open import foundation-core.universal-property-pullbacks public
open import foundation-core.universal-property-truncation public
+open import foundation-core.whiskering-homotopies-concatenation public
+open import foundation-core.whiskering-identifications-concatenation public
```
diff --git a/src/foundation-core/coherently-invertible-maps.lagda.md b/src/foundation-core/coherently-invertible-maps.lagda.md
index 177ec4b883..596c722080 100644
--- a/src/foundation-core/coherently-invertible-maps.lagda.md
+++ b/src/foundation-core/coherently-invertible-maps.lagda.md
@@ -7,49 +7,104 @@ module foundation-core.coherently-invertible-maps where
Imports
```agda
+open import foundation.action-on-identifications-binary-functions
open import foundation.action-on-identifications-functions
open import foundation.dependent-pair-types
+open import foundation.homotopy-algebra
open import foundation.universe-levels
+open import foundation.whiskering-higher-homotopies-composition
open import foundation.whiskering-homotopies-composition
+open import foundation-core.commuting-squares-of-homotopies
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
+open import foundation-core.whiskering-homotopies-concatenation
```
## Idea
-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.
+A [(two-sided) 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) ` S : f ∘ g ~ id` and
+`R : g ∘ f ~ id`. Such data, however is [structure](foundation.structure.md) on
+the map `f`, and not generally a [property](foundation-core.propositions.md).
+One way to make the type of inverses into a property is by adding a single
+coherence condition between the homotopies of the inverse, asking that the
+following diagram commmutes
+
+```text
+ S ·r f
+ --------->
+ f ∘ g ∘ f f.
+ --------->
+ f ·l R
+```
+
+We call such data a
+{{#concept "coherently invertible map" Agda=coherently-invertible-map}}. I.e., a
+coherently invertible map `f : A → B` is a map equipped with a two-sided inverse
+and this additional coherence.
+
+There is also the alternative coherence condition we could add
+
+```text
+ R ·r g
+ --------->
+ g ∘ f ∘ g g.
+ --------->
+ g ·l S
+```
+
+We will colloquially refer to invertible maps equipped with this coherence for
+_transpose coherently invertible maps_.
+
+**Note.** Coherently invertible maps are referred to as
+{{#concept "half adjoint equivalences"}} in _Homotopy Type Theory – Univalent
+Foundations of Mathematics_.
+
+On this page we will prove that every two-sided inverse `g` of `f` can be
+promoted to a coherent two-sided inverse. Thus, for most properties of
+coherently invertible maps, it suffices to consider the data of a two-sided
+inverse. However, this coherence construction requires us to replace the section
+homotopy (or retraction homotopy). For this reason we also give direct
+constructions showing
+
+1. The identity map is coherently invertible.
+2. The composite of two coherently invertible maps is coherently invertible.
+3. The inverse of a coherently invertible map is coherently invertible.
+4. Every map homotopic to a coherently invertible map is coherently invertible.
+5. The 3-for-2 property of coherently invertible maps.
+
+Each of these constructions appropriately preserve the data of the underlying
+two-sided inverse.
## Definition
+### The predicate of being a coherently invertible map
+
```agda
module _
{l1 l2 : Level} {A : UU l1} {B : UU l2}
where
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)
+ (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
is-coherently-invertible : (A → B) → UU (l1 ⊔ l2)
is-coherently-invertible f =
Σ ( B → A)
- ( λ g → Σ ((f ∘ g) ~ id)
- ( λ G → Σ ((g ∘ f) ~ id)
- ( λ H → coherence-is-coherently-invertible f g G H)))
+ ( λ g →
+ Σ ( f ∘ g ~ id)
+ ( λ G →
+ Σ ( g ∘ f ~ id)
+ ( λ H → coherence-is-coherently-invertible f g G H)))
module _
{l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B}
@@ -59,118 +114,1285 @@ module _
map-inv-is-coherently-invertible : B → A
map-inv-is-coherently-invertible = pr1 H
- is-retraction-is-coherently-invertible :
- (f ∘ map-inv-is-coherently-invertible) ~ id
- is-retraction-is-coherently-invertible = pr1 (pr2 H)
+ is-section-map-inv-is-coherently-invertible :
+ is-section f map-inv-is-coherently-invertible
+ is-section-map-inv-is-coherently-invertible = pr1 (pr2 H)
- is-section-is-coherently-invertible :
- (map-inv-is-coherently-invertible ∘ f) ~ id
- is-section-is-coherently-invertible = pr1 (pr2 (pr2 H))
+ is-retraction-map-inv-is-coherently-invertible :
+ is-retraction f map-inv-is-coherently-invertible
+ is-retraction-map-inv-is-coherently-invertible = pr1 (pr2 (pr2 H))
coh-is-coherently-invertible :
coherence-is-coherently-invertible f
( map-inv-is-coherently-invertible)
- ( is-retraction-is-coherently-invertible)
- ( is-section-is-coherently-invertible)
+ ( is-section-map-inv-is-coherently-invertible)
+ ( is-retraction-map-inv-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
+ is-section-map-inv-is-coherently-invertible
pr2 (pr2 is-invertible-is-coherently-invertible) =
- is-section-is-coherently-invertible
+ is-retraction-map-inv-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
+ pr1 section-is-coherently-invertible =
+ map-inv-is-coherently-invertible
+ pr2 section-is-coherently-invertible =
+ is-section-map-inv-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
+ pr1 retraction-is-coherently-invertible =
+ map-inv-is-coherently-invertible
+ pr2 retraction-is-coherently-invertible =
+ is-retraction-map-inv-is-coherently-invertible
+```
+
+We will show that `is-coherently-invertible` is a proposition in
+[`foundation.coherently-invertible-maps`](foundation.coherently-invertible-maps.md).
+
+### The type of coherently invertible maps
+
+```agda
+coherently-invertible-map : {l1 l2 : Level} → UU l1 → UU l2 → UU (l1 ⊔ l2)
+coherently-invertible-map A B = Σ (A → B) (is-coherently-invertible)
+
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : coherently-invertible-map A B)
+ where
+
+ map-coherently-invertible-map : A → B
+ map-coherently-invertible-map = pr1 e
+
+ is-coherently-invertible-map-coherently-invertible-map :
+ is-coherently-invertible map-coherently-invertible-map
+ is-coherently-invertible-map-coherently-invertible-map = pr2 e
+
+ map-inv-coherently-invertible-map : B → A
+ map-inv-coherently-invertible-map =
+ map-inv-is-coherently-invertible
+ ( is-coherently-invertible-map-coherently-invertible-map)
+
+ is-section-map-inv-coherently-invertible-map :
+ map-coherently-invertible-map ∘ map-inv-coherently-invertible-map ~ id
+ is-section-map-inv-coherently-invertible-map =
+ is-section-map-inv-is-coherently-invertible
+ ( is-coherently-invertible-map-coherently-invertible-map)
+
+ is-retraction-map-inv-coherently-invertible-map :
+ map-inv-coherently-invertible-map ∘ map-coherently-invertible-map ~ id
+ is-retraction-map-inv-coherently-invertible-map =
+ is-retraction-map-inv-is-coherently-invertible
+ ( is-coherently-invertible-map-coherently-invertible-map)
+
+ coh-coherently-invertible-map :
+ coherence-is-coherently-invertible
+ ( map-coherently-invertible-map)
+ ( map-inv-coherently-invertible-map)
+ ( is-section-map-inv-coherently-invertible-map)
+ ( is-retraction-map-inv-coherently-invertible-map)
+ coh-coherently-invertible-map =
+ coh-is-coherently-invertible
+ ( is-coherently-invertible-map-coherently-invertible-map)
+
+ section-coherently-invertible-map :
+ section map-coherently-invertible-map
+ section-coherently-invertible-map =
+ section-is-coherently-invertible
+ ( is-coherently-invertible-map-coherently-invertible-map)
+
+ retraction-coherently-invertible-map :
+ retraction map-coherently-invertible-map
+ retraction-coherently-invertible-map =
+ retraction-is-coherently-invertible
+ ( is-coherently-invertible-map-coherently-invertible-map)
+
+ is-invertible-coherently-invertible-map :
+ is-invertible map-coherently-invertible-map
+ is-invertible-coherently-invertible-map =
+ is-invertible-is-coherently-invertible
+ ( is-coherently-invertible-map-coherently-invertible-map)
+
+ invertible-map-coherently-invertible-map : invertible-map A B
+ pr1 invertible-map-coherently-invertible-map =
+ map-coherently-invertible-map
+ pr2 invertible-map-coherently-invertible-map =
+ is-invertible-coherently-invertible-map
+```
+
+### The predicate of being a transpose coherently invertible map
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ where
+
+ coherence-is-transpose-coherently-invertible :
+ (f : A → B) (g : B → A) (G : f ∘ g ~ id) (H : g ∘ f ~ id) → UU (l1 ⊔ l2)
+ coherence-is-transpose-coherently-invertible f g G H = H ·r g ~ g ·l G
+
+ is-transpose-coherently-invertible : (A → B) → UU (l1 ⊔ l2)
+ is-transpose-coherently-invertible f =
+ Σ ( B → A)
+ ( λ g →
+ Σ ( f ∘ g ~ id)
+ ( λ G →
+ Σ ( g ∘ f ~ id)
+ ( λ H → coherence-is-transpose-coherently-invertible f g G H)))
+
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B}
+ (H : is-transpose-coherently-invertible f)
+ where
+
+ map-inv-is-transpose-coherently-invertible : B → A
+ map-inv-is-transpose-coherently-invertible = pr1 H
+
+ is-section-map-inv-is-transpose-coherently-invertible :
+ f ∘ map-inv-is-transpose-coherently-invertible ~ id
+ is-section-map-inv-is-transpose-coherently-invertible = pr1 (pr2 H)
+
+ is-retraction-map-inv-is-transpose-coherently-invertible :
+ map-inv-is-transpose-coherently-invertible ∘ f ~ id
+ is-retraction-map-inv-is-transpose-coherently-invertible = pr1 (pr2 (pr2 H))
+
+ coh-is-transpose-coherently-invertible :
+ coherence-is-transpose-coherently-invertible f
+ ( map-inv-is-transpose-coherently-invertible)
+ ( is-section-map-inv-is-transpose-coherently-invertible)
+ ( is-retraction-map-inv-is-transpose-coherently-invertible)
+ coh-is-transpose-coherently-invertible = pr2 (pr2 (pr2 H))
+
+ is-invertible-is-transpose-coherently-invertible : is-invertible f
+ pr1 is-invertible-is-transpose-coherently-invertible =
+ map-inv-is-transpose-coherently-invertible
+ pr1 (pr2 is-invertible-is-transpose-coherently-invertible) =
+ is-section-map-inv-is-transpose-coherently-invertible
+ pr2 (pr2 is-invertible-is-transpose-coherently-invertible) =
+ is-retraction-map-inv-is-transpose-coherently-invertible
+
+ section-is-transpose-coherently-invertible : section f
+ pr1 section-is-transpose-coherently-invertible =
+ map-inv-is-transpose-coherently-invertible
+ pr2 section-is-transpose-coherently-invertible =
+ is-section-map-inv-is-transpose-coherently-invertible
+
+ retraction-is-transpose-coherently-invertible : retraction f
+ pr1 retraction-is-transpose-coherently-invertible =
+ map-inv-is-transpose-coherently-invertible
+ pr2 retraction-is-transpose-coherently-invertible =
+ is-retraction-map-inv-is-transpose-coherently-invertible
+```
+
+We will show that `is-transpose-coherently-invertible` is a proposition in
+[`foundation.coherently-invertible-maps`](foundation.coherently-invertible-maps.md).
+
+### The type of transpose coherently invertible maps
+
+```agda
+transpose-coherently-invertible-map :
+ {l1 l2 : Level} → UU l1 → UU l2 → UU (l1 ⊔ l2)
+transpose-coherently-invertible-map A B =
+ Σ (A → B) (is-transpose-coherently-invertible)
+
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ (e : transpose-coherently-invertible-map A B)
+ where
+
+ map-transpose-coherently-invertible-map : A → B
+ map-transpose-coherently-invertible-map = pr1 e
+
+ is-transpose-coherently-invertible-map-transpose-coherently-invertible-map :
+ is-transpose-coherently-invertible map-transpose-coherently-invertible-map
+ is-transpose-coherently-invertible-map-transpose-coherently-invertible-map =
+ pr2 e
+
+ map-inv-transpose-coherently-invertible-map : B → A
+ map-inv-transpose-coherently-invertible-map =
+ map-inv-is-transpose-coherently-invertible
+ ( is-transpose-coherently-invertible-map-transpose-coherently-invertible-map)
+
+ is-section-map-inv-transpose-coherently-invertible-map :
+ ( map-transpose-coherently-invertible-map ∘
+ map-inv-transpose-coherently-invertible-map) ~
+ ( id)
+ is-section-map-inv-transpose-coherently-invertible-map =
+ is-section-map-inv-is-transpose-coherently-invertible
+ ( is-transpose-coherently-invertible-map-transpose-coherently-invertible-map)
+
+ is-retraction-map-inv-transpose-coherently-invertible-map :
+ ( map-inv-transpose-coherently-invertible-map ∘
+ map-transpose-coherently-invertible-map) ~
+ ( id)
+ is-retraction-map-inv-transpose-coherently-invertible-map =
+ is-retraction-map-inv-is-transpose-coherently-invertible
+ ( is-transpose-coherently-invertible-map-transpose-coherently-invertible-map)
+
+ coh-transpose-coherently-invertible-map :
+ coherence-is-transpose-coherently-invertible
+ ( map-transpose-coherently-invertible-map)
+ ( map-inv-transpose-coherently-invertible-map)
+ ( is-section-map-inv-transpose-coherently-invertible-map)
+ ( is-retraction-map-inv-transpose-coherently-invertible-map)
+ coh-transpose-coherently-invertible-map =
+ coh-is-transpose-coherently-invertible
+ ( is-transpose-coherently-invertible-map-transpose-coherently-invertible-map)
+
+ section-transpose-coherently-invertible-map :
+ section map-transpose-coherently-invertible-map
+ section-transpose-coherently-invertible-map =
+ section-is-transpose-coherently-invertible
+ ( is-transpose-coherently-invertible-map-transpose-coherently-invertible-map)
+
+ retraction-transpose-coherently-invertible-map :
+ retraction map-transpose-coherently-invertible-map
+ retraction-transpose-coherently-invertible-map =
+ retraction-is-transpose-coherently-invertible
+ ( is-transpose-coherently-invertible-map-transpose-coherently-invertible-map)
+
+ is-invertible-transpose-coherently-invertible-map :
+ is-invertible map-transpose-coherently-invertible-map
+ is-invertible-transpose-coherently-invertible-map =
+ is-invertible-is-transpose-coherently-invertible
+ ( is-transpose-coherently-invertible-map-transpose-coherently-invertible-map)
+
+ invertible-map-transpose-coherently-invertible-map : invertible-map A B
+ pr1 invertible-map-transpose-coherently-invertible-map =
+ map-transpose-coherently-invertible-map
+ pr2 invertible-map-transpose-coherently-invertible-map =
+ is-invertible-transpose-coherently-invertible-map
+```
+
+### Invertible maps that are coherent are coherently invertible maps
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B}
+ (H : is-invertible f)
+ where
+
+ coherence-is-invertible : UU (l1 ⊔ l2)
+ coherence-is-invertible =
+ coherence-is-coherently-invertible
+ ( f)
+ ( map-inv-is-invertible H)
+ ( is-section-map-inv-is-invertible H)
+ ( is-retraction-map-inv-is-invertible H)
+
+ transpose-coherence-is-invertible : UU (l1 ⊔ l2)
+ transpose-coherence-is-invertible =
+ coherence-is-transpose-coherently-invertible
+ ( f)
+ ( map-inv-is-invertible H)
+ ( is-section-map-inv-is-invertible H)
+ ( is-retraction-map-inv-is-invertible H)
+
+ is-coherently-invertible-coherence-is-invertible :
+ coherence-is-invertible → is-coherently-invertible f
+ is-coherently-invertible-coherence-is-invertible coh =
+ ( map-inv-is-invertible H ,
+ is-section-map-inv-is-invertible H ,
+ is-retraction-map-inv-is-invertible H ,
+ coh)
+
+ is-transpose-coherently-invertible-transpose-coherence-is-invertible :
+ transpose-coherence-is-invertible → is-transpose-coherently-invertible f
+ is-transpose-coherently-invertible-transpose-coherence-is-invertible coh =
+ ( map-inv-is-invertible H ,
+ is-section-map-inv-is-invertible H ,
+ is-retraction-map-inv-is-invertible H ,
+ coh)
```
## Properties
+### The inverse of a coherently invertible map is transpose coherently invertible and vice versa
+
+The inverse of a coherently invertible map is transpose coherently invertible.
+Conversely, the inverse of a transpose coherently invertible map is coherently
+invertible. Since these are defined by simply moving data around, they are
+strict inverses to one another.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ where
+
+ is-transpose-coherently-invertible-map-inv-is-coherently-invertible :
+ {f : A → B} (H : is-coherently-invertible f) →
+ is-transpose-coherently-invertible (map-inv-is-coherently-invertible H)
+ is-transpose-coherently-invertible-map-inv-is-coherently-invertible {f} H =
+ ( f ,
+ is-retraction-map-inv-is-coherently-invertible H ,
+ is-section-map-inv-is-coherently-invertible H ,
+ coh-is-coherently-invertible H)
+
+ is-coherently-invertible-map-inv-is-transpose-coherently-invertible :
+ {f : A → B} (H : is-transpose-coherently-invertible f) →
+ is-coherently-invertible (map-inv-is-transpose-coherently-invertible H)
+ is-coherently-invertible-map-inv-is-transpose-coherently-invertible {f} H =
+ ( f ,
+ is-retraction-map-inv-is-transpose-coherently-invertible H ,
+ is-section-map-inv-is-transpose-coherently-invertible H ,
+ coh-is-transpose-coherently-invertible H)
+
+ transpose-coherently-invertible-map-inv-coherently-invertible-map :
+ coherently-invertible-map A B → transpose-coherently-invertible-map B A
+ transpose-coherently-invertible-map-inv-coherently-invertible-map e =
+ ( map-inv-coherently-invertible-map e ,
+ is-transpose-coherently-invertible-map-inv-is-coherently-invertible
+ ( is-coherently-invertible-map-coherently-invertible-map e))
+
+ coherently-invertible-map-inv-transpose-coherently-invertible-map :
+ transpose-coherently-invertible-map A B → coherently-invertible-map B A
+ coherently-invertible-map-inv-transpose-coherently-invertible-map e =
+ ( map-inv-transpose-coherently-invertible-map e ,
+ is-coherently-invertible-map-inv-is-transpose-coherently-invertible
+ ( is-transpose-coherently-invertible-map-transpose-coherently-invertible-map
+ ( e)))
+```
+
### Invertible maps are coherently invertible
-#### Lemma: A coherence for homotopies to an identity map
+This result is known as
+[Vogt's lemma](https://ncatlab.org/nlab/show/homotopy+equivalence#vogts_lemma)
+in point-set topology. The construction follows Lemma 10.4.5 in _Introduction to
+Homotopy Type Theory_.
```agda
-coh-is-coherently-invertible-id :
- {l : Level} {A : UU l} {f : A → A} (H : f ~ (λ x → x)) →
- (x : A) → H (f x) = ap f (H x)
-coh-is-coherently-invertible-id {_} {A} {f} H x =
- is-injective-concat' (H x)
- ( ( ap (concat (H (f x)) x) (inv (ap-id (H x)))) ∙
- ( nat-htpy H (H x)))
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} (H : is-invertible f)
+ where
+
+ is-retraction-map-inv-is-coherently-invertible-is-invertible :
+ map-inv-is-invertible H ∘ f ~ id
+ is-retraction-map-inv-is-coherently-invertible-is-invertible =
+ is-retraction-map-inv-is-invertible H
+
+ abstract
+ is-section-map-inv-is-coherently-invertible-is-invertible :
+ f ∘ map-inv-is-invertible H ~ id
+ is-section-map-inv-is-coherently-invertible-is-invertible =
+ ( ( inv-htpy (is-section-map-inv-is-invertible H)) ·r
+ ( f ∘ map-inv-is-invertible H)) ∙h
+ ( ( ( f) ·l
+ ( is-retraction-map-inv-is-invertible H) ·r
+ ( map-inv-is-invertible H)) ∙h
+ ( is-section-map-inv-is-invertible H))
+
+ abstract
+ inv-coh-is-coherently-invertible-is-invertible :
+ f ·l is-retraction-map-inv-is-coherently-invertible-is-invertible ~
+ is-section-map-inv-is-coherently-invertible-is-invertible ·r f
+ inv-coh-is-coherently-invertible-is-invertible =
+ left-transpose-htpy-concat
+ ( ( is-section-map-inv-is-invertible H) ·r
+ ( f ∘ map-inv-is-invertible H ∘ f))
+ ( f ·l is-retraction-map-inv-is-invertible H)
+ ( ( ( f) ·l
+ ( is-retraction-map-inv-is-invertible H) ·r
+ ( map-inv-is-invertible H ∘ f)) ∙h
+ ( is-section-map-inv-is-invertible H ·r f))
+ ( ( ( nat-htpy (is-section-map-inv-is-invertible H ·r f)) ·r
+ ( is-retraction-map-inv-is-invertible H)) ∙h
+ ( right-whisker-concat-htpy
+ ( ( inv-preserves-comp-left-whisker-comp
+ ( f)
+ ( map-inv-is-invertible H ∘ f)
+ ( is-retraction-map-inv-is-invertible H)) ∙h
+ ( left-whisker-comp²
+ ( f)
+ ( inv-coh-htpy-id (is-retraction-map-inv-is-invertible H))))
+ ( is-section-map-inv-is-invertible H ·r f)))
+
+ abstract
+ coh-is-coherently-invertible-is-invertible :
+ coherence-is-coherently-invertible
+ ( f)
+ ( map-inv-is-invertible H)
+ ( is-section-map-inv-is-coherently-invertible-is-invertible)
+ ( is-retraction-map-inv-is-coherently-invertible-is-invertible)
+ coh-is-coherently-invertible-is-invertible =
+ inv-htpy inv-coh-is-coherently-invertible-is-invertible
+
+ is-coherently-invertible-is-invertible : is-coherently-invertible f
+ is-coherently-invertible-is-invertible =
+ ( map-inv-is-invertible H ,
+ is-section-map-inv-is-coherently-invertible-is-invertible ,
+ is-retraction-map-inv-is-coherently-invertible-is-invertible ,
+ coh-is-coherently-invertible-is-invertible)
```
-#### The proof that invertible maps are coherently invertible
+We get the transpose version for free:
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} (H : is-invertible f)
+ where
+
+ is-transpose-coherently-invertible-is-invertible :
+ is-transpose-coherently-invertible f
+ is-transpose-coherently-invertible-is-invertible =
+ is-transpose-coherently-invertible-map-inv-is-coherently-invertible
+ ( is-coherently-invertible-is-invertible
+ ( is-invertible-map-inv-is-invertible H))
+```
+
+### Coherently invertible maps are injective
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B}
+ where
+
+ is-injective-is-coherently-invertible :
+ (H : is-coherently-invertible f) {x y : A} → f x = f y → x = y
+ is-injective-is-coherently-invertible H =
+ is-injective-is-invertible
+ ( is-invertible-is-coherently-invertible H)
+
+ is-injective-is-transpose-coherently-invertible :
+ (H : is-transpose-coherently-invertible f) {x y : A} → f x = f y → x = y
+ is-injective-is-transpose-coherently-invertible H =
+ is-injective-is-invertible
+ ( is-invertible-is-transpose-coherently-invertible H)
+```
+
+### Coherently invertible maps are embeddings
+
+We show that `is-injective-is-coherently-invertible` is a
+[section](foundation-core.sections.md) and
+[retraction](foundation-core.retractions.md) of `ap f`.
```agda
module _
{l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B}
+ (H : is-coherently-invertible f) {x y : A}
where
abstract
- 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
-
- inv-coherence-map-inv-is-invertible :
- (H : is-invertible f) →
- f ·l is-retraction-map-inv-is-invertible H ~
- is-section-map-inv-is-invertible H ·r f
- inv-coherence-map-inv-is-invertible H x =
- left-transpose-eq-concat
- ( 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)))
- ( ( nat-htpy
- ( right-whisker-comp (is-retraction-is-invertible H) f)
- ( is-section-is-invertible H x)) ∙
- ( ap
- ( concat' _ (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
- ( is-section-is-invertible H) x))))))
-
- 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 (inv-coherence-map-inv-is-invertible H x)
+ is-section-is-injective-is-coherently-invertible :
+ ap f {x} {y} ∘ is-injective-is-coherently-invertible H ~ id
+ is-section-is-injective-is-coherently-invertible p =
+ ( ap-concat f
+ ( inv (is-retraction-map-inv-is-coherently-invertible H x))
+ ( ( ap (map-inv-is-coherently-invertible H) p) ∙
+ ( is-retraction-map-inv-is-coherently-invertible H y))) ∙
+ ( ap-binary
+ ( _∙_)
+ ( ap-inv f (is-retraction-map-inv-is-coherently-invertible H x))
+ ( ( ap-concat f
+ ( ap (map-inv-is-coherently-invertible H) p)
+ ( is-retraction-map-inv-is-coherently-invertible H y)) ∙
+ ( ap-binary
+ ( _∙_)
+ ( inv (ap-comp f (map-inv-is-coherently-invertible H) p))
+ ( inv (coh-is-coherently-invertible H y))))) ∙
+ ( inv
+ ( left-transpose-eq-concat
+ ( ap f (is-retraction-map-inv-is-coherently-invertible H x))
+ ( p)
+ ( ( ap (f ∘ map-inv-is-coherently-invertible H) p) ∙
+ ( is-section-map-inv-is-coherently-invertible H (f y)))
+ ( ( ap-binary
+ ( _∙_)
+ ( inv (coh-is-coherently-invertible H x))
+ ( inv (ap-id p))) ∙
+ ( nat-htpy (is-section-map-inv-is-coherently-invertible H) p))))
+
+ abstract
+ is-retraction-is-injective-is-coherently-invertible :
+ is-injective-is-coherently-invertible H ∘ ap f {x} {y} ~ id
+ is-retraction-is-injective-is-coherently-invertible refl =
+ left-inv (is-retraction-map-inv-is-coherently-invertible H x)
+
+ is-invertible-ap-is-coherently-invertible : is-invertible (ap f {x} {y})
+ is-invertible-ap-is-coherently-invertible =
+ ( is-injective-is-coherently-invertible H ,
+ is-section-is-injective-is-coherently-invertible ,
+ is-retraction-is-injective-is-coherently-invertible)
+
+ is-coherently-invertible-ap-is-coherently-invertible :
+ is-coherently-invertible (ap f {x} {y})
+ is-coherently-invertible-ap-is-coherently-invertible =
+ is-coherently-invertible-is-invertible
+ ( is-invertible-ap-is-coherently-invertible)
+```
+
+### Coherently invertible maps are transpose coherently invertible
+
+The proof follows Lemma 4.2.2 in _Homotopy Type Theory – Univalent Foundations
+of Mathematics_.
+
+**Proof.** By naturality of homotopies we have
+
+```text
+ gfRg
+ gfgfg --------------------> gfg
+ | |
+ Rgfg | nat-htpy R ·r (R ·r g) | Rg
+ ∨ ∨
+ gfg ----------------------> g.
+ Rg
+```
+
+We can paste the homotopy
+
+```text
+ g (inv-coh-htpy-id S) ∙ gHg : Sgfg ~ gfSg ~ gfRg
+```
+
+along the top edge of this naturality square obtaining the coherence square
+
+```text
+ gfgS
+ gfgfg -------> gfg
+ | |
+ Rgfg | | Rg
+ ∨ ∨
+ gfg ---------> g.
+ Rg
+```
+
+There is also the naturality square
+
+```text
+ gfgS
+ gfgfg --------------------> gfg
+ | |
+ Rgfg | nat-htpy (R ·r g) ·r S | Rg
+ ∨ ∨
+ gfg ----------------------> g.
+ gS
+```
+
+Now, by pasting these along the common edge `Rgfg`, we obtain
+
+```text
+ gfgS gfgS
+ gfg <------- gfgfg -------> gfg
+ | | |
+ Rg | | Rgfg | Rg
+ ∨ ∨ ∨
+ g <--------- gfg --------> gm
+ Rg gS
+```
+
+After cancelling `gfgS` and `Rg` with themselves, we are left with `Rg ~ gS` as
+desired.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ (f : A → B)
+ (g : B → A)
+ (S : is-section f g)
+ (R : is-retraction f g)
+ (H : coherence-is-coherently-invertible f g S R)
+ where
+
+ abstract
+ coh-transposition-coherence-is-coherently-invertible :
+ (g ∘ f ∘ g) ·l S ~ (g ∘ f) ·l R ·r g
+ coh-transposition-coherence-is-coherently-invertible =
+ ( inv-preserves-comp-left-whisker-comp g (f ∘ g) S) ∙h
+ ( left-whisker-comp² g (inv-coh-htpy-id S)) ∙h
+ ( double-whisker-comp² g H g) ∙h
+ ( preserves-comp-left-whisker-comp g f (R ·r g))
+
+ abstract
+ naturality-square-transposition-coherence-is-coherently-invertible :
+ coherence-square-homotopies
+ ( R ·r (g ∘ f ∘ g))
+ ( (g ∘ f ∘ g) ·l S)
+ ( R ·r g)
+ ( R ·r g)
+ naturality-square-transposition-coherence-is-coherently-invertible =
+ ( ap-concat-htpy'
+ ( R ·r g)
+ ( coh-transposition-coherence-is-coherently-invertible)) ∙h
+ ( inv-htpy (nat-htpy R ·r (R ·r g))) ∙h
+ ( ap-concat-htpy
+ ( R ·r (g ∘ f ∘ g))
+ ( left-unit-law-left-whisker-comp (R ·r g)))
+
+ abstract
+ coherence-transposition-coherence-is-coherently-invertible :
+ coherence-is-transpose-coherently-invertible f g S R
+ coherence-transposition-coherence-is-coherently-invertible =
+ ( ap-concat-htpy'
+ ( R ·r g)
+ ( inv-htpy (left-inv-htpy ((g ∘ f ∘ g) ·l S)))) ∙h
+ ( assoc-htpy (inv-htpy ((g ∘ f ∘ g) ·l S)) ((g ∘ f ∘ g) ·l S) (R ·r g)) ∙h
+ ( ap-concat-htpy
+ ( inv-htpy ((g ∘ f ∘ g) ·l S))
+ ( inv-htpy (nat-htpy (R ·r g) ·r S))) ∙h
+ ( inv-htpy
+ ( assoc-htpy
+ ( inv-htpy ((g ∘ f ∘ g) ·l S))
+ ( R ·r (g ∘ f ∘ g))
+ ( g ·l S))) ∙h
+ ( ap-concat-htpy'
+ ( g ·l S)
+ ( ( vertical-inv-coherence-square-homotopies
+ ( R ·r (g ∘ f ∘ g)) ((g ∘ f ∘ g) ·l S) (R ·r g) (R ·r g)
+ ( naturality-square-transposition-coherence-is-coherently-invertible)) ∙h
+ ( right-inv-htpy (R ·r g))))
+```
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B}
+ where
+
+ coherence-transposition-is-coherently-invertible :
+ (H : is-coherently-invertible f) →
+ coherence-is-transpose-coherently-invertible
+ ( f)
+ ( map-inv-is-coherently-invertible H)
+ ( is-section-map-inv-is-coherently-invertible H)
+ ( is-retraction-map-inv-is-coherently-invertible H)
+ coherence-transposition-is-coherently-invertible
+ ( g , S , R , H) =
+ coherence-transposition-coherence-is-coherently-invertible f g S R H
+
+ transposition-is-coherently-invertible :
+ is-coherently-invertible f → is-transpose-coherently-invertible f
+ transposition-is-coherently-invertible H =
+ is-transpose-coherently-invertible-transpose-coherence-is-invertible
+ ( is-invertible-is-coherently-invertible H)
+ ( coherence-transposition-is-coherently-invertible H)
+```
+
+### Transpose coherently invertible maps are coherently invertible
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B}
+ where
+
+ coherence-transposition-is-transpose-coherently-invertible :
+ (H : is-transpose-coherently-invertible f) →
+ coherence-is-coherently-invertible
+ ( f)
+ ( map-inv-is-transpose-coherently-invertible H)
+ ( is-section-map-inv-is-transpose-coherently-invertible H)
+ ( is-retraction-map-inv-is-transpose-coherently-invertible H)
+ coherence-transposition-is-transpose-coherently-invertible H =
+ coherence-transposition-is-coherently-invertible
+ ( is-coherently-invertible-map-inv-is-transpose-coherently-invertible H)
+
+ transposition-is-transpose-coherently-invertible :
+ is-transpose-coherently-invertible f → is-coherently-invertible f
+ transposition-is-transpose-coherently-invertible H =
+ is-coherently-invertible-coherence-is-invertible
+ ( is-invertible-is-transpose-coherently-invertible H)
+ ( coherence-transposition-is-transpose-coherently-invertible H)
+
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ where
+
+ transposition-coherently-invertible-map :
+ coherently-invertible-map A B → transpose-coherently-invertible-map A B
+ transposition-coherently-invertible-map (f , H) =
+ ( f , transposition-is-coherently-invertible H)
+
+ transposition-transpose-coherently-invertible-map :
+ transpose-coherently-invertible-map A B → coherently-invertible-map A B
+ transposition-transpose-coherently-invertible-map (f , H) =
+ ( f , transposition-is-transpose-coherently-invertible H)
+```
+
+### Coherently invertible maps are closed under homotopies
+
+**Proof.** Assume given a coherently invertible map `f` with inverse `g`,
+homotopies `S : f ∘ g ~ id`, `R : g ∘ f ~ id` and coherence `C : Sf ~ fR`.
+Moreover, assume the map `f'` is homotopic to `f` with homotopy `H : f' ~ f`.
+Then `g` is also a two-sided inverse to `f'` via the homotopies
+
+```text
+ S' := Hg ∙ S : f' ∘ g ~ id and R' := gH ∙ R : g ∘ f' ~ id.
+```
+
+Moreover, these witnesses are part of a coherent inverse to `f'`. To show this,
+we must construct a coherence `C'` of the square
+
+```text
+ Hgf'
+ f'gf' -----> f'gf
+ | |
+ f'gH | | Sf'
+ ∨ ∨
+ f'gf -------> f'.
+ f'R
+```
+
+We begin by observing that `C` fits somewhere along the diagonal of this square
+via the composite
+
+```text
+ Sf
+ HgH ------> H⁻¹
+ f'gf' -----> fgf C f ----> f'.
+ ------>
+ fR
+```
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f f' : A → B} (H : f' ~ f)
+ (g : B → A) (S : f ∘ g ~ id) (R : g ∘ f ~ id) (C : S ·r f ~ f ·l R)
+ where
+
+ coh-coh-is-coherently-invertible-htpy :
+ horizontal-concat-htpy' (H ·r g) H ∙h (S ·r f ∙h inv-htpy H) ~
+ horizontal-concat-htpy' (H ·r g) H ∙h (f ·l R ∙h inv-htpy H)
+ coh-coh-is-coherently-invertible-htpy =
+ left-whisker-concat-htpy
+ ( horizontal-concat-htpy' (H ·r g) H)
+ ( right-whisker-concat-htpy C (inv-htpy H))
+```
+
+Now the problem is reduced to constructing two homotopies
+
+```text
+ Hgf' ∙ Sf' ~ HgH ∙ Sf ∙ H⁻¹ and f'gH ∙ f'R ~ HgH ∙ fR ∙ H⁻¹.
+```
+
+By the two equivalent constructions of the horizontal composite `HgH`
+
+```text
+ Hgf' ∙ fgH ~ HgH ~ f'gH ∙ Hgf
+```
+
+constructing the two homotopies is equivalent to constructing coherences of the
+squares
+
+```text
+ fgH Hgf
+ fgf' -------> fgf f'gf -------> fgf
+ | | | |
+ Sf' | | Sf f'R | | fR
+ ∨ ∨ ∨ ∨
+ f' ---------> f f' ---------> f
+ H H
+```
+
+However, these squares are naturality squares, so we are done.
+
+```agda
+ coh-section-is-coherently-invertible-htpy :
+ (H ·r g ∙h S) ·r f' ~
+ horizontal-concat-htpy' (H ·r g) H ∙h ((S ·r f) ∙h inv-htpy H)
+ coh-section-is-coherently-invertible-htpy =
+ ( left-whisker-concat-htpy
+ ( H ·r (g ∘ f'))
+ ( right-transpose-htpy-concat (S ·r f') H ((f ∘ g) ·l H ∙h S ·r f)
+ ( ( ap-concat-htpy
+ ( S ·r f')
+ ( inv-htpy (left-unit-law-left-whisker-comp H))) ∙h
+ ( nat-htpy S ·r H)))) ∙h
+ ( ( ap-concat-htpy
+ ( H ·r (g ∘ f'))
+ ( assoc-htpy ((f ∘ g) ·l H) (S ·r f) (inv-htpy H))) ∙h
+ ( inv-htpy
+ ( assoc-htpy (H ·r (g ∘ f')) ((f ∘ g) ·l H) ((S ·r f) ∙h inv-htpy H))))
+
+ coh-retraction-is-coherently-invertible-htpy :
+ horizontal-concat-htpy' (H ·r g) H ∙h ((f ·l R) ∙h inv-htpy H) ~
+ f' ·l ((g ·l H) ∙h R)
+ coh-retraction-is-coherently-invertible-htpy =
+ ( ap-concat-htpy'
+ ( f ·l R ∙h inv-htpy H)
+ ( coh-horizontal-concat-htpy (H ·r g) H)) ∙h
+ ( assoc-htpy ((f' ∘ g) ·l H) (H ·r (g ∘ f)) (f ·l R ∙h inv-htpy H)) ∙h
+ ( ap-concat-htpy
+ ( (f' ∘ g) ·l H)
+ ( inv-htpy (assoc-htpy (H ·r (g ∘ f)) (f ·l R) (inv-htpy H)))) ∙h
+ ( left-whisker-concat-htpy
+ ( (f' ∘ g) ·l H)
+ ( inv-htpy
+ ( right-transpose-htpy-concat (f' ·l R) H ((H ·r (g ∘ f) ∙h f ·l R))
+ ( inv-htpy (nat-htpy H ·r R))))) ∙h
+ ( ap-concat-htpy'
+ ( f' ·l R)
+ ( inv-preserves-comp-left-whisker-comp f' g H)) ∙h
+ ( inv-htpy (distributive-left-whisker-comp-concat f' (g ·l H) R))
+```
+
+Finally, we concatenate the three coherences to obtain our desired result.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f f' : A → B}
+ where
+
+ abstract
+ coh-is-coherently-invertible-htpy :
+ (H : f' ~ f) (F : is-coherently-invertible f) →
+ coherence-is-coherently-invertible
+ ( f')
+ ( map-inv-is-coherently-invertible F)
+ ( is-section-map-inv-is-invertible-htpy
+ ( H)
+ ( is-invertible-is-coherently-invertible F))
+ ( is-retraction-map-inv-is-invertible-htpy
+ ( H)
+ ( is-invertible-is-coherently-invertible F))
+ coh-is-coherently-invertible-htpy H F =
+ ( coh-section-is-coherently-invertible-htpy H
+ ( map-inv-is-coherently-invertible F)
+ ( is-section-map-inv-is-coherently-invertible F)
+ ( is-retraction-map-inv-is-coherently-invertible F)
+ ( coh-is-coherently-invertible F)) ∙h
+ ( coh-coh-is-coherently-invertible-htpy H
+ ( map-inv-is-coherently-invertible F)
+ ( is-section-map-inv-is-coherently-invertible F)
+ ( is-retraction-map-inv-is-coherently-invertible F)
+ ( coh-is-coherently-invertible F)) ∙h
+ ( coh-retraction-is-coherently-invertible-htpy H
+ ( map-inv-is-coherently-invertible F)
+ ( is-section-map-inv-is-coherently-invertible F)
+ ( is-retraction-map-inv-is-coherently-invertible F)
+ ( coh-is-coherently-invertible F))
+
+ is-coherently-invertible-htpy :
+ f' ~ f → is-coherently-invertible f → is-coherently-invertible f'
+ is-coherently-invertible-htpy H F =
+ is-coherently-invertible-coherence-is-invertible
+ ( is-invertible-htpy H (is-invertible-is-coherently-invertible F))
+ ( coh-is-coherently-invertible-htpy H F)
+
+ is-coherently-invertible-inv-htpy :
+ f ~ f' → is-coherently-invertible f → is-coherently-invertible f'
+ is-coherently-invertible-inv-htpy H =
+ is-coherently-invertible-htpy (inv-htpy H)
+
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B}
+ where
+
+ is-coherently-invertible-htpy-coherently-invertible-map :
+ (e : coherently-invertible-map A B) →
+ f ~ map-coherently-invertible-map e →
+ is-coherently-invertible f
+ is-coherently-invertible-htpy-coherently-invertible-map (e , E) H =
+ is-coherently-invertible-htpy H E
+
+ is-coherently-invertible-inv-htpy-coherently-invertible-map :
+ (e : coherently-invertible-map A B) →
+ map-coherently-invertible-map e ~ f →
+ is-coherently-invertible f
+ is-coherently-invertible-inv-htpy-coherently-invertible-map (e , E) H =
+ is-coherently-invertible-inv-htpy H E
+```
+
+### The identity map is coherently invertible
+
+```agda
+module _
+ {l : Level} {A : UU l}
+ where
+
+ is-coherently-invertible-id :
+ is-coherently-invertible (id {A = A})
+ is-coherently-invertible-id =
+ is-coherently-invertible-coherence-is-invertible is-invertible-id refl-htpy
+
+ id-coherently-invertible-map : coherently-invertible-map A A
+ id-coherently-invertible-map =
+ ( id , is-coherently-invertible-id)
+
+ is-transpose-coherently-invertible-id :
+ is-transpose-coherently-invertible (id {A = A})
+ is-transpose-coherently-invertible-id =
+ is-transpose-coherently-invertible-map-inv-is-coherently-invertible
+ ( is-coherently-invertible-id)
+
+ id-transpose-coherently-invertible-map :
+ transpose-coherently-invertible-map A A
+ id-transpose-coherently-invertible-map =
+ ( id , is-transpose-coherently-invertible-id)
+```
+
+### Inversion of coherently invertible maps
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ where
+
+ is-coherently-invertible-map-inv-is-coherently-invertible :
+ {f : A → B} (H : is-coherently-invertible f) →
+ is-coherently-invertible (map-inv-is-coherently-invertible H)
+ is-coherently-invertible-map-inv-is-coherently-invertible H =
+ is-coherently-invertible-map-inv-is-transpose-coherently-invertible
+ ( transposition-is-coherently-invertible H)
+
+ is-transpose-coherently-invertible-map-inv-is-transpose-coherently-invertible :
+ {f : A → B} (H : is-transpose-coherently-invertible f) →
+ is-transpose-coherently-invertible
+ ( map-inv-is-transpose-coherently-invertible H)
+ is-transpose-coherently-invertible-map-inv-is-transpose-coherently-invertible
+ H =
+ transposition-is-coherently-invertible
+ ( is-coherently-invertible-map-inv-is-transpose-coherently-invertible H)
+
+ inv-coherently-invertible-map :
+ coherently-invertible-map A B → coherently-invertible-map B A
+ inv-coherently-invertible-map (f , H) =
+ ( map-inv-is-coherently-invertible H ,
+ is-coherently-invertible-map-inv-is-coherently-invertible H)
+
+ inv-transpose-coherently-invertible-map :
+ transpose-coherently-invertible-map A B →
+ transpose-coherently-invertible-map B A
+ inv-transpose-coherently-invertible-map (f , H) =
+ ( map-inv-is-transpose-coherently-invertible H ,
+ is-transpose-coherently-invertible-map-inv-is-transpose-coherently-invertible
+ ( H))
+```
+
+### Composition of coherently invertible maps
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3}
+ (g : B → C) (f : A → B)
+ (G : is-coherently-invertible g)
+ (F : is-coherently-invertible f)
+ where
+
+ coh-is-coherently-invertible-comp :
+ coherence-is-coherently-invertible
+ ( g ∘ f)
+ ( map-inv-is-invertible-comp g f
+ ( is-invertible-is-coherently-invertible G)
+ ( is-invertible-is-coherently-invertible F))
+ ( is-section-map-inv-is-invertible-comp g f
+ ( is-invertible-is-coherently-invertible G)
+ ( is-invertible-is-coherently-invertible F))
+ ( is-retraction-map-inv-is-invertible-comp g f
+ ( is-invertible-is-coherently-invertible G)
+ ( is-invertible-is-coherently-invertible F))
+ coh-is-coherently-invertible-comp =
+ ( ap-concat-htpy
+ ( ( g) ·l
+ ( is-section-map-inv-is-coherently-invertible F) ·r
+ ( map-inv-is-coherently-invertible G ∘ g ∘ f))
+ ( coh-is-coherently-invertible G ·r f)) ∙h
+ ( right-whisker-comp²
+ ( ( nat-htpy (g ·l is-section-map-inv-is-coherently-invertible F)) ·r
+ ( is-retraction-map-inv-is-coherently-invertible G))
+ ( f)) ∙h
+ ( ap-binary-concat-htpy
+ ( inv-preserves-comp-left-whisker-comp
+ ( g ∘ f)
+ ( map-inv-is-coherently-invertible F)
+ ( is-retraction-map-inv-is-coherently-invertible G ·r f))
+ ( ( left-whisker-comp² g (coh-is-coherently-invertible F)) ∙h
+ ( preserves-comp-left-whisker-comp g f
+ ( is-retraction-map-inv-is-coherently-invertible F)))) ∙h
+ ( inv-htpy
+ ( distributive-left-whisker-comp-concat
+ ( g ∘ f)
+ ( ( map-inv-is-coherently-invertible F) ·l
+ ( is-retraction-map-inv-is-coherently-invertible G ·r f))
+ ( is-retraction-map-inv-is-coherently-invertible F)))
+
+ is-coherently-invertible-comp : is-coherently-invertible (g ∘ f)
+ is-coherently-invertible-comp =
+ is-coherently-invertible-coherence-is-invertible
+ ( is-invertible-comp g f
+ ( is-invertible-is-coherently-invertible G)
+ ( is-invertible-is-coherently-invertible F))
+ ( coh-is-coherently-invertible-comp)
+
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3}
+ (g : B → C) (f : A → B)
+ (G : is-transpose-coherently-invertible g)
+ (F : is-transpose-coherently-invertible f)
+ where
+
+ coh-is-transpose-coherently-invertible-comp :
+ coherence-is-transpose-coherently-invertible
+ ( g ∘ f)
+ ( map-inv-is-invertible-comp g f
+ ( is-invertible-is-transpose-coherently-invertible G)
+ ( is-invertible-is-transpose-coherently-invertible F))
+ ( is-section-map-inv-is-invertible-comp g f
+ ( is-invertible-is-transpose-coherently-invertible G)
+ ( is-invertible-is-transpose-coherently-invertible F))
+ ( is-retraction-map-inv-is-invertible-comp g f
+ ( is-invertible-is-transpose-coherently-invertible G)
+ ( is-invertible-is-transpose-coherently-invertible F))
+ coh-is-transpose-coherently-invertible-comp =
+ coh-is-coherently-invertible-comp
+ ( map-inv-is-transpose-coherently-invertible F)
+ ( map-inv-is-transpose-coherently-invertible G)
+ ( is-coherently-invertible-map-inv-is-transpose-coherently-invertible F)
+ ( is-coherently-invertible-map-inv-is-transpose-coherently-invertible G)
+
+ is-transpose-coherently-invertible-comp :
+ is-transpose-coherently-invertible (g ∘ f)
+ is-transpose-coherently-invertible-comp =
+ is-transpose-coherently-invertible-transpose-coherence-is-invertible
+ ( is-invertible-comp g f
+ ( is-invertible-is-transpose-coherently-invertible G)
+ ( is-invertible-is-transpose-coherently-invertible F))
+ ( coh-is-transpose-coherently-invertible-comp)
+
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3}
+ where
+
+ comp-coherently-invertible-map :
+ coherently-invertible-map B C →
+ coherently-invertible-map A B →
+ coherently-invertible-map A C
+ comp-coherently-invertible-map (g , G) (f , F) =
+ ( g ∘ f , is-coherently-invertible-comp g f G F)
+
+ comp-transpose-coherently-invertible-map :
+ transpose-coherently-invertible-map B C →
+ transpose-coherently-invertible-map A B →
+ transpose-coherently-invertible-map A C
+ comp-transpose-coherently-invertible-map (g , G) (f , F) =
+ ( g ∘ f , is-transpose-coherently-invertible-comp g f G F)
+```
+
+### The 3-for-2 property of coherently invertible maps
+
+The
+{{#concept "3-for-2 property" Disambiguation="of coherently invertible maps"}}
+of coherently invertible maps asserts that for any
+[commuting triangle](foundation-core.commuting-triangles-of-maps.md) of maps
+
+```text
+ h
+ A ------> B
+ \ /
+ f\ /g
+ \ /
+ V V
+ X,
+```
+
+if two of the three maps are coherently invertible, then so is the third.
+
+We also record special cases of the 3-for-2 property of coherently invertible
+maps, where we only assume maps `g : B → X` and `h : A → B`. In this special
+case, we set `f := g ∘ h` and the triangle commutes by `refl-htpy`.
+
+[André Joyal](https://en.wikipedia.org/wiki/André_Joyal) proposed calling this
+property the 3-for-2 property, despite most mathematicians calling it the
+_2-out-of-3 property_. The story goes that on the produce market is is common to
+advertise a discount as "3-for-2". If you buy two apples, then you get the third
+for free. Similarly, if you prove that two maps in a commuting triangle are
+coherently invertible, then you get the third proof for free.
+
+#### The left map in a commuting triangle is coherently invertible if the other two maps are
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
+ (f : A → X) (g : B → X) (h : A → B) (T : f ~ g ∘ h)
+ where
+
+ is-coherently-invertible-left-map-triangle :
+ is-coherently-invertible h →
+ is-coherently-invertible g →
+ is-coherently-invertible f
+ is-coherently-invertible-left-map-triangle H G =
+ is-coherently-invertible-htpy T (is-coherently-invertible-comp g h G H)
+```
+
+#### The right map in a commuting triangle is coherently invertible if the other two maps are
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
+ (f : A → X) (g : B → X) (h : A → B) (T : f ~ g ∘ h)
+ where
+
+ is-coherently-invertible-right-map-triangle :
+ is-coherently-invertible f →
+ is-coherently-invertible h →
+ is-coherently-invertible g
+ is-coherently-invertible-right-map-triangle F H =
+ is-coherently-invertible-htpy
+ ( ( g ·l inv-htpy (is-section-map-inv-is-coherently-invertible H)) ∙h
+ ( inv-htpy T ·r map-inv-is-coherently-invertible H))
+ ( is-coherently-invertible-comp
+ ( f)
+ ( map-inv-is-coherently-invertible H)
+ ( F)
+ ( is-coherently-invertible-map-inv-is-coherently-invertible H))
+```
+
+#### The top map in a commuting triangle is coherently invertible if the other two maps are
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
+ (f : A → X) (g : B → X) (h : A → B) (T : f ~ g ∘ h)
+ where
+
+ is-coherently-invertible-top-map-triangle :
+ is-coherently-invertible g →
+ is-coherently-invertible f →
+ is-coherently-invertible h
+ is-coherently-invertible-top-map-triangle G F =
+ is-coherently-invertible-htpy
+ ( ( inv-htpy (is-retraction-map-inv-is-coherently-invertible G) ·r h) ∙h
+ ( map-inv-is-coherently-invertible G ·l inv-htpy T))
+ ( is-coherently-invertible-comp
+ ( map-inv-is-coherently-invertible G)
+ ( f)
+ ( is-coherently-invertible-map-inv-is-coherently-invertible G)
+ ( F))
+```
+
+#### If a composite and its right factor are coherently invertible, then so is its left factor
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
+ where
+
+ is-coherently-invertible-left-factor :
+ (g : B → X) (h : A → B) →
+ is-coherently-invertible (g ∘ h) →
+ is-coherently-invertible h →
+ is-coherently-invertible g
+ is-coherently-invertible-left-factor g h GH H =
+ is-coherently-invertible-right-map-triangle (g ∘ h) g h refl-htpy GH H
+```
+
+#### If a composite and its left factor are coherently invertible, then so is its right factor
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
+ where
+
+ is-coherently-invertible-right-factor :
+ (g : B → X) (h : A → B) →
+ is-coherently-invertible g →
+ is-coherently-invertible (g ∘ h) →
+ is-coherently-invertible h
+ is-coherently-invertible-right-factor g h G GH =
+ is-coherently-invertible-top-map-triangle (g ∘ h) g h refl-htpy G GH
+```
+
+### Any section of a coherently invertible map is coherently invertible
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ where
+
+ is-coherently-invertible-is-section :
+ {f : A → B} {g : B → A} →
+ is-coherently-invertible f → f ∘ g ~ id → is-coherently-invertible g
+ is-coherently-invertible-is-section {f = f} {g} F H =
+ is-coherently-invertible-top-map-triangle id f g
+ ( inv-htpy H)
+ ( F)
+ ( is-coherently-invertible-id)
+```
+
+### Any retraction of a coherently invertible map is coherently invertible
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ where
+
+ is-coherently-invertible-is-retraction :
+ {f : A → B} {g : B → A} →
+ is-coherently-invertible f → (g ∘ f) ~ id → is-coherently-invertible g
+ is-coherently-invertible-is-retraction {f = f} {g} F H =
+ is-coherently-invertible-right-map-triangle id g f
+ ( inv-htpy H)
+ ( is-coherently-invertible-id)
+ ( F)
+```
+
+### If a section of `f` is coherently invertible, then `f` is coherently invertible
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B)
+ where
+
+ is-coherently-invertible-is-coherently-invertible-section :
+ (s : section f) →
+ is-coherently-invertible (map-section f s) → is-coherently-invertible f
+ is-coherently-invertible-is-coherently-invertible-section (g , G) S =
+ is-coherently-invertible-is-retraction S G
+```
+
+### If a retraction of `f` is coherently invertible, then `f` is coherently invertible
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B)
+ where
abstract
- 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
+ is-coherently-invertible-is-coherently-invertible-retraction :
+ (r : retraction f) →
+ is-coherently-invertible (map-retraction f r) → is-coherently-invertible f
+ is-coherently-invertible-is-coherently-invertible-retraction (g , G) R =
+ is-coherently-invertible-is-section R G
+```
+
+### Any section of a coherently invertible map is homotopic to its inverse
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : coherently-invertible-map A B)
+ where
+
+ htpy-map-inv-coherently-invertible-map-section :
+ (f : section (map-coherently-invertible-map e)) →
+ map-inv-coherently-invertible-map e ~
+ map-section (map-coherently-invertible-map e) f
+ htpy-map-inv-coherently-invertible-map-section =
+ htpy-map-inv-invertible-map-section
+ ( invertible-map-coherently-invertible-map e)
```
+### Any retraction of a coherently invertible map is homotopic to its inverse
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : coherently-invertible-map A B)
+ where
+
+ htpy-map-inv-coherently-invertible-map-retraction :
+ (f : retraction (map-coherently-invertible-map e)) →
+ map-inv-coherently-invertible-map e ~
+ map-retraction (map-coherently-invertible-map e) f
+ htpy-map-inv-coherently-invertible-map-retraction =
+ htpy-map-inv-invertible-map-retraction
+ ( invertible-map-coherently-invertible-map e)
+```
+
+## References
+
+1. Egbert Rijke, _Introduction to Homotopy Type Theory_ (2022)
+ ([arXiv:2212.11082](https://arxiv.org/abs/2212.11082))
+2. Univalent Foundations Project, _Homotopy Type Theory – Univalent Foundations
+ of Mathematics_ (2013) ([website](https://homotopytypetheory.org/book/),
+ [arXiv:1308.0729](https://arxiv.org/abs/1308.0729))
+
## See also
- For the notion of biinvertible maps see
@@ -179,3 +1401,9 @@ module _
[`foundation.contractible-maps`](foundation.contractible-maps.md).
- For the notion of path-split maps see
[`foundation.path-split-maps`](foundation.path-split-maps.md).
+
+## External links
+
+- [Adjoint equivalences](https://1lab.dev/1Lab.Equiv.HalfAdjoint.html) at 1lab
+- [adjoint equivalence](https://ncatlab.org/nlab/show/adjoint+equivalence) at
+ $n$Lab
diff --git a/src/foundation-core/commuting-squares-of-homotopies.lagda.md b/src/foundation-core/commuting-squares-of-homotopies.lagda.md
index 1af11c0a1d..7c3e1c6877 100644
--- a/src/foundation-core/commuting-squares-of-homotopies.lagda.md
+++ b/src/foundation-core/commuting-squares-of-homotopies.lagda.md
@@ -8,9 +8,11 @@ module foundation-core.commuting-squares-of-homotopies where
```agda
open import foundation.universe-levels
+open import foundation.whiskering-homotopies-composition
-open import foundation-core.equivalences
+open import foundation-core.commuting-squares-of-identifications
open import foundation-core.homotopies
+open import foundation-core.whiskering-homotopies-concatenation
```
@@ -51,3 +53,1638 @@ module _
coherence-square-homotopies' =
top ∙h right ~ left ∙h bottom
```
+
+### Horizontally constant squares
+
+{{#concept "Horizontally constant squares" Disambiguation="homotopies" Agda=horizontal-refl-coherence-square-homotopies}}
+are commuting squares of homotopies of the form
+
+```text
+ refl-htpy
+ f ----------> f
+ | |
+ H | | H
+ ∨ ∨
+ g ----------> g.
+ refl-htpy
+```
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g : (x : A) → B x} (H : f ~ g)
+ where
+
+ horizontal-refl-coherence-square-homotopies :
+ coherence-square-homotopies refl-htpy H H refl-htpy
+ horizontal-refl-coherence-square-homotopies x =
+ horizontal-refl-coherence-square-identifications (H x)
+```
+
+### Vertically constant squares
+
+{{#concept "Vertically constant squares" Disambiguation="homotopies" Agda=vertical-refl-coherence-square-homotopies}}
+are commuting squares of homotopies of the form
+
+```text
+ H
+ f -----> g
+ | |
+ refl-htpy | | refl-htpy
+ ∨ ∨
+ f -----> g.
+ H
+```
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g : (x : A) → B x} (H : f ~ g)
+ where
+
+ vertical-refl-coherence-square-homotopies :
+ coherence-square-homotopies H refl-htpy refl-htpy H
+ vertical-refl-coherence-square-homotopies x =
+ vertical-refl-coherence-square-identifications (H x)
+```
+
+## Operations
+
+### Inverting squares of homotopies horizontally
+
+Given a commuting square of homotopies
+
+```text
+ top
+ f -------> g
+ | |
+ left | | right
+ ∨ ∨
+ h -------> i,
+ bottom
+```
+
+the square of homotopies
+
+```text
+ top⁻¹
+ g ------------> f
+ | |
+ right | | left
+ ∨ ∨
+ i ------------> h
+ bottom⁻¹
+```
+
+commutes.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ where
+
+ horizontal-inv-coherence-square-homotopies :
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) →
+ coherence-square-homotopies top left right bottom →
+ coherence-square-homotopies (inv-htpy top) right left (inv-htpy bottom)
+ horizontal-inv-coherence-square-homotopies top left right bottom H x =
+ horizontal-inv-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( H x)
+```
+
+### Inverting squares of homotopies vertically
+
+Given a commuting square of homotopies
+
+```text
+ top
+ f -------> g
+ | |
+ left | | right
+ ∨ ∨
+ h -------> i,
+ bottom
+```
+
+the square of homotopies
+
+```text
+ bottom
+ h -------> i
+ | |
+ left⁻¹ | | right⁻¹
+ ∨ ∨
+ f -------> g
+ top
+```
+
+commutes.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ where
+
+ vertical-inv-coherence-square-homotopies :
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) →
+ coherence-square-homotopies top left right bottom →
+ coherence-square-homotopies bottom (inv-htpy left) (inv-htpy right) top
+ vertical-inv-coherence-square-homotopies top left right bottom H x =
+ vertical-inv-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( H x)
+```
+
+### Functions acting on squares of homotopies
+
+Given a commuting square of homotopies
+
+```text
+ top
+ f -------> g
+ | |
+ left | | right
+ ∨ ∨
+ h -------> i
+ bottom
+```
+
+in `(x : A) → B x`, and given a dependent map `F : {x : A} → B x → C x`, the
+square of homotopies
+
+```text
+ F ·l top
+ f f -----------> f g
+ | |
+ F ·l left | | F ·l right
+ ∨ ∨
+ h -------------> i
+ F ·l bottom
+```
+
+commutes.
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : A → UU l3}
+ {f g h i : (x : A) → B x}
+ (F : {x : A} → B x → C x)
+ where
+
+ map-coherence-square-homotopies :
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) →
+ coherence-square-homotopies top left right bottom →
+ coherence-square-homotopies
+ ( F ·l top)
+ ( F ·l left)
+ ( F ·l right)
+ ( F ·l bottom)
+ map-coherence-square-homotopies top left right bottom H x =
+ map-coherence-square-identifications
+ ( F)
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( H x)
+```
+
+Similarly we may whisker it on the right.
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : B → UU l3}
+ {f g h i : (y : B) → C y}
+ where
+
+ right-whisker-comp-coherence-square-homotopies :
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) →
+ (F : A → B) →
+ coherence-square-homotopies top left right bottom →
+ coherence-square-homotopies
+ ( top ·r F)
+ ( left ·r F)
+ ( right ·r F)
+ ( bottom ·r F)
+ right-whisker-comp-coherence-square-homotopies top left right bottom F α =
+ α ·r F
+```
+
+### Concatenating homotopies of edges and coherences of commuting squares of homotopies
+
+Consider a commuting square of homotopies and a homotopy of one of the four
+sides with another homotopy, as for example in the diagram below:
+
+```text
+ top
+ a ---------> b
+ | | |
+ left | right |~| right'
+ ∨ ∨ ∨
+ c ---------> d.
+ bottom
+```
+
+Then any homotopy witnessing that the square commutes can be concatenated with
+the homotopy on the side, to obtain a new commuting square of homotopies.
+
+**Note.** To avoid cyclic module dependencies we will give direct proofs that
+concatenating homotopies of edges of a square with the coherence of its
+commutativity is an equivalence.
+
+#### Concatenating homotopies of the top edge with a coherence of a commuting square of homotopies
+
+Consider a commuting diagram of homotopies
+
+```text
+ top'
+ ------->
+ f -------> g
+ | top |
+ left | | right
+ ∨ ∨
+ h -------> i.
+ bottom
+```
+
+with a homotopy `top ~ top'`. Then we get maps back and forth
+
+```text
+ top top'
+ f -------> g f -------> g
+ | | | |
+ left | | right ↔ left | | right
+ ∨ ∨ ∨ ∨
+ h -------> i h -------> i.
+ bottom bottom
+```
+
+We record that this construction is an equivalence in
+[`foundation.commuting-squares-of-homotopies`](foundation.commuting-squares-of-homotopies.md).
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i)
+ {top' : f ~ g} (s : top ~ top')
+ where
+
+ concat-top-homotopy-coherence-square-homotopies :
+ coherence-square-homotopies top left right bottom →
+ coherence-square-homotopies top' left right bottom
+ concat-top-homotopy-coherence-square-homotopies H x =
+ concat-top-identification-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( s x)
+ ( H x)
+
+ inv-concat-top-homotopy-coherence-square-homotopies :
+ coherence-square-homotopies top' left right bottom →
+ coherence-square-homotopies top left right bottom
+ inv-concat-top-homotopy-coherence-square-homotopies H x =
+ inv-concat-top-identification-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( s x)
+ ( H x)
+```
+
+#### Concatenating homotopies of the left edge with a coherence of a commuting square of homotopies
+
+Consider a commuting diagram of homotopies
+
+```text
+ top
+ f -------> g
+ | | |
+ left' | | left | right
+ ∨ ∨ ∨
+ h -------> i.
+ bottom
+```
+
+with a homotopy `left ~ left'`. Then we get maps back and forth
+
+```text
+ top top
+ f -------> g f -------> g
+ | | | |
+ left | | right ↔ left' | | right
+ ∨ ∨ ∨ ∨
+ h -------> i h -------> i.
+ bottom bottom
+```
+
+We record that this construction is an equivalence in
+[`foundation.commuting-squares-of-homotopies`](foundation.commuting-squares-of-homotopies.md).
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i)
+ {left' : f ~ h} (s : left ~ left')
+ where
+
+ concat-left-homotopy-coherence-square-homotopies :
+ coherence-square-homotopies top left right bottom →
+ coherence-square-homotopies top left' right bottom
+ concat-left-homotopy-coherence-square-homotopies H x =
+ concat-left-identification-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( s x)
+ ( H x)
+
+ inv-concat-left-homotopy-coherence-square-homotopies :
+ coherence-square-homotopies top left' right bottom →
+ coherence-square-homotopies top left right bottom
+ inv-concat-left-homotopy-coherence-square-homotopies H x =
+ inv-concat-left-identification-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( s x)
+ ( H x)
+```
+
+#### Concatenating homotopies of the right edge with a coherence of a commuting square of homotopies
+
+Consider a commuting diagram of homotopies
+
+```text
+ top
+ f -------> g
+ | | |
+ left | right | | right'
+ ∨ ∨ ∨
+ h -------> i.
+ bottom
+```
+
+with a homotopy `right ~ right'`. Then we get maps back and forth
+
+```text
+ top top
+ f -------> g f -------> g
+ | | | |
+ left | | right ↔ left | | right'
+ ∨ ∨ ∨ ∨
+ h -------> i h -------> i.
+ bottom bottom
+```
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i)
+ {right' : g ~ i} (s : right ~ right')
+ where
+
+ concat-right-homotopy-coherence-square-homotopies :
+ coherence-square-homotopies top left right bottom →
+ coherence-square-homotopies top left right' bottom
+ concat-right-homotopy-coherence-square-homotopies H x =
+ concat-right-identification-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( s x)
+ ( H x)
+
+ inv-concat-right-homotopy-coherence-square-homotopies :
+ coherence-square-homotopies top left right' bottom →
+ coherence-square-homotopies top left right bottom
+ inv-concat-right-homotopy-coherence-square-homotopies H x =
+ inv-concat-right-identification-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( s x)
+ ( H x)
+```
+
+We record that this construction is an equivalence in
+[`foundation.commuting-squares-of-homotopies`](foundation.commuting-squares-of-homotopies.md).
+
+#### Concatenating homotopies of the bottom edge with a coherence of a commuting square of homotopies
+
+Consider a commuting diagram of homotopies
+
+```text
+ top
+ f -------> g
+ | |
+ left | | right
+ ∨ bottom ∨
+ h -------> i.
+ ------->
+ bottom'
+```
+
+with a homotopy `bottom ~ bottom'`. Then we get maps back and forth
+
+```text
+ top top
+ f -------> g f -------> g
+ | | | |
+ left | | right ↔ left | | right
+ ∨ ∨ ∨ ∨
+ h -------> i h -------> i.
+ bottom bottom'
+```
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i)
+ {bottom' : h ~ i} (s : bottom ~ bottom')
+ where
+
+ concat-bottom-homotopy-coherence-square-homotopies :
+ coherence-square-homotopies top left right bottom →
+ coherence-square-homotopies top left right bottom'
+ concat-bottom-homotopy-coherence-square-homotopies H x =
+ concat-bottom-identification-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( s x)
+ ( H x)
+
+ inv-concat-bottom-homotopy-coherence-square-homotopies :
+ coherence-square-homotopies top left right bottom' →
+ coherence-square-homotopies top left right bottom
+ inv-concat-bottom-homotopy-coherence-square-homotopies H x =
+ inv-concat-bottom-identification-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( s x)
+ ( H x)
+```
+
+We record that this construction is an equivalence in
+[`foundation.commuting-squares-of-homotopies`](foundation.commuting-squares-of-homotopies.md).
+
+### Whiskering and splicing coherences of commuting squares of homotopies with respect to concatenation of homotopies
+
+Given a commuting square of homotopies
+
+```text
+ top
+ f -------> g
+ | |
+ left | | right
+ ∨ ∨
+ h -------> i,
+ bottom
+```
+
+we may consider four ways of attaching new homotopies to it:
+
+1. Prepending `H : u ~ f` to the left gives us a commuting square
+
+ ```text
+ H ∙h top
+ u -------> g
+ | |
+ H ∙h left | | right
+ ∨ ∨
+ h -------> i.
+ bottom
+ ```
+
+ More precisely, we have an equivalence
+
+ ```text
+ (left ∙h bottom ~ top ∙h right) ≃ ((H ∙h left) ∙h bottom ~ (H ∙h top) ∙h right).
+ ```
+
+2. Appending a homotopy `H : i ~ u` to the right gives a commuting square of
+ homotopies
+
+ ```text
+ top
+ f ------------> g
+ | |
+ left | | right ∙h H
+ ∨ ∨
+ h ------------> u.
+ bottom ∙h H
+ ```
+
+ More precisely, we have an equivalence
+
+ ```text
+ (left ∙h bottom ~ top ∙h right) ≃ (left ∙h (bottom ∙h H) ~ top ∙h (right ∙h H)).
+ ```
+
+3. Splicing a homotopy `H : h ~ u` and its inverse into the middle gives a
+ commuting square of homotopies
+
+ ```text
+ top
+ f --------------> g
+ | |
+ left ∙h H | | right
+ ∨ ∨
+ u --------------> i.
+ H⁻¹ ∙h bottom
+ ```
+
+ More precisely, we have an equivalence
+
+ ```text
+ (left ∙h bottom ~ top ∙h right) ≃ ((left ∙h H) ∙h (H⁻¹ ∙h bottom) ~ top ∙h right).
+ ```
+
+ Similarly, we have an equivalence
+
+ ```text
+ (left ∙h bottom ~ top ∙h right) ≃ ((left ∙h H⁻¹) ∙h (H ∙h bottom) ~ top ∙h right).
+ ```
+
+4. Splicing a homotopy `H : g ~ u` and its inverse into the middle gives a
+ commuting square of homotopies
+
+ ```text
+ top ∙h H
+ f --------> u
+ | |
+ left | | H⁻¹ ∙h right
+ ∨ ∨
+ h --------> i.
+ bottom
+ ```
+
+ More precisely, we have an equivalence
+
+ ```text
+ (left ∙h bottom ~ top ∙h right) ≃ (left ∙h bottom ~ (top ∙h H) ∙h (H⁻¹ ∙h right)).
+ ```
+
+ Similarly, we have an equivalence
+
+ ```text
+ (left ∙h bottom ~ top ∙h right) ≃ (left ∙h bottom ~ (top ∙h H⁻¹) ∙h (H ∙h right)).
+ ```
+
+These operations are useful in proofs involving homotopy algebra, because taking
+`equiv-right-whisker-concat-coherence-square-homotopies` as an example, it
+provides us with two maps: the forward direction states
+`(H ∙h r ~ K ∙h s) → (H ∙h (r ∙h t)) ~ K ∙h (s ∙h t))`, which allows one to
+append a homotopy without needing to reassociate on the right, and the backwards
+direction conversely allows one to cancel out a homotopy in parentheses.
+
+#### Left whiskering coherences of commuting squares of homotopies
+
+For any homotopy `H : u ~ f` we obtain maps back and forth
+
+```text
+ top H ∙h top
+ f -------> g u -------> g
+ | | | |
+ left | | right ↔ H ∙h left | | right
+ ∨ ∨ ∨ ∨
+ h -------> i h -------> i
+ bottom bottom
+```
+
+of coherences of commuting squares of homotopies. We show in
+[`foundation.commuting-squares-of-homotopies`](foundation.commuting-squares-of-homotopies.md)
+that these maps are equivalences.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ where
+
+ left-whisker-concat-coherence-square-homotopies :
+ {u : (x : A) → B x} (H : u ~ f)
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) →
+ coherence-square-homotopies top left right bottom →
+ coherence-square-homotopies (H ∙h top) (H ∙h left) right bottom
+ left-whisker-concat-coherence-square-homotopies
+ H top left right bottom coh x =
+ left-whisker-concat-coherence-square-identifications
+ ( H x)
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( coh x)
+
+ left-unwhisker-concat-coherence-square-homotopies :
+ {u : (x : A) → B x} (H : u ~ f)
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) →
+ coherence-square-homotopies (H ∙h top) (H ∙h left) right bottom →
+ coherence-square-homotopies top left right bottom
+ left-unwhisker-concat-coherence-square-homotopies
+ H top left right bottom coh x =
+ left-unwhisker-concat-coherence-square-identifications
+ ( H x)
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( coh x)
+```
+
+#### Right whiskering coherences of commuting squares of homotopies
+
+For any homotopy `H : i ~ u` we obtain maps back and forth
+
+```text
+ top top
+ f -------> g f ------------> g
+ | | | |
+ left | | right ↔ left | | right ∙h H
+ ∨ ∨ ∨ ∨
+ h -------> i h ------------> i
+ bottom bottom ∙h H
+```
+
+of coherences of commuting squares of homotopies. We show in
+[`foundation.commuting-squares-of-homotopies`](foundation.commuting-squares-of-homotopies.md)
+that these maps are equivalences.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i)
+ where
+
+ right-whisker-concat-coherence-square-homotopies :
+ coherence-square-homotopies top left right bottom →
+ {u : (x : A) → B x} (H : i ~ u) →
+ coherence-square-homotopies top left (right ∙h H) (bottom ∙h H)
+ right-whisker-concat-coherence-square-homotopies coh H x =
+ right-whisker-concat-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( coh x)
+ ( H x)
+
+ right-unwhisker-cohernece-square-homotopies :
+ {u : (x : A) → B x} (H : i ~ u) →
+ coherence-square-homotopies top left (right ∙h H) (bottom ∙h H) →
+ coherence-square-homotopies top left right bottom
+ right-unwhisker-cohernece-square-homotopies H coh x =
+ right-unwhisker-cohernece-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( H x)
+ ( coh x)
+```
+
+### Double whiskering of commuting squares of homotopies
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h u v i : (x : A) → B x}
+ where
+
+ double-whisker-coherence-square-homotopies :
+ (p : f ~ g)
+ (top : g ~ u) (left : g ~ h) (right : u ~ v) (bottom : h ~ v)
+ (s : v ~ i) →
+ coherence-square-homotopies top left right bottom →
+ coherence-square-homotopies
+ ( p ∙h top)
+ ( p ∙h left)
+ ( right ∙h s)
+ ( bottom ∙h s)
+ double-whisker-coherence-square-homotopies p top left right bottom q H =
+ left-whisker-concat-coherence-square-homotopies p top left
+ ( right ∙h q)
+ ( bottom ∙h q)
+ ( right-whisker-concat-coherence-square-homotopies
+ ( top)
+ ( left)
+ ( right)
+ ( bottom)
+ ( H)
+ ( q))
+```
+
+#### Left splicing coherences of commuting squares of homotopies
+
+For any inverse pair of homotopies `H : g ~ u` and `K : u ~ g` equipped with
+`α : inv-htpy H ~ K` we obtain maps back and forth
+
+```text
+ top top
+ f -------> g f -----------> g
+ | | | |
+ left | | right ↔ left ∙h H | | right
+ ∨ ∨ ∨ ∨
+ h -------> i u -----------> i
+ bottom K ∙h bottom
+```
+
+of coherences of commuting squares of homotopies. We show in
+[`foundation.commuting-squares-of-homotopies`](foundation.commuting-squares-of-homotopies.md)
+that these maps are equivalences.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i)
+ where
+
+ left-splice-coherence-square-homotopies :
+ {u : (x : A) → B x} (H : h ~ u) (K : u ~ h) (α : inv-htpy H ~ K) →
+ coherence-square-homotopies top left right bottom →
+ coherence-square-homotopies top (left ∙h H) right (K ∙h bottom)
+ left-splice-coherence-square-homotopies H K α coh x =
+ left-splice-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( H x)
+ ( K x)
+ ( α x)
+ ( coh x)
+
+ left-unsplice-coherence-square-homotopies :
+ {u : (x : A) → B x} (H : h ~ u) (K : u ~ h) (α : inv-htpy H ~ K) →
+ coherence-square-homotopies top (left ∙h H) right (K ∙h bottom) →
+ coherence-square-homotopies top left right bottom
+ left-unsplice-coherence-square-homotopies H K α coh x =
+ left-unsplice-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( H x)
+ ( K x)
+ ( α x)
+ ( coh x)
+```
+
+#### Right splicing coherences of commuting squares of homotopies
+
+For any inverse pair of homotopies `H : g ~ u` and `K : u ~ g` equipped with
+`α : inv-htpy H ~ K` we obtain maps back and forth
+
+```text
+ top top ∙h H
+ f -------> g f --------> u
+ | | | |
+ left | | right ↔ left | | K ∙h right
+ ∨ ∨ ∨ ∨
+ h -------> i h --------> i
+ bottom bottom
+```
+
+of coherences of commuting squares of homotopies. We show in
+[`foundation.commuting-squares-of-homotopies`](foundation.commuting-squares-of-homotopies.md)
+that these maps are equivalences.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i)
+ where
+
+ right-splice-coherence-square-homotopies :
+ {u : (x : A) → B x} (H : g ~ u) (K : u ~ g) (α : inv-htpy H ~ K) →
+ coherence-square-homotopies top left right bottom →
+ coherence-square-homotopies (top ∙h H) left (inv-htpy H ∙h right) bottom
+ right-splice-coherence-square-homotopies H K α coh x =
+ right-splice-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( H x)
+ ( K x)
+ ( α x)
+ ( coh x)
+
+ right-unsplice-coherence-square-homotopies :
+ {u : (x : A) → B x} (H : g ~ u) (K : u ~ g) (α : inv-htpy H ~ K) →
+ coherence-square-homotopies (top ∙h H) left (inv-htpy H ∙h right) bottom →
+ coherence-square-homotopies top left right bottom
+ right-unsplice-coherence-square-homotopies H K α coh x =
+ right-unsplice-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( H x)
+ ( K x)
+ ( α x)
+ ( coh x)
+```
+
+### Horizontally pasting squares of homotopies
+
+Consider two squares of homotopies as in the diagram
+
+```text
+ top-left top-right
+ a -------------> b -------------> c
+ | | |
+ left | | middle | right
+ ∨ ∨ ∨
+ d -------------> e -------------> f
+ bottom-left bottom-right
+```
+
+with `H : left ∙h bottom-left ~ top-left ∙h middle` and
+`K : middle ∙h bottom-right ~ top-right ∙h right`. Then the outer square
+commutes.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {a b c d e f : (x : A) → B x}
+ (top-left : a ~ b) (top-right : b ~ c)
+ (left : a ~ d) (middle : b ~ e) (right : c ~ f)
+ (bottom-left : d ~ e) (bottom-right : e ~ f)
+ where
+
+ horizontal-pasting-coherence-square-homotopies :
+ coherence-square-homotopies top-left left middle bottom-left →
+ coherence-square-homotopies top-right middle right bottom-right →
+ coherence-square-homotopies
+ (top-left ∙h top-right) left right (bottom-left ∙h bottom-right)
+ horizontal-pasting-coherence-square-homotopies H K x =
+ horizontal-pasting-coherence-square-identifications
+ ( top-left x)
+ ( top-right x)
+ ( left x)
+ ( middle x)
+ ( right x)
+ ( bottom-left x)
+ ( bottom-right x)
+ ( H x)
+ ( K x)
+```
+
+### Vertically pasting squares of homotopies
+
+Consider two squares of homotopies as in the diagram
+
+```text
+ top
+ a --------> b
+ | |
+ top-left | | top-right
+ ∨ middle ∨
+ c --------> d
+ | |
+ bottom-left | | bottom-right
+ ∨ ∨
+ e --------> f
+ bottom
+```
+
+with `H : top-left ∙h middle ~ top ∙h top-right` and
+`K : bottom-left ∙h bottom ~ middle ∙h bottom-right`. Then the outer square
+commutes.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {a b c d e f : (x : A) → B x}
+ (top : a ~ b) (top-left : a ~ c) (top-right : b ~ d)
+ (middle : c ~ d) (bottom-left : c ~ e) (bottom-right : d ~ f)
+ (bottom : e ~ f)
+ where
+
+ vertical-pasting-coherence-square-homotopies :
+ coherence-square-homotopies top top-left top-right middle →
+ coherence-square-homotopies middle bottom-left bottom-right bottom →
+ coherence-square-homotopies
+ top (top-left ∙h bottom-left) (top-right ∙h bottom-right) bottom
+ vertical-pasting-coherence-square-homotopies H K x =
+ vertical-pasting-coherence-square-identifications
+ ( top x)
+ ( top-left x)
+ ( top-right x)
+ ( middle x)
+ ( bottom-left x)
+ ( bottom-right x)
+ ( bottom x)
+ ( H x)
+ ( K x)
+```
+
+## Properties
+
+### Left unit law for horizontal pasting of commuting squares of homotopies
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ where
+
+ left-unit-law-horizontal-pasting-coherence-square-homotopies :
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) →
+ (H : coherence-square-homotopies top left right bottom) →
+ horizontal-pasting-coherence-square-homotopies
+ ( refl-htpy)
+ ( top)
+ ( left)
+ ( left)
+ ( right)
+ ( refl-htpy)
+ ( bottom)
+ ( horizontal-refl-coherence-square-homotopies left)
+ ( H) ~
+ H
+ left-unit-law-horizontal-pasting-coherence-square-homotopies
+ top left right bottom H x =
+ left-unit-law-horizontal-pasting-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( H x)
+```
+
+### Right unit law for horizontal pasting of commuting squares of homotopies
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ where
+
+ right-unit-law-horizontal-pasting-coherence-square-homotopies :
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) →
+ (H : coherence-square-homotopies top left right bottom) →
+ horizontal-pasting-coherence-square-homotopies
+ ( top)
+ ( refl-htpy)
+ ( left)
+ ( right)
+ ( right)
+ ( bottom)
+ ( refl-htpy)
+ ( H)
+ ( horizontal-refl-coherence-square-homotopies right) ∙h
+ right-whisker-concat-htpy right-unit-htpy right ~
+ left-whisker-concat-htpy left right-unit-htpy ∙h H
+ right-unit-law-horizontal-pasting-coherence-square-homotopies
+ top left right bottom H x =
+ right-unit-law-horizontal-pasting-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( H x)
+```
+
+### Left unit law for vertical pasting of commuting squares of homotopies
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ where
+
+ left-unit-law-vertical-pasting-coherence-square-homotopies :
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) →
+ (H : coherence-square-homotopies top left right bottom) →
+ vertical-pasting-coherence-square-homotopies
+ ( top)
+ ( refl-htpy)
+ ( refl-htpy)
+ ( top)
+ ( left)
+ ( right)
+ ( bottom)
+ ( vertical-refl-coherence-square-homotopies top)
+ ( H) ~
+ H
+ left-unit-law-vertical-pasting-coherence-square-homotopies
+ top left right bottom H x =
+ left-unit-law-vertical-pasting-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( H x)
+```
+
+### Right unit law for vertical pasting of commuting squares of homotopies
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ where
+
+ right-unit-law-vertical-pasting-coherence-square-homotopies :
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) →
+ (H : coherence-square-homotopies top left right bottom) →
+ vertical-pasting-coherence-square-homotopies
+ ( top)
+ ( left)
+ ( right)
+ ( bottom)
+ ( refl-htpy)
+ ( refl-htpy)
+ ( bottom)
+ ( H)
+ ( vertical-refl-coherence-square-homotopies bottom) ∙h
+ left-whisker-concat-htpy top right-unit-htpy ~
+ right-whisker-concat-htpy right-unit-htpy bottom ∙h H
+ right-unit-law-vertical-pasting-coherence-square-homotopies
+ top left right bottom H x =
+ right-unit-law-vertical-pasting-coherence-square-identifications
+ ( top x)
+ ( left x)
+ ( right x)
+ ( bottom x)
+ ( H x)
+```
+
+### Computing the right whiskering of a vertically constant square with a homotopy
+
+Consider the vertically constant square of homotopies
+
+```text
+ H
+ f -----> g
+ | |
+ refl | | refl
+ ∨ ∨
+ f -----> g
+ H
+```
+
+at a homotopy `H : f ~ g`, and consider a homotopy `K : g ~ h`. Then the right
+whiskering of the above square with `K` is the commuting square of homotopies
+
+```text
+ H
+ f -------> g
+ | |
+ refl | refl | K
+ ∨ ∨
+ f -------> h
+ H ∙h K
+```
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h : (x : A) → B x}
+ where
+
+ right-whisker-concat-vertical-refl-coherence-square-homotopies :
+ (H : f ~ g) (K : g ~ h) →
+ right-whisker-concat-coherence-square-homotopies H refl-htpy refl-htpy H
+ ( vertical-refl-coherence-square-homotopies H)
+ ( K) ~
+ refl-htpy
+ right-whisker-concat-vertical-refl-coherence-square-homotopies H K x =
+ right-whisker-concat-vertical-refl-coherence-square-identifications
+ ( H x)
+ ( K x)
+```
+
+### Computing the right whiskering of a horizontally constant square with a homotopy
+
+Consider a horizontally constant commuting square of homotopies
+
+```text
+ refl-htpy
+ f ----------> f
+ | |
+ H | | H
+ ∨ ∨
+ g ----------> g
+ refl-htpy
+```
+
+at a homotopy `H` and consider a homotopy `K : g ~ h`. Then the right whiskering
+of the above square with `K` is the square
+
+```text
+ refl-htpy
+ f ----------> f
+ | |
+ H | refl-htpy | H ∙h K
+ ∨ ∨
+ g ----------> h.
+ K
+```
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h : (x : A) → B x}
+ where
+
+ right-whisker-concat-horizontal-refl-coherence-square-homotopies :
+ (H : f ~ g) (K : g ~ h) →
+ right-whisker-concat-coherence-square-homotopies refl-htpy H H refl-htpy
+ ( horizontal-refl-coherence-square-homotopies H)
+ ( K) ~
+ refl-htpy
+ right-whisker-concat-horizontal-refl-coherence-square-homotopies H K x =
+ right-whisker-concat-horizontal-refl-coherence-square-identifications
+ ( H x)
+ ( K x)
+```
+
+### Computing the left whiskering of a horizontally constant square with a homotopy
+
+Consider a homotopy `H : f ~ g` and a horizontally constant commuting square of
+homotopies
+
+```text
+ refl-htpy
+ g ----------> g
+ | |
+ K | | K
+ ∨ ∨
+ h ----------> h
+ refl-htpy
+```
+
+at a homotopy `K : g ~ h`. The the left whiskering of the above square with `H`
+is the commuting square
+
+```text
+ K ∙h refl-htpy
+ f -----------------------------------------------------------------> g
+ | |
+ K ∙h H | right-unit-htpy ∙h (right-whisker-concat-htpy right-unit-htpy H)⁻¹ | H
+ ∨ ∨
+ h -----------------------------------------------------------------> h.
+ refl-htpy
+```
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h : (x : A) → B x}
+ where
+
+ left-whisker-concat-horizontal-refl-coherence-square-homotopies :
+ (H : f ~ g) (K : g ~ h) →
+ left-whisker-concat-coherence-square-homotopies H refl-htpy K K refl-htpy
+ ( horizontal-refl-coherence-square-homotopies K) ∙h
+ right-whisker-concat-htpy right-unit-htpy K ~
+ right-unit-htpy
+ left-whisker-concat-horizontal-refl-coherence-square-homotopies H K x =
+ left-whisker-concat-horizontal-refl-coherence-square-identifications
+ ( H x)
+ ( K x)
+
+ left-whisker-concat-horizontal-refl-coherence-square-homotopies' :
+ (H : f ~ g) (K : g ~ h) →
+ left-whisker-concat-coherence-square-homotopies H refl-htpy K K refl-htpy
+ ( horizontal-refl-coherence-square-homotopies K) ~
+ right-unit-htpy ∙h inv-htpy (right-whisker-concat-htpy right-unit-htpy K)
+ left-whisker-concat-horizontal-refl-coherence-square-homotopies' H K x =
+ left-whisker-concat-horizontal-refl-coherence-square-identifications'
+ ( H x)
+ ( K x)
+```
+
+### Computing the left whiskering of a vertically constant square with a homotopy
+
+Consider the vertically constant square of homotopies
+
+```text
+ K
+ g -----> h
+ | |
+ refl-htpy | | refl-htpy
+ ∨ ∨
+ g -----> h
+ K
+```
+
+at a homotopy `K : g ~ h` and consider a homotopy `H : f ~ g`. Then the left
+whiskering of the above square with `H` is the square
+
+```text
+ H ∙h K
+ f ----------------------------------------------------------> h
+ | |
+ H ∙h refl-htpy | right-whisker-concat-htpy right-unit-htpy K ∙h right-unit⁻¹ | refl-htpy
+ ∨ ∨
+ g ----------------------------------------------------------> h.
+ K
+```
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h : (x : A) → B x}
+ where
+
+ left-whisker-concat-vertical-refl-coherence-square-homotopies :
+ (H : f ~ g) (K : g ~ h) →
+ left-whisker-concat-coherence-square-homotopies H K refl-htpy refl-htpy K
+ ( vertical-refl-coherence-square-homotopies K) ∙h
+ right-unit-htpy ~
+ right-whisker-concat-htpy right-unit-htpy K
+ left-whisker-concat-vertical-refl-coherence-square-homotopies H K x =
+ left-whisker-concat-vertical-refl-coherence-square-identifications
+ ( H x)
+ ( K x)
+
+ left-whisker-concat-vertical-refl-coherence-square-homotopies' :
+ (H : f ~ g) (K : g ~ h) →
+ left-whisker-concat-coherence-square-homotopies H K refl-htpy refl-htpy K
+ ( vertical-refl-coherence-square-homotopies K) ~
+ right-whisker-concat-htpy right-unit-htpy K ∙h inv-htpy right-unit-htpy
+ left-whisker-concat-vertical-refl-coherence-square-homotopies' H K x =
+ left-whisker-concat-vertical-refl-coherence-square-identifications'
+ ( H x)
+ ( K x)
+```
+
+### Left whiskering horizontal concatenations of squares with homotopies
+
+Consider a commuting diagram of homotopies of the form
+
+```text
+ top-left top-right
+ a -------------> c -------------> e
+ | | |
+ left | | middle | right
+ ∨ ∨ ∨
+ b -------------> d -------------> f
+ bottom-left bottom-right
+```
+
+and consider a homotopy `H : f ~ a`. Then the left whiskering of `H` and the
+horizontal concatenation of coherences of commuting squares is up to
+associativity the horizontal concatenation of the squares
+
+```text
+ H ∙h top-left top-right
+ u -------------> c -------------> e
+ | | |
+ H ∙h left | | middle | right
+ ∨ ∨ ∨
+ b -------------> d -------------> f
+ bottom-left bottom-right
+```
+
+where the left square is the left whiskering of `H` and the original left
+square.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
+ where
+
+ left-whisker-concat-horizontal-pasting-coherence-square-homotopies :
+ {u a b c d e f : (x : A) → B x} (H : u ~ a)
+ (top-left : a ~ c) (top-right : c ~ e)
+ (left : a ~ b) (middle : c ~ d) (right : e ~ f)
+ (bottom-left : b ~ d) (bottom-right : d ~ f)
+ (l : coherence-square-homotopies top-left left middle bottom-left)
+ (r : coherence-square-homotopies top-right middle right bottom-right) →
+ left-whisker-concat-coherence-square-homotopies H
+ ( top-left ∙h top-right)
+ ( left)
+ ( right)
+ ( bottom-left ∙h bottom-right)
+ ( horizontal-pasting-coherence-square-homotopies
+ ( top-left)
+ ( top-right)
+ ( left)
+ ( middle)
+ ( right)
+ ( bottom-left)
+ ( bottom-right)
+ ( l)
+ ( r)) ~
+ horizontal-pasting-coherence-square-homotopies
+ ( H ∙h top-left)
+ ( top-right)
+ ( H ∙h left)
+ ( middle)
+ ( right)
+ ( bottom-left)
+ ( bottom-right)
+ ( left-whisker-concat-coherence-square-homotopies H
+ ( top-left)
+ ( left)
+ ( middle)
+ ( bottom-left)
+ ( l))
+ ( r) ∙h
+ right-whisker-concat-htpy
+ ( assoc-htpy H top-left top-right)
+ ( right)
+ left-whisker-concat-horizontal-pasting-coherence-square-homotopies
+ H top-left top-right left middle right bottom-left bottom-right l r x =
+ left-whisker-concat-horizontal-pasting-coherence-square-identifications
+ ( H x)
+ ( top-left x)
+ ( top-right x)
+ ( left x)
+ ( middle x)
+ ( right x)
+ ( bottom-left x)
+ ( bottom-right x)
+ ( l x)
+ ( r x)
+```
+
+### Left whiskering vertical concatenations of squares with homotopies
+
+Consider two squares of homotopies as in the diagram
+
+```text
+ top
+ a --------> b
+ | |
+ top-left | | top-right
+ ∨ middle ∨
+ c --------> d
+ | |
+ bottom-left | | bottom-right
+ ∨ ∨
+ e --------> f
+ bottom
+```
+
+and consider a homotopy `H : f ~ a`. Then the left whiskering of `H` with the
+vertical pasting of the two squares above is up to associativity the vertical
+pasting of the squares
+
+```text
+ H ∙h top
+ u --------> b
+ | |
+ H ∙h top-left | | top-right
+ ∨ middle ∨
+ c --------> d
+ | |
+ bottom-left | | bottom-right
+ ∨ ∨
+ e --------> f.
+ bottom
+```
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
+ where
+
+ left-whisker-concat-vertical-concat-coherence-square-homotopies :
+ {u a b c d e f : (x : A) → B x} (H : u ~ a) →
+ (top : a ~ b) (top-left : a ~ c) (top-right : b ~ d) (middle : c ~ d)
+ (bottom-left : c ~ e) (bottom-right : d ~ f) (bottom : e ~ f)
+ (t : coherence-square-homotopies top top-left top-right middle) →
+ (b :
+ coherence-square-homotopies middle bottom-left bottom-right bottom) →
+ right-whisker-concat-htpy (assoc-htpy H top-left bottom-left) bottom ∙h
+ left-whisker-concat-coherence-square-homotopies H
+ ( top)
+ ( top-left ∙h bottom-left)
+ ( top-right ∙h bottom-right)
+ ( bottom)
+ ( vertical-pasting-coherence-square-homotopies
+ ( top)
+ ( top-left)
+ ( top-right)
+ ( middle)
+ ( bottom-left)
+ ( bottom-right)
+ ( bottom)
+ ( t)
+ ( b)) ~
+ vertical-pasting-coherence-square-homotopies
+ ( H ∙h top)
+ ( H ∙h top-left)
+ ( top-right)
+ ( middle)
+ ( bottom-left)
+ ( bottom-right)
+ ( bottom)
+ ( left-whisker-concat-coherence-square-homotopies H
+ ( top)
+ ( top-left)
+ ( top-right)
+ ( middle)
+ ( t))
+ ( b)
+ left-whisker-concat-vertical-concat-coherence-square-homotopies
+ H top top-left top-right middle bottom-left bottom-right bottom t b x =
+ left-whisker-concat-vertical-concat-coherence-square-identifications
+ ( H x)
+ ( top x)
+ ( top-left x)
+ ( top-right x)
+ ( middle x)
+ ( bottom-left x)
+ ( bottom-right x)
+ ( bottom x)
+ ( t x)
+ ( b x)
+```
+
+### Right whiskering horizontal pastings of commuting squares of homotopies
+
+Consider a commuting diagram of homotopies of the form
+
+```text
+ top-left top-right
+ a -------------> c -------------> e
+ | | |
+ left | | middle | right
+ ∨ ∨ ∨
+ b -------------> d -------------> f
+ bottom-left bottom-right
+```
+
+and consider a homotopy `K : f ~ g`. Then the right whiskering of the horizontal
+pasting of the squares above is up to associativity the horizontal pasting of
+the squares
+
+```text
+ top-left top-right
+ a -------------> c ------------------> e
+ | | |
+ left | | middle | right ∙h K
+ ∨ ∨ ∨
+ b -------------> d ------------------> g
+ bottom-left bottom-right ∙h K
+```
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
+ where
+
+ right-whisker-concat-horizontal-pasting-coherence-square-homotopies :
+ {a b c d e f g : (x : A) → B x}
+ (top-left : a ~ c) (top-right : c ~ e)
+ (left : a ~ b) (middle : c ~ d) (right : e ~ f)
+ (bottom-left : b ~ d) (bottom-right : d ~ f)
+ (l : coherence-square-homotopies top-left left middle bottom-left) →
+ (r : coherence-square-homotopies top-right middle right bottom-right) →
+ (K : f ~ g) →
+ right-whisker-concat-coherence-square-homotopies
+ ( top-left ∙h top-right)
+ ( left)
+ ( right)
+ ( bottom-left ∙h bottom-right)
+ ( horizontal-pasting-coherence-square-homotopies
+ ( top-left)
+ ( top-right)
+ ( left)
+ ( middle)
+ ( right)
+ ( bottom-left)
+ ( bottom-right)
+ ( l)
+ ( r))
+ ( K) ~
+ left-whisker-concat-htpy left (assoc-htpy bottom-left bottom-right K) ∙h
+ horizontal-pasting-coherence-square-homotopies
+ ( top-left)
+ ( top-right)
+ ( left)
+ ( middle)
+ ( right ∙h K)
+ ( bottom-left)
+ ( bottom-right ∙h K)
+ ( l)
+ ( right-whisker-concat-coherence-square-homotopies
+ ( top-right)
+ ( middle)
+ ( right)
+ ( bottom-right)
+ ( r)
+ ( K))
+ right-whisker-concat-horizontal-pasting-coherence-square-homotopies
+ top-left top-right left middle right bottom-left bottom-right l r K x =
+ right-whisker-concat-horizontal-pasting-coherence-square-identifications
+ ( top-left x)
+ ( top-right x)
+ ( left x)
+ ( middle x)
+ ( right x)
+ ( bottom-left x)
+ ( bottom-right x)
+ ( l x)
+ ( r x)
+ ( K x)
+```
+
+### Right whiskering vertical concatenations of squares with homotopies
+
+Consider two squares of homotopies as in the diagram
+
+```text
+ top
+ a --------> b
+ | |
+ top-left | | top-right
+ ∨ middle ∨
+ c --------> d
+ | |
+ bottom-left | | bottom-right
+ ∨ ∨
+ e --------> f
+ bottom
+```
+
+and consider a homotopy `K : f ~ g`. Then the right whiskering of the vertical
+pasting of the two squares above with `K` is up to associativity the vertical
+pasting of the squares
+
+```text
+ top
+ a ------------> b
+ | |
+ top-left | | top-right
+ ∨ middle ∨
+ c ------------> d
+ | |
+ bottom-left | | bottom-right ∙h K
+ ∨ ∨
+ e ------------> g.
+ bottom ∙h K
+```
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
+ where
+
+ right-whisker-concat-vertical-pasting-coherence-square-homotopies :
+ {a b c d e f g : (x : A) → B x}
+ (top : a ~ b) (top-left : a ~ c) (top-right : b ~ d)
+ (middle : c ~ d)
+ (bottom-left : c ~ e) (bottom-right : d ~ f) (bottom : e ~ f)
+ (t : coherence-square-homotopies top top-left top-right middle) →
+ (b :
+ coherence-square-homotopies middle bottom-left bottom-right bottom) →
+ (K : f ~ g) →
+ right-whisker-concat-coherence-square-homotopies
+ ( top)
+ ( top-left ∙h bottom-left)
+ ( top-right ∙h bottom-right)
+ ( bottom)
+ ( vertical-pasting-coherence-square-homotopies
+ ( top)
+ ( top-left)
+ ( top-right)
+ ( middle)
+ ( bottom-left)
+ ( bottom-right)
+ ( bottom)
+ ( t)
+ ( b))
+ ( K) ∙h
+ left-whisker-concat-htpy top (assoc-htpy top-right bottom-right K) ~
+ vertical-pasting-coherence-square-homotopies
+ ( top)
+ ( top-left)
+ ( top-right)
+ ( middle)
+ ( bottom-left)
+ ( bottom-right ∙h K)
+ ( bottom ∙h K)
+ ( t)
+ ( right-whisker-concat-coherence-square-homotopies
+ ( middle)
+ ( bottom-left)
+ ( bottom-right)
+ ( bottom)
+ ( b)
+ ( K))
+ right-whisker-concat-vertical-pasting-coherence-square-homotopies
+ top top-left top-right middle bottom-left bottom-right bottom t b K x =
+ right-whisker-concat-vertical-pasting-coherence-square-identifications
+ ( top x)
+ ( top-left x)
+ ( top-right x)
+ ( middle x)
+ ( bottom-left x)
+ ( bottom-right x)
+ ( bottom x)
+ ( t x)
+ ( b x)
+ ( K x)
+```
diff --git a/src/foundation-core/commuting-squares-of-identifications.lagda.md b/src/foundation-core/commuting-squares-of-identifications.lagda.md
new file mode 100644
index 0000000000..a3d8f14744
--- /dev/null
+++ b/src/foundation-core/commuting-squares-of-identifications.lagda.md
@@ -0,0 +1,1579 @@
+# Commuting squares of identifications
+
+```agda
+module foundation-core.commuting-squares-of-identifications where
+```
+
+Imports
+
+```agda
+open import foundation.action-on-identifications-functions
+open import foundation.universe-levels
+
+open import foundation-core.function-types
+open import foundation-core.identity-types
+open import foundation-core.retractions
+open import foundation-core.sections
+open import foundation-core.whiskering-identifications-concatenation
+```
+
+
+
+## Idea
+
+A square of [identifications](foundation-core.identity-types.md)
+
+```text
+ top
+ x -------> y
+ | |
+ left | | right
+ ∨ ∨
+ z -------> w
+ bottom
+```
+
+is said to be a
+{{#concept "commuting square" Disambiguation="identifications" Agda=coherence-square-identifications}}
+if there is an identification `left ∙ bottom = top ∙ right`. Such an
+identification is called a
+{{#concept "coherence" Disambiguation="commuting square of identifications" Agda=coherence-square-identifications}}
+of the square.
+
+## Definitions
+
+### Commuting squares of identifications
+
+```agda
+module _
+ {l : Level} {A : UU l} {x y z w : A}
+ (top : x = y) (left : x = z) (right : y = w) (bottom : z = w)
+ where
+
+ coherence-square-identifications : UU l
+ coherence-square-identifications = left ∙ bottom = top ∙ right
+```
+
+### Horizontally constant squares
+
+{{#concept "Horizontally constant squares" Disambiguation="identifications" Agda=horizontal-refl-coherence-square-identifications}}
+are commuting squares of identifications of the form
+
+```text
+ refl
+ a -----> a
+ | |
+ p | | p
+ ∨ ∨
+ b -----> b.
+ refl
+```
+
+```agda
+module _
+ {l : Level} {A : UU l} {a b : A} (p : a = b)
+ where
+
+ horizontal-refl-coherence-square-identifications :
+ coherence-square-identifications refl p p refl
+ horizontal-refl-coherence-square-identifications = right-unit
+```
+
+### Vertically constant squares
+
+{{#concept "Vertically constant squares" Disambiguation="identifications" Agda=vertical-refl-coherence-square-identifications}}
+are commuting squares of identifications of the form
+
+```text
+ p
+ a -----> b
+ | |
+ refl | | refl
+ ∨ ∨
+ a -----> b.
+ p
+```
+
+```agda
+module _
+ {l : Level} {A : UU l} {a b : A} (p : a = b)
+ where
+
+ vertical-refl-coherence-square-identifications :
+ coherence-square-identifications p refl refl p
+ vertical-refl-coherence-square-identifications = inv right-unit
+```
+
+## Operations
+
+### Inverting squares of identifications horizontally
+
+Given a commuting square of identifications
+
+```text
+ top
+ x -------> y
+ | |
+ left | | right
+ ∨ ∨
+ z -------> w,
+ bottom
+```
+
+the square of identifications
+
+```text
+ inv top
+ y ------------> x
+ | |
+ right | | left
+ ∨ ∨
+ w ------------> z
+ inv bottom
+```
+
+commutes.
+
+```agda
+module _
+ {l : Level} {A : UU l} {x y z w : A}
+ where
+
+ horizontal-inv-coherence-square-identifications :
+ (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) →
+ coherence-square-identifications top left right bottom →
+ coherence-square-identifications (inv top) right left (inv bottom)
+ horizontal-inv-coherence-square-identifications refl left right bottom coh =
+ inv (right-transpose-eq-concat left bottom right coh)
+```
+
+### Inverting squares of identifications vertically
+
+Given a commuting square of identifications
+
+```text
+ top
+ x -------> y
+ | |
+ left | | right
+ ∨ ∨
+ z -------> w,
+ bottom
+```
+
+the square of identifications
+
+```text
+ bottom
+ z -------> w
+ | |
+ inv left | | inv right
+ ∨ ∨
+ x -------> y
+ top
+```
+
+commutes.
+
+```agda
+module _
+ {l : Level} {A : UU l} {x y z w : A}
+ where
+
+ vertical-inv-coherence-square-identifications :
+ (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) →
+ coherence-square-identifications top left right bottom →
+ coherence-square-identifications bottom (inv left) (inv right) top
+ vertical-inv-coherence-square-identifications top refl right bottom coh =
+ right-transpose-eq-concat top right (bottom) (inv coh)
+```
+
+### Functions acting on squares of identifications
+
+Given a commuting square of identifications
+
+```text
+ top
+ x -------> y
+ | |
+ left | | right
+ ∨ ∨
+ z -------> w
+ bottom
+```
+
+in a type `A`, and given a map `f : A → B`, the square of identifications
+
+```text
+ ap f top
+ f x -----------> f y
+ | |
+ ap f left | | ap f right
+ ∨ ∨
+ z -------------> w
+ ap f bottom
+```
+
+commutes.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} {x y z w : A} (f : A → B)
+ where
+
+ map-coherence-square-identifications :
+ (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) →
+ coherence-square-identifications top left right bottom →
+ coherence-square-identifications
+ ( ap f top)
+ ( ap f left)
+ ( ap f right)
+ ( ap f bottom)
+ map-coherence-square-identifications refl refl _ _ coh = ap (ap f) coh
+```
+
+### Concatenating identifications of edges and coherences of commuting squares of identifications
+
+Consider a commuting square of identifications and an identification of one of
+the four sides with another identification, as for example in the diagram below:
+
+```text
+ top
+ a ---------> b
+ | | |
+ left | right |=| right'
+ ∨ ∨ ∨
+ c ---------> d.
+ bottom
+```
+
+Then any identification witnessing that the square commutes can be concatenated
+with the identification on the side, to obtain a new commuting square of
+identifications.
+
+**Note.** To avoid cyclic module dependencies we will give direct proofs that
+concatenating identifications of edges of a square with the coherence of its
+commutativity is an equivalence.
+
+#### Concatenating identifications of the top edge with a coherence of a commuting square of identifications
+
+Consider a commuting diagram of identifications
+
+```text
+ top'
+ ------->
+ x -------> y
+ | top |
+ left | | right
+ ∨ ∨
+ z -------> w.
+ bottom
+```
+
+with an identification `top = top'`. Then we get an equivalence
+
+```text
+ top top'
+ x -------> y x -------> y
+ | | | |
+ left | | right ≃ left | | right
+ ∨ ∨ ∨ ∨
+ z -------> w z -------> w.
+ bottom bottom
+```
+
+```agda
+module _
+ {l : Level} {A : UU l} {x y z w : A}
+ (top : x = y) (left : x = z) (right : y = w) (bottom : z = w)
+ {top' : x = y} (s : top = top')
+ where
+
+ concat-top-identification-coherence-square-identifications :
+ coherence-square-identifications top left right bottom →
+ coherence-square-identifications top' left right bottom
+ concat-top-identification-coherence-square-identifications t =
+ t ∙ ap (concat' _ right) s
+
+ inv-concat-top-identification-coherence-square-identifications :
+ coherence-square-identifications top' left right bottom →
+ coherence-square-identifications top left right bottom
+ inv-concat-top-identification-coherence-square-identifications t =
+ t ∙ inv (ap (concat' _ right) s)
+
+ is-section-inv-concat-top-identification-coherence-square-identifications :
+ is-section
+ concat-top-identification-coherence-square-identifications
+ inv-concat-top-identification-coherence-square-identifications
+ is-section-inv-concat-top-identification-coherence-square-identifications =
+ is-section-inv-concat' (ap (concat' _ right) s)
+
+ is-retraction-inv-concat-top-identification-coherence-square-identifications :
+ is-retraction
+ concat-top-identification-coherence-square-identifications
+ inv-concat-top-identification-coherence-square-identifications
+ is-retraction-inv-concat-top-identification-coherence-square-identifications =
+ is-retraction-inv-concat' (ap (concat' _ right) s)
+```
+
+We record that this construction is an equivalence in
+[`foundation.commuting-squares-of-identifications`](foundation.commuting-squares-of-identifications.md).
+
+#### Concatenating identifications of the left edge with a coherence of a commuting square of identifications
+
+Consider a commuting diagram of identifications
+
+```text
+ top
+ x -------> y
+ | | |
+ left' | | left | right
+ ∨ ∨ ∨
+ z -------> w.
+ bottom
+```
+
+with an identification `left = left'`. Then we get an equivalence
+
+```text
+ top top
+ x -------> y x -------> y
+ | | | |
+ left | | right ≃ left' | | right
+ ∨ ∨ ∨ ∨
+ z -------> w z -------> w.
+ bottom bottom
+```
+
+```agda
+module _
+ {l : Level} {A : UU l} {x y z w : A}
+ (top : x = y) (left : x = z) (right : y = w) (bottom : z = w)
+ {left' : x = z} (s : left = left')
+ where
+
+ concat-left-identification-coherence-square-identifications :
+ coherence-square-identifications top left right bottom →
+ coherence-square-identifications top left' right bottom
+ concat-left-identification-coherence-square-identifications t =
+ inv (ap (concat' _ bottom) s) ∙ t
+
+ inv-concat-left-identification-coherence-square-identifications :
+ coherence-square-identifications top left' right bottom →
+ coherence-square-identifications top left right bottom
+ inv-concat-left-identification-coherence-square-identifications t =
+ ap (concat' _ bottom) s ∙ t
+
+ is-section-inv-concat-left-identification-coherence-square-identifications :
+ is-section
+ concat-left-identification-coherence-square-identifications
+ inv-concat-left-identification-coherence-square-identifications
+ is-section-inv-concat-left-identification-coherence-square-identifications =
+ is-retraction-inv-concat (ap (concat' _ bottom) s)
+
+ is-retraction-inv-concat-left-identification-coherence-square-identifications :
+ is-retraction
+ concat-left-identification-coherence-square-identifications
+ inv-concat-left-identification-coherence-square-identifications
+ is-retraction-inv-concat-left-identification-coherence-square-identifications =
+ is-section-inv-concat (ap (concat' _ bottom) s)
+```
+
+We record that this construction is an equivalence in
+[`foundation.commuting-squares-of-identifications`](foundation.commuting-squares-of-identifications.md).
+
+#### Concatenating identifications of the right edge with a coherence of a commuting square of identifications
+
+Consider a commuting diagram of identifications
+
+```text
+ top
+ x -------> y
+ | | |
+ left | right | | right'
+ ∨ ∨ ∨
+ z -------> w.
+ bottom
+```
+
+with an identification `right = right'`. Then we get an equivalence
+
+```text
+ top top
+ x -------> y x -------> y
+ | | | |
+ left | | right ≃ left | | right'
+ ∨ ∨ ∨ ∨
+ z -------> w z -------> w.
+ bottom bottom
+```
+
+```agda
+module _
+ {l : Level} {A : UU l} {x y z w : A}
+ (top : x = y) (left : x = z) (right : y = w) (bottom : z = w)
+ {right' : y = w} (s : right = right')
+ where
+
+ concat-right-identification-coherence-square-identifications :
+ coherence-square-identifications top left right bottom →
+ coherence-square-identifications top left right' bottom
+ concat-right-identification-coherence-square-identifications t =
+ t ∙ ap (concat top _) s
+
+ inv-concat-right-identification-coherence-square-identifications :
+ coherence-square-identifications top left right' bottom →
+ coherence-square-identifications top left right bottom
+ inv-concat-right-identification-coherence-square-identifications t =
+ t ∙ inv (ap (concat top _) s)
+
+ is-section-inv-concat-right-identification-coherence-square-identifications :
+ is-section
+ concat-right-identification-coherence-square-identifications
+ inv-concat-right-identification-coherence-square-identifications
+ is-section-inv-concat-right-identification-coherence-square-identifications =
+ is-section-inv-concat' (ap (concat top _) s)
+
+ is-retraction-inv-concat-right-identification-coherence-square-identifications :
+ is-retraction
+ concat-right-identification-coherence-square-identifications
+ inv-concat-right-identification-coherence-square-identifications
+ is-retraction-inv-concat-right-identification-coherence-square-identifications =
+ is-retraction-inv-concat' (ap (concat top _) s)
+```
+
+We record that this construction is an equivalence in
+[`foundation.commuting-squares-of-identifications`](foundation.commuting-squares-of-identifications.md).
+
+#### Concatenating identifications of the bottom edge with a coherence of a commuting square of identifications
+
+Consider a commuting diagram of identifications
+
+```text
+ top
+ x -------> y
+ | |
+ left | | right
+ ∨ bottom ∨
+ z -------> w.
+ ------->
+ bottom'
+```
+
+with an identification `bottom = bottom'`. Then we get an equivalence
+
+```text
+ top top
+ x -------> y x -------> y
+ | | | |
+ left | | right ≃ left | | right
+ ∨ ∨ ∨ ∨
+ z -------> w z -------> w.
+ bottom bottom'
+```
+
+```agda
+module _
+ {l : Level} {A : UU l} {x y z w : A}
+ (top : x = y) (left : x = z) (right : y = w) (bottom : z = w)
+ {bottom' : z = w} (s : bottom = bottom')
+ where
+
+ concat-bottom-identification-coherence-square-identifications :
+ coherence-square-identifications top left right bottom →
+ coherence-square-identifications top left right bottom'
+ concat-bottom-identification-coherence-square-identifications t =
+ inv (ap (concat left _) s) ∙ t
+
+ inv-concat-bottom-identification-coherence-square-identifications :
+ coherence-square-identifications top left right bottom' →
+ coherence-square-identifications top left right bottom
+ inv-concat-bottom-identification-coherence-square-identifications t =
+ ap (concat left _) s ∙ t
+
+ is-section-inv-concat-bottom-identification-coherence-square-identifications :
+ is-section
+ concat-bottom-identification-coherence-square-identifications
+ inv-concat-bottom-identification-coherence-square-identifications
+ is-section-inv-concat-bottom-identification-coherence-square-identifications =
+ is-retraction-inv-concat (ap (concat left _) s)
+
+ is-retraction-inv-concat-bottom-identification-coherence-square-identifications :
+ is-retraction
+ concat-bottom-identification-coherence-square-identifications
+ inv-concat-bottom-identification-coherence-square-identifications
+ is-retraction-inv-concat-bottom-identification-coherence-square-identifications =
+ is-section-inv-concat (ap (concat left _) s)
+```
+
+We record that this construction is an equivalence in
+[`foundation.commuting-squares-of-identifications`](foundation.commuting-squares-of-identifications.md).
+
+### Whiskering and splicing coherences of commuting squares of identifications
+
+Given a commuting square of identifications
+
+```text
+ top
+ x -------> y
+ | |
+ left | | right
+ ∨ ∨
+ z -------> w,
+ bottom
+```
+
+we may consider four ways of attaching new identifications to it:
+
+1. Prepending `p : u = x` to the left gives us a commuting square
+
+ ```text
+ p ∙ top
+ u -------> y
+ | |
+ p ∙ left | | right
+ ∨ ∨
+ z -------> w.
+ bottom
+ ```
+
+ More precisely, we have an equivalence
+
+ ```text
+ (left ∙ bottom = top ∙ right) ≃ ((p ∙ left) ∙ bottom = (p ∙ top) ∙ right).
+ ```
+
+2. Appending an identification `p : w = u` to the right gives a commuting
+ square of identifications
+
+ ```text
+ top
+ x ------------> y
+ | |
+ left | | right ∙ p
+ ∨ ∨
+ z ------------> u.
+ bottom ∙ p
+ ```
+
+ More precisely, we have an equivalence
+
+ ```text
+ (left ∙ bottom = top ∙ right) ≃ (left ∙ (bottom ∙ p) = top ∙ (right ∙ p)).
+ ```
+
+3. Splicing an identification `p : z = u` and its inverse into the middle gives
+ a commuting square of identifications
+
+ ```text
+ top
+ x --------------> y
+ | |
+ left ∙ p | | right
+ ∨ ∨
+ u --------------> w.
+ p⁻¹ ∙ bottom
+ ```
+
+ More precisely, we have an equivalence
+
+ ```text
+ (left ∙ bottom = top ∙ right) ≃ ((left ∙ p) ∙ (p⁻¹ ∙ bottom) = top ∙ right).
+ ```
+
+ Similarly, we have an equivalence
+
+ ```text
+ (left ∙ bottom = top ∙ right) ≃ ((left ∙ p⁻¹) ∙ (p ∙ bottom) = top ∙ right).
+ ```
+
+4. Splicing an identification `p : y = u` and its inverse into the middle gives
+ a commuting square of identifications
+
+ ```text
+ top ∙ p
+ x --------> u
+ | |
+ left | | p⁻¹ ∙ right
+ ∨ ∨
+ z --------> w.
+ bottom
+ ```
+
+ More precisely, we have an equivalence
+
+ ```text
+ (left ∙ bottom = top ∙ right) ≃ (left ∙ bottom = (top ∙ p) ∙ (p⁻¹ ∙ right)).
+ ```
+
+ Similarly, we have an equivalence
+
+ ```text
+ (left ∙ bottom = top ∙ right) ≃ (left ∙ bottom = (top ∙ p⁻¹) ∙ (p ∙ right)).
+ ```
+
+These operations are useful in proofs involving path algebra, because taking
+`equiv-right-whisker-concat-coherence-square-identifications` as an example, it
+provides us with two maps: the forward direction states
+`(p ∙ r = q ∙ s) → (p ∙ (r ∙ t)) = q ∙ (s ∙ t))`, which allows one to append
+an identification without needing to reassociate on the right, and the backwards
+direction conversely allows one to cancel out an identification in parentheses.
+
+#### Left whiskering coherences of commuting squares of identifications
+
+For any identification `p : u = x` we obtain an equivalence
+
+```text
+ top p ∙ top
+ x -------> y u -------> y
+ | | | |
+ left | | right ≃ p ∙ left | | right
+ ∨ ∨ ∨ ∨
+ z -------> w z -------> w
+ bottom bottom
+```
+
+of coherences of commuting squares of identifications.
+
+```agda
+module _
+ {l : Level} {A : UU l} {x y z w u : A}
+ where
+
+ left-whisker-concat-coherence-square-identifications :
+ (p : u = x)
+ (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) →
+ coherence-square-identifications top left right bottom →
+ coherence-square-identifications (p ∙ top) (p ∙ left) right bottom
+ left-whisker-concat-coherence-square-identifications
+ refl top left right bottom =
+ id
+
+ left-unwhisker-concat-coherence-square-identifications :
+ (p : u = x)
+ (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) →
+ coherence-square-identifications (p ∙ top) (p ∙ left) right bottom →
+ coherence-square-identifications top left right bottom
+ left-unwhisker-concat-coherence-square-identifications
+ refl top left right bottom =
+ id
+```
+
+#### Right whiskering coherences of commuting squares of identifications
+
+For any identification `p : w = u` we obtain an equivalence
+
+```text
+ top top
+ x -------> y x ------------> y
+ | | | |
+ left | | right ≃ left | | right ∙ p
+ ∨ ∨ ∨ ∨
+ z -------> w z ------------> w
+ bottom bottom ∙ p
+```
+
+of coherences of commuting squares of identifications.
+
+```agda
+module _
+ {l : Level} {A : UU l} {x y z w : A}
+ (top : x = y) (left : x = z) (right : y = w) (bottom : z = w)
+ where
+
+ right-whisker-concat-coherence-square-identifications :
+ coherence-square-identifications top left right bottom →
+ {u : A} (p : w = u) →
+ coherence-square-identifications top left (right ∙ p) (bottom ∙ p)
+ right-whisker-concat-coherence-square-identifications s refl =
+ concat-bottom-identification-coherence-square-identifications
+ ( top)
+ ( left)
+ ( right ∙ refl)
+ ( bottom)
+ ( inv right-unit)
+ ( concat-right-identification-coherence-square-identifications
+ ( top)
+ ( left)
+ ( right)
+ ( bottom)
+ ( inv right-unit)
+ ( s))
+
+ right-unwhisker-cohernece-square-identifications :
+ {u : A} (p : w = u) →
+ coherence-square-identifications top left (right ∙ p) (bottom ∙ p) →
+ coherence-square-identifications top left right bottom
+ right-unwhisker-cohernece-square-identifications refl =
+ ( inv-concat-right-identification-coherence-square-identifications
+ ( top)
+ ( left)
+ ( right)
+ ( bottom)
+ ( inv right-unit)) ∘
+ ( inv-concat-bottom-identification-coherence-square-identifications
+ ( top)
+ ( left)
+ ( right ∙ refl)
+ ( bottom)
+ ( inv right-unit))
+```
+
+### Double whiskering of commuting squares of identifications
+
+```agda
+module _
+ {l : Level} {A : UU l} {x y z u v w : A}
+ where
+
+ double-whisker-coherence-square-identifications :
+ (p : x = y)
+ (top : y = u) (left : y = z) (right : u = v) (bottom : z = v)
+ (s : v = w) →
+ coherence-square-identifications top left right bottom →
+ coherence-square-identifications
+ ( p ∙ top)
+ ( p ∙ left)
+ ( right ∙ s)
+ ( bottom ∙ s)
+ double-whisker-coherence-square-identifications
+ p top left right bottom q H =
+ left-whisker-concat-coherence-square-identifications p top left
+ ( right ∙ q)
+ ( bottom ∙ q)
+ ( right-whisker-concat-coherence-square-identifications
+ ( top)
+ ( left)
+ ( right)
+ ( bottom)
+ ( H)
+ ( q))
+```
+
+#### Left splicing coherences of commuting squares of identifications
+
+For any inverse pair of identifications `p : y = u` and `q : u = y` equipped
+with `α : inv p = q` we obtain an equivalence
+
+```text
+ top top
+ x -------> y x -----------> y
+ | | | |
+ left | | right ≃ left ∙ p | | right
+ ∨ ∨ ∨ ∨
+ z -------> w u -----------> w
+ bottom q ∙ bottom
+```
+
+of coherences of commuting squares of identifications.
+
+```agda
+module _
+ {l : Level} {A : UU l} {x y z w : A}
+ (top : x = y) (left : x = z) (right : y = w) (bottom : z = w)
+ where
+
+ left-splice-coherence-square-identifications :
+ {u : A} (p : z = u) (q : u = z) (α : inv p = q) →
+ coherence-square-identifications top left right bottom →
+ coherence-square-identifications top (left ∙ p) right (q ∙ bottom)
+ left-splice-coherence-square-identifications refl .refl refl =
+ concat-left-identification-coherence-square-identifications
+ ( top)
+ ( left)
+ ( right)
+ ( bottom)
+ ( inv right-unit)
+
+ left-unsplice-coherence-square-identifications :
+ {u : A} (p : z = u) (q : u = z) (α : inv p = q) →
+ coherence-square-identifications top (left ∙ p) right (q ∙ bottom) →
+ coherence-square-identifications top left right bottom
+ left-unsplice-coherence-square-identifications refl .refl refl =
+ inv-concat-left-identification-coherence-square-identifications
+ ( top)
+ ( left)
+ ( right)
+ ( bottom)
+ ( inv right-unit)
+```
+
+#### Right splicing coherences of commuting squares of identifications
+
+For any inverse pair of identifications `p : y = u` and `q : u = y` equipped
+with `α : inv p = q` we obtain an equivalence
+
+```text
+ top top ∙ p
+ x -------> y x --------> u
+ | | | |
+ left | | right ≃ left | | q ∙ right
+ ∨ ∨ ∨ ∨
+ z -------> w z --------> w
+ bottom bottom
+```
+
+of coherences of commuting squares of identifications.
+
+```agda
+module _
+ {l : Level} {A : UU l} {x y z w : A}
+ (top : x = y) (left : x = z) (right : y = w) (bottom : z = w)
+ where
+
+ right-splice-coherence-square-identifications :
+ {u : A} (p : y = u) (q : u = y) (α : inv p = q) →
+ coherence-square-identifications top left right bottom →
+ coherence-square-identifications (top ∙ p) left (inv p ∙ right) bottom
+ right-splice-coherence-square-identifications refl .refl refl =
+ concat-top-identification-coherence-square-identifications
+ ( top)
+ ( left)
+ ( right)
+ ( bottom)
+ ( inv right-unit)
+
+ right-unsplice-coherence-square-identifications :
+ {u : A} (p : y = u) (q : u = y) (α : inv p = q) →
+ coherence-square-identifications (top ∙ p) left (inv p ∙ right) bottom →
+ coherence-square-identifications top left right bottom
+ right-unsplice-coherence-square-identifications refl .refl refl =
+ inv-concat-top-identification-coherence-square-identifications
+ ( top)
+ ( left)
+ ( right)
+ ( bottom)
+ ( inv right-unit)
+```
+
+### Horizontally pasting squares of identifications
+
+Consider two squares of identifications as in the diagram
+
+```text
+ top-left top-right
+ a -------------> b -------------> c
+ | | |
+ left | | middle | right
+ ∨ ∨ ∨
+ d -------------> e -------------> f
+ bottom-left bottom-right
+```
+
+with `s : left ∙ bottom-left = top-left ∙ middle` and
+`t : middle ∙ bottom-right = top-right ∙ right`. Then the outer square
+commutes.
+
+```agda
+module _
+ {l : Level} {A : UU l} {a b c d e f : A}
+ (top-left : a = b) (top-right : b = c)
+ (left : a = d) (middle : b = e) (right : c = f)
+ (bottom-left : d = e) (bottom-right : e = f)
+ where
+
+ horizontal-pasting-coherence-square-identifications :
+ coherence-square-identifications top-left left middle bottom-left →
+ coherence-square-identifications top-right middle right bottom-right →
+ coherence-square-identifications
+ (top-left ∙ top-right) left right (bottom-left ∙ bottom-right)
+ horizontal-pasting-coherence-square-identifications s t =
+ ( right-whisker-concat-coherence-square-identifications
+ ( top-left)
+ ( left)
+ ( middle)
+ ( bottom-left)
+ ( s)
+ ( bottom-right)) ∙
+ ( ( inv (assoc top-left middle bottom-right)) ∙
+ ( left-whisker-concat-coherence-square-identifications
+ ( top-left)
+ ( top-right)
+ ( middle)
+ ( right)
+ ( bottom-right)
+ ( t)))
+```
+
+### Vertically pasting squares of identifications
+
+Consider two squares of identifications as in the diagram
+
+```text
+ top
+ a --------> b
+ | |
+ top-left | | top-right
+ ∨ middle ∨
+ c --------> d
+ | |
+ bottom-left | | bottom-right
+ ∨ ∨
+ e --------> f
+ bottom
+```
+
+with `s : top-left ∙ middle = top ∙ top-right` and
+`t : bottom-left ∙ bottom = middle ∙ bottom-right`. Then the outer square
+commutes.
+
+```agda
+module _
+ {l : Level} {A : UU l} {a b c d e f : A}
+ (top : a = b) (top-left : a = c) (top-right : b = d)
+ (middle : c = d) (bottom-left : c = e) (bottom-right : d = f)
+ (bottom : e = f)
+ where
+
+ vertical-pasting-coherence-square-identifications :
+ coherence-square-identifications top top-left top-right middle →
+ coherence-square-identifications middle bottom-left bottom-right bottom →
+ coherence-square-identifications
+ top (top-left ∙ bottom-left) (top-right ∙ bottom-right) bottom
+ vertical-pasting-coherence-square-identifications s t =
+ ( left-whisker-concat-coherence-square-identifications
+ ( top-left)
+ ( middle)
+ ( bottom-left)
+ ( bottom-right)
+ ( bottom)
+ ( t)) ∙
+ ( ( assoc top-left middle bottom-right) ∙
+ ( right-whisker-concat-coherence-square-identifications
+ ( top)
+ ( top-left)
+ ( top-right)
+ ( middle)
+ ( s)
+ ( bottom-right)))
+```
+
+## Properties
+
+### Left unit law for horizontal pasting of commuting squares of identifications
+
+```agda
+module _
+ {l : Level} {A : UU l} {a b c d : A}
+ where
+
+ left-unit-law-horizontal-pasting-coherence-square-identifications :
+ (top : a = b) (left : a = c) (right : b = d) (bottom : c = d)
+ (s : coherence-square-identifications top left right bottom) →
+ horizontal-pasting-coherence-square-identifications
+ ( refl)
+ ( top)
+ ( left)
+ ( left)
+ ( right)
+ ( refl)
+ ( bottom)
+ ( horizontal-refl-coherence-square-identifications left)
+ ( s) =
+ s
+ left-unit-law-horizontal-pasting-coherence-square-identifications
+ refl refl right refl s = refl
+```
+
+### Right unit law for horizontal pasting of commuting squares of identifications
+
+```agda
+module _
+ {l : Level} {A : UU l} {a b c d : A}
+ where
+
+ right-unit-law-horizontal-pasting-coherence-square-identifications :
+ (top : a = b) (left : a = c) (right : b = d) (bottom : c = d)
+ (s : coherence-square-identifications top left right bottom) →
+ horizontal-pasting-coherence-square-identifications
+ ( top)
+ ( refl)
+ ( left)
+ ( right)
+ ( right)
+ ( bottom)
+ ( refl)
+ ( s)
+ ( horizontal-refl-coherence-square-identifications right) ∙
+ right-whisker-concat right-unit right =
+ left-whisker-concat left right-unit ∙ s
+ right-unit-law-horizontal-pasting-coherence-square-identifications
+ refl refl .refl refl refl =
+ refl
+```
+
+### Left unit law for vertical pasting of commuting squares of identifications
+
+```agda
+module _
+ {l : Level} {A : UU l} {a b c d : A}
+ where
+
+ left-unit-law-vertical-pasting-coherence-square-identifications :
+ (top : a = b) (left : a = c) (right : b = d) (bottom : c = d)
+ (s : coherence-square-identifications top left right bottom) →
+ vertical-pasting-coherence-square-identifications
+ ( top)
+ ( refl)
+ ( refl)
+ ( top)
+ ( left)
+ ( right)
+ ( bottom)
+ ( vertical-refl-coherence-square-identifications top)
+ ( s) =
+ s
+ left-unit-law-vertical-pasting-coherence-square-identifications
+ refl refl .refl refl refl = refl
+```
+
+### Right unit law for vertical pasting of commuting squares of identifications
+
+```agda
+module _
+ {l : Level} {A : UU l} {a b c d : A}
+ where
+
+ right-unit-law-vertical-pasting-coherence-square-identifications :
+ (top : a = b) (left : a = c) (right : b = d) (bottom : c = d)
+ (s : coherence-square-identifications top left right bottom) →
+ vertical-pasting-coherence-square-identifications
+ ( top)
+ ( left)
+ ( right)
+ ( bottom)
+ ( refl)
+ ( refl)
+ ( bottom)
+ ( s)
+ ( vertical-refl-coherence-square-identifications bottom) ∙
+ left-whisker-concat top right-unit =
+ right-whisker-concat right-unit bottom ∙ s
+ right-unit-law-vertical-pasting-coherence-square-identifications
+ refl refl .(refl ∙ refl) refl refl =
+ refl
+```
+
+### Computing the right whiskering of a vertically constant square with an identification
+
+Consider the vertically constant square of identifications
+
+```text
+ p
+ x -----> y
+ | |
+ refl | | refl
+ ∨ ∨
+ x -----> y
+ p
+```
+
+at an identification `p : x = y`, and consider an identification `q : y = z`.
+Then the right whiskering of the above square with `q` is the commuting square
+of identifications
+
+```text
+ p
+ x -------> y
+ | |
+ refl | refl | q
+ ∨ ∨
+ x -------> z
+ p ∙ q
+```
+
+```agda
+module _
+ {l1 : Level} {A : UU l1}
+ where
+
+ right-whisker-concat-vertical-refl-coherence-square-identifications :
+ {x y z : A} (p : x = y) (q : y = z) →
+ right-whisker-concat-coherence-square-identifications p refl refl p
+ ( vertical-refl-coherence-square-identifications p)
+ ( q) =
+ refl
+ right-whisker-concat-vertical-refl-coherence-square-identifications
+ refl refl =
+ refl
+```
+
+### Computing the right whiskering of a horizontally constant square with an identification
+
+Consider a horizontally constant commuting square of identifications
+
+```text
+ refl
+ x -----> x
+ | |
+ p | | p
+ ∨ ∨
+ y -----> y
+ refl
+```
+
+at an identification `p` and consider an identification `q : y = z`. Then the
+right whiskering of the above square with `q` is the square
+
+```text
+ refl
+ x -----> x
+ | |
+ p | refl | p ∙ q
+ ∨ ∨
+ y -----> z.
+ q
+```
+
+```agda
+module _
+ {l1 : Level} {A : UU l1}
+ where
+
+ right-whisker-concat-horizontal-refl-coherence-square-identifications :
+ {x y z : A} (p : x = y) (q : y = z) →
+ right-whisker-concat-coherence-square-identifications refl p p refl
+ ( horizontal-refl-coherence-square-identifications p)
+ ( q) =
+ refl
+ right-whisker-concat-horizontal-refl-coherence-square-identifications
+ refl refl =
+ refl
+```
+
+### Computing the left whiskering of a horizontally constant square with an identification
+
+Consider an identification `p : x = y` and a horizontally constant commuting
+square of identifications
+
+```text
+ refl
+ y -----> y
+ | |
+ q | | q
+ ∨ ∨
+ z -----> z
+ refl
+```
+
+at an identification `q : y = z`. The the left whiskering of the above square
+with `p` is the commuting square
+
+```text
+ q ∙ refl
+ x ------------------------------------------------------> y
+ | |
+ q ∙ p | right-unit ∙ inv (right-whisker-concat right-unit p) | p
+ ∨ ∨
+ z ------------------------------------------------------> z.
+ refl
+```
+
+```agda
+module _
+ {l1 : Level} {A : UU l1}
+ where
+
+ left-whisker-concat-horizontal-refl-coherence-square-identifications :
+ {x y z : A} (p : x = y) (q : y = z) →
+ left-whisker-concat-coherence-square-identifications p refl q q refl
+ ( horizontal-refl-coherence-square-identifications q) ∙
+ right-whisker-concat right-unit q =
+ right-unit
+ left-whisker-concat-horizontal-refl-coherence-square-identifications
+ refl refl =
+ refl
+
+ left-whisker-concat-horizontal-refl-coherence-square-identifications' :
+ {x y z : A} (p : x = y) (q : y = z) →
+ left-whisker-concat-coherence-square-identifications p refl q q refl
+ ( horizontal-refl-coherence-square-identifications q) =
+ right-unit ∙ inv (right-whisker-concat right-unit q)
+ left-whisker-concat-horizontal-refl-coherence-square-identifications'
+ refl refl =
+ refl
+```
+
+### Computing the left whiskering of a vertically constant square with an identification
+
+Consider the vertically constant square of identifications
+
+```text
+ q
+ y -----> z
+ | |
+ refl | | refl
+ ∨ ∨
+ y -----> z
+ q
+```
+
+at an identification `q : y = z` and consider an identification `p : x = y`.
+Then the left whiskering of the above square with `p` is the square
+
+```text
+ p ∙ q
+ x ---------------------------------------------------> z
+ | |
+ p ∙ refl | right-whisker-concat right-unit q ∙ inv right-unit | refl
+ ∨ ∨
+ y ---------------------------------------------------> z.
+ q
+```
+
+```agda
+module _
+ {l1 : Level} {A : UU l1}
+ where
+
+ left-whisker-concat-vertical-refl-coherence-square-identifications :
+ {x y z : A} (p : x = y) (q : y = z) →
+ left-whisker-concat-coherence-square-identifications p q refl refl q
+ ( vertical-refl-coherence-square-identifications q) ∙
+ right-unit =
+ right-whisker-concat right-unit q
+ left-whisker-concat-vertical-refl-coherence-square-identifications
+ refl refl =
+ refl
+
+ left-whisker-concat-vertical-refl-coherence-square-identifications' :
+ {x y z : A} (p : x = y) (q : y = z) →
+ left-whisker-concat-coherence-square-identifications p q refl refl q
+ ( vertical-refl-coherence-square-identifications q) =
+ right-whisker-concat right-unit q ∙ inv right-unit
+ left-whisker-concat-vertical-refl-coherence-square-identifications'
+ refl refl =
+ refl
+```
+
+### Left whiskering horizontal concatenations of squares with identifications
+
+Consider a commuting diagram of identifications of the form
+
+```text
+ top-left top-right
+ a -------------> c -------------> e
+ | | |
+ left | | middle | right
+ ∨ ∨ ∨
+ b -------------> d -------------> f
+ bottom-left bottom-right
+```
+
+and consider an identification `p : x = a`. Then the left whiskering of `p` and
+the horizontal concatenation of coherences of commuting squares is up to
+associativity the horizontal concatenation of the squares
+
+```text
+ p ∙ top-left top-right
+ x -------------> c -------------> e
+ | | |
+ p ∙ left | | middle | right
+ ∨ ∨ ∨
+ b -------------> d -------------> f
+ bottom-left bottom-right
+```
+
+where the left square is the left whiskering of `p` and the original left
+square.
+
+```agda
+module _
+ {l1 : Level} {A : UU l1}
+ where
+
+ left-whisker-concat-horizontal-pasting-coherence-square-identifications :
+ {x a b c d e f : A} (p : x = a)
+ (top-left : a = c) (top-right : c = e)
+ (left : a = b) (middle : c = d) (right : e = f)
+ (bottom-left : b = d) (bottom-right : d = f)
+ (l : coherence-square-identifications top-left left middle bottom-left)
+ (r : coherence-square-identifications top-right middle right bottom-right) →
+ left-whisker-concat-coherence-square-identifications p
+ ( top-left ∙ top-right)
+ ( left)
+ ( right)
+ ( bottom-left ∙ bottom-right)
+ ( horizontal-pasting-coherence-square-identifications
+ ( top-left)
+ ( top-right)
+ ( left)
+ ( middle)
+ ( right)
+ ( bottom-left)
+ ( bottom-right)
+ ( l)
+ ( r)) =
+ horizontal-pasting-coherence-square-identifications
+ ( p ∙ top-left)
+ ( top-right)
+ ( p ∙ left)
+ ( middle)
+ ( right)
+ ( bottom-left)
+ ( bottom-right)
+ ( left-whisker-concat-coherence-square-identifications p
+ ( top-left)
+ ( left)
+ ( middle)
+ ( bottom-left)
+ ( l))
+ ( r) ∙
+ right-whisker-concat
+ ( assoc p top-left top-right)
+ ( right)
+ left-whisker-concat-horizontal-pasting-coherence-square-identifications
+ refl top-left top-right left middle right bottom-left bottom-right l r =
+ inv right-unit
+```
+
+### Left whiskering vertical concatenations of squares with identifications
+
+Consider two squares of identifications as in the diagram
+
+```text
+ top
+ a --------> b
+ | |
+ top-left | | top-right
+ ∨ middle ∨
+ c --------> d
+ | |
+ bottom-left | | bottom-right
+ ∨ ∨
+ e --------> f
+ bottom
+```
+
+and consider an identification `p : x = a`. Then the left whiskering of `p`
+with the vertical pasting of the two squares above is up to associativity the
+vertical pasting of the squares
+
+```text
+ p ∙ top
+ x --------> b
+ | |
+ p ∙ top-left | | top-right
+ ∨ middle ∨
+ c --------> d
+ | |
+ bottom-left | | bottom-right
+ ∨ ∨
+ e --------> f.
+ bottom
+```
+
+```agda
+module _
+ {l1 : Level} {A : UU l1}
+ where
+
+ left-whisker-concat-vertical-concat-coherence-square-identifications :
+ {x a b c d e f : A} (p : x = a) →
+ (top : a = b) (top-left : a = c) (top-right : b = d) (middle : c = d)
+ (bottom-left : c = e) (bottom-right : d = f) (bottom : e = f)
+ (t : coherence-square-identifications top top-left top-right middle) →
+ (b :
+ coherence-square-identifications middle bottom-left bottom-right bottom) →
+ right-whisker-concat (assoc p top-left bottom-left) bottom ∙
+ left-whisker-concat-coherence-square-identifications p
+ ( top)
+ ( top-left ∙ bottom-left)
+ ( top-right ∙ bottom-right)
+ ( bottom)
+ ( vertical-pasting-coherence-square-identifications
+ ( top)
+ ( top-left)
+ ( top-right)
+ ( middle)
+ ( bottom-left)
+ ( bottom-right)
+ ( bottom)
+ ( t)
+ ( b)) =
+ vertical-pasting-coherence-square-identifications
+ ( p ∙ top)
+ ( p ∙ top-left)
+ ( top-right)
+ ( middle)
+ ( bottom-left)
+ ( bottom-right)
+ ( bottom)
+ ( left-whisker-concat-coherence-square-identifications p
+ ( top)
+ ( top-left)
+ ( top-right)
+ ( middle)
+ ( t))
+ ( b)
+ left-whisker-concat-vertical-concat-coherence-square-identifications
+ refl top top-left top-right middle bottom-left bottom-right bottom t b =
+ refl
+```
+
+### Right whiskering horizontal pastings of commuting squares of identifications
+
+Consider a commuting diagram of identifications of the form
+
+```text
+ top-left top-right
+ a -------------> c -------------> e
+ | | |
+ left | | middle | right
+ ∨ ∨ ∨
+ b -------------> d -------------> f
+ bottom-left bottom-right
+```
+
+and consider an identification `q : f = y`. Then the right whiskering of the
+horizontal pasting of the squares above is up to associativity the horizontal
+pasting of the squares
+
+```text
+ top-left top-right
+ a -------------> c ------------------> e
+ | | |
+ left | | middle | right ∙ q
+ ∨ ∨ ∨
+ b -------------> d ------------------> y
+ bottom-left bottom-right ∙ q
+```
+
+```agda
+module _
+ {l1 : Level} {A : UU l1}
+ where
+
+ right-whisker-concat-horizontal-pasting-coherence-square-identifications :
+ {a b c d e f y : A}
+ (top-left : a = c) (top-right : c = e)
+ (left : a = b) (middle : c = d) (right : e = f)
+ (bottom-left : b = d) (bottom-right : d = f)
+ (l : coherence-square-identifications top-left left middle bottom-left) →
+ (r : coherence-square-identifications top-right middle right bottom-right) →
+ (q : f = y) →
+ right-whisker-concat-coherence-square-identifications
+ ( top-left ∙ top-right)
+ ( left)
+ ( right)
+ ( bottom-left ∙ bottom-right)
+ ( horizontal-pasting-coherence-square-identifications
+ ( top-left)
+ ( top-right)
+ ( left)
+ ( middle)
+ ( right)
+ ( bottom-left)
+ ( bottom-right)
+ ( l)
+ ( r))
+ ( q) =
+ left-whisker-concat left (assoc bottom-left bottom-right q) ∙
+ horizontal-pasting-coherence-square-identifications
+ ( top-left)
+ ( top-right)
+ ( left)
+ ( middle)
+ ( right ∙ q)
+ ( bottom-left)
+ ( bottom-right ∙ q)
+ ( l)
+ ( right-whisker-concat-coherence-square-identifications
+ ( top-right)
+ ( middle)
+ ( right)
+ ( bottom-right)
+ ( r)
+ ( q))
+ right-whisker-concat-horizontal-pasting-coherence-square-identifications
+ refl refl refl .refl .refl refl refl refl refl refl =
+ refl
+```
+
+### Right whiskering vertical concatenations of squares with identifications
+
+Consider two squares of identifications as in the diagram
+
+```text
+ top
+ a --------> b
+ | |
+ top-left | | top-right
+ ∨ middle ∨
+ c --------> d
+ | |
+ bottom-left | | bottom-right
+ ∨ ∨
+ e --------> f
+ bottom
+```
+
+and consider an identification `q : f = y`. Then the right whiskering of the
+vertical pasting of the two squares above with `q` is up to associativity the
+vertical pasting of the squares
+
+```text
+ top
+ a ------------> b
+ | |
+ top-left | | top-right
+ ∨ middle ∨
+ c ------------> d
+ | |
+ bottom-left | | bottom-right ∙ q
+ ∨ ∨
+ e ------------> y.
+ bottom ∙ q
+```
+
+```agda
+module _
+ {l1 : Level} {A : UU l1}
+ where
+
+ right-whisker-concat-vertical-pasting-coherence-square-identifications :
+ {a b c d e f y : A}
+ (top : a = b) (top-left : a = c) (top-right : b = d)
+ (middle : c = d)
+ (bottom-left : c = e) (bottom-right : d = f) (bottom : e = f)
+ (t : coherence-square-identifications top top-left top-right middle) →
+ (b :
+ coherence-square-identifications middle bottom-left bottom-right bottom) →
+ (q : f = y) →
+ right-whisker-concat-coherence-square-identifications
+ ( top)
+ ( top-left ∙ bottom-left)
+ ( top-right ∙ bottom-right)
+ ( bottom)
+ ( vertical-pasting-coherence-square-identifications
+ ( top)
+ ( top-left)
+ ( top-right)
+ ( middle)
+ ( bottom-left)
+ ( bottom-right)
+ ( bottom)
+ ( t)
+ ( b))
+ ( q) ∙
+ left-whisker-concat top (assoc top-right bottom-right q) =
+ vertical-pasting-coherence-square-identifications
+ ( top)
+ ( top-left)
+ ( top-right)
+ ( middle)
+ ( bottom-left)
+ ( bottom-right ∙ q)
+ ( bottom ∙ q)
+ ( t)
+ ( right-whisker-concat-coherence-square-identifications
+ ( middle)
+ ( bottom-left)
+ ( bottom-right)
+ ( bottom)
+ ( b)
+ ( q))
+ right-whisker-concat-vertical-pasting-coherence-square-identifications
+ refl refl .refl refl refl .refl refl refl refl refl =
+ refl
+```
diff --git a/src/foundation-core/commuting-squares-of-maps.lagda.md b/src/foundation-core/commuting-squares-of-maps.lagda.md
index 13c4b21118..92e9ba73f6 100644
--- a/src/foundation-core/commuting-squares-of-maps.lagda.md
+++ b/src/foundation-core/commuting-squares-of-maps.lagda.md
@@ -234,23 +234,23 @@ If the horizontal/vertical maps in a commuting square are both
commuting if we invert those equivalences.
```agda
-coherence-square-maps-inv-equiv-horizontal :
+horizontal-inv-equiv-coherence-square-maps :
{l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3} {Y : UU l4}
(top : A ≃ B) (left : A → X) (right : B → Y) (bottom : X ≃ Y) →
coherence-square-maps (map-equiv top) left right (map-equiv bottom) →
coherence-square-maps (map-inv-equiv top) right left (map-inv-equiv bottom)
-coherence-square-maps-inv-equiv-horizontal top left right bottom H b =
+horizontal-inv-equiv-coherence-square-maps top left right bottom H b =
map-eq-transpose-equiv-inv
( bottom)
( ( ap right (inv (is-section-map-inv-equiv top b))) ∙
( inv (H (map-inv-equiv top b))))
-coherence-square-maps-inv-equiv-vertical :
+vertical-inv-equiv-coherence-square-maps :
{l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3} {Y : UU l4}
(top : A → B) (left : A ≃ X) (right : B ≃ Y) (bottom : X → Y) →
coherence-square-maps top (map-equiv left) (map-equiv right) bottom →
coherence-square-maps bottom (map-inv-equiv left) (map-inv-equiv right) top
-coherence-square-maps-inv-equiv-vertical top left right bottom H x =
+vertical-inv-equiv-coherence-square-maps top left right bottom H x =
map-eq-transpose-equiv
( right)
( ( inv (H (map-inv-equiv left x))) ∙
@@ -270,12 +270,12 @@ coherence-square-maps-inv-equiv :
( map-inv-equiv left)
( map-inv-equiv top)
coherence-square-maps-inv-equiv top left right bottom H =
- coherence-square-maps-inv-equiv-vertical
+ vertical-inv-equiv-coherence-square-maps
( map-inv-equiv top)
( right)
( left)
( map-inv-equiv bottom)
- ( coherence-square-maps-inv-equiv-horizontal
+ ( horizontal-inv-equiv-coherence-square-maps
( top)
( map-equiv left)
( map-equiv right)
diff --git a/src/foundation-core/contractible-maps.lagda.md b/src/foundation-core/contractible-maps.lagda.md
index 46a3cecce5..624c850cd4 100644
--- a/src/foundation-core/contractible-maps.lagda.md
+++ b/src/foundation-core/contractible-maps.lagda.md
@@ -66,10 +66,9 @@ module _
( ( inv
( contraction
( H (f x))
- ( pair
- ( map-inv-is-contr-map H (f x))
+ ( ( map-inv-is-contr-map H (f x)) ,
( is-section-map-inv-is-contr-map H (f x))))) ∙
- ( contraction (H (f x)) (pair x refl)))
+ ( contraction (H (f x)) (x , refl)))
abstract
is-equiv-is-contr-map : is-contr-map f → is-equiv f
@@ -93,14 +92,14 @@ module _
pr1 (center-fiber-is-coherently-invertible H y) =
map-inv-is-coherently-invertible H y
pr2 (center-fiber-is-coherently-invertible H y) =
- is-retraction-is-coherently-invertible H y
+ is-section-map-inv-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) =
+ contraction-fiber-is-coherently-invertible H y (x , refl) =
eq-Eq-fiber f y
- ( is-section-is-coherently-invertible H x)
+ ( is-retraction-map-inv-is-coherently-invertible H x)
( ( right-unit) ∙
( inv ( coh-is-coherently-invertible H x)))
diff --git a/src/foundation-core/equivalences.lagda.md b/src/foundation-core/equivalences.lagda.md
index 3d1af2c9bb..843b2ae090 100644
--- a/src/foundation-core/equivalences.lagda.md
+++ b/src/foundation-core/equivalences.lagda.md
@@ -7,7 +7,6 @@ module foundation-core.equivalences where
Imports
```agda
-open import foundation.action-on-identifications-binary-functions
open import foundation.action-on-identifications-functions
open import foundation.dependent-pair-types
open import foundation.universe-levels
@@ -181,18 +180,17 @@ module _
pr2 (pr2 (is-equiv-is-invertible' (g , H , K))) = K
is-equiv-is-invertible :
- (g : B → A) (H : (f ∘ g) ~ id) (K : (g ∘ f) ~ id) → is-equiv f
+ (g : B → A) (H : f ∘ g ~ id) (K : g ∘ f ~ id) → is-equiv f
is-equiv-is-invertible g H K =
is-equiv-is-invertible' (g , H , K)
is-retraction-map-section-is-equiv :
(H : is-equiv f) → is-retraction f (map-section-is-equiv H)
is-retraction-map-section-is-equiv H =
- ( ( ( inv-htpy
- ( ( is-retraction-map-retraction-is-equiv H) ·r
- ( map-section-is-equiv H))) ∙h
- ( map-retraction-is-equiv H ·l is-section-map-section-is-equiv H)) ·r
- ( f)) ∙h
+ ( ( inv-htpy
+ ( ( is-retraction-map-retraction-is-equiv H) ·r
+ ( map-section-is-equiv H ∘ f))) ∙h
+ ( map-retraction-is-equiv H ·l is-section-map-section-is-equiv H ·r f)) ∙h
( is-retraction-map-retraction-is-equiv H)
is-invertible-is-equiv : is-equiv f → is-invertible f
@@ -209,15 +207,26 @@ module _
where
abstract
- is-coherently-invertible-is-equiv : is-equiv f → is-coherently-invertible f
+ is-coherently-invertible-is-equiv :
+ is-equiv f → is-coherently-invertible f
is-coherently-invertible-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 H =
is-equiv-is-invertible' (is-invertible-is-coherently-invertible H)
+
+ is-transpose-coherently-invertible-is-equiv :
+ is-equiv f → is-transpose-coherently-invertible f
+ is-transpose-coherently-invertible-is-equiv =
+ is-transpose-coherently-invertible-is-invertible ∘ is-invertible-is-equiv
+
+ is-equiv-is-transpose-coherently-invertible :
+ is-transpose-coherently-invertible f → is-equiv f
+ is-equiv-is-transpose-coherently-invertible H =
+ is-equiv-is-invertible'
+ ( is-invertible-is-transpose-coherently-invertible H)
```
### Structure obtained from being coherently invertible
@@ -232,11 +241,13 @@ module _
is-section-map-inv-is-equiv : is-section f map-inv-is-equiv
is-section-map-inv-is-equiv =
- is-section-map-inv-is-invertible (is-invertible-is-equiv H)
+ is-section-map-inv-is-coherently-invertible-is-invertible
+ ( is-invertible-is-equiv H)
is-retraction-map-inv-is-equiv : is-retraction f map-inv-is-equiv
is-retraction-map-inv-is-equiv =
- is-retraction-map-inv-is-invertible (is-invertible-is-equiv H)
+ is-retraction-map-inv-is-coherently-invertible-is-invertible
+ ( is-invertible-is-equiv H)
coherence-map-inv-is-equiv :
coherence-is-coherently-invertible f
@@ -244,7 +255,7 @@ module _
( is-section-map-inv-is-equiv)
( is-retraction-map-inv-is-equiv)
coherence-map-inv-is-equiv =
- coherence-map-inv-is-invertible (is-invertible-is-equiv H)
+ coh-is-coherently-invertible-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 =
@@ -415,12 +426,12 @@ module _
pr2 (is-equiv-comp g h (sh , rh) (sg , rg)) =
retraction-comp g h rg rh
- equiv-comp : (B ≃ X) → (A ≃ B) → (A ≃ X)
- pr1 (equiv-comp g h) = (map-equiv g) ∘ (map-equiv h)
+ equiv-comp : B ≃ X → A ≃ B → A ≃ X
+ pr1 (equiv-comp g h) = map-equiv g ∘ map-equiv h
pr2 (equiv-comp g h) = is-equiv-comp (pr1 g) (pr1 h) (pr2 h) (pr2 g)
infixr 15 _∘e_
- _∘e_ : (B ≃ X) → (A ≃ B) → (A ≃ X)
+ _∘e_ : B ≃ X → A ≃ B → A ≃ X
_∘e_ = equiv-comp
```
@@ -483,14 +494,12 @@ module _
is-equiv-htpy' (map-equiv e) H (is-equiv-map-equiv e)
htpy-map-inv-is-equiv :
- {f g : A → B} (G : f ~ g) (H : is-equiv f) (K : is-equiv g) →
- map-inv-is-equiv H ~ map-inv-is-equiv K
- htpy-map-inv-is-equiv G H K b =
- ( inv
- ( is-retraction-map-inv-is-equiv K (map-inv-is-equiv H b))) ∙
- ( ap (map-inv-is-equiv K)
- ( ( inv (G (map-inv-is-equiv H b))) ∙
- ( is-section-map-inv-is-equiv H b)))
+ {f g : A → B} (H : f ~ g) (F : is-equiv f) (G : is-equiv g) →
+ map-inv-is-equiv F ~ map-inv-is-equiv G
+ htpy-map-inv-is-equiv H F G =
+ htpy-map-inv-is-invertible H
+ ( is-invertible-is-equiv F)
+ ( is-invertible-is-equiv G)
```
### Any retraction of an equivalence is an equivalence
@@ -523,16 +532,22 @@ module _
where
abstract
- is-equiv-section-is-equiv :
- ( section-f : section f) → is-equiv (pr1 section-f) → is-equiv f
- is-equiv-section-is-equiv (g , is-section-g) is-equiv-section-f =
- is-equiv-htpy h
- ( ( f ·l (inv-htpy (is-section-map-inv-is-equiv is-equiv-section-f))) ∙h
- ( right-whisker-comp is-section-g h))
- ( is-equiv-map-inv-is-equiv is-equiv-section-f)
- where
- h : A → B
- h = map-inv-is-equiv is-equiv-section-f
+ is-equiv-is-equiv-section :
+ (s : section f) → is-equiv (map-section f s) → is-equiv f
+ is-equiv-is-equiv-section (g , G) S = is-equiv-is-retraction S G
+```
+
+### If a retraction of `f` is an equivalence, then `f` is an equivalence
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B)
+ where
+
+ abstract
+ is-equiv-is-equiv-retraction :
+ (r : retraction f) → is-equiv (map-retraction f r) → is-equiv f
+ is-equiv-is-equiv-retraction (g , G) R = is-equiv-is-section R G
```
### Any section of an equivalence is homotopic to its inverse
@@ -662,38 +677,10 @@ module _
abstract
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-is-invertible
- ( λ p →
- ( inv (is-retraction-map-inv-is-equiv H x)) ∙
- ( ( ap (map-inv-is-equiv H) p) ∙
- ( is-retraction-map-inv-is-equiv H y)))
- ( λ p →
- ( ap-concat f
- ( inv (is-retraction-map-inv-is-equiv H x))
- ( ap (map-inv-is-equiv H) p ∙ is-retraction-map-inv-is-equiv H y)) ∙
- ( ( ap-binary
- ( λ u v → u ∙ v)
- ( ap-inv f (is-retraction-map-inv-is-equiv H x))
- ( ( ap-concat f
- ( ap (map-inv-is-equiv H) p)
- ( is-retraction-map-inv-is-equiv H y)) ∙
- ( ap-binary
- ( λ u v → u ∙ v)
- ( inv (ap-comp f (map-inv-is-equiv H) p))
- ( inv (coherence-map-inv-is-equiv H y))))) ∙
- ( inv
- ( left-transpose-eq-concat
- ( ap f (is-retraction-map-inv-is-equiv H x))
- ( p)
- ( ( ap (f ∘ map-inv-is-equiv H) p) ∙
- ( is-section-map-inv-is-equiv H (f y)))
- ( ( ap-binary
- ( λ u v → u ∙ v)
- ( inv (coherence-map-inv-is-equiv H x))
- ( inv (ap-id p))) ∙
- ( nat-htpy (is-section-map-inv-is-equiv H) p))))))
- ( λ where refl → left-inv (is-retraction-map-inv-is-equiv H x))
+ is-emb-is-equiv H x y =
+ is-equiv-is-invertible'
+ ( is-invertible-ap-is-coherently-invertible
+ ( is-coherently-invertible-is-equiv H))
equiv-ap :
(e : A ≃ B) (x y : A) → (x = y) ≃ (map-equiv e x = map-equiv e y)
diff --git a/src/foundation-core/homotopies.lagda.md b/src/foundation-core/homotopies.lagda.md
index fc6b8eb7de..9c53f25ce0 100644
--- a/src/foundation-core/homotopies.lagda.md
+++ b/src/foundation-core/homotopies.lagda.md
@@ -247,6 +247,20 @@ module _
### Naturality of homotopies with respect to identifications
+Given two maps `f g : A → B` and a homotopy `H : f ~ g`, then for every
+identification `p : x = y` in `A`, we have a
+[commuting square of identifications](foundation-core.commuting-squares-of-identifications.md)
+
+```text
+ ap f p
+ f x -------> f y
+ | |
+ H x | | H y
+ ∨ ∨
+ g x -------> g y.
+ ap g p
+```
+
```agda
nat-htpy :
{l1 l2 : Level} {A : UU l1} {B : UU l2} {f g : A → B} (H : f ~ g)
diff --git a/src/foundation-core/invertible-maps.lagda.md b/src/foundation-core/invertible-maps.lagda.md
index 3392fd1794..0b7ba10a4c 100644
--- a/src/foundation-core/invertible-maps.lagda.md
+++ b/src/foundation-core/invertible-maps.lagda.md
@@ -7,12 +7,15 @@ module foundation-core.invertible-maps where
Imports
```agda
+open import foundation.action-on-identifications-functions
open import foundation.dependent-pair-types
open import foundation.universe-levels
+open import foundation.whiskering-homotopies-composition
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.retractions
open import foundation-core.sections
```
@@ -39,11 +42,11 @@ module _
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
+ {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
+ {f : A → B} {g : B → A} → is-inverse f g → g ∘ f ~ id
is-retraction-is-inverse = pr2
```
@@ -64,19 +67,19 @@ module _
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-map-inv-is-invertible : f ∘ map-inv-is-invertible ~ id
+ is-section-map-inv-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
+ is-retraction-map-inv-is-invertible : map-inv-is-invertible ∘ f ~ id
+ is-retraction-map-inv-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
+ pr2 section-is-invertible = is-section-map-inv-is-invertible
retraction-is-invertible : retraction f
pr1 retraction-is-invertible = map-inv-is-invertible
- pr2 retraction-is-invertible = is-section-is-invertible
+ pr2 retraction-is-invertible = is-retraction-map-inv-is-invertible
```
### The type of invertible maps
@@ -100,37 +103,231 @@ module _
map-inv-invertible-map =
map-inv-is-invertible ∘ is-invertible-map-invertible-map
- is-section-map-invertible-map :
+ is-retraction-map-inv-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
+ map-inv-invertible-map f ∘ map-invertible-map f ~ id
+ is-retraction-map-inv-invertible-map =
+ is-retraction-map-inv-is-invertible ∘ is-invertible-map-invertible-map
- is-retraction-map-invertible-map :
+ is-section-map-inv-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
+ map-invertible-map f ∘ map-inv-invertible-map f ~ id
+ is-section-map-inv-invertible-map =
+ is-section-map-inv-is-invertible ∘ is-invertible-map-invertible-map
```
## Properties
-### The invertible inverse of an invertible map
+### The identity invertible map
```agda
module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B}
+ {l1 : Level} {A : UU l1}
+ where
+
+ is-inverse-id : is-inverse id (id {A = A})
+ pr1 is-inverse-id = refl-htpy
+ pr2 is-inverse-id = refl-htpy
+
+ is-invertible-id : is-invertible (id {A = A})
+ pr1 is-invertible-id = id
+ pr2 is-invertible-id = is-inverse-id
+
+ id-invertible-map : invertible-map A A
+ pr1 id-invertible-map = id
+ pr2 id-invertible-map = is-invertible-id
+```
+
+### The inverse of an invertible map
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ where
+
+ is-inverse-inv-is-inverse :
+ {f : A → B} {g : B → A} → is-inverse f g → is-inverse g f
+ pr1 (is-inverse-inv-is-inverse {f} {g} H) =
+ is-retraction-map-inv-is-invertible (g , H)
+ pr2 (is-inverse-inv-is-inverse {f} {g} H) =
+ is-section-map-inv-is-invertible (g , H)
+
+ is-invertible-map-inv-is-invertible :
+ {f : A → B} (g : is-invertible f) → is-invertible (map-inv-is-invertible g)
+ pr1 (is-invertible-map-inv-is-invertible {f} g) = f
+ pr2 (is-invertible-map-inv-is-invertible {f} g) =
+ is-inverse-inv-is-inverse {f} (is-inverse-map-inv-is-invertible g)
+
+ is-invertible-map-inv-invertible-map :
+ (f : invertible-map A B) → is-invertible (map-inv-invertible-map f)
+ is-invertible-map-inv-invertible-map f =
+ is-invertible-map-inv-is-invertible (is-invertible-map-invertible-map f)
+
+ inv-invertible-map : invertible-map A B → invertible-map B A
+ pr1 (inv-invertible-map f) = map-inv-invertible-map f
+ pr2 (inv-invertible-map f) = is-invertible-map-inv-invertible-map f
+```
+
+### The inversion operation on invertible maps is a strict involution
+
+The inversion operation on invertible maps is a strict involution, where, by
+strict involution, we mean that `inv-invertible-map (inv-invertible-map f) ≐ f`
+syntactically. This can be observed by the fact that the type-checker accepts
+`refl` as proof of this equation.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ where
+
+ is-involution-inv-invertible-map :
+ {f : invertible-map A B} → inv-invertible-map (inv-invertible-map f) = f
+ is-involution-inv-invertible-map = refl
+```
+
+### Composition of invertible maps
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3}
+ (g : B → C) (f : A → B) (G : is-invertible g) (F : is-invertible f)
+ where
+
+ map-inv-is-invertible-comp : C → A
+ map-inv-is-invertible-comp =
+ map-inv-is-invertible F ∘ map-inv-is-invertible G
+
+ is-section-map-inv-is-invertible-comp :
+ is-section (g ∘ f) map-inv-is-invertible-comp
+ is-section-map-inv-is-invertible-comp =
+ is-section-map-section-comp g f
+ ( section-is-invertible F)
+ ( section-is-invertible G)
+
+ is-retraction-map-inv-is-invertible-comp :
+ is-retraction (g ∘ f) map-inv-is-invertible-comp
+ is-retraction-map-inv-is-invertible-comp =
+ is-retraction-map-retraction-comp g f
+ ( retraction-is-invertible G)
+ ( retraction-is-invertible F)
+
+ is-invertible-comp : is-invertible (g ∘ f)
+ is-invertible-comp =
+ ( map-inv-is-invertible-comp ,
+ is-section-map-inv-is-invertible-comp ,
+ is-retraction-map-inv-is-invertible-comp)
+
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3}
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)
+ is-invertible-map-comp-invertible-map :
+ (g : invertible-map B C) (f : invertible-map A B) →
+ is-invertible (map-invertible-map g ∘ map-invertible-map f)
+ is-invertible-map-comp-invertible-map g f =
+ is-invertible-comp
+ ( map-invertible-map g)
+ ( map-invertible-map f)
+ ( is-invertible-map-invertible-map g)
+ ( is-invertible-map-invertible-map f)
+
+ comp-invertible-map :
+ invertible-map B C → invertible-map A B → invertible-map A C
+ pr1 (comp-invertible-map g f) = map-invertible-map g ∘ map-invertible-map f
+ pr2 (comp-invertible-map g f) = is-invertible-map-comp-invertible-map g f
+```
+
+### Invertible maps are closed under homotopies
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ where
+
+ is-section-map-inv-is-invertible-htpy :
+ {f f' : A → B} (H : f' ~ f) (F : is-invertible f) →
+ is-section f' (map-inv-is-invertible F)
+ is-section-map-inv-is-invertible-htpy H (g , S , R) = H ·r g ∙h S
+
+ is-retraction-map-inv-is-invertible-htpy :
+ {f f' : A → B} (H : f' ~ f) (F : is-invertible f) →
+ is-retraction f' (map-inv-is-invertible F)
+ is-retraction-map-inv-is-invertible-htpy H (g , S , R) = g ·l H ∙h R
+
+ is-invertible-htpy :
+ {f f' : A → B} → f' ~ f → is-invertible f → is-invertible f'
+ is-invertible-htpy H F =
+ ( map-inv-is-invertible F ,
+ is-section-map-inv-is-invertible-htpy H F ,
+ is-retraction-map-inv-is-invertible-htpy H F)
+
+ is-invertible-inv-htpy :
+ {f f' : A → B} → f ~ f' → is-invertible f → is-invertible f'
+ is-invertible-inv-htpy H = is-invertible-htpy (inv-htpy H)
+
+ htpy-map-inv-is-invertible :
+ {f g : A → B} (H : f ~ g) (F : is-invertible f) (G : is-invertible g) →
+ map-inv-is-invertible F ~ map-inv-is-invertible G
+ htpy-map-inv-is-invertible H F G =
+ ( ( inv-htpy (is-retraction-map-inv-is-invertible G)) ·r
+ ( map-inv-is-invertible F)) ∙h
+ ( ( map-inv-is-invertible G) ·l
+ ( ( inv-htpy H ·r map-inv-is-invertible F) ∙h
+ ( is-section-map-inv-is-invertible F)))
+```
+
+### Any section of an invertible map is homotopic to its inverse
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : invertible-map A B)
+ where
+
+ htpy-map-inv-invertible-map-section :
+ (f : section (map-invertible-map e)) →
+ map-inv-invertible-map e ~
+ map-section (map-invertible-map e) f
+ htpy-map-inv-invertible-map-section (f , H) =
+ ( map-inv-invertible-map e ·l inv-htpy H) ∙h
+ ( is-retraction-map-inv-invertible-map e ·r f)
+```
+
+### Any retraction of an invertible map is homotopic to its inverse
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : invertible-map A B)
+ where
+
+ htpy-map-inv-invertible-map-retraction :
+ (f : retraction (map-invertible-map e)) →
+ map-inv-invertible-map e ~
+ map-retraction (map-invertible-map e) f
+ htpy-map-inv-invertible-map-retraction (f , H) =
+ ( inv-htpy H ·r map-inv-invertible-map e) ∙h
+ ( f ·l is-section-map-inv-invertible-map e)
+```
+
+### Invertible maps are injective
+
+The construction of the converse map of the
+[action on identifications](foundation.action-on-identifications-functions.md)
+is a rerun of the proof that maps with
+[retractions](foundation-core.retractions.md) are
+[injective](foundation-core.injective-maps.md) (`is-injective-retraction`). We
+repeat the proof to avoid cyclic dependencies.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B}
+ (H : is-invertible f) {x y : A}
+ where
- 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)
+ is-injective-is-invertible : f x = f y → x = y
+ is-injective-is-invertible p =
+ ( inv (is-retraction-map-inv-is-invertible H x)) ∙
+ ( ( ap (map-inv-is-invertible H) p) ∙
+ ( is-retraction-map-inv-is-invertible H y))
```
## See also
diff --git a/src/foundation-core/whiskering-homotopies-concatenation.lagda.md b/src/foundation-core/whiskering-homotopies-concatenation.lagda.md
new file mode 100644
index 0000000000..8eae6bc964
--- /dev/null
+++ b/src/foundation-core/whiskering-homotopies-concatenation.lagda.md
@@ -0,0 +1,133 @@
+# Whiskering homotopies with respect to concatenation
+
+```agda
+module foundation-core.whiskering-homotopies-concatenation where
+```
+
+Imports
+
+```agda
+open import foundation.universe-levels
+open import foundation.whiskering-operations
+
+open import foundation-core.homotopies
+open import foundation-core.whiskering-identifications-concatenation
+```
+
+
+
+## Idea
+
+Consider a homotopy `H : f ~ g` and a homotopy `K : I ~ J` between two
+homotopies `I J : g ~ f`. The
+{{#concept "left whiskering" Disambiguation="homotopies with respect to concatenation" Agda=left-whisker-concat-htpy}}
+of `H` and `K` is a homotopy `H ∙h I ~ H ∙h J`. In other words, left whiskering
+of homotopies with respect to concatenation is a
+[whiskering operation](foundation.whiskering-operations.md)
+
+```text
+ (H : f ~ g) {I J : g ~ h} → I ~ J → H ∙h I ~ H ∙h K.
+```
+
+Similarly, we introduce
+{{#concept "right whiskering" Disambiguation="homotopies with respect to concatenation" Agda=right-whisker-concat-htpy}}
+to be an operation
+
+```text
+ {H I : f ~ g} → H ~ I → (J : g ~ h) → H ∙h J ~ I ∙h J.
+```
+
+## Definitions
+
+### Left whiskering of homotopies with respect to concatenation
+
+Left whiskering of homotopies with respect to concatenation is an operation
+
+```text
+ (H : f ~ g) {I J : g ~ h} → I ~ J → H ∙h I ~ H ∙h J.
+```
+
+We implement the left whiskering operation of homotopies with respect to
+concatenation as an instance of a general left whiskering operation.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
+ where
+
+ left-whisker-concat-htpy :
+ left-whiskering-operation ((x : A) → B x) (_~_) (_∙h_) (_~_)
+ left-whisker-concat-htpy H K x = left-whisker-concat (H x) (K x)
+
+ left-unwhisker-concat-htpy :
+ {f g h : (x : A) → B x} (H : f ~ g) {I J : g ~ h} → H ∙h I ~ H ∙h J → I ~ J
+ left-unwhisker-concat-htpy H K x = left-unwhisker-concat (H x) (K x)
+```
+
+### Right whiskering of homotopies with respect to concatenation
+
+Right whiskering of homotopies with respect to concatenation is an operation
+
+```text
+ {H I : f ~ g} → H ~ I → (J : g ~ h) → H ∙h J ~ I ∙h J.
+```
+
+We implement the right whiskering operation of homotopies with respect to
+concatenation as an instance of a general right whiskering operation.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
+ where
+
+ right-whisker-concat-htpy :
+ right-whiskering-operation ((x : A) → B x) (_~_) (_∙h_) (_~_)
+ right-whisker-concat-htpy K J x = right-whisker-concat (K x) (J x)
+
+ right-unwhisker-concat-htpy :
+ {f g h : (x : A) → B x} {H I : f ~ g} (J : g ~ h) → H ∙h J ~ I ∙h J → H ~ I
+ right-unwhisker-concat-htpy H K x = right-unwhisker-concat (H x) (K x)
+```
+
+## Properties
+
+### The unit and absorption laws for left whiskering of homotopies with respect to concatenation
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
+ where
+
+ left-unit-law-left-whisker-concat-htpy :
+ {f g : (x : A) → B x} {I J : f ~ g} (K : I ~ J) →
+ left-whisker-concat-htpy refl-htpy K ~ K
+ left-unit-law-left-whisker-concat-htpy K x =
+ left-unit-law-left-whisker-concat (K x)
+
+ right-absorption-law-left-whisker-concat-htpy :
+ {f g h : (x : A) → B x} (H : f ~ g) {I : g ~ h} →
+ left-whisker-concat-htpy H (refl-htpy' I) ~ refl-htpy
+ right-absorption-law-left-whisker-concat-htpy H x =
+ right-absorption-law-left-whisker-concat (H x) _
+```
+
+### The unit and absorption laws for right whiskering of homotopies with respect to concatenation
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
+ where
+
+ left-absorption-law-right-whisker-concat-htpy :
+ {f g h : (x : A) → B x} {H : f ~ g} (J : g ~ h) →
+ right-whisker-concat-htpy (refl-htpy' H) J ~ refl-htpy
+ left-absorption-law-right-whisker-concat-htpy J x =
+ left-absorption-law-right-whisker-concat _ (J x)
+
+ right-unit-law-right-whisker-concat-htpy :
+ {f g : (x : A) → B x} {I J : f ~ g} (K : I ~ J) →
+ right-unit-htpy ∙h K ~
+ right-whisker-concat-htpy K refl-htpy ∙h right-unit-htpy
+ right-unit-law-right-whisker-concat-htpy K x =
+ right-unit-law-right-whisker-concat (K x)
+```
diff --git a/src/foundation-core/whiskering-identifications-concatenation.lagda.md b/src/foundation-core/whiskering-identifications-concatenation.lagda.md
new file mode 100644
index 0000000000..9710a2cb0e
--- /dev/null
+++ b/src/foundation-core/whiskering-identifications-concatenation.lagda.md
@@ -0,0 +1,333 @@
+# Whiskering identifications with respect to concatenation
+
+```agda
+module foundation-core.whiskering-identifications-concatenation where
+```
+
+Imports
+
+```agda
+open import foundation.action-on-identifications-functions
+open import foundation.universe-levels
+open import foundation.whiskering-operations
+
+open import foundation-core.homotopies
+open import foundation-core.identity-types
+```
+
+
+
+## Idea
+
+Consider two [identifications](foundation-core.identity-types.md) `p q : x = y`
+in a type `A`. The whiskering operations are operations that take
+identifications `p = q` to identifications `r ∙ p = r ∙ q` or to
+identifications `p ∙ r = q ∙ r`.
+
+The
+{{#concept "left whiskering" Disambiguation="identifications" Agda=left-whisker-concat}}
+operation takes an identification `r : z = x` and an identification `p = q` to
+an identification `r ∙ p = r ∙ q`. Similarly, the
+{{#concept "right whiskering" Disambiguation="identifications" Agda=right-whisker-concat}}
+operation takes an identification `r : y = z` and an identification `p = q` to
+an identification `p ∙ r = q ∙ r`.
+
+The whiskering operations can be defined by the
+[acion on identifications](foundation.action-on-identifications-functions.md) of
+concatenation. Since concatenation on either side is an
+[equivalence](foundation-core.equivalences.md), it follows that the whiskering
+operations are equivalences.
+
+## Definitions
+
+### Left whiskering of identifications
+
+Left whiskering of identifications with respect to concatenation is an operation
+
+```text
+ (p : x = y) {q r : y = z} → q = r → p ∙ q = p ∙ r
+```
+
+on any type.
+
+```agda
+module _
+ {l : Level} {A : UU l}
+ where
+
+ left-whisker-concat : left-whiskering-operation A (_=_) (_∙_) (_=_)
+ left-whisker-concat p β = ap (p ∙_) β
+
+ left-unwhisker-concat :
+ {x y z : A} (p : x = y) {q r : y = z} → p ∙ q = p ∙ r → q = r
+ left-unwhisker-concat = is-injective-concat
+```
+
+### Right whiskering of identifications
+
+Right whiskering of identifications with respect to concatenation is an
+operation
+
+```text
+ {p q : x = y} → p = q → (r : y = z) → p ∙ r = q ∙ r
+```
+
+on any type.
+
+```agda
+module _
+ {l : Level} {A : UU l}
+ where
+
+ right-whisker-concat : right-whiskering-operation A (_=_) (_∙_) (_=_)
+ right-whisker-concat α q = ap (_∙ q) α
+
+ right-unwhisker-concat :
+ {x y z : A} {p q : x = y} (r : y = z) → p ∙ r = q ∙ r → p = q
+ right-unwhisker-concat r = is-injective-concat' r
+```
+
+### Double whiskering of identifications
+
+```agda
+module _
+ {l : Level} {A : UU l}
+ {a b c d : A} (p : a = b) {r s : b = c} (t : r = s) (q : c = d)
+ where
+
+ double-whisker-concat : (p ∙ r) ∙ q = (p ∙ s) ∙ q
+ double-whisker-concat = right-whisker-concat (left-whisker-concat p t) q
+
+ double-whisker-concat' : p ∙ (r ∙ q) = p ∙ (s ∙ q)
+ double-whisker-concat' = left-whisker-concat p (right-whisker-concat t q)
+```
+
+## Properties
+
+### The unit and absorption laws for left whiskering of identifications
+
+```agda
+module _
+ {l : Level} {A : UU l}
+ where
+
+ left-unit-law-left-whisker-concat :
+ {x y : A} {p p' : x = y} (α : p = p') →
+ left-whisker-concat refl α = α
+ left-unit-law-left-whisker-concat refl = refl
+
+ right-absorption-law-left-whisker-concat :
+ {x y z : A} (p : x = y) (q : y = z) →
+ left-whisker-concat p (refl {x = q}) = refl
+ right-absorption-law-left-whisker-concat p q = refl
+```
+
+### The unit and absorption laws for right whiskering of identifications
+
+The right unit law for right whiskering of identifications with respect to
+concatenation asserts that the square of identifications
+
+```text
+ right-whisker-concat α refl
+ p ∙ refl -----------------------------> p' ∙ refl
+ | |
+ right-unit | |
+ ∨ ∨
+ p -------------------------------------> p'
+```
+
+commutes for any `α : p = p'`. Note that this law is slightly more complicated,
+since concatenating with `refl` on the right does not compute to the identity
+function.
+
+```agda
+module _
+ {l : Level} {A : UU l}
+ where
+
+ right-unit-law-right-whisker-concat :
+ {x y : A} {p p' : x = y} (α : p = p') →
+ right-unit ∙ α = right-whisker-concat α refl ∙ right-unit
+ right-unit-law-right-whisker-concat {p = refl} refl = refl
+
+ left-absorption-law-right-whisker-concat :
+ {x y z : A} (p : x = y) (q : y = z) →
+ right-whisker-concat (refl {x = p}) q = refl
+ left-absorption-law-right-whisker-concat p q = refl
+```
+
+### Commutativity of left and right whiskering of identifications
+
+Consider four identifications `p p' : x = y` and `q q' : y = z` in a type `A`.
+Then the square of identifications
+
+```text
+ right-whisker α q
+ p ∙ q ---------------------> p' ∙ q
+ | |
+ left-whisker p β | | left-whisker p' β
+ ∨ ∨
+ p ∙ q' --------------------> p' ∙ q'
+ right-whisker α q'
+```
+
+commutes. There are at least two natural ways in which this square is seen to
+commute:
+
+1. The square commutes by naturality of the homotopy
+ `α ↦ left-whisker-concat α β`.
+2. The transposed square commutes by the naturality of the homotopy
+ `β ↦ right-whisker-concat α β`.
+
+These two ways in which the square commutes are inverse to each other.
+
+**Note.** The following statements could have been formalized using
+[commuting squares of identifications](foundation.commuting-squares-of-identifications.md).
+However, in order to avoid cyclic module dependencies in the library we avoid
+doing so.
+
+```agda
+module _
+ {l : Level} {A : UU l} {x y z : A}
+ where
+
+ commutative-left-whisker-right-whisker-concat :
+ {q q' : y = z} (β : q = q') {p p' : x = y} (α : p = p') →
+ left-whisker-concat p β ∙ right-whisker-concat α q' =
+ right-whisker-concat α q ∙ left-whisker-concat p' β
+ commutative-left-whisker-right-whisker-concat β =
+ nat-htpy (λ α → left-whisker-concat α β)
+
+ commutative-right-whisker-left-whisker-concat :
+ {p p' : x = y} (α : p = p') {q q' : y = z} (β : q = q') →
+ right-whisker-concat α q ∙ left-whisker-concat p' β =
+ left-whisker-concat p β ∙ right-whisker-concat α q'
+ commutative-right-whisker-left-whisker-concat α =
+ nat-htpy (right-whisker-concat α)
+
+ compute-inv-commutative-left-whisker-right-whisker-concat :
+ {q q' : y = z} (β : q = q') {p p' : x = y} (α : p = p') →
+ inv (commutative-right-whisker-left-whisker-concat α β) =
+ commutative-left-whisker-right-whisker-concat β α
+ compute-inv-commutative-left-whisker-right-whisker-concat refl refl =
+ refl
+```
+
+### Swapping the order of left and right whiskering of identifications
+
+Consider a diagram of identifications
+
+```text
+ r
+ p -----> q
+ a -----> b -----> c ----->
+ s
+```
+
+with `t : r = s`. Then the square of identifications
+
+```text
+ assoc p r q
+ (p ∙ r) ∙ q -------------> p ∙ (r ∙ q)
+ | |
+ double-whisker p t q | | double-whisker' p t q
+ ∨ ∨
+ (p ∙ s) ∙ q -------------> p ∙ (s ∙ q)
+ assoc p s q
+```
+
+commutes.
+
+```agda
+module _
+ {l1 : Level} {A : UU l1}
+ where
+
+ swap-double-whisker-concat :
+ {a b c d : A} (p : a = b) {r s : b = c} (t : r = s) (q : c = d) →
+ double-whisker-concat p t q ∙ assoc p s q =
+ assoc p r q ∙ double-whisker-concat' p t q
+ swap-double-whisker-concat refl refl refl = refl
+```
+
+### The action on identifications of concatenating by `refl` on the right
+
+Consider an identification `r : p = q` between two identifications
+`p q : x = y` in a type `A`. Then the square of identifications
+
+```text
+ right-whisker r refl
+ p ∙ refl ----------------------> q ∙ refl
+ | |
+ right-unit | | right-unit
+ ∨ ∨
+ p -----------------------------> q
+ r
+```
+
+commutes.
+
+```agda
+module _
+ {l : Level} {A : UU l} {x y : A} {p q : x = y}
+ where
+
+ compute-refl-right-whisker-concat :
+ (r : p = q) →
+ right-unit ∙ r = right-whisker-concat r refl ∙ right-unit
+ compute-refl-right-whisker-concat refl = right-unit
+```
+
+### Left whiskering of identifications distributes over concatenation
+
+```agda
+module _
+ {l : Level} {A : UU l}
+ where
+
+ distributive-left-whisker-concat-concat :
+ {a b c : A} (p : a = b) {q r s : b = c} (α : q = r) (β : r = s) →
+ left-whisker-concat p (α ∙ β) =
+ left-whisker-concat p α ∙ left-whisker-concat p β
+ distributive-left-whisker-concat-concat p refl β = refl
+```
+
+### Right whiskering of identifications distributes over concatenation
+
+```agda
+module _
+ {l : Level} {A : UU l}
+ where
+
+ distributive-right-whisker-concat-concat :
+ {a b c : A} {p q r : a = b} (α : p = q) (β : q = r) (s : b = c) →
+ right-whisker-concat (α ∙ β) s =
+ right-whisker-concat α s ∙ right-whisker-concat β s
+ distributive-right-whisker-concat-concat refl β s = refl
+```
+
+### Left whiskering of identifications commutes with inverses of identifications
+
+```agda
+module _
+ {l : Level} {A : UU l}
+ where
+
+ compute-inv-left-whisker-concat :
+ {a b c : A} (p : a = b) {q r : b = c} (s : q = r) →
+ left-whisker-concat p (inv s) = inv (left-whisker-concat p s)
+ compute-inv-left-whisker-concat p s = ap-inv (concat p _) s
+```
+
+### Right whiskering of identifications commutes with inverses of identifications
+
+```agda
+module _
+ {l : Level} {A : UU l}
+ where
+
+ compute-inv-right-whisker-concat :
+ {a b c : A} {p q : a = b} (s : p = q) (r : b = c) →
+ right-whisker-concat (inv s) r = inv (right-whisker-concat s r)
+ compute-inv-right-whisker-concat s r = ap-inv (concat' _ r) s
+```
diff --git a/src/foundation/action-on-higher-identifications-functions.lagda.md b/src/foundation/action-on-higher-identifications-functions.lagda.md
index 1553a81b60..b09a5cf131 100644
--- a/src/foundation/action-on-higher-identifications-functions.lagda.md
+++ b/src/foundation/action-on-higher-identifications-functions.lagda.md
@@ -8,10 +8,10 @@ module foundation.action-on-higher-identifications-functions where
```agda
open import foundation.action-on-identifications-functions
-open import foundation.commuting-squares-of-identifications
open import foundation.path-algebra
open import foundation.universe-levels
+open import foundation-core.commuting-squares-of-identifications
open import foundation-core.constant-maps
open import foundation-core.function-types
open import foundation-core.homotopies
diff --git a/src/foundation/action-on-homotopies-functions.lagda.md b/src/foundation/action-on-homotopies-functions.lagda.md
index cd4c2023db..0bb5100c4c 100644
--- a/src/foundation/action-on-homotopies-functions.lagda.md
+++ b/src/foundation/action-on-homotopies-functions.lagda.md
@@ -11,13 +11,13 @@ open import foundation.action-on-higher-identifications-functions
open import foundation.action-on-identifications-functions
open import foundation.dependent-pair-types
open import foundation.function-extensionality
-open import foundation.homotopies
open import foundation.homotopy-induction
open import foundation.universe-levels
open import foundation-core.constant-maps
open import foundation-core.contractible-types
open import foundation-core.function-types
+open import foundation-core.homotopies
open import foundation-core.identity-types
```
diff --git a/src/foundation/automorphisms.lagda.md b/src/foundation/automorphisms.lagda.md
index bc5d12d351..183752d129 100644
--- a/src/foundation/automorphisms.lagda.md
+++ b/src/foundation/automorphisms.lagda.md
@@ -8,10 +8,10 @@ module foundation.automorphisms where
```agda
open import foundation.dependent-pair-types
-open import foundation.sets
open import foundation.universe-levels
open import foundation-core.equivalences
+open import foundation-core.sets
open import structured-types.pointed-types
```
diff --git a/src/foundation/coherently-invertible-maps.lagda.md b/src/foundation/coherently-invertible-maps.lagda.md
index 9bc14bb139..d43a5f5702 100644
--- a/src/foundation/coherently-invertible-maps.lagda.md
+++ b/src/foundation/coherently-invertible-maps.lagda.md
@@ -15,15 +15,16 @@ open import foundation.equivalences
open import foundation.identity-types
open import foundation.type-arithmetic-dependent-pair-types
open import foundation.universe-levels
-open import foundation.whiskering-homotopies-composition
+open import foundation.whiskering-higher-homotopies-composition
+open import foundation-core.commuting-squares-of-homotopies
open import foundation-core.contractible-maps
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.homotopies
open import foundation-core.propositions
+open import foundation-core.retractions
open import foundation-core.sections
open import foundation-core.type-theoretic-principle-of-choice
```
@@ -32,68 +33,100 @@ open import foundation-core.type-theoretic-principle-of-choice
## Properties
+### Coherently invertible maps have a contractible type of sections
+
+**Proof:** Since coherently invertible maps are
+[contractible maps](foundation.contractible-maps.md), and products of
+[contractible types](foundation-core.contractible-types.md) are contractible, it
+follows that the type
+
+```text
+ (b : B) → fiber f b
+```
+
+is contractible, for any coherently invertible map `f`. However, by the
+[type theoretic principle of choice](foundation.type-theoretic-principle-of-choice.md)
+it follows that this type is equivalent to the type
+
+```text
+ Σ (B → A) (λ g → (b : B) → f (g b) = b),
+```
+
+which is the type of [sections](foundation.sections.md) of `f`.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ where
+
+ abstract
+ is-contr-section-is-coherently-invertible :
+ {f : A → B} → is-coherently-invertible f → is-contr (section f)
+ is-contr-section-is-coherently-invertible {f} F =
+ is-contr-equiv'
+ ( (b : B) → fiber f b)
+ ( distributive-Π-Σ)
+ ( is-contr-Π (is-contr-map-is-coherently-invertible F))
+```
+
### Being coherently invertible is a property
```agda
-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 {A = A} {B} f =
- is-prop-is-proof-irrelevant
- ( λ H →
- is-contr-equiv'
- ( Σ ( section f)
- ( λ s →
- Σ ( ( map-section f s ∘ f) ~ id)
- ( λ H →
- ( right-whisker-comp (is-section-map-section f s) f) ~
- ( left-whisker-comp f H))))
- ( associative-Σ
- ( B → A)
- ( λ g → (f ∘ g) ~ id)
- ( λ s →
- Σ ( ( map-section f s ∘ f) ~ id)
- ( λ H →
- ( right-whisker-comp (is-section-map-section f s) f) ~
- ( left-whisker-comp f H))))
- ( is-contr-Σ
- ( is-contr-section-is-equiv (is-equiv-is-coherently-invertible H))
- ( section-is-coherently-invertible H)
- ( is-contr-equiv'
- ( (x : A) →
- Σ ( 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)
- ( is-retraction-is-coherently-invertible H (f x)))
- ( equiv-tot
- ( λ p →
- equiv-inv
- ( ap f p)
- ( is-retraction-is-coherently-invertible H (f x))))
- ( is-contr-map-is-equiv
- ( 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 :
- {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) →
- is-equiv (is-coherently-invertible-is-equiv {f = f})
- is-equiv-is-coherently-invertible-is-equiv f =
- is-equiv-is-prop
- ( is-property-is-equiv f)
- ( is-prop-is-coherently-invertible f)
- ( is-equiv-is-coherently-invertible)
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B)
+ where
+
+ abstract
+ is-proof-irrelevant-is-coherently-invertible :
+ is-proof-irrelevant (is-coherently-invertible f)
+ is-proof-irrelevant-is-coherently-invertible H =
+ is-contr-equiv'
+ ( _)
+ ( associative-Σ _ _ _)
+ ( is-contr-Σ
+ ( is-contr-section-is-coherently-invertible H)
+ ( section-is-coherently-invertible H)
+ ( is-contr-equiv'
+ ( _)
+ ( distributive-Π-Σ)
+ ( is-contr-Π
+ ( λ x →
+ is-contr-equiv'
+ ( _)
+ ( equiv-tot
+ ( λ p →
+ equiv-inv
+ ( ap f p)
+ ( is-section-map-inv-is-coherently-invertible H (f x))))
+ ( is-contr-map-is-coherently-invertible
+ ( is-coherently-invertible-ap-is-coherently-invertible H)
+ ( is-section-map-inv-is-coherently-invertible H (f x)))))))
+
+ abstract
+ is-prop-is-coherently-invertible : is-prop (is-coherently-invertible f)
+ is-prop-is-coherently-invertible =
+ is-prop-is-proof-irrelevant is-proof-irrelevant-is-coherently-invertible
+
+ abstract
+ is-equiv-is-coherently-invertible-is-equiv :
+ is-equiv (is-coherently-invertible-is-equiv {f = f})
+ is-equiv-is-coherently-invertible-is-equiv =
+ is-equiv-is-prop
+ ( is-property-is-equiv f)
+ ( is-prop-is-coherently-invertible)
+ ( is-equiv-is-coherently-invertible)
```
+### Being transpose coherently invertible is a property
+
+This remains to be formalized.
+
+## References
+
+1. Univalent Foundations Project, _Homotopy Type Theory – Univalent Foundations
+ of Mathematics_ (2013) ([website](https://homotopytypetheory.org/book/),
+ [arXiv:1308.0729](https://arxiv.org/abs/1308.0729))
+
## See also
- For the notion of biinvertible maps see
diff --git a/src/foundation/commuting-cubes-of-maps.lagda.md b/src/foundation/commuting-cubes-of-maps.lagda.md
index 47d6b48201..13e4c00e42 100644
--- a/src/foundation/commuting-cubes-of-maps.lagda.md
+++ b/src/foundation/commuting-cubes-of-maps.lagda.md
@@ -16,11 +16,11 @@ open import foundation.function-extensionality
open import foundation.homotopies
open import foundation.universe-levels
open import foundation.whiskering-homotopies-composition
-open import foundation.whiskering-identifications-concatenation
open import foundation-core.function-types
open import foundation-core.identity-types
open import foundation-core.precomposition-functions
+open import foundation-core.whiskering-identifications-concatenation
```
diff --git a/src/foundation/commuting-prisms-of-maps.lagda.md b/src/foundation/commuting-prisms-of-maps.lagda.md
index de583eb4b9..0c374973c9 100644
--- a/src/foundation/commuting-prisms-of-maps.lagda.md
+++ b/src/foundation/commuting-prisms-of-maps.lagda.md
@@ -10,7 +10,6 @@ open import foundation-core.commuting-prisms-of-maps public
```agda
open import foundation.action-on-identifications-functions
-open import foundation.commuting-squares-of-homotopies
open import foundation.commuting-squares-of-maps
open import foundation.commuting-triangles-of-maps
open import foundation.composition-algebra
@@ -22,6 +21,7 @@ open import foundation.precomposition-functions
open import foundation.universe-levels
open import foundation.whiskering-homotopies-composition
+open import foundation-core.commuting-squares-of-homotopies
open import foundation-core.equivalences
open import foundation-core.function-types
open import foundation-core.functoriality-dependent-function-types
@@ -96,13 +96,22 @@ module _
( right-whisker-concat-coherence-square-homotopies
( front-bottom ·r hA)
( bottom ·r hA' ·r hA)
+ ( hC' ·l mid ·r hA)
+ ( ( pasting-horizontal-coherence-square-maps
+ h' g' hA' hB' hC' h'' g'' left-bottom right-bottom) ·r
+ ( hA))
+ ( prism-bottom ·r hA)
( hC' ·l ((g' ·l left-top) ∙h (right-top ·r h)))
- ( prism-bottom ·r hA)) ∙h
+ ) ∙h
( ap-concat-htpy
( front-bottom ·r hA)
( ( map-coherence-square-homotopies hC'
( front-top)
( mid ·r hA)
+ (hC ·l top)
+ ( pasting-horizontal-coherence-square-maps h g hA hB hC h' g'
+ ( left-top)
+ ( right-top))
( prism-top)) ∙h
( ap-concat-htpy
( hC' ·l front-top)
diff --git a/src/foundation/commuting-squares-of-homotopies.lagda.md b/src/foundation/commuting-squares-of-homotopies.lagda.md
index 5ae628881b..fa4657be1f 100644
--- a/src/foundation/commuting-squares-of-homotopies.lagda.md
+++ b/src/foundation/commuting-squares-of-homotopies.lagda.md
@@ -10,282 +10,534 @@ open import foundation-core.commuting-squares-of-homotopies public
```agda
open import foundation.commuting-squares-of-identifications
-open import foundation.functoriality-dependent-function-types
+open import foundation.dependent-pair-types
open import foundation.universe-levels
-open import foundation.whiskering-homotopies-composition
open import foundation-core.equivalences
+open import foundation-core.functoriality-dependent-function-types
open import foundation-core.homotopies
+open import foundation-core.identity-types
```
## Idea
-A square of [homotopies](foundation-core.homotopies.md)
+A square of [homotopies](foundation-core.identity-types.md)
```text
- top
- f ------> g
- | |
- left | | right
- v v
- h ------> i
- bottom
+ top
+ f -------> g
+ | |
+ left | | right
+ ∨ ∨
+ h -------> i
+ bottom
```
-is said to be a {{#concept "commuting square" Disambiguation="homotopies"}} of
-homotopies if there is a homotopy `left ∙h bottom ~ top ∙h right `. Such a
-homotopy is called a
+is said to be a
+{{#concept "commuting square" Disambiguation="homotopies" Agda=coherence-square-homotopies}}
+if there is a homotopy `left ∙h bottom ~ top ∙h right`. Such a homotopy is
+called a
{{#concept "coherence" Disambiguation="commuting square of homotopies" Agda=coherence-square-homotopies}}
of the square.
-### Right whiskering a commuting square of homotopies with respect to concatenation of homotopies
+### Concatenating homotopies of edges and coherences of commuting squares of homotopies
-Consider a
-[commuting square of homotopies](foundation.commuting-squares-of-homotopies.md)
+Consider a commuting square of homotopies and a homotopy of one of the four
+sides with another homotopy, as for example in the diagram below:
```text
- top
- f ------> g
- | |
- left | | right
- v v
- h ------> i
- bottom
+ top
+ a ---------> b
+ | | |
+ left | right |~| right'
+ ∨ ∨ ∨
+ c ---------> d.
+ bottom
```
-and consider a homotopy `H : i ~ j`. Then there is an equivalence of commuting
-squares of homotopies
+Then any homotopy witnessing that the square commutes can be concatenated with
+the homotopy on the side, to obtain a new commuting square of homotopies.
+
+#### Concatenating homotopies of the top edge with a coherence of a commuting square of homotopies
+
+Consider a commuting diagram of homotopies
```text
- top top
- f ------> g f -------------> g
- | | | |
- left | | right ≃ left | | right ∙h H
- ∨ ∨ ∨ ∨
- h ------> i h -------------> j
- bottom bottom ∙h H
+ top'
+ ------->
+ f -------> g
+ | top |
+ left | | right
+ ∨ ∨
+ h -------> i.
+ bottom
```
-This is the
-{{#concept "right whiskering" Disambiguation="commuting squares of homotopies with respect to concatenation" Agda=right-whisker-concat-coherence-square-homotopies}}
-operation of commuting squares of homotopies with respect to concatenation.
+with a homotopy `top ~ top'`. Then we get an equivalence
+
+```text
+ top top'
+ f -------> g f -------> g
+ | | | |
+ left | | right ≃ left | | right
+ ∨ ∨ ∨ ∨
+ h -------> i h -------> i.
+ bottom bottom
+```
```agda
module _
- { l1 l2 : Level} {A : UU l1} {B : UU l2}
- { f g g' h k : A → B}
- ( H : f ~ g) (H' : f ~ g') {K : g ~ h} {K' : g' ~ h} (L : h ~ k)
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i)
+ {top' : f ~ g} (s : top ~ top')
where
- equiv-right-whisker-concat-coherence-square-homotopies :
- coherence-square-homotopies H H' K K' ≃
- coherence-square-homotopies H H' (K ∙h L) (K' ∙h L)
- equiv-right-whisker-concat-coherence-square-homotopies =
- equiv-Π-equiv-family
- ( λ a →
- equiv-right-whisker-concat-coherence-square-identifications
- ( H a)
- ( H' a)
- ( K a)
- ( K' a)
- ( L a))
-
- right-whisker-concat-coherence-square-homotopies :
- coherence-square-homotopies H H' K K' →
- coherence-square-homotopies H H' (K ∙h L) (K' ∙h L)
- right-whisker-concat-coherence-square-homotopies =
- map-equiv equiv-right-whisker-concat-coherence-square-homotopies
-
- right-unwhisker-concat-htpy-coherence-square-homotopies :
- coherence-square-homotopies H H' (K ∙h L) (K' ∙h L) →
- coherence-square-homotopies H H' K K'
- right-unwhisker-concat-htpy-coherence-square-homotopies =
- map-inv-equiv equiv-right-whisker-concat-coherence-square-homotopies
+ abstract
+ is-equiv-concat-top-homotopy-coherence-square-homotopies :
+ is-equiv
+ ( concat-top-homotopy-coherence-square-homotopies
+ top left right bottom s)
+ is-equiv-concat-top-homotopy-coherence-square-homotopies =
+ is-equiv-map-Π-is-fiberwise-equiv
+ ( λ x →
+ is-equiv-concat-top-identification-coherence-square-identifications
+ ( top x) (left x) (right x) (bottom x) (s x))
+
+ equiv-concat-top-homotopy-coherence-square-homotopies :
+ coherence-square-homotopies top left right bottom ≃
+ coherence-square-homotopies top' left right bottom
+ pr1 equiv-concat-top-homotopy-coherence-square-homotopies =
+ concat-top-homotopy-coherence-square-homotopies top left right bottom s
+ pr2 equiv-concat-top-homotopy-coherence-square-homotopies =
+ is-equiv-concat-top-homotopy-coherence-square-homotopies
```
-### Left whiskering a commuting square of homotopies with respect to concatenation of homotopies
+#### Concatenating homotopies of the left edge with a coherence of a commuting square of homotopies
+
+Consider a commuting diagram of homotopies
+
+```text
+ top
+ f -------> g
+ | | |
+ left' | | left | right
+ ∨ ∨ ∨
+ h -------> i.
+ bottom
+```
-Consider a
-[commuting square of homotopies](foundation.commuting-squares-of-homotopies.md)
+with a homotopy `left ~ left'`. Then we get an equivalence
```text
- top
- f ------> g
- | |
- left | | right
- v v
- h ------> i
- bottom
+ top top
+ f -------> g f -------> g
+ | | | |
+ left | | right ≃ left' | | right
+ ∨ ∨ ∨ ∨
+ h -------> i h -------> i.
+ bottom bottom
```
-and consider a homotopy `H : e ~ f`. Then there is an equivalence of commuting
-squares of homotopies
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i)
+ {left' : f ~ h} (s : left ~ left')
+ where
+
+ abstract
+ is-equiv-concat-left-homotopy-coherence-square-homotopies :
+ is-equiv
+ ( concat-left-homotopy-coherence-square-homotopies
+ top left right bottom s)
+ is-equiv-concat-left-homotopy-coherence-square-homotopies =
+ is-equiv-map-Π-is-fiberwise-equiv
+ ( λ x →
+ is-equiv-concat-left-identification-coherence-square-identifications
+ ( top x) (left x) (right x) (bottom x) (s x))
+
+ equiv-concat-left-homotopy-coherence-square-homotopies :
+ coherence-square-homotopies top left right bottom ≃
+ coherence-square-homotopies top left' right bottom
+ pr1 equiv-concat-left-homotopy-coherence-square-homotopies =
+ concat-left-homotopy-coherence-square-homotopies top left right bottom s
+ pr2 equiv-concat-left-homotopy-coherence-square-homotopies =
+ is-equiv-concat-left-homotopy-coherence-square-homotopies
+```
+
+#### Concatenating homotopies of the right edge with a coherence of a commuting square of homotopies
+
+Consider a commuting diagram of homotopies
```text
- top H ∙h top
- f ------> g e ----------> g
- | | | |
- left | | right ≃ H ∙h left | | right
- ∨ ∨ ∨ ∨
- h ------> i h ----------> i
- bottom bottom
+ top
+ f -------> g
+ | | |
+ left | right | | right'
+ ∨ ∨ ∨
+ h -------> i.
+ bottom
```
-This is the
-{{#concept "left whiskering" Disambiguation="commuting squares of homotopies with respect to concatenation" Agda=left-whisker-concat-coherence-square-homotopies}}
-operation of commuting squares of homotopies with respect to concatenation.
+with a homotopy `right ~ right'`. Then we get an equivalence
+
+```text
+ top top
+ f -------> g f -------> g
+ | | | |
+ left | | right ≃ left | | right'
+ ∨ ∨ ∨ ∨
+ h -------> i h -------> i.
+ bottom bottom
+```
```agda
module _
- { l1 l2 : Level} {A : UU l1} {B : UU l2}
- { f g g' h k : A → B}
- ( L : k ~ f) {H : f ~ g} {H' : f ~ g'} {K : g ~ h} {K' : g' ~ h}
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i)
+ {right' : g ~ i} (s : right ~ right')
where
- equiv-left-whisker-concat-coherence-square-homotopies :
- ( coherence-square-homotopies H H' K K') ≃
- ( coherence-square-homotopies (L ∙h H) (L ∙h H') K K')
- equiv-left-whisker-concat-coherence-square-homotopies =
- equiv-Π-equiv-family
- ( λ a →
- equiv-left-whisker-concat-coherence-square-identifications
- ( L a)
- ( H a)
- ( H' a)
- ( K a)
- ( K' a))
-
- left-whisker-concat-coherence-square-homotopies :
- coherence-square-homotopies H H' K K' →
- coherence-square-homotopies (L ∙h H) (L ∙h H') K K'
- left-whisker-concat-coherence-square-homotopies =
- map-equiv equiv-left-whisker-concat-coherence-square-homotopies
-
- left-unwhisker-concat-htpy-coherence-square-homotopies :
- coherence-square-homotopies (L ∙h H) (L ∙h H') K K' →
- coherence-square-homotopies H H' K K'
- left-unwhisker-concat-htpy-coherence-square-homotopies =
- map-inv-equiv equiv-left-whisker-concat-coherence-square-homotopies
+ abstract
+ is-equiv-concat-right-homotopy-coherence-square-homotopies :
+ is-equiv
+ ( concat-right-homotopy-coherence-square-homotopies
+ top left right bottom s)
+ is-equiv-concat-right-homotopy-coherence-square-homotopies =
+ is-equiv-map-Π-is-fiberwise-equiv
+ ( λ x →
+ is-equiv-concat-right-identification-coherence-square-identifications
+ ( top x) (left x) (right x) (bottom x) (s x))
+
+ equiv-concat-right-homotopy-coherence-square-homotopies :
+ coherence-square-homotopies top left right bottom ≃
+ coherence-square-homotopies top left right' bottom
+ pr1 equiv-concat-right-homotopy-coherence-square-homotopies =
+ concat-right-homotopy-coherence-square-homotopies top left right bottom s
+ pr2 equiv-concat-right-homotopy-coherence-square-homotopies =
+ is-equiv-concat-right-homotopy-coherence-square-homotopies
+```
+
+#### Concatenating homotopies of the bottom edge with a coherence of a commuting square of homotopies
+
+Consider a commuting diagram of homotopies
+
+```text
+ top
+ f -------> g
+ | |
+ left | | right
+ ∨ bottom ∨
+ h -------> i.
+ ------->
+ bottom'
+```
+
+with a homotopy `bottom ~ bottom'`. Then we get an equivalence
+
+```text
+ top top
+ f -------> g f -------> g
+ | | | |
+ left | | right ≃ left | | right
+ ∨ ∨ ∨ ∨
+ h -------> i h -------> i.
+ bottom bottom'
+```
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i)
+ {bottom' : h ~ i} (s : bottom ~ bottom')
+ where
+
+ is-equiv-concat-bottom-homotopy-coherence-square-homotopies :
+ is-equiv
+ ( concat-bottom-homotopy-coherence-square-homotopies
+ top left right bottom s)
+ is-equiv-concat-bottom-homotopy-coherence-square-homotopies =
+ is-equiv-map-Π-is-fiberwise-equiv
+ ( λ x →
+ is-equiv-concat-bottom-identification-coherence-square-identifications
+ ( top x) (left x) (right x) (bottom x) (s x))
+
+ equiv-concat-bottom-homotopy-coherence-square-homotopies :
+ coherence-square-homotopies top left right bottom ≃
+ coherence-square-homotopies top left right bottom'
+ pr1 equiv-concat-bottom-homotopy-coherence-square-homotopies =
+ concat-bottom-homotopy-coherence-square-homotopies top left right bottom s
+ pr2 equiv-concat-bottom-homotopy-coherence-square-homotopies =
+ is-equiv-concat-bottom-homotopy-coherence-square-homotopies
+```
+
+### Whiskering and splicing coherences of commuting squares of homotopies
+
+Given a commuting square of homotopies
+
+```text
+ top
+ f -------> g
+ | |
+ left | | right
+ ∨ ∨
+ h -------> i,
+ bottom
```
-### Left whiskering a commuting square of homotopies with respect to concatenation of homotopies
+we may consider four ways of attaching new homotopies to it:
+
+1. Prepending `p : u ~ f` to the left gives us a commuting square
+
+ ```text
+ p ∙h top
+ u -------> g
+ | |
+ p ∙h left | | right
+ ∨ ∨
+ h -------> i.
+ bottom
+ ```
+
+ More precisely, we have an equivalence
-Consider a
-[commuting square of homotopies](foundation.commuting-squares-of-homotopies.md)
+ ```text
+ (left ∙h bottom ~ top ∙h right) ≃ ((p ∙h left) ∙h bottom ~ (p ∙h top) ∙h right).
+ ```
+
+2. Appending a homotopy `p : i ~ u` to the right gives a commuting square of
+ homotopies
+
+ ```text
+ top
+ f ------------> g
+ | |
+ left | | right ∙h p
+ ∨ ∨
+ h ------------> u.
+ bottom ∙h p
+ ```
+
+ More precisely, we have an equivalence
+
+ ```text
+ (left ∙h bottom ~ top ∙h right) ≃ (left ∙h (bottom ∙h p) ~ top ∙h (right ∙h p)).
+ ```
+
+3. Splicing a homotopy `p : h ~ u` and its inverse into the middle gives a
+ commuting square of homotopies
+
+ ```text
+ top
+ f --------------> g
+ | |
+ left ∙h p | | right
+ ∨ ∨
+ u --------------> i.
+ p⁻¹ ∙h bottom
+ ```
+
+ More precisely, we have an equivalence
+
+ ```text
+ (left ∙h bottom ~ top ∙h right) ≃ ((left ∙h p) ∙h (p⁻¹ ∙h bottom) ~ top ∙h right).
+ ```
+
+ Similarly, we have an equivalence
+
+ ```text
+ (left ∙h bottom ~ top ∙h right) ≃ ((left ∙h p⁻¹) ∙h (p ∙h bottom) ~ top ∙h right).
+ ```
+
+4. Splicing a homotopy `p : g ~ u` and its inverse into the middle gives a
+ commuting square of homotopies
+
+ ```text
+ top ∙h p
+ f --------> u
+ | |
+ left | | p⁻¹ ∙h right
+ ∨ ∨
+ h --------> i.
+ bottom
+ ```
+
+ More precisely, we have an equivalence
+
+ ```text
+ (left ∙h bottom ~ top ∙h right) ≃ (left ∙h bottom ~ (top ∙h p) ∙h (p⁻¹ ∙h right)).
+ ```
+
+ Similarly, we have an equivalence
+
+ ```text
+ (left ∙h bottom ~ top ∙h right) ≃ (left ∙h bottom ~ (top ∙h p⁻¹) ∙h (p ∙h right)).
+ ```
+
+These operations are useful in proofs involving homotopy algebra, because taking
+`equiv-right-whisker-concat-coherence-square-homotopies` as an example, it
+provides us with two maps: the forward direction states
+`(p ∙h r ~ q ∙h s) → (p ∙h (r ∙h t)) ~ q ∙h (s ∙h t))`, which allows one to
+append a homotopy without needing to reassociate on the right, and the backwards
+direction conversely allows one to cancel out a homotopy in parentheses.
+
+#### Left whiskering coherences of commuting squares of homotopies
+
+For any homotopy `p : u ~ f` we obtain an equivalence
```text
- top
- f ------> g
- | |
- left | | right
- v v
- h ------> i
- bottom
+ top p ∙h top
+ f -------> g u -------> g
+ | | | |
+ left | | right ≃ p ∙h left | | right
+ ∨ ∨ ∨ ∨
+ h -------> i h -------> i
+ bottom bottom
+```
+
+of coherences of commuting squares of homotopies.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i u : (x : A) → B x}
+ where
+
+ equiv-left-whisker-concat-coherence-square-homotopies :
+ (p : u ~ f)
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) →
+ coherence-square-homotopies top left right bottom ≃
+ coherence-square-homotopies (p ∙h top) (p ∙h left) right bottom
+ equiv-left-whisker-concat-coherence-square-homotopies
+ p top left right bottom =
+ equiv-Π-equiv-family
+ ( λ x →
+ equiv-left-whisker-concat-coherence-square-identifications
+ ( p x) (top x) (left x) (right x) (bottom x))
```
-and consider a homotopy `H : e ~ f`. Then there is an equivalence of commuting
-squares of homotopies
+#### Right whiskering coherences of commuting squares of homotopies
+
+For any homotopy `p : i ~ u` we obtain an equivalence
```text
- top H ∙h top
- f ------> g e ----------> g
- | | | |
- left | | right ≃ H ∙h left | | right
- ∨ ∨ ∨ ∨
- h ------> i h ----------> i
- bottom bottom
+ top top
+ f -------> g f ------------> g
+ | | | |
+ left | | right ≃ left | | right ∙h p
+ ∨ ∨ ∨ ∨
+ h -------> i h ------------> i
+ bottom bottom ∙h p
```
-This is the
-{{#concept "double whiskering" Disambiguation="commuting squares of homotopies with respect to concatenation" Agda=double-whisker-coherence-square-homotopies}}
-operation of commuting squares of homotopies with respect to concatenation.
+of coherences of commuting squares of homotopies.
```agda
module _
- { l1 l2 : Level} {A : UU l1} {B : UU l2}
- { f g h h' k m : A → B}
- ( H : f ~ g) {K : g ~ h} {K' : g ~ h'} {L : h ~ k} {L' : h' ~ k} (M : k ~ m)
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i)
where
- equiv-double-whisker-coherence-square-homotopies :
- ( coherence-square-homotopies K K' L L') ≃
- ( coherence-square-homotopies (H ∙h K) (H ∙h K') (L ∙h M) (L' ∙h M))
- equiv-double-whisker-coherence-square-homotopies =
+ equiv-right-whisker-concat-coherence-square-homotopies :
+ {u : (x : A) → B x} (p : i ~ u) →
+ coherence-square-homotopies top left right bottom ≃
+ coherence-square-homotopies top left (right ∙h p) (bottom ∙h p)
+ equiv-right-whisker-concat-coherence-square-homotopies p =
equiv-Π-equiv-family
- ( λ a →
- equiv-double-whisker-square-identifications
- ( H a)
- ( K a)
- ( K' a)
- ( L a)
- ( L' a)
- ( M a))
-
- double-whisker-coherence-square-homotopies :
- ( coherence-square-homotopies K K' L L') →
- ( coherence-square-homotopies (H ∙h K) (H ∙h K') (L ∙h M) (L' ∙h M))
- double-whisker-coherence-square-homotopies =
- map-equiv equiv-double-whisker-coherence-square-homotopies
-
- double-unwhisker-concat-htpy-coherence-square-homotopies :
- ( coherence-square-homotopies (H ∙h K) (H ∙h K') (L ∙h M) (L' ∙h M)) →
- ( coherence-square-homotopies K K' L L')
- double-unwhisker-concat-htpy-coherence-square-homotopies =
- map-inv-equiv equiv-double-whisker-coherence-square-homotopies
+ ( λ x →
+ equiv-right-whisker-concat-coherence-square-identifications
+ ( top x) (left x) (right x) (bottom x) (p x))
```
-### Whiskering a square of homotopies by a map
+#### Left splicing coherences of commuting squares of homotopies
-Given a square of homotopies
+For any inverse pair of homotopies `p : g ~ u` and `q : u ~ g` equipped with
+`α : inv-htpy p ~ q` we obtain an equivalence
```text
- H
- g -----> h
- | |
- H' | ⇗ | K
- ∨ ∨
- h' -----> k
- K'
+ top top
+ f -------> g f -----------> g
+ | | | |
+ left | | right ≃ left ∙h p | | right
+ ∨ ∨ ∨ ∨
+ h -------> i u -----------> i
+ bottom q ∙h bottom
+```
+
+of coherences of commuting squares of homotopies.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i)
+ where
+
+ equiv-left-splice-coherence-square-homotopies :
+ {u : (x : A) → B x} (p : h ~ u) (q : u ~ h) (α : inv-htpy p ~ q) →
+ coherence-square-homotopies top left right bottom ≃
+ coherence-square-homotopies top (left ∙h p) right (q ∙h bottom)
+ equiv-left-splice-coherence-square-homotopies p q α =
+ equiv-Π-equiv-family
+ ( λ x →
+ equiv-left-splice-coherence-square-identifications
+ ( top x) (left x) (right x) (bottom x) (p x) (q x) (α x))
```
-and a map `f`, we may whisker it by a map on the left into a square of
-homotopies
+#### Right splicing coherences of commuting squares of homotopies
+
+For any inverse pair of homotopies `p : g ~ u` and `q : u ~ g` equipped with
+`α : inv-htpy p ~ q` we obtain an equivalence
```text
- f ·l H
- fg --------> fh
- | |
- f ·l H' | ⇗ |f ·l K
- ∨ ∨
- fh' --------> fk,
- f ·l K'
+ top top ∙h p
+ f -------> g f --------> u
+ | | | |
+ left | | right ≃ left | | q ∙h right
+ ∨ ∨ ∨ ∨
+ h -------> i h --------> i
+ bottom bottom
```
-and similarly we may whisker it on the right.
+of coherences of commuting squares of homotopies.
```agda
module _
- { l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3}
- ( f : B → C) {g h h' k : A → B}
- ( H : g ~ h) (H' : g ~ h') {K : h ~ k} {K' : h' ~ k}
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x}
+ (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i)
where
- map-coherence-square-homotopies :
- coherence-square-homotopies H H' K K' →
- coherence-square-homotopies (f ·l H) (f ·l H') (f ·l K) (f ·l K')
- map-coherence-square-homotopies α a =
- map-coherence-square-identifications f (H a) (H' a) (K a) (K' a) (α a)
+ equiv-right-splice-coherence-square-homotopies :
+ {u : (x : A) → B x} (p : g ~ u) (q : u ~ g) (α : inv-htpy p ~ q) →
+ coherence-square-homotopies top left right bottom ≃
+ coherence-square-homotopies (top ∙h p) left (inv-htpy p ∙h right) bottom
+ equiv-right-splice-coherence-square-homotopies p q α =
+ equiv-Π-equiv-family
+ ( λ x →
+ equiv-right-splice-coherence-square-identifications
+ ( top x) (left x) (right x) (bottom x) (p x) (q x) (α x))
+```
+
+### Double whiskering of commuting squares of homotopies
+```agda
module _
- { l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3}
- { g h h' k : B → C} (H : g ~ h) (H' : g ~ h') {K : h ~ k} {K' : h' ~ k}
- ( f : A → B)
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h u v i : (x : A) → B x}
where
- right-whisker-comp-coherence-square-homotopies :
- coherence-square-homotopies H H' K K' →
- coherence-square-homotopies (H ·r f) (H' ·r f) (K ·r f) (K' ·r f)
- right-whisker-comp-coherence-square-homotopies α = α ·r f
+ equiv-double-whisker-coherence-square-homotopies :
+ (p : f ~ g)
+ (top : g ~ u) (left : g ~ h) (right : u ~ v) (bottom : h ~ v)
+ (s : v ~ i) →
+ coherence-square-homotopies top left right bottom ≃
+ coherence-square-homotopies
+ ( p ∙h top)
+ ( p ∙h left)
+ ( right ∙h s)
+ ( bottom ∙h s)
+ equiv-double-whisker-coherence-square-homotopies p top left right bottom q =
+ equiv-Π-equiv-family
+ ( λ x →
+ equiv-double-whisker-coherence-square-identifications
+ ( p x) (top x) (left x) (right x) (bottom x) (q x))
```
diff --git a/src/foundation/commuting-squares-of-identifications.lagda.md b/src/foundation/commuting-squares-of-identifications.lagda.md
index 8c537e89f2..75891f4367 100644
--- a/src/foundation/commuting-squares-of-identifications.lagda.md
+++ b/src/foundation/commuting-squares-of-identifications.lagda.md
@@ -2,21 +2,18 @@
```agda
module foundation.commuting-squares-of-identifications where
+
+open import foundation-core.commuting-squares-of-identifications public
```
Imports
```agda
-open import foundation.action-on-identifications-functions
open import foundation.dependent-pair-types
open import foundation.universe-levels
-open import foundation.whiskering-identifications-concatenation
open import foundation-core.equivalences
-open import foundation-core.function-types
open import foundation-core.identity-types
-open import foundation-core.retractions
-open import foundation-core.sections
```
@@ -42,197 +39,6 @@ identification is called a
{{#concept "coherence" Disambiguation="commuting square of identifications" Agda=coherence-square-identifications}}
of the square.
-## Definitions
-
-### Commuting squares of identifications
-
-```agda
-module _
- {l : Level} {A : UU l} {x y z w : A}
- (top : x = y) (left : x = z) (right : y = w) (bottom : z = w)
- where
-
- coherence-square-identifications : UU l
- coherence-square-identifications = left ∙ bottom = top ∙ right
-```
-
-### Horizontally constant squares
-
-{{#concept "Horizontally constant squares" Disambiguation="identifications" Agda=horizontal-refl-coherence-square-identifications}}
-are commuting squares of identifications of the form
-
-```text
- refl
- a -----> a
- | |
- p | | p
- ∨ ∨
- b -----> b.
- refl
-```
-
-```agda
-module _
- {l : Level} {A : UU l} {a b : A} (p : a = b)
- where
-
- horizontal-refl-coherence-square-identifications :
- coherence-square-identifications refl p p refl
- horizontal-refl-coherence-square-identifications = right-unit
-```
-
-### Vertically constant squares
-
-{{#concept "Vertically constant squares" Disambiguation="identifications" Agda=vertical-refl-coherence-square-identifications}}
-are commuting squares of identifications of the form
-
-```text
- p
- a -----> b
- | |
- refl | | refl
- ∨ ∨
- a -----> b.
- p
-```
-
-```agda
-module _
- {l : Level} {A : UU l} {a b : A} (p : a = b)
- where
-
- vertical-refl-coherence-square-identifications :
- coherence-square-identifications p refl refl p
- vertical-refl-coherence-square-identifications = inv right-unit
-```
-
-## Operations
-
-### Inverting squares of identifications horizontally
-
-Given a commuting square of identifications
-
-```text
- top
- x -------> y
- | |
- left | | right
- ∨ ∨
- z -------> w,
- bottom
-```
-
-the square of identifications
-
-```text
- inv top
- y ------------> x
- | |
- right | | left
- ∨ ∨
- w ------------> z
- inv bottom
-```
-
-commutes.
-
-```agda
-module _
- {l : Level} {A : UU l} {x y z w : A}
- where
-
- horizontal-inv-coherence-square-identifications :
- (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) →
- coherence-square-identifications top left right bottom →
- coherence-square-identifications (inv top) right left (inv bottom)
- horizontal-inv-coherence-square-identifications refl refl right refl coh =
- right-unit ∙ inv coh
-```
-
-### Inverting squares of identifications vertically
-
-Given a commuting square of identifications
-
-```text
- top
- x -------> y
- | |
- left | | right
- ∨ ∨
- z -------> w,
- bottom
-```
-
-the square of identifications
-
-```text
- bottom
- z -------> w
- | |
- inv left | | inv right
- ∨ ∨
- x -------> y
- top
-```
-
-commutes.
-
-```agda
-module _
- {l : Level} {A : UU l} {x y z w : A}
- where
-
- vertical-inv-coherence-square-identifications :
- (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) →
- coherence-square-identifications top left right bottom →
- coherence-square-identifications bottom (inv left) (inv right) top
- vertical-inv-coherence-square-identifications refl refl refl refl refl = refl
-```
-
-### Functions acting on squares of identifications
-
-Given a commuting square of identifications
-
-```text
- top
- x -------> y
- | |
- left | | right
- ∨ ∨
- z -------> w
- bottom
-```
-
-in a type `A`, and given a map `f : A → B`, the square of identifications
-
-```text
- ap f top
- f x -----------> f y
- | |
- ap f left | | ap f right
- ∨ ∨
- z -------------> w
- ap f bottom
-```
-
-commutes.
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2} {x y z w : A} (f : A → B)
- where
-
- map-coherence-square-identifications :
- (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) →
- coherence-square-identifications top left right bottom →
- coherence-square-identifications
- ( ap f top)
- ( ap f left)
- ( ap f right)
- ( ap f bottom)
- map-coherence-square-identifications refl refl right refl coh = ap (ap f) coh
-```
-
### Concatenating identifications of edges and coherences of commuting squares of identifications
Consider a commuting square of identifications and an identification of one of
@@ -252,10 +58,6 @@ Then any identification witnessing that the square commutes can be concatenated
with the identification on the side, to obtain a new commuting square of
identifications.
-**Note.** To avoid cyclic module dependencies we will give direct proofs that
-concatenating identifications of edges of a square with the coherence of its
-commutativity is an equivalence.
-
#### Concatenating identifications of the top edge with a coherence of a commuting square of identifications
Consider a commuting diagram of identifications
@@ -290,46 +92,26 @@ module _
{top' : x = y} (s : top = top')
where
- concat-top-identification-coherence-square-identifications :
- coherence-square-identifications top left right bottom →
- coherence-square-identifications top' left right bottom
- concat-top-identification-coherence-square-identifications t =
- t ∙ ap (concat' _ right) s
-
- inv-concat-top-identification-coherence-square-identifications :
- coherence-square-identifications top' left right bottom →
- coherence-square-identifications top left right bottom
- inv-concat-top-identification-coherence-square-identifications t =
- t ∙ inv (ap (concat' _ right) s)
-
- is-section-inv-concat-top-identification-coherence-square-identifications :
- is-section
- concat-top-identification-coherence-square-identifications
- inv-concat-top-identification-coherence-square-identifications
- is-section-inv-concat-top-identification-coherence-square-identifications =
- is-section-inv-concat' (ap (concat' _ right) s)
-
- is-retraction-inv-concat-top-identification-coherence-square-identifications :
- is-retraction
- concat-top-identification-coherence-square-identifications
- inv-concat-top-identification-coherence-square-identifications
- is-retraction-inv-concat-top-identification-coherence-square-identifications =
- is-retraction-inv-concat' (ap (concat' _ right) s)
-
abstract
is-equiv-concat-top-identification-coherence-square-identifications :
- is-equiv concat-top-identification-coherence-square-identifications
+ is-equiv
+ ( concat-top-identification-coherence-square-identifications
+ top left right bottom s)
is-equiv-concat-top-identification-coherence-square-identifications =
is-equiv-is-invertible
- inv-concat-top-identification-coherence-square-identifications
- is-section-inv-concat-top-identification-coherence-square-identifications
- is-retraction-inv-concat-top-identification-coherence-square-identifications
+ ( inv-concat-top-identification-coherence-square-identifications
+ top left right bottom s)
+ ( is-section-inv-concat-top-identification-coherence-square-identifications
+ top left right bottom s)
+ ( is-retraction-inv-concat-top-identification-coherence-square-identifications
+ top left right bottom s)
equiv-concat-top-identification-coherence-square-identifications :
coherence-square-identifications top left right bottom ≃
coherence-square-identifications top' left right bottom
pr1 equiv-concat-top-identification-coherence-square-identifications =
concat-top-identification-coherence-square-identifications
+ top left right bottom s
pr2 equiv-concat-top-identification-coherence-square-identifications =
is-equiv-concat-top-identification-coherence-square-identifications
```
@@ -367,45 +149,26 @@ module _
{left' : x = z} (s : left = left')
where
- concat-left-identification-coherence-square-identifications :
- coherence-square-identifications top left right bottom →
- coherence-square-identifications top left' right bottom
- concat-left-identification-coherence-square-identifications t =
- inv (ap (concat' _ bottom) s) ∙ t
-
- inv-concat-left-identification-coherence-square-identifications :
- coherence-square-identifications top left' right bottom →
- coherence-square-identifications top left right bottom
- inv-concat-left-identification-coherence-square-identifications t =
- ap (concat' _ bottom) s ∙ t
-
- is-section-inv-concat-left-identification-coherence-square-identifications :
- is-section
- concat-left-identification-coherence-square-identifications
- inv-concat-left-identification-coherence-square-identifications
- is-section-inv-concat-left-identification-coherence-square-identifications =
- is-retraction-inv-concat (ap (concat' _ bottom) s)
-
- is-retraction-inv-concat-left-identification-coherence-square-identifications :
- is-retraction
- concat-left-identification-coherence-square-identifications
- inv-concat-left-identification-coherence-square-identifications
- is-retraction-inv-concat-left-identification-coherence-square-identifications =
- is-section-inv-concat (ap (concat' _ bottom) s)
-
- is-equiv-concat-left-identification-coherence-square-identifications :
- is-equiv concat-left-identification-coherence-square-identifications
- is-equiv-concat-left-identification-coherence-square-identifications =
- is-equiv-is-invertible
- inv-concat-left-identification-coherence-square-identifications
- is-section-inv-concat-left-identification-coherence-square-identifications
- is-retraction-inv-concat-left-identification-coherence-square-identifications
+ abstract
+ is-equiv-concat-left-identification-coherence-square-identifications :
+ is-equiv
+ ( concat-left-identification-coherence-square-identifications
+ top left right bottom s)
+ is-equiv-concat-left-identification-coherence-square-identifications =
+ is-equiv-is-invertible
+ ( inv-concat-left-identification-coherence-square-identifications
+ top left right bottom s)
+ ( is-section-inv-concat-left-identification-coherence-square-identifications
+ top left right bottom s)
+ ( is-retraction-inv-concat-left-identification-coherence-square-identifications
+ top left right bottom s)
equiv-concat-left-identification-coherence-square-identifications :
coherence-square-identifications top left right bottom ≃
coherence-square-identifications top left' right bottom
pr1 equiv-concat-left-identification-coherence-square-identifications =
concat-left-identification-coherence-square-identifications
+ top left right bottom s
pr2 equiv-concat-left-identification-coherence-square-identifications =
is-equiv-concat-left-identification-coherence-square-identifications
```
@@ -443,46 +206,26 @@ module _
{right' : y = w} (s : right = right')
where
- concat-right-identification-coherence-square-identifications :
- coherence-square-identifications top left right bottom →
- coherence-square-identifications top left right' bottom
- concat-right-identification-coherence-square-identifications t =
- t ∙ ap (concat top _) s
-
- inv-concat-right-identification-coherence-square-identifications :
- coherence-square-identifications top left right' bottom →
- coherence-square-identifications top left right bottom
- inv-concat-right-identification-coherence-square-identifications t =
- t ∙ inv (ap (concat top _) s)
-
- is-section-inv-concat-right-identification-coherence-square-identifications :
- is-section
- concat-right-identification-coherence-square-identifications
- inv-concat-right-identification-coherence-square-identifications
- is-section-inv-concat-right-identification-coherence-square-identifications =
- is-section-inv-concat' (ap (concat top _) s)
-
- is-retraction-inv-concat-right-identification-coherence-square-identifications :
- is-retraction
- concat-right-identification-coherence-square-identifications
- inv-concat-right-identification-coherence-square-identifications
- is-retraction-inv-concat-right-identification-coherence-square-identifications =
- is-retraction-inv-concat' (ap (concat top _) s)
-
abstract
is-equiv-concat-right-identification-coherence-square-identifications :
- is-equiv concat-right-identification-coherence-square-identifications
+ is-equiv
+ ( concat-right-identification-coherence-square-identifications
+ top left right bottom s)
is-equiv-concat-right-identification-coherence-square-identifications =
is-equiv-is-invertible
- inv-concat-right-identification-coherence-square-identifications
- is-section-inv-concat-right-identification-coherence-square-identifications
- is-retraction-inv-concat-right-identification-coherence-square-identifications
+ ( inv-concat-right-identification-coherence-square-identifications
+ top left right bottom s)
+ ( is-section-inv-concat-right-identification-coherence-square-identifications
+ top left right bottom s)
+ ( is-retraction-inv-concat-right-identification-coherence-square-identifications
+ top left right bottom s)
equiv-concat-right-identification-coherence-square-identifications :
coherence-square-identifications top left right bottom ≃
coherence-square-identifications top left right' bottom
pr1 equiv-concat-right-identification-coherence-square-identifications =
concat-right-identification-coherence-square-identifications
+ top left right bottom s
pr2 equiv-concat-right-identification-coherence-square-identifications =
is-equiv-concat-right-identification-coherence-square-identifications
```
@@ -521,45 +264,25 @@ module _
{bottom' : z = w} (s : bottom = bottom')
where
- concat-bottom-identification-coherence-square-identifications :
- coherence-square-identifications top left right bottom →
- coherence-square-identifications top left right bottom'
- concat-bottom-identification-coherence-square-identifications t =
- inv (ap (concat left _) s) ∙ t
-
- inv-concat-bottom-identification-coherence-square-identifications :
- coherence-square-identifications top left right bottom' →
- coherence-square-identifications top left right bottom
- inv-concat-bottom-identification-coherence-square-identifications t =
- ap (concat left _) s ∙ t
-
- is-section-inv-concat-bottom-identification-coherence-square-identifications :
- is-section
- concat-bottom-identification-coherence-square-identifications
- inv-concat-bottom-identification-coherence-square-identifications
- is-section-inv-concat-bottom-identification-coherence-square-identifications =
- is-retraction-inv-concat (ap (concat left _) s)
-
- is-retraction-inv-concat-bottom-identification-coherence-square-identifications :
- is-retraction
- concat-bottom-identification-coherence-square-identifications
- inv-concat-bottom-identification-coherence-square-identifications
- is-retraction-inv-concat-bottom-identification-coherence-square-identifications =
- is-section-inv-concat (ap (concat left _) s)
-
is-equiv-concat-bottom-identification-coherence-square-identifications :
- is-equiv concat-bottom-identification-coherence-square-identifications
+ is-equiv
+ ( concat-bottom-identification-coherence-square-identifications
+ top left right bottom s)
is-equiv-concat-bottom-identification-coherence-square-identifications =
is-equiv-is-invertible
- inv-concat-bottom-identification-coherence-square-identifications
- is-section-inv-concat-bottom-identification-coherence-square-identifications
- is-retraction-inv-concat-bottom-identification-coherence-square-identifications
+ ( inv-concat-bottom-identification-coherence-square-identifications
+ top left right bottom s)
+ ( is-section-inv-concat-bottom-identification-coherence-square-identifications
+ top left right bottom s)
+ ( is-retraction-inv-concat-bottom-identification-coherence-square-identifications
+ top left right bottom s)
equiv-concat-bottom-identification-coherence-square-identifications :
coherence-square-identifications top left right bottom ≃
coherence-square-identifications top left right bottom'
pr1 equiv-concat-bottom-identification-coherence-square-identifications =
concat-bottom-identification-coherence-square-identifications
+ top left right bottom s
pr2 equiv-concat-bottom-identification-coherence-square-identifications =
is-equiv-concat-bottom-identification-coherence-square-identifications
```
@@ -668,7 +391,7 @@ we may consider four ways of attaching new identifications to it:
```
These operations are useful in proofs involving path algebra, because taking
-`equiv-right-whisker-concat-coherence-square-identicications` as an example, it
+`equiv-right-whisker-concat-coherence-square-identifications` as an example, it
provides us with two maps: the forward direction states
`(p ∙ r = q ∙ s) → (p ∙ (r ∙ t)) = q ∙ (s ∙ t))`, which allows one to append
an identification without needing to reassociate on the right, and the backwards
@@ -700,27 +423,9 @@ module _
(top : x = y) (left : x = z) (right : y = w) (bottom : z = w) →
coherence-square-identifications top left right bottom ≃
coherence-square-identifications (p ∙ top) (p ∙ left) right bottom
- equiv-left-whisker-concat-coherence-square-identifications refl
- top left right bottom =
- id-equiv
-
- left-whisker-concat-coherence-square-identifications :
- (p : u = x)
- (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) →
- coherence-square-identifications top left right bottom →
- coherence-square-identifications (p ∙ top) (p ∙ left) right bottom
- left-whisker-concat-coherence-square-identifications
+ equiv-left-whisker-concat-coherence-square-identifications
refl top left right bottom =
- id
-
- left-unwhisker-concat-coherence-square-identifications :
- (p : u = x)
- (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) →
- coherence-square-identifications (p ∙ top) (p ∙ left) right bottom →
- coherence-square-identifications top left right bottom
- left-unwhisker-concat-coherence-square-identifications
- refl top left right bottom =
- id
+ id-equiv
```
#### Right whiskering coherences of commuting squares of identifications
@@ -762,43 +467,6 @@ module _
( right)
( bottom)
( inv right-unit))
-
- right-whisker-concat-coherence-square-identifications :
- coherence-square-identifications top left right bottom →
- {u : A} (p : w = u) →
- coherence-square-identifications top left (right ∙ p) (bottom ∙ p)
- right-whisker-concat-coherence-square-identifications s refl =
- concat-bottom-identification-coherence-square-identifications
- ( top)
- ( left)
- ( right ∙ refl)
- ( bottom)
- ( inv right-unit)
- ( concat-right-identification-coherence-square-identifications
- ( top)
- ( left)
- ( right)
- ( bottom)
- ( inv right-unit)
- ( s))
-
- right-unwhisker-cohernece-square-identifications :
- {u : A} (p : w = u) →
- coherence-square-identifications top left (right ∙ p) (bottom ∙ p) →
- coherence-square-identifications top left right bottom
- right-unwhisker-cohernece-square-identifications refl =
- ( inv-concat-right-identification-coherence-square-identifications
- ( top)
- ( left)
- ( right)
- ( bottom)
- ( inv right-unit)) ∘
- ( inv-concat-bottom-identification-coherence-square-identifications
- ( top)
- ( left)
- ( right ∙ refl)
- ( bottom)
- ( inv right-unit))
```
#### Left splicing coherences of commuting squares of identifications
@@ -835,30 +503,6 @@ module _
( right)
( bottom)
( inv right-unit)
-
- left-splice-coherence-square-identifications :
- {u : A} (p : z = u) (q : u = z) (α : inv p = q) →
- coherence-square-identifications top left right bottom →
- coherence-square-identifications top (left ∙ p) right (q ∙ bottom)
- left-splice-coherence-square-identifications refl .refl refl =
- concat-left-identification-coherence-square-identifications
- ( top)
- ( left)
- ( right)
- ( bottom)
- ( inv right-unit)
-
- left-unsplice-coherence-square-identifications :
- {u : A} (p : z = u) (q : u = z) (α : inv p = q) →
- coherence-square-identifications top (left ∙ p) right (q ∙ bottom) →
- coherence-square-identifications top left right bottom
- left-unsplice-coherence-square-identifications refl .refl refl =
- inv-concat-left-identification-coherence-square-identifications
- ( top)
- ( left)
- ( right)
- ( bottom)
- ( inv right-unit)
```
#### Right splicing coherences of commuting squares of identifications
@@ -895,30 +539,6 @@ module _
( right)
( bottom)
( inv right-unit)
-
- right-splice-coherence-square-identifications :
- {u : A} (p : y = u) (q : u = y) (α : inv p = q) →
- coherence-square-identifications top left right bottom →
- coherence-square-identifications (top ∙ p) left (inv p ∙ right) bottom
- right-splice-coherence-square-identifications refl .refl refl =
- concat-top-identification-coherence-square-identifications
- ( top)
- ( left)
- ( right)
- ( bottom)
- ( inv right-unit)
-
- right-unsplice-coherence-square-identifications :
- {u : A} (p : y = u) (q : u = y) (α : inv p = q) →
- coherence-square-identifications (top ∙ p) left (inv p ∙ right) bottom →
- coherence-square-identifications top left right bottom
- right-unsplice-coherence-square-identifications refl .refl refl =
- inv-concat-top-identification-coherence-square-identifications
- ( top)
- ( left)
- ( right)
- ( bottom)
- ( inv right-unit)
```
### Double whiskering of commuting squares of identifications
@@ -928,7 +548,7 @@ module _
{l : Level} {A : UU l} {x y z u v w : A}
where
- equiv-double-whisker-square-identifications :
+ equiv-double-whisker-coherence-square-identifications :
(p : x = y)
(top : y = u) (left : y = z) (right : u = v) (bottom : z = v)
(s : v = w) →
@@ -938,7 +558,8 @@ module _
( p ∙ left)
( right ∙ s)
( bottom ∙ s)
- equiv-double-whisker-square-identifications p top left right bottom q =
+ equiv-double-whisker-coherence-square-identifications
+ p top left right bottom q =
equiv-left-whisker-concat-coherence-square-identifications p top left
( right ∙ q)
( bottom ∙ q) ∘e
@@ -949,734 +570,3 @@ module _
( bottom)
( q)
```
-
-### Horizontally pasting squares of identifications
-
-Consider two squares of identifications as in the diagram
-
-```text
- top-left top-right
- a -------------> b -------------> c
- | | |
- left | | middle | right
- ∨ ∨ ∨
- d -------------> e -------------> f
- bottom-left bottom-right
-```
-
-with `s : left ∙ bottom-left = top-left ∙ middle` and t : middle ∙ bottom-right
-= top-right ∙ right`. Then the outer square commutes.
-
-```agda
-module _
- {l : Level} {A : UU l} {a b c d e f : A}
- (top-left : a = b) (top-right : b = c)
- (left : a = d) (middle : b = e) (right : c = f)
- (bottom-left : d = e) (bottom-right : e = f)
- where
-
- horizontal-pasting-coherence-square-identifications :
- coherence-square-identifications top-left left middle bottom-left →
- coherence-square-identifications top-right middle right bottom-right →
- coherence-square-identifications
- (top-left ∙ top-right) left right (bottom-left ∙ bottom-right)
- horizontal-pasting-coherence-square-identifications s t =
- ( right-whisker-concat-coherence-square-identifications
- ( top-left)
- ( left)
- ( middle)
- ( bottom-left)
- ( s)
- ( bottom-right)) ∙
- ( ( inv (assoc top-left middle bottom-right)) ∙
- ( left-whisker-concat-coherence-square-identifications
- ( top-left)
- ( top-right)
- ( middle)
- ( right)
- ( bottom-right)
- ( t)))
-```
-
-### Vertically pasting squares of identifications
-
-Consider two squares of identifications as in the diagram
-
-```text
- top
- a --------> b
- | |
- top-left | | top-right
- ∨ middle ∨
- c --------> d
- | |
- bottom-left | | bottom-right
- ∨ ∨
- e --------> f
- bottom
-```
-
-with `s : top-left ∙ middle = top ∙ top-right` and
-`t : bottom-left ∙ bottom = middle ∙ bottom-right`. Then the outer square
-commutes.
-
-```agda
-module _
- {l : Level} {A : UU l} {a b c d e f : A}
- (top : a = b) (top-left : a = c) (top-right : b = d)
- (middle : c = d) (bottom-left : c = e) (bottom-right : d = f)
- (bottom : e = f)
- where
-
- vertical-pasting-coherence-square-identifications :
- coherence-square-identifications top top-left top-right middle →
- coherence-square-identifications middle bottom-left bottom-right bottom →
- coherence-square-identifications
- top (top-left ∙ bottom-left) (top-right ∙ bottom-right) bottom
- vertical-pasting-coherence-square-identifications p q =
- ( left-whisker-concat-coherence-square-identifications
- ( top-left)
- ( middle)
- ( bottom-left)
- ( bottom-right)
- ( bottom)
- ( q)) ∙
- ( ( assoc top-left middle bottom-right) ∙
- ( right-whisker-concat-coherence-square-identifications
- ( top)
- ( top-left)
- ( top-right)
- ( middle)
- ( p)
- ( bottom-right)))
-```
-
-## Properties
-
-### Left unit law for horizontal pasting of commuting squares of identifications
-
-```agda
-module _
- {l : Level} {A : UU l} {a b c d : A}
- where
-
- left-unit-law-horizontal-pasting-coherence-square-identifications :
- (top : a = b) (left : a = c) (right : b = d) (bottom : c = d)
- (s : coherence-square-identifications top left right bottom) →
- horizontal-pasting-coherence-square-identifications
- ( refl)
- ( top)
- ( left)
- ( left)
- ( right)
- ( refl)
- ( bottom)
- ( horizontal-refl-coherence-square-identifications left)
- ( s) =
- s
- left-unit-law-horizontal-pasting-coherence-square-identifications
- refl refl right refl s = refl
-```
-
-### Right unit law for horizontal pasting of commuting squares of identifications
-
-```agda
-module _
- {l : Level} {A : UU l} {a b c d : A}
- where
-
- right-unit-law-horizontal-pasting-coherence-square-identifications :
- (top : a = b) (left : a = c) (right : b = d) (bottom : c = d)
- (s : coherence-square-identifications top left right bottom) →
- horizontal-pasting-coherence-square-identifications
- ( top)
- ( refl)
- ( left)
- ( right)
- ( right)
- ( bottom)
- ( refl)
- ( s)
- ( horizontal-refl-coherence-square-identifications right) ∙
- right-whisker-concat right-unit right =
- left-whisker-concat left right-unit ∙ s
- right-unit-law-horizontal-pasting-coherence-square-identifications
- refl refl .refl refl refl =
- refl
-```
-
-### Left unit law for vertical pasting of commuting squares of identifications
-
-```agda
-module _
- {l : Level} {A : UU l} {a b c d : A}
- where
-
- left-unit-law-vertical-pasting-coherence-square-identifications :
- (top : a = b) (left : a = c) (right : b = d) (bottom : c = d)
- (s : coherence-square-identifications top left right bottom) →
- vertical-pasting-coherence-square-identifications
- ( top)
- ( refl)
- ( refl)
- ( top)
- ( left)
- ( right)
- ( bottom)
- ( vertical-refl-coherence-square-identifications top)
- ( s) =
- s
- left-unit-law-vertical-pasting-coherence-square-identifications
- refl refl .refl refl refl = refl
-```
-
-### Right unit law for vertical pasting of commuting squares of identifications
-
-```agda
-module _
- {l : Level} {A : UU l} {a b c d : A}
- where
-
- right-unit-law-vertical-pasting-coherence-square-identifications :
- (top : a = b) (left : a = c) (right : b = d) (bottom : c = d)
- (s : coherence-square-identifications top left right bottom) →
- vertical-pasting-coherence-square-identifications
- ( top)
- ( left)
- ( right)
- ( bottom)
- ( refl)
- ( refl)
- ( bottom)
- ( s)
- ( vertical-refl-coherence-square-identifications bottom) ∙
- left-whisker-concat top right-unit =
- right-whisker-concat right-unit bottom ∙ s
- right-unit-law-vertical-pasting-coherence-square-identifications
- refl refl .(refl ∙ refl) refl refl =
- refl
-```
-
-### Computing the right whiskering of a vertically constant square with an identification
-
-Consider the vertically constant square of identifications
-
-```text
- p
- x -----> y
- | |
- refl | | refl
- ∨ ∨
- x -----> y
- p
-```
-
-at an identification `p : x = y`, and consider an identification `q : y = z`.
-Then the right whiskering of the above square with `q` is the commuting square
-of identifications
-
-```text
- p
- x -------> y
- | |
- refl | refl | q
- ∨ ∨
- x -------> z
- p ∙ q
-```
-
-```agda
-module _
- {l1 : Level} {A : UU l1}
- where
-
- right-whisker-concat-vertical-refl-coherence-square-identifications :
- {x y z : A} (p : x = y) (q : y = z) →
- right-whisker-concat-coherence-square-identifications p refl refl p
- ( vertical-refl-coherence-square-identifications p)
- ( q) =
- refl
- right-whisker-concat-vertical-refl-coherence-square-identifications
- refl refl =
- refl
-```
-
-### Computing the right whiskering of a horizontally constant square with an identification
-
-Consider a horizontally constant commuting square of identifications
-
-```text
- refl
- x -----> x
- | |
- p | | p
- ∨ ∨
- y -----> y
- refl
-```
-
-at an identification `p` and consider an identification `q : y = z`. Then the
-right whiskering of the above square with `q` is the square
-
-```text
- refl
- x -----> x
- | |
- p | refl | p ∙ q
- ∨ ∨
- y -----> z.
- q
-```
-
-```agda
-module _
- {l1 : Level} {A : UU l1}
- where
-
- right-whisker-concat-horizontal-refl-coherence-square-identifications :
- {x y z : A} (p : x = y) (q : y = z) →
- right-whisker-concat-coherence-square-identifications refl p p refl
- ( horizontal-refl-coherence-square-identifications p)
- ( q) =
- refl
- right-whisker-concat-horizontal-refl-coherence-square-identifications
- refl refl =
- refl
-```
-
-### Computing the left whiskering of a horizontally constant square with an identification
-
-Consider an identification `p : x = y` and a horizontally constant commuting
-square of identifications
-
-```text
- refl
- y -----> y
- | |
- q | | q
- ∨ ∨
- z -----> z
- refl
-```
-
-at an identification `q : y = z`. The the left whiskering of the above square
-with `p` is the commuting square
-
-```text
- q ∙ refl
- x ------------------------------------------------------> y
- | |
- q ∙ p | right-unit ∙ inv (right-whisker-concat right-unit p) | p
- ∨ ∨
- z ------------------------------------------------------> z.
- refl
-```
-
-```agda
-module _
- {l1 : Level} {A : UU l1}
- where
-
- left-whisker-concat-horizontal-refl-coherence-square-identifications :
- {x y z : A} (p : x = y) (q : y = z) →
- left-whisker-concat-coherence-square-identifications p refl q q refl
- ( horizontal-refl-coherence-square-identifications q) ∙
- right-whisker-concat right-unit q =
- right-unit
- left-whisker-concat-horizontal-refl-coherence-square-identifications
- refl refl =
- refl
-
- left-whisker-concat-horizontal-refl-coherence-square-identifications' :
- {x y z : A} (p : x = y) (q : y = z) →
- left-whisker-concat-coherence-square-identifications p refl q q refl
- ( horizontal-refl-coherence-square-identifications q) =
- right-unit ∙ inv (right-whisker-concat right-unit q)
- left-whisker-concat-horizontal-refl-coherence-square-identifications'
- refl refl =
- refl
-```
-
-### Computing the left whiskering of a vertically constant square with an identification
-
-Consider the vertically constant square of identifications
-
-```text
- q
- y -----> z
- | |
- refl | | refl
- ∨ ∨
- y -----> z
- q
-```
-
-at an identification `q : y = z` and consider an identification `p : x = y`.
-Then the left whiskering of the above square with `p` is the square
-
-```text
- p ∙ q
- x ---------------------------------------------------> z
- | |
- p ∙ refl | right-whisker-concat right-unit q ∙ inv right-unit | refl
- ∨ ∨
- y ---------------------------------------------------> z.
- q
-```
-
-```agda
-module _
- {l1 : Level} {A : UU l1}
- where
-
- left-whisker-concat-vertical-refl-coherence-square-identifications :
- {x y z : A} (p : x = y) (q : y = z) →
- left-whisker-concat-coherence-square-identifications p q refl refl q
- ( vertical-refl-coherence-square-identifications q) ∙
- right-unit =
- right-whisker-concat right-unit q
- left-whisker-concat-vertical-refl-coherence-square-identifications
- refl refl =
- refl
-
- left-whisker-concat-vertical-refl-coherence-square-identifications' :
- {x y z : A} (p : x = y) (q : y = z) →
- left-whisker-concat-coherence-square-identifications p q refl refl q
- ( vertical-refl-coherence-square-identifications q) =
- right-whisker-concat right-unit q ∙ inv right-unit
- left-whisker-concat-vertical-refl-coherence-square-identifications'
- refl refl =
- refl
-```
-
-### Left whiskering horizontal concatenations of squares with identifications
-
-Consider a commuting diagram of identifications of the form
-
-```text
- top-left top-right
- a -------------> c -------------> e
- | | |
- left | | middle | right
- ∨ ∨ ∨
- b -------------> d -------------> f
- bottom-left bottom-right
-```
-
-and consider an identification `p : x = a`. Then the left whiskering of `p` and
-the horizontal concatenation of coherences of commuting squares is up to
-associativity the horizontal concatenation of the squares
-
-```text
- p ∙ top-left top-right
- x -------------> c -------------> e
- | | |
- p ∙ left | | middle | right
- ∨ ∨ ∨
- b -------------> d -------------> f
- bottom-left bottom-right
-```
-
-where the left square is the left whiskering of `p` and the original left
-square.
-
-```agda
-module _
- {l1 : Level} {A : UU l1}
- where
-
- left-whisker-concat-horizontal-pasting-coherence-square-identifications :
- {x a b c d e f : A} (p : x = a)
- (top-left : a = c) (top-right : c = e)
- (left : a = b) (middle : c = d) (right : e = f)
- (bottom-left : b = d) (bottom-right : d = f)
- (l : coherence-square-identifications top-left left middle bottom-left)
- (r : coherence-square-identifications top-right middle right bottom-right) →
- left-whisker-concat-coherence-square-identifications p
- ( top-left ∙ top-right)
- ( left)
- ( right)
- ( bottom-left ∙ bottom-right)
- ( horizontal-pasting-coherence-square-identifications
- ( top-left)
- ( top-right)
- ( left)
- ( middle)
- ( right)
- ( bottom-left)
- ( bottom-right)
- ( l)
- ( r)) =
- horizontal-pasting-coherence-square-identifications
- ( p ∙ top-left)
- ( top-right)
- ( p ∙ left)
- ( middle)
- ( right)
- ( bottom-left)
- ( bottom-right)
- ( left-whisker-concat-coherence-square-identifications p
- ( top-left)
- ( left)
- ( middle)
- ( bottom-left)
- ( l))
- ( r) ∙
- right-whisker-concat
- ( assoc p top-left top-right)
- ( right)
- left-whisker-concat-horizontal-pasting-coherence-square-identifications
- refl top-left top-right left middle right bottom-left bottom-right l r =
- inv right-unit
-```
-
-### Left whiskering vertical concatenations of squares with identifications
-
-Consider two squares of identifications as in the diagram
-
-```text
- top
- a --------> b
- | |
- top-left | | top-right
- ∨ middle ∨
- c --------> d
- | |
- bottom-left | | bottom-right
- ∨ ∨
- e --------> f
- bottom
-```
-
-and consider an identification `p : x = a`. Then the left whiskering of `p`
-with the vertical pasting of the two squares above is up to associativity the
-vertical pasting of the squares
-
-```text
- p ∙ top
- x --------> b
- | |
- p ∙ top-left | | top-right
- ∨ middle ∨
- c --------> d
- | |
- bottom-left | | bottom-right
- ∨ ∨
- e --------> f.
- bottom
-```
-
-```agda
-module _
- {l1 : Level} {A : UU l1}
- where
-
- left-whisker-concat-vertical-concat-coherence-square-identifications :
- {x a b c d e f : A} (p : x = a) →
- (top : a = b) (top-left : a = c) (top-right : b = d) (middle : c = d)
- (bottom-left : c = e) (bottom-right : d = f) (bottom : e = f)
- (t : coherence-square-identifications top top-left top-right middle) →
- (b :
- coherence-square-identifications middle bottom-left bottom-right bottom) →
- right-whisker-concat (assoc p top-left bottom-left) bottom ∙
- left-whisker-concat-coherence-square-identifications p
- ( top)
- ( top-left ∙ bottom-left)
- ( top-right ∙ bottom-right)
- ( bottom)
- ( vertical-pasting-coherence-square-identifications
- ( top)
- ( top-left)
- ( top-right)
- ( middle)
- ( bottom-left)
- ( bottom-right)
- ( bottom)
- ( t)
- ( b)) =
- vertical-pasting-coherence-square-identifications
- ( p ∙ top)
- ( p ∙ top-left)
- ( top-right)
- ( middle)
- ( bottom-left)
- ( bottom-right)
- ( bottom)
- ( left-whisker-concat-coherence-square-identifications p
- ( top)
- ( top-left)
- ( top-right)
- ( middle)
- ( t))
- ( b)
- left-whisker-concat-vertical-concat-coherence-square-identifications
- refl top top-left top-right middle bottom-left bottom-right bottom t b =
- refl
-```
-
-### Right whiskering horizontal pastings of commuting squares of identifications
-
-Consider a commuting diagram of identifications of the form
-
-```text
- top-left top-right
- a -------------> c -------------> e
- | | |
- left | | middle | right
- ∨ ∨ ∨
- b -------------> d -------------> f
- bottom-left bottom-right
-```
-
-and consider an identification `q : f = y`. Then the right whiskering of the
-horizontal pasting of the squares above is up to associativity the horizontal
-pasting of the squares
-
-```text
- top-left top-right
- a -------------> c ------------------> e
- | | |
- left | | middle | right ∙ q
- ∨ ∨ ∨
- b -------------> d ------------------> y
- bottom-left bottom-right ∙ q
-```
-
-```agda
-module _
- {l1 : Level} {A : UU l1}
- where
-
- right-whisker-concat-horizontal-pasting-coherence-square-identifications :
- {a b c d e f y : A}
- (top-left : a = c) (top-right : c = e)
- (left : a = b) (middle : c = d) (right : e = f)
- (bottom-left : b = d) (bottom-right : d = f)
- (l : coherence-square-identifications top-left left middle bottom-left) →
- (r : coherence-square-identifications top-right middle right bottom-right) →
- (q : f = y) →
- right-whisker-concat-coherence-square-identifications
- ( top-left ∙ top-right)
- ( left)
- ( right)
- ( bottom-left ∙ bottom-right)
- ( horizontal-pasting-coherence-square-identifications
- ( top-left)
- ( top-right)
- ( left)
- ( middle)
- ( right)
- ( bottom-left)
- ( bottom-right)
- ( l)
- ( r))
- ( q) =
- left-whisker-concat left (assoc bottom-left bottom-right q) ∙
- horizontal-pasting-coherence-square-identifications
- ( top-left)
- ( top-right)
- ( left)
- ( middle)
- ( right ∙ q)
- ( bottom-left)
- ( bottom-right ∙ q)
- ( l)
- ( right-whisker-concat-coherence-square-identifications
- ( top-right)
- ( middle)
- ( right)
- ( bottom-right)
- ( r)
- ( q))
- right-whisker-concat-horizontal-pasting-coherence-square-identifications
- refl refl refl .refl .refl refl refl refl refl refl =
- refl
-```
-
-### Right whiskering vertical concatenations of squares with identifications
-
-Consider two squares of identifications as in the diagram
-
-```text
- top
- a --------> b
- | |
- top-left | | top-right
- ∨ middle ∨
- c --------> d
- | |
- bottom-left | | bottom-right
- ∨ ∨
- e --------> f
- bottom
-```
-
-and consider an identification `q : f = y`. Then the right whiskering of the
-vertical pasting of the two squares above with `q` is up to associativity the
-vertical pasting of the squares
-
-```text
- top
- a ------------> b
- | |
- top-left | | top-right
- ∨ middle ∨
- c ------------> d
- | |
- bottom-left | | bottom-right ∙ q
- ∨ ∨
- e ------------> y.
- bottom ∙ q
-```
-
-```agda
-module _
- {l1 : Level} {A : UU l1}
- where
-
- right-whisker-concat-vertical-pasting-coherence-square-identifications :
- {a b c d e f y : A}
- (top : a = b) (top-left : a = c) (top-right : b = d)
- (middle : c = d)
- (bottom-left : c = e) (bottom-right : d = f) (bottom : e = f)
- (t : coherence-square-identifications top top-left top-right middle) →
- (b :
- coherence-square-identifications middle bottom-left bottom-right bottom) →
- (q : f = y) →
- right-whisker-concat-coherence-square-identifications
- ( top)
- ( top-left ∙ bottom-left)
- ( top-right ∙ bottom-right)
- ( bottom)
- ( vertical-pasting-coherence-square-identifications
- ( top)
- ( top-left)
- ( top-right)
- ( middle)
- ( bottom-left)
- ( bottom-right)
- ( bottom)
- ( t)
- ( b))
- ( q) ∙
- left-whisker-concat top (assoc top-right bottom-right q) =
- vertical-pasting-coherence-square-identifications
- ( top)
- ( top-left)
- ( top-right)
- ( middle)
- ( bottom-left)
- ( bottom-right ∙ q)
- ( bottom ∙ q)
- ( t)
- ( right-whisker-concat-coherence-square-identifications
- ( middle)
- ( bottom-left)
- ( bottom-right)
- ( bottom)
- ( b)
- ( q))
- right-whisker-concat-vertical-pasting-coherence-square-identifications
- refl refl .refl refl refl .refl refl refl refl refl =
- refl
-```
diff --git a/src/foundation/commuting-squares-of-maps.lagda.md b/src/foundation/commuting-squares-of-maps.lagda.md
index aeaece94f2..cb2b53f6f1 100644
--- a/src/foundation/commuting-squares-of-maps.lagda.md
+++ b/src/foundation/commuting-squares-of-maps.lagda.md
@@ -9,26 +9,25 @@ open import foundation-core.commuting-squares-of-maps public
Imports
```agda
-open import foundation.action-on-higher-identifications-functions
open import foundation.action-on-identifications-binary-functions
open import foundation.action-on-identifications-functions
-open import foundation.commuting-squares-of-homotopies
-open import foundation.commuting-squares-of-identifications
open import foundation.commuting-triangles-of-maps
open import foundation.function-extensionality
-open import foundation.identity-types
open import foundation.postcomposition-functions
open import foundation.precomposition-functions
open import foundation.transposition-identifications-along-equivalences
open import foundation.universe-levels
open import foundation.whiskering-higher-homotopies-composition
open import foundation.whiskering-homotopies-composition
-open import foundation.whiskering-identifications-concatenation
open import foundation-core.commuting-prisms-of-maps
+open import foundation-core.commuting-squares-of-homotopies
+open import foundation-core.commuting-squares-of-identifications
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.whiskering-identifications-concatenation
```
@@ -175,7 +174,7 @@ module _
( id)
( is-retraction-map-inv-equiv left)
( H)
- ( coherence-square-maps-inv-equiv-vertical top left right bottom H)
+ ( vertical-inv-equiv-coherence-square-maps top left right bottom H)
( refl-htpy)
( is-retraction-map-inv-equiv right)
left-inverse-law-pasting-vertical-coherence-square-maps H a =
@@ -284,7 +283,7 @@ module _
( id)
( id)
( is-section-map-inv-equiv left)
- ( coherence-square-maps-inv-equiv-vertical top left right bottom H)
+ ( vertical-inv-equiv-coherence-square-maps top left right bottom H)
( H)
( refl-htpy)
( is-section-map-inv-equiv right)
@@ -295,7 +294,7 @@ module _
( H (map-inv-equiv left a))
( ap
( map-equiv right)
- ( coherence-square-maps-inv-equiv-vertical top left right bottom
+ ( vertical-inv-equiv-coherence-square-maps top left right bottom
( H)
( a)))
( is-section-map-inv-equiv right (bottom a))) ∙
@@ -570,8 +569,12 @@ module _
( sq-left-bottom ·r left-top)
( mid-bottom ·l sq-left-top)) ∙h
( double-whisker-coherence-square-homotopies
- ( bottom-right ·l (sq-left-bottom ·r left-top))
- ( right-bottom ·l (sq-right-top ·r top-left))
+ ( bottom-right ·l sq-left-bottom ·r left-top)
+ ( sq-right-bottom ·r mid-left ·r left-top)
+ ( bottom-right ·l mid-bottom ·l sq-left-top)
+ ( right-bottom ·l mid-right ·l sq-left-top)
+ ( sq-right-bottom ·r mid-top ·r top-left)
+ ( right-bottom ·l sq-right-top ·r top-left)
( inv-htpy
( swap-nat-coherence-square-maps
( top-left)
diff --git a/src/foundation/commuting-triangles-of-homotopies.lagda.md b/src/foundation/commuting-triangles-of-homotopies.lagda.md
index 381b508986..d3f3b61b72 100644
--- a/src/foundation/commuting-triangles-of-homotopies.lagda.md
+++ b/src/foundation/commuting-triangles-of-homotopies.lagda.md
@@ -11,11 +11,11 @@ open import foundation.action-on-identifications-functions
open import foundation.commuting-triangles-of-identifications
open import foundation.universe-levels
open import foundation.whiskering-homotopies-composition
-open import foundation.whiskering-identifications-concatenation
open import foundation-core.function-types
open import foundation-core.homotopies
open import foundation-core.identity-types
+open import foundation-core.whiskering-identifications-concatenation
```
diff --git a/src/foundation/commuting-triangles-of-identifications.lagda.md b/src/foundation/commuting-triangles-of-identifications.lagda.md
index 27301a5608..071dbaa96f 100644
--- a/src/foundation/commuting-triangles-of-identifications.lagda.md
+++ b/src/foundation/commuting-triangles-of-identifications.lagda.md
@@ -137,7 +137,7 @@ transformations are equivalences.
These operations are useful in proofs involving
[path algebra](foundation.path-algebra.md), because taking
-`equiv-right-whisker-triangle-identicications` as an example, it provides us
+`equiv-right-whisker-triangle-identifications` as an example, it provides us
with two maps: the forward direction states
`(p = q ∙ r) → (p ∙ s = q ∙ (r ∙ s))`, which allows one to append an
identification without needing to reassociate on the right, and the backwards
diff --git a/src/foundation/commuting-triangles-of-maps.lagda.md b/src/foundation/commuting-triangles-of-maps.lagda.md
index d4163b847b..742618605e 100644
--- a/src/foundation/commuting-triangles-of-maps.lagda.md
+++ b/src/foundation/commuting-triangles-of-maps.lagda.md
@@ -17,11 +17,11 @@ open import foundation.identity-types
open import foundation.postcomposition-functions
open import foundation.precomposition-functions
open import foundation.universe-levels
-open import foundation.whiskering-identifications-concatenation
open import foundation-core.commuting-squares-of-maps
open import foundation-core.equivalences
open import foundation-core.function-types
+open import foundation-core.whiskering-identifications-concatenation
```
@@ -196,7 +196,7 @@ module _
coherence-htpy-triangle-maps :
left ~ left' → right ~ right' → top ~ top' → UU (l1 ⊔ l2)
coherence-htpy-triangle-maps L R T =
- c ∙h horizontal-concat-htpy T R ~ L ∙h c'
+ c ∙h horizontal-concat-htpy R T ~ L ∙h c'
```
### Pasting commuting triangles into commuting squares along homotopic diagonals
diff --git a/src/foundation/embeddings.lagda.md b/src/foundation/embeddings.lagda.md
index 85b638587e..31ac2aad1d 100644
--- a/src/foundation/embeddings.lagda.md
+++ b/src/foundation/embeddings.lagda.md
@@ -10,7 +10,6 @@ open import foundation-core.embeddings public
```agda
open import foundation.action-on-identifications-functions
-open import foundation.commuting-squares-of-maps
open import foundation.cones-over-cospan-diagrams
open import foundation.dependent-pair-types
open import foundation.equivalences
@@ -23,6 +22,7 @@ open import foundation.truncated-maps
open import foundation.universe-levels
open import foundation-core.cartesian-product-types
+open import foundation-core.commuting-squares-of-maps
open import foundation-core.commuting-triangles-of-maps
open import foundation-core.contractible-types
open import foundation-core.fibers-of-maps
@@ -407,7 +407,7 @@ module _
( map-inv-is-equiv K)
( map-inv-is-equiv L)
( top)
- ( coherence-square-maps-inv-equiv-vertical
+ ( vertical-inv-equiv-coherence-square-maps
( top)
( left , K)
( right , L)
diff --git a/src/foundation/equivalences-arrows.lagda.md b/src/foundation/equivalences-arrows.lagda.md
index 98c901b158..eac852d2c4 100644
--- a/src/foundation/equivalences-arrows.lagda.md
+++ b/src/foundation/equivalences-arrows.lagda.md
@@ -218,7 +218,7 @@ module _
( equiv-domain-inv-equiv-arrow)
( equiv-codomain-inv-equiv-arrow)
coh-inv-equiv-arrow =
- coherence-square-maps-inv-equiv-horizontal
+ horizontal-inv-equiv-coherence-square-maps
( equiv-domain-equiv-arrow f g α)
( f)
( g)
diff --git a/src/foundation/equivalences.lagda.md b/src/foundation/equivalences.lagda.md
index 7bdc8ba6a1..9ebb42a77a 100644
--- a/src/foundation/equivalences.lagda.md
+++ b/src/foundation/equivalences.lagda.md
@@ -15,13 +15,10 @@ 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-types
-open import foundation.path-algebra
open import foundation.transposition-identifications-along-equivalences
open import foundation.truncated-maps
open import foundation.universal-property-equivalences
open import foundation.universe-levels
-open import foundation.whiskering-identifications-concatenation
open import foundation-core.commuting-triangles-of-maps
open import foundation-core.contractible-maps
@@ -31,6 +28,7 @@ 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
open import foundation-core.pullbacks
@@ -604,8 +602,8 @@ module _
is-pullback-swap-cone' f g c
( is-pullback-is-equiv-vertical-maps g f
( swap-cone f g c)
- is-equiv-f
- is-equiv-q)
+ ( is-equiv-f)
+ ( is-equiv-q))
```
## See also
diff --git a/src/foundation/fundamental-theorem-of-identity-types.lagda.md b/src/foundation/fundamental-theorem-of-identity-types.lagda.md
index 9614810977..a82990327e 100644
--- a/src/foundation/fundamental-theorem-of-identity-types.lagda.md
+++ b/src/foundation/fundamental-theorem-of-identity-types.lagda.md
@@ -145,7 +145,7 @@ module _
((x : A) → section (f x)) →
is-fiberwise-equiv f
fundamental-theorem-id-section f section-f x =
- is-equiv-section-is-equiv
+ is-equiv-is-equiv-section
( f x)
( section-f x)
( fundamental-theorem-id-retraction
diff --git a/src/foundation/homotopies.lagda.md b/src/foundation/homotopies.lagda.md
index f047aafe53..124dac3bbf 100644
--- a/src/foundation/homotopies.lagda.md
+++ b/src/foundation/homotopies.lagda.md
@@ -13,7 +13,6 @@ open import foundation.action-on-higher-identifications-functions
open import foundation.action-on-identifications-dependent-functions
open import foundation.action-on-identifications-functions
open import foundation.binary-equivalences
-open import foundation.commuting-squares-of-identifications
open import foundation.dependent-pair-types
open import foundation.function-extensionality
open import foundation.homotopy-induction
@@ -21,13 +20,14 @@ open import foundation.identity-types
open import foundation.path-algebra
open import foundation.universe-levels
open import foundation.whiskering-homotopies-composition
-open import foundation.whiskering-identifications-concatenation
+open import foundation-core.commuting-squares-of-identifications
open import foundation-core.dependent-identifications
open import foundation-core.equivalences
open import foundation-core.function-types
open import foundation-core.functoriality-dependent-function-types
open import foundation-core.transport-along-identifications
+open import foundation-core.whiskering-identifications-concatenation
```
diff --git a/src/foundation/homotopy-algebra.lagda.md b/src/foundation/homotopy-algebra.lagda.md
index 43a59baced..80e83db492 100644
--- a/src/foundation/homotopy-algebra.lagda.md
+++ b/src/foundation/homotopy-algebra.lagda.md
@@ -7,7 +7,6 @@ module foundation.homotopy-algebra where
Imports
```agda
-open import foundation.homotopy-induction
open import foundation.universe-levels
open import foundation.whiskering-homotopies-composition
@@ -34,12 +33,12 @@ module _
{f f' : (x : A) → B x} {g g' : {x : A} → B x → C x}
where
- horizontal-concat-htpy : f ~ f' → ({x : A} → g {x} ~ g' {x}) → g ∘ f ~ g' ∘ f'
- horizontal-concat-htpy F G = (g ·l F) ∙h (G ·r f')
+ horizontal-concat-htpy : ({x : A} → g {x} ~ g' {x}) → f ~ f' → g ∘ f ~ g' ∘ f'
+ horizontal-concat-htpy G F = (g ·l F) ∙h (G ·r f')
horizontal-concat-htpy' :
- f ~ f' → ({x : A} → g {x} ~ g' {x}) → g ∘ f ~ g' ∘ f'
- horizontal-concat-htpy' F G = (G ·r f) ∙h (g' ·l F)
+ ({x : A} → g {x} ~ g' {x}) → f ~ f' → g ∘ f ~ g' ∘ f'
+ horizontal-concat-htpy' G F = (G ·r f) ∙h (g' ·l F)
```
## Properties
@@ -51,27 +50,43 @@ module _
{l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : A → UU l3}
where
- coh-left-unit-horizontal-concat-htpy :
+ coh-right-unit-horizontal-concat-htpy :
{f : (x : A) → B x} {g g' : {x : A} → B x → C x}
(G : {x : A} → g {x} ~ g' {x}) →
- horizontal-concat-htpy (refl-htpy' f) G ~
- horizontal-concat-htpy' (refl-htpy' f) G
- coh-left-unit-horizontal-concat-htpy G = inv-htpy-right-unit-htpy
+ horizontal-concat-htpy G (refl-htpy' f) ~
+ horizontal-concat-htpy' G (refl-htpy' f)
+ coh-right-unit-horizontal-concat-htpy G = inv-htpy-right-unit-htpy
- coh-right-unit-horizontal-concat-htpy :
+ coh-left-unit-horizontal-concat-htpy :
{f f' : (x : A) → B x} {g : {x : A} → B x → C x}
(F : f ~ f') →
- horizontal-concat-htpy F (refl-htpy' g) ~
- horizontal-concat-htpy' F (refl-htpy' g)
- coh-right-unit-horizontal-concat-htpy F = right-unit-htpy
+ horizontal-concat-htpy (refl-htpy' g) F ~
+ horizontal-concat-htpy' (refl-htpy' g) F
+ coh-left-unit-horizontal-concat-htpy F = right-unit-htpy
+```
+
+For the general case, we must construct a coherence of the square
+
+```text
+ g ·r F
+ gf -------> gf'
+ | |
+ G ·r f | | G ·r f'
+ ∨ ∨
+ g'f ------> g'f'
+ g' ·r F
+```
+
+but this is an instance of naturality of `G` applied to `F`.
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : A → UU l3}
+ {f f' : (x : A) → B x} {g g' : {x : A} → B x → C x}
+ (G : {x : A} → g {x} ~ g' {x}) (F : f ~ f')
+ where
coh-horizontal-concat-htpy :
- {f f' : (x : A) → B x} {g g' : {x : A} → B x → C x}
- (F : f ~ f') (G : {x : A} → g {x} ~ g' {x}) →
- horizontal-concat-htpy F G ~ horizontal-concat-htpy' F G
- coh-horizontal-concat-htpy {f} F G =
- ind-htpy f
- ( λ f' F → horizontal-concat-htpy F G ~ horizontal-concat-htpy' F G)
- ( coh-left-unit-horizontal-concat-htpy G)
- ( F)
+ horizontal-concat-htpy' G F ~ horizontal-concat-htpy G F
+ coh-horizontal-concat-htpy = nat-htpy G ·r F
```
diff --git a/src/foundation/invertible-maps.lagda.md b/src/foundation/invertible-maps.lagda.md
index 6f2b2ec088..47fb7cca31 100644
--- a/src/foundation/invertible-maps.lagda.md
+++ b/src/foundation/invertible-maps.lagda.md
@@ -9,6 +9,7 @@ open import foundation-core.invertible-maps public
Imports
```agda
+open import foundation.action-on-identifications-functions
open import foundation.commuting-triangles-of-homotopies
open import foundation.dependent-pair-types
open import foundation.equality-cartesian-product-types
@@ -22,7 +23,6 @@ open import foundation.homotopies
open import foundation.homotopy-algebra
open import foundation.homotopy-induction
open import foundation.postcomposition-functions
-open import foundation.propositions
open import foundation.retractions
open import foundation.sections
open import foundation.structure-identity-principle
@@ -31,9 +31,11 @@ open import foundation.universe-levels
open import foundation.whiskering-homotopies-composition
open import foundation-core.cartesian-product-types
+open import foundation-core.coherently-invertible-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.propositions
open import foundation-core.torsorial-type-families
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
@@ -110,9 +112,9 @@ module _
( is-torsorial-htpy (map-inv-is-invertible s))
( map-inv-is-invertible s , refl-htpy)
( is-torsorial-Eq-structure
- ( is-torsorial-htpy (is-retraction-is-invertible s))
- ( is-retraction-is-invertible s , refl-htpy)
- (is-torsorial-htpy (is-section-is-invertible s)))
+ ( is-torsorial-htpy (is-section-map-inv-is-invertible s))
+ ( is-section-map-inv-is-invertible s , refl-htpy)
+ (is-torsorial-htpy (is-retraction-map-inv-is-invertible s)))
is-equiv-htpy-eq-is-invertible :
(s t : is-invertible f) → is-equiv (htpy-eq-is-invertible s t)
@@ -144,13 +146,13 @@ module _
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)
- ( horizontal-concat-htpy I H)) ×
+ ( is-section-map-inv-invertible-map s)
+ ( is-section-map-inv-invertible-map t)
+ ( horizontal-concat-htpy H I)) ×
( coherence-triangle-homotopies
- ( is-section-map-invertible-map s)
- ( is-section-map-invertible-map t)
- ( horizontal-concat-htpy H I))
+ ( is-retraction-map-inv-invertible-map s)
+ ( is-retraction-map-inv-invertible-map t)
+ ( horizontal-concat-htpy I H))
htpy-invertible-map : (s t : invertible-map A B) → UU (l1 ⊔ l2)
htpy-invertible-map s t =
@@ -179,9 +181,9 @@ module _
( is-torsorial-htpy (map-inv-invertible-map s))
( map-inv-invertible-map s , refl-htpy)
( is-torsorial-Eq-structure
- ( is-torsorial-htpy (is-retraction-map-invertible-map s))
- ( is-retraction-map-invertible-map s , refl-htpy)
- ( is-torsorial-htpy (is-section-map-invertible-map s))))
+ ( is-torsorial-htpy (is-section-map-inv-invertible-map s))
+ ( is-section-map-inv-invertible-map s , refl-htpy)
+ ( is-torsorial-htpy (is-retraction-map-inv-invertible-map s))))
is-equiv-htpy-eq-invertible-map :
(s t : invertible-map A B) → is-equiv (htpy-eq-invertible-map s t)
@@ -375,6 +377,20 @@ module _
equiv-free-loop-equivalence-invertible-equivalence
```
+### The action of invertible maps on identifications is invertible
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B}
+ (H : is-invertible f) {x y : A}
+ where
+
+ is-invertible-ap-is-invertible : is-invertible (ap f {x} {y})
+ is-invertible-ap-is-invertible =
+ is-invertible-ap-is-coherently-invertible
+ ( is-coherently-invertible-is-invertible H)
+```
+
## See also
- For the coherent notion of invertible maps see
diff --git a/src/foundation/path-algebra.lagda.md b/src/foundation/path-algebra.lagda.md
index bb110a0312..acd69ff4b6 100644
--- a/src/foundation/path-algebra.lagda.md
+++ b/src/foundation/path-algebra.lagda.md
@@ -11,16 +11,16 @@ open import foundation.action-on-identifications-binary-functions
open import foundation.action-on-identifications-functions
open import foundation.binary-embeddings
open import foundation.binary-equivalences
-open import foundation.commuting-squares-of-identifications
open import foundation.dependent-pair-types
open import foundation.identity-types
open import foundation.universe-levels
-open import foundation.whiskering-identifications-concatenation
+open import foundation-core.commuting-squares-of-identifications
open import foundation-core.constant-maps
open import foundation-core.equivalences
open import foundation-core.function-types
open import foundation-core.homotopies
+open import foundation-core.whiskering-identifications-concatenation
```
diff --git a/src/foundation/postcomposition-dependent-functions.lagda.md b/src/foundation/postcomposition-dependent-functions.lagda.md
index 137f0f6cca..7e35bf5c87 100644
--- a/src/foundation/postcomposition-dependent-functions.lagda.md
+++ b/src/foundation/postcomposition-dependent-functions.lagda.md
@@ -102,7 +102,7 @@ module _
( eq-htpy)
( ap (postcomp-Π A f))
compute-eq-htpy-ap-postcomp-Π =
- coherence-square-maps-inv-equiv-vertical
+ vertical-inv-equiv-coherence-square-maps
( ap (postcomp-Π A f))
( equiv-funext)
( equiv-funext)
diff --git a/src/foundation/precomposition-dependent-functions.lagda.md b/src/foundation/precomposition-dependent-functions.lagda.md
index 9ef0b0863b..a4ef43be00 100644
--- a/src/foundation/precomposition-dependent-functions.lagda.md
+++ b/src/foundation/precomposition-dependent-functions.lagda.md
@@ -91,7 +91,7 @@ module _
( eq-htpy)
( ap (precomp-Π f C) {g} {h})
compute-eq-htpy-ap-precomp-Π =
- coherence-square-maps-inv-equiv-vertical
+ vertical-inv-equiv-coherence-square-maps
( ap (precomp-Π f C))
( equiv-funext)
( equiv-funext)
diff --git a/src/foundation/precomposition-functions.lagda.md b/src/foundation/precomposition-functions.lagda.md
index c667f7f2f3..3f21781779 100644
--- a/src/foundation/precomposition-functions.lagda.md
+++ b/src/foundation/precomposition-functions.lagda.md
@@ -206,7 +206,7 @@ module _
( eq-htpy)
( ap (precomp f C))
compute-eq-htpy-ap-precomp =
- coherence-square-maps-inv-equiv-vertical
+ vertical-inv-equiv-coherence-square-maps
( ap (precomp f C))
( equiv-funext)
( equiv-funext)
diff --git a/src/foundation/retractions.lagda.md b/src/foundation/retractions.lagda.md
index a58a62b32d..3c51b23ceb 100644
--- a/src/foundation/retractions.lagda.md
+++ b/src/foundation/retractions.lagda.md
@@ -12,6 +12,7 @@ open import foundation-core.retractions public
open import foundation.action-on-identifications-functions
open import foundation.coslice
open import foundation.dependent-pair-types
+open import foundation.function-extensionality
open import foundation.retracts-of-types
open import foundation.universe-levels
open import foundation.whiskering-homotopies-composition
@@ -97,25 +98,64 @@ pr2
```agda
abstract
is-injective-retraction :
- {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → retraction f →
- is-injective f
- is-injective-retraction f (h , H) {x} {y} p = (inv (H x)) ∙ (ap h p ∙ H y)
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) →
+ retraction f → is-injective f
+ is-injective-retraction f (h , H) {x} {y} p = inv (H x) ∙ (ap h p ∙ H y)
```
### Transposing identifications along retractions
```agda
module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B)
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) (g : B → A)
where
- transpose-eq-retraction :
- (g : B → A) (H : (g ∘ f) ~ id) {x : B} {y : A} →
- x = f y → g x = y
- transpose-eq-retraction g H refl = H _
-
- transpose-eq-retraction' :
- (g : B → A) (H : (g ∘ f) ~ id) {x : A} {y : B} →
- f x = y → x = g y
- transpose-eq-retraction' g H refl = inv (H _)
+ transpose-eq-is-retraction :
+ g ∘ f ~ id → {x : B} {y : A} → x = f y → g x = y
+ transpose-eq-is-retraction H {x} {y} p = ap g p ∙ H y
+
+ transpose-eq-is-retraction' :
+ g ∘ f ~ id → {x : A} {y : B} → f x = y → x = g y
+ transpose-eq-is-retraction' H {x} refl = inv (H x)
+
+ is-retraction-transpose-eq :
+ ({x : B} {y : A} → x = f y → g x = y) → g ∘ f ~ id
+ is-retraction-transpose-eq H x = H refl
+
+ is-retraction-transpose-eq' :
+ ({x : A} {y : B} → f x = y → x = g y) → g ∘ f ~ id
+ is-retraction-transpose-eq' H x = inv (H refl)
+
+ is-retraction-is-retraction-transpose-eq :
+ is-retraction-transpose-eq ∘ transpose-eq-is-retraction ~ id
+ is-retraction-is-retraction-transpose-eq H = refl
+
+ htpy-is-section-is-retraction-transpose-eq :
+ (H : {x : B} {y : A} → x = f y → g x = y)
+ (x : B) (y : A) →
+ transpose-eq-is-retraction (is-retraction-transpose-eq H) {x} {y} ~
+ H {x} {y}
+ htpy-is-section-is-retraction-transpose-eq H x y refl = refl
+
+ abstract
+ is-section-is-retraction-transpose-eq :
+ transpose-eq-is-retraction ∘ is-retraction-transpose-eq ~ id
+ is-section-is-retraction-transpose-eq H =
+ eq-htpy-implicit
+ ( λ x →
+ eq-htpy-implicit
+ ( λ y → eq-htpy (htpy-is-section-is-retraction-transpose-eq H x y)))
+
+ is-equiv-transpose-eq-is-retraction :
+ is-equiv transpose-eq-is-retraction
+ is-equiv-transpose-eq-is-retraction =
+ is-equiv-is-invertible
+ ( is-retraction-transpose-eq)
+ ( is-section-is-retraction-transpose-eq)
+ ( is-retraction-is-retraction-transpose-eq)
+
+ equiv-transpose-eq-is-retraction :
+ (g ∘ f ~ id) ≃ ({x : B} {y : A} → x = f y → g x = y)
+ equiv-transpose-eq-is-retraction =
+ (transpose-eq-is-retraction , is-equiv-transpose-eq-is-retraction)
```
diff --git a/src/foundation/sections.lagda.md b/src/foundation/sections.lagda.md
index 15ba000b59..ca2ce02401 100644
--- a/src/foundation/sections.lagda.md
+++ b/src/foundation/sections.lagda.md
@@ -192,16 +192,55 @@ is-injective-map-section-family b = ap pr1
```agda
module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B)
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) (g : B → A)
where
- transpose-eq-section :
- (g : B → A) (H : (f ∘ g) ~ id) {x : A} {y : B} →
- x = g y → f x = y
- transpose-eq-section g H refl = H _
-
- transpose-eq-section' :
- (g : B → A) (H : (f ∘ g) ~ id) {x : B} {y : A} →
- g x = y → x = f y
- transpose-eq-section' g H refl = inv (H _)
+ transpose-eq-is-section :
+ f ∘ g ~ id → {x : A} {y : B} → x = g y → f x = y
+ transpose-eq-is-section H {x} {y} p = ap f p ∙ H y
+
+ transpose-eq-is-section' :
+ f ∘ g ~ id → {x : B} {y : A} → g x = y → x = f y
+ transpose-eq-is-section' H {x} refl = inv (H x)
+
+ is-section-transpose-eq :
+ ({x : A} {y : B} → x = g y → f x = y) → f ∘ g ~ id
+ is-section-transpose-eq H x = H refl
+
+ is-section-transpose-eq' :
+ ({x : B} {y : A} → g x = y → x = f y) → f ∘ g ~ id
+ is-section-transpose-eq' H x = inv (H refl)
+
+ is-retraction-is-section-transpose-eq :
+ is-section-transpose-eq ∘ transpose-eq-is-section ~ id
+ is-retraction-is-section-transpose-eq H = refl
+
+ htpy-is-section-is-section-transpose-eq :
+ (H : {x : A} {y : B} → x = g y → f x = y) →
+ (x : A) (y : B) →
+ transpose-eq-is-section (is-section-transpose-eq H) {x} {y} ~ H {x} {y}
+ htpy-is-section-is-section-transpose-eq H x y refl = refl
+
+ abstract
+ is-section-is-section-transpose-eq :
+ transpose-eq-is-section ∘ is-section-transpose-eq ~ id
+ is-section-is-section-transpose-eq H =
+ eq-htpy-implicit
+ ( λ x →
+ eq-htpy-implicit
+ ( λ y →
+ eq-htpy (htpy-is-section-is-section-transpose-eq H x y)))
+
+ is-equiv-transpose-eq-is-section :
+ is-equiv transpose-eq-is-section
+ is-equiv-transpose-eq-is-section =
+ is-equiv-is-invertible
+ ( is-section-transpose-eq)
+ ( is-section-is-section-transpose-eq)
+ ( is-retraction-is-section-transpose-eq)
+
+ equiv-transpose-eq-is-section :
+ (f ∘ g ~ id) ≃ ({x : A} {y : B} → x = g y → f x = y)
+ equiv-transpose-eq-is-section =
+ (transpose-eq-is-section , is-equiv-transpose-eq-is-section)
```
diff --git a/src/foundation/whiskering-higher-homotopies-composition.lagda.md b/src/foundation/whiskering-higher-homotopies-composition.lagda.md
index eb981d65af..2970a34a1e 100644
--- a/src/foundation/whiskering-higher-homotopies-composition.lagda.md
+++ b/src/foundation/whiskering-higher-homotopies-composition.lagda.md
@@ -38,8 +38,7 @@ by
```
Similarly, the {{#concept "right whiskering" Disambiguation="2-homotopies with
-respect to composition" Agda=right-whisker-comp²]} is defined to be the
-operation
+respect to composition" Agda=right-whisker-comp²}} is defined to be the operation
```text
(H ~ H') → (h : (x : A) → B x) → (H ·r h ~ H' ·r h)
@@ -81,3 +80,20 @@ module _
(α : {x : A} → H {x} ~ H' {x}) (h : (x : A) → B x) → H ·r h ~ H' ·r h
right-whisker-comp² α h = α ·r h
```
+
+### Double whiskering higher homotopies
+
+```agda
+module _
+ {l1 l2 l3 l4 : Level} {A : UU l1} {B : A → UU l2}
+ {C : (x : A) → B x → UU l3} {D : (x : A) → B x → UU l4}
+ {f g : {x : A} (y : B x) → C x y} {H H' : {x : A} → f {x} ~ g {x}}
+ where
+
+ double-whisker-comp² :
+ (left : {x : A} {y : B x} → C x y → D x y)
+ (α : {x : A} → H {x} ~ H' {x})
+ (right : (x : A) → B x) →
+ left ·l H ·r right ~ left ·l H' ·r right
+ double-whisker-comp² left α right = double-whisker-comp (ap left) α right
+```
diff --git a/src/foundation/whiskering-homotopies-composition.lagda.md b/src/foundation/whiskering-homotopies-composition.lagda.md
index 12a6729411..2715167d25 100644
--- a/src/foundation/whiskering-homotopies-composition.lagda.md
+++ b/src/foundation/whiskering-homotopies-composition.lagda.md
@@ -235,11 +235,18 @@ module _
{A : UU l1} {B : A → UU l2} {C : A → UU l3} {D : A → UU l4}
where
+ inv-preserves-comp-left-whisker-comp :
+ ( k : {x : A} → C x → D x) (h : {x : A} → B x → C x) {f g : (x : A) → B x}
+ ( H : f ~ g) →
+ (k ∘ h) ·l H ~ k ·l (h ·l H)
+ inv-preserves-comp-left-whisker-comp k h H x = ap-comp k h (H x)
+
preserves-comp-left-whisker-comp :
( k : {x : A} → C x → D x) (h : {x : A} → B x → C x) {f g : (x : A) → B x}
( H : f ~ g) →
k ·l (h ·l H) ~ (k ∘ h) ·l H
- preserves-comp-left-whisker-comp k h H x = inv (ap-comp k h (H x))
+ preserves-comp-left-whisker-comp k h H =
+ inv-htpy (inv-preserves-comp-left-whisker-comp k h H)
module _
{ l1 l2 l3 l4 : Level}
@@ -271,8 +278,8 @@ module _
coh-htpy-id : H ·r f ~ f ·l H
coh-htpy-id x = is-injective-concat' (H x) (nat-htpy-id H (H x))
- inv-htpy-coh-htpy-id : f ·l H ~ H ·r f
- inv-htpy-coh-htpy-id = inv-htpy coh-htpy-id
+ inv-coh-htpy-id : f ·l H ~ H ·r f
+ inv-coh-htpy-id = inv-htpy coh-htpy-id
```
## See also
diff --git a/src/foundation/whiskering-homotopies-concatenation.lagda.md b/src/foundation/whiskering-homotopies-concatenation.lagda.md
index 9803a73be7..dffb6ea28b 100644
--- a/src/foundation/whiskering-homotopies-concatenation.lagda.md
+++ b/src/foundation/whiskering-homotopies-concatenation.lagda.md
@@ -2,17 +2,19 @@
```agda
module foundation.whiskering-homotopies-concatenation where
+
+open import foundation-core.whiskering-homotopies-concatenation public
```
Imports
```agda
-open import foundation.functoriality-dependent-function-types
open import foundation.universe-levels
open import foundation.whiskering-identifications-concatenation
open import foundation.whiskering-operations
open import foundation-core.equivalences
+open import foundation-core.functoriality-dependent-function-types
open import foundation-core.homotopies
```
@@ -32,57 +34,13 @@ of homotopies with respect to concatenation is a
```
Similarly, we introduce
-{{#concept "right whiskering" Disambiguation="homotopies with respect to concatenation' Agda=right-whisker-concat-htpy}}
+{{#concept "right whiskering" Disambiguation="homotopies with respect to concatenation" Agda=right-whisker-concat-htpy}}
to be an operation
```text
{H I : f ~ g} → H ~ I → (J : g ~ h) → H ∙h J ~ I ∙h J.
```
-## Definitions
-
-### Left whiskering of homotopies with respect to concatenation
-
-Left whiskering of homotopies with respect to concatenation is an operation
-
-```text
- (H : f ~ g) {I J : g ~ h} → I ~ J → H ∙h I ~ H ∙h K.
-```
-
-We implement the left whiskering operation of homotopies with respect to
-concatenation as an instance of a general left whiskering operation.
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
- where
-
- left-whisker-concat-htpy :
- left-whiskering-operation ((x : A) → B x) (_~_) (_∙h_) (_~_)
- left-whisker-concat-htpy H K x = left-whisker-concat (H x) (K x)
-```
-
-### Right whiskering of homotopies with respect to concatenation
-
-Right whiskering of homotopies with respect to concatenation is an operation
-
-```text
- {H I : f ~ g} → H ~ I → (J : g ~ h) → H ∙h J ~ I ∙h J.
-```
-
-We implement the right whiskering operation of homotopies with respect to
-concatenation as an instance of a general right whiskering operation.
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
- where
-
- right-whisker-concat-htpy :
- right-whiskering-operation ((x : A) → B x) (_~_) (_∙h_) (_~_)
- right-whisker-concat-htpy K J x = right-whisker-concat (K x) (J x)
-```
-
## Properties
### Left whiskering of homotopies with respect to concatenation is an equivalence
@@ -114,44 +72,3 @@ module _
is-equiv-map-Π-is-fiberwise-equiv
( λ x → is-equiv-right-whisker-concat (J x))
```
-
-### The unit and absorption laws for left whiskering of homotopies with respect to concatenation
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
- where
-
- left-unit-law-left-whisker-concat-htpy :
- {f g : (x : A) → B x} {I J : f ~ g} (K : I ~ J) →
- left-whisker-concat-htpy refl-htpy K ~ K
- left-unit-law-left-whisker-concat-htpy K x =
- left-unit-law-left-whisker-concat (K x)
-
- right-absorption-law-left-whisker-concat-htpy :
- {f g h : (x : A) → B x} (H : f ~ g) {I : g ~ h} →
- left-whisker-concat-htpy H (refl-htpy' I) ~ refl-htpy
- right-absorption-law-left-whisker-concat-htpy H x =
- right-absorption-law-left-whisker-concat (H x) _
-```
-
-### The unit and absorption laws for right whiskering of homotopies with respect to concatenation
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
- where
-
- left-absorption-law-right-whisker-concat-htpy :
- {f g h : (x : A) → B x} {H : f ~ g} (J : g ~ h) →
- right-whisker-concat-htpy (refl-htpy' H) J ~ refl-htpy
- left-absorption-law-right-whisker-concat-htpy J x =
- left-absorption-law-right-whisker-concat _ (J x)
-
- right-unit-law-right-whisker-concat-htpy :
- {f g : (x : A) → B x} {I J : f ~ g} (K : I ~ J) →
- right-unit-htpy ∙h K ~
- right-whisker-concat-htpy K refl-htpy ∙h right-unit-htpy
- right-unit-law-right-whisker-concat-htpy K x =
- right-unit-law-right-whisker-concat (K x)
-```
diff --git a/src/foundation/whiskering-identifications-concatenation.lagda.md b/src/foundation/whiskering-identifications-concatenation.lagda.md
index 661b2b9c4e..c2e632249a 100644
--- a/src/foundation/whiskering-identifications-concatenation.lagda.md
+++ b/src/foundation/whiskering-identifications-concatenation.lagda.md
@@ -2,6 +2,8 @@
```agda
module foundation.whiskering-identifications-concatenation where
+
+open import foundation-core.whiskering-identifications-concatenation public
```
Imports
@@ -41,62 +43,6 @@ concatenation. Since concatenation on either side is an
[equivalence](foundation-core.equivalences.md), it follows that the whiskering
operations are equivalences.
-## Definitions
-
-### Left whiskering of identifications
-
-Left whiskering of identifications with respect to concatenation is an operation
-
-```text
- (p : x = y) {q r : y = z} → q = r → p ∙ q = p ∙ r
-```
-
-on any type.
-
-```agda
-module _
- {l : Level} {A : UU l}
- where
-
- left-whisker-concat : left-whiskering-operation A (_=_) (_∙_) (_=_)
- left-whisker-concat p β = ap (p ∙_) β
-```
-
-### Right whiskering of identifications
-
-Right whiskering of identifications with respect to concatenation is an
-operation
-
-```text
- {p q : x = y} → p = q → (r : y = z) → p ∙ r = q ∙ r
-```
-
-on any type.
-
-```agda
-module _
- {l : Level} {A : UU l}
- where
-
- right-whisker-concat : right-whiskering-operation A (_=_) (_∙_) (_=_)
- right-whisker-concat α q = ap (_∙ q) α
-```
-
-### Double whiskering of identifications
-
-```agda
-module _
- {l : Level} {A : UU l}
- {a b c d : A} (p : a = b) {r s : b = c} (t : r = s) (q : c = d)
- where
-
- double-whisker-concat : (p ∙ r) ∙ q = (p ∙ s) ∙ q
- double-whisker-concat = right-whisker-concat (left-whisker-concat p t) q
-
- double-whisker-concat' : p ∙ (r ∙ q) = p ∙ (s ∙ q)
- double-whisker-concat' = left-whisker-concat p (right-whisker-concat t q)
-```
-
## Properties
### Left whiskering of identifications is an equivalence
@@ -136,231 +82,3 @@ module _
pr2 equiv-right-whisker-concat =
is-equiv-right-whisker-concat
```
-
-### The unit and absorption laws for left whiskering of identifications
-
-```agda
-module _
- {l : Level} {A : UU l}
- where
-
- left-unit-law-left-whisker-concat :
- {x y : A} {p p' : x = y} (α : p = p') →
- left-whisker-concat refl α = α
- left-unit-law-left-whisker-concat refl = refl
-
- right-absorption-law-left-whisker-concat :
- {x y z : A} (p : x = y) (q : y = z) →
- left-whisker-concat p (refl {x = q}) = refl
- right-absorption-law-left-whisker-concat p q = refl
-```
-
-### The unit and absorption laws for right whiskering of identifications
-
-The right unit law for right whiskering of identifications with respect to
-concatenation asserts that the square of identifications
-
-```text
- right-whisker-concat α refl
- p ∙ refl -----------------------------> p' ∙ refl
- | |
- right-unit | |
- ∨ ∨
- p -------------------------------------> p'
-```
-
-commutes for any `α : p = p'`. Note that this law is slightly more complicated,
-since concatenating with `refl` on the right does not compute to the identity
-function.
-
-```agda
-module _
- {l : Level} {A : UU l}
- where
-
- right-unit-law-right-whisker-concat :
- {x y : A} {p p' : x = y} (α : p = p') →
- right-unit ∙ α = right-whisker-concat α refl ∙ right-unit
- right-unit-law-right-whisker-concat {p = refl} refl = refl
-
- left-absorption-law-right-whisker-concat :
- {x y z : A} (p : x = y) (q : y = z) →
- right-whisker-concat (refl {x = p}) q = refl
- left-absorption-law-right-whisker-concat p q = refl
-```
-
-### Commutativity of left and right whiskering of identifications
-
-Consider four identifications `p p' : x = y` and `q q' : y = z` in a type `A`.
-Then the square of identifications
-
-```text
- right-whisker α q
- p ∙ q ---------------------> p' ∙ q
- | |
- left-whisker p β | | left-whisker p' β
- ∨ ∨
- p ∙ q' --------------------> p' ∙ q'
- right-whisker α q'
-```
-
-commutes. There are at least two natural ways in which this square is seen to
-commute:
-
-1. The square commutes by naturality of the homotopy
- `α ↦ left-whisker-concat α β`.
-2. The transposed square commutes by the naturality of the homotopy
- `β ↦ right-whisker-concat α β`.
-
-These two ways in which the square commutes are inverse to each other.
-
-**Note.** The following statements could have been formalized using
-[commuting squares of identifications](foundation.commuting-squares-of-identifications.md).
-However, in order to avoid cyclic module dependencies in the library we avoid
-doing so.
-
-```agda
-module _
- {l : Level} {A : UU l} {x y z : A}
- where
-
- commutative-left-whisker-right-whisker-concat :
- {q q' : y = z} (β : q = q') {p p' : x = y} (α : p = p') →
- left-whisker-concat p β ∙ right-whisker-concat α q' =
- right-whisker-concat α q ∙ left-whisker-concat p' β
- commutative-left-whisker-right-whisker-concat β =
- nat-htpy (λ α → left-whisker-concat α β)
-
- commutative-right-whisker-left-whisker-concat :
- {p p' : x = y} (α : p = p') {q q' : y = z} (β : q = q') →
- right-whisker-concat α q ∙ left-whisker-concat p' β =
- left-whisker-concat p β ∙ right-whisker-concat α q'
- commutative-right-whisker-left-whisker-concat α =
- nat-htpy (right-whisker-concat α)
-
- compute-inv-commutative-left-whisker-right-whisker-concat :
- {q q' : y = z} (β : q = q') {p p' : x = y} (α : p = p') →
- inv (commutative-right-whisker-left-whisker-concat α β) =
- commutative-left-whisker-right-whisker-concat β α
- compute-inv-commutative-left-whisker-right-whisker-concat refl refl =
- refl
-```
-
-### Swapping the order of left and right whiskering of identifications
-
-Consider a diagram of identifications
-
-```text
- r
- p -----> q
- a -----> b -----> c ----->
- s
-```
-
-with `t : r = s`. Then the square of identifications
-
-```text
- assoc p r q
- (p ∙ r) ∙ q -------------> p ∙ (r ∙ q)
- | |
- double-whisker p t q | | double-whisker' p t q
- ∨ ∨
- (p ∙ s) ∙ q -------------> p ∙ (s ∙ q)
- assoc p s q
-```
-
-commutes.
-
-```agda
-module _
- {l1 : Level} {A : UU l1}
- where
-
- swap-double-whisker-concat :
- {a b c d : A} (p : a = b) {r s : b = c} (t : r = s) (q : c = d) →
- double-whisker-concat p t q ∙ assoc p s q =
- assoc p r q ∙ double-whisker-concat' p t q
- swap-double-whisker-concat refl refl refl = refl
-```
-
-### The action on identifications of concatenating by `refl` on the right
-
-Consider an identification `r : p = q` between two identifications
-`p q : x = y` in a type `A`. Then the square of identifications
-
-```text
- right-whisker r refl
- p ∙ refl ----------------------> q ∙ refl
- | |
- right-unit | | right-unit
- ∨ ∨
- p -----------------------------> q
- r
-```
-
-commutes.
-
-```agda
-module _
- {l : Level} {A : UU l} {x y : A} {p q : x = y}
- where
-
- compute-refl-right-whisker-concat :
- (r : p = q) →
- right-unit ∙ r = right-whisker-concat r refl ∙ right-unit
- compute-refl-right-whisker-concat refl = right-unit
-```
-
-### Left whiskering of identifications distributes over concatenation
-
-```agda
-module _
- {l : Level} {A : UU l}
- where
-
- distributive-left-whisker-concat-concat :
- {a b c : A} (p : a = b) {q r s : b = c} (α : q = r) (β : r = s) →
- left-whisker-concat p (α ∙ β) =
- left-whisker-concat p α ∙ left-whisker-concat p β
- distributive-left-whisker-concat-concat p refl β = refl
-```
-
-### Right whiskering of identifications distributes over concatenation
-
-```agda
-module _
- {l : Level} {A : UU l}
- where
-
- distributive-right-whisker-concat-concat :
- {a b c : A} {p q r : a = b} (α : p = q) (β : q = r) (s : b = c) →
- right-whisker-concat (α ∙ β) s =
- right-whisker-concat α s ∙ right-whisker-concat β s
- distributive-right-whisker-concat-concat refl β s = refl
-```
-
-### Left whiskering of identifications commutes with inverses of identifications
-
-```agda
-module _
- {l : Level} {A : UU l}
- where
-
- compute-inv-left-whisker-concat :
- {a b c : A} (p : a = b) {q r : b = c} (s : q = r) →
- left-whisker-concat p (inv s) = inv (left-whisker-concat p s)
- compute-inv-left-whisker-concat p s = ap-inv (concat p _) s
-```
-
-### Right whiskering of identifications commutes with inverses of identifications
-
-```agda
-module _
- {l : Level} {A : UU l}
- where
-
- compute-inv-right-whisker-concat :
- {a b c : A} {p q : a = b} (s : p = q) (r : b = c) →
- right-whisker-concat (inv s) r = inv (right-whisker-concat s r)
- compute-inv-right-whisker-concat s r = ap-inv (concat' _ r) s
-```
diff --git a/src/group-theory/conjugation.lagda.md b/src/group-theory/conjugation.lagda.md
index e07bdb3b39..8ab1d3121c 100644
--- a/src/group-theory/conjugation.lagda.md
+++ b/src/group-theory/conjugation.lagda.md
@@ -333,7 +333,7 @@ module _
{x y z : type-Group G} →
y = conjugation-Group G (inv-Group G x) z → conjugation-Group G x y = z
transpose-eq-conjugation-Group {x} {y} {z} =
- transpose-eq-section
+ transpose-eq-is-section
( conjugation-Group G x)
( conjugation-Group G (inv-Group G x))
( is-section-conjugation-inv-Group x)
@@ -342,7 +342,7 @@ module _
{x y z : type-Group G} →
conjugation-Group G (inv-Group G x) y = z → y = conjugation-Group G x z
transpose-eq-conjugation-Group' {x} {y} {z} =
- transpose-eq-section'
+ transpose-eq-is-section'
( conjugation-Group G x)
( conjugation-Group G (inv-Group G x))
( is-section-conjugation-inv-Group x)
@@ -351,7 +351,7 @@ module _
{x y z : type-Group G} →
y = conjugation-Group G x z → conjugation-Group G (inv-Group G x) y = z
transpose-eq-conjugation-inv-Group {x} {y} {z} =
- transpose-eq-retraction
+ transpose-eq-is-retraction
( conjugation-Group G x)
( conjugation-Group G (inv-Group G x))
( is-retraction-conjugation-inv-Group x)
@@ -360,7 +360,7 @@ module _
{x y z : type-Group G} →
conjugation-Group G x y = z → y = conjugation-Group G (inv-Group G x) z
transpose-eq-conjugation-inv-Group' {x} {y} {z} =
- transpose-eq-retraction'
+ transpose-eq-is-retraction'
( conjugation-Group G x)
( conjugation-Group G (inv-Group G x))
( is-retraction-conjugation-inv-Group x)
diff --git a/src/group-theory/equivalences-group-actions.lagda.md b/src/group-theory/equivalences-group-actions.lagda.md
index 87c300fea4..cabae428b7 100644
--- a/src/group-theory/equivalences-group-actions.lagda.md
+++ b/src/group-theory/equivalences-group-actions.lagda.md
@@ -199,7 +199,7 @@ module _
(e : equiv-action-Group G X Y) →
preserves-action-Group G Y X (map-inv-equiv-action-Group e)
preserves-action-map-inv-equiv-action-Group (e , H) g =
- coherence-square-maps-inv-equiv-horizontal
+ horizontal-inv-equiv-coherence-square-maps
( e)
( mul-action-Group G X g)
( mul-action-Group G Y g)
diff --git a/src/orthogonal-factorization-systems/factorizations-of-maps.lagda.md b/src/orthogonal-factorization-systems/factorizations-of-maps.lagda.md
index 860b38a002..8dc962ca58 100644
--- a/src/orthogonal-factorization-systems/factorizations-of-maps.lagda.md
+++ b/src/orthogonal-factorization-systems/factorizations-of-maps.lagda.md
@@ -161,7 +161,7 @@ module _
UU (l1 ⊔ l2)
coherence-htpy-factorization-through F E R L =
( is-factorization-factorization-through F) ~
- ( horizontal-concat-htpy L R ∙h is-factorization-factorization-through E)
+ ( horizontal-concat-htpy R L ∙h is-factorization-factorization-through E)
htpy-factorization-through :
(F E : factorization-through f X) → UU (l1 ⊔ l2 ⊔ l3)
diff --git a/src/structured-types/equivalences-types-equipped-with-endomorphisms.lagda.md b/src/structured-types/equivalences-types-equipped-with-endomorphisms.lagda.md
index d5a4a65454..3b8b45fb50 100644
--- a/src/structured-types/equivalences-types-equipped-with-endomorphisms.lagda.md
+++ b/src/structured-types/equivalences-types-equipped-with-endomorphisms.lagda.md
@@ -158,7 +158,7 @@ inv-equiv-Type-With-Endomorphism :
pr1 (inv-equiv-Type-With-Endomorphism X Y e) =
inv-equiv (equiv-equiv-Type-With-Endomorphism X Y e)
pr2 (inv-equiv-Type-With-Endomorphism X Y e) =
- coherence-square-maps-inv-equiv-horizontal
+ horizontal-inv-equiv-coherence-square-maps
( equiv-equiv-Type-With-Endomorphism X Y e)
( endomorphism-Type-With-Endomorphism X)
( endomorphism-Type-With-Endomorphism Y)
diff --git a/src/synthetic-homotopy-theory/descent-circle-function-types.lagda.md b/src/synthetic-homotopy-theory/descent-circle-function-types.lagda.md
index 6bf5b5fd8c..c0454fa477 100644
--- a/src/synthetic-homotopy-theory/descent-circle-function-types.lagda.md
+++ b/src/synthetic-homotopy-theory/descent-circle-function-types.lagda.md
@@ -100,6 +100,7 @@ module _
pr2 eq-descent-data-circle-function-type h =
( eq-htpy
( horizontal-concat-htpy
+ ( coherence-square-family-with-descent-data-circle B)
( h ·l
inv-htpy
( coherence-square-maps-inv-equiv
@@ -109,8 +110,7 @@ module _
( family-family-with-descent-data-circle A)
( loop-free-loop l))
( equiv-family-with-descent-data-circle A)
- ( coherence-square-family-with-descent-data-circle A)))
- ( coherence-square-family-with-descent-data-circle B))) ∙
+ ( coherence-square-family-with-descent-data-circle A))))) ∙
( inv
( ( tr-function-type
( family-family-with-descent-data-circle A)
diff --git a/src/synthetic-homotopy-theory/equivalences-sequential-diagrams.lagda.md b/src/synthetic-homotopy-theory/equivalences-sequential-diagrams.lagda.md
index d399a7affc..b82afe8957 100644
--- a/src/synthetic-homotopy-theory/equivalences-sequential-diagrams.lagda.md
+++ b/src/synthetic-homotopy-theory/equivalences-sequential-diagrams.lagda.md
@@ -140,7 +140,7 @@ module _
pr1 inv-equiv-sequential-diagram n =
inv-equiv (equiv-equiv-sequential-diagram B e n)
pr2 inv-equiv-sequential-diagram n =
- coherence-square-maps-inv-equiv-vertical
+ vertical-inv-equiv-coherence-square-maps
( map-sequential-diagram A n)
( equiv-equiv-sequential-diagram B e n)
( equiv-equiv-sequential-diagram B e (succ-ℕ n))
diff --git a/src/synthetic-homotopy-theory/functoriality-sequential-colimits.lagda.md b/src/synthetic-homotopy-theory/functoriality-sequential-colimits.lagda.md
index b03ced31dd..61cd54ef3b 100644
--- a/src/synthetic-homotopy-theory/functoriality-sequential-colimits.lagda.md
+++ b/src/synthetic-homotopy-theory/functoriality-sequential-colimits.lagda.md
@@ -336,11 +336,22 @@ module _
( ( map-sequential-colimit-hom-sequential-diagram up-c c''
( comp-hom-sequential-diagram A B C g f)) ·l
( coherence-cocone-sequential-diagram c n))
- ( _)
+ ( coherence-cocone-sequential-diagram
+ ( map-cocone-hom-sequential-diagram
+ ( comp-hom-sequential-diagram A B C g f)
+ ( c''))
+ ( n))
+ ( ( htpy-htpy-cocone-map-sequential-colimit-hom-sequential-diagram
+ ( up-c)
+ ( c'')
+ ( comp-hom-sequential-diagram A B C g f)
+ ( succ-ℕ n)) ·r
+ ( map-sequential-diagram A n))
( coherence-htpy-cocone-map-sequential-colimit-hom-sequential-diagram up-c
( c'')
( comp-hom-sequential-diagram A B C g f)
- ( n))) ∙h
+ ( n))
+ ( _)) ∙h
( ap-concat-htpy
( htpy-htpy-cocone-map-sequential-colimit-hom-sequential-diagram up-c c''
( comp-hom-sequential-diagram A B C g f)