Skip to content

Commit

Permalink
Define null-homotopic maps (UniMath#1136)
Browse files Browse the repository at this point in the history
Defines null-homotopic maps and characterizes their equality. In
particular, a sufficient condition for when being null-homotopic is a
property is given.
  • Loading branch information
fredrik-bakke authored and morphismz committed Aug 31, 2024
1 parent 29cd33d commit ab09eb6
Show file tree
Hide file tree
Showing 5 changed files with 264 additions and 36 deletions.
1 change: 1 addition & 0 deletions src/foundation.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ open import foundation.multivariable-sections public
open import foundation.negated-equality public
open import foundation.negation public
open import foundation.noncontractible-types public
open import foundation.null-homotopic-maps public
open import foundation.operations-span-diagrams public
open import foundation.operations-spans public
open import foundation.operations-spans-families-of-types public
Expand Down
9 changes: 6 additions & 3 deletions src/foundation/homotopy-induction.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ module _
is-torsorial-htpy : is-torsorial (λ g f ~ g)
is-torsorial-htpy =
is-contr-equiv'
( Σ ((x : A) B x) (Id f))
( Σ ((x : A) B x) (λ g f = g))
( equiv-tot (λ g equiv-funext))
( is-torsorial-Id f)

Expand All @@ -109,8 +109,7 @@ abstract
{l1 l2 : Level} {A : UU l1} {B : A UU l2} (f : (x : A) B x)
based-function-extensionality f
induction-principle-homotopies f
induction-principle-homotopies-based-function-extensionality
{A = A} {B} f funext-f =
induction-principle-homotopies-based-function-extensionality f funext-f =
is-identity-system-is-torsorial f
( refl-htpy)
( is-torsorial-htpy f)
Expand Down Expand Up @@ -170,6 +169,10 @@ module _

is-contr-map-ev-refl-htpy : is-contr-map (ev-refl-htpy C)
is-contr-map-ev-refl-htpy = is-contr-map-is-equiv is-equiv-ev-refl-htpy

equiv-ev-refl-htpy :
((g : (x : A) B x) (H : f ~ g) C g H) ≃ C f refl-htpy
equiv-ev-refl-htpy = (ev-refl-htpy C , is-equiv-ev-refl-htpy)
```

## See also
Expand Down
228 changes: 228 additions & 0 deletions src/foundation/null-homotopic-maps.lagda.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
# Null-homotopic maps

```agda
module foundation.null-homotopic-maps where
```

<details><summary>Imports</summary>

```agda
open import foundation.commuting-triangles-of-identifications
open import foundation.constant-maps
open import foundation.dependent-pair-types
open import foundation.empty-types
open import foundation.functoriality-dependent-pair-types
open import foundation.fundamental-theorem-of-identity-types
open import foundation.homotopy-induction
open import foundation.identity-types
open import foundation.inhabited-types
open import foundation.negation
open import foundation.propositional-truncations
open import foundation.propositions
open import foundation.sets
open import foundation.structure-identity-principle
open import foundation.torsorial-type-families
open import foundation.type-arithmetic-dependent-pair-types
open import foundation.unit-type
open import foundation.universal-property-empty-type
open import foundation.universe-levels

open import foundation-core.contractible-types
open import foundation-core.equivalences
open import foundation-core.function-types
open import foundation-core.homotopies
```

</details>

## Idea

A map `f : A B` is said to be
{{#concept "null-homotopic" Disambiguation="map of types" Agda=null-htpy}}, or
_constant_, if there is an element `y : B` such for every `x : A` we have
`f x = y`. In other words, `f` is null-homotopic if it is
[homotopic](foundation-core.homotopies.md) to a
[constant](foundation-core.constant-maps.md) function.

## Definition

### The type of null-homotopies of a map

```agda
null-htpy :
{l1 l2 : Level} {A : UU l1} {B : UU l2} (A B) UU (l1 ⊔ l2)
null-htpy {A = A} {B} f = Σ B (λ y (x : A) f x = y)

module _
{l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A B} (H : null-htpy f)
where

center-null-htpy : B
center-null-htpy = pr1 H

contraction-null-htpy : (x : A) f x = center-null-htpy
contraction-null-htpy = pr2 H
```

## Properties

### Characterizing equality of null-homotopies

Two null-homotopies `H` and `K` are equal if there is an
[equality](foundation-core.identity-types.md) of base points `p : H₀ = K₀` such
that for every `x : A` we have a
[commuting triangle of identifications](foundation.commuting-triangles-of-identifications.md)

```text
f x
/ \
H₁x / \ K₁x
∨ ∨
H₀ ----> K₀.
p
```

```agda
module _
{l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A B}
where

coherence-htpy-null-htpy :
(H K : null-htpy f) (p : center-null-htpy H = center-null-htpy K)
UU (l1 ⊔ l2)
coherence-htpy-null-htpy H K p =
(x : A)
coherence-triangle-identifications
( contraction-null-htpy K x)
( p)
( contraction-null-htpy H x)

htpy-null-htpy : (H K : null-htpy f) UU (l1 ⊔ l2)
htpy-null-htpy H K =
Σ ( center-null-htpy H = center-null-htpy K)
( coherence-htpy-null-htpy H K)

refl-htpy-null-htpy : (H : null-htpy f) htpy-null-htpy H H
refl-htpy-null-htpy H = (refl , inv-htpy-right-unit-htpy)

htpy-eq-null-htpy : (H K : null-htpy f) H = K htpy-null-htpy H K
htpy-eq-null-htpy H .H refl = refl-htpy-null-htpy H

is-torsorial-htpy-null-htpy :
(H : null-htpy f) is-torsorial (htpy-null-htpy H)
is-torsorial-htpy-null-htpy H =
is-torsorial-Eq-structure
( is-torsorial-Id (center-null-htpy H))
( center-null-htpy H , refl)
( is-torsorial-htpy' (contraction-null-htpy H ∙h refl-htpy))

is-equiv-htpy-eq-null-htpy :
(H K : null-htpy f) is-equiv (htpy-eq-null-htpy H K)
is-equiv-htpy-eq-null-htpy H =
fundamental-theorem-id (is-torsorial-htpy-null-htpy H) (htpy-eq-null-htpy H)

extensionality-htpy-null-htpy :
(H K : null-htpy f) (H = K) ≃ htpy-null-htpy H K
extensionality-htpy-null-htpy H K =
( htpy-eq-null-htpy H K , is-equiv-htpy-eq-null-htpy H K)

eq-htpy-null-htpy : (H K : null-htpy f) htpy-null-htpy H K H = K
eq-htpy-null-htpy H K = map-inv-is-equiv (is-equiv-htpy-eq-null-htpy H K)
```

### If the domain is empty the type of null-homotopies is equivalent to elements of `B`

```agda
module _
{l : Level} {B : UU l} {f : empty B}
where

compute-null-htpy-empty-domain : null-htpy f ≃ B
compute-null-htpy-empty-domain =
right-unit-law-Σ-is-contr
( λ y dependent-universal-property-empty' (λ x f x = y))
```

### If the domain has an element then the center of the null-homotopy is unique

```agda
module _
{l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A B}
where

eq-center-null-htpy-has-element-domain :
A (H K : null-htpy f) center-null-htpy H = center-null-htpy K
eq-center-null-htpy-has-element-domain a H K =
inv (contraction-null-htpy H a) ∙ contraction-null-htpy K a
```

### If the codomain is a set and the domain has an element then being null-homotopic is a property

```agda
module _
{l1 l2 : Level} {A : UU l1} {B : UU l2}
(is-set-B : is-set B) (a : A)
{f : A B}
where

all-elements-equal-null-htpy-has-element-domain-is-set-codomain :
all-elements-equal (null-htpy f)
all-elements-equal-null-htpy-has-element-domain-is-set-codomain H K =
eq-htpy-null-htpy H K
( ( eq-center-null-htpy-has-element-domain a H K) ,
( λ x eq-is-prop (is-set-B (f x) (center-null-htpy K))))

is-prop-null-htpy-has-element-domain-is-set-codomain : is-prop (null-htpy f)
is-prop-null-htpy-has-element-domain-is-set-codomain =
is-prop-all-elements-equal
( all-elements-equal-null-htpy-has-element-domain-is-set-codomain)
```

### If the codomain is a set and the domain is inhabited then being null-homotopic is a property

```agda
module _
{l1 l2 : Level} {A : UU l1} {B : UU l2}
(a : is-inhabited A) (is-set-B : is-set B)
{f : A B}
where

eq-center-null-htpy-is-inhabited-domain-is-set-codomain :
(H K : null-htpy f) center-null-htpy H = center-null-htpy K
eq-center-null-htpy-is-inhabited-domain-is-set-codomain H K =
rec-trunc-Prop
( Id-Prop (B , is-set-B) (center-null-htpy H) (center-null-htpy K))
( λ x eq-center-null-htpy-has-element-domain x H K)
( a)

all-elements-equal-null-htpy-is-inhabited-domain-is-set-codomain :
all-elements-equal (null-htpy f)
all-elements-equal-null-htpy-is-inhabited-domain-is-set-codomain H K =
eq-htpy-null-htpy H K
( ( eq-center-null-htpy-is-inhabited-domain-is-set-codomain H K) ,
( λ x eq-is-prop (is-set-B (f x) (center-null-htpy K))))

is-prop-null-htpy-is-inhabited-domain-is-set-codomain : is-prop (null-htpy f)
is-prop-null-htpy-is-inhabited-domain-is-set-codomain =
is-prop-all-elements-equal
( all-elements-equal-null-htpy-is-inhabited-domain-is-set-codomain)
```

### Null-homotopic maps from `A` to `B` are in correspondence with elements of `B`

```agda
module _
{l1 l2 : Level} {A : UU l1} {B : UU l2}
where

compute-null-homotopic-map : Σ (A B) (null-htpy) ≃ B
compute-null-homotopic-map =
equivalence-reasoning
Σ (A B) (null-htpy)
≃ Σ B (λ b Σ (A B) (λ f f ~ const A b)) by equiv-left-swap-Σ
≃ B by right-unit-law-Σ-is-contr (λ b is-torsorial-htpy' (const A b))
```

## See also

- [Weakly constant maps](foundation.weakly-constant-maps.md)
52 changes: 24 additions & 28 deletions src/foundation/type-arithmetic-dependent-pair-types.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,25 +189,23 @@ module _
map-associative-Σ ∘ map-inv-associative-Σ ~ id
is-section-map-inv-associative-Σ (x , (y , z)) = refl

abstract
is-equiv-map-associative-Σ : is-equiv map-associative-Σ
is-equiv-map-associative-Σ =
is-equiv-is-invertible
map-inv-associative-Σ
is-section-map-inv-associative-Σ
is-retraction-map-inv-associative-Σ
is-equiv-map-associative-Σ : is-equiv map-associative-Σ
is-equiv-map-associative-Σ =
is-equiv-is-invertible
map-inv-associative-Σ
is-section-map-inv-associative-Σ
is-retraction-map-inv-associative-Σ

associative-Σ : Σ (Σ A B) C ≃ Σ A (λ x Σ (B x) (λ y C (x , y)))
pr1 associative-Σ = map-associative-Σ
pr2 associative-Σ = is-equiv-map-associative-Σ

abstract
is-equiv-map-inv-associative-Σ : is-equiv map-inv-associative-Σ
is-equiv-map-inv-associative-Σ =
is-equiv-is-invertible
map-associative-Σ
is-retraction-map-inv-associative-Σ
is-section-map-inv-associative-Σ
is-equiv-map-inv-associative-Σ : is-equiv map-inv-associative-Σ
is-equiv-map-inv-associative-Σ =
is-equiv-is-invertible
map-associative-Σ
is-retraction-map-inv-associative-Σ
is-section-map-inv-associative-Σ

inv-associative-Σ : Σ A (λ x Σ (B x) (λ y C (x , y))) ≃ Σ (Σ A B) C
pr1 inv-associative-Σ = map-inv-associative-Σ
Expand Down Expand Up @@ -295,13 +293,12 @@ module _
map-inv-interchange-Σ-Σ ∘ map-interchange-Σ-Σ ~ id
is-retraction-map-inv-interchange-Σ-Σ ((a , b) , (c , d)) = refl

abstract
is-equiv-map-interchange-Σ-Σ : is-equiv map-interchange-Σ-Σ
is-equiv-map-interchange-Σ-Σ =
is-equiv-is-invertible
map-inv-interchange-Σ-Σ
is-section-map-inv-interchange-Σ-Σ
is-retraction-map-inv-interchange-Σ-Σ
is-equiv-map-interchange-Σ-Σ : is-equiv map-interchange-Σ-Σ
is-equiv-map-interchange-Σ-Σ =
is-equiv-is-invertible
map-inv-interchange-Σ-Σ
is-section-map-inv-interchange-Σ-Σ
is-retraction-map-inv-interchange-Σ-Σ

interchange-Σ-Σ :
Σ (Σ A B) (λ t Σ (C (pr1 t)) (D (pr1 t) (pr2 t))) ≃
Expand Down Expand Up @@ -351,13 +348,12 @@ module _
is-section-map-inv-left-swap-Σ : map-left-swap-Σ ∘ map-inv-left-swap-Σ ~ id
is-section-map-inv-left-swap-Σ (b , (a , c)) = refl

abstract
is-equiv-map-left-swap-Σ : is-equiv map-left-swap-Σ
is-equiv-map-left-swap-Σ =
is-equiv-is-invertible
map-inv-left-swap-Σ
is-section-map-inv-left-swap-Σ
is-retraction-map-inv-left-swap-Σ
is-equiv-map-left-swap-Σ : is-equiv map-left-swap-Σ
is-equiv-map-left-swap-Σ =
is-equiv-is-invertible
map-inv-left-swap-Σ
is-section-map-inv-left-swap-Σ
is-retraction-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-Σ
Expand Down
10 changes: 5 additions & 5 deletions src/foundation/universal-property-empty-type.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ module _
universal-property-dependent-universal-property-empty :
({l : Level} dependent-universal-property-empty l)
({l : Level} universal-property-empty l)
universal-property-dependent-universal-property-empty dup-empty {l} X =
dup-empty {l} (λ a X)
universal-property-dependent-universal-property-empty dup-empty X =
dup-empty (λ _ X)

is-empty-universal-property-empty :
({l : Level} universal-property-empty l) is-empty A
Expand Down Expand Up @@ -72,13 +72,13 @@ abstract
universal-property-empty' :
{l : Level} (X : UU l) is-contr (empty X)
universal-property-empty' X =
dependent-universal-property-empty' (λ t X)
dependent-universal-property-empty' (λ _ X)

abstract
uniqueness-empty :
{l : Level} (Y : UU l)
({l' : Level} (X : UU l') is-contr (Y X))
is-equiv (ind-empty {P = λ t Y})
is-equiv (ind-empty {P = λ _ Y})
uniqueness-empty Y H =
is-equiv-is-equiv-precomp ind-empty
( λ X
Expand All @@ -89,7 +89,7 @@ abstract

abstract
universal-property-empty-is-equiv-ind-empty :
{l : Level} (X : UU l) is-equiv (ind-empty {P = λ t X})
{l : Level} (X : UU l) is-equiv (ind-empty {P = λ _ X})
((l' : Level) (Y : UU l') is-contr (X Y))
universal-property-empty-is-equiv-ind-empty X is-equiv-ind-empty l' Y =
is-contr-is-equiv
Expand Down

0 comments on commit ab09eb6

Please sign in to comment.