l3lab/ntp-mathlib huggingface dataset:
theorem lintegral_condKernelReal_mem {s : Set (α × ℝ)} (hs : MeasurableSet s) :
    ∫⁻ a, condKernelReal ρ a {x | (a, x) ∈ s} ∂ρ.fst = ρ s := by
  -- `set_lintegral_condKernelReal_prod` gives the result for sets of the form `t₁ × t₂`. These
  -- sets form a π-system that generates the product σ-algebra, hence we can get the same equality
  -- for any measurable set `s`.
  apply MeasurableSpace.induction_on_inter generateFrom_prod.symm isPiSystem_prod _ _ _ _ hs
  · simp only [mem_empty_iff_false, setOf_false, measure_empty, lintegral_const,
      zero_mul]
  · intro t ht
    rw [mem_image2] at ht
    obtain ⟨t₁, t₂, ht₁, ht₂, rfl⟩ := ht
    have h_prod_eq_snd : ∀ a ∈ t₁, {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} = t₂ := by
      intro a ha
      simp only [ha, prod_mk_mem_set_prod_eq, true_and_iff, setOf_mem_eq]
    rw [← lintegral_add_compl _ ht₁]
    have h_eq1 : ∫⁻ a in t₁, condKernelReal ρ a {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} ∂ρ.fst =
        ∫⁻ a in t₁, condKernelReal ρ a t₂ ∂ρ.fst := by
      refine' set_lintegral_congr_fun ht₁ (eventually_of_forall fun a ha => _)
      rw [h_prod_eq_snd a ha]
    have h_eq2 : ∫⁻ a in t₁ᶜ, condKernelReal ρ a {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} ∂ρ.fst = 0 := by
      suffices h_eq_zero : ∀ a ∈ t₁ᶜ, condKernelReal ρ a {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} = 0
      · rw [set_lintegral_congr_fun ht₁.compl (eventually_of_forall h_eq_zero)]
        simp only [lintegral_const, zero_mul]
      intro a hat₁
      rw [mem_compl_iff] at hat₁
      simp only [hat₁, prod_mk_mem_set_prod_eq, false_and_iff, setOf_false, measure_empty]
    rw [h_eq1, h_eq2, add_zero]
    exact set_lintegral_condKernelReal_prod ρ ht₁ ht₂
  · intro t ht ht_eq
    calc
      ∫⁻ a, condKernelReal ρ a {x : ℝ | (a, x) ∈ tᶜ} ∂ρ.fst =
          ∫⁻ a, condKernelReal ρ a {x : ℝ | (a, x) ∈ t}ᶜ ∂ρ.fst := rfl
      _ = ∫⁻ a, condKernelReal ρ a univ - condKernelReal ρ a {x : ℝ | (a, x) ∈ t} ∂ρ.fst := by
        congr with a : 1
        exact measure_compl (measurable_prod_mk_left ht) (measure_ne_top (condKernelReal ρ a) _)
      _ = ∫⁻ a, condKernelReal ρ a univ ∂ρ.fst -
          ∫⁻ a, condKernelReal ρ a {x : ℝ | (a, x) ∈ t} ∂ρ.fst := by
        have h_le : (fun a => condKernelReal ρ a {x : ℝ | (a, x) ∈ t}) ≤ᵐ[ρ.fst] fun a =>
            condKernelReal ρ a univ := eventually_of_forall fun a => measure_mono (subset_univ _)
        rw [lintegral_sub _ _ h_le]
        · exact kernel.measurable_kernel_prod_mk_left ht
        refine' ((lintegral_mono_ae h_le).trans_lt _).ne
        

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set (α × ℝ)
hs : MeasurableSet s
t : Set (α × ℝ)
ht : MeasurableSet t
ht_eq : ∫⁻ (a : α), ↑↑((condKernelReal ρ) a) {x | (a, x) ∈ t} ∂Measure.fst ρ = ↑↑ρ t
h_le : (fun a => ↑↑((condKernelReal ρ) a) {x | (a, x) ∈ t}) ≤ᵐ[Measure.fst ρ] fun a => ↑↑((condKernelReal ρ) a) univ
⊢ ∫⁻ (a : α), (fun a => ↑↑((condKernelReal ρ) a) univ) a ∂Measure.fst ρ < ⊤

