l3lab/ntp-mathlib huggingface dataset:
lemma eq_condKernel_of_measure_eq_compProd_real (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ]
    (κ : kernel α ℝ) [IsFiniteKernel κ] (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
  have huniv : ∀ᵐ x ∂ρ.fst, κ x Set.univ = ρ.condKernel x Set.univ :=
    eq_condKernel_of_measure_eq_compProd' ρ κ hκ MeasurableSet.univ
  

Proof state:
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁵ : MeasurableSpace Ω
inst✝⁴ : StandardBorelSpace Ω
inst✝³ : Nonempty Ω
ρ✝ : Measure (α × Ω)
inst✝² : IsFiniteMeasure ρ✝
ρ : Measure (α × ℝ)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α ℝ)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
huniv : ∀ᵐ (x : α) ∂Measure.fst ρ, ↑↑(κ x) univ = ↑↑((Measure.condKernel ρ) x) univ
⊢ ∀ᵐ (x : α) ∂Measure.fst ρ, κ x = (Measure.condKernel ρ) x

Next tactic:
suffices : ∀ᵐ x ∂ρ.fst, ∀ ⦃t⦄, MeasurableSet t → κ x t = ρ.condKernel x t
lemma eq_condKernel_of_measure_eq_compProd_real (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ]
    (κ : kernel α ℝ) [IsFiniteKernel κ] (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
  have huniv : ∀ᵐ x ∂ρ.fst, κ x Set.univ = ρ.condKernel x Set.univ :=
    eq_condKernel_of_measure_eq_compProd' ρ κ hκ MeasurableSet.univ
  suffices : ∀ᵐ x ∂ρ.fst, ∀ ⦃t⦄, MeasurableSet t → κ x t = ρ.condKernel x t
  · 

Proof state:
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁵ : MeasurableSpace Ω
inst✝⁴ : StandardBorelSpace Ω
inst✝³ : Nonempty Ω
ρ✝ : Measure (α × Ω)
inst✝² : IsFiniteMeasure ρ✝
ρ : Measure (α × ℝ)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α ℝ)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
huniv : ∀ᵐ (x : α) ∂Measure.fst ρ, ↑↑(κ x) univ = ↑↑((Measure.condKernel ρ) x) univ
this : ∀ᵐ (x : α) ∂Measure.fst ρ, ∀ ⦃t : Set ℝ⦄, MeasurableSet t → ↑↑(κ x) t = ↑↑((Measure.condKernel ρ) x) t
⊢ ∀ᵐ (x : α) ∂Measure.fst ρ, κ x = (Measure.condKernel ρ) x

Next tactic:
filter_upwards [this] with x hx
lemma eq_condKernel_of_measure_eq_compProd_real (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ]
    (κ : kernel α ℝ) [IsFiniteKernel κ] (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
  have huniv : ∀ᵐ x ∂ρ.fst, κ x Set.univ = ρ.condKernel x Set.univ :=
    eq_condKernel_of_measure_eq_compProd' ρ κ hκ MeasurableSet.univ
  suffices : ∀ᵐ x ∂ρ.fst, ∀ ⦃t⦄, MeasurableSet t → κ x t = ρ.condKernel x t
  · filter_upwards [this] with x hx
    

Proof state:
case h
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁵ : MeasurableSpace Ω
inst✝⁴ : StandardBorelSpace Ω
inst✝³ : Nonempty Ω
ρ✝ : Measure (α × Ω)
inst✝² : IsFiniteMeasure ρ✝
ρ : Measure (α × ℝ)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α ℝ)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
huniv : ∀ᵐ (x : α) ∂Measure.fst ρ, ↑↑(κ x) univ = ↑↑((Measure.condKernel ρ) x) univ
this : ∀ᵐ (x : α) ∂Measure.fst ρ, ∀ ⦃t : Set ℝ⦄, MeasurableSet t → ↑↑(κ x) t = ↑↑((Measure.condKernel ρ) x) t
x : α
hx : ∀ ⦃t : Set ℝ⦄, MeasurableSet t → ↑↑(κ x) t = ↑↑((Measure.condKernel ρ) x) t
⊢ κ x = (Measure.condKernel ρ) x

