Theorem: ProbabilityTheory.measurable_measure_condCDF
File: Mathlib/Probability/Kernel/Disintegration/CondCdf.lean

tactic: rw [Measure.measurable_measure]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
⊢ Measurable fun a => (condCDF ρ a).measure
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
⊢ ∀ (s : Set ℝ), MeasurableSet s → Measurable fun b => (condCDF ρ b).measure s

tactic: refine fun s hs => ?_
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
⊢ ∀ (s : Set ℝ), MeasurableSet s → Measurable fun b => (condCDF ρ b).measure s
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
⊢ Measurable fun b => (condCDF ρ b).measure s

tactic: refine MeasurableSpace.induction_on_inter
  (C := fun s => Measurable fun b ↦ StieltjesFunction.measure (condCDF ρ b) s)
  (borel_eq_generateFrom_Iic ℝ) isPiSystem_Iic ?_ ?_ ?_ ?_ hs
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
⊢ Measurable fun b => (condCDF ρ b).measure s
state_after: case refine_1
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
⊢ (fun s => Measurable fun b => (condCDF ρ b).measure s) ∅

case refine_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
⊢ ∀ t ∈ range Iic, (fun s => Measurable fun b => (condCDF ρ b).measure s) t

case refine_3
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
⊢ ∀ (t : Set ℝ),
    MeasurableSet t →
      (fun s => Measurable fun b => (condCDF ρ b).measure s) t →
        (fun s => Measurable fun b => (condCDF ρ b).measure s) tᶜ

case refine_4
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
⊢ ∀ (f : ℕ → Set ℝ),
    Pairwise (Disjoint on f) →
      (∀ (i : ℕ), MeasurableSet (f i)) →
        (∀ (i : ℕ), (fun s => Measurable fun b => (condCDF ρ b).measure s) (f i)) →
          (fun s => Measurable fun b => (condCDF ρ b).measure s) (⋃ i, f i)

tactic: simp only [measure_empty, measurable_const]
state_before: case refine_1
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
⊢ (fun s => Measurable fun b => (condCDF ρ 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
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
⊢ ∀ t ∈ range Iic, (fun s => Measurable fun b => (condCDF ρ b).measure s) t
state_after: case refine_2.intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
u : ℝ
⊢ Measurable fun b => (condCDF ρ b).measure (Iic u)

tactic: simp_rw [measure_condCDF_Iic ρ _ u]
state_before: case refine_2.intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
u : ℝ
⊢ Measurable fun b => (condCDF ρ b).measure (Iic u)
state_after: case refine_2.intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
u : ℝ
⊢ Measurable fun b => ENNReal.ofReal (↑(condCDF ρ b) u)

tactic: exact (measurable_condCDF ρ u).ennreal_ofReal
state_before: case refine_2.intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
u : ℝ
⊢ Measurable fun b => ENNReal.ofReal (↑(condCDF ρ 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
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
⊢ ∀ (t : Set ℝ),
    MeasurableSet t →
      (fun s => Measurable fun b => (condCDF ρ b).measure s) t →
        (fun s => Measurable fun b => (condCDF ρ b).measure s) tᶜ
state_after: case refine_3
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (condCDF ρ b).measure t
⊢ Measurable fun b => (condCDF ρ b).measure tᶜ

tactic: have :
  (fun a => (condCDF ρ a).measure tᶜ) =
    (fun a => (condCDF ρ a).measure univ) - fun a => (condCDF ρ a).measure t := by
  ext1 a
  rw [measure_compl ht (measure_ne_top (condCDF ρ a).measure _), Pi.sub_apply]
state_before: case refine_3
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (condCDF ρ b).measure t
⊢ Measurable fun b => (condCDF ρ b).measure tᶜ
state_after: case refine_3
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (condCDF ρ b).measure t
this : (fun a => (condCDF ρ a).measure tᶜ) = (fun a => (condCDF ρ a).measure univ) - fun a => (condCDF ρ a).measure t
⊢ Measurable fun b => (condCDF ρ b).measure tᶜ

tactic: simp_rw [this, measure_condCDF_univ ρ]
state_before: case refine_3
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (condCDF ρ b).measure t
this : (fun a => (condCDF ρ a).measure tᶜ) = (fun a => (condCDF ρ a).measure univ) - fun a => (condCDF ρ a).measure t
⊢ Measurable fun b => (condCDF ρ b).measure tᶜ
state_after: case refine_3
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (condCDF ρ b).measure t
this : (fun a => (condCDF ρ a).measure tᶜ) = (fun a => (condCDF ρ a).measure univ) - fun a => (condCDF ρ a).measure t
⊢ Measurable ((fun a => 1) - fun a => (condCDF ρ 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
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (condCDF ρ b).measure t
this : (fun a => (condCDF ρ a).measure tᶜ) = (fun a => (condCDF ρ a).measure univ) - fun a => (condCDF ρ a).measure t
⊢ Measurable ((fun a => 1) - fun a => (condCDF ρ a).measure t)
state_after: no goals

tactic: ext1 a
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (condCDF ρ b).measure t
⊢ (fun a => (condCDF ρ a).measure tᶜ) = (fun a => (condCDF ρ a).measure univ) - fun a => (condCDF ρ a).measure t
state_after: case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (condCDF ρ b).measure t
a : α
⊢ (condCDF ρ a).measure tᶜ = ((fun a => (condCDF ρ a).measure univ) - fun a => (condCDF ρ a).measure t) a

tactic: rw [measure_compl ht (measure_ne_top (condCDF ρ a).measure _), Pi.sub_apply]
state_before: case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => (condCDF ρ b).measure t
a : α
⊢ (condCDF ρ a).measure tᶜ = ((fun a => (condCDF ρ a).measure univ) - fun a => (condCDF ρ 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
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
⊢ ∀ (f : ℕ → Set ℝ),
    Pairwise (Disjoint on f) →
      (∀ (i : ℕ), MeasurableSet (f i)) →
        (∀ (i : ℕ), (fun s => Measurable fun b => (condCDF ρ b).measure s) (f i)) →
          (fun s => Measurable fun b => (condCDF ρ b).measure s) (⋃ i, f i)
state_after: case refine_4
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
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 => (condCDF ρ b).measure s) (f i)
⊢ Measurable fun b => (condCDF ρ 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
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
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 => (condCDF ρ b).measure s) (f i)
⊢ Measurable fun b => (condCDF ρ b).measure (⋃ i, f i)
state_after: case refine_4
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
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 => (condCDF ρ b).measure s) (f i)
⊢ Measurable fun b => ∑' (i : ℕ), (condCDF ρ 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
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
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 => (condCDF ρ b).measure s) (f i)
⊢ Measurable fun b => ∑' (i : ℕ), (condCDF ρ b).measure (f i)
state_after: no goals