Skip to content

Commit 3674a29

Browse files
committed
feat(Combinatorics/SimpleGraph): add lemmas about left and right elements of SimpleGraph.sum (leanprover-community#37179)
1 parent 555f979 commit 3674a29

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

  • Mathlib/Combinatorics/SimpleGraph

Mathlib/Combinatorics/SimpleGraph/Sum.lean

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,25 @@ lemma Iso.sumAssoc_comp_sumCongr (f : G ≃g G') (g : H ≃g H') (h : I ≃g I')
127127
comp sumAssoc (sumCongr (sumCongr f g) h) = comp (sumCongr f (sumCongr g h)) sumAssoc := by
128128
ext ((v | w) | u) <;> simp
129129

130+
131+
lemma not_adj_sum_inl_inr (v w) : ¬(G ⊕g H).Adj (.inl v) (.inr w) := by simp
132+
133+
lemma not_reachable_sum_inl_inr (v w) : ¬(G ⊕g H).Reachable (.inl v) (.inr w) := by
134+
rintro ⟨p⟩
135+
have hs : ∀ x : V ⊕ W, x ∉ Set.range .inl ↔ x ∈ Set.range .inr := by simp
136+
obtain ⟨⟨d, hadj⟩, _, hd1, hd2⟩ := p.exists_boundary_dart (Set.range .inl) (by simp) (by simp)
137+
simp only [hs] at hadj hd1 hd2
138+
obtain ⟨v', hv'⟩ := hd1
139+
obtain ⟨w', hw'⟩ := hd2
140+
rw [← hv', ← hw'] at hadj
141+
exact not_adj_sum_inl_inr _ _ hadj
142+
143+
lemma not_preconnected_sum [Nonempty V] [Nonempty W] : ¬(G ⊕g H).Preconnected :=
144+
fun h ↦ not_reachable_sum_inl_inr (Classical.arbitrary _) (Classical.arbitrary _) (h ..)
145+
146+
lemma not_connected_sum [Nonempty V] [Nonempty W] : ¬(G ⊕g H).Connected := by
147+
simp [connected_iff, not_preconnected_sum]
148+
130149
lemma Reachable.sum_sup_edge (hv : G.Reachable v v') (hw : H.Reachable w w') :
131150
(G.sum H ⊔ edge (.inl v) (.inr w)).Reachable (.inl v') (.inr w') :=
132151
((hv.symm.map Embedding.sumInl.toHom).mono le_sup_left).trans <| .trans

0 commit comments

Comments
 (0)