Theorem: MeasureTheory.Measure.setLIntegral_condKernel_eq_measure_prod
File: Mathlib/Probability/Kernel/Disintegration/Integral.lean

tactic: have : ρ (s ×ˢ t) = (ρ.fst ⊗ₘ ρ.condKernel) (s ×ˢ t) := by
  congr; exact (compProd_fst_condKernel ρ).symm
state_before: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
⊢ ∫⁻ (b : β) in s, (ρ.condKernel b) t ∂ρ.fst = ρ (s ×ˢ t)
state_after: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this : ρ (s ×ˢ t) = (ρ.fst ⊗ₘ ρ.condKernel) (s ×ˢ t)
⊢ ∫⁻ (b : β) in s, (ρ.condKernel b) t ∂ρ.fst = ρ (s ×ˢ t)

tactic: rw [this, compProd_apply (hs.prod ht)]
state_before: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this : ρ (s ×ˢ t) = (ρ.fst ⊗ₘ ρ.condKernel) (s ×ˢ t)
⊢ ∫⁻ (b : β) in s, (ρ.condKernel b) t ∂ρ.fst = ρ (s ×ˢ t)
state_after: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this : ρ (s ×ˢ t) = (ρ.fst ⊗ₘ ρ.condKernel) (s ×ˢ t)
⊢ ∫⁻ (b : β) in s, (ρ.condKernel b) t ∂ρ.fst = ∫⁻ (a : β), (ρ.condKernel a) (Prod.mk a ⁻¹' s ×ˢ t) ∂ρ.fst

tactic: classical
have : ∀ b, ρ.condKernel b (Prod.mk b ⁻¹' s ×ˢ t)
    = s.indicator (fun b ↦ ρ.condKernel b t) b := by
  intro b
  by_cases hb : b ∈ s <;> simp [hb]
simp_rw [this]
rw [lintegral_indicator _ hs]
state_before: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this : ρ (s ×ˢ t) = (ρ.fst ⊗ₘ ρ.condKernel) (s ×ˢ t)
⊢ ∫⁻ (b : β) in s, (ρ.condKernel b) t ∂ρ.fst = ∫⁻ (a : β), (ρ.condKernel a) (Prod.mk a ⁻¹' s ×ˢ t) ∂ρ.fst
state_after: no goals

tactic: congr
state_before: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
⊢ ρ (s ×ˢ t) = (ρ.fst ⊗ₘ ρ.condKernel) (s ×ˢ t)
state_after: case e_a
α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
⊢ ρ = ρ.fst ⊗ₘ ρ.condKernel

tactic: exact (compProd_fst_condKernel ρ).symm
state_before: case e_a
α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
⊢ ρ = ρ.fst ⊗ₘ ρ.condKernel
state_after: no goals

tactic: have : ∀ b, ρ.condKernel b (Prod.mk b ⁻¹' s ×ˢ t)
    = s.indicator (fun b ↦ ρ.condKernel b t) b := by
  intro b
  by_cases hb : b ∈ s <;> simp [hb]
state_before: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this : ρ (s ×ˢ t) = (ρ.fst ⊗ₘ ρ.condKernel) (s ×ˢ t)
⊢ ∫⁻ (b : β) in s, (ρ.condKernel b) t ∂ρ.fst = ∫⁻ (a : β), (ρ.condKernel a) (Prod.mk a ⁻¹' s ×ˢ t) ∂ρ.fst
state_after: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this✝ : ρ (s ×ˢ t) = (ρ.fst ⊗ₘ ρ.condKernel) (s ×ˢ t)
this : ∀ (b : β), (ρ.condKernel b) (Prod.mk b ⁻¹' s ×ˢ t) = s.indicator (fun b => (ρ.condKernel b) t) b
⊢ ∫⁻ (b : β) in s, (ρ.condKernel b) t ∂ρ.fst = ∫⁻ (a : β), (ρ.condKernel a) (Prod.mk a ⁻¹' s ×ˢ t) ∂ρ.fst

tactic: simp_rw [this]
state_before: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this✝ : ρ (s ×ˢ t) = (ρ.fst ⊗ₘ ρ.condKernel) (s ×ˢ t)
this : ∀ (b : β), (ρ.condKernel b) (Prod.mk b ⁻¹' s ×ˢ t) = s.indicator (fun b => (ρ.condKernel b) t) b
⊢ ∫⁻ (b : β) in s, (ρ.condKernel b) t ∂ρ.fst = ∫⁻ (a : β), (ρ.condKernel a) (Prod.mk a ⁻¹' s ×ˢ t) ∂ρ.fst
state_after: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this✝ : ρ (s ×ˢ t) = (ρ.fst ⊗ₘ ρ.condKernel) (s ×ˢ t)
this : ∀ (b : β), (ρ.condKernel b) (Prod.mk b ⁻¹' s ×ˢ t) = s.indicator (fun b => (ρ.condKernel b) t) b
⊢ ∫⁻ (b : β) in s, (ρ.condKernel b) t ∂ρ.fst = ∫⁻ (a : β), s.indicator (fun b => (ρ.condKernel b) t) a ∂ρ.fst

tactic: rw [lintegral_indicator _ hs]
state_before: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this✝ : ρ (s ×ˢ t) = (ρ.fst ⊗ₘ ρ.condKernel) (s ×ˢ t)
this : ∀ (b : β), (ρ.condKernel b) (Prod.mk b ⁻¹' s ×ˢ t) = s.indicator (fun b => (ρ.condKernel b) t) b
⊢ ∫⁻ (b : β) in s, (ρ.condKernel b) t ∂ρ.fst = ∫⁻ (a : β), s.indicator (fun b => (ρ.condKernel b) t) a ∂ρ.fst
state_after: no goals

tactic: intro b
state_before: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this : ρ (s ×ˢ t) = (ρ.fst ⊗ₘ ρ.condKernel) (s ×ˢ t)
⊢ ∀ (b : β), (ρ.condKernel b) (Prod.mk b ⁻¹' s ×ˢ t) = s.indicator (fun b => (ρ.condKernel b) t) b
state_after: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this : ρ (s ×ˢ t) = (ρ.fst ⊗ₘ ρ.condKernel) (s ×ˢ t)
b : β
⊢ (ρ.condKernel b) (Prod.mk b ⁻¹' s ×ˢ t) = s.indicator (fun b => (ρ.condKernel b) t) b

tactic: by_cases hb : b ∈ s <;> simp [hb]
state_before: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
ρ : Measure (β × Ω)
inst✝ : IsFiniteMeasure ρ
f : β × Ω → ℝ≥0∞
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this : ρ (s ×ˢ t) = (ρ.fst ⊗ₘ ρ.condKernel) (s ×ˢ t)
b : β
⊢ (ρ.condKernel b) (Prod.mk b ⁻¹' s ×ˢ t) = s.indicator (fun b => (ρ.condKernel b) t) b
state_after: no goals