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

Basic properties of the flat modality #1078

Merged
merged 89 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from 85 commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
dd745c3
wip
fredrik-bakke Jan 17, 2024
9b2e6c3
wip flat discrete crisp types
fredrik-bakke Jan 17, 2024
8f2f125
fix words
fredrik-bakke Jan 17, 2024
e0ff496
wip flat modality
fredrik-bakke Jan 18, 2024
adec8a7
Types `♭ A` are flat discrete
fredrik-bakke Jan 18, 2024
afaf613
crisp case analysis
fredrik-bakke Jan 18, 2024
ce128fe
misc edits
fredrik-bakke Jan 20, 2024
d2cb662
wip sharp codiscrete types
fredrik-bakke Jan 20, 2024
cdf714d
wip crisp identity types
fredrik-bakke Jan 20, 2024
eb900f4
add document to explain crisp types
fredrik-bakke Jan 20, 2024
622eeb8
WIP The identity types of `♭ A` are flat discrete
fredrik-bakke Jan 20, 2024
694daa1
Rewriting and WIP sharp modality
fredrik-bakke Jan 20, 2024
4b08e0c
post pre-commit
fredrik-bakke Jan 20, 2024
00429c5
Merge branch 'master' into nitpick-mtt
fredrik-bakke Mar 9, 2024
8aeac86
factor out `foundation-core.postcomposition-dependent-functions` (aga…
fredrik-bakke Mar 9, 2024
0b3bdb4
`prod` -> `product`
fredrik-bakke Mar 9, 2024
d576f45
wip
fredrik-bakke Mar 9, 2024
07386d8
wip
fredrik-bakke Mar 10, 2024
1fff63d
wip
fredrik-bakke Mar 10, 2024
2004377
factor `is-injective-retraction`
fredrik-bakke Mar 10, 2024
eb3f6d0
unabstract `is-injective-retraction`
fredrik-bakke Mar 10, 2024
48ec293
refactor duplicate `is-injective-retraction`
fredrik-bakke Mar 10, 2024
72c2c76
refactor duplicate `is-injective-retraction`
fredrik-bakke Mar 10, 2024
cb81f69
corollary 6.3
fredrik-bakke Mar 10, 2024
ea83a88
flat action on homotopies
fredrik-bakke Mar 10, 2024
34152bf
small changes foundation
fredrik-bakke Mar 10, 2024
3ede963
transport along crisp identifications
fredrik-bakke Mar 10, 2024
421d67c
crisp sections of the flat counit, and flat discreteness of identity …
fredrik-bakke Mar 10, 2024
e3c5cc2
clean up crisp cartesian product types
fredrik-bakke Mar 10, 2024
772a03f
`coprod` -> `coproduct`
fredrik-bakke Mar 10, 2024
2fab3e9
crisp types agda module
fredrik-bakke Mar 10, 2024
ce10861
pre-commit
fredrik-bakke Mar 10, 2024
5b9083c
fix some typos
fredrik-bakke Mar 10, 2024
09233cd
`is-crisp-section-crisp-ap-cons-flat`
fredrik-bakke Mar 10, 2024
06aeba1
Flat discrete crisp types are closed under crisp equivalences
fredrik-bakke Mar 10, 2024
72e74f7
crisp injective maps
fredrik-bakke Mar 10, 2024
4f4b532
crisp pullbacks
fredrik-bakke Mar 10, 2024
e5a20ec
Merge branch 'master' into nitpick-mtt
fredrik-bakke Mar 10, 2024
f717844
The action on identifications of crisp functions
fredrik-bakke Mar 10, 2024
4d4370a
wip
fredrik-bakke Mar 14, 2024
d217592
Add NodeJS to the devshell (#1064)
VojtechStep Mar 11, 2024
afe7813
Refactor category theory to use strictly involutive identity types (#…
fredrik-bakke Mar 11, 2024
5a2bf0d
Bibliographies (#1058)
fredrik-bakke Mar 11, 2024
b5eca8e
Fail the website build on malformed concept macro invocations (#1066)
VojtechStep Mar 12, 2024
ebfe470
Add link to benchmarks in GitHub readme (#1063)
fredrik-bakke Mar 12, 2024
e32e305
Refactoring pointed types (#1056)
EgbertRijke Mar 13, 2024
cd8adbe
Escape Agda definitions when translating them to regex (#1074)
VojtechStep Mar 14, 2024
1b5266a
Move torsoriality of the identity type to `foundation-core.torsorial-…
EgbertRijke Mar 14, 2024
a6aeb45
wip
fredrik-bakke Jan 17, 2024
5dbede0
wip flat modality
fredrik-bakke Jan 18, 2024
665a92a
add document to explain crisp types
fredrik-bakke Jan 20, 2024
d4569d6
Rewriting and WIP sharp modality
fredrik-bakke Jan 20, 2024
4bc25c3
Merge remote-tracking branch 'origin/nitpick-mtt' into flat-modality
fredrik-bakke Mar 14, 2024
e98be51
biblio
fredrik-bakke Mar 14, 2024
7db8fc5
fixes
fredrik-bakke Mar 15, 2024
c4f1d7a
tidying work
fredrik-bakke Mar 17, 2024
529457a
more tidying work
fredrik-bakke Mar 17, 2024
79d101f
even more tidying work
fredrik-bakke Mar 17, 2024
df93b7e
Postcomposition by the counit induces an equivalence under the flat m…
fredrik-bakke Mar 17, 2024
3448387
add links to crisp types
fredrik-bakke Mar 17, 2024
57ba81e
rename `cons-flat` to `intro-flat`
fredrik-bakke Mar 17, 2024
9f7a0d9
`ap-...-flat` -> `action-flat-...`
fredrik-bakke Mar 17, 2024
2511212
make it type check
fredrik-bakke Mar 17, 2024
cd6dc6b
remove rewriting for now
fredrik-bakke Mar 17, 2024
cb00725
links up flat discrete crisp types
fredrik-bakke Mar 17, 2024
cb32768
`ap-map-sharp` -> `action-sharp-map`
fredrik-bakke Mar 17, 2024
d7c7fc8
remove unused imports
fredrik-bakke Mar 17, 2024
30e3fa5
pre-commit
fredrik-bakke Mar 17, 2024
6f2f895
fix concept macro
fredrik-bakke Mar 17, 2024
b7f1c1e
naming
fredrik-bakke Mar 17, 2024
c2818fb
more wrap-up
fredrik-bakke Mar 17, 2024
40fb3e1
more nitpick
fredrik-bakke Mar 17, 2024
bb1d2b7
Merge branch 'master' into flat-modality
fredrik-bakke Mar 19, 2024
f355c3d
cleanup of the sharp modality
fredrik-bakke Mar 19, 2024
829bfcd
self-review
fredrik-bakke Mar 19, 2024
d49c690
remove concept Agda target
fredrik-bakke Mar 19, 2024
c075828
postcomposition families of maps
fredrik-bakke Mar 20, 2024
54a6a12
Change prose `postcomposoition-families-of-maps`
fredrik-bakke Mar 20, 2024
8eb13ff
Update src/foundation/equivalences.lagda.md
fredrik-bakke Mar 20, 2024
750680e
revert `postcomposition-families-of-maps`
fredrik-bakke Mar 20, 2024
850ed30
slightly clearer postcomposition of dependent functions`
fredrik-bakke Mar 20, 2024
52a3468
explain crisp types
fredrik-bakke Mar 20, 2024
4e2c9a6
Add explanation crisp functions and make use of "crisply" accurate
fredrik-bakke Mar 20, 2024
7dee030
fix links
fredrik-bakke Mar 20, 2024
6467004
Merge branch 'master' into flat-modality
fredrik-bakke Mar 20, 2024
39693b7
Merge branch 'master' into flat-modality
fredrik-bakke Jun 3, 2024
fbc166c
remove unused reference
fredrik-bakke Sep 6, 2024
3c5985b
remove a newline
fredrik-bakke Sep 6, 2024
e6f3f38
Merge branch 'master' into flat-modality
fredrik-bakke Sep 6, 2024
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
20 changes: 19 additions & 1 deletion references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ @online{BCDE21
url = {https://www.cs.bham.ac.uk/~mhe/TypeTopology/Groups.Free.html}
}


@online{BCFR23,
title = {Central {{H-spaces}} and Banded Types},
author = {Buchholtz, Ulrik and Christensen, J. Daniel and Flaten, Jarl G. Taxerås and Rijke, Egbert},
Expand All @@ -38,6 +37,7 @@ @online{BCFR23
keywords = {Computer Science - Logic in Computer Science,Mathematics - Algebraic Topology,Mathematics - Logic}
}


@online{BDR18,
title = {Higher {{Groups}} in {{Homotopy Type Theory}}},
author = {Buchholtz, Ulrik and {{van}} Doorn, Floris and Rijke, Egbert},
Expand Down Expand Up @@ -139,6 +139,13 @@ @article{CR21
keywords = {algebraic geometry,cohesive homotopy type theory,factorization systems,Homotopy type theory,modal homotopy type theory}
}

@online{DavidJaz/Cohesion,
title = {DavidJaz/Cohesion},
author = {David Jaz Meyers},
url = {https://github.com/DavidJaz/Cohesion},
howpublished = {{{GitHub}} repository}
}

@online{Dlicata335/Cohesion-Agda,
title = {Dlicata335/Cohesion-Agda},
author = {Licata, Dan},
Expand All @@ -148,6 +155,7 @@ @online{Dlicata335/Cohesion-Agda
howpublished = {{{GitHub}} repository}
}


@article{EKMS93,
title = {A {{Primer}} on {{Galois Connections}}},
author = {Erné, M. and Koslowski, J. and Melton, A. and Strecker, G. E.},
Expand Down Expand Up @@ -338,6 +346,16 @@ @book{MRR88
isbn = {978-0-387-96640-3 978-1-4419-8640-5}
}

@misc{Mye21,
fredrik-bakke marked this conversation as resolved.
Show resolved Hide resolved
title = {Modal Fracture of Higher Groups},
author = {David Jaz Myers},
year = {2021},
eprint = {2106.15390},
archiveprefix = {arXiv},
eprintclass = {math},
primaryclass = {math.CT}
}

@online{OEIS,
title = {The {{On-Line Encyclopedia}} of {{Integer Sequences}} ({{OEIS}})},
organization = {{{OEIS}} Foundation Inc.},
Expand Down
19 changes: 16 additions & 3 deletions src/modal-type-theory.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,27 @@
```agda
module modal-type-theory where

open import modal-type-theory.action-on-homotopies-flat-modality public
open import modal-type-theory.action-on-identifications-crisp-functions public
open import modal-type-theory.action-on-identifications-flat-modality public
open import modal-type-theory.crisp-cartesian-product-types public
open import modal-type-theory.crisp-coproduct-types public
open import modal-type-theory.crisp-dependent-function-types public
open import modal-type-theory.crisp-dependent-pair-types public
open import modal-type-theory.crisp-function-types public
open import modal-type-theory.crisp-identity-types public
open import modal-type-theory.crisp-law-of-excluded-middle public
open import modal-type-theory.flat-dependent-function-types public
open import modal-type-theory.flat-dependent-pair-types public
open import modal-type-theory.flat-discrete-types public
open import modal-type-theory.crisp-pullbacks public
open import modal-type-theory.crisp-types public
open import modal-type-theory.dependent-universal-property-flat-discrete-crisp-types public
open import modal-type-theory.flat-discrete-crisp-types public
open import modal-type-theory.flat-modality public
open import modal-type-theory.flat-sharp-adjunction public
open import modal-type-theory.functoriality-flat-modality public
open import modal-type-theory.functoriality-sharp-modality public
open import modal-type-theory.sharp-codiscrete-maps public
open import modal-type-theory.sharp-codiscrete-types public
open import modal-type-theory.sharp-modality public
open import modal-type-theory.transport-along-crisp-identifications public
open import modal-type-theory.universal-property-flat-discrete-crisp-types public
```
70 changes: 70 additions & 0 deletions src/modal-type-theory/action-on-homotopies-flat-modality.lagda.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# The action on homotopies of the flat modality

```agda
{-# OPTIONS --cohesion --flat-split #-}

module modal-type-theory.action-on-homotopies-flat-modality where
```

<details><summary>Imports</summary>

```agda
open import foundation.homotopies
open import foundation.identity-types
open import foundation.universe-levels

open import modal-type-theory.action-on-identifications-flat-modality
open import modal-type-theory.flat-modality
open import modal-type-theory.functoriality-flat-modality
```

</details>

## Idea

Given a crisp [homotopy](foundation-core.homotopies.md) of maps `f ~ g`, then
there is a homotopy `♭ f ~ ♭ g` where `♭ f` is the
[functorial action of the flat modality on maps](modal-type-theory.functoriality-flat-modality.md).

## Definitions

### The flat modality's action on crisp homotopies

```agda
module _
{@♭ l1 l2 : Level} {@♭ A : UU l1} {@♭ B : @♭ A → UU l2}
{@♭ f g : (@♭ x : A) → B x}
where

action-flat-crisp-htpy :
@♭ ((@♭ x : A) → f x = g x) →
action-flat-crisp-dependent-map f ~ action-flat-crisp-dependent-map g
action-flat-crisp-htpy H (intro-flat x) = ap-flat (H x)
```

### The flat modality's action on homotopies

```agda
module _
{@♭ l1 l2 : Level} {@♭ A : UU l1} {@♭ B : A → UU l2}
{@♭ f g : (x : A) → B x}
where

action-flat-htpy :
@♭ f ~ g → action-flat-dependent-map f ~ action-flat-dependent-map g
action-flat-htpy H = action-flat-crisp-htpy (λ x → H x)
```

## Properties

### Computing the flat action on the reflexivity homotopy

```agda
module _
{@♭ l1 l2 : Level} {@♭ A : UU l1} {@♭ B : A → UU l2} {@♭ f : (@♭ x : A) → B x}
where

compute-action-flat-refl-htpy :
action-flat-crisp-htpy (λ x → (refl {x = f x})) ~ refl-htpy
compute-action-flat-refl-htpy (intro-flat x) = refl
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# The action on identifications of crisp functions

```agda
{-# OPTIONS --cohesion --flat-split #-}

module modal-type-theory.action-on-identifications-crisp-functions where
```

<details><summary>Imports</summary>

```agda
open import foundation.universe-levels

open import foundation-core.identity-types

open import modal-type-theory.crisp-identity-types
```

</details>

## Idea

A function defined on [crisp elements](modal-type-theory.crisp-types.md)
`f : @♭ A → B` preserves crisp
[identifications](foundation-core.identity-types.md), in the sense that it maps
a crisp identification `p : x = y` in `A` to an identification
`crisp-ap f p : f x = f y` in `B`. This action on identifications can be
understood as crisp functoriality of crisp identity types.

This is a strengthening of the
[action on identifications of functions](foundation.action-on-identifications-functions.md)
for crisp identifications, because the function `f : A → B` is allowed to be
defined over only crisp elements of its domain.

## Definition

### The functorial action of functions on crisp identity types

```agda
crisp-ap :
{@♭ l1 : Level} {l2 : Level} {@♭ A : UU l1} {B : UU l2} (f : @♭ A → B)
{@♭ x y : A} → @♭ (x = y) → f x = f y
crisp-ap f refl = refl
```

## Properties

### The identity function acts trivially on identifications

```agda
crisp-ap-id :
{@♭ l : Level} {@♭ A : UU l} {@♭ x y : A} (@♭ p : x = y) →
crisp-ap (λ x → x) p = p
crisp-ap-id p = crisp-based-ind-Id (λ y p → crisp-ap (λ x → x) p = p) refl p
```

### The action on identifications of a composite function is the composite of the actions

```agda
crisp-ap-comp :
{@♭ l1 l2 l3 : Level} {@♭ A : UU l1} {@♭ B : UU l2} {@♭ C : UU l3}
(@♭ g : @♭ B → C) (@♭ f : @♭ A → B) {@♭ x y : A} (@♭ p : x = y) →
crisp-ap (λ x → g (f x)) p = crisp-ap g (crisp-ap f p)
crisp-ap-comp g f {x} =
crisp-based-ind-Id
( λ y p → crisp-ap (λ x → g (f x)) p = crisp-ap g (crisp-ap f p))
( refl)

crisp-ap-comp-assoc :
{@♭ l1 l2 l3 l4 : Level}
{@♭ A : UU l1} {@♭ B : UU l2} {@♭ C : UU l3} {@♭ D : UU l4}
(@♭ h : @♭ C → D) (@♭ g : B → C) (@♭ f : @♭ A → B)
{@♭ x y : A} (@♭ p : x = y) →
crisp-ap (λ z → h (g z)) (crisp-ap f p) =
crisp-ap h (crisp-ap (λ z → g (f z)) p)
crisp-ap-comp-assoc h g f =
crisp-based-ind-Id
( λ y p →
crisp-ap (λ z → h (g z)) (crisp-ap f p) =
crisp-ap h (crisp-ap (λ z → g (f z)) p))
( refl)
```

### The action on identifications of any map preserves `refl`

```agda
crisp-ap-refl :
{@♭ l1 : Level} {l2 : Level} {@♭ A : UU l1} {B : UU l2}
(f : @♭ A → B) (@♭ x : A) →
crisp-ap f (refl {x = x}) = refl
crisp-ap-refl f x = refl
```

### The action on identifications of any map preserves concatenation of identifications

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

crisp-ap-concat :
{@♭ x y z : A} (@♭ p : x = y) (@♭ q : y = z) →
crisp-ap f (p ∙ q) = crisp-ap f p ∙ crisp-ap f q
crisp-ap-concat p =
crisp-based-ind-Id
( λ z q → crisp-ap f (p ∙ q) = crisp-ap f p ∙ crisp-ap f q)
(crisp-ap (crisp-ap f) right-unit ∙ inv right-unit)

crisp-compute-right-refl-ap-concat :
{@♭ x y : A} (@♭ p : x = y) →
crisp-ap-concat p refl = crisp-ap (crisp-ap f) right-unit ∙ inv right-unit
crisp-compute-right-refl-ap-concat p =
compute-crisp-based-ind-Id
( λ z q → crisp-ap f (p ∙ q) = crisp-ap f p ∙ crisp-ap f q)
(crisp-ap (crisp-ap f) right-unit ∙ inv right-unit)
```

### The action on identifications of any map preserves inverses

```agda
crisp-ap-inv :
{@♭ l1 l2 : Level} {@♭ A : UU l1} {@♭ B : UU l2}
(@♭ f : @♭ A → B) {@♭ x y : A} (@♭ p : x = y) →
crisp-ap f (inv p) = inv (crisp-ap f p)
crisp-ap-inv f =
crisp-based-ind-Id
( λ y p → crisp-ap f (inv p) = inv (crisp-ap f p))
( refl)
```

### The action on identifications of a constant map is constant

```agda
crisp-ap-const :
{@♭ l1 l2 : Level} {@♭ A : UU l1} {@♭ B : UU l2} (@♭ b : B) {@♭ x y : A}
(@♭ p : x = y) → crisp-ap (λ _ → b) p = refl
crisp-ap-const b =
crisp-based-ind-Id (λ y p → crisp-ap (λ _ → b) p = refl) (refl)
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# The action on identifications of the flat modality

```agda
{-# OPTIONS --cohesion --flat-split #-}

module modal-type-theory.action-on-identifications-flat-modality where
```

<details><summary>Imports</summary>

```agda
open import foundation.action-on-identifications-functions
open import foundation.identity-types
open import foundation.universe-levels

open import modal-type-theory.action-on-identifications-crisp-functions
open import modal-type-theory.crisp-identity-types
open import modal-type-theory.flat-modality
```

</details>

## Idea

Given a crisp [identification](foundation-core.identity-types.md) `x = y` in
`A`, then there is an identification `intro-flat x = intro-flat y` in `♭ A`.

## Definitions

### The action on identifications of the flat modality

```agda
module _
{@♭ l1 : Level} {@♭ A : UU l1} {@♭ x y : A}
where

ap-flat : @♭ x = y → intro-flat x = intro-flat y
ap-flat = crisp-ap intro-flat
```

## Properties

### Computing the flat modality's action on reflexivity

```agda
module _
{@♭ l : Level} {@♭ A : UU l} {@♭ x : A}
where

compute-refl-ap-flat : ap-flat (refl {x = x}) = refl
compute-refl-ap-flat = refl
```

### The action on identifications of the flat modality is a crisp section of the action on identifications of its counit

```agda
module _
{@♭ l : Level} {@♭ A : UU l}
where

is-crisp-section-ap-flat :
{@♭ x y : A} (@♭ p : x = y) → ap (counit-flat) (ap-flat p) = p
is-crisp-section-ap-flat =
crisp-based-ind-Id
( λ y p → ap (counit-flat) (ap-flat p) = p)
( refl)
```

### The action on identifications of the flat modality from {{#cite Shu18}}

**Note.** While we record the constructions from Corollary 6.3 {{#cite Shu18}}
here, the construction of `ap-flat` is preferred elsewhere.

```agda
module _
{@♭ l : Level} {@♭ A : UU l}
where

ap-flat' :
{@♭ x y : A} → @♭ (x = y) → intro-flat x = intro-flat y
ap-flat' {x} {y} p =
eq-Eq-flat (intro-flat x) (intro-flat y) (intro-flat p)

compute-refl-ap-flat' :
{@♭ x : A} → ap-flat' (refl {x = x}) = refl
compute-refl-ap-flat' = refl

is-crisp-section-ap-flat' :
{@♭ x y : A} (@♭ p : x = y) → ap (counit-flat) (ap-flat' p) = p
is-crisp-section-ap-flat' =
crisp-based-ind-Id
( λ y p → ap (counit-flat) (ap-flat' p) = p)
( refl)

compute-ap-flat' :
{@♭ x y : A} (@♭ p : x = y) → ap-flat p = ap-flat' p
compute-ap-flat' =
crisp-based-ind-Id (λ y p → ap-flat p = ap-flat' p) refl
```
Loading
Loading