awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Module: Mathlib.MeasureTheory.Function.ConditionalExpectation.PullOut
Goal:
Ω : Type u_1
m mΩ : MeasurableSpace Ω
μ : Measure Ω
E : Type u_2
F : Type u_3
G : Type u_4
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
inst_4 : NormedAddCommGroup G
inst_5 : NormedSpace ℝ G
inst_6 : CompleteSpace G
B : F →L[ℝ] E →L[ℝ] G
inst_7 : CompleteSpace E
f : Ω → F
g : Ω → E
hf : StronglyMeasurable f
hfg :
  Integrable.{u_4, u_1} (ε := G) (fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω)) μ
hg : Integrable g μ
hm : m ≤ mΩ
hμm : SigmaFinite (μ.trim hm)
sets : ℕ → Set Ω
h_univ : Eq.{u_1 + 1} (α := Set Ω) (⋃ (i : ℕ), sets i) Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), LT.lt (α := ℝ≥0∞) ((μ : (a : Set Ω) → ℝ≥0∞) (sets x) : ℝ≥0∞) (∞ : ℝ≥0∞)
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ (↑x : ℝ)
this :
  ∀ᵐ (a : Ω) ∂μ,
    ∀ (i : ℕ),
      a ∈ sets i →
        Eq.{u_4 + 1} (α := G)
          (μ[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m] a : G)
          ((((B : (a : F) → E →L[ℝ] G) (f a) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] a) : G)
ω : Ω
hω :
  ∀ (i : ℕ),
    ω ∈ sets i →
      Eq.{u_4 + 1} (α := G)
        (μ[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m] ω : G)
        ((((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] ω) : G)
i : ℕ
hi : ω ∈ sets i
⊢ Eq.{u_4 + 1} (α := G) (μ[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m] ω : G)
    ((((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] ω) : G)

Tactic:
exact hω i hi
-- Module: Mathlib.MeasureTheory.Function.ConditionalExpectation.PullOut
Goal:
Ω : Type u_1
m mΩ : MeasurableSpace Ω
μ : Measure Ω
E : Type u_2
F : Type u_3
G : Type u_4
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
inst_4 : NormedAddCommGroup G
inst_5 : NormedSpace ℝ G
inst_6 : CompleteSpace G
B : F →L[ℝ] E →L[ℝ] G
inst_7 : CompleteSpace E
f : Ω → F
g : Ω → E
hf : StronglyMeasurable f
hfg :
  Integrable.{u_4, u_1} (ε := G) (fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω)) μ
hg : Integrable g μ
hm : m ≤ mΩ
hμm : SigmaFinite (μ.trim hm)
sets : ℕ → Set Ω
h_univ : Eq.{u_1 + 1} (α := Set Ω) (⋃ (i : ℕ), sets i) Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), LT.lt (α := ℝ≥0∞) ((μ : (a : Set Ω) → ℝ≥0∞) (sets x) : ℝ≥0∞) (∞ : ℝ≥0∞)
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ (↑x : ℝ)
pos :
  ∀ (n : ℕ),
    ∀ᵐ (ω : Ω) ∂μ,
      ω ∈ sets n →
        Eq.{u_4 + 1} (α := G)
          (μ[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m] ω : G)
          ((((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] ω) : G)
⊢ EventuallyEq.{u_1, u_4} (β := G) (ae μ)
    μ[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m] fun (ω : Ω) ↦
    (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] ω)

Tactic:
suffices ∀ n, ∀ᵐ ω ∂μ, ω ∈ sets n → (μ[fun ω ↦ B (f ω) (g ω) | m]) ω = B (f ω) (μ[g | m] ω) by
    rw [← ae_all_iff] at this
    filter_upwards [this] with ω hω
    obtain ⟨i, hi⟩ : ∃ i, ω ∈ sets i := by
      have h_mem : ω ∈ ⋃ i, sets i := by rw [h_univ]; exact Set.mem_univ _
      simpa using h_mem
    exact hω i hi
