Skip to content

Commit d9c6ac2

Browse files
committed
fix Finite.lean
1 parent 2df1e82 commit d9c6ac2

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

Mathlib/Combinatorics/SimpleGraph/Finite.lean

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -235,22 +235,19 @@ theorem degree_pos_iff_mem_support : 0 < G.degree v ↔ v ∈ G.support := by
235235
theorem 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]
239238
theorem 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

244246
theorem 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-
254251
theorem degree_compl [Fintype (Gᶜ.neighborSet v)] [Fintype V] :
255252
Gᶜ.degree v = Fintype.card V - 1 - G.degree v := by
256253
classical

0 commit comments

Comments
 (0)