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

Commit 9f51e33

Browse files
urkudsgouezel
andcommitted
feat(measure_theory/measurable_space): introduce filter.is_measurably_generated (#3594)
Sometimes I want to extract an `is_measurable` witness of a `filter.eventually` statement. Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
1 parent 7236938 commit 9f51e33

File tree

3 files changed

+87
-2
lines changed

3 files changed

+87
-2
lines changed

src/measure_theory/borel_space.lean

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import analysis.normed_space.basic
3434
noncomputable theory
3535

3636
open classical set
37-
open_locale classical big_operators
37+
open_locale classical big_operators topological_space
3838

3939
universes u v w x y
4040
variables {α : Type u} {β : Type v} {γ : Type w} {δ : Type x} {ι : Sort y} {s t u : set α}
@@ -205,6 +205,20 @@ h.is_closed.is_measurable
205205
lemma is_measurable_closure : is_measurable (closure s) :=
206206
is_closed_closure.is_measurable
207207

208+
instance nhds_is_measurably_generated (a : α) : (𝓝 a).is_measurably_generated :=
209+
begin
210+
rw [nhds, infi_subtype'],
211+
refine @filter.infi_is_measurably_generated _ _ _ _ (λ i, _),
212+
exact i.2.2.is_measurable.principal_is_measurably_generated
213+
end
214+
215+
/-- If `s` is a measurable set, then `nhds_within a s` is a measurably generated filter for
216+
each `a`. This cannot be an `instance` because it depends on a non-instance `hs : is_measurable s`.
217+
-/
218+
lemma is_measurable.nhds_within_is_measurably_generated {s : set α} (hs : is_measurable s) (a : α) :
219+
(nhds_within a s).is_measurably_generated :=
220+
by haveI := hs.principal_is_measurably_generated; exact filter.inf_is_measurably_generated _ _
221+
208222
@[priority 100] -- see Note [lower instance priority]
209223
instance opens_measurable_space.to_measurable_singleton_class [t1_space α] :
210224
measurable_singleton_class α :=
@@ -217,6 +231,14 @@ lemma is_measurable_Ici : is_measurable (Ici a) := is_closed_Ici.is_measurable
217231
lemma is_measurable_Iic : is_measurable (Iic a) := is_closed_Iic.is_measurable
218232
lemma is_measurable_Icc : is_measurable (Icc a b) := is_closed_Icc.is_measurable
219233

234+
instance at_top_is_measurably_generated : (filter.at_top : filter α).is_measurably_generated :=
235+
@filter.infi_is_measurably_generated _ _ _ _ $
236+
λ a, (is_measurable_Ici : is_measurable (Ici a)).principal_is_measurably_generated
237+
238+
instance at_bot_is_measurably_generated : (filter.at_bot : filter α).is_measurably_generated :=
239+
@filter.infi_is_measurably_generated _ _ _ _ $
240+
λ a, (is_measurable_Iic : is_measurable (Iic a)).principal_is_measurably_generated
241+
220242
end order_closed_topology
221243

222244
section order_closed_topology

src/measure_theory/measurable_space.lean

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import data.set.disjointed
77
import data.set.countable
88
import data.indicator_function
99
import data.equiv.encodable.lattice
10+
import order.filter.basic
1011

1112
/-!
1213
# Measurable spaces and measurable functions
@@ -30,6 +31,9 @@ A measurable equivalence between measurable spaces is an equivalence
3031
which respects the σ-algebras, that is, for which both directions of
3132
the equivalence are measurable functions.
3233
34+
We say that a filter `f` is measurably generated if every set `s ∈ f` includes a measurable
35+
set `t ∈ f`. This property is useful, e.g., to extract a measurable witness of `filter.eventually`.
36+
3337
## Main statements
3438
3539
The main theorem of this file is Dynkin's π-λ theorem, which appears
@@ -59,7 +63,7 @@ measurable space, measurable function, dynkin system
5963

6064
local attribute [instance] classical.prop_decidable
6165
open set encodable
62-
open_locale classical
66+
open_locale classical filter
6367

6468
universes u v w x
6569
variables {α : Type u} {β : Type v} {γ : Type w} {δ : Type x} {ι : Sort x}
@@ -1075,3 +1079,58 @@ this.rec_on h_basic h_empty
10751079
(assume f hf ht, h_union f hf $ assume i, by rw [eq]; exact ht _)
10761080

10771081
end measurable_space
1082+
1083+
namespace filter
1084+
1085+
variables [measurable_space α]
1086+
1087+
/-- A filter `f` is measurably generates if each `s ∈ f` includes a measurable `t ∈ f`. -/
1088+
class is_measurably_generated (f : filter α) : Prop :=
1089+
(exists_measurable_subset : ∀ ⦃s⦄, s ∈ f → ∃ t ∈ f, is_measurable t ∧ t ⊆ s)
1090+
1091+
lemma eventually.exists_measurable_mem {f : filter α} [is_measurably_generated f]
1092+
{p : α → Prop} (h : ∀ᶠ x in f, p x) :
1093+
∃ s ∈ f, is_measurable s ∧ ∀ x ∈ s, p x :=
1094+
is_measurably_generated.exists_measurable_subset h
1095+
1096+
instance inf_is_measurably_generated (f g : filter α) [is_measurably_generated f]
1097+
[is_measurably_generated g] :
1098+
is_measurably_generated (f ⊓ g) :=
1099+
begin
1100+
refine ⟨_⟩,
1101+
rintros t ⟨sf, hsf, sg, hsg, ht⟩,
1102+
rcases is_measurably_generated.exists_measurable_subset hsf with ⟨s'f, hs'f, hmf, hs'sf⟩,
1103+
rcases is_measurably_generated.exists_measurable_subset hsg with ⟨s'g, hs'g, hmg, hs'sg⟩,
1104+
refine ⟨s'f ∩ s'g, inter_mem_inf_sets hs'f hs'g, hmf.inter hmg, _⟩,
1105+
exact subset.trans (inter_subset_inter hs'sf hs'sg) ht
1106+
end
1107+
1108+
lemma principal_is_measurably_generated_iff {s : set α} :
1109+
is_measurably_generated (𝓟 s) ↔ is_measurable s :=
1110+
begin
1111+
refine ⟨_, λ hs, ⟨λ t ht, ⟨s, mem_principal_self s, hs, ht⟩⟩⟩,
1112+
rintros ⟨hs⟩,
1113+
rcases hs (mem_principal_self s) with ⟨t, ht, htm, hts⟩,
1114+
have : t = s := subset.antisymm hts ht,
1115+
rwa ← this
1116+
end
1117+
1118+
alias principal_is_measurably_generated_iff ↔
1119+
_ is_measurable.principal_is_measurably_generated
1120+
1121+
instance infi_is_measurably_generated {f : ι → filter α} [∀ i, is_measurably_generated (f i)] :
1122+
is_measurably_generated (⨅ i, f i) :=
1123+
begin
1124+
refine ⟨λ s hs, _⟩,
1125+
rw [← equiv.plift.surjective.infi_comp, mem_infi_iff] at hs,
1126+
rcases hs with ⟨t, ht, ⟨V, hVf, hVs⟩⟩,
1127+
choose U hUf hU using λ i, is_measurably_generated.exists_measurable_subset (hVf i),
1128+
refine ⟨⋂ i : t, U i, _, _, _⟩,
1129+
{ rw [← equiv.plift.surjective.infi_comp, mem_infi_iff],
1130+
refine ⟨t, ht, U, hUf, subset.refl _⟩ },
1131+
{ haveI := ht.countable.to_encodable,
1132+
refine is_measurable.Inter (λ i, (hU i).1) },
1133+
{ exact subset.trans (Inter_subset_Inter $ λ i, (hU i).2) hVs }
1134+
end
1135+
1136+
end filter

src/measure_theory/measure_space.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,10 @@ instance : countable_Inter_filter μ.ae :=
11091109
exact measure_Union_null (subtype.forall.2 hS)
11101110
end
11111111

1112+
instance ae_is_measurably_generated : is_measurably_generated μ.ae :=
1113+
⟨λ s hs, let ⟨t, hst, htm, htμ⟩ := exists_is_measurable_superset_of_measure_eq_zero hs in
1114+
⟨tᶜ, compl_mem_ae_iff.2 htμ, htm.compl, compl_subset_comm.1 hst⟩⟩
1115+
11121116
lemma ae_all_iff {ι : Type*} [encodable ι] {p : α → ι → Prop} :
11131117
(∀ᵐ a ∂ μ, ∀i, p a i) ↔ (∀i, ∀ᵐ a ∂ μ, p a i) :=
11141118
eventually_countable_forall

0 commit comments

Comments
 (0)