[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0
[PROOFSTEP]
by_cases hm : m ≤ m0
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : ¬m ≤ m0
⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0
[PROOFSTEP]
swap
[GOAL]
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : ¬m ≤ m0
⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0
[PROOFSTEP]
simp_rw [condexp_of_not_le hm]
[GOAL]
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : ¬m ≤ m0
⊢ 0 =ᵐ[Measure.restrict μ s] 0
[PROOFSTEP]
rfl
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0
[PROOFSTEP]
by_cases hμm : SigmaFinite (μ.trim hm)
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm : SigmaFinite (Measure.trim μ hm)
⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm : ¬SigmaFinite (Measure.trim μ hm)
⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0
[PROOFSTEP]
swap
[GOAL]
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm : ¬SigmaFinite (Measure.trim μ hm)
⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0
[PROOFSTEP]
simp_rw [condexp_of_not_sigmaFinite hm hμm]
[GOAL]
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm : ¬SigmaFinite (Measure.trim μ hm)
⊢ 0 =ᵐ[Measure.restrict μ s] 0
[PROOFSTEP]
rfl
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm : SigmaFinite (Measure.trim μ hm)
⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0
[PROOFSTEP]
haveI : SigmaFinite (μ.trim hm) := hμm
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm this : SigmaFinite (Measure.trim μ hm)
⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0
[PROOFSTEP]
have : SigmaFinite ((μ.restrict s).trim hm) :=
  by
  rw [← restrict_trim hm _ hs]
  exact Restrict.sigmaFinite _ s
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm this : SigmaFinite (Measure.trim μ hm)
⊢ SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
[PROOFSTEP]
rw [← restrict_trim hm _ hs]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm this : SigmaFinite (Measure.trim μ hm)
⊢ SigmaFinite (Measure.restrict (Measure.trim μ hm) s)
[PROOFSTEP]
exact Restrict.sigmaFinite _ s
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0
[PROOFSTEP]
by_cases hf_int : Integrable f μ
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
hf_int : Integrable f
⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
hf_int : ¬Integrable f
⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0
[PROOFSTEP]
swap
[GOAL]
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
hf_int : ¬Integrable f
⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0
[PROOFSTEP]
rw [condexp_undef hf_int]
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
hf_int : Integrable f
⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0
[PROOFSTEP]
refine' ae_eq_of_forall_set_integral_eq_of_sigmaFinite' hm _ _ _ _ _
[GOAL]
case pos.refine'_1
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
hf_int : Integrable f
⊢ ∀ (s_1 : Set α), MeasurableSet s_1 → ↑↑(Measure.restrict μ s) s_1 < ⊤ → IntegrableOn (μ[f|m]) s_1
[PROOFSTEP]
exact fun t _ _ => integrable_condexp.integrableOn.integrableOn
[GOAL]
case pos.refine'_2
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
hf_int : Integrable f
⊢ ∀ (s_1 : Set α), MeasurableSet s_1 → ↑↑(Measure.restrict μ s) s_1 < ⊤ → IntegrableOn 0 s_1
[PROOFSTEP]
exact fun t _ _ => (integrable_zero _ _ _).integrableOn
[GOAL]
case pos.refine'_3
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
hf_int : Integrable f
⊢ ∀ (s_1 : Set α),
    MeasurableSet s_1 →
      ↑↑(Measure.restrict μ s) s_1 < ⊤ →
        ∫ (x : α) in s_1, (μ[f|m]) x ∂Measure.restrict μ s = ∫ (x : α) in s_1, OfNat.ofNat 0 x ∂Measure.restrict μ s
[PROOFSTEP]
intro t ht _
[GOAL]
case pos.refine'_3
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
hf_int : Integrable f
t : Set α
ht : MeasurableSet t
a✝ : ↑↑(Measure.restrict μ s) t < ⊤
⊢ ∫ (x : α) in t, (μ[f|m]) x ∂Measure.restrict μ s = ∫ (x : α) in t, OfNat.ofNat 0 x ∂Measure.restrict μ s
[PROOFSTEP]
rw [Measure.restrict_restrict (hm _ ht), set_integral_condexp hm hf_int (ht.inter hs), ←
  Measure.restrict_restrict (hm _ ht)]
[GOAL]
case pos.refine'_3
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
hf_int : Integrable f
t : Set α
ht : MeasurableSet t
a✝ : ↑↑(Measure.restrict μ s) t < ⊤
⊢ ∫ (x : α) in t, f x ∂Measure.restrict μ s = ∫ (x : α) in t, OfNat.ofNat 0 x ∂Measure.restrict μ s
[PROOFSTEP]
refine' set_integral_congr_ae (hm _ ht) _
[GOAL]
case pos.refine'_3
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
hf_int : Integrable f
t : Set α
ht : MeasurableSet t
a✝ : ↑↑(Measure.restrict μ s) t < ⊤
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, x ∈ t → f x = OfNat.ofNat 0 x
[PROOFSTEP]
filter_upwards [hf] with x hx _ using hx
[GOAL]
case pos.refine'_4
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
hf_int : Integrable f
⊢ AEStronglyMeasurable' m (μ[f|m]) (Measure.restrict μ s)
[PROOFSTEP]
exact stronglyMeasurable_condexp.aeStronglyMeasurable'
[GOAL]
case pos.refine'_5
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ s] 0
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
hf_int : Integrable f
⊢ AEStronglyMeasurable' m 0 (Measure.restrict μ s)
[PROOFSTEP]
exact stronglyMeasurable_zero.aeStronglyMeasurable'
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ sᶜ] 0
⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])
[PROOFSTEP]
by_cases hm : m ≤ m0
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ sᶜ] 0
hm : m ≤ m0
⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ sᶜ] 0
hm : ¬m ≤ m0
⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])
[PROOFSTEP]
swap
[GOAL]
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ sᶜ] 0
hm : ¬m ≤ m0
⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])
[PROOFSTEP]
simp_rw [condexp_of_not_le hm, Set.indicator_zero']
[GOAL]
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ sᶜ] 0
hm : ¬m ≤ m0
⊢ 0 =ᵐ[μ] 0
[PROOFSTEP]
rfl
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ sᶜ] 0
hm : m ≤ m0
⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])
[PROOFSTEP]
have hsf_zero : ∀ g : α → E, g =ᵐ[μ.restrict sᶜ] 0 → s.indicator g =ᵐ[μ] g := fun g =>
  indicator_ae_eq_of_restrict_compl_ae_eq_zero (hm _ hs)
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ sᶜ] 0
hm : m ≤ m0
hsf_zero : ∀ (g : α → E), g =ᵐ[Measure.restrict μ sᶜ] 0 → Set.indicator s g =ᵐ[μ] g
⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])
[PROOFSTEP]
refine' ((hsf_zero (μ[f|m]) (condexp_ae_eq_restrict_zero hs.compl hf)).trans _).symm
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hs : MeasurableSet s
hf : f =ᵐ[Measure.restrict μ sᶜ] 0
hm : m ≤ m0
hsf_zero : ∀ (g : α → E), g =ᵐ[Measure.restrict μ sᶜ] 0 → Set.indicator s g =ᵐ[μ] g
⊢ μ[f|m] =ᵐ[μ] μ[Set.indicator s f|m]
[PROOFSTEP]
exact condexp_congr_ae (hsf_zero f hf).symm
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])
[PROOFSTEP]
by_cases hm : m ≤ m0
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : ¬m ≤ m0
⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])
[PROOFSTEP]
swap
[GOAL]
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : ¬m ≤ m0
⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])
[PROOFSTEP]
simp_rw [condexp_of_not_le hm, Set.indicator_zero']
[GOAL]
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : ¬m ≤ m0
⊢ 0 =ᵐ[μ] 0
[PROOFSTEP]
rfl
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])
[PROOFSTEP]
by_cases hμm : SigmaFinite (μ.trim hm)
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm : SigmaFinite (Measure.trim μ hm)
⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm : ¬SigmaFinite (Measure.trim μ hm)
⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])
[PROOFSTEP]
swap
[GOAL]
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm : ¬SigmaFinite (Measure.trim μ hm)
⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])
[PROOFSTEP]
simp_rw [condexp_of_not_sigmaFinite hm hμm, Set.indicator_zero']
[GOAL]
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm : ¬SigmaFinite (Measure.trim μ hm)
⊢ 0 =ᵐ[μ] 0
[PROOFSTEP]
rfl
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm : SigmaFinite (Measure.trim μ hm)
⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])
[PROOFSTEP]
haveI : SigmaFinite (μ.trim hm) := hμm
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this : SigmaFinite (Measure.trim μ hm)
⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])
[PROOFSTEP]
have : s.indicator (μ[f|m]) =ᵐ[μ] s.indicator (μ[s.indicator f + sᶜ.indicator f|m]) := by
  rw [Set.indicator_self_add_compl s f]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this : SigmaFinite (Measure.trim μ hm)
