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

Beyond foundation #751

Merged
merged 28 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4f72ec1
pulling changes from beyond-finite-sets
EgbertRijke Sep 11, 2023
8ea2c66
pulling changes from beyond-finite-sets
EgbertRijke Sep 11, 2023
81d2e65
resolve merge conflicts
EgbertRijke Sep 11, 2023
107e246
removing unnecessary --allow-unsolved-metas
EgbertRijke Sep 11, 2023
0c9b2f5
Merge branch 'master' of github.com:UniMath/agda-unimath into beyond-…
EgbertRijke Sep 11, 2023
122a754
factoring out symmetric cores
EgbertRijke Sep 11, 2023
0f76f56
make pre-commit
EgbertRijke Sep 11, 2023
d4ea2d5
Merge branch 'master' of github.com:UniMath/agda-unimath into beyond-…
EgbertRijke Sep 11, 2023
e5c94ab
delete unfinished file
EgbertRijke Sep 11, 2023
5a06302
make pre-commit
EgbertRijke Sep 11, 2023
71a6052
Merge branch 'master' of github.com:UniMath/agda-unimath into beyond-…
EgbertRijke Sep 11, 2023
5785f94
merge
EgbertRijke Sep 11, 2023
d66978a
make this PR compile
EgbertRijke Sep 11, 2023
29dd81c
refactor
EgbertRijke Sep 11, 2023
00a3df7
Merge branch 'master' of github.com:UniMath/agda-unimath into beyond-…
EgbertRijke Sep 11, 2023
0bd0fee
renaming action-on-equivalences-families-over-subuniverses to action-…
EgbertRijke Sep 11, 2023
aa28e94
factor out stuff that influences the deloopings of the sign homomorphism
EgbertRijke Sep 11, 2023
6e32609
equivalence-induction
EgbertRijke Sep 11, 2023
c2d91d4
more changes
EgbertRijke Sep 11, 2023
20e0e81
move lemma
EgbertRijke Sep 11, 2023
4b4f9ed
Merge branch 'master' of github.com:UniMath/agda-unimath into beyond-…
EgbertRijke Sep 11, 2023
36750ce
Merge branch 'master' of github.com:UniMath/agda-unimath into beyond-…
EgbertRijke Sep 12, 2023
61b7905
Merge branch 'master' of github.com:UniMath/agda-unimath into beyond-…
EgbertRijke Sep 12, 2023
dc9a2e2
remove some unused imports
EgbertRijke Sep 12, 2023
dfdd1af
uniqueness of action on equivalences of functions
EgbertRijke Sep 12, 2023
4689d54
action on equivalences of functions out of subuniverses
EgbertRijke Sep 12, 2023
63c807b
make uniqueness defintions abstract
EgbertRijke Sep 12, 2023
4bf206b
capitalization
EgbertRijke Sep 12, 2023
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
3 changes: 3 additions & 0 deletions src/foundation.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ open import foundation.0-images-of-maps public
open import foundation.0-maps public
open import foundation.1-types public
open import foundation.2-types public
open import foundation.action-on-equivalences-type-families public
open import foundation.action-on-identifications-binary-functions public
open import foundation.action-on-identifications-dependent-functions public
open import foundation.action-on-identifications-functions public
Expand Down Expand Up @@ -249,6 +250,7 @@ open import foundation.subtype-identity-principle public
open import foundation.subtypes public
open import foundation.subuniverses public
open import foundation.surjective-maps public
open import foundation.symmetric-binary-relations public
open import foundation.symmetric-difference public
open import foundation.symmetric-identity-types public
open import foundation.symmetric-operations public
Expand Down Expand Up @@ -293,6 +295,7 @@ open import foundation.universal-property-coproduct-types public
open import foundation.universal-property-dependent-pair-types public
open import foundation.universal-property-empty-type public
open import foundation.universal-property-fiber-products public
open import foundation.universal-property-identity-systems public
open import foundation.universal-property-identity-types public
open import foundation.universal-property-image public
open import foundation.universal-property-maybe public
Expand Down
169 changes: 169 additions & 0 deletions src/foundation/action-on-equivalences-type-families.lagda.md
EgbertRijke marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# Action on equivalences of type families

```agda
module foundation.action-on-equivalences-type-families where
```

<details><summary>Imports</summary>

```agda
open import foundation.action-on-identifications-functions
open import foundation.commuting-squares-of-maps
open import foundation.dependent-pair-types
open import foundation.equivalence-induction
open import foundation.fibers-of-maps
open import foundation.function-extensionality
open import foundation.identity-types
open import foundation.sets
open import foundation.subuniverses
open import foundation.transport
open import foundation.univalence
open import foundation.universe-levels

open import foundation-core.contractible-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
```

</details>

## Ideas

Given a [subuniverse](foundation.subuniverses.md) `P`, any family of types `B`
indexed by types of `P` has an **action on equivalences**

```text
(A ≃ B) → P A ≃ P B
```