-- Module: Mathlib.MeasureTheory.Function.ConditionalExpectation.PullOut
Goal:
Ω : Type u_1
m mΩ : MeasurableSpace Ω
μ : Measure Ω
E : Type u_2
F : Type u_3
G : Type u_4
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
inst_4 : NormedAddCommGroup G
inst_5 : NormedSpace ℝ G
inst_6 : CompleteSpace G
B : F →L[ℝ] E →L[ℝ] G
inst_7 : CompleteSpace E
f : Ω → F
g : Ω → E
hf : StronglyMeasurable f
hfg :
  Integrable.{u_4, u_1} (ε := G) (fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω)) μ
hg : Integrable g μ
hm : m ≤ mΩ
hμm : SigmaFinite (μ.trim hm)
sets : ℕ → Set Ω
h_univ : Eq.{u_1 + 1} (α := Set Ω) (⋃ (i : ℕ), sets i) Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), LT.lt (α := ℝ≥0∞) ((μ : (a : Set Ω) → ℝ≥0∞) (sets x) : ℝ≥0∞) (∞ : ℝ≥0∞)
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ (↑x : ℝ)
⊢ ∀ (n : ℕ),
    ∀ᵐ (ω : Ω) ∂μ,
      ω ∈ sets n →
        Eq.{u_4 + 1} (α := G)
          (μ[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m] ω : G)
          ((((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] ω) : G)

Tactic:
fun n ↦ ae_imp_of_ae_restrict ?_

Premises used: MeasureTheory.ae_imp_of_ae_restrict
-- Module: Mathlib.MeasureTheory.Function.ConditionalExpectation.PullOut
Goal:
Ω : Type u_1
m mΩ : MeasurableSpace Ω
μ : Measure Ω
E : Type u_2
F : Type u_3
G : Type u_4
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
inst_4 : NormedAddCommGroup G
inst_5 : NormedSpace ℝ G
inst_6 : CompleteSpace G
B : F →L[ℝ] E →L[ℝ] G
inst_7 : CompleteSpace E
f : Ω → F
g : Ω → E
hf : StronglyMeasurable f
hfg :
  Integrable.{u_4, u_1} (ε := G) (fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω)) μ
hg : Integrable g μ
hm : m ≤ mΩ
hμm : SigmaFinite (μ.trim hm)
sets : ℕ → Set Ω
h_univ : Eq.{u_1 + 1} (α := Set Ω) (⋃ (i : ℕ), sets i) Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), LT.lt (α := ℝ≥0∞) ((μ : (a : Set Ω) → ℝ≥0∞) (sets x) : ℝ≥0∞) (∞ : ℝ≥0∞)
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ (↑x : ℝ)
pos :
  ∀ (n : ℕ),
    ∀ᵐ (x : Ω) ∂μ.restrict (sets n),
      Eq.{u_4 + 1} (α := G)
        (μ[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m] x : G)
        ((((B : (a : F) → E →L[ℝ] G) (f x) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] x) : G)
⊢ ∀ (n : ℕ),
    ∀ᵐ (ω : Ω) ∂μ,
      ω ∈ sets n →
        Eq.{u_4 + 1} (α := G)
          (μ[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m] ω : G)
          ((((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] ω) : G)

Tactic:
refine fun n ↦ ae_imp_of_ae_restrict ?_

Premises used: MeasureTheory.ae_imp_of_ae_restrict
-- Module: Mathlib.MeasureTheory.Function.ConditionalExpectation.PullOut
Goal:
Ω : Type u_1
m mΩ : MeasurableSpace Ω
μ : Measure Ω
E : Type u_2
F : Type u_3
G : Type u_4
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
inst_4 : NormedAddCommGroup G
inst_5 : NormedSpace ℝ G
inst_6 : CompleteSpace G
B : F →L[ℝ] E →L[ℝ] G
inst_7 : CompleteSpace E
f : Ω → F
g : Ω → E
hf : StronglyMeasurable f
hfg :
  Integrable.{u_4, u_1} (ε := G) (fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω)) μ
