Theorem: MeasureTheory.snorm_one_condexp_le_snorm
File: Mathlib/MeasureTheory/Function/ConditionalExpectation/Real.lean

tactic: by_cases hf : Integrable f μ
state_before: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ
state_after: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ

case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : ¬Integrable f μ
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ

tactic: swap
state_before: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ

case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : ¬Integrable f μ
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ
state_after: case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : ¬Integrable f μ
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ

case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ

tactic: by_cases hm : m ≤ m0
state_before: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ
state_after: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ

case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : ¬m ≤ m0
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ

tactic: swap
state_before: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ

case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : ¬m ≤ m0
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ
state_after: case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : ¬m ≤ m0
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ

case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ

tactic: by_cases hsig : SigmaFinite (μ.trim hm)
state_before: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ
state_after: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ

case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : ¬SigmaFinite (μ.trim hm)
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ

tactic: swap
state_before: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ

case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : ¬SigmaFinite (μ.trim hm)
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ
state_after: case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : ¬SigmaFinite (μ.trim hm)
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ

case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ

tactic: calc
  snorm (μ[f|m]) 1 μ ≤ snorm (μ[(|f|)|m]) 1 μ := by
    refine snorm_mono_ae ?_
    filter_upwards [condexp_mono hf hf.abs
      (ae_of_all μ (fun x => le_abs_self (f x) : ∀ x, f x ≤ |f x|)),
      EventuallyLE.trans (condexp_neg f).symm.le
        (condexp_mono hf.neg hf.abs
        (ae_of_all μ (fun x => neg_le_abs (f x): ∀ x, -f x ≤ |f x|)))] with x hx₁ hx₂
    exact abs_le_abs hx₁ hx₂
  _ = snorm f 1 μ := by
    rw [snorm_one_eq_lintegral_nnnorm, snorm_one_eq_lintegral_nnnorm, ←
      ENNReal.toReal_eq_toReal (ne_of_lt integrable_condexp.2) (ne_of_lt hf.2), ←
      integral_norm_eq_lintegral_nnnorm
        (stronglyMeasurable_condexp.mono hm).aestronglyMeasurable,
      ← integral_norm_eq_lintegral_nnnorm hf.1]
    simp_rw [Real.norm_eq_abs]
    rw (config := {occs := .pos [2]}) [← integral_condexp hm]
    refine integral_congr_ae ?_
    have : 0 ≤ᵐ[μ] μ[(|f|)|m] := by
      rw [← condexp_zero]
      exact condexp_mono (integrable_zero _ _ _) hf.abs
        (ae_of_all μ (fun x => abs_nonneg (f x) : ∀ x, 0 ≤ |f x|))
    filter_upwards [this] with x hx
    exact abs_eq_self.2 hx
state_before: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ
state_after: no goals

tactic: rw [condexp_undef hf, snorm_zero]
state_before: case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : ¬Integrable f μ
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ
state_after: case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : ¬Integrable f μ
⊢ 0 ≤ snorm f 1 μ

tactic: exact zero_le _
state_before: case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : ¬Integrable f μ
⊢ 0 ≤ snorm f 1 μ
state_after: no goals

tactic: rw [condexp_of_not_le hm, snorm_zero]
state_before: case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : ¬m ≤ m0
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ
state_after: case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : ¬m ≤ m0
⊢ 0 ≤ snorm f 1 μ

tactic: exact zero_le _
state_before: case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : ¬m ≤ m0
⊢ 0 ≤ snorm f 1 μ
state_after: no goals

tactic: rw [condexp_of_not_sigmaFinite hm hsig, snorm_zero]
state_before: case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : ¬SigmaFinite (μ.trim hm)
⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ
state_after: case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : ¬SigmaFinite (μ.trim hm)
⊢ 0 ≤ snorm f 1 μ

tactic: exact zero_le _
state_before: case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : ¬SigmaFinite (μ.trim hm)
⊢ 0 ≤ snorm f 1 μ
state_after: no goals

tactic: refine snorm_mono_ae ?_
state_before: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ snorm (μ[f|m]) 1 μ ≤ snorm (μ[|f||m]) 1 μ
state_after: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ ∀ᵐ (x : α) ∂μ, ‖(μ[f|m]) x‖ ≤ ‖(μ[|f||m]) x‖

tactic: filter_upwards [condexp_mono hf hf.abs
  (ae_of_all μ (fun x => le_abs_self (f x) : ∀ x, f x ≤ |f x|)),
  EventuallyLE.trans (condexp_neg f).symm.le
    (condexp_mono hf.neg hf.abs
    (ae_of_all μ (fun x => neg_le_abs (f x): ∀ x, -f x ≤ |f x|)))] with x hx₁ hx₂
