Digraphs #
This module defines directed graphs on a vertex type V,
which is the same notion as a relation V → V → Prop.
While this might be too simple of a notion to deserve the grandeur of a new definition,
the intention here is to develop relations using the language of graph theory.
Note that in this treatment, a digraph may have self loops.
The type Digraph V is structurally equivalent to Quiver.{0} V,
but a difference between these is that Quiver is a class —
its purpose is to attach a quiver structure to a particular type V.
In contrast, for Digraph V we are interested in working with the entire lattice
of digraphs on V.
Main definitions #
Digraphis a structure for relations. UnlikeSimpleGraph, the relation does not need to be symmetric or irreflexive.CompleteAtomicBooleanAlgebrainstance: Under the subgraph relation,Digraphforms aCompleteAtomicBooleanAlgebra. In other words, this is the complete lattice of spanning subgraphs of the complete graph.
Two vertices are adjacent in the complete bipartite digraph on two vertex types if and only if they are not from the same side. Any bipartite digraph may be regarded as a subgraph of one of these.
Equations
Instances For
The relation that one Digraph is a spanning subgraph of another.
Note that Digraph.IsSubgraph G H should be spelled G ≤ H.
Equations
- x.IsSubgraph y = ∀ ⦃v w : V⦄, x.Adj v w → y.Adj v w
Instances For
For digraphs G, H, G ≤ H iff ∀ a b, G.Adj a b → H.Adj a b.
Equations
- Digraph.instLE = { le := Digraph.IsSubgraph }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Digraph.instInhabited V = { default := ⊥ }
Equations
Equations
- Digraph.Sup.adjDecidable V G H a b = instDecidableOr
Equations
- Digraph.Inf.adjDecidable V G H a b = instDecidableAnd
Equations
- Digraph.SDiff.adjDecidable V G H a b = instDecidableAnd