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

Commit 02dc6f2

Browse files
committed
feat(probability/stopping): filtrations are a complete lattice (#12169)
Co-authored-by: Rémy Degenne <remydegenne@gmail.com>
1 parent 9ed7179 commit 02dc6f2

File tree

1 file changed

+138
-17
lines changed

1 file changed

+138
-17
lines changed

src/probability/stopping.lean

Lines changed: 138 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,35 +31,156 @@ filtration, stopping time, stochastic process
3131
3232
-/
3333

34-
noncomputable theory
34+
open topological_space
3535
open_locale classical measure_theory nnreal ennreal topological_space big_operators
3636

3737
namespace measure_theory
3838

3939
/-- A `filtration` on measurable space `α` with σ-algebra `m` is a monotone
40-
sequence of of sub-σ-algebras of `m`. -/
40+
sequence of sub-σ-algebras of `m`. -/
4141
structure filtration {α : Type*} (ι : Type*) [preorder ι] (m : measurable_space α) :=
42-
(seq : ι → measurable_space α)
43-
(mono : monotone seq)
44-
(le : ∀ i : ι, seq i ≤ m)
42+
(seq : ι → measurable_space α)
43+
(mono' : monotone seq)
44+
(le' : ∀ i : ι, seq i ≤ m)
4545

4646
variables {α β ι : Type*} {m : measurable_space α}
4747

48-
open topological_space
49-
50-
section preorder
48+
instance [preorder ι] : has_coe_to_fun (filtration ι m) (λ _, ι → measurable_space α) :=
49+
⟨λ f, f.seq⟩
5150

51+
namespace filtration
5252
variables [preorder ι]
5353

54-
instance : has_coe_to_fun (filtration ι m) (λ _, ι → measurable_space α) :=
55-
⟨λ f, f.seq⟩
54+
protected lemma mono {i j : ι} (f : filtration ι m) (hij : i ≤ j) : f i ≤ f j := f.mono' hij
55+
56+
protected lemma le (f : filtration ι m) (i : ι) : f i ≤ m := f.le' i
57+
58+
@[ext] protected lemma ext {f g : filtration ι m} (h : (f : ι → measurable_space α) = g) : f = g :=
59+
by { cases f, cases g, simp only, exact h, }
5660

5761
/-- The constant filtration which is equal to `m` for all `i : ι`. -/
58-
def const_filtration (m : measurable_space α) : filtration ι m :=
59-
⟨λ _, m, monotone_const, λ _, le_rfl⟩
62+
def const (m' : measurable_space α) (hm' : m' ≤ m) : filtration ι m :=
63+
⟨λ _, m', monotone_const, λ _, hm'⟩
64+
65+
instance : inhabited (filtration ι m) := ⟨const m le_rfl⟩
66+
67+
instance : has_le (filtration ι m) := ⟨λ f g, ∀ i, f i ≤ g i⟩
68+
69+
instance : has_bot (filtration ι m) := ⟨const ⊥ bot_le⟩
70+
71+
instance : has_top (filtration ι m) := ⟨const m le_rfl⟩
72+
73+
instance : has_sup (filtration ι m) := ⟨λ f g,
74+
{ seq := λ i, f i ⊔ g i,
75+
mono' := λ i j hij, sup_le ((f.mono hij).trans le_sup_left) ((g.mono hij).trans le_sup_right),
76+
le' := λ i, sup_le (f.le i) (g.le i) }⟩
77+
78+
@[norm_cast] lemma coe_fn_sup {f g : filtration ι m} : ⇑(f ⊔ g) = f ⊔ g := rfl
79+
80+
instance : has_inf (filtration ι m) := ⟨λ f g,
81+
{ seq := λ i, f i ⊓ g i,
82+
mono' := λ i j hij, le_inf (inf_le_left.trans (f.mono hij)) (inf_le_right.trans (g.mono hij)),
83+
le' := λ i, inf_le_left.trans (f.le i) }⟩
84+
85+
@[norm_cast] lemma coe_fn_inf {f g : filtration ι m} : ⇑(f ⊓ g) = f ⊓ g := rfl
86+
87+
instance : has_Sup (filtration ι m) := ⟨λ s,
88+
{ seq := λ i, Sup ((λ f : filtration ι m, f i) '' s),
89+
mono' := λ i j hij,
90+
begin
91+
refine Sup_le (λ m' hm', _),
92+
rw [set.mem_image] at hm',
93+
obtain ⟨f, hf_mem, hfm'⟩ := hm',
94+
rw ← hfm',
95+
refine (f.mono hij).trans _,
96+
have hfj_mem : f j ∈ ((λ g : filtration ι m, g j) '' s), from ⟨f, hf_mem, rfl⟩,
97+
exact le_Sup hfj_mem,
98+
end,
99+
le' := λ i,
100+
begin
101+
refine Sup_le (λ m' hm', _),
102+
rw [set.mem_image] at hm',
103+
obtain ⟨f, hf_mem, hfm'⟩ := hm',
104+
rw ← hfm',
105+
exact f.le i,
106+
end, }⟩
107+
108+
lemma Sup_def (s : set (filtration ι m)) (i : ι) :
109+
Sup s i = Sup ((λ f : filtration ι m, f i) '' s) :=
110+
rfl
111+
112+
noncomputable
113+
instance : has_Inf (filtration ι m) := ⟨λ s,
114+
{ seq := λ i, if set.nonempty s then Inf ((λ f : filtration ι m, f i) '' s) else m,
115+
mono' := λ i j hij,
116+
begin
117+
by_cases h_nonempty : set.nonempty s,
118+
swap, { simp only [h_nonempty, set.nonempty_image_iff, if_false, le_refl], },
119+
simp only [h_nonempty, if_true, le_Inf_iff, set.mem_image, forall_exists_index, and_imp,
120+
forall_apply_eq_imp_iff₂],
121+
refine λ f hf_mem, le_trans _ (f.mono hij),
122+
have hfi_mem : f i ∈ ((λ g : filtration ι m, g i) '' s), from ⟨f, hf_mem, rfl⟩,
123+
exact Inf_le hfi_mem,
124+
end,
125+
le' := λ i,
126+
begin
127+
by_cases h_nonempty : set.nonempty s,
128+
swap, { simp only [h_nonempty, if_false, le_refl], },
129+
simp only [h_nonempty, if_true],
130+
obtain ⟨f, hf_mem⟩ := h_nonempty,
131+
exact le_trans (Inf_le ⟨f, hf_mem, rfl⟩) (f.le i),
132+
end, }⟩
133+
134+
lemma Inf_def (s : set (filtration ι m)) (i : ι) :
135+
Inf s i = if set.nonempty s then Inf ((λ f : filtration ι m, f i) '' s) else m :=
136+
rfl
137+
138+
noncomputable
139+
instance : complete_lattice (filtration ι m) :=
140+
{ le := (≤),
141+
le_refl := λ f i, le_rfl,
142+
le_trans := λ f g h h_fg h_gh i, (h_fg i).trans (h_gh i),
143+
le_antisymm := λ f g h_fg h_gf, filtration.ext $ funext $ λ i, (h_fg i).antisymm (h_gf i),
144+
sup := (⊔),
145+
le_sup_left := λ f g i, le_sup_left,
146+
le_sup_right := λ f g i, le_sup_right,
147+
sup_le := λ f g h h_fh h_gh i, sup_le (h_fh i) (h_gh _),
148+
inf := (⊓),
149+
inf_le_left := λ f g i, inf_le_left,
150+
inf_le_right := λ f g i, inf_le_right,
151+
le_inf := λ f g h h_fg h_fh i, le_inf (h_fg i) (h_fh i),
152+
Sup := Sup,
153+
le_Sup := λ s f hf_mem i, le_Sup ⟨f, hf_mem, rfl⟩,
154+
Sup_le := λ s f h_forall i, Sup_le $ λ m' hm',
155+
begin
156+
obtain ⟨g, hg_mem, hfm'⟩ := hm',
157+
rw ← hfm',
158+
exact h_forall g hg_mem i,
159+
end,
160+
Inf := Inf,
161+
Inf_le := λ s f hf_mem i,
162+
begin
163+
have hs : s.nonempty := ⟨f, hf_mem⟩,
164+
simp only [Inf_def, hs, if_true],
165+
exact Inf_le ⟨f, hf_mem, rfl⟩,
166+
end,
167+
le_Inf := λ s f h_forall i,
168+
begin
169+
by_cases hs : s.nonempty,
170+
swap, { simp only [Inf_def, hs, if_false], exact f.le i, },
171+
simp only [Inf_def, hs, if_true, le_Inf_iff, set.mem_image, forall_exists_index, and_imp,
172+
forall_apply_eq_imp_iff₂],
173+
exact λ g hg_mem, h_forall g hg_mem i,
174+
end,
175+
top := ⊤,
176+
bot := ⊥,
177+
le_top := λ f i, f.le' i,
178+
bot_le := λ f i, bot_le, }
179+
180+
end filtration
60181

61-
instance : inhabited (filtration ι m) :=
62-
⟨const_filtration m⟩
182+
section preorder
183+
variables [preorder ι]
63184

64185
lemma measurable_set_of_filtration {f : filtration ι m} {s : set α} {i : ι}
65186
(hs : measurable_set[f i] s) : measurable_set[m] s :=
@@ -111,9 +232,9 @@ namespace filtration
111232
of σ-algebras such that that sequence of functions is measurable with respect to
112233
the filtration. -/
113234
def natural (u : ι → α → β) (hum : ∀ i, measurable (u i)) : filtration ι m :=
114-
{ seq := λ i, ⨆ j ≤ i, measurable_space.comap (u j) infer_instance,
115-
mono := λ i j hij, bsupr_le_bsupr' $ λ k hk, le_trans hk hij,
116-
le := λ i, bsupr_le (λ j hj s hs, let ⟨t, ht, ht'⟩ := hs in ht' ▸ hum j ht) }
235+
{ seq := λ i, ⨆ j ≤ i, measurable_space.comap (u j) infer_instance,
236+
mono' := λ i j hij, bsupr_le_bsupr' $ λ k hk, le_trans hk hij,
237+
le' := λ i, bsupr_le (λ j hj s hs, let ⟨t, ht, ht'⟩ := hs in ht' ▸ hum j ht) }
117238

118239
lemma adapted_natural {u : ι → α → β} (hum : ∀ i, measurable[m] (u i)) :
119240
adapted (natural u hum) u :=

0 commit comments

Comments
 (0)