Next tactic:
ext t ht
lemma eq_condKernel_of_measure_eq_compProd_real (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ]
    (κ : kernel α ℝ) [IsFiniteKernel κ] (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
  have huniv : ∀ᵐ x ∂ρ.fst, κ x Set.univ = ρ.condKernel x Set.univ :=
    eq_condKernel_of_measure_eq_compProd' ρ κ hκ MeasurableSet.univ
  suffices : ∀ᵐ x ∂ρ.fst, ∀ ⦃t⦄, MeasurableSet t → κ x t = ρ.condKernel x t
  · filter_upwards [this] with x hx
    ext t ht; 

Proof state:
case h.h
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁵ : MeasurableSpace Ω
inst✝⁴ : StandardBorelSpace Ω
inst✝³ : Nonempty Ω
ρ✝ : Measure (α × Ω)
inst✝² : IsFiniteMeasure ρ✝
ρ : Measure (α × ℝ)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α ℝ)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
huniv : ∀ᵐ (x : α) ∂Measure.fst ρ, ↑↑(κ x) univ = ↑↑((Measure.condKernel ρ) x) univ
this : ∀ᵐ (x : α) ∂Measure.fst ρ, ∀ ⦃t : Set ℝ⦄, MeasurableSet t → ↑↑(κ x) t = ↑↑((Measure.condKernel ρ) x) t
x : α
hx : ∀ ⦃t : Set ℝ⦄, MeasurableSet t → ↑↑(κ x) t = ↑↑((Measure.condKernel ρ) x) t
t : Set ℝ
ht : MeasurableSet t
⊢ ↑↑(κ x) t = ↑↑((Measure.condKernel ρ) x) t

Next tactic:
exact hx ht
lemma eq_condKernel_of_measure_eq_compProd_real (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ]
    (κ : kernel α ℝ) [IsFiniteKernel κ] (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
  have huniv : ∀ᵐ x ∂ρ.fst, κ x Set.univ = ρ.condKernel x Set.univ :=
    eq_condKernel_of_measure_eq_compProd' ρ κ hκ MeasurableSet.univ
  suffices : ∀ᵐ x ∂ρ.fst, ∀ ⦃t⦄, MeasurableSet t → κ x t = ρ.condKernel x t
  · filter_upwards [this] with x hx
    ext t ht; exact hx ht
  

Proof state:
case this
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁵ : MeasurableSpace Ω
inst✝⁴ : StandardBorelSpace Ω
inst✝³ : Nonempty Ω
ρ✝ : Measure (α × Ω)
inst✝² : IsFiniteMeasure ρ✝
ρ : Measure (α × ℝ)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α ℝ)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
huniv : ∀ᵐ (x : α) ∂Measure.fst ρ, ↑↑(κ x) univ = ↑↑((Measure.condKernel ρ) x) univ
⊢ ∀ᵐ (x : α) ∂Measure.fst ρ, ∀ ⦃t : Set ℝ⦄, MeasurableSet t → ↑↑(κ x) t = ↑↑((Measure.condKernel ρ) x) t

Next tactic:
apply MeasurableSpace.ae_induction_on_inter Real.borel_eq_generateFrom_Iic_rat
    Real.isPiSystem_Iic_rat
lemma eq_condKernel_of_measure_eq_compProd_real (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ]
    (κ : kernel α ℝ) [IsFiniteKernel κ] (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
  have huniv : ∀ᵐ x ∂ρ.fst, κ x Set.univ = ρ.condKernel x Set.univ :=
    eq_condKernel_of_measure_eq_compProd' ρ κ hκ MeasurableSet.univ
  suffices : ∀ᵐ x ∂ρ.fst, ∀ ⦃t⦄, MeasurableSet t → κ x t = ρ.condKernel x t
  · filter_upwards [this] with x hx
    ext t ht; exact hx ht
  apply MeasurableSpace.ae_induction_on_inter Real.borel_eq_generateFrom_Iic_rat
    Real.isPiSystem_Iic_rat
  · 

Proof state:
case this.h_empty
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁵ : MeasurableSpace Ω
inst✝⁴ : StandardBorelSpace Ω
inst✝³ : Nonempty Ω
ρ✝ : Measure (α × Ω)
inst✝² : IsFiniteMeasure ρ✝
ρ : Measure (α × ℝ)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α ℝ)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
huniv : ∀ᵐ (x : α) ∂Measure.fst ρ, ↑↑(κ x) univ = ↑↑((Measure.condKernel ρ) x) univ
⊢ ∀ᵐ (x : α) ∂Measure.fst ρ, ↑↑(κ x) ∅ = ↑↑((Measure.condKernel ρ) x) ∅