Next tactic:
rw [lintegral_condKernelReal_univ]
theorem lintegral_condKernelReal_mem {s : Set (α × ℝ)} (hs : MeasurableSet s) :
    ∫⁻ a, condKernelReal ρ a {x | (a, x) ∈ s} ∂ρ.fst = ρ s := by
  -- `set_lintegral_condKernelReal_prod` gives the result for sets of the form `t₁ × t₂`. These
  -- sets form a π-system that generates the product σ-algebra, hence we can get the same equality
  -- for any measurable set `s`.
  apply MeasurableSpace.induction_on_inter generateFrom_prod.symm isPiSystem_prod _ _ _ _ hs
  · simp only [mem_empty_iff_false, setOf_false, measure_empty, lintegral_const,
      zero_mul]
  · intro t ht
    rw [mem_image2] at ht
    obtain ⟨t₁, t₂, ht₁, ht₂, rfl⟩ := ht
    have h_prod_eq_snd : ∀ a ∈ t₁, {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} = t₂ := by
      intro a ha
      simp only [ha, prod_mk_mem_set_prod_eq, true_and_iff, setOf_mem_eq]
    rw [← lintegral_add_compl _ ht₁]
    have h_eq1 : ∫⁻ a in t₁, condKernelReal ρ a {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} ∂ρ.fst =
        ∫⁻ a in t₁, condKernelReal ρ a t₂ ∂ρ.fst := by
      refine' set_lintegral_congr_fun ht₁ (eventually_of_forall fun a ha => _)
      rw [h_prod_eq_snd a ha]
    have h_eq2 : ∫⁻ a in t₁ᶜ, condKernelReal ρ a {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} ∂ρ.fst = 0 := by
      suffices h_eq_zero : ∀ a ∈ t₁ᶜ, condKernelReal ρ a {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} = 0
      · rw [set_lintegral_congr_fun ht₁.compl (eventually_of_forall h_eq_zero)]
        simp only [lintegral_const, zero_mul]
      intro a hat₁
      rw [mem_compl_iff] at hat₁
      simp only [hat₁, prod_mk_mem_set_prod_eq, false_and_iff, setOf_false, measure_empty]
    rw [h_eq1, h_eq2, add_zero]
    exact set_lintegral_condKernelReal_prod ρ ht₁ ht₂
  · intro t ht ht_eq
    calc
      ∫⁻ a, condKernelReal ρ a {x : ℝ | (a, x) ∈ tᶜ} ∂ρ.fst =
          ∫⁻ a, condKernelReal ρ a {x : ℝ | (a, x) ∈ t}ᶜ ∂ρ.fst := rfl
      _ = ∫⁻ a, condKernelReal ρ a univ - condKernelReal ρ a {x : ℝ | (a, x) ∈ t} ∂ρ.fst := by
        congr with a : 1
        exact measure_compl (measurable_prod_mk_left ht) (measure_ne_top (condKernelReal ρ a) _)
      _ = ∫⁻ a, condKernelReal ρ a univ ∂ρ.fst -
          ∫⁻ a, condKernelReal ρ a {x : ℝ | (a, x) ∈ t} ∂ρ.fst := by
        have h_le : (fun a => condKernelReal ρ a {x : ℝ | (a, x) ∈ t}) ≤ᵐ[ρ.fst] fun a =>
            condKernelReal ρ a univ := eventually_of_forall fun a => measure_mono (subset_univ _)
        rw [lintegral_sub _ _ h_le]
        · exact kernel.measurable_kernel_prod_mk_left ht
        refine' ((lintegral_mono_ae h_le).trans_lt _).ne
        rw [lintegral_condKernelReal_univ]
        

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set (α × ℝ)
hs : MeasurableSet s
t : Set (α × ℝ)
ht : MeasurableSet t
ht_eq : ∫⁻ (a : α), ↑↑((condKernelReal ρ) a) {x | (a, x) ∈ t} ∂Measure.fst ρ = ↑↑ρ t
h_le : (fun a => ↑↑((condKernelReal ρ) a) {x | (a, x) ∈ t}) ≤ᵐ[Measure.fst ρ] fun a => ↑↑((condKernelReal ρ) a) univ
⊢ ↑↑ρ univ < ⊤

