Theorem: ProbabilityTheory.IsMeasurableRatCDF.measurable_measure_stieltjesFunction
File: Mathlib/Probability/Kernel/Disintegration/MeasurableStieltjes.lean

tactic: rw [Measure.measurable_measure]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
⊢ Measurable fun a => (hf.stieltjesFunction a).measure
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
⊢ ∀ (s : Set ℝ), MeasurableSet s → Measurable fun b => (hf.stieltjesFunction b).measure s

tactic: refine fun s hs ↦ MeasurableSpace.induction_on_inter
  (C := fun s ↦ Measurable fun b ↦ StieltjesFunction.measure (hf.stieltjesFunction b) s)
  (borel_eq_generateFrom_Iic ℝ) isPiSystem_Iic ?_ ?_ ?_ ?_ hs
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
⊢ ∀ (s : Set ℝ), MeasurableSet s → Measurable fun b => (hf.stieltjesFunction b).measure s
state_after: case refine_1
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
⊢ (fun s => Measurable fun b => (hf.stieltjesFunction b).measure s) ∅

case refine_2
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
⊢ ∀ t ∈ range Iic, (fun s => Measurable fun b => (hf.stieltjesFunction b).measure s) t

case refine_3
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
⊢ ∀ (t : Set ℝ),
    MeasurableSet t →
      (fun s => Measurable fun b => (hf.stieltjesFunction b).measure s) t →
        (fun s => Measurable fun b => (hf.stieltjesFunction b).measure s) tᶜ

case refine_4
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
⊢ ∀ (f_1 : ℕ → Set ℝ),
    Pairwise (Disjoint on f_1) →
      (∀ (i : ℕ), MeasurableSet (f_1 i)) →
        (∀ (i : ℕ), (fun s => Measurable fun b => (hf.stieltjesFunction b).measure s) (f_1 i)) →
          (fun s => Measurable fun b => (hf.stieltjesFunction b).measure s) (⋃ i, f_1 i)

tactic: simp only [measure_empty, measurable_const]
state_before: case refine_1
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
⊢ (fun s => Measurable fun b => (hf.stieltjesFunction b).measure s) ∅
state_after: no goals

tactic: rintro S ⟨u, rfl⟩
state_before: case refine_2
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
⊢ ∀ t ∈ range Iic, (fun s => Measurable fun b => (hf.stieltjesFunction b).measure s) t
state_after: case refine_2.intro
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
u : ℝ
⊢ Measurable fun b => (hf.stieltjesFunction b).measure (Iic u)

tactic: simp_rw [measure_stieltjesFunction_Iic hf _ u]
state_before: case refine_2.intro
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
u : ℝ
⊢ Measurable fun b => (hf.stieltjesFunction b).measure (Iic u)
state_after: case refine_2.intro
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
u : ℝ
⊢ Measurable fun b => ENNReal.ofReal (↑(hf.stieltjesFunction b) u)

tactic: exact (measurable_stieltjesFunction hf u).ennreal_ofReal
state_before: case refine_2.intro
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
u : ℝ
⊢ Measurable fun b => ENNReal.ofReal (↑(hf.stieltjesFunction b) u)
state_after: no goals

tactic: intro t ht ht_cd_meas
state_before: case refine_3
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
⊢ ∀ (t : Set ℝ),
    MeasurableSet t →
      (fun s => Measurable fun b => (hf.stieltjesFunction b).measure s) t →
        (fun s => Measurable fun b => (hf.stieltjesFunction b).measure s) tᶜ
state_after: case refine_3
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (hf.stieltjesFunction b).measure t
⊢ Measurable fun b => (hf.stieltjesFunction b).measure tᶜ

tactic: have : (fun a ↦ (hf.stieltjesFunction a).measure tᶜ) =
    (fun a ↦ (hf.stieltjesFunction a).measure univ)
      - fun a ↦ (hf.stieltjesFunction a).measure t := by
  ext1 a
  rw [measure_compl ht (measure_ne_top (hf.stieltjesFunction a).measure _), Pi.sub_apply]
state_before: case refine_3
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (hf.stieltjesFunction b).measure t
⊢ Measurable fun b => (hf.stieltjesFunction b).measure tᶜ
state_after: case refine_3
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (hf.stieltjesFunction b).measure t
this :
  (fun a => (hf.stieltjesFunction a).measure tᶜ) =
    (fun a => (hf.stieltjesFunction a).measure univ) - fun a => (hf.stieltjesFunction a).measure t
⊢ Measurable fun b => (hf.stieltjesFunction b).measure tᶜ

tactic: simp_rw [this, measure_stieltjesFunction_univ hf]
state_before: case refine_3
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (hf.stieltjesFunction b).measure t
this :
  (fun a => (hf.stieltjesFunction a).measure tᶜ) =
    (fun a => (hf.stieltjesFunction a).measure univ) - fun a => (hf.stieltjesFunction a).measure t
