Theorem: ProbabilityTheory.Kernel.borelMarkovFromReal_apply'
File: Mathlib/Probability/Kernel/Disintegration/StandardBorel.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
Ω✝ : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁶ : CountablyGenerated γ
inst✝⁵ : MeasurableSpace Ω✝
inst✝⁴ : StandardBorelSpace Ω✝
inst✝³ : Nonempty Ω✝
Ω : Type u_5
inst✝² : Nonempty Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : StandardBorelSpace Ω
η : Kernel α ℝ
a : α
s : Set Ω
hs : MeasurableSet s
⊢ ((borelMarkovFromReal Ω η) a) s =
    if (η a) (range (embeddingReal Ω))ᶜ = 0 then (η a) (embeddingReal Ω '' s)
    else (embeddingReal Ω '' s).indicator 1 (Exists.choose ⋯)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
Ω✝ : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁶ : CountablyGenerated γ
inst✝⁵ : MeasurableSpace Ω✝
inst✝⁴ : StandardBorelSpace Ω✝
inst✝³ : Nonempty Ω✝
Ω : Type u_5
inst✝² : Nonempty Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : StandardBorelSpace Ω
η : Kernel α ℝ
a : α
s : Set Ω
hs : MeasurableSet s
he : MeasurableEmbedding (embeddingReal Ω)
⊢ ((borelMarkovFromReal Ω η) a) s =
    if (η a) (range (embeddingReal Ω))ᶜ = 0 then (η a) (embeddingReal Ω '' s)
    else (embeddingReal Ω '' s).indicator 1 (Exists.choose ⋯)
tactic: have he := measurableEmbedding_embeddingReal Ω
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
Ω✝ : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁶ : CountablyGenerated γ
inst✝⁵ : MeasurableSpace Ω✝
inst✝⁴ : StandardBorelSpace Ω✝
inst✝³ : Nonempty Ω✝
Ω : Type u_5
inst✝² : Nonempty Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : StandardBorelSpace Ω
η : Kernel α ℝ
a : α
s : Set Ω
hs : MeasurableSet s
he : MeasurableEmbedding (embeddingReal Ω)
⊢ ((borelMarkovFromReal Ω η) a) s =
    if (η a) (range (embeddingReal Ω))ᶜ = 0 then (η a) (embeddingReal Ω '' s)
    else (embeddingReal Ω '' s).indicator 1 (Exists.choose ⋯)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
Ω✝ : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁶ : CountablyGenerated γ
inst✝⁵ : MeasurableSpace Ω✝
inst✝⁴ : StandardBorelSpace Ω✝
inst✝³ : Nonempty Ω✝
Ω : Type u_5
inst✝² : Nonempty Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : StandardBorelSpace Ω
η : Kernel α ℝ
a : α
s : Set Ω
hs : MeasurableSet s
he : MeasurableEmbedding (embeddingReal Ω)
⊢ (if (η a) (range (embeddingReal Ω))ᶜ = 0 then Measure.comap (embeddingReal Ω) (η a)
      else Measure.comap (embeddingReal Ω) (Measure.dirac (Exists.choose ⋯)))
      s =
    if (η a) (range (embeddingReal Ω))ᶜ = 0 then (η a) (embeddingReal Ω '' s)
    else (embeddingReal Ω '' s).indicator 1 (Exists.choose ⋯)
tactic: rw [borelMarkovFromReal_apply]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
Ω✝ : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁶ : CountablyGenerated γ
inst✝⁵ : MeasurableSpace Ω✝
inst✝⁴ : StandardBorelSpace Ω✝
inst✝³ : Nonempty Ω✝
Ω : Type u_5
inst✝² : Nonempty Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : StandardBorelSpace Ω
η : Kernel α ℝ
a : α
s : Set Ω
hs : MeasurableSet s
he : MeasurableEmbedding (embeddingReal Ω)
⊢ (if (η a) (range (embeddingReal Ω))ᶜ = 0 then Measure.comap (embeddingReal Ω) (η a)
      else Measure.comap (embeddingReal Ω) (Measure.dirac (Exists.choose ⋯)))
      s =
    if (η a) (range (embeddingReal Ω))ᶜ = 0 then (η a) (embeddingReal Ω '' s)
    else (embeddingReal Ω '' s).indicator 1 (Exists.choose ⋯)
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
Ω✝ : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁶ : CountablyGenerated γ
inst✝⁵ : MeasurableSpace Ω✝
inst✝⁴ : StandardBorelSpace Ω✝
inst✝³ : Nonempty Ω✝
Ω : Type u_5
inst✝² : Nonempty Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : StandardBorelSpace Ω
η : Kernel α ℝ
a : α
s : Set Ω
hs : MeasurableSet s
he : MeasurableEmbedding (embeddingReal Ω)
h : (η a) (range (embeddingReal Ω))ᶜ = 0
⊢ (Measure.comap (embeddingReal Ω) (η a)) s = (η a) (embeddingReal Ω '' s)

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
Ω✝ : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁶ : CountablyGenerated γ
inst✝⁵ : MeasurableSpace Ω✝
inst✝⁴ : StandardBorelSpace Ω✝
inst✝³ : Nonempty Ω✝
Ω : Type u_5
inst✝² : Nonempty Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : StandardBorelSpace Ω
η : Kernel α ℝ
a : α
s : Set Ω
hs : MeasurableSet s
he : MeasurableEmbedding (embeddingReal Ω)
h : ¬(η a) (range (embeddingReal Ω))ᶜ = 0
⊢ (Measure.comap (embeddingReal Ω) (Measure.dirac (Exists.choose ⋯))) s =
    (embeddingReal Ω '' s).indicator 1 (Exists.choose ⋯)
tactic: split_ifs with h