Skip to content

Commit 5096e0b

Browse files
committed
degrees of G.induce s
1 parent ebeb0db commit 5096e0b

3 files changed

Lines changed: 54 additions & 3 deletions

File tree

Mathlib/Combinatorics/SimpleGraph/Copy.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,15 @@ theorem Hom.minDegree_le [Fintype V] [Fintype W] [DecidableRel G.Adj] [Decidable
345345
{f : G →g H} (hf : Function.Bijective f) : G.minDegree ≤ H.minDegree :=
346346
Copy.minDegree_le (f := ⟨f, hf.injective⟩) hf.surjective
347347

348+
theorem maxDegree_induce_of_support_subset [Fintype V] [DecidableRel G.Adj] {s : Set V}
349+
[DecidablePred (· ∈ s)] (h : G.support ⊆ s) : (G.induce s).maxDegree = G.maxDegree := by
350+
apply le_antisymm <| Copy.max_degree_le <| Embedding.induce s |>.toCopy
351+
refine G.maxDegree_le_of_forall_degree_le _ fun v ↦ ?_
352+
by_cases hv : G.IsIsolated v
353+
· simp [hv]
354+
grw [← degree_le_maxDegree _ ⟨v, h <| G.mem_support_iff_not_isIsolated.mpr hv⟩,
355+
degree_induce_of_neighborSet_subset <| G.neighborSet_subset_support v |>.trans h]
356+
348357
end IsContained
349358

350359
section Free

Mathlib/Combinatorics/SimpleGraph/Degree.lean

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,17 +180,19 @@ theorem edegree_le_maxEDegree : G.edegree v ≤ G.maxEDegree :=
180180
theorem minEDegree_le_edegree : G.minEDegree ≤ G.edegree v :=
181181
iInf_le G.edegree v
182182

183-
variable {v} in
183+
variable {G v} in
184184
theorem maxEDegree_eq_top_of_edegree_eq_top (h : G.edegree v = ⊤) : G.maxEDegree = ⊤ :=
185185
eq_top_iff.mpr <| G.edegree_le_maxEDegree v |>.trans_eq' h
186186

187-
variable {v} in
187+
variable {G v} in
188188
theorem minEDegree_eq_zero_of_edegree_eq_zero (h : G.edegree v = 0) : G.minEDegree = 0 :=
189189
nonpos_iff_eq_zero.mp <| G.minEDegree_le_edegree v |>.trans_eq h
190190

191+
variable {G} in
191192
theorem maxEDegree_le_of_forall_edegree_le {n : ℕ∞} (h : ∀ v, G.edegree v ≤ n) : G.maxEDegree ≤ n :=
192193
iSup_le h
193194

195+
variable {G} in
194196
theorem le_minEDegree_of_forall_le_edegree {n : ℕ∞} (h : ∀ v, n ≤ G.edegree v) : n ≤ G.minEDegree :=
195197
le_iInf h
196198

@@ -323,7 +325,7 @@ theorem minEDegree_le_encard_edgeSet [Nonempty V] (G : SimpleGraph V) :
323325
exact hv ▸ G.edegree_le_encard_edgeSet v
324326

325327
theorem maxEDegree_le_encard_edgeSet : G.maxEDegree ≤ G.edgeSet.encard :=
326-
maxEDegree_le_of_forall_edegree_le _ G.edegree_le_encard_edgeSet
328+
maxEDegree_le_of_forall_edegree_le G.edegree_le_encard_edgeSet
327329

328330
theorem minEDegree_le_maxEDegree [Nonempty V] (G : SimpleGraph V) :
329331
G.minEDegree ≤ G.maxEDegree := by
@@ -358,4 +360,33 @@ theorem IsRegularOfDegree.minEDegree_eq [Nonempty V] [G.LocallyFinite] {d : ℕ}
358360
(h : G.IsRegularOfDegree d) : G.minEDegree = d := by
359361
simp [minEDegree_eq_iInf, h.edegree_eq]
360362

363+
section Induce
364+
365+
variable {s : Set V}
366+
367+
variable {G} in
368+
theorem edegree_induce_of_neighborSet_subset {v : s} (h : G.neighborSet v ⊆ s) :
369+
(G.induce s).edegree v = G.edegree v := by
370+
rw [← encard_neighborSet, ← encard_neighborSet, neighborSet_induce,
371+
Set.encard_preimage_of_injective_subset_range Subtype.val_injective <| by simpa]
372+
373+
variable {G} in
374+
theorem maxEDegree_induce_of_support_subset (h : G.support ⊆ s) :
375+
(G.induce s).maxEDegree = G.maxEDegree := by
376+
apply le_antisymm <| Embedding.induce s |>.isContained.maxEDegree_le
377+
refine G.maxEDegree_le_of_forall_edegree_le fun v ↦ ?_
378+
by_cases hv : G.IsIsolated v
379+
· simp [hv]
380+
grw [← edegree_le_maxEDegree _ ⟨v, h <| G.mem_support_iff_not_isIsolated.mpr hv⟩,
381+
edegree_induce_of_neighborSet_subset <| G.neighborSet_subset_support v |>.trans h]
382+
383+
variable {G} in
384+
theorem le_minEDegree_induce_of_support_subset (h : G.support ⊆ s) :
385+
G.minEDegree ≤ (G.induce s).minEDegree := by
386+
refine le_minEDegree_of_forall_le_edegree fun v ↦ ?_
387+
grw [G.minEDegree_le_edegree v, edegree_induce_of_neighborSet_subset]
388+
grw [neighborSet_subset_support, h]
389+
390+
end Induce
391+
361392
end SimpleGraph

Mathlib/Combinatorics/SimpleGraph/Finite.lean

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,17 @@ theorem degree_induce_support (v : G.support) :
652652
(G.induce G.support).degree v = G.degree v :=
653653
degree_induce_of_support_subset subset_rfl v
654654

655+
theorem le_minDegree_induce_of_support_subset (h : G.support ⊆ s) :
656+
G.minDegree ≤ (G.induce s).minDegree := by
657+
cases isEmpty_or_nonempty V
658+
· simp
659+
rcases s.eq_empty_or_nonempty with (rfl | hs)
660+
· simp [minDegree_eq_zero_iff_support_ne, Set.subset_empty_iff.mp h, Set.empty_ne_univ]
661+
have := hs.to_subtype
662+
refine le_minDegree_of_forall_le_degree _ _ fun v ↦ ?_
663+
grw [G.minDegree_le_degree v, degree_induce_of_neighborSet_subset]
664+
grw [neighborSet_subset_support, h]
665+
655666
end Support
656667

657668
section Map

0 commit comments

Comments
 (0)