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

tactic: have : κ a (s ×ˢ t) = (kernel.fst κ ⊗ₖ kernel.condKernel κ) a (s ×ˢ t) := by
  congr; exact (kernel.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 α β
κ : ↥(kernel α (β × Ω))
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
⊢ ∫⁻ (b : β) in s, ((kernel.condKernel κ) (a, b)) t ∂(kernel.fst κ) a = (κ a) (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 α β
κ : ↥(kernel α (β × Ω))
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this : (κ a) (s ×ˢ t) = ((kernel.fst κ ⊗ₖ kernel.condKernel κ) a) (s ×ˢ t)
⊢ ∫⁻ (b : β) in s, ((kernel.condKernel κ) (a, b)) t ∂(kernel.fst κ) a = (κ a) (s ×ˢ t)

tactic: rw [this, kernel.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 α β
κ : ↥(kernel α (β × Ω))
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this : (κ a) (s ×ˢ t) = ((kernel.fst κ ⊗ₖ kernel.condKernel κ) a) (s ×ˢ t)
⊢ ∫⁻ (b : β) in s, ((kernel.condKernel κ) (a, b)) t ∂(kernel.fst κ) a = (κ a) (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 α β
κ : ↥(kernel α (β × Ω))
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this : (κ a) (s ×ˢ t) = ((kernel.fst κ ⊗ₖ kernel.condKernel κ) a) (s ×ˢ t)
⊢ ∫⁻ (b : β) in s, ((kernel.condKernel κ) (a, b)) t ∂(kernel.fst κ) a =
    ∫⁻ (b : β), ((kernel.condKernel κ) (a, b)) {c | (b, c) ∈ s ×ˢ t} ∂(kernel.fst κ) a

tactic: classical
have : ∀ b, kernel.condKernel κ (a, b) {c | (b, c) ∈ s ×ˢ t}
    = s.indicator (fun b ↦ kernel.condKernel κ (a, 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 α β
κ : ↥(kernel α (β × Ω))
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this : (κ a) (s ×ˢ t) = ((kernel.fst κ ⊗ₖ kernel.condKernel κ) a) (s ×ˢ t)
⊢ ∫⁻ (b : β) in s, ((kernel.condKernel κ) (a, b)) t ∂(kernel.fst κ) a =
    ∫⁻ (b : β), ((kernel.condKernel κ) (a, b)) {c | (b, c) ∈ s ×ˢ t} ∂(kernel.fst κ) a
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 α β
κ : ↥(kernel α (β × Ω))
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
⊢ (κ a) (s ×ˢ t) = ((kernel.fst κ ⊗ₖ kernel.condKernel κ) a) (s ×ˢ t)
state_after: case e_a.e_a
α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
κ : ↥(kernel α (β × Ω))
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
⊢ κ = kernel.fst κ ⊗ₖ kernel.condKernel κ

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

tactic: have : ∀ b, kernel.condKernel κ (a, b) {c | (b, c) ∈ s ×ˢ t}
    = s.indicator (fun b ↦ kernel.condKernel κ (a, 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 α β
κ : ↥(kernel α (β × Ω))
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this : (κ a) (s ×ˢ t) = ((kernel.fst κ ⊗ₖ kernel.condKernel κ) a) (s ×ˢ t)
⊢ ∫⁻ (b : β) in s, ((kernel.condKernel κ) (a, b)) t ∂(kernel.fst κ) a =
    ∫⁻ (b : β), ((kernel.condKernel κ) (a, b)) {c | (b, c) ∈ s ×ˢ t} ∂(kernel.fst κ) a
state_after: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
κ : ↥(kernel α (β × Ω))
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this✝ : (κ a) (s ×ˢ t) = ((kernel.fst κ ⊗ₖ kernel.condKernel κ) a) (s ×ˢ t)
this :
  ∀ (b : β),
    ((kernel.condKernel κ) (a, b)) {c | (b, c) ∈ s ×ˢ t} = s.indicator (fun b => ((kernel.condKernel κ) (a, b)) t) b
⊢ ∫⁻ (b : β) in s, ((kernel.condKernel κ) (a, b)) t ∂(kernel.fst κ) a =
    ∫⁻ (b : β), ((kernel.condKernel κ) (a, b)) {c | (b, c) ∈ s ×ˢ t} ∂(kernel.fst κ) a

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 α β
κ : ↥(kernel α (β × Ω))
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this✝ : (κ a) (s ×ˢ t) = ((kernel.fst κ ⊗ₖ kernel.condKernel κ) a) (s ×ˢ t)
this :
  ∀ (b : β),
    ((kernel.condKernel κ) (a, b)) {c | (b, c) ∈ s ×ˢ t} = s.indicator (fun b => ((kernel.condKernel κ) (a, b)) t) b
⊢ ∫⁻ (b : β) in s, ((kernel.condKernel κ) (a, b)) t ∂(kernel.fst κ) a =
    ∫⁻ (b : β), ((kernel.condKernel κ) (a, b)) {c | (b, c) ∈ s ×ˢ t} ∂(kernel.fst κ) a
state_after: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
κ : ↥(kernel α (β × Ω))
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this✝ : (κ a) (s ×ˢ t) = ((kernel.fst κ ⊗ₖ kernel.condKernel κ) a) (s ×ˢ t)
this :
  ∀ (b : β),
    ((kernel.condKernel κ) (a, b)) {c | (b, c) ∈ s ×ˢ t} = s.indicator (fun b => ((kernel.condKernel κ) (a, b)) t) b
⊢ ∫⁻ (b : β) in s, ((kernel.condKernel κ) (a, b)) t ∂(kernel.fst κ) a =
    ∫⁻ (b : β), s.indicator (fun b => ((kernel.condKernel κ) (a, b)) t) b ∂(kernel.fst κ) a

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 α β
κ : ↥(kernel α (β × Ω))
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this✝ : (κ a) (s ×ˢ t) = ((kernel.fst κ ⊗ₖ kernel.condKernel κ) a) (s ×ˢ t)
this :
  ∀ (b : β),
    ((kernel.condKernel κ) (a, b)) {c | (b, c) ∈ s ×ˢ t} = s.indicator (fun b => ((kernel.condKernel κ) (a, b)) t) b
⊢ ∫⁻ (b : β) in s, ((kernel.condKernel κ) (a, b)) t ∂(kernel.fst κ) a =
    ∫⁻ (b : β), s.indicator (fun b => ((kernel.condKernel κ) (a, b)) t) b ∂(kernel.fst κ) a
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 α β
κ : ↥(kernel α (β × Ω))
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this : (κ a) (s ×ˢ t) = ((kernel.fst κ ⊗ₖ kernel.condKernel κ) a) (s ×ˢ t)
⊢ ∀ (b : β),
    ((kernel.condKernel κ) (a, b)) {c | (b, c) ∈ s ×ˢ t} = s.indicator (fun b => ((kernel.condKernel κ) (a, 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 α β
κ : ↥(kernel α (β × Ω))
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this : (κ a) (s ×ˢ t) = ((kernel.fst κ ⊗ₖ kernel.condKernel κ) a) (s ×ˢ t)
b : β
⊢ ((kernel.condKernel κ) (a, b)) {c | (b, c) ∈ s ×ˢ t} = s.indicator (fun b => ((kernel.condKernel κ) (a, 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 α β
κ : ↥(kernel α (β × Ω))
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
this : (κ a) (s ×ˢ t) = ((kernel.fst κ ⊗ₖ kernel.condKernel κ) a) (s ×ˢ t)
b : β
⊢ ((kernel.condKernel κ) (a, b)) {c | (b, c) ∈ s ×ˢ t} = s.indicator (fun b => ((kernel.condKernel κ) (a, b)) t) b
state_after: no goals