obtained by [equivalence induction](foundation.equivalence-induction.md). The
acion on equivalences of a type family `B` on a subuniverse `P` of `𝒰` is such
that `B id-equiv = id-equiv`, and fits in a
[commuting square](foundation.commuting-squares-of-maps.md)
EgbertRijke marked this conversation as resolved.
Show resolved Hide resolved

```text
ap B
(X = Y) --------> (B X = B Y)
| |
equiv-eq | | equiv-eq
V V
(X ≃ Y) ---------> (B X ≃ B Y).
B
```

## Definitions

### The action on equivalences of a family of types over a subuniverse

```agda
module _
{ l1 l2 l3 : Level}
( P : subuniverse l1 l2) (B : type-subuniverse P → UU l3)
where

unique-action-on-equivalences-family-of-types-subuniverse :
EgbertRijke marked this conversation as resolved.
Show resolved Hide resolved
(X : type-subuniverse P) →
is-contr (fiber (ev-id-equiv-subuniverse P X {λ Y e → B X ≃ B Y}) id-equiv)
unique-action-on-equivalences-family-of-types-subuniverse X =
is-contr-map-ev-id-equiv-subuniverse P X (λ Y e → B X ≃ B Y) id-equiv

action-on-equivalences-family-of-types-subuniverse :
(X Y : type-subuniverse P) → pr1 X ≃ pr1 Y → B X ≃ B Y
action-on-equivalences-family-of-types-subuniverse X =
pr1 (center (unique-action-on-equivalences-family-of-types-subuniverse X))

compute-id-equiv-action-on-equivalences-family-of-types-subuniverse :
(X : type-subuniverse P) →
action-on-equivalences-family-of-types-subuniverse X X id-equiv = id-equiv
compute-id-equiv-action-on-equivalences-family-of-types-subuniverse X =
pr2 (center (unique-action-on-equivalences-family-of-types-subuniverse X))
```

### The action on equivalences of a family of types over a universe

```agda
module _
{l1 l2 : Level} (B : UU l1 → UU l2)
where

unique-action-on-equivalences-family-of-types-universe :
{X : UU l1} →
is-contr (fiber (ev-id-equiv (λ Y e → B X ≃ B Y)) id-equiv)
unique-action-on-equivalences-family-of-types-universe =
is-contr-map-ev-id-equiv (λ Y e → B _ ≃ B Y) id-equiv

action-on-equivalences-family-of-types-universe :
{X Y : UU l1} → (X ≃ Y) → B X ≃ B Y
action-on-equivalences-family-of-types-universe {X} {Y} =
pr1 (center (unique-action-on-equivalences-family-of-types-universe {X})) Y

compute-id-equiv-action-on-equivalences-family-of-types-universe :
{X : UU l1} →
action-on-equivalences-family-of-types-universe {X} {X} id-equiv = id-equiv
compute-id-equiv-action-on-equivalences-family-of-types-universe {X} =
pr2 (center (unique-action-on-equivalences-family-of-types-universe {X}))
```

## Properties

### The action on equivalences of a family of types over a subuniverse fits in a commuting square with `equiv-eq`

We claim that the square

```text
ap B
(X = Y) --------> (B X = B Y)
| |
equiv-eq | | equiv-eq
V V
(X ≃ Y) ---------> (B X ≃ B Y).
B
```

commutes for any two types `X Y : type-subuniverse P` and any family of types
`B` over the subuniverse `P`.

```agda
coherence-square-action-on-equivalences-family-of-types-subuniverse :
{l1 l2 l3 : Level} (P : subuniverse l1 l2) (B : type-subuniverse P → UU l3) →
(X Y : type-subuniverse P) →
coherence-square-maps
( ap B {X} {Y})
( equiv-eq-subuniverse P X Y)
( equiv-eq)
( action-on-equivalences-family-of-types-subuniverse P B X Y)
coherence-square-action-on-equivalences-family-of-types-subuniverse
P B X .X refl =
compute-id-equiv-action-on-equivalences-family-of-types-subuniverse P B X
```

### The action on equivalences of a family of types over a universe fits in a commuting square with `equiv-eq`

We claim that the square

```text
ap B
(X = Y) --------> (B X = B Y)
| |
equiv-eq | | equiv-eq
V V
(X ≃ Y) ---------> (B X ≃ B Y).
B
```

commutes for any two types `X Y : 𝒰` and any type family `B` over `𝒰`.

```agda
coherence-square-action-on-equivalences-family-of-types-universe :
{l1 l2 : Level} (B : UU l1 → UU l2) (X Y : UU l1) →
coherence-square-maps
( ap B {X} {Y})
( equiv-eq)
( equiv-eq)
( action-on-equivalences-family-of-types-universe B)
coherence-square-action-on-equivalences-family-of-types-universe B X .X refl =
compute-id-equiv-action-on-equivalences-family-of-types-universe B
```
11 changes: 11 additions & 0 deletions src/foundation/binary-relations.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,17 @@ module _
is-antisymmetric-Relation-Prop = is-antisymmetric (type-Relation-Prop R)
```

### Morphisms of binary relations

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

hom-Relation : Relation l2 A → Relation l3 A → UU (l1 ⊔ l2 ⊔ l3)
hom-Relation R S = (x y : A) → R x y → S x y
```

