-- Mathlib/Probability/Kernel/Disintegration/CDFToKernel.lean
lemma integrable_stieltjesOfMeasurableRat [IsFiniteKernel κ] (hf : IsRatCondKernelCDF f κ ν)
    (a : α) (x : ℝ) :
    Integrable (fun b ↦ stieltjesOfMeasurableRat f hf.measurable (a, b) x) (ν a)

Proof state:
case h
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
t : β
⊢ ↑(stieltjesOfMeasurableRat f ⋯ (a, t)) x = (ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, t)) x)).toReal

Tactic:
rw [ENNReal.toReal_ofReal]

Result:
case h
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
t : β
⊢ 0 ≤ ↑(stieltjesOfMeasurableRat f ⋯ (a, t)) x

Proof state:
case refine_1
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
this :
  (fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x) = fun b =>
    (ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x)).toReal
⊢ AEMeasurable (fun b => ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x)) (ν a)

Tactic:
refine (Measurable.ennreal_ofReal ?_).aemeasurable

Result:
case refine_1
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
this :
  (fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x) = fun b =>
    (ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x)).toReal
⊢ Measurable fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x

Proof state:
case refine_1
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
this :
  (fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x) = fun b =>
    (ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x)).toReal
⊢ Measurable fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x

Tactic:
exact (measurable_stieltjesOfMeasurableRat hf.measurable x).comp measurable_prod_mk_left

Result:
no goals

Proof state:
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
⊢ Integrable (fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x) (ν a)

Tactic:
have : (fun b ↦ stieltjesOfMeasurableRat f hf.measurable (a, b) x)
    = fun b ↦ (ENNReal.ofReal (stieltjesOfMeasurableRat f hf.measurable (a, b) x)).toReal := by
  ext t
  rw [ENNReal.toReal_ofReal]
  exact stieltjesOfMeasurableRat_nonneg _ _ _

Result:
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
this :
  (fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x) = fun b =>
    (ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x)).toReal
⊢ Integrable (fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x) (ν a)

Proof state:
case h
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
t : β
⊢ 0 ≤ ↑(stieltjesOfMeasurableRat f ⋯ (a, t)) x

Tactic:
exact stieltjesOfMeasurableRat_nonneg _ _ _

Result:
no goals

Proof state:
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
this :
  (fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x) = fun b =>
    (ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x)).toReal
⊢ Integrable (fun b => (ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x)).toReal) (ν a)

Tactic:
refine integrable_toReal_of_lintegral_ne_top ?_ ?_

Result:
case refine_1
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
this :
  (fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x) = fun b =>
    (ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x)).toReal
⊢ AEMeasurable (fun b => ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x)) (ν a)

case refine_2
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
this :
  (fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x) = fun b =>
    (ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x)).toReal
⊢ ∫⁻ (x_1 : β), ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, x_1)) x) ∂ν a ≠ ⊤

Proof state:
case refine_2
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
this :
  (fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x) = fun b =>
    (ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x)).toReal
⊢ ∫⁻ (x_1 : β), ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, x_1)) x) ∂ν a ≠ ⊤

Tactic:
rw [lintegral_stieltjesOfMeasurableRat hf]

Result:
case refine_2
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
this :
  (fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x) = fun b =>
    (ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x)).toReal
⊢ (κ a) (univ ×ˢ Iic x) ≠ ⊤

Proof state:
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
this :
  (fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x) = fun b =>
    (ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x)).toReal
⊢ Integrable (fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x) (ν a)

Tactic:
rw [this]

Result:
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
this :
  (fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x) = fun b =>
    (ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x)).toReal
⊢ Integrable (fun b => (ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x)).toReal) (ν a)

Proof state:
case refine_2
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
this :
  (fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x) = fun b =>
    (ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x)).toReal
⊢ (κ a) (univ ×ˢ Iic x) ≠ ⊤

Tactic:
exact measure_ne_top _ _

Result:
no goals

Proof state:
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
⊢ (fun b => ↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x) = fun b =>
    (ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, b)) x)).toReal

Tactic:
ext t

Result:
case h
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α (β × ℝ)
ν : Kernel α β
f : α × β → ℚ → ℝ
inst✝ : IsFiniteKernel κ
hf : IsRatCondKernelCDF f κ ν
a : α
x : ℝ
t : β
⊢ ↑(stieltjesOfMeasurableRat f ⋯ (a, t)) x = (ENNReal.ofReal (↑(stieltjesOfMeasurableRat f ⋯ (a, t)) x)).toReal