Tree-like closed walks #
A closed walk of G at v is tree-like when it lifts to a closed walk at the root of Godsil's path
tree T(G, v). The lift is deterministic: keeping the current simple path as a stack, each step
either extends it by a vertex not on it or returns to the previous vertex; any other step fails.
A closed walk whose edges span an acyclic subgraph is tree-like.
Main definitions #
SimpleGraph.liftSeq: the deterministic lift of a vertex sequence, as an optional stack.SimpleGraph.Walk.IsTreeLike: the lift of the walk returns to the root.
Main results #
SimpleGraph.Walk.nil_isTreeLike: the trivial walk is tree-like.SimpleGraph.liftSeq_eq_pathSupport_of_acyclic: on an acyclic subgraph the lift follows the unique paths.SimpleGraph.Walk.isTreeLike_of_acyclic: a closed walk with acyclic edge support is tree-like.
References #
- C. D. Godsil, Matchings and walks in graphs, J. Graph Theory 5 (1981) 285–297.
Deterministic lift of a sequence of visited vertices into the path tree, threading the current
simple path (stack, from root to current vertex). For each next vertex c: if c ∉ stack push it
(EXTEND); else if c is the penultimate vertex of stack pop the last (RETREAT to parent); else
fail. Returns the final stack, or none if some step is neither extend nor retreat.
Equations
Instances For
Definitional unfolding of liftSeq on a cons.
A closed walk is tree-like (Godsil's path-tree class) iff its deterministic lift, started at
the root path [v], returns to the root path [v] (a closed walk at the root of T(G,v)).
Instances For
Equations
The empty walk lifts trivially: its only visited vertex is the root, the lift never moves, and
the stack stays [v].
Below the girth: every closed walk lifts (the remaining sub-lemma) #
Below the (extended) girth the walk's edge-support is acyclic (a forest). On a forest the lift
always succeeds: the deterministic stack stays equal to the unique forest-path from the root to
the current vertex, so each step is forced to be EXTEND (edge away from root) or RETREAT (edge back
toward root, hitting the penultimate vertex). A closed walk returns the stack to [v].
The core inductive invariant is liftSeq_eq_pathSupport_of_acyclic: matching liftSeq's List V
stack to the graph-theoretic unique forest-path. The key step — acyclicity forcing each RETREAT to the
penultimate vertex — is isolated in eq_penultimate_of_acyclic (build a cycle from the would-be
chord and contradict H.coe.IsAcyclic).
A subgraph of an acyclic (coerced) subgraph is acyclic: pull a cycle back along the injective
inclusion H₁.coe →g H₂.coe.
A cycle of G whose edges all lie inside a subgraph H lifts to a cycle of H.coe, so an
acyclic H.coe admits none. Lift C first to its own subgraph (mapToSubgraph, injective via
toSubgraph.hom), then along the injective inclusion C.toSubgraph ↪ H.
The acyclicity key step. In an acyclic ambient subgraph H containing a simple path
sp : root → a and the edge a ~ c, if c lies on sp then c must be the penultimate vertex of
sp (its neighbour along the path). Otherwise the sp-segment from c to a together with the
closing edge a~c would form a cycle inside H, contradicting hac.
For a non-nil walk, the last entry of its support with the endpoint dropped is the penultimate
vertex (getLast? of support.dropLast).
Invariant. If the ambient is acyclic, running liftSeq on the tail of a path p's
support, started from the vertex list of a simple path sp from the root to p's source, returns
the vertex list of the simple path from the root to p's target. (Forest unique-path bookkeeping:
each step extends or retreats the unique root-path; this is where the List ↔ graph-path friction
lives.)
A closed walk whose edge-support is acyclic is tree-like: take sp = nil (root path [v]) in
the invariant; the returned simple path from v to v is nil, support [v].