⊢ Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
[PROOFSTEP]
rw [Set.indicator_self_add_compl s f]
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])
[PROOFSTEP]
refine' (this.trans _).symm
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
⊢ Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m]) =ᵐ[μ] μ[Set.indicator s f|m]
[PROOFSTEP]
calc
  s.indicator (μ[s.indicator f + sᶜ.indicator f|m]) =ᵐ[μ] s.indicator (μ[s.indicator f|m] + μ[sᶜ.indicator f|m]) :=
    by
    have : μ[s.indicator f + sᶜ.indicator f|m] =ᵐ[μ] μ[s.indicator f|m] + μ[sᶜ.indicator f|m] :=
      condexp_add (hf_int.indicator (hm _ hs)) (hf_int.indicator (hm _ hs.compl))
    filter_upwards [this] with x hx
    classical rw [Set.indicator_apply, Set.indicator_apply, hx]
  _ = s.indicator (μ[s.indicator f|m]) + s.indicator (μ[sᶜ.indicator f|m]) := (s.indicator_add' _ _)
  _ =ᵐ[μ] s.indicator (μ[s.indicator f|m]) + s.indicator (sᶜ.indicator (μ[sᶜ.indicator f|m])) :=
    by
    refine' Filter.EventuallyEq.rfl.add _
    have : sᶜ.indicator (μ[sᶜ.indicator f|m]) =ᵐ[μ] μ[sᶜ.indicator f|m] :=
      by
      refine' (condexp_indicator_aux hs.compl _).symm.trans _
      · exact indicator_ae_eq_restrict_compl (hm _ hs.compl)
      · rw [Set.indicator_indicator, Set.inter_self]
    filter_upwards [this] with x hx
    by_cases hxs : x ∈ s
    · simp only [hx, hxs, Set.indicator_of_mem]
    · simp only [hxs, Set.indicator_of_not_mem, not_false_iff]
  _ =ᵐ[μ] s.indicator (μ[s.indicator f|m]) := by
    rw [Set.indicator_indicator, Set.inter_compl_self, Set.indicator_empty', add_zero]
  _ =ᵐ[μ] μ[s.indicator f|m] := by
    refine' (condexp_indicator_aux hs _).symm.trans _
    · exact indicator_ae_eq_restrict_compl (hm _ hs)
    · rw [Set.indicator_indicator, Set.inter_self]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
⊢ Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m]) =ᵐ[μ]
    Set.indicator s (μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m])
[PROOFSTEP]
have : μ[s.indicator f + sᶜ.indicator f|m] =ᵐ[μ] μ[s.indicator f|m] + μ[sᶜ.indicator f|m] :=
  condexp_add (hf_int.indicator (hm _ hs)) (hf_int.indicator (hm _ hs.compl))
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝¹ : SigmaFinite (Measure.trim μ hm)
this✝ : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
this : μ[Set.indicator s f + Set.indicator sᶜ f|m] =ᵐ[μ] μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m]
⊢ Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m]) =ᵐ[μ]
    Set.indicator s (μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m])
[PROOFSTEP]
filter_upwards [this] with x hx
[GOAL]
case h
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝¹ : SigmaFinite (Measure.trim μ hm)
this✝ : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
this : μ[Set.indicator s f + Set.indicator sᶜ f|m] =ᵐ[μ] μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m]
x : α
hx : (μ[Set.indicator s f + Set.indicator sᶜ f|m]) x = (μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m]) x
⊢ Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m]) x =
    Set.indicator s (μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m]) x
[PROOFSTEP]
classical rw [Set.indicator_apply, Set.indicator_apply, hx]
[GOAL]
case h
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝¹ : SigmaFinite (Measure.trim μ hm)
this✝ : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
this : μ[Set.indicator s f + Set.indicator sᶜ f|m] =ᵐ[μ] μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m]
x : α
hx : (μ[Set.indicator s f + Set.indicator sᶜ f|m]) x = (μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m]) x
⊢ Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m]) x =
    Set.indicator s (μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m]) x
[PROOFSTEP]
rw [Set.indicator_apply, Set.indicator_apply, hx]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
⊢ Set.indicator s (μ[Set.indicator s f|m]) + Set.indicator s (μ[Set.indicator sᶜ f|m]) =ᵐ[μ]
    Set.indicator s (μ[Set.indicator s f|m]) + Set.indicator s (Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]))
[PROOFSTEP]
refine' Filter.EventuallyEq.rfl.add _
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
⊢ (fun x => Set.indicator s (μ[Set.indicator sᶜ f|m]) x) =ᵐ[μ] fun x =>
    Set.indicator s (Set.indicator sᶜ (μ[Set.indicator sᶜ f|m])) x