⊢ Measurable fun b => (hf.stieltjesFunction b).measure tᶜ
state_after: case refine_3
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (hf.stieltjesFunction b).measure t
this :
  (fun a => (hf.stieltjesFunction a).measure tᶜ) =
    (fun a => (hf.stieltjesFunction a).measure univ) - fun a => (hf.stieltjesFunction a).measure t
⊢ Measurable ((fun a => 1) - fun a => (hf.stieltjesFunction a).measure t)

tactic: exact Measurable.sub measurable_const ht_cd_meas
state_before: case refine_3
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (hf.stieltjesFunction b).measure t
this :
  (fun a => (hf.stieltjesFunction a).measure tᶜ) =
    (fun a => (hf.stieltjesFunction a).measure univ) - fun a => (hf.stieltjesFunction a).measure t
⊢ Measurable ((fun a => 1) - fun a => (hf.stieltjesFunction a).measure t)
state_after: no goals

tactic: ext1 a
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (hf.stieltjesFunction b).measure t
⊢ (fun a => (hf.stieltjesFunction a).measure tᶜ) =
    (fun a => (hf.stieltjesFunction a).measure univ) - fun a => (hf.stieltjesFunction a).measure t
state_after: case h
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (hf.stieltjesFunction b).measure t
a : α
⊢ (hf.stieltjesFunction a).measure tᶜ =
    ((fun a => (hf.stieltjesFunction a).measure univ) - fun a => (hf.stieltjesFunction a).measure t) a

tactic: rw [measure_compl ht (measure_ne_top (hf.stieltjesFunction a).measure _), Pi.sub_apply]
state_before: case h
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (hf.stieltjesFunction b).measure t
a : α
⊢ (hf.stieltjesFunction a).measure tᶜ =
    ((fun a => (hf.stieltjesFunction a).measure univ) - fun a => (hf.stieltjesFunction a).measure t) a
state_after: no goals

tactic: intro f hf_disj hf_meas hf_cd_meas
state_before: case refine_4
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : IsMeasurableRatCDF f
s : Set ℝ
hs : MeasurableSet s
⊢ ∀ (f_1 : ℕ → Set ℝ),
    Pairwise (Disjoint on f_1) →
      (∀ (i : ℕ), MeasurableSet (f_1 i)) →
        (∀ (i : ℕ), (fun s => Measurable fun b => (hf.stieltjesFunction b).measure s) (f_1 i)) →
          (fun s => Measurable fun b => (hf.stieltjesFunction b).measure s) (⋃ i, f_1 i)
state_after: case refine_4
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f✝ : α → ℚ → ℝ
hf : IsMeasurableRatCDF f✝
s : Set ℝ
hs : MeasurableSet s
f : ℕ → Set ℝ
hf_disj : Pairwise (Disjoint on f)
hf_meas : ∀ (i : ℕ), MeasurableSet (f i)
hf_cd_meas : ∀ (i : ℕ), (fun s => Measurable fun b => (hf.stieltjesFunction b).measure s) (f i)
⊢ Measurable fun b => (hf.stieltjesFunction b).measure (⋃ i, f i)

tactic: simp_rw [measure_iUnion hf_disj hf_meas]
state_before: case refine_4
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f✝ : α → ℚ → ℝ
hf : IsMeasurableRatCDF f✝
s : Set ℝ
hs : MeasurableSet s
f : ℕ → Set ℝ
hf_disj : Pairwise (Disjoint on f)
hf_meas : ∀ (i : ℕ), MeasurableSet (f i)
hf_cd_meas : ∀ (i : ℕ), (fun s => Measurable fun b => (hf.stieltjesFunction b).measure s) (f i)
⊢ Measurable fun b => (hf.stieltjesFunction b).measure (⋃ i, f i)
state_after: case refine_4
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f✝ : α → ℚ → ℝ
hf : IsMeasurableRatCDF f✝
s : Set ℝ
hs : MeasurableSet s
f : ℕ → Set ℝ
hf_disj : Pairwise (Disjoint on f)
hf_meas : ∀ (i : ℕ), MeasurableSet (f i)
hf_cd_meas : ∀ (i : ℕ), (fun s => Measurable fun b => (hf.stieltjesFunction b).measure s) (f i)
⊢ Measurable fun b => ∑' (i : ℕ), (hf.stieltjesFunction b).measure (f i)

tactic: exact Measurable.ennreal_tsum hf_cd_meas
state_before: case refine_4
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f✝ : α → ℚ → ℝ
hf : IsMeasurableRatCDF f✝
s : Set ℝ
hs : MeasurableSet s
f : ℕ → Set ℝ
hf_disj : Pairwise (Disjoint on f)
hf_meas : ∀ (i : ℕ), MeasurableSet (f i)
hf_cd_meas : ∀ (i : ℕ), (fun s => Measurable fun b => (hf.stieltjesFunction b).measure s) (f i)
⊢ Measurable fun b => ∑' (i : ℕ), (hf.stieltjesFunction b).measure (f i)
state_after: no goals