Theorem: MeasureTheory.integral_norm_le_of_forall_fin_meas_integral_eq
File: Mathlib/MeasureTheory/Function/ConditionalExpectation/Unique.lean

Proof steps:
state_before: α : Type u_1
E' : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝⁸ : RCLike 𝕜
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
inst✝⁵ : CompleteSpace E'
inst✝⁴ : NormedSpace ℝ E'
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
s : Set α
hm : m ≤ m0
f g : α → ℝ
hf : StronglyMeasurable f
hfi : IntegrableOn f s μ
hg : StronglyMeasurable g
hgi : IntegrableOn g s μ
hgf : ∀ (t : Set α), MeasurableSet t → μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ
hs : MeasurableSet s
hμs : μ s ≠ ⊤
⊢ ∫ (x : α) in s, ‖g x‖ ∂μ ≤ ∫ (x : α) in s, ‖f x‖ ∂μ
state_after: α : Type u_1
E' : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝⁸ : RCLike 𝕜
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
inst✝⁵ : CompleteSpace E'
inst✝⁴ : NormedSpace ℝ E'
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
s : Set α
hm : m ≤ m0
f g : α → ℝ
hf : StronglyMeasurable f
hfi : IntegrableOn f s μ
hg : StronglyMeasurable g
hgi : IntegrableOn g s μ
hgf : ∀ (t : Set α), MeasurableSet t → μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ
hs : MeasurableSet s
hμs : μ s ≠ ⊤
⊢ ∫ (x : α) in {x | 0 ≤ g x}, g x ∂μ.restrict s - ∫ (x : α) in {x | g x ≤ 0}, g x ∂μ.restrict s ≤
    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ.restrict s - ∫ (x : α) in {x | f x ≤ 0}, f x ∂μ.restrict s
tactic: rw [integral_norm_eq_pos_sub_neg hgi, integral_norm_eq_pos_sub_neg hfi]
state_before: α : Type u_1
E' : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝⁸ : RCLike 𝕜
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
inst✝⁵ : CompleteSpace E'
inst✝⁴ : NormedSpace ℝ E'
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
s : Set α
hm : m ≤ m0
f g : α → ℝ
hf : StronglyMeasurable f
hfi : IntegrableOn f s μ
hg : StronglyMeasurable g
hgi : IntegrableOn g s μ
hgf : ∀ (t : Set α), MeasurableSet t → μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ
hs : MeasurableSet s
hμs : μ s ≠ ⊤
⊢ ∫ (x : α) in {x | 0 ≤ g x}, g x ∂μ.restrict s - ∫ (x : α) in {x | g x ≤ 0}, g x ∂μ.restrict s ≤
    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ.restrict s - ∫ (x : α) in {x | f x ≤ 0}, f x ∂μ.restrict s
state_after: α : Type u_1
E' : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝⁸ : RCLike 𝕜
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
inst✝⁵ : CompleteSpace E'
inst✝⁴ : NormedSpace ℝ E'
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
s : Set α
hm : m ≤ m0
f g : α → ℝ
hf : StronglyMeasurable f
hfi : IntegrableOn f s μ
hg : StronglyMeasurable g
hgi : IntegrableOn g s μ
hgf : ∀ (t : Set α), MeasurableSet t → μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ
hs : MeasurableSet s
hμs : μ s ≠ ⊤
h_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}
⊢ ∫ (x : α) in {x | 0 ≤ g x}, g x ∂μ.restrict s - ∫ (x : α) in {x | g x ≤ 0}, g x ∂μ.restrict s ≤
    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ.restrict s - ∫ (x : α) in {x | f x ≤ 0}, f x ∂μ.restrict s
tactic: have h_meas_nonneg_g : MeasurableSet[m] {x | 0 ≤ g x} :=
    (@stronglyMeasurable_const _ _ m _ _).measurableSet_le hg
state_before: α : Type u_1
E' : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝⁸ : RCLike 𝕜
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
inst✝⁵ : CompleteSpace E'
inst✝⁴ : NormedSpace ℝ E'
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
s : Set α
hm : m ≤ m0
f g : α → ℝ
hf : StronglyMeasurable f
hfi : IntegrableOn f s μ
hg : StronglyMeasurable g
hgi : IntegrableOn g s μ
hgf : ∀ (t : Set α), MeasurableSet t → μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ
hs : MeasurableSet s
hμs : μ s ≠ ⊤
h_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}
⊢ ∫ (x : α) in {x | 0 ≤ g x}, g x ∂μ.restrict s - ∫ (x : α) in {x | g x ≤ 0}, g x ∂μ.restrict s ≤
    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ.restrict s - ∫ (x : α) in {x | f x ≤ 0}, f x ∂μ.restrict s
