@@ -385,10 +385,8 @@ theorem exists_minimal_degree_vertex [DecidableRel G.Adj] [Nonempty V] :
385385 grind [minDegree, WithTop.untopD_coe, min_mem_image_coe <| univ_nonempty.image (G.degree ·)]
386386
387387/-- The minimum degree in the graph is at most the degree of any particular vertex. -/
388- theorem minDegree_le_degree [DecidableRel G.Adj] (v : V) : G.minDegree ≤ G.degree v := by
389- obtain ⟨t, ht⟩ := Finset.min_of_mem (mem_image_of_mem (fun v => G.degree v) (mem_univ v))
390- have := Finset.min_le_of_eq (mem_image_of_mem _ (mem_univ v)) ht
391- rwa [minDegree, ht]
388+ theorem minDegree_le_degree [DecidableRel G.Adj] (v : V) : G.minDegree ≤ G.degree v :=
389+ WithTop.untopD_le <| Finset.min_le <| mem_image_of_mem (G.degree ·) <| mem_univ v
392390
393391/-- In a nonempty graph, if `k` is at most the degree of every vertex, it is at most the minimum
394392degree. Note the assumption that the graph is nonempty is necessary as long as `G.minDegree` is
@@ -399,14 +397,16 @@ theorem le_minDegree_of_forall_le_degree [DecidableRel G.Adj] [Nonempty V] (k :
399397 rw [hv]
400398 apply h
401399
402- /-- If there are no vertices then the `minDegree` is zero. -/
403400@[simp]
404- lemma minDegree_of_isEmpty [DecidableRel G.Adj] [IsEmpty V] : G.minDegree = 0 := by
405- rw [minDegree, WithTop.untopD_eq_self_iff]
406- simp
401+ lemma minDegree_of_subsingleton [DecidableRel G.Adj] [Subsingleton V] : G.minDegree = 0 := by
402+ cases isEmpty_or_nonempty V <;>
403+ simp [minDegree, Finset.image_const]
404+
405+ @ [deprecated (since := "2026-06-15" )] alias minDegree_of_isEmpty := minDegree_of_subsingleton
407406
408407variable {G} in
409408/-- If `G` is a subgraph of `H` then `G.minDegree ≤ H.minDegree`. -/
409+ @[gcongr]
410410lemma minDegree_le_minDegree {H : SimpleGraph V} [DecidableRel G.Adj] [DecidableRel H.Adj]
411411 (hle : G ≤ H) : G.minDegree ≤ H.minDegree := by
412412 cases isEmpty_or_nonempty V
@@ -438,8 +438,11 @@ theorem degree_le_maxDegree [DecidableRel G.Adj] (v : V) : G.degree v ≤ G.maxD
438438 WithBot.le_unbotD <| Finset.le_max <| mem_image_of_mem (G.degree ·) <| mem_univ v
439439
440440@[simp]
441- lemma maxDegree_of_isEmpty [DecidableRel G.Adj] [IsEmpty V] : G.maxDegree = 0 := by
442- rw [maxDegree, univ_eq_empty, image_empty, max_empty, WithBot.unbotD_bot]
441+ lemma maxDegree_of_subsingleton [DecidableRel G.Adj] [Subsingleton V] : G.maxDegree = 0 := by
442+ cases isEmpty_or_nonempty V <;>
443+ simp [maxDegree, Finset.image_const]
444+
445+ @ [deprecated (since := "2026-06-15" )] alias maxDegree_of_isEmpty := maxDegree_of_subsingleton
443446
444447/-- In a graph, if `k` is at least the degree of every vertex, then it is at least the maximum
445448degree. -/
@@ -458,6 +461,16 @@ theorem IsRegularOfDegree.maxDegree_eq [Nonempty V] [DecidableRel G.Adj] {d :
458461lemma maxDegree_bot_eq_zero : (⊥ : SimpleGraph V).maxDegree = 0 :=
459462 Nat.le_zero.1 <| maxDegree_le_of_forall_degree_le _ _ (by simp)
460463
464+ variable {G} in
465+ @[simp]
466+ theorem maxDegree_eq_zero_iff [DecidableRel G.Adj] : G.maxDegree = 0 ↔ G = ⊥ := by
467+ refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩
468+ · rw [eq_bot_iff_isIsolated]
469+ intro v
470+ grind [degree_eq_zero, G.degree_le_maxDegree v]
471+ · convert maxDegree_bot_eq_zero
472+ assumption
473+
461474@[simp]
462475lemma maxDegree_top [DecidableEq V] : (⊤ : SimpleGraph V).maxDegree = Fintype.card V - 1 := by
463476 cases isEmpty_or_nonempty V
@@ -478,6 +491,18 @@ theorem IsRegularOfDegree.minDegree_eq [Nonempty V] [DecidableRel G.Adj] {d :
478491lemma minDegree_bot_eq_zero : (⊥ : SimpleGraph V).minDegree = 0 :=
479492 Nat.le_zero.1 <| (minDegree_le_maxDegree _).trans (by simp)
480493
494+ variable {G} in
495+ theorem minDegree_eq_zero_iff [DecidableRel G.Adj] [Nonempty V] :
496+ G.minDegree = 0 ↔ ∃ v, G.IsIsolated v := by
497+ refine ⟨fun h ↦ ?_, fun ⟨v, hv⟩ ↦ ?_⟩
498+ · grind [G.exists_minimal_degree_vertex, degree_eq_zero]
499+ · grind [G.minDegree_le_degree v, degree_eq_zero]
500+
501+ variable {G} in
502+ theorem minDegree_eq_zero_iff_support_ne [DecidableRel G.Adj] [Nonempty V] :
503+ G.minDegree = 0 ↔ G.support ≠ .univ := by
504+ simp [Set.ne_univ_iff_exists_notMem, minDegree_eq_zero_iff]
505+
481506@[simp]
482507lemma minDegree_top [DecidableEq V] : (⊤ : SimpleGraph V).minDegree = Fintype.card V - 1 := by
483508 cases isEmpty_or_nonempty V
@@ -613,6 +638,17 @@ theorem degree_induce_support (v : G.support) :
613638 (G.induce G.support).degree v = G.degree v :=
614639 degree_induce_of_support_subset subset_rfl v
615640
641+ theorem le_minDegree_induce_of_support_subset (h : G.support ⊆ s) :
642+ G.minDegree ≤ (G.induce s).minDegree := by
643+ cases isEmpty_or_nonempty V
644+ · simp
645+ rcases s.eq_empty_or_nonempty with (rfl | hs)
646+ · simp [minDegree_eq_zero_iff_support_ne, Set.subset_empty_iff.mp h, Set.empty_ne_univ]
647+ have := hs.to_subtype
648+ refine le_minDegree_of_forall_le_degree _ _ fun v ↦ ?_
649+ grw [G.minDegree_le_degree v, degree_induce_of_neighborSet_subset]
650+ grw [neighborSet_subset_support, h]
651+
616652end Support
617653
618654section Map
0 commit comments