l3lab/ntp-mathlib huggingface dataset:
theorem lintegral_nnnorm_condexpL2_le (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞) (f : Lp ℝ 2 μ) :
    ∫⁻ x in s, ‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ ∂μ ≤ ∫⁻ x in s, ‖f x‖₊ ∂μ := by
  let h_meas := lpMeas.aeStronglyMeasurable' (condexpL2 ℝ ℝ hm f)
  let g := h_meas.choose
  have hg_meas : StronglyMeasurable[m] g := h_meas.choose_spec.1
  have hg_eq : g =ᵐ[μ] condexpL2 ℝ ℝ hm f := h_meas.choose_spec.2.symm
  have hg_eq_restrict : g =ᵐ[μ.restrict s] condexpL2 ℝ ℝ hm f := ae_restrict_of_ae hg_eq
  have hg_nnnorm_eq : (fun x => (‖g x‖₊ : ℝ≥0∞)) =ᵐ[μ.restrict s] fun x =>
      (‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ : ℝ≥0∞) := by
    refine' hg_eq_restrict.mono fun x hx => _
    dsimp only
    simp_rw [hx]
  

Proof state:
α : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹³ : IsROrC 𝕜
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : InnerProductSpace 𝕜 E
inst✝¹⁰ : CompleteSpace E
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : InnerProductSpace 𝕜 E'
inst✝⁷ : CompleteSpace E'
inst✝⁶ : NormedSpace ℝ E'
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace ℝ G'
inst✝ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hm : m ≤ m0
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
f : ↥(Lp ℝ 2)
h_meas : AEStronglyMeasurable' m (↑↑↑((condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' ((condexpL2 ℝ ℝ hm) f)
g : α → ℝ := Exists.choose h_meas
hg_meas : StronglyMeasurable g
hg_eq : g =ᵐ[μ] ↑↑↑((condexpL2 ℝ ℝ hm) f)
hg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑((condexpL2 ℝ ℝ hm) f)
hg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑((condexpL2 ℝ ℝ hm) f) x‖₊
⊢ ∫⁻ (x : α) in s, ↑‖↑↑↑((condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ ≤ ∫⁻ (x : α) in s, ↑‖↑↑f x‖₊ ∂μ

Next tactic:
rw [lintegral_congr_ae hg_nnnorm_eq.symm]
theorem lintegral_nnnorm_condexpL2_le (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞) (f : Lp ℝ 2 μ) :
    ∫⁻ x in s, ‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ ∂μ ≤ ∫⁻ x in s, ‖f x‖₊ ∂μ := by
  let h_meas := lpMeas.aeStronglyMeasurable' (condexpL2 ℝ ℝ hm f)
  let g := h_meas.choose
  have hg_meas : StronglyMeasurable[m] g := h_meas.choose_spec.1
  have hg_eq : g =ᵐ[μ] condexpL2 ℝ ℝ hm f := h_meas.choose_spec.2.symm
  have hg_eq_restrict : g =ᵐ[μ.restrict s] condexpL2 ℝ ℝ hm f := ae_restrict_of_ae hg_eq
  have hg_nnnorm_eq : (fun x => (‖g x‖₊ : ℝ≥0∞)) =ᵐ[μ.restrict s] fun x =>
      (‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ : ℝ≥0∞) := by
    refine' hg_eq_restrict.mono fun x hx => _
    dsimp only
    simp_rw [hx]
  rw [lintegral_congr_ae hg_nnnorm_eq.symm]
  

Proof state:
α : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹³ : IsROrC 𝕜
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : InnerProductSpace 𝕜 E
inst✝¹⁰ : CompleteSpace E
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : InnerProductSpace 𝕜 E'
inst✝⁷ : CompleteSpace E'
inst✝⁶ : NormedSpace ℝ E'
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace ℝ G'
inst✝ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hm : m ≤ m0
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
f : ↥(Lp ℝ 2)
h_meas : AEStronglyMeasurable' m (↑↑↑((condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' ((condexpL2 ℝ ℝ hm) f)
g : α → ℝ := Exists.choose h_meas
hg_meas : StronglyMeasurable g
hg_eq : g =ᵐ[μ] ↑↑↑((condexpL2 ℝ ℝ hm) f)
hg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑((condexpL2 ℝ ℝ hm) f)
hg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑((condexpL2 ℝ ℝ hm) f) x‖₊
⊢ ∫⁻ (a : α) in s, ↑‖g a‖₊ ∂μ ≤ ∫⁻ (x : α) in s, ↑‖↑↑f x‖₊ ∂μ

Next tactic:
refine'
    lintegral_nnnorm_le_of_forall_fin_meas_integral_eq hm (Lp.stronglyMeasurable f) _ _ _ _ hs hμs
theorem lintegral_nnnorm_condexpL2_le (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞) (f : Lp ℝ 2 μ) :
    ∫⁻ x in s, ‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ ∂μ ≤ ∫⁻ x in s, ‖f x‖₊ ∂μ := by
  let h_meas := lpMeas.aeStronglyMeasurable' (condexpL2 ℝ ℝ hm f)
  let g := h_meas.choose
  have hg_meas : StronglyMeasurable[m] g := h_meas.choose_spec.1
  have hg_eq : g =ᵐ[μ] condexpL2 ℝ ℝ hm f := h_meas.choose_spec.2.symm
  have hg_eq_restrict : g =ᵐ[μ.restrict s] condexpL2 ℝ ℝ hm f := ae_restrict_of_ae hg_eq
  have hg_nnnorm_eq : (fun x => (‖g x‖₊ : ℝ≥0∞)) =ᵐ[μ.restrict s] fun x =>
      (‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ : ℝ≥0∞) := by
    refine' hg_eq_restrict.mono fun x hx => _
    dsimp only
    simp_rw [hx]
  rw [lintegral_congr_ae hg_nnnorm_eq.symm]
  refine'
    lintegral_nnnorm_le_of_forall_fin_meas_integral_eq hm (Lp.stronglyMeasurable f) _ _ _ _ hs hμs
  · 

Proof state:
case refine'_1
α : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹³ : IsROrC 𝕜
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : InnerProductSpace 𝕜 E
inst✝¹⁰ : CompleteSpace E
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : InnerProductSpace 𝕜 E'
inst✝⁷ : CompleteSpace E'
inst✝⁶ : NormedSpace ℝ E'
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace ℝ G'
inst✝ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hm : m ≤ m0
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
f : ↥(Lp ℝ 2)
h_meas : AEStronglyMeasurable' m (↑↑↑((condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' ((condexpL2 ℝ ℝ hm) f)
g : α → ℝ := Exists.choose h_meas
hg_meas : StronglyMeasurable g
hg_eq : g =ᵐ[μ] ↑↑↑((condexpL2 ℝ ℝ hm) f)
hg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑((condexpL2 ℝ ℝ hm) f)
hg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑((condexpL2 ℝ ℝ hm) f) x‖₊
⊢ IntegrableOn (fun x => ↑↑f x) s

Next tactic:
exact integrableOn_Lp_of_measure_ne_top f fact_one_le_two_ennreal.elim hμs
theorem lintegral_nnnorm_condexpL2_le (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞) (f : Lp ℝ 2 μ) :
    ∫⁻ x in s, ‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ ∂μ ≤ ∫⁻ x in s, ‖f x‖₊ ∂μ := by
  let h_meas := lpMeas.aeStronglyMeasurable' (condexpL2 ℝ ℝ hm f)
  let g := h_meas.choose
  have hg_meas : StronglyMeasurable[m] g := h_meas.choose_spec.1
  have hg_eq : g =ᵐ[μ] condexpL2 ℝ ℝ hm f := h_meas.choose_spec.2.symm
  have hg_eq_restrict : g =ᵐ[μ.restrict s] condexpL2 ℝ ℝ hm f := ae_restrict_of_ae hg_eq
  have hg_nnnorm_eq : (fun x => (‖g x‖₊ : ℝ≥0∞)) =ᵐ[μ.restrict s] fun x =>
      (‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ : ℝ≥0∞) := by
    refine' hg_eq_restrict.mono fun x hx => _
    dsimp only
    simp_rw [hx]
  rw [lintegral_congr_ae hg_nnnorm_eq.symm]
  refine'
    lintegral_nnnorm_le_of_forall_fin_meas_integral_eq hm (Lp.stronglyMeasurable f) _ _ _ _ hs hμs
  · exact integrableOn_Lp_of_measure_ne_top f fact_one_le_two_ennreal.elim hμs
  · 

Proof state:
case refine'_2
α : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹³ : IsROrC 𝕜
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : InnerProductSpace 𝕜 E
inst✝¹⁰ : CompleteSpace E
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : InnerProductSpace 𝕜 E'
inst✝⁷ : CompleteSpace E'
inst✝⁶ : NormedSpace ℝ E'
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace ℝ G'
inst✝ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hm : m ≤ m0
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
f : ↥(Lp ℝ 2)
h_meas : AEStronglyMeasurable' m (↑↑↑((condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' ((condexpL2 ℝ ℝ hm) f)
g : α → ℝ := Exists.choose h_meas
hg_meas : StronglyMeasurable g
hg_eq : g =ᵐ[μ] ↑↑↑((condexpL2 ℝ ℝ hm) f)
hg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑((condexpL2 ℝ ℝ hm) f)
hg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑((condexpL2 ℝ ℝ hm) f) x‖₊
⊢ StronglyMeasurable fun a => g a

Next tactic:
exact hg_meas
theorem lintegral_nnnorm_condexpL2_le (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞) (f : Lp ℝ 2 μ) :
    ∫⁻ x in s, ‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ ∂μ ≤ ∫⁻ x in s, ‖f x‖₊ ∂μ := by
  let h_meas := lpMeas.aeStronglyMeasurable' (condexpL2 ℝ ℝ hm f)
  let g := h_meas.choose
  have hg_meas : StronglyMeasurable[m] g := h_meas.choose_spec.1
  have hg_eq : g =ᵐ[μ] condexpL2 ℝ ℝ hm f := h_meas.choose_spec.2.symm
  have hg_eq_restrict : g =ᵐ[μ.restrict s] condexpL2 ℝ ℝ hm f := ae_restrict_of_ae hg_eq
  have hg_nnnorm_eq : (fun x => (‖g x‖₊ : ℝ≥0∞)) =ᵐ[μ.restrict s] fun x =>
      (‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ : ℝ≥0∞) := by
    refine' hg_eq_restrict.mono fun x hx => _
    dsimp only
    simp_rw [hx]
  rw [lintegral_congr_ae hg_nnnorm_eq.symm]
  refine'
    lintegral_nnnorm_le_of_forall_fin_meas_integral_eq hm (Lp.stronglyMeasurable f) _ _ _ _ hs hμs
  · exact integrableOn_Lp_of_measure_ne_top f fact_one_le_two_ennreal.elim hμs
  · exact hg_meas
  · 

Proof state:
case refine'_3
α : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹³ : IsROrC 𝕜
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : InnerProductSpace 𝕜 E
inst✝¹⁰ : CompleteSpace E
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : InnerProductSpace 𝕜 E'
inst✝⁷ : CompleteSpace E'
inst✝⁶ : NormedSpace ℝ E'
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace ℝ G'
inst✝ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hm : m ≤ m0
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
f : ↥(Lp ℝ 2)
h_meas : AEStronglyMeasurable' m (↑↑↑((condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' ((condexpL2 ℝ ℝ hm) f)
g : α → ℝ := Exists.choose h_meas
hg_meas : StronglyMeasurable g
hg_eq : g =ᵐ[μ] ↑↑↑((condexpL2 ℝ ℝ hm) f)
hg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑((condexpL2 ℝ ℝ hm) f)
hg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑((condexpL2 ℝ ℝ hm) f) x‖₊
⊢ IntegrableOn (fun a => g a) s

Next tactic:
rw [IntegrableOn, integrable_congr hg_eq_restrict]
theorem lintegral_nnnorm_condexpL2_le (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞) (f : Lp ℝ 2 μ) :
    ∫⁻ x in s, ‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ ∂μ ≤ ∫⁻ x in s, ‖f x‖₊ ∂μ := by
  let h_meas := lpMeas.aeStronglyMeasurable' (condexpL2 ℝ ℝ hm f)
  let g := h_meas.choose
  have hg_meas : StronglyMeasurable[m] g := h_meas.choose_spec.1
  have hg_eq : g =ᵐ[μ] condexpL2 ℝ ℝ hm f := h_meas.choose_spec.2.symm
  have hg_eq_restrict : g =ᵐ[μ.restrict s] condexpL2 ℝ ℝ hm f := ae_restrict_of_ae hg_eq
  have hg_nnnorm_eq : (fun x => (‖g x‖₊ : ℝ≥0∞)) =ᵐ[μ.restrict s] fun x =>
      (‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ : ℝ≥0∞) := by
    refine' hg_eq_restrict.mono fun x hx => _
    dsimp only
    simp_rw [hx]
  rw [lintegral_congr_ae hg_nnnorm_eq.symm]
  refine'
    lintegral_nnnorm_le_of_forall_fin_meas_integral_eq hm (Lp.stronglyMeasurable f) _ _ _ _ hs hμs
  · exact integrableOn_Lp_of_measure_ne_top f fact_one_le_two_ennreal.elim hμs
  · exact hg_meas
  · rw [IntegrableOn, integrable_congr hg_eq_restrict]
    

Proof state:
case refine'_3
α : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹³ : IsROrC 𝕜
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : InnerProductSpace 𝕜 E
inst✝¹⁰ : CompleteSpace E
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : InnerProductSpace 𝕜 E'
inst✝⁷ : CompleteSpace E'
inst✝⁶ : NormedSpace ℝ E'
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace ℝ G'
inst✝ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hm : m ≤ m0
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
f : ↥(Lp ℝ 2)
h_meas : AEStronglyMeasurable' m (↑↑↑((condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' ((condexpL2 ℝ ℝ hm) f)
g : α → ℝ := Exists.choose h_meas
hg_meas : StronglyMeasurable g
hg_eq : g =ᵐ[μ] ↑↑↑((condexpL2 ℝ ℝ hm) f)
hg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑((condexpL2 ℝ ℝ hm) f)
hg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑((condexpL2 ℝ ℝ hm) f) x‖₊
⊢ Integrable ↑↑↑((condexpL2 ℝ ℝ hm) f)

Next tactic:
exact integrableOn_condexpL2_of_measure_ne_top hm hμs f
theorem lintegral_nnnorm_condexpL2_le (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞) (f : Lp ℝ 2 μ) :
    ∫⁻ x in s, ‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ ∂μ ≤ ∫⁻ x in s, ‖f x‖₊ ∂μ := by
  let h_meas := lpMeas.aeStronglyMeasurable' (condexpL2 ℝ ℝ hm f)
  let g := h_meas.choose
  have hg_meas : StronglyMeasurable[m] g := h_meas.choose_spec.1
  have hg_eq : g =ᵐ[μ] condexpL2 ℝ ℝ hm f := h_meas.choose_spec.2.symm
  have hg_eq_restrict : g =ᵐ[μ.restrict s] condexpL2 ℝ ℝ hm f := ae_restrict_of_ae hg_eq
  have hg_nnnorm_eq : (fun x => (‖g x‖₊ : ℝ≥0∞)) =ᵐ[μ.restrict s] fun x =>
      (‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ : ℝ≥0∞) := by
    refine' hg_eq_restrict.mono fun x hx => _
    dsimp only
    simp_rw [hx]
  rw [lintegral_congr_ae hg_nnnorm_eq.symm]
  refine'
    lintegral_nnnorm_le_of_forall_fin_meas_integral_eq hm (Lp.stronglyMeasurable f) _ _ _ _ hs hμs
  · exact integrableOn_Lp_of_measure_ne_top f fact_one_le_two_ennreal.elim hμs
  · exact hg_meas
  · rw [IntegrableOn, integrable_congr hg_eq_restrict]
    exact integrableOn_condexpL2_of_measure_ne_top hm hμs f
  · 

Proof state:
case refine'_4
α : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹³ : IsROrC 𝕜
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : InnerProductSpace 𝕜 E
inst✝¹⁰ : CompleteSpace E
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : InnerProductSpace 𝕜 E'
inst✝⁷ : CompleteSpace E'
inst✝⁶ : NormedSpace ℝ E'
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace ℝ G'
inst✝ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hm : m ≤ m0
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
f : ↥(Lp ℝ 2)
h_meas : AEStronglyMeasurable' m (↑↑↑((condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' ((condexpL2 ℝ ℝ hm) f)
g : α → ℝ := Exists.choose h_meas
hg_meas : StronglyMeasurable g
hg_eq : g =ᵐ[μ] ↑↑↑((condexpL2 ℝ ℝ hm) f)
hg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑((condexpL2 ℝ ℝ hm) f)
hg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑((condexpL2 ℝ ℝ hm) f) x‖₊
⊢ ∀ (t : Set α), MeasurableSet t → ↑↑μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, ↑↑f x ∂μ

Next tactic:
intro t ht hμt
theorem lintegral_nnnorm_condexpL2_le (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞) (f : Lp ℝ 2 μ) :
    ∫⁻ x in s, ‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ ∂μ ≤ ∫⁻ x in s, ‖f x‖₊ ∂μ := by
  let h_meas := lpMeas.aeStronglyMeasurable' (condexpL2 ℝ ℝ hm f)
  let g := h_meas.choose
  have hg_meas : StronglyMeasurable[m] g := h_meas.choose_spec.1
  have hg_eq : g =ᵐ[μ] condexpL2 ℝ ℝ hm f := h_meas.choose_spec.2.symm
  have hg_eq_restrict : g =ᵐ[μ.restrict s] condexpL2 ℝ ℝ hm f := ae_restrict_of_ae hg_eq
  have hg_nnnorm_eq : (fun x => (‖g x‖₊ : ℝ≥0∞)) =ᵐ[μ.restrict s] fun x =>
      (‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ : ℝ≥0∞) := by
    refine' hg_eq_restrict.mono fun x hx => _
    dsimp only
    simp_rw [hx]
  rw [lintegral_congr_ae hg_nnnorm_eq.symm]
  refine'
    lintegral_nnnorm_le_of_forall_fin_meas_integral_eq hm (Lp.stronglyMeasurable f) _ _ _ _ hs hμs
  · exact integrableOn_Lp_of_measure_ne_top f fact_one_le_two_ennreal.elim hμs
  · exact hg_meas
  · rw [IntegrableOn, integrable_congr hg_eq_restrict]
    exact integrableOn_condexpL2_of_measure_ne_top hm hμs f
  · intro t ht hμt
    

Proof state:
case refine'_4
α : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹³ : IsROrC 𝕜
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : InnerProductSpace 𝕜 E
inst✝¹⁰ : CompleteSpace E
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : InnerProductSpace 𝕜 E'
inst✝⁷ : CompleteSpace E'
inst✝⁶ : NormedSpace ℝ E'
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace ℝ G'
inst✝ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
s t✝ : Set α
hm : m ≤ m0
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
f : ↥(Lp ℝ 2)
h_meas : AEStronglyMeasurable' m (↑↑↑((condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' ((condexpL2 ℝ ℝ hm) f)
g : α → ℝ := Exists.choose h_meas
hg_meas : StronglyMeasurable g
hg_eq : g =ᵐ[μ] ↑↑↑((condexpL2 ℝ ℝ hm) f)
hg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑((condexpL2 ℝ ℝ hm) f)
hg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑((condexpL2 ℝ ℝ hm) f) x‖₊
t : Set α
ht : MeasurableSet t
hμt : ↑↑μ t < ⊤
⊢ ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, ↑↑f x ∂μ

Next tactic:
rw [← integral_condexpL2_eq_of_fin_meas_real f ht hμt.ne]
theorem condexpL2_ae_eq_zero_of_ae_eq_zero (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞) {f : Lp ℝ 2 μ}
    (hf : f =ᵐ[μ.restrict s] 0) : condexpL2 ℝ ℝ hm f =ᵐ[μ.restrict s] (0 : α → ℝ) := by
  

Proof state:
α : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹³ : IsROrC 𝕜
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : InnerProductSpace 𝕜 E
inst✝¹⁰ : CompleteSpace E
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : InnerProductSpace 𝕜 E'
inst✝⁷ : CompleteSpace E'
inst✝⁶ : NormedSpace ℝ E'
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace ℝ G'
inst✝ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hm : m ≤ m0
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
f : ↥(Lp ℝ 2)
hf : ↑↑f =ᵐ[Measure.restrict μ s] 0
⊢ ↑↑↑((condexpL2 ℝ ℝ hm) f) =ᵐ[Measure.restrict μ s] 0

Next tactic:
suffices h_nnnorm_eq_zero : ∫⁻ x in s, ‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ ∂μ = 0
theorem condexpL2_ae_eq_zero_of_ae_eq_zero (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞) {f : Lp ℝ 2 μ}
    (hf : f =ᵐ[μ.restrict s] 0) : condexpL2 ℝ ℝ hm f =ᵐ[μ.restrict s] (0 : α → ℝ) := by
  suffices h_nnnorm_eq_zero : ∫⁻ x in s, ‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ ∂μ = 0
  · 

Proof state:
α : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹³ : IsROrC 𝕜
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : InnerProductSpace 𝕜 E
inst✝¹⁰ : CompleteSpace E
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : InnerProductSpace 𝕜 E'
inst✝⁷ : CompleteSpace E'
inst✝⁶ : NormedSpace ℝ E'
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace ℝ G'
inst✝ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hm : m ≤ m0
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
f : ↥(Lp ℝ 2)
hf : ↑↑f =ᵐ[Measure.restrict μ s] 0
h_nnnorm_eq_zero : ∫⁻ (x : α) in s, ↑‖↑↑↑((condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ = 0
⊢ ↑↑↑((condexpL2 ℝ ℝ hm) f) =ᵐ[Measure.restrict μ s] 0

Next tactic:
rw [lintegral_eq_zero_iff] at h_nnnorm_eq_zero
theorem condexpL2_ae_eq_zero_of_ae_eq_zero (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞) {f : Lp ℝ 2 μ}
    (hf : f =ᵐ[μ.restrict s] 0) : condexpL2 ℝ ℝ hm f =ᵐ[μ.restrict s] (0 : α → ℝ) := by
  suffices h_nnnorm_eq_zero : ∫⁻ x in s, ‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ ∂μ = 0
  · rw [lintegral_eq_zero_iff] at h_nnnorm_eq_zero
    

Proof state:
α : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹³ : IsROrC 𝕜
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : InnerProductSpace 𝕜 E
inst✝¹⁰ : CompleteSpace E
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : InnerProductSpace 𝕜 E'
inst✝⁷ : CompleteSpace E'
inst✝⁶ : NormedSpace ℝ E'
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace ℝ G'
inst✝ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hm : m ≤ m0
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
f : ↥(Lp ℝ 2)
hf : ↑↑f =ᵐ[Measure.restrict μ s] 0
h_nnnorm_eq_zero : (fun x => ↑‖↑↑↑((condexpL2 ℝ ℝ hm) f) x‖₊) =ᵐ[Measure.restrict μ s] 0
⊢ ↑↑↑((condexpL2 ℝ ℝ hm) f) =ᵐ[Measure.restrict μ s] 0
α : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹³ : IsROrC 𝕜
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : InnerProductSpace 𝕜 E
inst✝¹⁰ : CompleteSpace E
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : InnerProductSpace 𝕜 E'
inst✝⁷ : CompleteSpace E'
inst✝⁶ : NormedSpace ℝ E'
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace ℝ G'
inst✝ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hm : m ≤ m0
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
f : ↥(Lp ℝ 2)
hf : ↑↑f =ᵐ[Measure.restrict μ s] 0
h_nnnorm_eq_zero : ∫⁻ (x : α) in s, ↑‖↑↑↑((condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ = 0
⊢ Measurable fun x => ↑‖↑↑↑((condexpL2 ℝ ℝ hm) f) x‖₊

Next tactic:
refine' h_nnnorm_eq_zero.mono fun x hx => _
theorem condexpL2_ae_eq_zero_of_ae_eq_zero (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞) {f : Lp ℝ 2 μ}
    (hf : f =ᵐ[μ.restrict s] 0) : condexpL2 ℝ ℝ hm f =ᵐ[μ.restrict s] (0 : α → ℝ) := by
  suffices h_nnnorm_eq_zero : ∫⁻ x in s, ‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ ∂μ = 0
  · rw [lintegral_eq_zero_iff] at h_nnnorm_eq_zero
    refine' h_nnnorm_eq_zero.mono fun x hx => _
    

Proof state:
α : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹³ : IsROrC 𝕜
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : InnerProductSpace 𝕜 E
inst✝¹⁰ : CompleteSpace E
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : InnerProductSpace 𝕜 E'
inst✝⁷ : CompleteSpace E'
inst✝⁶ : NormedSpace ℝ E'
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace ℝ G'
inst✝ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hm : m ≤ m0
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
f : ↥(Lp ℝ 2)
hf : ↑↑f =ᵐ[Measure.restrict μ s] 0
h_nnnorm_eq_zero : (fun x => ↑‖↑↑↑((condexpL2 ℝ ℝ hm) f) x‖₊) =ᵐ[Measure.restrict μ s] 0
x : α
hx : (fun x => ↑‖↑↑↑((condexpL2 ℝ ℝ hm) f) x‖₊) x = OfNat.ofNat 0 x
⊢ ↑↑↑((condexpL2 ℝ ℝ hm) f) x = OfNat.ofNat 0 x
α : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹³ : IsROrC 𝕜
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : InnerProductSpace 𝕜 E
inst✝¹⁰ : CompleteSpace E
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : InnerProductSpace 𝕜 E'
inst✝⁷ : CompleteSpace E'
inst✝⁶ : NormedSpace ℝ E'
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace ℝ G'
inst✝ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hm : m ≤ m0
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
f : ↥(Lp ℝ 2)
hf : ↑↑f =ᵐ[Measure.restrict μ s] 0
h_nnnorm_eq_zero : ∫⁻ (x : α) in s, ↑‖↑↑↑((condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ = 0
⊢ Measurable fun x => ↑‖↑↑↑((condexpL2 ℝ ℝ hm) f) x‖₊

Next tactic:
dsimp only at hx