## Properties

### Characterization of equality of binary relations
Expand Down
17 changes: 14 additions & 3 deletions src/foundation/commuting-triangles-of-maps.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ open import foundation-core.commuting-triangles-of-maps public
```agda
open import foundation.action-on-identifications-functions
open import foundation.functoriality-dependent-function-types
open import foundation.homotopies
open import foundation.identity-types
open import foundation.universe-levels

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

</details>
Expand Down Expand Up @@ -50,13 +52,22 @@ module _

equiv-coherence-triangle-maps-inv-top :
coherence-triangle-maps left right (map-equiv e) ≃
coherence-triangle-maps' right left (map-inv-equiv e)
coherence-triangle-maps right left (map-inv-equiv e)
equiv-coherence-triangle-maps-inv-top =
equiv-Π
( equiv-inv-htpy
( left ∘ (map-inv-equiv e))
( right)) ∘e
( equiv-Π
( λ b → left (map-inv-equiv e b) = right b)
( e)
( λ a →
equiv-concat
( ap left (is-retraction-map-inv-equiv e a))
( right (map-equiv e a)))
( right (map-equiv e a))))

coherence-triangle-maps-inv-top :
coherence-triangle-maps left right (map-equiv e) →
coherence-triangle-maps right left (map-inv-equiv e)
coherence-triangle-maps-inv-top =
map-equiv equiv-coherence-triangle-maps-inv-top
```
11 changes: 11 additions & 0 deletions src/foundation/decidable-propositions.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ pr2 (iff-universes-Decidable-Prop l l' P) p =
is-set-Decidable-Prop : {l : Level} → is-set (Decidable-Prop l)
is-set-Decidable-Prop {l} =
is-set-equiv bool equiv-bool-Decidable-Prop is-set-bool

Decidable-Prop-Set : (l : Level) → Set (lsuc l)
pr1 (Decidable-Prop-Set l) = Decidable-Prop l
pr2 (Decidable-Prop-Set l) = is-set-Decidable-Prop
```

### Extensionality of decidable propositions
Expand Down Expand Up @@ -230,6 +234,13 @@ abstract
is-decidable (type-Prop P) → is-finite (type-Prop P)
is-finite-is-decidable-Prop P x =
is-finite-count (count-is-decidable-Prop P x)

is-finite-type-Decidable-Prop :
{l : Level} (P : Decidable-Prop l) → is-finite (type-Decidable-Prop P)
is-finite-type-Decidable-Prop P =
is-finite-is-decidable-Prop
( prop-Decidable-Prop P)
( is-decidable-Decidable-Prop P)
```

### The type of decidable propositions of any universe level is finite
Expand Down
33 changes: 33 additions & 0 deletions src/foundation/equivalence-extensionality.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module foundation.equivalence-extensionality where
open import foundation.dependent-pair-types
open import foundation.function-extensionality
open import foundation.fundamental-theorem-of-identity-types
open import foundation.identity-systems
open import foundation.subtype-identity-principle
open import foundation.type-theoretic-principle-of-choice
open import foundation.universe-levels
Expand All @@ -24,6 +25,7 @@ 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.sections
```

</details>
Expand Down Expand Up @@ -88,3 +90,34 @@ module _
{e e' : A ≃ B} → (map-equiv e) = (map-equiv e') → htpy-equiv e e'
htpy-eq-map-equiv = htpy-eq
```

### Homotopy induction for homotopies between equivalences

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

abstract
Ind-htpy-equiv :
{l3 : Level} (e : A ≃ B)
(P : (e' : A ≃ B) (H : htpy-equiv e e') → UU l3) →
section
( λ (h : (e' : A ≃ B) (H : htpy-equiv e e') → P e' H) →
h e (refl-htpy-equiv e))
Ind-htpy-equiv e =
is-identity-system-is-torsorial e
( refl-htpy-equiv e)
( is-contr-total-htpy-equiv e)

ind-htpy-equiv :
{l3 : Level} (e : A ≃ B) (P : (e' : A ≃ B) (H : htpy-equiv e e') → UU l3) →
P e (refl-htpy-equiv e) → (e' : A ≃ B) (H : htpy-equiv e e') → P e' H
ind-htpy-equiv e P = pr1 (Ind-htpy-equiv e P)

compute-ind-htpy-equiv :
{l3 : Level} (e : A ≃ B) (P : (e' : A ≃ B) (H : htpy-equiv e e') → UU l3)
(p : P e (refl-htpy-equiv e)) →
ind-htpy-equiv e P p e (refl-htpy-equiv e) = p
compute-ind-htpy-equiv e P = pr2 (Ind-htpy-equiv e P)
```
Loading