@@ -107,12 +107,12 @@ lemma le_card_filter [Nonempty W] [Nonempty α]
107107 true_and, eq_comm, ← Sum.isRight_iff] at hx
108108 simpa [hx, Sum.not_isLeft.mpr hx] using h_le hadj
109109 have h_card_filter_subset_eq (x) (hx : x ∈ univ.map .inr) :
110- #{x ∈ (univ.map .inl).powerset ∩ (G.neighborFinset x).powerset | #x = card α}
110+ #{x ∈ {y ∈ (univ.map .inl).powerset | y ∈ (G.neighborFinset x).powerset} | #x = card α}
111111 = #{x ∈ (G.neighborFinset x).powerset | #x = card α} := by
112- simp_rw [inter_eq_right.mpr <| h_subset x hx]
112+ simp_rw [filter_mem_eq_inter, inter_eq_right.mpr <| h_subset x hx]
113113 simp_rw [card_filter, sum_product_right, ← card_filter, powersetCard_eq_filter,
114- filter_comm, ← mem_powerset, filter_mem_eq_inter, sum_congr rfl h_card_filter_subset_eq,
115- ← powersetCard_eq_filter, card_powersetCard, card_neighborFinset_eq_degree, Nat.cast_sum,
114+ filter_comm, ← mem_powerset, sum_congr rfl h_card_filter_subset_eq, ← powersetCard_eq_filter ,
115+ card_powersetCard, card_neighborFinset_eq_degree, Nat.cast_sum,
116116 ← le_inv_mul_iff₀ (mod_cast card_pos : 0 < (card W : ℝ)), mul_sum,
117117 div_eq_mul_inv _ (card W : ℝ), mul_comm _ (card W : ℝ)⁻¹, mul_sum, sum_map,
118118 Function.Embedding.inr_apply]
@@ -133,8 +133,8 @@ lemma card_edgeFinset_le_bound_of_completeBipartiteGraph_free [Nonempty α] [Non
133133 ← Sum.isRight_eq_false, bot_adj, iff_false, not_or, not_and_or, Bool.not_eq_false,
134134 Sum.isRight_iff, IsEmpty.exists_iff, not_false_eq_true, true_or, and_true, or_true,
135135 implies_true]
136- rw [h_bot, le_bot_iff ] at h_le
137- simp_rw [Set.toFinset_card , h_le, edgeSet_bot, ← Set.toFinset_card,
136+ simp_rw [h_bot, le_iff_adj, bot_adj, imp_false, ← eq_bot_iff_forall_not_adj ] at h_le
137+ simp_rw [edgeFinset_card , h_le, edgeSet_bot, ← Set.toFinset_card,
138138 Set.toFinset_empty, Finset.card_empty, Nat.cast_zero]
139139 exact bound_nonneg (card V) (card W)
140140 (Nat.one_le_cast.mpr card_pos) (Nat.one_le_cast.mpr card_pos)
@@ -146,8 +146,10 @@ lemma card_edgeFinset_le_bound_of_completeBipartiteGraph_free [Nonempty α] [Non
146146 coe_univ, Set.image_univ, Set.mem_range, eq_comm, ← Sum.isLeft_iff, ← Sum.isRight_iff]
147147 exact h_le hadj
148148 have h_sum_degrees_eq_card_edges : ∑ w : W, ↑(G.degree (Sum.inr w)) = #G.edgeFinset := by
149- simp_rw [← isBipartiteWith_sum_degrees_eq_card_edges' h_isBipartiteWith,
150- Finset.sum_map, Function.Embedding.inr_apply]
149+ rw [← isBipartiteWith_sum_degrees_eq_card_edges' h_isBipartiteWith, Finset.sum_map]
150+ conv =>
151+ enter [2 , 2 , x]
152+ rw [Function.Embedding.inr_apply]
151153 rcases lt_or_ge (∑ w : W, G.degree (.inr w) : ℝ) ((card α - 1 ) * (card W) : ℝ)
152154 with h_sum_lt | h_avg
153155 -- if avg degree less than `card a - 1`
0 commit comments