File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Mathlib/Combinatorics/SimpleGraph Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,14 @@ theorem dist_eq_one_iff_adj : G.dist u v = 1 ↔ G.Adj u v := by
247247 rw [dist, ENat.toNat_eq_iff, ENat.coe_one, edist_eq_one_iff_adj]
248248 decide
249249
250+ theorem Connected.diff_dist_adj (hG : G.Connected) (hadj : G.Adj v w) :
251+ G.dist u w = G.dist u v ∨ G.dist u w = G.dist u v + 1 ∨ G.dist u w = G.dist u v - 1 := by
252+ have : G.dist v w = 1 := dist_eq_one_iff_adj.mpr hadj
253+ have : G.dist w v = 1 := dist_eq_one_iff_adj.mpr hadj.symm
254+ have : G.dist u w ≤ G.dist u v + G.dist v w := hG.dist_triangle
255+ have : G.dist u v ≤ G.dist u w + G.dist w v := hG.dist_triangle
256+ omega
257+
250258theorem Walk.isPath_of_length_eq_dist (p : G.Walk u v) (hp : p.length = G.dist u v) :
251259 p.IsPath := by
252260 classical
You can’t perform that action at this time.
0 commit comments