File tree Expand file tree Collapse file tree
Mathlib/Combinatorics/SimpleGraph Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,22 +235,19 @@ theorem degree_pos_iff_mem_support : 0 < G.degree v ↔ v ∈ G.support := by
235235theorem degree_eq_zero_iff_notMem_support : G.degree v = 0 ↔ v ∉ G.support := by
236236 rw [← G.degree_pos_iff_mem_support v, Nat.pos_iff_ne_zero, not_ne_iff]
237237
238- @[simp]
239238theorem degree_eq_zero_of_subsingleton {G : SimpleGraph V} (v : V) [Fintype (G.neighborSet v)]
240239 [Subsingleton V] : G.degree v = 0 := by
241- have := G.degree_pos_iff_exists_adj v
242- simp_all [subsingleton_iff_forall_eq v]
240+ simp
241+
242+ theorem nontrivial_of_degree_ne_zero {G : SimpleGraph V} {v : V} [Fintype (G.neighborSet v)]
243+ (h : G.degree v ≠ 0 ) : Nontrivial V :=
244+ nontrivial_of_not_isIsolated <| G.degree_eq_zero v |>.not.mp h
243245
244246theorem degree_eq_one_iff_existsUnique_adj {G : SimpleGraph V} {v : V} [Fintype (G.neighborSet v)] :
245247 G.degree v = 1 ↔ ∃! w : V, G.Adj v w := by
246248 rw [degree, Finset.card_eq_one, Finset.singleton_iff_unique_mem]
247249 simp only [mem_neighborFinset]
248250
249- theorem nontrivial_of_degree_ne_zero {G : SimpleGraph V} {v : V} [Fintype (G.neighborSet v)]
250- (h : G.degree v ≠ 0 ) : Nontrivial V := by
251- by_contra!
252- simp_all [degree_eq_zero_of_subsingleton]
253-
254251theorem degree_compl [Fintype (Gᶜ.neighborSet v)] [Fintype V] :
255252 Gᶜ.degree v = Fintype.card V - 1 - G.degree v := by
256253 classical
You can’t perform that action at this time.
0 commit comments