[PROOFSTEP]
have : sᶜ.indicator (μ[sᶜ.indicator f|m]) =ᵐ[μ] μ[sᶜ.indicator f|m] :=
  by
  refine' (condexp_indicator_aux hs.compl _).symm.trans _
  · exact indicator_ae_eq_restrict_compl (hm _ hs.compl)
  · rw [Set.indicator_indicator, Set.inter_self]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
⊢ Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]) =ᵐ[μ] μ[Set.indicator sᶜ f|m]
[PROOFSTEP]
refine' (condexp_indicator_aux hs.compl _).symm.trans _
[GOAL]
case refine'_1
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
⊢ Set.indicator sᶜ f =ᵐ[Measure.restrict μ sᶜᶜ] 0
[PROOFSTEP]
exact indicator_ae_eq_restrict_compl (hm _ hs.compl)
[GOAL]
case refine'_2
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
⊢ μ[Set.indicator sᶜ (Set.indicator sᶜ f)|m] =ᵐ[μ] μ[Set.indicator sᶜ f|m]
[PROOFSTEP]
rw [Set.indicator_indicator, Set.inter_self]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝¹ : SigmaFinite (Measure.trim μ hm)
this✝ : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
this : Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]) =ᵐ[μ] μ[Set.indicator sᶜ f|m]
⊢ (fun x => Set.indicator s (μ[Set.indicator sᶜ f|m]) x) =ᵐ[μ] fun x =>
    Set.indicator s (Set.indicator sᶜ (μ[Set.indicator sᶜ f|m])) x
[PROOFSTEP]
filter_upwards [this] with x hx
[GOAL]
case h
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝¹ : SigmaFinite (Measure.trim μ hm)
this✝ : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
this : Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]) =ᵐ[μ] μ[Set.indicator sᶜ f|m]
x : α
hx : Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]) x = (μ[Set.indicator sᶜ f|m]) x
⊢ Set.indicator s (μ[Set.indicator sᶜ f|m]) x = Set.indicator s (Set.indicator sᶜ (μ[Set.indicator sᶜ f|m])) x
[PROOFSTEP]
by_cases hxs : x ∈ s
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝¹ : SigmaFinite (Measure.trim μ hm)
this✝ : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
this : Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]) =ᵐ[μ] μ[Set.indicator sᶜ f|m]
x : α
hx : Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]) x = (μ[Set.indicator sᶜ f|m]) x
hxs : x ∈ s
⊢ Set.indicator s (μ[Set.indicator sᶜ f|m]) x = Set.indicator s (Set.indicator sᶜ (μ[Set.indicator sᶜ f|m])) x
[PROOFSTEP]
simp only [hx, hxs, Set.indicator_of_mem]
[GOAL]
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝¹ : SigmaFinite (Measure.trim μ hm)
this✝ : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
this : Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]) =ᵐ[μ] μ[Set.indicator sᶜ f|m]
x : α
hx : Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]) x = (μ[Set.indicator sᶜ f|m]) x
hxs : ¬x ∈ s
⊢ Set.indicator s (μ[Set.indicator sᶜ f|m]) x = Set.indicator s (Set.indicator sᶜ (μ[Set.indicator sᶜ f|m])) x
[PROOFSTEP]
simp only [hxs, Set.indicator_of_not_mem, not_false_iff]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
⊢ Set.indicator s (μ[Set.indicator s f|m]) + Set.indicator s (Set.indicator sᶜ (μ[Set.indicator sᶜ f|m])) =ᵐ[μ]
    Set.indicator s (μ[Set.indicator s f|m])
[PROOFSTEP]
rw [Set.indicator_indicator, Set.inter_compl_self, Set.indicator_empty', add_zero]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
⊢ Set.indicator s (μ[Set.indicator s f|m]) =ᵐ[μ] μ[Set.indicator s f|m]
[PROOFSTEP]
refine' (condexp_indicator_aux hs _).symm.trans _
[GOAL]
case refine'_1
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
⊢ Set.indicator s f =ᵐ[Measure.restrict μ sᶜ] 0
[PROOFSTEP]
exact indicator_ae_eq_restrict_compl (hm _ hs)
[GOAL]
case refine'_2
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hf_int : Integrable f
hs : MeasurableSet s
hm : m ≤ m0
hμm this✝ : SigmaFinite (Measure.trim μ hm)
this : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])
⊢ μ[Set.indicator s (Set.indicator s f)|m] =ᵐ[μ] μ[Set.indicator s f|m]
[PROOFSTEP]
rw [Set.indicator_indicator, Set.inter_self]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
⊢ Measure.restrict μ s[f|m] =ᵐ[Measure.restrict μ s] μ[f|m]
[PROOFSTEP]
have : SigmaFinite ((μ.restrict s).trim hm) := by rw [← restrict_trim hm _ hs_m]; infer_instance
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
⊢ SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
[PROOFSTEP]
rw [← restrict_trim hm _ hs_m]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
⊢ SigmaFinite (Measure.restrict (Measure.trim μ hm) s)
[PROOFSTEP]
infer_instance
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
⊢ Measure.restrict μ s[f|m] =ᵐ[Measure.restrict μ s] μ[f|m]
[PROOFSTEP]
rw [ae_eq_restrict_iff_indicator_ae_eq (hm _ hs_m)]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
⊢ Set.indicator s (Measure.restrict μ s[f|m]) =ᵐ[μ] Set.indicator s (μ[f|m])
[PROOFSTEP]
refine' EventuallyEq.trans _ (condexp_indicator hf_int hs_m)
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
⊢ Set.indicator s (Measure.restrict μ s[f|m]) =ᵐ[μ] μ[Set.indicator s f|m]
[PROOFSTEP]
refine' ae_eq_condexp_of_forall_set_integral_eq hm (hf_int.indicator (hm _ hs_m)) _ _ _
[GOAL]
case refine'_1
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
⊢ ∀ (s_1 : Set α), MeasurableSet s_1 → ↑↑μ s_1 < ⊤ → IntegrableOn (Set.indicator s (Measure.restrict μ s[f|m])) s_1
[PROOFSTEP]
intro t ht _
[GOAL]
case refine'_1
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
⊢ IntegrableOn (Set.indicator s (Measure.restrict μ s[f|m])) t
[PROOFSTEP]
rw [← integrable_indicator_iff (hm _ ht), Set.indicator_indicator, Set.inter_comm, ← Set.indicator_indicator]
[GOAL]
case refine'_1
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
⊢ Integrable (Set.indicator s (Set.indicator t (Measure.restrict μ s[f|m])))
[PROOFSTEP]
suffices h_int_restrict : Integrable (t.indicator ((μ.restrict s)[f|m])) (μ.restrict s)
[GOAL]
case refine'_1
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
h_int_restrict : Integrable (Set.indicator t (Measure.restrict μ s[f|m]))
⊢ Integrable (Set.indicator s (Set.indicator t (Measure.restrict μ s[f|m])))
[PROOFSTEP]
rw [integrable_indicator_iff (hm _ hs_m), IntegrableOn]
[GOAL]
case refine'_1
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
h_int_restrict : Integrable (Set.indicator t (Measure.restrict μ s[f|m]))
⊢ Integrable (Set.indicator t (Measure.restrict μ s[f|m]))
[PROOFSTEP]
rw [integrable_indicator_iff (hm _ ht), IntegrableOn] at h_int_restrict ⊢
[GOAL]
case refine'_1
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
h_int_restrict : Integrable (Measure.restrict μ s[f|m])
⊢ Integrable (Measure.restrict μ s[f|m])
[PROOFSTEP]
exact h_int_restrict
[GOAL]
case h_int_restrict
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
⊢ Integrable (Set.indicator t (Measure.restrict μ s[f|m]))
[PROOFSTEP]
exact integrable_condexp.indicator (hm _ ht)
[GOAL]
case refine'_2
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
⊢ ∀ (s_1 : Set α),
    MeasurableSet s_1 →
      ↑↑μ s_1 < ⊤ →
        ∫ (x : α) in s_1, Set.indicator s (Measure.restrict μ s[f|m]) x ∂μ = ∫ (x : α) in s_1, Set.indicator s f x ∂μ