Next tactic:
exact measure_lt_top ρ univ
theorem lintegral_condKernelReal_mem {s : Set (α × ℝ)} (hs : MeasurableSet s) :
    ∫⁻ a, condKernelReal ρ a {x | (a, x) ∈ s} ∂ρ.fst = ρ s := by
  -- `set_lintegral_condKernelReal_prod` gives the result for sets of the form `t₁ × t₂`. These
  -- sets form a π-system that generates the product σ-algebra, hence we can get the same equality
  -- for any measurable set `s`.
  apply MeasurableSpace.induction_on_inter generateFrom_prod.symm isPiSystem_prod _ _ _ _ hs
  · simp only [mem_empty_iff_false, setOf_false, measure_empty, lintegral_const,
      zero_mul]
  · intro t ht
    rw [mem_image2] at ht
    obtain ⟨t₁, t₂, ht₁, ht₂, rfl⟩ := ht
    have h_prod_eq_snd : ∀ a ∈ t₁, {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} = t₂ := by
      intro a ha
      simp only [ha, prod_mk_mem_set_prod_eq, true_and_iff, setOf_mem_eq]
    rw [← lintegral_add_compl _ ht₁]
    have h_eq1 : ∫⁻ a in t₁, condKernelReal ρ a {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} ∂ρ.fst =
        ∫⁻ a in t₁, condKernelReal ρ a t₂ ∂ρ.fst := by
      refine' set_lintegral_congr_fun ht₁ (eventually_of_forall fun a ha => _)
      rw [h_prod_eq_snd a ha]
    have h_eq2 : ∫⁻ a in t₁ᶜ, condKernelReal ρ a {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} ∂ρ.fst = 0 := by
      suffices h_eq_zero : ∀ a ∈ t₁ᶜ, condKernelReal ρ a {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} = 0
      · rw [set_lintegral_congr_fun ht₁.compl (eventually_of_forall h_eq_zero)]
        simp only [lintegral_const, zero_mul]
      intro a hat₁
      rw [mem_compl_iff] at hat₁
      simp only [hat₁, prod_mk_mem_set_prod_eq, false_and_iff, setOf_false, measure_empty]
    rw [h_eq1, h_eq2, add_zero]
    exact set_lintegral_condKernelReal_prod ρ ht₁ ht₂
  · intro t ht ht_eq
    calc
      ∫⁻ a, condKernelReal ρ a {x : ℝ | (a, x) ∈ tᶜ} ∂ρ.fst =
          ∫⁻ a, condKernelReal ρ a {x : ℝ | (a, x) ∈ t}ᶜ ∂ρ.fst := rfl
      _ = ∫⁻ a, condKernelReal ρ a univ - condKernelReal ρ a {x : ℝ | (a, x) ∈ t} ∂ρ.fst := by
        congr with a : 1
        exact measure_compl (measurable_prod_mk_left ht) (measure_ne_top (condKernelReal ρ a) _)
      _ = ∫⁻ a, condKernelReal ρ a univ ∂ρ.fst -
          ∫⁻ a, condKernelReal ρ a {x : ℝ | (a, x) ∈ t} ∂ρ.fst := by
        have h_le : (fun a => condKernelReal ρ a {x : ℝ | (a, x) ∈ t}) ≤ᵐ[ρ.fst] fun a =>
            condKernelReal ρ a univ := eventually_of_forall fun a => measure_mono (subset_univ _)
        rw [lintegral_sub _ _ h_le]
        · exact kernel.measurable_kernel_prod_mk_left ht
        refine' ((lintegral_mono_ae h_le).trans_lt _).ne
        rw [lintegral_condKernelReal_univ]
        exact measure_lt_top ρ univ
      _ = ρ univ - ρ t := by 

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set (α × ℝ)
hs : MeasurableSet s
t : Set (α × ℝ)
ht : MeasurableSet t
ht_eq : ∫⁻ (a : α), ↑↑((condKernelReal ρ) a) {x | (a, x) ∈ t} ∂Measure.fst ρ = ↑↑ρ t
⊢ ∫⁻ (a : α), ↑↑((condKernelReal ρ) a) univ ∂Measure.fst ρ -
      ∫⁻ (a : α), ↑↑((condKernelReal ρ) a) {x | (a, x) ∈ t} ∂Measure.fst ρ =
    ↑↑ρ univ - ↑↑ρ t

