Theorem: ProbabilityTheory.kernel.densityProcess_fst_univ
File: Mathlib/Probability/Kernel/Disintegration/Density.lean

tactic: rw [densityProcess]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
⊢ densityProcess κ (fst κ) n a x univ = if ((fst κ) a) (countablePartitionSet n x) = 0 then 0 else 1
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / ((fst κ) a) (countablePartitionSet n x)).toReal =
    if ((fst κ) a) (countablePartitionSet n x) = 0 then 0 else 1

tactic: by_cases h : fst κ a (countablePartitionSet n x) = 0
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / ((fst κ) a) (countablePartitionSet n x)).toReal =
    if ((fst κ) a) (countablePartitionSet n x) = 0 then 0 else 1
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ((fst κ) a) (countablePartitionSet n x) = 0
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / ((fst κ) a) (countablePartitionSet n x)).toReal =
    if ((fst κ) a) (countablePartitionSet n x) = 0 then 0 else 1

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ¬((fst κ) a) (countablePartitionSet n x) = 0
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / ((fst κ) a) (countablePartitionSet n x)).toReal =
    if ((fst κ) a) (countablePartitionSet n x) = 0 then 0 else 1

tactic: simp [h]
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ((fst κ) a) (countablePartitionSet n x) = 0
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / ((fst κ) a) (countablePartitionSet n x)).toReal =
    if ((fst κ) a) (countablePartitionSet n x) = 0 then 0 else 1
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ((fst κ) a) (countablePartitionSet n x) = 0
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / 0).toReal = 0

tactic: by_cases h' : κ a (countablePartitionSet n x ×ˢ univ) = 0
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ((fst κ) a) (countablePartitionSet n x) = 0
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / 0).toReal = 0
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ((fst κ) a) (countablePartitionSet n x) = 0
h' : (κ a) (countablePartitionSet n x ×ˢ univ) = 0
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / 0).toReal = 0

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ((fst κ) a) (countablePartitionSet n x) = 0
h' : ¬(κ a) (countablePartitionSet n x ×ˢ univ) = 0
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / 0).toReal = 0

tactic: simp [h']
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ((fst κ) a) (countablePartitionSet n x) = 0
h' : (κ a) (countablePartitionSet n x ×ˢ univ) = 0
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / 0).toReal = 0
state_after: no goals

tactic: rw [ENNReal.div_zero h']
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ((fst κ) a) (countablePartitionSet n x) = 0
h' : ¬(κ a) (countablePartitionSet n x ×ˢ univ) = 0
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / 0).toReal = 0
state_after: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ((fst κ) a) (countablePartitionSet n x) = 0
h' : ¬(κ a) (countablePartitionSet n x ×ˢ univ) = 0
⊢ ⊤.toReal = 0

tactic: simp
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ((fst κ) a) (countablePartitionSet n x) = 0
h' : ¬(κ a) (countablePartitionSet n x ×ˢ univ) = 0
⊢ ⊤.toReal = 0
state_after: no goals

tactic: simp only [h, ite_false]
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ¬((fst κ) a) (countablePartitionSet n x) = 0
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / ((fst κ) a) (countablePartitionSet n x)).toReal =
    if ((fst κ) a) (countablePartitionSet n x) = 0 then 0 else 1
state_after: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ¬((fst κ) a) (countablePartitionSet n x) = 0
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / ((fst κ) a) (countablePartitionSet n x)).toReal = 1

tactic: rw [fst_apply' _ _ (measurableSet_countablePartitionSet _ _)]
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ¬((fst κ) a) (countablePartitionSet n x) = 0
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / ((fst κ) a) (countablePartitionSet n x)).toReal = 1
state_after: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ¬((fst κ) a) (countablePartitionSet n x) = 0
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / (κ a) {p | p.1 ∈ countablePartitionSet n x}).toReal = 1

tactic: have : countablePartitionSet n x ×ˢ univ = {p : γ × β | p.1 ∈ countablePartitionSet n x} := by
  ext x
  simp
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ¬((fst κ) a) (countablePartitionSet n x) = 0
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / (κ a) {p | p.1 ∈ countablePartitionSet n x}).toReal = 1
state_after: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ¬((fst κ) a) (countablePartitionSet n x) = 0
this : countablePartitionSet n x ×ˢ univ = {p | p.1 ∈ countablePartitionSet n x}
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / (κ a) {p | p.1 ∈ countablePartitionSet n x}).toReal = 1

tactic: rw [this, ENNReal.div_self]
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ¬((fst κ) a) (countablePartitionSet n x) = 0
this : countablePartitionSet n x ×ˢ univ = {p | p.1 ∈ countablePartitionSet n x}
⊢ ((κ a) (countablePartitionSet n x ×ˢ univ) / (κ a) {p | p.1 ∈ countablePartitionSet n x}).toReal = 1
state_after: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ¬((fst κ) a) (countablePartitionSet n x) = 0
this : countablePartitionSet n x ×ˢ univ = {p | p.1 ∈ countablePartitionSet n x}
⊢ ENNReal.toReal 1 = 1

case neg.h0
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ¬((fst κ) a) (countablePartitionSet n x) = 0
this : countablePartitionSet n x ×ˢ univ = {p | p.1 ∈ countablePartitionSet n x}
⊢ (κ a) {p | p.1 ∈ countablePartitionSet n x} ≠ 0

case neg.hI
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ¬((fst κ) a) (countablePartitionSet n x) = 0
this : countablePartitionSet n x ×ˢ univ = {p | p.1 ∈ countablePartitionSet n x}
⊢ (κ a) {p | p.1 ∈ countablePartitionSet n x} ≠ ⊤

tactic: ext x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ¬((fst κ) a) (countablePartitionSet n x) = 0
⊢ countablePartitionSet n x ×ˢ univ = {p | p.1 ∈ countablePartitionSet n x}
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x✝ : γ
h : ¬((fst κ) a) (countablePartitionSet n x✝) = 0
x : γ × β
⊢ x ∈ countablePartitionSet n x✝ ×ˢ univ ↔ x ∈ {p | p.1 ∈ countablePartitionSet n x✝}

tactic: simp
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x✝ : γ
h : ¬((fst κ) a) (countablePartitionSet n x✝) = 0
x : γ × β
⊢ x ∈ countablePartitionSet n x✝ ×ˢ univ ↔ x ∈ {p | p.1 ∈ countablePartitionSet n x✝}
state_after: no goals

tactic: simp
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ¬((fst κ) a) (countablePartitionSet n x) = 0
this : countablePartitionSet n x ×ˢ univ = {p | p.1 ∈ countablePartitionSet n x}
⊢ ENNReal.toReal 1 = 1
state_after: no goals

tactic: rwa [fst_apply' _ _ (measurableSet_countablePartitionSet _ _)] at h
state_before: case neg.h0
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ¬((fst κ) a) (countablePartitionSet n x) = 0
this : countablePartitionSet n x ×ˢ univ = {p | p.1 ∈ countablePartitionSet n x}
⊢ (κ a) {p | p.1 ∈ countablePartitionSet n x} ≠ 0
state_after: no goals

tactic: exact measure_ne_top _ _
state_before: case neg.hI
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
inst✝ : IsFiniteKernel κ
n : ℕ
a : α
x : γ
h : ¬((fst κ) a) (countablePartitionSet n x) = 0
this : countablePartitionSet n x ×ˢ univ = {p | p.1 ∈ countablePartitionSet n x}
⊢ (κ a) {p | p.1 ∈ countablePartitionSet n x} ≠ ⊤
state_after: no goals