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

Hofmann-Streicher universes for graphs and globular types #1196

Open
wants to merge 95 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 85 commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
645fdb9
work on universal objects
Sep 24, 2024
c2abb43
Merge branch 'master' of github.com:UniMath/agda-unimath into globular
Sep 24, 2024
3e17ca8
adding infrastructure for globular types
EgbertRijke Sep 28, 2024
9bac61a
work
EgbertRijke Oct 9, 2024
4f6cead
Merge branch 'master' of github.com:UniMath/agda-unimath into globular
EgbertRijke Oct 9, 2024
72731cb
computation of the universal globular type, and correspondence of dep…
EgbertRijke Oct 11, 2024
bb31cac
reflexive globular maps
EgbertRijke Oct 13, 2024
f56cc6a
sections and pi
EgbertRijke Oct 13, 2024
70213c1
typo
EgbertRijke Oct 13, 2024
5e0fac9
Merge branch 'master' of github.com:UniMath/agda-unimath into globular
EgbertRijke Oct 13, 2024
90651f3
make pre-commit
EgbertRijke Oct 13, 2024
0285824
working towards duality of directed graphs
EgbertRijke Oct 14, 2024
d421336
duality for directed graphs
EgbertRijke Oct 15, 2024
c98f6e2
fibers and sections
EgbertRijke Oct 15, 2024
cbc1744
wild category of pointed types
EgbertRijke Oct 15, 2024
8c3e39f
mention the categorical laws, which were duplicated
EgbertRijke Oct 15, 2024
9c4ac74
small edits
EgbertRijke Oct 15, 2024
7629b7d
work
EgbertRijke Oct 17, 2024
45f2d8b
refactor reflexive and transitive globular types
EgbertRijke Oct 17, 2024
f445848
lots of work
EgbertRijke Oct 18, 2024
b9ea44a
maps
EgbertRijke Oct 18, 2024
cab0051
colax functors of noncoherent wild higher precategories
EgbertRijke Oct 18, 2024
fe3a463
Merge branch 'master' of github.com:UniMath/agda-unimath into globular
EgbertRijke Oct 18, 2024
b4a6ea7
Merge branch 'master' of github.com:UniMath/agda-unimath into globular
EgbertRijke Oct 18, 2024
b16dbd3
work
EgbertRijke Oct 18, 2024
c9f1f92
large (co)lax reflexive globular maps
EgbertRijke Oct 18, 2024
3e20e46
variations of transitive globular maps
EgbertRijke Oct 18, 2024
d958890
refacotr colax functors of noncoherent large wild precategories
EgbertRijke Oct 21, 2024
f2bec34
make pre-commit
EgbertRijke Oct 21, 2024
d019b03
fix concept macros
EgbertRijke Oct 21, 2024
66679f5
make pre-commit
EgbertRijke Oct 21, 2024
f340e81
reflexive graphs
EgbertRijke Oct 21, 2024
5236141
reflexive graphs
EgbertRijke Oct 21, 2024
7d88972
Merge branch 'master' of github.com:UniMath/agda-unimath into globular
EgbertRijke Oct 21, 2024
0773c07
make pre-commit
EgbertRijke Oct 21, 2024
04893a9
fix bugs
EgbertRijke Oct 21, 2024
f38ef28
work on broken links
EgbertRijke Oct 21, 2024
1cea2fb
make pre-commit
EgbertRijke Oct 21, 2024
fa04874
work on reflexive graphs
EgbertRijke Oct 22, 2024
cd31b20
bugs
EgbertRijke Oct 22, 2024
c12c18d
work
EgbertRijke Oct 23, 2024
a889dcd
Merge branch 'master' of github.com:UniMath/agda-unimath into globular
EgbertRijke Oct 23, 2024
6221b38
fibers of morphisms of reflexive graphs
EgbertRijke Oct 23, 2024
e5ad3f5
make pre-commit
EgbertRijke Oct 23, 2024
c8b9596
typo
EgbertRijke Oct 23, 2024
7851d96
Merge branch 'master' of github.com:UniMath/agda-unimath into globular
EgbertRijke Oct 24, 2024
3aabeb8
dependent products of reflexive graphs
EgbertRijke Oct 24, 2024
b39c097
minor edit
EgbertRijke Oct 24, 2024
077e3a9
Merge branch 'master' of github.com:UniMath/agda-unimath into globular
EgbertRijke Oct 25, 2024
d1e5448
review comments
EgbertRijke Oct 25, 2024
7d1a041
base change of universal dependent directed graph
EgbertRijke Oct 25, 2024
deaccdc
upstream master
EgbertRijke Nov 5, 2024
9336e8e
Merge branch 'master' of github.com:UniMath/agda-unimath into globular
EgbertRijke Nov 5, 2024
ec6eec8
some review comments
EgbertRijke Nov 5, 2024
9b9511e
-> laxly
EgbertRijke Nov 5, 2024
a0bda74
review comment
EgbertRijke Nov 5, 2024
3f48134
typo
EgbertRijke Nov 5, 2024
f070148
-> lax
EgbertRijke Nov 5, 2024
d72ea0b
concept
EgbertRijke Nov 5, 2024
a3a945c
pointwise extensions of families of globular types
EgbertRijke Nov 12, 2024
221e5d8
file for extensive globular types
EgbertRijke Nov 12, 2024
392b591
superglobular types
EgbertRijke Nov 14, 2024
d3789b6
superglobular types
EgbertRijke Nov 14, 2024
4626f95
uniform
EgbertRijke Nov 14, 2024
668bd20
structure
EgbertRijke Nov 14, 2024
45a4ea8
removing the itemization formatting in record
EgbertRijke Nov 14, 2024
d5a255b
unbolden text with added colon
EgbertRijke Nov 14, 2024
774d2ae
correcting an incorrect definition of discrete relations
EgbertRijke Nov 14, 2024
bf7aab7
Update src/foundation/discrete-relations.lagda.md
EgbertRijke Nov 14, 2024
79b6cf2
fix broken Agda reference
EgbertRijke Nov 14, 2024
0b304f7
Merge branch 'discrete-graphs' of github.com:EgbertRijke/agda-unimath…
EgbertRijke Nov 14, 2024
bc2b2be
factor out discrete globular types
EgbertRijke Nov 15, 2024
7d0819d
implementing discreteness via adjointness
EgbertRijke Nov 15, 2024
fdd6436
bugs
EgbertRijke Nov 15, 2024
cef5ecd
bugs
EgbertRijke Nov 15, 2024
3189352
adjointness for discrete directed graphs
EgbertRijke Nov 15, 2024
f123e98
Merge branch 'master' of github.com:UniMath/agda-unimath into globular
EgbertRijke Nov 15, 2024
444251a
edit discrete reflexive globular types
EgbertRijke Nov 15, 2024
8a74a9a
discrete globular types
EgbertRijke Nov 15, 2024
84b899d
ᵣ to refl
EgbertRijke Nov 15, 2024
5362869
partially revert long copattern matchings
EgbertRijke Nov 15, 2024
58b750e
make pre-commit
EgbertRijke Nov 15, 2024
4bb915b
discrete dependent reflexive graphs
EgbertRijke Nov 15, 2024
01fb7d6
make pre-commit
EgbertRijke Nov 15, 2024
092b19a
discrete dependent reflexive globular types
EgbertRijke Nov 15, 2024
c36005f
adjust text for discrete binary relations
EgbertRijke Nov 16, 2024
9cb7cf0
make pre-commit
EgbertRijke Nov 16, 2024
aae6781
Merge branch 'discrete-graphs' into globular
EgbertRijke Nov 16, 2024
ea117bb
moving files to globular types namespace
EgbertRijke Nov 17, 2024
44edc1e
fix imports
EgbertRijke Nov 17, 2024
bc5b08a
resolve merge conflicts
EgbertRijke Nov 17, 2024
ef70c90
make pre-commit
EgbertRijke Nov 17, 2024
3013c3f
resolve merge conflicts
EgbertRijke Nov 20, 2024
735ea9c
bug
EgbertRijke Nov 20, 2024
18b0121
make pre-commit
EgbertRijke Nov 20, 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
11 changes: 11 additions & 0 deletions references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ @article{AL19
langid = {english}
}