Next tactic:
simp only [OuterMeasure.empty', Filter.eventually_true]
lemma eq_condKernel_of_measure_eq_compProd_real (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ]
    (κ : kernel α ℝ) [IsFiniteKernel κ] (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
  have huniv : ∀ᵐ x ∂ρ.fst, κ x Set.univ = ρ.condKernel x Set.univ :=
    eq_condKernel_of_measure_eq_compProd' ρ κ hκ MeasurableSet.univ
  suffices : ∀ᵐ x ∂ρ.fst, ∀ ⦃t⦄, MeasurableSet t → κ x t = ρ.condKernel x t
  · filter_upwards [this] with x hx
    ext t ht; exact hx ht
  apply MeasurableSpace.ae_induction_on_inter Real.borel_eq_generateFrom_Iic_rat
    Real.isPiSystem_Iic_rat
  · simp only [OuterMeasure.empty', Filter.eventually_true]
  · 

Proof state:
case this.h_basic
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁵ : MeasurableSpace Ω
inst✝⁴ : StandardBorelSpace Ω
inst✝³ : Nonempty Ω
ρ✝ : Measure (α × Ω)
inst✝² : IsFiniteMeasure ρ✝
ρ : Measure (α × ℝ)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α ℝ)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
huniv : ∀ᵐ (x : α) ∂Measure.fst ρ, ↑↑(κ x) univ = ↑↑((Measure.condKernel ρ) x) univ
⊢ ∀ᵐ (x : α) ∂Measure.fst ρ, ∀ t ∈ ⋃ a, {Iic ↑a}, ↑↑(κ x) t = ↑↑((Measure.condKernel ρ) x) t

Next tactic:
simp only [iUnion_singleton_eq_range, mem_range, forall_exists_index, forall_apply_eq_imp_iff]
lemma eq_condKernel_of_measure_eq_compProd_real (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ]
    (κ : kernel α ℝ) [IsFiniteKernel κ] (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
  have huniv : ∀ᵐ x ∂ρ.fst, κ x Set.univ = ρ.condKernel x Set.univ :=
    eq_condKernel_of_measure_eq_compProd' ρ κ hκ MeasurableSet.univ
  suffices : ∀ᵐ x ∂ρ.fst, ∀ ⦃t⦄, MeasurableSet t → κ x t = ρ.condKernel x t
  · filter_upwards [this] with x hx
    ext t ht; exact hx ht
  apply MeasurableSpace.ae_induction_on_inter Real.borel_eq_generateFrom_Iic_rat
    Real.isPiSystem_Iic_rat
  · simp only [OuterMeasure.empty', Filter.eventually_true]
  · simp only [iUnion_singleton_eq_range, mem_range, forall_exists_index, forall_apply_eq_imp_iff]
    

Proof state:
case this.h_basic
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁵ : MeasurableSpace Ω
inst✝⁴ : StandardBorelSpace Ω
inst✝³ : Nonempty Ω
ρ✝ : Measure (α × Ω)
inst✝² : IsFiniteMeasure ρ✝
ρ : Measure (α × ℝ)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α ℝ)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
huniv : ∀ᵐ (x : α) ∂Measure.fst ρ, ↑↑(κ x) univ = ↑↑((Measure.condKernel ρ) x) univ
⊢ ∀ᵐ (x : α) ∂Measure.fst ρ, ∀ (a : ℚ), ↑↑(κ x) (Iic ↑a) = ↑↑((Measure.condKernel ρ) x) (Iic ↑a)

Next tactic:
exact ae_all_iff.2 <| fun q => eq_condKernel_of_measure_eq_compProd' ρ κ hκ measurableSet_Iic
lemma eq_condKernel_of_measure_eq_compProd_real (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ]
    (κ : kernel α ℝ) [IsFiniteKernel κ] (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
  have huniv : ∀ᵐ x ∂ρ.fst, κ x Set.univ = ρ.condKernel x Set.univ :=
    eq_condKernel_of_measure_eq_compProd' ρ κ hκ MeasurableSet.univ
  suffices : ∀ᵐ x ∂ρ.fst, ∀ ⦃t⦄, MeasurableSet t → κ x t = ρ.condKernel x t
  · filter_upwards [this] with x hx
    ext t ht; exact hx ht
  apply MeasurableSpace.ae_induction_on_inter Real.borel_eq_generateFrom_Iic_rat
    Real.isPiSystem_Iic_rat
  · simp only [OuterMeasure.empty', Filter.eventually_true]
  · simp only [iUnion_singleton_eq_range, mem_range, forall_exists_index, forall_apply_eq_imp_iff]
    exact ae_all_iff.2 <| fun q => eq_condKernel_of_measure_eq_compProd' ρ κ hκ measurableSet_Iic
  · 

Proof state:
case this.h_compl
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁵ : MeasurableSpace Ω
inst✝⁴ : StandardBorelSpace Ω
inst✝³ : Nonempty Ω
ρ✝ : Measure (α × Ω)
inst✝² : IsFiniteMeasure ρ✝
ρ : Measure (α × ℝ)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α ℝ)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
huniv : ∀ᵐ (x : α) ∂Measure.fst ρ, ↑↑(κ x) univ = ↑↑((Measure.condKernel ρ) x) univ
⊢ ∀ᵐ (x : α) ∂Measure.fst ρ,
    ∀ (t : Set ℝ),
      MeasurableSet t → ↑↑(κ x) t = ↑↑((Measure.condKernel ρ) x) t → ↑↑(κ x) tᶜ = ↑↑((Measure.condKernel ρ) x) tᶜ

Next tactic:
filter_upwards [huniv] with x hxuniv t ht heq
lemma eq_condKernel_of_measure_eq_compProd_real (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ]
    (κ : kernel α ℝ) [IsFiniteKernel κ] (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
  have huniv : ∀ᵐ x ∂ρ.fst, κ x Set.univ = ρ.condKernel x Set.univ :=
    eq_condKernel_of_measure_eq_compProd' ρ κ hκ MeasurableSet.univ
  suffices : ∀ᵐ x ∂ρ.fst, ∀ ⦃t⦄, MeasurableSet t → κ x t = ρ.condKernel x t
  · filter_upwards [this] with x hx
    ext t ht; exact hx ht
  apply MeasurableSpace.ae_induction_on_inter Real.borel_eq_generateFrom_Iic_rat
    Real.isPiSystem_Iic_rat
  · simp only [OuterMeasure.empty', Filter.eventually_true]
  · simp only [iUnion_singleton_eq_range, mem_range, forall_exists_index, forall_apply_eq_imp_iff]
    exact ae_all_iff.2 <| fun q => eq_condKernel_of_measure_eq_compProd' ρ κ hκ measurableSet_Iic
  · filter_upwards [huniv] with x hxuniv t ht heq
    

Proof state:
case h
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁵ : MeasurableSpace Ω
inst✝⁴ : StandardBorelSpace Ω
inst✝³ : Nonempty Ω
ρ✝ : Measure (α × Ω)
inst✝² : IsFiniteMeasure ρ✝
ρ : Measure (α × ℝ)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α ℝ)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
huniv : ∀ᵐ (x : α) ∂Measure.fst ρ, ↑↑(κ x) univ = ↑↑((Measure.condKernel ρ) x) univ
x : α
hxuniv : ↑↑(κ x) univ = ↑↑((Measure.condKernel ρ) x) univ
t : Set ℝ
ht : MeasurableSet t
heq : ↑↑(κ x) t = ↑↑((Measure.condKernel ρ) x) t
⊢ ↑↑(κ x) tᶜ = ↑↑((Measure.condKernel ρ) x) tᶜ

Next tactic:
rw [measure_compl ht <| measure_ne_top _ _, heq, hxuniv, measure_compl ht <| measure_ne_top _ _]
lemma eq_condKernel_of_measure_eq_compProd_real (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ]
    (κ : kernel α ℝ) [IsFiniteKernel κ] (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
  have huniv : ∀ᵐ x ∂ρ.fst, κ x Set.univ = ρ.condKernel x Set.univ :=
    eq_condKernel_of_measure_eq_compProd' ρ κ hκ MeasurableSet.univ
  suffices : ∀ᵐ x ∂ρ.fst, ∀ ⦃t⦄, MeasurableSet t → κ x t = ρ.condKernel x t
  · filter_upwards [this] with x hx
    ext t ht; exact hx ht
  apply MeasurableSpace.ae_induction_on_inter Real.borel_eq_generateFrom_Iic_rat
    Real.isPiSystem_Iic_rat
  · simp only [OuterMeasure.empty', Filter.eventually_true]
  · simp only [iUnion_singleton_eq_range, mem_range, forall_exists_index, forall_apply_eq_imp_iff]
    exact ae_all_iff.2 <| fun q => eq_condKernel_of_measure_eq_compProd' ρ κ hκ measurableSet_Iic
  · filter_upwards [huniv] with x hxuniv t ht heq
    rw [measure_compl ht <| measure_ne_top _ _, heq, hxuniv, measure_compl ht <| measure_ne_top _ _]
  · 

Proof state:
case this.h_union
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁵ : MeasurableSpace Ω
inst✝⁴ : StandardBorelSpace Ω
inst✝³ : Nonempty Ω
ρ✝ : Measure (α × Ω)
inst✝² : IsFiniteMeasure ρ✝
ρ : Measure (α × ℝ)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α ℝ)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
huniv : ∀ᵐ (x : α) ∂Measure.fst ρ, ↑↑(κ x) univ = ↑↑((Measure.condKernel ρ) x) univ
⊢ ∀ᵐ (x : α) ∂Measure.fst ρ,
    ∀ (f : ℕ → Set ℝ),
      Pairwise (Disjoint on f) →
        (∀ (i : ℕ), MeasurableSet (f i)) →
          (∀ (i : ℕ), ↑↑(κ x) (f i) = ↑↑((Measure.condKernel ρ) x) (f i)) →
            ↑↑(κ x) (⋃ i, f i) = ↑↑((Measure.condKernel ρ) x) (⋃ i, f i)

Next tactic:
refine' ae_of_all _ (fun x f hdisj hf heq => _)
lemma eq_condKernel_of_measure_eq_compProd_real (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ]
    (κ : kernel α ℝ) [IsFiniteKernel κ] (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
  have huniv : ∀ᵐ x ∂ρ.fst, κ x Set.univ = ρ.condKernel x Set.univ :=
    eq_condKernel_of_measure_eq_compProd' ρ κ hκ MeasurableSet.univ
  suffices : ∀ᵐ x ∂ρ.fst, ∀ ⦃t⦄, MeasurableSet t → κ x t = ρ.condKernel x t
  · filter_upwards [this] with x hx
    ext t ht; exact hx ht
  apply MeasurableSpace.ae_induction_on_inter Real.borel_eq_generateFrom_Iic_rat
    Real.isPiSystem_Iic_rat
  · simp only [OuterMeasure.empty', Filter.eventually_true]
  · simp only [iUnion_singleton_eq_range, mem_range, forall_exists_index, forall_apply_eq_imp_iff]
    exact ae_all_iff.2 <| fun q => eq_condKernel_of_measure_eq_compProd' ρ κ hκ measurableSet_Iic
  · filter_upwards [huniv] with x hxuniv t ht heq
    rw [measure_compl ht <| measure_ne_top _ _, heq, hxuniv, measure_compl ht <| measure_ne_top _ _]
  · refine' ae_of_all _ (fun x f hdisj hf heq => _)
    

Proof state:
case this.h_union
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁵ : MeasurableSpace Ω
inst✝⁴ : StandardBorelSpace Ω
inst✝³ : Nonempty Ω
ρ✝ : Measure (α × Ω)
inst✝² : IsFiniteMeasure ρ✝
ρ : Measure (α × ℝ)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α ℝ)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
huniv : ∀ᵐ (x : α) ∂Measure.fst ρ, ↑↑(κ x) univ = ↑↑((Measure.condKernel ρ) x) univ
x : α
f : ℕ → Set ℝ
hdisj : Pairwise (Disjoint on f)
hf : ∀ (i : ℕ), MeasurableSet (f i)
heq : ∀ (i : ℕ), ↑↑(κ x) (f i) = ↑↑((Measure.condKernel ρ) x) (f i)
⊢ ↑↑(κ x) (⋃ i, f i) = ↑↑((Measure.condKernel ρ) x) (⋃ i, f i)

Next tactic:
rw [measure_iUnion hdisj hf, measure_iUnion hdisj hf]
lemma eq_condKernel_of_measure_eq_compProd_real (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ]
    (κ : kernel α ℝ) [IsFiniteKernel κ] (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
  have huniv : ∀ᵐ x ∂ρ.fst, κ x Set.univ = ρ.condKernel x Set.univ :=
    eq_condKernel_of_measure_eq_compProd' ρ κ hκ MeasurableSet.univ
  suffices : ∀ᵐ x ∂ρ.fst, ∀ ⦃t⦄, MeasurableSet t → κ x t = ρ.condKernel x t
  · filter_upwards [this] with x hx
    ext t ht; exact hx ht
  apply MeasurableSpace.ae_induction_on_inter Real.borel_eq_generateFrom_Iic_rat
    Real.isPiSystem_Iic_rat
  · simp only [OuterMeasure.empty', Filter.eventually_true]
  · simp only [iUnion_singleton_eq_range, mem_range, forall_exists_index, forall_apply_eq_imp_iff]
    exact ae_all_iff.2 <| fun q => eq_condKernel_of_measure_eq_compProd' ρ κ hκ measurableSet_Iic
  · filter_upwards [huniv] with x hxuniv t ht heq
    rw [measure_compl ht <| measure_ne_top _ _, heq, hxuniv, measure_compl ht <| measure_ne_top _ _]
  · refine' ae_of_all _ (fun x f hdisj hf heq => _)
    rw [measure_iUnion hdisj hf, measure_iUnion hdisj hf]
    

Proof state:
case this.h_union
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁵ : MeasurableSpace Ω
inst✝⁴ : StandardBorelSpace Ω
inst✝³ : Nonempty Ω
ρ✝ : Measure (α × Ω)
inst✝² : IsFiniteMeasure ρ✝
ρ : Measure (α × ℝ)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α ℝ)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
huniv : ∀ᵐ (x : α) ∂Measure.fst ρ, ↑↑(κ x) univ = ↑↑((Measure.condKernel ρ) x) univ
x : α
f : ℕ → Set ℝ
hdisj : Pairwise (Disjoint on f)
hf : ∀ (i : ℕ), MeasurableSet (f i)
heq : ∀ (i : ℕ), ↑↑(κ x) (f i) = ↑↑((Measure.condKernel ρ) x) (f i)
⊢ ∑' (i : ℕ), ↑↑(κ x) (f i) = ∑' (i : ℕ), ↑↑((Measure.condKernel ρ) x) (f i)

Next tactic:
exact tsum_congr heq
/-- A finite kernel which satisfies the disintegration property is almost everywhere equal to the
disintegration kernel. -/
theorem eq_condKernel_of_measure_eq_compProd (κ : kernel α Ω) [IsFiniteKernel κ]
    (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
-- The idea is to transporting the question to `ℝ` from `Ω` using `exists_measurableEmbedding_real`
-- and then constructing a measure on `α × ℝ` using the obtained measurable embedding
  

Proof state:
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
ρ : Measure (α × Ω)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α Ω)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
⊢ ∀ᵐ (x : α) ∂Measure.fst ρ, κ x = (Measure.condKernel ρ) x

Next tactic:
obtain ⟨f, hf⟩ := exists_measurableEmbedding_real Ω
/-- A finite kernel which satisfies the disintegration property is almost everywhere equal to the
disintegration kernel. -/
theorem eq_condKernel_of_measure_eq_compProd (κ : kernel α Ω) [IsFiniteKernel κ]
    (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
-- The idea is to transporting the question to `ℝ` from `Ω` using `exists_measurableEmbedding_real`
-- and then constructing a measure on `α × ℝ` using the obtained measurable embedding
  obtain ⟨f, hf⟩ := exists_measurableEmbedding_real Ω
  

Proof state:
case intro
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
ρ : Measure (α × Ω)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α Ω)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
f : Ω → ℝ
hf : MeasurableEmbedding f
⊢ ∀ᵐ (x : α) ∂Measure.fst ρ, κ x = (Measure.condKernel ρ) x

Next tactic:
set ρ' : Measure (α × ℝ) := ρ.map (Prod.map id f) with hρ'def
/-- A finite kernel which satisfies the disintegration property is almost everywhere equal to the
disintegration kernel. -/
theorem eq_condKernel_of_measure_eq_compProd (κ : kernel α Ω) [IsFiniteKernel κ]
    (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
-- The idea is to transporting the question to `ℝ` from `Ω` using `exists_measurableEmbedding_real`
-- and then constructing a measure on `α × ℝ` using the obtained measurable embedding
  obtain ⟨f, hf⟩ := exists_measurableEmbedding_real Ω
  set ρ' : Measure (α × ℝ) := ρ.map (Prod.map id f) with hρ'def
  

Proof state:
case intro
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
ρ : Measure (α × Ω)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α Ω)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
f : Ω → ℝ
hf : MeasurableEmbedding f
ρ' : Measure (α × ℝ) := Measure.map (Prod.map id f) ρ
hρ'def : ρ' = Measure.map (Prod.map id f) ρ
⊢ ∀ᵐ (x : α) ∂Measure.fst ρ, κ x = (Measure.condKernel ρ) x

Next tactic:
have hρ' : ρ'.fst = ρ.fst
/-- A finite kernel which satisfies the disintegration property is almost everywhere equal to the
disintegration kernel. -/
theorem eq_condKernel_of_measure_eq_compProd (κ : kernel α Ω) [IsFiniteKernel κ]
    (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
-- The idea is to transporting the question to `ℝ` from `Ω` using `exists_measurableEmbedding_real`
-- and then constructing a measure on `α × ℝ` using the obtained measurable embedding
  obtain ⟨f, hf⟩ := exists_measurableEmbedding_real Ω
  set ρ' : Measure (α × ℝ) := ρ.map (Prod.map id f) with hρ'def
  have hρ' : ρ'.fst = ρ.fst
  · 

Proof state:
case hρ'
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
ρ : Measure (α × Ω)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α Ω)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
f : Ω → ℝ
hf : MeasurableEmbedding f
ρ' : Measure (α × ℝ) := Measure.map (Prod.map id f) ρ
hρ'def : ρ' = Measure.map (Prod.map id f) ρ
⊢ Measure.fst ρ' = Measure.fst ρ

Next tactic:
ext s hs
/-- A finite kernel which satisfies the disintegration property is almost everywhere equal to the
disintegration kernel. -/
theorem eq_condKernel_of_measure_eq_compProd (κ : kernel α Ω) [IsFiniteKernel κ]
    (hκ : ρ = ρ.fst ⊗ₘ κ) :
    ∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by
-- The idea is to transporting the question to `ℝ` from `Ω` using `exists_measurableEmbedding_real`
-- and then constructing a measure on `α × ℝ` using the obtained measurable embedding
  obtain ⟨f, hf⟩ := exists_measurableEmbedding_real Ω
  set ρ' : Measure (α × ℝ) := ρ.map (Prod.map id f) with hρ'def
  have hρ' : ρ'.fst = ρ.fst
  · ext s hs
    

Proof state:
case hρ'.h
α : Type u_1
mα : MeasurableSpace α
Ω : Type u_2
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
ρ : Measure (α × Ω)
inst✝¹ : IsFiniteMeasure ρ
κ : ↥(kernel α Ω)
inst✝ : IsFiniteKernel κ
hκ : ρ = Measure.fst ρ ⊗ₘ κ
f : Ω → ℝ
hf : MeasurableEmbedding f
ρ' : Measure (α × ℝ) := Measure.map (Prod.map id f) ρ
hρ'def : ρ' = Measure.map (Prod.map id f) ρ
s : Set α
hs : MeasurableSet s
⊢ ↑↑(Measure.fst ρ') s = ↑↑(Measure.fst ρ) s

Next tactic:
rw [hρ'def, Measure.fst_apply, Measure.fst_apply, Measure.map_apply]