Skip to content

Commit ebeb0db

Browse files
committed
@[simp] fixes and min degree = 0 iff corrections
1 parent 727ab10 commit ebeb0db

3 files changed

Lines changed: 17 additions & 8 deletions

File tree

Mathlib/Combinatorics/SimpleGraph/Basic.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,7 @@ lemma mem_support_iff_not_isIsolated : v ∈ G.support ↔ ¬ G.IsIsolated v :=
926926
simp [mem_support, IsIsolated]
927927

928928
-- #38747
929+
@[simp]
929930
theorem notMem_support_iff_isIsolated : v ∉ G.support ↔ G.IsIsolated v := by
930931
simp [mem_support_iff_not_isIsolated]
931932

Mathlib/Combinatorics/SimpleGraph/Degree.lean

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ variable {G v} in
3939
theorem edegree_eq_zero_iff_isIsolated : G.edegree v = 0 ↔ G.IsIsolated v := by
4040
simp [← encard_neighborSet]
4141

42+
@[simp]
4243
alias ⟨_, IsIsolated.edegree_eq⟩ := edegree_eq_zero_iff_isIsolated
4344

4445
variable {G u v} in
@@ -53,10 +54,9 @@ variable {G v} in
5354
theorem nontrivial_of_edegree_ne_zero (h : G.edegree v ≠ 0) : Nontrivial V :=
5455
nontrivial_of_not_isIsolated <| edegree_eq_zero_iff_isIsolated.not.mp h
5556

56-
@[simp]
5757
theorem edegree_eq_zero_of_subsingleton [Subsingleton V] (G : SimpleGraph V) (v : V) :
58-
G.edegree v = 0 :=
59-
edegree_eq_zero_iff_isIsolated.mpr <| .of_subsingleton G v
58+
G.edegree v = 0 := by
59+
simp
6060

6161
variable {G v} in
6262
theorem edegree_eq_one_iff_existsUnique_adj : G.edegree v = 1 ↔ ∃! u, G.Adj v u := by
@@ -119,9 +119,8 @@ theorem edegree_top : edegree ⊤ v = ENat.card V - 1 := by
119119
rw [← encard_neighborSet, neighborSet_top, ← Set.encard_ne_add_one v, ← Set.compl_singleton_eq]
120120
cases Set.encard {v}ᶜ <;> norm_cast
121121

122-
@[simp]
123122
theorem edegree_bot : edegree ⊥ v = 0 := by
124-
simp [← encard_neighborSet]
123+
simp
125124

126125
variable {G} in
127126
theorem IsRegularOfDegree.edegree_eq [G.LocallyFinite] {d : ℕ} (h : G.IsRegularOfDegree d) (v : V) :
@@ -147,6 +146,10 @@ variable {G} in
147146
theorem maxEDegree_eq_zero_iff_eq_bot : G.maxEDegree = 0 ↔ G = ⊥ := by
148147
simp [maxEDegree_eq_iSup, eq_bot_iff_isIsolated]
149148

149+
variable {G} in
150+
theorem minEDegree_eq_zero_iff_isIsolated : G.minEDegree = 0 ↔ ∃ v, G.IsIsolated v := by
151+
simp [minEDegree_eq_iInf]
152+
150153
variable {G} in
151154
theorem minEDegree_eq_zero_iff_support_ne : G.minEDegree = 0 ↔ G.support ≠ .univ := by
152155
simp [minEDegree_eq_iInf, Set.ne_univ_iff_exists_notMem, notMem_support_iff_isIsolated]

Mathlib/Combinatorics/SimpleGraph/Finite.lean

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -500,10 +500,15 @@ lemma minDegree_bot_eq_zero : (⊥ : SimpleGraph V).minDegree = 0 :=
500500

501501
variable {G} in
502502
theorem minDegree_eq_zero_iff [DecidableRel G.Adj] [Nonempty V] :
503-
G.minDegree = 0 ↔ ∃ v, G.degree v = 0 := by
503+
G.minDegree = 0 ↔ ∃ v, G.IsIsolated v := by
504504
refine ⟨fun h ↦ ?_, fun ⟨v, hv⟩ ↦ ?_⟩
505-
· grind [G.exists_minimal_degree_vertex]
506-
· grind [G.minDegree_le_degree v]
505+
· grind [G.exists_minimal_degree_vertex, degree_eq_zero]
506+
· grind [G.minDegree_le_degree v, degree_eq_zero]
507+
508+
variable {G} in
509+
theorem minDegree_eq_zero_iff_support_ne [DecidableRel G.Adj] [Nonempty V] :
510+
G.minDegree = 0 ↔ G.support ≠ .univ := by
511+
simp [Set.ne_univ_iff_exists_notMem, minDegree_eq_zero_iff]
507512

508513
@[simp]
509514
lemma minDegree_top [DecidableEq V] : (⊤ : SimpleGraph V).minDegree = Fintype.card V - 1 := by

0 commit comments

Comments
 (0)