state_after: α : Type u_1
E' : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝⁸ : RCLike 𝕜
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
inst✝⁵ : CompleteSpace E'
inst✝⁴ : NormedSpace ℝ E'
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
s : Set α
hm : m ≤ m0
f g : α → ℝ
hf : StronglyMeasurable f
hfi : IntegrableOn f s μ
hg : StronglyMeasurable g
hgi : IntegrableOn g s μ
hgf : ∀ (t : Set α), MeasurableSet t → μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ
hs : MeasurableSet s
hμs : μ s ≠ ⊤
h_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}
h_meas_nonneg_f : MeasurableSet {x | 0 ≤ f x}
⊢ ∫ (x : α) in {x | 0 ≤ g x}, g x ∂μ.restrict s - ∫ (x : α) in {x | g x ≤ 0}, g x ∂μ.restrict s ≤
    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ.restrict s - ∫ (x : α) in {x | f x ≤ 0}, f x ∂μ.restrict s
tactic: have h_meas_nonneg_f : MeasurableSet {x | 0 ≤ f x} :=
    stronglyMeasurable_const.measurableSet_le hf
state_before: α : Type u_1
E' : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝⁸ : RCLike 𝕜
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
inst✝⁵ : CompleteSpace E'
inst✝⁴ : NormedSpace ℝ E'
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
s : Set α
hm : m ≤ m0
f g : α → ℝ
hf : StronglyMeasurable f
hfi : IntegrableOn f s μ
hg : StronglyMeasurable g
hgi : IntegrableOn g s μ
hgf : ∀ (t : Set α), MeasurableSet t → μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ
hs : MeasurableSet s
hμs : μ s ≠ ⊤
h_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}
h_meas_nonneg_f : MeasurableSet {x | 0 ≤ f x}
⊢ ∫ (x : α) in {x | 0 ≤ g x}, g x ∂μ.restrict s - ∫ (x : α) in {x | g x ≤ 0}, g x ∂μ.restrict s ≤
    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ.restrict s - ∫ (x : α) in {x | f x ≤ 0}, f x ∂μ.restrict s
state_after: α : Type u_1
E' : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝⁸ : RCLike 𝕜
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
inst✝⁵ : CompleteSpace E'
inst✝⁴ : NormedSpace ℝ E'
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
s : Set α
hm : m ≤ m0
f g : α → ℝ
hf : StronglyMeasurable f
hfi : IntegrableOn f s μ
hg : StronglyMeasurable g
hgi : IntegrableOn g s μ
hgf : ∀ (t : Set α), MeasurableSet t → μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ
hs : MeasurableSet s
hμs : μ s ≠ ⊤
h_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}
h_meas_nonneg_f : MeasurableSet {x | 0 ≤ f x}
h_meas_nonpos_g : MeasurableSet {x | g x ≤ 0}
⊢ ∫ (x : α) in {x | 0 ≤ g x}, g x ∂μ.restrict s - ∫ (x : α) in {x | g x ≤ 0}, g x ∂μ.restrict s ≤
    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ.restrict s - ∫ (x : α) in {x | f x ≤ 0}, f x ∂μ.restrict s
tactic: have h_meas_nonpos_g : MeasurableSet[m] {x | g x ≤ 0} :=
    hg.measurableSet_le (@stronglyMeasurable_const _ _ m _ _)
state_before: α : Type u_1
E' : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝⁸ : RCLike 𝕜
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
inst✝⁵ : CompleteSpace E'
inst✝⁴ : NormedSpace ℝ E'
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
s : Set α
hm : m ≤ m0
f g : α → ℝ
hf : StronglyMeasurable f
hfi : IntegrableOn f s μ
hg : StronglyMeasurable g
hgi : IntegrableOn g s μ
hgf : ∀ (t : Set α), MeasurableSet t → μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ
hs : MeasurableSet s
hμs : μ s ≠ ⊤
h_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}
h_meas_nonneg_f : MeasurableSet {x | 0 ≤ f x}
h_meas_nonpos_g : MeasurableSet {x | g x ≤ 0}
⊢ ∫ (x : α) in {x | 0 ≤ g x}, g x ∂μ.restrict s - ∫ (x : α) in {x | g x ≤ 0}, g x ∂μ.restrict s ≤
    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ.restrict s - ∫ (x : α) in {x | f x ≤ 0}, f x ∂μ.restrict s
