Skip to content

Commit 44176a4

Browse files
sgouezelBergschaf
authored andcommitted
feat: drop completeness assumption in the definition of setToFun, expand API (leanprover-community#39615)
The definition of the Bochner integral and the vector measure integral handle the non-completeness of the space in a completely parallel way. To avoid duplication and streamline proofs, we move this handling of non-completeness one step higher, to the definition of `setToFun`. We also expand its API -- this is cherry-picked from a work on vector measure integrals that has highlighted the need for the lemmas I am adding here. To minimize the size of the PR, I went for minimal fixes in the files on Bochner integrals and on conditional expectations. Further cleanup will be done in subsequent PRs. Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
1 parent aff292c commit 44176a4

6 files changed

Lines changed: 259 additions & 67 deletions

File tree

Mathlib/MeasureTheory/Function/ConditionalExpectation/CondexpL1.lean

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,9 @@ theorem condExpL1CLM_of_aestronglyMeasurable' (f : α →₁[μ] F') (hfm : AESt
440440

441441
/-- Conditional expectation of a function, in L1. Its value is 0 if the function is not
442442
integrable. The function-valued `condExp` should be used instead in most cases. -/
443-
def condExpL1 (hm : m ≤ m0) (μ : Measure α) [SigmaFinite (μ.trim hm)] (f : α → F') : α →₁[μ] F' :=
443+
@[nolint unusedArguments] -- TODO: drop the completeness assumption in the definition, and fix
444+
def condExpL1 [CompleteSpace F'] (hm : m ≤ m0) (μ : Measure α) [SigmaFinite (μ.trim hm)]
445+
(f : α → F') : α →₁[μ] F' :=
444446
setToFun μ (condExpInd F' hm μ) (dominatedFinMeasAdditive_condExpInd F' hm μ) f
445447

446448
theorem condExpL1_undef (hf : ¬Integrable f μ) : condExpL1 hm μ f = 0 :=

Mathlib/MeasureTheory/Function/L1Space/AEEqFun.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ theorem norm_toL1_eq_lintegral_norm (f : α → β) (hf : Integrable f μ) :
213213
‖hf.toL1 f‖ = ENNReal.toReal (∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ) := by
214214
rw [norm_toL1, lintegral_norm_eq_lintegral_edist]
215215

216+
theorem norm_toL1_eq_lintegral_enorm (f : α → β) (hf : Integrable f μ) :
217+
‖hf.toL1 f‖ = (∫⁻ a, ‖f a‖ₑ ∂μ).toReal := by
218+
simp_rw [norm_toL1, edist_zero_right]
219+
216220
@[simp]
217221
theorem edist_toL1_toL1 (f g : α → β) (hf : Integrable f μ) (hg : Integrable g μ) :
218222
edist (hf.toL1 f) (hg.toL1 g) = ∫⁻ a, edist (f a) (g a) ∂μ := by

Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,8 @@ end SimpleFuncProperties
364364

365365
end SimpleFunc
366366

367+
open SimpleFunc
368+
367369
/-! Construction of the space of `Lp` simple functions, and its dense embedding into `Lp`. -/
368370

369371

@@ -466,7 +468,7 @@ attribute [local instance] simpleFunc.module simpleFunc.normedSpace simpleFunc.i
466468
section ToLp
467469

468470
/-- Construct the equivalence class `[f]` of a simple function `f` satisfying `MemLp`. -/
469-
abbrev toLp (f : α →ₛ E) (hf : MemLp f p μ) : Lp.simpleFunc E p μ :=
471+
abbrev _root_.MeasureTheory.SimpleFunc.toLp (f : α →ₛ E) (hf : MemLp f p μ) : Lp.simpleFunc E p μ :=
470472
⟨hf.toLp f, ⟨f, rfl⟩⟩
471473

472474
theorem toLp_eq_toLp (f : α →ₛ E) (hf : MemLp f p μ) : (toLp f hf : Lp E p μ) = hf.toLp f :=
@@ -621,8 +623,8 @@ protected theorem induction (hp_pos : p ≠ 0) (hp_ne_top : p ≠ ∞) {P : Lp.s
621623
∀ hf : MemLp f p μ,
622624
∀ hg : MemLp g p μ,
623625
Disjoint (support f) (support g) →
624-
P (Lp.simpleFunc.toLp f hf) →
625-
P (Lp.simpleFunc.toLp g hg) → P (Lp.simpleFunc.toLp f hf + Lp.simpleFunc.toLp g hg))
626+
P (toLp f hf) →
627+
P (toLp g hg) → P (toLp f hf + toLp g hg))
626628
(f : Lp.simpleFunc E p μ) : P f := by
627629
suffices ∀ f : α →ₛ E, ∀ hf : MemLp f p μ, P (toLp f hf) by
628630
rw [← toLp_toSimpleFunc f]
@@ -691,7 +693,7 @@ variable (α E 𝕜)
691693
/-- The embedding of Lp simple functions into Lp functions, as a continuous linear map. -/
692694
def coeToLp : Lp.simpleFunc E p μ →L[𝕜] Lp E p μ :=
693695
{ AddSubgroup.subtype (Lp.simpleFunc E p μ) with
694-
map_smul' _ _ := rfl }
696+
map_smul' := fun _ _ => rfl }
695697

696698
end CoeToLp
697699

@@ -907,7 +909,7 @@ section Integrable
907909
notation:25 α " →₁ₛ[" μ "] " E => @MeasureTheory.Lp.simpleFunc α E _ _ 1 μ
908910

909911
theorem L1.SimpleFunc.toLp_one_eq_toL1 (f : α →ₛ E) (hf : Integrable f μ) :
910-
(Lp.simpleFunc.toLp f (memLp_one_iff_integrable.2 hf) : α →₁[μ] E) = hf.toL1 f :=
912+
(toLp f (memLp_one_iff_integrable.2 hf) : α →₁[μ] E) = hf.toL1 f :=
911913
rfl
912914

913915
@[fun_prop]

Mathlib/MeasureTheory/Integral/Bochner/Basic.lean

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ theorem integral_eq (f : α → E) (hf : Integrable f μ) : ∫ a, f a ∂μ = L
194194

195195
theorem integral_eq_setToFun (f : α → E) :
196196
∫ a, f a ∂μ = setToFun μ (weightedSMul μ) (dominatedFinMeasAdditive_weightedSMul μ) f := by
197-
simp only [integral, hE, L1.integral]; rfl
197+
simp only [integral, hE, ↓reduceDIte, L1.integral, setToFun]; rfl
198198

199199
theorem L1.integral_eq_integral (f : α →₁[μ] E) : L1.integral f = ∫ a, f a ∂μ := by
200200
simp only [integral, L1.integral, integral_eq_setToFun]
@@ -217,7 +217,7 @@ variable (α G)
217217
@[simp]
218218
theorem integral_zero : ∫ _ : α, (0 : G) ∂μ = 0 := by
219219
by_cases hG : CompleteSpace G
220-
· simp only [integral, hG, L1.integral]
220+
· simp only [integral_eq_setToFun]
221221
exact setToFun_zero (dominatedFinMeasAdditive_weightedSMul μ)
222222
· simp [integral, hG]
223223

@@ -237,7 +237,7 @@ theorem integrable_of_integral_eq_one {f : α → ℝ} (h : ∫ x, f x ∂μ = 1
237237
theorem integral_add {f g : α → G} (hf : Integrable f μ) (hg : Integrable g μ) :
238238
∫ a, f a + g a ∂μ = ∫ a, f a ∂μ + ∫ a, g a ∂μ := by
239239
by_cases hG : CompleteSpace G
240-
· simp only [integral, hG, L1.integral]
240+
· simp only [integral_eq_setToFun]
241241
exact setToFun_add (dominatedFinMeasAdditive_weightedSMul μ) hf hg
242242
· simp [integral, hG]
243243

@@ -248,7 +248,7 @@ theorem integral_add' {f g : α → G} (hf : Integrable f μ) (hg : Integrable g
248248
theorem integral_finsetSum {ι} (s : Finset ι) {f : ι → α → G} (hf : ∀ i ∈ s, Integrable (f i) μ) :
249249
∫ a, ∑ i ∈ s, f i a ∂μ = ∑ i ∈ s, ∫ a, f i a ∂μ := by
250250
by_cases hG : CompleteSpace G
251-
· simp only [integral, hG, L1.integral]
251+
· simp only [integral_eq_setToFun]
252252
exact setToFun_finsetSum (dominatedFinMeasAdditive_weightedSMul _) s hf
253253
· simp [integral, hG]
254254

@@ -257,7 +257,7 @@ theorem integral_finsetSum {ι} (s : Finset ι) {f : ι → α → G} (hf : ∀
257257
@[integral_simps]
258258
theorem integral_neg (f : α → G) : ∫ a, -f a ∂μ = -∫ a, f a ∂μ := by
259259
by_cases hG : CompleteSpace G
260-
· simp only [integral, hG, L1.integral]
260+
· simp only [integral_eq_setToFun]
261261
exact setToFun_neg (dominatedFinMeasAdditive_weightedSMul μ) f
262262
· simp [integral, hG]
263263

@@ -267,7 +267,7 @@ theorem integral_neg' (f : α → G) : ∫ a, (-f) a ∂μ = -∫ a, f a ∂μ :
267267
theorem integral_sub {f g : α → G} (hf : Integrable f μ) (hg : Integrable g μ) :
268268
∫ a, f a - g a ∂μ = ∫ a, f a ∂μ - ∫ a, g a ∂μ := by
269269
by_cases hG : CompleteSpace G
270-
· simp only [integral, hG, L1.integral]
270+
· simp only [integral_eq_setToFun]
271271
exact setToFun_sub (dominatedFinMeasAdditive_weightedSMul μ) hf hg
272272
· simp [integral, hG]
273273

@@ -283,7 +283,7 @@ statement for more general rings with an *a priori* integrability assumption on
283283
theorem integral_smul [Module 𝕜 G] [NormSMulClass 𝕜 G] [SMulCommClass ℝ 𝕜 G] (c : 𝕜) (f : α → G) :
284284
∫ a, c • f a ∂μ = c • ∫ a, f a ∂μ := by
285285
by_cases hG : CompleteSpace G
286-
· simp only [integral, hG, L1.integral]
286+
· simp only [integral_eq_setToFun]
287287
exact setToFun_smul (dominatedFinMeasAdditive_weightedSMul μ) weightedSMul_smul c f
288288
· simp [integral, hG]
289289

@@ -308,7 +308,7 @@ theorem integral_div {L : Type*} [RCLike L] (r : L) (f : α → L) :
308308

309309
theorem integral_congr_ae {f g : α → G} (h : f =ᵐ[μ] g) : ∫ a, f a ∂μ = ∫ a, g a ∂μ := by
310310
by_cases hG : CompleteSpace G
311-
· simp only [integral, hG, L1.integral]
311+
· simp only [integral_eq_setToFun]
312312
exact setToFun_congr_ae (dominatedFinMeasAdditive_weightedSMul μ) h
313313
· simp [integral, hG]
314314

@@ -324,7 +324,7 @@ lemma integral_congr_ae₂ {β : Type*} {_ : MeasurableSpace β} {ν : Measure
324324
theorem L1.integral_of_fun_eq_integral' {f : α → G} (hf : Integrable f μ) :
325325
∫ a, (AEEqFun.mk f hf.aestronglyMeasurable) a ∂μ = ∫ a, f a ∂μ := by
326326
by_cases hG : CompleteSpace G
327-
· simp only [MeasureTheory.integral, hG, L1.integral]
327+
· simp only [integral_eq_setToFun]
328328
exact setToFun_toL1 (dominatedFinMeasAdditive_weightedSMul μ) hf
329329
· simp [MeasureTheory.integral, hG]
330330

@@ -335,7 +335,7 @@ theorem L1.integral_of_fun_eq_integral {f : α → G} (hf : Integrable f μ) :
335335
@[continuity]
336336
theorem continuous_integral : Continuous fun f : α →₁[μ] G => ∫ a, f a ∂μ := by
337337
by_cases hG : CompleteSpace G
338-
· simp only [integral, hG, L1.integral]
338+
· simp only [integral_eq_setToFun]
339339
exact continuous_setToFun (dominatedFinMeasAdditive_weightedSMul μ)
340340
· simp [integral, hG, continuous_const]
341341

@@ -401,8 +401,9 @@ theorem tendsto_integral_of_L1 {ι} (f : α → G) (hfi : Integrable f μ) {F :
401401
(hF : Tendsto (fun i => ∫⁻ x, ‖F i x - f x‖ₑ ∂μ) l (𝓝 0)) :
402402
Tendsto (fun i => ∫ x, F i x ∂μ) l (𝓝 <| ∫ x, f x ∂μ) := by
403403
by_cases hG : CompleteSpace G
404-
· simp only [integral, hG, L1.integral]
405-
exact tendsto_setToFun_of_L1 (dominatedFinMeasAdditive_weightedSMul μ) f hfi hFi hF
404+
· simp only [integral_eq_setToFun]
405+
exact tendsto_setToFun_of_L1 (dominatedFinMeasAdditive_weightedSMul μ)
406+
f hfi.aestronglyMeasurable hFi hF
406407
· simp [integral, hG, tendsto_const_nhds]
407408

408409
/-- If `F i → f` in `L1`, then `∫ x, F i x ∂μ → ∫ x, f x ∂μ`. -/
@@ -443,7 +444,7 @@ theorem continuousWithinAt_of_dominated {F : X → α → G} {x₀ : X} {bound :
443444
(h_cont : ∀ᵐ a ∂μ, ContinuousWithinAt (fun x => F x a) s x₀) :
444445
ContinuousWithinAt (fun x => ∫ a, F x a ∂μ) s x₀ := by
445446
by_cases hG : CompleteSpace G
446-
· simp only [integral, hG, L1.integral]
447+
· simp only [integral_eq_setToFun]
447448
exact continuousWithinAt_setToFun_of_dominated (dominatedFinMeasAdditive_weightedSMul μ)
448449
hF_meas h_bound bound_integrable h_cont
449450
· simp [integral, hG, continuousWithinAt_const]
@@ -454,7 +455,7 @@ theorem continuousAt_of_dominated {F : X → α → G} {x₀ : X} {bound : α
454455
(h_cont : ∀ᵐ a ∂μ, ContinuousAt (fun x => F x a) x₀) :
455456
ContinuousAt (fun x => ∫ a, F x a ∂μ) x₀ := by
456457
by_cases hG : CompleteSpace G
457-
· simp only [integral, hG, L1.integral]
458+
· simp only [integral_eq_setToFun]
458459
exact continuousAt_setToFun_of_dominated (dominatedFinMeasAdditive_weightedSMul μ)
459460
hF_meas h_bound bound_integrable h_cont
460461
· simp [integral, hG, continuousAt_const]
@@ -465,7 +466,7 @@ theorem continuousOn_of_dominated {F : X → α → G} {bound : α → ℝ} {s :
465466
(h_cont : ∀ᵐ a ∂μ, ContinuousOn (fun x => F x a) s) :
466467
ContinuousOn (fun x => ∫ a, F x a ∂μ) s := by
467468
by_cases hG : CompleteSpace G
468-
· simp only [integral, hG, L1.integral]
469+
· simp only [integral_eq_setToFun]
469470
exact continuousOn_setToFun_of_dominated (dominatedFinMeasAdditive_weightedSMul μ)
470471
hF_meas h_bound bound_integrable h_cont
471472
· simp [integral, hG, continuousOn_const]
@@ -475,7 +476,7 @@ theorem continuous_of_dominated {F : X → α → G} {bound : α → ℝ}
475476
(bound_integrable : Integrable bound μ) (h_cont : ∀ᵐ a ∂μ, Continuous fun x => F x a) :
476477
Continuous fun x => ∫ a, F x a ∂μ := by
477478
by_cases hG : CompleteSpace G
478-
· simp only [integral, hG, L1.integral]
479+
· simp only [integral_eq_setToFun]
479480
exact continuous_setToFun_of_dominated (dominatedFinMeasAdditive_weightedSMul μ)
480481
hF_meas h_bound bound_integrable h_cont
481482
· simp [integral, hG, continuous_const]
@@ -560,7 +561,7 @@ theorem tendsto_integral_approxOn_of_measurable [MeasurableSpace E] [BorelSpace
560561
Tendsto (fun n => (SimpleFunc.approxOn f hfm s y₀ h₀ n).integral μ)
561562
atTop (𝓝 <| ∫ x, f x ∂μ) := by
562563
have hfi' := SimpleFunc.integrable_approxOn hfm hfi h₀ h₀i
563-
simp only [SimpleFunc.integral_eq_integral _ (hfi' _), integral, hE, L1.integral]
564+
simp only [SimpleFunc.integral_eq_integral _ (hfi' _), integral, L1.integral]
564565
exact tendsto_setToFun_approxOn_of_measurable (dominatedFinMeasAdditive_weightedSMul μ)
565566
hfi hfm hs h₀ h₀i
566567

@@ -971,7 +972,7 @@ theorem norm_integral_le_of_norm_le {f : α → G} {g : α → ℝ} (hg : Integr
971972
@[simp]
972973
theorem integral_const (c : E) : ∫ _ : α, c ∂μ = μ.real univ • c := by
973974
by_cases hμ : IsFiniteMeasure μ
974-
· simp only [integral, hE, L1.integral]
975+
· simp only [integral_eq_setToFun]
975976
exact setToFun_const (dominatedFinMeasAdditive_weightedSMul _) _
976977
by_cases hc : c = 0
977978
· simp [hc, integral_zero]
@@ -1013,7 +1014,7 @@ theorem integral_add_measure {f : α → G} (hμ : Integrable f μ) (hν : Integ
10131014
theorem integral_zero_measure {m : MeasurableSpace α} (f : α → G) :
10141015
(∫ x, f x ∂(0 : Measure α)) = 0 := by
10151016
by_cases hG : CompleteSpace G
1016-
· simp only [integral, hG, L1.integral]
1017+
· simp only [integral_eq_setToFun]
10171018
exact setToFun_measure_zero (dominatedFinMeasAdditive_weightedSMul _) rfl
10181019
· simp [integral, hG]
10191020

Mathlib/MeasureTheory/Integral/DominatedConvergence.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ theorem tendsto_integral_of_dominated_convergence {F : ℕ → α → G} {f : α
6161
(h_lim : ∀ᵐ a ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))) :
6262
Tendsto (fun n => ∫ a, F n a ∂μ) atTop (𝓝 <| ∫ a, f a ∂μ) := by
6363
by_cases hG : CompleteSpace G
64-
· simp only [integral, hG, L1.integral]
64+
· simp only [integral_eq_setToFun]
6565
exact tendsto_setToFun_of_dominated_convergence (dominatedFinMeasAdditive_weightedSMul μ)
6666
bound F_measurable bound_integrable h_bound h_lim
6767
· simp [integral, hG]
@@ -73,7 +73,7 @@ theorem tendsto_integral_filter_of_dominated_convergence {ι} {l : Filter ι} [l
7373
(h_lim : ∀ᵐ a ∂μ, Tendsto (fun n => F n a) l (𝓝 (f a))) :
7474
Tendsto (fun n => ∫ a, F n a ∂μ) l (𝓝 <| ∫ a, f a ∂μ) := by
7575
by_cases hG : CompleteSpace G
76-
· simp only [integral, hG, L1.integral]
76+
· simp only [integral_eq_setToFun]
7777
exact tendsto_setToFun_filter_of_dominated_convergence (dominatedFinMeasAdditive_weightedSMul μ)
7878
bound hF_meas h_bound bound_integrable h_lim
7979
· simp [integral, hG, tendsto_const_nhds]

0 commit comments

Comments
 (0)