The graph traced by a multigraph walk #
This file associates to an edge-labelled multigraph walk the graph consisting exactly of its visited vertices and traversed edge identities. This graph retains the ambient vertex and edge types, so it can be compared directly with the ambient graph and combined with other traced graphs. The construction records an isolated vertex for a zero-length walk, including when that vertex is not an actual vertex of the ambient graph.
The interface follows Mathlib's SimpleGraph.Walk.toSubgraph, adapted to Mathlib's multigraph
representation in which a subgraph is itself a Graph and parallel edges retain their identities.
theorem
Graph.Walk.walkGraph_compatible
{α : Type u}
{β : Type v}
{G : Graph α β}
{w x y z : α}
(p : G.Walk x y)
(q : G.Walk z w)
:
(G.walkGraph p).Compatible (G.walkGraph q)
Traced graphs of walks in one ambient graph are compatible.