-- Mathlib/Probability/Kernel/Condexp.lean
lemma condExpKernel_ae_eq_condExp' {s : Set Ω} (hs : MeasurableSet s) :
    (fun ω ↦ (condExpKernel μ m ω s).toReal) =ᵐ[μ] μ⟦s | m ⊓ mΩ⟧

Proof state:
Ω : Type u_1
m mΩ : MeasurableSpace Ω
inst✝¹ : StandardBorelSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s : Set Ω
hs : MeasurableSet s
⊢ (fun ω => (((condExpKernel μ m) ω) s).toReal) =ᶠ[ae μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]

Tactic:
rcases isEmpty_or_nonempty Ω with h | h

Result:
case inl
Ω : Type u_1
m mΩ : MeasurableSpace Ω
inst✝¹ : StandardBorelSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s : Set Ω
hs : MeasurableSet s
h : IsEmpty Ω
⊢ (fun ω => (((condExpKernel μ m) ω) s).toReal) =ᶠ[ae μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]

case inr
Ω : Type u_1
m mΩ : MeasurableSpace Ω
inst✝¹ : StandardBorelSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s : Set Ω
hs : MeasurableSet s
h : Nonempty Ω
⊢ (fun ω => (((condExpKernel μ m) ω) s).toReal) =ᶠ[ae μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]

Proof state:
case inr
Ω : Type u_1
m mΩ : MeasurableSpace Ω
inst✝¹ : StandardBorelSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s : Set Ω
hs : MeasurableSet s
h : Nonempty Ω
⊢ (fun ω => (((condExpKernel μ m) ω) s).toReal) =ᶠ[ae μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]

Tactic:
have h := condDistrib_ae_eq_condExp (μ := μ)
  (measurable_id'' (inf_le_right : m ⊓ mΩ ≤ mΩ)) measurable_id hs

Result:
case inr
Ω : Type u_1
m mΩ : MeasurableSpace Ω
inst✝¹ : StandardBorelSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s : Set Ω
hs : MeasurableSet s
h✝ : Nonempty Ω
h :
  (fun a => (((condDistrib id id μ) (id a)) s).toReal) =ᶠ[ae μ]
    μ[(id ⁻¹' s).indicator fun ω => 1|MeasurableSpace.comap id (m ⊓ mΩ)]
⊢ (fun ω => (((condExpKernel μ m) ω) s).toReal) =ᶠ[ae μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]

Proof state:
case inr
Ω : Type u_1
m mΩ : MeasurableSpace Ω
inst✝¹ : StandardBorelSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s : Set Ω
hs : MeasurableSet s
h✝ : Nonempty Ω
h : (fun a => (((condDistrib id id μ) a) s).toReal) =ᶠ[ae μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]
⊢ (fun ω => (((condExpKernel μ m) ω) s).toReal) =ᶠ[ae μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]

Tactic:
simp_rw [condExpKernel_apply_eq_condDistrib]

Result:
case inr
Ω : Type u_1
m mΩ : MeasurableSpace Ω
inst✝¹ : StandardBorelSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s : Set Ω
hs : MeasurableSet s
h✝ : Nonempty Ω
h : (fun a => (((condDistrib id id μ) a) s).toReal) =ᶠ[ae μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]
⊢ (fun ω => (((condDistrib id id μ) (id ω)) s).toReal) =ᶠ[ae μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]

Proof state:
case inl
Ω : Type u_1
m mΩ : MeasurableSpace Ω
inst✝¹ : StandardBorelSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s : Set Ω
hs : MeasurableSet s
h : IsEmpty Ω
⊢ (fun ω => (((condExpKernel μ m) ω) s).toReal) =ᶠ[ae μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]

Tactic:
have : μ = 0 := Measure.eq_zero_of_isEmpty μ

Result:
case inl
Ω : Type u_1
m mΩ : MeasurableSpace Ω
inst✝¹ : StandardBorelSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s : Set Ω
hs : MeasurableSet s
h : IsEmpty Ω
this : μ = 0
⊢ (fun ω => (((condExpKernel μ m) ω) s).toReal) =ᶠ[ae μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]

Proof state:
case inr
Ω : Type u_1
m mΩ : MeasurableSpace Ω
inst✝¹ : StandardBorelSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s : Set Ω
hs : MeasurableSet s
h✝ : Nonempty Ω
h :
  (fun a => (((condDistrib id id μ) (id a)) s).toReal) =ᶠ[ae μ]
    μ[(id ⁻¹' s).indicator fun ω => 1|MeasurableSpace.comap id (m ⊓ mΩ)]
⊢ (fun ω => (((condExpKernel μ m) ω) s).toReal) =ᶠ[ae μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]

Tactic:
simp only [id_eq, MeasurableSpace.comap_id, preimage_id_eq] at h

Result:
case inr
Ω : Type u_1
m mΩ : MeasurableSpace Ω
inst✝¹ : StandardBorelSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s : Set Ω
hs : MeasurableSet s
h✝ : Nonempty Ω
h : (fun a => (((condDistrib id id μ) a) s).toReal) =ᶠ[ae μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]
⊢ (fun ω => (((condExpKernel μ m) ω) s).toReal) =ᶠ[ae μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]

Proof state:
case inr
Ω : Type u_1
m mΩ : MeasurableSpace Ω
inst✝¹ : StandardBorelSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s : Set Ω
hs : MeasurableSet s
h✝ : Nonempty Ω
h : (fun a => (((condDistrib id id μ) a) s).toReal) =ᶠ[ae μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]
⊢ (fun ω => (((condDistrib id id μ) (id ω)) s).toReal) =ᶠ[ae μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]

Tactic:
exact h

Result:
no goals

Proof state:
case inl
Ω : Type u_1
m mΩ : MeasurableSpace Ω
inst✝¹ : StandardBorelSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s : Set Ω
hs : MeasurableSet s
h : IsEmpty Ω
this : μ = 0
⊢ (fun ω => (((condExpKernel μ m) ω) s).toReal) =ᶠ[ae μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]

Tactic:
simpa [this] using trivial

Result:
no goals