Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduction to Homotopy Type Theory, Chapter 2 #1346

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/foundation/booleans.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module foundation.booleans where
<details><summary>Imports</summary>

```agda
open import foundation.contractible-types
open import foundation.decidable-equality
open import foundation.decidable-types
open import foundation.dependent-pair-types
Expand Down Expand Up @@ -342,3 +343,19 @@ abstract
(b : bool) → ¬ (is-equiv (const bool b))
is-not-equiv-const-bool b e = no-section-const-bool b (section-is-equiv e)
```

### The type of booleans is not contractible

```agda
abstract
is-not-contractible-bool : ¬ (is-contr bool)
is-not-contractible-bool (b , eq) = no-section-const-bool b (id , eq)
```

### The type of booleans is not equivalent to the unit type

```agda
abstract
is-not-unit-bool : ¬ (bool ≃ unit)
is-not-unit-bool e = is-not-contractible-bool (is-contr-equiv-unit e)
```
32 changes: 31 additions & 1 deletion src/foundation/functoriality-cartesian-product-types.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ open import foundation.action-on-identifications-functions
open import foundation.dependent-pair-types
open import foundation.equality-cartesian-product-types
open import foundation.morphisms-arrows
open import foundation.sections
open import foundation.universe-levels

open import foundation-core.cartesian-product-types
Expand Down Expand Up @@ -254,7 +255,7 @@ module _
pr2 compute-fiber-map-product = is-equiv-map-compute-fiber-map-product
```

### If `map-product f g : A × B → C × D` is an equivalence, then we have `D → is-equiv f` and `C → is-equiv g`
### `map-product f g : A × B → C × D` is an equivalence if and only if we have `D → is-equiv f` and `C → is-equiv g`

```agda
module _
Expand Down Expand Up @@ -291,6 +292,35 @@ module _
( map-compute-fiber-map-product f g (c , y))
( is-equiv-map-compute-fiber-map-product f g (c , y))
( is-contr-map-is-equiv is-equiv-fg (c , y))))

map-inv-map-product' : (D → is-equiv f) → (C → is-equiv g) → C × D → A × B
pr1 (map-inv-map-product' F G (c , d)) = map-inv-is-equiv (F d) c
pr2 (map-inv-map-product' F G (c , d)) = map-inv-is-equiv (G c) d

abstract
is-section-map-inv-map-product' :
(F : D → is-equiv f) (G : C → is-equiv g) →
is-section (map-product f g) (map-inv-map-product' F G)
is-section-map-inv-map-product' F G (c , d) =
eq-pair
( is-section-map-inv-is-equiv (F d) c)
( is-section-map-inv-is-equiv (G c) d)

is-retraction-map-inv-map-product' :
(F : D → is-equiv f) (G : C → is-equiv g) →
is-retraction (map-product f g) (map-inv-map-product' F G)
is-retraction-map-inv-map-product' F G (a , b) =
eq-pair
( is-retraction-map-inv-is-equiv (F (g b)) a)
( is-retraction-map-inv-is-equiv (G (f a)) b)

is-equiv-map-product' :
(D → is-equiv f) → (C → is-equiv g) → is-equiv (map-product f g)
is-equiv-map-product' F G =
is-equiv-is-invertible
( map-inv-map-product' F G)
( is-section-map-inv-map-product' F G)
( is-retraction-map-inv-map-product' F G)
```

### The functorial action of products on arrows
Expand Down
9 changes: 9 additions & 0 deletions src/foundation/unit-type.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ open import foundation.action-on-identifications-functions
open import foundation.dependent-pair-types
open import foundation.diagonal-maps-of-types
open import foundation.raising-universe-levels
open import foundation.singleton-induction
open import foundation.universe-levels

open import foundation-core.constant-maps
Expand Down Expand Up @@ -107,6 +108,14 @@ abstract
is-contr-equiv' unit (compute-raise l1 unit) is-contr-unit
```

### The unit type satisfies singleton induction

```agda
abstract
is-singleton-unit : {l : Level} → is-singleton l unit star
is-singleton-unit B = ind-unit , λ b → refl
```

### Any contractible type is equivalent to the unit type

```agda
Expand Down
Loading
Loading