[PROOFSTEP]
intro t ht _
[GOAL]
case refine'_2
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
⊢ ∫ (x : α) in t, Set.indicator s (Measure.restrict μ s[f|m]) x ∂μ = ∫ (x : α) in t, Set.indicator s f x ∂μ
[PROOFSTEP]
calc
  ∫ x in t, s.indicator ((μ.restrict s)[f|m]) x ∂μ = ∫ x in t, ((μ.restrict s)[f|m]) x ∂μ.restrict s := by
    rw [integral_indicator (hm _ hs_m), Measure.restrict_restrict (hm _ hs_m), Measure.restrict_restrict (hm _ ht),
      Set.inter_comm]
  _ = ∫ x in t, f x ∂μ.restrict s := (set_integral_condexp hm hf_int.integrableOn ht)
  _ = ∫ x in t, s.indicator f x ∂μ := by
    rw [integral_indicator (hm _ hs_m), Measure.restrict_restrict (hm _ hs_m), Measure.restrict_restrict (hm _ ht),
      Set.inter_comm]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
⊢ ∫ (x : α) in t, Set.indicator s (Measure.restrict μ s[f|m]) x ∂μ =
    ∫ (x : α) in t, (Measure.restrict μ s[f|m]) x ∂Measure.restrict μ s
[PROOFSTEP]
rw [integral_indicator (hm _ hs_m), Measure.restrict_restrict (hm _ hs_m), Measure.restrict_restrict (hm _ ht),
  Set.inter_comm]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
⊢ ∫ (x : α) in t, f x ∂Measure.restrict μ s = ∫ (x : α) in t, Set.indicator s f x ∂μ
[PROOFSTEP]
rw [integral_indicator (hm _ hs_m), Measure.restrict_restrict (hm _ hs_m), Measure.restrict_restrict (hm _ ht),
  Set.inter_comm]
[GOAL]
case refine'_3
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m m0 : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure α
f : α → E
s : Set α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
hs_m : MeasurableSet s
hf_int : Integrable f
this : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)
⊢ AEStronglyMeasurable' m (Set.indicator s (Measure.restrict μ s[f|m])) μ
[PROOFSTEP]
exact (stronglyMeasurable_condexp.indicator hs_m).aeStronglyMeasurable'
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
⊢ μ[f|m] =ᵐ[Measure.restrict μ s] μ[f|m₂]
[PROOFSTEP]
rw [ae_eq_restrict_iff_indicator_ae_eq (hm _ hs_m)]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
⊢ Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[f|m₂])
[PROOFSTEP]
have hs_m₂ : MeasurableSet[m₂] s := by rwa [← Set.inter_univ s, ← hs Set.univ, Set.inter_univ]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
⊢ MeasurableSet s
[PROOFSTEP]
rwa [← Set.inter_univ s, ← hs Set.univ, Set.inter_univ]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
⊢ Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[f|m₂])
[PROOFSTEP]
by_cases hf_int : Integrable f μ
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
⊢ Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[f|m₂])
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : ¬Integrable f
⊢ Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[f|m₂])
[PROOFSTEP]
swap
[GOAL]
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : ¬Integrable f
⊢ Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[f|m₂])
[PROOFSTEP]
simp_rw [condexp_undef hf_int]
[GOAL]
case neg
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : ¬Integrable f
⊢ Set.indicator s 0 =ᵐ[μ] Set.indicator s 0
[PROOFSTEP]
rfl
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
⊢ Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[f|m₂])
[PROOFSTEP]
refine' ((condexp_indicator hf_int hs_m).symm.trans _).trans (condexp_indicator hf_int hs_m₂)
[GOAL]
case pos
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
⊢ μ[Set.indicator s f|m] =ᵐ[μ] μ[Set.indicator s f|m₂]
[PROOFSTEP]
refine'
  ae_eq_of_forall_set_integral_eq_of_sigmaFinite' hm₂ (fun s _ _ => integrable_condexp.integrableOn)
    (fun s _ _ => integrable_condexp.integrableOn) _ _ stronglyMeasurable_condexp.aeStronglyMeasurable'
[GOAL]
case pos.refine'_1
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
⊢ ∀ (s_1 : Set α),
    MeasurableSet s_1 →
      ↑↑μ s_1 < ⊤ → ∫ (x : α) in s_1, (μ[Set.indicator s f|m]) x ∂μ = ∫ (x : α) in s_1, (μ[Set.indicator s f|m₂]) x ∂μ
case pos.refine'_2
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
⊢ AEStronglyMeasurable' m₂ (μ[Set.indicator s f|m]) μ
[PROOFSTEP]
swap
[GOAL]
case pos.refine'_2
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
⊢ AEStronglyMeasurable' m₂ (μ[Set.indicator s f|m]) μ
[PROOFSTEP]
have : StronglyMeasurable[m] (μ[s.indicator f|m]) := stronglyMeasurable_condexp
[GOAL]
case pos.refine'_2
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
this : StronglyMeasurable (μ[Set.indicator s f|m])
⊢ AEStronglyMeasurable' m₂ (μ[Set.indicator s f|m]) μ
[PROOFSTEP]
refine' this.aeStronglyMeasurable'.aeStronglyMeasurable'_of_measurableSpace_le_on hm hs_m (fun t => (hs t).mp) _
[GOAL]
case pos.refine'_2
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
this : StronglyMeasurable (μ[Set.indicator s f|m])
⊢ μ[Set.indicator s f|m] =ᵐ[Measure.restrict μ sᶜ] 0
[PROOFSTEP]
exact condexp_ae_eq_restrict_zero hs_m.compl (indicator_ae_eq_restrict_compl (hm _ hs_m))
[GOAL]
case pos.refine'_1
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
⊢ ∀ (s_1 : Set α),
    MeasurableSet s_1 →
      ↑↑μ s_1 < ⊤ → ∫ (x : α) in s_1, (μ[Set.indicator s f|m]) x ∂μ = ∫ (x : α) in s_1, (μ[Set.indicator s f|m₂]) x ∂μ