state_before: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ ∀ᵐ (x : α) ∂μ, ‖(μ[f|m]) x‖ ≤ ‖(μ[|f||m]) x‖
state_after: case h
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
x : α
hx₁ : (μ[f|?m.6896]) x ≤ (μ[fun a => |f a||?m.6896]) x
hx₂ : (-μ[f|?m.6376]) x ≤ (μ[fun a => |f a||?m.6376]) x
⊢ ‖(μ[f|m]) x‖ ≤ ‖(μ[|f||m]) x‖

tactic: exact abs_le_abs hx₁ hx₂
state_before: case h
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
x : α
hx₁ : (μ[f|?m.6896]) x ≤ (μ[fun a => |f a||?m.6896]) x
hx₂ : (-μ[f|?m.6376]) x ≤ (μ[fun a => |f a||?m.6376]) x
⊢ ‖(μ[f|m]) x‖ ≤ ‖(μ[|f||m]) x‖
state_after: no goals

tactic: rw [snorm_one_eq_lintegral_nnnorm, snorm_one_eq_lintegral_nnnorm, ←
  ENNReal.toReal_eq_toReal (ne_of_lt integrable_condexp.2) (ne_of_lt hf.2), ←
  integral_norm_eq_lintegral_nnnorm
    (stronglyMeasurable_condexp.mono hm).aestronglyMeasurable,
  ← integral_norm_eq_lintegral_nnnorm hf.1]
state_before: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ snorm (μ[|f||m]) 1 μ = snorm f 1 μ
state_after: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ ∫ (x : α), ‖(μ[|f||m]) x‖ ∂μ = ∫ (x : α), ‖f x‖ ∂μ

tactic: simp_rw [Real.norm_eq_abs]
state_before: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ ∫ (x : α), ‖(μ[|f||m]) x‖ ∂μ = ∫ (x : α), ‖f x‖ ∂μ
state_after: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ ∫ (x : α), |(μ[|f||m]) x| ∂μ = ∫ (x : α), |f x| ∂μ

tactic: rw (config := {occs := .pos [2]}) [← integral_condexp hm]
state_before: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ ∫ (x : α), |(μ[|f||m]) x| ∂μ = ∫ (x : α), |f x| ∂μ
state_after: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ ∫ (x : α), |(μ[|f||m]) x| ∂μ = ∫ (x : α), (μ[fun x => |f x||m]) x ∂μ

tactic: refine integral_congr_ae ?_
state_before: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ ∫ (x : α), |(μ[|f||m]) x| ∂μ = ∫ (x : α), (μ[fun x => |f x||m]) x ∂μ
state_after: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ (fun x => |(μ[|f||m]) x|) =ᶠ[ae μ] μ[fun x => |f x||m]

tactic: have : 0 ≤ᵐ[μ] μ[(|f|)|m] := by
  rw [← condexp_zero]
  exact condexp_mono (integrable_zero _ _ _) hf.abs
    (ae_of_all μ (fun x => abs_nonneg (f x) : ∀ x, 0 ≤ |f x|))
state_before: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ (fun x => |(μ[|f||m]) x|) =ᶠ[ae μ] μ[fun x => |f x||m]
state_after: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
this : 0 ≤ᶠ[ae μ] μ[|f||m]
⊢ (fun x => |(μ[|f||m]) x|) =ᶠ[ae μ] μ[fun x => |f x||m]

tactic: filter_upwards [this] with x hx
state_before: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
this : 0 ≤ᶠ[ae μ] μ[|f||m]
⊢ (fun x => |(μ[|f||m]) x|) =ᶠ[ae μ] μ[fun x => |f x||m]
state_after: case h
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
this : 0 ≤ᶠ[ae μ] μ[|f||m]
x : α
hx : 0 x ≤ (μ[|f||m]) x
⊢ |(μ[|f||m]) x| = (μ[fun x => |f x||m]) x

tactic: exact abs_eq_self.2 hx
state_before: case h
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
this : 0 ≤ᶠ[ae μ] μ[|f||m]
x : α
hx : 0 x ≤ (μ[|f||m]) x
⊢ |(μ[|f||m]) x| = (μ[fun x => |f x||m]) x
state_after: no goals

tactic: rw [← condexp_zero]
state_before: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ 0 ≤ᶠ[ae μ] μ[|f||m]
state_after: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ ?m.11715[0|?m.11713] ≤ᶠ[ae μ] μ[|f||m]

α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ MeasurableSpace α

α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ MeasurableSpace α

α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ Measure α

tactic: exact condexp_mono (integrable_zero _ _ _) hf.abs
  (ae_of_all μ (fun x => abs_nonneg (f x) : ∀ x, 0 ≤ |f x|))
state_before: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ ?m.11715[0|?m.11713] ≤ᶠ[ae μ] μ[|f||m]

α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ MeasurableSpace α

α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ MeasurableSpace α

α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ
hf : Integrable f μ
hm : m ≤ m0
hsig : SigmaFinite (μ.trim hm)
⊢ Measure α
state_after: no goals