Next tactic:
rw [ht_eq, lintegral_condKernelReal_univ]
theorem lintegral_condKernelReal_mem {s : Set (α × ℝ)} (hs : MeasurableSet s) :
    ∫⁻ a, condKernelReal ρ a {x | (a, x) ∈ s} ∂ρ.fst = ρ s := by
  -- `set_lintegral_condKernelReal_prod` gives the result for sets of the form `t₁ × t₂`. These
  -- sets form a π-system that generates the product σ-algebra, hence we can get the same equality
  -- for any measurable set `s`.
  apply MeasurableSpace.induction_on_inter generateFrom_prod.symm isPiSystem_prod _ _ _ _ hs
  · simp only [mem_empty_iff_false, setOf_false, measure_empty, lintegral_const,
      zero_mul]
  · intro t ht
    rw [mem_image2] at ht
    obtain ⟨t₁, t₂, ht₁, ht₂, rfl⟩ := ht
    have h_prod_eq_snd : ∀ a ∈ t₁, {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} = t₂ := by
      intro a ha
      simp only [ha, prod_mk_mem_set_prod_eq, true_and_iff, setOf_mem_eq]
    rw [← lintegral_add_compl _ ht₁]
    have h_eq1 : ∫⁻ a in t₁, condKernelReal ρ a {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} ∂ρ.fst =
        ∫⁻ a in t₁, condKernelReal ρ a t₂ ∂ρ.fst := by
      refine' set_lintegral_congr_fun ht₁ (eventually_of_forall fun a ha => _)
      rw [h_prod_eq_snd a ha]
    have h_eq2 : ∫⁻ a in t₁ᶜ, condKernelReal ρ a {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} ∂ρ.fst = 0 := by
      suffices h_eq_zero : ∀ a ∈ t₁ᶜ, condKernelReal ρ a {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} = 0
      · rw [set_lintegral_congr_fun ht₁.compl (eventually_of_forall h_eq_zero)]
        simp only [lintegral_const, zero_mul]
      intro a hat₁
      rw [mem_compl_iff] at hat₁
      simp only [hat₁, prod_mk_mem_set_prod_eq, false_and_iff, setOf_false, measure_empty]
    rw [h_eq1, h_eq2, add_zero]
    exact set_lintegral_condKernelReal_prod ρ ht₁ ht₂
  · intro t ht ht_eq
    calc
      ∫⁻ a, condKernelReal ρ a {x : ℝ | (a, x) ∈ tᶜ} ∂ρ.fst =
          ∫⁻ a, condKernelReal ρ a {x : ℝ | (a, x) ∈ t}ᶜ ∂ρ.fst := rfl
      _ = ∫⁻ a, condKernelReal ρ a univ - condKernelReal ρ a {x : ℝ | (a, x) ∈ t} ∂ρ.fst := by
        congr with a : 1
        exact measure_compl (measurable_prod_mk_left ht) (measure_ne_top (condKernelReal ρ a) _)
      _ = ∫⁻ a, condKernelReal ρ a univ ∂ρ.fst -
          ∫⁻ a, condKernelReal ρ a {x : ℝ | (a, x) ∈ t} ∂ρ.fst := by
        have h_le : (fun a => condKernelReal ρ a {x : ℝ | (a, x) ∈ t}) ≤ᵐ[ρ.fst] fun a =>
            condKernelReal ρ a univ := eventually_of_forall fun a => measure_mono (subset_univ _)
        rw [lintegral_sub _ _ h_le]
        · exact kernel.measurable_kernel_prod_mk_left ht
        refine' ((lintegral_mono_ae h_le).trans_lt _).ne
        rw [lintegral_condKernelReal_univ]
        exact measure_lt_top ρ univ
      _ = ρ univ - ρ t := by rw [ht_eq, lintegral_condKernelReal_univ]
      _ = ρ tᶜ := (measure_compl ht (measure_ne_top _ _)).symm
  · 

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set (α × ℝ)
hs : MeasurableSet s
⊢ ∀ (f : ℕ → Set (α × ℝ)),
    Pairwise (Disjoint on f) →
      (∀ (i : ℕ), MeasurableSet (f i)) →
        (∀ (i : ℕ), ∫⁻ (a : α), ↑↑((condKernelReal ρ) a) {x | (a, x) ∈ f i} ∂Measure.fst ρ = ↑↑ρ (f i)) →
          ∫⁻ (a : α), ↑↑((condKernelReal ρ) a) {x | (a, x) ∈ ⋃ i, f i} ∂Measure.fst ρ = ↑↑ρ (⋃ i, f i)

Next tactic:
intro f hf_disj hf_meas hf_eq
theorem kernel.const_eq_compProd_real (γ : Type*) [MeasurableSpace γ] (ρ : Measure (α × ℝ))
    [IsFiniteMeasure ρ] :
    kernel.const γ ρ = kernel.const γ ρ.fst ⊗ₖ kernel.prodMkLeft γ (condKernelReal ρ) := by
  

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ✝ : Measure (α × ℝ)
inst✝² : IsFiniteMeasure ρ✝
γ : Type u_2
inst✝¹ : MeasurableSpace γ
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ const γ ρ = const γ (Measure.fst ρ) ⊗ₖ prodMkLeft γ (condKernelReal ρ)

