/
Stopping.lean
1220 lines (1024 loc) · 63.2 KB
/
Stopping.lean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/-
Copyright (c) 2021 Kexing Ying. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kexing Ying, Rémy Degenne
-/
import Mathlib.Probability.Process.Adapted
#align_import probability.process.stopping from "leanprover-community/mathlib"@"ba074af83b6cf54c3104e59402b39410ddbd6dca"
/-!
# Stopping times, stopped processes and stopped values
Definition and properties of stopping times.
## Main definitions
* `MeasureTheory.IsStoppingTime`: a stopping time with respect to some filtration `f` is a
function `τ` such that for all `i`, the preimage of `{j | j ≤ i}` along `τ` is
`f i`-measurable
* `MeasureTheory.IsStoppingTime.measurableSpace`: the σ-algebra associated with a stopping time
## Main results
* `ProgMeasurable.stoppedProcess`: the stopped process of a progressively measurable process is
progressively measurable.
* `memℒp_stoppedProcess`: if a process belongs to `ℒp` at every time in `ℕ`, then its stopped
process belongs to `ℒp` as well.
## Tags
stopping time, stochastic process
-/
open Filter Order TopologicalSpace
open scoped Classical MeasureTheory NNReal ENNReal Topology BigOperators
namespace MeasureTheory
variable {Ω β ι : Type*} {m : MeasurableSpace Ω}
/-! ### Stopping times -/
/-- A stopping time with respect to some filtration `f` is a function
`τ` such that for all `i`, the preimage of `{j | j ≤ i}` along `τ` is measurable
with respect to `f i`.
Intuitively, the stopping time `τ` describes some stopping rule such that at time
`i`, we may determine it with the information we have at time `i`. -/
def IsStoppingTime [Preorder ι] (f : Filtration ι m) (τ : Ω → ι) :=
∀ i : ι, MeasurableSet[f i] <| {ω | τ ω ≤ i}
#align measure_theory.is_stopping_time MeasureTheory.IsStoppingTime
theorem isStoppingTime_const [Preorder ι] (f : Filtration ι m) (i : ι) :
IsStoppingTime f fun _ => i := fun j => by simp only [MeasurableSet.const]
#align measure_theory.is_stopping_time_const MeasureTheory.isStoppingTime_const
section MeasurableSet
section Preorder
variable [Preorder ι] {f : Filtration ι m} {τ : Ω → ι}
protected theorem IsStoppingTime.measurableSet_le (hτ : IsStoppingTime f τ) (i : ι) :
MeasurableSet[f i] {ω | τ ω ≤ i} :=
hτ i
#align measure_theory.is_stopping_time.measurable_set_le MeasureTheory.IsStoppingTime.measurableSet_le
theorem IsStoppingTime.measurableSet_lt_of_pred [PredOrder ι] (hτ : IsStoppingTime f τ) (i : ι) :
MeasurableSet[f i] {ω | τ ω < i} := by
by_cases hi_min : IsMin i
· suffices {ω : Ω | τ ω < i} = ∅ by rw [this]; exact @MeasurableSet.empty _ (f i)
ext1 ω
simp only [Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false_iff]
rw [isMin_iff_forall_not_lt] at hi_min
exact hi_min (τ ω)
have : {ω : Ω | τ ω < i} = τ ⁻¹' Set.Iic (pred i) := by ext; simp [Iic_pred_of_not_isMin hi_min]
rw [this]
exact f.mono (pred_le i) _ (hτ.measurableSet_le <| pred i)
#align measure_theory.is_stopping_time.measurable_set_lt_of_pred MeasureTheory.IsStoppingTime.measurableSet_lt_of_pred
end Preorder
section CountableStoppingTime
namespace IsStoppingTime
variable [PartialOrder ι] {τ : Ω → ι} {f : Filtration ι m}
protected theorem measurableSet_eq_of_countable_range (hτ : IsStoppingTime f τ)
(h_countable : (Set.range τ).Countable) (i : ι) : MeasurableSet[f i] {ω | τ ω = i} := by
have : {ω | τ ω = i} = {ω | τ ω ≤ i} \ ⋃ (j ∈ Set.range τ) (_ : j < i), {ω | τ ω ≤ j} := by
ext1 a
simp only [Set.mem_setOf_eq, Set.mem_range, Set.iUnion_exists, Set.iUnion_iUnion_eq',
Set.mem_diff, Set.mem_iUnion, exists_prop, not_exists, not_and, not_le]
constructor <;> intro h
· simp only [h, lt_iff_le_not_le, le_refl, and_imp, imp_self, imp_true_iff, and_self_iff]
· exact h.1.eq_or_lt.resolve_right fun h_lt => h.2 a h_lt le_rfl
rw [this]
refine' (hτ.measurableSet_le i).diff _
refine' MeasurableSet.biUnion h_countable fun j _ => _
rw [Set.iUnion_eq_if]
split_ifs with hji
· exact f.mono hji.le _ (hτ.measurableSet_le j)
· exact @MeasurableSet.empty _ (f i)
#align measure_theory.is_stopping_time.measurable_set_eq_of_countable_range MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable_range
protected theorem measurableSet_eq_of_countable [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
MeasurableSet[f i] {ω | τ ω = i} :=
hτ.measurableSet_eq_of_countable_range (Set.to_countable _) i
#align measure_theory.is_stopping_time.measurable_set_eq_of_countable MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable
protected theorem measurableSet_lt_of_countable_range (hτ : IsStoppingTime f τ)
(h_countable : (Set.range τ).Countable) (i : ι) : MeasurableSet[f i] {ω | τ ω < i} := by
have : {ω | τ ω < i} = {ω | τ ω ≤ i} \ {ω | τ ω = i} := by ext1 ω; simp [lt_iff_le_and_ne]
rw [this]
exact (hτ.measurableSet_le i).diff (hτ.measurableSet_eq_of_countable_range h_countable i)
#align measure_theory.is_stopping_time.measurable_set_lt_of_countable_range MeasureTheory.IsStoppingTime.measurableSet_lt_of_countable_range
protected theorem measurableSet_lt_of_countable [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
MeasurableSet[f i] {ω | τ ω < i} :=
hτ.measurableSet_lt_of_countable_range (Set.to_countable _) i
#align measure_theory.is_stopping_time.measurable_set_lt_of_countable MeasureTheory.IsStoppingTime.measurableSet_lt_of_countable
protected theorem measurableSet_ge_of_countable_range {ι} [LinearOrder ι] {τ : Ω → ι}
{f : Filtration ι m} (hτ : IsStoppingTime f τ) (h_countable : (Set.range τ).Countable) (i : ι) :
MeasurableSet[f i] {ω | i ≤ τ ω} := by
have : {ω | i ≤ τ ω} = {ω | τ ω < i}ᶜ := by
ext1 ω; simp only [Set.mem_setOf_eq, Set.mem_compl_iff, not_lt]
rw [this]
exact (hτ.measurableSet_lt_of_countable_range h_countable i).compl
#align measure_theory.is_stopping_time.measurable_set_ge_of_countable_range MeasureTheory.IsStoppingTime.measurableSet_ge_of_countable_range
protected theorem measurableSet_ge_of_countable {ι} [LinearOrder ι] {τ : Ω → ι} {f : Filtration ι m}
[Countable ι] (hτ : IsStoppingTime f τ) (i : ι) : MeasurableSet[f i] {ω | i ≤ τ ω} :=
hτ.measurableSet_ge_of_countable_range (Set.to_countable _) i
#align measure_theory.is_stopping_time.measurable_set_ge_of_countable MeasureTheory.IsStoppingTime.measurableSet_ge_of_countable
end IsStoppingTime
end CountableStoppingTime
section LinearOrder
variable [LinearOrder ι] {f : Filtration ι m} {τ : Ω → ι}
theorem IsStoppingTime.measurableSet_gt (hτ : IsStoppingTime f τ) (i : ι) :
MeasurableSet[f i] {ω | i < τ ω} := by
have : {ω | i < τ ω} = {ω | τ ω ≤ i}ᶜ := by
ext1 ω; simp only [Set.mem_setOf_eq, Set.mem_compl_iff, not_le]
rw [this]
exact (hτ.measurableSet_le i).compl
#align measure_theory.is_stopping_time.measurable_set_gt MeasureTheory.IsStoppingTime.measurableSet_gt
section TopologicalSpace
variable [TopologicalSpace ι] [OrderTopology ι] [FirstCountableTopology ι]
/-- Auxiliary lemma for `MeasureTheory.IsStoppingTime.measurableSet_lt`. -/
theorem IsStoppingTime.measurableSet_lt_of_isLUB (hτ : IsStoppingTime f τ) (i : ι)
(h_lub : IsLUB (Set.Iio i) i) : MeasurableSet[f i] {ω | τ ω < i} := by
by_cases hi_min : IsMin i
· suffices {ω | τ ω < i} = ∅ by rw [this]; exact @MeasurableSet.empty _ (f i)
ext1 ω
simp only [Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false_iff]
exact isMin_iff_forall_not_lt.mp hi_min (τ ω)
obtain ⟨seq, -, -, h_tendsto, h_bound⟩ :
∃ seq : ℕ → ι, Monotone seq ∧ (∀ j, seq j ≤ i) ∧ Tendsto seq atTop (𝓝 i) ∧ ∀ j, seq j < i :=
h_lub.exists_seq_monotone_tendsto (not_isMin_iff.mp hi_min)
have h_Ioi_eq_Union : Set.Iio i = ⋃ j, {k | k ≤ seq j} := by
ext1 k
simp only [Set.mem_Iio, Set.mem_iUnion, Set.mem_setOf_eq]
refine' ⟨fun hk_lt_i => _, fun h_exists_k_le_seq => _⟩
· rw [tendsto_atTop'] at h_tendsto
have h_nhds : Set.Ici k ∈ 𝓝 i :=
mem_nhds_iff.mpr ⟨Set.Ioi k, Set.Ioi_subset_Ici le_rfl, isOpen_Ioi, hk_lt_i⟩
obtain ⟨a, ha⟩ : ∃ a : ℕ, ∀ b : ℕ, b ≥ a → k ≤ seq b := h_tendsto (Set.Ici k) h_nhds
exact ⟨a, ha a le_rfl⟩
· obtain ⟨j, hk_seq_j⟩ := h_exists_k_le_seq
exact hk_seq_j.trans_lt (h_bound j)
have h_lt_eq_preimage : {ω | τ ω < i} = τ ⁻¹' Set.Iio i := by
ext1 ω; simp only [Set.mem_setOf_eq, Set.mem_preimage, Set.mem_Iio]
rw [h_lt_eq_preimage, h_Ioi_eq_Union]
simp only [Set.preimage_iUnion, Set.preimage_setOf_eq]
exact MeasurableSet.iUnion fun n => f.mono (h_bound n).le _ (hτ.measurableSet_le (seq n))
#align measure_theory.is_stopping_time.measurable_set_lt_of_is_lub MeasureTheory.IsStoppingTime.measurableSet_lt_of_isLUB
theorem IsStoppingTime.measurableSet_lt (hτ : IsStoppingTime f τ) (i : ι) :
MeasurableSet[f i] {ω | τ ω < i} := by
obtain ⟨i', hi'_lub⟩ : ∃ i', IsLUB (Set.Iio i) i' := exists_lub_Iio i
cases' lub_Iio_eq_self_or_Iio_eq_Iic i hi'_lub with hi'_eq_i h_Iio_eq_Iic
· rw [← hi'_eq_i] at hi'_lub ⊢
exact hτ.measurableSet_lt_of_isLUB i' hi'_lub
· have h_lt_eq_preimage : {ω : Ω | τ ω < i} = τ ⁻¹' Set.Iio i := rfl
rw [h_lt_eq_preimage, h_Iio_eq_Iic]
exact f.mono (lub_Iio_le i hi'_lub) _ (hτ.measurableSet_le i')
#align measure_theory.is_stopping_time.measurable_set_lt MeasureTheory.IsStoppingTime.measurableSet_lt
theorem IsStoppingTime.measurableSet_ge (hτ : IsStoppingTime f τ) (i : ι) :
MeasurableSet[f i] {ω | i ≤ τ ω} := by
have : {ω | i ≤ τ ω} = {ω | τ ω < i}ᶜ := by
ext1 ω; simp only [Set.mem_setOf_eq, Set.mem_compl_iff, not_lt]
rw [this]
exact (hτ.measurableSet_lt i).compl
#align measure_theory.is_stopping_time.measurable_set_ge MeasureTheory.IsStoppingTime.measurableSet_ge
theorem IsStoppingTime.measurableSet_eq (hτ : IsStoppingTime f τ) (i : ι) :
MeasurableSet[f i] {ω | τ ω = i} := by
have : {ω | τ ω = i} = {ω | τ ω ≤ i} ∩ {ω | τ ω ≥ i} := by
ext1 ω; simp only [Set.mem_setOf_eq, ge_iff_le, Set.mem_inter_iff, le_antisymm_iff]
rw [this]
exact (hτ.measurableSet_le i).inter (hτ.measurableSet_ge i)
#align measure_theory.is_stopping_time.measurable_set_eq MeasureTheory.IsStoppingTime.measurableSet_eq
theorem IsStoppingTime.measurableSet_eq_le (hτ : IsStoppingTime f τ) {i j : ι} (hle : i ≤ j) :
MeasurableSet[f j] {ω | τ ω = i} :=
f.mono hle _ <| hτ.measurableSet_eq i
#align measure_theory.is_stopping_time.measurable_set_eq_le MeasureTheory.IsStoppingTime.measurableSet_eq_le
theorem IsStoppingTime.measurableSet_lt_le (hτ : IsStoppingTime f τ) {i j : ι} (hle : i ≤ j) :
MeasurableSet[f j] {ω | τ ω < i} :=
f.mono hle _ <| hτ.measurableSet_lt i
#align measure_theory.is_stopping_time.measurable_set_lt_le MeasureTheory.IsStoppingTime.measurableSet_lt_le
end TopologicalSpace
end LinearOrder
section Countable
theorem isStoppingTime_of_measurableSet_eq [Preorder ι] [Countable ι] {f : Filtration ι m}
{τ : Ω → ι} (hτ : ∀ i, MeasurableSet[f i] {ω | τ ω = i}) : IsStoppingTime f τ := by
intro i
rw [show {ω | τ ω ≤ i} = ⋃ k ≤ i, {ω | τ ω = k} by ext; simp]
refine' MeasurableSet.biUnion (Set.to_countable _) fun k hk => _
exact f.mono hk _ (hτ k)
#align measure_theory.is_stopping_time_of_measurable_set_eq MeasureTheory.isStoppingTime_of_measurableSet_eq
end Countable
end MeasurableSet
namespace IsStoppingTime
protected theorem max [LinearOrder ι] {f : Filtration ι m} {τ π : Ω → ι} (hτ : IsStoppingTime f τ)
(hπ : IsStoppingTime f π) : IsStoppingTime f fun ω => max (τ ω) (π ω) := by
intro i
simp_rw [max_le_iff, Set.setOf_and]
exact (hτ i).inter (hπ i)
#align measure_theory.is_stopping_time.max MeasureTheory.IsStoppingTime.max
protected theorem max_const [LinearOrder ι] {f : Filtration ι m} {τ : Ω → ι}
(hτ : IsStoppingTime f τ) (i : ι) : IsStoppingTime f fun ω => max (τ ω) i :=
hτ.max (isStoppingTime_const f i)
#align measure_theory.is_stopping_time.max_const MeasureTheory.IsStoppingTime.max_const
protected theorem min [LinearOrder ι] {f : Filtration ι m} {τ π : Ω → ι} (hτ : IsStoppingTime f τ)
(hπ : IsStoppingTime f π) : IsStoppingTime f fun ω => min (τ ω) (π ω) := by
intro i
simp_rw [min_le_iff, Set.setOf_or]
exact (hτ i).union (hπ i)
#align measure_theory.is_stopping_time.min MeasureTheory.IsStoppingTime.min
protected theorem min_const [LinearOrder ι] {f : Filtration ι m} {τ : Ω → ι}
(hτ : IsStoppingTime f τ) (i : ι) : IsStoppingTime f fun ω => min (τ ω) i :=
hτ.min (isStoppingTime_const f i)
#align measure_theory.is_stopping_time.min_const MeasureTheory.IsStoppingTime.min_const
theorem add_const [AddGroup ι] [Preorder ι] [CovariantClass ι ι (Function.swap (· + ·)) (· ≤ ·)]
[CovariantClass ι ι (· + ·) (· ≤ ·)] {f : Filtration ι m} {τ : Ω → ι} (hτ : IsStoppingTime f τ)
{i : ι} (hi : 0 ≤ i) : IsStoppingTime f fun ω => τ ω + i := by
intro j
simp_rw [← le_sub_iff_add_le]
exact f.mono (sub_le_self j hi) _ (hτ (j - i))
#align measure_theory.is_stopping_time.add_const MeasureTheory.IsStoppingTime.add_const
theorem add_const_nat {f : Filtration ℕ m} {τ : Ω → ℕ} (hτ : IsStoppingTime f τ) {i : ℕ} :
IsStoppingTime f fun ω => τ ω + i := by
refine' isStoppingTime_of_measurableSet_eq fun j => _
by_cases hij : i ≤ j
· simp_rw [eq_comm, ← Nat.sub_eq_iff_eq_add hij, eq_comm]
exact f.mono (j.sub_le i) _ (hτ.measurableSet_eq (j - i))
· rw [not_le] at hij
convert @MeasurableSet.empty _ (f.1 j)
ext ω
simp only [Set.mem_empty_iff_false, iff_false_iff, Set.mem_setOf]
omega
#align measure_theory.is_stopping_time.add_const_nat MeasureTheory.IsStoppingTime.add_const_nat
-- generalize to certain countable type?
theorem add {f : Filtration ℕ m} {τ π : Ω → ℕ} (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) :
IsStoppingTime f (τ + π) := by
intro i
rw [(_ : {ω | (τ + π) ω ≤ i} = ⋃ k ≤ i, {ω | π ω = k} ∩ {ω | τ ω + k ≤ i})]
· exact MeasurableSet.iUnion fun k =>
MeasurableSet.iUnion fun hk => (hπ.measurableSet_eq_le hk).inter (hτ.add_const_nat i)
ext ω
simp only [Pi.add_apply, Set.mem_setOf_eq, Set.mem_iUnion, Set.mem_inter_iff, exists_prop]
refine' ⟨fun h => ⟨π ω, by omega, rfl, h⟩, _⟩
rintro ⟨j, hj, rfl, h⟩
assumption
#align measure_theory.is_stopping_time.add MeasureTheory.IsStoppingTime.add
section Preorder
variable [Preorder ι] {f : Filtration ι m} {τ π : Ω → ι}
/-- The associated σ-algebra with a stopping time. -/
protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω where
MeasurableSet' s := ∀ i : ι, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i})
measurableSet_empty i := (Set.empty_inter {ω | τ ω ≤ i}).symm ▸ @MeasurableSet.empty _ (f i)
measurableSet_compl s hs i := by
rw [(_ : sᶜ ∩ {ω | τ ω ≤ i} = (sᶜ ∪ {ω | τ ω ≤ i}ᶜ) ∩ {ω | τ ω ≤ i})]
· refine' MeasurableSet.inter _ _
· rw [← Set.compl_inter]
exact (hs i).compl
· exact hτ i
· rw [Set.union_inter_distrib_right]
simp only [Set.compl_inter_self, Set.union_empty]
measurableSet_iUnion s hs i := by
rw [forall_swap] at hs
rw [Set.iUnion_inter]
exact MeasurableSet.iUnion (hs i)
#align measure_theory.is_stopping_time.measurable_space MeasureTheory.IsStoppingTime.measurableSpace
protected theorem measurableSet (hτ : IsStoppingTime f τ) (s : Set Ω) :
MeasurableSet[hτ.measurableSpace] s ↔ ∀ i : ι, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i}) :=
Iff.rfl
#align measure_theory.is_stopping_time.measurable_set MeasureTheory.IsStoppingTime.measurableSet
theorem measurableSpace_mono (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) (hle : τ ≤ π) :
hτ.measurableSpace ≤ hπ.measurableSpace := by
intro s hs i
rw [(_ : s ∩ {ω | π ω ≤ i} = s ∩ {ω | τ ω ≤ i} ∩ {ω | π ω ≤ i})]
· exact (hs i).inter (hπ i)
· ext
simp only [Set.mem_inter_iff, iff_self_and, and_congr_left_iff, Set.mem_setOf_eq]
intro hle' _
exact le_trans (hle _) hle'
#align measure_theory.is_stopping_time.measurable_space_mono MeasureTheory.IsStoppingTime.measurableSpace_mono
theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f τ) :
hτ.measurableSpace ≤ m := by
intro s hs
change ∀ i, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i}) at hs
rw [(_ : s = ⋃ i, s ∩ {ω | τ ω ≤ i})]
· exact MeasurableSet.iUnion fun i => f.le i _ (hs i)
· ext ω; constructor <;> rw [Set.mem_iUnion]
· exact fun hx => ⟨τ ω, hx, le_rfl⟩
· rintro ⟨_, hx, _⟩
exact hx
#align measure_theory.is_stopping_time.measurable_space_le_of_countable MeasureTheory.IsStoppingTime.measurableSpace_le_of_countable
theorem measurableSpace_le' [IsCountablyGenerated (atTop : Filter ι)] [(atTop : Filter ι).NeBot]
(hτ : IsStoppingTime f τ) : hτ.measurableSpace ≤ m := by
intro s hs
change ∀ i, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i}) at hs
obtain ⟨seq : ℕ → ι, h_seq_tendsto⟩ := (atTop : Filter ι).exists_seq_tendsto
rw [(_ : s = ⋃ n, s ∩ {ω | τ ω ≤ seq n})]
· exact MeasurableSet.iUnion fun i => f.le (seq i) _ (hs (seq i))
· ext ω; constructor <;> rw [Set.mem_iUnion]
· intro hx
suffices ∃ i, τ ω ≤ seq i from ⟨this.choose, hx, this.choose_spec⟩
rw [tendsto_atTop] at h_seq_tendsto
exact (h_seq_tendsto (τ ω)).exists
· rintro ⟨_, hx, _⟩
exact hx
#align measure_theory.is_stopping_time.measurable_space_le' MeasureTheory.IsStoppingTime.measurableSpace_le'
theorem measurableSpace_le {ι} [SemilatticeSup ι] {f : Filtration ι m} {τ : Ω → ι}
[IsCountablyGenerated (atTop : Filter ι)] (hτ : IsStoppingTime f τ) :
hτ.measurableSpace ≤ m := by
cases isEmpty_or_nonempty ι
· haveI : IsEmpty Ω := ⟨fun ω => IsEmpty.false (τ ω)⟩
intro s _
suffices hs : s = ∅ by rw [hs]; exact MeasurableSet.empty
haveI : Unique (Set Ω) := Set.uniqueEmpty
rw [Unique.eq_default s, Unique.eq_default ∅]
exact measurableSpace_le' hτ
#align measure_theory.is_stopping_time.measurable_space_le MeasureTheory.IsStoppingTime.measurableSpace_le
example {f : Filtration ℕ m} {τ : Ω → ℕ} (hτ : IsStoppingTime f τ) : hτ.measurableSpace ≤ m :=
hτ.measurableSpace_le
example {f : Filtration ℝ m} {τ : Ω → ℝ} (hτ : IsStoppingTime f τ) : hτ.measurableSpace ≤ m :=
hτ.measurableSpace_le
@[simp]
theorem measurableSpace_const (f : Filtration ι m) (i : ι) :
(isStoppingTime_const f i).measurableSpace = f i := by
ext1 s
change MeasurableSet[(isStoppingTime_const f i).measurableSpace] s ↔ MeasurableSet[f i] s
rw [IsStoppingTime.measurableSet]
constructor <;> intro h
· specialize h i
simpa only [le_refl, Set.setOf_true, Set.inter_univ] using h
· intro j
by_cases hij : i ≤ j
· simp only [hij, Set.setOf_true, Set.inter_univ]
exact f.mono hij _ h
· simp only [hij, Set.setOf_false, Set.inter_empty, @MeasurableSet.empty _ (f.1 j)]
#align measure_theory.is_stopping_time.measurable_space_const MeasureTheory.IsStoppingTime.measurableSpace_const
theorem measurableSet_inter_eq_iff (hτ : IsStoppingTime f τ) (s : Set Ω) (i : ι) :
MeasurableSet[hτ.measurableSpace] (s ∩ {ω | τ ω = i}) ↔
MeasurableSet[f i] (s ∩ {ω | τ ω = i}) := by
have : ∀ j, {ω : Ω | τ ω = i} ∩ {ω : Ω | τ ω ≤ j} = {ω : Ω | τ ω = i} ∩ {_ω | i ≤ j} := by
intro j
ext1 ω
simp only [Set.mem_inter_iff, Set.mem_setOf_eq, and_congr_right_iff]
intro hxi
rw [hxi]
constructor <;> intro h
· specialize h i
simpa only [Set.inter_assoc, this, le_refl, Set.setOf_true, Set.inter_univ] using h
· intro j
rw [Set.inter_assoc, this]
by_cases hij : i ≤ j
· simp only [hij, Set.setOf_true, Set.inter_univ]
exact f.mono hij _ h
· set_option tactic.skipAssignedInstances false in simp [hij]
convert @MeasurableSet.empty _ (Filtration.seq f j)
#align measure_theory.is_stopping_time.measurable_set_inter_eq_iff MeasureTheory.IsStoppingTime.measurableSet_inter_eq_iff
theorem measurableSpace_le_of_le_const (hτ : IsStoppingTime f τ) {i : ι} (hτ_le : ∀ ω, τ ω ≤ i) :
hτ.measurableSpace ≤ f i :=
(measurableSpace_mono hτ _ hτ_le).trans (measurableSpace_const _ _).le
#align measure_theory.is_stopping_time.measurable_space_le_of_le_const MeasureTheory.IsStoppingTime.measurableSpace_le_of_le_const
theorem measurableSpace_le_of_le (hτ : IsStoppingTime f τ) {n : ι} (hτ_le : ∀ ω, τ ω ≤ n) :
hτ.measurableSpace ≤ m :=
(hτ.measurableSpace_le_of_le_const hτ_le).trans (f.le n)
#align measure_theory.is_stopping_time.measurable_space_le_of_le MeasureTheory.IsStoppingTime.measurableSpace_le_of_le
theorem le_measurableSpace_of_const_le (hτ : IsStoppingTime f τ) {i : ι} (hτ_le : ∀ ω, i ≤ τ ω) :
f i ≤ hτ.measurableSpace :=
(measurableSpace_const _ _).symm.le.trans (measurableSpace_mono _ hτ hτ_le)
#align measure_theory.is_stopping_time.le_measurable_space_of_const_le MeasureTheory.IsStoppingTime.le_measurableSpace_of_const_le
end Preorder
instance sigmaFinite_stopping_time {ι} [SemilatticeSup ι] [OrderBot ι]
[(Filter.atTop : Filter ι).IsCountablyGenerated] {μ : Measure Ω} {f : Filtration ι m}
{τ : Ω → ι} [SigmaFiniteFiltration μ f] (hτ : IsStoppingTime f τ) :
SigmaFinite (μ.trim hτ.measurableSpace_le) := by
refine @sigmaFiniteTrim_mono _ _ ?_ _ _ _ ?_ ?_
· exact f ⊥
· exact hτ.le_measurableSpace_of_const_le fun _ => bot_le
· infer_instance
#align measure_theory.is_stopping_time.sigma_finite_stopping_time MeasureTheory.IsStoppingTime.sigmaFinite_stopping_time
instance sigmaFinite_stopping_time_of_le {ι} [SemilatticeSup ι] [OrderBot ι] {μ : Measure Ω}
{f : Filtration ι m} {τ : Ω → ι} [SigmaFiniteFiltration μ f] (hτ : IsStoppingTime f τ) {n : ι}
(hτ_le : ∀ ω, τ ω ≤ n) : SigmaFinite (μ.trim (hτ.measurableSpace_le_of_le hτ_le)) := by
refine @sigmaFiniteTrim_mono _ _ ?_ _ _ _ ?_ ?_
· exact f ⊥
· exact hτ.le_measurableSpace_of_const_le fun _ => bot_le
· infer_instance
#align measure_theory.is_stopping_time.sigma_finite_stopping_time_of_le MeasureTheory.IsStoppingTime.sigmaFinite_stopping_time_of_le
section LinearOrder
variable [LinearOrder ι] {f : Filtration ι m} {τ π : Ω → ι}
protected theorem measurableSet_le' (hτ : IsStoppingTime f τ) (i : ι) :
MeasurableSet[hτ.measurableSpace] {ω | τ ω ≤ i} := by
intro j
have : {ω : Ω | τ ω ≤ i} ∩ {ω : Ω | τ ω ≤ j} = {ω : Ω | τ ω ≤ min i j} := by
ext1 ω; simp only [Set.mem_inter_iff, Set.mem_setOf_eq, le_min_iff]
rw [this]
exact f.mono (min_le_right i j) _ (hτ _)
#align measure_theory.is_stopping_time.measurable_set_le' MeasureTheory.IsStoppingTime.measurableSet_le'
protected theorem measurableSet_gt' (hτ : IsStoppingTime f τ) (i : ι) :
MeasurableSet[hτ.measurableSpace] {ω | i < τ ω} := by
have : {ω : Ω | i < τ ω} = {ω : Ω | τ ω ≤ i}ᶜ := by ext1 ω; simp
rw [this]
exact (hτ.measurableSet_le' i).compl
#align measure_theory.is_stopping_time.measurable_set_gt' MeasureTheory.IsStoppingTime.measurableSet_gt'
protected theorem measurableSet_eq' [TopologicalSpace ι] [OrderTopology ι]
[FirstCountableTopology ι] (hτ : IsStoppingTime f τ) (i : ι) :
MeasurableSet[hτ.measurableSpace] {ω | τ ω = i} := by
rw [← Set.univ_inter {ω | τ ω = i}, measurableSet_inter_eq_iff, Set.univ_inter]
exact hτ.measurableSet_eq i
#align measure_theory.is_stopping_time.measurable_set_eq' MeasureTheory.IsStoppingTime.measurableSet_eq'
protected theorem measurableSet_ge' [TopologicalSpace ι] [OrderTopology ι]
[FirstCountableTopology ι] (hτ : IsStoppingTime f τ) (i : ι) :
MeasurableSet[hτ.measurableSpace] {ω | i ≤ τ ω} := by
have : {ω | i ≤ τ ω} = {ω | τ ω = i} ∪ {ω | i < τ ω} := by
ext1 ω
simp only [le_iff_lt_or_eq, Set.mem_setOf_eq, Set.mem_union]
rw [@eq_comm _ i, or_comm]
rw [this]
exact (hτ.measurableSet_eq' i).union (hτ.measurableSet_gt' i)
#align measure_theory.is_stopping_time.measurable_set_ge' MeasureTheory.IsStoppingTime.measurableSet_ge'
protected theorem measurableSet_lt' [TopologicalSpace ι] [OrderTopology ι]
[FirstCountableTopology ι] (hτ : IsStoppingTime f τ) (i : ι) :
MeasurableSet[hτ.measurableSpace] {ω | τ ω < i} := by
have : {ω | τ ω < i} = {ω | τ ω ≤ i} \ {ω | τ ω = i} := by
ext1 ω
simp only [lt_iff_le_and_ne, Set.mem_setOf_eq, Set.mem_diff]
rw [this]
exact (hτ.measurableSet_le' i).diff (hτ.measurableSet_eq' i)
#align measure_theory.is_stopping_time.measurable_set_lt' MeasureTheory.IsStoppingTime.measurableSet_lt'
section Countable
protected theorem measurableSet_eq_of_countable_range' (hτ : IsStoppingTime f τ)
(h_countable : (Set.range τ).Countable) (i : ι) :
MeasurableSet[hτ.measurableSpace] {ω | τ ω = i} := by
rw [← Set.univ_inter {ω | τ ω = i}, measurableSet_inter_eq_iff, Set.univ_inter]
exact hτ.measurableSet_eq_of_countable_range h_countable i
#align measure_theory.is_stopping_time.measurable_set_eq_of_countable_range' MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable_range'
protected theorem measurableSet_eq_of_countable' [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
MeasurableSet[hτ.measurableSpace] {ω | τ ω = i} :=
hτ.measurableSet_eq_of_countable_range' (Set.to_countable _) i
#align measure_theory.is_stopping_time.measurable_set_eq_of_countable' MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable'
protected theorem measurableSet_ge_of_countable_range' (hτ : IsStoppingTime f τ)
(h_countable : (Set.range τ).Countable) (i : ι) :
MeasurableSet[hτ.measurableSpace] {ω | i ≤ τ ω} := by
have : {ω | i ≤ τ ω} = {ω | τ ω = i} ∪ {ω | i < τ ω} := by
ext1 ω
simp only [le_iff_lt_or_eq, Set.mem_setOf_eq, Set.mem_union]
rw [@eq_comm _ i, or_comm]
rw [this]
exact (hτ.measurableSet_eq_of_countable_range' h_countable i).union (hτ.measurableSet_gt' i)
#align measure_theory.is_stopping_time.measurable_set_ge_of_countable_range' MeasureTheory.IsStoppingTime.measurableSet_ge_of_countable_range'
protected theorem measurableSet_ge_of_countable' [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
MeasurableSet[hτ.measurableSpace] {ω | i ≤ τ ω} :=
hτ.measurableSet_ge_of_countable_range' (Set.to_countable _) i
#align measure_theory.is_stopping_time.measurable_set_ge_of_countable' MeasureTheory.IsStoppingTime.measurableSet_ge_of_countable'
protected theorem measurableSet_lt_of_countable_range' (hτ : IsStoppingTime f τ)
(h_countable : (Set.range τ).Countable) (i : ι) :
MeasurableSet[hτ.measurableSpace] {ω | τ ω < i} := by
have : {ω | τ ω < i} = {ω | τ ω ≤ i} \ {ω | τ ω = i} := by
ext1 ω
simp only [lt_iff_le_and_ne, Set.mem_setOf_eq, Set.mem_diff]
rw [this]
exact (hτ.measurableSet_le' i).diff (hτ.measurableSet_eq_of_countable_range' h_countable i)
#align measure_theory.is_stopping_time.measurable_set_lt_of_countable_range' MeasureTheory.IsStoppingTime.measurableSet_lt_of_countable_range'
protected theorem measurableSet_lt_of_countable' [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
MeasurableSet[hτ.measurableSpace] {ω | τ ω < i} :=
hτ.measurableSet_lt_of_countable_range' (Set.to_countable _) i
#align measure_theory.is_stopping_time.measurable_set_lt_of_countable' MeasureTheory.IsStoppingTime.measurableSet_lt_of_countable'
protected theorem measurableSpace_le_of_countable_range (hτ : IsStoppingTime f τ)
(h_countable : (Set.range τ).Countable) : hτ.measurableSpace ≤ m := by
intro s hs
change ∀ i, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i}) at hs
rw [(_ : s = ⋃ i ∈ Set.range τ, s ∩ {ω | τ ω ≤ i})]
· exact MeasurableSet.biUnion h_countable fun i _ => f.le i _ (hs i)
· ext ω
constructor <;> rw [Set.mem_iUnion]
· exact fun hx => ⟨τ ω, by simpa using hx⟩
· rintro ⟨i, hx⟩
simp only [Set.mem_range, Set.iUnion_exists, Set.mem_iUnion, Set.mem_inter_iff,
Set.mem_setOf_eq, exists_prop, exists_and_right] at hx
exact hx.2.1
#align measure_theory.is_stopping_time.measurable_space_le_of_countable_range MeasureTheory.IsStoppingTime.measurableSpace_le_of_countable_range
end Countable
protected theorem measurable [TopologicalSpace ι] [MeasurableSpace ι] [BorelSpace ι]
[OrderTopology ι] [SecondCountableTopology ι] (hτ : IsStoppingTime f τ) :
Measurable[hτ.measurableSpace] τ :=
@measurable_of_Iic ι Ω _ _ _ hτ.measurableSpace _ _ _ _ fun i => hτ.measurableSet_le' i
#align measure_theory.is_stopping_time.measurable MeasureTheory.IsStoppingTime.measurable
protected theorem measurable_of_le [TopologicalSpace ι] [MeasurableSpace ι] [BorelSpace ι]
[OrderTopology ι] [SecondCountableTopology ι] (hτ : IsStoppingTime f τ) {i : ι}
(hτ_le : ∀ ω, τ ω ≤ i) : Measurable[f i] τ :=
hτ.measurable.mono (measurableSpace_le_of_le_const _ hτ_le) le_rfl
#align measure_theory.is_stopping_time.measurable_of_le MeasureTheory.IsStoppingTime.measurable_of_le
theorem measurableSpace_min (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) :
(hτ.min hπ).measurableSpace = hτ.measurableSpace ⊓ hπ.measurableSpace := by
refine' le_antisymm _ _
· exact le_inf (measurableSpace_mono _ hτ fun _ => min_le_left _ _)
(measurableSpace_mono _ hπ fun _ => min_le_right _ _)
· intro s
change MeasurableSet[hτ.measurableSpace] s ∧ MeasurableSet[hπ.measurableSpace] s →
MeasurableSet[(hτ.min hπ).measurableSpace] s
simp_rw [IsStoppingTime.measurableSet]
have : ∀ i, {ω | min (τ ω) (π ω) ≤ i} = {ω | τ ω ≤ i} ∪ {ω | π ω ≤ i} := by
intro i; ext1 ω; simp
simp_rw [this, Set.inter_union_distrib_left]
exact fun h i => (h.left i).union (h.right i)
#align measure_theory.is_stopping_time.measurable_space_min MeasureTheory.IsStoppingTime.measurableSpace_min
theorem measurableSet_min_iff (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) (s : Set Ω) :
MeasurableSet[(hτ.min hπ).measurableSpace] s ↔
MeasurableSet[hτ.measurableSpace] s ∧ MeasurableSet[hπ.measurableSpace] s := by
rw [measurableSpace_min hτ hπ]; rfl
#align measure_theory.is_stopping_time.measurable_set_min_iff MeasureTheory.IsStoppingTime.measurableSet_min_iff
theorem measurableSpace_min_const (hτ : IsStoppingTime f τ) {i : ι} :
(hτ.min_const i).measurableSpace = hτ.measurableSpace ⊓ f i := by
rw [hτ.measurableSpace_min (isStoppingTime_const _ i), measurableSpace_const]
#align measure_theory.is_stopping_time.measurable_space_min_const MeasureTheory.IsStoppingTime.measurableSpace_min_const
theorem measurableSet_min_const_iff (hτ : IsStoppingTime f τ) (s : Set Ω) {i : ι} :
MeasurableSet[(hτ.min_const i).measurableSpace] s ↔
MeasurableSet[hτ.measurableSpace] s ∧ MeasurableSet[f i] s := by
rw [measurableSpace_min_const hτ]; apply MeasurableSpace.measurableSet_inf
#align measure_theory.is_stopping_time.measurable_set_min_const_iff MeasureTheory.IsStoppingTime.measurableSet_min_const_iff
theorem measurableSet_inter_le [TopologicalSpace ι] [SecondCountableTopology ι] [OrderTopology ι]
[MeasurableSpace ι] [BorelSpace ι] (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π)
(s : Set Ω) (hs : MeasurableSet[hτ.measurableSpace] s) :
MeasurableSet[(hτ.min hπ).measurableSpace] (s ∩ {ω | τ ω ≤ π ω}) := by
simp_rw [IsStoppingTime.measurableSet] at hs ⊢
intro i
have : s ∩ {ω | τ ω ≤ π ω} ∩ {ω | min (τ ω) (π ω) ≤ i} =
s ∩ {ω | τ ω ≤ i} ∩ {ω | min (τ ω) (π ω) ≤ i} ∩
{ω | min (τ ω) i ≤ min (min (τ ω) (π ω)) i} := by
ext1 ω
simp only [min_le_iff, Set.mem_inter_iff, Set.mem_setOf_eq, le_min_iff, le_refl, true_and_iff,
and_true_iff, true_or_iff, or_true_iff]
by_cases hτi : τ ω ≤ i
· simp only [hτi, true_or_iff, and_true_iff, and_congr_right_iff]
intro
constructor <;> intro h
· exact Or.inl h
· cases' h with h h
· exact h
· exact hτi.trans h
simp only [hτi, false_or_iff, and_false_iff, false_and_iff, iff_false_iff, not_and, not_le,
and_imp]
refine' fun _ hτ_le_π => lt_of_lt_of_le _ hτ_le_π
rw [← not_le]
exact hτi
rw [this]
refine' ((hs i).inter ((hτ.min hπ) i)).inter _
apply @measurableSet_le _ _ _ _ _ (Filtration.seq f i) _ _ _ _ _ ?_ ?_
· exact (hτ.min_const i).measurable_of_le fun _ => min_le_right _ _
· exact ((hτ.min hπ).min_const i).measurable_of_le fun _ => min_le_right _ _
#align measure_theory.is_stopping_time.measurable_set_inter_le MeasureTheory.IsStoppingTime.measurableSet_inter_le
theorem measurableSet_inter_le_iff [TopologicalSpace ι] [SecondCountableTopology ι]
[OrderTopology ι] [MeasurableSpace ι] [BorelSpace ι] (hτ : IsStoppingTime f τ)
(hπ : IsStoppingTime f π) (s : Set Ω) :
MeasurableSet[hτ.measurableSpace] (s ∩ {ω | τ ω ≤ π ω}) ↔
MeasurableSet[(hτ.min hπ).measurableSpace] (s ∩ {ω | τ ω ≤ π ω}) := by
constructor <;> intro h
· have : s ∩ {ω | τ ω ≤ π ω} = s ∩ {ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ π ω} := by
rw [Set.inter_assoc, Set.inter_self]
rw [this]
exact measurableSet_inter_le _ hπ _ h
· rw [measurableSet_min_iff hτ hπ] at h
exact h.1
#align measure_theory.is_stopping_time.measurable_set_inter_le_iff MeasureTheory.IsStoppingTime.measurableSet_inter_le_iff
theorem measurableSet_inter_le_const_iff (hτ : IsStoppingTime f τ) (s : Set Ω) (i : ι) :
MeasurableSet[hτ.measurableSpace] (s ∩ {ω | τ ω ≤ i}) ↔
MeasurableSet[(hτ.min_const i).measurableSpace] (s ∩ {ω | τ ω ≤ i}) := by
rw [IsStoppingTime.measurableSet_min_iff hτ (isStoppingTime_const _ i),
IsStoppingTime.measurableSpace_const, IsStoppingTime.measurableSet]
refine' ⟨fun h => ⟨h, _⟩, fun h j => h.1 j⟩
specialize h i
rwa [Set.inter_assoc, Set.inter_self] at h
#align measure_theory.is_stopping_time.measurable_set_inter_le_const_iff MeasureTheory.IsStoppingTime.measurableSet_inter_le_const_iff
theorem measurableSet_le_stopping_time [TopologicalSpace ι] [SecondCountableTopology ι]
[OrderTopology ι] [MeasurableSpace ι] [BorelSpace ι] (hτ : IsStoppingTime f τ)
(hπ : IsStoppingTime f π) : MeasurableSet[hτ.measurableSpace] {ω | τ ω ≤ π ω} := by
rw [hτ.measurableSet]
intro j
have : {ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j ≤ min (π ω) j} ∩ {ω | τ ω ≤ j} := by
ext1 ω
simp only [Set.mem_inter_iff, Set.mem_setOf_eq, min_le_iff, le_min_iff, le_refl, and_true_iff,
and_congr_left_iff]
intro h
simp only [h, or_self_iff, and_true_iff]
rw [Iff.comm, or_iff_left_iff_imp]
exact h.trans
rw [this]
refine' MeasurableSet.inter _ (hτ.measurableSet_le j)
apply @measurableSet_le _ _ _ _ _ (Filtration.seq f j) _ _ _ _ _ ?_ ?_
· exact (hτ.min_const j).measurable_of_le fun _ => min_le_right _ _
· exact (hπ.min_const j).measurable_of_le fun _ => min_le_right _ _
#align measure_theory.is_stopping_time.measurable_set_le_stopping_time MeasureTheory.IsStoppingTime.measurableSet_le_stopping_time
theorem measurableSet_stopping_time_le [TopologicalSpace ι] [SecondCountableTopology ι]
[OrderTopology ι] [MeasurableSpace ι] [BorelSpace ι] (hτ : IsStoppingTime f τ)
(hπ : IsStoppingTime f π) : MeasurableSet[hπ.measurableSpace] {ω | τ ω ≤ π ω} := by
suffices MeasurableSet[(hτ.min hπ).measurableSpace] {ω : Ω | τ ω ≤ π ω} by
rw [measurableSet_min_iff hτ hπ] at this; exact this.2
rw [← Set.univ_inter {ω : Ω | τ ω ≤ π ω}, ← hτ.measurableSet_inter_le_iff hπ, Set.univ_inter]
exact measurableSet_le_stopping_time hτ hπ
#align measure_theory.is_stopping_time.measurable_set_stopping_time_le MeasureTheory.IsStoppingTime.measurableSet_stopping_time_le
theorem measurableSet_eq_stopping_time [AddGroup ι] [TopologicalSpace ι] [MeasurableSpace ι]
[BorelSpace ι] [OrderTopology ι] [MeasurableSingletonClass ι] [SecondCountableTopology ι]
[MeasurableSub₂ ι] (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) :
MeasurableSet[hτ.measurableSpace] {ω | τ ω = π ω} := by
rw [hτ.measurableSet]
intro j
have : {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} =
{ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j} := by
ext1 ω
simp only [Set.mem_inter_iff, Set.mem_setOf_eq]
refine' ⟨fun h => ⟨⟨_, h.2⟩, _⟩, fun h => ⟨_, h.1.2⟩⟩
· rw [h.1]
· rw [← h.1]; exact h.2
· cases' h with h' hσ_le
cases' h' with h_eq hτ_le
rwa [min_eq_left hτ_le, min_eq_left hσ_le] at h_eq
rw [this]
refine'
MeasurableSet.inter (MeasurableSet.inter _ (hτ.measurableSet_le j)) (hπ.measurableSet_le j)
apply measurableSet_eq_fun
· exact (hτ.min_const j).measurable_of_le fun _ => min_le_right _ _
· exact (hπ.min_const j).measurable_of_le fun _ => min_le_right _ _
#align measure_theory.is_stopping_time.measurable_set_eq_stopping_time MeasureTheory.IsStoppingTime.measurableSet_eq_stopping_time
theorem measurableSet_eq_stopping_time_of_countable [Countable ι] [TopologicalSpace ι]
[MeasurableSpace ι] [BorelSpace ι] [OrderTopology ι] [MeasurableSingletonClass ι]
[SecondCountableTopology ι] (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) :
MeasurableSet[hτ.measurableSpace] {ω | τ ω = π ω} := by
rw [hτ.measurableSet]
intro j
have : {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} =
{ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j} := by
ext1 ω
simp only [Set.mem_inter_iff, Set.mem_setOf_eq]
refine' ⟨fun h => ⟨⟨_, h.2⟩, _⟩, fun h => ⟨_, h.1.2⟩⟩
· rw [h.1]
· rw [← h.1]; exact h.2
· cases' h with h' hπ_le
cases' h' with h_eq hτ_le
rwa [min_eq_left hτ_le, min_eq_left hπ_le] at h_eq
rw [this]
refine'
MeasurableSet.inter (MeasurableSet.inter _ (hτ.measurableSet_le j)) (hπ.measurableSet_le j)
apply measurableSet_eq_fun_of_countable
· exact (hτ.min_const j).measurable_of_le fun _ => min_le_right _ _
· exact (hπ.min_const j).measurable_of_le fun _ => min_le_right _ _
#align measure_theory.is_stopping_time.measurable_set_eq_stopping_time_of_countable MeasureTheory.IsStoppingTime.measurableSet_eq_stopping_time_of_countable
end LinearOrder
end IsStoppingTime
section LinearOrder
/-! ## Stopped value and stopped process -/
/-- Given a map `u : ι → Ω → E`, its stopped value with respect to the stopping
time `τ` is the map `x ↦ u (τ ω) ω`. -/
def stoppedValue (u : ι → Ω → β) (τ : Ω → ι) : Ω → β := fun ω => u (τ ω) ω
#align measure_theory.stopped_value MeasureTheory.stoppedValue
theorem stoppedValue_const (u : ι → Ω → β) (i : ι) : (stoppedValue u fun _ => i) = u i :=
rfl
#align measure_theory.stopped_value_const MeasureTheory.stoppedValue_const
variable [LinearOrder ι]
/-- Given a map `u : ι → Ω → E`, the stopped process with respect to `τ` is `u i ω` if
`i ≤ τ ω`, and `u (τ ω) ω` otherwise.
Intuitively, the stopped process stops evolving once the stopping time has occured. -/
def stoppedProcess (u : ι → Ω → β) (τ : Ω → ι) : ι → Ω → β := fun i ω => u (min i (τ ω)) ω
#align measure_theory.stopped_process MeasureTheory.stoppedProcess
theorem stoppedProcess_eq_stoppedValue {u : ι → Ω → β} {τ : Ω → ι} :
stoppedProcess u τ = fun i => stoppedValue u fun ω => min i (τ ω) :=
rfl
#align measure_theory.stopped_process_eq_stopped_value MeasureTheory.stoppedProcess_eq_stoppedValue
theorem stoppedValue_stoppedProcess {u : ι → Ω → β} {τ σ : Ω → ι} :
stoppedValue (stoppedProcess u τ) σ = stoppedValue u fun ω => min (σ ω) (τ ω) :=
rfl
#align measure_theory.stopped_value_stopped_process MeasureTheory.stoppedValue_stoppedProcess
theorem stoppedProcess_eq_of_le {u : ι → Ω → β} {τ : Ω → ι} {i : ι} {ω : Ω} (h : i ≤ τ ω) :
stoppedProcess u τ i ω = u i ω := by simp [stoppedProcess, min_eq_left h]
#align measure_theory.stopped_process_eq_of_le MeasureTheory.stoppedProcess_eq_of_le
theorem stoppedProcess_eq_of_ge {u : ι → Ω → β} {τ : Ω → ι} {i : ι} {ω : Ω} (h : τ ω ≤ i) :
stoppedProcess u τ i ω = u (τ ω) ω := by simp [stoppedProcess, min_eq_right h]
#align measure_theory.stopped_process_eq_of_ge MeasureTheory.stoppedProcess_eq_of_ge
section ProgMeasurable
variable [MeasurableSpace ι] [TopologicalSpace ι] [OrderTopology ι] [SecondCountableTopology ι]
[BorelSpace ι] [TopologicalSpace β] {u : ι → Ω → β} {τ : Ω → ι} {f : Filtration ι m}
theorem progMeasurable_min_stopping_time [MetrizableSpace ι] (hτ : IsStoppingTime f τ) :
ProgMeasurable f fun i ω => min i (τ ω) := by
intro i
let m_prod : MeasurableSpace (Set.Iic i × Ω) := Subtype.instMeasurableSpace.prod (f i)
let m_set : ∀ t : Set (Set.Iic i × Ω), MeasurableSpace t := fun _ =>
@Subtype.instMeasurableSpace (Set.Iic i × Ω) _ m_prod
let s := {p : Set.Iic i × Ω | τ p.2 ≤ i}
have hs : MeasurableSet[m_prod] s := @measurable_snd (Set.Iic i) Ω _ (f i) _ (hτ i)
have h_meas_fst : ∀ t : Set (Set.Iic i × Ω),
Measurable[m_set t] fun x : t => ((x : Set.Iic i × Ω).fst : ι) :=
fun t => (@measurable_subtype_coe (Set.Iic i × Ω) m_prod _).fst.subtype_val
apply Measurable.stronglyMeasurable
refine' measurable_of_restrict_of_restrict_compl hs _ _
· refine @Measurable.min _ _ _ _ _ (m_set s) _ _ _ _ _ (h_meas_fst s) ?_
refine' @measurable_of_Iic ι s _ _ _ (m_set s) _ _ _ _ fun j => _
have h_set_eq : (fun x : s => τ (x : Set.Iic i × Ω).snd) ⁻¹' Set.Iic j =
(fun x : s => (x : Set.Iic i × Ω).snd) ⁻¹' {ω | τ ω ≤ min i j} := by
ext1 ω
simp only [Set.mem_preimage, Set.mem_Iic, iff_and_self, le_min_iff, Set.mem_setOf_eq]
exact fun _ => ω.prop
rw [h_set_eq]
suffices h_meas : @Measurable _ _ (m_set s) (f i) fun x : s ↦ (x : Set.Iic i × Ω).snd from
h_meas (f.mono (min_le_left _ _) _ (hτ.measurableSet_le (min i j)))
exact measurable_snd.comp (@measurable_subtype_coe _ m_prod _)
· letI sc := sᶜ
suffices h_min_eq_left :
(fun x : sc => min (↑(x : Set.Iic i × Ω).fst) (τ (x : Set.Iic i × Ω).snd)) = fun x : sc =>
↑(x : Set.Iic i × Ω).fst by
simp (config := { unfoldPartialApp := true }) only [Set.restrict, h_min_eq_left]
exact h_meas_fst _
ext1 ω
rw [min_eq_left]
have hx_fst_le : ↑(ω : Set.Iic i × Ω).fst ≤ i := (ω : Set.Iic i × Ω).fst.prop
refine' hx_fst_le.trans (le_of_lt _)
convert ω.prop
simp only [sc, s, not_le, Set.mem_compl_iff, Set.mem_setOf_eq]
#align measure_theory.prog_measurable_min_stopping_time MeasureTheory.progMeasurable_min_stopping_time
theorem ProgMeasurable.stoppedProcess [MetrizableSpace ι] (h : ProgMeasurable f u)
(hτ : IsStoppingTime f τ) : ProgMeasurable f (stoppedProcess u τ) :=
h.comp (progMeasurable_min_stopping_time hτ) fun _ _ => min_le_left _ _
#align measure_theory.prog_measurable.stopped_process MeasureTheory.ProgMeasurable.stoppedProcess
theorem ProgMeasurable.adapted_stoppedProcess [MetrizableSpace ι] (h : ProgMeasurable f u)
(hτ : IsStoppingTime f τ) : Adapted f (MeasureTheory.stoppedProcess u τ) :=
(h.stoppedProcess hτ).adapted
#align measure_theory.prog_measurable.adapted_stopped_process MeasureTheory.ProgMeasurable.adapted_stoppedProcess
theorem ProgMeasurable.stronglyMeasurable_stoppedProcess [MetrizableSpace ι]
(hu : ProgMeasurable f u) (hτ : IsStoppingTime f τ) (i : ι) :
StronglyMeasurable (MeasureTheory.stoppedProcess u τ i) :=
(hu.adapted_stoppedProcess hτ i).mono (f.le _)
#align measure_theory.prog_measurable.strongly_measurable_stopped_process MeasureTheory.ProgMeasurable.stronglyMeasurable_stoppedProcess
theorem stronglyMeasurable_stoppedValue_of_le (h : ProgMeasurable f u) (hτ : IsStoppingTime f τ)
{n : ι} (hτ_le : ∀ ω, τ ω ≤ n) : StronglyMeasurable[f n] (stoppedValue u τ) := by
have : stoppedValue u τ =
(fun p : Set.Iic n × Ω => u (↑p.fst) p.snd) ∘ fun ω => (⟨τ ω, hτ_le ω⟩, ω) := by
ext1 ω; simp only [stoppedValue, Function.comp_apply, Subtype.coe_mk]
rw [this]
refine' StronglyMeasurable.comp_measurable (h n) _
exact (hτ.measurable_of_le hτ_le).subtype_mk.prod_mk measurable_id
#align measure_theory.strongly_measurable_stopped_value_of_le MeasureTheory.stronglyMeasurable_stoppedValue_of_le
theorem measurable_stoppedValue [MetrizableSpace β] [MeasurableSpace β] [BorelSpace β]
(hf_prog : ProgMeasurable f u) (hτ : IsStoppingTime f τ) :
Measurable[hτ.measurableSpace] (stoppedValue u τ) := by
have h_str_meas : ∀ i, StronglyMeasurable[f i] (stoppedValue u fun ω => min (τ ω) i) := fun i =>
stronglyMeasurable_stoppedValue_of_le hf_prog (hτ.min_const i) fun _ => min_le_right _ _
intro t ht i
suffices stoppedValue u τ ⁻¹' t ∩ {ω : Ω | τ ω ≤ i} =
(stoppedValue u fun ω => min (τ ω) i) ⁻¹' t ∩ {ω : Ω | τ ω ≤ i} by
rw [this]; exact ((h_str_meas i).measurable ht).inter (hτ.measurableSet_le i)
ext1 ω
simp only [stoppedValue, Set.mem_inter_iff, Set.mem_preimage, Set.mem_setOf_eq,
and_congr_left_iff]
intro h
rw [min_eq_left h]
#align measure_theory.measurable_stopped_value MeasureTheory.measurable_stoppedValue
end ProgMeasurable
end LinearOrder
section StoppedValueOfMemFinset
variable {μ : Measure Ω} {τ σ : Ω → ι} {E : Type*} {p : ℝ≥0∞} {u : ι → Ω → E}
theorem stoppedValue_eq_of_mem_finset [AddCommMonoid E] {s : Finset ι} (hbdd : ∀ ω, τ ω ∈ s) :
stoppedValue u τ = ∑ i in s, Set.indicator {ω | τ ω = i} (u i) := by
ext y
rw [stoppedValue, Finset.sum_apply, Finset.sum_indicator_eq_sum_filter]
suffices Finset.filter (fun i => y ∈ {ω : Ω | τ ω = i}) s = ({τ y} : Finset ι) by
rw [this, Finset.sum_singleton]
ext1 ω
simp only [Set.mem_setOf_eq, Finset.mem_filter, Finset.mem_singleton]
constructor <;> intro h
· exact h.2.symm
· refine' ⟨_, h.symm⟩; rw [h]; exact hbdd y
#align measure_theory.stopped_value_eq_of_mem_finset MeasureTheory.stoppedValue_eq_of_mem_finset
theorem stoppedValue_eq' [Preorder ι] [LocallyFiniteOrderBot ι] [AddCommMonoid E] {N : ι}
(hbdd : ∀ ω, τ ω ≤ N) :
stoppedValue u τ = ∑ i in Finset.Iic N, Set.indicator {ω | τ ω = i} (u i) :=
stoppedValue_eq_of_mem_finset fun ω => Finset.mem_Iic.mpr (hbdd ω)
#align measure_theory.stopped_value_eq' MeasureTheory.stoppedValue_eq'
theorem stoppedProcess_eq_of_mem_finset [LinearOrder ι] [AddCommMonoid E] {s : Finset ι} (n : ι)
(hbdd : ∀ ω, τ ω < n → τ ω ∈ s) : stoppedProcess u τ n = Set.indicator {a | n ≤ τ a} (u n) +
∑ i in s.filter (· < n), Set.indicator {ω | τ ω = i} (u i) := by
ext ω
rw [Pi.add_apply, Finset.sum_apply]
rcases le_or_lt n (τ ω) with h | h
· rw [stoppedProcess_eq_of_le h, Set.indicator_of_mem, Finset.sum_eq_zero, add_zero]
· intro m hm
refine' Set.indicator_of_not_mem _ _
rw [Finset.mem_filter] at hm
exact (hm.2.trans_le h).ne'
· exact h
· rw [stoppedProcess_eq_of_ge (le_of_lt h), Finset.sum_eq_single_of_mem (τ ω)]
· rw [Set.indicator_of_not_mem, zero_add, Set.indicator_of_mem] <;> rw [Set.mem_setOf]
exact not_le.2 h
· rw [Finset.mem_filter]
exact ⟨hbdd ω h, h⟩
· intro b _ hneq
rw [Set.indicator_of_not_mem]
rw [Set.mem_setOf]
exact hneq.symm
#align measure_theory.stopped_process_eq_of_mem_finset MeasureTheory.stoppedProcess_eq_of_mem_finset
theorem stoppedProcess_eq'' [LinearOrder ι] [LocallyFiniteOrderBot ι] [AddCommMonoid E] (n : ι) :
stoppedProcess u τ n = Set.indicator {a | n ≤ τ a} (u n) +
∑ i in Finset.Iio n, Set.indicator {ω | τ ω = i} (u i) := by
have h_mem : ∀ ω, τ ω < n → τ ω ∈ Finset.Iio n := fun ω h => Finset.mem_Iio.mpr h
rw [stoppedProcess_eq_of_mem_finset n h_mem]
congr with i
simp
#align measure_theory.stopped_process_eq'' MeasureTheory.stoppedProcess_eq''
section StoppedValue
variable [PartialOrder ι] {ℱ : Filtration ι m} [NormedAddCommGroup E]
theorem memℒp_stoppedValue_of_mem_finset (hτ : IsStoppingTime ℱ τ) (hu : ∀ n, Memℒp (u n) p μ)
{s : Finset ι} (hbdd : ∀ ω, τ ω ∈ s) : Memℒp (stoppedValue u τ) p μ := by
rw [stoppedValue_eq_of_mem_finset hbdd]
refine' memℒp_finset_sum' _ fun i _ => Memℒp.indicator _ (hu i)
refine' ℱ.le i {a : Ω | τ a = i} (hτ.measurableSet_eq_of_countable_range _ i)
refine' ((Finset.finite_toSet s).subset fun ω hω => _).countable
obtain ⟨y, rfl⟩ := hω
exact hbdd y
#align measure_theory.mem_ℒp_stopped_value_of_mem_finset MeasureTheory.memℒp_stoppedValue_of_mem_finset
theorem memℒp_stoppedValue [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
(hu : ∀ n, Memℒp (u n) p μ) {N : ι} (hbdd : ∀ ω, τ ω ≤ N) : Memℒp (stoppedValue u τ) p μ :=
memℒp_stoppedValue_of_mem_finset hτ hu fun ω => Finset.mem_Iic.mpr (hbdd ω)
#align measure_theory.mem_ℒp_stopped_value MeasureTheory.memℒp_stoppedValue
theorem integrable_stoppedValue_of_mem_finset (hτ : IsStoppingTime ℱ τ)
(hu : ∀ n, Integrable (u n) μ) {s : Finset ι} (hbdd : ∀ ω, τ ω ∈ s) :
Integrable (stoppedValue u τ) μ := by
simp_rw [← memℒp_one_iff_integrable] at hu ⊢
exact memℒp_stoppedValue_of_mem_finset hτ hu hbdd
#align measure_theory.integrable_stopped_value_of_mem_finset MeasureTheory.integrable_stoppedValue_of_mem_finset
variable (ι)
theorem integrable_stoppedValue [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
(hu : ∀ n, Integrable (u n) μ) {N : ι} (hbdd : ∀ ω, τ ω ≤ N) :
Integrable (stoppedValue u τ) μ :=
integrable_stoppedValue_of_mem_finset hτ hu fun ω => Finset.mem_Iic.mpr (hbdd ω)
#align measure_theory.integrable_stopped_value MeasureTheory.integrable_stoppedValue
end StoppedValue
section StoppedProcess
variable [LinearOrder ι] [TopologicalSpace ι] [OrderTopology ι] [FirstCountableTopology ι]
{ℱ : Filtration ι m} [NormedAddCommGroup E]
theorem memℒp_stoppedProcess_of_mem_finset (hτ : IsStoppingTime ℱ τ) (hu : ∀ n, Memℒp (u n) p μ)
(n : ι) {s : Finset ι} (hbdd : ∀ ω, τ ω < n → τ ω ∈ s) : Memℒp (stoppedProcess u τ n) p μ := by
rw [stoppedProcess_eq_of_mem_finset n hbdd]
refine' Memℒp.add _ _
· exact Memℒp.indicator (ℱ.le n {a : Ω | n ≤ τ a} (hτ.measurableSet_ge n)) (hu n)
· suffices Memℒp (fun ω => ∑ i in s.filter (· < n), {a : Ω | τ a = i}.indicator (u i) ω) p μ by
convert this using 1; ext1 ω; simp only [Finset.sum_apply]
refine' memℒp_finset_sum _ fun i _ => Memℒp.indicator _ (hu i)
exact ℱ.le i {a : Ω | τ a = i} (hτ.measurableSet_eq i)
#align measure_theory.mem_ℒp_stopped_process_of_mem_finset MeasureTheory.memℒp_stoppedProcess_of_mem_finset
theorem memℒp_stoppedProcess [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
(hu : ∀ n, Memℒp (u n) p μ) (n : ι) : Memℒp (stoppedProcess u τ n) p μ :=
memℒp_stoppedProcess_of_mem_finset hτ hu n fun _ h => Finset.mem_Iio.mpr h
#align measure_theory.mem_ℒp_stopped_process MeasureTheory.memℒp_stoppedProcess
theorem integrable_stoppedProcess_of_mem_finset (hτ : IsStoppingTime ℱ τ)
(hu : ∀ n, Integrable (u n) μ) (n : ι) {s : Finset ι} (hbdd : ∀ ω, τ ω < n → τ ω ∈ s) :
Integrable (stoppedProcess u τ n) μ := by
simp_rw [← memℒp_one_iff_integrable] at hu ⊢