forked from UniMath/agda-unimath
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Coforks, coequalizers of types, their flattening lemma (UniMath#792)
This PR introduces coforks of parallel maps, the dependent and non-dependent universal properties of coequalizers, the construction of coequalizers from pushouts, and the flattening lemma for coequalizers, asserting that sigmas commute with coequalizers. This development mirrors the development of cocones and pushouts. I also changed the statement of the flattening lemma for pushouts to one that sounds more natural to me - we can construct a cocone of sigma types from any cocone, not just a pushout; the previous definition required the vertex to be a pushout in those definitions. Now the statement is "if a cocone is a pushout, then the cocone derived from it is a pushout too".
- Loading branch information
1 parent
eda7bb2
commit da7e412
Showing
10 changed files
with
1,348 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Codiagonal maps of types | ||
|
||
```agda | ||
module foundation.codiagonal-maps-of-types where | ||
``` | ||
|
||
<details><summary>Imports</summary> | ||
|
||
```agda | ||
open import foundation.universe-levels | ||
|
||
open import foundation-core.coproduct-types | ||
``` | ||
|
||
</details> | ||
|
||
## Idea | ||
|
||
The codiagonal map `∇ : A + A → A` of `A` is the map that projects `A + A` onto | ||
`A`. | ||
|
||
## Definitions | ||
|
||
```agda | ||
module _ | ||
{ l1 : Level} (A : UU l1) | ||
where | ||
|
||
codiagonal : A + A → A | ||
codiagonal (inl a) = a | ||
codiagonal (inr a) = a | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# Coequalizers | ||
|
||
```agda | ||
module synthetic-homotopy-theory.coequalizers where | ||
``` | ||
|
||
<details><summary>Imports</summary> | ||
|
||
```agda | ||
open import foundation.codiagonal-maps-of-types | ||
open import foundation.coproduct-types | ||
open import foundation.equivalences | ||
open import foundation.identity-types | ||
open import foundation.transport-along-identifications | ||
open import foundation.universe-levels | ||
|
||
open import synthetic-homotopy-theory.coforks | ||
open import synthetic-homotopy-theory.dependent-cocones-under-spans | ||
open import synthetic-homotopy-theory.dependent-coforks | ||
open import synthetic-homotopy-theory.dependent-universal-property-coequalizers | ||
open import synthetic-homotopy-theory.pushouts | ||
open import synthetic-homotopy-theory.universal-property-coequalizers | ||
``` | ||
|
||
</details> | ||
|
||
## Idea | ||
|
||
The **coequalizer** of a parallel pair `f, g : A → B` is the colimiting | ||
[cofork](synthetic-homotopy-theory.coforks.md), i.e. a cofork with the | ||
[universal property of coequalizers](synthetic-homotopy-theory.universal-property-coequalizers.md). | ||
|
||
## Properties | ||
|
||
### All parallel pairs admit a coequalizer | ||
|
||
The **canonical coequalizer** may be obtained as a | ||
[pushout](synthetic-homotopy-theory.pushouts.md) of the span | ||
|
||
```text | ||
∇ [f,g] | ||
A <----- A + A -----> B | ||
``` | ||
|
||
where the left map is the | ||
[codiagonal map](foundation.codiagonal-maps-of-types.md), sending `inl(a)` and | ||
`inr(a)` to `a`, and the right map is defined by the universal property of | ||
[coproducts](foundation.coproduct-types.md) to send `inl(a)` to `f(a)` and | ||
`inr(a)` to `g(a)`. | ||
|
||
The pushout thus constructed will consist of a copy of `B`, a copy of `A`, and | ||
for every point `a` of `A` there will be a path from `f(a)` to `a` and to | ||
`g(a)`, which corresponds to having a copy of `B` with paths connecting every | ||
`f(a)` to `g(a)`. | ||
|
||
The construction from pushouts itself is an implementation detail, which is why | ||
the definition is marked abstract. | ||
|
||
```agda | ||
module _ | ||
{ l1 l2 : Level} {A : UU l1} {B : UU l2} (f g : A → B) | ||
where | ||
|
||
abstract | ||
canonical-coequalizer : UU (l1 ⊔ l2) | ||
canonical-coequalizer = | ||
pushout (codiagonal A) (ind-coprod (λ _ → B) f g) | ||
|
||
cofork-canonical-coequalizer : cofork f g canonical-coequalizer | ||
cofork-canonical-coequalizer = | ||
cofork-cocone-codiagonal f g | ||
( cocone-pushout (codiagonal A) (ind-coprod (λ _ → B) f g)) | ||
|
||
dup-canonical-coequalizer : | ||
{ l : Level} → | ||
dependent-universal-property-coequalizer l f g | ||
( cofork-canonical-coequalizer) | ||
dup-canonical-coequalizer P = | ||
is-equiv-comp-htpy | ||
( dependent-cofork-map f g cofork-canonical-coequalizer) | ||
( dependent-cofork-dependent-cocone-codiagonal f g | ||
( cofork-canonical-coequalizer) | ||
( P)) | ||
( dependent-cocone-map | ||
( codiagonal A) | ||
( ind-coprod (λ _ → B) f g) | ||
( cocone-codiagonal-cofork f g cofork-canonical-coequalizer) | ||
( P)) | ||
( triangle-dependent-cofork-dependent-cocone-codiagonal f g | ||
( cofork-canonical-coequalizer) | ||
( P)) | ||
( tr | ||
( λ c → | ||
is-equiv | ||
( dependent-cocone-map | ||
( codiagonal A) | ||
( ind-coprod (λ _ → B) f g) | ||
( c) | ||
( P))) | ||
( inv | ||
( is-retraction-map-inv-is-equiv | ||
( is-equiv-cofork-cocone-codiagonal f g) | ||
( cocone-pushout (codiagonal A) (ind-coprod (λ _ → B) f g)))) | ||
( dependent-up-pushout | ||
( codiagonal A) | ||
( ind-coprod (λ _ → B) f g) | ||
( P))) | ||
( is-equiv-dependent-cofork-dependent-cocone-codiagonal f g | ||
( cofork-canonical-coequalizer) | ||
( P)) | ||
|
||
up-canonical-coequalizer : | ||
{ l : Level} → | ||
universal-property-coequalizer l f g cofork-canonical-coequalizer | ||
up-canonical-coequalizer = | ||
universal-property-dependent-universal-property-coequalizer f g | ||
( cofork-canonical-coequalizer) | ||
( dup-canonical-coequalizer) | ||
``` |
Oops, something went wrong.