Next tactic:
ext a s hs : 2
theorem kernel.const_eq_compProd_real (γ : Type*) [MeasurableSpace γ] (ρ : Measure (α × ℝ))
    [IsFiniteMeasure ρ] :
    kernel.const γ ρ = kernel.const γ ρ.fst ⊗ₖ kernel.prodMkLeft γ (condKernelReal ρ) := by
  ext a s hs : 2
  

Proof state:
case h.h
α : Type u_1
mα : MeasurableSpace α
ρ✝ : Measure (α × ℝ)
inst✝² : IsFiniteMeasure ρ✝
γ : Type u_2
inst✝¹ : MeasurableSpace γ
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
a : γ
s : Set (α × ℝ)
hs : MeasurableSet s
⊢ ↑↑((const γ ρ) a) s = ↑↑((const γ (Measure.fst ρ) ⊗ₖ prodMkLeft γ (condKernelReal ρ)) a) s

Next tactic:
rw [kernel.compProd_apply _ _ _ hs, kernel.const_apply, kernel.const_apply]
theorem kernel.const_eq_compProd_real (γ : Type*) [MeasurableSpace γ] (ρ : Measure (α × ℝ))
    [IsFiniteMeasure ρ] :
    kernel.const γ ρ = kernel.const γ ρ.fst ⊗ₖ kernel.prodMkLeft γ (condKernelReal ρ) := by
  ext a s hs : 2
  rw [kernel.compProd_apply _ _ _ hs, kernel.const_apply, kernel.const_apply]
  

Proof state:
case h.h
α : Type u_1
mα : MeasurableSpace α
ρ✝ : Measure (α × ℝ)
inst✝² : IsFiniteMeasure ρ✝
γ : Type u_2
inst✝¹ : MeasurableSpace γ
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
a : γ
s : Set (α × ℝ)
hs : MeasurableSet s
⊢ ↑↑ρ s = ∫⁻ (b : α), ↑↑((prodMkLeft γ (condKernelReal ρ)) (a, b)) {c | (b, c) ∈ s} ∂Measure.fst ρ

Next tactic:
simp_rw [kernel.prodMkLeft_apply]
theorem kernel.const_eq_compProd_real (γ : Type*) [MeasurableSpace γ] (ρ : Measure (α × ℝ))
    [IsFiniteMeasure ρ] :
    kernel.const γ ρ = kernel.const γ ρ.fst ⊗ₖ kernel.prodMkLeft γ (condKernelReal ρ) := by
  ext a s hs : 2
  rw [kernel.compProd_apply _ _ _ hs, kernel.const_apply, kernel.const_apply]
  simp_rw [kernel.prodMkLeft_apply]
  

Proof state:
case h.h
α : Type u_1
mα : MeasurableSpace α
ρ✝ : Measure (α × ℝ)
inst✝² : IsFiniteMeasure ρ✝
γ : Type u_2
inst✝¹ : MeasurableSpace γ
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
a : γ
s : Set (α × ℝ)
hs : MeasurableSet s
⊢ ↑↑ρ s = ∫⁻ (b : α), ↑↑((condKernelReal ρ) b) {c | (b, c) ∈ s} ∂Measure.fst ρ

Next tactic:
rw [lintegral_condKernelReal_mem ρ hs]
theorem measure_eq_compProd_real : ρ = ρ.fst ⊗ₘ condKernelReal ρ := by
  

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ρ = Measure.fst ρ ⊗ₘ condKernelReal ρ

Next tactic:
rw [Measure.compProd, ← kernel.const_eq_compProd_real Unit ρ, kernel.const_apply]
theorem lintegral_condKernelReal {f : α × ℝ → ℝ≥0∞} (hf : Measurable f) :
    ∫⁻ a, ∫⁻ y, f (a, y) ∂condKernelReal ρ a ∂ρ.fst = ∫⁻ x, f x ∂ρ := by
  

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
f : α × ℝ → ℝ≥0∞
hf : Measurable f
⊢ ∫⁻ (a : α), ∫⁻ (y : ℝ), f (a, y) ∂(condKernelReal ρ) a ∂Measure.fst ρ = ∫⁻ (x : α × ℝ), f x ∂ρ

