Theorem: ProbabilityTheory.sum_meas_smul_cond_fiber
File: Mathlib/Probability/ConditionalProbability.lean

tactic: ext E hE
state_before: Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ✝ : Measure Ω
s t : Set Ω
inst✝³ : Fintype α
inst✝² : MeasurableSpace α
inst✝¹ : DiscreteMeasurableSpace α
X : Ω → α
hX : Measurable X
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
⊢ ∑ x : α, μ (X ⁻¹' {x}) • μ[|X ⁻¹' {x}] = μ
state_after: case h
Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ✝ : Measure Ω
s t : Set Ω
inst✝³ : Fintype α
inst✝² : MeasurableSpace α
inst✝¹ : DiscreteMeasurableSpace α
X : Ω → α
hX : Measurable X
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
E : Set Ω
hE : MeasurableSet E
⊢ (∑ x : α, μ (X ⁻¹' {x}) • μ[|X ⁻¹' {x}]) E = μ E

tactic: calc
  _ = ∑ x, μ (X ⁻¹' {x} ∩ E) := by
    simp only [Measure.coe_finset_sum, Measure.coe_smul, Finset.sum_apply,
      Pi.smul_apply, smul_eq_mul]
    simp_rw [mul_comm (μ _), cond_mul_eq_inter _ (hX (.singleton _))]
  _ = _ := by
    have : ⋃ x ∈ Finset.univ, X ⁻¹' {x} ∩ E = E := by simp; ext _; simp
    rw [← measure_biUnion_finset _ fun _ _ ↦ (hX (.singleton _)).inter hE, this]
    aesop (add simp [PairwiseDisjoint, Set.Pairwise, Function.onFun, disjoint_left])
state_before: case h
Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ✝ : Measure Ω
s t : Set Ω
inst✝³ : Fintype α
inst✝² : MeasurableSpace α
inst✝¹ : DiscreteMeasurableSpace α
X : Ω → α
hX : Measurable X
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
E : Set Ω
hE : MeasurableSet E
⊢ (∑ x : α, μ (X ⁻¹' {x}) • μ[|X ⁻¹' {x}]) E = μ E
state_after: no goals

tactic: simp only [Measure.coe_finset_sum, Measure.coe_smul, Finset.sum_apply,
  Pi.smul_apply, smul_eq_mul]
state_before: Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ✝ : Measure Ω
s t : Set Ω
inst✝³ : Fintype α
inst✝² : MeasurableSpace α
inst✝¹ : DiscreteMeasurableSpace α
X : Ω → α
hX : Measurable X
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
E : Set Ω
hE : MeasurableSet E
⊢ (∑ x : α, μ (X ⁻¹' {x}) • μ[|X ⁻¹' {x}]) E = ∑ x : α, μ (X ⁻¹' {x} ∩ E)
state_after: Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ✝ : Measure Ω
s t : Set Ω
inst✝³ : Fintype α
inst✝² : MeasurableSpace α
inst✝¹ : DiscreteMeasurableSpace α
X : Ω → α
hX : Measurable X
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
E : Set Ω
hE : MeasurableSet E
⊢ ∑ x : α, μ (X ⁻¹' {x}) * μ[|X ⁻¹' {x}] E = ∑ x : α, μ (X ⁻¹' {x} ∩ E)

tactic: simp_rw [mul_comm (μ _), cond_mul_eq_inter _ (hX (.singleton _))]
state_before: Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ✝ : Measure Ω
s t : Set Ω
inst✝³ : Fintype α
inst✝² : MeasurableSpace α
inst✝¹ : DiscreteMeasurableSpace α
X : Ω → α
hX : Measurable X
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
E : Set Ω
hE : MeasurableSet E
⊢ ∑ x : α, μ (X ⁻¹' {x}) * μ[|X ⁻¹' {x}] E = ∑ x : α, μ (X ⁻¹' {x} ∩ E)
state_after: no goals

tactic: have : ⋃ x ∈ Finset.univ, X ⁻¹' {x} ∩ E = E := by simp; ext _; simp
state_before: Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ✝ : Measure Ω
s t : Set Ω
inst✝³ : Fintype α
inst✝² : MeasurableSpace α
inst✝¹ : DiscreteMeasurableSpace α
X : Ω → α
hX : Measurable X
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
E : Set Ω
hE : MeasurableSet E
⊢ ∑ x : α, μ (X ⁻¹' {x} ∩ E) = μ E
state_after: Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ✝ : Measure Ω
s t : Set Ω
inst✝³ : Fintype α
inst✝² : MeasurableSpace α
inst✝¹ : DiscreteMeasurableSpace α
X : Ω → α
hX : Measurable X
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
E : Set Ω
hE : MeasurableSet E
this : ⋃ x ∈ Finset.univ, X ⁻¹' {x} ∩ E = E
⊢ ∑ x : α, μ (X ⁻¹' {x} ∩ E) = μ E

tactic: rw [← measure_biUnion_finset _ fun _ _ ↦ (hX (.singleton _)).inter hE, this]
state_before: Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ✝ : Measure Ω
s t : Set Ω
inst✝³ : Fintype α
inst✝² : MeasurableSpace α
inst✝¹ : DiscreteMeasurableSpace α
X : Ω → α
hX : Measurable X
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
E : Set Ω
hE : MeasurableSet E
this : ⋃ x ∈ Finset.univ, X ⁻¹' {x} ∩ E = E
⊢ ∑ x : α, μ (X ⁻¹' {x} ∩ E) = μ E
state_after: Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ✝ : Measure Ω
s t : Set Ω
inst✝³ : Fintype α
inst✝² : MeasurableSpace α
inst✝¹ : DiscreteMeasurableSpace α
X : Ω → α
hX : Measurable X
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
E : Set Ω
hE : MeasurableSet E
this : ⋃ x ∈ Finset.univ, X ⁻¹' {x} ∩ E = E
⊢ (↑Finset.univ).PairwiseDisjoint fun x => X ⁻¹' {x} ∩ E

tactic: aesop (add simp [PairwiseDisjoint, Set.Pairwise, Function.onFun, disjoint_left])
state_before: Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ✝ : Measure Ω
s t : Set Ω
inst✝³ : Fintype α
inst✝² : MeasurableSpace α
inst✝¹ : DiscreteMeasurableSpace α
X : Ω → α
hX : Measurable X
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
E : Set Ω
hE : MeasurableSet E
this : ⋃ x ∈ Finset.univ, X ⁻¹' {x} ∩ E = E
⊢ (↑Finset.univ).PairwiseDisjoint fun x => X ⁻¹' {x} ∩ E
state_after: no goals

tactic: simp
state_before: Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ✝ : Measure Ω
s t : Set Ω
inst✝³ : Fintype α
inst✝² : MeasurableSpace α
inst✝¹ : DiscreteMeasurableSpace α
X : Ω → α
hX : Measurable X
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
E : Set Ω
hE : MeasurableSet E
⊢ ⋃ x ∈ Finset.univ, X ⁻¹' {x} ∩ E = E
state_after: Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ✝ : Measure Ω
s t : Set Ω
inst✝³ : Fintype α
inst✝² : MeasurableSpace α
inst✝¹ : DiscreteMeasurableSpace α
X : Ω → α
hX : Measurable X
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
E : Set Ω
hE : MeasurableSet E
⊢ ⋃ x, X ⁻¹' {x} ∩ E = E

tactic: ext _
state_before: Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ✝ : Measure Ω
s t : Set Ω
inst✝³ : Fintype α
inst✝² : MeasurableSpace α
inst✝¹ : DiscreteMeasurableSpace α
X : Ω → α
hX : Measurable X
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
E : Set Ω
hE : MeasurableSet E
⊢ ⋃ x, X ⁻¹' {x} ∩ E = E
state_after: case h
Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ✝ : Measure Ω
s t : Set Ω
inst✝³ : Fintype α
inst✝² : MeasurableSpace α
inst✝¹ : DiscreteMeasurableSpace α
X : Ω → α
hX : Measurable X
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
E : Set Ω
hE : MeasurableSet E
x✝ : Ω
⊢ x✝ ∈ ⋃ x, X ⁻¹' {x} ∩ E ↔ x✝ ∈ E

tactic: simp
state_before: case h
Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ✝ : Measure Ω
s t : Set Ω
inst✝³ : Fintype α
inst✝² : MeasurableSpace α
inst✝¹ : DiscreteMeasurableSpace α
X : Ω → α
hX : Measurable X
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
E : Set Ω
hE : MeasurableSet E
x✝ : Ω
⊢ x✝ ∈ ⋃ x, X ⁻¹' {x} ∩ E ↔ x✝ ∈ E
state_after: no goals