[PROOFSTEP]
intro t ht _
[GOAL]
case pos.refine'_1
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
⊢ ∫ (x : α) in t, (μ[Set.indicator s f|m]) x ∂μ = ∫ (x : α) in t, (μ[Set.indicator s f|m₂]) x ∂μ
[PROOFSTEP]
have : ∫ x in t, (μ[s.indicator f|m]) x ∂μ = ∫ x in s ∩ t, (μ[s.indicator f|m]) x ∂μ :=
  by
  rw [← integral_add_compl (hm _ hs_m) integrable_condexp.integrableOn]
  suffices ∫ x in sᶜ, (μ[s.indicator f|m]) x ∂μ.restrict t = 0 by
    rw [this, add_zero, Measure.restrict_restrict (hm _ hs_m)]
  rw [Measure.restrict_restrict (MeasurableSet.compl (hm _ hs_m))]
  suffices μ[s.indicator f|m] =ᵐ[μ.restrict sᶜ] 0
    by
    rw [Set.inter_comm, ← Measure.restrict_restrict (hm₂ _ ht)]
    calc
      ∫ x : α in t, (μ[s.indicator f|m]) x ∂μ.restrict sᶜ = ∫ x : α in t, 0 ∂μ.restrict sᶜ :=
        by
        refine' set_integral_congr_ae (hm₂ _ ht) _
        filter_upwards [this] with x hx _ using hx
      _ = 0 := integral_zero _ _
  refine' condexp_ae_eq_restrict_zero hs_m.compl _
  exact indicator_ae_eq_restrict_compl (hm _ hs_m)
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
⊢ ∫ (x : α) in t, (μ[Set.indicator s f|m]) x ∂μ = ∫ (x : α) in s ∩ t, (μ[Set.indicator s f|m]) x ∂μ
[PROOFSTEP]
rw [← integral_add_compl (hm _ hs_m) integrable_condexp.integrableOn]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
⊢ ∫ (x : α) in s, (μ[Set.indicator s f|m]) x ∂Measure.restrict μ t +
      ∫ (x : α) in sᶜ, (μ[Set.indicator s f|m]) x ∂Measure.restrict μ t =
    ∫ (x : α) in s ∩ t, (μ[Set.indicator s f|m]) x ∂μ
[PROOFSTEP]
suffices ∫ x in sᶜ, (μ[s.indicator f|m]) x ∂μ.restrict t = 0 by
  rw [this, add_zero, Measure.restrict_restrict (hm _ hs_m)]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
this : ∫ (x : α) in sᶜ, (μ[Set.indicator s f|m]) x ∂Measure.restrict μ t = 0
⊢ ∫ (x : α) in s, (μ[Set.indicator s f|m]) x ∂Measure.restrict μ t +
      ∫ (x : α) in sᶜ, (μ[Set.indicator s f|m]) x ∂Measure.restrict μ t =
    ∫ (x : α) in s ∩ t, (μ[Set.indicator s f|m]) x ∂μ
[PROOFSTEP]
rw [this, add_zero, Measure.restrict_restrict (hm _ hs_m)]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
⊢ ∫ (x : α) in sᶜ, (μ[Set.indicator s f|m]) x ∂Measure.restrict μ t = 0
[PROOFSTEP]
rw [Measure.restrict_restrict (MeasurableSet.compl (hm _ hs_m))]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
⊢ ∫ (x : α) in sᶜ ∩ t, (μ[Set.indicator s f|m]) x ∂μ = 0
[PROOFSTEP]
suffices μ[s.indicator f|m] =ᵐ[μ.restrict sᶜ] 0
  by
  rw [Set.inter_comm, ← Measure.restrict_restrict (hm₂ _ ht)]
  calc
    ∫ x : α in t, (μ[s.indicator f|m]) x ∂μ.restrict sᶜ = ∫ x : α in t, 0 ∂μ.restrict sᶜ :=
      by
      refine' set_integral_congr_ae (hm₂ _ ht) _
      filter_upwards [this] with x hx _ using hx
    _ = 0 := integral_zero _ _
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
this : μ[Set.indicator s f|m] =ᵐ[Measure.restrict μ sᶜ] 0
⊢ ∫ (x : α) in sᶜ ∩ t, (μ[Set.indicator s f|m]) x ∂μ = 0
[PROOFSTEP]
rw [Set.inter_comm, ← Measure.restrict_restrict (hm₂ _ ht)]
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
this : μ[Set.indicator s f|m] =ᵐ[Measure.restrict μ sᶜ] 0
⊢ ∫ (x : α) in t, (μ[Set.indicator s f|m]) x ∂Measure.restrict μ sᶜ = 0
[PROOFSTEP]
calc
  ∫ x : α in t, (μ[s.indicator f|m]) x ∂μ.restrict sᶜ = ∫ x : α in t, 0 ∂μ.restrict sᶜ :=
    by
    refine' set_integral_congr_ae (hm₂ _ ht) _
    filter_upwards [this] with x hx _ using hx
  _ = 0 := integral_zero _ _
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
this : μ[Set.indicator s f|m] =ᵐ[Measure.restrict μ sᶜ] 0
⊢ ∫ (x : α) in t, (μ[Set.indicator s f|m]) x ∂Measure.restrict μ sᶜ = ∫ (x : α) in t, 0 ∂Measure.restrict μ sᶜ
[PROOFSTEP]
refine' set_integral_congr_ae (hm₂ _ ht) _
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
this : μ[Set.indicator s f|m] =ᵐ[Measure.restrict μ sᶜ] 0
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ sᶜ, x ∈ t → (μ[Set.indicator s f|m]) x = 0
[PROOFSTEP]
filter_upwards [this] with x hx _ using hx
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
⊢ μ[Set.indicator s f|m] =ᵐ[Measure.restrict μ sᶜ] 0
[PROOFSTEP]
refine' condexp_ae_eq_restrict_zero hs_m.compl _
[GOAL]
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
⊢ Set.indicator s f =ᵐ[Measure.restrict μ sᶜ] 0
[PROOFSTEP]
exact indicator_ae_eq_restrict_compl (hm _ hs_m)
[GOAL]
case pos.refine'_1
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
this : ∫ (x : α) in t, (μ[Set.indicator s f|m]) x ∂μ = ∫ (x : α) in s ∩ t, (μ[Set.indicator s f|m]) x ∂μ
⊢ ∫ (x : α) in t, (μ[Set.indicator s f|m]) x ∂μ = ∫ (x : α) in t, (μ[Set.indicator s f|m₂]) x ∂μ
[PROOFSTEP]
have hst_m : MeasurableSet[m] (s ∩ t) := (hs _).mpr (hs_m₂.inter ht)
[GOAL]
case pos.refine'_1
α : Type u_1
𝕜 : Type u_2
E : Type u_3
m✝ m0✝ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
μ✝ : Measure α
f : α → E
s : Set α
m m₂ m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hm₂ : m₂ ≤ m0
inst✝¹ : SigmaFinite (Measure.trim μ hm)
inst✝ : SigmaFinite (Measure.trim μ hm₂)
hs_m : MeasurableSet s
hs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)
hs_m₂ : MeasurableSet s
hf_int : Integrable f
t : Set α
ht : MeasurableSet t
a✝ : ↑↑μ t < ⊤
this : ∫ (x : α) in t, (μ[Set.indicator s f|m]) x ∂μ = ∫ (x : α) in s ∩ t, (μ[Set.indicator s f|m]) x ∂μ
hst_m : MeasurableSet (s ∩ t)
⊢ ∫ (x : α) in t, (μ[Set.indicator s f|m]) x ∂μ = ∫ (x : α) in t, (μ[Set.indicator s f|m₂]) x ∂μ
[PROOFSTEP]
simp_rw [this, set_integral_condexp hm₂ (hf_int.indicator (hm _ hs_m)) ht,
  set_integral_condexp hm (hf_int.indicator (hm _ hs_m)) hst_m, integral_indicator (hm _ hs_m),
  Measure.restrict_restrict (hm _ hs_m), ← Set.inter_assoc, Set.inter_self]


