Distance #
The number of edges of the shortest walk between two vertices x,y of G, as an ℕ∞.
Equal to ⊤ if x and y are not ConnBetween in G, in particular if x = y ∉ V(G).
Equations
Instances For
theorem Graph.ConnBetween.eDist_lt_top {α : Type u_1} {β : Type u_2} {G : Graph α β} {x y : α} (h : G.ConnBetween x y) :
@[simp]
theorem Graph.ConnBetween.exists_adj_eDist_eq_add_one {α : Type u_1} {β : Type u_2} {G : Graph α β} {x y : α} (hconn : G.ConnBetween x y) (hne : x ≠ y) :
If x and y are eDistinct vertices that are connected in G,
then y has a neighbour y' whose eDistance to x is one less than that of y.
ℕ - valued eDistance #
theorem Graph.ConnBetween.cast_dist {α : Type u_1} {β : Type u_2} {G : Graph α β} {x y : α} (hG : G.ConnBetween x y) :
Shortest Paths #
theorem Graph.isShortestPath_nil {α : Type u_1} {β : Type u_2} {G : Graph α β} {x : α} (hx : x ∈ G.vertexSet) :
G.IsShortestPath (WList.nil x)
theorem Graph.ConnBetween.exists_isShortestPath {α : Type u_1} {β : Type u_2} {G : Graph α β} {x y : α} (hxy : G.ConnBetween x y) :
theorem Graph.IsShortestPath.reverse {α : Type u_1} {β : Type u_2} {G : Graph α β} {P : WList α β} (hP : G.IsShortestPath P) :
@[simp]
theorem Graph.isShortestPath_reverse_iff {α : Type u_1} {β : Type u_2} {G : Graph α β} {P : WList α β} :
@[simp]
theorem Graph.IsShortestPath.prefix {α : Type u_1} {β : Type u_2} {G : Graph α β} {P Q : WList α β} (hP : G.IsShortestPath P) (hQ : Q.IsPrefix P) :
G.IsShortestPath Q
theorem Graph.IsShortestPath.suffix {α : Type u_1} {β : Type u_2} {G : Graph α β} {P Q : WList α β} (hP : G.IsShortestPath P) (hQ : Q.IsSuffix P) :
G.IsShortestPath Q
theorem Graph.IsShortestPath.sublist {α : Type u_1} {β : Type u_2} {G : Graph α β} {P Q : WList α β} (hP : G.IsShortestPath P) (hQ : Q.IsSublist P) :
G.IsShortestPath Q