Skip to content

Commit 7542801

Browse files
committed
generalize
1 parent 39ccc4b commit 7542801

1 file changed

Lines changed: 66 additions & 47 deletions

File tree

Mathlib/SetTheory/Cardinal/Pigeonhole.lean

Lines changed: 66 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -124,66 +124,85 @@ theorem le_range_of_union_finset_eq_univ {α β : Type*} [Infinite β] (f : α
124124
@[deprecated (since := "2026-01-17")] alias le_range_of_union_finset_eq_top :=
125125
le_range_of_union_finset_eq_univ
126126

127-
end Cardinal
128-
129-
open Cardinal
130-
131-
/-- **Δ-system lemma**: every uncountable family of finite sets must contain an uncountable
132-
Δ-system, i.e. an uncountable subfamily that share the same pairwise intersection. -/
133-
theorem Uncountable.exists_uncountable_pairwise_inter_eq {α : Type u} {ι : Type v} [DecidableEq α]
134-
[Uncountable ι] (f : ι → Finset α) :
135-
∃ (s : Set ι) (t : Finset α), s.Uncountable ∧ s.Pairwise (f · ∩ f · = t) := by
136-
suffices ∀ (s : Set ι) (n : ℕ), (∀ i ∈ s, (f i).card = n) → s.Uncountable →
137-
∃ s' ⊆ s, ∃ (t : Finset α), s'.Uncountable ∧ s'.Pairwise (f · ∩ f · = t) by
138-
rcases exists_uncountable_fiber (fun i => ULift.up (f i).card) (by simp) (by infer_instance)
139-
with ⟨⟨n⟩, h⟩
140-
rcases this _ n (by grind) h.to_set with ⟨s', -, t, hs, ht⟩
141-
exact ⟨s', t, hs, ht⟩
127+
/-- **Δ-system lemma**: let `κ` be an uncountable regular cardinal, every family of at least κ
128+
finite sets must contain a Δ-system with size κ, i.e. a subfamily that share the same pairwise
129+
intersection. -/
130+
theorem IsRegular.exists_pairwise_inter_eq_finset {α ι : Type u} [DecidableEq α]
131+
(f : ι → Finset α) {κ : Cardinal} (hκ : ℵ₀ < κ) (hκ' : κ.IsRegular) (hι : κ ≤ #ι) :
132+
∃ (s : Set ι) (t : Finset α), #s = κ ∧ s.Pairwise (f · ∩ f · = t) := by
133+
suffices ∀ (s : Set ι) (n : ℕ), (∀ i ∈ s, (f i).card = n) → κ ≤ #s →
134+
∃ s' ⊆ s, ∃ (t : Finset α), κ ≤ #s' ∧ s'.Pairwise (f · ∩ f · = t) by
135+
rcases infinite_pigeonhole_card (fun i => ULift.up (f i).card) κ hι hκ.le
136+
(by simpa [hκ'.cof_eq]) with ⟨⟨n⟩, h⟩
137+
rcases this _ n (by grind) h with ⟨s, -, t, hs, ht⟩
138+
rw [le_mk_iff_exists_subset] at hs
139+
rcases hs with ⟨s', hs', hs''⟩
140+
exact ⟨s', t, hs'', ht.mono hs'⟩
142141
intro s n hn hs
143142
induction n generalizing f s with
144143
| zero =>
145144
exact ⟨s, subset_rfl, ∅, hs, fun i hi j hj hij => by grind⟩
146145
| succ n ih =>
147-
by_cases h : ∃ a, Uncountable {i ∈ s | a ∈ f i}
146+
by_cases h : ∃ a, κ ≤ #{i ∈ s | a ∈ f i}
148147
· rcases h with ⟨a, ha⟩
149-
rcases ih (fun i => f i \ {a}) _ (by grind) ha.to_set with ⟨s', hs', t, hs'', ht⟩
148+
rcases ih (fun i => f i \ {a}) _ (by grind) ha with ⟨s', hs', t, hs'', ht⟩
150149
exact ⟨s', hs'.trans (sep_subset _ _), t ∪ {a}, hs'', fun i hi j hj hij => by
151150
grind [Set.Pairwise]⟩
152-
simp only [coe_setOf, not_exists, not_uncountable_iff] at h
153-
let g : Ordinal.{v} → ι := WellFoundedLT.fix fun j ih =>
151+
simp only [not_exists, not_le] at h
152+
haveI : Nonempty ι := by simpa [mk_ne_zero_iff] using (aleph0_pos.trans hκ |>.trans_le hι).ne'
153+
let g : κ.ord.ToType → ι := WellFoundedLT.fix fun j ih =>
154154
Classical.epsilon fun i => i ∈ s ∧ ∀ k (hk : k < j), f i ∩ f (ih k hk) = ∅
155-
have hg : ∀ j < ω₁, g j ∈ s ∧ ∀ k < j, f (g j) ∩ f (g k) = ∅ := by
156-
intro j hj
157-
suffices {i ∈ s | ∀ k (hk : k < j), f i ∩ f (g k) = ∅}.Nonempty by
158-
simp only [nonempty_def, mem_setOf_eq] at this
155+
have hg : ∀ j, g j ∈ s ∧ ∀ k < j, f (g j) ∩ f (g k) = ∅ := by
156+
intro j
157+
suffices ∃ i ∈ s, ∀ k (hk : k < j), f i ∩ f (g k) = ∅ by
159158
apply Classical.epsilon_spec at this
160159
unfold g
161160
rwa [WellFoundedLT.fix_eq]
162-
rw [setOf_and, setOf_mem_eq, ← diff_compl, ← diff_self_inter]
163-
refine (hs.diff ?_).nonempty
164-
simp_rw [compl_setOf, not_forall, setOf_exists, ← mem_Iio, inter_iUnion₂]
165-
refine .biUnion ?_ fun a ha => ?_
166-
· rwa [← le_aleph0_iff_set_countable, mk_Iio_ordinal, lift_le_aleph0, ← lt_succ_iff,
167-
succ_aleph0, ← lt_ord, ord_aleph]
168-
· simp_rw [Finset.eq_empty_iff_forall_notMem, Finset.mem_inter, not_and', not_forall,
169-
← SetLike.mem_coe, setOf_exists, not_not, inter_iUnion₂]
170-
refine .biUnion (Finset.finite_toSet _).countable fun i hi => ?_
171-
simp_rw [SetLike.mem_coe, inter_setOf_eq_sep]
172-
exact h i
173-
have hg' : InjOn g (Iio ω₁) := by
174-
intro j hj k hk hjk
161+
suffices (s \ ⋃ k : Set.Iio j, ⋃ a : f (g k), {i ∈ s | a.1 ∈ f i}).Nonempty by
162+
simp only [nonempty_def, mem_diff, mem_iUnion, mem_setOf_eq, Subtype.exists, not_exists]
163+
at this
164+
grind
165+
apply Cardinal.diff_nonempty_of_mk_lt_mk
166+
apply hs.trans_lt'
167+
apply mk_iUnion_le_sum_mk.trans_lt
168+
apply sum_lt_of_isRegular hκ' (mk_Iio_ord_toType _)
169+
intro ⟨k, hk⟩
170+
apply mk_iUnion_le_sum_mk.trans_lt
171+
apply sum_lt_of_isRegular hκ' (hκ.trans_le' (by simp))
172+
intro
173+
apply h
174+
have hg' : g.Injective := by
175+
intro j k hjk
175176
by_contra hjk'
176177
wlog hjk'' : k < j generalizing j k
177-
· exact this hk hj hjk.symm (ne_comm.1 hjk') (lt_of_le_of_ne (le_of_not_gt hjk'') hjk')
178-
have := (hg j hj).2 k hjk''
178+
· exact this hjk.symm (ne_comm.1 hjk') (lt_of_le_of_ne (le_of_not_gt hjk'') hjk')
179+
have := (hg j).2 k hjk''
179180
simp only [← hjk, Finset.inter_self] at this
180-
simpa [this] using hn _ (hg j hj).1
181-
refine ⟨g '' Iio ω₁, by grind, ∅, .image ?_ hg', Pairwise.image ?_⟩
182-
· rw [← uncountable_coe_iff, ← aleph0_lt_mk_iff, mk_Iio_ordinal, aleph0_lt_lift, card_omega]
183-
exact aleph0_lt_aleph_one
184-
intro j hj k hk hjk
185-
simp only [Function.onFun_apply]
181+
simpa [this] using hn _ (hg j).1
182+
refine ⟨range g, by grind, ∅, by rw [mk_range_eq _ hg', mk_ord_toType],
183+
Pairwise.range_pairwise ?_⟩
184+
intro j k hjk
186185
wlog hjk' : k < j generalizing j k
187-
· rw [Finset.inter_comm]
188-
exact this hk hj hjk.symm (lt_of_le_of_ne (le_of_not_gt hjk') hjk)
189-
exact (hg j hj).2 k hjk'
186+
· rw [Function.onFun_apply, Finset.inter_comm]
187+
exact this hjk.symm (lt_of_le_of_ne (le_of_not_gt hjk') hjk)
188+
exact (hg j).2 k hjk'
189+
190+
end Cardinal
191+
192+
open Cardinal
193+
194+
/-- **Δ-system lemma** for uncountable families, i.e. `κ = ℵ₁`. -/
195+
theorem Uncountable.exists_uncountable_pairwise_inter_eq_finset {α : Type u} {ι : Type v}
196+
[DecidableEq α] [Uncountable ι] (f : ι → Finset α) :
197+
∃ (s : Set ι) (t : Finset α), s.Uncountable ∧ s.Pairwise (f · ∩ f · = t) := by
198+
rcases isRegular_aleph_one.exists_pairwise_inter_eq_finset
199+
(fun i : ULift.{u} ι => Equiv.ulift.symm.finsetCongr (f i.down))
200+
aleph0_lt_aleph_one (by simp [← succ_aleph0]) with ⟨s, t, hs, ht⟩
201+
refine ⟨Equiv.Set.congr Equiv.ulift s, Equiv.ulift.finsetCongr t, ?_, ?_⟩
202+
· rw [← uncountable_coe_iff, ← aleph0_lt_mk_iff, Equiv.Set.congr_apply, ← Cardinal.lift_lt,
203+
mk_image_eq_lift _ _ Equiv.ulift.injective, hs, lift_aleph0, lift_aleph, Ordinal.lift_one]
204+
exact aleph0_lt_aleph_one
205+
· apply Pairwise.image
206+
simp_rw [← Equiv.ulift.finsetCongr.symm_apply_eq, Equiv.finsetCongr_symm,
207+
Equiv.finsetCongr_apply, Finset.map_inter]
208+
exact ht

0 commit comments

Comments
 (0)