[GOAL]
p n k : ℕ
⊢ ↑(factorization (choose n k)) p ≤ log p n
[PROOFSTEP]
by_cases h : (choose n k).factorization p = 0
[GOAL]
case pos
p n k : ℕ
h : ↑(factorization (choose n k)) p = 0
⊢ ↑(factorization (choose n k)) p ≤ log p n
[PROOFSTEP]
simp [h]
[GOAL]
case neg
p n k : ℕ
h : ¬↑(factorization (choose n k)) p = 0
⊢ ↑(factorization (choose n k)) p ≤ log p n
[PROOFSTEP]
have hp : p.Prime := Not.imp_symm (choose n k).factorization_eq_zero_of_non_prime h
[GOAL]
case neg
p n k : ℕ
h : ¬↑(factorization (choose n k)) p = 0
hp : Prime p
⊢ ↑(factorization (choose n k)) p ≤ log p n
[PROOFSTEP]
have hkn : k ≤ n := by
  refine' le_of_not_lt fun hnk => h _
  simp [choose_eq_zero_of_lt hnk]
[GOAL]
p n k : ℕ
h : ¬↑(factorization (choose n k)) p = 0
hp : Prime p
⊢ k ≤ n
[PROOFSTEP]
refine' le_of_not_lt fun hnk => h _
[GOAL]
p n k : ℕ
h : ¬↑(factorization (choose n k)) p = 0
hp : Prime p
hnk : n < k
⊢ ↑(factorization (choose n k)) p = 0
[PROOFSTEP]
simp [choose_eq_zero_of_lt hnk]
[GOAL]
case neg
p n k : ℕ
h : ¬↑(factorization (choose n k)) p = 0
hp : Prime p
hkn : k ≤ n
⊢ ↑(factorization (choose n k)) p ≤ log p n
[PROOFSTEP]
rw [factorization_def _ hp, @padicValNat_def _ ⟨hp⟩ _ (choose_pos hkn)]
[GOAL]
case neg
p n k : ℕ
h : ¬↑(factorization (choose n k)) p = 0
hp : Prime p
hkn : k ≤ n
⊢ Part.get (multiplicity p (choose n k)) (_ : multiplicity.Finite p (choose n k)) ≤ log p n
[PROOFSTEP]
simp only [hp.multiplicity_choose hkn (lt_add_one _), PartENat.get_natCast]
[GOAL]
case neg
p n k : ℕ
h : ¬↑(factorization (choose n k)) p = 0
hp : Prime p
hkn : k ≤ n
⊢ Finset.card (Finset.filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Finset.Ico 1 (log p n + 1))) ≤ log p n
[PROOFSTEP]
refine (Finset.card_filter_le _ _).trans (le_of_eq (Nat.card_Ico _ _))
[GOAL]
p n k : ℕ
p_large : n < p ^ 2
⊢ ↑(factorization (choose n k)) p ≤ 1
[PROOFSTEP]
apply factorization_choose_le_log.trans
[GOAL]
p n k : ℕ
p_large : n < p ^ 2
⊢ log p n ≤ 1
[PROOFSTEP]
rcases eq_or_ne n 0 with (rfl | hn0)
[GOAL]
case inl
p k : ℕ
p_large : 0 < p ^ 2
⊢ log p 0 ≤ 1
[PROOFSTEP]
simp
[GOAL]
case inr
p n k : ℕ
p_large : n < p ^ 2
hn0 : n ≠ 0
⊢ log p n ≤ 1
[PROOFSTEP]
exact lt_succ_iff.1 (log_lt_of_lt_pow hn0 p_large)
[GOAL]
p n k : ℕ
hp' : p ≠ 2
hk : p ≤ k
hk' : p ≤ n - k
hn : n < 3 * p
⊢ ↑(factorization (choose n k)) p = 0
[PROOFSTEP]
cases' em' p.Prime with hp hp
[GOAL]
case inl
p n k : ℕ
hp' : p ≠ 2
hk : p ≤ k
hk' : p ≤ n - k
hn : n < 3 * p
hp : ¬Prime p
⊢ ↑(factorization (choose n k)) p = 0
[PROOFSTEP]
exact factorization_eq_zero_of_non_prime (choose n k) hp
[GOAL]
case inr
p n k : ℕ
hp' : p ≠ 2
hk : p ≤ k
hk' : p ≤ n - k
hn : n < 3 * p
hp : Prime p
⊢ ↑(factorization (choose n k)) p = 0
[PROOFSTEP]
cases' lt_or_le n k with hnk hkn
[GOAL]
case inr.inl
p n k : ℕ
hp' : p ≠ 2
hk : p ≤ k
hk' : p ≤ n - k
hn : n < 3 * p
hp : Prime p
hnk : n < k
⊢ ↑(factorization (choose n k)) p = 0
[PROOFSTEP]
simp [choose_eq_zero_of_lt hnk]
[GOAL]
case inr.inr
p n k : ℕ
hp' : p ≠ 2
hk : p ≤ k
hk' : p ≤ n - k
hn : n < 3 * p
hp : Prime p
hkn : k ≤ n
⊢ ↑(factorization (choose n k)) p = 0
[PROOFSTEP]
rw [factorization_def _ hp, @padicValNat_def _ ⟨hp⟩ _ (choose_pos hkn)]
[GOAL]
case inr.inr
p n k : ℕ
hp' : p ≠ 2
hk : p ≤ k
hk' : p ≤ n - k
hn : n < 3 * p
hp : Prime p
hkn : k ≤ n
⊢ Part.get (multiplicity p (choose n k)) (_ : multiplicity.Finite p (choose n k)) = 0
[PROOFSTEP]
simp only [hp.multiplicity_choose hkn (lt_add_one _), PartENat.get_natCast, Finset.card_eq_zero,
  Finset.filter_eq_empty_iff, not_le]