hg : Integrable g μ
hm : m ≤ mΩ
hμm : SigmaFinite (μ.trim hm)
sets : ℕ → Set Ω
h_univ : Eq.{u_1 + 1} (α := Set Ω) (⋃ (i : ℕ), sets i) Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), LT.lt (α := ℝ≥0∞) ((μ : (a : Set Ω) → ℝ≥0∞) (sets x) : ℝ≥0∞) (∞ : ℝ≥0∞)
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ (↑x : ℝ)
n : ℕ
this :
  EventuallyEq.{u_1, u_4} (β := G) (ae (μ.restrict (sets n)))
    (μ.restrict (sets n))[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m]
    fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) ((μ.restrict (sets n))[g | m] ω)
⊢ ∀ᵐ (x : Ω) ∂μ.restrict (sets n),
    Eq.{u_4 + 1} (α := G)
      (μ[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m] x : G)
      ((((B : (a : F) → E →L[ℝ] G) (f x) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] x) : G)

Tactic:
(condExp_restrict_ae_eq_restrict hm (h_meas n) hfg).symm.trans ?_

Premises used: Filter.EventuallyEq.trans, Filter.EventuallyEq, MeasureTheory.condExp_restrict_ae_eq_restrict, Filter.EventuallyEq.symm
-- Module: Mathlib.MeasureTheory.Function.ConditionalExpectation.PullOut
Goal:
Ω : Type u_1
m mΩ : MeasurableSpace Ω
μ : Measure Ω
E : Type u_2
F : Type u_3
G : Type u_4
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
inst_4 : NormedAddCommGroup G
inst_5 : NormedSpace ℝ G
inst_6 : CompleteSpace G
B : F →L[ℝ] E →L[ℝ] G
inst_7 : CompleteSpace E
f : Ω → F
g : Ω → E
hf : StronglyMeasurable f
hfg :
  Integrable.{u_4, u_1} (ε := G) (fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω)) μ
hg : Integrable g μ
hm : m ≤ mΩ
hμm : SigmaFinite (μ.trim hm)
sets : ℕ → Set Ω
h_univ : Eq.{u_1 + 1} (α := Set Ω) (⋃ (i : ℕ), sets i) Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), LT.lt (α := ℝ≥0∞) ((μ : (a : Set Ω) → ℝ≥0∞) (sets x) : ℝ≥0∞) (∞ : ℝ≥0∞)
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ (↑x : ℝ)
n : ℕ
this :
  EventuallyEq.{u_1, u_4} (β := G) (ae (μ.restrict (sets n)))
    (μ.restrict (sets n))[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m]
    fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) ((μ.restrict (sets n))[g | m] ω)
refine :
  EventuallyEq.{u_1, u_4} (β := G) (ae (μ.restrict (sets n)))
    (μ.restrict (sets n))[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m]
    fun (x : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f x) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] x)
⊢ ∀ᵐ (x : Ω) ∂μ.restrict (sets n),
    Eq.{u_4 + 1} (α := G)
      (μ[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m] x : G)
      ((((B : (a : F) → E →L[ℝ] G) (f x) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] x) : G)

Tactic:
refine (condExp_restrict_ae_eq_restrict hm (h_meas n) hfg).symm.trans ?_

Premises used: Filter.EventuallyEq.trans, MeasureTheory.condExp_restrict_ae_eq_restrict, Filter.EventuallyEq.symm
-- Module: Mathlib.MeasureTheory.Function.ConditionalExpectation.PullOut
Goal:
Ω : Type u_1
m mΩ : MeasurableSpace Ω
μ : Measure Ω
E : Type u_2
F : Type u_3
G : Type u_4
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
inst_4 : NormedAddCommGroup G
inst_5 : NormedSpace ℝ G
inst_6 : CompleteSpace G
B : F →L[ℝ] E →L[ℝ] G
inst_7 : CompleteSpace E
f : Ω → F
g : Ω → E
hf : StronglyMeasurable f
hfg :
  Integrable.{u_4, u_1} (ε := G) (fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω)) μ
