Walks in graphs constructed from simple graphs #
This file identifies Mathlib's vertex-based walks in a simple graph H with the edge-labelled
walks in Graph.ofSimpleGraph H. In the latter graph, the edge joining x and y is the
unordered pair s(x, y), so no edge choice is lost in either direction.
The two conversions preserve length, vertex support, edge lists, concatenation, reversal, trails, paths, and cycles. Their equivalence also identifies the two reachability predicates, providing the basic bridge through which simple-graph connectivity results can be used for multigraph walks.
In the other direction, reachability by edge-labelled walks in a multigraph G agrees with
reachability in its underlying simple graph G.toSimpleGraph. A walk in the underlying simple
graph can be lifted to the multigraph by choosing one actual edge for each adjacency; this lift
preserves the vertex sequence and hence the path predicate.
Regard a simple-graph walk as an edge-labelled walk in Graph.ofSimpleGraph H.
Instances For
Forget the redundant edge labels of a walk in Graph.ofSimpleGraph H.
Instances For
Walks in a simple graph are equivalent to edge-labelled walks in its associated Graph.
Instances For
The walk equivalence identifies simple-graph cycles with edge-labelled multigraph cycles.
Multigraph reachability in Graph.ofSimpleGraph H is simple-graph reachability in H.
Lift a walk in the underlying simple graph of a multigraph by choosing one actual edge for each adjacency. The lift preserves the visited vertices but makes no canonical choice among parallel edges.
Instances For
Lifting a simplified walk preserves its vertex sequence, after forgetting the actual-vertex membership proofs.
Lifting a simplified walk preserves its length.
A lifted walk is a path exactly when the simplified walk is a path.
Lifting is injective: a walk in a simple graph is determined by its vertex sequence, which the lift preserves. Distinct simplified walks therefore lift to distinct multigraph walks, even though the lift chooses arbitrarily among parallel edges.
Two simplified walks have the same lift exactly when they are equal.
A subgraph inclusion H ≤ G induces a homomorphism of underlying simple graphs, sending each
actual vertex of H to itself.
Instances For
Reachability in the underlying simple graph is reachability by an edge-labelled walk.
Deletion in a multigraph agrees with deletion in its simplification, retaining the original endpoints.