l3lab/ntp-mathlib huggingface dataset:
theorem kernel.continuous_integral_integral :
    -- Continuous fun f : α × β →₁[(κ ⊗ₖ η) a] E => ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
    Continuous fun f : (MeasureTheory.Lp (α := β × γ) E 1 (((κ ⊗ₖ η) a) : Measure (β × γ))) =>
        ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  rw [continuous_iff_continuousAt]; intro g
  refine'
    tendsto_integral_of_L1 _ (L1.integrable_coeFn g).integral_compProd
      (eventually_of_forall fun h => (L1.integrable_coeFn h).integral_compProd) _
  simp_rw [←
    kernel.lintegral_fn_integral_sub (fun x => (‖x‖₊ : ℝ≥0∞)) (L1.integrable_coeFn _)
      (L1.integrable_coeFn g)]
  refine' tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds _ (fun i => zero_le _) _
  · exact fun i => ∫⁻ x, ∫⁻ y, ‖i (x, y) - g (x, y)‖₊ ∂η (a, x) ∂κ a
  swap; · exact fun i => lintegral_mono fun x => ennnorm_integral_le_lintegral_ennnorm _
  show
    Tendsto
      (fun i : β × γ →₁[(κ ⊗ₖ η) a] E => ∫⁻ x, ∫⁻ y : γ, ‖i (x, y) - g (x, y)‖₊ ∂η (a, x) ∂κ a)
      (𝓝 g) (𝓝 0)
  have : ∀ i : (MeasureTheory.Lp (α := β × γ) E 1 (((κ ⊗ₖ η) a) : Measure (β × γ))),
      Measurable fun z => (‖i z - g z‖₊ : ℝ≥0∞) := fun i =>
    ((Lp.stronglyMeasurable i).sub (Lp.stronglyMeasurable g)).ennnorm
  simp_rw [← kernel.lintegral_compProd _ _ _ (this _), ← L1.ofReal_norm_sub_eq_lintegral, ←
    ofReal_zero]
  refine' (continuous_ofReal.tendsto 0).comp _
  

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
g : ↥(Lp E 1)
this : ∀ (i : ↥(Lp E 1)), Measurable fun z => ↑‖↑↑i z - ↑↑g z‖₊
⊢ Tendsto (fun i => ‖i - g‖) (𝓝 g) (𝓝 0)

Next tactic:
rw [← tendsto_iff_norm_sub_tendsto_zero]
theorem kernel.continuous_integral_integral :
    -- Continuous fun f : α × β →₁[(κ ⊗ₖ η) a] E => ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
    Continuous fun f : (MeasureTheory.Lp (α := β × γ) E 1 (((κ ⊗ₖ η) a) : Measure (β × γ))) =>
        ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  rw [continuous_iff_continuousAt]; intro g
  refine'
    tendsto_integral_of_L1 _ (L1.integrable_coeFn g).integral_compProd
      (eventually_of_forall fun h => (L1.integrable_coeFn h).integral_compProd) _
  simp_rw [←
    kernel.lintegral_fn_integral_sub (fun x => (‖x‖₊ : ℝ≥0∞)) (L1.integrable_coeFn _)
      (L1.integrable_coeFn g)]
  refine' tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds _ (fun i => zero_le _) _
  · exact fun i => ∫⁻ x, ∫⁻ y, ‖i (x, y) - g (x, y)‖₊ ∂η (a, x) ∂κ a
  swap; · exact fun i => lintegral_mono fun x => ennnorm_integral_le_lintegral_ennnorm _
  show
    Tendsto
      (fun i : β × γ →₁[(κ ⊗ₖ η) a] E => ∫⁻ x, ∫⁻ y : γ, ‖i (x, y) - g (x, y)‖₊ ∂η (a, x) ∂κ a)
      (𝓝 g) (𝓝 0)
  have : ∀ i : (MeasureTheory.Lp (α := β × γ) E 1 (((κ ⊗ₖ η) a) : Measure (β × γ))),
      Measurable fun z => (‖i z - g z‖₊ : ℝ≥0∞) := fun i =>
    ((Lp.stronglyMeasurable i).sub (Lp.stronglyMeasurable g)).ennnorm
  simp_rw [← kernel.lintegral_compProd _ _ _ (this _), ← L1.ofReal_norm_sub_eq_lintegral, ←
    ofReal_zero]
  refine' (continuous_ofReal.tendsto 0).comp _
  rw [← tendsto_iff_norm_sub_tendsto_zero]
  

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
g : ↥(Lp E 1)
this : ∀ (i : ↥(Lp E 1)), Measurable fun z => ↑‖↑↑i z - ↑↑g z‖₊
⊢ Tendsto (fun i => i) (𝓝 g) (𝓝 g)