state_after: α : Type u_1
E' : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝⁸ : RCLike 𝕜
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
inst✝⁵ : CompleteSpace E'
inst✝⁴ : NormedSpace ℝ E'
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
s : Set α
hm : m ≤ m0
f g : α → ℝ
hf : StronglyMeasurable f
hfi : IntegrableOn f s μ
hg : StronglyMeasurable g
hgi : IntegrableOn g s μ
hgf : ∀ (t : Set α), MeasurableSet t → μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ
hs : MeasurableSet s
hμs : μ s ≠ ⊤
h_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}
h_meas_nonneg_f : MeasurableSet {x | 0 ≤ f x}
h_meas_nonpos_g : MeasurableSet {x | g x ≤ 0}
h_meas_nonpos_f : MeasurableSet {x | f x ≤ 0}
⊢ ∫ (x : α) in {x | 0 ≤ g x}, g x ∂μ.restrict s - ∫ (x : α) in {x | g x ≤ 0}, g x ∂μ.restrict s ≤
    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ.restrict s - ∫ (x : α) in {x | f x ≤ 0}, f x ∂μ.restrict s
tactic: have h_meas_nonpos_f : MeasurableSet {x | f x ≤ 0} :=
    hf.measurableSet_le stronglyMeasurable_const
state_before: α : Type u_1
E' : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝⁸ : RCLike 𝕜
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
inst✝⁵ : CompleteSpace E'
inst✝⁴ : NormedSpace ℝ E'
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
s : Set α
hm : m ≤ m0
f g : α → ℝ
hf : StronglyMeasurable f
hfi : IntegrableOn f s μ
hg : StronglyMeasurable g
hgi : IntegrableOn g s μ
hgf : ∀ (t : Set α), MeasurableSet t → μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ
hs : MeasurableSet s
hμs : μ s ≠ ⊤
h_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}
h_meas_nonneg_f : MeasurableSet {x | 0 ≤ f x}
h_meas_nonpos_g : MeasurableSet {x | g x ≤ 0}
h_meas_nonpos_f : MeasurableSet {x | f x ≤ 0}
⊢ ∫ (x : α) in {x | 0 ≤ g x}, g x ∂μ.restrict s - ∫ (x : α) in {x | g x ≤ 0}, g x ∂μ.restrict s ≤
    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ.restrict s - ∫ (x : α) in {x | f x ≤ 0}, f x ∂μ.restrict s
state_after: case refine_1
α : Type u_1
E' : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝⁸ : RCLike 𝕜
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
inst✝⁵ : CompleteSpace E'
inst✝⁴ : NormedSpace ℝ E'
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
s : Set α
hm : m ≤ m0
f g : α → ℝ
hf : StronglyMeasurable f
hfi : IntegrableOn f s μ
hg : StronglyMeasurable g
hgi : IntegrableOn g s μ
hgf : ∀ (t : Set α), MeasurableSet t → μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ
hs : MeasurableSet s
hμs : μ s ≠ ⊤
h_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}
h_meas_nonneg_f : MeasurableSet {x | 0 ≤ f x}
h_meas_nonpos_g : MeasurableSet {x | g x ≤ 0}
h_meas_nonpos_f : MeasurableSet {x | f x ≤ 0}
⊢ ∫ (x : α) in {x | 0 ≤ g x}, g x ∂μ.restrict s ≤ ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ.restrict s

case refine_2
α : Type u_1
E' : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝⁸ : RCLike 𝕜
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
inst✝⁵ : CompleteSpace E'
inst✝⁴ : NormedSpace ℝ E'
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
s : Set α
hm : m ≤ m0
f g : α → ℝ
hf : StronglyMeasurable f
hfi : IntegrableOn f s μ
hg : StronglyMeasurable g
hgi : IntegrableOn g s μ
hgf : ∀ (t : Set α), MeasurableSet t → μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ
hs : MeasurableSet s
hμs : μ s ≠ ⊤
h_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}
h_meas_nonneg_f : MeasurableSet {x | 0 ≤ f x}
h_meas_nonpos_g : MeasurableSet {x | g x ≤ 0}
h_meas_nonpos_f : MeasurableSet {x | f x ≤ 0}
⊢ ∫ (x : α) in {x | f x ≤ 0}, f x ∂μ.restrict s ≤ ∫ (x : α) in {x | g x ≤ 0}, g x ∂μ.restrict s
tactic: refine sub_le_sub ?_ ?_