@@ -6,6 +6,7 @@ Authors: Josha Dekker
6
6
import Mathlib.Order.Filter.Basic
7
7
import Mathlib.Order.Filter.CountableInter
8
8
import Mathlib.SetTheory.Cardinal.Ordinal
9
+ import Mathlib.SetTheory.Cardinal.Cofinality
9
10
10
11
/-!
11
12
# Filters with a cardinal intersection property
@@ -73,12 +74,16 @@ theorem cardinalInterFilter_aleph_one_iff :
73
74
CardinalInterFilter.cardinal_sInter_mem S ((countable_iff_lt_aleph_one S).1 h) a⟩,
74
75
fun _ ↦ CountableInterFilter.toCardinalInterFilter l⟩
75
76
76
- /-- Every CardinalInterFilter for some c also is a CardinalInterFilter for some a < c -/
77
- theorem CardinalInterFilter.of_CardinalInterFilter_of_lt (l : Filter α) [CardinalInterFilter l c]
78
- {a : Cardinal.{u}} (hac : a < c) :
77
+ /-- Every CardinalInterFilter for some c also is a CardinalInterFilter for some a ≤ c -/
78
+ theorem CardinalInterFilter.of_cardinalInterFilter_of_le (l : Filter α) [CardinalInterFilter l c]
79
+ {a : Cardinal.{u}} (hac : a ≤ c) :
79
80
CardinalInterFilter l a where
80
81
cardinal_sInter_mem :=
81
- fun S hS a ↦ CardinalInterFilter.cardinal_sInter_mem S (lt_trans hS hac) a
82
+ fun S hS a ↦ CardinalInterFilter.cardinal_sInter_mem S (lt_of_lt_of_le hS hac) a
83
+
84
+ theorem CardinalInterFilter.of_cardinalInterFilter_of_lt (l : Filter α) [CardinalInterFilter l c]
85
+ {a : Cardinal.{u}} (hac : a < c) : CardinalInterFilter l a :=
86
+ CardinalInterFilter.of_cardinalInterFilter_of_le l (hac.le)
82
87
83
88
namespace Filter
84
89
@@ -87,8 +92,7 @@ variable [CardinalInterFilter l c]
87
92
theorem cardinal_iInter_mem {s : ι → Set α} (hic : #ι < c) :
88
93
(⋂ i, s i) ∈ l ↔ ∀ i, s i ∈ l := by
89
94
rw [← sInter_range _]
90
- apply Iff.trans
91
- apply cardinal_sInter_mem (lt_of_le_of_lt Cardinal.mk_range_le hic)
95
+ apply (cardinal_sInter_mem (lt_of_le_of_lt Cardinal.mk_range_le hic)).trans
92
96
exact forall_mem_range
93
97
94
98
theorem cardinal_bInter_mem {S : Set ι} (hS : #S < c)
@@ -152,4 +156,184 @@ theorem EventuallyEq.cardinal_bInter {S : Set ι} (hS : #S < c)
152
156
(EventuallyLE.cardinal_bInter hS fun i hi => (h i hi).le).antisymm
153
157
(EventuallyLE.cardinal_bInter hS fun i hi => (h i hi).symm.le)
154
158
159
+ /-- Construct a filter with cardinal `c` intersection property. This constructor deduces
160
+ `Filter.univ_sets` and `Filter.inter_sets` from the cardinal `c` intersection property. -/
161
+ def ofCardinalInter (l : Set (Set α)) (hc : 2 < c)
162
+ (hl : ∀ S : Set (Set α), (#S < c) → S ⊆ l → ⋂₀ S ∈ l)
163
+ (h_mono : ∀ s t, s ∈ l → s ⊆ t → t ∈ l) : Filter α where
164
+ sets := l
165
+ univ_sets :=
166
+ sInter_empty ▸ hl ∅ (mk_eq_zero (∅ : Set (Set α)) ▸ lt_trans zero_lt_two hc) (empty_subset _)
167
+ sets_of_superset := h_mono _ _
168
+ inter_sets {s t} hs ht := sInter_pair s t ▸ by
169
+ apply hl _ (?_) (insert_subset_iff.2 ⟨hs, singleton_subset_iff.2 ht⟩)
170
+ have : #({s, t} : Set (Set α)) ≤ 2 := by
171
+ calc
172
+ _ ≤ #({t} : Set (Set α)) + 1 := Cardinal.mk_insert_le
173
+ _ = 2 := by norm_num
174
+ exact lt_of_le_of_lt this hc
175
+
176
+ instance cardinalInter_ofCardinalInter (l : Set (Set α)) (hc : 2 < c)
177
+ (hl : ∀ S : Set (Set α), (#S < c) → S ⊆ l → ⋂₀ S ∈ l)
178
+ (h_mono : ∀ s t, s ∈ l → s ⊆ t → t ∈ l) :
179
+ CardinalInterFilter (Filter.ofCardinalInter l hc hl h_mono) c :=
180
+ ⟨hl⟩
181
+
182
+ @[simp]
183
+ theorem mem_ofCardinalInter {l : Set (Set α)} (hc : 2 < c)
184
+ (hl : ∀ S : Set (Set α), (#S < c) → S ⊆ l → ⋂₀ S ∈ l) (h_mono : ∀ s t, s ∈ l → s ⊆ t → t ∈ l)
185
+ {s : Set α} : s ∈ Filter.ofCardinalInter l hc hl h_mono ↔ s ∈ l :=
186
+ Iff.rfl
187
+
188
+ /-- Construct a filter with cardinal `c` intersection property.
189
+ Similarly to `Filter.comk`, a set belongs to this filter if its complement satisfies the property.
190
+ Similarly to `Filter.ofCardinalInter`,
191
+ this constructor deduces some properties from the cardinal `c` intersection property
192
+ which becomes the cardinal `c` union property because we take complements of all sets. -/
193
+ def ofCardinalUnion (l : Set (Set α)) (hc : 2 < c)
194
+ (hUnion : ∀ S : Set (Set α), (#S < c) → (∀ s ∈ S, s ∈ l) → ⋃₀ S ∈ l)
195
+ (hmono : ∀ t ∈ l, ∀ s ⊆ t, s ∈ l) : Filter α := by
196
+ refine .ofCardinalInter {s | sᶜ ∈ l} hc (fun S hSc hSp ↦ ?_) fun s t ht hsub ↦ ?_
197
+ · rw [mem_setOf_eq, compl_sInter]
198
+ apply hUnion (compl '' S) (lt_of_le_of_lt mk_image_le hSc)
199
+ intro s hs
200
+ rw [mem_image] at hs
201
+ rcases hs with ⟨t, ht, rfl⟩
202
+ apply hSp ht
203
+ · rw [mem_setOf_eq]
204
+ rw [← compl_subset_compl] at hsub
205
+ exact hmono sᶜ ht tᶜ hsub
206
+
207
+ instance cardinalInter_ofCardinalUnion (l : Set (Set α)) (hc : 2 < c) (h₁ h₂) :
208
+ CardinalInterFilter (Filter.ofCardinalUnion l hc h₁ h₂) c :=
209
+ cardinalInter_ofCardinalInter ..
210
+
211
+ @[simp]
212
+ theorem mem_ofCardinalUnion {l : Set (Set α)} (hc : 2 < c) {hunion hmono s} :
213
+ s ∈ ofCardinalUnion l hc hunion hmono ↔ l sᶜ :=
214
+ Iff.rfl
215
+
216
+ instance cardinalInterFilter_principal (s : Set α) : CardinalInterFilter (𝓟 s) c :=
217
+ ⟨fun _ _ hS => subset_sInter hS⟩
218
+
219
+ instance cardinalInterFilter_bot : CardinalInterFilter (⊥ : Filter α) c := by
220
+ rw [← principal_empty]
221
+ apply cardinalInterFilter_principal
222
+
223
+ instance cardinalInterFilter_top : CardinalInterFilter (⊤ : Filter α) c := by
224
+ rw [← principal_univ]
225
+ apply cardinalInterFilter_principal
226
+
227
+ instance (l : Filter β) [CardinalInterFilter l c] (f : α → β) :
228
+ CardinalInterFilter (comap f l) c := by
229
+ refine ⟨fun S hSc hS => ?_⟩
230
+ choose! t htl ht using hS
231
+ refine ⟨_, (cardinal_bInter_mem hSc).2 htl, ?_⟩
232
+ simpa [preimage_iInter] using iInter₂_mono ht
233
+
234
+ instance (l : Filter α) [CardinalInterFilter l c] (f : α → β) :
235
+ CardinalInterFilter (map f l) c := by
236
+ refine ⟨fun S hSc hS => ?_⟩
237
+ simp only [mem_map, sInter_eq_biInter, preimage_iInter₂] at hS ⊢
238
+ exact (cardinal_bInter_mem hSc).2 hS
239
+
240
+ /-- Infimum of two `CardinalInterFilter`s is a `CardinalInterFilter`. This is useful, e.g.,
241
+ to automatically get an instance for `residual α ⊓ 𝓟 s`. -/
242
+ instance cardinalInterFilter_inf_eq (l₁ l₂ : Filter α) [CardinalInterFilter l₁ c]
243
+ [CardinalInterFilter l₂ c] : CardinalInterFilter (l₁ ⊓ l₂) c := by
244
+ refine ⟨fun S hSc hS => ?_⟩
245
+ choose s hs t ht hst using hS
246
+ replace hs : (⋂ i ∈ S, s i ‹_›) ∈ l₁ := (cardinal_bInter_mem hSc).2 hs
247
+ replace ht : (⋂ i ∈ S, t i ‹_›) ∈ l₂ := (cardinal_bInter_mem hSc).2 ht
248
+ refine mem_of_superset (inter_mem_inf hs ht) (subset_sInter fun i hi => ?_)
249
+ rw [hst i hi]
250
+ apply inter_subset_inter <;> exact iInter_subset_of_subset i (iInter_subset _ _)
251
+
252
+ instance cardinalInterFilter_inf (l₁ l₂ : Filter α) {c₁ c₂ : Cardinal.{u}}
253
+ [CardinalInterFilter l₁ c₁] [CardinalInterFilter l₂ c₂] : CardinalInterFilter (l₁ ⊓ l₂)
254
+ (c₁ ⊓ c₂) := by
255
+ have : CardinalInterFilter l₁ (c₁ ⊓ c₂) :=
256
+ CardinalInterFilter.of_cardinalInterFilter_of_le l₁ inf_le_left
257
+ have : CardinalInterFilter l₂ (c₁ ⊓ c₂) :=
258
+ CardinalInterFilter.of_cardinalInterFilter_of_le l₂ inf_le_right
259
+ exact cardinalInterFilter_inf_eq _ _
260
+
261
+ /-- Supremum of two `CardinalInterFilter`s is a `CardinalInterFilter`. -/
262
+ instance cardinalInterFilter_sup_eq (l₁ l₂ : Filter α) [CardinalInterFilter l₁ c]
263
+ [CardinalInterFilter l₂ c] : CardinalInterFilter (l₁ ⊔ l₂) c := by
264
+ refine ⟨fun S hSc hS => ⟨?_, ?_⟩⟩ <;> refine (cardinal_sInter_mem hSc).2 fun s hs => ?_
265
+ exacts [(hS s hs).1 , (hS s hs).2 ]
266
+
267
+ instance cardinalInterFilter_sup (l₁ l₂ : Filter α) {c₁ c₂ : Cardinal.{u}}
268
+ [CardinalInterFilter l₁ c₁] [CardinalInterFilter l₂ c₂] :
269
+ CardinalInterFilter (l₁ ⊔ l₂) (c₁ ⊓ c₂) := by
270
+ have : CardinalInterFilter l₁ (c₁ ⊓ c₂) :=
271
+ CardinalInterFilter.of_cardinalInterFilter_of_le l₁ inf_le_left
272
+ have : CardinalInterFilter l₂ (c₁ ⊓ c₂) :=
273
+ CardinalInterFilter.of_cardinalInterFilter_of_le l₂ inf_le_right
274
+ exact cardinalInterFilter_sup_eq _ _
275
+
276
+ variable (g : Set (Set α))
277
+
278
+ /-- `Filter.CardinalGenerateSets c g` is the (sets of the)
279
+ greatest `cardinalInterFilter c` containing `g`.-/
280
+ inductive CardinalGenerateSets : Set α → Prop
281
+ | basic {s : Set α} : s ∈ g → CardinalGenerateSets s
282
+ | univ : CardinalGenerateSets univ
283
+ | superset {s t : Set α} : CardinalGenerateSets s → s ⊆ t → CardinalGenerateSets t
284
+ | sInter {S : Set (Set α)} :
285
+ (#S < c) → (∀ s ∈ S, CardinalGenerateSets s) → CardinalGenerateSets (⋂₀ S)
286
+
287
+ /-- `Filter.cardinalGenerate c g` is the greatest `cardinalInterFilter c` containing `g`.-/
288
+ def cardinalGenerate (hc : 2 < c) : Filter α :=
289
+ ofCardinalInter (CardinalGenerateSets g) hc (fun _ => CardinalGenerateSets.sInter) fun _ _ =>
290
+ CardinalGenerateSets.superset
291
+
292
+ lemma cardinalInter_ofCardinalGenerate (hc : 2 < c) :
293
+ CardinalInterFilter (cardinalGenerate g hc) c := by
294
+ delta cardinalGenerate;
295
+ apply cardinalInter_ofCardinalInter _ _ _
296
+
297
+ variable {g}
298
+
299
+ /-- A set is in the `cardinalInterFilter` generated by `g` if and only if
300
+ it contains an intersection of `c` elements of `g`. -/
301
+ theorem mem_cardinaleGenerate_iff {s : Set α} {hreg : c.IsRegular} :
302
+ s ∈ cardinalGenerate g (IsRegular.nat_lt hreg 2 ) ↔
303
+ ∃ S : Set (Set α), S ⊆ g ∧ (#S < c) ∧ ⋂₀ S ⊆ s := by
304
+ constructor <;> intro h
305
+ · induction' h with s hs s t _ st ih S Sct _ ih
306
+ · refine ⟨{s}, singleton_subset_iff.mpr hs, ?_⟩
307
+ norm_num; exact ⟨IsRegular.nat_lt hreg 1 , subset_rfl⟩
308
+ · exact ⟨∅, ⟨empty_subset g, mk_eq_zero (∅ : Set <| Set α) ▸ IsRegular.nat_lt hreg 0 , by simp⟩⟩
309
+ · exact Exists.imp (by tauto) ih
310
+ choose T Tg Tct hT using ih
311
+ refine ⟨⋃ (s) (H : s ∈ S), T s H, by simpa,
312
+ (Cardinal.card_biUnion_lt_iff_forall_of_isRegular hreg Sct).2 Tct, ?_⟩
313
+ apply subset_sInter
314
+ apply fun s H => subset_trans (sInter_subset_sInter (subset_iUnion₂ s H)) (hT s H)
315
+ rcases h with ⟨S, Sg, Sct, hS⟩
316
+ have : CardinalInterFilter (cardinalGenerate g (IsRegular.nat_lt hreg 2 )) c :=
317
+ cardinalInter_ofCardinalGenerate _ _
318
+ exact mem_of_superset ((cardinal_sInter_mem Sct).mpr
319
+ (fun s H => CardinalGenerateSets.basic (Sg H))) hS
320
+
321
+ theorem le_cardinalGenerate_iff_of_cardinalInterFilter {f : Filter α} [CardinalInterFilter f c]
322
+ (hc : 2 < c) : f ≤ cardinalGenerate g hc ↔ g ⊆ f.sets := by
323
+ constructor <;> intro h
324
+ · exact subset_trans (fun s => CardinalGenerateSets.basic) h
325
+ intro s hs
326
+ induction' hs with s hs s t _ st ih S Sct _ ih
327
+ · exact h hs
328
+ · exact univ_mem
329
+ · exact mem_of_superset ih st
330
+ exact (cardinal_sInter_mem Sct).mpr ih
331
+
332
+ /-- `cardinalGenerate g hc` is the greatest `cardinalInterFilter c` containing `g`.-/
333
+ theorem cardinalGenerate_isGreatest (hc : 2 < c) :
334
+ IsGreatest { f : Filter α | CardinalInterFilter f c ∧ g ⊆ f.sets } (cardinalGenerate g hc) := by
335
+ refine ⟨⟨cardinalInter_ofCardinalGenerate _ _, fun s => CardinalGenerateSets.basic⟩, ?_⟩
336
+ rintro f ⟨fct, hf⟩
337
+ rwa [le_cardinalGenerate_iff_of_cardinalInterFilter]
338
+
155
339
end Filter
0 commit comments