Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit ba197e4

Browse files
committed
feat(order/filter/*,topology/noetherian_space): add lemmas about cofinite (#16498)
* A filter is disjoint with `cofinite` iff there exists a finite set that belongs to this filter. * An ultrafilter is either less than or equal to `cofinite`, or is equal to `pure a` for some `a`. * Any type with cofinite topology is a Noetherian (hence, is a compact) space.
1 parent 7f034c5 commit ba197e4

File tree

3 files changed

+45
-16
lines changed

3 files changed

+45
-16
lines changed

src/order/filter/cofinite.lean

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Define filters for other cardinalities of the complement.
2323
open set function
2424
open_locale classical
2525

26-
variables {ι α β : Type*}
26+
variables {ι α β : Type*} {l : filter α}
2727

2828
namespace filter
2929

@@ -69,16 +69,14 @@ frequently_cofinite_iff_infinite.symm
6969
lemma eventually_cofinite_ne (x : α) : ∀ᶠ a in cofinite, a ≠ x :=
7070
(set.finite_singleton x).eventually_cofinite_nmem
7171

72-
lemma le_cofinite_iff_compl_singleton_mem {l : filter α} :
73-
l ≤ cofinite ↔ ∀ x, {x}ᶜ ∈ l :=
72+
lemma le_cofinite_iff_compl_singleton_mem : l ≤ cofinite ↔ ∀ x, {x}ᶜ ∈ l :=
7473
begin
7574
refine ⟨λ h x, h (finite_singleton x).compl_mem_cofinite, λ h s (hs : sᶜ.finite), _⟩,
7675
rw [← compl_compl s, ← bUnion_of_singleton sᶜ, compl_Union₂,filter.bInter_mem hs],
7776
exact λ x _, h x
7877
end
7978

80-
lemma le_cofinite_iff_eventually_ne {l : filter α} :
81-
l ≤ cofinite ↔ ∀ x, ∀ᶠ y in l, y ≠ x :=
79+
lemma le_cofinite_iff_eventually_ne : l ≤ cofinite ↔ ∀ x, ∀ᶠ y in l, y ≠ x :=
8280
le_cofinite_iff_compl_singleton_mem
8381

8482
/-- If `α` is a preorder with no maximal element, then `at_top ≤ cofinite`. -/
@@ -100,6 +98,15 @@ lemma Coprod_cofinite {α : ι → Type*} [finite ι] :
10098
filter.coext $ λ s, by simp only [compl_mem_Coprod, mem_cofinite, compl_compl,
10199
forall_finite_image_eval_iff]
102100

101+
@[simp] lemma disjoint_cofinite_left : disjoint cofinite l ↔ ∃ s ∈ l, set.finite s :=
102+
begin
103+
simp only [has_basis_cofinite.disjoint_iff l.basis_sets, id, disjoint_compl_left_iff_subset],
104+
exact ⟨λ ⟨s, hs, t, ht, hts⟩, ⟨t, ht, hs.subset hts⟩, λ ⟨s, hs, hsf⟩, ⟨s, hsf, s, hs, subset.rfl⟩⟩
105+
end
106+
107+
@[simp] lemma disjoint_cofinite_right : disjoint l cofinite ↔ ∃ s ∈ l, set.finite s :=
108+
disjoint.comm.trans disjoint_cofinite_left
109+
103110
end filter
104111

105112
open filter

src/order/filter/ultrafilter.lean

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ le_of_inf_eq (f.unique inf_le_left hg)
6767
lemma le_of_inf_ne_bot' (f : ultrafilter α) {g : filter α} (hg : ne_bot (g ⊓ f)) : ↑f ≤ g :=
6868
f.le_of_inf_ne_bot $ by rwa inf_comm
6969

70+
lemma inf_ne_bot_iff {f : ultrafilter α} {g : filter α} : ne_bot (↑f ⊓ g) ↔ ↑f ≤ g :=
71+
⟨le_of_inf_ne_bot f, λ h, (inf_of_le_left h).symm ▸ f.ne_bot⟩
72+
73+
lemma disjoint_iff_not_le {f : ultrafilter α} {g : filter α} : disjoint ↑f g ↔ ¬↑f ≤ g :=
74+
by rw [← inf_ne_bot_iff, ne_bot_iff, ne.def, not_not, disjoint_iff]
75+
7076
@[simp] lemma compl_not_mem_iff : sᶜ ∉ f ↔ s ∈ f :=
7177
⟨λ hsc, le_principal_iff.1 $ f.le_of_inf_ne_bot
7278
⟨λ h, hsc $ mem_of_eq_bot$ by rwa compl_compl⟩, compl_not_mem⟩
@@ -92,6 +98,12 @@ lemma nonempty_of_mem (hs : s ∈ f) : s.nonempty := nonempty_of_mem hs
9298
lemma ne_empty_of_mem (hs : s ∈ f) : s ≠ ∅ := (nonempty_of_mem hs).ne_empty
9399
@[simp] lemma empty_not_mem : ∅ ∉ f := empty_not_mem f
94100

101+
@[simp] lemma le_sup_iff {u : ultrafilter α} {f g : filter α} : ↑u ≤ f ⊔ g ↔ ↑u ≤ f ∨ ↑u ≤ g :=
102+
not_iff_not.1 $ by simp only [← disjoint_iff_not_le, not_or_distrib, disjoint_sup_right]
103+
104+
@[simp] lemma union_mem_iff : s ∪ t ∈ f ↔ s ∈ f ∨ t ∈ f :=
105+
by simp only [← mem_coe, ← le_principal_iff, ← sup_principal, le_sup_iff]
106+
95107
lemma mem_or_compl_mem (f : ultrafilter α) (s : set α) : s ∈ f ∨ sᶜ ∈ f :=
96108
or_iff_not_imp_left.2 compl_mem_iff_not_mem.2
97109

@@ -100,10 +112,7 @@ protected lemma em (f : ultrafilter α) (p : α → Prop) :
100112
f.mem_or_compl_mem {x | p x}
101113

102114
lemma eventually_or : (∀ᶠ x in f, p x ∨ q x) ↔ (∀ᶠ x in f, p x) ∨ ∀ᶠ x in f, q x :=
103-
⟨λ H, (f.em p).imp_right $ λ hp, (H.and hp).mono $ λ x ⟨hx, hnx⟩, hx.resolve_left hnx,
104-
λ H, H.elim (λ hp, hp.mono $ λ x, or.inl) (λ hp, hp.mono $ λ x, or.inr)⟩
105-
106-
lemma union_mem_iff : s ∪ t ∈ f ↔ s ∈ f ∨ t ∈ f := eventually_or
115+
union_mem_iff
107116

108117
lemma eventually_not : (∀ᶠ x in f, ¬p x) ↔ ¬∀ᶠ x in f, p x := compl_mem_iff_not_mem
109118

@@ -182,20 +191,22 @@ lemma pure_injective : injective (pure : α → ultrafilter α) :=
182191
instance [inhabited α] : inhabited (ultrafilter α) := ⟨pure default⟩
183192
instance [nonempty α] : nonempty (ultrafilter α) := nonempty.map pure infer_instance
184193

185-
lemma eq_pure_of_finite_mem (h : s.finite) (h' : s ∈ f) : ∃ x ∈ s, (f : filter α) = pure x :=
194+
lemma eq_pure_of_finite_mem (h : s.finite) (h' : s ∈ f) : ∃ x ∈ s, f = pure x :=
186195
begin
187196
rw ← bUnion_of_singleton s at h',
188197
rcases (ultrafilter.finite_bUnion_mem_iff h).mp h' with ⟨a, has, haf⟩,
189-
use [a, has],
190-
change (f : filter α) = (pure a : ultrafilter α),
191-
rw [ultrafilter.coe_inj, ← ultrafilter.coe_le_coe],
192-
change (f : filter α) ≤ pure a,
193-
rwa [← principal_singleton, le_principal_iff]
198+
exact ⟨a, has, eq_of_le (filter.le_pure_iff.2 haf)⟩
194199
end
195200

196-
lemma eq_pure_of_finite [finite α] (f : ultrafilter α) : ∃ a, (f : filter α) = pure a :=
201+
lemma eq_pure_of_finite [finite α] (f : ultrafilter α) : ∃ a, f = pure a :=
197202
(eq_pure_of_finite_mem finite_univ univ_mem).imp $ λ a ⟨_, ha⟩, ha
198203

204+
lemma le_cofinite_or_eq_pure (f : ultrafilter α) : (f : filter α) ≤ cofinite ∨ ∃ a, f = pure a :=
205+
or_iff_not_imp_left.2 $ λ h,
206+
let ⟨s, hs, hfin⟩ := filter.disjoint_cofinite_right.1 (disjoint_iff_not_le.2 h),
207+
⟨a, has, hf⟩ := eq_pure_of_finite_mem hfin hs
208+
in ⟨a, hf⟩
209+
199210
/-- Monadic bind for ultrafilters, coming from the one on filters
200211
defined in terms of map and join.-/
201212
def bind (f : ultrafilter α) (m : α → ultrafilter β) : ultrafilter β :=

src/topology/noetherian_space.lean

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,17 @@ end
101101

102102
variables {α β}
103103

104+
instance {α} : noetherian_space (cofinite_topology α) :=
105+
begin
106+
simp only [noetherian_space_iff_opens, is_compact_iff_ultrafilter_le_nhds,
107+
cofinite_topology.nhds_eq, ultrafilter.le_sup_iff],
108+
intros s f hs,
109+
rcases f.le_cofinite_or_eq_pure with hf|⟨a, rfl⟩,
110+
{ rcases filter.nonempty_of_mem (filter.le_principal_iff.1 hs) with ⟨a, ha⟩,
111+
exact ⟨a, ha, or.inr hf⟩ },
112+
{ exact ⟨a, filter.le_principal_iff.mp hs, or.inl le_rfl⟩ }
113+
end
114+
104115
lemma noetherian_space.is_compact [h : noetherian_space α] (s : set α) : is_compact s :=
105116
let H := (noetherian_space_tfae α).out 0 2 in H.mp h s
106117

0 commit comments

Comments
 (0)