/
basic.lean
1907 lines (1612 loc) · 85.4 KB
/
basic.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 Rémy Degenne. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Rémy Degenne, Sébastien Gouëzel
-/
import analysis.normed_space.bounded_linear_maps
import topology.metric_space.metrizable
import measure_theory.function.simple_func_dense
/-!
# Strongly measurable and finitely strongly measurable functions
A function `f` is said to be strongly measurable if `f` is the sequential limit of simple functions.
It is said to be finitely strongly measurable with respect to a measure `μ` if the supports
of those simple functions have finite measure. We also provide almost everywhere versions of
these notions.
Almost everywhere strongly measurable functions form the largest class of functions that can be
integrated using the Bochner integral.
If the target space has a second countable topology, strongly measurable and measurable are
equivalent.
If the measure is sigma-finite, strongly measurable and finitely strongly measurable are equivalent.
The main property of finitely strongly measurable functions is
`fin_strongly_measurable.exists_set_sigma_finite`: there exists a measurable set `t` such that the
function is supported on `t` and `μ.restrict t` is sigma-finite. As a consequence, we can prove some
results for those functions as if the measure was sigma-finite.
## Main definitions
* `strongly_measurable f`: `f : α → β` is the limit of a sequence `fs : ℕ → simple_func α β`.
* `fin_strongly_measurable f μ`: `f : α → β` is the limit of a sequence `fs : ℕ → simple_func α β`
such that for all `n ∈ ℕ`, the measure of the support of `fs n` is finite.
* `ae_strongly_measurable f μ`: `f` is almost everywhere equal to a `strongly_measurable` function.
* `ae_fin_strongly_measurable f μ`: `f` is almost everywhere equal to a `fin_strongly_measurable`
function.
* `ae_fin_strongly_measurable.sigma_finite_set`: a measurable set `t` such that
`f =ᵐ[μ.restrict tᶜ] 0` and `μ.restrict t` is sigma-finite.
## Main statements
* `ae_fin_strongly_measurable.exists_set_sigma_finite`: there exists a measurable set `t` such that
`f =ᵐ[μ.restrict tᶜ] 0` and `μ.restrict t` is sigma-finite.
We provide a solid API for strongly measurable functions, and for almost everywhere strongly
measurable functions, as a basis for the Bochner integral.
## References
* Hytönen, Tuomas, Jan Van Neerven, Mark Veraar, and Lutz Weis. Analysis in Banach spaces.
Springer, 2016.
-/
open measure_theory filter topological_space function set measure_theory.measure
open_locale ennreal topological_space measure_theory nnreal big_operators
/-- The typeclass `second_countable_topology_either α β` registers the fact that at least one of
the two spaces has second countable topology. This is the right assumption to ensure that continuous
maps from `α` to `β` are strongly measurable. -/
class second_countable_topology_either
(α β : Type*) [topological_space α] [topological_space β] : Prop :=
(out : second_countable_topology α ∨ second_countable_topology β)
@[priority 100] instance second_countable_topology_either_of_left
(α β : Type*) [topological_space α] [topological_space β] [second_countable_topology α] :
second_countable_topology_either α β :=
{ out := or.inl (by apply_instance) }
@[priority 100] instance second_countable_topology_either_of_right
(α β : Type*) [topological_space α] [topological_space β] [second_countable_topology β] :
second_countable_topology_either α β :=
{ out := or.inr (by apply_instance) }
variables {α β γ ι : Type*} [countable ι]
namespace measure_theory
local infixr ` →ₛ `:25 := simple_func
section definitions
variable [topological_space β]
/-- A function is `strongly_measurable` if it is the limit of simple functions. -/
def strongly_measurable [measurable_space α] (f : α → β) : Prop :=
∃ fs : ℕ → α →ₛ β, ∀ x, tendsto (λ n, fs n x) at_top (𝓝 (f x))
localized "notation (name := strongly_measurable_of)
`strongly_measurable[` m `]` := @measure_theory.strongly_measurable _ _ _ m" in measure_theory
/-- A function is `fin_strongly_measurable` with respect to a measure if it is the limit of simple
functions with support with finite measure. -/
def fin_strongly_measurable [has_zero β] {m0 : measurable_space α} (f : α → β) (μ : measure α) :
Prop :=
∃ fs : ℕ → α →ₛ β, (∀ n, μ (support (fs n)) < ∞) ∧ (∀ x, tendsto (λ n, fs n x) at_top (𝓝 (f x)))
/-- A function is `ae_strongly_measurable` with respect to a measure `μ` if it is almost everywhere
equal to the limit of a sequence of simple functions. -/
def ae_strongly_measurable {m0 : measurable_space α} (f : α → β) (μ : measure α) : Prop :=
∃ g, strongly_measurable g ∧ f =ᵐ[μ] g
/-- A function is `ae_fin_strongly_measurable` with respect to a measure if it is almost everywhere
equal to the limit of a sequence of simple functions with support with finite measure. -/
def ae_fin_strongly_measurable [has_zero β] {m0 : measurable_space α} (f : α → β) (μ : measure α) :
Prop :=
∃ g, fin_strongly_measurable g μ ∧ f =ᵐ[μ] g
end definitions
open_locale measure_theory
/-! ## Strongly measurable functions -/
lemma strongly_measurable.ae_strongly_measurable {α β} {m0 : measurable_space α}
[topological_space β] {f : α → β} {μ : measure α} (hf : strongly_measurable f) :
ae_strongly_measurable f μ :=
⟨f, hf, eventually_eq.refl _ _⟩
@[simp] lemma subsingleton.strongly_measurable {α β} [measurable_space α] [topological_space β]
[subsingleton β] (f : α → β) :
strongly_measurable f :=
begin
let f_sf : α →ₛ β := ⟨f, λ x, _, set.subsingleton.finite set.subsingleton_of_subsingleton⟩,
{ exact ⟨λ n, f_sf, λ x, tendsto_const_nhds⟩, },
{ have h_univ : f ⁻¹' {x} = set.univ, by { ext1 y, simp, },
rw h_univ,
exact measurable_set.univ, },
end
lemma simple_func.strongly_measurable {α β} {m : measurable_space α} [topological_space β]
(f : α →ₛ β) :
strongly_measurable f :=
⟨λ _, f, λ x, tendsto_const_nhds⟩
lemma strongly_measurable_of_is_empty [is_empty α] {m : measurable_space α} [topological_space β]
(f : α → β) : strongly_measurable f :=
⟨λ n, simple_func.of_is_empty, is_empty_elim⟩
lemma strongly_measurable_const {α β} {m : measurable_space α} [topological_space β] {b : β} :
strongly_measurable (λ a : α, b) :=
⟨λ n, simple_func.const α b, λ a, tendsto_const_nhds⟩
@[to_additive]
lemma strongly_measurable_one {α β} {m : measurable_space α} [topological_space β] [has_one β] :
strongly_measurable (1 : α → β) :=
@strongly_measurable_const _ _ _ _ 1
/-- A version of `strongly_measurable_const` that assumes `f x = f y` for all `x, y`.
This version works for functions between empty types. -/
lemma strongly_measurable_const' {α β} {m : measurable_space α} [topological_space β] {f : α → β}
(hf : ∀ x y, f x = f y) : strongly_measurable f :=
begin
casesI is_empty_or_nonempty α,
{ exact strongly_measurable_of_is_empty f },
{ convert strongly_measurable_const, exact funext (λ x, hf x h.some) }
end
@[simp] lemma subsingleton.strongly_measurable' {α β} [measurable_space α] [topological_space β]
[subsingleton α] (f : α → β) :
strongly_measurable f :=
strongly_measurable_const' (λ x y, by rw subsingleton.elim x y)
namespace strongly_measurable
variables {f g : α → β}
section basic_properties_in_any_topological_space
variables [topological_space β]
/-- A sequence of simple functions such that `∀ x, tendsto (λ n, hf.approx n x) at_top (𝓝 (f x))`.
That property is given by `strongly_measurable.tendsto_approx`. -/
protected noncomputable
def approx {m : measurable_space α} (hf : strongly_measurable f) : ℕ → α →ₛ β :=
hf.some
protected lemma tendsto_approx {m : measurable_space α} (hf : strongly_measurable f) :
∀ x, tendsto (λ n, hf.approx n x) at_top (𝓝 (f x)) :=
hf.some_spec
/-- Similar to `strongly_measurable.approx`, but enforces that the norm of every function in the
sequence is less than `c` everywhere. If `‖f x‖ ≤ c` this sequence of simple functions verifies
`tendsto (λ n, hf.approx_bounded n x) at_top (𝓝 (f x))`. -/
noncomputable
def approx_bounded {m : measurable_space α}
[has_norm β] [has_smul ℝ β] (hf : strongly_measurable f) (c : ℝ) :
ℕ → simple_func α β :=
λ n, (hf.approx n).map (λ x, (min 1 (c / ‖x‖)) • x)
lemma tendsto_approx_bounded_of_norm_le {β} {f : α → β} [normed_add_comm_group β] [normed_space ℝ β]
{m : measurable_space α} (hf : strongly_measurable[m] f) {c : ℝ} {x : α} (hfx : ‖f x‖ ≤ c) :
tendsto (λ n, hf.approx_bounded c n x) at_top (𝓝 (f x)) :=
begin
have h_tendsto := hf.tendsto_approx x,
simp only [strongly_measurable.approx_bounded, simple_func.coe_map, function.comp_app],
by_cases hfx0 : ‖f x‖ = 0,
{ rw norm_eq_zero at hfx0,
rw hfx0 at h_tendsto ⊢,
have h_tendsto_norm : tendsto (λ n, ‖hf.approx n x‖) at_top (𝓝 0),
{ convert h_tendsto.norm,
rw norm_zero, },
refine squeeze_zero_norm (λ n, _) h_tendsto_norm,
calc ‖min 1 (c / ‖hf.approx n x‖) • hf.approx n x‖
= ‖min 1 (c / ‖hf.approx n x‖)‖ * ‖hf.approx n x‖ : norm_smul _ _
... ≤ ‖(1 : ℝ)‖ * ‖hf.approx n x‖ :
begin
refine mul_le_mul_of_nonneg_right _ (norm_nonneg _),
rw [norm_one, real.norm_of_nonneg],
{ exact min_le_left _ _, },
{ exact le_min zero_le_one
(div_nonneg ((norm_nonneg _).trans hfx) (norm_nonneg _)), },
end
... = ‖hf.approx n x‖ : by rw [norm_one, one_mul], },
rw ← one_smul ℝ (f x),
refine tendsto.smul _ h_tendsto,
have : min 1 (c / ‖f x‖) = 1,
{ rw [min_eq_left_iff, one_le_div (lt_of_le_of_ne (norm_nonneg _) (ne.symm hfx0))],
exact hfx, },
nth_rewrite 0 this.symm,
refine tendsto.min tendsto_const_nhds _,
refine tendsto.div tendsto_const_nhds h_tendsto.norm hfx0,
end
lemma tendsto_approx_bounded_ae {β} {f : α → β} [normed_add_comm_group β] [normed_space ℝ β]
{m m0 : measurable_space α} {μ : measure α}
(hf : strongly_measurable[m] f) {c : ℝ}
(hf_bound : ∀ᵐ x ∂μ, ‖f x‖ ≤ c) :
∀ᵐ x ∂μ, tendsto (λ n, hf.approx_bounded c n x) at_top (𝓝 (f x)) :=
by filter_upwards [hf_bound] with x hfx using tendsto_approx_bounded_of_norm_le hf hfx
lemma norm_approx_bounded_le {β} {f : α → β} [seminormed_add_comm_group β] [normed_space ℝ β]
{m : measurable_space α} {c : ℝ} (hf : strongly_measurable[m] f) (hc : 0 ≤ c) (n : ℕ) (x : α) :
‖hf.approx_bounded c n x‖ ≤ c :=
begin
simp only [strongly_measurable.approx_bounded, simple_func.coe_map, function.comp_app],
refine (norm_smul _ _).le.trans _,
by_cases h0 : ‖hf.approx n x‖ = 0,
{ simp only [h0, div_zero, min_eq_right, zero_le_one, norm_zero, mul_zero],
exact hc, },
cases le_total (‖hf.approx n x‖) c,
{ rw min_eq_left _,
{ simpa only [norm_one, one_mul] using h, },
{ rwa one_le_div (lt_of_le_of_ne (norm_nonneg _) (ne.symm h0)), }, },
{ rw min_eq_right _,
{ rw [norm_div, norm_norm, mul_comm, mul_div, div_eq_mul_inv, mul_comm, ← mul_assoc,
inv_mul_cancel h0, one_mul, real.norm_of_nonneg hc], },
{ rwa div_le_one (lt_of_le_of_ne (norm_nonneg _) (ne.symm h0)), }, },
end
lemma _root_.strongly_measurable_bot_iff [nonempty β] [t2_space β] :
strongly_measurable[⊥] f ↔ ∃ c, f = λ _, c :=
begin
casesI is_empty_or_nonempty α with hα hα,
{ simp only [subsingleton.strongly_measurable', eq_iff_true_of_subsingleton, exists_const], },
refine ⟨λ hf, _, λ hf_eq, _⟩,
{ refine ⟨f hα.some, _⟩,
let fs := hf.approx,
have h_fs_tendsto : ∀ x, tendsto (λ n, fs n x) at_top (𝓝 (f x)) := hf.tendsto_approx,
have : ∀ n, ∃ c, ∀ x, fs n x = c := λ n, simple_func.simple_func_bot (fs n),
let cs := λ n, (this n).some,
have h_cs_eq : ∀ n, ⇑(fs n) = (λ x, cs n) := λ n, funext (this n).some_spec,
simp_rw h_cs_eq at h_fs_tendsto,
have h_tendsto : tendsto cs at_top (𝓝 (f hα.some)) := h_fs_tendsto hα.some,
ext1 x,
exact tendsto_nhds_unique (h_fs_tendsto x) h_tendsto, },
{ obtain ⟨c, rfl⟩ := hf_eq,
exact strongly_measurable_const, },
end
end basic_properties_in_any_topological_space
lemma fin_strongly_measurable_of_set_sigma_finite [topological_space β] [has_zero β]
{m : measurable_space α} {μ : measure α} (hf_meas : strongly_measurable f) {t : set α}
(ht : measurable_set t) (hft_zero : ∀ x ∈ tᶜ, f x = 0) (htμ : sigma_finite (μ.restrict t)) :
fin_strongly_measurable f μ :=
begin
haveI : sigma_finite (μ.restrict t) := htμ,
let S := spanning_sets (μ.restrict t),
have hS_meas : ∀ n, measurable_set (S n), from measurable_spanning_sets (μ.restrict t),
let f_approx := hf_meas.approx,
let fs := λ n, simple_func.restrict (f_approx n) (S n ∩ t),
have h_fs_t_compl : ∀ n, ∀ x ∉ t, fs n x = 0,
{ intros n x hxt,
rw simple_func.restrict_apply _ ((hS_meas n).inter ht),
refine set.indicator_of_not_mem _ _,
simp [hxt], },
refine ⟨fs, _, λ x, _⟩,
{ simp_rw simple_func.support_eq,
refine λ n, (measure_bUnion_finset_le _ _).trans_lt _,
refine ennreal.sum_lt_top_iff.mpr (λ y hy, _),
rw simple_func.restrict_preimage_singleton _ ((hS_meas n).inter ht),
swap, { rw finset.mem_filter at hy, exact hy.2, },
refine (measure_mono (set.inter_subset_left _ _)).trans_lt _,
have h_lt_top := measure_spanning_sets_lt_top (μ.restrict t) n,
rwa measure.restrict_apply' ht at h_lt_top, },
{ by_cases hxt : x ∈ t,
swap, { rw [funext (λ n, h_fs_t_compl n x hxt), hft_zero x hxt], exact tendsto_const_nhds, },
have h : tendsto (λ n, (f_approx n) x) at_top (𝓝 (f x)), from hf_meas.tendsto_approx x,
obtain ⟨n₁, hn₁⟩ : ∃ n, ∀ m, n ≤ m → fs m x = f_approx m x,
{ obtain ⟨n, hn⟩ : ∃ n, ∀ m, n ≤ m → x ∈ S m ∩ t,
{ rsuffices ⟨n, hn⟩ : ∃ n, ∀ m, n ≤ m → x ∈ S m,
{ exact ⟨n, λ m hnm, set.mem_inter (hn m hnm) hxt⟩, },
rsuffices ⟨n, hn⟩ : ∃ n, x ∈ S n,
{ exact ⟨n, λ m hnm, monotone_spanning_sets (μ.restrict t) hnm hn⟩, },
rw [← set.mem_Union, Union_spanning_sets (μ.restrict t)],
trivial, },
refine ⟨n, λ m hnm, _⟩,
simp_rw [fs, simple_func.restrict_apply _ ((hS_meas m).inter ht),
set.indicator_of_mem (hn m hnm)], },
rw tendsto_at_top' at h ⊢,
intros s hs,
obtain ⟨n₂, hn₂⟩ := h s hs,
refine ⟨max n₁ n₂, λ m hm, _⟩,
rw hn₁ m ((le_max_left _ _).trans hm.le),
exact hn₂ m ((le_max_right _ _).trans hm.le), },
end
/-- If the measure is sigma-finite, all strongly measurable functions are
`fin_strongly_measurable`. -/
protected lemma fin_strongly_measurable [topological_space β] [has_zero β] {m0 : measurable_space α}
(hf : strongly_measurable f) (μ : measure α) [sigma_finite μ] :
fin_strongly_measurable f μ :=
hf.fin_strongly_measurable_of_set_sigma_finite measurable_set.univ (by simp)
(by rwa measure.restrict_univ)
/-- A strongly measurable function is measurable. -/
protected lemma measurable {m : measurable_space α} [topological_space β]
[pseudo_metrizable_space β] [measurable_space β] [borel_space β] (hf : strongly_measurable f) :
measurable f :=
measurable_of_tendsto_metrizable (λ n, (hf.approx n).measurable)
(tendsto_pi_nhds.mpr hf.tendsto_approx)
/-- A strongly measurable function is almost everywhere measurable. -/
protected lemma ae_measurable {m : measurable_space α} [topological_space β]
[pseudo_metrizable_space β] [measurable_space β] [borel_space β] {μ : measure α}
(hf : strongly_measurable f) :
ae_measurable f μ :=
hf.measurable.ae_measurable
lemma _root_.continuous.comp_strongly_measurable
{m : measurable_space α} [topological_space β] [topological_space γ] {g : β → γ} {f : α → β}
(hg : continuous g) (hf : strongly_measurable f) : strongly_measurable (λ x, g (f x)) :=
⟨λ n, simple_func.map g (hf.approx n), λ x, (hg.tendsto _).comp (hf.tendsto_approx x)⟩
@[to_additive]
lemma measurable_set_mul_support {m : measurable_space α}
[has_one β] [topological_space β] [metrizable_space β] (hf : strongly_measurable f) :
measurable_set (mul_support f) :=
by { borelize β, exact measurable_set_mul_support hf.measurable }
protected lemma mono {m m' : measurable_space α} [topological_space β]
(hf : strongly_measurable[m'] f) (h_mono : m' ≤ m) :
strongly_measurable[m] f :=
begin
let f_approx : ℕ → @simple_func α m β := λ n,
{ to_fun := hf.approx n,
measurable_set_fiber' := λ x, h_mono _ (simple_func.measurable_set_fiber' _ x),
finite_range' := simple_func.finite_range (hf.approx n) },
exact ⟨f_approx, hf.tendsto_approx⟩,
end
protected lemma prod_mk {m : measurable_space α} [topological_space β] [topological_space γ]
{f : α → β} {g : α → γ} (hf : strongly_measurable f) (hg : strongly_measurable g) :
strongly_measurable (λ x, (f x, g x)) :=
begin
refine ⟨λ n, simple_func.pair (hf.approx n) (hg.approx n), λ x, _⟩,
rw nhds_prod_eq,
exact tendsto.prod_mk (hf.tendsto_approx x) (hg.tendsto_approx x),
end
lemma comp_measurable [topological_space β] {m : measurable_space α} {m' : measurable_space γ}
{f : α → β} {g : γ → α} (hf : strongly_measurable f) (hg : measurable g) :
strongly_measurable (f ∘ g) :=
⟨λ n, simple_func.comp (hf.approx n) g hg, λ x, hf.tendsto_approx (g x)⟩
lemma of_uncurry_left [topological_space β] {mα : measurable_space α} {mγ : measurable_space γ}
{f : α → γ → β} (hf : strongly_measurable (uncurry f)) {x : α} :
strongly_measurable (f x) :=
hf.comp_measurable measurable_prod_mk_left
lemma of_uncurry_right [topological_space β] {mα : measurable_space α} {mγ : measurable_space γ}
{f : α → γ → β} (hf : strongly_measurable (uncurry f)) {y : γ} :
strongly_measurable (λ x, f x y) :=
hf.comp_measurable measurable_prod_mk_right
section arithmetic
variables {mα : measurable_space α} [topological_space β]
include mα
@[to_additive]
protected lemma mul [has_mul β] [has_continuous_mul β]
(hf : strongly_measurable f) (hg : strongly_measurable g) :
strongly_measurable (f * g) :=
⟨λ n, hf.approx n * hg.approx n, λ x, (hf.tendsto_approx x).mul (hg.tendsto_approx x)⟩
@[to_additive]
lemma mul_const [has_mul β] [has_continuous_mul β] (hf : strongly_measurable f) (c : β) :
strongly_measurable (λ x, f x * c) :=
hf.mul strongly_measurable_const
@[to_additive]
lemma const_mul [has_mul β] [has_continuous_mul β] (hf : strongly_measurable f) (c : β) :
strongly_measurable (λ x, c * f x) :=
strongly_measurable_const.mul hf
@[to_additive]
protected lemma inv [group β] [topological_group β] (hf : strongly_measurable f) :
strongly_measurable f⁻¹ :=
⟨λ n, (hf.approx n)⁻¹, λ x, (hf.tendsto_approx x).inv⟩
@[to_additive]
protected lemma div [has_div β] [has_continuous_div β]
(hf : strongly_measurable f) (hg : strongly_measurable g) :
strongly_measurable (f / g) :=
⟨λ n, hf.approx n / hg.approx n, λ x, (hf.tendsto_approx x).div' (hg.tendsto_approx x)⟩
@[to_additive]
protected lemma smul {𝕜} [topological_space 𝕜] [has_smul 𝕜 β] [has_continuous_smul 𝕜 β]
{f : α → 𝕜} {g : α → β} (hf : strongly_measurable f) (hg : strongly_measurable g) :
strongly_measurable (λ x, f x • g x) :=
continuous_smul.comp_strongly_measurable (hf.prod_mk hg)
protected lemma const_smul {𝕜} [has_smul 𝕜 β] [has_continuous_const_smul 𝕜 β]
(hf : strongly_measurable f) (c : 𝕜) :
strongly_measurable (c • f) :=
⟨λ n, c • (hf.approx n), λ x, (hf.tendsto_approx x).const_smul c⟩
protected lemma const_smul' {𝕜} [has_smul 𝕜 β] [has_continuous_const_smul 𝕜 β]
(hf : strongly_measurable f) (c : 𝕜) :
strongly_measurable (λ x, c • (f x)) :=
hf.const_smul c
@[to_additive]
protected lemma smul_const {𝕜} [topological_space 𝕜] [has_smul 𝕜 β] [has_continuous_smul 𝕜 β]
{f : α → 𝕜} (hf : strongly_measurable f) (c : β) :
strongly_measurable (λ x, f x • c) :=
continuous_smul.comp_strongly_measurable (hf.prod_mk strongly_measurable_const)
end arithmetic
section mul_action
variables [topological_space β] {G : Type*} [group G] [mul_action G β]
[has_continuous_const_smul G β]
lemma _root_.strongly_measurable_const_smul_iff {m : measurable_space α} (c : G) :
strongly_measurable (λ x, c • f x) ↔ strongly_measurable f :=
⟨λ h, by simpa only [inv_smul_smul] using h.const_smul' c⁻¹, λ h, h.const_smul c⟩
variables {G₀ : Type*} [group_with_zero G₀] [mul_action G₀ β]
[has_continuous_const_smul G₀ β]
lemma _root_.strongly_measurable_const_smul_iff₀ {m : measurable_space α} {c : G₀} (hc : c ≠ 0) :
strongly_measurable (λ x, c • f x) ↔ strongly_measurable f :=
begin
refine ⟨λ h, _, λ h, h.const_smul c⟩,
convert h.const_smul' c⁻¹,
simp [smul_smul, inv_mul_cancel hc]
end
end mul_action
section order
variables [measurable_space α] [topological_space β]
open filter
open_locale filter
protected lemma sup [has_sup β] [has_continuous_sup β] (hf : strongly_measurable f)
(hg : strongly_measurable g) :
strongly_measurable (f ⊔ g) :=
⟨λ n, hf.approx n ⊔ hg.approx n, λ x, (hf.tendsto_approx x).sup_right_nhds (hg.tendsto_approx x)⟩
protected lemma inf [has_inf β] [has_continuous_inf β] (hf : strongly_measurable f)
(hg : strongly_measurable g) :
strongly_measurable (f ⊓ g) :=
⟨λ n, hf.approx n ⊓ hg.approx n, λ x, (hf.tendsto_approx x).inf_right_nhds (hg.tendsto_approx x)⟩
end order
/-!
### Big operators: `∏` and `∑`
-/
section monoid
variables {M : Type*} [monoid M] [topological_space M] [has_continuous_mul M]
{m : measurable_space α}
include m
@[to_additive]
lemma _root_.list.strongly_measurable_prod'
(l : list (α → M)) (hl : ∀ f ∈ l, strongly_measurable f) :
strongly_measurable l.prod :=
begin
induction l with f l ihl, { exact strongly_measurable_one },
rw [list.forall_mem_cons] at hl,
rw [list.prod_cons],
exact hl.1.mul (ihl hl.2)
end
@[to_additive]
lemma _root_.list.strongly_measurable_prod
(l : list (α → M)) (hl : ∀ f ∈ l, strongly_measurable f) :
strongly_measurable (λ x, (l.map (λ f : α → M, f x)).prod) :=
by simpa only [← pi.list_prod_apply] using l.strongly_measurable_prod' hl
end monoid
section comm_monoid
variables {M : Type*} [comm_monoid M] [topological_space M] [has_continuous_mul M]
{m : measurable_space α}
include m
@[to_additive]
lemma _root_.multiset.strongly_measurable_prod'
(l : multiset (α → M)) (hl : ∀ f ∈ l, strongly_measurable f) :
strongly_measurable l.prod :=
by { rcases l with ⟨l⟩, simpa using l.strongly_measurable_prod' (by simpa using hl) }
@[to_additive]
lemma _root_.multiset.strongly_measurable_prod
(s : multiset (α → M)) (hs : ∀ f ∈ s, strongly_measurable f) :
strongly_measurable (λ x, (s.map (λ f : α → M, f x)).prod) :=
by simpa only [← pi.multiset_prod_apply] using s.strongly_measurable_prod' hs
@[to_additive]
lemma _root_.finset.strongly_measurable_prod'
{ι : Type*} {f : ι → α → M} (s : finset ι) (hf : ∀i ∈ s, strongly_measurable (f i)) :
strongly_measurable (∏ i in s, f i) :=
finset.prod_induction _ _ (λ a b ha hb, ha.mul hb) (@strongly_measurable_one α M _ _ _) hf
@[to_additive]
lemma _root_.finset.strongly_measurable_prod
{ι : Type*} {f : ι → α → M} (s : finset ι) (hf : ∀i ∈ s, strongly_measurable (f i)) :
strongly_measurable (λ a, ∏ i in s, f i a) :=
by simpa only [← finset.prod_apply] using s.strongly_measurable_prod' hf
end comm_monoid
/-- The range of a strongly measurable function is separable. -/
lemma is_separable_range {m : measurable_space α} [topological_space β]
(hf : strongly_measurable f) :
topological_space.is_separable (range f) :=
begin
have : is_separable (closure (⋃ n, range (hf.approx n))) :=
(is_separable_Union (λ n, (simple_func.finite_range (hf.approx n)).is_separable)).closure,
apply this.mono,
rintros _ ⟨x, rfl⟩,
apply mem_closure_of_tendsto (hf.tendsto_approx x),
apply eventually_of_forall (λ n, _),
apply mem_Union_of_mem n,
exact mem_range_self _
end
lemma separable_space_range_union_singleton {m : measurable_space α} [topological_space β]
[pseudo_metrizable_space β] (hf : strongly_measurable f) {b : β} :
separable_space (range f ∪ {b} : set β) :=
begin
letI := pseudo_metrizable_space_pseudo_metric β,
exact (hf.is_separable_range.union (finite_singleton _).is_separable).separable_space
end
section second_countable_strongly_measurable
variables {mα : measurable_space α} [measurable_space β]
include mα
/-- In a space with second countable topology, measurable implies strongly measurable. -/
lemma _root_.measurable.strongly_measurable [topological_space β] [pseudo_metrizable_space β]
[second_countable_topology β] [opens_measurable_space β] (hf : measurable f) :
strongly_measurable f :=
begin
letI := pseudo_metrizable_space_pseudo_metric β,
rcases is_empty_or_nonempty β; resetI,
{ exact subsingleton.strongly_measurable f, },
{ inhabit β,
exact ⟨simple_func.approx_on f hf set.univ default (set.mem_univ _),
λ x, simple_func.tendsto_approx_on hf (set.mem_univ _) (by simp)⟩, },
end
/-- In a space with second countable topology, strongly measurable and measurable are equivalent. -/
lemma _root_.strongly_measurable_iff_measurable
[topological_space β] [metrizable_space β] [borel_space β] [second_countable_topology β] :
strongly_measurable f ↔ measurable f :=
⟨λ h, h.measurable, λ h, measurable.strongly_measurable h⟩
lemma _root_.strongly_measurable_id [topological_space α] [pseudo_metrizable_space α]
[opens_measurable_space α] [second_countable_topology α] :
strongly_measurable (id : α → α) :=
measurable_id.strongly_measurable
end second_countable_strongly_measurable
/-- A function is strongly measurable if and only if it is measurable and has separable
range. -/
theorem _root_.strongly_measurable_iff_measurable_separable {m : measurable_space α}
[topological_space β] [pseudo_metrizable_space β] [measurable_space β] [borel_space β] :
strongly_measurable f ↔ (measurable f ∧ is_separable (range f)) :=
begin
refine ⟨λ H, ⟨H.measurable, H.is_separable_range⟩, _⟩,
rintros ⟨H, H'⟩,
letI := pseudo_metrizable_space_pseudo_metric β,
let g := cod_restrict f (closure (range f)) (λ x, subset_closure (mem_range_self x)),
have fg : f = (coe : closure (range f) → β) ∘ g, by { ext x, refl },
have T : measurable_embedding (coe : closure (range f) → β),
{ apply closed_embedding.measurable_embedding,
exact closed_embedding_subtype_coe is_closed_closure },
have g_meas : measurable g,
{ rw fg at H, exact T.measurable_comp_iff.1 H },
haveI : second_countable_topology (closure (range f)),
{ suffices : separable_space (closure (range f)),
by exactI uniform_space.second_countable_of_separable _,
exact (is_separable.closure H').separable_space },
have g_smeas : strongly_measurable g := measurable.strongly_measurable g_meas,
rw fg,
exact continuous_subtype_coe.comp_strongly_measurable g_smeas,
end
/-- A continuous function is strongly measurable when either the source space or the target space
is second-countable. -/
lemma _root_.continuous.strongly_measurable [measurable_space α]
[topological_space α] [opens_measurable_space α]
{β : Type*} [topological_space β] [pseudo_metrizable_space β]
[h : second_countable_topology_either α β]
{f : α → β} (hf : continuous f) :
strongly_measurable f :=
begin
borelize β,
casesI h.out,
{ rw strongly_measurable_iff_measurable_separable,
refine ⟨hf.measurable, _⟩,
rw ← image_univ,
exact (is_separable_of_separable_space univ).image hf },
{ exact hf.measurable.strongly_measurable }
end
/-- If `g` is a topological embedding, then `f` is strongly measurable iff `g ∘ f` is. -/
lemma _root_.embedding.comp_strongly_measurable_iff {m : measurable_space α}
[topological_space β] [pseudo_metrizable_space β] [topological_space γ]
[pseudo_metrizable_space γ]
{g : β → γ} {f : α → β} (hg : embedding g) :
strongly_measurable (λ x, g (f x)) ↔ strongly_measurable f :=
begin
letI := pseudo_metrizable_space_pseudo_metric γ,
borelize [β, γ],
refine ⟨λ H, strongly_measurable_iff_measurable_separable.2 ⟨_, _⟩,
λ H, hg.continuous.comp_strongly_measurable H⟩,
{ let G : β → range g := cod_restrict g (range g) mem_range_self,
have hG : closed_embedding G :=
{ closed_range :=
begin
convert is_closed_univ,
apply eq_univ_of_forall,
rintros ⟨-, ⟨x, rfl⟩⟩,
exact mem_range_self x
end,
.. hg.cod_restrict _ _ },
have : measurable (G ∘ f) := measurable.subtype_mk H.measurable,
exact hG.measurable_embedding.measurable_comp_iff.1 this },
{ have : is_separable (g ⁻¹' (range (g ∘ f))) := hg.is_separable_preimage H.is_separable_range,
convert this,
ext x,
simp [hg.inj.eq_iff] }
end
/-- A sequential limit of strongly measurable functions is strongly measurable. -/
lemma _root_.strongly_measurable_of_tendsto {ι : Type*} {m : measurable_space α}
[topological_space β] [pseudo_metrizable_space β] (u : filter ι) [ne_bot u]
[is_countably_generated u] {f : ι → α → β} {g : α → β} (hf : ∀ i, strongly_measurable (f i))
(lim : tendsto f u (𝓝 g)) :
strongly_measurable g :=
begin
borelize β,
refine strongly_measurable_iff_measurable_separable.2 ⟨_, _⟩,
{ exact measurable_of_tendsto_metrizable' u (λ i, (hf i).measurable) lim },
{ rcases u.exists_seq_tendsto with ⟨v, hv⟩,
have : is_separable (closure (⋃ i, range (f (v i)))) :=
(is_separable_Union (λ i, (hf (v i)).is_separable_range)).closure,
apply this.mono,
rintros _ ⟨x, rfl⟩,
rw [tendsto_pi_nhds] at lim,
apply mem_closure_of_tendsto ((lim x).comp hv),
apply eventually_of_forall (λ n, _),
apply mem_Union_of_mem n,
exact mem_range_self _ }
end
protected lemma piecewise {m : measurable_space α} [topological_space β]
{s : set α} {_ : decidable_pred (∈ s)} (hs : measurable_set s)
(hf : strongly_measurable f) (hg : strongly_measurable g) :
strongly_measurable (set.piecewise s f g) :=
begin
refine ⟨λ n, simple_func.piecewise s hs (hf.approx n) (hg.approx n), λ x, _⟩,
by_cases hx : x ∈ s,
{ simpa [hx] using hf.tendsto_approx x },
{ simpa [hx] using hg.tendsto_approx x },
end
/-- this is slightly different from `strongly_measurable.piecewise`. It can be used to show
`strongly_measurable (ite (x=0) 0 1)` by
`exact strongly_measurable.ite (measurable_set_singleton 0) strongly_measurable_const
strongly_measurable_const`, but replacing `strongly_measurable.ite` by
`strongly_measurable.piecewise` in that example proof does not work. -/
protected lemma ite {m : measurable_space α} [topological_space β]
{p : α → Prop} {_ : decidable_pred p}
(hp : measurable_set {a : α | p a}) (hf : strongly_measurable f) (hg : strongly_measurable g) :
strongly_measurable (λ x, ite (p x) (f x) (g x)) :=
strongly_measurable.piecewise hp hf hg
lemma _root_.strongly_measurable_of_strongly_measurable_union_cover
{m : measurable_space α} [topological_space β]
{f : α → β} (s t : set α) (hs : measurable_set s) (ht : measurable_set t) (h : univ ⊆ s ∪ t)
(hc : strongly_measurable (λ a : s, f a)) (hd : strongly_measurable (λ a : t, f a)) :
strongly_measurable f :=
begin
classical,
let f : ℕ → α →ₛ β := λ n,
{ to_fun := λ x, if hx : x ∈ s then hc.approx n ⟨x, hx⟩
else hd.approx n ⟨x, by simpa [hx] using h (mem_univ x)⟩,
measurable_set_fiber' :=
begin
assume x,
convert (hs.subtype_image
((hc.approx n).measurable_set_fiber x)).union
((ht.subtype_image
((hd.approx n).measurable_set_fiber x)).diff hs),
ext1 y,
simp only [mem_union, mem_preimage, mem_singleton_iff, mem_image, set_coe.exists,
subtype.coe_mk, exists_and_distrib_right, exists_eq_right, mem_diff],
by_cases hy : y ∈ s,
{ rw dif_pos hy,
simp only [hy, exists_true_left, not_true, and_false, or_false]},
{ rw dif_neg hy,
have A : y ∈ t, by simpa [hy] using h (mem_univ y),
simp only [A, hy, false_or, is_empty.exists_iff, not_false_iff, and_true,
exists_true_left] }
end,
finite_range' :=
begin
apply ((hc.approx n).finite_range.union (hd.approx n).finite_range).subset,
rintros - ⟨y, rfl⟩,
dsimp,
by_cases hy : y ∈ s,
{ left,
rw dif_pos hy,
exact mem_range_self _ },
{ right,
rw dif_neg hy,
exact mem_range_self _ }
end },
refine ⟨f, λ y, _⟩,
by_cases hy : y ∈ s,
{ convert hc.tendsto_approx ⟨y, hy⟩ using 1,
ext1 n,
simp only [dif_pos hy, simple_func.apply_mk] },
{ have A : y ∈ t, by simpa [hy] using h (mem_univ y),
convert hd.tendsto_approx ⟨y, A⟩ using 1,
ext1 n,
simp only [dif_neg hy, simple_func.apply_mk] }
end
lemma _root_.strongly_measurable_of_restrict_of_restrict_compl
{m : measurable_space α} [topological_space β] {f : α → β} {s : set α} (hs : measurable_set s)
(h₁ : strongly_measurable (s.restrict f)) (h₂ : strongly_measurable (sᶜ.restrict f)) :
strongly_measurable f :=
strongly_measurable_of_strongly_measurable_union_cover s sᶜ hs hs.compl
(union_compl_self s).ge h₁ h₂
protected lemma indicator {m : measurable_space α} [topological_space β] [has_zero β]
(hf : strongly_measurable f) {s : set α} (hs : measurable_set s) :
strongly_measurable (s.indicator f) :=
hf.piecewise hs strongly_measurable_const
protected lemma dist {m : measurable_space α} {β : Type*} [pseudo_metric_space β] {f g : α → β}
(hf : strongly_measurable f) (hg : strongly_measurable g) :
strongly_measurable (λ x, dist (f x) (g x)) :=
continuous_dist.comp_strongly_measurable (hf.prod_mk hg)
protected lemma norm {m : measurable_space α} {β : Type*} [seminormed_add_comm_group β]
{f : α → β} (hf : strongly_measurable f) :
strongly_measurable (λ x, ‖f x‖) :=
continuous_norm.comp_strongly_measurable hf
protected lemma nnnorm {m : measurable_space α} {β : Type*} [seminormed_add_comm_group β]
{f : α → β} (hf : strongly_measurable f) :
strongly_measurable (λ x, ‖f x‖₊) :=
continuous_nnnorm.comp_strongly_measurable hf
protected lemma ennnorm {m : measurable_space α} {β : Type*} [seminormed_add_comm_group β]
{f : α → β} (hf : strongly_measurable f) :
measurable (λ a, (‖f a‖₊ : ℝ≥0∞)) :=
(ennreal.continuous_coe.comp_strongly_measurable hf.nnnorm).measurable
protected lemma real_to_nnreal {m : measurable_space α} {f : α → ℝ}
(hf : strongly_measurable f) :
strongly_measurable (λ x, (f x).to_nnreal) :=
continuous_real_to_nnreal.comp_strongly_measurable hf
lemma _root_.measurable_embedding.strongly_measurable_extend {f : α → β} {g : α → γ} {g' : γ → β}
{mα : measurable_space α} {mγ : measurable_space γ} [topological_space β]
(hg : measurable_embedding g)
(hf : strongly_measurable f) (hg' : strongly_measurable g') :
strongly_measurable (function.extend g f g') :=
begin
refine ⟨λ n, simple_func.extend (hf.approx n) g hg (hg'.approx n), _⟩,
assume x,
by_cases hx : ∃ y, g y = x,
{ rcases hx with ⟨y, rfl⟩,
simpa only [simple_func.extend_apply, hg.injective,
injective.extend_apply] using hf.tendsto_approx y },
{ simpa only [hx, simple_func.extend_apply', not_false_iff, extend_apply']
using hg'.tendsto_approx x }
end
lemma _root_.measurable_embedding.exists_strongly_measurable_extend
{f : α → β} {g : α → γ}
{mα : measurable_space α} {mγ : measurable_space γ} [topological_space β]
(hg : measurable_embedding g) (hf : strongly_measurable f) (hne : γ → nonempty β) :
∃ f' : γ → β, strongly_measurable f' ∧ f' ∘ g = f :=
⟨function.extend g f (λ x, classical.choice (hne x)),
hg.strongly_measurable_extend hf (strongly_measurable_const' $ λ _ _, rfl),
funext $ λ x, hg.injective.extend_apply _ _ _⟩
lemma measurable_set_eq_fun {m : measurable_space α} {E} [topological_space E] [metrizable_space E]
{f g : α → E} (hf : strongly_measurable f) (hg : strongly_measurable g) :
measurable_set {x | f x = g x} :=
begin
borelize E × E,
exact (hf.prod_mk hg).measurable is_closed_diagonal.measurable_set
end
lemma measurable_set_lt {m : measurable_space α} [topological_space β]
[linear_order β] [order_closed_topology β] [pseudo_metrizable_space β]
{f g : α → β} (hf : strongly_measurable f) (hg : strongly_measurable g) :
measurable_set {a | f a < g a} :=
begin
borelize β × β,
exact (hf.prod_mk hg).measurable is_open_lt_prod.measurable_set
end
lemma measurable_set_le {m : measurable_space α} [topological_space β]
[preorder β] [order_closed_topology β] [pseudo_metrizable_space β]
{f g : α → β} (hf : strongly_measurable f) (hg : strongly_measurable g) :
measurable_set {a | f a ≤ g a} :=
begin
borelize β × β,
exact (hf.prod_mk hg).measurable is_closed_le_prod.measurable_set
end
lemma strongly_measurable_in_set {m : measurable_space α} [topological_space β] [has_zero β]
{s : set α} {f : α → β}
(hs : measurable_set s) (hf : strongly_measurable f) (hf_zero : ∀ x ∉ s, f x = 0) :
∃ fs : ℕ → α →ₛ β, (∀ x, tendsto (λ n, fs n x) at_top (𝓝 (f x))) ∧ (∀ (x ∉ s) n, fs n x = 0) :=
begin
let g_seq_s : ℕ → @simple_func α m β := λ n, (hf.approx n).restrict s,
have hg_eq : ∀ x ∈ s, ∀ n, g_seq_s n x = hf.approx n x,
{ intros x hx n,
rw [simple_func.coe_restrict _ hs, set.indicator_of_mem hx], },
have hg_zero : ∀ x ∉ s, ∀ n, g_seq_s n x = 0,
{ intros x hx n,
rw [simple_func.coe_restrict _ hs, set.indicator_of_not_mem hx], },
refine ⟨g_seq_s, λ x, _, hg_zero⟩,
by_cases hx : x ∈ s,
{ simp_rw hg_eq x hx,
exact hf.tendsto_approx x, },
{ simp_rw [hg_zero x hx, hf_zero x hx],
exact tendsto_const_nhds, },
end
/-- If the restriction to a set `s` of a σ-algebra `m` is included in the restriction to `s` of
another σ-algebra `m₂` (hypothesis `hs`), the set `s` is `m` measurable and a function `f` supported
on `s` is `m`-strongly-measurable, then `f` is also `m₂`-strongly-measurable. -/
lemma strongly_measurable_of_measurable_space_le_on {α E} {m m₂ : measurable_space α}
[topological_space E] [has_zero E] {s : set α} {f : α → E}
(hs_m : measurable_set[m] s) (hs : ∀ t, measurable_set[m] (s ∩ t) → measurable_set[m₂] (s ∩ t))
(hf : strongly_measurable[m] f) (hf_zero : ∀ x ∉ s, f x = 0) :
strongly_measurable[m₂] f :=
begin
have hs_m₂ : measurable_set[m₂] s,
{ rw ← set.inter_univ s,
refine hs set.univ _,
rwa [set.inter_univ], },
obtain ⟨g_seq_s, hg_seq_tendsto, hg_seq_zero⟩ := strongly_measurable_in_set hs_m hf hf_zero,
let g_seq_s₂ : ℕ → @simple_func α m₂ E := λ n,
{ to_fun := g_seq_s n,
measurable_set_fiber' := λ x, begin
rw [← set.inter_univ ((g_seq_s n) ⁻¹' {x}), ← set.union_compl_self s,
set.inter_union_distrib_left, set.inter_comm ((g_seq_s n) ⁻¹' {x})],
refine measurable_set.union (hs _ (hs_m.inter _)) _,
{ exact @simple_func.measurable_set_fiber _ _ m _ _, },
by_cases hx : x = 0,
{ suffices : (g_seq_s n) ⁻¹' {x} ∩ sᶜ = sᶜ, by { rw this, exact hs_m₂.compl, },
ext1 y,
rw [hx, set.mem_inter_iff, set.mem_preimage, set.mem_singleton_iff],
exact ⟨λ h, h.2, λ h, ⟨hg_seq_zero y h n, h⟩⟩, },
{ suffices : (g_seq_s n) ⁻¹' {x} ∩ sᶜ = ∅, by { rw this, exact measurable_set.empty, },
ext1 y,
simp only [mem_inter_iff, mem_preimage, mem_singleton_iff, mem_compl_iff,
mem_empty_iff_false, iff_false, not_and, not_not_mem],
refine imp_of_not_imp_not _ _ (λ hys, _),
rw hg_seq_zero y hys n,
exact ne.symm hx, },
end,
finite_range' := @simple_func.finite_range _ _ m (g_seq_s n), },
have hg_eq : ∀ x n, g_seq_s₂ n x = g_seq_s n x := λ x n, rfl,
refine ⟨g_seq_s₂, λ x, _⟩,
simp_rw hg_eq,
exact hg_seq_tendsto x,
end
/-- If a function `f` is strongly measurable w.r.t. a sub-σ-algebra `m` and the measure is σ-finite
on `m`, then there exists spanning measurable sets with finite measure on which `f` has bounded
norm. In particular, `f` is integrable on each of those sets. -/
lemma exists_spanning_measurable_set_norm_le [seminormed_add_comm_group β]
{m m0 : measurable_space α} (hm : m ≤ m0) (hf : strongly_measurable[m] f) (μ : measure α)
[sigma_finite (μ.trim hm)] :
∃ s : ℕ → set α, (∀ n, measurable_set[m] (s n) ∧ μ (s n) < ∞ ∧ ∀ x ∈ s n, ‖f x‖ ≤ n)
∧ (⋃ i, s i) = set.univ :=
begin
let sigma_finite_sets := spanning_sets (μ.trim hm),
let norm_sets := λ (n : ℕ), {x | ‖f x‖ ≤ n},
have norm_sets_spanning : (⋃ n, norm_sets n) = set.univ,
{ ext1 x, simp only [set.mem_Union, set.mem_set_of_eq, set.mem_univ, iff_true],
exact ⟨⌈‖f x‖⌉₊, nat.le_ceil (‖f x‖)⟩, },
let sets := λ n, sigma_finite_sets n ∩ norm_sets n,
have h_meas : ∀ n, measurable_set[m] (sets n),
{ refine λ n, measurable_set.inter _ _,
{ exact measurable_spanning_sets (μ.trim hm) n, },
{ exact hf.norm.measurable_set_le strongly_measurable_const, }, },
have h_finite : ∀ n, μ (sets n) < ∞,
{ refine λ n, (measure_mono (set.inter_subset_left _ _)).trans_lt _,
exact (le_trim hm).trans_lt (measure_spanning_sets_lt_top (μ.trim hm) n), },
refine ⟨sets, λ n, ⟨h_meas n, h_finite n, _⟩, _⟩,
{ exact λ x hx, hx.2, },
{ have : (⋃ i, sigma_finite_sets i ∩ norm_sets i)
= (⋃ i, sigma_finite_sets i) ∩ (⋃ i, norm_sets i),
{ refine set.Union_inter_of_monotone (monotone_spanning_sets (μ.trim hm)) (λ i j hij x, _),
simp only [norm_sets, set.mem_set_of_eq],
refine λ hif, hif.trans _,
exact_mod_cast hij, },
rw [this, norm_sets_spanning, Union_spanning_sets (μ.trim hm), set.inter_univ], },
end
end strongly_measurable
/-! ## Finitely strongly measurable functions -/
lemma fin_strongly_measurable_zero {α β} {m : measurable_space α} {μ : measure α} [has_zero β]
[topological_space β] :
fin_strongly_measurable (0 : α → β) μ :=
⟨0, by simp only [pi.zero_apply, simple_func.coe_zero, support_zero', measure_empty,
with_top.zero_lt_top, forall_const],
λ n, tendsto_const_nhds⟩
namespace fin_strongly_measurable
variables {m0 : measurable_space α} {μ : measure α} {f g : α → β}
lemma ae_fin_strongly_measurable [has_zero β] [topological_space β]
(hf : fin_strongly_measurable f μ) :
ae_fin_strongly_measurable f μ :=
⟨f, hf, ae_eq_refl f⟩
section sequence
variables [has_zero β] [topological_space β] (hf : fin_strongly_measurable f μ)
/-- A sequence of simple functions such that `∀ x, tendsto (λ n, hf.approx n x) at_top (𝓝 (f x))`
and `∀ n, μ (support (hf.approx n)) < ∞`. These properties are given by
`fin_strongly_measurable.tendsto_approx` and `fin_strongly_measurable.fin_support_approx`. -/
protected noncomputable def approx : ℕ → α →ₛ β := hf.some
protected lemma fin_support_approx : ∀ n, μ (support (hf.approx n)) < ∞ := hf.some_spec.1
protected lemma tendsto_approx : ∀ x, tendsto (λ n, hf.approx n x) at_top (𝓝 (f x)) :=
hf.some_spec.2
end sequence
protected lemma strongly_measurable [has_zero β] [topological_space β]
(hf : fin_strongly_measurable f μ) :
strongly_measurable f :=
⟨hf.approx, hf.tendsto_approx⟩
lemma exists_set_sigma_finite [has_zero β] [topological_space β] [t2_space β]
(hf : fin_strongly_measurable f μ) :
∃ t, measurable_set t ∧ (∀ x ∈ tᶜ, f x = 0) ∧ sigma_finite (μ.restrict t) :=
begin
rcases hf with ⟨fs, hT_lt_top, h_approx⟩,
let T := λ n, support (fs n),
have hT_meas : ∀ n, measurable_set (T n), from λ n, simple_func.measurable_set_support (fs n),
let t := ⋃ n, T n,
refine ⟨t, measurable_set.Union hT_meas, _, _⟩,
{ have h_fs_zero : ∀ n, ∀ x ∈ tᶜ, fs n x = 0,
{ intros n x hxt,
rw [set.mem_compl_iff, set.mem_Union, not_exists] at hxt,
simpa using (hxt n), },
refine λ x hxt, tendsto_nhds_unique (h_approx x) _,