theorem Graph.IsForest.isEdgeCutBetween {α : Type u_1} {β : Type u_2} {G : Graph α β} {x y : α} {e : β} (hG : G.IsForest) (hl : G.IsLink e x y) :
G.IsEdgeCutBetween {e} x y
theorem Graph.IsCyclicWalk.toGraph_not_isForest {α : Type u_1} {β : Type u_2} {G : Graph α β} {C : WList α β} (hC : G.IsCyclicWalk C) :
theorem Graph.IsCyclicWalk.toGraph_eq_of_le {α : Type u_1} {β : Type u_2} {G : Graph α β} {C C₀ : WList α β} (hC : G.IsCyclicWalk C) (hC₀ : G.IsCyclicWalk C₀) (hle : C₀.toGraph ≤ C.toGraph) :
theorem Graph.IsCyclicWalk.toGraph_isCycle {α : Type u_1} {β : Type u_2} {G : Graph α β} {C : WList α β} (hC : G.IsCyclicWalk C) :
theorem Graph.IsLink.exists_cons_isCyclicWalk_eq_of_IsCycle {α : Type u_1} {β : Type u_2} {G : Graph α β} {x y : α} {e : β} (hG : G.IsCycle) (hxy : G.IsLink e x y) :
∃ (C : WList α β), G.IsCyclicWalk (WList.cons x e C) ∧ C.first = y ∧ (WList.cons x e C).toGraph = G
Given a cycle and the 'orientation to traverse the cycle' in the form of a link, there exists a
cyclic walk that starts with x, y.
theorem Graph.IsCycle.toGraph_of_isCyclicWalk {α : Type u_1} {β : Type u_2} {G : Graph α β} {C : WList α β} (hG : G.IsCycle) (hC : G.IsCyclicWalk C) :
theorem Graph.IsCycle.exists_isPath_isTrail {α : Type u_1} {β : Type u_2} {G : Graph α β} {x y : α} (hG : G.IsCycle) (hx : x ∈ G.vertexSet) (hy : y ∈ G.vertexSet) :
Without assuming x ≠ y, output maybe a trivial path and the entire cycle. See
IsCycle.exists_two_paths_of_ne.
theorem Graph.IsCycle.isPrefix_of_isTrail_of_length_le {α : Type u_1} {β : Type u_2} {G : Graph α β} {x : α} {e : β} {w₁ w₂ : WList α β} (hG : G.IsCycle) (h₁ : G.IsTrail (WList.cons x e w₁)) (h₂ : G.IsTrail (WList.cons x e w₂)) (hle : w₁.length ≤ w₂.length) :
w₁.IsPrefix w₂
@[simp]
theorem Graph.singleEdge_isForest {α : Type u_1} {β : Type u_2} {x y : α} (hxy : x ≠ y) (e : β) :
(Graph.singleEdge x y e).IsForest
theorem Graph.IsForest.isShortestPath_of_isPath {α : Type u_1} {β : Type u_2} {G : Graph α β} {P : WList α β} (hG : G.IsForest) (hP : G.IsPath P) :
G.IsShortestPath P
Cycles and 2-connectivity #
theorem Graph.ConnGE.exists_isCycle_le {α : Type u_1} {β : Type u_2} {G : Graph α β} {x : α} (hG : G.ConnGE 2) (hx : x ∈ G.vertexSet) :
A 2-connected graph has, through each of its vertices, a cycle on at least three vertices.
The bound on V(C) matters: IsCycle is Minimal (¬ IsForest ·), which admits loops and
digons, and neither is 2-connected. No finiteness instance is needed: the cycle is built, not
extracted.
theorem Graph.IsTree.exists_delete_vertex_isTree {α : Type u_1} {β : Type u_2} {T : Graph α β} [T.Finite] (hT : T.IsTree) (hnt : T.vertexSet.Nontrivial) :
∃ v ∈ T.vertexSet, (T.deleteVerts {v}).IsTree
Leaves #
theorem Graph.IsForest.exists_isPendant {α : Type u_1} {β : Type u_2} {G : Graph α β} [G.EdgeFinite] (hG : G.IsForest) (hne : G.edgeSet.Nonempty) :
∃ (e : β) (x : α), G.IsPendant e x
Every forest with at least one edge has a pendant.
theorem Graph.IsForest.exists_isLeaf {α : Type u_1} {β : Type u_2} {G : Graph α β} [G.EdgeFinite] (hG : G.IsForest) (hne : G.edgeSet.Nonempty) :
∃ (x : α), G.IsLeaf x