hg : Integrable g μ
hm : m ≤ mΩ
hμm : SigmaFinite (μ.trim hm)
sets : ℕ → Set Ω
h_univ : Eq.{u_1 + 1} (α := Set Ω) (⋃ (i : ℕ), sets i) Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), LT.lt (α := ℝ≥0∞) ((μ : (a : Set Ω) → ℝ≥0∞) (sets x) : ℝ≥0∞) (∞ : ℝ≥0∞)
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ (↑x : ℝ)
n : ℕ
this :
  EventuallyEq.{u_1, u_4} (β := G) (ae (μ.restrict (sets n)))
    (μ.restrict (sets n))[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m]
    fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) ((μ.restrict (sets n))[g | m] ω)
h :
  ∀ (ω : Ω)
    (hω1 :
      Eq.{u_4 + 1} (α := G)
        ((μ.restrict (sets n))[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m]
            ω :
          G)
        ((((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) ((μ.restrict (sets n))[g | m] ω) : G))
    (hω2 : (μ.restrict (sets n))[g | m] ω = μ[g | m] ω),
    Eq.{u_4 + 1} (α := G)
      ((μ.restrict (sets n))[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m] ω :
        G)
      ((((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] ω) : G)
⊢ EventuallyEq.{u_1, u_4} (β := G) (ae (μ.restrict (sets n)))
    (μ.restrict (sets n))[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m]
    fun (x : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f x) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] x)

Tactic:
filter_upwards [this, (condExp_restrict_ae_eq_restrict hm (h_meas n) hg)] with ω hω1 hω2

Premises used: MeasureTheory.condExp_restrict_ae_eq_restrict
-- Module: Mathlib.MeasureTheory.Function.ConditionalExpectation.PullOut
Goal:
Ω : Type u_1
m mΩ : MeasurableSpace Ω
μ : Measure Ω
E : Type u_2
F : Type u_3
G : Type u_4
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
inst_4 : NormedAddCommGroup G
inst_5 : NormedSpace ℝ G
inst_6 : CompleteSpace G
B : F →L[ℝ] E →L[ℝ] G
inst_7 : CompleteSpace E
f : Ω → F
g : Ω → E
hf : StronglyMeasurable f
hfg :
  Integrable.{u_4, u_1} (ε := G) (fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω)) μ
hg : Integrable g μ
hm : m ≤ mΩ
hμm : SigmaFinite (μ.trim hm)
sets : ℕ → Set Ω
h_univ : Eq.{u_1 + 1} (α := Set Ω) (⋃ (i : ℕ), sets i) Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), LT.lt (α := ℝ≥0∞) ((μ : (a : Set Ω) → ℝ≥0∞) (sets x) : ℝ≥0∞) (∞ : ℝ≥0∞)
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ (↑x : ℝ)
n : ℕ
this :
  EventuallyEq.{u_1, u_4} (β := G) (ae (μ.restrict (sets n)))
    (μ.restrict (sets n))[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m]
    fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) ((μ.restrict (sets n))[g | m] ω)