Next tactic:
nth_rw 3 [measure_eq_compProd_real ρ]
theorem lintegral_condKernelReal {f : α × ℝ → ℝ≥0∞} (hf : Measurable f) :
    ∫⁻ a, ∫⁻ y, f (a, y) ∂condKernelReal ρ a ∂ρ.fst = ∫⁻ x, f x ∂ρ := by
  nth_rw 3 [measure_eq_compProd_real ρ]
  

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
f : α × ℝ → ℝ≥0∞
hf : Measurable f
⊢ ∫⁻ (a : α), ∫⁻ (y : ℝ), f (a, y) ∂(condKernelReal ρ) a ∂Measure.fst ρ =
    ∫⁻ (x : α × ℝ), f x ∂Measure.fst ρ ⊗ₘ condKernelReal ρ

Next tactic:
rw [Measure.lintegral_compProd hf]
theorem ae_condKernelReal_eq_one {s : Set ℝ} (hs : MeasurableSet s) (hρ : ρ {x | x.snd ∈ sᶜ} = 0) :
    ∀ᵐ a ∂ρ.fst, condKernelReal ρ a s = 1 := by
  

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set ℝ
hs : MeasurableSet s
hρ : ↑↑ρ {x | x.2 ∈ sᶜ} = 0
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, ↑↑((condKernelReal ρ) a) s = 1

Next tactic:
have h : ρ {x | x.snd ∈ sᶜ} = (ρ.fst ⊗ₘ condKernelReal ρ) {x | x.snd ∈ sᶜ} := by
    rw [← measure_eq_compProd_real]
theorem ae_condKernelReal_eq_one {s : Set ℝ} (hs : MeasurableSet s) (hρ : ρ {x | x.snd ∈ sᶜ} = 0) :
    ∀ᵐ a ∂ρ.fst, condKernelReal ρ a s = 1 := by
  have h : ρ {x | x.snd ∈ sᶜ} = (ρ.fst ⊗ₘ condKernelReal ρ) {x | x.snd ∈ sᶜ} := by
    

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set ℝ
hs : MeasurableSet s
hρ : ↑↑ρ {x | x.2 ∈ sᶜ} = 0
⊢ ↑↑ρ {x | x.2 ∈ sᶜ} = ↑↑(Measure.fst ρ ⊗ₘ condKernelReal ρ) {x | x.2 ∈ sᶜ}

Next tactic:
rw [← measure_eq_compProd_real]
theorem ae_condKernelReal_eq_one {s : Set ℝ} (hs : MeasurableSet s) (hρ : ρ {x | x.snd ∈ sᶜ} = 0) :
    ∀ᵐ a ∂ρ.fst, condKernelReal ρ a s = 1 := by
  have h : ρ {x | x.snd ∈ sᶜ} = (ρ.fst ⊗ₘ condKernelReal ρ) {x | x.snd ∈ sᶜ} := by
    rw [← measure_eq_compProd_real]
  

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set ℝ
hs : MeasurableSet s
hρ : ↑↑ρ {x | x.2 ∈ sᶜ} = 0
h : ↑↑ρ {x | x.2 ∈ sᶜ} = ↑↑(Measure.fst ρ ⊗ₘ condKernelReal ρ) {x | x.2 ∈ sᶜ}
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, ↑↑((condKernelReal ρ) a) s = 1