Next tactic:
exact tendsto_id
theorem integral_compProd :
    ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)),
      ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
⊢ ∀ {f : β × γ → E}, Integrable f → ∫ (z : β × γ), f z ∂(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), f (x, y) ∂η (a, x) ∂κ a

Next tactic:
apply Integrable.induction
theorem integral_compProd :
    ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)),
      ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  apply Integrable.induction
  · 

Proof state:
case h_ind
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
⊢ ∀ (c : E) ⦃s : Set (β × γ)⦄,
    MeasurableSet s →
      ↑↑((κ ⊗ₖ η) a) s < ⊤ →
        ∫ (z : β × γ), indicator s (fun x => c) z ∂(κ ⊗ₖ η) a =
          ∫ (x : β), ∫ (y : γ), indicator s (fun x => c) (x, y) ∂η (a, x) ∂κ a

Next tactic:
intro c s hs h2s
theorem integral_compProd :
    ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)),
      ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  apply Integrable.induction
  · intro c s hs h2s
    

Proof state:
case h_ind
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
c : E
s : Set (β × γ)
hs : MeasurableSet s
h2s : ↑↑((κ ⊗ₖ η) a) s < ⊤
⊢ ∫ (z : β × γ), indicator s (fun x => c) z ∂(κ ⊗ₖ η) a =
    ∫ (x : β), ∫ (y : γ), indicator s (fun x => c) (x, y) ∂η (a, x) ∂κ a

Next tactic:
simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp,
      integral_indicator (measurable_prod_mk_left hs), MeasureTheory.set_integral_const,
      integral_smul_const]
theorem integral_compProd :
    ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)),
      ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  apply Integrable.induction
  · intro c s hs h2s
    simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp,
      integral_indicator (measurable_prod_mk_left hs), MeasureTheory.set_integral_const,
      integral_smul_const]
    

Proof state:
case h_ind
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
c : E
s : Set (β × γ)
hs : MeasurableSet s
h2s : ↑↑((κ ⊗ₖ η) a) s < ⊤
⊢ ENNReal.toReal (↑↑((κ ⊗ₖ η) a) s) • c = (∫ (x : β), ENNReal.toReal (↑↑(η (a, x)) (Prod.mk x ⁻¹' s)) ∂κ a) • c

Next tactic:
congr 1
theorem integral_compProd :
    ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)),
      ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  apply Integrable.induction
  · intro c s hs h2s
    simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp,
      integral_indicator (measurable_prod_mk_left hs), MeasureTheory.set_integral_const,
      integral_smul_const]
    congr 1
    

Proof state:
case h_ind.e_a
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
c : E
s : Set (β × γ)
hs : MeasurableSet s
h2s : ↑↑((κ ⊗ₖ η) a) s < ⊤
⊢ ENNReal.toReal (↑↑((κ ⊗ₖ η) a) s) = ∫ (x : β), ENNReal.toReal (↑↑(η (a, x)) (Prod.mk x ⁻¹' s)) ∂κ a

Next tactic:
rw [integral_toReal]
theorem integral_compProd :
    ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)),
      ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  apply Integrable.induction
  · intro c s hs h2s
    simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp,
      integral_indicator (measurable_prod_mk_left hs), MeasureTheory.set_integral_const,
      integral_smul_const]
    congr 1
    rw [integral_toReal]
    