ω : Ω
hω1 :
  Eq.{u_4 + 1} (α := G)
    ((μ.restrict (sets n))[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m] ω : G)
    ((((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) ((μ.restrict (sets n))[g | m] ω) : G)
hω2 : (μ.restrict (sets n))[g | m] ω = μ[g | m] ω
h :
  Eq.{u_4 + 1} (α := G)
    ((((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) ((μ.restrict (sets n))[g | m] ω) : G)
    ((((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] ω) : G)
h₁ h₂ :
  Eq.{u_4 + 1} (α := G) ((((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] ω) : G)
    ((((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] ω) : G)
⊢ Eq.{u_4 + 1} (α := G)
    ((μ.restrict (sets n))[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m] ω : G)
    ((((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] ω) : G)

Tactic:
rw [hω1, hω2]
-- Module: Mathlib.MeasureTheory.Function.ConditionalExpectation.PullOut
Goal:
Ω : Type u_1
m mΩ : MeasurableSpace Ω
μ : Measure Ω
E : Type u_2
F : Type u_3
G : Type u_4
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
inst_4 : NormedAddCommGroup G
inst_5 : NormedSpace ℝ G
inst_6 : CompleteSpace G
B : F →L[ℝ] E →L[ℝ] G
inst_7 : CompleteSpace E
f : Ω → F
g : Ω → E
hf : StronglyMeasurable f
hfg :
  Integrable.{u_4, u_1} (ε := G) (fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω)) μ
hg : Integrable g μ
hm : m ≤ mΩ
hμm : SigmaFinite (μ.trim hm)
sets : ℕ → Set Ω
h_univ : Eq.{u_1 + 1} (α := Set Ω) (⋃ (i : ℕ), sets i) Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), LT.lt (α := ℝ≥0∞) ((μ : (a : Set Ω) → ℝ≥0∞) (sets x) : ℝ≥0∞) (∞ : ℝ≥0∞)
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ (↑x : ℝ)
n : ℕ
pos :
  EventuallyEq.{u_1, u_4} (β := G) (ae (μ.restrict (sets n)))
    (μ.restrict (sets n))[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m]
    fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) ((μ.restrict (sets n))[g | m] ω)
⊢ ∀ᵐ (x : Ω) ∂μ.restrict (sets n),
    Eq.{u_4 + 1} (α := G)
      (μ[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m] x : G)
      ((((B : (a : F) → E →L[ℝ] G) (f x) : E →L[ℝ] G) : (a : E) → G) (μ[g | m] x) : G)

Tactic:
suffices (μ.restrict (sets n))[fun ω ↦ B (f ω) (g ω) | m] =ᵐ[μ.restrict (sets n)]
      fun ω ↦ B (f ω) ((μ.restrict (sets n))[g | m] ω) by
    refine (condExp_restrict_ae_eq_restrict hm (h_meas n) hfg).symm.trans ?_
    filter_upwards [this, (condExp_restrict_ae_eq_restrict hm (h_meas n) hg)] with ω hω1 hω2
    rw [hω1, hω2]
-- Module: Mathlib.MeasureTheory.Function.ConditionalExpectation.PullOut
Goal:
Ω : Type u_1
m mΩ : MeasurableSpace Ω
μ : Measure Ω
E : Type u_2
F : Type u_3
G : Type u_4
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
inst_4 : NormedAddCommGroup G
inst_5 : NormedSpace ℝ G
inst_6 : CompleteSpace G
B : F →L[ℝ] E →L[ℝ] G
inst_7 : CompleteSpace E
f : Ω → F
g : Ω → E
hf : StronglyMeasurable f
hfg :
  Integrable.{u_4, u_1} (ε := G) (fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω)) μ
hg : Integrable g μ
hm : m ≤ mΩ
hμm : SigmaFinite (μ.trim hm)
sets : ℕ → Set Ω
h_univ : Eq.{u_1 + 1} (α := Set Ω) (⋃ (i : ℕ), sets i) Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), LT.lt (α := ℝ≥0∞) ((μ : (a : Set Ω) → ℝ≥0∞) (sets x) : ℝ≥0∞) (∞ : ℝ≥0∞)
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ (↑x : ℝ)
n : ℕ
this :
  EventuallyEq.{u_1, u_4} (β := G) (ae (μ.restrict (sets n)))
    (μ.restrict (sets n))[fun (ω : Ω) ↦
      (((B : (a : F) → E →L[ℝ] G) ((sets n).indicator f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m]
    fun (ω : Ω) ↦
    (((B : (a : F) → E →L[ℝ] G) ((sets n).indicator f ω) : E →L[ℝ] G) : (a : E) → G) ((μ.restrict (sets n))[g | m] ω)
⊢ EventuallyEq.{u_1, u_4} (β := G) (ae (μ.restrict (sets n)))
    (μ.restrict (sets n))[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m]
    fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) ((μ.restrict (sets n))[g | m] ω)

Tactic:
EventuallyEq.trans (condExp_congr_ae ?_) (this.trans ?_)

Premises used: Filter.EventuallyEq.trans, MeasureTheory.condExp_congr_ae
-- Module: Mathlib.MeasureTheory.Function.ConditionalExpectation.PullOut
Goal:
Ω : Type u_1
m mΩ : MeasurableSpace Ω
μ : Measure Ω
E : Type u_2
F : Type u_3
G : Type u_4
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
inst_4 : NormedAddCommGroup G
inst_5 : NormedSpace ℝ G
inst_6 : CompleteSpace G
B : F →L[ℝ] E →L[ℝ] G
inst_7 : CompleteSpace E
f : Ω → F
g : Ω → E
hf : StronglyMeasurable f
hfg :
  Integrable.{u_4, u_1} (ε := G) (fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω)) μ
hg : Integrable g μ
hm : m ≤ mΩ
hμm : SigmaFinite (μ.trim hm)
sets : ℕ → Set Ω
h_univ : Eq.{u_1 + 1} (α := Set Ω) (⋃ (i : ℕ), sets i) Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), LT.lt (α := ℝ≥0∞) ((μ : (a : Set Ω) → ℝ≥0∞) (sets x) : ℝ≥0∞) (∞ : ℝ≥0∞)
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ (↑x : ℝ)
n : ℕ
this :
  EventuallyEq.{u_1, u_4} (β := G) (ae (μ.restrict (sets n)))
    (μ.restrict (sets n))[fun (ω : Ω) ↦
      (((B : (a : F) → E →L[ℝ] G) ((sets n).indicator f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m]
    fun (ω : Ω) ↦
    (((B : (a : F) → E →L[ℝ] G) ((sets n).indicator f ω) : E →L[ℝ] G) : (a : E) → G) ((μ.restrict (sets n))[g | m] ω)
refine_1 :
  EventuallyEq.{u_1, u_4} (β := G) (ae (μ.restrict (sets n)))
    (fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω)) fun (ω : Ω) ↦
    (((B : (a : F) → E →L[ℝ] G) ((sets n).indicator f ω) : E →L[ℝ] G) : (a : E) → G) (g ω)
refine_2 :
  EventuallyEq.{u_1, u_4} (β := G) (ae (μ.restrict (sets n)))
    (fun (ω : Ω) ↦
      (((B : (a : F) → E →L[ℝ] G) ((sets n).indicator f ω) : E →L[ℝ] G) : (a : E) → G) ((μ.restrict (sets n))[g | m] ω))
    fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) ((μ.restrict (sets n))[g | m] ω)
⊢ EventuallyEq.{u_1, u_4} (β := G) (ae (μ.restrict (sets n)))
    (μ.restrict (sets n))[fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m]
    fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) ((μ.restrict (sets n))[g | m] ω)

Tactic:
refine EventuallyEq.trans (condExp_congr_ae ?_) (this.trans ?_)

Premises used: Filter.EventuallyEq.trans, MeasureTheory.condExp_congr_ae
-- Module: Mathlib.MeasureTheory.Function.ConditionalExpectation.PullOut
Goal:
Ω : Type u_1
m mΩ : MeasurableSpace Ω
μ : Measure Ω
E : Type u_2
F : Type u_3
G : Type u_4
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
inst_4 : NormedAddCommGroup G
inst_5 : NormedSpace ℝ G
inst_6 : CompleteSpace G
B : F →L[ℝ] E →L[ℝ] G
inst_7 : CompleteSpace E
f : Ω → F
g : Ω → E
hf : StronglyMeasurable f
hfg :
  Integrable.{u_4, u_1} (ε := G) (fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω)) μ
hg : Integrable g μ
hm : m ≤ mΩ
hμm : SigmaFinite (μ.trim hm)
sets : ℕ → Set Ω
h_univ : Eq.{u_1 + 1} (α := Set Ω) (⋃ (i : ℕ), sets i) Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), LT.lt (α := ℝ≥0∞) ((μ : (a : Set Ω) → ℝ≥0∞) (sets x) : ℝ≥0∞) (∞ : ℝ≥0∞)
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ (↑x : ℝ)
n : ℕ
this :
  EventuallyEq.{u_1, u_4} (β := G) (ae (μ.restrict (sets n)))
    (μ.restrict (sets n))[fun (ω : Ω) ↦
      (((B : (a : F) → E →L[ℝ] G) ((sets n).indicator f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m]
    fun (ω : Ω) ↦
    (((B : (a : F) → E →L[ℝ] G) ((sets n).indicator f ω) : E →L[ℝ] G) : (a : E) → G) ((μ.restrict (sets n))[g | m] ω)
h :
  ∀ (ω : Ω) (hω : (sets n).indicator f ω = f ω),
    Eq.{u_4 + 1} (α := G) ((((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) : G)
      ((((B : (a : F) → E →L[ℝ] G) ((sets n).indicator f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) : G)
⊢ EventuallyEq.{u_1, u_4} (β := G) (ae (μ.restrict (sets n)))
    (fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω)) fun (ω : Ω) ↦
    (((B : (a : F) → E →L[ℝ] G) ((sets n).indicator f ω) : E →L[ℝ] G) : (a : E) → G) (g ω)

Tactic:
filter_upwards [indicator_ae_eq_restrict (f := f) <| hm _ <| h_meas n] with ω hω

Premises used: indicator_ae_eq_restrict
-- Module: Mathlib.MeasureTheory.Function.ConditionalExpectation.PullOut
Goal:
Ω : Type u_1
m mΩ : MeasurableSpace Ω
μ : Measure Ω
E : Type u_2
F : Type u_3
G : Type u_4
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
inst_4 : NormedAddCommGroup G
inst_5 : NormedSpace ℝ G
inst_6 : CompleteSpace G
B : F →L[ℝ] E →L[ℝ] G
inst_7 : CompleteSpace E
f : Ω → F
g : Ω → E
hf : StronglyMeasurable f
hfg :
  Integrable.{u_4, u_1} (ε := G) (fun (ω : Ω) ↦ (((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω)) μ
hg : Integrable g μ
hm : m ≤ mΩ
hμm : SigmaFinite (μ.trim hm)
sets : ℕ → Set Ω
h_univ : Eq.{u_1 + 1} (α := Set Ω) (⋃ (i : ℕ), sets i) Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), LT.lt (α := ℝ≥0∞) ((μ : (a : Set Ω) → ℝ≥0∞) (sets x) : ℝ≥0∞) (∞ : ℝ≥0∞)
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ (↑x : ℝ)
n : ℕ
this :
  EventuallyEq.{u_1, u_4} (β := G) (ae (μ.restrict (sets n)))
    (μ.restrict (sets n))[fun (ω : Ω) ↦
      (((B : (a : F) → E →L[ℝ] G) ((sets n).indicator f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) | m]
    fun (ω : Ω) ↦
    (((B : (a : F) → E →L[ℝ] G) ((sets n).indicator f ω) : E →L[ℝ] G) : (a : E) → G) ((μ.restrict (sets n))[g | m] ω)
ω : Ω
hω : (sets n).indicator f ω = f ω
h h₁ :
  Eq.{u_4 + 1} (α := G) ((((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) : G)
    ((((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) : G)
⊢ Eq.{u_4 + 1} (α := G) ((((B : (a : F) → E →L[ℝ] G) (f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) : G)
    ((((B : (a : F) → E →L[ℝ] G) ((sets n).indicator f ω) : E →L[ℝ] G) : (a : E) → G) (g ω) : G)

Tactic:
rw [hω]