Skip to content

Commit c0f1540

Browse files
feat(Combinatorics/SimpleGraph): edges of an induced subgraph as a filter (#42135)
Add two lemmas describing the edges of a finite simple graph `G` whose vertices all lie in a finset `s`.
1 parent c997a23 commit c0f1540

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Mathlib/Combinatorics/SimpleGraph/Finite.lean

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,20 @@ theorem le_minDegree_induce_of_support_subset (h : G.support ⊆ s) :
715715
grw [G.minDegree_le_degree v, degree_induce_of_neighborSet_subset]
716716
grw [neighborSet_subset_support, h]
717717

718+
theorem filter_edgeFinset_toFinset_subset [DecidableEq V] (s : Finset V) :
719+
{e ∈ G.edgeFinset | e.toFinset ⊆ s} = G.edgeFinset ∩ s.sym2 := by
720+
simp [subset_iff, ← mem_sym2_iff, filter_mem_eq_inter]
721+
722+
/-- The edges whose vertices lie in `s` are in bijection with the edges of the induced
723+
subgraph `G.induce s`. -/
724+
theorem card_filter_edgeFinset_toFinset_subset [DecidableEq V] (s : Finset V) :
725+
#{e ∈ G.edgeFinset | e.toFinset ⊆ s} = #(G.induce ↑s).edgeFinset := by
726+
have h := congrArg Finset.card (map_edgeFinset_induce (s := (↑s : Set V)) (G := G))
727+
rw [card_map, toFinset_coe] at h
728+
rw [filter_edgeFinset_toFinset_subset]
729+
convert h.symm using 1
730+
congr!
731+
718732
end Support
719733

720734
section Map

0 commit comments

Comments
 (0)