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.
The complete digraph on a type V (denoted by โค)
is the digraph whose vertices are all adjacent.
Note that every vertex is adjacent to itself in โค.
Instances For
The empty digraph on a type V (denoted by โฅ)
is the digraph such that no pairs of vertices are adjacent.
Note that โฅ is called the empty digraph because it has no edges.
Instances For
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.
Instances For
The relation that one Digraph is a spanning subgraph of another.
Note that Digraph.IsSubgraph G H should be spelled G โค H.
Instances For
The supremum of two digraphs x โ y has edges where either x or y have edges.
The infimum of two digraphs x โ y has edges where both x and y have edges.
We define Gแถ to be the Digraph V such that no two adjacent vertices in G
are adjacent in the complement, and every nonadjacent pair of vertices is adjacent.
The difference of two digraphs x \ y has the edges of x with the edges of y removed.