[GOAL]
case inr.inr
p n k : ℕ
hp' : p ≠ 2
hk : p ≤ k
hk' : p ≤ n - k
hn : n < 3 * p
hp : Prime p
hkn : k ≤ n
⊢ ∀ (x : ℕ), x ∈ Finset.Ico 1 (log p n + 1) → k % p ^ x + (n - k) % p ^ x < p ^ x
[PROOFSTEP]
intro i hi
[GOAL]
case inr.inr
p n k : ℕ
hp' : p ≠ 2
hk : p ≤ k
hk' : p ≤ n - k
hn : n < 3 * p
hp : Prime p
hkn : k ≤ n
i : ℕ
hi : i ∈ Finset.Ico 1 (log p n + 1)
⊢ k % p ^ i + (n - k) % p ^ i < p ^ i
[PROOFSTEP]
rcases eq_or_lt_of_le (Finset.mem_Ico.mp hi).1 with (rfl | hi)
[GOAL]
case inr.inr.inl
p n k : ℕ
hp' : p ≠ 2
hk : p ≤ k
hk' : p ≤ n - k
hn : n < 3 * p
hp : Prime p
hkn : k ≤ n
hi : 1 ∈ Finset.Ico 1 (log p n + 1)
⊢ k % p ^ 1 + (n - k) % p ^ 1 < p ^ 1
[PROOFSTEP]
rw [pow_one, ← add_lt_add_iff_left (2 * p), ← succ_mul, two_mul, add_add_add_comm]
[GOAL]
case inr.inr.inl
p n k : ℕ
hp' : p ≠ 2
hk : p ≤ k
hk' : p ≤ n - k
hn : n < 3 * p
hp : Prime p
hkn : k ≤ n
hi : 1 ∈ Finset.Ico 1 (log p n + 1)
⊢ p + k % p + (p + (n - k) % p) < succ 2 * p
[PROOFSTEP]
exact
  lt_of_le_of_lt
    (add_le_add (add_le_add_right (le_mul_of_one_le_right' ((one_le_div_iff hp.pos).mpr hk)) (k % p))
      (add_le_add_right (le_mul_of_one_le_right' ((one_le_div_iff hp.pos).mpr hk')) ((n - k) % p)))
    (by rwa [div_add_mod, div_add_mod, add_tsub_cancel_of_le hkn])
[GOAL]
p n k : ℕ
hp' : p ≠ 2
hk : p ≤ k
hk' : p ≤ n - k
hn : n < 3 * p
hp : Prime p
hkn : k ≤ n
hi : 1 ∈ Finset.Ico 1 (log p n + 1)
⊢ p * (k / p) + k % p + (p * ((n - k) / p) + (n - k) % p) < succ 2 * p
[PROOFSTEP]
rwa [div_add_mod, div_add_mod, add_tsub_cancel_of_le hkn]
[GOAL]
case inr.inr.inr
p n k : ℕ
hp' : p ≠ 2
hk : p ≤ k
hk' : p ≤ n - k
hn : n < 3 * p
hp : Prime p
hkn : k ≤ n
i : ℕ
hi✝ : i ∈ Finset.Ico 1 (log p n + 1)
hi : 1 < i
⊢ k % p ^ i + (n - k) % p ^ i < p ^ i
[PROOFSTEP]
replace hn : n < p ^ i
[GOAL]
case hn
p n k : ℕ
hp' : p ≠ 2
hk : p ≤ k
hk' : p ≤ n - k
hn : n < 3 * p
hp : Prime p
hkn : k ≤ n
i : ℕ
hi✝ : i ∈ Finset.Ico 1 (log p n + 1)
hi : 1 < i
⊢ n < p ^ i
case inr.inr.inr
p n k : ℕ
hp' : p ≠ 2
hk : p ≤ k
hk' : p ≤ n - k
hp : Prime p
hkn : k ≤ n
i : ℕ
hi✝ : i ∈ Finset.Ico 1 (log p n + 1)
hi : 1 < i
hn : n < p ^ i
⊢ k % p ^ i + (n - k) % p ^ i < p ^ i
[PROOFSTEP]
have : 3 ≤ p := lt_of_le_of_ne hp.two_le hp'.symm
[GOAL]
case hn
p n k : ℕ
hp' : p ≠ 2
hk : p ≤ k
hk' : p ≤ n - k
hn : n < 3 * p
hp : Prime p
hkn : k ≤ n
i : ℕ
hi✝ : i ∈ Finset.Ico 1 (log p n + 1)
hi : 1 < i
this : 3 ≤ p
⊢ n < p ^ i
[PROOFSTEP]
calc
  n < 3 * p := hn
  _ ≤ p * p := (mul_le_mul_right' this p)
  _ = p ^ 2 := (sq p).symm
  _ ≤ p ^ i := pow_le_pow hp.one_lt.le hi
[GOAL]
case inr.inr.inr
p n k : ℕ
hp' : p ≠ 2
hk : p ≤ k
hk' : p ≤ n - k
hp : Prime p
hkn : k ≤ n
i : ℕ
hi✝ : i ∈ Finset.Ico 1 (log p n + 1)
hi : 1 < i
hn : n < p ^ i
⊢ k % p ^ i + (n - k) % p ^ i < p ^ i
[PROOFSTEP]
rwa [mod_eq_of_lt (lt_of_le_of_lt hkn hn), mod_eq_of_lt (lt_of_le_of_lt tsub_le_self hn), add_tsub_cancel_of_le hkn]
[GOAL]
p n k : ℕ
n_big : 2 < n
p_le_n : p ≤ n
big : 2 * n < 3 * p
⊢ ↑(factorization (centralBinom n)) p = 0
[PROOFSTEP]
refine' factorization_choose_of_lt_three_mul _ p_le_n (p_le_n.trans _) big
[GOAL]
case refine'_1
p n k : ℕ
n_big : 2 < n
p_le_n : p ≤ n
big : 2 * n < 3 * p
⊢ p ≠ 2
[PROOFSTEP]
rintro rfl
[GOAL]
case refine'_1
n k : ℕ
n_big : 2 < n
p_le_n : 2 ≤ n
big : 2 * n < 3 * 2
⊢ False
[PROOFSTEP]
linarith
[GOAL]
case refine'_2
p n k : ℕ
n_big : 2 < n
p_le_n : p ≤ n
big : 2 * n < 3 * p
⊢ n ≤ 2 * n - n
[PROOFSTEP]
rw [two_mul, add_tsub_cancel_left]
[GOAL]
p n k : ℕ
h : n < p
⊢ ↑(factorization n !) p = 0
[PROOFSTEP]
induction' n with n hn
[GOAL]
case zero
p n k : ℕ
h✝ : n < p
h : zero < p
⊢ ↑(factorization zero !) p = 0
[PROOFSTEP]
simp
[GOAL]
case succ
p n✝ k : ℕ
h✝ : n✝ < p
n : ℕ
hn : n < p → ↑(factorization n !) p = 0
h : succ n < p
⊢ ↑(factorization (succ n)!) p = 0
[PROOFSTEP]
rw [factorial_succ, factorization_mul n.succ_ne_zero n.factorial_ne_zero, Finsupp.coe_add, Pi.add_apply,
  hn (lt_of_succ_lt h), add_zero, factorization_eq_zero_of_lt h]
[GOAL]
p n k : ℕ
h : n < p
⊢ ↑(factorization (choose n k)) p = 0
[PROOFSTEP]
by_cases hnk : n < k
[GOAL]
case pos
p n k : ℕ
h : n < p
hnk : n < k
⊢ ↑(factorization (choose n k)) p = 0
[PROOFSTEP]
simp [choose_eq_zero_of_lt hnk]
[GOAL]
case neg
p n k : ℕ
h : n < p
hnk : ¬n < k
⊢ ↑(factorization (choose n k)) p = 0
[PROOFSTEP]
rw [choose_eq_factorial_div_factorial (le_of_not_lt hnk),
  factorization_div (factorial_mul_factorial_dvd_factorial (le_of_not_lt hnk)), Finsupp.coe_tsub, Pi.sub_apply,
  factorization_factorial_eq_zero_of_lt h, zero_tsub]
[GOAL]
p n✝ k✝ n k : ℕ
hkn : k ≤ n
⊢ ∏ p in Finset.range (n + 1), p ^ ↑(factorization (choose n k)) p = choose n k
[PROOFSTEP]
conv =>
  -- Porting note: was `nth_rw_rhs`
  rhs
  rw [← factorization_prod_pow_eq_self (choose_pos hkn).ne']
[GOAL]
p n✝ k✝ n k : ℕ
hkn : k ≤ n
| ∏ p in Finset.range (n + 1), p ^ ↑(factorization (choose n k)) p = choose n k
[PROOFSTEP]
  rhs
  rw [← factorization_prod_pow_eq_self (choose_pos hkn).ne']
[GOAL]
p n✝ k✝ n k : ℕ
hkn : k ≤ n
| ∏ p in Finset.range (n + 1), p ^ ↑(factorization (choose n k)) p = choose n k
[PROOFSTEP]
  rhs
  rw [← factorization_prod_pow_eq_self (choose_pos hkn).ne']
[GOAL]
p n✝ k✝ n k : ℕ
hkn : k ≤ n
| ∏ p in Finset.range (n + 1), p ^ ↑(factorization (choose n k)) p = choose n k
[PROOFSTEP]
rhs
[GOAL]
p n✝ k✝ n k : ℕ
hkn : k ≤ n
| choose n k
[PROOFSTEP]
rw [← factorization_prod_pow_eq_self (choose_pos hkn).ne']
[GOAL]
p n✝ k✝ n k : ℕ
hkn : k ≤ n
⊢ ∏ p in Finset.range (n + 1), p ^ ↑(factorization (choose n k)) p =
    Finsupp.prod (factorization (choose n k)) fun x x_1 => x ^ x_1
[PROOFSTEP]
rw [eq_comm]
[GOAL]
p n✝ k✝ n k : ℕ
hkn : k ≤ n
⊢ (Finsupp.prod (factorization (choose n k)) fun x x_1 => x ^ x_1) =
    ∏ p in Finset.range (n + 1), p ^ ↑(factorization (choose n k)) p
[PROOFSTEP]
apply Finset.prod_subset
[GOAL]
case h
p n✝ k✝ n k : ℕ
hkn : k ≤ n
⊢ (factorization (choose n k)).support ⊆ Finset.range (n + 1)
[PROOFSTEP]
intro p hp
[GOAL]
case h
p✝ n✝ k✝ n k : ℕ
hkn : k ≤ n
p : ℕ
hp : p ∈ (factorization (choose n k)).support
⊢ p ∈ Finset.range (n + 1)
[PROOFSTEP]
rw [Finset.mem_range]
[GOAL]
case h
p✝ n✝ k✝ n k : ℕ
hkn : k ≤ n
p : ℕ
hp : p ∈ (factorization (choose n k)).support
⊢ p < n + 1
[PROOFSTEP]
contrapose! hp
[GOAL]
case h
p✝ n✝ k✝ n k : ℕ
hkn : k ≤ n
p : ℕ
hp : n + 1 ≤ p
⊢ ¬p ∈ (factorization (choose n k)).support
[PROOFSTEP]
rw [Finsupp.mem_support_iff, Classical.not_not, factorization_choose_eq_zero_of_lt hp]
[GOAL]
case hf
p n✝ k✝ n k : ℕ
hkn : k ≤ n
⊢ ∀ (x : ℕ),
    x ∈ Finset.range (n + 1) →
      ¬x ∈ (factorization (choose n k)).support → (fun x x_1 => x ^ x_1) x (↑(factorization (choose n k)) x) = 1
[PROOFSTEP]
intro p _ h2
[GOAL]
case hf
p✝ n✝ k✝ n k : ℕ
hkn : k ≤ n
p : ℕ
a✝ : p ∈ Finset.range (n + 1)
h2 : ¬p ∈ (factorization (choose n k)).support
⊢ (fun x x_1 => x ^ x_1) p (↑(factorization (choose n k)) p) = 1
[PROOFSTEP]
simp [Classical.not_not.1 (mt Finsupp.mem_support_iff.2 h2)]
[GOAL]
p n✝ k n : ℕ
⊢ ∏ p in Finset.range (2 * n + 1), p ^ ↑(factorization (centralBinom n)) p = centralBinom n
[PROOFSTEP]
apply prod_pow_factorization_choose
[GOAL]
case hkn
p n✝ k n : ℕ
⊢ n ≤ 2 * n
[PROOFSTEP]
linarith