Skip to content

Commit 5bb47cd

Browse files
committed
feat(Combinatorics/SimpleGraph): bot is not connected (#15675)
1 parent d59c78e commit 5bb47cd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Mathlib/Combinatorics/SimpleGraph/Path.lean

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,17 @@ theorem Preconnected.map {G : SimpleGraph V} {H : SimpleGraph V'} (f : G →g H)
719719
protected lemma Preconnected.mono {G G' : SimpleGraph V} (h : G ≤ G') (hG : G.Preconnected) :
720720
G'.Preconnected := fun u v => (hG u v).mono h
721721

722+
lemma bot_preconnected_iff_subsingleton : (⊥ : SimpleGraph V).Preconnected ↔ Subsingleton V := by
723+
refine ⟨fun h ↦ ?_, fun h ↦ by simpa [subsingleton_iff, ← reachable_bot] using h⟩
724+
contrapose h
725+
simp [nontrivial_iff.mp <| not_subsingleton_iff_nontrivial.mp h, Preconnected, reachable_bot, h]
726+
727+
lemma bot_preconnected [Subsingleton V] : (⊥ : SimpleGraph V).Preconnected :=
728+
bot_preconnected_iff_subsingleton.mpr ‹_›
729+
730+
lemma bot_not_preconnected [Nontrivial V] : ¬(⊥ : SimpleGraph V).Preconnected :=
731+
bot_preconnected_iff_subsingleton.not.mpr <| not_subsingleton_iff_nontrivial.mpr ‹_›
732+
722733
lemma top_preconnected : (⊤ : SimpleGraph V).Preconnected := fun x y => by
723734
if h : x = y then rw [h] else exact Adj.reachable h
724735

@@ -758,6 +769,9 @@ protected lemma Connected.mono {G G' : SimpleGraph V} (h : G ≤ G')
758769
preconnected := hG.preconnected.mono h
759770
nonempty := hG.nonempty
760771

772+
lemma bot_not_connected [Nontrivial V] : ¬(⊥ : SimpleGraph V).Connected := by
773+
simp [bot_not_preconnected, connected_iff, ‹_›]
774+
761775
lemma top_connected [Nonempty V] : (⊤ : SimpleGraph V).Connected where
762776
preconnected := top_preconnected
763777

0 commit comments

Comments
 (0)