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

Merged
merged 97 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
97 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
d002909
Merge branch 'master' of github.com:UniMath/agda-unimath into globular
EgbertRijke Dec 3, 2024
ea25b4b
review
EgbertRijke Dec 3, 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
17 changes: 17 additions & 0 deletions references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@ @article{AKS15
langid = {english}
}

@ARTICLE{Awodey22,
author = {{Awodey}, Steve},
title = "{On Hofmann-Streicher universes}",
journal = {arXiv e-prints},
keywords = {Mathematics - Category Theory, Mathematics - Logic},
year = 2022,
month = may,
eid = {arXiv:2205.10917},
pages = {arXiv:2205.10917},
doi = {10.48550/arXiv.2205.10917},
archivePrefix = {arXiv},
eprint = {2205.10917},
primaryClass = {math.CT},
adsurl = {https://ui.adsabs.harvard.edu/abs/2022arXiv220510917A},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
EgbertRijke marked this conversation as resolved.
Show resolved Hide resolved

@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
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
185 changes: 127 additions & 58 deletions src/foundation/wild-category-of-types.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,78 +46,147 @@ consists of types and functions and homotopies.

## Definitions

### The globular structure on dependent function types
### The globular type of dependent function types

```agda
dependent-function-type-Globular-Type :
{l1 l2 : Level} (A : UU l1) (B : A → UU l2) →
Globular-Type (l1 ⊔ l2) (l1 ⊔ l2)
0-cell-Globular-Type (dependent-function-type-Globular-Type A B) =
(x : A) → B x
1-cell-globular-type-Globular-Type
( dependent-function-type-Globular-Type A B) f g =
dependent-function-type-Globular-Type A (eq-value f g)

globular-structure-Π :
{l1 l2 : Level} {A : UU l1} {B : A → UU l2} →
globular-structure (l1 ⊔ l2) ((x : A) → B x)
globular-structure-Π =
λ where
.1-cell-globular-structure → _~_
.globular-structure-1-cell-globular-structure f g → globular-structure-Π
globular-structure-Π {A = A} {B = B} =
globular-structure-0-cell-Globular-Type
( dependent-function-type-Globular-Type A B)

is-reflexive-globular-structure-Π :
is-reflexive-dependent-function-type-Globular-Type :
{l1 l2 : Level} {A : UU l1} {B : A → UU l2} →
is-reflexive-globular-structure (globular-structure-Π {A = A} {B})
is-reflexive-globular-structure-Π =
λ where
.is-reflexive-1-cell-is-reflexive-globular-structure f → refl-htpy
.is-reflexive-globular-structure-1-cell-is-reflexive-globular-structure f g
is-reflexive-globular-structure-Π

is-transitive-globular-structure-Π :
is-reflexive-Globular-Type (dependent-function-type-Globular-Type A B)
is-reflexive-1-cell-is-reflexive-globular-structure
is-reflexive-dependent-function-type-Globular-Type f = refl-htpy
is-reflexive-globular-structure-1-cell-is-reflexive-globular-structure
is-reflexive-dependent-function-type-Globular-Type f g =
is-reflexive-dependent-function-type-Globular-Type

is-transitive-dependent-function-type-Globular-Type :
{l1 l2 : Level} {A : UU l1} {B : A → UU l2} →
is-transitive-globular-structure (globular-structure-Π {A = A} {B})
is-transitive-globular-structure-Π =
λ where
.comp-1-cell-is-transitive-globular-structure H K → K ∙h H
.is-transitive-globular-structure-1-cell-is-transitive-globular-structure
H K →
is-transitive-globular-structure-Π
is-transitive-Globular-Type (dependent-function-type-Globular-Type A B)
comp-1-cell-is-transitive-globular-structure
is-transitive-dependent-function-type-Globular-Type K H =
H ∙h K
is-transitive-globular-structure-1-cell-is-transitive-globular-structure
is-transitive-dependent-function-type-Globular-Type f g =
is-transitive-dependent-function-type-Globular-Type
```

### The large globular structure on types
### The globular type of function types

```agda
large-globular-structure-Type : large-globular-structure (_⊔_) (λ l → UU l)
large-globular-structure-Type =
λ where
.1-cell-large-globular-structure X Y → (X → Y)
.globular-structure-1-cell-large-globular-structure X Y → globular-structure-Π

is-reflexive-large-globular-structure-Type :
is-reflexive-large-globular-structure large-globular-structure-Type
is-reflexive-large-globular-structure-Type =
λ where
.is-reflexive-1-cell-is-reflexive-large-globular-structure X → id
.is-reflexive-globular-structure-1-cell-is-reflexive-large-globular-structure
X Y →
is-reflexive-globular-structure-Π

is-transitive-large-globular-structure-Type :
is-transitive-large-globular-structure large-globular-structure-Type
is-transitive-large-globular-structure-Type =
λ where
.comp-1-cell-is-transitive-large-globular-structure g f → g ∘ f
.is-transitive-globular-structure-1-cell-is-transitive-large-globular-structure
X Y →
is-transitive-globular-structure-Π
function-type-Globular-Type :
{l1 l2 : Level} (A : UU l1) (B : UU l2) →
Globular-Type (l1 ⊔ l2) (l1 ⊔ l2)
function-type-Globular-Type A B = dependent-function-type-Globular-Type A (λ _ → B)

globular-structure-function-type :
{l1 l2 : Level} {A : UU l1} {B : UU l2} → globular-structure (l1 ⊔ l2) (A → B)
globular-structure-function-type = globular-structure-Π

is-reflexive-function-type-Globular-Type :
{l1 l2 : Level} {A : UU l1} {B : UU l2} →
is-reflexive-Globular-Type (function-type-Globular-Type A B)
is-reflexive-function-type-Globular-Type {l1} {l2} {A} {B} =
is-reflexive-dependent-function-type-Globular-Type

is-transitive-function-type-Globular-Type :
{l1 l2 : Level} {A : UU l1} {B : UU l2} →
is-transitive-Globular-Type (function-type-Globular-Type A B)
is-transitive-function-type-Globular-Type =
is-transitive-dependent-function-type-Globular-Type
```

### The noncoherent large wild higher precategory of types
### The large globular type of types

```agda
Type-Noncoherent-Large-Wild-Higher-Precategory :
Noncoherent-Large-Wild-Higher-Precategory lsuc (_⊔_)
Type-Noncoherent-Large-Wild-Higher-Precategory =
λ where
.obj-Noncoherent-Large-Wild-Higher-Precategory l →
UU l
.hom-globular-structure-Noncoherent-Large-Wild-Higher-Precategory →
large-globular-structure-Type
.id-hom-globular-structure-Noncoherent-Large-Wild-Higher-Precategory →
is-reflexive-large-globular-structure-Type
.comp-hom-globular-structure-Noncoherent-Large-Wild-Higher-Precategory →
is-transitive-large-globular-structure-Type
Type-Large-Globular-Type : Large-Globular-Type lsuc (_⊔_)
0-cell-Large-Globular-Type Type-Large-Globular-Type l =
UU l
1-cell-globular-type-Large-Globular-Type Type-Large-Globular-Type A B =
function-type-Globular-Type A B

is-reflexive-Type-Large-Globular-Type :
is-reflexive-Large-Globular-Type Type-Large-Globular-Type
refl-0-cell-is-reflexive-Large-Globular-Type
is-reflexive-Type-Large-Globular-Type X =
id
is-reflexive-1-cell-globular-type-is-reflexive-Large-Globular-Type
is-reflexive-Type-Large-Globular-Type =
is-reflexive-function-type-Globular-Type

Type-Large-Reflexive-Globular-Type : Large-Reflexive-Globular-Type lsuc (_⊔_)
Type-Large-Reflexive-Globular-Type = ?
```

-- ```agda
-- large-globular-structure-Type : large-globular-structure (_⊔_) (λ l → UU l)
-- large-globular-structure-Type =
-- λ where
-- .1-cell-large-globular-structure X Y → (X → Y)
-- .globular-structure-1-cell-large-globular-structure X Y → globular-structure-Π

-- is-reflexive-large-globular-structure-Type :
-- is-reflexive-large-globular-structure large-globular-structure-Type
-- is-reflexive-large-globular-structure-Type =
-- λ where
-- .is-reflexive-1-cell-is-reflexive-large-globular-structure X → id
-- .is-reflexive-globular-structure-1-cell-is-reflexive-large-globular-structure
-- X Y →
-- is-reflexive-globular-structure-Π

-- is-transitive-large-globular-structure-Type :
-- is-transitive-large-globular-structure large-globular-structure-Type
-- is-transitive-large-globular-structure-Type =
-- λ where
-- .comp-1-cell-is-transitive-large-globular-structure g f → g ∘ f
-- .is-transitive-globular-structure-1-cell-is-transitive-large-globular-structure
-- X Y →
-- is-transitive-globular-structure-Π
-- ```

-- ### The noncoherent large wild higher precategory of types

-- ```agda
-- Type-Large-Globular-Type :
-- Large-Globular-Type lsuc (_⊔_)
-- 0-cell-Large-Globular-Type Type-Large-Globular-Type l1 = UU l1
-- 1-cell-globular-type-Large-Globular-Type Type-Large-Globular-Type X Y =
-- {!!}

-- Type-Noncoherent-Large-Wild-Higher-Precategory :
-- Noncoherent-Large-Wild-Higher-Precategory lsuc (_⊔_)
-- large-globular-type-Noncoherent-Large-Wild-Precategory
-- Type-Noncoherent-Large-Wild-Higher-Precategory =
-- {!Type-Large-Globular-Type!}
-- id-structure-Noncoherent-Large-Wild-Higher-Precategory
-- Type-Noncoherent-Large-Wild-Higher-Precategory =
-- {!!}
-- comp-structure-Noncoherent-Large-Wild-Higher-Precategory
-- Type-Noncoherent-Large-Wild-Higher-Precategory =
-- {!!}


-- -- λ where
-- -- .obj-Noncoherent-Large-Wild-Higher-Precategory l →
-- -- UU l
-- -- .hom-globular-structure-Noncoherent-Large-Wild-Higher-Precategory →
-- -- large-globular-structure-Type
-- -- .id-hom-globular-structure-Noncoherent-Large-Wild-Higher-Precategory →
-- -- is-reflexive-large-globular-structure-Type
-- -- .comp-hom-globular-structure-Noncoherent-Large-Wild-Higher-Precategory →
-- -- is-transitive-large-globular-structure-Type
-- -- ```
9 changes: 9 additions & 0 deletions src/graph-theory.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
module graph-theory where

open import graph-theory.acyclic-undirected-graphs public
open import graph-theory.cartesian-products-directed-graphs public
open import graph-theory.circuits-undirected-graphs public
open import graph-theory.closed-walks-undirected-graphs public
open import graph-theory.complete-bipartite-graphs public
open import graph-theory.complete-multipartite-graphs public
open import graph-theory.complete-undirected-graphs public
open import graph-theory.connected-undirected-graphs public
open import graph-theory.cycles-undirected-graphs public
open import graph-theory.dependent-directed-graphs public
open import graph-theory.dependent-products-directed-graphs public
open import graph-theory.directed-graph-structures-on-standard-finite-sets public
open import graph-theory.directed-graphs public
open import graph-theory.discrete-graphs public
Expand All @@ -25,6 +28,7 @@ open import graph-theory.equivalences-directed-graphs public
open import graph-theory.equivalences-enriched-undirected-graphs public
open import graph-theory.equivalences-undirected-graphs public
open import graph-theory.eulerian-circuits-undirected-graphs public
open import graph-theory.exponents-directed-graphs public
open import graph-theory.faithful-morphisms-undirected-graphs public
open import graph-theory.fibers-directed-graphs public
open import graph-theory.finite-graphs public
Expand All @@ -41,17 +45,22 @@ open import graph-theory.neighbors-undirected-graphs public
open import graph-theory.orientations-undirected-graphs public
open import graph-theory.paths-undirected-graphs public
open import graph-theory.polygons public
open import graph-theory.pullbacks-dependent-directed-graphs public
open import graph-theory.raising-universe-levels-directed-graphs public
open import graph-theory.reflecting-maps-undirected-graphs public
open import graph-theory.reflexive-graphs public
open import graph-theory.regular-undirected-graphs public
open import graph-theory.sections-dependent-directed-graphs public
open import graph-theory.simple-undirected-graphs public
open import graph-theory.stereoisomerism-enriched-undirected-graphs public
open import graph-theory.terminal-directed-graphs public
open import graph-theory.totally-faithful-morphisms-undirected-graphs public
open import graph-theory.trails-directed-graphs public
open import graph-theory.trails-undirected-graphs public
open import graph-theory.undirected-graph-structures-on-standard-finite-sets public
open import graph-theory.undirected-graphs public
open import graph-theory.universal-directed-graph public
open import graph-theory.universal-reflexive-graph public
open import graph-theory.vertex-covers public
open import graph-theory.voltage-graphs public
open import graph-theory.walks-directed-graphs public
Expand Down
104 changes: 104 additions & 0 deletions src/graph-theory/cartesian-products-directed-graphs.lagda.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Cartesian products of directed graphs

```agda
module graph-theory.cartesian-products-directed-graphs where
```

<details><summary>Imports</summary>

```agda
open import foundation.cartesian-product-types
open import foundation.dependent-pair-types
open import foundation.universe-levels

open import graph-theory.directed-graphs
open import graph-theory.morphisms-directed-graphs
```

</details>

## Idea

Consider two [directed graphs](graph-theory.directed-graphs.md) `A := (A₀ , A₁)`
and `B := (B₀ , B₁)`. The cartesian product of `A` and `B` is the directed graph
EgbertRijke marked this conversation as resolved.
Show resolved Hide resolved
`A × B` given by

```text
(A × B)₀ := A₀ × B₀
(A × B)₁ (x , y) (x' , y') := A₁ x x' × B₁ y y'.
```

## Definitions

### The cartesian product of directed graphs

```agda
module _
{l1 l2 l3 l4 : Level} (A : Directed-Graph l1 l2) (B : Directed-Graph l3 l4)
where

vertex-product-Directed-Graph : UU (l1 ⊔ l3)
vertex-product-Directed-Graph =
vertex-Directed-Graph A × vertex-Directed-Graph B

edge-product-Directed-Graph :
(x y : vertex-product-Directed-Graph) → UU (l2 ⊔ l4)
edge-product-Directed-Graph (x , y) (x' , y') =
edge-Directed-Graph A x x' × edge-Directed-Graph B y y'

product-Directed-Graph : Directed-Graph (l1 ⊔ l3) (l2 ⊔ l4)
pr1 product-Directed-Graph = vertex-product-Directed-Graph
pr2 product-Directed-Graph = edge-product-Directed-Graph
```

### The projections out of cartesian products of directed graphs

#### The first projection out of the cartesian product of directed graphs

```agda
module _
{l1 l2 l3 l4 : Level} (A : Directed-Graph l1 l2) (B : Directed-Graph l3 l4)
where

vertex-pr1-product-Directed-Graph :
vertex-product-Directed-Graph A B → vertex-Directed-Graph A
vertex-pr1-product-Directed-Graph = pr1

edge-pr1-product-Directed-Graph :
{x y : vertex-product-Directed-Graph A B} →
edge-product-Directed-Graph A B x y →
edge-Directed-Graph A
( vertex-pr1-product-Directed-Graph x)
( vertex-pr1-product-Directed-Graph y)
edge-pr1-product-Directed-Graph = pr1

pr1-product-Directed-Graph :
hom-Directed-Graph (product-Directed-Graph A B) A
pr1 pr1-product-Directed-Graph = vertex-pr1-product-Directed-Graph
pr2 pr1-product-Directed-Graph _ _ = edge-pr1-product-Directed-Graph
```

#### The second projection out of the cartesian product of two directed graphs

```agda
module _
{l1 l2 l3 l4 : Level} (A : Directed-Graph l1 l2) (B : Directed-Graph l3 l4)
where

vertex-pr2-product-Directed-Graph :
vertex-product-Directed-Graph A B → vertex-Directed-Graph B
vertex-pr2-product-Directed-Graph = pr2

edge-pr2-product-Directed-Graph :
{x y : vertex-product-Directed-Graph A B} →
edge-product-Directed-Graph A B x y →
edge-Directed-Graph B
( vertex-pr2-product-Directed-Graph x)
( vertex-pr2-product-Directed-Graph y)
edge-pr2-product-Directed-Graph = pr2

pr2-product-Directed-Graph :
hom-Directed-Graph (product-Directed-Graph A B) B
pr1 pr2-product-Directed-Graph = vertex-pr2-product-Directed-Graph
pr2 pr2-product-Directed-Graph _ _ = edge-pr2-product-Directed-Graph
```
Loading
Loading