forked from leanprover-community/mathlib4
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAEEqFun.lean
More file actions
989 lines (728 loc) · 39.3 KB
/
AEEqFun.lean
File metadata and controls
989 lines (728 loc) · 39.3 KB
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
/-
Copyright (c) 2019 Johannes Hölzl, Zhouhang Zhou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Zhouhang Zhou
-/
module
public import Mathlib.Dynamics.Ergodic.MeasurePreserving
public import Mathlib.MeasureTheory.Function.StronglyMeasurable.AEStronglyMeasurable
public import Mathlib.MeasureTheory.Integral.Lebesgue.Add
public import Mathlib.Order.Filter.Germ.Basic
public import Mathlib.Topology.ContinuousMap.Algebra
/-!
# Almost everywhere equal functions
We build a space of equivalence classes of functions, where two functions are treated as identical
if they are almost everywhere equal. We form the set of equivalence classes under the relation of
being almost everywhere equal, which is sometimes known as the `L⁰` space.
To use this space as a basis for the `L^p` spaces and for the Bochner integral, we consider
equivalence classes of strongly measurable functions (or, equivalently, of almost everywhere
strongly measurable functions.)
See `Mathlib/MeasureTheory/Function/L1Space/AEEqFun.lean` for `L¹` space.
## Notation
* `α →ₘ[μ] β` is the type of `L⁰` space, where `α` is a measurable space, `β` is a topological
space, and `μ` is a measure on `α`. `f : α →ₘ β` is a "function" in `L⁰`.
In comments, `[f]` is also used to denote an `L⁰` function.
`ₘ` can be typed as `\_m`. Sometimes it is shown as a box if font is missing.
## Main statements
* The linear structure of `L⁰` :
Addition and scalar multiplication are defined on `L⁰` in the natural way, i.e.,
`[f] + [g] := [f + g]`, `c • [f] := [c • f]`. So defined, `α →ₘ β` inherits the linear structure
of `β`. For example, if `β` is a module, then `α →ₘ β` is a module over the same ring.
See `mk_add_mk`, `neg_mk`, `mk_sub`, `smul_mk`,
`coeFn_add`, `coeFn_neg`, `coeFn_sub`, `coeFn_smul`
* The order structure of `L⁰` :
`≤` can be defined in a similar way: `[f] ≤ [g]` if `f a ≤ g a` for almost all `a` in domain.
And `α →ₘ β` inherits the preorder and partial order of `β`.
TODO: Define `sup` and `inf` on `L⁰` so that it forms a lattice. It seems that `β` must be a
linear order, since otherwise `f ⊔ g` may not be a measurable function.
## Implementation notes
* `f.cast`: To find a representative of `f : α →ₘ β`, use the coercion `(f : α → β)`, which
is implemented as `f.toFun`.
For each operation `op` in `L⁰`, there is a lemma called `coe_fn_op`,
characterizing, say, `(f op g : α → β)`.
* `AEEqFun.mk`: To construct an `L⁰` function `α →ₘ β` from an almost everywhere strongly
measurable function `f : α → β`, use `ae_eq_fun.mk`
* `comp`: Use `comp g f` to get `[g ∘ f]` from `g : β → γ` and `[f] : α →ₘ γ` when `g` is
continuous. Use `compMeasurable` if `g` is only measurable (this requires the
target space to be second countable).
* `comp₂`: Use `comp₂ g f₁ f₂` to get `[fun a ↦ g (f₁ a) (f₂ a)]`.
For example, `[f + g]` is `comp₂ (+)`
## Tags
function space, almost everywhere equal, `L⁰`, ae_eq_fun
-/
@[expose] public section
-- Guard against import creep
assert_not_exists InnerProductSpace
noncomputable section
open Topology Set Filter TopologicalSpace ENNReal EMetric MeasureTheory Function
variable {α β γ δ : Type*} [MeasurableSpace α] {μ ν : Measure α}
namespace MeasureTheory
section MeasurableSpace
variable [TopologicalSpace β]
variable (β)
/-- The equivalence relation of being almost everywhere equal for almost everywhere strongly
measurable functions. -/
@[implicit_reducible]
def Measure.aeEqSetoid (μ : Measure α) : Setoid { f : α → β // AEStronglyMeasurable f μ } :=
⟨fun f g => (f : α → β) =ᵐ[μ] g, fun {f} => ae_eq_refl f.val, fun {_ _} => ae_eq_symm,
fun {_ _ _} => ae_eq_trans⟩
variable (α)
/-- The space of equivalence classes of almost everywhere strongly measurable functions, where two
strongly measurable functions are equivalent if they agree almost everywhere, i.e.,
they differ on a set of measure `0`. -/
def AEEqFun (μ : Measure α) : Type _ :=
Quotient (μ.aeEqSetoid β)
variable {α β}
@[inherit_doc MeasureTheory.AEEqFun]
notation:25 α " →ₘ[" μ "] " β => AEEqFun α β μ
end MeasurableSpace
variable [TopologicalSpace δ]
namespace AEEqFun
section
variable [TopologicalSpace β]
/-- Construct the equivalence class `[f]` of an almost everywhere measurable function `f`, based
on the equivalence relation of being almost everywhere equal. -/
def mk {β : Type*} [TopologicalSpace β] (f : α → β) (hf : AEStronglyMeasurable f μ) : α →ₘ[μ] β :=
Quotient.mk'' ⟨f, hf⟩
open scoped Classical in
/-- Coercion from a space of equivalence classes of almost everywhere strongly measurable
functions to functions. We ensure that if `f` has a constant representative,
then we choose that one. -/
@[coe]
def cast (f : α →ₘ[μ] β) : α → β :=
if h : ∃ (b : β), f = mk (const α b) aestronglyMeasurable_const then
const α <| Classical.choose h else
AEStronglyMeasurable.mk _ (Quotient.out f : { f : α → β // AEStronglyMeasurable f μ }).2
/-- A measurable representative of an `AEEqFun` [f] -/
instance instCoeFun : CoeFun (α →ₘ[μ] β) fun _ => α → β := ⟨cast⟩
@[fun_prop]
protected theorem stronglyMeasurable (f : α →ₘ[μ] β) : StronglyMeasurable f := by
simp only [cast]
split_ifs with h
· exact stronglyMeasurable_const
· apply AEStronglyMeasurable.stronglyMeasurable_mk
@[fun_prop]
protected theorem aestronglyMeasurable (f : α →ₘ[μ] β) : AEStronglyMeasurable f μ :=
f.stronglyMeasurable.aestronglyMeasurable
@[fun_prop]
protected theorem measurable [PseudoMetrizableSpace β] [MeasurableSpace β] [BorelSpace β]
(f : α →ₘ[μ] β) : Measurable f :=
f.stronglyMeasurable.measurable
@[fun_prop]
protected theorem aemeasurable [PseudoMetrizableSpace β] [MeasurableSpace β] [BorelSpace β]
(f : α →ₘ[μ] β) : AEMeasurable f μ :=
f.measurable.aemeasurable
@[simp]
theorem quot_mk_eq_mk (f : α → β) (hf) :
(Quot.mk (@Setoid.r _ <| μ.aeEqSetoid β) ⟨f, hf⟩ : α →ₘ[μ] β) = mk f hf :=
rfl
@[simp]
theorem mk_eq_mk {f g : α → β} {hf hg} : (mk f hf : α →ₘ[μ] β) = mk g hg ↔ f =ᵐ[μ] g :=
Quotient.eq''
@[simp]
theorem mk_coeFn (f : α →ₘ[μ] β) : mk f f.aestronglyMeasurable = f := by
conv_lhs => simp only [cast]
split_ifs with h
· exact Classical.choose_spec h |>.symm
conv_rhs => rw [← Quotient.out_eq' f]
rw [← mk, mk_eq_mk]
exact (AEStronglyMeasurable.ae_eq_mk _).symm
@[ext]
theorem ext {f g : α →ₘ[μ] β} (h : f =ᵐ[μ] g) : f = g := by
rwa [← f.mk_coeFn, ← g.mk_coeFn, mk_eq_mk]
theorem coeFn_mk (f : α → β) (hf) : (mk f hf : α →ₘ[μ] β) =ᵐ[μ] f := by
rw [← mk_eq_mk (hf := AEEqFun.aestronglyMeasurable ..) (hg := hf), mk_coeFn]
@[elab_as_elim]
theorem induction_on (f : α →ₘ[μ] β) {p : (α →ₘ[μ] β) → Prop} (H : ∀ f hf, p (mk f hf)) : p f :=
Quotient.inductionOn' f <| Subtype.forall.2 H
@[elab_as_elim]
theorem induction_on₂ {α' β' : Type*} [MeasurableSpace α'] [TopologicalSpace β'] {μ' : Measure α'}
(f : α →ₘ[μ] β) (f' : α' →ₘ[μ'] β') {p : (α →ₘ[μ] β) → (α' →ₘ[μ'] β') → Prop}
(H : ∀ f hf f' hf', p (mk f hf) (mk f' hf')) : p f f' :=
induction_on f fun f hf => induction_on f' <| H f hf
@[elab_as_elim]
theorem induction_on₃ {α' β' : Type*} [MeasurableSpace α'] [TopologicalSpace β'] {μ' : Measure α'}
{α'' β'' : Type*} [MeasurableSpace α''] [TopologicalSpace β''] {μ'' : Measure α''}
(f : α →ₘ[μ] β) (f' : α' →ₘ[μ'] β') (f'' : α'' →ₘ[μ''] β'')
{p : (α →ₘ[μ] β) → (α' →ₘ[μ'] β') → (α'' →ₘ[μ''] β'') → Prop}
(H : ∀ f hf f' hf' f'' hf'', p (mk f hf) (mk f' hf') (mk f'' hf'')) : p f f' f'' :=
induction_on f fun f hf => induction_on₂ f' f'' <| H f hf
end
/-!
### Composition of an a.e. equal function with a (quasi-)measure-preserving function
-/
section compQuasiMeasurePreserving
variable [TopologicalSpace γ] [MeasurableSpace β] {ν : MeasureTheory.Measure β} {f : α → β}
open MeasureTheory.Measure (QuasiMeasurePreserving)
/-- Composition of an almost everywhere equal function and a quasi-measure-preserving function.
See also `AEEqFun.compMeasurePreserving`. -/
def compQuasiMeasurePreserving (g : β →ₘ[ν] γ) (f : α → β) (hf : QuasiMeasurePreserving f μ ν) :
α →ₘ[μ] γ :=
Quotient.liftOn' g (fun g ↦ mk (g ∘ f) <| g.2.comp_quasiMeasurePreserving hf) fun _ _ h ↦
mk_eq_mk.2 <| h.comp_tendsto hf.tendsto_ae
@[simp]
theorem compQuasiMeasurePreserving_mk {g : β → γ} (hg : AEStronglyMeasurable g ν)
(hf : QuasiMeasurePreserving f μ ν) :
(mk g hg).compQuasiMeasurePreserving f hf = mk (g ∘ f) (hg.comp_quasiMeasurePreserving hf) :=
rfl
theorem compQuasiMeasurePreserving_eq_mk (g : β →ₘ[ν] γ) (hf : QuasiMeasurePreserving f μ ν) :
g.compQuasiMeasurePreserving f hf =
mk (g ∘ f) (g.aestronglyMeasurable.comp_quasiMeasurePreserving hf) := by
rw [← compQuasiMeasurePreserving_mk g.aestronglyMeasurable hf, mk_coeFn]
theorem coeFn_compQuasiMeasurePreserving (g : β →ₘ[ν] γ) (hf : QuasiMeasurePreserving f μ ν) :
g.compQuasiMeasurePreserving f hf =ᵐ[μ] g ∘ f := by
rw [compQuasiMeasurePreserving_eq_mk]
apply coeFn_mk
theorem compQuasiMeasurePreserving_congr (g : β →ₘ[ν] γ) (hf : QuasiMeasurePreserving f μ ν)
{f' : α → β} (hf' : Measurable f') (h : f =ᵐ[μ] f') :
compQuasiMeasurePreserving g f hf = compQuasiMeasurePreserving g f' (hf.congr hf' h) := by
ext
grw [coeFn_compQuasiMeasurePreserving, coeFn_compQuasiMeasurePreserving, h]
@[simp]
theorem compQuasiMeasurePreserving_id (g : β →ₘ[ν] γ) :
compQuasiMeasurePreserving g id (.id ν) = g := by
ext
exact coeFn_compQuasiMeasurePreserving _ _
theorem compQuasiMeasurePreserving_comp {γ : Type*} {mγ : MeasurableSpace γ}
{ξ : Measure γ} (g : γ →ₘ[ξ] δ) {f : β → γ} (hf : QuasiMeasurePreserving f ν ξ) {f' : α → β}
(hf' : QuasiMeasurePreserving f' μ ν) :
compQuasiMeasurePreserving g (f ∘ f') (hf.comp hf') =
compQuasiMeasurePreserving (compQuasiMeasurePreserving g f hf) f' hf' := by
ext
grw [coeFn_compQuasiMeasurePreserving, coeFn_compQuasiMeasurePreserving,
coeFn_compQuasiMeasurePreserving, comp_assoc]
theorem compQuasiMeasurePreserving_iterate (g : α →ₘ[μ] γ) {f : α → α}
(hf : QuasiMeasurePreserving f μ μ) (n : ℕ) :
(compQuasiMeasurePreserving · f hf)^[n] g =
compQuasiMeasurePreserving g (f^[n]) (hf.iterate n) := by
induction n with
| zero => simp
| succ n hind =>
nth_rewrite 1 [add_comm]
simp [iterate_add, hind, ← compQuasiMeasurePreserving_comp]
end compQuasiMeasurePreserving
section compMeasurePreserving
variable [TopologicalSpace γ] [MeasurableSpace β] {ν : MeasureTheory.Measure β}
{f : α → β} {g : β → γ}
/-- Composition of an almost everywhere equal function and a quasi-measure-preserving function.
This is an important special case of `AEEqFun.compQuasiMeasurePreserving`. We use a separate
definition so that lemmas that need `f` to be measure preserving can be `@[simp]` lemmas. -/
def compMeasurePreserving (g : β →ₘ[ν] γ) (f : α → β) (hf : MeasurePreserving f μ ν) : α →ₘ[μ] γ :=
g.compQuasiMeasurePreserving f hf.quasiMeasurePreserving
@[simp]
theorem compMeasurePreserving_mk (hg : AEStronglyMeasurable g ν) (hf : MeasurePreserving f μ ν) :
(mk g hg).compMeasurePreserving f hf =
mk (g ∘ f) (hg.comp_quasiMeasurePreserving hf.quasiMeasurePreserving) :=
rfl
theorem compMeasurePreserving_eq_mk (g : β →ₘ[ν] γ) (hf : MeasurePreserving f μ ν) :
g.compMeasurePreserving f hf =
mk (g ∘ f) (g.aestronglyMeasurable.comp_quasiMeasurePreserving hf.quasiMeasurePreserving) :=
g.compQuasiMeasurePreserving_eq_mk _
theorem coeFn_compMeasurePreserving (g : β →ₘ[ν] γ) (hf : MeasurePreserving f μ ν) :
g.compMeasurePreserving f hf =ᵐ[μ] g ∘ f :=
g.coeFn_compQuasiMeasurePreserving _
theorem compMeasurePreserving_congr (g : β →ₘ[ν] γ) (hf : MeasurePreserving f μ ν)
{f' : α → β} (hf' : Measurable f') (h : f =ᵐ[μ] f') :
compMeasurePreserving g f hf = compMeasurePreserving g f' (hf.congr hf' h) :=
compQuasiMeasurePreserving_congr _ _ hf' h
@[simp]
theorem compMeasurePreserving_id (g : β →ₘ[ν] γ) :
compMeasurePreserving g id (.id ν) = g :=
compQuasiMeasurePreserving_id _
theorem compMeasurePreserving_comp {γ : Type*} {mγ : MeasurableSpace γ}
{ξ : Measure γ} (g : γ →ₘ[ξ] δ) {f : β → γ} (hf : MeasurePreserving f ν ξ) {f' : α → β}
(hf' : MeasurePreserving f' μ ν) :
compMeasurePreserving g (f ∘ f') (hf.comp hf') =
compMeasurePreserving (compMeasurePreserving g f hf) f' hf' :=
compQuasiMeasurePreserving_comp _ _ _
theorem compMeasurePreserving_iterate (g : α →ₘ[μ] γ) {f : α → α}
(hf : MeasurePreserving f μ μ) (n : ℕ) :
(compMeasurePreserving · f hf)^[n] g = compMeasurePreserving g (f^[n]) (hf.iterate n) :=
compQuasiMeasurePreserving_iterate _ _ _
end compMeasurePreserving
variable [TopologicalSpace β] [TopologicalSpace γ]
/-- Given a continuous function `g : β → γ`, and an almost everywhere equal function `[f] : α →ₘ β`,
return the equivalence class of `g ∘ f`, i.e., the almost everywhere equal function
`[g ∘ f] : α →ₘ γ`. -/
def comp (g : β → γ) (hg : Continuous g) (f : α →ₘ[μ] β) : α →ₘ[μ] γ :=
Quotient.liftOn' f (fun f => mk (g ∘ (f : α → β)) (hg.comp_aestronglyMeasurable f.2))
fun _ _ H => mk_eq_mk.2 <| H.fun_comp g
@[simp]
theorem comp_mk (g : β → γ) (hg : Continuous g) (f : α → β) (hf) :
comp g hg (mk f hf : α →ₘ[μ] β) = mk (g ∘ f) (hg.comp_aestronglyMeasurable hf) :=
rfl
@[simp]
theorem comp_id (f : α →ₘ[μ] β) : comp id (continuous_id) f = f := by
rcases f; rfl
@[simp]
theorem comp_comp (g : γ → δ) (g' : β → γ) (hg : Continuous g) (hg' : Continuous g')
(f : α →ₘ[μ] β) : comp g hg (comp g' hg' f) = comp (g ∘ g') (hg.comp hg') f := by
rcases f; rfl
theorem comp_eq_mk (g : β → γ) (hg : Continuous g) (f : α →ₘ[μ] β) :
comp g hg f = mk (g ∘ f) (hg.comp_aestronglyMeasurable f.aestronglyMeasurable) := by
rw [← comp_mk g hg f f.aestronglyMeasurable, mk_coeFn]
theorem coeFn_comp (g : β → γ) (hg : Continuous g) (f : α →ₘ[μ] β) : comp g hg f =ᵐ[μ] g ∘ f := by
rw [comp_eq_mk]
apply coeFn_mk
theorem comp_compQuasiMeasurePreserving
{β : Type*} [MeasurableSpace β] {ν} (g : γ → δ) (hg : Continuous g)
(f : β →ₘ[ν] γ) {φ : α → β} (hφ : Measure.QuasiMeasurePreserving φ μ ν) :
(comp g hg f).compQuasiMeasurePreserving φ hφ =
comp g hg (f.compQuasiMeasurePreserving φ hφ) := by
rcases f; rfl
section CompMeasurable
variable [MeasurableSpace β] [PseudoMetrizableSpace β] [BorelSpace β] [MeasurableSpace γ]
[PseudoMetrizableSpace γ] [OpensMeasurableSpace γ] [SecondCountableTopology γ]
/-- Given a measurable function `g : β → γ`, and an almost everywhere equal function `[f] : α →ₘ β`,
return the equivalence class of `g ∘ f`, i.e., the almost everywhere equal function
`[g ∘ f] : α →ₘ γ`. This requires that `γ` has a second countable topology. -/
def compMeasurable (g : β → γ) (hg : Measurable g) (f : α →ₘ[μ] β) : α →ₘ[μ] γ :=
Quotient.liftOn' f
(fun f' => mk (g ∘ (f' : α → β)) (hg.comp_aemeasurable f'.2.aemeasurable).aestronglyMeasurable)
fun _ _ H => mk_eq_mk.2 <| H.fun_comp g
@[simp]
theorem compMeasurable_mk (g : β → γ) (hg : Measurable g) (f : α → β)
(hf : AEStronglyMeasurable f μ) :
compMeasurable g hg (mk f hf : α →ₘ[μ] β) =
mk (g ∘ f) (hg.comp_aemeasurable hf.aemeasurable).aestronglyMeasurable :=
rfl
theorem compMeasurable_eq_mk (g : β → γ) (hg : Measurable g) (f : α →ₘ[μ] β) :
compMeasurable g hg f =
mk (g ∘ f) (hg.comp_aemeasurable f.aemeasurable).aestronglyMeasurable := by
rw [← compMeasurable_mk g hg f f.aestronglyMeasurable, mk_coeFn]
theorem coeFn_compMeasurable (g : β → γ) (hg : Measurable g) (f : α →ₘ[μ] β) :
compMeasurable g hg f =ᵐ[μ] g ∘ f := by
rw [compMeasurable_eq_mk]
apply coeFn_mk
end CompMeasurable
/-- The class of `x ↦ (f x, g x)`. -/
def pair (f : α →ₘ[μ] β) (g : α →ₘ[μ] γ) : α →ₘ[μ] β × γ :=
Quotient.liftOn₂' f g (fun f g => mk (fun x => (f.1 x, g.1 x)) (f.2.prodMk g.2))
fun _f _g _f' _g' Hf Hg => mk_eq_mk.2 <| Hf.prodMk Hg
@[simp]
theorem pair_mk_mk (f : α → β) (hf) (g : α → γ) (hg) :
(mk f hf : α →ₘ[μ] β).pair (mk g hg) = mk (fun x => (f x, g x)) (hf.prodMk hg) :=
rfl
theorem pair_eq_mk (f : α →ₘ[μ] β) (g : α →ₘ[μ] γ) :
f.pair g =
mk (fun x => (f x, g x)) (f.aestronglyMeasurable.prodMk g.aestronglyMeasurable) := by
simp only [← pair_mk_mk, mk_coeFn, f.aestronglyMeasurable, g.aestronglyMeasurable]
theorem coeFn_pair (f : α →ₘ[μ] β) (g : α →ₘ[μ] γ) : f.pair g =ᵐ[μ] fun x => (f x, g x) := by
rw [pair_eq_mk]
apply coeFn_mk
/-- Given a continuous function `g : β → γ → δ`, and almost everywhere equal functions
`[f₁] : α →ₘ β` and `[f₂] : α →ₘ γ`, return the equivalence class of the function
`fun a => g (f₁ a) (f₂ a)`, i.e., the almost everywhere equal function
`[fun a => g (f₁ a) (f₂ a)] : α →ₘ γ` -/
def comp₂ (g : β → γ → δ) (hg : Continuous (uncurry g)) (f₁ : α →ₘ[μ] β) (f₂ : α →ₘ[μ] γ) :
α →ₘ[μ] δ :=
comp _ hg (f₁.pair f₂)
@[simp]
theorem comp₂_mk_mk (g : β → γ → δ) (hg : Continuous (uncurry g)) (f₁ : α → β) (f₂ : α → γ)
(hf₁ hf₂) :
comp₂ g hg (mk f₁ hf₁ : α →ₘ[μ] β) (mk f₂ hf₂) =
mk (fun a => g (f₁ a) (f₂ a)) (hg.comp_aestronglyMeasurable (hf₁.prodMk hf₂)) :=
rfl
theorem comp₂_eq_pair (g : β → γ → δ) (hg : Continuous (uncurry g)) (f₁ : α →ₘ[μ] β)
(f₂ : α →ₘ[μ] γ) : comp₂ g hg f₁ f₂ = comp _ hg (f₁.pair f₂) :=
rfl
theorem comp₂_eq_mk (g : β → γ → δ) (hg : Continuous (uncurry g)) (f₁ : α →ₘ[μ] β)
(f₂ : α →ₘ[μ] γ) : comp₂ g hg f₁ f₂ = mk (fun a => g (f₁ a) (f₂ a))
(hg.comp_aestronglyMeasurable (f₁.aestronglyMeasurable.prodMk f₂.aestronglyMeasurable)) := by
rw [comp₂_eq_pair, pair_eq_mk, comp_mk]; rfl
theorem coeFn_comp₂ (g : β → γ → δ) (hg : Continuous (uncurry g)) (f₁ : α →ₘ[μ] β)
(f₂ : α →ₘ[μ] γ) : comp₂ g hg f₁ f₂ =ᵐ[μ] fun a => g (f₁ a) (f₂ a) := by
rw [comp₂_eq_mk]
apply coeFn_mk
section
variable [MeasurableSpace β] [PseudoMetrizableSpace β] [BorelSpace β]
[MeasurableSpace γ] [PseudoMetrizableSpace γ] [BorelSpace γ] [SecondCountableTopologyEither β γ]
[MeasurableSpace δ] [PseudoMetrizableSpace δ] [OpensMeasurableSpace δ] [SecondCountableTopology δ]
/-- Given a measurable function `g : β → γ → δ`, and almost everywhere equal functions
`[f₁] : α →ₘ β` and `[f₂] : α →ₘ γ`, return the equivalence class of the function
`fun a => g (f₁ a) (f₂ a)`, i.e., the almost everywhere equal function
`[fun a => g (f₁ a) (f₂ a)] : α →ₘ γ`. This requires `δ` to have second-countable topology. -/
def comp₂Measurable (g : β → γ → δ) (hg : Measurable (uncurry g)) (f₁ : α →ₘ[μ] β)
(f₂ : α →ₘ[μ] γ) : α →ₘ[μ] δ :=
compMeasurable _ hg (f₁.pair f₂)
@[simp]
theorem comp₂Measurable_mk_mk (g : β → γ → δ) (hg : Measurable (uncurry g)) (f₁ : α → β)
(f₂ : α → γ) (hf₁ hf₂) :
comp₂Measurable g hg (mk f₁ hf₁ : α →ₘ[μ] β) (mk f₂ hf₂) =
mk (fun a => g (f₁ a) (f₂ a))
(hg.comp_aemeasurable (hf₁.aemeasurable.prodMk hf₂.aemeasurable)).aestronglyMeasurable :=
rfl
theorem comp₂Measurable_eq_pair (g : β → γ → δ) (hg : Measurable (uncurry g)) (f₁ : α →ₘ[μ] β)
(f₂ : α →ₘ[μ] γ) : comp₂Measurable g hg f₁ f₂ = compMeasurable _ hg (f₁.pair f₂) :=
rfl
theorem comp₂Measurable_eq_mk (g : β → γ → δ) (hg : Measurable (uncurry g)) (f₁ : α →ₘ[μ] β)
(f₂ : α →ₘ[μ] γ) :
comp₂Measurable g hg f₁ f₂ =
mk (fun a => g (f₁ a) (f₂ a))
(hg.comp_aemeasurable (f₁.aemeasurable.prodMk f₂.aemeasurable)).aestronglyMeasurable := by
rw [comp₂Measurable_eq_pair, pair_eq_mk, compMeasurable_mk]; rfl
theorem coeFn_comp₂Measurable (g : β → γ → δ) (hg : Measurable (uncurry g)) (f₁ : α →ₘ[μ] β)
(f₂ : α →ₘ[μ] γ) : comp₂Measurable g hg f₁ f₂ =ᵐ[μ] fun a => g (f₁ a) (f₂ a) := by
rw [comp₂Measurable_eq_mk]
apply coeFn_mk
end
/-- Interpret `f : α →ₘ[μ] β` as a germ at `ae μ` forgetting that `f` is almost everywhere
strongly measurable. -/
def toGerm (f : α →ₘ[μ] β) : Germ (ae μ) β :=
Quotient.liftOn' f (fun f => ((f : α → β) : Germ (ae μ) β)) fun _ _ H => Germ.coe_eq.2 H
@[simp]
theorem mk_toGerm (f : α → β) (hf) : (mk f hf : α →ₘ[μ] β).toGerm = f :=
rfl
theorem toGerm_eq (f : α →ₘ[μ] β) : f.toGerm = (f : α → β) := by
rw [← mk_toGerm f f.aestronglyMeasurable, mk_coeFn]
theorem toGerm_injective : Injective (toGerm : (α →ₘ[μ] β) → Germ (ae μ) β) := fun f g H =>
ext <| Germ.coe_eq.1 <| by rwa [← toGerm_eq, ← toGerm_eq]
@[simp]
theorem compQuasiMeasurePreserving_toGerm {β : Type*} [MeasurableSpace β] {f : α → β} {ν}
(g : β →ₘ[ν] γ) (hf : Measure.QuasiMeasurePreserving f μ ν) :
(g.compQuasiMeasurePreserving f hf).toGerm = g.toGerm.compTendsto f hf.tendsto_ae := by
rcases g; rfl
@[simp]
theorem compMeasurePreserving_toGerm {β : Type*} [MeasurableSpace β] {f : α → β} {ν}
(g : β →ₘ[ν] γ) (hf : MeasurePreserving f μ ν) :
(g.compMeasurePreserving f hf).toGerm =
g.toGerm.compTendsto f hf.quasiMeasurePreserving.tendsto_ae :=
compQuasiMeasurePreserving_toGerm _ _
theorem comp_toGerm (g : β → γ) (hg : Continuous g) (f : α →ₘ[μ] β) :
(comp g hg f).toGerm = f.toGerm.map g :=
induction_on f fun f _ => by simp
theorem compMeasurable_toGerm [MeasurableSpace β] [BorelSpace β] [PseudoMetrizableSpace β]
[PseudoMetrizableSpace γ] [SecondCountableTopology γ] [MeasurableSpace γ]
[OpensMeasurableSpace γ] (g : β → γ) (hg : Measurable g) (f : α →ₘ[μ] β) :
(compMeasurable g hg f).toGerm = f.toGerm.map g :=
induction_on f fun f _ => by simp
theorem comp₂_toGerm (g : β → γ → δ) (hg : Continuous (uncurry g)) (f₁ : α →ₘ[μ] β)
(f₂ : α →ₘ[μ] γ) : (comp₂ g hg f₁ f₂).toGerm = f₁.toGerm.map₂ g f₂.toGerm :=
induction_on₂ f₁ f₂ fun f₁ _ f₂ _ => by simp
theorem comp₂Measurable_toGerm [PseudoMetrizableSpace β] [MeasurableSpace β] [BorelSpace β]
[PseudoMetrizableSpace γ] [SecondCountableTopologyEither β γ]
[MeasurableSpace γ] [BorelSpace γ] [PseudoMetrizableSpace δ] [SecondCountableTopology δ]
[MeasurableSpace δ] [OpensMeasurableSpace δ] (g : β → γ → δ) (hg : Measurable (uncurry g))
(f₁ : α →ₘ[μ] β) (f₂ : α →ₘ[μ] γ) :
(comp₂Measurable g hg f₁ f₂).toGerm = f₁.toGerm.map₂ g f₂.toGerm :=
induction_on₂ f₁ f₂ fun f₁ _ f₂ _ => by simp
/-- Given a predicate `p` and an equivalence class `[f]`, return true if `p` holds of `f a`
for almost all `a` -/
def LiftPred (p : β → Prop) (f : α →ₘ[μ] β) : Prop :=
f.toGerm.LiftPred p
/-- Given a relation `r` and equivalence class `[f]` and `[g]`, return true if `r` holds of
`(f a, g a)` for almost all `a` -/
def LiftRel (r : β → γ → Prop) (f : α →ₘ[μ] β) (g : α →ₘ[μ] γ) : Prop :=
f.toGerm.LiftRel r g.toGerm
theorem liftRel_mk_mk {r : β → γ → Prop} {f : α → β} {g : α → γ} {hf hg} :
LiftRel r (mk f hf : α →ₘ[μ] β) (mk g hg) ↔ ∀ᵐ a ∂μ, r (f a) (g a) :=
Iff.rfl
theorem liftRel_iff_coeFn {r : β → γ → Prop} {f : α →ₘ[μ] β} {g : α →ₘ[μ] γ} :
LiftRel r f g ↔ ∀ᵐ a ∂μ, r (f a) (g a) := by
rw [← liftRel_mk_mk (hf := f.aestronglyMeasurable) (hg := g.aestronglyMeasurable),
mk_coeFn, mk_coeFn]
section Order
instance instPreorder [Preorder β] : Preorder (α →ₘ[μ] β) :=
Preorder.lift toGerm
@[simp]
theorem mk_le_mk [Preorder β] {f g : α → β} (hf hg) : (mk f hf : α →ₘ[μ] β) ≤ mk g hg ↔ f ≤ᵐ[μ] g :=
Iff.rfl
@[simp, norm_cast]
theorem coeFn_le [Preorder β] {f g : α →ₘ[μ] β} : (f : α → β) ≤ᵐ[μ] g ↔ f ≤ g :=
liftRel_iff_coeFn.symm
instance instPartialOrder [PartialOrder β] : PartialOrder (α →ₘ[μ] β) :=
PartialOrder.lift toGerm toGerm_injective
section Lattice
section Sup
variable [SemilatticeSup β] [ContinuousSup β]
instance instSup : Max (α →ₘ[μ] β) where max f g := AEEqFun.comp₂ (· ⊔ ·) continuous_sup f g
theorem coeFn_sup (f g : α →ₘ[μ] β) : ⇑(f ⊔ g) =ᵐ[μ] fun x => f x ⊔ g x :=
coeFn_comp₂ _ _ _ _
instance instSemilatticeSup : SemilatticeSup (α →ₘ[μ] β) :=
toGerm_injective.semilatticeSup toGerm .rfl .rfl (comp₂_toGerm _ continuous_sup)
protected theorem le_sup_left (f g : α →ₘ[μ] β) : f ≤ f ⊔ g :=
_root_.le_sup_left
protected theorem le_sup_right (f g : α →ₘ[μ] β) : g ≤ f ⊔ g :=
_root_.le_sup_right
protected theorem sup_le (f g f' : α →ₘ[μ] β) (hf : f ≤ f') (hg : g ≤ f') : f ⊔ g ≤ f' :=
_root_.sup_le hf hg
end Sup
section Inf
variable [SemilatticeInf β] [ContinuousInf β]
instance instInf : Min (α →ₘ[μ] β) where min f g := AEEqFun.comp₂ (· ⊓ ·) continuous_inf f g
theorem coeFn_inf (f g : α →ₘ[μ] β) : ⇑(f ⊓ g) =ᵐ[μ] fun x => f x ⊓ g x :=
coeFn_comp₂ _ _ _ _
instance instSemilatticeInf : SemilatticeInf (α →ₘ[μ] β) :=
toGerm_injective.semilatticeInf toGerm .rfl .rfl (comp₂_toGerm _ continuous_inf)
protected theorem inf_le_left (f g : α →ₘ[μ] β) : f ⊓ g ≤ f :=
_root_.inf_le_left
protected theorem inf_le_right (f g : α →ₘ[μ] β) : f ⊓ g ≤ g :=
_root_.inf_le_right
protected theorem le_inf (f' f g : α →ₘ[μ] β) (hf : f' ≤ f) (hg : f' ≤ g) : f' ≤ f ⊓ g :=
_root_.le_inf hf hg
end Inf
instance instLattice [Lattice β] [TopologicalLattice β] : Lattice (α →ₘ[μ] β) where
end Lattice
end Order
variable (α)
/-- The equivalence class of a constant function: `[fun _ : α => b]`, based on the equivalence
relation of being almost everywhere equal -/
def const (b : β) : α →ₘ[μ] β :=
mk (fun _ : α ↦ b) aestronglyMeasurable_const
theorem coeFn_const (b : β) : (const α b : α →ₘ[μ] β) =ᵐ[μ] Function.const α b :=
coeFn_mk _ _
/-- If the measure is nonzero, we can strengthen `coeFn_const` to get an equality. -/
@[simp]
theorem coeFn_const_eq [NeZero μ] (b : β) (x : α) : (const α b : α →ₘ[μ] β) x = b := by
simp only [cast]
split_ifs with h
case neg => exact h.elim ⟨b, rfl⟩
have := Classical.choose_spec h
set b' := Classical.choose h
simp_rw [const, mk_eq_mk, EventuallyEq, ← const_def, eventually_const] at this
rw [Function.const, this]
variable {α}
instance instInhabited [Inhabited β] : Inhabited (α →ₘ[μ] β) :=
⟨const α default⟩
@[to_additive]
instance instOne [One β] : One (α →ₘ[μ] β) :=
⟨const α 1⟩
@[to_additive]
theorem one_def [One β] : (1 : α →ₘ[μ] β) = mk (fun _ : α => 1) aestronglyMeasurable_const :=
rfl
@[to_additive]
theorem coeFn_one [One β] : ⇑(1 : α →ₘ[μ] β) =ᵐ[μ] 1 :=
coeFn_const ..
@[to_additive (attr := simp)]
theorem coeFn_one_eq [NeZero μ] [One β] {x : α} : (1 : α →ₘ[μ] β) x = 1 :=
coeFn_const_eq ..
@[to_additive (attr := simp)]
theorem one_toGerm [One β] : (1 : α →ₘ[μ] β).toGerm = 1 :=
rfl
-- Note we set up the scalar actions before the `Monoid` structures in case we want to
-- try to override the `nsmul` or `zsmul` fields in future.
section SMul
variable {𝕜 𝕜' : Type*}
variable [SMul 𝕜 γ] [ContinuousConstSMul 𝕜 γ]
variable [SMul 𝕜' γ] [ContinuousConstSMul 𝕜' γ]
instance instSMul : SMul 𝕜 (α →ₘ[μ] γ) :=
⟨fun c f => comp (c • ·) (continuous_id.const_smul c) f⟩
@[simp]
theorem smul_mk (c : 𝕜) (f : α → γ) (hf : AEStronglyMeasurable f μ) :
c • (mk f hf : α →ₘ[μ] γ) = mk (c • f) (hf.const_smul _) :=
rfl
theorem coeFn_smul (c : 𝕜) (f : α →ₘ[μ] γ) : ⇑(c • f) =ᵐ[μ] c • ⇑f :=
coeFn_comp _ _ _
theorem smul_toGerm (c : 𝕜) (f : α →ₘ[μ] γ) : (c • f).toGerm = c • f.toGerm :=
comp_toGerm _ _ _
instance instSMulCommClass [SMulCommClass 𝕜 𝕜' γ] : SMulCommClass 𝕜 𝕜' (α →ₘ[μ] γ) :=
⟨fun a b f => induction_on f fun f hf => by simp_rw [smul_mk, smul_comm]⟩
instance instIsScalarTower [SMul 𝕜 𝕜'] [IsScalarTower 𝕜 𝕜' γ] : IsScalarTower 𝕜 𝕜' (α →ₘ[μ] γ) :=
⟨fun a b f => induction_on f fun f hf => by simp_rw [smul_mk, smul_assoc]⟩
instance instIsCentralScalar [SMul 𝕜ᵐᵒᵖ γ] [IsCentralScalar 𝕜 γ] : IsCentralScalar 𝕜 (α →ₘ[μ] γ) :=
⟨fun a f => induction_on f fun f hf => by simp_rw [smul_mk, op_smul_eq_smul]⟩
end SMul
section Mul
variable [Mul γ] [ContinuousMul γ]
@[to_additive]
instance instMul : Mul (α →ₘ[μ] γ) :=
⟨comp₂ (· * ·) continuous_mul⟩
@[to_additive (attr := simp)]
theorem mk_mul_mk (f g : α → γ) (hf : AEStronglyMeasurable f μ) (hg : AEStronglyMeasurable g μ) :
(mk f hf : α →ₘ[μ] γ) * mk g hg = mk (f * g) (hf.mul hg) :=
rfl
@[to_additive]
theorem coeFn_mul (f g : α →ₘ[μ] γ) : ⇑(f * g) =ᵐ[μ] f * g :=
coeFn_comp₂ _ _ _ _
@[to_additive (attr := simp)]
theorem mul_toGerm (f g : α →ₘ[μ] γ) : (f * g).toGerm = f.toGerm * g.toGerm :=
comp₂_toGerm _ _ _ _
end Mul
instance instAddMonoid [AddMonoid γ] [ContinuousAdd γ] : AddMonoid (α →ₘ[μ] γ) :=
toGerm_injective.addMonoid toGerm zero_toGerm add_toGerm fun _ _ => smul_toGerm _ _
instance instAddCommMonoid [AddCommMonoid γ] [ContinuousAdd γ] : AddCommMonoid (α →ₘ[μ] γ) :=
toGerm_injective.addCommMonoid toGerm zero_toGerm add_toGerm fun _ _ => smul_toGerm _ _
section Monoid
variable [Monoid γ] [ContinuousMul γ]
instance instPowNat : Pow (α →ₘ[μ] γ) ℕ :=
⟨fun f n => comp _ (continuous_pow n) f⟩
@[simp]
theorem mk_pow (f : α → γ) (hf) (n : ℕ) :
(mk f hf : α →ₘ[μ] γ) ^ n =
mk (f ^ n) ((_root_.continuous_pow n).comp_aestronglyMeasurable hf) :=
rfl
theorem coeFn_pow (f : α →ₘ[μ] γ) (n : ℕ) : ⇑(f ^ n) =ᵐ[μ] (⇑f) ^ n :=
coeFn_comp _ _ _
@[simp]
theorem pow_toGerm (f : α →ₘ[μ] γ) (n : ℕ) : (f ^ n).toGerm = f.toGerm ^ n :=
comp_toGerm _ _ _
@[to_additive existing]
instance instMonoid : Monoid (α →ₘ[μ] γ) :=
toGerm_injective.monoid toGerm one_toGerm mul_toGerm pow_toGerm
/-- `AEEqFun.toGerm` as a `MonoidHom`. -/
@[to_additive (attr := simps) /-- `AEEqFun.toGerm` as an `AddMonoidHom`. -/]
def toGermMonoidHom : (α →ₘ[μ] γ) →* (ae μ).Germ γ where
toFun := toGerm
map_one' := one_toGerm
map_mul' := mul_toGerm
end Monoid
@[to_additive existing]
instance instCommMonoid [CommMonoid γ] [ContinuousMul γ] : CommMonoid (α →ₘ[μ] γ) :=
toGerm_injective.commMonoid toGerm one_toGerm mul_toGerm pow_toGerm
section Group
variable [Group γ] [IsTopologicalGroup γ]
section Inv
@[to_additive]
instance instInv : Inv (α →ₘ[μ] γ) :=
⟨comp Inv.inv continuous_inv⟩
@[to_additive (attr := simp)]
theorem inv_mk (f : α → γ) (hf) : (mk f hf : α →ₘ[μ] γ)⁻¹ = mk f⁻¹ hf.inv :=
rfl
@[to_additive]
theorem coeFn_inv (f : α →ₘ[μ] γ) : ⇑f⁻¹ =ᵐ[μ] f⁻¹ :=
coeFn_comp _ _ _
@[to_additive]
theorem inv_toGerm (f : α →ₘ[μ] γ) : f⁻¹.toGerm = f.toGerm⁻¹ :=
comp_toGerm _ _ _
end Inv
section Div
@[to_additive]
instance instDiv : Div (α →ₘ[μ] γ) :=
⟨comp₂ Div.div continuous_div'⟩
@[to_additive (attr := simp)]
theorem mk_div (f g : α → γ) (hf : AEStronglyMeasurable f μ) (hg : AEStronglyMeasurable g μ) :
mk (f / g) (hf.div hg) = (mk f hf : α →ₘ[μ] γ) / mk g hg :=
rfl
@[to_additive]
theorem coeFn_div (f g : α →ₘ[μ] γ) : ⇑(f / g) =ᵐ[μ] f / g :=
coeFn_comp₂ _ _ _ _
@[to_additive]
theorem div_toGerm (f g : α →ₘ[μ] γ) : (f / g).toGerm = f.toGerm / g.toGerm :=
comp₂_toGerm _ _ _ _
end Div
section ZPow
instance instPowInt : Pow (α →ₘ[μ] γ) ℤ :=
⟨fun f n => comp _ (continuous_zpow n) f⟩
@[simp]
theorem mk_zpow (f : α → γ) (hf) (n : ℤ) :
(mk f hf : α →ₘ[μ] γ) ^ n = mk (f ^ n) ((continuous_zpow n).comp_aestronglyMeasurable hf) :=
rfl
theorem coeFn_zpow (f : α →ₘ[μ] γ) (n : ℤ) : ⇑(f ^ n) =ᵐ[μ] (⇑f) ^ n :=
coeFn_comp _ _ _
@[simp]
theorem zpow_toGerm (f : α →ₘ[μ] γ) (n : ℤ) : (f ^ n).toGerm = f.toGerm ^ n :=
comp_toGerm _ _ _
end ZPow
end Group
instance instAddGroup [AddGroup γ] [IsTopologicalAddGroup γ] : AddGroup (α →ₘ[μ] γ) :=
toGerm_injective.addGroup toGerm zero_toGerm add_toGerm neg_toGerm sub_toGerm
(fun _ _ => smul_toGerm _ _) fun _ _ => smul_toGerm _ _
instance instAddCommGroup [AddCommGroup γ] [IsTopologicalAddGroup γ] : AddCommGroup (α →ₘ[μ] γ) :=
{ add_comm := add_comm }
@[to_additive existing]
instance instGroup [Group γ] [IsTopologicalGroup γ] : Group (α →ₘ[μ] γ) :=
toGerm_injective.group _ one_toGerm mul_toGerm inv_toGerm div_toGerm pow_toGerm zpow_toGerm
@[to_additive existing]
instance instCommGroup [CommGroup γ] [IsTopologicalGroup γ] : CommGroup (α →ₘ[μ] γ) :=
{ mul_comm := mul_comm }
section Module
variable {𝕜 : Type*}
instance instMulAction [Monoid 𝕜] [MulAction 𝕜 γ] [ContinuousConstSMul 𝕜 γ] :
MulAction 𝕜 (α →ₘ[μ] γ) :=
toGerm_injective.mulAction toGerm smul_toGerm
instance instDistribMulAction [Monoid 𝕜] [AddMonoid γ] [ContinuousAdd γ] [DistribMulAction 𝕜 γ]
[ContinuousConstSMul 𝕜 γ] : DistribMulAction 𝕜 (α →ₘ[μ] γ) :=
toGerm_injective.distribMulAction (toGermAddMonoidHom : (α →ₘ[μ] γ) →+ _) fun c : 𝕜 =>
smul_toGerm c
instance instModule [Semiring 𝕜] [AddCommMonoid γ] [ContinuousAdd γ] [Module 𝕜 γ]
[ContinuousConstSMul 𝕜 γ] : Module 𝕜 (α →ₘ[μ] γ) :=
toGerm_injective.module 𝕜 (toGermAddMonoidHom : (α →ₘ[μ] γ) →+ _) smul_toGerm
end Module
open ENNReal
/-- For `f : α → ℝ≥0∞`, define `∫ [f]` to be `∫ f` -/
def lintegral (f : α →ₘ[μ] ℝ≥0∞) : ℝ≥0∞ :=
Quotient.liftOn' f (fun f => ∫⁻ a, (f : α → ℝ≥0∞) a ∂μ) fun _ _ => lintegral_congr_ae
@[simp]
theorem lintegral_mk (f : α → ℝ≥0∞) (hf) : (mk f hf : α →ₘ[μ] ℝ≥0∞).lintegral = ∫⁻ a, f a ∂μ :=
rfl
theorem lintegral_coeFn (f : α →ₘ[μ] ℝ≥0∞) : ∫⁻ a, f a ∂μ = f.lintegral := by
rw [← lintegral_mk (hf := f.aestronglyMeasurable), mk_coeFn]
@[simp]
nonrec theorem lintegral_zero : lintegral (0 : α →ₘ[μ] ℝ≥0∞) = 0 :=
lintegral_zero
@[simp]
theorem lintegral_eq_zero_iff {f : α →ₘ[μ] ℝ≥0∞} : lintegral f = 0 ↔ f = 0 :=
induction_on f fun _f hf => (lintegral_eq_zero_iff' hf.aemeasurable).trans mk_eq_mk.symm
theorem lintegral_add (f g : α →ₘ[μ] ℝ≥0∞) : lintegral (f + g) = lintegral f + lintegral g :=
induction_on₂ f g fun f hf g _ => by simp [lintegral_add_left' hf.aemeasurable]
theorem lintegral_mono {f g : α →ₘ[μ] ℝ≥0∞} : f ≤ g → lintegral f ≤ lintegral g :=
induction_on₂ f g fun _f _ _g _ hfg => lintegral_mono_ae hfg
section Abs
theorem coeFn_abs {β} [TopologicalSpace β] [Lattice β] [TopologicalLattice β] [AddGroup β]
[IsTopologicalAddGroup β] (f : α →ₘ[μ] β) : ⇑|f| =ᵐ[μ] fun x => |f x| := by
simp_rw [abs]
filter_upwards [AEEqFun.coeFn_sup f (-f), AEEqFun.coeFn_neg f] with x hx_sup hx_neg
rw [hx_sup, hx_neg, Pi.neg_apply]
end Abs
section Star
variable {R : Type*} [TopologicalSpace R]
instance [Star R] [ContinuousStar R] : Star (α →ₘ[μ] R) where
star f := (AEEqFun.comp _ continuous_star f)
lemma coeFn_star [Star R] [ContinuousStar R] (f : α →ₘ[μ] R) : ↑(star f) =ᵐ[μ] (star f : α → R) :=
coeFn_comp _ (continuous_star) f
instance [InvolutiveStar R] [ContinuousStar R] : InvolutiveStar (α →ₘ[μ] R) where
star_involutive f := comp_comp _ _ _ _ f |>.trans <| by simp [star_involutive.comp_self]
instance [Star R] [TrivialStar R] [ContinuousStar R] : TrivialStar (α →ₘ[μ] R) where
star_trivial f := show comp _ _ f = f by simp [funext star_trivial, ← Function.id_def]
end Star
section PosPart
variable [LinearOrder γ] [OrderClosedTopology γ] [Zero γ]
/-- Positive part of an `AEEqFun`. -/
def posPart (f : α →ₘ[μ] γ) : α →ₘ[μ] γ :=
comp (fun x => max x 0) (by fun_prop) f
@[simp]
theorem posPart_mk (f : α → γ) (hf) :
posPart (mk f hf : α →ₘ[μ] γ) = mk (fun x ↦ max (f x) 0) (by fun_prop) :=
rfl
theorem coeFn_posPart (f : α →ₘ[μ] γ) : ⇑(posPart f) =ᵐ[μ] fun a => max (f a) 0 :=
coeFn_comp _ _ _
end PosPart
section AELimit
/-- The ae-limit is ae-unique. -/
theorem tendsto_ae_unique {ι : Type*} [T2Space β]
{g h : α → β} {f : ι → α → β} {l : Filter ι} [l.NeBot]
(hg : ∀ᵐ ω ∂μ, Tendsto (fun i => f i ω) l (𝓝 (g ω)))
(hh : ∀ᵐ ω ∂μ, Tendsto (fun i => f i ω) l (𝓝 (h ω))) : g =ᵐ[μ] h := by
filter_upwards [hg, hh] with ω hg1 hh1 using tendsto_nhds_unique hg1 hh1
end AELimit
end AEEqFun
end MeasureTheory
namespace ContinuousMap
open MeasureTheory
variable [TopologicalSpace α] [BorelSpace α] (μ)
variable [TopologicalSpace β] [SecondCountableTopologyEither α β] [PseudoMetrizableSpace β]
/-- The equivalence class of `μ`-almost-everywhere measurable functions associated to a continuous
map. -/
def toAEEqFun (f : C(α, β)) : α →ₘ[μ] β :=
AEEqFun.mk f f.continuous.aestronglyMeasurable
theorem coeFn_toAEEqFun (f : C(α, β)) : f.toAEEqFun μ =ᵐ[μ] f :=
AEEqFun.coeFn_mk f _
variable [Group β] [IsTopologicalGroup β]
/-- The `MulHom` from the group of continuous maps from `α` to `β` to the group of equivalence
classes of `μ`-almost-everywhere measurable functions. -/
@[to_additive /-- The `AddHom` from the group of continuous maps from `α` to `β` to the group of
equivalence classes of `μ`-almost-everywhere measurable functions. -/]
def toAEEqFunMulHom : C(α, β) →* α →ₘ[μ] β where
toFun := ContinuousMap.toAEEqFun μ
map_one' := rfl
map_mul' f g :=
AEEqFun.mk_mul_mk _ _ f.continuous.aestronglyMeasurable g.continuous.aestronglyMeasurable
variable {𝕜 : Type*} [Semiring 𝕜]
variable [TopologicalSpace γ] [PseudoMetrizableSpace γ] [AddCommGroup γ] [Module 𝕜 γ]
[IsTopologicalAddGroup γ] [ContinuousConstSMul 𝕜 γ] [SecondCountableTopologyEither α γ]
/-- The linear map from the group of continuous maps from `α` to `β` to the group of equivalence
classes of `μ`-almost-everywhere measurable functions. -/
def toAEEqFunLinearMap : C(α, γ) →ₗ[𝕜] α →ₘ[μ] γ :=
{ toAEEqFunAddHom μ with
map_smul' := fun c f => AEEqFun.smul_mk c f f.continuous.aestronglyMeasurable }
end ContinuousMap