Next tactic:
rw [hρ, Measure.compProd_apply] at h
theorem ae_condKernelReal_eq_one {s : Set ℝ} (hs : MeasurableSet s) (hρ : ρ {x | x.snd ∈ sᶜ} = 0) :
    ∀ᵐ a ∂ρ.fst, condKernelReal ρ a s = 1 := by
  have h : ρ {x | x.snd ∈ sᶜ} = (ρ.fst ⊗ₘ condKernelReal ρ) {x | x.snd ∈ sᶜ} := by
    rw [← measure_eq_compProd_real]
  rw [hρ, Measure.compProd_apply] at h
  

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set ℝ
hs : MeasurableSet s
hρ : ↑↑ρ {x | x.2 ∈ sᶜ} = 0
h : 0 = ∫⁻ (a : α), ↑↑((condKernelReal ρ) a) (Prod.mk a ⁻¹' {x | x.2 ∈ sᶜ}) ∂Measure.fst ρ
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, ↑↑((condKernelReal ρ) a) s = 1
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set ℝ
hs : MeasurableSet s
hρ : ↑↑ρ {x | x.2 ∈ sᶜ} = 0
h : 0 = ↑↑(Measure.fst ρ ⊗ₘ condKernelReal ρ) {x | x.2 ∈ sᶜ}
⊢ MeasurableSet {x | x.2 ∈ sᶜ}

Next tactic:
swap
theorem ae_condKernelReal_eq_one {s : Set ℝ} (hs : MeasurableSet s) (hρ : ρ {x | x.snd ∈ sᶜ} = 0) :
    ∀ᵐ a ∂ρ.fst, condKernelReal ρ a s = 1 := by
  have h : ρ {x | x.snd ∈ sᶜ} = (ρ.fst ⊗ₘ condKernelReal ρ) {x | x.snd ∈ sᶜ} := by
    rw [← measure_eq_compProd_real]
  rw [hρ, Measure.compProd_apply] at h
  swap; · 

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set ℝ
hs : MeasurableSet s
hρ : ↑↑ρ {x | x.2 ∈ sᶜ} = 0
h : 0 = ↑↑(Measure.fst ρ ⊗ₘ condKernelReal ρ) {x | x.2 ∈ sᶜ}
⊢ MeasurableSet {x | x.2 ∈ sᶜ}

Next tactic:
exact measurable_snd hs.compl
theorem ae_condKernelReal_eq_one {s : Set ℝ} (hs : MeasurableSet s) (hρ : ρ {x | x.snd ∈ sᶜ} = 0) :
    ∀ᵐ a ∂ρ.fst, condKernelReal ρ a s = 1 := by
  have h : ρ {x | x.snd ∈ sᶜ} = (ρ.fst ⊗ₘ condKernelReal ρ) {x | x.snd ∈ sᶜ} := by
    rw [← measure_eq_compProd_real]
  rw [hρ, Measure.compProd_apply] at h
  swap; · exact measurable_snd hs.compl
  

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set ℝ
hs : MeasurableSet s
hρ : ↑↑ρ {x | x.2 ∈ sᶜ} = 0
h : 0 = ∫⁻ (a : α), ↑↑((condKernelReal ρ) a) (Prod.mk a ⁻¹' {x | x.2 ∈ sᶜ}) ∂Measure.fst ρ
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, ↑↑((condKernelReal ρ) a) s = 1

Next tactic:
rw [eq_comm, lintegral_eq_zero_iff] at h
theorem ae_condKernelReal_eq_one {s : Set ℝ} (hs : MeasurableSet s) (hρ : ρ {x | x.snd ∈ sᶜ} = 0) :
    ∀ᵐ a ∂ρ.fst, condKernelReal ρ a s = 1 := by
  have h : ρ {x | x.snd ∈ sᶜ} = (ρ.fst ⊗ₘ condKernelReal ρ) {x | x.snd ∈ sᶜ} := by
    rw [← measure_eq_compProd_real]
  rw [hρ, Measure.compProd_apply] at h
  swap; · exact measurable_snd hs.compl
  rw [eq_comm, lintegral_eq_zero_iff] at h
  

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set ℝ
hs : MeasurableSet s
hρ : ↑↑ρ {x | x.2 ∈ sᶜ} = 0
h : (fun a => ↑↑((condKernelReal ρ) a) (Prod.mk a ⁻¹' {x | x.2 ∈ sᶜ})) =ᵐ[Measure.fst ρ] 0
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, ↑↑((condKernelReal ρ) a) s = 1
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set ℝ
hs : MeasurableSet s
hρ : ↑↑ρ {x | x.2 ∈ sᶜ} = 0
h : ∫⁻ (a : α), ↑↑((condKernelReal ρ) a) (Prod.mk a ⁻¹' {x | x.2 ∈ sᶜ}) ∂Measure.fst ρ = 0
⊢ Measurable fun a => ↑↑((condKernelReal ρ) a) (Prod.mk a ⁻¹' {x | x.2 ∈ sᶜ})

Next tactic:
swap
theorem ae_condKernelReal_eq_one {s : Set ℝ} (hs : MeasurableSet s) (hρ : ρ {x | x.snd ∈ sᶜ} = 0) :
    ∀ᵐ a ∂ρ.fst, condKernelReal ρ a s = 1 := by
  have h : ρ {x | x.snd ∈ sᶜ} = (ρ.fst ⊗ₘ condKernelReal ρ) {x | x.snd ∈ sᶜ} := by
    rw [← measure_eq_compProd_real]
  rw [hρ, Measure.compProd_apply] at h
  swap; · exact measurable_snd hs.compl
  rw [eq_comm, lintegral_eq_zero_iff] at h
  swap
  · 

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set ℝ
hs : MeasurableSet s
hρ : ↑↑ρ {x | x.2 ∈ sᶜ} = 0
h : ∫⁻ (a : α), ↑↑((condKernelReal ρ) a) (Prod.mk a ⁻¹' {x | x.2 ∈ sᶜ}) ∂Measure.fst ρ = 0
⊢ Measurable fun a => ↑↑((condKernelReal ρ) a) (Prod.mk a ⁻¹' {x | x.2 ∈ sᶜ})

Next tactic:
simp only [mem_compl_iff, mem_setOf_eq]
theorem ae_condKernelReal_eq_one {s : Set ℝ} (hs : MeasurableSet s) (hρ : ρ {x | x.snd ∈ sᶜ} = 0) :
    ∀ᵐ a ∂ρ.fst, condKernelReal ρ a s = 1 := by
  have h : ρ {x | x.snd ∈ sᶜ} = (ρ.fst ⊗ₘ condKernelReal ρ) {x | x.snd ∈ sᶜ} := by
    rw [← measure_eq_compProd_real]
  rw [hρ, Measure.compProd_apply] at h
  swap; · exact measurable_snd hs.compl
  rw [eq_comm, lintegral_eq_zero_iff] at h
  swap
  · simp only [mem_compl_iff, mem_setOf_eq]
    

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set ℝ
hs : MeasurableSet s
hρ : ↑↑ρ {x | x.2 ∈ sᶜ} = 0
h : ∫⁻ (a : α), ↑↑((condKernelReal ρ) a) (Prod.mk a ⁻¹' {x | x.2 ∈ sᶜ}) ∂Measure.fst ρ = 0
⊢ Measurable fun a => ↑↑((condKernelReal ρ) a) (Prod.mk a ⁻¹' {x | x.2 ∉ s})

Next tactic:
exact kernel.measurable_coe _ hs.compl
theorem ae_condKernelReal_eq_one {s : Set ℝ} (hs : MeasurableSet s) (hρ : ρ {x | x.snd ∈ sᶜ} = 0) :
    ∀ᵐ a ∂ρ.fst, condKernelReal ρ a s = 1 := by
  have h : ρ {x | x.snd ∈ sᶜ} = (ρ.fst ⊗ₘ condKernelReal ρ) {x | x.snd ∈ sᶜ} := by
    rw [← measure_eq_compProd_real]
  rw [hρ, Measure.compProd_apply] at h
  swap; · exact measurable_snd hs.compl
  rw [eq_comm, lintegral_eq_zero_iff] at h
  swap
  · simp only [mem_compl_iff, mem_setOf_eq]
    exact kernel.measurable_coe _ hs.compl
  

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set ℝ
hs : MeasurableSet s
hρ : ↑↑ρ {x | x.2 ∈ sᶜ} = 0
h : (fun a => ↑↑((condKernelReal ρ) a) (Prod.mk a ⁻¹' {x | x.2 ∈ sᶜ})) =ᵐ[Measure.fst ρ] 0
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, ↑↑((condKernelReal ρ) a) s = 1

Next tactic:
simp only [mem_compl_iff, mem_setOf_eq, kernel.prodMkLeft_apply'] at h
theorem ae_condKernelReal_eq_one {s : Set ℝ} (hs : MeasurableSet s) (hρ : ρ {x | x.snd ∈ sᶜ} = 0) :
    ∀ᵐ a ∂ρ.fst, condKernelReal ρ a s = 1 := by
  have h : ρ {x | x.snd ∈ sᶜ} = (ρ.fst ⊗ₘ condKernelReal ρ) {x | x.snd ∈ sᶜ} := by
    rw [← measure_eq_compProd_real]
  rw [hρ, Measure.compProd_apply] at h
  swap; · exact measurable_snd hs.compl
  rw [eq_comm, lintegral_eq_zero_iff] at h
  swap
  · simp only [mem_compl_iff, mem_setOf_eq]
    exact kernel.measurable_coe _ hs.compl
  simp only [mem_compl_iff, mem_setOf_eq, kernel.prodMkLeft_apply'] at h
  

Proof state:
α : Type u_1
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set ℝ
hs : MeasurableSet s
hρ : ↑↑ρ {x | x.2 ∈ sᶜ} = 0
h : (fun a => ↑↑((condKernelReal ρ) a) (Prod.mk a ⁻¹' {x | x.2 ∉ s})) =ᵐ[Measure.fst ρ] 0
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, ↑↑((condKernelReal ρ) a) s = 1

Next tactic:
filter_upwards [h] with a ha