diff --git a/FILE-CONVENTIONS.md b/FILE-CONVENTIONS.md
index 0467bccfbc..7dba35bc5a 100644
--- a/FILE-CONVENTIONS.md
+++ b/FILE-CONVENTIONS.md
@@ -35,27 +35,42 @@ Every file should begin with a header in the following format:
# The title of the file
```
-and immediately after this, any option pragmas, then the module declaration then
-public imports, if any, should be declared. E.g.
+Directly after the header, include an Agda code block containing
+
+- any option pragmas,
+- the main module declaration,
+- any public import statements
+
+in this order. E.g.
````md
```agda
-{-# OPTIONS --safe #-}
+{-# OPTIONS ... #-}
-module foundation.dependent-pair-types where
+module ... where
-open import foundation-core.dependent-pair-types public
+open import ... public
```
````
### Imports block
-After the module declaration, include an Agda code block of all module imports
-starting with `Imports
` and ending with
-` `. This Agda block should only contain module imports. Do not import
-further modules later in the file. On the documentation pages, this Agda imports
-block will be hidden by default, but it can be revealed by clicking on the
-_Imports_ link.
+After the module declaration, include an Agda code block of all non-public
+module imports starting with `Imports
` and ending
+with ` `. This block should only contain module imports and there
+should have no further import statements after it. In the rendered markdown, the
+contents of this block will be hidden by default, but can be revealed by
+clicking on _Imports_.
+
+````md
+Imports
+
+```agda
+open import ...
+```
+
+
+````
### Sections and headings
@@ -65,10 +80,10 @@ subsubsections. Use `##` headings for the main sections of the file and reserve
`## Definitions`, and `## Properties`. Occasionally, you might include a section
like `## Examples` or `## Theorem`, based on the purpose of the file.
-Ideally, the first section of a file explains the idea, the second section
-proceeds to give the main definition that is the focus of the file, then the
-third section proceeds possibly with examples or by deriving basic properties of
-the defined concept.
+Ideally, depending on the purpose of the file, the first section explains the
+main idea, the second section proceeds to give the main definition that is the
+focus of the file, then the third section proceeds possibly with examples or by
+deriving basic properties of the defined concept.
#### Subsections
@@ -105,6 +120,6 @@ contents of the file.
- An instructive example of a file with the expected structure is
[`foundation.cantor-schroder-bernstein-escardo`](https://raw.githubusercontent.com/UniMath/agda-unimath/master/src/foundation/cantor-schroder-bernstein-escardo.lagda.md).
-Please note that some conventions above are enforced by our `pre-commit` hooks.
-You can read more about them in our
+Please note that some of the conventions above are enforced by our `pre-commit`
+hooks. You can read more about them in our
[installation guide](HOWTO-INSTALL.md#pre-commit-hooks).
diff --git a/src/elementary-number-theory/powers-of-two.lagda.md b/src/elementary-number-theory/powers-of-two.lagda.md
index c3dde3d93a..ca73b53c07 100644
--- a/src/elementary-number-theory/powers-of-two.lagda.md
+++ b/src/elementary-number-theory/powers-of-two.lagda.md
@@ -16,16 +16,16 @@ open import elementary-number-theory.natural-numbers
open import elementary-number-theory.parity-natural-numbers
open import elementary-number-theory.strong-induction-natural-numbers
+open import foundation.dependent-pair-types
+open import foundation.equality-cartesian-product-types
+open import foundation.functions
open import foundation.split-surjective-maps
open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
-open import foundation-core.equality-cartesian-product-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.injective-maps
```
diff --git a/src/elementary-number-theory/type-arithmetic-natural-numbers.lagda.md b/src/elementary-number-theory/type-arithmetic-natural-numbers.lagda.md
index 820686c868..b0812df41d 100644
--- a/src/elementary-number-theory/type-arithmetic-natural-numbers.lagda.md
+++ b/src/elementary-number-theory/type-arithmetic-natural-numbers.lagda.md
@@ -15,6 +15,8 @@ open import elementary-number-theory.natural-numbers
open import elementary-number-theory.parity-natural-numbers
open import elementary-number-theory.powers-of-two
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.functoriality-cartesian-product-types
open import foundation.functoriality-coproduct-types
open import foundation.iterating-functions
@@ -26,10 +28,8 @@ open import foundation.unit-type
open import foundation-core.cartesian-product-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.injective-maps
open import foundation-core.negation
diff --git a/src/foundation-core.lagda.md b/src/foundation-core.lagda.md
index 06b0da59a8..64f0b316a2 100644
--- a/src/foundation-core.lagda.md
+++ b/src/foundation-core.lagda.md
@@ -5,52 +5,36 @@
```agda
module foundation-core where
-open import foundation-core.0-maps public
open import foundation-core.1-types public
-open import foundation-core.automorphisms public
open import foundation-core.cartesian-product-types public
open import foundation-core.coherently-invertible-maps public
-open import foundation-core.commuting-3-simplices-of-homotopies public
-open import foundation-core.commuting-3-simplices-of-maps public
open import foundation-core.commuting-cubes-of-maps public
open import foundation-core.commuting-squares-of-maps public
-open import foundation-core.commuting-triangles-of-homotopies public
open import foundation-core.commuting-triangles-of-maps public
-open import foundation-core.cones-over-cospans public
open import foundation-core.constant-maps public
open import foundation-core.contractible-maps public
open import foundation-core.contractible-types public
open import foundation-core.coproduct-types public
-open import foundation-core.cospans public
open import foundation-core.decidable-propositions public
-open import foundation-core.dependent-pair-types public
open import foundation-core.diagonal-maps-of-types public
open import foundation-core.discrete-types public
open import foundation-core.embeddings public
open import foundation-core.empty-types public
open import foundation-core.endomorphisms public
-open import foundation-core.equality-cartesian-product-types public
open import foundation-core.equality-dependent-pair-types public
-open import foundation-core.equality-fibers-of-maps public
open import foundation-core.equivalence-induction public
open import foundation-core.equivalence-relations public
open import foundation-core.equivalences public
-open import foundation-core.faithful-maps public
open import foundation-core.fibers-of-maps public
open import foundation-core.function-extensionality public
-open import foundation-core.functions public
open import foundation-core.functoriality-dependent-function-types public
open import foundation-core.functoriality-dependent-pair-types public
-open import foundation-core.functoriality-fibers-of-maps public
open import foundation-core.functoriality-function-types public
-open import foundation-core.fundamental-theorem-of-identity-types public
open import foundation-core.homotopies public
-open import foundation-core.identity-systems public
open import foundation-core.identity-types public
open import foundation-core.injective-maps public
open import foundation-core.involutions public
open import foundation-core.logical-equivalences public
-open import foundation-core.morphisms-cospans public
open import foundation-core.negation public
open import foundation-core.path-split-maps public
open import foundation-core.propositional-maps public
@@ -61,15 +45,11 @@ open import foundation-core.sections public
open import foundation-core.sets public
open import foundation-core.singleton-induction public
open import foundation-core.small-types public
-open import foundation-core.subtype-identity-principle public
open import foundation-core.subtypes public
open import foundation-core.truncated-maps public
open import foundation-core.truncated-types public
open import foundation-core.truncation-levels public
-open import foundation-core.type-arithmetic-cartesian-product-types public
-open import foundation-core.type-arithmetic-dependent-pair-types 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.universe-levels public
```
diff --git a/src/foundation-core/0-maps.lagda.md b/src/foundation-core/0-maps.lagda.md
deleted file mode 100644
index 46e5e5e53c..0000000000
--- a/src/foundation-core/0-maps.lagda.md
+++ /dev/null
@@ -1,156 +0,0 @@
-# 0-Maps
-
-```agda
-module foundation-core.0-maps where
-```
-
-Imports
-
-```agda
-open import foundation-core.dependent-pair-types
-open import foundation-core.fibers-of-maps
-open import foundation-core.functions
-open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.homotopies
-open import foundation-core.sets
-open import foundation-core.truncated-maps
-open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
-```
-
-
-
-## Definition
-
-Maps `f : A → B` of which the fibers are sets, i.e., 0-truncated types, are
-called 0-maps. We will show in `foundation-core.faithful-maps` that a map f is a
-0-map if and only if f is faithful, i.e., f induces embeddings on identity
-types.
-
-```agda
-module _
- {l1 l2 : Level}
- where
-
- is-0-map : {A : UU l1} {B : UU l2} → (A → B) → UU (l1 ⊔ l2)
- is-0-map {A} {B} f = (y : B) → is-set (fib f y)
-
- 0-map : (A : UU l1) (B : UU l2) → UU (l1 ⊔ l2)
- 0-map A B = Σ (A → B) is-0-map
-
- map-0-map : {A : UU l1} {B : UU l2} → 0-map A B → A → B
- map-0-map = pr1
-
- is-0-map-map-0-map :
- {A : UU l1} {B : UU l2} (f : 0-map A B) → is-0-map (map-0-map f)
- is-0-map-map-0-map = pr2
-```
-
-## Properties
-
-### Projections of families of sets are `0`-maps
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1}
- where
-
- abstract
- is-0-map-pr1 :
- {B : A → UU l2} → ((x : A) → is-set (B x)) → is-0-map (pr1 {B = B})
- is-0-map-pr1 {B} H x =
- is-set-equiv (B x) (equiv-fib-pr1 B x) (H x)
-
- pr1-0-map :
- (B : A → Set l2) → 0-map (Σ A (λ x → type-Set (B x))) A
- pr1 (pr1-0-map B) = pr1
- pr2 (pr1-0-map B) = is-0-map-pr1 (λ x → is-set-type-Set (B x))
-```
-
-### `0`-maps are closed under homotopies
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2} {f g : A → B} (H : f ~ g)
- where
-
- is-0-map-htpy : is-0-map g → is-0-map f
- is-0-map-htpy = is-trunc-map-htpy zero-𝕋 H
-```
-
-### `0`-maps are closed under composition
-
-```agda
-module _
- {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
- where
-
- is-0-map-comp :
- (g : B → X) (h : A → B) →
- is-0-map g → is-0-map h → is-0-map (g ∘ h)
- is-0-map-comp = is-trunc-map-comp zero-𝕋
-
- is-0-map-comp-htpy :
- (f : A → X) (g : B → X) (h : A → B) (H : f ~ (g ∘ h)) →
- is-0-map g → is-0-map h → is-0-map f
- is-0-map-comp-htpy = is-trunc-map-comp-htpy zero-𝕋
-```
-
-### If a composite is a 0-map, then so is its right factor
-
-```agda
-module _
- {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
- where
-
- is-0-map-right-factor :
- (g : B → X) (h : A → B) →
- is-0-map g → is-0-map (g ∘ h) → is-0-map h
- is-0-map-right-factor = is-trunc-map-right-factor zero-𝕋
-
- is-0-map-right-factor-htpy :
- (f : A → X) (g : B → X) (h : A → B) (H : f ~ (g ∘ h)) →
- is-0-map g → is-0-map f → is-0-map h
- is-0-map-right-factor-htpy = is-trunc-map-right-factor-htpy zero-𝕋
-```
-
-### A family of `0`-maps induces a `0`-map on total spaces
-
-```agda
-module _
- {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : A → UU l3}
- {f : (x : A) → B x → C x}
- where
-
- abstract
- is-0-map-tot : ((x : A) → is-0-map (f x)) → is-0-map (tot f)
- is-0-map-tot = is-trunc-map-tot zero-𝕋
-```
-
-### For any type family over the codomain, a `0`-map induces a `0`-map on total spaces
-
-In other words, `0`-maps are stable under pullbacks. We will come to this point
-when we introduce homotopy pullbacks.
-
-```agda
-module _
- {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {f : A → B} (C : B → UU l3)
- where
-
- abstract
- is-0-map-map-Σ-map-base : is-0-map f → is-0-map (map-Σ-map-base f C)
- is-0-map-map-Σ-map-base = is-trunc-map-map-Σ-map-base zero-𝕋 C
-```
-
-### The functorial action of `Σ` preserves `0`-maps
-
-```agda
-module _
- {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {C : A → UU l3}
- (D : B → UU l4) {f : A → B} {g : (x : A) → C x → D (f x)}
- where
-
- is-0-map-map-Σ :
- is-0-map f → ((x : A) → is-0-map (g x)) → is-0-map (map-Σ D f g)
- is-0-map-map-Σ = is-trunc-map-map-Σ zero-𝕋 D
-```
diff --git a/src/foundation-core/1-types.lagda.md b/src/foundation-core/1-types.lagda.md
index 92c1414cda..ddc5b7a9ab 100644
--- a/src/foundation-core/1-types.lagda.md
+++ b/src/foundation-core/1-types.lagda.md
@@ -7,13 +7,14 @@ module foundation-core.1-types where
Imports
```agda
-open import foundation-core.dependent-pair-types
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
+
open import foundation-core.equivalences
open import foundation-core.identity-types
open import foundation-core.sets
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/automorphisms.lagda.md b/src/foundation-core/automorphisms.lagda.md
deleted file mode 100644
index c34c6027a7..0000000000
--- a/src/foundation-core/automorphisms.lagda.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# Automorphisms
-
-```agda
-module foundation-core.automorphisms where
-```
-
-Imports
-
-```agda
-open import foundation.sets
-
-open import foundation-core.dependent-pair-types
-open import foundation-core.equivalences
-open import foundation-core.universe-levels
-
-open import structured-types.pointed-types
-```
-
-
-
-## Idea
-
-An automorphism on a type `A` is an equivalence `A ≃ A`. We will just reuse the
-infrastructure of equivalences for automorphisms.
-
-## Definitions
-
-### The type of automorphisms on a type
-
-```agda
-Aut : {l : Level} → UU l → UU l
-Aut Y = Y ≃ Y
-
-is-set-Aut : {l : Level} {A : UU l} → is-set A → is-set (Aut A)
-is-set-Aut H = is-set-equiv-is-set H H
-
-Aut-Set : {l : Level} → Set l → Set l
-pr1 (Aut-Set A) = Aut (type-Set A)
-pr2 (Aut-Set A) = is-set-Aut (is-set-type-Set A)
-
-Aut-Pointed-Type : {l : Level} → UU l → Pointed-Type l
-pr1 (Aut-Pointed-Type A) = Aut A
-pr2 (Aut-Pointed-Type A) = id-equiv
-```
diff --git a/src/foundation-core/cartesian-product-types.lagda.md b/src/foundation-core/cartesian-product-types.lagda.md
index 0ada89c06d..86f2147537 100644
--- a/src/foundation-core/cartesian-product-types.lagda.md
+++ b/src/foundation-core/cartesian-product-types.lagda.md
@@ -9,8 +9,8 @@ module foundation-core.cartesian-product-types where
Imports
```agda
-open import foundation-core.dependent-pair-types
-open import foundation-core.universe-levels
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
```
diff --git a/src/foundation-core/coherently-invertible-maps.lagda.md b/src/foundation-core/coherently-invertible-maps.lagda.md
index 107d51cd1e..bd6ebddcd7 100644
--- a/src/foundation-core/coherently-invertible-maps.lagda.md
+++ b/src/foundation-core/coherently-invertible-maps.lagda.md
@@ -10,13 +10,13 @@ module foundation-core.coherently-invertible-maps where
```agda
open import foundation.commuting-squares-of-identifications
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/commuting-3-simplices-of-homotopies.lagda.md b/src/foundation-core/commuting-3-simplices-of-homotopies.lagda.md
deleted file mode 100644
index a17dacd09b..0000000000
--- a/src/foundation-core/commuting-3-simplices-of-homotopies.lagda.md
+++ /dev/null
@@ -1,76 +0,0 @@
-# Commuting 3-simplices of homotopies
-
-```agda
-{-# OPTIONS --safe #-}
-
-module foundation-core.commuting-3-simplices-of-homotopies where
-```
-
-Imports
-
-```agda
-open import foundation-core.commuting-triangles-of-homotopies
-open import foundation-core.homotopies
-open import foundation-core.universe-levels
-```
-
-
-
-## Idea
-
-A commuting 3-simplex of homotopies is a commuting diagram of the form
-
-```text
- f ----------> g
- | \ ^ |
- | \ / |
- | / |
- | / \ |
- V / v V
- h ----------> i.
-```
-
-where f, g, h, and i are functions.
-
-## Definition
-
-```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)
- (diagonal-up : h ~ g) (diagonal-down : f ~ i)
- (upper-left : coherence-triangle-homotopies top diagonal-up left)
- (lower-right : coherence-triangle-homotopies bottom right diagonal-up)
- (upper-right : coherence-triangle-homotopies diagonal-down right top)
- (lower-left : coherence-triangle-homotopies diagonal-down bottom left)
- where
-
- coherence-3-simplex-homotopies : UU (l1 ⊔ l2)
- coherence-3-simplex-homotopies =
- ( upper-right ∙h
- left-whisk-htpy-coherence-triangle-homotopies
- ( diagonal-up)
- ( right)
- ( upper-left)) ~
- ( ( lower-left ∙h
- right-whisk-htpy-coherence-triangle-homotopies
- ( right)
- ( lower-right)
- ( left)) ∙h
- assoc-htpy left diagonal-up right)
-
- coherence-3-simplex-homotopies' : UU (l1 ⊔ l2)
- coherence-3-simplex-homotopies' =
- ( ( lower-left ∙h
- right-whisk-htpy-coherence-triangle-homotopies
- ( right)
- ( lower-right)
- ( left)) ∙h
- assoc-htpy left diagonal-up right) ~
- ( upper-right ∙h
- left-whisk-htpy-coherence-triangle-homotopies
- ( diagonal-up)
- ( right)
- ( upper-left))
-```
diff --git a/src/foundation-core/commuting-3-simplices-of-maps.lagda.md b/src/foundation-core/commuting-3-simplices-of-maps.lagda.md
deleted file mode 100644
index 7949669a58..0000000000
--- a/src/foundation-core/commuting-3-simplices-of-maps.lagda.md
+++ /dev/null
@@ -1,55 +0,0 @@
-# Commuting 3-simplices of maps
-
-```agda
-{-# OPTIONS --safe #-}
-
-module foundation-core.commuting-3-simplices-of-maps where
-```
-
-Imports
-
-```agda
-open import foundation-core.commuting-triangles-of-maps
-open import foundation-core.homotopies
-open import foundation-core.universe-levels
-```
-
-
-
-## Idea
-
-A commuting 3-simplex is a commuting diagram of the form
-
-```text
- A ----------> B
- | \ ^ |
- | \ / |
- | / |
- | / \ |
- V / v V
- X ----------> Y.
-```
-
-## Definition
-
-```agda
-module _
- {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)
- (diagonal-up : X → B) (diagonal-down : A → Y)
- (upper-left : coherence-triangle-maps top diagonal-up left)
- (lower-right : coherence-triangle-maps bottom right diagonal-up)
- (upper-right : coherence-triangle-maps diagonal-down right top)
- (lower-left : coherence-triangle-maps diagonal-down bottom left)
- where
-
- coherence-3-simplex-maps : UU (l1 ⊔ l4)
- coherence-3-simplex-maps =
- ( upper-right ∙h (right ·l upper-left)) ~
- ( lower-left ∙h (lower-right ·r left))
-
- coherence-3-simplex-maps' : UU (l1 ⊔ l4)
- coherence-3-simplex-maps' =
- ( lower-left ∙h (lower-right ·r left)) ~
- ( upper-right ∙h (right ·l upper-left))
-```
diff --git a/src/foundation-core/commuting-cubes-of-maps.lagda.md b/src/foundation-core/commuting-cubes-of-maps.lagda.md
index f3f6ef8662..6dad78d70e 100644
--- a/src/foundation-core/commuting-cubes-of-maps.lagda.md
+++ b/src/foundation-core/commuting-cubes-of-maps.lagda.md
@@ -7,14 +7,14 @@ module foundation-core.commuting-cubes-of-maps where
Imports
```agda
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.hexagons-of-identifications
+open import foundation.universe-levels
-open import foundation-core.cones-over-cospans
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/commuting-squares-of-maps.lagda.md b/src/foundation-core/commuting-squares-of-maps.lagda.md
index 5d9344c51b..0ff971f15c 100644
--- a/src/foundation-core/commuting-squares-of-maps.lagda.md
+++ b/src/foundation-core/commuting-squares-of-maps.lagda.md
@@ -9,10 +9,11 @@ module foundation-core.commuting-squares-of-maps where
Imports
```agda
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.commuting-triangles-of-maps
-open import foundation-core.functions
open import foundation-core.homotopies
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/commuting-triangles-of-homotopies.lagda.md b/src/foundation-core/commuting-triangles-of-homotopies.lagda.md
deleted file mode 100644
index 72bbe5f655..0000000000
--- a/src/foundation-core/commuting-triangles-of-homotopies.lagda.md
+++ /dev/null
@@ -1,132 +0,0 @@
-# Commuting triangles of homotopies
-
-```agda
-{-# OPTIONS --safe #-}
-
-module foundation-core.commuting-triangles-of-homotopies where
-```
-
-Imports
-
-```agda
-open import foundation-core.functions
-open import foundation-core.homotopies
-open import foundation-core.identity-types
-open import foundation-core.universe-levels
-```
-
-
-
-## Idea
-
-A triangle of homotopies of maps
-
-```text
- f ----> g
- \ /
- \ /
- V V
- h
-```
-
-is said to commute if there is a homotopy between the homotopy on the left
-`f ~ h` and the composite homotopy `f ~ g ~ h`.
-
-## Definition
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
- {f g h : (x : A) → B x}
- where
-
- coherence-triangle-homotopies :
- (left : f ~ h) (right : g ~ h) (top : f ~ g) → UU (l1 ⊔ l2)
- coherence-triangle-homotopies left right top = left ~ (top ∙h right)
-
- coherence-triangle-homotopies' :
- (left : f ~ h) (right : g ~ h) (top : f ~ g) → UU (l1 ⊔ l2)
- coherence-triangle-homotopies' left right top = (top ∙h right) ~ left
-```
-
-## Properties
-
-### Distributive law for left whiskering
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2}
- {f g h : A → B}
- {l3 : Level} {X : UU l3} (i : B → X)
- (left : f ~ h) (right : g ~ h) (top : f ~ g)
- where
-
- distributivity-left-whisk :
- coherence-triangle-homotopies left right top →
- (i ·l left) ~ ((i ·l top) ∙h (i ·l right))
- distributivity-left-whisk T x =
- ap-concat-eq i (top x) (right x) (left x) (T x)
-```
-
-### Left whiskering triangles of homotopies
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
- {f g h : (x : A) → B x}
- {left : f ~ h} (right : g ~ h) {top : f ~ g}
- where
-
- left-whisk-htpy-coherence-triangle-homotopies :
- {i : (x : A) → B x}
- (H : h ~ i) (T : coherence-triangle-homotopies left right top) →
- coherence-triangle-homotopies {h = i} (left ∙h H) (right ∙h H) top
- left-whisk-htpy-coherence-triangle-homotopies H T =
- (λ x → ap (_∙ H x) (T x)) ∙h assoc-htpy top right H
-
-module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2}
- {f g h : A → B}
- {left : f ~ h} (right : g ~ h) {top : f ~ g}
- where
-
- left-whisk-coherence-triangle-homotopies :
- {l3 : Level} {X : UU l3} (i : B → X)
- (T : coherence-triangle-homotopies left right top) →
- coherence-triangle-homotopies
- {f = i ∘ f} {i ∘ g} {i ∘ h}
- (i ·l left) (i ·l right) (i ·l top)
- left-whisk-coherence-triangle-homotopies i =
- distributivity-left-whisk i left right top
-```
-
-### Right whiskering triangles of homotopies
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
- {f g h : (x : A) → B x}
- {left : f ~ h} (right : g ~ h) {top : f ~ g}
- where
-
- right-whisk-htpy-coherence-triangle-homotopies :
- {i : (x : A) → B x}
- (T : coherence-triangle-homotopies left right top) (H : i ~ f) →
- coherence-triangle-homotopies {f = i} (H ∙h left) right (H ∙h top)
- right-whisk-htpy-coherence-triangle-homotopies T H =
- (λ x → ap (H x ∙_) (T x)) ∙h (inv-htpy-assoc-htpy H top right)
-
-module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2}
- {f g h : A → B}
- {left : f ~ h} (right : g ~ h) {top : f ~ g}
- where
-
- right-whisk-coherence-triangle-homotopies :
- {l3 : Level} {X : UU l3}
- (T : coherence-triangle-homotopies left right top) (i : X → A) →
- coherence-triangle-homotopies
- {f = f ∘ i} {g ∘ i} {h ∘ i}
- (left ·r i) (right ·r i) (top ·r i)
- right-whisk-coherence-triangle-homotopies T i = T ∘ i
-```
diff --git a/src/foundation-core/commuting-triangles-of-maps.lagda.md b/src/foundation-core/commuting-triangles-of-maps.lagda.md
index 2097067e0a..22bc8f6928 100644
--- a/src/foundation-core/commuting-triangles-of-maps.lagda.md
+++ b/src/foundation-core/commuting-triangles-of-maps.lagda.md
@@ -9,9 +9,10 @@ module foundation-core.commuting-triangles-of-maps where
Imports
```agda
-open import foundation-core.functions
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.homotopies
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/cones-over-cospans.lagda.md b/src/foundation-core/cones-over-cospans.lagda.md
deleted file mode 100644
index 617ff9b952..0000000000
--- a/src/foundation-core/cones-over-cospans.lagda.md
+++ /dev/null
@@ -1,270 +0,0 @@
-# Cones on pullback diagrams
-
-```agda
-module foundation-core.cones-over-cospans where
-```
-
-Imports
-
-```agda
-open import foundation.homotopies
-open import foundation.structure-identity-principle
-
-open import foundation-core.commuting-squares-of-maps
-open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.equivalences
-open import foundation-core.functions
-open import foundation-core.fundamental-theorem-of-identity-types
-open import foundation-core.identity-types
-open import foundation-core.universe-levels
-```
-
-
-
-## Idea
-
-A cone on a cospan `A --f--> X <--g-- B` with vertex `C` is a triple `(p,q,H)`
-consisting of a map `p : C → A`, a map `q : C → B`, and a homotopy `H`
-witnessing that the square
-
-```text
- q
- C -----> B
- | |
- p| |g
- V V
- A -----> X
- f
-```
-
-commutes.
-
-## Definitions
-
-### Cones on cospans
-
-A cone on a cospan with a vertex C is a pair of functions from C into the
-domains of the maps in the cospan, equipped with a homotopy witnessing that the
-resulting square commutes.
-
-```agda
-module _
- {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
- (f : A → X) (g : B → X)
- where
-
- cone : {l4 : Level} → UU l4 → UU (l1 ⊔ l2 ⊔ l3 ⊔ l4)
- cone C = Σ (C → A) (λ p → Σ (C → B) (λ q → coherence-square-maps q p g f))
-
-module _
- {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3} {C : UU l4}
- (f : A → X) (g : B → X) (c : cone f g C)
- where
-
- vertical-map-cone : C → A
- vertical-map-cone = pr1 c
-
- horizontal-map-cone : C → B
- horizontal-map-cone = pr1 (pr2 c)
-
- coherence-square-cone :
- coherence-square-maps horizontal-map-cone vertical-map-cone g f
- coherence-square-cone = pr2 (pr2 c)
-```
-
-### Dependent cones
-
-```agda
-cone-family :
- {l1 l2 l3 l4 l5 l6 l7 l8 : Level}
- {X : UU l1} {A : UU l2} {B : UU l3} {C : UU l4}
- (PX : X → UU l5) {PA : A → UU l6} {PB : B → UU l7}
- {f : A → X} {g : B → X} →
- (f' : (a : A) → PA a → PX (f a)) (g' : (b : B) → PB b → PX (g b)) →
- cone f g C → (C → UU l8) → UU (l4 ⊔ l5 ⊔ l6 ⊔ l7 ⊔ l8)
-cone-family {C = C} PX {f = f} {g} f' g' c PC =
- (x : C) →
- cone
- ( ( tr PX (coherence-square-cone f g c x)) ∘
- ( f' (vertical-map-cone f g c x)))
- ( g' (horizontal-map-cone f g c x))
- ( PC x)
-```
-
-### Identifications of cones
-
-Next we characterize the identity type of the type of cones with a given vertex
-C. Note that in the definition of htpy-cone we do not use pattern matching on
-the cones c and c'. This is to ensure that the type htpy-cone f g c c' is a
-Σ-type for any c and c', not just for c and c' of the form (pair p (pair q H))
-and (pair p' (pair q' H')) respectively.
-
-```agda
-module _
- {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
- (f : A → X) (g : B → X) {C : UU l4}
- where
-
- coherence-htpy-cone :
- (c c' : cone f g C) (K : vertical-map-cone f g c ~ vertical-map-cone f g c')
- (L : horizontal-map-cone f g c ~ horizontal-map-cone f g c') → UU (l4 ⊔ l3)
- coherence-htpy-cone c c' K L =
- ( coherence-square-cone f g c ∙h (g ·l L)) ~
- ( (f ·l K) ∙h coherence-square-cone f g c')
-
- htpy-cone : cone f g C → cone f g C → UU (l1 ⊔ l2 ⊔ l3 ⊔ l4)
- htpy-cone c c' =
- Σ ( vertical-map-cone f g c ~ vertical-map-cone f g c')
- ( λ K →
- Σ ( horizontal-map-cone f g c ~ horizontal-map-cone f g c')
- ( coherence-htpy-cone c c' K))
-
- refl-htpy-cone : (c : cone f g C) → htpy-cone c c
- pr1 (refl-htpy-cone c) = refl-htpy
- pr1 (pr2 (refl-htpy-cone c)) = refl-htpy
- pr2 (pr2 (refl-htpy-cone c)) = right-unit-htpy
-
- htpy-eq-cone : (c c' : cone f g C) → c = c' → htpy-cone c c'
- htpy-eq-cone c .c refl = refl-htpy-cone c
-
- is-contr-total-htpy-cone :
- (c : cone f g C) → is-contr (Σ (cone f g C) (htpy-cone c))
- is-contr-total-htpy-cone c =
- is-contr-total-Eq-structure
- ( λ p qH K →
- Σ ( horizontal-map-cone f g c ~ pr1 qH)
- ( coherence-htpy-cone c (pair p qH) K))
- ( is-contr-total-htpy (vertical-map-cone f g c))
- ( pair (vertical-map-cone f g c) refl-htpy)
- ( is-contr-total-Eq-structure
- ( λ q H →
- coherence-htpy-cone c
- ( pair (vertical-map-cone f g c) (pair q H))
- ( refl-htpy))
- ( is-contr-total-htpy (horizontal-map-cone f g c))
- ( pair (horizontal-map-cone f g c) refl-htpy)
- ( is-contr-total-htpy (coherence-square-cone f g c ∙h refl-htpy)))
-
- is-equiv-htpy-eq-cone : (c c' : cone f g C) → is-equiv (htpy-eq-cone c c')
- is-equiv-htpy-eq-cone c =
- fundamental-theorem-id (is-contr-total-htpy-cone c) (htpy-eq-cone c)
-
- extensionality-cone : (c c' : cone f g C) → (c = c') ≃ htpy-cone c c'
- pr1 (extensionality-cone c c') = htpy-eq-cone c c'
- pr2 (extensionality-cone c c') = is-equiv-htpy-eq-cone c c'
-
- eq-htpy-cone : (c c' : cone f g C) → htpy-cone c c' → (c = c')
- eq-htpy-cone c c' = map-inv-equiv (extensionality-cone c c')
-```
-
-### Precomposing cones
-
-```agda
-module _
- {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
- (f : A → X) (g : B → X)
- where
-
- cone-map :
- {l4 l5 : Level} {C : UU l4} {C' : UU l5} →
- cone f g C → (C' → C) → cone f g C'
- pr1 (cone-map c h) = vertical-map-cone f g c ∘ h
- pr1 (pr2 (cone-map c h)) = horizontal-map-cone f g c ∘ h
- pr2 (pr2 (cone-map c h)) = coherence-square-cone f g c ·r h
-```
-
-### Pasting cones horizontally
-
-```agda
-module _
- {l1 l2 l3 l4 l5 l6 : Level}
- {A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4} {Y : UU l5} {Z : UU l6}
- (i : X → Y) (j : Y → Z) (h : C → Z)
- where
-
- pasting-horizontal-cone :
- (c : cone j h B) → cone i (vertical-map-cone j h c) A → cone (j ∘ i) h A
- pr1 (pasting-horizontal-cone c (pair f (pair p H))) = f
- pr1 (pr2 (pasting-horizontal-cone c (pair f (pair p H)))) =
- (horizontal-map-cone j h c) ∘ p
- pr2 (pr2 (pasting-horizontal-cone c (pair f (pair p H)))) =
- pasting-horizontal-coherence-square-maps p
- ( horizontal-map-cone j h c)
- ( f)
- ( vertical-map-cone j h c)
- ( h)
- ( i)
- ( j)
- ( H)
- ( coherence-square-cone j h c)
-```
-
-### Vertical composition of cones
-
-```agda
-module _
- {l1 l2 l3 l4 l5 l6 : Level}
- {A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4} {Y : UU l5} {Z : UU l6}
- (f : C → Z) (g : Y → Z) (h : X → Y)
- where
-
- pasting-vertical-cone :
- (c : cone f g B) → cone (horizontal-map-cone f g c) h A → cone f (g ∘ h) A
- pr1 (pasting-vertical-cone c (pair p' (pair q' H'))) =
- ( vertical-map-cone f g c) ∘ p'
- pr1 (pr2 (pasting-vertical-cone c (pair p' (pair q' H')))) = q'
- pr2 (pr2 (pasting-vertical-cone c (pair p' (pair q' H')))) =
- pasting-vertical-coherence-square-maps q' p' h
- ( horizontal-map-cone f g c)
- ( vertical-map-cone f g c)
- ( g)
- ( f)
- ( H')
- ( coherence-square-cone f g c)
-```
-
-### The swapping function on cones
-
-```agda
-swap-cone :
- {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3} {C : UU l4}
- (f : A → X) (g : B → X) → cone f g C → cone g f C
-pr1 (swap-cone f g c) = horizontal-map-cone f g c
-pr1 (pr2 (swap-cone f g c)) = vertical-map-cone f g c
-pr2 (pr2 (swap-cone f g c)) = inv-htpy (coherence-square-cone f g c)
-```
-
-### Parallel cones
-
-```agda
-module _
- {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
- {f f' : A → X} (Hf : f ~ f') {g g' : B → X} (Hg : g ~ g')
- where
-
- coherence-htpy-parallel-cone :
- {l4 : Level} {C : UU l4} (c : cone f g C) (c' : cone f' g' C)
- (Hp : vertical-map-cone f g c ~ vertical-map-cone f' g' c')
- (Hq : horizontal-map-cone f g c ~ horizontal-map-cone f' g' c') →
- UU (l3 ⊔ l4)
- coherence-htpy-parallel-cone c c' Hp Hq =
- ( ( coherence-square-cone f g c) ∙h
- ( (g ·l Hq) ∙h (Hg ·r horizontal-map-cone f' g' c'))) ~
- ( ( (f ·l Hp) ∙h (Hf ·r (vertical-map-cone f' g' c'))) ∙h
- ( coherence-square-cone f' g' c'))
-
- fam-htpy-parallel-cone :
- {l4 : Level} {C : UU l4} (c : cone f g C) → (c' : cone f' g' C) →
- (vertical-map-cone f g c ~ vertical-map-cone f' g' c') → UU (l2 ⊔ l3 ⊔ l4)
- fam-htpy-parallel-cone c c' Hp =
- Σ ( horizontal-map-cone f g c ~ horizontal-map-cone f' g' c')
- ( coherence-htpy-parallel-cone c c' Hp)
-
- htpy-parallel-cone :
- {l4 : Level} {C : UU l4} →
- cone f g C → cone f' g' C → UU (l1 ⊔ l2 ⊔ l3 ⊔ l4)
- htpy-parallel-cone c c' =
- Σ ( vertical-map-cone f g c ~ vertical-map-cone f' g' c')
- ( fam-htpy-parallel-cone c c')
-```
diff --git a/src/foundation-core/constant-maps.lagda.md b/src/foundation-core/constant-maps.lagda.md
index 7dc391726e..6064a63519 100644
--- a/src/foundation-core/constant-maps.lagda.md
+++ b/src/foundation-core/constant-maps.lagda.md
@@ -9,7 +9,7 @@ module foundation-core.constant-maps where
Imports
```agda
-open import foundation-core.universe-levels
+open import foundation.universe-levels
```
diff --git a/src/foundation-core/contractible-maps.lagda.md b/src/foundation-core/contractible-maps.lagda.md
index 7c85b3b8c1..88ad0fb7b5 100644
--- a/src/foundation-core/contractible-maps.lagda.md
+++ b/src/foundation-core/contractible-maps.lagda.md
@@ -7,15 +7,16 @@ module foundation-core.contractible-maps where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.coherently-invertible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/contractible-types.lagda.md b/src/foundation-core/contractible-types.lagda.md
index ecb4d32bea..dbaf3b5341 100644
--- a/src/foundation-core/contractible-types.lagda.md
+++ b/src/foundation-core/contractible-types.lagda.md
@@ -7,16 +7,16 @@ module foundation-core.contractible-types where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.equality-cartesian-product-types
open import foundation.function-extensionality
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.equality-cartesian-product-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.identity-types
open import foundation-core.retractions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/coproduct-types.lagda.md b/src/foundation-core/coproduct-types.lagda.md
index 79239a1a9a..a13e3d222c 100644
--- a/src/foundation-core/coproduct-types.lagda.md
+++ b/src/foundation-core/coproduct-types.lagda.md
@@ -9,7 +9,7 @@ module foundation-core.coproduct-types where
Imports
```agda
-open import foundation-core.universe-levels
+open import foundation.universe-levels
```
diff --git a/src/foundation-core/cospans.lagda.md b/src/foundation-core/cospans.lagda.md
deleted file mode 100644
index b76928faf0..0000000000
--- a/src/foundation-core/cospans.lagda.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Cospans
-
-```agda
-{-# OPTIONS --safe #-}
-
-module foundation-core.cospans where
-```
-
-Imports
-
-```agda
-open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.universe-levels
-```
-
-
-
-## Definition
-
-### Cospans
-
-A cospan is a pair of functions with a common codomain
-
-```agda
-cospan :
- {l1 l2 : Level} (l : Level) (A : UU l1) (B : UU l2) →
- UU (l1 ⊔ l2 ⊔ lsuc l)
-cospan l A B =
- Σ (UU l) (λ X → (A → X) × (B → X))
-```
diff --git a/src/foundation-core/decidable-propositions.lagda.md b/src/foundation-core/decidable-propositions.lagda.md
index 07ce742e58..6353e975dc 100644
--- a/src/foundation-core/decidable-propositions.lagda.md
+++ b/src/foundation-core/decidable-propositions.lagda.md
@@ -9,19 +9,19 @@ module foundation-core.decidable-propositions where
```agda
open import foundation.coproduct-types
open import foundation.decidable-types
+open import foundation.dependent-pair-types
open import foundation.double-negation
+open import foundation.functions
open import foundation.negation
open import foundation.propositional-truncations
open import foundation.unit-type
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.propositions
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/dependent-pair-types.lagda.md b/src/foundation-core/dependent-pair-types.lagda.md
deleted file mode 100644
index c70191de41..0000000000
--- a/src/foundation-core/dependent-pair-types.lagda.md
+++ /dev/null
@@ -1,78 +0,0 @@
-# Dependent pair types
-
-```agda
-{-# OPTIONS --safe #-}
-
-module foundation-core.dependent-pair-types where
-```
-
-Imports
-
-```agda
-open import foundation-core.universe-levels
-```
-
-
-
-## Idea
-
-When `B` is a family of types over `A`, then we can form the type of pairs
-`pair a b` consisting of an element `a : A` and an element `b : B a`. Such pairs
-are called dependent pairs, since the type of the second component depends on
-the first component.
-
-## Definition
-
-```agda
-record Σ {l1 l2 : Level} (A : UU l1) (B : A → UU l2) : UU (l1 ⊔ l2) where
- constructor pair
- field
- pr1 : A
- pr2 : B pr1
-
-open Σ public
-
-{-# BUILTIN SIGMA Σ #-}
-
-infixr 10 _,_
-pattern _,_ a b = pair a b
-```
-
-## Constructions
-
-```agda
-ind-Σ :
- {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : Σ A B → UU l3} →
- ((x : A) (y : B x) → C (pair x y)) → ((t : Σ A B) → C t)
-ind-Σ f (pair x y) = f x y
-
-ev-pair :
- {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : Σ A B → UU l3} →
- ((t : Σ A B) → C t) → (x : A) (y : B x) → C (pair x y)
-ev-pair f x y = f (pair x y)
-
-triple :
- {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : (x : A) → B x → UU l3} →
- (a : A) (b : B a) → C a b → Σ A (λ x → Σ (B x) (C x))
-pr1 (triple a b c) = a
-pr1 (pr2 (triple a b c)) = b
-pr2 (pr2 (triple a b c)) = c
-
-triple' :
- {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : Σ A B → UU l3} →
- (a : A) (b : B a) → C (pair a b) → Σ (Σ A B) C
-pr1 (pr1 (triple' a b c)) = a
-pr2 (pr1 (triple' a b c)) = b
-pr2 (triple' a b c) = c
-```
-
-### Families on dependent pair types
-
-```agda
-module _
- {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2}
- where
-
- fam-Σ : ((x : A) → B x → UU l3) → Σ A B → UU l3
- fam-Σ C (pair x y) = C x y
-```
diff --git a/src/foundation-core/diagonal-maps-of-types.lagda.md b/src/foundation-core/diagonal-maps-of-types.lagda.md
index 09d2962f2f..5f336318b6 100644
--- a/src/foundation-core/diagonal-maps-of-types.lagda.md
+++ b/src/foundation-core/diagonal-maps-of-types.lagda.md
@@ -7,16 +7,17 @@ module foundation-core.diagonal-maps-of-types where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.equality-cartesian-product-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.equality-cartesian-product-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/discrete-types.lagda.md b/src/foundation-core/discrete-types.lagda.md
index b1826189ee..bd922b360f 100644
--- a/src/foundation-core/discrete-types.lagda.md
+++ b/src/foundation-core/discrete-types.lagda.md
@@ -8,10 +8,10 @@ module foundation-core.discrete-types where
```agda
open import foundation.decidable-equality
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.sets
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/embeddings.lagda.md b/src/foundation-core/embeddings.lagda.md
index be4a3b17ed..ea6a233ec3 100644
--- a/src/foundation-core/embeddings.lagda.md
+++ b/src/foundation-core/embeddings.lagda.md
@@ -9,11 +9,12 @@ module foundation-core.embeddings where
Imports
```agda
-open import foundation-core.dependent-pair-types
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/empty-types.lagda.md b/src/foundation-core/empty-types.lagda.md
index ca74a7cb45..5a2c12bd60 100644
--- a/src/foundation-core/empty-types.lagda.md
+++ b/src/foundation-core/empty-types.lagda.md
@@ -7,16 +7,16 @@ module foundation-core.empty-types where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.propositions
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.sets
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/endomorphisms.lagda.md b/src/foundation-core/endomorphisms.lagda.md
index 73e94109fb..c7cdc965b5 100644
--- a/src/foundation-core/endomorphisms.lagda.md
+++ b/src/foundation-core/endomorphisms.lagda.md
@@ -7,13 +7,13 @@ module foundation-core.endomorphisms where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.sets
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
open import structured-types.pointed-types
```
diff --git a/src/foundation-core/equality-cartesian-product-types.lagda.md b/src/foundation-core/equality-cartesian-product-types.lagda.md
deleted file mode 100644
index c6f6fafe1c..0000000000
--- a/src/foundation-core/equality-cartesian-product-types.lagda.md
+++ /dev/null
@@ -1,147 +0,0 @@
-# Equality of cartesian product types
-
-```agda
-{-# OPTIONS --safe #-}
-
-module foundation-core.equality-cartesian-product-types where
-```
-
-Imports
-
-```agda
-open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.equivalences
-open import foundation-core.functions
-open import foundation-core.homotopies
-open import foundation-core.identity-types
-open import foundation-core.universe-levels
-```
-
-
-
-## Idea
-
-Identifications `Id (pair x y) (pair x' y')` in a cartesian product are
-equivalently described as pairs of identifications `Id x x'` and `Id y y'`. This
-provides us with a characterization of the identity type of cartesian product
-types.
-
-## Definition
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2}
- where
-
- Eq-prod : (s t : A × B) → UU (l1 ⊔ l2)
- Eq-prod s t = ((pr1 s) = (pr1 t)) × ((pr2 s) = (pr2 t))
-```
-
-## Properties
-
-### The type `Eq-prod s t` is equivalent to `Id s t`
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2}
- where
-
- eq-pair' : {s t : A × B} → Eq-prod s t → s = t
- eq-pair' {pair x y} {pair .x .y} (pair refl refl) = refl
-
- eq-pair :
- {s t : A × B} → (pr1 s) = (pr1 t) → (pr2 s) = (pr2 t) → s = t
- eq-pair p q = eq-pair' (pair p q)
-
- pair-eq : {s t : A × B} → s = t → Eq-prod s t
- pr1 (pair-eq α) = ap pr1 α
- pr2 (pair-eq α) = ap pr2 α
-
- isretr-pair-eq :
- {s t : A × B} → ((pair-eq {s} {t}) ∘ (eq-pair' {s} {t})) ~ id
- isretr-pair-eq {pair x y} {pair .x .y} (pair refl refl) = refl
-
- issec-pair-eq :
- {s t : A × B} → ((eq-pair' {s} {t}) ∘ (pair-eq {s} {t})) ~ id
- issec-pair-eq {pair x y} {pair .x .y} refl = refl
-
- abstract
- is-equiv-eq-pair :
- (s t : A × B) → is-equiv (eq-pair' {s} {t})
- is-equiv-eq-pair s t =
- is-equiv-has-inverse pair-eq issec-pair-eq isretr-pair-eq
-
- equiv-eq-pair :
- (s t : A × B) → Eq-prod s t ≃ (s = t)
- pr1 (equiv-eq-pair s t) = eq-pair'
- pr2 (equiv-eq-pair s t) = is-equiv-eq-pair s t
-
- abstract
- is-equiv-pair-eq :
- (s t : A × B) → is-equiv (pair-eq {s} {t})
- is-equiv-pair-eq s t =
- is-equiv-has-inverse eq-pair' isretr-pair-eq issec-pair-eq
-
- equiv-pair-eq :
- (s t : A × B) → (s = t) ≃ Eq-prod s t
- pr1 (equiv-pair-eq s t) = pair-eq
- pr2 (equiv-pair-eq s t) = is-equiv-pair-eq s t
-```
-
-## Properties
-
-### Commuting triangles for `eq-pair`
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2}
- where
-
- triangle-eq-pair :
- {a0 a1 : A} {b0 b1 : B} (p : a0 = a1) (q : b0 = b1) →
- eq-pair p q = ((eq-pair p refl) ∙ (eq-pair refl q))
- triangle-eq-pair refl refl = refl
-
- triangle-eq-pair' :
- {a0 a1 : A} {b0 b1 : B} (p : a0 = a1) (q : b0 = b1) →
- eq-pair p q = ((eq-pair refl q) ∙ (eq-pair p refl))
- triangle-eq-pair' refl refl = refl
-```
-
-### `eq-pair` preserves concatenation
-
-```agda
-eq-pair-concat :
- {l1 l2 : Level} {A : UU l1} {B : UU l2} {x x' x'' : A} {y y' y'' : B}
- (p : x = x') (p' : x' = x'') (q : y = y') (q' : y' = y'') →
- ( eq-pair {s = pair x y} {t = pair x'' y''} (p ∙ p') (q ∙ q')) =
- ( ( eq-pair {s = pair x y} {t = pair x' y'} p q) ∙
- ( eq-pair p' q'))
-eq-pair-concat refl p' refl q' = refl
-```
-
-### `eq-pair` computes in the expected way when the action on paths of the projections is applies
-
-```agda
-ap-pr1-eq-pair :
- {l1 l2 : Level} {A : UU l1} {B : UU l2}
- {x x' : A} (p : x = x') {y y' : B} (q : y = y') →
- ap pr1 (eq-pair {s = pair x y} {pair x' y'} p q) = p
-ap-pr1-eq-pair refl refl = refl
-
-ap-pr2-eq-pair :
- {l1 l2 : Level} {A : UU l1} {B : UU l2}
- {x x' : A} (p : x = x') {y y' : B} (q : y = y') →
- ap pr2 (eq-pair {s = pair x y} {pair x' y'} p q) = q
-ap-pr2-eq-pair refl refl = refl
-```
-
-## See also
-
-- Equality proofs in dependent pair types are characterized in
- [`foundation.equality-dependent-pair-types`](foundation.equality-dependent-pair-types.md).
-- Equality proofs in dependent product types are characterized in
- [`foundation.equality-dependent-function-types`](foundation.equality-dependent-function-types.md).
-- Equality proofs in coproduct types are characterized in
- [`foundation.equality-coproduct-types`](foundation.equality-coproduct-types.md).
diff --git a/src/foundation-core/equality-dependent-pair-types.lagda.md b/src/foundation-core/equality-dependent-pair-types.lagda.md
index 59e8fcdf27..9b9559087e 100644
--- a/src/foundation-core/equality-dependent-pair-types.lagda.md
+++ b/src/foundation-core/equality-dependent-pair-types.lagda.md
@@ -9,12 +9,13 @@ module foundation-core.equality-dependent-pair-types where
Imports
```agda
-open import foundation-core.dependent-pair-types
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/equality-fibers-of-maps.lagda.md b/src/foundation-core/equality-fibers-of-maps.lagda.md
deleted file mode 100644
index 8c564a0889..0000000000
--- a/src/foundation-core/equality-fibers-of-maps.lagda.md
+++ /dev/null
@@ -1,120 +0,0 @@
-# Equality in the fibers of a map
-
-```agda
-module foundation-core.equality-fibers-of-maps where
-```
-
-Imports
-
-```agda
-open import foundation.identity-types
-
-open import foundation-core.dependent-pair-types
-open import foundation-core.equality-dependent-pair-types
-open import foundation-core.equivalences
-open import foundation-core.fibers-of-maps
-open import foundation-core.functions
-open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.homotopies
-open import foundation-core.universe-levels
-```
-
-
-
-## Idea
-
-In the file
-[`foundation-core.fibers-of-maps`](foundation-core.fibers-of-maps.md) we already
-gave one characterization of the identity type of `fib f b`, for an arbitrary
-map `f : A → B`. Here we give a second characterization, using the fibers of the
-action on identifications of `f`.
-
-## Theorem
-
-For any map `f : A → B` any `b : B` and any `x y : fib f b`, there is an
-equivalence
-
-```text
-(x = y) ≃ fib (ap f) ((pr2 x) ∙ (inv (pr2 y)))
-```
-
-### Proof
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) {b : B}
- where
-
- fib-ap-eq-fib-fiberwise :
- (s t : fib f b) (p : (pr1 s) = (pr1 t)) →
- ((tr (λ (a : A) → (f a) = b) p (pr2 s)) = (pr2 t)) →
- (ap f p = ((pr2 s) ∙ (inv (pr2 t))))
- fib-ap-eq-fib-fiberwise (pair .x' p) (pair x' refl) refl =
- inv ∘ (concat right-unit refl)
-
- abstract
- is-fiberwise-equiv-fib-ap-eq-fib-fiberwise :
- (s t : fib f b) → is-fiberwise-equiv (fib-ap-eq-fib-fiberwise s t)
- is-fiberwise-equiv-fib-ap-eq-fib-fiberwise (pair x y) (pair .x refl) refl =
- is-equiv-comp
- ( inv)
- ( concat right-unit refl)
- ( is-equiv-concat right-unit refl)
- ( is-equiv-inv (y ∙ refl) refl)
-
- fib-ap-eq-fib :
- (s t : fib f b) → s = t →
- fib (ap f {x = pr1 s} {y = pr1 t}) ((pr2 s) ∙ (inv (pr2 t)))
- pr1 (fib-ap-eq-fib s .s refl) = refl
- pr2 (fib-ap-eq-fib s .s refl) = inv (right-inv (pr2 s))
-
- triangle-fib-ap-eq-fib :
- (s t : fib f b) →
- ( fib-ap-eq-fib s t) ~
- ( (tot (fib-ap-eq-fib-fiberwise s t)) ∘ (pair-eq-Σ {s = s} {t}))
- triangle-fib-ap-eq-fib (pair x refl) .(pair x refl) refl = refl
-
- abstract
- is-equiv-fib-ap-eq-fib : (s t : fib f b) → is-equiv (fib-ap-eq-fib s t)
- is-equiv-fib-ap-eq-fib s t =
- is-equiv-comp-htpy
- ( fib-ap-eq-fib s t)
- ( tot (fib-ap-eq-fib-fiberwise s t))
- ( pair-eq-Σ {s = s} {t})
- ( triangle-fib-ap-eq-fib s t)
- ( is-equiv-pair-eq-Σ s t)
- ( is-equiv-tot-is-fiberwise-equiv
- ( is-fiberwise-equiv-fib-ap-eq-fib-fiberwise s t))
-
- equiv-fib-ap-eq-fib :
- (s t : fib f b) →
- (s = t) ≃ fib (ap f {x = pr1 s} {y = pr1 t}) ((pr2 s) ∙ (inv (pr2 t)))
- pr1 (equiv-fib-ap-eq-fib s t) = fib-ap-eq-fib s t
- pr2 (equiv-fib-ap-eq-fib s t) = is-equiv-fib-ap-eq-fib s t
-
-module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) (x y : A)
- where
-
- eq-fib-fib-ap :
- (q : f x = f y) → (pair x q) = (pair y refl) → fib (ap f {x} {y}) q
- eq-fib-fib-ap q =
- (tr (fib (ap f)) right-unit) ∘ (fib-ap-eq-fib f (pair x q) (pair y refl))
-
- abstract
- is-equiv-eq-fib-fib-ap :
- (q : (f x) = (f y)) → is-equiv (eq-fib-fib-ap q)
- is-equiv-eq-fib-fib-ap q =
- is-equiv-comp
- ( tr (fib (ap f)) right-unit)
- ( fib-ap-eq-fib f (pair x q) (pair y refl))
- ( is-equiv-fib-ap-eq-fib f (pair x q) (pair y refl))
- ( is-equiv-tr (fib (ap f)) right-unit)
-```
-
-## See also
-
-- Equality proofs in dependent pair types are characterized in
- [`foundation.equality-dependent-pair-types`](foundation.equality-dependent-pair-types.md).
-- Equality proofs in dependent function types are characterized in
- [`foundation.equality-dependent-function-types`](foundation.equality-dependent-function-types.md).
diff --git a/src/foundation-core/equivalence-induction.lagda.md b/src/foundation-core/equivalence-induction.lagda.md
index 1275f83308..62ed07fccd 100644
--- a/src/foundation-core/equivalence-induction.lagda.md
+++ b/src/foundation-core/equivalence-induction.lagda.md
@@ -7,15 +7,16 @@ module foundation-core.equivalence-induction where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.sections
open import foundation-core.singleton-induction
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/equivalence-relations.lagda.md b/src/foundation-core/equivalence-relations.lagda.md
index 26eaae930f..86509c34bf 100644
--- a/src/foundation-core/equivalence-relations.lagda.md
+++ b/src/foundation-core/equivalence-relations.lagda.md
@@ -8,16 +8,16 @@ module foundation-core.equivalence-relations where
```agda
open import foundation.binary-relations
+open import foundation.dependent-pair-types
open import foundation.inhabited-subtypes
open import foundation.propositional-truncations
open import foundation.unit-type
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.logical-equivalences
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/equivalences.lagda.md b/src/foundation-core/equivalences.lagda.md
index f804227979..523f00b928 100644
--- a/src/foundation-core/equivalences.lagda.md
+++ b/src/foundation-core/equivalences.lagda.md
@@ -9,15 +9,16 @@ module foundation-core.equivalences where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.cartesian-product-types
open import foundation-core.coherently-invertible-maps
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.retractions
open import foundation-core.sections
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/faithful-maps.lagda.md b/src/foundation-core/faithful-maps.lagda.md
deleted file mode 100644
index a4df7cbb1b..0000000000
--- a/src/foundation-core/faithful-maps.lagda.md
+++ /dev/null
@@ -1,260 +0,0 @@
-# Faithful maps
-
-```agda
-module foundation-core.faithful-maps where
-```
-
-Imports
-
-```agda
-open import foundation-core.0-maps
-open import foundation-core.dependent-pair-types
-open import foundation-core.embeddings
-open import foundation-core.equivalences
-open import foundation-core.functions
-open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.homotopies
-open import foundation-core.identity-types
-open import foundation-core.propositional-maps
-open import foundation-core.sets
-open import foundation-core.truncated-maps
-open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
-```
-
-
-
-## Idea
-
-Since we sometimes think of types as ∞-groupoids, with the groupoid structure
-provided implicitly by the identity type and its induction principle, we can
-think of maps as functors of ∞-groupoids. We borrow some terminology of
-functors, and call a map faithful if it induces embeddings on identity types.
-
-## Definition
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2}
- where
-
- is-faithful : (A → B) → UU (l1 ⊔ l2)
- is-faithful f = (x y : A) → is-emb (ap f {x} {y})
-
-faithful-map : {l1 l2 : Level} → UU l1 → UU l2 → UU (l1 ⊔ l2)
-faithful-map A B = Σ (A → B) is-faithful
-
-module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2}
- where
-
- map-faithful-map : faithful-map A B → A → B
- map-faithful-map = pr1
-
- is-faithful-map-faithful-map :
- (f : faithful-map A B) → is-faithful (map-faithful-map f)
- is-faithful-map-faithful-map = pr2
-
- emb-ap-faithful-map :
- (f : faithful-map A B) {x y : A} →
- (x = y) ↪ (map-faithful-map f x = map-faithful-map f y)
- pr1 (emb-ap-faithful-map f {x} {y}) = ap (map-faithful-map f)
- pr2 (emb-ap-faithful-map f {x} {y}) = is-faithful-map-faithful-map f x y
-
- is-faithful-is-emb : {f : A → B} → is-emb f → is-faithful f
- is-faithful-is-emb {f} H x y = is-emb-is-equiv (H x y)
-
- faithful-map-emb : (A ↪ B) → faithful-map A B
- pr1 (faithful-map-emb f) = map-emb f
- pr2 (faithful-map-emb f) = is-faithful-is-emb (is-emb-map-emb f)
-
- is-faithful-is-equiv : {f : A → B} → is-equiv f → is-faithful f
- is-faithful-is-equiv H = is-faithful-is-emb (is-emb-is-equiv H)
-
- faithful-map-equiv : (A ≃ B) → faithful-map A B
- pr1 (faithful-map-equiv e) = map-equiv e
- pr2 (faithful-map-equiv e) = is-faithful-is-equiv (is-equiv-map-equiv e)
-
- emb-ap : (f : A ↪ B) (x y : A) → (x = y) ↪ (map-emb f x = map-emb f y)
- pr1 (emb-ap f x y) = ap (map-emb f) {x} {y}
- pr2 (emb-ap f x y) = is-faithful-is-emb (is-emb-map-emb f) x y
-```
-
-## Examples
-
-### The identity map is faithful
-
-```agda
-module _
- {l : Level} {A : UU l}
- where
-
- id-faithful-map : faithful-map A A
- id-faithful-map = faithful-map-emb id-emb
-
- is-faithful-id-faithful-map : is-faithful (id {A = A})
- is-faithful-id-faithful-map = is-faithful-map-faithful-map id-faithful-map
-```
-
-### Any `0`-map is faithful
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B}
- where
-
- is-0-map-is-faithful : is-faithful f → is-0-map f
- is-0-map-is-faithful H =
- is-trunc-map-is-trunc-map-ap neg-one-𝕋 f
- ( λ x y → is-prop-map-is-emb (H x y))
-
- is-faithful-is-0-map : is-0-map f → is-faithful f
- is-faithful-is-0-map H x y =
- is-emb-is-prop-map (is-trunc-map-ap-is-trunc-map neg-one-𝕋 f H x y)
-```
-
-## Properties
-
-### The projection map of a family of sets is faithful
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1}
- where
-
- abstract
- is-faithful-pr1 :
- {B : A → UU l2} → ((x : A) → is-set (B x)) → is-faithful (pr1 {B = B})
- is-faithful-pr1 H = is-faithful-is-0-map (is-0-map-pr1 H)
-
- pr1-faithful-map :
- (B : A → Set l2) → faithful-map (Σ A (λ x → type-Set (B x))) A
- pr1 (pr1-faithful-map B) = pr1
- pr2 (pr1-faithful-map B) = is-faithful-pr1 (λ x → is-set-type-Set (B x))
-```
-
-### Faithful maps are closed under homotopies
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2} {f g : A → B} (H : f ~ g)
- where
-
- abstract
- is-faithful-htpy : is-faithful g → is-faithful f
- is-faithful-htpy K =
- is-faithful-is-0-map (is-0-map-htpy H (is-0-map-is-faithful K))
-```
-
-### Faithful maps are closed under composition
-
-```agda
-module _
- {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
- where
-
- abstract
- is-faithful-comp :
- (g : B → X) (h : A → B) →
- is-faithful g → is-faithful h → is-faithful (g ∘ h)
- is-faithful-comp g h is-faithful-g is-faithful-h =
- is-faithful-is-0-map
- ( is-0-map-comp g h
- ( is-0-map-is-faithful is-faithful-g)
- ( is-0-map-is-faithful is-faithful-h))
-
- abstract
- is-faithful-comp-htpy :
- (f : A → X) (g : B → X) (h : A → B) (H : f ~ (g ∘ h)) →
- is-faithful g → is-faithful h → is-faithful f
- is-faithful-comp-htpy f g h H is-faithful-g is-faithful-h =
- is-faithful-is-0-map
- ( is-0-map-comp-htpy f g h H
- ( is-0-map-is-faithful is-faithful-g)
- ( is-0-map-is-faithful is-faithful-h))
-```
-
-### If a composite is faithful, then its right factor is faithful
-
-```agda
-module _
- {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
- where
-
- is-faithful-right-factor :
- (g : B → X) (h : A → B) →
- is-faithful g → is-faithful (g ∘ h) → is-faithful h
- is-faithful-right-factor g h is-faithful-g is-faithful-gh =
- is-faithful-is-0-map
- ( is-0-map-right-factor g h
- ( is-0-map-is-faithful is-faithful-g)
- ( is-0-map-is-faithful is-faithful-gh))
-
- is-faithful-right-factor-htpy :
- (f : A → X) (g : B → X) (h : A → B) (H : f ~ (g ∘ h)) →
- is-faithful g → is-faithful f → is-faithful h
- is-faithful-right-factor-htpy f g h H is-faithful-g is-faithful-f =
- is-faithful-is-0-map
- ( is-0-map-right-factor-htpy f g h H
- ( is-0-map-is-faithful is-faithful-g)
- ( is-0-map-is-faithful is-faithful-f))
-```
-
-### The map on total spaces induced by a family of truncated maps is truncated
-
-```agda
-module _
- {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : A → UU l3}
- {f : (x : A) → B x → C x}
- where
-
- is-faithful-tot : ((x : A) → is-faithful (f x)) → is-faithful (tot f)
- is-faithful-tot H =
- is-faithful-is-0-map (is-0-map-tot (λ x → is-0-map-is-faithful (H x)))
-
-module _
- {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : A → UU l3}
- where
-
- tot-faithful-map :
- ((x : A) → faithful-map (B x) (C x)) → faithful-map (Σ A B) (Σ A C)
- pr1 (tot-faithful-map f) = tot (λ x → map-faithful-map (f x))
- pr2 (tot-faithful-map f) =
- is-faithful-tot (λ x → is-faithful-map-faithful-map (f x))
-
-module _
- {l1 l2 l3 : Level} {A : UU l1} {B : UU l2}
- where
-
- module _
- {f : A → B} (C : B → UU l3)
- where
-
- abstract
- is-faithful-map-Σ-map-base :
- is-faithful f → is-faithful (map-Σ-map-base f C)
- is-faithful-map-Σ-map-base H =
- is-faithful-is-0-map
- ( is-0-map-map-Σ-map-base C (is-0-map-is-faithful H))
-
- faithful-map-Σ-faithful-map-base :
- (f : faithful-map A B) (C : B → UU l3) →
- faithful-map (Σ A (λ a → C (map-faithful-map f a))) (Σ B C)
- pr1 (faithful-map-Σ-faithful-map-base f C) =
- map-Σ-map-base (map-faithful-map f) C
- pr2 (faithful-map-Σ-faithful-map-base f C) =
- is-faithful-map-Σ-map-base C (is-faithful-map-faithful-map f)
-
-module _
- {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {C : A → UU l3}
- (D : B → UU l4) {f : A → B} {g : (x : A) → C x → D (f x)}
- where
-
- is-faithful-map-Σ :
- is-faithful f → ((x : A) → is-faithful (g x)) → is-faithful (map-Σ D f g)
- is-faithful-map-Σ H K =
- is-faithful-is-0-map
- ( is-0-map-map-Σ D
- ( is-0-map-is-faithful H)
- ( λ x → is-0-map-is-faithful (K x)))
-```
diff --git a/src/foundation-core/fibers-of-maps.lagda.md b/src/foundation-core/fibers-of-maps.lagda.md
index 485674a254..5022b6a2b0 100644
--- a/src/foundation-core/fibers-of-maps.lagda.md
+++ b/src/foundation-core/fibers-of-maps.lagda.md
@@ -7,14 +7,14 @@ module foundation-core.fibers-of-maps where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/function-extensionality.lagda.md b/src/foundation-core/function-extensionality.lagda.md
index 7f19112c2b..c8a73a4d36 100644
--- a/src/foundation-core/function-extensionality.lagda.md
+++ b/src/foundation-core/function-extensionality.lagda.md
@@ -9,11 +9,12 @@ module foundation-core.function-extensionality where
Imports
```agda
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/functions.lagda.md b/src/foundation-core/functions.lagda.md
deleted file mode 100644
index b2cf903e9d..0000000000
--- a/src/foundation-core/functions.lagda.md
+++ /dev/null
@@ -1,87 +0,0 @@
-# Functions
-
-```agda
-{-# OPTIONS --safe #-}
-
-module foundation-core.functions where
-```
-
-Imports
-
-```agda
-open import foundation-core.universe-levels
-```
-
-
-
-## Idea
-
-Functions are primitive in Agda. Here we construct some basic functions
-
-## Examples
-
-### The identity function
-
-```agda
-id : {l : Level} {A : UU l} → A → A
-id a = a
-
-idω : {A : UUω} → A → A
-idω a = a
-```
-
-### Dependent composition of functions
-
-```agda
-_∘_ :
- {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : (a : A) → B a → UU l3} →
- ({a : A} → (b : B a) → C a b) → (f : (a : A) → B a) → (a : A) → C a (f a)
-(g ∘ f) a = g (f a)
-```
-
-### Evaluation at a point
-
-```agda
-ev-point :
- {l1 l2 : Level} {A : UU l1} (a : A) {P : A → UU l2} → ((x : A) → P x) → P a
-ev-point a f = f a
-
-ev-point' :
- {l1 l2 : Level} {A : UU l1} (a : A) {X : UU l2} → (A → X) → X
-ev-point' a f = f a
-```
-
-### Precomposition functions
-
-```agda
-precomp-Π :
- {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} (f : A → B) (C : B → UU l3) →
- ((b : B) → C b) → ((a : A) → C (f a))
-precomp-Π f C h a = h (f a)
-
-precomp :
- {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} (f : A → B) (C : UU l3) →
- (B → C) → (A → C)
-precomp f C = precomp-Π f (λ b → C)
-```
-
-### Postcomposition functions
-
-```agda
-postcomp :
- {l1 l2 l3 : Level} {X : UU l1} {Y : UU l2} (A : UU l3) →
- (X → Y) → (A → X) → (A → Y)
-postcomp A f h = f ∘ h
-
-map-Π :
- {l1 l2 l3 : Level} {I : UU l1} {A : I → UU l2} {B : I → UU l3}
- (f : (i : I) → A i → B i) →
- ((i : I) → A i) → ((i : I) → B i)
-map-Π f h i = f i (h i)
-
-map-Π' :
- {l1 l2 l3 l4 : Level} {I : UU l1} {A : I → UU l2} {B : I → UU l3}
- {J : UU l4} (α : J → I) →
- ((i : I) → A i → B i) → ((j : J) → A (α j)) → ((j : J) → B (α j))
-map-Π' α f = map-Π (λ j → f (α j))
-```
diff --git a/src/foundation-core/functoriality-dependent-function-types.lagda.md b/src/foundation-core/functoriality-dependent-function-types.lagda.md
index 22bc3a9970..a3646b3b63 100644
--- a/src/foundation-core/functoriality-dependent-function-types.lagda.md
+++ b/src/foundation-core/functoriality-dependent-function-types.lagda.md
@@ -7,22 +7,22 @@ module foundation-core.functoriality-dependent-function-types where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.type-theoretic-principle-of-choice
+open import foundation.universe-levels
open import foundation-core.coherently-invertible-maps
open import foundation-core.constant-maps
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.path-split-maps
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/functoriality-dependent-pair-types.lagda.md b/src/foundation-core/functoriality-dependent-pair-types.lagda.md
index ada4ee85c4..0b6007d626 100644
--- a/src/foundation-core/functoriality-dependent-pair-types.lagda.md
+++ b/src/foundation-core/functoriality-dependent-pair-types.lagda.md
@@ -7,16 +7,17 @@ module foundation-core.functoriality-dependent-pair-types where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/functoriality-fibers-of-maps.lagda.md b/src/foundation-core/functoriality-fibers-of-maps.lagda.md
deleted file mode 100644
index 04993cd4a4..0000000000
--- a/src/foundation-core/functoriality-fibers-of-maps.lagda.md
+++ /dev/null
@@ -1,120 +0,0 @@
-# The functoriality of `fib`
-
-```agda
-module foundation-core.functoriality-fibers-of-maps where
-```
-
-Imports
-
-```agda
-open import foundation-core.cones-over-cospans
-open import foundation-core.dependent-pair-types
-open import foundation-core.equality-dependent-pair-types
-open import foundation-core.fibers-of-maps
-open import foundation-core.functions
-open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.homotopies
-open import foundation-core.identity-types
-open import foundation-core.universe-levels
-```
-
-
-
-## Idea
-
-Any commuting square
-
-induces a map between the fibers of the vertical maps
-
-## Definitions
-
-### Any cone induces a family of maps between the fibers of the vertical maps
-
-```agda
-module _
- {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4}
- (f : A → X) (g : B → X) (c : cone f g C)
- where
-
- map-fib-cone : (x : A) → fib (pr1 c) x → fib g (f x)
- pr1 (map-fib-cone x t) = pr1 (pr2 c) (pr1 t)
- pr2 (map-fib-cone x t) = (inv (pr2 (pr2 c) (pr1 t))) ∙ (ap f (pr2 t))
-
-map-fib-cone-id :
- {l1 l2 : Level} {B : UU l1} {X : UU l2} (g : B → X) (x : X) →
- map-fib-cone id g (triple g id refl-htpy) x ~ id
-map-fib-cone-id g .(g b) (pair b refl) =
- refl
-```
-
-## Properties
-
-### Computing `map-fib-cone` of a horizontal pasting of cones
-
-```agda
-module _
- {l1 l2 l3 l4 l5 l6 : Level}
- {A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4} {Y : UU l5} {Z : UU l6}
- (i : X → Y) (j : Y → Z) (h : C → Z)
- where
-
- map-fib-pasting-horizontal-cone :
- (c : cone j h B) (d : cone i (pr1 c) A) → (x : X) →
- ( map-fib-cone (j ∘ i) h (pasting-horizontal-cone i j h c d) x) ~
- ( (map-fib-cone j h c (i x)) ∘ (map-fib-cone i (pr1 c) d x))
- map-fib-pasting-horizontal-cone
- (pair g (pair q K)) (pair f (pair p H)) .(f a) (pair a refl) =
- eq-pair-Σ
- ( refl)
- ( ( ap
- ( concat' (h (q (p a))) refl)
- ( distributive-inv-concat (ap j (H a)) (K (p a)))) ∙
- ( ( assoc (inv (K (p a))) (inv (ap j (H a))) refl) ∙
- ( ap
- ( concat (inv (K (p a))) (j (i (f a))))
- ( ( ap (concat' (j (g (p a))) refl) (inv (ap-inv j (H a)))) ∙
- ( inv (ap-concat j (inv (H a)) refl))))))
-```
-
-### Computing `map-fib-cone` of a horizontal pasting of cones
-
-```agda
-module _
- {l1 l2 l3 l4 l5 l6 : Level}
- {A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4} {Y : UU l5} {Z : UU l6}
- (f : C → Z) (g : Y → Z) (h : X → Y)
- where
-
- map-fib-pasting-vertical-cone :
- (c : cone f g B) (d : cone (pr1 (pr2 c)) h A) (x : C) →
- ( ( map-fib-cone f (g ∘ h) (pasting-vertical-cone f g h c d) x) ∘
- ( inv-map-compute-fib-comp (pr1 c) (pr1 d) x)) ~
- ( ( inv-map-compute-fib-comp g h (f x)) ∘
- ( map-Σ
- ( λ t → fib h (pr1 t))
- ( map-fib-cone f g c x)
- ( λ t → map-fib-cone (pr1 (pr2 c)) h d (pr1 t))))
- map-fib-pasting-vertical-cone
- (pair p (pair q H)) (pair p' (pair q' H')) .(p (p' a))
- (pair (pair .(p' a) refl) (pair a refl)) =
- eq-pair-Σ refl
- ( ( right-unit) ∙
- ( ( distributive-inv-concat (H (p' a)) (ap g (H' a))) ∙
- ( ( ap
- ( concat (inv (ap g (H' a))) (f (p (p' a))))
- ( inv right-unit)) ∙
- ( ap
- ( concat' (g (h (q' a)))
- ( pr2
- ( map-fib-cone f g
- ( triple p q H)
- ( p (p' a))
- ( pair (p' a) refl))))
- ( ( inv (ap-inv g (H' a))) ∙
- ( ap (ap g) (inv right-unit)))))))
-```
-
-## See also
-
-- Equality proofs in the fiber of a map are characterized in
- [`foundation.equality-fibers-of-maps`](foundation.equality-fibers-of-maps.md).
diff --git a/src/foundation-core/functoriality-function-types.lagda.md b/src/foundation-core/functoriality-function-types.lagda.md
index 97a94f7507..9b14fe042c 100644
--- a/src/foundation-core/functoriality-function-types.lagda.md
+++ b/src/foundation-core/functoriality-function-types.lagda.md
@@ -7,16 +7,16 @@ module foundation-core.functoriality-function-types where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
+open import foundation.universe-levels
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/fundamental-theorem-of-identity-types.lagda.md b/src/foundation-core/fundamental-theorem-of-identity-types.lagda.md
deleted file mode 100644
index f9b03ef4be..0000000000
--- a/src/foundation-core/fundamental-theorem-of-identity-types.lagda.md
+++ /dev/null
@@ -1,131 +0,0 @@
-# The fundamental theorem of identity types
-
-```agda
-module foundation-core.fundamental-theorem-of-identity-types where
-```
-
-Imports
-
-```agda
-open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.equivalences
-open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.homotopies
-open import foundation-core.identity-types
-open import foundation-core.retractions
-open import foundation-core.sections
-open import foundation-core.universe-levels
-```
-
-
-
-## Idea
-
-The fundamental theorem of identity type provides a way to characterize identity
-types. It uses the fact that a family of maps `f : (x : A) → a = x → B x` is a
-family of equivalences if and only if it induces an equivalence
-`Σ A (Id a) → Σ A B` on total spaces. Note that the total space `Σ A (Id a)` is
-contractible. Therefore, any map `Σ A (Id a) → Σ A B` is an equivalence if and
-only if `Σ A B` is contractible.
-
-## Theorem
-
-For any family of maps `f : (x : A) → a = x → B x`, the following are
-equivalent:
-
-1. Each `f x` is an equivalence
-2. The total space `Σ A B` is contractible.
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {a : A}
- where
-
- abstract
- fundamental-theorem-id :
- is-contr (Σ A B) → (f : (x : A) → a = x → B x) → is-fiberwise-equiv f
- fundamental-theorem-id is-contr-AB f =
- is-fiberwise-equiv-is-equiv-tot
- ( is-equiv-is-contr (tot f) (is-contr-total-path a) is-contr-AB)
-
- abstract
- fundamental-theorem-id' :
- (f : (x : A) → a = x → B x) → is-fiberwise-equiv f → is-contr (Σ A B)
- fundamental-theorem-id' f is-fiberwise-equiv-f =
- is-contr-is-equiv'
- ( Σ A (Id a))
- ( tot f)
- ( is-equiv-tot-is-fiberwise-equiv is-fiberwise-equiv-f)
- ( is-contr-total-path a)
-```
-
-## Corollaries
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : A → UU l2} (a : A) (b : B a)
- where
-
- abstract
- fundamental-theorem-id-J :
- is-contr (Σ A B) → is-fiberwise-equiv (ind-Id a (λ x p → B x) b)
- fundamental-theorem-id-J is-contr-AB =
- fundamental-theorem-id is-contr-AB (ind-Id a (λ x p → B x) b)
-
- abstract
- fundamental-theorem-id-J' :
- (is-fiberwise-equiv (ind-Id a (λ x p → B x) b)) → is-contr (Σ A B)
- fundamental-theorem-id-J' H =
- is-contr-is-equiv'
- ( Σ A (Id a))
- ( tot (ind-Id a (λ x p → B x) b))
- ( is-equiv-tot-is-fiberwise-equiv H)
- ( is-contr-total-path a)
-```
-
-### Retracts of the identity type are equivalent to the identity type
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : A → UU l2} (a : A)
- where
-
- abstract
- fundamental-theorem-id-retr :
- (i : (x : A) → B x → a = x) → (R : (x : A) → retr (i x)) →
- is-fiberwise-equiv i
- fundamental-theorem-id-retr i R =
- is-fiberwise-equiv-is-equiv-tot
- ( is-equiv-is-contr (tot i)
- ( is-contr-retract-of (Σ _ (λ y → a = y))
- ( pair (tot i)
- ( pair (tot λ x → pr1 (R x))
- ( ( inv-htpy (preserves-comp-tot i (λ x → pr1 (R x)))) ∙h
- ( ( tot-htpy λ x → pr2 (R x)) ∙h (tot-id B)))))
- ( is-contr-total-path a))
- ( is-contr-total-path a))
-```
-
-### The fundamental theorem of identity types, using sections
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : A → UU l2} (a : A)
- where
-
- abstract
- fundamental-theorem-id-sec :
- (f : (x : A) → a = x → B x) → ((x : A) → sec (f x)) →
- is-fiberwise-equiv f
- fundamental-theorem-id-sec f sec-f x =
- is-equiv-sec-is-equiv (f x) (sec-f x) (is-fiberwise-equiv-i x)
- where
- i : (x : A) → B x → a = x
- i = λ x → pr1 (sec-f x)
- retr-i : (x : A) → retr (i x)
- pr1 (retr-i x) = f x
- pr2 (retr-i x) = pr2 (sec-f x)
- is-fiberwise-equiv-i : is-fiberwise-equiv i
- is-fiberwise-equiv-i = fundamental-theorem-id-retr a i retr-i
-```
diff --git a/src/foundation-core/homotopies.lagda.md b/src/foundation-core/homotopies.lagda.md
index 41d884d426..fd7a4fe7ff 100644
--- a/src/foundation-core/homotopies.lagda.md
+++ b/src/foundation-core/homotopies.lagda.md
@@ -9,9 +9,10 @@ module foundation-core.homotopies where
Imports
```agda
-open import foundation-core.functions
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/identity-systems.lagda.md b/src/foundation-core/identity-systems.lagda.md
deleted file mode 100644
index 06ccd2e5b8..0000000000
--- a/src/foundation-core/identity-systems.lagda.md
+++ /dev/null
@@ -1,81 +0,0 @@
-# Identity systems
-
-```agda
-module foundation-core.identity-systems where
-```
-
-Imports
-
-```agda
-open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.equivalences
-open import foundation-core.fundamental-theorem-of-identity-types
-open import foundation-core.identity-types
-open import foundation-core.sections
-open import foundation-core.universe-levels
-```
-
-
-
-## Idea
-
-A unary identity system on a type `A` equipped with a point `a : A` consists of
-a type family `B` over `A` equipped with a point `b : B a` that satisfies an
-induction principle analogous to the induction principle of the identity type at
-`a`.
-
-```agda
-module _
- {l1 l2 : Level} (l : Level) {A : UU l1} (B : A → UU l2) (a : A) (b : B a)
- where
-
- IND-identity-system : UU (l1 ⊔ l2 ⊔ lsuc l)
- IND-identity-system =
- ( P : (x : A) (y : B x) → UU l) →
- sec (λ (h : (x : A) (y : B x) → P x y) → h a b)
-```
-
-## Properties
-
-### A type family over `A` is an identity system if and only if it is equivalent to the identity type
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : A → UU l2} (a : A) (b : B a)
- where
-
- abstract
- Ind-identity-system :
- (is-contr-AB : is-contr (Σ A B)) →
- {l : Level} → IND-identity-system l B a b
- pr1 (Ind-identity-system is-contr-AB P) p x y =
- tr
- ( fam-Σ P)
- ( eq-is-contr is-contr-AB)
- ( p)
- pr2 (Ind-identity-system is-contr-AB P) p =
- ap
- ( λ t → tr (fam-Σ P) t p)
- ( eq-is-contr'
- ( is-prop-is-contr is-contr-AB (pair a b) (pair a b))
- ( eq-is-contr is-contr-AB)
- ( refl))
-
- abstract
- is-contr-total-space-IND-identity-system :
- ({l : Level} → IND-identity-system l B a b) → is-contr (Σ A B)
- pr1 (pr1 (is-contr-total-space-IND-identity-system ind)) = a
- pr2 (pr1 (is-contr-total-space-IND-identity-system ind)) = b
- pr2 (is-contr-total-space-IND-identity-system ind) (pair x y) =
- pr1 (ind (λ x' y' → (pair a b) = (pair x' y'))) refl x y
-
- abstract
- fundamental-theorem-id-IND-identity-system :
- ({l : Level} → IND-identity-system l B a b) →
- (f : (x : A) → a = x → B x) → (x : A) → is-equiv (f x)
- fundamental-theorem-id-IND-identity-system ind f =
- fundamental-theorem-id
- ( is-contr-total-space-IND-identity-system ind)
- ( f)
-```
diff --git a/src/foundation-core/identity-types.lagda.md b/src/foundation-core/identity-types.lagda.md
index c83f7bd483..06d0ba0c06 100644
--- a/src/foundation-core/identity-types.lagda.md
+++ b/src/foundation-core/identity-types.lagda.md
@@ -9,9 +9,10 @@ module foundation-core.identity-types where
Imports
```agda
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.constant-maps
-open import foundation-core.functions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/injective-maps.lagda.md b/src/foundation-core/injective-maps.lagda.md
index 5a5bfe7346..3d5827272a 100644
--- a/src/foundation-core/injective-maps.lagda.md
+++ b/src/foundation-core/injective-maps.lagda.md
@@ -7,18 +7,19 @@ module foundation-core.injective-maps where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.propositional-maps
open import foundation-core.propositions
open import foundation-core.sections
open import foundation-core.sets
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/involutions.lagda.md b/src/foundation-core/involutions.lagda.md
index bff728f691..7b78a45da1 100644
--- a/src/foundation-core/involutions.lagda.md
+++ b/src/foundation-core/involutions.lagda.md
@@ -7,14 +7,15 @@ module foundation-core.involutions where
Imports
```agda
-open import foundation-core.automorphisms
-open import foundation-core.dependent-pair-types
+open import foundation.automorphisms
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
open import structured-types.pointed-types
```
diff --git a/src/foundation-core/logical-equivalences.lagda.md b/src/foundation-core/logical-equivalences.lagda.md
index ac0c74494b..2cbd73d4b4 100644
--- a/src/foundation-core/logical-equivalences.lagda.md
+++ b/src/foundation-core/logical-equivalences.lagda.md
@@ -7,12 +7,13 @@ module foundation-core.logical-equivalences where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/morphisms-cospans.lagda.md b/src/foundation-core/morphisms-cospans.lagda.md
deleted file mode 100644
index f7729d33de..0000000000
--- a/src/foundation-core/morphisms-cospans.lagda.md
+++ /dev/null
@@ -1,143 +0,0 @@
-# Morphisms of cospans
-
-```agda
-{-# OPTIONS --safe #-}
-
-module foundation-core.morphisms-cospans where
-```
-
-Imports
-
-```agda
-open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
-open import foundation-core.homotopies
-open import foundation-core.universe-levels
-```
-
-
-
-## Idea
-
-A morphism of cospans is a commuting diagram of the form
-
-```text
- A -----> X <----- B
- | | |
- | | |
- V V V
- A' ----> X' <---- B'
-```
-
-## Definitions
-
-### Morphisms of cospans
-
-```agda
-hom-cospan :
- {l1 l2 l3 l1' l2' l3' : Level}
- {A : UU l1} {B : UU l2} {X : UU l3} (f : A → X) (g : B → X)
- {A' : UU l1'} {B' : UU l2'} {X' : UU l3'} (f' : A' → X') (g' : B' → X') →
- UU (l1 ⊔ l2 ⊔ l3 ⊔ l1' ⊔ l2' ⊔ l3')
-hom-cospan {A = A} {B} {X} f g {A'} {B'} {X'} f' g' =
- Σ (A → A') (λ hA →
- Σ (B → B') (λ hB →
- Σ (X → X') (λ hX →
- ((f' ∘ hA) ~ (hX ∘ f)) × ((g' ∘ hB) ~ (hX ∘ g)))))
-```
-
-### Identity morphisms of cospans
-
-```agda
-id-hom-cospan :
- {l1 l2 l3 l1' l2' l3' : Level}
- {A : UU l1} {B : UU l2} {X : UU l3} (f : A → X) (g : B → X) →
- hom-cospan f g f g
-pr1 (id-hom-cospan f g) = id
-pr1 (pr2 (id-hom-cospan f g)) = id
-pr1 (pr2 (pr2 (id-hom-cospan f g))) = id
-pr1 (pr2 (pr2 (pr2 (id-hom-cospan f g)))) = refl-htpy
-pr2 (pr2 (pr2 (pr2 (id-hom-cospan f g)))) = refl-htpy
-```
-
-### Rotating cospans of cospans
-
-```agda
-cospan-hom-cospan-rotate :
- {l1 l2 l3 l1' l2' l3' l1'' l2'' l3'' : Level}
- {A : UU l1} {B : UU l2} {X : UU l3} (f : A → X) (g : B → X)
- {A' : UU l1'} {B' : UU l2'} {X' : UU l3'} (f' : A' → X') (g' : B' → X')
- {A'' : UU l1''} {B'' : UU l2''} {X'' : UU l3''}
- (f'' : A'' → X'') (g'' : B'' → X'')
- (h : hom-cospan f' g' f g) (h' : hom-cospan f'' g'' f g) →
- hom-cospan (pr1 h) (pr1 h') (pr1 (pr2 (pr2 h))) (pr1 (pr2 (pr2 h')))
-pr1
- ( cospan-hom-cospan-rotate f g f' g' f'' g''
- ( pair hA (pair hB (pair hX (pair HA HB))))
- ( pair hA' (pair hB' (pair hX' (pair HA' HB'))))) = f'
-pr1
- ( pr2
- ( cospan-hom-cospan-rotate f g f' g' f'' g''
- ( pair hA (pair hB (pair hX (pair HA HB))))
- ( pair hA' (pair hB' (pair hX' (pair HA' HB')))))) = f''
-pr1
- ( pr2
- ( pr2
- ( cospan-hom-cospan-rotate f g f' g' f'' g''
- ( pair hA (pair hB (pair hX (pair HA HB))))
- ( pair hA' (pair hB' (pair hX' (pair HA' HB'))))))) = f
-pr1
- ( pr2
- ( pr2
- ( pr2
- ( cospan-hom-cospan-rotate f g f' g' f'' g''
- ( pair hA (pair hB (pair hX (pair HA HB))))
- ( pair hA' (pair hB' (pair hX' (pair HA' HB')))))))) = inv-htpy HA
-pr2
- ( pr2
- ( pr2
- ( pr2
- ( cospan-hom-cospan-rotate f g f' g' f'' g''
- ( pair hA (pair hB (pair hX (pair HA HB))))
- ( pair hA' (pair hB' (pair hX' (pair HA' HB')))))))) = inv-htpy HA'
-
-cospan-hom-cospan-rotate' :
- {l1 l2 l3 l1' l2' l3' l1'' l2'' l3'' : Level}
- {A : UU l1} {B : UU l2} {X : UU l3} (f : A → X) (g : B → X)
- {A' : UU l1'} {B' : UU l2'} {X' : UU l3'} (f' : A' → X') (g' : B' → X')
- {A'' : UU l1''} {B'' : UU l2''} {X'' : UU l3''}
- (f'' : A'' → X'') (g'' : B'' → X'')
- (h : hom-cospan f' g' f g) (h' : hom-cospan f'' g'' f g) →
- hom-cospan
- (pr1 (pr2 h)) (pr1 (pr2 h')) (pr1 (pr2 (pr2 h))) (pr1 (pr2 (pr2 h')))
-pr1
- ( cospan-hom-cospan-rotate' f g f' g' f'' g''
- ( pair hA (pair hB (pair hX (pair HA HB))))
- ( pair hA' (pair hB' (pair hX' (pair HA' HB'))))) = g'
-pr1
- ( pr2
- ( cospan-hom-cospan-rotate' f g f' g' f'' g''
- ( pair hA (pair hB (pair hX (pair HA HB))))
- ( pair hA' (pair hB' (pair hX' (pair HA' HB')))))) = g''
-pr1
- ( pr2
- ( pr2
- ( cospan-hom-cospan-rotate' f g f' g' f'' g''
- ( pair hA (pair hB (pair hX (pair HA HB))))
- ( pair hA' (pair hB' (pair hX' (pair HA' HB'))))))) = g
-pr1
- ( pr2
- ( pr2
- ( pr2
- ( cospan-hom-cospan-rotate' f g f' g' f'' g''
- ( pair hA (pair hB (pair hX (pair HA HB))))
- ( pair hA' (pair hB' (pair hX' (pair HA' HB')))))))) = inv-htpy HB
-pr2
- ( pr2
- ( pr2
- ( pr2
- ( cospan-hom-cospan-rotate' f g f' g' f'' g''
- ( pair hA (pair hB (pair hX (pair HA HB))))
- ( pair hA' (pair hB' (pair hX' (pair HA' HB')))))))) = inv-htpy HB'
-```
diff --git a/src/foundation-core/negation.lagda.md b/src/foundation-core/negation.lagda.md
index 709110b47b..e565a46dfc 100644
--- a/src/foundation-core/negation.lagda.md
+++ b/src/foundation-core/negation.lagda.md
@@ -7,8 +7,9 @@ module foundation-core.negation where
Imports
```agda
+open import foundation.universe-levels
+
open import foundation-core.empty-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/path-split-maps.lagda.md b/src/foundation-core/path-split-maps.lagda.md
index f8f526be14..56a34e9152 100644
--- a/src/foundation-core/path-split-maps.lagda.md
+++ b/src/foundation-core/path-split-maps.lagda.md
@@ -7,14 +7,15 @@ module foundation-core.path-split-maps where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.cartesian-product-types
open import foundation-core.coherently-invertible-maps
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.sections
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/propositional-maps.lagda.md b/src/foundation-core/propositional-maps.lagda.md
index 90a0f66f75..8eec0ccb64 100644
--- a/src/foundation-core/propositional-maps.lagda.md
+++ b/src/foundation-core/propositional-maps.lagda.md
@@ -7,14 +7,15 @@ module foundation-core.propositional-maps where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.fundamental-theorem-of-identity-types
+open import foundation.universe-levels
+
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.fibers-of-maps
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/propositions.lagda.md b/src/foundation-core/propositions.lagda.md
index ab2e572b99..159ddfde16 100644
--- a/src/foundation-core/propositions.lagda.md
+++ b/src/foundation-core/propositions.lagda.md
@@ -7,16 +7,17 @@ module foundation-core.propositions where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.function-extensionality
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/pullbacks.lagda.md b/src/foundation-core/pullbacks.lagda.md
index 9faaa6b966..64d0f2a7ef 100644
--- a/src/foundation-core/pullbacks.lagda.md
+++ b/src/foundation-core/pullbacks.lagda.md
@@ -7,27 +7,27 @@ module foundation-core.pullbacks where
Imports
```agda
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
+open import foundation.equality-cartesian-product-types
+open import foundation.functions
open import foundation.functoriality-cartesian-product-types
+open import foundation.functoriality-fibers-of-maps
open import foundation.identity-types
+open import foundation.morphisms-cospans
open import foundation.structure-identity-principle
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.type-theoretic-principle-of-choice
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.cones-over-cospans
-open import foundation-core.dependent-pair-types
open import foundation-core.diagonal-maps-of-types
-open import foundation-core.equality-cartesian-product-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.functoriality-fibers-of-maps
open import foundation-core.homotopies
-open import foundation-core.morphisms-cospans
-open import foundation-core.type-arithmetic-dependent-pair-types
open import foundation-core.universal-property-pullbacks
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/retractions.lagda.md b/src/foundation-core/retractions.lagda.md
index 714a793513..df4622cadc 100644
--- a/src/foundation-core/retractions.lagda.md
+++ b/src/foundation-core/retractions.lagda.md
@@ -9,11 +9,12 @@ module foundation-core.retractions where
Imports
```agda
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/sections.lagda.md b/src/foundation-core/sections.lagda.md
index 75a4aefb23..751e185ca7 100644
--- a/src/foundation-core/sections.lagda.md
+++ b/src/foundation-core/sections.lagda.md
@@ -9,10 +9,11 @@ module foundation-core.sections where
Imports
```agda
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.homotopies
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/sets.lagda.md b/src/foundation-core/sets.lagda.md
index 32eab931a6..9a8d083dc6 100644
--- a/src/foundation-core/sets.lagda.md
+++ b/src/foundation-core/sets.lagda.md
@@ -7,15 +7,16 @@ module foundation-core.sets where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.fundamental-theorem-of-identity-types
+open import foundation.universe-levels
+
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/singleton-induction.lagda.md b/src/foundation-core/singleton-induction.lagda.md
index 5ce2b68ec5..51bae44392 100644
--- a/src/foundation-core/singleton-induction.lagda.md
+++ b/src/foundation-core/singleton-induction.lagda.md
@@ -7,13 +7,14 @@ module foundation-core.singleton-induction where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.sections
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/small-types.lagda.md b/src/foundation-core/small-types.lagda.md
index 7f87d2b7a2..e1935fd2aa 100644
--- a/src/foundation-core/small-types.lagda.md
+++ b/src/foundation-core/small-types.lagda.md
@@ -7,6 +7,7 @@ module foundation-core.small-types where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalences
open import foundation.functoriality-coproduct-types
open import foundation.functoriality-dependent-function-types
@@ -14,18 +15,17 @@ open import foundation.identity-types
open import foundation.mere-equivalences
open import foundation.propositional-truncations
open import foundation.raising-universe-levels
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.unit-type
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.logical-equivalences
open import foundation-core.propositions
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/subtype-identity-principle.lagda.md b/src/foundation-core/subtype-identity-principle.lagda.md
deleted file mode 100644
index f7ed2d53c1..0000000000
--- a/src/foundation-core/subtype-identity-principle.lagda.md
+++ /dev/null
@@ -1,108 +0,0 @@
-# The subtype identity principle
-
-```agda
-module foundation-core.subtype-identity-principle where
-```
-
-Imports
-
-```agda
-open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.equivalences
-open import foundation-core.functions
-open import foundation-core.fundamental-theorem-of-identity-types
-open import foundation-core.identity-types
-open import foundation-core.propositions
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
-```
-
-
-
-## Idea
-
-The subtype identity principle allows us to efficiently characterize the
-identity type of a subtype, using a characterization of the identity type of the
-base type.
-
-## Lemma
-
-The following is a general construction that will help us show that the identity
-type of a subtype agrees with the identity type of the original type. We already
-know that the first projection of a family of propositions is an embedding, but
-the following lemma still has its uses.
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
- where
-
- abstract
- is-contr-total-Eq-subtype :
- {l3 : Level} {P : A → UU l3} →
- is-contr (Σ A B) → ((x : A) → is-prop (P x)) →
- (a : A) (b : B a) (p : P a) →
- is-contr (Σ (Σ A P) (B ∘ pr1))
- is-contr-total-Eq-subtype {l3} {P}
- is-contr-AB is-subtype-P a b p =
- is-contr-equiv
- ( Σ (Σ A B) (P ∘ pr1))
- ( equiv-right-swap-Σ)
- ( is-contr-equiv
- ( P a)
- ( left-unit-law-Σ-is-contr
- ( is-contr-AB)
- ( pair a b))
- ( is-proof-irrelevant-is-prop (is-subtype-P a) p))
-```
-
-## Theorem
-
-### The subtype identity principle
-
-```agda
-module _
- {l1 l2 l3 : Level} {A : UU l1} {P : A → UU l2}
- (is-prop-P : (x : A) → is-prop (P x)) {Eq-A : A → UU l3}
- {a : A} (p : P a) (refl-A : Eq-A a)
- where
-
- abstract
- subtype-identity-principle :
- {f : (x : A) → a = x → Eq-A x}
- (h : (z : (Σ A P)) → (pair a p) = z → Eq-A (pr1 z)) →
- ((x : A) → is-equiv (f x)) → (z : Σ A P) → is-equiv (h z)
- subtype-identity-principle {f} h H =
- fundamental-theorem-id
- ( is-contr-total-Eq-subtype
- ( fundamental-theorem-id' f H)
- ( is-prop-P)
- ( a)
- ( refl-A)
- ( p))
- ( h)
-
-module _
- {l1 l2 l3 : Level} {A : UU l1} (P : A → Prop l2) {Eq-A : A → UU l3}
- {a : A} (p : type-Prop (P a)) (refl-A : Eq-A a)
- where
-
- map-extensionality-type-subtype :
- (f : (x : A) → (a = x) ≃ Eq-A x) →
- (z : Σ A (type-Prop ∘ P)) → (pair a p) = z → Eq-A (pr1 z)
- map-extensionality-type-subtype f .(pair a p) refl = refl-A
-
- extensionality-type-subtype :
- (f : (x : A) → (a = x) ≃ Eq-A x) →
- (z : Σ A (type-Prop ∘ P)) → (pair a p = z) ≃ Eq-A (pr1 z)
- pr1 (extensionality-type-subtype f z) = map-extensionality-type-subtype f z
- pr2 (extensionality-type-subtype f z) =
- subtype-identity-principle
- ( is-prop-type-Prop ∘ P)
- ( p)
- ( refl-A)
- ( map-extensionality-type-subtype f)
- ( is-equiv-map-equiv ∘ f)
- ( z)
-```
diff --git a/src/foundation-core/subtypes.lagda.md b/src/foundation-core/subtypes.lagda.md
index 20577bd95d..012bcab7c1 100644
--- a/src/foundation-core/subtypes.lagda.md
+++ b/src/foundation-core/subtypes.lagda.md
@@ -7,21 +7,22 @@ module foundation-core.subtypes where
Imports
```agda
-open import foundation-core.dependent-pair-types
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.subtype-identity-principle
+open import foundation.universe-levels
+
open import foundation-core.embeddings
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.identity-types
open import foundation-core.logical-equivalences
open import foundation-core.propositional-maps
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.subtype-identity-principle
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/truncated-maps.lagda.md b/src/foundation-core/truncated-maps.lagda.md
index 126f4b2c63..273bc4cd14 100644
--- a/src/foundation-core/truncated-maps.lagda.md
+++ b/src/foundation-core/truncated-maps.lagda.md
@@ -7,20 +7,21 @@ module foundation-core.truncated-maps where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.equality-fibers-of-maps
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.commuting-squares-of-maps
open import foundation-core.contractible-maps
-open import foundation-core.dependent-pair-types
-open import foundation-core.equality-fibers-of-maps
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.propositional-maps
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/truncated-types.lagda.md b/src/foundation-core/truncated-types.lagda.md
index 9cc0efd413..13bd9f8eaf 100644
--- a/src/foundation-core/truncated-types.lagda.md
+++ b/src/foundation-core/truncated-types.lagda.md
@@ -7,13 +7,14 @@ module foundation-core.truncated-types where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.equality-cartesian-product-types
open import foundation.function-extensionality
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
-open import foundation-core.equality-cartesian-product-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.homotopies
@@ -21,7 +22,6 @@ open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.retractions
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/truncation-levels.lagda.md b/src/foundation-core/truncation-levels.lagda.md
index 48d667a4f3..ded37e55c1 100644
--- a/src/foundation-core/truncation-levels.lagda.md
+++ b/src/foundation-core/truncation-levels.lagda.md
@@ -9,7 +9,7 @@ module foundation-core.truncation-levels where
Imports
```agda
-open import foundation-core.universe-levels
+open import foundation.universe-levels
```
diff --git a/src/foundation-core/type-arithmetic-cartesian-product-types.lagda.md b/src/foundation-core/type-arithmetic-cartesian-product-types.lagda.md
deleted file mode 100644
index e556afcbc3..0000000000
--- a/src/foundation-core/type-arithmetic-cartesian-product-types.lagda.md
+++ /dev/null
@@ -1,161 +0,0 @@
-# Type arithmetic for cartesian product types
-
-```agda
-module foundation-core.type-arithmetic-cartesian-product-types where
-```
-
-Imports
-
-```agda
-open import foundation-core.cartesian-product-types
-open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.equality-cartesian-product-types
-open import foundation-core.equivalences
-open import foundation-core.functions
-open import foundation-core.homotopies
-open import foundation-core.identity-types
-open import foundation-core.propositions
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
-```
-
-
-
-## Idea
-
-We prove laws for the manipulation of cartesian products with respect to
-themselves and dependent pair types.
-
-## Laws
-
-### Commutativity of cartesian products
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2}
- where
-
- map-commutative-prod : A × B → B × A
- pr1 (map-commutative-prod (pair a b)) = b
- pr2 (map-commutative-prod (pair a b)) = a
-
- map-inv-commutative-prod : B × A → A × B
- pr1 (map-inv-commutative-prod (pair b a)) = a
- pr2 (map-inv-commutative-prod (pair b a)) = b
-
- issec-map-inv-commutative-prod :
- (map-commutative-prod ∘ map-inv-commutative-prod) ~ id
- issec-map-inv-commutative-prod (pair b a) = refl
-
- isretr-map-inv-commutative-prod :
- (map-inv-commutative-prod ∘ map-commutative-prod) ~ id
- isretr-map-inv-commutative-prod (pair a b) = refl
-
- is-equiv-map-commutative-prod : is-equiv map-commutative-prod
- is-equiv-map-commutative-prod =
- is-equiv-has-inverse
- map-inv-commutative-prod
- issec-map-inv-commutative-prod
- isretr-map-inv-commutative-prod
-
- commutative-prod : (A × B) ≃ (B × A)
- pr1 commutative-prod = map-commutative-prod
- pr2 commutative-prod = is-equiv-map-commutative-prod
-```
-
-### Associativity of cartesian products
-
-```agda
-module _
- {l1 l2 l3 : Level} (A : UU l1) (B : UU l2) (C : UU l3)
- where
-
- map-associative-prod : (A × B) × C → A × (B × C)
- map-associative-prod = map-associative-Σ A (λ x → B) (λ w → C)
-
- map-inv-associative-prod : A × (B × C) → (A × B) × C
- map-inv-associative-prod = map-inv-associative-Σ A (λ x → B) (λ w → C)
-
- issec-map-inv-associative-prod :
- (map-associative-prod ∘ map-inv-associative-prod) ~ id
- issec-map-inv-associative-prod =
- issec-map-inv-associative-Σ A (λ x → B) (λ w → C)
-
- isretr-map-inv-associative-prod :
- (map-inv-associative-prod ∘ map-associative-prod) ~ id
- isretr-map-inv-associative-prod =
- isretr-map-inv-associative-Σ A (λ x → B) (λ w → C)
-
- is-equiv-map-associative-prod : is-equiv map-associative-prod
- is-equiv-map-associative-prod =
- is-equiv-map-associative-Σ A (λ x → B) (λ w → C)
-
- associative-prod : ((A × B) × C) ≃ (A × (B × C))
- associative-prod = associative-Σ A (λ x → B) (λ w → C)
-```
-
-### The unit laws of cartesian product types with respect to contractible types
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2} (is-contr-B : is-contr B)
- where
-
- right-unit-law-prod-is-contr : (A × B) ≃ A
- right-unit-law-prod-is-contr = right-unit-law-Σ-is-contr (λ a → is-contr-B)
-
-module _
- {l1 l2 : Level} {A : UU l1} {B : UU l2} (is-contr-A : is-contr A)
- where
-
- left-unit-law-prod-is-contr : (A × B) ≃ B
- left-unit-law-prod-is-contr =
- left-unit-law-Σ-is-contr is-contr-A (center is-contr-A)
-
- is-equiv-pr2-prod-is-contr : is-equiv (pr2 {B = λ a → B})
- is-equiv-pr2-prod-is-contr =
- is-equiv-comp
- ( pr1)
- ( map-commutative-prod)
- ( is-equiv-map-commutative-prod)
- ( is-equiv-pr1-is-contr λ b → is-contr-A)
-
- equiv-pr2-prod-is-contr : (A × B) ≃ B
- pr1 equiv-pr2-prod-is-contr = pr2
- pr2 equiv-pr2-prod-is-contr = is-equiv-pr2-prod-is-contr
-```
-
-### Adding redundant property
-
-```agda
-equiv-add-redundant-prop :
- {l1 l2 : Level} {A : UU l1} {B : UU l2} →
- (is-prop B) → (f : A → B) → (A ≃ (A × B))
-pr1 (equiv-add-redundant-prop is-prop-B f) a = a , f a
-pr2 (equiv-add-redundant-prop is-prop-B f) =
- is-equiv-has-inverse
- ( pr1)
- ( λ p → eq-pair refl (eq-is-prop is-prop-B))
- ( λ a → refl)
-```
-
-## See also
-
-- Functorial properties of cartesian products are recorded in
- [`foundation.functoriality-cartesian-product-types`](foundation.functoriality-cartesian-product-types.md).
-- Equality proofs in cartesian product types are characterized in
- [`foundation.equality-cartesian-product-types`](foundation.equality-cartesian-product-types.md).
-- The universal property of cartesian product types is treated in
- [`foundation.universal-property-cartesian-product-types`](foundation.universal-property-cartesian-product-types.md).
-
-- Arithmetical laws involving dependent pair types are recorded in
- [`foundation.type-arithmetic-dependent-pair-types`](foundation.type-arithmetic-dependent-pair-types.md).
- - Arithmetical laws involving dependent product types are recorded in
- [`foundation.type-arithmetic-dependent-function-types`](foundation.type-arithmetic-dependent-function-types.md).
-- Arithmetical laws involving coproduct types are recorded in
- [`foundation.type-arithmetic-coproduct-types`](foundation.type-arithmetic-coproduct-types.md).
-- Arithmetical laws involving the unit type are recorded in
- [`foundation.type-arithmetic-unit-type`](foundation.type-arithmetic-unit-type.md).
-- Arithmetical laws involving the empty type are recorded in
- [`foundation.type-arithmetic-empty-type`](foundation.type-arithmetic-empty-type.md).
diff --git a/src/foundation-core/type-arithmetic-dependent-pair-types.lagda.md b/src/foundation-core/type-arithmetic-dependent-pair-types.lagda.md
deleted file mode 100644
index d1e412b200..0000000000
--- a/src/foundation-core/type-arithmetic-dependent-pair-types.lagda.md
+++ /dev/null
@@ -1,421 +0,0 @@
-# Type arithmetic for dependent pair types
-
-```agda
-module foundation-core.type-arithmetic-dependent-pair-types where
-```
-
-Imports
-
-```agda
-open import foundation-core.cartesian-product-types
-open import foundation-core.contractible-maps
-open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.equality-dependent-pair-types
-open import foundation-core.equivalences
-open import foundation-core.fibers-of-maps
-open import foundation-core.functions
-open import foundation-core.homotopies
-open import foundation-core.identity-types
-open import foundation-core.singleton-induction
-open import foundation-core.universe-levels
-```
-
-
-
-## Idea
-
-We prove laws for the manipulation of dependent pair types with respect to
-themselves and arithmetical laws with respect to contractible types.
-
-## Properties
-
-### The left unit law for Σ using a contractible base type
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : A → UU l2} (C : is-contr A) (a : A)
- where
-
- map-inv-left-unit-law-Σ-is-contr : B a → Σ A B
- map-inv-left-unit-law-Σ-is-contr b = pair a b
-
- map-left-unit-law-Σ-is-contr : Σ A B → B a
- map-left-unit-law-Σ-is-contr =
- ind-Σ
- ( ind-singleton-is-contr a C
- ( λ x → B x → B a)
- ( id))
-
- issec-map-inv-left-unit-law-Σ-is-contr :
- ( map-left-unit-law-Σ-is-contr ∘ map-inv-left-unit-law-Σ-is-contr) ~ id
- issec-map-inv-left-unit-law-Σ-is-contr b =
- ap
- ( λ (f : B a → B a) → f b)
- ( compute-ind-singleton-is-contr a C (λ x → B x → B a) id)
-
- isretr-map-inv-left-unit-law-Σ-is-contr :
- ( map-inv-left-unit-law-Σ-is-contr ∘ map-left-unit-law-Σ-is-contr) ~ id
- isretr-map-inv-left-unit-law-Σ-is-contr =
- ind-Σ
- ( ind-singleton-is-contr a C
- ( λ x →
- ( y : B x) →
- Id
- ( ( map-inv-left-unit-law-Σ-is-contr ∘
- map-left-unit-law-Σ-is-contr)
- ( pair x y))
- ( pair x y))
- ( λ y → ap
- ( map-inv-left-unit-law-Σ-is-contr)
- ( ap
- ( λ f → f y)
- ( compute-ind-singleton-is-contr a C (λ x → B x → B a) id))))
-
- is-equiv-map-left-unit-law-Σ-is-contr :
- is-equiv map-left-unit-law-Σ-is-contr
- is-equiv-map-left-unit-law-Σ-is-contr =
- is-equiv-has-inverse
- map-inv-left-unit-law-Σ-is-contr
- issec-map-inv-left-unit-law-Σ-is-contr
- isretr-map-inv-left-unit-law-Σ-is-contr
-
- left-unit-law-Σ-is-contr : Σ A B ≃ B a
- pr1 left-unit-law-Σ-is-contr = map-left-unit-law-Σ-is-contr
- pr2 left-unit-law-Σ-is-contr = is-equiv-map-left-unit-law-Σ-is-contr
-
- abstract
- is-equiv-map-inv-left-unit-law-Σ-is-contr :
- is-equiv map-inv-left-unit-law-Σ-is-contr
- is-equiv-map-inv-left-unit-law-Σ-is-contr =
- is-equiv-has-inverse
- map-left-unit-law-Σ-is-contr
- isretr-map-inv-left-unit-law-Σ-is-contr
- issec-map-inv-left-unit-law-Σ-is-contr
-
- inv-left-unit-law-Σ-is-contr : B a ≃ Σ A B
- pr1 inv-left-unit-law-Σ-is-contr = map-inv-left-unit-law-Σ-is-contr
- pr2 inv-left-unit-law-Σ-is-contr = is-equiv-map-inv-left-unit-law-Σ-is-contr
-```
-
-### Right unit law for dependent pair types
-
-```agda
-module _
- {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
- where
-
- abstract
- is-equiv-pr1-is-contr : ((a : A) → is-contr (B a)) → is-equiv (pr1 {B = B})
- is-equiv-pr1-is-contr is-contr-B =
- is-equiv-is-contr-map
- ( λ x → is-contr-equiv
- ( B x)
- ( equiv-fib-pr1 B x)
- ( is-contr-B x))
-
- equiv-pr1 : ((a : A) → is-contr (B a)) → (Σ A B) ≃ A
- pr1 (equiv-pr1 is-contr-B) = pr1
- pr2 (equiv-pr1 is-contr-B) = is-equiv-pr1-is-contr is-contr-B
-
- right-unit-law-Σ-is-contr : ((a : A) → is-contr (B a)) → (Σ A B) ≃ A
- right-unit-law-Σ-is-contr = equiv-pr1
-
- abstract
- is-contr-is-equiv-pr1 : is-equiv (pr1 {B = B}) → ((a : A) → is-contr (B a))
- is-contr-is-equiv-pr1 is-equiv-pr1-B a =
- is-contr-equiv'
- ( fib pr1 a)
- ( equiv-fib-pr1 B a)
- ( is-contr-map-is-equiv is-equiv-pr1-B a)
-
- map-inv-right-unit-law-Σ-is-contr :
- ((a : A) → is-contr (B a)) → A → Σ A B
- map-inv-right-unit-law-Σ-is-contr H a = (a , center (H a))
-
- issec-map-inv-right-unit-law-Σ-is-contr :
- (H : (a : A) → is-contr (B a)) →
- ( pr1 ∘ map-inv-right-unit-law-Σ-is-contr H) ~ id
- issec-map-inv-right-unit-law-Σ-is-contr H = refl-htpy
-
- isretr-map-inv-right-unit-law-Σ-is-contr :
- (H : (a : A) → is-contr (B a)) →
- ( map-inv-right-unit-law-Σ-is-contr H ∘ pr1) ~ id
- isretr-map-inv-right-unit-law-Σ-is-contr H (a , b) =
- eq-pair-Σ refl (eq-is-contr (H a))
-
- is-equiv-map-inv-right-unit-law-Σ-is-contr :
- (H : (a : A) → is-contr (B a)) →
- is-equiv (map-inv-right-unit-law-Σ-is-contr H)
- is-equiv-map-inv-right-unit-law-Σ-is-contr H =
- is-equiv-has-inverse
- ( pr1)
- ( isretr-map-inv-right-unit-law-Σ-is-contr H)
- ( issec-map-inv-right-unit-law-Σ-is-contr H)
-
- inv-right-unit-law-Σ-is-contr :
- (H : (a : A) → is-contr (B a)) → A ≃ Σ A B
- pr1 (inv-right-unit-law-Σ-is-contr H) = map-inv-right-unit-law-Σ-is-contr H
- pr2 (inv-right-unit-law-Σ-is-contr H) =
- is-equiv-map-inv-right-unit-law-Σ-is-contr H
-```
-
-### Associativity of dependent pair types
-
-There are two ways to express associativity for dependent pair types. We
-formalize both ways.
-
-```agda
-module _
- {l1 l2 l3 : Level} (A : UU l1) (B : A → UU l2) (C : Σ A B → UU l3)
- where
-
- map-associative-Σ : Σ (Σ A B) C → Σ A (λ x → Σ (B x) (λ y → C (pair x y)))
- pr1 (map-associative-Σ ((x , y) , z)) = x
- pr1 (pr2 (map-associative-Σ ((x , y) , z))) = y
- pr2 (pr2 (map-associative-Σ ((x , y) , z))) = z
-
- map-inv-associative-Σ : Σ A (λ x → Σ (B x) (λ y → C (pair x y))) → Σ (Σ A B) C
- pr1 (pr1 (map-inv-associative-Σ (x , y , z))) = x
- pr2 (pr1 (map-inv-associative-Σ (x , y , z))) = y
- pr2 (map-inv-associative-Σ (x , y , z)) = z
-
- isretr-map-inv-associative-Σ :
- (map-inv-associative-Σ ∘ map-associative-Σ) ~ id
- isretr-map-inv-associative-Σ (pair (pair x y) z) = refl
-
- issec-map-inv-associative-Σ : (map-associative-Σ ∘ map-inv-associative-Σ) ~ id
- issec-map-inv-associative-Σ (pair x (pair y z)) = refl
-
- abstract
- is-equiv-map-associative-Σ : is-equiv map-associative-Σ
- is-equiv-map-associative-Σ =
- is-equiv-has-inverse
- map-inv-associative-Σ
- issec-map-inv-associative-Σ
- isretr-map-inv-associative-Σ
-
- associative-Σ : Σ (Σ A B) C ≃ Σ A (λ x → Σ (B x) (λ y → C (pair x y)))
- pr1 associative-Σ = map-associative-Σ
- pr2 associative-Σ = is-equiv-map-associative-Σ
-
- inv-associative-Σ : Σ A (λ x → Σ (B x) (λ y → C (pair x y))) ≃ Σ (Σ A B) C
- pr1 inv-associative-Σ = map-inv-associative-Σ
- pr2 inv-associative-Σ =
- is-equiv-has-inverse
- map-associative-Σ
- isretr-map-inv-associative-Σ
- issec-map-inv-associative-Σ
-```
-
-### Associativity, second formulation
-
-```agda
-module _
- {l1 l2 l3 : Level} (A : UU l1) (B : A → UU l2) (C : (x : A) → B x → UU l3)
- where
-
- map-associative-Σ' :
- Σ (Σ A B) (λ w → C (pr1 w) (pr2 w)) → Σ A (λ x → Σ (B x) (C x))
- pr1 (map-associative-Σ' ((x , y) , z)) = x
- pr1 (pr2 (map-associative-Σ' ((x , y) , z))) = y
- pr2 (pr2 (map-associative-Σ' ((x , y) , z))) = z
-
- map-inv-associative-Σ' :
- Σ A (λ x → Σ (B x) (C x)) → Σ (Σ A B) (λ w → C (pr1 w) (pr2 w))
- pr1 (pr1 (map-inv-associative-Σ' (x , y , z))) = x
- pr2 (pr1 (map-inv-associative-Σ' (x , y , z))) = y
- pr2 (map-inv-associative-Σ' (x , y , z)) = z
-
- issec-map-inv-associative-Σ' :
- (map-associative-Σ' ∘ map-inv-associative-Σ') ~ id
- issec-map-inv-associative-Σ' (pair x (pair y z)) = refl
-
- isretr-map-inv-associative-Σ' :
- ( map-inv-associative-Σ' ∘ map-associative-Σ') ~ id
- isretr-map-inv-associative-Σ' (pair (pair x y) z) = refl
-
- is-equiv-map-associative-Σ' : is-equiv map-associative-Σ'
- is-equiv-map-associative-Σ' =
- is-equiv-has-inverse
- map-inv-associative-Σ'
- issec-map-inv-associative-Σ'
- isretr-map-inv-associative-Σ'
-
- associative-Σ' :
- Σ (Σ A B) (λ w → C (pr1 w) (pr2 w)) ≃ Σ A (λ x → Σ (B x) (C x))
- pr1 associative-Σ' = map-associative-Σ'
- pr2 associative-Σ' = is-equiv-map-associative-Σ'
-
- inv-associative-Σ' :
- Σ A (λ x → Σ (B x) (C x)) ≃ Σ (Σ A B) (λ w → C (pr1 w) (pr2 w))
- pr1 inv-associative-Σ' = map-inv-associative-Σ'
- pr2 inv-associative-Σ' =
- is-equiv-has-inverse
- map-associative-Σ'
- isretr-map-inv-associative-Σ'
- issec-map-inv-associative-Σ'
-```
-
-### The interchange law
-
-```agda
-module _
- { l1 l2 l3 l4 : Level} { A : UU l1} {B : A → UU l2} {C : A → UU l3}
- ( D : (x : A) → B x → C x → UU l4)
- where
-
- map-interchange-Σ-Σ :
- Σ (Σ A B) (λ t → Σ (C (pr1 t)) (D (pr1 t) (pr2 t))) →
- Σ (Σ A C) (λ t → Σ (B (pr1 t)) (λ y → D (pr1 t) y (pr2 t)))
- pr1 (pr1 (map-interchange-Σ-Σ t)) = pr1 (pr1 t)
- pr2 (pr1 (map-interchange-Σ-Σ t)) = pr1 (pr2 t)
- pr1 (pr2 (map-interchange-Σ-Σ t)) = pr2 (pr1 t)
- pr2 (pr2 (map-interchange-Σ-Σ t)) = pr2 (pr2 t)
-
- map-inv-interchange-Σ-Σ :
- Σ (Σ A C) (λ t → Σ (B (pr1 t)) (λ y → D (pr1 t) y (pr2 t))) →
- Σ (Σ A B) (λ t → Σ (C (pr1 t)) (D (pr1 t) (pr2 t)))
- pr1 (pr1 (map-inv-interchange-Σ-Σ t)) = pr1 (pr1 t)
- pr2 (pr1 (map-inv-interchange-Σ-Σ t)) = pr1 (pr2 t)
- pr1 (pr2 (map-inv-interchange-Σ-Σ t)) = pr2 (pr1 t)
- pr2 (pr2 (map-inv-interchange-Σ-Σ t)) = pr2 (pr2 t)
-
- issec-map-inv-interchange-Σ-Σ :
- ( map-interchange-Σ-Σ ∘ map-inv-interchange-Σ-Σ) ~ id
- issec-map-inv-interchange-Σ-Σ (pair (pair a c) (pair b d)) = refl
-
- isretr-map-inv-interchange-Σ-Σ :
- ( map-inv-interchange-Σ-Σ ∘ map-interchange-Σ-Σ) ~ id
- isretr-map-inv-interchange-Σ-Σ (pair (pair a b) (pair c d)) = refl
-
- abstract
- is-equiv-map-interchange-Σ-Σ : is-equiv map-interchange-Σ-Σ
- is-equiv-map-interchange-Σ-Σ =
- is-equiv-has-inverse
- map-inv-interchange-Σ-Σ
- issec-map-inv-interchange-Σ-Σ
- isretr-map-inv-interchange-Σ-Σ
-
- interchange-Σ-Σ :
- Σ (Σ A B) (λ t → Σ (C (pr1 t)) (D (pr1 t) (pr2 t))) ≃
- Σ (Σ A C) (λ t → Σ (B (pr1 t)) (λ y → D (pr1 t) y (pr2 t)))
- pr1 interchange-Σ-Σ = map-interchange-Σ-Σ
- pr2 interchange-Σ-Σ = is-equiv-map-interchange-Σ-Σ
-
- eq-interchange-Σ-Σ-is-contr :
- {a : A} {b : B a} → is-contr (Σ (C a) (D a b)) →
- {x y : Σ (C a) (D a b)} →
- map-equiv interchange-Σ-Σ ((a , b) , x) =
- map-equiv interchange-Σ-Σ ((a , b) , y)
- eq-interchange-Σ-Σ-is-contr H =
- ap (map-equiv interchange-Σ-Σ) (ap (pair _) (eq-is-contr H))
-```
-
-### Swapping the order of quantification in a Σ-type, on the left
-
-```agda
-module _
- {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : A → B → UU l3}
- where
-
- map-left-swap-Σ : Σ A (λ x → Σ B (C x)) → Σ B (λ y → Σ A (λ x → C x y))
- pr1 (map-left-swap-Σ (a , b , c)) = b
- pr1 (pr2 (map-left-swap-Σ (a , b , c))) = a
- pr2 (pr2 (map-left-swap-Σ (a , b , c))) = c
-
- map-inv-left-swap-Σ :
- Σ B (λ y → Σ A (λ x → C x y)) → Σ A (λ x → Σ B (C x))
- pr1 (map-inv-left-swap-Σ (b , a , c)) = a
- pr1 (pr2 (map-inv-left-swap-Σ (b , a , c))) = b
- pr2 (pr2 (map-inv-left-swap-Σ (b , a , c))) = c
-
- isretr-map-inv-left-swap-Σ : (map-inv-left-swap-Σ ∘ map-left-swap-Σ) ~ id
- isretr-map-inv-left-swap-Σ (pair a (pair b c)) = refl
-
- issec-map-inv-left-swap-Σ : (map-left-swap-Σ ∘ map-inv-left-swap-Σ) ~ id
- issec-map-inv-left-swap-Σ (pair b (pair a c)) = refl
-
- abstract
- is-equiv-map-left-swap-Σ : is-equiv map-left-swap-Σ
- is-equiv-map-left-swap-Σ =
- is-equiv-has-inverse
- map-inv-left-swap-Σ
- issec-map-inv-left-swap-Σ
- isretr-map-inv-left-swap-Σ
-
- equiv-left-swap-Σ : Σ A (λ a → Σ B (C a)) ≃ Σ B (λ b → Σ A (λ a → C a b))
- pr1 equiv-left-swap-Σ = map-left-swap-Σ
- pr2 equiv-left-swap-Σ = is-equiv-map-left-swap-Σ
-```
-
-### Swapping the order of quantification in a Σ-type, on the right
-
-```agda
-module _
- {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : A → UU l3}
- where
-
- map-right-swap-Σ : Σ (Σ A B) (C ∘ pr1) → Σ (Σ A C) (B ∘ pr1)
- pr1 (pr1 (map-right-swap-Σ ((a , b) , c))) = a
- pr2 (pr1 (map-right-swap-Σ ((a , b) , c))) = c
- pr2 (map-right-swap-Σ ((a , b) , c)) = b
-
- map-inv-right-swap-Σ : Σ (Σ A C) (B ∘ pr1) → Σ (Σ A B) (C ∘ pr1)
- pr1 (pr1 (map-inv-right-swap-Σ ((a , c) , b))) = a
- pr2 (pr1 (map-inv-right-swap-Σ ((a , c) , b))) = b
- pr2 (map-inv-right-swap-Σ ((a , c) , b)) = c
-
- issec-map-inv-right-swap-Σ : (map-right-swap-Σ ∘ map-inv-right-swap-Σ) ~ id
- issec-map-inv-right-swap-Σ (pair (pair x y) z) = refl
-
- isretr-map-inv-right-swap-Σ : (map-inv-right-swap-Σ ∘ map-right-swap-Σ) ~ id
- isretr-map-inv-right-swap-Σ (pair (pair x z) y) = refl
-
- is-equiv-map-right-swap-Σ : is-equiv map-right-swap-Σ
- is-equiv-map-right-swap-Σ =
- is-equiv-has-inverse
- map-inv-right-swap-Σ
- issec-map-inv-right-swap-Σ
- isretr-map-inv-right-swap-Σ
-
- equiv-right-swap-Σ : Σ (Σ A B) (C ∘ pr1) ≃ Σ (Σ A C) (B ∘ pr1)
- pr1 equiv-right-swap-Σ = map-right-swap-Σ
- pr2 equiv-right-swap-Σ = is-equiv-map-right-swap-Σ
-```
-
-### Distributive laws of cartesian products over Σ
-
-```agda
-left-distributive-prod-Σ :
- {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : B → UU l3} →
- (A × (Σ B C)) ≃ Σ B (λ b → A × (C b))
-left-distributive-prod-Σ =
- equiv-left-swap-Σ
-
-right-distributive-prod-Σ :
- {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : UU l3} →
- ((Σ A B) × C) ≃ Σ A (λ a → B a × C)
-right-distributive-prod-Σ {A} =
- associative-Σ _ _ _
-```
-
-## See also
-
-- Functorial properties of dependent pair types are recorded in
- [`foundation.functoriality-dependent-pair-types`](foundation.functoriality-dependent-pair-types.md).
-- Equality proofs in dependent pair types are characterized in
- [`foundation.equality-dependent-pair-types`](foundation.equality-dependent-pair-types.md).
-- The universal property of dependent pair types is treated in
- [`foundation.universal-property-dependent-pair-types`](foundation.universal-property-dependent-pair-types.md).
-
-- Arithmetical laws involving cartesian product types are recorded in
- [`foundation.type-arithmetic-cartesian-product-types`](foundation.type-arithmetic-cartesian-product-types.md).
-- Arithmetical laws involving dependent product types are recorded in
- [`foundation.type-arithmetic-dependent-function-types`](foundation.type-arithmetic-dependent-function-types.md).
-- Arithmetical laws involving coproduct types are recorded in
- [`foundation.type-arithmetic-coproduct-types`](foundation.type-arithmetic-coproduct-types.md).
-- Arithmetical laws involving the unit type are recorded in
- [`foundation.type-arithmetic-unit-type`](foundation.type-arithmetic-unit-type.md).
-- Arithmetical laws involving the empty type are recorded in
- [`foundation.type-arithmetic-empty-type`](foundation.type-arithmetic-empty-type.md).
diff --git a/src/foundation-core/univalence.lagda.md b/src/foundation-core/univalence.lagda.md
index 45082d613f..960320456e 100644
--- a/src/foundation-core/univalence.lagda.md
+++ b/src/foundation-core/univalence.lagda.md
@@ -7,12 +7,13 @@ module foundation-core.univalence where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.fundamental-theorem-of-identity-types
+open import foundation.universe-levels
+
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/universal-property-pullbacks.lagda.md b/src/foundation-core/universal-property-pullbacks.lagda.md
index 62aafa9e7c..f115440a70 100644
--- a/src/foundation-core/universal-property-pullbacks.lagda.md
+++ b/src/foundation-core/universal-property-pullbacks.lagda.md
@@ -7,17 +7,18 @@ module foundation-core.universal-property-pullbacks where
Imports
```agda
-open import foundation-core.cones-over-cospans
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.functoriality-function-types
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/universal-property-truncation.lagda.md b/src/foundation-core/universal-property-truncation.lagda.md
index 9329bf933b..264893bda5 100644
--- a/src/foundation-core/universal-property-truncation.lagda.md
+++ b/src/foundation-core/universal-property-truncation.lagda.md
@@ -7,21 +7,21 @@ module foundation-core.universal-property-truncation where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalences
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.type-theoretic-principle-of-choice
+open import foundation.universe-levels
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.sections
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation-core/universe-levels.lagda.md b/src/foundation-core/universe-levels.lagda.md
deleted file mode 100644
index 3c8b7d972f..0000000000
--- a/src/foundation-core/universe-levels.lagda.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Universe levels
-
-```agda
-{-# OPTIONS --safe --no-import-sorts #-}
-
-module foundation-core.universe-levels where
-
-open import Agda.Primitive
- using (Level ; lzero ; lsuc ; _⊔_)
- renaming (Set to UU ; Setω to UUω)
- public
-```
-
-## Idea
-
-We import Agda's built in mechanism of universe levels. The universes are called
-`UU`, which stands for `univalent universe`, although we will not immediately
-assume that universes are univalent.
diff --git a/src/foundation/0-connected-types.lagda.md b/src/foundation/0-connected-types.lagda.md
index fef27a5ca3..c5444621bf 100644
--- a/src/foundation/0-connected-types.lagda.md
+++ b/src/foundation/0-connected-types.lagda.md
@@ -8,7 +8,9 @@ module foundation.0-connected-types where
```agda
open import foundation.contractible-types
+open import foundation.dependent-pair-types
open import foundation.fiber-inclusions
+open import foundation.functions
open import foundation.functoriality-set-truncation
open import foundation.inhabited-types
open import foundation.mere-equality
@@ -18,18 +20,16 @@ open import foundation.sets
open import foundation.surjective-maps
open import foundation.unit-type
open import foundation.universal-property-unit-type
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.truncated-maps
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/0-images-of-maps.lagda.md b/src/foundation/0-images-of-maps.lagda.md
index b1593c8d72..611cf6cdc0 100644
--- a/src/foundation/0-images-of-maps.lagda.md
+++ b/src/foundation/0-images-of-maps.lagda.md
@@ -8,9 +8,9 @@ module foundation.0-images-of-maps where
```agda
open import foundation.truncation-images-of-maps
+open import foundation.universe-levels
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/0-maps.lagda.md b/src/foundation/0-maps.lagda.md
index 73555fe537..7515655e6a 100644
--- a/src/foundation/0-maps.lagda.md
+++ b/src/foundation/0-maps.lagda.md
@@ -1,15 +1,158 @@
-# `0`-Maps
+# 0-Maps
```agda
module foundation.0-maps where
-
-open import foundation-core.0-maps public
```
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+open import foundation-core.fibers-of-maps
+open import foundation-core.functoriality-dependent-pair-types
+open import foundation-core.homotopies
+open import foundation-core.sets
+open import foundation-core.truncated-maps
+open import foundation-core.truncation-levels
```
+
+## Definition
+
+Maps `f : A → B` of which the fibers are sets, i.e., 0-truncated types, are
+called 0-maps. It is shown in
+[`foundation.faithful-maps`](foundation.faithful-maps.md) that a map `f` is a
+0-map if and only if `f` is faithful, i.e., `f` induces embeddings on identity
+types.
+
+```agda
+module _
+ {l1 l2 : Level}
+ where
+
+ is-0-map : {A : UU l1} {B : UU l2} → (A → B) → UU (l1 ⊔ l2)
+ is-0-map {A} {B} f = (y : B) → is-set (fib f y)
+
+ 0-map : (A : UU l1) (B : UU l2) → UU (l1 ⊔ l2)
+ 0-map A B = Σ (A → B) is-0-map
+
+ map-0-map : {A : UU l1} {B : UU l2} → 0-map A B → A → B
+ map-0-map = pr1
+
+ is-0-map-map-0-map :
+ {A : UU l1} {B : UU l2} (f : 0-map A B) → is-0-map (map-0-map f)
+ is-0-map-map-0-map = pr2
+```
+
+## Properties
+
+### Projections of families of sets are `0`-maps
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1}
+ where
+
+ abstract
+ is-0-map-pr1 :
+ {B : A → UU l2} → ((x : A) → is-set (B x)) → is-0-map (pr1 {B = B})
+ is-0-map-pr1 {B} H x =
+ is-set-equiv (B x) (equiv-fib-pr1 B x) (H x)
+
+ pr1-0-map :
+ (B : A → Set l2) → 0-map (Σ A (λ x → type-Set (B x))) A
+ pr1 (pr1-0-map B) = pr1
+ pr2 (pr1-0-map B) = is-0-map-pr1 (λ x → is-set-type-Set (B x))
+```
+
+### `0`-maps are closed under homotopies
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f g : A → B} (H : f ~ g)
+ where
+
+ is-0-map-htpy : is-0-map g → is-0-map f
+ is-0-map-htpy = is-trunc-map-htpy zero-𝕋 H
+```
+
+### `0`-maps are closed under composition
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
+ where
+
+ is-0-map-comp :
+ (g : B → X) (h : A → B) →
+ is-0-map g → is-0-map h → is-0-map (g ∘ h)
+ is-0-map-comp = is-trunc-map-comp zero-𝕋
+
+ is-0-map-comp-htpy :
+ (f : A → X) (g : B → X) (h : A → B) (H : f ~ (g ∘ h)) →
+ is-0-map g → is-0-map h → is-0-map f
+ is-0-map-comp-htpy = is-trunc-map-comp-htpy zero-𝕋
+```
+
+### If a composite is a 0-map, then so is its right factor
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
+ where
+
+ is-0-map-right-factor :
+ (g : B → X) (h : A → B) →
+ is-0-map g → is-0-map (g ∘ h) → is-0-map h
+ is-0-map-right-factor = is-trunc-map-right-factor zero-𝕋
+
+ is-0-map-right-factor-htpy :
+ (f : A → X) (g : B → X) (h : A → B) (H : f ~ (g ∘ h)) →
+ is-0-map g → is-0-map f → is-0-map h
+ is-0-map-right-factor-htpy = is-trunc-map-right-factor-htpy zero-𝕋
+```
+
+### A family of `0`-maps induces a `0`-map on total spaces
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : A → UU l3}
+ {f : (x : A) → B x → C x}
+ where
+
+ abstract
+ is-0-map-tot : ((x : A) → is-0-map (f x)) → is-0-map (tot f)
+ is-0-map-tot = is-trunc-map-tot zero-𝕋
+```
+
+### For any type family over the codomain, a `0`-map induces a `0`-map on total spaces
+
+In other words, `0`-maps are stable under pullbacks. We will come to this point
+when we introduce homotopy pullbacks.
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {f : A → B} (C : B → UU l3)
+ where
+
+ abstract
+ is-0-map-map-Σ-map-base : is-0-map f → is-0-map (map-Σ-map-base f C)
+ is-0-map-map-Σ-map-base = is-trunc-map-map-Σ-map-base zero-𝕋 C
+```
+
+### The functorial action of `Σ` preserves `0`-maps
+
+```agda
+module _
+ {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {C : A → UU l3}
+ (D : B → UU l4) {f : A → B} {g : (x : A) → C x → D (f x)}
+ where
+
+ is-0-map-map-Σ :
+ is-0-map f → ((x : A) → is-0-map (g x)) → is-0-map (map-Σ D f g)
+ is-0-map-map-Σ = is-trunc-map-map-Σ zero-𝕋 D
+```
diff --git a/src/foundation/1-types.lagda.md b/src/foundation/1-types.lagda.md
index 0bf28d7199..dda1ff537f 100644
--- a/src/foundation/1-types.lagda.md
+++ b/src/foundation/1-types.lagda.md
@@ -9,17 +9,17 @@ open import foundation-core.1-types public
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.subuniverses
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.subtypes
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/2-types.lagda.md b/src/foundation/2-types.lagda.md
index 70f062190d..1c2182a2eb 100644
--- a/src/foundation/2-types.lagda.md
+++ b/src/foundation/2-types.lagda.md
@@ -7,10 +7,11 @@ module foundation.2-types where
Imports
```agda
-open import foundation-core.dependent-pair-types
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
+
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/apartness-relations.lagda.md b/src/foundation/apartness-relations.lagda.md
index 5c20454636..a751d5dff8 100644
--- a/src/foundation/apartness-relations.lagda.md
+++ b/src/foundation/apartness-relations.lagda.md
@@ -8,18 +8,18 @@ module foundation.apartness-relations where
```agda
open import foundation.binary-relations
+open import foundation.dependent-pair-types
open import foundation.disjunction
open import foundation.existential-quantification
open import foundation.propositional-truncations
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
open import foundation-core.identity-types
open import foundation-core.negation
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/arithmetic-law-coproduct-and-sigma-decompositions.lagda.md b/src/foundation/arithmetic-law-coproduct-and-sigma-decompositions.lagda.md
index 1b5384fe8f..3244ef5074 100644
--- a/src/foundation/arithmetic-law-coproduct-and-sigma-decompositions.lagda.md
+++ b/src/foundation/arithmetic-law-coproduct-and-sigma-decompositions.lagda.md
@@ -8,23 +8,23 @@ module foundation.arithmetic-law-coproduct-and-sigma-decompositions where
```agda
open import foundation.coproduct-decompositions
+open import foundation.dependent-pair-types
open import foundation.equivalences
+open import foundation.functions
open import foundation.functoriality-coproduct-types
open import foundation.relaxed-sigma-decompositions
open import foundation.type-arithmetic-coproduct-types
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.univalence
open import foundation.universal-property-coproduct-types
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/arithmetic-law-product-and-pi-decompositions.lagda.md b/src/foundation/arithmetic-law-product-and-pi-decompositions.lagda.md
index 7696e43a23..690421942d 100644
--- a/src/foundation/arithmetic-law-product-and-pi-decompositions.lagda.md
+++ b/src/foundation/arithmetic-law-product-and-pi-decompositions.lagda.md
@@ -8,7 +8,9 @@ module foundation.arithmetic-law-product-and-pi-decompositions where
```agda
open import foundation.coproduct-decompositions
+open import foundation.dependent-pair-types
open import foundation.equivalences
+open import foundation.functions
open import foundation.functoriality-cartesian-product-types
open import foundation.functoriality-coproduct-types
open import foundation.functoriality-dependent-pair-types
@@ -19,15 +21,13 @@ open import foundation.type-arithmetic-coproduct-types
open import foundation.type-arithmetic-dependent-pair-types
open import foundation.univalence
open import foundation.universal-property-coproduct-types
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/automorphisms.lagda.md b/src/foundation/automorphisms.lagda.md
index 3eede0b718..bc5d12d351 100644
--- a/src/foundation/automorphisms.lagda.md
+++ b/src/foundation/automorphisms.lagda.md
@@ -1,15 +1,44 @@
-# Automorphisms of types
+# Automorphisms
```agda
module foundation.automorphisms where
-
-open import foundation-core.automorphisms public
```
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.sets
+open import foundation.universe-levels
+
+open import foundation-core.equivalences
+open import structured-types.pointed-types
```
+
+## Idea
+
+An automorphism on a type `A` is an equivalence `A ≃ A`. We will just reuse the
+infrastructure of equivalences for automorphisms.
+
+## Definitions
+
+### The type of automorphisms on a type
+
+```agda
+Aut : {l : Level} → UU l → UU l
+Aut Y = Y ≃ Y
+
+is-set-Aut : {l : Level} {A : UU l} → is-set A → is-set (Aut A)
+is-set-Aut H = is-set-equiv-is-set H H
+
+Aut-Set : {l : Level} → Set l → Set l
+pr1 (Aut-Set A) = Aut (type-Set A)
+pr2 (Aut-Set A) = is-set-Aut (is-set-type-Set A)
+
+Aut-Pointed-Type : {l : Level} → UU l → Pointed-Type l
+pr1 (Aut-Pointed-Type A) = Aut A
+pr2 (Aut-Pointed-Type A) = id-equiv
+```
diff --git a/src/foundation/axiom-l.lagda.md b/src/foundation/axiom-l.lagda.md
index 4a01bbe40b..fae0bb36ab 100644
--- a/src/foundation/axiom-l.lagda.md
+++ b/src/foundation/axiom-l.lagda.md
@@ -7,26 +7,26 @@ module foundation.axiom-l where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.embeddings
open import foundation.equivalences
open import foundation.full-subtypes
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.functoriality-dependent-function-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.sets
open import foundation.type-theoretic-principle-of-choice
open import foundation.universal-property-identity-types
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.injective-maps
open import foundation-core.propositions
open import foundation-core.univalence
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/axiom-of-choice.lagda.md b/src/foundation/axiom-of-choice.lagda.md
index 5f221b231d..ea089242b8 100644
--- a/src/foundation/axiom-of-choice.lagda.md
+++ b/src/foundation/axiom-of-choice.lagda.md
@@ -7,23 +7,23 @@ module foundation.axiom-of-choice where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.functoriality-propositional-truncation
open import foundation.projective-types
open import foundation.propositional-truncations
open import foundation.sections
open import foundation.split-surjective-maps
open import foundation.surjective-maps
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.sets
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/bands.lagda.md b/src/foundation/bands.lagda.md
index 5a3d4f007a..014eb6117c 100644
--- a/src/foundation/bands.lagda.md
+++ b/src/foundation/bands.lagda.md
@@ -8,9 +8,9 @@ module foundation.bands where
```agda
open import foundation.set-truncations
+open import foundation.universe-levels
open import foundation-core.equivalences
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/binary-embeddings.lagda.md b/src/foundation/binary-embeddings.lagda.md
index 157cfa6c35..81566ec58e 100644
--- a/src/foundation/binary-embeddings.lagda.md
+++ b/src/foundation/binary-embeddings.lagda.md
@@ -8,12 +8,12 @@ module foundation.binary-embeddings where
```agda
open import foundation.binary-equivalences
+open import foundation.dependent-pair-types
open import foundation.identity-types
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalences
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/binary-equivalences-unordered-pairs-of-types.lagda.md b/src/foundation/binary-equivalences-unordered-pairs-of-types.lagda.md
index c06562e463..5262453435 100644
--- a/src/foundation/binary-equivalences-unordered-pairs-of-types.lagda.md
+++ b/src/foundation/binary-equivalences-unordered-pairs-of-types.lagda.md
@@ -8,12 +8,12 @@ module foundation.binary-equivalences-unordered-pairs-of-types where
```agda
open import foundation.binary-operations-unordered-pairs-of-types
+open import foundation.functions
open import foundation.products-unordered-pairs-of-types
+open import foundation.universe-levels
open import foundation.unordered-pairs
open import foundation-core.equivalences
-open import foundation-core.functions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/binary-equivalences.lagda.md b/src/foundation/binary-equivalences.lagda.md
index 10003b3b8b..2855ee5a99 100644
--- a/src/foundation/binary-equivalences.lagda.md
+++ b/src/foundation/binary-equivalences.lagda.md
@@ -7,10 +7,11 @@ module foundation.binary-equivalences where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
+
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/binary-functoriality-set-quotients.lagda.md b/src/foundation/binary-functoriality-set-quotients.lagda.md
index 67251ca502..f554097a6c 100644
--- a/src/foundation/binary-functoriality-set-quotients.lagda.md
+++ b/src/foundation/binary-functoriality-set-quotients.lagda.md
@@ -10,29 +10,29 @@ module foundation.binary-functoriality-set-quotients where
```agda
open import foundation.binary-homotopies
+open import foundation.dependent-pair-types
open import foundation.exponents-set-quotients
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.functoriality-set-quotients
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.homotopies
open import foundation.identity-types
open import foundation.reflecting-maps-equivalence-relations
open import foundation.set-quotients
open import foundation.sets
+open import foundation.subtype-identity-principle
open import foundation.surjective-maps
open import foundation.universal-property-set-quotients
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalence-relations
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-function-types
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.propositions
-open import foundation-core.subtype-identity-principle
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/binary-homotopies.lagda.md b/src/foundation/binary-homotopies.lagda.md
index 994d8d160d..ea17025506 100644
--- a/src/foundation/binary-homotopies.lagda.md
+++ b/src/foundation/binary-homotopies.lagda.md
@@ -7,15 +7,15 @@ module foundation.binary-homotopies where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equality-dependent-function-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.homotopies
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/binary-operations-unordered-pairs-of-types.lagda.md b/src/foundation/binary-operations-unordered-pairs-of-types.lagda.md
index 6ddb84fbbb..2f5a31ac3c 100644
--- a/src/foundation/binary-operations-unordered-pairs-of-types.lagda.md
+++ b/src/foundation/binary-operations-unordered-pairs-of-types.lagda.md
@@ -8,9 +8,8 @@ module foundation.binary-operations-unordered-pairs-of-types where
```agda
open import foundation.products-unordered-pairs-of-types
+open import foundation.universe-levels
open import foundation.unordered-pairs
-
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/binary-reflecting-maps-equivalence-relations.lagda.md b/src/foundation/binary-reflecting-maps-equivalence-relations.lagda.md
index e437a5c4b2..0df2751101 100644
--- a/src/foundation/binary-reflecting-maps-equivalence-relations.lagda.md
+++ b/src/foundation/binary-reflecting-maps-equivalence-relations.lagda.md
@@ -7,19 +7,19 @@ module foundation.binary-reflecting-maps-equivalence-relations where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equality-dependent-function-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.homotopies
+open import foundation.subtype-identity-principle
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalence-relations
open import foundation-core.equivalences
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.subtype-identity-principle
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/binary-relations.lagda.md b/src/foundation/binary-relations.lagda.md
index 0e939f0446..ea164bc006 100644
--- a/src/foundation/binary-relations.lagda.md
+++ b/src/foundation/binary-relations.lagda.md
@@ -7,18 +7,18 @@ module foundation.binary-relations where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equality-dependent-function-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.subtypes
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/binary-transport.lagda.md b/src/foundation/binary-transport.lagda.md
index 1d4a0d8989..5a59f1332c 100644
--- a/src/foundation/binary-transport.lagda.md
+++ b/src/foundation/binary-transport.lagda.md
@@ -7,11 +7,12 @@ module foundation.binary-transport where
Imports
```agda
-open import foundation-core.dependent-pair-types
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/booleans.lagda.md b/src/foundation/booleans.lagda.md
index 094d865dbc..2c3354a503 100644
--- a/src/foundation/booleans.lagda.md
+++ b/src/foundation/booleans.lagda.md
@@ -7,22 +7,22 @@ module foundation.booleans where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.raising-universe-levels
open import foundation.unit-type
+open import foundation.universe-levels
open import foundation-core.constant-maps
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.injective-maps
open import foundation-core.negation
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.universe-levels
open import univalent-combinatorics.finite-types
open import univalent-combinatorics.standard-finite-types
diff --git a/src/foundation/cantor-schroder-bernstein-escardo.lagda.md b/src/foundation/cantor-schroder-bernstein-escardo.lagda.md
index 2a4f4d19cd..2359b19660 100644
--- a/src/foundation/cantor-schroder-bernstein-escardo.lagda.md
+++ b/src/foundation/cantor-schroder-bernstein-escardo.lagda.md
@@ -8,12 +8,13 @@ module foundation.cantor-schroder-bernstein-escardo where
```agda
open import foundation.decidable-types
+open import foundation.dependent-pair-types
open import foundation.law-of-excluded-middle
open import foundation.perfect-images
open import foundation.split-surjective-maps
+open import foundation.universe-levels
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.empty-types
open import foundation-core.equivalences
@@ -21,7 +22,6 @@ open import foundation-core.fibers-of-maps
open import foundation-core.identity-types
open import foundation-core.injective-maps
open import foundation-core.negation
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/cantors-diagonal-argument.lagda.md b/src/foundation/cantors-diagonal-argument.lagda.md
index 8455ba7416..8504154d1f 100644
--- a/src/foundation/cantors-diagonal-argument.lagda.md
+++ b/src/foundation/cantors-diagonal-argument.lagda.md
@@ -7,17 +7,17 @@ module foundation.cantors-diagonal-argument where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.logical-equivalences
open import foundation.negation
open import foundation.propositional-truncations
open import foundation.surjective-maps
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
open import foundation-core.fibers-of-maps
open import foundation-core.function-extensionality
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/cartesian-product-types.lagda.md b/src/foundation/cartesian-product-types.lagda.md
index 6251b94a47..ee4be138ee 100644
--- a/src/foundation/cartesian-product-types.lagda.md
+++ b/src/foundation/cartesian-product-types.lagda.md
@@ -10,8 +10,7 @@ open import foundation-core.cartesian-product-types public
```agda
open import foundation.subuniverses
-
-open import foundation-core.universe-levels
+open import foundation.universe-levels
```
diff --git a/src/foundation/cartesian-products-set-quotients.lagda.md b/src/foundation/cartesian-products-set-quotients.lagda.md
index 9d5411d1f5..c404d172aa 100644
--- a/src/foundation/cartesian-products-set-quotients.lagda.md
+++ b/src/foundation/cartesian-products-set-quotients.lagda.md
@@ -7,25 +7,25 @@ module foundation.cartesian-products-set-quotients where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.equality-cartesian-product-types
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.products-equivalence-relations
open import foundation.reflecting-maps-equivalence-relations
open import foundation.set-quotients
open import foundation.sets
open import foundation.uniqueness-set-quotients
open import foundation.universal-property-set-quotients
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.equality-cartesian-product-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalence-relations
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/category-of-sets.lagda.md b/src/foundation/category-of-sets.lagda.md
index 689e791127..553cd91dde 100644
--- a/src/foundation/category-of-sets.lagda.md
+++ b/src/foundation/category-of-sets.lagda.md
@@ -9,11 +9,11 @@ module foundation.category-of-sets where
```agda
open import category-theory.large-precategories
+open import foundation.functions
open import foundation.sets
+open import foundation.universe-levels
-open import foundation-core.functions
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/choice-of-representatives-equivalence-relation.lagda.md b/src/foundation/choice-of-representatives-equivalence-relation.lagda.md
index 0000b7e4a0..fe7543acef 100644
--- a/src/foundation/choice-of-representatives-equivalence-relation.lagda.md
+++ b/src/foundation/choice-of-representatives-equivalence-relation.lagda.md
@@ -7,23 +7,23 @@ module foundation.choice-of-representatives-equivalence-relation where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalence-classes
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.propositional-truncations
open import foundation.surjective-maps
+open import foundation.type-arithmetic-dependent-pair-types
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalence-relations
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.logical-equivalences
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/coherently-invertible-maps.lagda.md b/src/foundation/coherently-invertible-maps.lagda.md
index c8ea1fe747..31c300027c 100644
--- a/src/foundation/coherently-invertible-maps.lagda.md
+++ b/src/foundation/coherently-invertible-maps.lagda.md
@@ -9,21 +9,21 @@ open import foundation-core.coherently-invertible-maps public
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalences
+open import foundation.functions
open import foundation.identity-types
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.type-theoretic-principle-of-choice
+open import foundation.universe-levels
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.propositions
open import foundation-core.sections
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/commuting-3-simplices-of-homotopies.lagda.md b/src/foundation/commuting-3-simplices-of-homotopies.lagda.md
index 05e548fae2..ea13bcc60e 100644
--- a/src/foundation/commuting-3-simplices-of-homotopies.lagda.md
+++ b/src/foundation/commuting-3-simplices-of-homotopies.lagda.md
@@ -1,15 +1,77 @@
# Commuting 3-simplices of homotopies
```agda
-module foundation.commuting-3-simplices-of-homotopies where
+{-# OPTIONS --safe #-}
-open import foundation-core.commuting-3-simplices-of-homotopies public
+module foundation.commuting-3-simplices-of-homotopies where
```
Imports
```agda
+open import foundation.commuting-triangles-of-homotopies
+open import foundation.universe-levels
+open import foundation-core.homotopies
```
+
+## Idea
+
+A commuting 3-simplex of homotopies is a commuting diagram of the form
+
+```text
+ f ----------> g
+ | \ ^ |
+ | \ / |
+ | / |
+ | / \ |
+ V / v V
+ h ----------> i.
+```
+
+where f, g, h, and i are functions.
+
+## Definition
+
+```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)
+ (diagonal-up : h ~ g) (diagonal-down : f ~ i)
+ (upper-left : coherence-triangle-homotopies top diagonal-up left)
+ (lower-right : coherence-triangle-homotopies bottom right diagonal-up)
+ (upper-right : coherence-triangle-homotopies diagonal-down right top)
+ (lower-left : coherence-triangle-homotopies diagonal-down bottom left)
+ where
+
+ coherence-3-simplex-homotopies : UU (l1 ⊔ l2)
+ coherence-3-simplex-homotopies =
+ ( upper-right ∙h
+ left-whisk-htpy-coherence-triangle-homotopies
+ ( diagonal-up)
+ ( right)
+ ( upper-left)) ~
+ ( ( lower-left ∙h
+ right-whisk-htpy-coherence-triangle-homotopies
+ ( right)
+ ( lower-right)
+ ( left)) ∙h
+ assoc-htpy left diagonal-up right)
+
+ coherence-3-simplex-homotopies' : UU (l1 ⊔ l2)
+ coherence-3-simplex-homotopies' =
+ ( ( lower-left ∙h
+ right-whisk-htpy-coherence-triangle-homotopies
+ ( right)
+ ( lower-right)
+ ( left)) ∙h
+ assoc-htpy left diagonal-up right) ~
+ ( upper-right ∙h
+ left-whisk-htpy-coherence-triangle-homotopies
+ ( diagonal-up)
+ ( right)
+ ( upper-left))
+```
diff --git a/src/foundation/commuting-3-simplices-of-maps.lagda.md b/src/foundation/commuting-3-simplices-of-maps.lagda.md
index f44400745d..610a6d7ca7 100644
--- a/src/foundation/commuting-3-simplices-of-maps.lagda.md
+++ b/src/foundation/commuting-3-simplices-of-maps.lagda.md
@@ -1,15 +1,56 @@
# Commuting 3-simplices of maps
```agda
-module foundation.commuting-3-simplices-of-maps where
+{-# OPTIONS --safe #-}
-open import foundation-core.commuting-3-simplices-of-maps public
+module foundation.commuting-3-simplices-of-maps where
```
Imports
```agda
+open import foundation.universe-levels
+open import foundation-core.commuting-triangles-of-maps
+open import foundation-core.homotopies
```
+
+## Idea
+
+A commuting 3-simplex is a commuting diagram of the form
+
+```text
+ A ----------> B
+ | \ ^ |
+ | \ / |
+ | / |
+ | / \ |
+ V / v V
+ X ----------> Y.
+```
+
+## Definition
+
+```agda
+module _
+ {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)
+ (diagonal-up : X → B) (diagonal-down : A → Y)
+ (upper-left : coherence-triangle-maps top diagonal-up left)
+ (lower-right : coherence-triangle-maps bottom right diagonal-up)
+ (upper-right : coherence-triangle-maps diagonal-down right top)
+ (lower-left : coherence-triangle-maps diagonal-down bottom left)
+ where
+
+ coherence-3-simplex-maps : UU (l1 ⊔ l4)
+ coherence-3-simplex-maps =
+ ( upper-right ∙h (right ·l upper-left)) ~
+ ( lower-left ∙h (lower-right ·r left))
+
+ coherence-3-simplex-maps' : UU (l1 ⊔ l4)
+ coherence-3-simplex-maps' =
+ ( lower-left ∙h (lower-right ·r left)) ~
+ ( upper-right ∙h (right ·l upper-left))
+```
diff --git a/src/foundation/commuting-cubes-of-maps.lagda.md b/src/foundation/commuting-cubes-of-maps.lagda.md
index de34cd2a32..7389275335 100644
--- a/src/foundation/commuting-cubes-of-maps.lagda.md
+++ b/src/foundation/commuting-cubes-of-maps.lagda.md
@@ -9,11 +9,12 @@ open import foundation-core.commuting-cubes-of-maps public
Imports
```agda
-open import foundation-core.cones-over-cospans
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.homotopies
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/commuting-squares-of-identifications.lagda.md b/src/foundation/commuting-squares-of-identifications.lagda.md
index b62e0be093..1bf389320e 100644
--- a/src/foundation/commuting-squares-of-identifications.lagda.md
+++ b/src/foundation/commuting-squares-of-identifications.lagda.md
@@ -9,9 +9,10 @@ module foundation.commuting-squares-of-identifications where
Imports
```agda
-open import foundation-core.functions
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/commuting-squares-of-maps.lagda.md b/src/foundation/commuting-squares-of-maps.lagda.md
index 8c7023b084..b88a345213 100644
--- a/src/foundation/commuting-squares-of-maps.lagda.md
+++ b/src/foundation/commuting-squares-of-maps.lagda.md
@@ -10,11 +10,11 @@ open import foundation-core.commuting-squares-of-maps public
```agda
open import foundation.equivalences
+open import foundation.functions
open import foundation.functoriality-function-types
+open import foundation.universe-levels
-open import foundation-core.functions
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/commuting-triangles-of-homotopies.lagda.md b/src/foundation/commuting-triangles-of-homotopies.lagda.md
index 09651770e3..86d52cbdd5 100644
--- a/src/foundation/commuting-triangles-of-homotopies.lagda.md
+++ b/src/foundation/commuting-triangles-of-homotopies.lagda.md
@@ -1,15 +1,133 @@
# Commuting triangles of homotopies
```agda
-module foundation.commuting-triangles-of-homotopies where
+{-# OPTIONS --safe #-}
-open import foundation-core.commuting-triangles-of-homotopies public
+module foundation.commuting-triangles-of-homotopies where
```
Imports
```agda
+open import foundation.functions
+open import foundation.universe-levels
+open import foundation-core.homotopies
+open import foundation-core.identity-types
```
+
+## Idea
+
+A triangle of homotopies of maps
+
+```text
+ f ----> g
+ \ /
+ \ /
+ V V
+ h
+```
+
+is said to commute if there is a homotopy between the homotopy on the left
+`f ~ h` and the composite homotopy `f ~ g ~ h`.
+
+## Definition
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
+ {f g h : (x : A) → B x}
+ where
+
+ coherence-triangle-homotopies :
+ (left : f ~ h) (right : g ~ h) (top : f ~ g) → UU (l1 ⊔ l2)
+ coherence-triangle-homotopies left right top = left ~ (top ∙h right)
+
+ coherence-triangle-homotopies' :
+ (left : f ~ h) (right : g ~ h) (top : f ~ g) → UU (l1 ⊔ l2)
+ coherence-triangle-homotopies' left right top = (top ∙h right) ~ left
+```
+
+## Properties
+
+### Distributive law for left whiskering
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ {f g h : A → B}
+ {l3 : Level} {X : UU l3} (i : B → X)
+ (left : f ~ h) (right : g ~ h) (top : f ~ g)
+ where
+
+ distributivity-left-whisk :
+ coherence-triangle-homotopies left right top →
+ (i ·l left) ~ ((i ·l top) ∙h (i ·l right))
+ distributivity-left-whisk T x =
+ ap-concat-eq i (top x) (right x) (left x) (T x)
+```
+
+### Left whiskering triangles of homotopies
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
+ {f g h : (x : A) → B x}
+ {left : f ~ h} (right : g ~ h) {top : f ~ g}
+ where
+
+ left-whisk-htpy-coherence-triangle-homotopies :
+ {i : (x : A) → B x}
+ (H : h ~ i) (T : coherence-triangle-homotopies left right top) →
+ coherence-triangle-homotopies {h = i} (left ∙h H) (right ∙h H) top
+ left-whisk-htpy-coherence-triangle-homotopies H T =
+ (λ x → ap (_∙ H x) (T x)) ∙h assoc-htpy top right H
+
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ {f g h : A → B}
+ {left : f ~ h} (right : g ~ h) {top : f ~ g}
+ where
+
+ left-whisk-coherence-triangle-homotopies :
+ {l3 : Level} {X : UU l3} (i : B → X)
+ (T : coherence-triangle-homotopies left right top) →
+ coherence-triangle-homotopies
+ {f = i ∘ f} {i ∘ g} {i ∘ h}
+ (i ·l left) (i ·l right) (i ·l top)
+ left-whisk-coherence-triangle-homotopies i =
+ distributivity-left-whisk i left right top
+```
+
+### Right whiskering triangles of homotopies
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
+ {f g h : (x : A) → B x}
+ {left : f ~ h} (right : g ~ h) {top : f ~ g}
+ where
+
+ right-whisk-htpy-coherence-triangle-homotopies :
+ {i : (x : A) → B x}
+ (T : coherence-triangle-homotopies left right top) (H : i ~ f) →
+ coherence-triangle-homotopies {f = i} (H ∙h left) right (H ∙h top)
+ right-whisk-htpy-coherence-triangle-homotopies T H =
+ (λ x → ap (H x ∙_) (T x)) ∙h (inv-htpy-assoc-htpy H top right)
+
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ {f g h : A → B}
+ {left : f ~ h} (right : g ~ h) {top : f ~ g}
+ where
+
+ right-whisk-coherence-triangle-homotopies :
+ {l3 : Level} {X : UU l3}
+ (T : coherence-triangle-homotopies left right top) (i : X → A) →
+ coherence-triangle-homotopies
+ {f = f ∘ i} {g ∘ i} {h ∘ i}
+ (left ·r i) (right ·r i) (top ·r i)
+ right-whisk-coherence-triangle-homotopies T i = T ∘ i
+```
diff --git a/src/foundation/commuting-triangles-of-maps.lagda.md b/src/foundation/commuting-triangles-of-maps.lagda.md
index 2059fad2e0..d280b8579f 100644
--- a/src/foundation/commuting-triangles-of-maps.lagda.md
+++ b/src/foundation/commuting-triangles-of-maps.lagda.md
@@ -11,9 +11,9 @@ open import foundation-core.commuting-triangles-of-maps public
```agda
open import foundation.functoriality-dependent-function-types
open import foundation.identity-types
+open import foundation.universe-levels
open import foundation-core.equivalences
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/complements-subtypes.lagda.md b/src/foundation/complements-subtypes.lagda.md
index 121aa34d0f..4cfd41a52c 100644
--- a/src/foundation/complements-subtypes.lagda.md
+++ b/src/foundation/complements-subtypes.lagda.md
@@ -10,13 +10,13 @@ module foundation.complements-subtypes where
open import foundation.decidable-propositions
open import foundation.decidable-subtypes
open import foundation.full-subtypes
+open import foundation.functions
open import foundation.negation
open import foundation.propositional-truncations
open import foundation.unions-subtypes
+open import foundation.universe-levels
-open import foundation-core.functions
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/complements.lagda.md b/src/foundation/complements.lagda.md
index d3f9c99ab1..0f29fe5564 100644
--- a/src/foundation/complements.lagda.md
+++ b/src/foundation/complements.lagda.md
@@ -7,10 +7,11 @@ module foundation.complements where
Imports
```agda
-open import foundation-core.dependent-pair-types
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.empty-types
-open import foundation-core.functions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/cones-over-cospans.lagda.md b/src/foundation/cones-over-cospans.lagda.md
index 803d27c80d..230bd72e64 100644
--- a/src/foundation/cones-over-cospans.lagda.md
+++ b/src/foundation/cones-over-cospans.lagda.md
@@ -1,15 +1,270 @@
-# Cones on pullback diagrams
+# Cones over cospans
```agda
module foundation.cones-over-cospans where
-
-open import foundation-core.cones-over-cospans public
```
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
+open import foundation.homotopies
+open import foundation.structure-identity-principle
+open import foundation.universe-levels
+open import foundation-core.commuting-squares-of-maps
+open import foundation-core.contractible-types
+open import foundation-core.equivalences
+open import foundation-core.identity-types
```
+
+## Idea
+
+A cone on a cospan `A --f--> X <--g-- B` with vertex `C` is a triple `(p,q,H)`
+consisting of a map `p : C → A`, a map `q : C → B`, and a homotopy `H`
+witnessing that the square
+
+```text
+ q
+ C -----> B
+ | |
+ p| |g
+ V V
+ A -----> X
+ f
+```
+
+commutes.
+
+## Definitions
+
+### Cones on cospans
+
+A cone on a cospan with a vertex C is a pair of functions from C into the
+domains of the maps in the cospan, equipped with a homotopy witnessing that the
+resulting square commutes.
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
+ (f : A → X) (g : B → X)
+ where
+
+ cone : {l4 : Level} → UU l4 → UU (l1 ⊔ l2 ⊔ l3 ⊔ l4)
+ cone C = Σ (C → A) (λ p → Σ (C → B) (λ q → coherence-square-maps q p g f))
+
+module _
+ {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3} {C : UU l4}
+ (f : A → X) (g : B → X) (c : cone f g C)
+ where
+
+ vertical-map-cone : C → A
+ vertical-map-cone = pr1 c
+
+ horizontal-map-cone : C → B
+ horizontal-map-cone = pr1 (pr2 c)
+
+ coherence-square-cone :
+ coherence-square-maps horizontal-map-cone vertical-map-cone g f
+ coherence-square-cone = pr2 (pr2 c)
+```
+
+### Dependent cones
+
+```agda
+cone-family :
+ {l1 l2 l3 l4 l5 l6 l7 l8 : Level}
+ {X : UU l1} {A : UU l2} {B : UU l3} {C : UU l4}
+ (PX : X → UU l5) {PA : A → UU l6} {PB : B → UU l7}
+ {f : A → X} {g : B → X} →
+ (f' : (a : A) → PA a → PX (f a)) (g' : (b : B) → PB b → PX (g b)) →
+ cone f g C → (C → UU l8) → UU (l4 ⊔ l5 ⊔ l6 ⊔ l7 ⊔ l8)
+cone-family {C = C} PX {f = f} {g} f' g' c PC =
+ (x : C) →
+ cone
+ ( ( tr PX (coherence-square-cone f g c x)) ∘
+ ( f' (vertical-map-cone f g c x)))
+ ( g' (horizontal-map-cone f g c x))
+ ( PC x)
+```
+
+### Identifications of cones
+
+Next we characterize the identity type of the type of cones with a given vertex
+C. Note that in the definition of htpy-cone we do not use pattern matching on
+the cones c and c'. This is to ensure that the type htpy-cone f g c c' is a
+Σ-type for any c and c', not just for c and c' of the form (pair p (pair q H))
+and (pair p' (pair q' H')) respectively.
+
+```agda
+module _
+ {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
+ (f : A → X) (g : B → X) {C : UU l4}
+ where
+
+ coherence-htpy-cone :
+ (c c' : cone f g C) (K : vertical-map-cone f g c ~ vertical-map-cone f g c')
+ (L : horizontal-map-cone f g c ~ horizontal-map-cone f g c') → UU (l4 ⊔ l3)
+ coherence-htpy-cone c c' K L =
+ ( coherence-square-cone f g c ∙h (g ·l L)) ~
+ ( (f ·l K) ∙h coherence-square-cone f g c')
+
+ htpy-cone : cone f g C → cone f g C → UU (l1 ⊔ l2 ⊔ l3 ⊔ l4)
+ htpy-cone c c' =
+ Σ ( vertical-map-cone f g c ~ vertical-map-cone f g c')
+ ( λ K →
+ Σ ( horizontal-map-cone f g c ~ horizontal-map-cone f g c')
+ ( coherence-htpy-cone c c' K))
+
+ refl-htpy-cone : (c : cone f g C) → htpy-cone c c
+ pr1 (refl-htpy-cone c) = refl-htpy
+ pr1 (pr2 (refl-htpy-cone c)) = refl-htpy
+ pr2 (pr2 (refl-htpy-cone c)) = right-unit-htpy
+
+ htpy-eq-cone : (c c' : cone f g C) → c = c' → htpy-cone c c'
+ htpy-eq-cone c .c refl = refl-htpy-cone c
+
+ is-contr-total-htpy-cone :
+ (c : cone f g C) → is-contr (Σ (cone f g C) (htpy-cone c))
+ is-contr-total-htpy-cone c =
+ is-contr-total-Eq-structure
+ ( λ p qH K →
+ Σ ( horizontal-map-cone f g c ~ pr1 qH)
+ ( coherence-htpy-cone c (pair p qH) K))
+ ( is-contr-total-htpy (vertical-map-cone f g c))
+ ( pair (vertical-map-cone f g c) refl-htpy)
+ ( is-contr-total-Eq-structure
+ ( λ q H →
+ coherence-htpy-cone c
+ ( pair (vertical-map-cone f g c) (pair q H))
+ ( refl-htpy))
+ ( is-contr-total-htpy (horizontal-map-cone f g c))
+ ( pair (horizontal-map-cone f g c) refl-htpy)
+ ( is-contr-total-htpy (coherence-square-cone f g c ∙h refl-htpy)))
+
+ is-equiv-htpy-eq-cone : (c c' : cone f g C) → is-equiv (htpy-eq-cone c c')
+ is-equiv-htpy-eq-cone c =
+ fundamental-theorem-id (is-contr-total-htpy-cone c) (htpy-eq-cone c)
+
+ extensionality-cone : (c c' : cone f g C) → (c = c') ≃ htpy-cone c c'
+ pr1 (extensionality-cone c c') = htpy-eq-cone c c'
+ pr2 (extensionality-cone c c') = is-equiv-htpy-eq-cone c c'
+
+ eq-htpy-cone : (c c' : cone f g C) → htpy-cone c c' → (c = c')
+ eq-htpy-cone c c' = map-inv-equiv (extensionality-cone c c')
+```
+
+### Precomposing cones
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
+ (f : A → X) (g : B → X)
+ where
+
+ cone-map :
+ {l4 l5 : Level} {C : UU l4} {C' : UU l5} →
+ cone f g C → (C' → C) → cone f g C'
+ pr1 (cone-map c h) = vertical-map-cone f g c ∘ h
+ pr1 (pr2 (cone-map c h)) = horizontal-map-cone f g c ∘ h
+ pr2 (pr2 (cone-map c h)) = coherence-square-cone f g c ·r h
+```
+
+### Pasting cones horizontally
+
+```agda
+module _
+ {l1 l2 l3 l4 l5 l6 : Level}
+ {A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4} {Y : UU l5} {Z : UU l6}
+ (i : X → Y) (j : Y → Z) (h : C → Z)
+ where
+
+ pasting-horizontal-cone :
+ (c : cone j h B) → cone i (vertical-map-cone j h c) A → cone (j ∘ i) h A
+ pr1 (pasting-horizontal-cone c (pair f (pair p H))) = f
+ pr1 (pr2 (pasting-horizontal-cone c (pair f (pair p H)))) =
+ (horizontal-map-cone j h c) ∘ p
+ pr2 (pr2 (pasting-horizontal-cone c (pair f (pair p H)))) =
+ pasting-horizontal-coherence-square-maps p
+ ( horizontal-map-cone j h c)
+ ( f)
+ ( vertical-map-cone j h c)
+ ( h)
+ ( i)
+ ( j)
+ ( H)
+ ( coherence-square-cone j h c)
+```
+
+### Vertical composition of cones
+
+```agda
+module _
+ {l1 l2 l3 l4 l5 l6 : Level}
+ {A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4} {Y : UU l5} {Z : UU l6}
+ (f : C → Z) (g : Y → Z) (h : X → Y)
+ where
+
+ pasting-vertical-cone :
+ (c : cone f g B) → cone (horizontal-map-cone f g c) h A → cone f (g ∘ h) A
+ pr1 (pasting-vertical-cone c (pair p' (pair q' H'))) =
+ ( vertical-map-cone f g c) ∘ p'
+ pr1 (pr2 (pasting-vertical-cone c (pair p' (pair q' H')))) = q'
+ pr2 (pr2 (pasting-vertical-cone c (pair p' (pair q' H')))) =
+ pasting-vertical-coherence-square-maps q' p' h
+ ( horizontal-map-cone f g c)
+ ( vertical-map-cone f g c)
+ ( g)
+ ( f)
+ ( H')
+ ( coherence-square-cone f g c)
+```
+
+### The swapping function on cones
+
+```agda
+swap-cone :
+ {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3} {C : UU l4}
+ (f : A → X) (g : B → X) → cone f g C → cone g f C
+pr1 (swap-cone f g c) = horizontal-map-cone f g c
+pr1 (pr2 (swap-cone f g c)) = vertical-map-cone f g c
+pr2 (pr2 (swap-cone f g c)) = inv-htpy (coherence-square-cone f g c)
+```
+
+### Parallel cones
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
+ {f f' : A → X} (Hf : f ~ f') {g g' : B → X} (Hg : g ~ g')
+ where
+
+ coherence-htpy-parallel-cone :
+ {l4 : Level} {C : UU l4} (c : cone f g C) (c' : cone f' g' C)
+ (Hp : vertical-map-cone f g c ~ vertical-map-cone f' g' c')
+ (Hq : horizontal-map-cone f g c ~ horizontal-map-cone f' g' c') →
+ UU (l3 ⊔ l4)
+ coherence-htpy-parallel-cone c c' Hp Hq =
+ ( ( coherence-square-cone f g c) ∙h
+ ( (g ·l Hq) ∙h (Hg ·r horizontal-map-cone f' g' c'))) ~
+ ( ( (f ·l Hp) ∙h (Hf ·r (vertical-map-cone f' g' c'))) ∙h
+ ( coherence-square-cone f' g' c'))
+
+ fam-htpy-parallel-cone :
+ {l4 : Level} {C : UU l4} (c : cone f g C) → (c' : cone f' g' C) →
+ (vertical-map-cone f g c ~ vertical-map-cone f' g' c') → UU (l2 ⊔ l3 ⊔ l4)
+ fam-htpy-parallel-cone c c' Hp =
+ Σ ( horizontal-map-cone f g c ~ horizontal-map-cone f' g' c')
+ ( coherence-htpy-parallel-cone c c' Hp)
+
+ htpy-parallel-cone :
+ {l4 : Level} {C : UU l4} →
+ cone f g C → cone f' g' C → UU (l1 ⊔ l2 ⊔ l3 ⊔ l4)
+ htpy-parallel-cone c c' =
+ Σ ( vertical-map-cone f g c ~ vertical-map-cone f' g' c')
+ ( fam-htpy-parallel-cone c c')
+```
diff --git a/src/foundation/conjunction.lagda.md b/src/foundation/conjunction.lagda.md
index d58a82f640..e51be853a1 100644
--- a/src/foundation/conjunction.lagda.md
+++ b/src/foundation/conjunction.lagda.md
@@ -8,14 +8,14 @@ module foundation.conjunction where
```agda
open import foundation.decidable-types
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.decidable-propositions
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.logical-equivalences
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/connected-components-universes.lagda.md b/src/foundation/connected-components-universes.lagda.md
index 8a49f0484a..12a11e3726 100644
--- a/src/foundation/connected-components-universes.lagda.md
+++ b/src/foundation/connected-components-universes.lagda.md
@@ -8,22 +8,22 @@ module foundation.connected-components-universes where
```agda
open import foundation.0-connected-types
+open import foundation.dependent-pair-types
open import foundation.empty-types
open import foundation.functoriality-propositional-truncation
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.mere-equivalences
open import foundation.propositional-truncations
open import foundation.raising-universe-levels
+open import foundation.subtype-identity-principle
open import foundation.subuniverses
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
-open import foundation-core.subtype-identity-principle
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/connected-components.lagda.md b/src/foundation/connected-components.lagda.md
index 45e7031cba..d17d7a1006 100644
--- a/src/foundation/connected-components.lagda.md
+++ b/src/foundation/connected-components.lagda.md
@@ -8,15 +8,15 @@ module foundation.connected-components where
```agda
open import foundation.0-connected-types
+open import foundation.dependent-pair-types
open import foundation.propositional-truncations
open import foundation.propositions
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.identity-types
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
open import higher-group-theory.higher-groups
diff --git a/src/foundation/connected-maps.lagda.md b/src/foundation/connected-maps.lagda.md
index c424bdcd1c..a2fd7c26ff 100644
--- a/src/foundation/connected-maps.lagda.md
+++ b/src/foundation/connected-maps.lagda.md
@@ -8,27 +8,27 @@ module foundation.connected-maps where
```agda
open import foundation.connected-types
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.functoriality-dependent-function-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.homotopies
open import foundation.structure-identity-principle
+open import foundation.subtype-identity-principle
open import foundation.truncated-types
open import foundation.truncation-levels
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.subtype-identity-principle
open import foundation-core.subtypes
open import foundation-core.truncated-maps
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/connected-types.lagda.md b/src/foundation/connected-types.lagda.md
index f422aacc59..5c725a0a9b 100644
--- a/src/foundation/connected-types.lagda.md
+++ b/src/foundation/connected-types.lagda.md
@@ -8,15 +8,15 @@ module foundation.connected-types where
```agda
open import foundation.contractible-types
+open import foundation.functions
open import foundation.truncations
+open import foundation.universe-levels
open import foundation-core.constant-maps
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.propositions
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/constant-maps.lagda.md b/src/foundation/constant-maps.lagda.md
index 1b7928aba8..0b45fca91f 100644
--- a/src/foundation/constant-maps.lagda.md
+++ b/src/foundation/constant-maps.lagda.md
@@ -9,19 +9,20 @@ open import foundation-core.constant-maps public
Imports
```agda
+open import foundation.0-maps
+open import foundation.dependent-pair-types
+open import foundation.faithful-maps
+open import foundation.functions
open import foundation.type-arithmetic-unit-type
open import foundation.unit-type
+open import foundation.universe-levels
-open import foundation-core.0-maps
open import foundation-core.1-types
open import foundation-core.contractible-maps
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalences
-open import foundation-core.faithful-maps
open import foundation-core.fibers-of-maps
open import foundation-core.function-extensionality
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.injective-maps
open import foundation-core.propositional-maps
@@ -30,7 +31,6 @@ open import foundation-core.sets
open import foundation-core.truncated-maps
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/contractible-maps.lagda.md b/src/foundation/contractible-maps.lagda.md
index e766b06c92..18f0b23fb7 100644
--- a/src/foundation/contractible-maps.lagda.md
+++ b/src/foundation/contractible-maps.lagda.md
@@ -9,14 +9,14 @@ open import foundation-core.contractible-maps public
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalences
open import foundation.truncated-maps
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.logical-equivalences
open import foundation-core.propositions
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/contractible-types.lagda.md b/src/foundation/contractible-types.lagda.md
index 9a5b9eef02..d5ea7a0d8e 100644
--- a/src/foundation/contractible-types.lagda.md
+++ b/src/foundation/contractible-types.lagda.md
@@ -9,15 +9,16 @@ open import foundation-core.contractible-types public
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.subuniverses
open import foundation.unit-type
+open import foundation.universe-levels
open import foundation-core.constant-maps
open import foundation-core.contractible-maps
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.identity-types
open import foundation-core.propositions
@@ -25,7 +26,6 @@ open import foundation-core.singleton-induction
open import foundation-core.subtypes
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/coproduct-decompositions-subuniverse.lagda.md b/src/foundation/coproduct-decompositions-subuniverse.lagda.md
index 5525b0a865..ecb6f55b78 100644
--- a/src/foundation/coproduct-decompositions-subuniverse.lagda.md
+++ b/src/foundation/coproduct-decompositions-subuniverse.lagda.md
@@ -8,29 +8,29 @@ module foundation.coproduct-decompositions-subuniverse where
```agda
open import foundation.coproduct-types
+open import foundation.dependent-pair-types
open import foundation.empty-types
open import foundation.equivalence-extensionality
open import foundation.equivalences
+open import foundation.functions
open import foundation.functoriality-coproduct-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.structure-identity-principle
open import foundation.subuniverses
+open import foundation.type-arithmetic-cartesian-product-types
open import foundation.type-arithmetic-coproduct-types
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.type-arithmetic-empty-type
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.type-arithmetic-cartesian-product-types
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/coproduct-decompositions.lagda.md b/src/foundation/coproduct-decompositions.lagda.md
index 70b334af02..9af4b8750f 100644
--- a/src/foundation/coproduct-decompositions.lagda.md
+++ b/src/foundation/coproduct-decompositions.lagda.md
@@ -8,30 +8,30 @@ module foundation.coproduct-decompositions where
```agda
open import foundation.coproduct-decompositions-subuniverse
+open import foundation.dependent-pair-types
open import foundation.equivalence-extensionality
open import foundation.equivalences
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.functoriality-coproduct-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.structure-identity-principle
open import foundation.transport
open import foundation.type-arithmetic-coproduct-types
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.type-arithmetic-empty-type
open import foundation.unit-type
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.contractible-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
open import univalent-combinatorics.equality-standard-finite-types
open import univalent-combinatorics.standard-finite-types
diff --git a/src/foundation/coproduct-types.lagda.md b/src/foundation/coproduct-types.lagda.md
index 5e05033bb9..6d27e4124f 100644
--- a/src/foundation/coproduct-types.lagda.md
+++ b/src/foundation/coproduct-types.lagda.md
@@ -9,21 +9,21 @@ open import foundation-core.coproduct-types public
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.noncontractible-types
open import foundation.subuniverses
open import foundation.unit-type
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.injective-maps
open import foundation-core.negation
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/coslice.lagda.md b/src/foundation/coslice.lagda.md
index 76327b8166..e9038837b9 100644
--- a/src/foundation/coslice.lagda.md
+++ b/src/foundation/coslice.lagda.md
@@ -7,15 +7,15 @@ module foundation.coslice where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.structure-identity-principle
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/cospans.lagda.md b/src/foundation/cospans.lagda.md
index cf0e05263e..64d4a9f3eb 100644
--- a/src/foundation/cospans.lagda.md
+++ b/src/foundation/cospans.lagda.md
@@ -1,15 +1,32 @@
# Cospans
```agda
-module foundation.cospans where
+{-# OPTIONS --safe #-}
-open import foundation-core.cospans public
+module foundation.cospans where
```
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
+open import foundation-core.cartesian-product-types
```
+
+## Definition
+
+### Cospans
+
+A cospan is a pair of functions with a common codomain
+
+```agda
+cospan :
+ {l1 l2 : Level} (l : Level) (A : UU l1) (B : UU l2) →
+ UU (l1 ⊔ l2 ⊔ lsuc l)
+cospan l A B =
+ Σ (UU l) (λ X → (A → X) × (B → X))
+```
diff --git a/src/foundation/decidable-dependent-function-types.lagda.md b/src/foundation/decidable-dependent-function-types.lagda.md
index 823be37ea8..09cf70c1df 100644
--- a/src/foundation/decidable-dependent-function-types.lagda.md
+++ b/src/foundation/decidable-dependent-function-types.lagda.md
@@ -12,10 +12,10 @@ open import foundation.functoriality-dependent-function-types
open import foundation.maybe
open import foundation.universal-property-coproduct-types
open import foundation.universal-property-maybe
+open import foundation.universe-levels
open import foundation-core.coproduct-types
open import foundation-core.equivalences
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/decidable-dependent-pair-types.lagda.md b/src/foundation/decidable-dependent-pair-types.lagda.md
index d0d6af97e2..6aebc9f8d2 100644
--- a/src/foundation/decidable-dependent-pair-types.lagda.md
+++ b/src/foundation/decidable-dependent-pair-types.lagda.md
@@ -8,16 +8,16 @@ module foundation.decidable-dependent-pair-types where
```agda
open import foundation.decidable-types
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.maybe
open import foundation.type-arithmetic-coproduct-types
open import foundation.type-arithmetic-unit-type
+open import foundation.universe-levels
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/decidable-embeddings.lagda.md b/src/foundation/decidable-embeddings.lagda.md
index 2e688837cb..84a86a8088 100644
--- a/src/foundation/decidable-embeddings.lagda.md
+++ b/src/foundation/decidable-embeddings.lagda.md
@@ -10,30 +10,30 @@ module foundation.decidable-embeddings where
open import foundation.decidable-maps
open import foundation.decidable-subtypes
open import foundation.decidable-types
+open import foundation.dependent-pair-types
open import foundation.embeddings
open import foundation.equivalences
+open import foundation.functions
open import foundation.functoriality-cartesian-product-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.homotopies
open import foundation.identity-types
open import foundation.propositional-maps
open import foundation.structured-type-duality
+open import foundation.subtype-identity-principle
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.type-theoretic-principle-of-choice
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
open import foundation-core.coproduct-types
open import foundation-core.decidable-propositions
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.propositions
-open import foundation-core.subtype-identity-principle
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/decidable-equality.lagda.md b/src/foundation/decidable-equality.lagda.md
index 5f95c34604..e05333ade2 100644
--- a/src/foundation/decidable-equality.lagda.md
+++ b/src/foundation/decidable-equality.lagda.md
@@ -9,13 +9,15 @@ module foundation.decidable-equality where
```agda
open import foundation.coproduct-types
open import foundation.decidable-types
+open import foundation.dependent-pair-types
open import foundation.double-negation
open import foundation.negation
open import foundation.sections
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.unit-type
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
@@ -25,8 +27,6 @@ open import foundation-core.injective-maps
open import foundation-core.propositions
open import foundation-core.retractions
open import foundation-core.sets
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/decidable-equivalence-relations.lagda.md b/src/foundation/decidable-equivalence-relations.lagda.md
index a6c773928a..c1bdfbcbaf 100644
--- a/src/foundation/decidable-equivalence-relations.lagda.md
+++ b/src/foundation/decidable-equivalence-relations.lagda.md
@@ -12,38 +12,38 @@ open import foundation.decidable-propositions
open import foundation.decidable-relations
open import foundation.decidable-subtypes
open import foundation.decidable-types
+open import foundation.dependent-pair-types
open import foundation.effective-maps-equivalence-relations
open import foundation.equivalence-classes
open import foundation.equivalence-relations
open import foundation.existential-quantification
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.functoriality-cartesian-product-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.images
open import foundation.propositional-truncations
open import foundation.reflecting-maps-equivalence-relations
open import foundation.sets
open import foundation.slice
open import foundation.surjective-maps
+open import foundation.type-arithmetic-cartesian-product-types
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.universal-property-image
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.logical-equivalences
open import foundation-core.propositions
open import foundation-core.subtypes
-open import foundation-core.type-arithmetic-cartesian-product-types
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/decidable-maps.lagda.md b/src/foundation/decidable-maps.lagda.md
index 85be938057..9425419115 100644
--- a/src/foundation/decidable-maps.lagda.md
+++ b/src/foundation/decidable-maps.lagda.md
@@ -9,15 +9,15 @@ module foundation.decidable-maps where
```agda
open import foundation.decidable-equality
open import foundation.decidable-types
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.identity-types
open import foundation-core.retractions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/decidable-propositions.lagda.md b/src/foundation/decidable-propositions.lagda.md
index e17f83b1cf..a6fe35d9d5 100644
--- a/src/foundation/decidable-propositions.lagda.md
+++ b/src/foundation/decidable-propositions.lagda.md
@@ -11,19 +11,21 @@ open import foundation-core.decidable-propositions public
```agda
open import foundation.booleans
open import foundation.decidable-types
+open import foundation.dependent-pair-types
open import foundation.embeddings
open import foundation.empty-types
open import foundation.equivalences
+open import foundation.functions
open import foundation.negation
open import foundation.propositional-extensionality
open import foundation.raising-universe-levels
open import foundation.type-arithmetic-coproduct-types
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.unit-type
+open import foundation.universe-levels
open import foundation-core.contractible-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.logical-equivalences
@@ -31,8 +33,6 @@ open import foundation-core.propositions
open import foundation-core.sets
open import foundation-core.small-types
open import foundation-core.subtypes
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
open import univalent-combinatorics.counting
open import univalent-combinatorics.finite-types
diff --git a/src/foundation/decidable-relations.lagda.md b/src/foundation/decidable-relations.lagda.md
index 373987f117..2259337ca0 100644
--- a/src/foundation/decidable-relations.lagda.md
+++ b/src/foundation/decidable-relations.lagda.md
@@ -9,13 +9,13 @@ module foundation.decidable-relations where
```agda
open import foundation.binary-relations
open import foundation.decidable-types
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
open import foundation-core.decidable-propositions
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.homotopies
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/decidable-subtypes.lagda.md b/src/foundation/decidable-subtypes.lagda.md
index abff817889..f3740a0a04 100644
--- a/src/foundation/decidable-subtypes.lagda.md
+++ b/src/foundation/decidable-subtypes.lagda.md
@@ -11,22 +11,22 @@ open import foundation.1-types
open import foundation.coproduct-types
open import foundation.decidable-propositions
open import foundation.decidable-types
+open import foundation.dependent-pair-types
open import foundation.equality-dependent-function-types
+open import foundation.functions
open import foundation.functoriality-dependent-function-types
open import foundation.sets
open import foundation.subtypes
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.injective-maps
open import foundation-core.logical-equivalences
open import foundation-core.propositions
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/decidable-types.lagda.md b/src/foundation/decidable-types.lagda.md
index 3e21cd02d5..42fda7ccc7 100644
--- a/src/foundation/decidable-types.lagda.md
+++ b/src/foundation/decidable-types.lagda.md
@@ -8,22 +8,22 @@ module foundation.decidable-types where
```agda
open import foundation.coproduct-types
+open import foundation.dependent-pair-types
open import foundation.double-negation
open import foundation.empty-types
+open import foundation.functions
open import foundation.hilberts-epsilon-operators
open import foundation.negation
open import foundation.propositional-truncations
open import foundation.raising-universe-levels
open import foundation.type-arithmetic-empty-type
open import foundation.unit-type
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.propositions
open import foundation-core.retractions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/dependent-binomial-theorem.lagda.md b/src/foundation/dependent-binomial-theorem.lagda.md
index bcaca71bdb..ed58754757 100644
--- a/src/foundation/dependent-binomial-theorem.lagda.md
+++ b/src/foundation/dependent-binomial-theorem.lagda.md
@@ -9,6 +9,8 @@ module foundation.dependent-binomial-theorem where
```agda
open import foundation.contractible-types
open import foundation.coproduct-decompositions
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.functoriality-cartesian-product-types
open import foundation.functoriality-dependent-function-types
open import foundation.identity-types
@@ -16,16 +18,14 @@ open import foundation.raising-universe-levels
open import foundation.type-theoretic-principle-of-choice
open import foundation.universal-property-coproduct-types
open import foundation.universal-property-dependent-pair-types
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.univalence
-open import foundation-core.universe-levels
open import univalent-combinatorics.equality-standard-finite-types
open import univalent-combinatorics.standard-finite-types
diff --git a/src/foundation/dependent-pair-types.lagda.md b/src/foundation/dependent-pair-types.lagda.md
index 51da817145..6e1c81b293 100644
--- a/src/foundation/dependent-pair-types.lagda.md
+++ b/src/foundation/dependent-pair-types.lagda.md
@@ -4,14 +4,75 @@
{-# OPTIONS --safe #-}
module foundation.dependent-pair-types where
-
-open import foundation-core.dependent-pair-types public
```
Imports
```agda
-
+open import foundation.universe-levels
```
+
+## Idea
+
+When `B` is a family of types over `A`, then we can form the type of pairs
+`pair a b` consisting of an element `a : A` and an element `b : B a`. Such pairs
+are called dependent pairs, since the type of the second component depends on
+the first component.
+
+## Definition
+
+```agda
+record Σ {l1 l2 : Level} (A : UU l1) (B : A → UU l2) : UU (l1 ⊔ l2) where
+ constructor pair
+ field
+ pr1 : A
+ pr2 : B pr1
+
+open Σ public
+
+{-# BUILTIN SIGMA Σ #-}
+
+infixr 10 _,_
+pattern _,_ a b = pair a b
+```
+
+## Constructions
+
+```agda
+ind-Σ :
+ {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : Σ A B → UU l3} →
+ ((x : A) (y : B x) → C (pair x y)) → ((t : Σ A B) → C t)
+ind-Σ f (pair x y) = f x y
+
+ev-pair :
+ {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : Σ A B → UU l3} →
+ ((t : Σ A B) → C t) → (x : A) (y : B x) → C (pair x y)
+ev-pair f x y = f (pair x y)
+
+triple :
+ {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : (x : A) → B x → UU l3} →
+ (a : A) (b : B a) → C a b → Σ A (λ x → Σ (B x) (C x))
+pr1 (triple a b c) = a
+pr1 (pr2 (triple a b c)) = b
+pr2 (pr2 (triple a b c)) = c
+
+triple' :
+ {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : Σ A B → UU l3} →
+ (a : A) (b : B a) → C (pair a b) → Σ (Σ A B) C
+pr1 (pr1 (triple' a b c)) = a
+pr2 (pr1 (triple' a b c)) = b
+pr2 (triple' a b c) = c
+```
+
+### Families on dependent pair types
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2}
+ where
+
+ fam-Σ : ((x : A) → B x → UU l3) → Σ A B → UU l3
+ fam-Σ C (pair x y) = C x y
+```
diff --git a/src/foundation/dependent-paths.lagda.md b/src/foundation/dependent-paths.lagda.md
index d189c56479..9af20ccccf 100644
--- a/src/foundation/dependent-paths.lagda.md
+++ b/src/foundation/dependent-paths.lagda.md
@@ -11,14 +11,14 @@ module foundation.dependent-paths where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.identity-types
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/descent-coproduct-types.lagda.md b/src/foundation/descent-coproduct-types.lagda.md
index 4c18a95486..017dd6a8db 100644
--- a/src/foundation/descent-coproduct-types.lagda.md
+++ b/src/foundation/descent-coproduct-types.lagda.md
@@ -7,19 +7,19 @@ module foundation.descent-coproduct-types where
Imports
```agda
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.functoriality-coproduct-types
+open import foundation.functoriality-fibers-of-maps
+open import foundation.universe-levels
-open import foundation-core.cones-over-cospans
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
-open import foundation-core.functoriality-fibers-of-maps
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.pullbacks
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/descent-dependent-pair-types.lagda.md b/src/foundation/descent-dependent-pair-types.lagda.md
index 6c3e1f1853..ef4c7e05f8 100644
--- a/src/foundation/descent-dependent-pair-types.lagda.md
+++ b/src/foundation/descent-dependent-pair-types.lagda.md
@@ -7,16 +7,17 @@ module foundation.descent-dependent-pair-types where
Imports
```agda
-open import foundation-core.cones-over-cospans
-open import foundation-core.dependent-pair-types
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.functoriality-fibers-of-maps
+open import foundation.universe-levels
+
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.functoriality-fibers-of-maps
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.pullbacks
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/descent-empty-types.lagda.md b/src/foundation/descent-empty-types.lagda.md
index 12794b99f4..e806d4e520 100644
--- a/src/foundation/descent-empty-types.lagda.md
+++ b/src/foundation/descent-empty-types.lagda.md
@@ -7,11 +7,12 @@ module foundation.descent-empty-types where
Imports
```agda
-open import foundation-core.cones-over-cospans
-open import foundation-core.dependent-pair-types
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
+
open import foundation-core.empty-types
open import foundation-core.pullbacks
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/descent-equivalences.lagda.md b/src/foundation/descent-equivalences.lagda.md
index a013c44593..60c172dc23 100644
--- a/src/foundation/descent-equivalences.lagda.md
+++ b/src/foundation/descent-equivalences.lagda.md
@@ -7,14 +7,14 @@ module foundation.descent-equivalences where
Imports
```agda
+open import foundation.cones-over-cospans
open import foundation.equivalences
+open import foundation.functions
+open import foundation.functoriality-fibers-of-maps
+open import foundation.universe-levels
-open import foundation-core.cones-over-cospans
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-function-types
-open import foundation-core.functoriality-fibers-of-maps
open import foundation-core.pullbacks
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/diagonal-maps-of-types.lagda.md b/src/foundation/diagonal-maps-of-types.lagda.md
index 516b912b02..16ee5f17da 100644
--- a/src/foundation/diagonal-maps-of-types.lagda.md
+++ b/src/foundation/diagonal-maps-of-types.lagda.md
@@ -9,13 +9,15 @@ open import foundation-core.diagonal-maps-of-types public
Imports
```agda
-open import foundation-core.0-maps
+open import foundation.0-maps
+open import foundation.dependent-pair-types
+open import foundation.faithful-maps
+open import foundation.universe-levels
+
open import foundation-core.1-types
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-maps
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
-open import foundation-core.faithful-maps
open import foundation-core.fibers-of-maps
open import foundation-core.identity-types
open import foundation-core.propositional-maps
@@ -24,7 +26,6 @@ open import foundation-core.sets
open import foundation-core.truncated-maps
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/diagonals-of-maps.lagda.md b/src/foundation/diagonals-of-maps.lagda.md
index 931d48afc7..d30ee97f8e 100644
--- a/src/foundation/diagonals-of-maps.lagda.md
+++ b/src/foundation/diagonals-of-maps.lagda.md
@@ -7,13 +7,15 @@ module foundation.diagonals-of-maps where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.equality-fibers-of-maps
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.contractible-maps
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
-open import foundation-core.equality-fibers-of-maps
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.propositional-maps
@@ -21,7 +23,6 @@ open import foundation-core.pullbacks
open import foundation-core.truncated-maps
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/discrete-reflexive-relations.lagda.md b/src/foundation/discrete-reflexive-relations.lagda.md
index 40fc63c05f..25fc505757 100644
--- a/src/foundation/discrete-reflexive-relations.lagda.md
+++ b/src/foundation/discrete-reflexive-relations.lagda.md
@@ -8,12 +8,12 @@ module foundation.discrete-reflexive-relations where
```agda
open import foundation.contractible-types
+open import foundation.dependent-pair-types
open import foundation.reflexive-relations
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/discrete-relaxed-sigma-decompositions.lagda.md b/src/foundation/discrete-relaxed-sigma-decompositions.lagda.md
index cc3d5a9376..9fd25d84b5 100644
--- a/src/foundation/discrete-relaxed-sigma-decompositions.lagda.md
+++ b/src/foundation/discrete-relaxed-sigma-decompositions.lagda.md
@@ -8,18 +8,18 @@ module foundation.discrete-relaxed-sigma-decompositions where
```agda
open import foundation.contractible-types
+open import foundation.dependent-pair-types
open import foundation.equivalences
+open import foundation.functions
open import foundation.relaxed-sigma-decompositions
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.unit-type
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.subtypes
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/discrete-sigma-decompositions.lagda.md b/src/foundation/discrete-sigma-decompositions.lagda.md
index 8a65930e69..4055e60dce 100644
--- a/src/foundation/discrete-sigma-decompositions.lagda.md
+++ b/src/foundation/discrete-sigma-decompositions.lagda.md
@@ -8,19 +8,19 @@ module foundation.discrete-sigma-decompositions where
```agda
open import foundation.contractible-types
+open import foundation.dependent-pair-types
open import foundation.equivalences
+open import foundation.functions
open import foundation.propositional-truncations
open import foundation.sigma-decompositions
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.unit-type
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.subtypes
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/discrete-types.lagda.md b/src/foundation/discrete-types.lagda.md
index c6a95477d9..734915f32a 100644
--- a/src/foundation/discrete-types.lagda.md
+++ b/src/foundation/discrete-types.lagda.md
@@ -12,15 +12,15 @@ open import foundation-core.discrete-types public
open import foundation.apartness-relations
open import foundation.binary-relations
open import foundation.decidable-types
+open import foundation.dependent-pair-types
open import foundation.negation
open import foundation.propositional-truncations
open import foundation.tight-apartness-relations
+open import foundation.universe-levels
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/disjunction.lagda.md b/src/foundation/disjunction.lagda.md
index a06f1c133a..4b176414df 100644
--- a/src/foundation/disjunction.lagda.md
+++ b/src/foundation/disjunction.lagda.md
@@ -9,15 +9,15 @@ module foundation.disjunction where
```agda
open import foundation.conjunction
open import foundation.decidable-types
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.propositional-truncations
+open import foundation.universe-levels
open import foundation-core.coproduct-types
open import foundation-core.decidable-propositions
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/double-negation.lagda.md b/src/foundation/double-negation.lagda.md
index a623e0aee0..645301205d 100644
--- a/src/foundation/double-negation.lagda.md
+++ b/src/foundation/double-negation.lagda.md
@@ -7,16 +7,16 @@ module foundation.double-negation where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.negation
open import foundation.propositional-truncations
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
-open import foundation-core.functions
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/double-powersets.lagda.md b/src/foundation/double-powersets.lagda.md
index db2fa08402..9788978ec3 100644
--- a/src/foundation/double-powersets.lagda.md
+++ b/src/foundation/double-powersets.lagda.md
@@ -7,14 +7,14 @@ module foundation.double-powersets where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.existential-quantification
open import foundation.powersets
open import foundation.propositional-truncations
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.propositions
open import foundation-core.subtypes
-open import foundation-core.universe-levels
open import order-theory.large-posets
open import order-theory.posets
diff --git a/src/foundation/dubuc-penon-compact-types.lagda.md b/src/foundation/dubuc-penon-compact-types.lagda.md
index 1e9545dc7b..fd422c89a8 100644
--- a/src/foundation/dubuc-penon-compact-types.lagda.md
+++ b/src/foundation/dubuc-penon-compact-types.lagda.md
@@ -8,10 +8,10 @@ module foundation.dubuc-penon-compact-types where
```agda
open import foundation.disjunction
+open import foundation.universe-levels
open import foundation-core.propositions
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/effective-maps-equivalence-relations.lagda.md b/src/foundation/effective-maps-equivalence-relations.lagda.md
index 21dae9d8a2..2063e9e857 100644
--- a/src/foundation/effective-maps-equivalence-relations.lagda.md
+++ b/src/foundation/effective-maps-equivalence-relations.lagda.md
@@ -8,12 +8,12 @@ module foundation.effective-maps-equivalence-relations where
```agda
open import foundation.surjective-maps
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.equivalence-relations
open import foundation-core.equivalences
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/embeddings.lagda.md b/src/foundation/embeddings.lagda.md
index 89af8d2961..41629acf37 100644
--- a/src/foundation/embeddings.lagda.md
+++ b/src/foundation/embeddings.lagda.md
@@ -10,24 +10,24 @@ open import foundation-core.embeddings public
```agda
open import foundation.commuting-squares-of-maps
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
open import foundation.equivalences
+open import foundation.functions
open import foundation.functoriality-cartesian-product-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.identity-types
open import foundation.truncated-maps
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.cones-over-cospans
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.homotopies
open import foundation-core.propositional-maps
open import foundation-core.propositions
open import foundation-core.pullbacks
open import foundation-core.sections
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/empty-types.lagda.md b/src/foundation/empty-types.lagda.md
index 7eb6528d83..7f2ba7f8cd 100644
--- a/src/foundation/empty-types.lagda.md
+++ b/src/foundation/empty-types.lagda.md
@@ -9,19 +9,19 @@ open import foundation-core.empty-types public
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.embeddings
open import foundation.equivalences
+open import foundation.functions
open import foundation.propositional-truncations
open import foundation.raising-universe-levels
open import foundation.subuniverses
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
-open import foundation-core.functions
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/endomorphisms.lagda.md b/src/foundation/endomorphisms.lagda.md
index 64a209f79e..a455eff47a 100644
--- a/src/foundation/endomorphisms.lagda.md
+++ b/src/foundation/endomorphisms.lagda.md
@@ -9,13 +9,13 @@ open import foundation-core.endomorphisms public
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.unit-type
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.sets
-open import foundation-core.universe-levels
open import group-theory.monoids
open import group-theory.semigroups
diff --git a/src/foundation/epimorphisms-with-respect-to-sets.lagda.md b/src/foundation/epimorphisms-with-respect-to-sets.lagda.md
index ffaee41cfc..b4e68a027c 100644
--- a/src/foundation/epimorphisms-with-respect-to-sets.lagda.md
+++ b/src/foundation/epimorphisms-with-respect-to-sets.lagda.md
@@ -7,6 +7,7 @@ module foundation.epimorphisms-with-respect-to-sets where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.epimorphisms-with-respect-to-truncated-types
open import foundation.existential-quantification
open import foundation.function-extensionality
@@ -15,15 +16,14 @@ open import foundation.propositional-truncations
open import foundation.sets
open import foundation.surjective-maps
open import foundation.unit-type
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.identity-types
open import foundation-core.injective-maps
open import foundation-core.propositions
open import foundation-core.truncation-levels
open import foundation-core.univalence
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/epimorphisms-with-respect-to-truncated-types.lagda.md b/src/foundation/epimorphisms-with-respect-to-truncated-types.lagda.md
index 113971539c..d4960f19a1 100644
--- a/src/foundation/epimorphisms-with-respect-to-truncated-types.lagda.md
+++ b/src/foundation/epimorphisms-with-respect-to-truncated-types.lagda.md
@@ -9,17 +9,17 @@ module foundation.epimorphisms-with-respect-to-truncated-types where
```agda
open import foundation.commuting-squares-of-maps
open import foundation.embeddings
+open import foundation.functions
open import foundation.functoriality-truncation
open import foundation.truncation-equivalences
open import foundation.truncations
+open import foundation.universe-levels
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.propositions
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/epimorphisms.lagda.md b/src/foundation/epimorphisms.lagda.md
index db87b50a46..4c841a5fc7 100644
--- a/src/foundation/epimorphisms.lagda.md
+++ b/src/foundation/epimorphisms.lagda.md
@@ -7,9 +7,10 @@ module foundation.epimorphisms where
Imports
```agda
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.embeddings
-open import foundation-core.functions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/equality-cartesian-product-types.lagda.md b/src/foundation/equality-cartesian-product-types.lagda.md
index 906fb34d9f..dfe39e941a 100644
--- a/src/foundation/equality-cartesian-product-types.lagda.md
+++ b/src/foundation/equality-cartesian-product-types.lagda.md
@@ -1,15 +1,148 @@
# Equality of cartesian product types
```agda
-module foundation.equality-cartesian-product-types where
+{-# OPTIONS --safe #-}
-open import foundation-core.equality-cartesian-product-types public
+module foundation.equality-cartesian-product-types where
```
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+open import foundation-core.cartesian-product-types
+open import foundation-core.equivalences
+open import foundation-core.homotopies
+open import foundation-core.identity-types
```
+
+## Idea
+
+Identifications `Id (pair x y) (pair x' y')` in a cartesian product are
+equivalently described as pairs of identifications `Id x x'` and `Id y y'`. This
+provides us with a characterization of the identity type of cartesian product
+types.
+
+## Definition
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ where
+
+ Eq-prod : (s t : A × B) → UU (l1 ⊔ l2)
+ Eq-prod s t = ((pr1 s) = (pr1 t)) × ((pr2 s) = (pr2 t))
+```
+
+## Properties
+
+### The type `Eq-prod s t` is equivalent to `Id s t`
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ where
+
+ eq-pair' : {s t : A × B} → Eq-prod s t → s = t
+ eq-pair' {pair x y} {pair .x .y} (pair refl refl) = refl
+
+ eq-pair :
+ {s t : A × B} → (pr1 s) = (pr1 t) → (pr2 s) = (pr2 t) → s = t
+ eq-pair p q = eq-pair' (pair p q)
+
+ pair-eq : {s t : A × B} → s = t → Eq-prod s t
+ pr1 (pair-eq α) = ap pr1 α
+ pr2 (pair-eq α) = ap pr2 α
+
+ isretr-pair-eq :
+ {s t : A × B} → ((pair-eq {s} {t}) ∘ (eq-pair' {s} {t})) ~ id
+ isretr-pair-eq {pair x y} {pair .x .y} (pair refl refl) = refl
+
+ issec-pair-eq :
+ {s t : A × B} → ((eq-pair' {s} {t}) ∘ (pair-eq {s} {t})) ~ id
+ issec-pair-eq {pair x y} {pair .x .y} refl = refl
+
+ abstract
+ is-equiv-eq-pair :
+ (s t : A × B) → is-equiv (eq-pair' {s} {t})
+ is-equiv-eq-pair s t =
+ is-equiv-has-inverse pair-eq issec-pair-eq isretr-pair-eq
+
+ equiv-eq-pair :
+ (s t : A × B) → Eq-prod s t ≃ (s = t)
+ pr1 (equiv-eq-pair s t) = eq-pair'
+ pr2 (equiv-eq-pair s t) = is-equiv-eq-pair s t
+
+ abstract
+ is-equiv-pair-eq :
+ (s t : A × B) → is-equiv (pair-eq {s} {t})
+ is-equiv-pair-eq s t =
+ is-equiv-has-inverse eq-pair' isretr-pair-eq issec-pair-eq
+
+ equiv-pair-eq :
+ (s t : A × B) → (s = t) ≃ Eq-prod s t
+ pr1 (equiv-pair-eq s t) = pair-eq
+ pr2 (equiv-pair-eq s t) = is-equiv-pair-eq s t
+```
+
+## Properties
+
+### Commuting triangles for `eq-pair`
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ where
+
+ triangle-eq-pair :
+ {a0 a1 : A} {b0 b1 : B} (p : a0 = a1) (q : b0 = b1) →
+ eq-pair p q = ((eq-pair p refl) ∙ (eq-pair refl q))
+ triangle-eq-pair refl refl = refl
+
+ triangle-eq-pair' :
+ {a0 a1 : A} {b0 b1 : B} (p : a0 = a1) (q : b0 = b1) →
+ eq-pair p q = ((eq-pair refl q) ∙ (eq-pair p refl))
+ triangle-eq-pair' refl refl = refl
+```
+
+### `eq-pair` preserves concatenation
+
+```agda
+eq-pair-concat :
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} {x x' x'' : A} {y y' y'' : B}
+ (p : x = x') (p' : x' = x'') (q : y = y') (q' : y' = y'') →
+ ( eq-pair {s = pair x y} {t = pair x'' y''} (p ∙ p') (q ∙ q')) =
+ ( ( eq-pair {s = pair x y} {t = pair x' y'} p q) ∙
+ ( eq-pair p' q'))
+eq-pair-concat refl p' refl q' = refl
+```
+
+### `eq-pair` computes in the expected way when the action on paths of the projections is applies
+
+```agda
+ap-pr1-eq-pair :
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ {x x' : A} (p : x = x') {y y' : B} (q : y = y') →
+ ap pr1 (eq-pair {s = pair x y} {pair x' y'} p q) = p
+ap-pr1-eq-pair refl refl = refl
+
+ap-pr2-eq-pair :
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ {x x' : A} (p : x = x') {y y' : B} (q : y = y') →
+ ap pr2 (eq-pair {s = pair x y} {pair x' y'} p q) = q
+ap-pr2-eq-pair refl refl = refl
+```
+
+## See also
+
+- Equality proofs in dependent pair types are characterized in
+ [`foundation.equality-dependent-pair-types`](foundation.equality-dependent-pair-types.md).
+- Equality proofs in dependent product types are characterized in
+ [`foundation.equality-dependent-function-types`](foundation.equality-dependent-function-types.md).
+- Equality proofs in coproduct types are characterized in
+ [`foundation.equality-coproduct-types`](foundation.equality-coproduct-types.md).
diff --git a/src/foundation/equality-coproduct-types.lagda.md b/src/foundation/equality-coproduct-types.lagda.md
index 6519fe9d0f..8f9ba09235 100644
--- a/src/foundation/equality-coproduct-types.lagda.md
+++ b/src/foundation/equality-coproduct-types.lagda.md
@@ -7,22 +7,23 @@ module foundation.equality-coproduct-types where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
+open import foundation.universe-levels
+
open import foundation-core.contractible-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.empty-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.negation
open import foundation-core.sets
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/equality-dependent-function-types.lagda.md b/src/foundation/equality-dependent-function-types.lagda.md
index 8f7bb5da17..51f9c151e2 100644
--- a/src/foundation/equality-dependent-function-types.lagda.md
+++ b/src/foundation/equality-dependent-function-types.lagda.md
@@ -7,14 +7,14 @@ module foundation.equality-dependent-function-types where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.type-theoretic-principle-of-choice
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/equality-dependent-pair-types.lagda.md b/src/foundation/equality-dependent-pair-types.lagda.md
index 3020f2eb5e..3c10dde70f 100644
--- a/src/foundation/equality-dependent-pair-types.lagda.md
+++ b/src/foundation/equality-dependent-pair-types.lagda.md
@@ -9,10 +9,9 @@ open import foundation-core.equality-dependent-pair-types public
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.identity-types
-
-open import foundation-core.dependent-pair-types
-open import foundation-core.universe-levels
+open import foundation.universe-levels
```
diff --git a/src/foundation/equality-fibers-of-maps.lagda.md b/src/foundation/equality-fibers-of-maps.lagda.md
index 3aecd39b52..b2fcec3b60 100644
--- a/src/foundation/equality-fibers-of-maps.lagda.md
+++ b/src/foundation/equality-fibers-of-maps.lagda.md
@@ -2,14 +2,119 @@
```agda
module foundation.equality-fibers-of-maps where
-
-open import foundation-core.equality-fibers-of-maps public
```
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.identity-types
+open import foundation.universe-levels
+open import foundation-core.equality-dependent-pair-types
+open import foundation-core.equivalences
+open import foundation-core.fibers-of-maps
+open import foundation-core.functoriality-dependent-pair-types
+open import foundation-core.homotopies
```
+
+## Idea
+
+In the file
+[`foundation-core.fibers-of-maps`](foundation-core.fibers-of-maps.md) we already
+gave one characterization of the identity type of `fib f b`, for an arbitrary
+map `f : A → B`. Here we give a second characterization, using the fibers of the
+action on identifications of `f`.
+
+## Theorem
+
+For any map `f : A → B` any `b : B` and any `x y : fib f b`, there is an
+equivalence
+
+```text
+(x = y) ≃ fib (ap f) ((pr2 x) ∙ (inv (pr2 y)))
+```
+
+### Proof
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) {b : B}
+ where
+
+ fib-ap-eq-fib-fiberwise :
+ (s t : fib f b) (p : (pr1 s) = (pr1 t)) →
+ ((tr (λ (a : A) → (f a) = b) p (pr2 s)) = (pr2 t)) →
+ (ap f p = ((pr2 s) ∙ (inv (pr2 t))))
+ fib-ap-eq-fib-fiberwise (pair .x' p) (pair x' refl) refl =
+ inv ∘ (concat right-unit refl)
+
+ abstract
+ is-fiberwise-equiv-fib-ap-eq-fib-fiberwise :
+ (s t : fib f b) → is-fiberwise-equiv (fib-ap-eq-fib-fiberwise s t)
+ is-fiberwise-equiv-fib-ap-eq-fib-fiberwise (pair x y) (pair .x refl) refl =
+ is-equiv-comp
+ ( inv)
+ ( concat right-unit refl)
+ ( is-equiv-concat right-unit refl)
+ ( is-equiv-inv (y ∙ refl) refl)
+
+ fib-ap-eq-fib :
+ (s t : fib f b) → s = t →
+ fib (ap f {x = pr1 s} {y = pr1 t}) ((pr2 s) ∙ (inv (pr2 t)))
+ pr1 (fib-ap-eq-fib s .s refl) = refl
+ pr2 (fib-ap-eq-fib s .s refl) = inv (right-inv (pr2 s))
+
+ triangle-fib-ap-eq-fib :
+ (s t : fib f b) →
+ ( fib-ap-eq-fib s t) ~
+ ( (tot (fib-ap-eq-fib-fiberwise s t)) ∘ (pair-eq-Σ {s = s} {t}))
+ triangle-fib-ap-eq-fib (pair x refl) .(pair x refl) refl = refl
+
+ abstract
+ is-equiv-fib-ap-eq-fib : (s t : fib f b) → is-equiv (fib-ap-eq-fib s t)
+ is-equiv-fib-ap-eq-fib s t =
+ is-equiv-comp-htpy
+ ( fib-ap-eq-fib s t)
+ ( tot (fib-ap-eq-fib-fiberwise s t))
+ ( pair-eq-Σ {s = s} {t})
+ ( triangle-fib-ap-eq-fib s t)
+ ( is-equiv-pair-eq-Σ s t)
+ ( is-equiv-tot-is-fiberwise-equiv
+ ( is-fiberwise-equiv-fib-ap-eq-fib-fiberwise s t))
+
+ equiv-fib-ap-eq-fib :
+ (s t : fib f b) →
+ (s = t) ≃ fib (ap f {x = pr1 s} {y = pr1 t}) ((pr2 s) ∙ (inv (pr2 t)))
+ pr1 (equiv-fib-ap-eq-fib s t) = fib-ap-eq-fib s t
+ pr2 (equiv-fib-ap-eq-fib s t) = is-equiv-fib-ap-eq-fib s t
+
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) (x y : A)
+ where
+
+ eq-fib-fib-ap :
+ (q : f x = f y) → (pair x q) = (pair y refl) → fib (ap f {x} {y}) q
+ eq-fib-fib-ap q =
+ (tr (fib (ap f)) right-unit) ∘ (fib-ap-eq-fib f (pair x q) (pair y refl))
+
+ abstract
+ is-equiv-eq-fib-fib-ap :
+ (q : (f x) = (f y)) → is-equiv (eq-fib-fib-ap q)
+ is-equiv-eq-fib-fib-ap q =
+ is-equiv-comp
+ ( tr (fib (ap f)) right-unit)
+ ( fib-ap-eq-fib f (pair x q) (pair y refl))
+ ( is-equiv-fib-ap-eq-fib f (pair x q) (pair y refl))
+ ( is-equiv-tr (fib (ap f)) right-unit)
+```
+
+## See also
+
+- Equality proofs in dependent pair types are characterized in
+ [`foundation.equality-dependent-pair-types`](foundation.equality-dependent-pair-types.md).
+- Equality proofs in dependent function types are characterized in
+ [`foundation.equality-dependent-function-types`](foundation.equality-dependent-function-types.md).
diff --git a/src/foundation/equivalence-classes.lagda.md b/src/foundation/equivalence-classes.lagda.md
index 4f2e68340e..780c13d057 100644
--- a/src/foundation/equivalence-classes.lagda.md
+++ b/src/foundation/equivalence-classes.lagda.md
@@ -7,33 +7,33 @@ module foundation.equivalence-classes where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.effective-maps-equivalence-relations
open import foundation.existential-quantification
open import foundation.functoriality-propositional-truncation
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.inhabited-subtypes
open import foundation.locally-small-types
open import foundation.propositional-truncations
open import foundation.reflecting-maps-equivalence-relations
open import foundation.slice
open import foundation.small-types
+open import foundation.subtype-identity-principle
open import foundation.subtypes
open import foundation.surjective-maps
open import foundation.universal-property-image
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalence-relations
open import foundation-core.equivalences
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.logical-equivalences
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.subtype-identity-principle
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/equivalence-extensionality.lagda.md b/src/foundation/equivalence-extensionality.lagda.md
index e86b875528..9be466d333 100644
--- a/src/foundation/equivalence-extensionality.lagda.md
+++ b/src/foundation/equivalence-extensionality.lagda.md
@@ -7,23 +7,23 @@ module foundation.equivalence-extensionality where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
+open import foundation.subtype-identity-principle
open import foundation.type-theoretic-principle-of-choice
+open import foundation.universe-levels
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-function-types
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.subtype-identity-principle
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/equivalence-induction.lagda.md b/src/foundation/equivalence-induction.lagda.md
index e991341b1c..a0932212d4 100644
--- a/src/foundation/equivalence-induction.lagda.md
+++ b/src/foundation/equivalence-induction.lagda.md
@@ -9,13 +9,13 @@ open import foundation-core.equivalence-induction public
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.univalence
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.sections
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/equivalence-relations.lagda.md b/src/foundation/equivalence-relations.lagda.md
index 1e13d984f5..cef100b595 100644
--- a/src/foundation/equivalence-relations.lagda.md
+++ b/src/foundation/equivalence-relations.lagda.md
@@ -10,34 +10,34 @@ open import foundation-core.equivalence-relations public
```agda
open import foundation.binary-relations
+open import foundation.dependent-pair-types
open import foundation.effective-maps-equivalence-relations
open import foundation.equivalence-classes
open import foundation.full-subtypes
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.inhabited-subtypes
open import foundation.partitions
open import foundation.propositional-truncations
open import foundation.reflecting-maps-equivalence-relations
open import foundation.set-quotients
open import foundation.sigma-decompositions
+open import foundation.subtype-identity-principle
open import foundation.subtypes
open import foundation.surjective-maps
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.uniqueness-set-quotients
open import foundation.universal-property-set-quotients
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.logical-equivalences
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.subtype-identity-principle
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/equivalences-maybe.lagda.md b/src/foundation/equivalences-maybe.lagda.md
index 84ebe155c6..24360563fa 100644
--- a/src/foundation/equivalences-maybe.lagda.md
+++ b/src/foundation/equivalences-maybe.lagda.md
@@ -7,26 +7,26 @@ module foundation.equivalences-maybe where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equality-coproduct-types
open import foundation.equivalence-extensionality
open import foundation.equivalences
+open import foundation.functions
open import foundation.functoriality-coproduct-types
open import foundation.maybe
open import foundation.unit-type
open import foundation.universal-property-maybe
+open import foundation.universe-levels
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.empty-types
open import foundation-core.equality-dependent-pair-types
-open import foundation-core.functions
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.sets
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/equivalences.lagda.md b/src/foundation/equivalences.lagda.md
index a3e8c522f6..0e937c0a61 100644
--- a/src/foundation/equivalences.lagda.md
+++ b/src/foundation/equivalences.lagda.md
@@ -9,23 +9,24 @@ open import foundation-core.equivalences public
Imports
```agda
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
open import foundation.equivalence-extensionality
open import foundation.function-extensionality
+open import foundation.functions
+open import foundation.functoriality-fibers-of-maps
+open import foundation.identity-systems
open import foundation.identity-types
open import foundation.truncated-maps
open import foundation.type-theoretic-principle-of-choice
+open import foundation.universe-levels
-open import foundation-core.cones-over-cospans
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-function-types
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.functoriality-fibers-of-maps
-open import foundation-core.identity-systems
open import foundation-core.propositions
open import foundation-core.pullbacks
open import foundation-core.retractions
@@ -34,7 +35,6 @@ open import foundation-core.sets
open import foundation-core.subtypes
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/exclusive-disjunction.lagda.md b/src/foundation/exclusive-disjunction.lagda.md
index fc9b0d4998..1661ee5068 100644
--- a/src/foundation/exclusive-disjunction.lagda.md
+++ b/src/foundation/exclusive-disjunction.lagda.md
@@ -11,18 +11,20 @@ open import foundation.conjunction
open import foundation.contractible-types
open import foundation.coproduct-types
open import foundation.decidable-types
+open import foundation.dependent-pair-types
open import foundation.equality-coproduct-types
open import foundation.functoriality-coproduct-types
open import foundation.negation
open import foundation.propositional-extensionality
open import foundation.symmetric-operations
+open import foundation.type-arithmetic-cartesian-product-types
open import foundation.type-arithmetic-coproduct-types
open import foundation.universal-property-coproduct-types
+open import foundation.universe-levels
open import foundation.unordered-pairs
open import foundation-core.cartesian-product-types
open import foundation-core.decidable-propositions
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.empty-types
open import foundation-core.equality-dependent-pair-types
@@ -31,8 +33,6 @@ open import foundation-core.functoriality-dependent-function-types
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.type-arithmetic-cartesian-product-types
-open import foundation-core.universe-levels
open import univalent-combinatorics.2-element-types
open import univalent-combinatorics.equality-finite-types
diff --git a/src/foundation/existential-quantification.lagda.md b/src/foundation/existential-quantification.lagda.md
index 4b0e38437f..cfaefb2c24 100644
--- a/src/foundation/existential-quantification.lagda.md
+++ b/src/foundation/existential-quantification.lagda.md
@@ -8,15 +8,15 @@ module foundation.existential-quantification where
```agda
open import foundation.conjunction
+open import foundation.dependent-pair-types
open import foundation.propositional-extensionality
open import foundation.propositional-truncations
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.identity-types
open import foundation-core.logical-equivalences
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/exponents-set-quotients.lagda.md b/src/foundation/exponents-set-quotients.lagda.md
index 7ccdc0fb06..f6cfa3cbf5 100644
--- a/src/foundation/exponents-set-quotients.lagda.md
+++ b/src/foundation/exponents-set-quotients.lagda.md
@@ -10,22 +10,22 @@ module foundation.exponents-set-quotients where
```agda
open import foundation.binary-relations
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.functoriality-set-quotients
open import foundation.reflecting-maps-equivalence-relations
open import foundation.set-quotients
open import foundation.sets
open import foundation.universal-property-set-quotients
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalence-relations
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/faithful-maps.lagda.md b/src/foundation/faithful-maps.lagda.md
index 54d292e0a5..b61b90d1a3 100644
--- a/src/foundation/faithful-maps.lagda.md
+++ b/src/foundation/faithful-maps.lagda.md
@@ -2,14 +2,260 @@
```agda
module foundation.faithful-maps where
-
-open import foundation-core.faithful-maps public
```
Imports
```agda
+open import foundation.0-maps
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+open import foundation-core.embeddings
+open import foundation-core.equivalences
+open import foundation-core.functoriality-dependent-pair-types
+open import foundation-core.homotopies
+open import foundation-core.identity-types
+open import foundation-core.propositional-maps
+open import foundation-core.sets
+open import foundation-core.truncated-maps
+open import foundation-core.truncation-levels
```
+
+## Idea
+
+Since we sometimes think of types as ∞-groupoids, with the groupoid structure
+provided implicitly by the identity type and its induction principle, we can
+think of maps as functors of ∞-groupoids. We borrow some terminology of
+functors, and call a map faithful if it induces embeddings on identity types.
+
+## Definition
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ where
+
+ is-faithful : (A → B) → UU (l1 ⊔ l2)
+ is-faithful f = (x y : A) → is-emb (ap f {x} {y})
+
+faithful-map : {l1 l2 : Level} → UU l1 → UU l2 → UU (l1 ⊔ l2)
+faithful-map A B = Σ (A → B) is-faithful
+
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ where
+
+ map-faithful-map : faithful-map A B → A → B
+ map-faithful-map = pr1
+
+ is-faithful-map-faithful-map :
+ (f : faithful-map A B) → is-faithful (map-faithful-map f)
+ is-faithful-map-faithful-map = pr2
+
+ emb-ap-faithful-map :
+ (f : faithful-map A B) {x y : A} →
+ (x = y) ↪ (map-faithful-map f x = map-faithful-map f y)
+ pr1 (emb-ap-faithful-map f {x} {y}) = ap (map-faithful-map f)
+ pr2 (emb-ap-faithful-map f {x} {y}) = is-faithful-map-faithful-map f x y
+
+ is-faithful-is-emb : {f : A → B} → is-emb f → is-faithful f
+ is-faithful-is-emb {f} H x y = is-emb-is-equiv (H x y)
+
+ faithful-map-emb : (A ↪ B) → faithful-map A B
+ pr1 (faithful-map-emb f) = map-emb f
+ pr2 (faithful-map-emb f) = is-faithful-is-emb (is-emb-map-emb f)
+
+ is-faithful-is-equiv : {f : A → B} → is-equiv f → is-faithful f
+ is-faithful-is-equiv H = is-faithful-is-emb (is-emb-is-equiv H)
+
+ faithful-map-equiv : (A ≃ B) → faithful-map A B
+ pr1 (faithful-map-equiv e) = map-equiv e
+ pr2 (faithful-map-equiv e) = is-faithful-is-equiv (is-equiv-map-equiv e)
+
+ emb-ap : (f : A ↪ B) (x y : A) → (x = y) ↪ (map-emb f x = map-emb f y)
+ pr1 (emb-ap f x y) = ap (map-emb f) {x} {y}
+ pr2 (emb-ap f x y) = is-faithful-is-emb (is-emb-map-emb f) x y
+```
+
+## Examples
+
+### The identity map is faithful
+
+```agda
+module _
+ {l : Level} {A : UU l}
+ where
+
+ id-faithful-map : faithful-map A A
+ id-faithful-map = faithful-map-emb id-emb
+
+ is-faithful-id-faithful-map : is-faithful (id {A = A})
+ is-faithful-id-faithful-map = is-faithful-map-faithful-map id-faithful-map
+```
+
+### Any `0`-map is faithful
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B}
+ where
+
+ is-0-map-is-faithful : is-faithful f → is-0-map f
+ is-0-map-is-faithful H =
+ is-trunc-map-is-trunc-map-ap neg-one-𝕋 f
+ ( λ x y → is-prop-map-is-emb (H x y))
+
+ is-faithful-is-0-map : is-0-map f → is-faithful f
+ is-faithful-is-0-map H x y =
+ is-emb-is-prop-map (is-trunc-map-ap-is-trunc-map neg-one-𝕋 f H x y)
+```
+
+## Properties
+
+### The projection map of a family of sets is faithful
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1}
+ where
+
+ abstract
+ is-faithful-pr1 :
+ {B : A → UU l2} → ((x : A) → is-set (B x)) → is-faithful (pr1 {B = B})
+ is-faithful-pr1 H = is-faithful-is-0-map (is-0-map-pr1 H)
+
+ pr1-faithful-map :
+ (B : A → Set l2) → faithful-map (Σ A (λ x → type-Set (B x))) A
+ pr1 (pr1-faithful-map B) = pr1
+ pr2 (pr1-faithful-map B) = is-faithful-pr1 (λ x → is-set-type-Set (B x))
+```
+
+### Faithful maps are closed under homotopies
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f g : A → B} (H : f ~ g)
+ where
+
+ abstract
+ is-faithful-htpy : is-faithful g → is-faithful f
+ is-faithful-htpy K =
+ is-faithful-is-0-map (is-0-map-htpy H (is-0-map-is-faithful K))
+```
+
+### Faithful maps are closed under composition
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
+ where
+
+ abstract
+ is-faithful-comp :
+ (g : B → X) (h : A → B) →
+ is-faithful g → is-faithful h → is-faithful (g ∘ h)
+ is-faithful-comp g h is-faithful-g is-faithful-h =
+ is-faithful-is-0-map
+ ( is-0-map-comp g h
+ ( is-0-map-is-faithful is-faithful-g)
+ ( is-0-map-is-faithful is-faithful-h))
+
+ abstract
+ is-faithful-comp-htpy :
+ (f : A → X) (g : B → X) (h : A → B) (H : f ~ (g ∘ h)) →
+ is-faithful g → is-faithful h → is-faithful f
+ is-faithful-comp-htpy f g h H is-faithful-g is-faithful-h =
+ is-faithful-is-0-map
+ ( is-0-map-comp-htpy f g h H
+ ( is-0-map-is-faithful is-faithful-g)
+ ( is-0-map-is-faithful is-faithful-h))
+```
+
+### If a composite is faithful, then its right factor is faithful
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
+ where
+
+ is-faithful-right-factor :
+ (g : B → X) (h : A → B) →
+ is-faithful g → is-faithful (g ∘ h) → is-faithful h
+ is-faithful-right-factor g h is-faithful-g is-faithful-gh =
+ is-faithful-is-0-map
+ ( is-0-map-right-factor g h
+ ( is-0-map-is-faithful is-faithful-g)
+ ( is-0-map-is-faithful is-faithful-gh))
+
+ is-faithful-right-factor-htpy :
+ (f : A → X) (g : B → X) (h : A → B) (H : f ~ (g ∘ h)) →
+ is-faithful g → is-faithful f → is-faithful h
+ is-faithful-right-factor-htpy f g h H is-faithful-g is-faithful-f =
+ is-faithful-is-0-map
+ ( is-0-map-right-factor-htpy f g h H
+ ( is-0-map-is-faithful is-faithful-g)
+ ( is-0-map-is-faithful is-faithful-f))
+```
+
+### The map on total spaces induced by a family of truncated maps is truncated
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : A → UU l3}
+ {f : (x : A) → B x → C x}
+ where
+
+ is-faithful-tot : ((x : A) → is-faithful (f x)) → is-faithful (tot f)
+ is-faithful-tot H =
+ is-faithful-is-0-map (is-0-map-tot (λ x → is-0-map-is-faithful (H x)))
+
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : A → UU l3}
+ where
+
+ tot-faithful-map :
+ ((x : A) → faithful-map (B x) (C x)) → faithful-map (Σ A B) (Σ A C)
+ pr1 (tot-faithful-map f) = tot (λ x → map-faithful-map (f x))
+ pr2 (tot-faithful-map f) =
+ is-faithful-tot (λ x → is-faithful-map-faithful-map (f x))
+
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2}
+ where
+
+ module _
+ {f : A → B} (C : B → UU l3)
+ where
+
+ abstract
+ is-faithful-map-Σ-map-base :
+ is-faithful f → is-faithful (map-Σ-map-base f C)
+ is-faithful-map-Σ-map-base H =
+ is-faithful-is-0-map
+ ( is-0-map-map-Σ-map-base C (is-0-map-is-faithful H))
+
+ faithful-map-Σ-faithful-map-base :
+ (f : faithful-map A B) (C : B → UU l3) →
+ faithful-map (Σ A (λ a → C (map-faithful-map f a))) (Σ B C)
+ pr1 (faithful-map-Σ-faithful-map-base f C) =
+ map-Σ-map-base (map-faithful-map f) C
+ pr2 (faithful-map-Σ-faithful-map-base f C) =
+ is-faithful-map-Σ-map-base C (is-faithful-map-faithful-map f)
+
+module _
+ {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {C : A → UU l3}
+ (D : B → UU l4) {f : A → B} {g : (x : A) → C x → D (f x)}
+ where
+
+ is-faithful-map-Σ :
+ is-faithful f → ((x : A) → is-faithful (g x)) → is-faithful (map-Σ D f g)
+ is-faithful-map-Σ H K =
+ is-faithful-is-0-map
+ ( is-0-map-map-Σ D
+ ( is-0-map-is-faithful H)
+ ( λ x → is-0-map-is-faithful (K x)))
+```
diff --git a/src/foundation/fiber-inclusions.lagda.md b/src/foundation/fiber-inclusions.lagda.md
index 5b56649253..5e6781bb93 100644
--- a/src/foundation/fiber-inclusions.lagda.md
+++ b/src/foundation/fiber-inclusions.lagda.md
@@ -7,19 +7,21 @@ module foundation.fiber-inclusions where
Imports
```agda
+open import foundation.0-maps
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
+open import foundation.faithful-maps
open import foundation.fibers-of-maps
open import foundation.identity-types
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.unit-type
+open import foundation.universe-levels
-open import foundation-core.0-maps
open import foundation-core.1-types
-open import foundation-core.cones-over-cospans
open import foundation-core.contractible-maps
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.faithful-maps
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.propositional-maps
@@ -29,8 +31,6 @@ open import foundation-core.sets
open import foundation-core.truncated-maps
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/fibered-equivalences.lagda.md b/src/foundation/fibered-equivalences.lagda.md
index d870a689c2..693664444c 100644
--- a/src/foundation/fibered-equivalences.lagda.md
+++ b/src/foundation/fibered-equivalences.lagda.md
@@ -7,21 +7,21 @@ module foundation.fibered-equivalences where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.embeddings
open import foundation.equivalences
open import foundation.fibered-maps
+open import foundation.functions
open import foundation.pullbacks
open import foundation.slice
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/fibered-involutions.lagda.md b/src/foundation/fibered-involutions.lagda.md
index 0e31181ed6..fc0e8297b7 100644
--- a/src/foundation/fibered-involutions.lagda.md
+++ b/src/foundation/fibered-involutions.lagda.md
@@ -7,15 +7,15 @@ module foundation.fibered-involutions where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.fibered-maps
+open import foundation.functions
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.involutions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/fibered-maps.lagda.md b/src/foundation/fibered-maps.lagda.md
index 324bf7ee38..e565dc079d 100644
--- a/src/foundation/fibered-maps.lagda.md
+++ b/src/foundation/fibered-maps.lagda.md
@@ -7,25 +7,25 @@ module foundation.fibered-maps where
Imports
```agda
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.homotopies
open import foundation.slice
open import foundation.structure-identity-principle
+open import foundation.universe-levels
open import foundation-core.commuting-squares-of-maps
-open import foundation-core.cones-over-cospans
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.small-types
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/fibers-of-maps.lagda.md b/src/foundation/fibers-of-maps.lagda.md
index 80c5dbd59d..78d282ebb1 100644
--- a/src/foundation/fibers-of-maps.lagda.md
+++ b/src/foundation/fibers-of-maps.lagda.md
@@ -9,19 +9,19 @@ open import foundation-core.fibers-of-maps public
Imports
```agda
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.type-arithmetic-unit-type
open import foundation.unit-type
+open import foundation.universe-levels
-open import foundation-core.cones-over-cospans
open import foundation-core.constant-maps
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.pullbacks
open import foundation-core.universal-property-pullbacks
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/full-subtypes.lagda.md b/src/foundation/full-subtypes.lagda.md
index 3a6092378b..5039a9ff7a 100644
--- a/src/foundation/full-subtypes.lagda.md
+++ b/src/foundation/full-subtypes.lagda.md
@@ -8,15 +8,15 @@ module foundation.full-subtypes where
```agda
open import foundation.decidable-subtypes
+open import foundation.dependent-pair-types
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.unit-type
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.subtypes
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/function-extensionality.lagda.md b/src/foundation/function-extensionality.lagda.md
index d7e5aeef46..242c0a5d3b 100644
--- a/src/foundation/function-extensionality.lagda.md
+++ b/src/foundation/function-extensionality.lagda.md
@@ -9,12 +9,13 @@ open import foundation-core.function-extensionality public
Imports
```agda
-open import foundation-core.dependent-pair-types
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/functional-correspondences.lagda.md b/src/foundation/functional-correspondences.lagda.md
index 4c9d7b828f..250df866ed 100644
--- a/src/foundation/functional-correspondences.lagda.md
+++ b/src/foundation/functional-correspondences.lagda.md
@@ -8,18 +8,18 @@ module foundation.functional-correspondences where
```agda
open import foundation.contractible-types
+open import foundation.dependent-pair-types
open import foundation.equality-dependent-function-types
open import foundation.function-extensionality
+open import foundation.fundamental-theorem-of-identity-types
+open import foundation.subtype-identity-principle
open import foundation.univalence
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.subtype-identity-principle
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/functions.lagda.md b/src/foundation/functions.lagda.md
index 6f6d0732b7..5a16a153f1 100644
--- a/src/foundation/functions.lagda.md
+++ b/src/foundation/functions.lagda.md
@@ -4,14 +4,84 @@
{-# OPTIONS --safe #-}
module foundation.functions where
-
-open import foundation-core.functions public
```
Imports
```agda
-
+open import foundation.universe-levels
```
+
+## Idea
+
+Functions are primitive in Agda. Here we construct some basic functions
+
+## Examples
+
+### The identity function
+
+```agda
+id : {l : Level} {A : UU l} → A → A
+id a = a
+
+idω : {A : UUω} → A → A
+idω a = a
+```
+
+### Dependent composition of functions
+
+```agda
+_∘_ :
+ {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : (a : A) → B a → UU l3} →
+ ({a : A} → (b : B a) → C a b) → (f : (a : A) → B a) → (a : A) → C a (f a)
+(g ∘ f) a = g (f a)
+```
+
+### Evaluation at a point
+
+```agda
+ev-point :
+ {l1 l2 : Level} {A : UU l1} (a : A) {P : A → UU l2} → ((x : A) → P x) → P a
+ev-point a f = f a
+
+ev-point' :
+ {l1 l2 : Level} {A : UU l1} (a : A) {X : UU l2} → (A → X) → X
+ev-point' a f = f a
+```
+
+### Precomposition functions
+
+```agda
+precomp-Π :
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} (f : A → B) (C : B → UU l3) →
+ ((b : B) → C b) → ((a : A) → C (f a))
+precomp-Π f C h a = h (f a)
+
+precomp :
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} (f : A → B) (C : UU l3) →
+ (B → C) → (A → C)
+precomp f C = precomp-Π f (λ b → C)
+```
+
+### Postcomposition functions
+
+```agda
+postcomp :
+ {l1 l2 l3 : Level} {X : UU l1} {Y : UU l2} (A : UU l3) →
+ (X → Y) → (A → X) → (A → Y)
+postcomp A f h = f ∘ h
+
+map-Π :
+ {l1 l2 l3 : Level} {I : UU l1} {A : I → UU l2} {B : I → UU l3}
+ (f : (i : I) → A i → B i) →
+ ((i : I) → A i) → ((i : I) → B i)
+map-Π f h i = f i (h i)
+
+map-Π' :
+ {l1 l2 l3 l4 : Level} {I : UU l1} {A : I → UU l2} {B : I → UU l3}
+ {J : UU l4} (α : J → I) →
+ ((i : I) → A i → B i) → ((j : J) → A (α j)) → ((j : J) → B (α j))
+map-Π' α f = map-Π (λ j → f (α j))
+```
diff --git a/src/foundation/functoriality-cartesian-product-types.lagda.md b/src/foundation/functoriality-cartesian-product-types.lagda.md
index 1b80be7acc..ad4e66e6ff 100644
--- a/src/foundation/functoriality-cartesian-product-types.lagda.md
+++ b/src/foundation/functoriality-cartesian-product-types.lagda.md
@@ -7,17 +7,18 @@ module foundation.functoriality-cartesian-product-types where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.equality-cartesian-product-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.equality-cartesian-product-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/functoriality-coproduct-types.lagda.md b/src/foundation/functoriality-coproduct-types.lagda.md
index 59da9d1657..12317065f0 100644
--- a/src/foundation/functoriality-coproduct-types.lagda.md
+++ b/src/foundation/functoriality-coproduct-types.lagda.md
@@ -8,10 +8,13 @@ module foundation.functoriality-coproduct-types where
```agda
open import foundation.coproduct-types
+open import foundation.dependent-pair-types
+open import foundation.equality-cartesian-product-types
open import foundation.equality-coproduct-types
open import foundation.equivalence-extensionality
open import foundation.equivalences
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.functoriality-cartesian-product-types
open import foundation.homotopies
open import foundation.propositional-truncations
@@ -19,21 +22,18 @@ open import foundation.structure-identity-principle
open import foundation.surjective-maps
open import foundation.unit-type
open import foundation.universal-property-coproduct-types
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
-open import foundation-core.equality-cartesian-product-types
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-function-types
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.identity-types
open import foundation-core.injective-maps
open import foundation-core.negation
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/functoriality-dependent-function-types.lagda.md b/src/foundation/functoriality-dependent-function-types.lagda.md
index d0f5ca29e0..4cd8c6bf74 100644
--- a/src/foundation/functoriality-dependent-function-types.lagda.md
+++ b/src/foundation/functoriality-dependent-function-types.lagda.md
@@ -9,27 +9,27 @@ open import foundation-core.functoriality-dependent-function-types public
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalence-extensionality
open import foundation.equivalences
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.identity-types
open import foundation.type-theoretic-principle-of-choice
open import foundation.unit-type
open import foundation.universal-property-unit-type
+open import foundation.universe-levels
open import foundation-core.commuting-squares-of-maps
open import foundation-core.constant-maps
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.propositional-maps
open import foundation-core.truncated-maps
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/functoriality-dependent-pair-types.lagda.md b/src/foundation/functoriality-dependent-pair-types.lagda.md
index 729c6f2286..abf13bbd73 100644
--- a/src/foundation/functoriality-dependent-pair-types.lagda.md
+++ b/src/foundation/functoriality-dependent-pair-types.lagda.md
@@ -9,16 +9,17 @@ open import foundation-core.functoriality-dependent-pair-types public
Imports
```agda
-open import foundation-core.cones-over-cospans
-open import foundation-core.dependent-pair-types
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.type-arithmetic-dependent-pair-types
+open import foundation.universe-levels
+
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.pullbacks
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/functoriality-fibers-of-maps.lagda.md b/src/foundation/functoriality-fibers-of-maps.lagda.md
index b5c88446ca..6928a1dcfc 100644
--- a/src/foundation/functoriality-fibers-of-maps.lagda.md
+++ b/src/foundation/functoriality-fibers-of-maps.lagda.md
@@ -1,15 +1,121 @@
-# Functoriality of `fib`
+# The functoriality of `fib`
```agda
module foundation.functoriality-fibers-of-maps where
-
-open import foundation-core.functoriality-fibers-of-maps public
```
Imports
```agda
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+open import foundation-core.equality-dependent-pair-types
+open import foundation-core.fibers-of-maps
+open import foundation-core.functoriality-dependent-pair-types
+open import foundation-core.homotopies
+open import foundation-core.identity-types
```
+
+## Idea
+
+Any commuting square
+
+induces a map between the fibers of the vertical maps
+
+## Definitions
+
+### Any cone induces a family of maps between the fibers of the vertical maps
+
+```agda
+module _
+ {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4}
+ (f : A → X) (g : B → X) (c : cone f g C)
+ where
+
+ map-fib-cone : (x : A) → fib (pr1 c) x → fib g (f x)
+ pr1 (map-fib-cone x t) = pr1 (pr2 c) (pr1 t)
+ pr2 (map-fib-cone x t) = (inv (pr2 (pr2 c) (pr1 t))) ∙ (ap f (pr2 t))
+
+map-fib-cone-id :
+ {l1 l2 : Level} {B : UU l1} {X : UU l2} (g : B → X) (x : X) →
+ map-fib-cone id g (triple g id refl-htpy) x ~ id
+map-fib-cone-id g .(g b) (pair b refl) =
+ refl
+```
+
+## Properties
+
+### Computing `map-fib-cone` of a horizontal pasting of cones
+
+```agda
+module _
+ {l1 l2 l3 l4 l5 l6 : Level}
+ {A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4} {Y : UU l5} {Z : UU l6}
+ (i : X → Y) (j : Y → Z) (h : C → Z)
+ where
+
+ map-fib-pasting-horizontal-cone :
+ (c : cone j h B) (d : cone i (pr1 c) A) → (x : X) →
+ ( map-fib-cone (j ∘ i) h (pasting-horizontal-cone i j h c d) x) ~
+ ( (map-fib-cone j h c (i x)) ∘ (map-fib-cone i (pr1 c) d x))
+ map-fib-pasting-horizontal-cone
+ (pair g (pair q K)) (pair f (pair p H)) .(f a) (pair a refl) =
+ eq-pair-Σ
+ ( refl)
+ ( ( ap
+ ( concat' (h (q (p a))) refl)
+ ( distributive-inv-concat (ap j (H a)) (K (p a)))) ∙
+ ( ( assoc (inv (K (p a))) (inv (ap j (H a))) refl) ∙
+ ( ap
+ ( concat (inv (K (p a))) (j (i (f a))))
+ ( ( ap (concat' (j (g (p a))) refl) (inv (ap-inv j (H a)))) ∙
+ ( inv (ap-concat j (inv (H a)) refl))))))
+```
+
+### Computing `map-fib-cone` of a horizontal pasting of cones
+
+```agda
+module _
+ {l1 l2 l3 l4 l5 l6 : Level}
+ {A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4} {Y : UU l5} {Z : UU l6}
+ (f : C → Z) (g : Y → Z) (h : X → Y)
+ where
+
+ map-fib-pasting-vertical-cone :
+ (c : cone f g B) (d : cone (pr1 (pr2 c)) h A) (x : C) →
+ ( ( map-fib-cone f (g ∘ h) (pasting-vertical-cone f g h c d) x) ∘
+ ( inv-map-compute-fib-comp (pr1 c) (pr1 d) x)) ~
+ ( ( inv-map-compute-fib-comp g h (f x)) ∘
+ ( map-Σ
+ ( λ t → fib h (pr1 t))
+ ( map-fib-cone f g c x)
+ ( λ t → map-fib-cone (pr1 (pr2 c)) h d (pr1 t))))
+ map-fib-pasting-vertical-cone
+ (pair p (pair q H)) (pair p' (pair q' H')) .(p (p' a))
+ (pair (pair .(p' a) refl) (pair a refl)) =
+ eq-pair-Σ refl
+ ( ( right-unit) ∙
+ ( ( distributive-inv-concat (H (p' a)) (ap g (H' a))) ∙
+ ( ( ap
+ ( concat (inv (ap g (H' a))) (f (p (p' a))))
+ ( inv right-unit)) ∙
+ ( ap
+ ( concat' (g (h (q' a)))
+ ( pr2
+ ( map-fib-cone f g
+ ( triple p q H)
+ ( p (p' a))
+ ( pair (p' a) refl))))
+ ( ( inv (ap-inv g (H' a))) ∙
+ ( ap (ap g) (inv right-unit)))))))
+```
+
+## See also
+
+- Equality proofs in the fiber of a map are characterized in
+ [`foundation.equality-fibers-of-maps`](foundation.equality-fibers-of-maps.md).
diff --git a/src/foundation/functoriality-function-types.lagda.md b/src/foundation/functoriality-function-types.lagda.md
index ceb8a71927..1013de3cf3 100644
--- a/src/foundation/functoriality-function-types.lagda.md
+++ b/src/foundation/functoriality-function-types.lagda.md
@@ -10,15 +10,15 @@ open import foundation-core.functoriality-function-types public
```agda
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.functoriality-dependent-function-types
open import foundation.unit-type
+open import foundation.universe-levels
open import foundation-core.constant-maps
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.truncated-maps
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/functoriality-propositional-truncation.lagda.md b/src/foundation/functoriality-propositional-truncation.lagda.md
index e939ce6544..2df9e4a5c2 100644
--- a/src/foundation/functoriality-propositional-truncation.lagda.md
+++ b/src/foundation/functoriality-propositional-truncation.lagda.md
@@ -7,17 +7,17 @@ module foundation.functoriality-propositional-truncation where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.propositional-truncations
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.function-extensionality
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/functoriality-set-quotients.lagda.md b/src/foundation/functoriality-set-quotients.lagda.md
index cc5441b1cb..3c3875f0d1 100644
--- a/src/foundation/functoriality-set-quotients.lagda.md
+++ b/src/foundation/functoriality-set-quotients.lagda.md
@@ -9,28 +9,28 @@ module foundation.functoriality-set-quotients where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalence-extensionality
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.homotopies
open import foundation.reflecting-maps-equivalence-relations
open import foundation.set-quotients
+open import foundation.subtype-identity-principle
open import foundation.surjective-maps
open import foundation.uniqueness-set-quotients
open import foundation.universal-property-set-quotients
+open import foundation.universe-levels
open import foundation-core.commuting-squares-of-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalence-relations
open import foundation-core.equivalences
-open import foundation-core.functions
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.logical-equivalences
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.subtype-identity-principle
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/functoriality-set-truncation.lagda.md b/src/foundation/functoriality-set-truncation.lagda.md
index 776209c685..bfec82c1d6 100644
--- a/src/foundation/functoriality-set-truncation.lagda.md
+++ b/src/foundation/functoriality-set-truncation.lagda.md
@@ -7,6 +7,8 @@ module foundation.functoriality-set-truncation where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.functoriality-truncation
open import foundation.images
open import foundation.propositional-truncations
@@ -17,13 +19,12 @@ open import foundation.uniqueness-image
open import foundation.uniqueness-set-truncations
open import foundation.universal-property-image
open import foundation.universal-property-set-truncation
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.identity-types
@@ -31,7 +32,6 @@ open import foundation-core.injective-maps
open import foundation-core.propositions
open import foundation-core.sets
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/functoriality-truncation.lagda.md b/src/foundation/functoriality-truncation.lagda.md
index 0ec10dc66b..9a9cbda3a1 100644
--- a/src/foundation/functoriality-truncation.lagda.md
+++ b/src/foundation/functoriality-truncation.lagda.md
@@ -7,18 +7,18 @@ module foundation.functoriality-truncation where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.truncations
+open import foundation.universe-levels
open import foundation-core.commuting-squares-of-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.function-extensionality
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/fundamental-theorem-of-identity-types.lagda.md b/src/foundation/fundamental-theorem-of-identity-types.lagda.md
index 149c730bf7..500ed759d8 100644
--- a/src/foundation/fundamental-theorem-of-identity-types.lagda.md
+++ b/src/foundation/fundamental-theorem-of-identity-types.lagda.md
@@ -2,14 +2,131 @@
```agda
module foundation.fundamental-theorem-of-identity-types where
-
-open import foundation-core.fundamental-theorem-of-identity-types public
```
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
+open import foundation-core.contractible-types
+open import foundation-core.equivalences
+open import foundation-core.functoriality-dependent-pair-types
+open import foundation-core.homotopies
+open import foundation-core.identity-types
+open import foundation-core.retractions
+open import foundation-core.sections
```
+
+## Idea
+
+The fundamental theorem of identity type provides a way to characterize identity
+types. It uses the fact that a family of maps `f : (x : A) → a = x → B x` is a
+family of equivalences if and only if it induces an equivalence
+`Σ A (Id a) → Σ A B` on total spaces. Note that the total space `Σ A (Id a)` is
+contractible. Therefore, any map `Σ A (Id a) → Σ A B` is an equivalence if and
+only if `Σ A B` is contractible.
+
+## Theorem
+
+For any family of maps `f : (x : A) → a = x → B x`, the following are
+equivalent:
+
+1. Each `f x` is an equivalence
+2. The total space `Σ A B` is contractible.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {a : A}
+ where
+
+ abstract
+ fundamental-theorem-id :
+ is-contr (Σ A B) → (f : (x : A) → a = x → B x) → is-fiberwise-equiv f
+ fundamental-theorem-id is-contr-AB f =
+ is-fiberwise-equiv-is-equiv-tot
+ ( is-equiv-is-contr (tot f) (is-contr-total-path a) is-contr-AB)
+
+ abstract
+ fundamental-theorem-id' :
+ (f : (x : A) → a = x → B x) → is-fiberwise-equiv f → is-contr (Σ A B)
+ fundamental-theorem-id' f is-fiberwise-equiv-f =
+ is-contr-is-equiv'
+ ( Σ A (Id a))
+ ( tot f)
+ ( is-equiv-tot-is-fiberwise-equiv is-fiberwise-equiv-f)
+ ( is-contr-total-path a)
+```
+
+## Corollaries
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} (a : A) (b : B a)
+ where
+
+ abstract
+ fundamental-theorem-id-J :
+ is-contr (Σ A B) → is-fiberwise-equiv (ind-Id a (λ x p → B x) b)
+ fundamental-theorem-id-J is-contr-AB =
+ fundamental-theorem-id is-contr-AB (ind-Id a (λ x p → B x) b)
+
+ abstract
+ fundamental-theorem-id-J' :
+ (is-fiberwise-equiv (ind-Id a (λ x p → B x) b)) → is-contr (Σ A B)
+ fundamental-theorem-id-J' H =
+ is-contr-is-equiv'
+ ( Σ A (Id a))
+ ( tot (ind-Id a (λ x p → B x) b))
+ ( is-equiv-tot-is-fiberwise-equiv H)
+ ( is-contr-total-path a)
+```
+
+### Retracts of the identity type are equivalent to the identity type
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} (a : A)
+ where
+
+ abstract
+ fundamental-theorem-id-retr :
+ (i : (x : A) → B x → a = x) → (R : (x : A) → retr (i x)) →
+ is-fiberwise-equiv i
+ fundamental-theorem-id-retr i R =
+ is-fiberwise-equiv-is-equiv-tot
+ ( is-equiv-is-contr (tot i)
+ ( is-contr-retract-of (Σ _ (λ y → a = y))
+ ( pair (tot i)
+ ( pair (tot λ x → pr1 (R x))
+ ( ( inv-htpy (preserves-comp-tot i (λ x → pr1 (R x)))) ∙h
+ ( ( tot-htpy λ x → pr2 (R x)) ∙h (tot-id B)))))
+ ( is-contr-total-path a))
+ ( is-contr-total-path a))
+```
+
+### The fundamental theorem of identity types, using sections
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} (a : A)
+ where
+
+ abstract
+ fundamental-theorem-id-sec :
+ (f : (x : A) → a = x → B x) → ((x : A) → sec (f x)) →
+ is-fiberwise-equiv f
+ fundamental-theorem-id-sec f sec-f x =
+ is-equiv-sec-is-equiv (f x) (sec-f x) (is-fiberwise-equiv-i x)
+ where
+ i : (x : A) → B x → a = x
+ i = λ x → pr1 (sec-f x)
+ retr-i : (x : A) → retr (i x)
+ pr1 (retr-i x) = f x
+ pr2 (retr-i x) = pr2 (sec-f x)
+ is-fiberwise-equiv-i : is-fiberwise-equiv i
+ is-fiberwise-equiv-i = fundamental-theorem-id-retr a i retr-i
+```
diff --git a/src/foundation/global-choice.lagda.md b/src/foundation/global-choice.lagda.md
index c0cb4ef001..f249ded323 100644
--- a/src/foundation/global-choice.lagda.md
+++ b/src/foundation/global-choice.lagda.md
@@ -7,13 +7,13 @@ module foundation.global-choice where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.functoriality-propositional-truncation
open import foundation.hilberts-epsilon-operators
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.negation
-open import foundation-core.universe-levels
open import univalent-combinatorics.2-element-types
open import univalent-combinatorics.standard-finite-types
diff --git a/src/foundation/hexagons-of-identifications.lagda.md b/src/foundation/hexagons-of-identifications.lagda.md
index bf519d444e..3f5290432c 100644
--- a/src/foundation/hexagons-of-identifications.lagda.md
+++ b/src/foundation/hexagons-of-identifications.lagda.md
@@ -7,8 +7,9 @@ module foundation.hexagons-of-identifications where
Imports
```agda
+open import foundation.universe-levels
+
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/hilberts-epsilon-operators.lagda.md b/src/foundation/hilberts-epsilon-operators.lagda.md
index 648037737b..9ed96c4e0d 100644
--- a/src/foundation/hilberts-epsilon-operators.lagda.md
+++ b/src/foundation/hilberts-epsilon-operators.lagda.md
@@ -7,12 +7,12 @@ module foundation.hilberts-epsilon-operators where
Imports
```agda
+open import foundation.functions
open import foundation.functoriality-propositional-truncation
open import foundation.propositional-truncations
+open import foundation.universe-levels
open import foundation-core.equivalences
-open import foundation-core.functions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/homotopies.lagda.md b/src/foundation/homotopies.lagda.md
index 1d5d175ca4..3e2945d33b 100644
--- a/src/foundation/homotopies.lagda.md
+++ b/src/foundation/homotopies.lagda.md
@@ -9,18 +9,18 @@ open import foundation-core.homotopies public
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
+open import foundation.identity-systems
open import foundation.identity-types
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-function-types
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.identity-systems
open import foundation-core.sections
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/identity-systems.lagda.md b/src/foundation/identity-systems.lagda.md
index b71c7a55f5..84f02d7e18 100644
--- a/src/foundation/identity-systems.lagda.md
+++ b/src/foundation/identity-systems.lagda.md
@@ -2,14 +2,81 @@
```agda
module foundation.identity-systems where
-
-open import foundation-core.identity-systems public
```
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.fundamental-theorem-of-identity-types
+open import foundation.universe-levels
+open import foundation-core.contractible-types
+open import foundation-core.equivalences
+open import foundation-core.identity-types
+open import foundation-core.sections
```
+
+## Idea
+
+A unary identity system on a type `A` equipped with a point `a : A` consists of
+a type family `B` over `A` equipped with a point `b : B a` that satisfies an
+induction principle analogous to the induction principle of the identity type at
+`a`.
+
+```agda
+module _
+ {l1 l2 : Level} (l : Level) {A : UU l1} (B : A → UU l2) (a : A) (b : B a)
+ where
+
+ IND-identity-system : UU (l1 ⊔ l2 ⊔ lsuc l)
+ IND-identity-system =
+ ( P : (x : A) (y : B x) → UU l) →
+ sec (λ (h : (x : A) (y : B x) → P x y) → h a b)
+```
+
+## Properties
+
+### A type family over `A` is an identity system if and only if it is equivalent to the identity type
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} (a : A) (b : B a)
+ where
+
+ abstract
+ Ind-identity-system :
+ (is-contr-AB : is-contr (Σ A B)) →
+ {l : Level} → IND-identity-system l B a b
+ pr1 (Ind-identity-system is-contr-AB P) p x y =
+ tr
+ ( fam-Σ P)
+ ( eq-is-contr is-contr-AB)
+ ( p)
+ pr2 (Ind-identity-system is-contr-AB P) p =
+ ap
+ ( λ t → tr (fam-Σ P) t p)
+ ( eq-is-contr'
+ ( is-prop-is-contr is-contr-AB (pair a b) (pair a b))
+ ( eq-is-contr is-contr-AB)
+ ( refl))
+
+ abstract
+ is-contr-total-space-IND-identity-system :
+ ({l : Level} → IND-identity-system l B a b) → is-contr (Σ A B)
+ pr1 (pr1 (is-contr-total-space-IND-identity-system ind)) = a
+ pr2 (pr1 (is-contr-total-space-IND-identity-system ind)) = b
+ pr2 (is-contr-total-space-IND-identity-system ind) (pair x y) =
+ pr1 (ind (λ x' y' → (pair a b) = (pair x' y'))) refl x y
+
+ abstract
+ fundamental-theorem-id-IND-identity-system :
+ ({l : Level} → IND-identity-system l B a b) →
+ (f : (x : A) → a = x → B x) → (x : A) → is-equiv (f x)
+ fundamental-theorem-id-IND-identity-system ind f =
+ fundamental-theorem-id
+ ( is-contr-total-space-IND-identity-system ind)
+ ( f)
+```
diff --git a/src/foundation/identity-truncated-types.lagda.md b/src/foundation/identity-truncated-types.lagda.md
index 3ce239bc5c..3da3145597 100644
--- a/src/foundation/identity-truncated-types.lagda.md
+++ b/src/foundation/identity-truncated-types.lagda.md
@@ -8,12 +8,12 @@ module foundation.identity-truncated-types where
```agda
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.equivalences
open import foundation-core.identity-types
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/identity-types.lagda.md b/src/foundation/identity-types.lagda.md
index 994eb01515..ade1454bcb 100644
--- a/src/foundation/identity-types.lagda.md
+++ b/src/foundation/identity-types.lagda.md
@@ -10,14 +10,14 @@ open import foundation-core.identity-types public
```agda
open import foundation.binary-equivalences
+open import foundation.dependent-pair-types
open import foundation.equivalence-extensionality
open import foundation.function-extensionality
+open import foundation.functions
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/images-subtypes.lagda.md b/src/foundation/images-subtypes.lagda.md
index fece81644c..3e247a71db 100644
--- a/src/foundation/images-subtypes.lagda.md
+++ b/src/foundation/images-subtypes.lagda.md
@@ -7,11 +7,11 @@ module foundation.images-subtypes where
Imports
```agda
+open import foundation.functions
open import foundation.images
+open import foundation.universe-levels
-open import foundation-core.functions
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/images.lagda.md b/src/foundation/images.lagda.md
index 4954fb6bbb..93346c8b46 100644
--- a/src/foundation/images.lagda.md
+++ b/src/foundation/images.lagda.md
@@ -7,28 +7,28 @@ module foundation.images where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.propositional-truncations
open import foundation.slice
+open import foundation.subtype-identity-principle
open import foundation.surjective-maps
+open import foundation.universe-levels
open import foundation-core.1-types
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
-open import foundation-core.fundamental-theorem-of-identity-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.sets
-open import foundation-core.subtype-identity-principle
open import foundation-core.subtypes
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/impredicative-encodings.lagda.md b/src/foundation/impredicative-encodings.lagda.md
index 9fa4522d50..6bea18ab02 100644
--- a/src/foundation/impredicative-encodings.lagda.md
+++ b/src/foundation/impredicative-encodings.lagda.md
@@ -8,20 +8,20 @@ module foundation.impredicative-encodings where
```agda
open import foundation.conjunction
+open import foundation.dependent-pair-types
open import foundation.disjunction
open import foundation.existential-quantification
open import foundation.negation
open import foundation.propositional-truncations
+open import foundation.universe-levels
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
open import foundation-core.equivalences
open import foundation-core.identity-types
open import foundation-core.logical-equivalences
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/impredicative-universes.lagda.md b/src/foundation/impredicative-universes.lagda.md
index f994a01b1b..8699e535dc 100644
--- a/src/foundation/impredicative-universes.lagda.md
+++ b/src/foundation/impredicative-universes.lagda.md
@@ -7,9 +7,10 @@ module foundation.impredicative-universes where
Imports
```agda
+open import foundation.universe-levels
+
open import foundation-core.propositions
open import foundation-core.small-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/induction-principle-propositional-truncation.lagda.md b/src/foundation/induction-principle-propositional-truncation.lagda.md
index 7fe3e955bc..91269e4fb7 100644
--- a/src/foundation/induction-principle-propositional-truncation.lagda.md
+++ b/src/foundation/induction-principle-propositional-truncation.lagda.md
@@ -7,10 +7,11 @@ module foundation.induction-principle-propositional-truncation where
Imports
```agda
-open import foundation-core.dependent-pair-types
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
+
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/inhabited-subtypes.lagda.md b/src/foundation/inhabited-subtypes.lagda.md
index 0cb17603b0..ceb1aa49d5 100644
--- a/src/foundation/inhabited-subtypes.lagda.md
+++ b/src/foundation/inhabited-subtypes.lagda.md
@@ -7,18 +7,18 @@ module foundation.inhabited-subtypes where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.inhabited-types
open import foundation.propositional-truncations
+open import foundation.subtype-identity-principle
open import foundation.subtypes
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.subtype-identity-principle
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/inhabited-types.lagda.md b/src/foundation/inhabited-types.lagda.md
index 516334cce9..5892516b3c 100644
--- a/src/foundation/inhabited-types.lagda.md
+++ b/src/foundation/inhabited-types.lagda.md
@@ -7,19 +7,19 @@ module foundation.inhabited-types where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equality-dependent-function-types
open import foundation.functoriality-propositional-truncation
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.propositional-truncations
+open import foundation.subtype-identity-principle
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.subtype-identity-principle
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/injective-maps.lagda.md b/src/foundation/injective-maps.lagda.md
index 92e6bd7fbf..fbf753ab58 100644
--- a/src/foundation/injective-maps.lagda.md
+++ b/src/foundation/injective-maps.lagda.md
@@ -9,9 +9,10 @@ open import foundation-core.injective-maps public
Imports
```agda
+open import foundation.universe-levels
+
open import foundation-core.empty-types
open import foundation-core.negation
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/interchange-law.lagda.md b/src/foundation/interchange-law.lagda.md
index 2c80b7c0e2..71fa15950c 100644
--- a/src/foundation/interchange-law.lagda.md
+++ b/src/foundation/interchange-law.lagda.md
@@ -7,8 +7,9 @@ module foundation.interchange-law where
Imports
```agda
+open import foundation.universe-levels
+
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/intersections-subtypes.lagda.md b/src/foundation/intersections-subtypes.lagda.md
index 995111348d..57f1f72645 100644
--- a/src/foundation/intersections-subtypes.lagda.md
+++ b/src/foundation/intersections-subtypes.lagda.md
@@ -10,10 +10,10 @@ module foundation.intersections-subtypes where
open import foundation.conjunction
open import foundation.decidable-subtypes
open import foundation.large-locale-of-subtypes
+open import foundation.universe-levels
open import foundation-core.propositions
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/involutions.lagda.md b/src/foundation/involutions.lagda.md
index 59f7ec80be..6985c8820a 100644
--- a/src/foundation/involutions.lagda.md
+++ b/src/foundation/involutions.lagda.md
@@ -9,15 +9,15 @@ open import foundation-core.involutions public
Imports
```agda
+open import foundation.automorphisms
open import foundation.equivalence-extensionality
open import foundation.equivalences
+open import foundation.functions
+open import foundation.universe-levels
-open import foundation-core.automorphisms
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.injective-maps
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/isolated-points.lagda.md b/src/foundation/isolated-points.lagda.md
index 603f1db837..2ce05a796a 100644
--- a/src/foundation/isolated-points.lagda.md
+++ b/src/foundation/isolated-points.lagda.md
@@ -12,28 +12,28 @@ open import foundation.decidable-embeddings
open import foundation.decidable-equality
open import foundation.decidable-maps
open import foundation.decidable-types
+open import foundation.dependent-pair-types
open import foundation.embeddings
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.identity-types
open import foundation.maybe
open import foundation.negation
open import foundation.type-arithmetic-unit-type
open import foundation.unit-type
+open import foundation.universe-levels
open import foundation-core.contractible-types
open import foundation-core.coproduct-types
open import foundation-core.decidable-propositions
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.homotopies
open import foundation-core.injective-maps
open import foundation-core.propositions
open import foundation-core.sets
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/isomorphisms-of-sets.lagda.md b/src/foundation/isomorphisms-of-sets.lagda.md
index 6c551d1c60..62624eca2e 100644
--- a/src/foundation/isomorphisms-of-sets.lagda.md
+++ b/src/foundation/isomorphisms-of-sets.lagda.md
@@ -7,17 +7,17 @@ module foundation.isomorphisms-of-sets where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalences
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.sets
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/iterated-cartesian-product-types.lagda.md b/src/foundation/iterated-cartesian-product-types.lagda.md
index 8d277d2a77..fb6cba73d9 100644
--- a/src/foundation/iterated-cartesian-product-types.lagda.md
+++ b/src/foundation/iterated-cartesian-product-types.lagda.md
@@ -11,23 +11,23 @@ open import elementary-number-theory.natural-numbers
open import finite-group-theory.permutations-standard-finite-types
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.functoriality-cartesian-product-types
open import foundation.functoriality-dependent-function-types
+open import foundation.type-arithmetic-cartesian-product-types
open import foundation.type-arithmetic-dependent-function-types
open import foundation.unit-type
open import foundation.univalence
open import foundation.universal-property-coproduct-types
open import foundation.universal-property-empty-type
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.identity-types
-open import foundation-core.type-arithmetic-cartesian-product-types
-open import foundation-core.universe-levels
open import lists.arrays
open import lists.concatenation-lists
diff --git a/src/foundation/iterating-automorphisms.lagda.md b/src/foundation/iterating-automorphisms.lagda.md
index 0dd82dd8d6..ce820fefd3 100644
--- a/src/foundation/iterating-automorphisms.lagda.md
+++ b/src/foundation/iterating-automorphisms.lagda.md
@@ -11,15 +11,15 @@ open import elementary-number-theory.addition-integers
open import elementary-number-theory.integers
open import elementary-number-theory.natural-numbers
+open import foundation.automorphisms
open import foundation.equivalence-extensionality
+open import foundation.functions
open import foundation.iterating-functions
+open import foundation.universe-levels
-open import foundation-core.automorphisms
open import foundation-core.coproduct-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/iterating-functions.lagda.md b/src/foundation/iterating-functions.lagda.md
index e4c27ac83c..e26856a943 100644
--- a/src/foundation/iterating-functions.lagda.md
+++ b/src/foundation/iterating-functions.lagda.md
@@ -12,15 +12,15 @@ open import elementary-number-theory.exponentiation-natural-numbers
open import elementary-number-theory.multiplication-natural-numbers
open import elementary-number-theory.natural-numbers
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.universe-levels
open import foundation-core.commuting-squares-of-maps
-open import foundation-core.dependent-pair-types
open import foundation-core.endomorphisms
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.sets
-open import foundation-core.universe-levels
open import group-theory.monoid-actions
```
diff --git a/src/foundation/iterating-involutions.lagda.md b/src/foundation/iterating-involutions.lagda.md
index 58b42fca1b..3599144e30 100644
--- a/src/foundation/iterating-involutions.lagda.md
+++ b/src/foundation/iterating-involutions.lagda.md
@@ -11,11 +11,11 @@ open import elementary-number-theory.modular-arithmetic-standard-finite-types
open import elementary-number-theory.natural-numbers
open import foundation.iterating-functions
+open import foundation.universe-levels
open import foundation-core.coproduct-types
open import foundation-core.identity-types
open import foundation-core.involutions
-open import foundation-core.universe-levels
open import univalent-combinatorics.standard-finite-types
```
diff --git a/src/foundation/large-dependent-pair-types.lagda.md b/src/foundation/large-dependent-pair-types.lagda.md
index c6e709dc3b..7187ba599c 100644
--- a/src/foundation/large-dependent-pair-types.lagda.md
+++ b/src/foundation/large-dependent-pair-types.lagda.md
@@ -9,7 +9,7 @@ module foundation.large-dependent-pair-types where
Imports
```agda
-open import foundation-core.universe-levels
+open import foundation.universe-levels
```
diff --git a/src/foundation/large-homotopies.lagda.md b/src/foundation/large-homotopies.lagda.md
index 9e05534556..9ab08d5e30 100644
--- a/src/foundation/large-homotopies.lagda.md
+++ b/src/foundation/large-homotopies.lagda.md
@@ -10,8 +10,7 @@ module foundation.large-homotopies where
```agda
open import foundation.large-identity-types
-
-open import foundation-core.universe-levels
+open import foundation.universe-levels
```
diff --git a/src/foundation/large-identity-types.lagda.md b/src/foundation/large-identity-types.lagda.md
index ddfd9c0fe9..5fc4ca3fdf 100644
--- a/src/foundation/large-identity-types.lagda.md
+++ b/src/foundation/large-identity-types.lagda.md
@@ -9,7 +9,7 @@ module foundation.large-identity-types where
Imports
```agda
-open import foundation-core.universe-levels
+open import foundation.universe-levels
```
diff --git a/src/foundation/large-locale-of-propositions.lagda.md b/src/foundation/large-locale-of-propositions.lagda.md
index 93cbab1c5e..997d796ed0 100644
--- a/src/foundation/large-locale-of-propositions.lagda.md
+++ b/src/foundation/large-locale-of-propositions.lagda.md
@@ -9,12 +9,12 @@ module foundation.large-locale-of-propositions where
```agda
open import foundation.conjunction
open import foundation.existential-quantification
+open import foundation.functions
open import foundation.propositional-extensionality
open import foundation.unit-type
+open import foundation.universe-levels
-open import foundation-core.functions
open import foundation-core.propositions
-open import foundation-core.universe-levels
open import order-theory.large-frames
open import order-theory.large-locales
diff --git a/src/foundation/large-locale-of-subtypes.lagda.md b/src/foundation/large-locale-of-subtypes.lagda.md
index 9942fc5003..6ee1b1d72d 100644
--- a/src/foundation/large-locale-of-subtypes.lagda.md
+++ b/src/foundation/large-locale-of-subtypes.lagda.md
@@ -8,11 +8,11 @@ module foundation.large-locale-of-subtypes where
```agda
open import foundation.large-locale-of-propositions
+open import foundation.universe-levels
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.universe-levels
open import order-theory.greatest-lower-bounds-large-posets
open import order-theory.large-locales
diff --git a/src/foundation/law-of-excluded-middle.lagda.md b/src/foundation/law-of-excluded-middle.lagda.md
index 352a4a7d1b..a082e117c8 100644
--- a/src/foundation/law-of-excluded-middle.lagda.md
+++ b/src/foundation/law-of-excluded-middle.lagda.md
@@ -8,12 +8,12 @@ module foundation.law-of-excluded-middle where
```agda
open import foundation.decidable-types
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
open import foundation-core.decidable-propositions
-open import foundation-core.dependent-pair-types
open import foundation-core.negation
open import foundation-core.propositions
-open import foundation-core.universe-levels
open import univalent-combinatorics.2-element-types
```
diff --git a/src/foundation/lawveres-fixed-point-theorem.lagda.md b/src/foundation/lawveres-fixed-point-theorem.lagda.md
index 02ac3ea0bb..749b5aeac7 100644
--- a/src/foundation/lawveres-fixed-point-theorem.lagda.md
+++ b/src/foundation/lawveres-fixed-point-theorem.lagda.md
@@ -7,14 +7,14 @@ module foundation.lawveres-fixed-point-theorem where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.existential-quantification
open import foundation.propositional-truncations
open import foundation.surjective-maps
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.function-extensionality
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/lesser-limited-principle-of-omniscience.lagda.md b/src/foundation/lesser-limited-principle-of-omniscience.lagda.md
index 1ac7dfec34..a97ed1c165 100644
--- a/src/foundation/lesser-limited-principle-of-omniscience.lagda.md
+++ b/src/foundation/lesser-limited-principle-of-omniscience.lagda.md
@@ -11,11 +11,11 @@ open import elementary-number-theory.natural-numbers
open import elementary-number-theory.parity-natural-numbers
open import foundation.disjunction
+open import foundation.universe-levels
open import foundation-core.fibers-of-maps
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.universe-levels
open import univalent-combinatorics.standard-finite-types
```
diff --git a/src/foundation/limited-principle-of-omniscience.lagda.md b/src/foundation/limited-principle-of-omniscience.lagda.md
index 6d394b644e..fcf98e1c1f 100644
--- a/src/foundation/limited-principle-of-omniscience.lagda.md
+++ b/src/foundation/limited-principle-of-omniscience.lagda.md
@@ -11,11 +11,11 @@ open import elementary-number-theory.natural-numbers
open import foundation.disjunction
open import foundation.existential-quantification
+open import foundation.universe-levels
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.universe-levels
open import univalent-combinatorics.standard-finite-types
```
diff --git a/src/foundation/locally-small-types.lagda.md b/src/foundation/locally-small-types.lagda.md
index 305f6e9e0e..8c545e6e7b 100644
--- a/src/foundation/locally-small-types.lagda.md
+++ b/src/foundation/locally-small-types.lagda.md
@@ -7,12 +7,13 @@ module foundation.locally-small-types where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
open import foundation.inhabited-subtypes
open import foundation.subuniverses
open import foundation.univalence
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.homotopies
@@ -22,7 +23,6 @@ open import foundation-core.small-types
open import foundation-core.subtypes
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/logical-equivalences.lagda.md b/src/foundation/logical-equivalences.lagda.md
index 815593741d..45351d2ef7 100644
--- a/src/foundation/logical-equivalences.lagda.md
+++ b/src/foundation/logical-equivalences.lagda.md
@@ -9,12 +9,13 @@ open import foundation-core.logical-equivalences public
Imports
```agda
-open import foundation-core.dependent-pair-types
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/maybe.lagda.md b/src/foundation/maybe.lagda.md
index c10ec906a9..614493a3e0 100644
--- a/src/foundation/maybe.lagda.md
+++ b/src/foundation/maybe.lagda.md
@@ -9,18 +9,18 @@ module foundation.maybe where
```agda
open import foundation.coproduct-types
open import foundation.decidable-types
+open import foundation.dependent-pair-types
open import foundation.equality-coproduct-types
open import foundation.type-arithmetic-empty-type
open import foundation.unit-type
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.empty-types
open import foundation-core.equivalences
open import foundation-core.identity-types
open import foundation-core.injective-maps
open import foundation-core.negation
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/mere-embeddings.lagda.md b/src/foundation/mere-embeddings.lagda.md
index 2667effaaa..9340a3f645 100644
--- a/src/foundation/mere-embeddings.lagda.md
+++ b/src/foundation/mere-embeddings.lagda.md
@@ -12,9 +12,9 @@ open import foundation.embeddings
open import foundation.law-of-excluded-middle
open import foundation.mere-equivalences
open import foundation.propositional-truncations
+open import foundation.universe-levels
open import foundation-core.propositions
-open import foundation-core.universe-levels
open import order-theory.large-preorders
```
diff --git a/src/foundation/mere-equality.lagda.md b/src/foundation/mere-equality.lagda.md
index 38fe3fb83b..4c42fdedf5 100644
--- a/src/foundation/mere-equality.lagda.md
+++ b/src/foundation/mere-equality.lagda.md
@@ -7,16 +7,16 @@ module foundation.mere-equality where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.functoriality-propositional-truncation
open import foundation.propositional-truncations
open import foundation.reflecting-maps-equivalence-relations
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalence-relations
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/mere-equivalences.lagda.md b/src/foundation/mere-equivalences.lagda.md
index 2ea9ee3095..14a540665a 100644
--- a/src/foundation/mere-equivalences.lagda.md
+++ b/src/foundation/mere-equivalences.lagda.md
@@ -12,13 +12,13 @@ open import foundation.functoriality-propositional-truncation
open import foundation.mere-equality
open import foundation.propositional-truncations
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.equivalences
open import foundation-core.propositions
open import foundation-core.sets
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/monomorphisms.lagda.md b/src/foundation/monomorphisms.lagda.md
index 3842c0bed8..ab09c9eb7b 100644
--- a/src/foundation/monomorphisms.lagda.md
+++ b/src/foundation/monomorphisms.lagda.md
@@ -7,17 +7,17 @@ module foundation.monomorphisms where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.embeddings
+open import foundation.functions
open import foundation.functoriality-function-types
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.propositional-maps
open import foundation-core.propositions
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/morphisms-cospans.lagda.md b/src/foundation/morphisms-cospans.lagda.md
index 60886c72f4..8217c9a242 100644
--- a/src/foundation/morphisms-cospans.lagda.md
+++ b/src/foundation/morphisms-cospans.lagda.md
@@ -1,15 +1,144 @@
# Morphisms of cospans
```agda
-module foundation.morphisms-cospans where
+{-# OPTIONS --safe #-}
-open import foundation-core.morphisms-cospans public
+module foundation.morphisms-cospans where
```
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+open import foundation-core.cartesian-product-types
+open import foundation-core.homotopies
```
+
+## Idea
+
+A morphism of cospans is a commuting diagram of the form
+
+```text
+ A -----> X <----- B
+ | | |
+ | | |
+ V V V
+ A' ----> X' <---- B'
+```
+
+## Definitions
+
+### Morphisms of cospans
+
+```agda
+hom-cospan :
+ {l1 l2 l3 l1' l2' l3' : Level}
+ {A : UU l1} {B : UU l2} {X : UU l3} (f : A → X) (g : B → X)
+ {A' : UU l1'} {B' : UU l2'} {X' : UU l3'} (f' : A' → X') (g' : B' → X') →
+ UU (l1 ⊔ l2 ⊔ l3 ⊔ l1' ⊔ l2' ⊔ l3')
+hom-cospan {A = A} {B} {X} f g {A'} {B'} {X'} f' g' =
+ Σ (A → A') (λ hA →
+ Σ (B → B') (λ hB →
+ Σ (X → X') (λ hX →
+ ((f' ∘ hA) ~ (hX ∘ f)) × ((g' ∘ hB) ~ (hX ∘ g)))))
+```
+
+### Identity morphisms of cospans
+
+```agda
+id-hom-cospan :
+ {l1 l2 l3 l1' l2' l3' : Level}
+ {A : UU l1} {B : UU l2} {X : UU l3} (f : A → X) (g : B → X) →
+ hom-cospan f g f g
+pr1 (id-hom-cospan f g) = id
+pr1 (pr2 (id-hom-cospan f g)) = id
+pr1 (pr2 (pr2 (id-hom-cospan f g))) = id
+pr1 (pr2 (pr2 (pr2 (id-hom-cospan f g)))) = refl-htpy
+pr2 (pr2 (pr2 (pr2 (id-hom-cospan f g)))) = refl-htpy
+```
+
+### Rotating cospans of cospans
+
+```agda
+cospan-hom-cospan-rotate :
+ {l1 l2 l3 l1' l2' l3' l1'' l2'' l3'' : Level}
+ {A : UU l1} {B : UU l2} {X : UU l3} (f : A → X) (g : B → X)
+ {A' : UU l1'} {B' : UU l2'} {X' : UU l3'} (f' : A' → X') (g' : B' → X')
+ {A'' : UU l1''} {B'' : UU l2''} {X'' : UU l3''}
+ (f'' : A'' → X'') (g'' : B'' → X'')
+ (h : hom-cospan f' g' f g) (h' : hom-cospan f'' g'' f g) →
+ hom-cospan (pr1 h) (pr1 h') (pr1 (pr2 (pr2 h))) (pr1 (pr2 (pr2 h')))
+pr1
+ ( cospan-hom-cospan-rotate f g f' g' f'' g''
+ ( pair hA (pair hB (pair hX (pair HA HB))))
+ ( pair hA' (pair hB' (pair hX' (pair HA' HB'))))) = f'
+pr1
+ ( pr2
+ ( cospan-hom-cospan-rotate f g f' g' f'' g''
+ ( pair hA (pair hB (pair hX (pair HA HB))))
+ ( pair hA' (pair hB' (pair hX' (pair HA' HB')))))) = f''
+pr1
+ ( pr2
+ ( pr2
+ ( cospan-hom-cospan-rotate f g f' g' f'' g''
+ ( pair hA (pair hB (pair hX (pair HA HB))))
+ ( pair hA' (pair hB' (pair hX' (pair HA' HB'))))))) = f
+pr1
+ ( pr2
+ ( pr2
+ ( pr2
+ ( cospan-hom-cospan-rotate f g f' g' f'' g''
+ ( pair hA (pair hB (pair hX (pair HA HB))))
+ ( pair hA' (pair hB' (pair hX' (pair HA' HB')))))))) = inv-htpy HA
+pr2
+ ( pr2
+ ( pr2
+ ( pr2
+ ( cospan-hom-cospan-rotate f g f' g' f'' g''
+ ( pair hA (pair hB (pair hX (pair HA HB))))
+ ( pair hA' (pair hB' (pair hX' (pair HA' HB')))))))) = inv-htpy HA'
+
+cospan-hom-cospan-rotate' :
+ {l1 l2 l3 l1' l2' l3' l1'' l2'' l3'' : Level}
+ {A : UU l1} {B : UU l2} {X : UU l3} (f : A → X) (g : B → X)
+ {A' : UU l1'} {B' : UU l2'} {X' : UU l3'} (f' : A' → X') (g' : B' → X')
+ {A'' : UU l1''} {B'' : UU l2''} {X'' : UU l3''}
+ (f'' : A'' → X'') (g'' : B'' → X'')
+ (h : hom-cospan f' g' f g) (h' : hom-cospan f'' g'' f g) →
+ hom-cospan
+ (pr1 (pr2 h)) (pr1 (pr2 h')) (pr1 (pr2 (pr2 h))) (pr1 (pr2 (pr2 h')))
+pr1
+ ( cospan-hom-cospan-rotate' f g f' g' f'' g''
+ ( pair hA (pair hB (pair hX (pair HA HB))))
+ ( pair hA' (pair hB' (pair hX' (pair HA' HB'))))) = g'
+pr1
+ ( pr2
+ ( cospan-hom-cospan-rotate' f g f' g' f'' g''
+ ( pair hA (pair hB (pair hX (pair HA HB))))
+ ( pair hA' (pair hB' (pair hX' (pair HA' HB')))))) = g''
+pr1
+ ( pr2
+ ( pr2
+ ( cospan-hom-cospan-rotate' f g f' g' f'' g''
+ ( pair hA (pair hB (pair hX (pair HA HB))))
+ ( pair hA' (pair hB' (pair hX' (pair HA' HB'))))))) = g
+pr1
+ ( pr2
+ ( pr2
+ ( pr2
+ ( cospan-hom-cospan-rotate' f g f' g' f'' g''
+ ( pair hA (pair hB (pair hX (pair HA HB))))
+ ( pair hA' (pair hB' (pair hX' (pair HA' HB')))))))) = inv-htpy HB
+pr2
+ ( pr2
+ ( pr2
+ ( pr2
+ ( cospan-hom-cospan-rotate' f g f' g' f'' g''
+ ( pair hA (pair hB (pair hX (pair HA HB))))
+ ( pair hA' (pair hB' (pair hX' (pair HA' HB')))))))) = inv-htpy HB'
+```
diff --git a/src/foundation/multisubsets.lagda.md b/src/foundation/multisubsets.lagda.md
index 5f89ca107c..f48fd9fce6 100644
--- a/src/foundation/multisubsets.lagda.md
+++ b/src/foundation/multisubsets.lagda.md
@@ -9,14 +9,14 @@ module foundation.multisubsets where
```agda
open import elementary-number-theory.natural-numbers
+open import foundation.dependent-pair-types
open import foundation.images
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.fibers-of-maps
open import foundation-core.identity-types
open import foundation-core.negation
open import foundation-core.sets
-open import foundation-core.universe-levels
open import univalent-combinatorics.finite-types
```
diff --git a/src/foundation/multivariable-correspondences.lagda.md b/src/foundation/multivariable-correspondences.lagda.md
index 4e6e3d3d07..6e422d49e7 100644
--- a/src/foundation/multivariable-correspondences.lagda.md
+++ b/src/foundation/multivariable-correspondences.lagda.md
@@ -9,7 +9,7 @@ module foundation.multivariable-correspondences where
```agda
open import elementary-number-theory.natural-numbers
-open import foundation-core.universe-levels
+open import foundation.universe-levels
open import univalent-combinatorics.standard-finite-types
```
diff --git a/src/foundation/multivariable-decidable-relations.lagda.md b/src/foundation/multivariable-decidable-relations.lagda.md
index 7bb3aa1400..9a5467028e 100644
--- a/src/foundation/multivariable-decidable-relations.lagda.md
+++ b/src/foundation/multivariable-decidable-relations.lagda.md
@@ -12,8 +12,7 @@ open import elementary-number-theory.natural-numbers
open import foundation.decidable-subtypes
open import foundation.multivariable-correspondences
open import foundation.multivariable-relations
-
-open import foundation-core.universe-levels
+open import foundation.universe-levels
open import univalent-combinatorics.standard-finite-types
```
diff --git a/src/foundation/multivariable-functoriality-set-quotients.lagda.md b/src/foundation/multivariable-functoriality-set-quotients.lagda.md
index e439e033d7..940d7a71de 100644
--- a/src/foundation/multivariable-functoriality-set-quotients.lagda.md
+++ b/src/foundation/multivariable-functoriality-set-quotients.lagda.md
@@ -9,14 +9,14 @@ module foundation.multivariable-functoriality-set-quotients where
```agda
open import elementary-number-theory.natural-numbers
+open import foundation.functions
open import foundation.functoriality-set-quotients
open import foundation.set-quotients
+open import foundation.universe-levels
open import foundation.vectors-set-quotients
open import foundation-core.equivalence-relations
-open import foundation-core.functions
open import foundation-core.homotopies
-open import foundation-core.universe-levels
open import linear-algebra.vectors
diff --git a/src/foundation/multivariable-operations.lagda.md b/src/foundation/multivariable-operations.lagda.md
index 7adcba0025..1882f5e44f 100644
--- a/src/foundation/multivariable-operations.lagda.md
+++ b/src/foundation/multivariable-operations.lagda.md
@@ -9,18 +9,18 @@ module foundation.multivariable-operations where
```agda
open import elementary-number-theory.natural-numbers
+open import foundation.dependent-pair-types
+open import foundation.equality-cartesian-product-types
+open import foundation.functions
open import foundation.raising-universe-levels
open import foundation.unit-type
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.equality-cartesian-product-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
open import linear-algebra.vectors
```
diff --git a/src/foundation/multivariable-relations.lagda.md b/src/foundation/multivariable-relations.lagda.md
index bb64c45e0f..630c453e97 100644
--- a/src/foundation/multivariable-relations.lagda.md
+++ b/src/foundation/multivariable-relations.lagda.md
@@ -10,9 +10,9 @@ module foundation.multivariable-relations where
open import elementary-number-theory.natural-numbers
open import foundation.multivariable-correspondences
+open import foundation.universe-levels
open import foundation-core.subtypes
-open import foundation-core.universe-levels
open import univalent-combinatorics.standard-finite-types
```
diff --git a/src/foundation/negation.lagda.md b/src/foundation/negation.lagda.md
index 3edfa90ca0..f83225d7cb 100644
--- a/src/foundation/negation.lagda.md
+++ b/src/foundation/negation.lagda.md
@@ -9,12 +9,13 @@ open import foundation-core.negation public
Imports
```agda
-open import foundation-core.dependent-pair-types
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
+
open import foundation-core.empty-types
open import foundation-core.equivalences
open import foundation-core.logical-equivalences
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/noncontractible-types.lagda.md b/src/foundation/noncontractible-types.lagda.md
index 9770449727..77c76afa04 100644
--- a/src/foundation/noncontractible-types.lagda.md
+++ b/src/foundation/noncontractible-types.lagda.md
@@ -9,13 +9,14 @@ module foundation.noncontractible-types where
```agda
open import elementary-number-theory.natural-numbers
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.negation
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/pairs-of-distinct-elements.lagda.md b/src/foundation/pairs-of-distinct-elements.lagda.md
index 0b2345e748..8ebaf9e523 100644
--- a/src/foundation/pairs-of-distinct-elements.lagda.md
+++ b/src/foundation/pairs-of-distinct-elements.lagda.md
@@ -7,19 +7,19 @@ module foundation.pairs-of-distinct-elements where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.embeddings
open import foundation.equivalences
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.negation
open import foundation.structure-identity-principle
+open import foundation.subtype-identity-principle
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.injective-maps
-open import foundation-core.subtype-identity-principle
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/partial-elements.lagda.md b/src/foundation/partial-elements.lagda.md
index 6d0906651e..b0de55f138 100644
--- a/src/foundation/partial-elements.lagda.md
+++ b/src/foundation/partial-elements.lagda.md
@@ -7,11 +7,11 @@ module foundation.partial-elements where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.unit-type
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/partitions.lagda.md b/src/foundation/partitions.lagda.md
index ee599d3dca..74e5d8f81e 100644
--- a/src/foundation/partitions.lagda.md
+++ b/src/foundation/partitions.lagda.md
@@ -8,10 +8,13 @@ module foundation.partitions where
```agda
open import foundation.contractible-types
+open import foundation.dependent-pair-types
open import foundation.embeddings
open import foundation.equivalences
open import foundation.existential-quantification
open import foundation.fiber-inclusions
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.identity-types
open import foundation.inhabited-subtypes
open import foundation.inhabited-types
@@ -20,22 +23,19 @@ open import foundation.logical-equivalences
open import foundation.propositional-truncations
open import foundation.sigma-decompositions
open import foundation.small-types
+open import foundation.subtype-identity-principle
open import foundation.subtypes
open import foundation.surjective-maps
+open import foundation.type-arithmetic-dependent-pair-types
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-function-types
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.homotopies
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.subtype-identity-principle
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/path-algebra.lagda.md b/src/foundation/path-algebra.lagda.md
index fc9fb0b8b1..3c6178e280 100644
--- a/src/foundation/path-algebra.lagda.md
+++ b/src/foundation/path-algebra.lagda.md
@@ -10,12 +10,12 @@ module foundation.path-algebra where
open import foundation.binary-embeddings
open import foundation.binary-equivalences
open import foundation.commuting-squares-of-identifications
+open import foundation.functions
open import foundation.identity-types
+open import foundation.universe-levels
open import foundation-core.constant-maps
-open import foundation-core.functions
open import foundation-core.homotopies
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/path-split-maps.lagda.md b/src/foundation/path-split-maps.lagda.md
index 938188a810..2c7f9c14fb 100644
--- a/src/foundation/path-split-maps.lagda.md
+++ b/src/foundation/path-split-maps.lagda.md
@@ -9,12 +9,12 @@ open import foundation-core.path-split-maps public
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalences
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/perfect-images.lagda.md b/src/foundation/perfect-images.lagda.md
index 12ec0f5158..606928b8f2 100644
--- a/src/foundation/perfect-images.lagda.md
+++ b/src/foundation/perfect-images.lagda.md
@@ -10,23 +10,23 @@ module foundation.perfect-images where
open import elementary-number-theory.natural-numbers
open import foundation.decidable-types
+open import foundation.dependent-pair-types
open import foundation.double-negation
+open import foundation.functions
open import foundation.iterating-functions
open import foundation.law-of-excluded-middle
open import foundation.negation
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.empty-types
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.injective-maps
open import foundation-core.propositional-maps
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/pi-decompositions-subuniverse.lagda.md b/src/foundation/pi-decompositions-subuniverse.lagda.md
index 5684eb72d5..3244ca8045 100644
--- a/src/foundation/pi-decompositions-subuniverse.lagda.md
+++ b/src/foundation/pi-decompositions-subuniverse.lagda.md
@@ -7,15 +7,15 @@ module foundation.pi-decompositions-subuniverse where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.pi-decompositions
open import foundation.subuniverses
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.homotopies
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/pi-decompositions.lagda.md b/src/foundation/pi-decompositions.lagda.md
index 3495b4bf1a..1caa7c727c 100644
--- a/src/foundation/pi-decompositions.lagda.md
+++ b/src/foundation/pi-decompositions.lagda.md
@@ -9,24 +9,24 @@ module foundation.pi-decompositions where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalence-extensionality
open import foundation.equivalences
+open import foundation.functions
open import foundation.functoriality-dependent-function-types
open import foundation.functoriality-dependent-pair-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.propositional-truncations
open import foundation.sets
open import foundation.structure-identity-principle
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.type-theoretic-principle-of-choice
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/powersets.lagda.md b/src/foundation/powersets.lagda.md
index 7940218129..ab990d989a 100644
--- a/src/foundation/powersets.lagda.md
+++ b/src/foundation/powersets.lagda.md
@@ -8,14 +8,14 @@ module foundation.powersets where
```agda
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.propositional-extensionality
+open import foundation.universe-levels
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.subtypes
-open import foundation-core.universe-levels
open import order-theory.large-posets
open import order-theory.large-preorders
diff --git a/src/foundation/preidempotent-maps.lagda.md b/src/foundation/preidempotent-maps.lagda.md
index eebc033159..343ccb584e 100644
--- a/src/foundation/preidempotent-maps.lagda.md
+++ b/src/foundation/preidempotent-maps.lagda.md
@@ -7,12 +7,13 @@ module foundation.preidempotent-maps where
Imports
```agda
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.homotopies
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/preimages-of-subtypes.lagda.md b/src/foundation/preimages-of-subtypes.lagda.md
index c5288fe37e..ac1a192b66 100644
--- a/src/foundation/preimages-of-subtypes.lagda.md
+++ b/src/foundation/preimages-of-subtypes.lagda.md
@@ -7,8 +7,9 @@ module foundation.preimages-of-subtypes where
Imports
```agda
+open import foundation.universe-levels
+
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/principle-of-omniscience.lagda.md b/src/foundation/principle-of-omniscience.lagda.md
index d9d310af26..6053158bbf 100644
--- a/src/foundation/principle-of-omniscience.lagda.md
+++ b/src/foundation/principle-of-omniscience.lagda.md
@@ -9,10 +9,10 @@ module foundation.principle-of-omniscience where
```agda
open import foundation.decidable-subtypes
open import foundation.propositional-truncations
+open import foundation.universe-levels
open import foundation-core.decidable-propositions
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/product-decompositions-subuniverse.lagda.md b/src/foundation/product-decompositions-subuniverse.lagda.md
index bb3076ebc4..044928907a 100644
--- a/src/foundation/product-decompositions-subuniverse.lagda.md
+++ b/src/foundation/product-decompositions-subuniverse.lagda.md
@@ -8,20 +8,20 @@ module foundation.product-decompositions-subuniverse where
```agda
open import foundation.cartesian-product-types
+open import foundation.dependent-pair-types
open import foundation.equivalences
open import foundation.subuniverses
+open import foundation.type-arithmetic-cartesian-product-types
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.unit-type
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.propositions
-open import foundation-core.type-arithmetic-cartesian-product-types
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/product-decompositions.lagda.md b/src/foundation/product-decompositions.lagda.md
index 9770ed533f..b04c539404 100644
--- a/src/foundation/product-decompositions.lagda.md
+++ b/src/foundation/product-decompositions.lagda.md
@@ -8,19 +8,19 @@ module foundation.product-decompositions where
```agda
open import foundation.cartesian-product-types
+open import foundation.dependent-pair-types
open import foundation.equivalences
+open import foundation.type-arithmetic-cartesian-product-types
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.unit-type
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.propositions
-open import foundation-core.type-arithmetic-cartesian-product-types
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/products-binary-relations.lagda.md b/src/foundation/products-binary-relations.lagda.md
index b5cb109bdf..1cfc60265b 100644
--- a/src/foundation/products-binary-relations.lagda.md
+++ b/src/foundation/products-binary-relations.lagda.md
@@ -8,11 +8,11 @@ module foundation.products-binary-relations where
```agda
open import foundation.binary-relations
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/products-equivalence-relations.lagda.md b/src/foundation/products-equivalence-relations.lagda.md
index b12fa579b1..1e58c1617d 100644
--- a/src/foundation/products-equivalence-relations.lagda.md
+++ b/src/foundation/products-equivalence-relations.lagda.md
@@ -8,12 +8,12 @@ module foundation.products-equivalence-relations where
```agda
open import foundation.binary-relations
+open import foundation.dependent-pair-types
open import foundation.products-binary-relations
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalence-relations
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/products-of-tuples-of-types.lagda.md b/src/foundation/products-of-tuples-of-types.lagda.md
index c232c635e5..dd857648e4 100644
--- a/src/foundation/products-of-tuples-of-types.lagda.md
+++ b/src/foundation/products-of-tuples-of-types.lagda.md
@@ -10,8 +10,7 @@ module foundation.products-of-tuples-of-types where
open import elementary-number-theory.natural-numbers
open import foundation.tuples-of-types
-
-open import foundation-core.universe-levels
+open import foundation.universe-levels
open import univalent-combinatorics.standard-finite-types
```
diff --git a/src/foundation/products-unordered-pairs-of-types.lagda.md b/src/foundation/products-unordered-pairs-of-types.lagda.md
index 32ab9d0714..c9013920c4 100644
--- a/src/foundation/products-unordered-pairs-of-types.lagda.md
+++ b/src/foundation/products-unordered-pairs-of-types.lagda.md
@@ -7,18 +7,18 @@ module foundation.products-unordered-pairs-of-types where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.functoriality-cartesian-product-types
open import foundation.functoriality-dependent-function-types
open import foundation.identity-types
open import foundation.symmetric-operations
+open import foundation.universe-levels
open import foundation.unordered-pairs
open import foundation.unordered-pairs-of-types
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
-open import foundation-core.universe-levels
open import univalent-combinatorics.2-element-types
open import univalent-combinatorics.universal-property-standard-finite-types
diff --git a/src/foundation/products-unordered-tuples-of-types.lagda.md b/src/foundation/products-unordered-tuples-of-types.lagda.md
index dda129fcbe..9fb480d64f 100644
--- a/src/foundation/products-unordered-tuples-of-types.lagda.md
+++ b/src/foundation/products-unordered-tuples-of-types.lagda.md
@@ -9,15 +9,15 @@ module foundation.products-unordered-tuples-of-types where
```agda
open import elementary-number-theory.natural-numbers
+open import foundation.dependent-pair-types
open import foundation.functoriality-dependent-function-types
open import foundation.universal-property-maybe
+open import foundation.universe-levels
open import foundation.unordered-tuples
open import foundation.unordered-tuples-of-types
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.universe-levels
open import univalent-combinatorics.complements-isolated-points
```
diff --git a/src/foundation/projective-types.lagda.md b/src/foundation/projective-types.lagda.md
index 326b3d9389..a158fc310c 100644
--- a/src/foundation/projective-types.lagda.md
+++ b/src/foundation/projective-types.lagda.md
@@ -10,13 +10,13 @@ module foundation.projective-types where
open import elementary-number-theory.natural-numbers
open import foundation.connected-maps
+open import foundation.functions
open import foundation.surjective-maps
open import foundation.truncation-levels
+open import foundation.universe-levels
-open import foundation-core.functions
open import foundation-core.sets
open import foundation-core.truncated-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/proper-subtypes.lagda.md b/src/foundation/proper-subtypes.lagda.md
index bc6d3a4ba2..2ca5864332 100644
--- a/src/foundation/proper-subtypes.lagda.md
+++ b/src/foundation/proper-subtypes.lagda.md
@@ -9,10 +9,10 @@ module foundation.proper-subtypes where
```agda
open import foundation.complements-subtypes
open import foundation.inhabited-subtypes
+open import foundation.universe-levels
open import foundation-core.propositions
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/propositional-extensionality.lagda.md b/src/foundation/propositional-extensionality.lagda.md
index 214b23a483..624a72a527 100644
--- a/src/foundation/propositional-extensionality.lagda.md
+++ b/src/foundation/propositional-extensionality.lagda.md
@@ -8,26 +8,26 @@ module foundation.propositional-extensionality where
```agda
open import foundation.contractible-types
+open import foundation.dependent-pair-types
open import foundation.empty-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.identity-types
open import foundation.logical-equivalences
open import foundation.negation
open import foundation.raising-universe-levels
+open import foundation.subtype-identity-principle
+open import foundation.type-arithmetic-cartesian-product-types
open import foundation.unit-type
open import foundation.univalence
open import foundation.univalent-type-families
open import foundation.universal-property-empty-type
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.functoriality-function-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.subtype-identity-principle
-open import foundation-core.type-arithmetic-cartesian-product-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/propositional-maps.lagda.md b/src/foundation/propositional-maps.lagda.md
index 14f5d76dcb..49b4dcbc1d 100644
--- a/src/foundation/propositional-maps.lagda.md
+++ b/src/foundation/propositional-maps.lagda.md
@@ -9,15 +9,15 @@ open import foundation-core.propositional-maps public
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.embeddings
open import foundation.truncated-maps
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.logical-equivalences
open import foundation-core.propositions
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/propositional-resizing.lagda.md b/src/foundation/propositional-resizing.lagda.md
index 9f521f9c0e..b3be0891b7 100644
--- a/src/foundation/propositional-resizing.lagda.md
+++ b/src/foundation/propositional-resizing.lagda.md
@@ -7,10 +7,11 @@ module foundation.propositional-resizing where
Imports
```agda
-open import foundation-core.dependent-pair-types
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
+
open import foundation-core.propositions
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/propositional-truncations.lagda.md b/src/foundation/propositional-truncations.lagda.md
index 8418549ca8..95f176b5d3 100644
--- a/src/foundation/propositional-truncations.lagda.md
+++ b/src/foundation/propositional-truncations.lagda.md
@@ -7,23 +7,23 @@ module foundation.propositional-truncations where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.functoriality-cartesian-product-types
open import foundation.propositions
open import foundation.truncations
open import foundation.universal-property-propositional-truncation
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.sets
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/propositions.lagda.md b/src/foundation/propositions.lagda.md
index 1ef3651eb0..7299c2f02c 100644
--- a/src/foundation/propositions.lagda.md
+++ b/src/foundation/propositions.lagda.md
@@ -10,11 +10,11 @@ open import foundation-core.propositions public
```agda
open import foundation.contractible-types
+open import foundation.universe-levels
open import foundation-core.retractions
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/pullback-squares.lagda.md b/src/foundation/pullback-squares.lagda.md
index 0edc8ef800..59c26f5ae6 100644
--- a/src/foundation/pullback-squares.lagda.md
+++ b/src/foundation/pullback-squares.lagda.md
@@ -7,11 +7,12 @@ module foundation.pullback-squares where
Imports
```agda
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
+
open import foundation-core.commuting-squares-of-maps
-open import foundation-core.cones-over-cospans
-open import foundation-core.dependent-pair-types
open import foundation-core.universal-property-pullbacks
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/pullbacks.lagda.md b/src/foundation/pullbacks.lagda.md
index 28e916a214..c94132f6cf 100644
--- a/src/foundation/pullbacks.lagda.md
+++ b/src/foundation/pullbacks.lagda.md
@@ -10,26 +10,26 @@ open import foundation-core.pullbacks public
```agda
open import foundation.commuting-cubes-of-maps
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
open import foundation.descent-equivalences
open import foundation.equivalences
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.functoriality-dependent-pair-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.homotopies
open import foundation.identity-types
open import foundation.unit-type
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.cones-over-cospans
open import foundation-core.constant-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.diagonal-maps-of-types
open import foundation-core.equality-dependent-pair-types
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-function-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/raising-universe-levels.lagda.md b/src/foundation/raising-universe-levels.lagda.md
index 7d673a48d6..8846e95682 100644
--- a/src/foundation/raising-universe-levels.lagda.md
+++ b/src/foundation/raising-universe-levels.lagda.md
@@ -7,14 +7,15 @@ module foundation.raising-universe-levels where
Imports
```agda
-open import foundation-core.dependent-pair-types
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/reflecting-maps-equivalence-relations.lagda.md b/src/foundation/reflecting-maps-equivalence-relations.lagda.md
index fca2f661e4..25be74f009 100644
--- a/src/foundation/reflecting-maps-equivalence-relations.lagda.md
+++ b/src/foundation/reflecting-maps-equivalence-relations.lagda.md
@@ -7,19 +7,19 @@ module foundation.reflecting-maps-equivalence-relations where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.effective-maps-equivalence-relations
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.homotopies
+open import foundation.subtype-identity-principle
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalence-relations
open import foundation-core.equivalences
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.subtype-identity-principle
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/reflexive-relations.lagda.md b/src/foundation/reflexive-relations.lagda.md
index be7dd6ad8b..dd5ce46398 100644
--- a/src/foundation/reflexive-relations.lagda.md
+++ b/src/foundation/reflexive-relations.lagda.md
@@ -8,9 +8,8 @@ module foundation.reflexive-relations where
```agda
open import foundation.binary-relations
-
-open import foundation-core.dependent-pair-types
-open import foundation-core.universe-levels
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
```
diff --git a/src/foundation/relaxed-sigma-decompositions.lagda.md b/src/foundation/relaxed-sigma-decompositions.lagda.md
index acbb13a825..d845f25bd9 100644
--- a/src/foundation/relaxed-sigma-decompositions.lagda.md
+++ b/src/foundation/relaxed-sigma-decompositions.lagda.md
@@ -9,21 +9,21 @@ module foundation.relaxed-sigma-decompositions where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalence-extensionality
open import foundation.equivalences
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.structure-identity-principle
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.type-theoretic-principle-of-choice
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/repetitions-of-values.lagda.md b/src/foundation/repetitions-of-values.lagda.md
index 244e305a1d..12daefca7a 100644
--- a/src/foundation/repetitions-of-values.lagda.md
+++ b/src/foundation/repetitions-of-values.lagda.md
@@ -7,19 +7,19 @@ module foundation.repetitions-of-values where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.embeddings
open import foundation.equivalences
+open import foundation.functions
open import foundation.identity-types
open import foundation.pairs-of-distinct-elements
+open import foundation.universe-levels
open import foundation-core.commuting-squares-of-maps
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.injective-maps
open import foundation-core.negation
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/repetitions-sequences.lagda.md b/src/foundation/repetitions-sequences.lagda.md
index 153f1b0caa..6367d1ec8c 100644
--- a/src/foundation/repetitions-sequences.lagda.md
+++ b/src/foundation/repetitions-sequences.lagda.md
@@ -10,20 +10,20 @@ module foundation.repetitions-sequences where
open import elementary-number-theory.natural-numbers
open import elementary-number-theory.strictly-ordered-pairs-of-natural-numbers
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.pairs-of-distinct-elements
open import foundation.repetitions-of-values
open import foundation.sequences
open import foundation.unit-type
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.empty-types
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.identity-types
open import foundation-core.injective-maps
open import foundation-core.negation
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/replacement.lagda.md b/src/foundation/replacement.lagda.md
index 746a48b7b1..03a5b5719b 100644
--- a/src/foundation/replacement.lagda.md
+++ b/src/foundation/replacement.lagda.md
@@ -9,9 +9,9 @@ module foundation.replacement where
```agda
open import foundation.images
open import foundation.locally-small-types
+open import foundation.universe-levels
open import foundation-core.small-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/retractions.lagda.md b/src/foundation/retractions.lagda.md
index 0400123a4f..bc0c3103fe 100644
--- a/src/foundation/retractions.lagda.md
+++ b/src/foundation/retractions.lagda.md
@@ -10,14 +10,14 @@ open import foundation-core.retractions public
```agda
open import foundation.coslice
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.injective-maps
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/russells-paradox.lagda.md b/src/foundation/russells-paradox.lagda.md
index 239ee7b015..28d47163ac 100644
--- a/src/foundation/russells-paradox.lagda.md
+++ b/src/foundation/russells-paradox.lagda.md
@@ -9,6 +9,7 @@ module foundation.russells-paradox where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalences
open import foundation.functoriality-cartesian-product-types
open import foundation.identity-types
@@ -17,14 +18,13 @@ open import foundation.negation
open import foundation.small-types
open import foundation.small-universes
open import foundation.surjective-maps
+open import foundation.type-arithmetic-cartesian-product-types
+open import foundation.type-arithmetic-dependent-pair-types
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.type-arithmetic-cartesian-product-types
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
open import trees.multisets
open import trees.small-multisets
diff --git a/src/foundation/sections.lagda.md b/src/foundation/sections.lagda.md
index 626eeb7e96..5eb42f3eed 100644
--- a/src/foundation/sections.lagda.md
+++ b/src/foundation/sections.lagda.md
@@ -9,22 +9,22 @@ open import foundation-core.sections public
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.structure-identity-principle
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.type-theoretic-principle-of-choice
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
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.retractions
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/sequences.lagda.md b/src/foundation/sequences.lagda.md
index 3ad94cad9e..7cf6e83bff 100644
--- a/src/foundation/sequences.lagda.md
+++ b/src/foundation/sequences.lagda.md
@@ -9,8 +9,8 @@ module foundation.sequences where
```agda
open import elementary-number-theory.natural-numbers
-open import foundation-core.functions
-open import foundation-core.universe-levels
+open import foundation.functions
+open import foundation.universe-levels
```
diff --git a/src/foundation/set-presented-types.lagda.md b/src/foundation/set-presented-types.lagda.md
index 624954077e..fc03b8d896 100644
--- a/src/foundation/set-presented-types.lagda.md
+++ b/src/foundation/set-presented-types.lagda.md
@@ -8,13 +8,13 @@ module foundation.set-presented-types where
```agda
open import foundation.existential-quantification
+open import foundation.functions
open import foundation.set-truncations
+open import foundation.universe-levels
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/set-quotients.lagda.md b/src/foundation/set-quotients.lagda.md
index f88524eb4a..80ddc75860 100644
--- a/src/foundation/set-quotients.lagda.md
+++ b/src/foundation/set-quotients.lagda.md
@@ -7,10 +7,12 @@ module foundation.set-quotients where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.effective-maps-equivalence-relations
open import foundation.embeddings
open import foundation.equivalence-classes
open import foundation.equivalences
+open import foundation.functions
open import foundation.identity-types
open import foundation.inhabited-subtypes
open import foundation.reflecting-maps-equivalence-relations
@@ -20,17 +22,15 @@ open import foundation.surjective-maps
open import foundation.uniqueness-set-quotients
open import foundation.universal-property-image
open import foundation.universal-property-set-quotients
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalence-relations
open import foundation-core.function-extensionality
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-function-types
open import foundation-core.homotopies
open import foundation-core.propositions
open import foundation-core.small-types
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/set-truncations.lagda.md b/src/foundation/set-truncations.lagda.md
index d732534a97..f01a9b6bf9 100644
--- a/src/foundation/set-truncations.lagda.md
+++ b/src/foundation/set-truncations.lagda.md
@@ -9,8 +9,10 @@ module foundation.set-truncations where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.effective-maps-equivalence-relations
open import foundation.equality-coproduct-types
+open import foundation.functions
open import foundation.functoriality-cartesian-product-types
open import foundation.functoriality-coproduct-types
open import foundation.mere-equality
@@ -26,15 +28,14 @@ open import foundation.universal-property-dependent-pair-types
open import foundation.universal-property-image
open import foundation.universal-property-set-quotients
open import foundation.universal-property-set-truncation
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.empty-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-function-types
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.functoriality-function-types
@@ -42,7 +43,6 @@ open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/sets.lagda.md b/src/foundation/sets.lagda.md
index 5bcf4cc377..25a85e39eb 100644
--- a/src/foundation/sets.lagda.md
+++ b/src/foundation/sets.lagda.md
@@ -10,20 +10,20 @@ open import foundation-core.sets public
```agda
open import foundation.contractible-types
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.subuniverses
open import foundation.truncated-types
+open import foundation.universe-levels
open import foundation-core.1-types
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.propositional-maps
open import foundation-core.propositions
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/shifting-sequences.lagda.md b/src/foundation/shifting-sequences.lagda.md
index 27337c4ebd..5686c321c4 100644
--- a/src/foundation/shifting-sequences.lagda.md
+++ b/src/foundation/shifting-sequences.lagda.md
@@ -9,7 +9,7 @@ module foundation.shifting-sequences where
```agda
open import elementary-number-theory.natural-numbers
-open import foundation-core.universe-levels
+open import foundation.universe-levels
```
diff --git a/src/foundation/sigma-decomposition-subuniverse.lagda.md b/src/foundation/sigma-decomposition-subuniverse.lagda.md
index d1527b0936..6ec0af7de5 100644
--- a/src/foundation/sigma-decomposition-subuniverse.lagda.md
+++ b/src/foundation/sigma-decomposition-subuniverse.lagda.md
@@ -7,15 +7,15 @@ module foundation.sigma-decomposition-subuniverse where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.relaxed-sigma-decompositions
open import foundation.subuniverses
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.homotopies
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/sigma-decompositions.lagda.md b/src/foundation/sigma-decompositions.lagda.md
index 39bac092b7..4bf9180da1 100644
--- a/src/foundation/sigma-decompositions.lagda.md
+++ b/src/foundation/sigma-decompositions.lagda.md
@@ -9,24 +9,24 @@ module foundation.sigma-decompositions where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalence-extensionality
open import foundation.equivalences
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.inhabited-types
open import foundation.propositional-truncations
open import foundation.sets
open import foundation.structure-identity-principle
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.type-theoretic-principle-of-choice
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/singleton-induction.lagda.md b/src/foundation/singleton-induction.lagda.md
index 9c910da4db..6b811d09d7 100644
--- a/src/foundation/singleton-induction.lagda.md
+++ b/src/foundation/singleton-induction.lagda.md
@@ -7,13 +7,14 @@ module foundation.singleton-induction where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.sections
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/singleton-subtypes.lagda.md b/src/foundation/singleton-subtypes.lagda.md
index 82b986d685..ef7c9917ac 100644
--- a/src/foundation/singleton-subtypes.lagda.md
+++ b/src/foundation/singleton-subtypes.lagda.md
@@ -8,15 +8,15 @@ module foundation.singleton-subtypes where
```agda
open import foundation.contractible-types
+open import foundation.dependent-pair-types
open import foundation.inhabited-subtypes
open import foundation.propositional-truncations
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.sets
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/slice.lagda.md b/src/foundation/slice.lagda.md
index 78e3c232f9..4e1b4d9adb 100644
--- a/src/foundation/slice.lagda.md
+++ b/src/foundation/slice.lagda.md
@@ -7,27 +7,27 @@ module foundation.slice where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalences
open import foundation.function-extensionality
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.homotopies
open import foundation.structure-identity-principle
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.type-theoretic-principle-of-choice
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equality-dependent-pair-types
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.injective-maps
open import foundation-core.propositional-maps
open import foundation-core.propositions
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
open import trees.polynomial-endofunctors
```
diff --git a/src/foundation/small-maps.lagda.md b/src/foundation/small-maps.lagda.md
index d94bcfc456..d4d5f9ca13 100644
--- a/src/foundation/small-maps.lagda.md
+++ b/src/foundation/small-maps.lagda.md
@@ -7,13 +7,13 @@ module foundation.small-maps where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.locally-small-types
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.fibers-of-maps
open import foundation-core.propositions
open import foundation-core.small-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/small-types.lagda.md b/src/foundation/small-types.lagda.md
index 28ae839601..dced6bbeaa 100644
--- a/src/foundation/small-types.lagda.md
+++ b/src/foundation/small-types.lagda.md
@@ -9,17 +9,17 @@ open import foundation-core.small-types public
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.images
open import foundation.locally-small-types
open import foundation.replacement
open import foundation.surjective-maps
open import foundation.uniqueness-image
open import foundation.universal-property-image
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.homotopies
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/small-universes.lagda.md b/src/foundation/small-universes.lagda.md
index 896648cda4..49a5bb6048 100644
--- a/src/foundation/small-universes.lagda.md
+++ b/src/foundation/small-universes.lagda.md
@@ -7,9 +7,10 @@ module foundation.small-universes where
Imports
```agda
+open import foundation.universe-levels
+
open import foundation-core.cartesian-product-types
open import foundation-core.small-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/split-surjective-maps.lagda.md b/src/foundation/split-surjective-maps.lagda.md
index 746fb81ca8..abf38b8ce1 100644
--- a/src/foundation/split-surjective-maps.lagda.md
+++ b/src/foundation/split-surjective-maps.lagda.md
@@ -7,17 +7,17 @@ module foundation.split-surjective-maps where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.type-theoretic-principle-of-choice
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.injective-maps
open import foundation-core.retractions
open import foundation-core.sections
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/standard-apartness-relations.lagda.md b/src/foundation/standard-apartness-relations.lagda.md
index b219ae2e40..eeb57dd90c 100644
--- a/src/foundation/standard-apartness-relations.lagda.md
+++ b/src/foundation/standard-apartness-relations.lagda.md
@@ -9,14 +9,14 @@ module foundation.standard-apartness-relations where
```agda
open import foundation.apartness-relations
open import foundation.decidable-types
+open import foundation.dependent-pair-types
open import foundation.law-of-excluded-middle
open import foundation.tight-apartness-relations
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.identity-types
open import foundation-core.logical-equivalences
open import foundation-core.negation
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/strongly-extensional-maps.lagda.md b/src/foundation/strongly-extensional-maps.lagda.md
index 8d3745442e..4db8992245 100644
--- a/src/foundation/strongly-extensional-maps.lagda.md
+++ b/src/foundation/strongly-extensional-maps.lagda.md
@@ -8,8 +8,7 @@ module foundation.strongly-extensional-maps where
```agda
open import foundation.apartness-relations
-
-open import foundation-core.universe-levels
+open import foundation.universe-levels
```
diff --git a/src/foundation/structure-identity-principle.lagda.md b/src/foundation/structure-identity-principle.lagda.md
index 229e0b6b9f..d2b5e07e54 100644
--- a/src/foundation/structure-identity-principle.lagda.md
+++ b/src/foundation/structure-identity-principle.lagda.md
@@ -7,13 +7,14 @@ module foundation.structure-identity-principle where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.fundamental-theorem-of-identity-types
+open import foundation.type-arithmetic-dependent-pair-types
+open import foundation.universe-levels
+
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/structure.lagda.md b/src/foundation/structure.lagda.md
index 81a7a7996a..d411448fd3 100644
--- a/src/foundation/structure.lagda.md
+++ b/src/foundation/structure.lagda.md
@@ -7,13 +7,13 @@ module foundation.structure where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.univalence
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/structured-type-duality.lagda.md b/src/foundation/structured-type-duality.lagda.md
index 48457baf99..895d88c9a9 100644
--- a/src/foundation/structured-type-duality.lagda.md
+++ b/src/foundation/structured-type-duality.lagda.md
@@ -7,19 +7,19 @@ module foundation.structured-type-duality where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalences
+open import foundation.functions
open import foundation.structure
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.type-duality
open import foundation.type-theoretic-principle-of-choice
open import foundation.univalence
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-function-types
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/subterminal-types.lagda.md b/src/foundation/subterminal-types.lagda.md
index ece912f1ea..66a8c79943 100644
--- a/src/foundation/subterminal-types.lagda.md
+++ b/src/foundation/subterminal-types.lagda.md
@@ -7,15 +7,15 @@ module foundation.subterminal-types where
Imports
```agda
+open import foundation.functions
open import foundation.unit-type
+open import foundation.universe-levels
open import foundation-core.contractible-types
open import foundation-core.embeddings
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/subtype-duality.lagda.md b/src/foundation/subtype-duality.lagda.md
index 447154efa5..3d8bde41d4 100644
--- a/src/foundation/subtype-duality.lagda.md
+++ b/src/foundation/subtype-duality.lagda.md
@@ -7,17 +7,17 @@ module foundation.subtype-duality where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.inhabited-types
open import foundation.propositional-maps
open import foundation.structured-type-duality
open import foundation.surjective-maps
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalences
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/subtype-identity-principle.lagda.md b/src/foundation/subtype-identity-principle.lagda.md
index 32d5866be0..0c3f0c7e63 100644
--- a/src/foundation/subtype-identity-principle.lagda.md
+++ b/src/foundation/subtype-identity-principle.lagda.md
@@ -2,14 +2,108 @@
```agda
module foundation.subtype-identity-principle where
-
-open import foundation-core.subtype-identity-principle public
```
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
+open import foundation.type-arithmetic-dependent-pair-types
+open import foundation.universe-levels
+open import foundation-core.contractible-types
+open import foundation-core.equivalences
+open import foundation-core.identity-types
+open import foundation-core.propositions
```
+
+## Idea
+
+The subtype identity principle allows us to efficiently characterize the
+identity type of a subtype, using a characterization of the identity type of the
+base type.
+
+## Lemma
+
+The following is a general construction that will help us show that the identity
+type of a subtype agrees with the identity type of the original type. We already
+know that the first projection of a family of propositions is an embedding, but
+the following lemma still has its uses.
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
+ where
+
+ abstract
+ is-contr-total-Eq-subtype :
+ {l3 : Level} {P : A → UU l3} →
+ is-contr (Σ A B) → ((x : A) → is-prop (P x)) →
+ (a : A) (b : B a) (p : P a) →
+ is-contr (Σ (Σ A P) (B ∘ pr1))
+ is-contr-total-Eq-subtype {l3} {P}
+ is-contr-AB is-subtype-P a b p =
+ is-contr-equiv
+ ( Σ (Σ A B) (P ∘ pr1))
+ ( equiv-right-swap-Σ)
+ ( is-contr-equiv
+ ( P a)
+ ( left-unit-law-Σ-is-contr
+ ( is-contr-AB)
+ ( pair a b))
+ ( is-proof-irrelevant-is-prop (is-subtype-P a) p))
+```
+
+## Theorem
+
+### The subtype identity principle
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {P : A → UU l2}
+ (is-prop-P : (x : A) → is-prop (P x)) {Eq-A : A → UU l3}
+ {a : A} (p : P a) (refl-A : Eq-A a)
+ where
+
+ abstract
+ subtype-identity-principle :
+ {f : (x : A) → a = x → Eq-A x}
+ (h : (z : (Σ A P)) → (pair a p) = z → Eq-A (pr1 z)) →
+ ((x : A) → is-equiv (f x)) → (z : Σ A P) → is-equiv (h z)
+ subtype-identity-principle {f} h H =
+ fundamental-theorem-id
+ ( is-contr-total-Eq-subtype
+ ( fundamental-theorem-id' f H)
+ ( is-prop-P)
+ ( a)
+ ( refl-A)
+ ( p))
+ ( h)
+
+module _
+ {l1 l2 l3 : Level} {A : UU l1} (P : A → Prop l2) {Eq-A : A → UU l3}
+ {a : A} (p : type-Prop (P a)) (refl-A : Eq-A a)
+ where
+
+ map-extensionality-type-subtype :
+ (f : (x : A) → (a = x) ≃ Eq-A x) →
+ (z : Σ A (type-Prop ∘ P)) → (pair a p) = z → Eq-A (pr1 z)
+ map-extensionality-type-subtype f .(pair a p) refl = refl-A
+
+ extensionality-type-subtype :
+ (f : (x : A) → (a = x) ≃ Eq-A x) →
+ (z : Σ A (type-Prop ∘ P)) → (pair a p = z) ≃ Eq-A (pr1 z)
+ pr1 (extensionality-type-subtype f z) = map-extensionality-type-subtype f z
+ pr2 (extensionality-type-subtype f z) =
+ subtype-identity-principle
+ ( is-prop-type-Prop ∘ P)
+ ( p)
+ ( refl-A)
+ ( map-extensionality-type-subtype f)
+ ( is-equiv-map-equiv ∘ f)
+ ( z)
+```
diff --git a/src/foundation/subtypes.lagda.md b/src/foundation/subtypes.lagda.md
index 9b68351d80..fcfbcba326 100644
--- a/src/foundation/subtypes.lagda.md
+++ b/src/foundation/subtypes.lagda.md
@@ -9,21 +9,21 @@ open import foundation-core.subtypes public
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equality-dependent-function-types
+open import foundation.functions
open import foundation.propositional-extensionality
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.injective-maps
open import foundation-core.logical-equivalences
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/subuniverses.lagda.md b/src/foundation/subuniverses.lagda.md
index 9ed244b96c..02be574f64 100644
--- a/src/foundation/subuniverses.lagda.md
+++ b/src/foundation/subuniverses.lagda.md
@@ -7,19 +7,19 @@ module foundation.subuniverses where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equality-dependent-function-types
+open import foundation.fundamental-theorem-of-identity-types
+open import foundation.subtype-identity-principle
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalences
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.subtype-identity-principle
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/surjective-maps.lagda.md b/src/foundation/surjective-maps.lagda.md
index 8eae5d03e2..b7047a93f4 100644
--- a/src/foundation/surjective-maps.lagda.md
+++ b/src/foundation/surjective-maps.lagda.md
@@ -9,33 +9,33 @@ module foundation.surjective-maps where
```agda
open import foundation.connected-maps
open import foundation.contractible-types
+open import foundation.dependent-pair-types
open import foundation.embeddings
+open import foundation.equality-cartesian-product-types
+open import foundation.functions
open import foundation.functoriality-cartesian-product-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.homotopies
open import foundation.identity-types
open import foundation.propositional-truncations
open import foundation.structure-identity-principle
+open import foundation.subtype-identity-principle
open import foundation.truncated-types
open import foundation.univalence
open import foundation.universal-property-propositional-truncation
+open import foundation.universe-levels
open import foundation-core.constant-maps
open import foundation-core.contractible-maps
-open import foundation-core.dependent-pair-types
-open import foundation-core.equality-cartesian-product-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-function-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.propositional-maps
open import foundation-core.propositions
open import foundation-core.sections
open import foundation-core.sets
-open import foundation-core.subtype-identity-principle
open import foundation-core.truncated-maps
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
open import orthogonal-factorization-systems.extensions-of-maps
```
diff --git a/src/foundation/symmetric-difference.lagda.md b/src/foundation/symmetric-difference.lagda.md
index 02b0b595ee..5a12db14b3 100644
--- a/src/foundation/symmetric-difference.lagda.md
+++ b/src/foundation/symmetric-difference.lagda.md
@@ -9,18 +9,18 @@ module foundation.symmetric-difference where
```agda
open import foundation.decidable-subtypes
open import foundation.decidable-types
+open import foundation.dependent-pair-types
open import foundation.exclusive-disjunction
+open import foundation.functions
open import foundation.identity-types hiding (inv)
open import foundation.intersections-subtypes
+open import foundation.universe-levels
open import foundation-core.coproduct-types
open import foundation-core.decidable-propositions
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.propositions
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/symmetric-identity-types.lagda.md b/src/foundation/symmetric-identity-types.lagda.md
index 4e93a1e3f6..64becb9868 100644
--- a/src/foundation/symmetric-identity-types.lagda.md
+++ b/src/foundation/symmetric-identity-types.lagda.md
@@ -7,22 +7,22 @@ module foundation.symmetric-identity-types where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.functoriality-dependent-function-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.homotopies
open import foundation.identity-types
open import foundation.structure-identity-principle
+open import foundation.universe-levels
open import foundation.unordered-pairs
open import foundation-core.contractible-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
-open import foundation-core.universe-levels
open import univalent-combinatorics.standard-finite-types
```
diff --git a/src/foundation/symmetric-operations.lagda.md b/src/foundation/symmetric-operations.lagda.md
index b58863b504..bc994a6c53 100644
--- a/src/foundation/symmetric-operations.lagda.md
+++ b/src/foundation/symmetric-operations.lagda.md
@@ -7,17 +7,17 @@ module foundation.symmetric-operations where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalence-extensionality
open import foundation.functoriality-coproduct-types
open import foundation.universal-property-propositional-truncation-into-sets
+open import foundation.universe-levels
open import foundation.unordered-pairs
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.identity-types
open import foundation-core.sets
-open import foundation-core.universe-levels
open import univalent-combinatorics.2-element-types
open import univalent-combinatorics.finite-types
diff --git a/src/foundation/tight-apartness-relations.lagda.md b/src/foundation/tight-apartness-relations.lagda.md
index 2536456a34..4874b072f0 100644
--- a/src/foundation/tight-apartness-relations.lagda.md
+++ b/src/foundation/tight-apartness-relations.lagda.md
@@ -9,15 +9,15 @@ module foundation.tight-apartness-relations where
```agda
open import foundation.apartness-relations
open import foundation.binary-relations
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
open import foundation.propositional-truncations
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.identity-types
open import foundation-core.negation
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/transport.lagda.md b/src/foundation/transport.lagda.md
index 17274c8fc4..b4711c8f6f 100644
--- a/src/foundation/transport.lagda.md
+++ b/src/foundation/transport.lagda.md
@@ -7,17 +7,17 @@ module foundation.transport where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.equality-cartesian-product-types
open import foundation.function-extensionality
+open import foundation.functions
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.equality-cartesian-product-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/trivial-relaxed-sigma-decompositions.lagda.md b/src/foundation/trivial-relaxed-sigma-decompositions.lagda.md
index 3952e87c5b..2cba62d7e5 100644
--- a/src/foundation/trivial-relaxed-sigma-decompositions.lagda.md
+++ b/src/foundation/trivial-relaxed-sigma-decompositions.lagda.md
@@ -8,18 +8,18 @@ module foundation.trivial-relaxed-sigma-decompositions where
```agda
open import foundation.contractible-types
+open import foundation.dependent-pair-types
open import foundation.equivalences
+open import foundation.functions
open import foundation.relaxed-sigma-decompositions
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.unit-type
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.subtypes
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/trivial-sigma-decompositions.lagda.md b/src/foundation/trivial-sigma-decompositions.lagda.md
index 4bba03444d..3a0d8ec4a0 100644
--- a/src/foundation/trivial-sigma-decompositions.lagda.md
+++ b/src/foundation/trivial-sigma-decompositions.lagda.md
@@ -8,22 +8,22 @@ module foundation.trivial-sigma-decompositions where
```agda
open import foundation.contractible-types
+open import foundation.dependent-pair-types
open import foundation.equivalences
+open import foundation.functions
open import foundation.functoriality-propositional-truncation
open import foundation.inhabited-types
open import foundation.sigma-decompositions
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.type-arithmetic-empty-type
open import foundation.unit-type
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
open import foundation-core.equality-dependent-pair-types
-open import foundation-core.functions
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.subtypes
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/truncated-equality.lagda.md b/src/foundation/truncated-equality.lagda.md
index 1e2526a119..c88cab61f7 100644
--- a/src/foundation/truncated-equality.lagda.md
+++ b/src/foundation/truncated-equality.lagda.md
@@ -8,11 +8,11 @@ module foundation.truncated-equality where
```agda
open import foundation.truncations
+open import foundation.universe-levels
open import foundation-core.identity-types
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/truncated-maps.lagda.md b/src/foundation/truncated-maps.lagda.md
index 91bc3f74aa..e5a6f037e2 100644
--- a/src/foundation/truncated-maps.lagda.md
+++ b/src/foundation/truncated-maps.lagda.md
@@ -9,15 +9,16 @@ open import foundation-core.truncated-maps public
Imports
```agda
-open import foundation-core.cones-over-cospans
-open import foundation-core.dependent-pair-types
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
+open import foundation.functoriality-fibers-of-maps
+open import foundation.universe-levels
+
open import foundation-core.fibers-of-maps
-open import foundation-core.functoriality-fibers-of-maps
open import foundation-core.propositions
open import foundation-core.pullbacks
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/truncated-types.lagda.md b/src/foundation/truncated-types.lagda.md
index f269d51001..e6588ad2a4 100644
--- a/src/foundation/truncated-types.lagda.md
+++ b/src/foundation/truncated-types.lagda.md
@@ -9,17 +9,17 @@ open import foundation-core.truncated-types public
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.subtype-identity-principle
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalences
open import foundation-core.identity-types
-open import foundation-core.subtype-identity-principle
open import foundation-core.subtypes
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/truncation-equivalences.lagda.md b/src/foundation/truncation-equivalences.lagda.md
index f36846d884..b994fd2464 100644
--- a/src/foundation/truncation-equivalences.lagda.md
+++ b/src/foundation/truncation-equivalences.lagda.md
@@ -8,16 +8,16 @@ module foundation.truncation-equivalences where
```agda
open import foundation.commuting-squares-of-maps
+open import foundation.dependent-pair-types
open import foundation.equivalences
+open import foundation.functions
open import foundation.functoriality-truncation
open import foundation.truncations
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/truncation-images-of-maps.lagda.md b/src/foundation/truncation-images-of-maps.lagda.md
index 2639f19068..b3a569f4d6 100644
--- a/src/foundation/truncation-images-of-maps.lagda.md
+++ b/src/foundation/truncation-images-of-maps.lagda.md
@@ -7,13 +7,13 @@ module foundation.truncation-images-of-maps where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.truncations
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.fibers-of-maps
open import foundation-core.identity-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/truncation-levels.lagda.md b/src/foundation/truncation-levels.lagda.md
index 182cf425cc..9fe6d62edf 100644
--- a/src/foundation/truncation-levels.lagda.md
+++ b/src/foundation/truncation-levels.lagda.md
@@ -11,7 +11,8 @@ open import foundation-core.truncation-levels public
```agda
open import elementary-number-theory.natural-numbers
-open import foundation-core.functions
+open import foundation.functions
+
open import foundation-core.identity-types
```
diff --git a/src/foundation/truncations.lagda.md b/src/foundation/truncations.lagda.md
index 62c937a08b..a341d939e2 100644
--- a/src/foundation/truncations.lagda.md
+++ b/src/foundation/truncations.lagda.md
@@ -7,26 +7,26 @@ module foundation.truncations where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.functoriality-dependent-function-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.identity-types
open import foundation.truncated-types
open import foundation.universal-property-dependent-pair-types
+open import foundation.universe-levels
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.homotopies
open import foundation-core.propositions
open import foundation-core.truncation-levels
open import foundation-core.universal-property-truncation
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/tuples-of-types.lagda.md b/src/foundation/tuples-of-types.lagda.md
index ed4c05ba66..49b8e03fc5 100644
--- a/src/foundation/tuples-of-types.lagda.md
+++ b/src/foundation/tuples-of-types.lagda.md
@@ -9,7 +9,7 @@ module foundation.tuples-of-types where
```agda
open import elementary-number-theory.natural-numbers
-open import foundation-core.universe-levels
+open import foundation.universe-levels
open import univalent-combinatorics.standard-finite-types
```
diff --git a/src/foundation/type-arithmetic-booleans.lagda.md b/src/foundation/type-arithmetic-booleans.lagda.md
index 8d6339344c..86598e064b 100644
--- a/src/foundation/type-arithmetic-booleans.lagda.md
+++ b/src/foundation/type-arithmetic-booleans.lagda.md
@@ -8,14 +8,14 @@ module foundation.type-arithmetic-booleans where
```agda
open import foundation.booleans
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/type-arithmetic-cartesian-product-types.lagda.md b/src/foundation/type-arithmetic-cartesian-product-types.lagda.md
index bfe4956efc..505154ed7e 100644
--- a/src/foundation/type-arithmetic-cartesian-product-types.lagda.md
+++ b/src/foundation/type-arithmetic-cartesian-product-types.lagda.md
@@ -2,14 +2,161 @@
```agda
module foundation.type-arithmetic-cartesian-product-types where
-
-open import foundation-core.type-arithmetic-cartesian-product-types public
```
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.equality-cartesian-product-types
+open import foundation.functions
+open import foundation.type-arithmetic-dependent-pair-types
+open import foundation.universe-levels
+open import foundation-core.cartesian-product-types
+open import foundation-core.contractible-types
+open import foundation-core.equivalences
+open import foundation-core.homotopies
+open import foundation-core.identity-types
+open import foundation-core.propositions
```
+
+## Idea
+
+We prove laws for the manipulation of cartesian products with respect to
+themselves and dependent pair types.
+
+## Laws
+
+### Commutativity of cartesian products
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2}
+ where
+
+ map-commutative-prod : A × B → B × A
+ pr1 (map-commutative-prod (pair a b)) = b
+ pr2 (map-commutative-prod (pair a b)) = a
+
+ map-inv-commutative-prod : B × A → A × B
+ pr1 (map-inv-commutative-prod (pair b a)) = a
+ pr2 (map-inv-commutative-prod (pair b a)) = b
+
+ issec-map-inv-commutative-prod :
+ (map-commutative-prod ∘ map-inv-commutative-prod) ~ id
+ issec-map-inv-commutative-prod (pair b a) = refl
+
+ isretr-map-inv-commutative-prod :
+ (map-inv-commutative-prod ∘ map-commutative-prod) ~ id
+ isretr-map-inv-commutative-prod (pair a b) = refl
+
+ is-equiv-map-commutative-prod : is-equiv map-commutative-prod
+ is-equiv-map-commutative-prod =
+ is-equiv-has-inverse
+ map-inv-commutative-prod
+ issec-map-inv-commutative-prod
+ isretr-map-inv-commutative-prod
+
+ commutative-prod : (A × B) ≃ (B × A)
+ pr1 commutative-prod = map-commutative-prod
+ pr2 commutative-prod = is-equiv-map-commutative-prod
+```
+
+### Associativity of cartesian products
+
+```agda
+module _
+ {l1 l2 l3 : Level} (A : UU l1) (B : UU l2) (C : UU l3)
+ where
+
+ map-associative-prod : (A × B) × C → A × (B × C)
+ map-associative-prod = map-associative-Σ A (λ x → B) (λ w → C)
+
+ map-inv-associative-prod : A × (B × C) → (A × B) × C
+ map-inv-associative-prod = map-inv-associative-Σ A (λ x → B) (λ w → C)
+
+ issec-map-inv-associative-prod :
+ (map-associative-prod ∘ map-inv-associative-prod) ~ id
+ issec-map-inv-associative-prod =
+ issec-map-inv-associative-Σ A (λ x → B) (λ w → C)
+
+ isretr-map-inv-associative-prod :
+ (map-inv-associative-prod ∘ map-associative-prod) ~ id
+ isretr-map-inv-associative-prod =
+ isretr-map-inv-associative-Σ A (λ x → B) (λ w → C)
+
+ is-equiv-map-associative-prod : is-equiv map-associative-prod
+ is-equiv-map-associative-prod =
+ is-equiv-map-associative-Σ A (λ x → B) (λ w → C)
+
+ associative-prod : ((A × B) × C) ≃ (A × (B × C))
+ associative-prod = associative-Σ A (λ x → B) (λ w → C)
+```
+
+### The unit laws of cartesian product types with respect to contractible types
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} (is-contr-B : is-contr B)
+ where
+
+ right-unit-law-prod-is-contr : (A × B) ≃ A
+ right-unit-law-prod-is-contr = right-unit-law-Σ-is-contr (λ a → is-contr-B)
+
+module _
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} (is-contr-A : is-contr A)
+ where
+
+ left-unit-law-prod-is-contr : (A × B) ≃ B
+ left-unit-law-prod-is-contr =
+ left-unit-law-Σ-is-contr is-contr-A (center is-contr-A)
+
+ is-equiv-pr2-prod-is-contr : is-equiv (pr2 {B = λ a → B})
+ is-equiv-pr2-prod-is-contr =
+ is-equiv-comp
+ ( pr1)
+ ( map-commutative-prod)
+ ( is-equiv-map-commutative-prod)
+ ( is-equiv-pr1-is-contr λ b → is-contr-A)
+
+ equiv-pr2-prod-is-contr : (A × B) ≃ B
+ pr1 equiv-pr2-prod-is-contr = pr2
+ pr2 equiv-pr2-prod-is-contr = is-equiv-pr2-prod-is-contr
+```
+
+### Adding redundant property
+
+```agda
+equiv-add-redundant-prop :
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} →
+ (is-prop B) → (f : A → B) → (A ≃ (A × B))
+pr1 (equiv-add-redundant-prop is-prop-B f) a = a , f a
+pr2 (equiv-add-redundant-prop is-prop-B f) =
+ is-equiv-has-inverse
+ ( pr1)
+ ( λ p → eq-pair refl (eq-is-prop is-prop-B))
+ ( λ a → refl)
+```
+
+## See also
+
+- Functorial properties of cartesian products are recorded in
+ [`foundation.functoriality-cartesian-product-types`](foundation.functoriality-cartesian-product-types.md).
+- Equality proofs in cartesian product types are characterized in
+ [`foundation.equality-cartesian-product-types`](foundation.equality-cartesian-product-types.md).
+- The universal property of cartesian product types is treated in
+ [`foundation.universal-property-cartesian-product-types`](foundation.universal-property-cartesian-product-types.md).
+
+- Arithmetical laws involving dependent pair types are recorded in
+ [`foundation.type-arithmetic-dependent-pair-types`](foundation.type-arithmetic-dependent-pair-types.md).
+ - Arithmetical laws involving dependent product types are recorded in
+ [`foundation.type-arithmetic-dependent-function-types`](foundation.type-arithmetic-dependent-function-types.md).
+- Arithmetical laws involving coproduct types are recorded in
+ [`foundation.type-arithmetic-coproduct-types`](foundation.type-arithmetic-coproduct-types.md).
+- Arithmetical laws involving the unit type are recorded in
+ [`foundation.type-arithmetic-unit-type`](foundation.type-arithmetic-unit-type.md).
+- Arithmetical laws involving the empty type are recorded in
+ [`foundation.type-arithmetic-empty-type`](foundation.type-arithmetic-empty-type.md).
diff --git a/src/foundation/type-arithmetic-coproduct-types.lagda.md b/src/foundation/type-arithmetic-coproduct-types.lagda.md
index 41448dc83c..45cbf5b8f1 100644
--- a/src/foundation/type-arithmetic-coproduct-types.lagda.md
+++ b/src/foundation/type-arithmetic-coproduct-types.lagda.md
@@ -8,17 +8,17 @@ module foundation.type-arithmetic-coproduct-types where
```agda
open import foundation.coproduct-types
+open import foundation.dependent-pair-types
open import foundation.equality-coproduct-types
+open import foundation.functions
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/type-arithmetic-dependent-function-types.lagda.md b/src/foundation/type-arithmetic-dependent-function-types.lagda.md
index e382dc320c..4d468e1846 100644
--- a/src/foundation/type-arithmetic-dependent-function-types.lagda.md
+++ b/src/foundation/type-arithmetic-dependent-function-types.lagda.md
@@ -7,17 +7,17 @@ module foundation.type-arithmetic-dependent-function-types where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.functoriality-dependent-function-types
open import foundation.type-arithmetic-unit-type
open import foundation.unit-type
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.univalence
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/type-arithmetic-dependent-pair-types.lagda.md b/src/foundation/type-arithmetic-dependent-pair-types.lagda.md
index ffdcfffc76..483a6c596d 100644
--- a/src/foundation/type-arithmetic-dependent-pair-types.lagda.md
+++ b/src/foundation/type-arithmetic-dependent-pair-types.lagda.md
@@ -2,14 +2,24 @@
```agda
module foundation.type-arithmetic-dependent-pair-types where
-
-open import foundation-core.type-arithmetic-dependent-pair-types public
```
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
+open import foundation-core.cartesian-product-types
+open import foundation-core.contractible-maps
+open import foundation-core.contractible-types
+open import foundation-core.equality-dependent-pair-types
+open import foundation-core.equivalences
+open import foundation-core.fibers-of-maps
+open import foundation-core.homotopies
+open import foundation-core.identity-types
+open import foundation-core.singleton-induction
```
@@ -17,7 +27,379 @@ open import foundation-core.type-arithmetic-dependent-pair-types public
## Idea
We prove laws for the manipulation of dependent pair types with respect to
-themselves and contractible types.
+themselves and arithmetical laws with respect to contractible types.
+
+## Properties
+
+### The left unit law for Σ using a contractible base type
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} (C : is-contr A) (a : A)
+ where
+
+ map-inv-left-unit-law-Σ-is-contr : B a → Σ A B
+ map-inv-left-unit-law-Σ-is-contr b = pair a b
+
+ map-left-unit-law-Σ-is-contr : Σ A B → B a
+ map-left-unit-law-Σ-is-contr =
+ ind-Σ
+ ( ind-singleton-is-contr a C
+ ( λ x → B x → B a)
+ ( id))
+
+ issec-map-inv-left-unit-law-Σ-is-contr :
+ ( map-left-unit-law-Σ-is-contr ∘ map-inv-left-unit-law-Σ-is-contr) ~ id
+ issec-map-inv-left-unit-law-Σ-is-contr b =
+ ap
+ ( λ (f : B a → B a) → f b)
+ ( compute-ind-singleton-is-contr a C (λ x → B x → B a) id)
+
+ isretr-map-inv-left-unit-law-Σ-is-contr :
+ ( map-inv-left-unit-law-Σ-is-contr ∘ map-left-unit-law-Σ-is-contr) ~ id
+ isretr-map-inv-left-unit-law-Σ-is-contr =
+ ind-Σ
+ ( ind-singleton-is-contr a C
+ ( λ x →
+ ( y : B x) →
+ Id
+ ( ( map-inv-left-unit-law-Σ-is-contr ∘
+ map-left-unit-law-Σ-is-contr)
+ ( pair x y))
+ ( pair x y))
+ ( λ y → ap
+ ( map-inv-left-unit-law-Σ-is-contr)
+ ( ap
+ ( λ f → f y)
+ ( compute-ind-singleton-is-contr a C (λ x → B x → B a) id))))
+
+ is-equiv-map-left-unit-law-Σ-is-contr :
+ is-equiv map-left-unit-law-Σ-is-contr
+ is-equiv-map-left-unit-law-Σ-is-contr =
+ is-equiv-has-inverse
+ map-inv-left-unit-law-Σ-is-contr
+ issec-map-inv-left-unit-law-Σ-is-contr
+ isretr-map-inv-left-unit-law-Σ-is-contr
+
+ left-unit-law-Σ-is-contr : Σ A B ≃ B a
+ pr1 left-unit-law-Σ-is-contr = map-left-unit-law-Σ-is-contr
+ pr2 left-unit-law-Σ-is-contr = is-equiv-map-left-unit-law-Σ-is-contr
+
+ abstract
+ is-equiv-map-inv-left-unit-law-Σ-is-contr :
+ is-equiv map-inv-left-unit-law-Σ-is-contr
+ is-equiv-map-inv-left-unit-law-Σ-is-contr =
+ is-equiv-has-inverse
+ map-left-unit-law-Σ-is-contr
+ isretr-map-inv-left-unit-law-Σ-is-contr
+ issec-map-inv-left-unit-law-Σ-is-contr
+
+ inv-left-unit-law-Σ-is-contr : B a ≃ Σ A B
+ pr1 inv-left-unit-law-Σ-is-contr = map-inv-left-unit-law-Σ-is-contr
+ pr2 inv-left-unit-law-Σ-is-contr = is-equiv-map-inv-left-unit-law-Σ-is-contr
+```
+
+### Right unit law for dependent pair types
+
+```agda
+module _
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2}
+ where
+
+ abstract
+ is-equiv-pr1-is-contr : ((a : A) → is-contr (B a)) → is-equiv (pr1 {B = B})
+ is-equiv-pr1-is-contr is-contr-B =
+ is-equiv-is-contr-map
+ ( λ x → is-contr-equiv
+ ( B x)
+ ( equiv-fib-pr1 B x)
+ ( is-contr-B x))
+
+ equiv-pr1 : ((a : A) → is-contr (B a)) → (Σ A B) ≃ A
+ pr1 (equiv-pr1 is-contr-B) = pr1
+ pr2 (equiv-pr1 is-contr-B) = is-equiv-pr1-is-contr is-contr-B
+
+ right-unit-law-Σ-is-contr : ((a : A) → is-contr (B a)) → (Σ A B) ≃ A
+ right-unit-law-Σ-is-contr = equiv-pr1
+
+ abstract
+ is-contr-is-equiv-pr1 : is-equiv (pr1 {B = B}) → ((a : A) → is-contr (B a))
+ is-contr-is-equiv-pr1 is-equiv-pr1-B a =
+ is-contr-equiv'
+ ( fib pr1 a)
+ ( equiv-fib-pr1 B a)
+ ( is-contr-map-is-equiv is-equiv-pr1-B a)
+
+ map-inv-right-unit-law-Σ-is-contr :
+ ((a : A) → is-contr (B a)) → A → Σ A B
+ map-inv-right-unit-law-Σ-is-contr H a = (a , center (H a))
+
+ issec-map-inv-right-unit-law-Σ-is-contr :
+ (H : (a : A) → is-contr (B a)) →
+ ( pr1 ∘ map-inv-right-unit-law-Σ-is-contr H) ~ id
+ issec-map-inv-right-unit-law-Σ-is-contr H = refl-htpy
+
+ isretr-map-inv-right-unit-law-Σ-is-contr :
+ (H : (a : A) → is-contr (B a)) →
+ ( map-inv-right-unit-law-Σ-is-contr H ∘ pr1) ~ id
+ isretr-map-inv-right-unit-law-Σ-is-contr H (a , b) =
+ eq-pair-Σ refl (eq-is-contr (H a))
+
+ is-equiv-map-inv-right-unit-law-Σ-is-contr :
+ (H : (a : A) → is-contr (B a)) →
+ is-equiv (map-inv-right-unit-law-Σ-is-contr H)
+ is-equiv-map-inv-right-unit-law-Σ-is-contr H =
+ is-equiv-has-inverse
+ ( pr1)
+ ( isretr-map-inv-right-unit-law-Σ-is-contr H)
+ ( issec-map-inv-right-unit-law-Σ-is-contr H)
+
+ inv-right-unit-law-Σ-is-contr :
+ (H : (a : A) → is-contr (B a)) → A ≃ Σ A B
+ pr1 (inv-right-unit-law-Σ-is-contr H) = map-inv-right-unit-law-Σ-is-contr H
+ pr2 (inv-right-unit-law-Σ-is-contr H) =
+ is-equiv-map-inv-right-unit-law-Σ-is-contr H
+```
+
+### Associativity of dependent pair types
+
+There are two ways to express associativity for dependent pair types. We
+formalize both ways.
+
+```agda
+module _
+ {l1 l2 l3 : Level} (A : UU l1) (B : A → UU l2) (C : Σ A B → UU l3)
+ where
+
+ map-associative-Σ : Σ (Σ A B) C → Σ A (λ x → Σ (B x) (λ y → C (pair x y)))
+ pr1 (map-associative-Σ ((x , y) , z)) = x
+ pr1 (pr2 (map-associative-Σ ((x , y) , z))) = y
+ pr2 (pr2 (map-associative-Σ ((x , y) , z))) = z
+
+ map-inv-associative-Σ : Σ A (λ x → Σ (B x) (λ y → C (pair x y))) → Σ (Σ A B) C
+ pr1 (pr1 (map-inv-associative-Σ (x , y , z))) = x
+ pr2 (pr1 (map-inv-associative-Σ (x , y , z))) = y
+ pr2 (map-inv-associative-Σ (x , y , z)) = z
+
+ isretr-map-inv-associative-Σ :
+ (map-inv-associative-Σ ∘ map-associative-Σ) ~ id
+ isretr-map-inv-associative-Σ (pair (pair x y) z) = refl
+
+ issec-map-inv-associative-Σ : (map-associative-Σ ∘ map-inv-associative-Σ) ~ id
+ issec-map-inv-associative-Σ (pair x (pair y z)) = refl
+
+ abstract
+ is-equiv-map-associative-Σ : is-equiv map-associative-Σ
+ is-equiv-map-associative-Σ =
+ is-equiv-has-inverse
+ map-inv-associative-Σ
+ issec-map-inv-associative-Σ
+ isretr-map-inv-associative-Σ
+
+ associative-Σ : Σ (Σ A B) C ≃ Σ A (λ x → Σ (B x) (λ y → C (pair x y)))
+ pr1 associative-Σ = map-associative-Σ
+ pr2 associative-Σ = is-equiv-map-associative-Σ
+
+ inv-associative-Σ : Σ A (λ x → Σ (B x) (λ y → C (pair x y))) ≃ Σ (Σ A B) C
+ pr1 inv-associative-Σ = map-inv-associative-Σ
+ pr2 inv-associative-Σ =
+ is-equiv-has-inverse
+ map-associative-Σ
+ isretr-map-inv-associative-Σ
+ issec-map-inv-associative-Σ
+```
+
+### Associativity, second formulation
+
+```agda
+module _
+ {l1 l2 l3 : Level} (A : UU l1) (B : A → UU l2) (C : (x : A) → B x → UU l3)
+ where
+
+ map-associative-Σ' :
+ Σ (Σ A B) (λ w → C (pr1 w) (pr2 w)) → Σ A (λ x → Σ (B x) (C x))
+ pr1 (map-associative-Σ' ((x , y) , z)) = x
+ pr1 (pr2 (map-associative-Σ' ((x , y) , z))) = y
+ pr2 (pr2 (map-associative-Σ' ((x , y) , z))) = z
+
+ map-inv-associative-Σ' :
+ Σ A (λ x → Σ (B x) (C x)) → Σ (Σ A B) (λ w → C (pr1 w) (pr2 w))
+ pr1 (pr1 (map-inv-associative-Σ' (x , y , z))) = x
+ pr2 (pr1 (map-inv-associative-Σ' (x , y , z))) = y
+ pr2 (map-inv-associative-Σ' (x , y , z)) = z
+
+ issec-map-inv-associative-Σ' :
+ (map-associative-Σ' ∘ map-inv-associative-Σ') ~ id
+ issec-map-inv-associative-Σ' (pair x (pair y z)) = refl
+
+ isretr-map-inv-associative-Σ' :
+ ( map-inv-associative-Σ' ∘ map-associative-Σ') ~ id
+ isretr-map-inv-associative-Σ' (pair (pair x y) z) = refl
+
+ is-equiv-map-associative-Σ' : is-equiv map-associative-Σ'
+ is-equiv-map-associative-Σ' =
+ is-equiv-has-inverse
+ map-inv-associative-Σ'
+ issec-map-inv-associative-Σ'
+ isretr-map-inv-associative-Σ'
+
+ associative-Σ' :
+ Σ (Σ A B) (λ w → C (pr1 w) (pr2 w)) ≃ Σ A (λ x → Σ (B x) (C x))
+ pr1 associative-Σ' = map-associative-Σ'
+ pr2 associative-Σ' = is-equiv-map-associative-Σ'
+
+ inv-associative-Σ' :
+ Σ A (λ x → Σ (B x) (C x)) ≃ Σ (Σ A B) (λ w → C (pr1 w) (pr2 w))
+ pr1 inv-associative-Σ' = map-inv-associative-Σ'
+ pr2 inv-associative-Σ' =
+ is-equiv-has-inverse
+ map-associative-Σ'
+ isretr-map-inv-associative-Σ'
+ issec-map-inv-associative-Σ'
+```
+
+### The interchange law
+
+```agda
+module _
+ { l1 l2 l3 l4 : Level} { A : UU l1} {B : A → UU l2} {C : A → UU l3}
+ ( D : (x : A) → B x → C x → UU l4)
+ where
+
+ map-interchange-Σ-Σ :
+ Σ (Σ A B) (λ t → Σ (C (pr1 t)) (D (pr1 t) (pr2 t))) →
+ Σ (Σ A C) (λ t → Σ (B (pr1 t)) (λ y → D (pr1 t) y (pr2 t)))
+ pr1 (pr1 (map-interchange-Σ-Σ t)) = pr1 (pr1 t)
+ pr2 (pr1 (map-interchange-Σ-Σ t)) = pr1 (pr2 t)
+ pr1 (pr2 (map-interchange-Σ-Σ t)) = pr2 (pr1 t)
+ pr2 (pr2 (map-interchange-Σ-Σ t)) = pr2 (pr2 t)
+
+ map-inv-interchange-Σ-Σ :
+ Σ (Σ A C) (λ t → Σ (B (pr1 t)) (λ y → D (pr1 t) y (pr2 t))) →
+ Σ (Σ A B) (λ t → Σ (C (pr1 t)) (D (pr1 t) (pr2 t)))
+ pr1 (pr1 (map-inv-interchange-Σ-Σ t)) = pr1 (pr1 t)
+ pr2 (pr1 (map-inv-interchange-Σ-Σ t)) = pr1 (pr2 t)
+ pr1 (pr2 (map-inv-interchange-Σ-Σ t)) = pr2 (pr1 t)
+ pr2 (pr2 (map-inv-interchange-Σ-Σ t)) = pr2 (pr2 t)
+
+ issec-map-inv-interchange-Σ-Σ :
+ ( map-interchange-Σ-Σ ∘ map-inv-interchange-Σ-Σ) ~ id
+ issec-map-inv-interchange-Σ-Σ (pair (pair a c) (pair b d)) = refl
+
+ isretr-map-inv-interchange-Σ-Σ :
+ ( map-inv-interchange-Σ-Σ ∘ map-interchange-Σ-Σ) ~ id
+ isretr-map-inv-interchange-Σ-Σ (pair (pair a b) (pair c d)) = refl
+
+ abstract
+ is-equiv-map-interchange-Σ-Σ : is-equiv map-interchange-Σ-Σ
+ is-equiv-map-interchange-Σ-Σ =
+ is-equiv-has-inverse
+ map-inv-interchange-Σ-Σ
+ issec-map-inv-interchange-Σ-Σ
+ isretr-map-inv-interchange-Σ-Σ
+
+ interchange-Σ-Σ :
+ Σ (Σ A B) (λ t → Σ (C (pr1 t)) (D (pr1 t) (pr2 t))) ≃
+ Σ (Σ A C) (λ t → Σ (B (pr1 t)) (λ y → D (pr1 t) y (pr2 t)))
+ pr1 interchange-Σ-Σ = map-interchange-Σ-Σ
+ pr2 interchange-Σ-Σ = is-equiv-map-interchange-Σ-Σ
+
+ eq-interchange-Σ-Σ-is-contr :
+ {a : A} {b : B a} → is-contr (Σ (C a) (D a b)) →
+ {x y : Σ (C a) (D a b)} →
+ map-equiv interchange-Σ-Σ ((a , b) , x) =
+ map-equiv interchange-Σ-Σ ((a , b) , y)
+ eq-interchange-Σ-Σ-is-contr H =
+ ap (map-equiv interchange-Σ-Σ) (ap (pair _) (eq-is-contr H))
+```
+
+### Swapping the order of quantification in a Σ-type, on the left
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : A → B → UU l3}
+ where
+
+ map-left-swap-Σ : Σ A (λ x → Σ B (C x)) → Σ B (λ y → Σ A (λ x → C x y))
+ pr1 (map-left-swap-Σ (a , b , c)) = b
+ pr1 (pr2 (map-left-swap-Σ (a , b , c))) = a
+ pr2 (pr2 (map-left-swap-Σ (a , b , c))) = c
+
+ map-inv-left-swap-Σ :
+ Σ B (λ y → Σ A (λ x → C x y)) → Σ A (λ x → Σ B (C x))
+ pr1 (map-inv-left-swap-Σ (b , a , c)) = a
+ pr1 (pr2 (map-inv-left-swap-Σ (b , a , c))) = b
+ pr2 (pr2 (map-inv-left-swap-Σ (b , a , c))) = c
+
+ isretr-map-inv-left-swap-Σ : (map-inv-left-swap-Σ ∘ map-left-swap-Σ) ~ id
+ isretr-map-inv-left-swap-Σ (pair a (pair b c)) = refl
+
+ issec-map-inv-left-swap-Σ : (map-left-swap-Σ ∘ map-inv-left-swap-Σ) ~ id
+ issec-map-inv-left-swap-Σ (pair b (pair a c)) = refl
+
+ abstract
+ is-equiv-map-left-swap-Σ : is-equiv map-left-swap-Σ
+ is-equiv-map-left-swap-Σ =
+ is-equiv-has-inverse
+ map-inv-left-swap-Σ
+ issec-map-inv-left-swap-Σ
+ isretr-map-inv-left-swap-Σ
+
+ equiv-left-swap-Σ : Σ A (λ a → Σ B (C a)) ≃ Σ B (λ b → Σ A (λ a → C a b))
+ pr1 equiv-left-swap-Σ = map-left-swap-Σ
+ pr2 equiv-left-swap-Σ = is-equiv-map-left-swap-Σ
+```
+
+### Swapping the order of quantification in a Σ-type, on the right
+
+```agda
+module _
+ {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : A → UU l3}
+ where
+
+ map-right-swap-Σ : Σ (Σ A B) (C ∘ pr1) → Σ (Σ A C) (B ∘ pr1)
+ pr1 (pr1 (map-right-swap-Σ ((a , b) , c))) = a
+ pr2 (pr1 (map-right-swap-Σ ((a , b) , c))) = c
+ pr2 (map-right-swap-Σ ((a , b) , c)) = b
+
+ map-inv-right-swap-Σ : Σ (Σ A C) (B ∘ pr1) → Σ (Σ A B) (C ∘ pr1)
+ pr1 (pr1 (map-inv-right-swap-Σ ((a , c) , b))) = a
+ pr2 (pr1 (map-inv-right-swap-Σ ((a , c) , b))) = b
+ pr2 (map-inv-right-swap-Σ ((a , c) , b)) = c
+
+ issec-map-inv-right-swap-Σ : (map-right-swap-Σ ∘ map-inv-right-swap-Σ) ~ id
+ issec-map-inv-right-swap-Σ (pair (pair x y) z) = refl
+
+ isretr-map-inv-right-swap-Σ : (map-inv-right-swap-Σ ∘ map-right-swap-Σ) ~ id
+ isretr-map-inv-right-swap-Σ (pair (pair x z) y) = refl
+
+ is-equiv-map-right-swap-Σ : is-equiv map-right-swap-Σ
+ is-equiv-map-right-swap-Σ =
+ is-equiv-has-inverse
+ map-inv-right-swap-Σ
+ issec-map-inv-right-swap-Σ
+ isretr-map-inv-right-swap-Σ
+
+ equiv-right-swap-Σ : Σ (Σ A B) (C ∘ pr1) ≃ Σ (Σ A C) (B ∘ pr1)
+ pr1 equiv-right-swap-Σ = map-right-swap-Σ
+ pr2 equiv-right-swap-Σ = is-equiv-map-right-swap-Σ
+```
+
+### Distributive laws of cartesian products over Σ
+
+```agda
+left-distributive-prod-Σ :
+ {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : B → UU l3} →
+ (A × (Σ B C)) ≃ Σ B (λ b → A × (C b))
+left-distributive-prod-Σ =
+ equiv-left-swap-Σ
+
+right-distributive-prod-Σ :
+ {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : UU l3} →
+ ((Σ A B) × C) ≃ Σ A (λ a → B a × C)
+right-distributive-prod-Σ {A} =
+ associative-Σ _ _ _
+```
## See also
diff --git a/src/foundation/type-arithmetic-empty-type.lagda.md b/src/foundation/type-arithmetic-empty-type.lagda.md
index c0a7e7e496..ef42003019 100644
--- a/src/foundation/type-arithmetic-empty-type.lagda.md
+++ b/src/foundation/type-arithmetic-empty-type.lagda.md
@@ -8,17 +8,17 @@ module foundation.type-arithmetic-empty-type where
```agda
open import foundation.coproduct-types
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/type-arithmetic-unit-type.lagda.md b/src/foundation/type-arithmetic-unit-type.lagda.md
index 23fa4a341e..c46342ab4c 100644
--- a/src/foundation/type-arithmetic-unit-type.lagda.md
+++ b/src/foundation/type-arithmetic-unit-type.lagda.md
@@ -7,16 +7,16 @@ module foundation.type-arithmetic-unit-type where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.unit-type
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/type-duality.lagda.md b/src/foundation/type-duality.lagda.md
index bb945e3b60..abac66d498 100644
--- a/src/foundation/type-duality.lagda.md
+++ b/src/foundation/type-duality.lagda.md
@@ -7,28 +7,28 @@ module foundation.type-duality where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalences
open import foundation.function-extensionality
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.locally-small-types
open import foundation.slice
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.unit-type
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-function-types
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.injective-maps
open import foundation-core.small-types
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
open import trees.polynomial-endofunctors
```
diff --git a/src/foundation/type-theoretic-principle-of-choice.lagda.md b/src/foundation/type-theoretic-principle-of-choice.lagda.md
index 137a50e760..65d9cc883f 100644
--- a/src/foundation/type-theoretic-principle-of-choice.lagda.md
+++ b/src/foundation/type-theoretic-principle-of-choice.lagda.md
@@ -7,16 +7,16 @@ module foundation.type-theoretic-principle-of-choice where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.structure-identity-principle
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/unions-subtypes.lagda.md b/src/foundation/unions-subtypes.lagda.md
index 87823bacfb..ec82d12d43 100644
--- a/src/foundation/unions-subtypes.lagda.md
+++ b/src/foundation/unions-subtypes.lagda.md
@@ -10,9 +10,9 @@ module foundation.unions-subtypes where
open import foundation.decidable-subtypes
open import foundation.disjunction
open import foundation.large-locale-of-subtypes
+open import foundation.universe-levels
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/unique-existence.lagda.md b/src/foundation/unique-existence.lagda.md
index b66dc60c21..f668a70013 100644
--- a/src/foundation/unique-existence.lagda.md
+++ b/src/foundation/unique-existence.lagda.md
@@ -7,9 +7,10 @@ module foundation.unique-existence where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
+
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/uniqueness-image.lagda.md b/src/foundation/uniqueness-image.lagda.md
index bc5c6510f3..aac1422bbb 100644
--- a/src/foundation/uniqueness-image.lagda.md
+++ b/src/foundation/uniqueness-image.lagda.md
@@ -7,21 +7,21 @@ module foundation.uniqueness-image where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalences
+open import foundation.functions
open import foundation.images
open import foundation.slice
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.universal-property-image
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.propositions
open import foundation-core.sections
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/uniqueness-set-quotients.lagda.md b/src/foundation/uniqueness-set-quotients.lagda.md
index f5cfeb21ef..8468ef1800 100644
--- a/src/foundation/uniqueness-set-quotients.lagda.md
+++ b/src/foundation/uniqueness-set-quotients.lagda.md
@@ -7,21 +7,21 @@ module foundation.uniqueness-set-quotients where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalences
+open import foundation.functions
open import foundation.reflecting-maps-equivalence-relations
open import foundation.sets
+open import foundation.subtype-identity-principle
open import foundation.universal-property-set-quotients
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalence-relations
open import foundation-core.function-extensionality
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.injective-maps
-open import foundation-core.subtype-identity-principle
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/uniqueness-set-truncations.lagda.md b/src/foundation/uniqueness-set-truncations.lagda.md
index e19e545c15..78b16d8588 100644
--- a/src/foundation/uniqueness-set-truncations.lagda.md
+++ b/src/foundation/uniqueness-set-truncations.lagda.md
@@ -7,17 +7,17 @@ module foundation.uniqueness-set-truncations where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.mere-equality
open import foundation.sets
open import foundation.uniqueness-set-quotients
open import foundation.universal-property-set-truncation
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/uniqueness-truncation.lagda.md b/src/foundation/uniqueness-truncation.lagda.md
index 3b8a63eb08..78d89d7df5 100644
--- a/src/foundation/uniqueness-truncation.lagda.md
+++ b/src/foundation/uniqueness-truncation.lagda.md
@@ -7,11 +7,12 @@ module foundation.uniqueness-truncation where
Imports
```agda
-open import foundation-core.functions
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.homotopies
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/unit-type.lagda.md b/src/foundation/unit-type.lagda.md
index 14f337f645..0e9bdd076b 100644
--- a/src/foundation/unit-type.lagda.md
+++ b/src/foundation/unit-type.lagda.md
@@ -7,18 +7,18 @@ module foundation.unit-type where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.raising-universe-levels
+open import foundation.universe-levels
open import foundation-core.constant-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.sets
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/unital-binary-operations.lagda.md b/src/foundation/unital-binary-operations.lagda.md
index ff157ad725..bcb9a54e2b 100644
--- a/src/foundation/unital-binary-operations.lagda.md
+++ b/src/foundation/unital-binary-operations.lagda.md
@@ -7,11 +7,12 @@ module foundation.unital-binary-operations where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
+
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/univalence-action-on-equivalences.lagda.md b/src/foundation/univalence-action-on-equivalences.lagda.md
index 036127687b..05067d1a1d 100644
--- a/src/foundation/univalence-action-on-equivalences.lagda.md
+++ b/src/foundation/univalence-action-on-equivalences.lagda.md
@@ -7,20 +7,20 @@ module foundation.univalence-action-on-equivalences where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
open import foundation.identity-types
open import foundation.sets
open import foundation.subuniverses
open import foundation.univalence
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.injective-maps
open import foundation-core.propositions
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/univalence-implies-function-extensionality.lagda.md b/src/foundation/univalence-implies-function-extensionality.lagda.md
index a8341aaadd..a1aedfb757 100644
--- a/src/foundation/univalence-implies-function-extensionality.lagda.md
+++ b/src/foundation/univalence-implies-function-extensionality.lagda.md
@@ -7,19 +7,19 @@ module foundation.univalence-implies-function-extensionality where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalence-induction
+open import foundation.functions
+open import foundation.type-arithmetic-dependent-pair-types
+open import foundation.universe-levels
open import foundation.weak-function-extensionality
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.fibers-of-maps
open import foundation-core.function-extensionality
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/univalence.lagda.md b/src/foundation/univalence.lagda.md
index 1dde88411a..63cbdea5ed 100644
--- a/src/foundation/univalence.lagda.md
+++ b/src/foundation/univalence.lagda.md
@@ -9,18 +9,18 @@ open import foundation-core.univalence public
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equality-dependent-function-types
open import foundation.equivalences
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.injective-maps
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/univalent-type-families.lagda.md b/src/foundation/univalent-type-families.lagda.md
index 095e1740dc..f2da3797cb 100644
--- a/src/foundation/univalent-type-families.lagda.md
+++ b/src/foundation/univalent-type-families.lagda.md
@@ -8,9 +8,9 @@ module foundation.univalent-type-families where
```agda
open import foundation.identity-types
+open import foundation.universe-levels
open import foundation-core.equivalences
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/universal-property-booleans.lagda.md b/src/foundation/universal-property-booleans.lagda.md
index fa65cd3ad6..267b3dedce 100644
--- a/src/foundation/universal-property-booleans.lagda.md
+++ b/src/foundation/universal-property-booleans.lagda.md
@@ -8,16 +8,16 @@ module foundation.universal-property-booleans where
```agda
open import foundation.booleans
+open import foundation.dependent-pair-types
+open import foundation.equality-cartesian-product-types
open import foundation.function-extensionality
+open import foundation.functions
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.equality-cartesian-product-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/universal-property-cartesian-product-types.lagda.md b/src/foundation/universal-property-cartesian-product-types.lagda.md
index c57311cd74..d4ffa19392 100644
--- a/src/foundation/universal-property-cartesian-product-types.lagda.md
+++ b/src/foundation/universal-property-cartesian-product-types.lagda.md
@@ -7,21 +7,21 @@ module foundation.universal-property-cartesian-product-types where
Imports
```agda
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
+open import foundation.functions
open import foundation.unit-type
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.cones-over-cospans
open import foundation-core.constant-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.pullbacks
open import foundation-core.universal-property-pullbacks
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/universal-property-coproduct-types.lagda.md b/src/foundation/universal-property-coproduct-types.lagda.md
index 6c03900ec4..bf1d98547b 100644
--- a/src/foundation/universal-property-coproduct-types.lagda.md
+++ b/src/foundation/universal-property-coproduct-types.lagda.md
@@ -7,16 +7,16 @@ module foundation.universal-property-coproduct-types where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.equality-cartesian-product-types
open import foundation.equivalences
open import foundation.function-extensionality
+open import foundation.functions
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.equality-cartesian-product-types
-open import foundation-core.functions
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/universal-property-dependent-pair-types.lagda.md b/src/foundation/universal-property-dependent-pair-types.lagda.md
index 7be23ce643..29487b71cb 100644
--- a/src/foundation/universal-property-dependent-pair-types.lagda.md
+++ b/src/foundation/universal-property-dependent-pair-types.lagda.md
@@ -7,13 +7,13 @@ module foundation.universal-property-dependent-pair-types where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/universal-property-empty-type.lagda.md b/src/foundation/universal-property-empty-type.lagda.md
index 70ea5c4014..d178d004f8 100644
--- a/src/foundation/universal-property-empty-type.lagda.md
+++ b/src/foundation/universal-property-empty-type.lagda.md
@@ -7,14 +7,14 @@ module foundation.universal-property-empty-type where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalences
open import foundation.function-extensionality
+open import foundation.functions
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
-open import foundation-core.functions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/universal-property-fiber-products.lagda.md b/src/foundation/universal-property-fiber-products.lagda.md
index 000f5038e7..fff71c9a53 100644
--- a/src/foundation/universal-property-fiber-products.lagda.md
+++ b/src/foundation/universal-property-fiber-products.lagda.md
@@ -7,20 +7,21 @@ module foundation.universal-property-fiber-products where
Imports
```agda
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
+open import foundation.equality-cartesian-product-types
+open import foundation.functions
+open import foundation.universe-levels
+
open import foundation-core.cartesian-product-types
-open import foundation-core.cones-over-cospans
-open import foundation-core.dependent-pair-types
-open import foundation-core.equality-cartesian-product-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.pullbacks
open import foundation-core.universal-property-pullbacks
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/universal-property-identity-types.lagda.md b/src/foundation/universal-property-identity-types.lagda.md
index 1e45ef5d25..4a067d11c3 100644
--- a/src/foundation/universal-property-identity-types.lagda.md
+++ b/src/foundation/universal-property-identity-types.lagda.md
@@ -7,13 +7,13 @@ module foundation.universal-property-identity-types where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
open import foundation.identity-types
+open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.functoriality-dependent-function-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/universal-property-image.lagda.md b/src/foundation/universal-property-image.lagda.md
index d3ce937f3c..99f2c23a36 100644
--- a/src/foundation/universal-property-image.lagda.md
+++ b/src/foundation/universal-property-image.lagda.md
@@ -7,19 +7,20 @@ module foundation.universal-property-image where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.embeddings
+open import foundation.functions
open import foundation.identity-types
open import foundation.images
open import foundation.propositional-truncations
open import foundation.slice
open import foundation.surjective-maps
+open import foundation.universe-levels
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-function-types
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
@@ -28,7 +29,6 @@ open import foundation-core.propositional-maps
open import foundation-core.propositions
open import foundation-core.sections
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/universal-property-maybe.lagda.md b/src/foundation/universal-property-maybe.lagda.md
index e9cd5677d1..6644e2b569 100644
--- a/src/foundation/universal-property-maybe.lagda.md
+++ b/src/foundation/universal-property-maybe.lagda.md
@@ -7,17 +7,17 @@ module foundation.universal-property-maybe where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.maybe
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/universal-property-propositional-truncation-into-sets.lagda.md b/src/foundation/universal-property-propositional-truncation-into-sets.lagda.md
index eaa1e4ba72..bccc688bff 100644
--- a/src/foundation/universal-property-propositional-truncation-into-sets.lagda.md
+++ b/src/foundation/universal-property-propositional-truncation-into-sets.lagda.md
@@ -7,20 +7,20 @@ module foundation.universal-property-propositional-truncation-into-sets where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.propositional-truncations
+open import foundation.universe-levels
open import foundation.weakly-constant-maps
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.sets
open import foundation-core.subtypes
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/universal-property-propositional-truncation.lagda.md b/src/foundation/universal-property-propositional-truncation.lagda.md
index 7b3fbcdb6f..209b1c3cd2 100644
--- a/src/foundation/universal-property-propositional-truncation.lagda.md
+++ b/src/foundation/universal-property-propositional-truncation.lagda.md
@@ -7,24 +7,24 @@ module foundation.universal-property-propositional-truncation where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalences
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.functoriality-cartesian-product-types
+open import foundation.subtype-identity-principle
open import foundation.type-theoretic-principle-of-choice
open import foundation.unit-type
open import foundation.universal-property-dependent-pair-types
+open import foundation.universe-levels
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-function-types
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.subtype-identity-principle
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/universal-property-pullbacks.lagda.md b/src/foundation/universal-property-pullbacks.lagda.md
index 2d4dccc1a5..08c1058685 100644
--- a/src/foundation/universal-property-pullbacks.lagda.md
+++ b/src/foundation/universal-property-pullbacks.lagda.md
@@ -9,15 +9,15 @@ open import foundation-core.universal-property-pullbacks public
Imports
```agda
+open import foundation.cones-over-cospans
+open import foundation.dependent-pair-types
open import foundation.equivalences
+open import foundation.subtype-identity-principle
+open import foundation.universe-levels
-open import foundation-core.cones-over-cospans
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.subtype-identity-principle
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/universal-property-set-quotients.lagda.md b/src/foundation/universal-property-set-quotients.lagda.md
index 481c8b4bac..588f600d00 100644
--- a/src/foundation/universal-property-set-quotients.lagda.md
+++ b/src/foundation/universal-property-set-quotients.lagda.md
@@ -9,11 +9,14 @@ module foundation.universal-property-set-quotients where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.effective-maps-equivalence-relations
open import foundation.epimorphisms-with-respect-to-sets
open import foundation.equivalence-classes
open import foundation.existential-quantification
open import foundation.function-extensionality
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.identity-types
open import foundation.images
open import foundation.locally-small-types
@@ -23,18 +26,16 @@ open import foundation.reflecting-maps-equivalence-relations
open import foundation.sets
open import foundation.surjective-maps
open import foundation.universal-property-image
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalence-relations
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.homotopies
open import foundation-core.injective-maps
open import foundation-core.propositional-maps
@@ -42,7 +43,6 @@ open import foundation-core.propositions
open import foundation-core.small-types
open import foundation-core.subtypes
open import foundation-core.univalence
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/universal-property-set-truncation.lagda.md b/src/foundation/universal-property-set-truncation.lagda.md
index ca715ea065..d76ce9015f 100644
--- a/src/foundation/universal-property-set-truncation.lagda.md
+++ b/src/foundation/universal-property-set-truncation.lagda.md
@@ -7,24 +7,24 @@ module foundation.universal-property-set-truncation where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalences
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.mere-equality
open import foundation.reflecting-maps-equivalence-relations
open import foundation.sets
+open import foundation.type-arithmetic-dependent-pair-types
open import foundation.type-theoretic-principle-of-choice
open import foundation.universal-property-set-quotients
+open import foundation.universe-levels
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.type-arithmetic-dependent-pair-types
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/universal-property-truncation.lagda.md b/src/foundation/universal-property-truncation.lagda.md
index abb3a6ce52..63a5d1d63b 100644
--- a/src/foundation/universal-property-truncation.lagda.md
+++ b/src/foundation/universal-property-truncation.lagda.md
@@ -10,6 +10,7 @@ open import foundation-core.universal-property-truncation public
```agda
open import foundation.contractible-types
+open import foundation.dependent-pair-types
open import foundation.function-extensionality
open import foundation.identity-types
open import foundation.propositional-truncations
@@ -18,16 +19,15 @@ open import foundation.type-arithmetic-dependent-function-types
open import foundation.type-theoretic-principle-of-choice
open import foundation.universal-property-dependent-pair-types
open import foundation.universal-property-identity-types
+open import foundation.universe-levels
open import foundation-core.contractible-maps
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.fibers-of-maps
open import foundation-core.functoriality-dependent-function-types
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.truncated-types
open import foundation-core.truncation-levels
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/universal-property-unit-type.lagda.md b/src/foundation/universal-property-unit-type.lagda.md
index c1d3847aa7..f736576930 100644
--- a/src/foundation/universal-property-unit-type.lagda.md
+++ b/src/foundation/universal-property-unit-type.lagda.md
@@ -8,14 +8,14 @@ module foundation.universal-property-unit-type where
```agda
open import foundation.contractible-types
+open import foundation.dependent-pair-types
open import foundation.equivalences
+open import foundation.functions
open import foundation.unit-type
+open import foundation.universe-levels
open import foundation-core.constant-maps
-open import foundation-core.dependent-pair-types
-open import foundation-core.functions
open import foundation-core.homotopies
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/universe-levels.lagda.md b/src/foundation/universe-levels.lagda.md
index 785a6b7e65..f3f99c1253 100644
--- a/src/foundation/universe-levels.lagda.md
+++ b/src/foundation/universe-levels.lagda.md
@@ -5,13 +5,14 @@
module foundation.universe-levels where
-open import foundation-core.universe-levels public
+open import Agda.Primitive
+ using (Level ; lzero ; lsuc ; _⊔_)
+ renaming (Set to UU ; Setω to UUω)
+ public
```
-Imports
+## Idea
-```agda
-
-```
-
-
+We import Agda's built in mechanism of universe levels. The universes are called
+`UU`, which stands for _univalent universe_, although we will not immediately
+assume that universes are univalent.
diff --git a/src/foundation/unordered-pairs-of-types.lagda.md b/src/foundation/unordered-pairs-of-types.lagda.md
index d655b9035c..6819cbe635 100644
--- a/src/foundation/unordered-pairs-of-types.lagda.md
+++ b/src/foundation/unordered-pairs-of-types.lagda.md
@@ -7,16 +7,16 @@ module foundation.unordered-pairs-of-types where
Imports
```agda
+open import foundation.dependent-pair-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.structure-identity-principle
open import foundation.univalence
+open import foundation.universe-levels
open import foundation.unordered-pairs
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
-open import foundation-core.universe-levels
open import univalent-combinatorics.2-element-types
```
diff --git a/src/foundation/unordered-pairs.lagda.md b/src/foundation/unordered-pairs.lagda.md
index e4094152e8..e7273187e8 100644
--- a/src/foundation/unordered-pairs.lagda.md
+++ b/src/foundation/unordered-pairs.lagda.md
@@ -8,26 +8,26 @@ module foundation.unordered-pairs where
```agda
open import foundation.decidable-equality
+open import foundation.dependent-pair-types
open import foundation.existential-quantification
open import foundation.function-extensionality
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.homotopies
open import foundation.mere-equivalences
open import foundation.propositional-truncations
open import foundation.structure-identity-principle
+open import foundation.universe-levels
open import foundation-core.contractible-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.embeddings
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.functoriality-function-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.universe-levels
open import univalent-combinatorics.2-element-types
open import univalent-combinatorics.equality-standard-finite-types
diff --git a/src/foundation/unordered-tuples-of-types.lagda.md b/src/foundation/unordered-tuples-of-types.lagda.md
index 10e1c2bf53..ded645fd43 100644
--- a/src/foundation/unordered-tuples-of-types.lagda.md
+++ b/src/foundation/unordered-tuples-of-types.lagda.md
@@ -9,16 +9,16 @@ module foundation.unordered-tuples-of-types where
```agda
open import elementary-number-theory.natural-numbers
+open import foundation.dependent-pair-types
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.structure-identity-principle
open import foundation.univalence
+open import foundation.universe-levels
open import foundation.unordered-tuples
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
-open import foundation-core.universe-levels
open import univalent-combinatorics.finite-types
```
diff --git a/src/foundation/unordered-tuples.lagda.md b/src/foundation/unordered-tuples.lagda.md
index 416ca2e554..da9ffc8820 100644
--- a/src/foundation/unordered-tuples.lagda.md
+++ b/src/foundation/unordered-tuples.lagda.md
@@ -10,19 +10,19 @@ module foundation.unordered-tuples where
open import elementary-number-theory.natural-numbers
open import foundation.decidable-equality
+open import foundation.dependent-pair-types
+open import foundation.functions
+open import foundation.fundamental-theorem-of-identity-types
open import foundation.homotopies
open import foundation.structure-identity-principle
+open import foundation.universe-levels
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-pair-types
open import foundation-core.functoriality-function-types
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.sets
-open import foundation-core.universe-levels
open import univalent-combinatorics.complements-isolated-points
open import univalent-combinatorics.equality-finite-types
diff --git a/src/foundation/vectors-set-quotients.lagda.md b/src/foundation/vectors-set-quotients.lagda.md
index 87d2c93357..f954662a7a 100644
--- a/src/foundation/vectors-set-quotients.lagda.md
+++ b/src/foundation/vectors-set-quotients.lagda.md
@@ -12,7 +12,10 @@ module foundation.vectors-set-quotients where
open import elementary-number-theory.natural-numbers
open import foundation.cartesian-products-set-quotients
+open import foundation.dependent-pair-types
+open import foundation.equality-cartesian-product-types
open import foundation.function-extensionality
+open import foundation.functions
open import foundation.multivariable-operations
open import foundation.products-equivalence-relations
open import foundation.raising-universe-levels
@@ -21,21 +24,18 @@ open import foundation.set-quotients
open import foundation.sets
open import foundation.unit-type
open import foundation.universal-property-set-quotients
+open import foundation.universe-levels
open import foundation-core.cartesian-product-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
-open import foundation-core.equality-cartesian-product-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalence-relations
open import foundation-core.equivalences
-open import foundation-core.functions
open import foundation-core.homotopies
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.retractions
open import foundation-core.sections
-open import foundation-core.universe-levels
open import linear-algebra.vectors
diff --git a/src/foundation/weak-function-extensionality.lagda.md b/src/foundation/weak-function-extensionality.lagda.md
index 500ab36d6c..2be687323b 100644
--- a/src/foundation/weak-function-extensionality.lagda.md
+++ b/src/foundation/weak-function-extensionality.lagda.md
@@ -9,18 +9,18 @@ module foundation.weak-function-extensionality where
```agda
open import foundation.decidable-equality
open import foundation.decidable-types
+open import foundation.dependent-pair-types
+open import foundation.fundamental-theorem-of-identity-types
+open import foundation.universe-levels
open import foundation-core.contractible-types
open import foundation-core.coproduct-types
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
open import foundation-core.equality-dependent-pair-types
open import foundation-core.equivalences
open import foundation-core.function-extensionality
-open import foundation-core.fundamental-theorem-of-identity-types
open import foundation-core.identity-types
open import foundation-core.propositions
-open import foundation-core.universe-levels
```
diff --git a/src/foundation/weak-limited-principle-of-omniscience.lagda.md b/src/foundation/weak-limited-principle-of-omniscience.lagda.md
index 93d5f267b4..8e5480c9da 100644
--- a/src/foundation/weak-limited-principle-of-omniscience.lagda.md
+++ b/src/foundation/weak-limited-principle-of-omniscience.lagda.md
@@ -11,10 +11,10 @@ open import elementary-number-theory.natural-numbers
open import foundation.disjunction
open import foundation.negation
+open import foundation.universe-levels
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.universe-levels
open import univalent-combinatorics.standard-finite-types
```
diff --git a/src/foundation/weakly-constant-maps.lagda.md b/src/foundation/weakly-constant-maps.lagda.md
index ebc7cfd45e..420bc3e44f 100644
--- a/src/foundation/weakly-constant-maps.lagda.md
+++ b/src/foundation/weakly-constant-maps.lagda.md
@@ -7,11 +7,12 @@ module foundation.weakly-constant-maps where
Imports
```agda
-open import foundation-core.dependent-pair-types
+open import foundation.dependent-pair-types
+open import foundation.universe-levels
+
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.sets
-open import foundation-core.universe-levels
```
diff --git a/src/orthogonal-factorization-systems/local-types.lagda.md b/src/orthogonal-factorization-systems/local-types.lagda.md
index bd8d3819d2..ad83346db1 100644
--- a/src/orthogonal-factorization-systems/local-types.lagda.md
+++ b/src/orthogonal-factorization-systems/local-types.lagda.md
@@ -7,24 +7,24 @@ module orthogonal-factorization-systems.local-types where
Imports
```agda
+open import foundation.dependent-pair-types
open import foundation.equivalences
+open import foundation.functions
open import foundation.type-arithmetic-dependent-function-types
open import foundation.type-arithmetic-unit-type
open import foundation.unit-type
open import foundation.universal-property-empty-type
+open import foundation.universe-levels
open import foundation-core.contractible-maps
open import foundation-core.contractible-types
-open import foundation-core.dependent-pair-types
open import foundation-core.empty-types
open import foundation-core.function-extensionality
-open import foundation-core.functions
open import foundation-core.functoriality-dependent-function-types
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.retractions
open import foundation-core.sections
-open import foundation-core.universe-levels
```
diff --git a/src/reflection/boolean-reflection.lagda.md b/src/reflection/boolean-reflection.lagda.md
index 70840f2184..6908c83cf5 100644
--- a/src/reflection/boolean-reflection.lagda.md
+++ b/src/reflection/boolean-reflection.lagda.md
@@ -9,11 +9,11 @@ module reflection.boolean-reflection where
```agda
open import foundation.booleans
open import foundation.decidable-types
+open import foundation.universe-levels
open import foundation-core.coproduct-types
open import foundation-core.empty-types
open import foundation-core.identity-types
-open import foundation-core.universe-levels
```
diff --git a/src/reflection/type-checking-monad.lagda.md b/src/reflection/type-checking-monad.lagda.md
index fd0b450434..4220ac6b1f 100644
--- a/src/reflection/type-checking-monad.lagda.md
+++ b/src/reflection/type-checking-monad.lagda.md
@@ -14,12 +14,11 @@ open import elementary-number-theory.natural-numbers
open import foundation.booleans
open import foundation.cartesian-product-types
+open import foundation.dependent-pair-types
open import foundation.identity-types
open import foundation.unit-type
open import foundation.universe-levels
-open import foundation-core.dependent-pair-types
-
open import lists.lists
open import primitives.strings
diff --git a/src/set-theory/countable-sets.lagda.md b/src/set-theory/countable-sets.lagda.md
index dbb802a3cb..f061f9d49c 100644
--- a/src/set-theory/countable-sets.lagda.md
+++ b/src/set-theory/countable-sets.lagda.md
@@ -15,9 +15,11 @@ open import foundation.coproduct-types
open import foundation.decidable-propositions
open import foundation.decidable-subtypes
open import foundation.decidable-types
+open import foundation.dependent-pair-types
open import foundation.empty-types
open import foundation.equality-coproduct-types
open import foundation.existential-quantification
+open import foundation.functions
open import foundation.functoriality-cartesian-product-types
open import foundation.functoriality-coproduct-types
open import foundation.maybe
@@ -32,9 +34,7 @@ open import foundation.unit-type
open import foundation.universe-levels
open import foundation-core.cartesian-product-types
-open import foundation-core.dependent-pair-types
open import foundation-core.fibers-of-maps
-open import foundation-core.functions
open import foundation-core.identity-types
open import univalent-combinatorics.standard-finite-types
diff --git a/src/structured-types/commuting-squares-of-pointed-maps.lagda.md b/src/structured-types/commuting-squares-of-pointed-maps.lagda.md
index 74c2702ec7..a49e3d8c0b 100644
--- a/src/structured-types/commuting-squares-of-pointed-maps.lagda.md
+++ b/src/structured-types/commuting-squares-of-pointed-maps.lagda.md
@@ -7,7 +7,7 @@ module structured-types.commuting-squares-of-pointed-maps where
Imports
```agda
-open import foundation-core.universe-levels
+open import foundation.universe-levels
open import structured-types.pointed-homotopies
open import structured-types.pointed-maps
diff --git a/src/structured-types/types-equipped-with-automorphisms.lagda.md b/src/structured-types/types-equipped-with-automorphisms.lagda.md
index 2606d8b2c8..d32a40d763 100644
--- a/src/structured-types/types-equipped-with-automorphisms.lagda.md
+++ b/src/structured-types/types-equipped-with-automorphisms.lagda.md
@@ -2,17 +2,15 @@
```agda
module structured-types.types-equipped-with-automorphisms where
-
-open import foundation.universe-levels
-open import foundation.dependent-pair-types
-open import foundation.equivalences
-open import foundation.automorphisms
```
Imports
```agda
-
+open import foundation.automorphisms
+open import foundation.dependent-pair-types
+open import foundation.equivalences
+open import foundation.universe-levels
```
diff --git a/src/synthetic-homotopy-theory/joins-of-types.lagda.md b/src/synthetic-homotopy-theory/joins-of-types.lagda.md
index 3bea88dcea..eb8458f791 100644
--- a/src/synthetic-homotopy-theory/joins-of-types.lagda.md
+++ b/src/synthetic-homotopy-theory/joins-of-types.lagda.md
@@ -13,6 +13,7 @@ open import foundation.dependent-pair-types
open import foundation.disjunction
open import foundation.empty-types
open import foundation.equivalences
+open import foundation.functions
open import foundation.identity-types
open import foundation.propositions
open import foundation.type-arithmetic-cartesian-product-types
@@ -22,8 +23,6 @@ open import foundation.type-arithmetic-unit-type
open import foundation.unit-type
open import foundation.universe-levels
-open import foundation-core.functions
-
open import synthetic-homotopy-theory.cocones-under-spans
open import synthetic-homotopy-theory.pushouts
open import synthetic-homotopy-theory.universal-property-pushouts