@@ -18,25 +18,27 @@ open import foundation.universe-levels
1818
1919## Idea
2020
21- A ** directed graph** consists of a type of vertices equipped with a binary, type
22- valued relation of edges. Alternatively, one can define a directed graph to
23- consist of a type ` V ` of ** vertices** , a type ` E ` of ** edges** , and a map
24- ` E → V × V ` determining the ** source** and ** target** of each edge.
21+ A
22+ {{#concept "directed graph" WD="directed graph" WDID=Q1137726 Agda=Directed-Graph}}
23+ consists of a type of vertices equipped with a binary, type valued relation of
24+ edges. Alternatively, one can define a directed graph to consist of a type ` V `
25+ of ** vertices** , a type ` E ` of ** edges** , and a map ` E → V × V ` determining the
26+ ** source** and ** target** of each edge.
2527
2628To see that these two definitions are
2729[ equivalent] ( foundation-core.equivalences.md ) , recall that
28- [ $\Sigma $-types] ( foundation.dependent-pair-types.md ) preserve equivalences and a
29- type family $A \to U$ is equivalent to $\sum _ {(C : U)} C \to A$ by
30+ [ $Σ $-types] ( foundation.dependent-pair-types.md ) preserve equivalences and a type
31+ family $A → U$ is equivalent to $∑ _ {(C : U)} C → A$ by
3032[ type duality] ( foundation.type-duality.md ) . Using these two observations we make
3133the following calculation:
3234
3335$$
3436\begin{equation}
3537\begin{split}
36- \sum_ {(V\,:\,\mathcal{U} )} (V \to V \to \mathcal{U}) & \simeq \sum_{(V\,:\,\mathcal{U})}
37- (V \times V \to \mathcal{U} ) \\
38- &\simeq \sum_ {(V,E\,:\,\mathcal{U} )} (E \to (V \times V)) \\
39- &\simeq \sum_ {(V,E\,:\,\mathcal{U} )} ((E \to V) \times (E \to V))
38+ ∑_ {(V : 𝒰 )} (V → V → 𝒰)
39+ & ≃ ∑_{ (V : 𝒰)} (V × V → 𝒰 ) \\
40+ & ≃ ∑_ {(V,E : 𝒰 )} (E → (V × V)) \\
41+ & ≃ ∑_ {(V,E : 𝒰 )} ((E → V) × (E → V))
4042\end{split}
4143\end{equation}
4244$$
0 commit comments