l3lab/ntp-mathlib huggingface dataset:
/-- The integral of the conditional expectation `condexpL1Clm` over an `m`-measurable set is equal
to the integral of `f` on that set. See also `set_integral_condexp`, the similar statement for
`condexp`. -/
theorem set_integral_condexpL1Clm (f : α →₁[μ] F') (hs : MeasurableSet[m] s) :
    ∫ x in s, condexpL1Clm F' hm μ f x ∂μ = ∫ x in s, f x ∂μ := by
  let S := spanningSets (μ.trim hm)
  have hS_meas : ∀ i, MeasurableSet[m] (S i) := measurable_spanningSets (μ.trim hm)
  have hS_meas0 : ∀ i, MeasurableSet (S i) := fun i => hm _ (hS_meas i)
  have hs_eq : s = ⋃ i, S i ∩ s := by
    

Proof state:
α : Type u_1
β : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹¹ : IsROrC 𝕜
inst✝¹⁰ : NormedAddCommGroup F
inst✝⁹ : NormedSpace 𝕜 F
inst✝⁸ : NormedAddCommGroup F'
inst✝⁷ : NormedSpace 𝕜 F'
inst✝⁶ : NormedSpace ℝ F'
inst✝⁵ : CompleteSpace F'
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
f✝ g : α → F'
s : Set α
f : ↥(Lp F' 1)
hs : MeasurableSet s
S : ℕ → Set α := spanningSets (Measure.trim μ hm)
hS_meas : ∀ (i : ℕ), MeasurableSet (S i)
hS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)
⊢ s = ⋃ i, S i ∩ s

Next tactic:
simp_rw [Set.inter_comm]
/-- The integral of the conditional expectation `condexpL1Clm` over an `m`-measurable set is equal
to the integral of `f` on that set. See also `set_integral_condexp`, the similar statement for
`condexp`. -/
theorem set_integral_condexpL1Clm (f : α →₁[μ] F') (hs : MeasurableSet[m] s) :
    ∫ x in s, condexpL1Clm F' hm μ f x ∂μ = ∫ x in s, f x ∂μ := by
  let S := spanningSets (μ.trim hm)
  have hS_meas : ∀ i, MeasurableSet[m] (S i) := measurable_spanningSets (μ.trim hm)
  have hS_meas0 : ∀ i, MeasurableSet (S i) := fun i => hm _ (hS_meas i)
  have hs_eq : s = ⋃ i, S i ∩ s := by
    simp_rw [Set.inter_comm]
    

Proof state:
α : Type u_1
β : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹¹ : IsROrC 𝕜
inst✝¹⁰ : NormedAddCommGroup F
inst✝⁹ : NormedSpace 𝕜 F
inst✝⁸ : NormedAddCommGroup F'
inst✝⁷ : NormedSpace 𝕜 F'
inst✝⁶ : NormedSpace ℝ F'
inst✝⁵ : CompleteSpace F'
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
f✝ g : α → F'
s : Set α
f : ↥(Lp F' 1)
hs : MeasurableSet s
S : ℕ → Set α := spanningSets (Measure.trim μ hm)
hS_meas : ∀ (i : ℕ), MeasurableSet (S i)
hS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)
⊢ s = ⋃ i, s ∩ spanningSets (Measure.trim μ hm) i

Next tactic:
rw [← Set.inter_iUnion, iUnion_spanningSets (μ.trim hm), Set.inter_univ]
/-- The integral of the conditional expectation `condexpL1Clm` over an `m`-measurable set is equal
to the integral of `f` on that set. See also `set_integral_condexp`, the similar statement for
`condexp`. -/
theorem set_integral_condexpL1Clm (f : α →₁[μ] F') (hs : MeasurableSet[m] s) :
    ∫ x in s, condexpL1Clm F' hm μ f x ∂μ = ∫ x in s, f x ∂μ := by
  let S := spanningSets (μ.trim hm)
  have hS_meas : ∀ i, MeasurableSet[m] (S i) := measurable_spanningSets (μ.trim hm)
  have hS_meas0 : ∀ i, MeasurableSet (S i) := fun i => hm _ (hS_meas i)
  have hs_eq : s = ⋃ i, S i ∩ s := by
    simp_rw [Set.inter_comm]
    rw [← Set.inter_iUnion, iUnion_spanningSets (μ.trim hm), Set.inter_univ]
  

Proof state:
α : Type u_1
β : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹¹ : IsROrC 𝕜
inst✝¹⁰ : NormedAddCommGroup F
inst✝⁹ : NormedSpace 𝕜 F
inst✝⁸ : NormedAddCommGroup F'
inst✝⁷ : NormedSpace 𝕜 F'
inst✝⁶ : NormedSpace ℝ F'
inst✝⁵ : CompleteSpace F'
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
f✝ g : α → F'
s : Set α
f : ↥(Lp F' 1)
hs : MeasurableSet s
S : ℕ → Set α := spanningSets (Measure.trim μ hm)
hS_meas : ∀ (i : ℕ), MeasurableSet (S i)
hS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)
hs_eq : s = ⋃ i, S i ∩ s
⊢ ∫ (x : α) in s, ↑↑((condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ

Next tactic:
have hS_finite : ∀ i, μ (S i ∩ s) < ∞ := by
    refine' fun i => (measure_mono (Set.inter_subset_left _ _)).trans_lt _
    have hS_finite_trim := measure_spanningSets_lt_top (μ.trim hm) i
    rwa [trim_measurableSet_eq hm (hS_meas i)] at hS_finite_trim
/-- The integral of the conditional expectation `condexpL1Clm` over an `m`-measurable set is equal
to the integral of `f` on that set. See also `set_integral_condexp`, the similar statement for
`condexp`. -/
theorem set_integral_condexpL1Clm (f : α →₁[μ] F') (hs : MeasurableSet[m] s) :
    ∫ x in s, condexpL1Clm F' hm μ f x ∂μ = ∫ x in s, f x ∂μ := by
  let S := spanningSets (μ.trim hm)
  have hS_meas : ∀ i, MeasurableSet[m] (S i) := measurable_spanningSets (μ.trim hm)
  have hS_meas0 : ∀ i, MeasurableSet (S i) := fun i => hm _ (hS_meas i)
  have hs_eq : s = ⋃ i, S i ∩ s := by
    simp_rw [Set.inter_comm]
    rw [← Set.inter_iUnion, iUnion_spanningSets (μ.trim hm), Set.inter_univ]
  have hS_finite : ∀ i, μ (S i ∩ s) < ∞ := by
    

Proof state:
α : Type u_1
β : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹¹ : IsROrC 𝕜
inst✝¹⁰ : NormedAddCommGroup F
inst✝⁹ : NormedSpace 𝕜 F
inst✝⁸ : NormedAddCommGroup F'
inst✝⁷ : NormedSpace 𝕜 F'
inst✝⁶ : NormedSpace ℝ F'
inst✝⁵ : CompleteSpace F'
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
f✝ g : α → F'
s : Set α
f : ↥(Lp F' 1)
hs : MeasurableSet s
S : ℕ → Set α := spanningSets (Measure.trim μ hm)
hS_meas : ∀ (i : ℕ), MeasurableSet (S i)
hS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)
hs_eq : s = ⋃ i, S i ∩ s
⊢ ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤

Next tactic:
refine' fun i => (measure_mono (Set.inter_subset_left _ _)).trans_lt _
/-- The integral of the conditional expectation `condexpL1Clm` over an `m`-measurable set is equal
to the integral of `f` on that set. See also `set_integral_condexp`, the similar statement for
`condexp`. -/
theorem set_integral_condexpL1Clm (f : α →₁[μ] F') (hs : MeasurableSet[m] s) :
    ∫ x in s, condexpL1Clm F' hm μ f x ∂μ = ∫ x in s, f x ∂μ := by
  let S := spanningSets (μ.trim hm)
  have hS_meas : ∀ i, MeasurableSet[m] (S i) := measurable_spanningSets (μ.trim hm)
  have hS_meas0 : ∀ i, MeasurableSet (S i) := fun i => hm _ (hS_meas i)
  have hs_eq : s = ⋃ i, S i ∩ s := by
    simp_rw [Set.inter_comm]
    rw [← Set.inter_iUnion, iUnion_spanningSets (μ.trim hm), Set.inter_univ]
  have hS_finite : ∀ i, μ (S i ∩ s) < ∞ := by
    refine' fun i => (measure_mono (Set.inter_subset_left _ _)).trans_lt _
    

Proof state:
α : Type u_1
β : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹¹ : IsROrC 𝕜
inst✝¹⁰ : NormedAddCommGroup F
inst✝⁹ : NormedSpace 𝕜 F
inst✝⁸ : NormedAddCommGroup F'
inst✝⁷ : NormedSpace 𝕜 F'
inst✝⁶ : NormedSpace ℝ F'
inst✝⁵ : CompleteSpace F'
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
f✝ g : α → F'
s : Set α
f : ↥(Lp F' 1)
hs : MeasurableSet s
S : ℕ → Set α := spanningSets (Measure.trim μ hm)
hS_meas : ∀ (i : ℕ), MeasurableSet (S i)
hS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)
hs_eq : s = ⋃ i, S i ∩ s
i : ℕ
⊢ ↑↑μ (S i) < ⊤

Next tactic:
have hS_finite_trim := measure_spanningSets_lt_top (μ.trim hm) i
/-- The integral of the conditional expectation `condexpL1Clm` over an `m`-measurable set is equal
to the integral of `f` on that set. See also `set_integral_condexp`, the similar statement for
`condexp`. -/
theorem set_integral_condexpL1Clm (f : α →₁[μ] F') (hs : MeasurableSet[m] s) :
    ∫ x in s, condexpL1Clm F' hm μ f x ∂μ = ∫ x in s, f x ∂μ := by
  let S := spanningSets (μ.trim hm)
  have hS_meas : ∀ i, MeasurableSet[m] (S i) := measurable_spanningSets (μ.trim hm)
  have hS_meas0 : ∀ i, MeasurableSet (S i) := fun i => hm _ (hS_meas i)
  have hs_eq : s = ⋃ i, S i ∩ s := by
    simp_rw [Set.inter_comm]
    rw [← Set.inter_iUnion, iUnion_spanningSets (μ.trim hm), Set.inter_univ]
  have hS_finite : ∀ i, μ (S i ∩ s) < ∞ := by
    refine' fun i => (measure_mono (Set.inter_subset_left _ _)).trans_lt _
    have hS_finite_trim := measure_spanningSets_lt_top (μ.trim hm) i
    

Proof state:
α : Type u_1
β : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹¹ : IsROrC 𝕜
inst✝¹⁰ : NormedAddCommGroup F
inst✝⁹ : NormedSpace 𝕜 F
inst✝⁸ : NormedAddCommGroup F'
inst✝⁷ : NormedSpace 𝕜 F'
inst✝⁶ : NormedSpace ℝ F'
inst✝⁵ : CompleteSpace F'
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
f✝ g : α → F'
s : Set α
f : ↥(Lp F' 1)
hs : MeasurableSet s
S : ℕ → Set α := spanningSets (Measure.trim μ hm)
hS_meas : ∀ (i : ℕ), MeasurableSet (S i)
hS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)
hs_eq : s = ⋃ i, S i ∩ s
i : ℕ
hS_finite_trim : ↑↑(Measure.trim μ hm) (spanningSets (Measure.trim μ hm) i) < ⊤
⊢ ↑↑μ (S i) < ⊤

Next tactic:
rwa [trim_measurableSet_eq hm (hS_meas i)] at hS_finite_trim
/-- The integral of the conditional expectation `condexpL1Clm` over an `m`-measurable set is equal
to the integral of `f` on that set. See also `set_integral_condexp`, the similar statement for
`condexp`. -/
theorem set_integral_condexpL1Clm (f : α →₁[μ] F') (hs : MeasurableSet[m] s) :
    ∫ x in s, condexpL1Clm F' hm μ f x ∂μ = ∫ x in s, f x ∂μ := by
  let S := spanningSets (μ.trim hm)
  have hS_meas : ∀ i, MeasurableSet[m] (S i) := measurable_spanningSets (μ.trim hm)
  have hS_meas0 : ∀ i, MeasurableSet (S i) := fun i => hm _ (hS_meas i)
  have hs_eq : s = ⋃ i, S i ∩ s := by
    simp_rw [Set.inter_comm]
    rw [← Set.inter_iUnion, iUnion_spanningSets (μ.trim hm), Set.inter_univ]
  have hS_finite : ∀ i, μ (S i ∩ s) < ∞ := by
    refine' fun i => (measure_mono (Set.inter_subset_left _ _)).trans_lt _
    have hS_finite_trim := measure_spanningSets_lt_top (μ.trim hm) i
    rwa [trim_measurableSet_eq hm (hS_meas i)] at hS_finite_trim
  

Proof state:
α : Type u_1
β : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹¹ : IsROrC 𝕜
inst✝¹⁰ : NormedAddCommGroup F
inst✝⁹ : NormedSpace 𝕜 F
inst✝⁸ : NormedAddCommGroup F'
inst✝⁷ : NormedSpace 𝕜 F'
inst✝⁶ : NormedSpace ℝ F'
inst✝⁵ : CompleteSpace F'
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
f✝ g : α → F'
s : Set α
f : ↥(Lp F' 1)
hs : MeasurableSet s
S : ℕ → Set α := spanningSets (Measure.trim μ hm)
hS_meas : ∀ (i : ℕ), MeasurableSet (S i)
hS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)
hs_eq : s = ⋃ i, S i ∩ s
hS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤
⊢ ∫ (x : α) in s, ↑↑((condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ

Next tactic:
have h_mono : Monotone fun i => S i ∩ s := by
    intro i j hij x
    simp_rw [Set.mem_inter_iff]
    exact fun h => ⟨monotone_spanningSets (μ.trim hm) hij h.1, h.2⟩
/-- The integral of the conditional expectation `condexpL1Clm` over an `m`-measurable set is equal
to the integral of `f` on that set. See also `set_integral_condexp`, the similar statement for
`condexp`. -/
theorem set_integral_condexpL1Clm (f : α →₁[μ] F') (hs : MeasurableSet[m] s) :
    ∫ x in s, condexpL1Clm F' hm μ f x ∂μ = ∫ x in s, f x ∂μ := by
  let S := spanningSets (μ.trim hm)
  have hS_meas : ∀ i, MeasurableSet[m] (S i) := measurable_spanningSets (μ.trim hm)
  have hS_meas0 : ∀ i, MeasurableSet (S i) := fun i => hm _ (hS_meas i)
  have hs_eq : s = ⋃ i, S i ∩ s := by
    simp_rw [Set.inter_comm]
    rw [← Set.inter_iUnion, iUnion_spanningSets (μ.trim hm), Set.inter_univ]
  have hS_finite : ∀ i, μ (S i ∩ s) < ∞ := by
    refine' fun i => (measure_mono (Set.inter_subset_left _ _)).trans_lt _
    have hS_finite_trim := measure_spanningSets_lt_top (μ.trim hm) i
    rwa [trim_measurableSet_eq hm (hS_meas i)] at hS_finite_trim
  have h_mono : Monotone fun i => S i ∩ s := by
    

Proof state:
α : Type u_1
β : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹¹ : IsROrC 𝕜
inst✝¹⁰ : NormedAddCommGroup F
inst✝⁹ : NormedSpace 𝕜 F
inst✝⁸ : NormedAddCommGroup F'
inst✝⁷ : NormedSpace 𝕜 F'
inst✝⁶ : NormedSpace ℝ F'
inst✝⁵ : CompleteSpace F'
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
f✝ g : α → F'
s : Set α
f : ↥(Lp F' 1)
hs : MeasurableSet s
S : ℕ → Set α := spanningSets (Measure.trim μ hm)
hS_meas : ∀ (i : ℕ), MeasurableSet (S i)
hS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)
hs_eq : s = ⋃ i, S i ∩ s
hS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤
⊢ Monotone fun i => S i ∩ s

Next tactic:
intro i j hij x
/-- The integral of the conditional expectation `condexpL1Clm` over an `m`-measurable set is equal
to the integral of `f` on that set. See also `set_integral_condexp`, the similar statement for
`condexp`. -/
theorem set_integral_condexpL1Clm (f : α →₁[μ] F') (hs : MeasurableSet[m] s) :
    ∫ x in s, condexpL1Clm F' hm μ f x ∂μ = ∫ x in s, f x ∂μ := by
  let S := spanningSets (μ.trim hm)
  have hS_meas : ∀ i, MeasurableSet[m] (S i) := measurable_spanningSets (μ.trim hm)
  have hS_meas0 : ∀ i, MeasurableSet (S i) := fun i => hm _ (hS_meas i)
  have hs_eq : s = ⋃ i, S i ∩ s := by
    simp_rw [Set.inter_comm]
    rw [← Set.inter_iUnion, iUnion_spanningSets (μ.trim hm), Set.inter_univ]
  have hS_finite : ∀ i, μ (S i ∩ s) < ∞ := by
    refine' fun i => (measure_mono (Set.inter_subset_left _ _)).trans_lt _
    have hS_finite_trim := measure_spanningSets_lt_top (μ.trim hm) i
    rwa [trim_measurableSet_eq hm (hS_meas i)] at hS_finite_trim
  have h_mono : Monotone fun i => S i ∩ s := by
    intro i j hij x
    

Proof state:
α : Type u_1
β : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹¹ : IsROrC 𝕜
inst✝¹⁰ : NormedAddCommGroup F
inst✝⁹ : NormedSpace 𝕜 F
inst✝⁸ : NormedAddCommGroup F'
inst✝⁷ : NormedSpace 𝕜 F'
inst✝⁶ : NormedSpace ℝ F'
inst✝⁵ : CompleteSpace F'
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
f✝ g : α → F'
s : Set α
f : ↥(Lp F' 1)
hs : MeasurableSet s
S : ℕ → Set α := spanningSets (Measure.trim μ hm)
hS_meas : ∀ (i : ℕ), MeasurableSet (S i)
hS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)
hs_eq : s = ⋃ i, S i ∩ s
hS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤
i j : ℕ
hij : i ≤ j
x : α
⊢ x ∈ (fun i => S i ∩ s) i → x ∈ (fun i => S i ∩ s) j

Next tactic:
simp_rw [Set.mem_inter_iff]
/-- The integral of the conditional expectation `condexpL1Clm` over an `m`-measurable set is equal
to the integral of `f` on that set. See also `set_integral_condexp`, the similar statement for
`condexp`. -/
theorem set_integral_condexpL1Clm (f : α →₁[μ] F') (hs : MeasurableSet[m] s) :
    ∫ x in s, condexpL1Clm F' hm μ f x ∂μ = ∫ x in s, f x ∂μ := by
  let S := spanningSets (μ.trim hm)
  have hS_meas : ∀ i, MeasurableSet[m] (S i) := measurable_spanningSets (μ.trim hm)
  have hS_meas0 : ∀ i, MeasurableSet (S i) := fun i => hm _ (hS_meas i)
  have hs_eq : s = ⋃ i, S i ∩ s := by
    simp_rw [Set.inter_comm]
    rw [← Set.inter_iUnion, iUnion_spanningSets (μ.trim hm), Set.inter_univ]
  have hS_finite : ∀ i, μ (S i ∩ s) < ∞ := by
    refine' fun i => (measure_mono (Set.inter_subset_left _ _)).trans_lt _
    have hS_finite_trim := measure_spanningSets_lt_top (μ.trim hm) i
    rwa [trim_measurableSet_eq hm (hS_meas i)] at hS_finite_trim
  have h_mono : Monotone fun i => S i ∩ s := by
    intro i j hij x
    simp_rw [Set.mem_inter_iff]
    

Proof state:
α : Type u_1
β : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹¹ : IsROrC 𝕜
inst✝¹⁰ : NormedAddCommGroup F
inst✝⁹ : NormedSpace 𝕜 F
inst✝⁸ : NormedAddCommGroup F'
inst✝⁷ : NormedSpace 𝕜 F'
inst✝⁶ : NormedSpace ℝ F'
inst✝⁵ : CompleteSpace F'
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
f✝ g : α → F'
s : Set α
f : ↥(Lp F' 1)
hs : MeasurableSet s
S : ℕ → Set α := spanningSets (Measure.trim μ hm)
hS_meas : ∀ (i : ℕ), MeasurableSet (S i)
hS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)
hs_eq : s = ⋃ i, S i ∩ s
hS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤
i j : ℕ
hij : i ≤ j
x : α
⊢ x ∈ spanningSets (Measure.trim μ hm) i ∧ x ∈ s → x ∈ spanningSets (Measure.trim μ hm) j ∧ x ∈ s

Next tactic:
exact fun h => ⟨monotone_spanningSets (μ.trim hm) hij h.1, h.2⟩
/-- The integral of the conditional expectation `condexpL1Clm` over an `m`-measurable set is equal
to the integral of `f` on that set. See also `set_integral_condexp`, the similar statement for
`condexp`. -/
theorem set_integral_condexpL1Clm (f : α →₁[μ] F') (hs : MeasurableSet[m] s) :
    ∫ x in s, condexpL1Clm F' hm μ f x ∂μ = ∫ x in s, f x ∂μ := by
  let S := spanningSets (μ.trim hm)
  have hS_meas : ∀ i, MeasurableSet[m] (S i) := measurable_spanningSets (μ.trim hm)
  have hS_meas0 : ∀ i, MeasurableSet (S i) := fun i => hm _ (hS_meas i)
  have hs_eq : s = ⋃ i, S i ∩ s := by
    simp_rw [Set.inter_comm]
    rw [← Set.inter_iUnion, iUnion_spanningSets (μ.trim hm), Set.inter_univ]
  have hS_finite : ∀ i, μ (S i ∩ s) < ∞ := by
    refine' fun i => (measure_mono (Set.inter_subset_left _ _)).trans_lt _
    have hS_finite_trim := measure_spanningSets_lt_top (μ.trim hm) i
    rwa [trim_measurableSet_eq hm (hS_meas i)] at hS_finite_trim
  have h_mono : Monotone fun i => S i ∩ s := by
    intro i j hij x
    simp_rw [Set.mem_inter_iff]
    exact fun h => ⟨monotone_spanningSets (μ.trim hm) hij h.1, h.2⟩
  

Proof state:
α : Type u_1
β : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹¹ : IsROrC 𝕜
inst✝¹⁰ : NormedAddCommGroup F
inst✝⁹ : NormedSpace 𝕜 F
inst✝⁸ : NormedAddCommGroup F'
inst✝⁷ : NormedSpace 𝕜 F'
inst✝⁶ : NormedSpace ℝ F'
inst✝⁵ : CompleteSpace F'
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
f✝ g : α → F'
s : Set α
f : ↥(Lp F' 1)
hs : MeasurableSet s
S : ℕ → Set α := spanningSets (Measure.trim μ hm)
hS_meas : ∀ (i : ℕ), MeasurableSet (S i)
hS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)
hs_eq : s = ⋃ i, S i ∩ s
hS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤
h_mono : Monotone fun i => S i ∩ s
⊢ ∫ (x : α) in s, ↑↑((condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ

Next tactic:
have h_eq_forall :
    (fun i => ∫ x in S i ∩ s, condexpL1Clm F' hm μ f x ∂μ) = fun i => ∫ x in S i ∩ s, f x ∂μ :=
    funext fun i =>
      set_integral_condexpL1Clm_of_measure_ne_top f (@MeasurableSet.inter α m _ _ (hS_meas i) hs)
        (hS_finite i).ne
/-- The integral of the conditional expectation `condexpL1Clm` over an `m`-measurable set is equal
to the integral of `f` on that set. See also `set_integral_condexp`, the similar statement for
`condexp`. -/
theorem set_integral_condexpL1Clm (f : α →₁[μ] F') (hs : MeasurableSet[m] s) :
    ∫ x in s, condexpL1Clm F' hm μ f x ∂μ = ∫ x in s, f x ∂μ := by
  let S := spanningSets (μ.trim hm)
  have hS_meas : ∀ i, MeasurableSet[m] (S i) := measurable_spanningSets (μ.trim hm)
  have hS_meas0 : ∀ i, MeasurableSet (S i) := fun i => hm _ (hS_meas i)
  have hs_eq : s = ⋃ i, S i ∩ s := by
    simp_rw [Set.inter_comm]
    rw [← Set.inter_iUnion, iUnion_spanningSets (μ.trim hm), Set.inter_univ]
  have hS_finite : ∀ i, μ (S i ∩ s) < ∞ := by
    refine' fun i => (measure_mono (Set.inter_subset_left _ _)).trans_lt _
    have hS_finite_trim := measure_spanningSets_lt_top (μ.trim hm) i
    rwa [trim_measurableSet_eq hm (hS_meas i)] at hS_finite_trim
  have h_mono : Monotone fun i => S i ∩ s := by
    intro i j hij x
    simp_rw [Set.mem_inter_iff]
    exact fun h => ⟨monotone_spanningSets (μ.trim hm) hij h.1, h.2⟩
  have h_eq_forall :
    (fun i => ∫ x in S i ∩ s, condexpL1Clm F' hm μ f x ∂μ) = fun i => ∫ x in S i ∩ s, f x ∂μ :=
    funext fun i =>
      set_integral_condexpL1Clm_of_measure_ne_top f (@MeasurableSet.inter α m _ _ (hS_meas i) hs)
        (hS_finite i).ne
  

Proof state:
α : Type u_1
β : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
G' : Type u_6
𝕜 : Type u_7
p : ℝ≥0∞
inst✝¹¹ : IsROrC 𝕜
inst✝¹⁰ : NormedAddCommGroup F
inst✝⁹ : NormedSpace 𝕜 F
inst✝⁸ : NormedAddCommGroup F'
inst✝⁷ : NormedSpace 𝕜 F'
inst✝⁶ : NormedSpace ℝ F'
inst✝⁵ : CompleteSpace F'
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : CompleteSpace G'
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
inst✝ : SigmaFinite (Measure.trim μ hm)
f✝ g : α → F'
s : Set α
f : ↥(Lp F' 1)
hs : MeasurableSet s
S : ℕ → Set α := spanningSets (Measure.trim μ hm)
hS_meas : ∀ (i : ℕ), MeasurableSet (S i)
hS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)
hs_eq : s = ⋃ i, S i ∩ s
hS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤
h_mono : Monotone fun i => S i ∩ s
h_eq_forall :
  (fun i => ∫ (x : α) in S i ∩ s, ↑↑((condexpL1Clm F' hm μ) f) x ∂μ) = fun i => ∫ (x : α) in S i ∩ s, ↑↑f x ∂μ
⊢ ∫ (x : α) in s, ↑↑((condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ

Next tactic:
have h_right : Tendsto (fun i => ∫ x in S i ∩ s, f x ∂μ) atTop (𝓝 (∫ x in s, f x ∂μ)) := by
    have h :=
      tendsto_set_integral_of_monotone (fun i => (hS_meas0 i).inter (hm s hs)) h_mono
        (L1.integrable_coeFn f).integrableOn
    rwa [← hs_eq] at h