@misc{Awodey22,
author = {{Awodey}, Steve},
title = "{On Hofmann-Streicher universes}",
keywords = {Mathematics - Category Theory, Mathematics - Logic},
year = 2022,
month = may,
archivePrefix = {arXiv},
eprint = {2205.10917},
primaryClass = {math.CT}
}

@online{BCDE21,
title = {Free groups in HoTT/UF in Agda},
author = {Bezem, Marc and Coquand, Thierry and Dybjer, Peter and Escardó, Martín},
Expand Down
14 changes: 14 additions & 0 deletions src/foundation-core/equality-dependent-pair-types.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,20 @@ tr-eq-pair-Σ :
tr-eq-pair-Σ C refl refl u = refl
```

### The action of `pr1` on identifcations of the form `eq-pair-Σ`

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

ap-pr1-eq-pair-Σ :
{x x' : A} {y : B x} {y' : B x'}
(p : x = x') (q : dependent-identification B p y y') →
ap pr1 (eq-pair-Σ p q) = p
ap-pr1-eq-pair-Σ refl refl = refl
```

## See also

- Equality proofs in cartesian product types are characterized in
Expand Down
4 changes: 2 additions & 2 deletions src/foundation-core/torsorial-type-families.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,5 @@ module _

### See also

- [Discrete relations](foundation.discrete-relations.md) are binary torsorial
type families.
- [Discrete reflexive relations](foundation.discrete-reflexive-relations.md) are
binary torsorial type families.
7 changes: 6 additions & 1 deletion src/foundation.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ open import foundation.action-on-equivalences-type-families public
open import foundation.action-on-equivalences-type-families-over-subuniverses public
open import foundation.action-on-higher-identifications-functions public
open import foundation.action-on-homotopies-functions public
open import foundation.action-on-identifications-binary-dependent-functions 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 All @@ -31,6 +32,7 @@ open import foundation.axiom-of-choice public
open import foundation.bands public
open import foundation.base-changes-span-diagrams public
open import foundation.bicomposition-functions public
open import foundation.binary-dependent-identifications public
open import foundation.binary-embeddings public
open import foundation.binary-equivalences public
open import foundation.binary-equivalences-unordered-pairs-of-types public
Expand Down Expand Up @@ -130,7 +132,8 @@ open import foundation.diagonal-maps-of-types public
open import foundation.diagonal-span-diagrams public
open import foundation.diagonals-of-maps public
open import foundation.diagonals-of-morphisms-arrows public
open import foundation.discrete-relations public
open import foundation.discrete-binary-relations public
open import foundation.discrete-reflexive-relations public
open import foundation.discrete-relaxed-sigma-decompositions public
open import foundation.discrete-sigma-decompositions public
open import foundation.discrete-types public
Expand Down Expand Up @@ -207,6 +210,8 @@ open import foundation.functoriality-truncation public
open import foundation.fundamental-theorem-of-identity-types public
open import foundation.global-choice public
open import foundation.global-subuniverses public
open import foundation.globular-type-of-dependent-functions public
open import foundation.globular-type-of-functions public
open import foundation.higher-homotopies-morphisms-arrows public
open import foundation.hilberts-epsilon-operators public
open import foundation.homotopies public
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# The binary action on identifications of binary dependent functions

```agda
module foundation.action-on-identifications-binary-dependent-functions where
```

<details><summary>Imports</summary>

```agda
open import foundation.action-on-identifications-dependent-functions
open import foundation.binary-dependent-identifications
open import foundation.universe-levels

open import foundation-core.identity-types
```

</details>

## Idea

Given a binary dependent function `f : (x : A) (y : B) → C x y` and
[identifications](foundation-core.identity-types.md) `p : x = x'` in `A` and
`q : y = y'` in `B`, we obtain a
[binary dependent identification](foundation.binary-dependent-identifications.md)

```text
apd-binary f p q : binary-dependent-identification p q (f x y) (f x' y')
```

we call this the
{{#concept "binary action on identifications of dependent binary functions" Agda=apd-binary}}.

## Definitions

### The binary action on identifications of binary dependent functions

```agda
module _
{l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : A → B → UU l3}
(f : (x : A) (y : B) → C x y)
where

apd-binary :
{x x' : A} (p : x = x') {y y' : B} (q : y = y') →
binary-dependent-identification C p q (f x y) (f x' y')
apd-binary refl refl = refl
```

## See also

- [Action of functions on identifications](foundation.action-on-identifications-functions.md)
- [Action of functions on higher identifications](foundation.action-on-higher-identifications-functions.md).
- [Action of dependent functions on identifications](foundation.action-on-identifications-dependent-functions.md).
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ module _

## See also

- [Action of binary dependent functions on identifications](foundation.action-on-identifications-binary-dependent-functions.md)
- [Action of functions on identifications](foundation.action-on-identifications-functions.md)
- [Action of functions on higher identifications](foundation.action-on-higher-identifications-functions.md).
- [Action of dependent functions on identifications](foundation.action-on-identifications-dependent-functions.md).
43 changes: 43 additions & 0 deletions src/foundation/binary-dependent-identifications.lagda.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Binary dependent identifications

```agda
module foundation.binary-dependent-identifications where
```

<details><summary>Imports</summary>

```agda
open import foundation.binary-transport
open import foundation.identity-types
open import foundation.universe-levels
```

</details>

## Idea

Consider a family of types `C x y` indexed by `x : A` and `y : B`, and consider
[identifications](foundation-core.identity-types.md) `p : x = x'` and
`q : y = y'` in `A` and `B`, respectively. A
{{#concept "binary dependent identification" Agda=binary-dependent-identification}}
from `c : C x y` to `c' : C x' y'` over `p` and `q` is a
[dependent identification](foundation.dependent-identifications.md)

```text
r : dependent-identification (C x') p (tr (λ t → C t y) p c) c'.
```

## Definitions

### Binary dependent identifications

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

binary-dependent-identification :
{x x' : A} (p : x = x') {y y' : B} (q : y = y') →
C x y → C x' y' → UU l3
binary-dependent-identification p q c c' = binary-tr C p q c = c'
```
3 changes: 3 additions & 0 deletions src/foundation/binary-relations.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ module _

is-transitive : UU (l1 ⊔ l2)
is-transitive = (x y z : A) → R y z → R x y → R x z

is-transitive' : UU (l1 ⊔ l2)
is-transitive' = {x y z : A} → R y z → R x y → R x z
```

### The predicate of being a transitive relation valued in propositions
Expand Down
2 changes: 1 addition & 1 deletion src/foundation/binary-transport.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module _
where

binary-tr : (p : x = x') (q : y = y') → C x y → C x' y'
binary-tr refl refl = id
binary-tr p q c = tr (C _) q (tr (λ u → C u _) p c)

is-equiv-binary-tr : (p : x = x') (q : y = y') → is-equiv (binary-tr p q)
is-equiv-binary-tr refl refl = is-equiv-id
Expand Down
4 changes: 4 additions & 0 deletions src/foundation/dependent-function-types.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,7 @@ module _
( span-type-family-Π B)
( universal-property-dependent-function-types-Π B)
```

## See also

- [The globular type of dependent functions](foundation.globular-type-of-dependent-functions.md)
4 changes: 4 additions & 0 deletions src/foundation/dependent-identifications.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,3 +298,7 @@ module _
( inv-dependent-identification B p p'))
distributive-inv-concat-dependent-identification refl refl refl refl = refl
```

## See also

- [Binary dependent identifications](foundation.binary-dependent-identifications.md)
75 changes: 75 additions & 0 deletions src/foundation/discrete-binary-relations.lagda.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Discrete binary relations

```agda
module foundation.discrete-binary-relations where
```

<details><summary>Imports</summary>

```agda
open import foundation.binary-relations
open import foundation.empty-types
open import foundation.propositions
open import foundation.universe-levels
```

</details>

## Idea

A [binary relation](foundation.binary-relations.md) `R` on `A` is said to be
{{#concept "discrete" Disambiguation="binary relation" Agda=is-discrete-Relation}}
if it does not relate any elements, i.e., if the type `R x y` is empty for all
`x y : A`. In other words, a binary relation is discrete if and only if it is
the initial binary relation. This definition ensures that the inclusion of
[discrete directed graphs](graph-theory.discrete-directed-graphs.md) is a left
adjoint to the forgetful functor `(V , E) ↦ (V , ∅)`.

The condition of discreteness of binary relations compares to the condition of
[discreteness](foundation.discrete-reflexive-relations.md) of
[reflexive relations](foundation.reflexive-relations.md) in the sense that both
conditions imply initiality. Nevertheless, the condition of discreteness on
reflexive relations asserts that the type family `R x` is
[torsorial](foundation-core.torsorial-type-families.md) for every `x : A`, which
looks quite differently.

The condition of torsoriality is not adequate as a condition for discreteness
for arbitrary binary relations. For example, the binary relation on
[natural numbers](elementary-number-theory.natural-numbers.md) given by
`R m n := (m + 1 = n)`, relating natural numbers as follows

```text
0 ---> 1 ---> 2 ---> ⋯,
```

satisfies the condition that the type family `R m` is torsorial for every
`m : ℕ`, simply because the relation `R` is a
[functional correspondence](foundation.functional-correspondences.md). Since
this relation relates distinct elements, it is typically not considered to be
discrete.

## Definitions

### The predicate on relations of being discrete

```agda
module _
{l1 l2 : Level} {A : UU l1} (R : Relation l2 A)
where

is-discrete-prop-Relation : Prop (l1 ⊔ l2)
is-discrete-prop-Relation =
Π-Prop A (λ x → Π-Prop A (λ y → is-empty-Prop (R x y)))

is-discrete-Relation : UU (l1 ⊔ l2)
is-discrete-Relation = type-Prop is-discrete-prop-Relation

is-prop-is-discrete-Relation : is-prop is-discrete-Relation
is-prop-is-discrete-Relation = is-prop-type-Prop is-discrete-prop-Relation
```

## See also

- [Discrete reflexive relations](foundation.discrete-reflexive-relations.md)
- [Discrete directed graphs](graph-theory.discrete-directed-graphs.md)
- [Discrete-reflexive graphs](graph-theory.discrete-reflexive-graphs.md)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Discrete relations
# Discrete reflexive relations

```agda
module foundation.discrete-relations where
module foundation.discrete-reflexive-relations where
```

<details><summary>Imports</summary>
Expand All @@ -22,41 +22,22 @@ open import foundation-core.propositions

## Idea

A [relation](foundation.binary-relations.md) `R` on `A` is said to be
{{#concept "discrete" Disambiguation="binary relations valued in types" Agda=is-discrete-Relation}}
A [reflexive relation](foundation.binary-relations.md) `R` on `A` is said to be
{{#concept "discrete" Disambiguation="reflexive relations valued in types" Agda=is-discrete-Reflexive-Relation}}
if, for every element `x : A`, the type family `R x` is
[torsorial](foundation-core.torsorial-type-families.md). In other words, the
[dependent sum](foundation.dependent-pair-types.md) `Σ (y : A), (R x y)` is
[contractible](foundation-core.contractible-types.md) for every `x`. The
{{#concept "standard discrete relation" Disambiguation="binary relations valued in types"}}
on a type `X` is the relation defined by
[identifications](foundation-core.identity-types.md),
[contractible](foundation-core.contractible-types.md) for every `x`.

The {{#concept "standard discrete reflexive relation"}} on a type `X` is the
relation defined by [identifications](foundation-core.identity-types.md),

```text
R x y := (x = y).
```

## Definitions

### The predicate on relations of being discrete

```agda
module _
{l1 l2 : Level} {A : UU l1} (R : Relation l2 A)
where

is-discrete-prop-Relation : Prop (l1 ⊔ l2)
is-discrete-prop-Relation = Π-Prop A (λ x → is-torsorial-Prop (R x))

is-discrete-Relation : UU (l1 ⊔ l2)
is-discrete-Relation =
type-Prop is-discrete-prop-Relation

is-prop-is-discrete-Relation : is-prop is-discrete-Relation
is-prop-is-discrete-Relation =
is-prop-type-Prop is-discrete-prop-Relation
```

### The predicate on reflexive relations of being discrete

```agda
Expand All @@ -66,7 +47,7 @@ module _

is-discrete-prop-Reflexive-Relation : Prop (l1 ⊔ l2)
is-discrete-prop-Reflexive-Relation =
is-discrete-prop-Relation (rel-Reflexive-Relation R)
Π-Prop A (λ a → is-torsorial-Prop (rel-Reflexive-Relation R a))

is-discrete-Reflexive-Relation : UU (l1 ⊔ l2)
is-discrete-Reflexive-Relation =
Expand All @@ -78,13 +59,22 @@ module _
is-prop-type-Prop is-discrete-prop-Reflexive-Relation
```

### The standard discrete relation on a type
## Properties

### The identity relation is discrete

```agda
module _
{l : Level} (A : UU l)
where

is-discrete-Id-Relation : is-discrete-Relation (Id {A = A})
is-discrete-Id-Relation = is-torsorial-Id
is-discrete-Id-Reflexive-Relation :
is-discrete-Reflexive-Relation (Id-Reflexive-Relation A)
is-discrete-Id-Reflexive-Relation = is-torsorial-Id
```

## See also

- [Discrete binary relations](foundation.discrete-binary-relations.md)
- [Discrete directed graphs](graph-theory.discrete-directed-graphs.md)
- [Discrete reflexive graphs](graph-theory.discrete-reflexive-graphs.md)
Loading
Loading