Proof state:
case h_ind.e_a
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
c : E
s : Set (β × γ)
hs : MeasurableSet s
h2s : ↑↑((κ ⊗ₖ η) a) s < ⊤
⊢ ENNReal.toReal (↑↑((κ ⊗ₖ η) a) s) = ENNReal.toReal (∫⁻ (a_1 : β), ↑↑(η (a, a_1)) (Prod.mk a_1 ⁻¹' s) ∂κ a)
case h_ind.e_a.hfm
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
c : E
s : Set (β × γ)
hs : MeasurableSet s
h2s : ↑↑((κ ⊗ₖ η) a) s < ⊤
⊢ AEMeasurable fun x => ↑↑(η (a, x)) (Prod.mk x ⁻¹' s)
case h_ind.e_a.hf
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
c : E
s : Set (β × γ)
hs : MeasurableSet s
h2s : ↑↑((κ ⊗ₖ η) a) s < ⊤
⊢ ∀ᵐ (x : β) ∂κ a, ↑↑(η (a, x)) (Prod.mk x ⁻¹' s) < ⊤

Next tactic:
rotate_left
theorem integral_compProd :
    ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)),
      ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  apply Integrable.induction
  · intro c s hs h2s
    simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp,
      integral_indicator (measurable_prod_mk_left hs), MeasureTheory.set_integral_const,
      integral_smul_const]
    congr 1
    rw [integral_toReal]
    rotate_left
    · 

Proof state:
case h_ind.e_a.hfm
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
c : E
s : Set (β × γ)
hs : MeasurableSet s
h2s : ↑↑((κ ⊗ₖ η) a) s < ⊤
⊢ AEMeasurable fun x => ↑↑(η (a, x)) (Prod.mk x ⁻¹' s)

Next tactic:
exact (kernel.measurable_kernel_prod_mk_left' hs _).aemeasurable
theorem integral_compProd :
    ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)),
      ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  apply Integrable.induction
  · intro c s hs h2s
    simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp,
      integral_indicator (measurable_prod_mk_left hs), MeasureTheory.set_integral_const,
      integral_smul_const]
    congr 1
    rw [integral_toReal]
    rotate_left
    · exact (kernel.measurable_kernel_prod_mk_left' hs _).aemeasurable
    · 

Proof state:
case h_ind.e_a.hf
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
c : E
s : Set (β × γ)
hs : MeasurableSet s
h2s : ↑↑((κ ⊗ₖ η) a) s < ⊤
⊢ ∀ᵐ (x : β) ∂κ a, ↑↑(η (a, x)) (Prod.mk x ⁻¹' s) < ⊤

Next tactic:
exact ae_kernel_lt_top a h2s.ne
theorem integral_compProd :
    ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)),
      ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  apply Integrable.induction
  · intro c s hs h2s
    simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp,
      integral_indicator (measurable_prod_mk_left hs), MeasureTheory.set_integral_const,
      integral_smul_const]
    congr 1
    rw [integral_toReal]
    rotate_left
    · exact (kernel.measurable_kernel_prod_mk_left' hs _).aemeasurable
    · exact ae_kernel_lt_top a h2s.ne
    

Proof state:
case h_ind.e_a
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
c : E
s : Set (β × γ)
hs : MeasurableSet s
h2s : ↑↑((κ ⊗ₖ η) a) s < ⊤
⊢ ENNReal.toReal (↑↑((κ ⊗ₖ η) a) s) = ENNReal.toReal (∫⁻ (a_1 : β), ↑↑(η (a, a_1)) (Prod.mk a_1 ⁻¹' s) ∂κ a)

Next tactic:
rw [kernel.compProd_apply _ _ _ hs]
theorem integral_compProd :
    ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)),
      ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  apply Integrable.induction
  · intro c s hs h2s
    simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp,
      integral_indicator (measurable_prod_mk_left hs), MeasureTheory.set_integral_const,
      integral_smul_const]
    congr 1
    rw [integral_toReal]
    rotate_left
    · exact (kernel.measurable_kernel_prod_mk_left' hs _).aemeasurable
    · exact ae_kernel_lt_top a h2s.ne
    rw [kernel.compProd_apply _ _ _ hs]
    

Proof state:
case h_ind.e_a
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
c : E
s : Set (β × γ)
hs : MeasurableSet s
h2s : ↑↑((κ ⊗ₖ η) a) s < ⊤
⊢ ENNReal.toReal (∫⁻ (b : β), ↑↑(η (a, b)) {c | (b, c) ∈ s} ∂κ a) =
    ENNReal.toReal (∫⁻ (a_1 : β), ↑↑(η (a, a_1)) (Prod.mk a_1 ⁻¹' s) ∂κ a)

Next tactic:
rfl
theorem integral_compProd :
    ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)),
      ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  apply Integrable.induction
  · intro c s hs h2s
    simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp,
      integral_indicator (measurable_prod_mk_left hs), MeasureTheory.set_integral_const,
      integral_smul_const]
    congr 1
    rw [integral_toReal]
    rotate_left
    · exact (kernel.measurable_kernel_prod_mk_left' hs _).aemeasurable
    · exact ae_kernel_lt_top a h2s.ne
    rw [kernel.compProd_apply _ _ _ hs]
    rfl
  · 

Proof state:
case h_add
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
⊢ ∀ ⦃f g : β × γ → E⦄,
    Disjoint (support f) (support g) →
      Integrable f →
        Integrable g →
          ∫ (z : β × γ), f z ∂(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), f (x, y) ∂η (a, x) ∂κ a →
            ∫ (z : β × γ), g z ∂(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), g (x, y) ∂η (a, x) ∂κ a →
              ∫ (z : β × γ), (f + g) z ∂(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), (f + g) (x, y) ∂η (a, x) ∂κ a

Next tactic:
intro f g _ i_f i_g hf hg
theorem integral_compProd :
    ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)),
      ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  apply Integrable.induction
  · intro c s hs h2s
    simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp,
      integral_indicator (measurable_prod_mk_left hs), MeasureTheory.set_integral_const,
      integral_smul_const]
    congr 1
    rw [integral_toReal]
    rotate_left
    · exact (kernel.measurable_kernel_prod_mk_left' hs _).aemeasurable
    · exact ae_kernel_lt_top a h2s.ne
    rw [kernel.compProd_apply _ _ _ hs]
    rfl
  · intro f g _ i_f i_g hf hg
    

Proof state:
case h_add
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
f g : β × γ → E
a✝ : Disjoint (support f) (support g)
i_f : Integrable f
i_g : Integrable g
hf : ∫ (z : β × γ), f z ∂(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), f (x, y) ∂η (a, x) ∂κ a
hg : ∫ (z : β × γ), g z ∂(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), g (x, y) ∂η (a, x) ∂κ a
⊢ ∫ (z : β × γ), (f + g) z ∂(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), (f + g) (x, y) ∂η (a, x) ∂κ a

Next tactic:
simp_rw [integral_add' i_f i_g, kernel.integral_integral_add' i_f i_g, hf, hg]
theorem integral_compProd :
    ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)),
      ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  apply Integrable.induction
  · intro c s hs h2s
    simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp,
      integral_indicator (measurable_prod_mk_left hs), MeasureTheory.set_integral_const,
      integral_smul_const]
    congr 1
    rw [integral_toReal]
    rotate_left
    · exact (kernel.measurable_kernel_prod_mk_left' hs _).aemeasurable
    · exact ae_kernel_lt_top a h2s.ne
    rw [kernel.compProd_apply _ _ _ hs]
    rfl
  · intro f g _ i_f i_g hf hg
    simp_rw [integral_add' i_f i_g, kernel.integral_integral_add' i_f i_g, hf, hg]
  · 

Proof state:
case h_closed
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
⊢ IsClosed {f | ∫ (z : β × γ), ↑↑f z ∂(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), ↑↑f (x, y) ∂η (a, x) ∂κ a}

Next tactic:
exact isClosed_eq continuous_integral kernel.continuous_integral_integral
theorem integral_compProd :
    ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)),
      ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  apply Integrable.induction
  · intro c s hs h2s
    simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp,
      integral_indicator (measurable_prod_mk_left hs), MeasureTheory.set_integral_const,
      integral_smul_const]
    congr 1
    rw [integral_toReal]
    rotate_left
    · exact (kernel.measurable_kernel_prod_mk_left' hs _).aemeasurable
    · exact ae_kernel_lt_top a h2s.ne
    rw [kernel.compProd_apply _ _ _ hs]
    rfl
  · intro f g _ i_f i_g hf hg
    simp_rw [integral_add' i_f i_g, kernel.integral_integral_add' i_f i_g, hf, hg]
  · exact isClosed_eq continuous_integral kernel.continuous_integral_integral
  · 

Proof state:
case h_ae
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
⊢ ∀ ⦃f g : β × γ → E⦄,
    f =ᵐ[(κ ⊗ₖ η) a] g →
      Integrable f →
        ∫ (z : β × γ), f z ∂(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), f (x, y) ∂η (a, x) ∂κ a →
          ∫ (z : β × γ), g z ∂(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), g (x, y) ∂η (a, x) ∂κ a

Next tactic:
intro f g hfg _ hf
theorem integral_compProd :
    ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)),
      ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  apply Integrable.induction
  · intro c s hs h2s
    simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp,
      integral_indicator (measurable_prod_mk_left hs), MeasureTheory.set_integral_const,
      integral_smul_const]
    congr 1
    rw [integral_toReal]
    rotate_left
    · exact (kernel.measurable_kernel_prod_mk_left' hs _).aemeasurable
    · exact ae_kernel_lt_top a h2s.ne
    rw [kernel.compProd_apply _ _ _ hs]
    rfl
  · intro f g _ i_f i_g hf hg
    simp_rw [integral_add' i_f i_g, kernel.integral_integral_add' i_f i_g, hf, hg]
  · exact isClosed_eq continuous_integral kernel.continuous_integral_integral
  · intro f g hfg _ hf
    

Proof state:
case h_ae
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
f g : β × γ → E
hfg : f =ᵐ[(κ ⊗ₖ η) a] g
a✝ : Integrable f
hf : ∫ (z : β × γ), f z ∂(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), f (x, y) ∂η (a, x) ∂κ a
⊢ ∫ (z : β × γ), g z ∂(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), g (x, y) ∂η (a, x) ∂κ a

Next tactic:
convert hf using 1
theorem integral_compProd :
    ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)),
      ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
  apply Integrable.induction
  · intro c s hs h2s
    simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp,
      integral_indicator (measurable_prod_mk_left hs), MeasureTheory.set_integral_const,
      integral_smul_const]
    congr 1
    rw [integral_toReal]
    rotate_left
    · exact (kernel.measurable_kernel_prod_mk_left' hs _).aemeasurable
    · exact ae_kernel_lt_top a h2s.ne
    rw [kernel.compProd_apply _ _ _ hs]
    rfl
  · intro f g _ i_f i_g hf hg
    simp_rw [integral_add' i_f i_g, kernel.integral_integral_add' i_f i_g, hf, hg]
  · exact isClosed_eq continuous_integral kernel.continuous_integral_integral
  · intro f g hfg _ hf
    convert hf using 1
    · 

Proof state:
case h.e'_2
α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝⁷ : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝⁶ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝⁵ : IsSFiniteKernel η
a : α
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
E' : Type u_5
inst✝² : NormedAddCommGroup E'
inst✝¹ : CompleteSpace E'
inst✝ : NormedSpace ℝ E'
f g : β × γ → E
hfg : f =ᵐ[(κ ⊗ₖ η) a] g
a✝ : Integrable f
hf : ∫ (z : β × γ), f z ∂(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), f (x, y) ∂η (a, x) ∂κ a
⊢ ∫ (z : β × γ), g z ∂(κ ⊗ₖ η) a = ∫ (z : β × γ), f z ∂(κ ⊗ₖ η) a

Next tactic:
exact integral_congr_ae hfg.symm