@@ -45,6 +45,10 @@ lemma existsUnique_rep (hrep : Represents s C) (h : c ∈ C) : ∃! x, x ∈ s
45
45
simp only [Set.mem_inter_iff, hx, SetLike.mem_coe, mem_supp_iff, and_self, and_imp, true_and]
46
46
exact fun y hy hyx ↦ hrep.2 .1 hy hx hyx
47
47
48
+ lemma exists_inter_eq_singleton (hrep : Represents s C) (h : c ∈ C) : ∃ x, s ∩ c.supp = {x} := by
49
+ obtain ⟨a, ha⟩ := existsUnique_rep hrep h
50
+ aesop
51
+
48
52
lemma disjoint_supp_of_not_mem (hrep : Represents s C) (h : c ∉ C) : Disjoint s c.supp := by
49
53
rw [Set.disjoint_left]
50
54
intro a ha hc
@@ -54,17 +58,16 @@ lemma disjoint_supp_of_not_mem (hrep : Represents s C) (h : c ∉ C) : Disjoint
54
58
55
59
lemma ncard_inter (hrep : Represents s C) (h : c ∈ C) : (s ∩ c.supp).ncard = 1 := by
56
60
rw [Set.ncard_eq_one]
57
- obtain ⟨a, ha⟩ := hrep.existsUnique_rep h
58
- aesop
61
+ exact exists_inter_eq_singleton hrep h
59
62
60
- lemma ncard_sdiff_of_mem [Fintype V] (hrep : Represents s C) (h : c ∈ C) :
63
+ lemma ncard_sdiff_of_mem (hrep : Represents s C) (h : c ∈ C) :
61
64
(c.supp \ s).ncard = c.supp.ncard - 1 := by
62
- simp [← Set.ncard_inter_add_ncard_diff_eq_ncard c.supp s (Set.toFinite _), Set.inter_comm,
63
- ncard_inter hrep h]
65
+ obtain ⟨a, ha⟩ := exists_inter_eq_singleton hrep h
66
+ rw [← Set.diff_inter_self_eq_diff, ha, Set.ncard_diff, Set.ncard_singleton]
67
+ simp [← ha]
64
68
65
- lemma ncard_sdiff_of_not_mem [Fintype V] (hrep : Represents s C) (h : c ∉ C) :
69
+ lemma ncard_sdiff_of_not_mem (hrep : Represents s C) (h : c ∉ C) :
66
70
(c.supp \ s).ncard = c.supp.ncard := by
67
- simp [← Set.ncard_inter_add_ncard_diff_eq_ncard c.supp s (Set.toFinite _), Set.inter_comm,
68
- Set.disjoint_iff_inter_eq_empty.mp (hrep.disjoint_supp_of_not_mem h)]
71
+ rw [(disjoint_supp_of_not_mem hrep h).sdiff_eq_right]
69
72
70
73
end SimpleGraph.ConnectedComponent.Represents
0 commit comments