l3lab/ntp-mathlib huggingface dataset:
theorem hasFiniteIntegral_prod_iff' ⦃f : α × β → E⦄ (h1f : AEStronglyMeasurable f (μ.prod ν)) :
    HasFiniteIntegral f (μ.prod ν) ↔
      (∀ᵐ x ∂μ, HasFiniteIntegral (fun y => f (x, y)) ν) ∧
        HasFiniteIntegral (fun x => ∫ y, ‖f (x, y)‖ ∂ν) μ := by
  rw [hasFiniteIntegral_congr h1f.ae_eq_mk,
    hasFiniteIntegral_prod_iff h1f.stronglyMeasurable_mk]
  apply and_congr
  · apply eventually_congr
    filter_upwards [ae_ae_of_ae_prod h1f.ae_eq_mk.symm]
    intro x hx
    exact hasFiniteIntegral_congr hx
  · apply hasFiniteIntegral_congr
    

Proof state:
case h₂.h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁶ : MeasurableSpace α
inst✝⁵ : MeasurableSpace α'
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace β'
inst✝² : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝¹ : NormedAddCommGroup E
inst✝ : SigmaFinite ν
f : α × β → E
h1f : AEStronglyMeasurable f (Measure.prod μ ν)
⊢ (fun x => ∫ (y : β), ‖AEStronglyMeasurable.mk f h1f (x, y)‖ ∂ν) =ᶠ[ae μ] fun x => ∫ (y : β), ‖f (x, y)‖ ∂ν

Next tactic:
filter_upwards [ae_ae_of_ae_prod h1f.ae_eq_mk.symm] with _ hx using
      integral_congr_ae (EventuallyEq.fun_comp hx _)
/-- A binary function is integrable if the function `y ↦ f (x, y)` is integrable for almost every
  `x` and the function `x ↦ ∫ ‖f (x, y)‖ dy` is integrable. -/
theorem integrable_prod_iff ⦃f : α × β → E⦄ (h1f : AEStronglyMeasurable f (μ.prod ν)) :
    Integrable f (μ.prod ν) ↔
      (∀ᵐ x ∂μ, Integrable (fun y => f (x, y)) ν) ∧ Integrable (fun x => ∫ y, ‖f (x, y)‖ ∂ν) μ := by
  

Proof state:
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁶ : MeasurableSpace α
inst✝⁵ : MeasurableSpace α'
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace β'
inst✝² : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝¹ : NormedAddCommGroup E
inst✝ : SigmaFinite ν
f : α × β → E
h1f : AEStronglyMeasurable f (Measure.prod μ ν)
⊢ Integrable f ↔ (∀ᵐ (x : α) ∂μ, Integrable fun y => f (x, y)) ∧ Integrable fun x => ∫ (y : β), ‖f (x, y)‖ ∂ν

Next tactic:
simp [Integrable, h1f, hasFiniteIntegral_prod_iff', h1f.norm.integral_prod_right',
    h1f.prod_mk_left]
/-- A binary function is integrable if the function `x ↦ f (x, y)` is integrable for almost every
  `y` and the function `y ↦ ∫ ‖f (x, y)‖ dx` is integrable. -/
theorem integrable_prod_iff' [SigmaFinite μ] ⦃f : α × β → E⦄
    (h1f : AEStronglyMeasurable f (μ.prod ν)) :
    Integrable f (μ.prod ν) ↔
      (∀ᵐ y ∂ν, Integrable (fun x => f (x, y)) μ) ∧ Integrable (fun y => ∫ x, ‖f (x, y)‖ ∂μ) ν := by
  

Proof state:
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SigmaFinite ν
inst✝ : SigmaFinite μ
f : α × β → E
h1f : AEStronglyMeasurable f (Measure.prod μ ν)
⊢ Integrable f ↔ (∀ᵐ (y : β) ∂ν, Integrable fun x => f (x, y)) ∧ Integrable fun y => ∫ (x : α), ‖f (x, y)‖ ∂μ

Next tactic:
convert integrable_prod_iff h1f.prod_swap using 1
/-- A binary function is integrable if the function `x ↦ f (x, y)` is integrable for almost every
  `y` and the function `y ↦ ∫ ‖f (x, y)‖ dx` is integrable. -/
theorem integrable_prod_iff' [SigmaFinite μ] ⦃f : α × β → E⦄
    (h1f : AEStronglyMeasurable f (μ.prod ν)) :
    Integrable f (μ.prod ν) ↔
      (∀ᵐ y ∂ν, Integrable (fun x => f (x, y)) μ) ∧ Integrable (fun y => ∫ x, ‖f (x, y)‖ ∂μ) ν := by
  convert integrable_prod_iff h1f.prod_swap using 1
  

Proof state:
case h.e'_1.a
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SigmaFinite ν
inst✝ : SigmaFinite μ
f : α × β → E
h1f : AEStronglyMeasurable f (Measure.prod μ ν)
⊢ Integrable f ↔ Integrable fun z => f (Prod.swap z)

Next tactic:
rw [funext fun _ => Function.comp_apply.symm, integrable_swap_iff]
theorem Integrable.prod_smul {𝕜 : Type*} [NontriviallyNormedField 𝕜] [NormedSpace 𝕜 E]
    {f : α → 𝕜} {g : β → E} (hf : Integrable f μ) (hg : Integrable g ν) :
    Integrable (fun z : α × β => f z.1 • g z.2) (μ.prod ν) := by
  

Proof state:
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁸ : MeasurableSpace α
inst✝⁷ : MeasurableSpace α'
inst✝⁶ : MeasurableSpace β
inst✝⁵ : MeasurableSpace β'
inst✝⁴ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝³ : NormedAddCommGroup E
inst✝² : SigmaFinite ν
𝕜 : Type u_7
inst✝¹ : NontriviallyNormedField 𝕜
inst✝ : NormedSpace 𝕜 E
f : α → 𝕜
g : β → E
hf : Integrable f
hg : Integrable g
⊢ Integrable fun z => f z.1 • g z.2

Next tactic:
refine' (integrable_prod_iff _).2 ⟨_, _⟩
theorem Integrable.prod_smul {𝕜 : Type*} [NontriviallyNormedField 𝕜] [NormedSpace 𝕜 E]
    {f : α → 𝕜} {g : β → E} (hf : Integrable f μ) (hg : Integrable g ν) :
    Integrable (fun z : α × β => f z.1 • g z.2) (μ.prod ν) := by
  refine' (integrable_prod_iff _).2 ⟨_, _⟩
  · 

Proof state:
case refine'_1
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁸ : MeasurableSpace α
inst✝⁷ : MeasurableSpace α'
inst✝⁶ : MeasurableSpace β
inst✝⁵ : MeasurableSpace β'
inst✝⁴ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝³ : NormedAddCommGroup E
inst✝² : SigmaFinite ν
𝕜 : Type u_7
inst✝¹ : NontriviallyNormedField 𝕜
inst✝ : NormedSpace 𝕜 E
f : α → 𝕜
g : β → E
hf : Integrable f
hg : Integrable g
⊢ AEStronglyMeasurable (fun z => f z.1 • g z.2) (Measure.prod μ ν)

Next tactic:
exact hf.1.fst.smul hg.1.snd
theorem Integrable.prod_smul {𝕜 : Type*} [NontriviallyNormedField 𝕜] [NormedSpace 𝕜 E]
    {f : α → 𝕜} {g : β → E} (hf : Integrable f μ) (hg : Integrable g ν) :
    Integrable (fun z : α × β => f z.1 • g z.2) (μ.prod ν) := by
  refine' (integrable_prod_iff _).2 ⟨_, _⟩
  · exact hf.1.fst.smul hg.1.snd
  · 

Proof state:
case refine'_2
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁸ : MeasurableSpace α
inst✝⁷ : MeasurableSpace α'
inst✝⁶ : MeasurableSpace β
inst✝⁵ : MeasurableSpace β'
inst✝⁴ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝³ : NormedAddCommGroup E
inst✝² : SigmaFinite ν
𝕜 : Type u_7
inst✝¹ : NontriviallyNormedField 𝕜
inst✝ : NormedSpace 𝕜 E
f : α → 𝕜
g : β → E
hf : Integrable f
hg : Integrable g
⊢ ∀ᵐ (x : α) ∂μ, Integrable fun y => f (x, y).1 • g (x, y).2

Next tactic:
exact eventually_of_forall fun x => hg.smul (f x)
theorem Integrable.prod_smul {𝕜 : Type*} [NontriviallyNormedField 𝕜] [NormedSpace 𝕜 E]
    {f : α → 𝕜} {g : β → E} (hf : Integrable f μ) (hg : Integrable g ν) :
    Integrable (fun z : α × β => f z.1 • g z.2) (μ.prod ν) := by
  refine' (integrable_prod_iff _).2 ⟨_, _⟩
  · exact hf.1.fst.smul hg.1.snd
  · exact eventually_of_forall fun x => hg.smul (f x)
  · 

Proof state:
case refine'_3
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁸ : MeasurableSpace α
inst✝⁷ : MeasurableSpace α'
inst✝⁶ : MeasurableSpace β
inst✝⁵ : MeasurableSpace β'
inst✝⁴ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝³ : NormedAddCommGroup E
inst✝² : SigmaFinite ν
𝕜 : Type u_7
inst✝¹ : NontriviallyNormedField 𝕜
inst✝ : NormedSpace 𝕜 E
f : α → 𝕜
g : β → E
hf : Integrable f
hg : Integrable g
⊢ Integrable fun x => ∫ (y : β), ‖f (x, y).1 • g (x, y).2‖ ∂ν

Next tactic:
simpa only [norm_smul, integral_mul_left] using hf.norm.mul_const _
/-- Integrals commute with addition inside another integral. `F` can be any function. -/
theorem integral_fn_integral_add ⦃f g : α × β → E⦄ (F : E → E') (hf : Integrable f (μ.prod ν))
    (hg : Integrable g (μ.prod ν)) :
    (∫ x, F (∫ y, f (x, y) + g (x, y) ∂ν) ∂μ) =
      ∫ x, F ((∫ y, f (x, y) ∂ν) + ∫ y, g (x, y) ∂ν) ∂μ := by
  

Proof state:
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : MeasurableSpace α'
inst✝⁸ : MeasurableSpace β
inst✝⁷ : MeasurableSpace β'
inst✝⁶ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SigmaFinite ν
inst✝³ : NormedSpace ℝ E
inst✝² : SigmaFinite μ
E' : Type u_7
inst✝¹ : NormedAddCommGroup E'
inst✝ : NormedSpace ℝ E'
f g : α × β → E
F : E → E'
hf : Integrable f
hg : Integrable g
⊢ ∫ (x : α), F (∫ (y : β), f (x, y) + g (x, y) ∂ν) ∂μ =
    ∫ (x : α), F (∫ (y : β), f (x, y) ∂ν + ∫ (y : β), g (x, y) ∂ν) ∂μ

Next tactic:
refine' integral_congr_ae _
/-- Integrals commute with addition inside another integral. `F` can be any function. -/
theorem integral_fn_integral_add ⦃f g : α × β → E⦄ (F : E → E') (hf : Integrable f (μ.prod ν))
    (hg : Integrable g (μ.prod ν)) :
    (∫ x, F (∫ y, f (x, y) + g (x, y) ∂ν) ∂μ) =
      ∫ x, F ((∫ y, f (x, y) ∂ν) + ∫ y, g (x, y) ∂ν) ∂μ := by
  refine' integral_congr_ae _
  

Proof state:
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : MeasurableSpace α'
inst✝⁸ : MeasurableSpace β
inst✝⁷ : MeasurableSpace β'
inst✝⁶ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SigmaFinite ν
inst✝³ : NormedSpace ℝ E
inst✝² : SigmaFinite μ
E' : Type u_7
inst✝¹ : NormedAddCommGroup E'
inst✝ : NormedSpace ℝ E'
f g : α × β → E
F : E → E'
hf : Integrable f
hg : Integrable g
⊢ (fun x => F (∫ (y : β), f (x, y) + g (x, y) ∂ν)) =ᶠ[ae μ] fun x => F (∫ (y : β), f (x, y) ∂ν + ∫ (y : β), g (x, y) ∂ν)

Next tactic:
filter_upwards [hf.prod_right_ae, hg.prod_right_ae] with _ h2f h2g
/-- Integrals commute with addition inside another integral. `F` can be any function. -/
theorem integral_fn_integral_add ⦃f g : α × β → E⦄ (F : E → E') (hf : Integrable f (μ.prod ν))
    (hg : Integrable g (μ.prod ν)) :
    (∫ x, F (∫ y, f (x, y) + g (x, y) ∂ν) ∂μ) =
      ∫ x, F ((∫ y, f (x, y) ∂ν) + ∫ y, g (x, y) ∂ν) ∂μ := by
  refine' integral_congr_ae _
  filter_upwards [hf.prod_right_ae, hg.prod_right_ae] with _ h2f h2g
  

Proof state:
case h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : MeasurableSpace α'
inst✝⁸ : MeasurableSpace β
inst✝⁷ : MeasurableSpace β'
inst✝⁶ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SigmaFinite ν
inst✝³ : NormedSpace ℝ E
inst✝² : SigmaFinite μ
E' : Type u_7
inst✝¹ : NormedAddCommGroup E'
inst✝ : NormedSpace ℝ E'
f g : α × β → E
F : E → E'
hf : Integrable f
hg : Integrable g
a✝ : α
h2f : Integrable fun y => f (a✝, y)
h2g : Integrable fun y => g (a✝, y)
⊢ F (∫ (y : β), f (a✝, y) + g (a✝, y) ∂ν) = F (∫ (y : β), f (a✝, y) ∂ν + ∫ (y : β), g (a✝, y) ∂ν)

Next tactic:
simp [integral_add h2f h2g]
/-- Integrals commute with subtraction inside another integral.
  `F` can be any measurable function. -/
theorem integral_fn_integral_sub ⦃f g : α × β → E⦄ (F : E → E') (hf : Integrable f (μ.prod ν))
    (hg : Integrable g (μ.prod ν)) :
    (∫ x, F (∫ y, f (x, y) - g (x, y) ∂ν) ∂μ) =
      ∫ x, F ((∫ y, f (x, y) ∂ν) - ∫ y, g (x, y) ∂ν) ∂μ := by
  

Proof state:
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : MeasurableSpace α'
inst✝⁸ : MeasurableSpace β
inst✝⁷ : MeasurableSpace β'
inst✝⁶ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SigmaFinite ν
inst✝³ : NormedSpace ℝ E
inst✝² : SigmaFinite μ
E' : Type u_7
inst✝¹ : NormedAddCommGroup E'
inst✝ : NormedSpace ℝ E'
f g : α × β → E
F : E → E'
hf : Integrable f
hg : Integrable g
⊢ ∫ (x : α), F (∫ (y : β), f (x, y) - g (x, y) ∂ν) ∂μ =
    ∫ (x : α), F (∫ (y : β), f (x, y) ∂ν - ∫ (y : β), g (x, y) ∂ν) ∂μ

Next tactic:
refine' integral_congr_ae _
/-- Integrals commute with subtraction inside another integral.
  `F` can be any measurable function. -/
theorem integral_fn_integral_sub ⦃f g : α × β → E⦄ (F : E → E') (hf : Integrable f (μ.prod ν))
    (hg : Integrable g (μ.prod ν)) :
    (∫ x, F (∫ y, f (x, y) - g (x, y) ∂ν) ∂μ) =
      ∫ x, F ((∫ y, f (x, y) ∂ν) - ∫ y, g (x, y) ∂ν) ∂μ := by
  refine' integral_congr_ae _
  

Proof state:
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : MeasurableSpace α'
inst✝⁸ : MeasurableSpace β
inst✝⁷ : MeasurableSpace β'
inst✝⁶ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SigmaFinite ν
inst✝³ : NormedSpace ℝ E
inst✝² : SigmaFinite μ
E' : Type u_7
inst✝¹ : NormedAddCommGroup E'
inst✝ : NormedSpace ℝ E'
f g : α × β → E
F : E → E'
hf : Integrable f
hg : Integrable g
⊢ (fun x => F (∫ (y : β), f (x, y) - g (x, y) ∂ν)) =ᶠ[ae μ] fun x => F (∫ (y : β), f (x, y) ∂ν - ∫ (y : β), g (x, y) ∂ν)

Next tactic:
filter_upwards [hf.prod_right_ae, hg.prod_right_ae] with _ h2f h2g
/-- Integrals commute with subtraction inside another integral.
  `F` can be any measurable function. -/
theorem integral_fn_integral_sub ⦃f g : α × β → E⦄ (F : E → E') (hf : Integrable f (μ.prod ν))
    (hg : Integrable g (μ.prod ν)) :
    (∫ x, F (∫ y, f (x, y) - g (x, y) ∂ν) ∂μ) =
      ∫ x, F ((∫ y, f (x, y) ∂ν) - ∫ y, g (x, y) ∂ν) ∂μ := by
  refine' integral_congr_ae _
  filter_upwards [hf.prod_right_ae, hg.prod_right_ae] with _ h2f h2g
  

Proof state:
case h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : MeasurableSpace α'
inst✝⁸ : MeasurableSpace β
inst✝⁷ : MeasurableSpace β'
inst✝⁶ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SigmaFinite ν
inst✝³ : NormedSpace ℝ E
inst✝² : SigmaFinite μ
E' : Type u_7
inst✝¹ : NormedAddCommGroup E'
inst✝ : NormedSpace ℝ E'
f g : α × β → E
F : E → E'
hf : Integrable f
hg : Integrable g
a✝ : α
h2f : Integrable fun y => f (a✝, y)
h2g : Integrable fun y => g (a✝, y)
⊢ F (∫ (y : β), f (a✝, y) - g (a✝, y) ∂ν) = F (∫ (y : β), f (a✝, y) ∂ν - ∫ (y : β), g (a✝, y) ∂ν)

Next tactic:
simp [integral_sub h2f h2g]
/-- Integrals commute with subtraction inside a lower Lebesgue integral.
  `F` can be any function. -/
theorem lintegral_fn_integral_sub ⦃f g : α × β → E⦄ (F : E → ℝ≥0∞) (hf : Integrable f (μ.prod ν))
    (hg : Integrable g (μ.prod ν)) :
    (∫⁻ x, F (∫ y, f (x, y) - g (x, y) ∂ν) ∂μ) =
      ∫⁻ x, F ((∫ y, f (x, y) ∂ν) - ∫ y, g (x, y) ∂ν) ∂μ := by
  

Proof state:
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : MeasurableSpace α'
inst✝⁸ : MeasurableSpace β
inst✝⁷ : MeasurableSpace β'
inst✝⁶ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SigmaFinite ν
inst✝³ : NormedSpace ℝ E
inst✝² : SigmaFinite μ
E' : Type u_7
inst✝¹ : NormedAddCommGroup E'
inst✝ : NormedSpace ℝ E'
f g : α × β → E
F : E → ℝ≥0∞
hf : Integrable f
hg : Integrable g
⊢ ∫⁻ (x : α), F (∫ (y : β), f (x, y) - g (x, y) ∂ν) ∂μ =
    ∫⁻ (x : α), F (∫ (y : β), f (x, y) ∂ν - ∫ (y : β), g (x, y) ∂ν) ∂μ

Next tactic:
refine' lintegral_congr_ae _
/-- Integrals commute with subtraction inside a lower Lebesgue integral.
  `F` can be any function. -/
theorem lintegral_fn_integral_sub ⦃f g : α × β → E⦄ (F : E → ℝ≥0∞) (hf : Integrable f (μ.prod ν))
    (hg : Integrable g (μ.prod ν)) :
    (∫⁻ x, F (∫ y, f (x, y) - g (x, y) ∂ν) ∂μ) =
      ∫⁻ x, F ((∫ y, f (x, y) ∂ν) - ∫ y, g (x, y) ∂ν) ∂μ := by
  refine' lintegral_congr_ae _
  

Proof state:
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : MeasurableSpace α'
inst✝⁸ : MeasurableSpace β
inst✝⁷ : MeasurableSpace β'
inst✝⁶ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SigmaFinite ν
inst✝³ : NormedSpace ℝ E
inst✝² : SigmaFinite μ
E' : Type u_7
inst✝¹ : NormedAddCommGroup E'
inst✝ : NormedSpace ℝ E'
f g : α × β → E
F : E → ℝ≥0∞
hf : Integrable f
hg : Integrable g
⊢ (fun x => F (∫ (y : β), f (x, y) - g (x, y) ∂ν)) =ᶠ[ae μ] fun x => F (∫ (y : β), f (x, y) ∂ν - ∫ (y : β), g (x, y) ∂ν)

Next tactic:
filter_upwards [hf.prod_right_ae, hg.prod_right_ae] with _ h2f h2g
/-- Integrals commute with subtraction inside a lower Lebesgue integral.
  `F` can be any function. -/
theorem lintegral_fn_integral_sub ⦃f g : α × β → E⦄ (F : E → ℝ≥0∞) (hf : Integrable f (μ.prod ν))
    (hg : Integrable g (μ.prod ν)) :
    (∫⁻ x, F (∫ y, f (x, y) - g (x, y) ∂ν) ∂μ) =
      ∫⁻ x, F ((∫ y, f (x, y) ∂ν) - ∫ y, g (x, y) ∂ν) ∂μ := by
  refine' lintegral_congr_ae _
  filter_upwards [hf.prod_right_ae, hg.prod_right_ae] with _ h2f h2g
  

Proof state:
case h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : MeasurableSpace α'
inst✝⁸ : MeasurableSpace β
inst✝⁷ : MeasurableSpace β'
inst✝⁶ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SigmaFinite ν
inst✝³ : NormedSpace ℝ E
inst✝² : SigmaFinite μ
E' : Type u_7
inst✝¹ : NormedAddCommGroup E'
inst✝ : NormedSpace ℝ E'
f g : α × β → E
F : E → ℝ≥0∞
hf : Integrable f
hg : Integrable g
a✝ : α
h2f : Integrable fun y => f (a✝, y)
h2g : Integrable fun y => g (a✝, y)
⊢ F (∫ (y : β), f (a✝, y) - g (a✝, y) ∂ν) = F (∫ (y : β), f (a✝, y) ∂ν - ∫ (y : β), g (a✝, y) ∂ν)

Next tactic:
simp [integral_sub h2f h2g]
/-- The map that sends an L¹-function `f : α × β → E` to `∫∫f` is continuous. -/
theorem continuous_integral_integral :
    Continuous fun f : α × β →₁[μ.prod ν] E => ∫ x, ∫ y, f (x, y) ∂ν ∂μ := by
  

Proof state:
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : MeasurableSpace α'
inst✝⁸ : MeasurableSpace β
inst✝⁷ : MeasurableSpace β'
inst✝⁶ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SigmaFinite ν
inst✝³ : NormedSpace ℝ E
inst✝² : SigmaFinite μ
E' : Type u_7
inst✝¹ : NormedAddCommGroup E'
inst✝ : NormedSpace ℝ E'
⊢ Continuous fun f => ∫ (x : α), ∫ (y : β), ↑↑f (x, y) ∂ν ∂μ

Next tactic:
rw [continuous_iff_continuousAt]
/-- The map that sends an L¹-function `f : α × β → E` to `∫∫f` is continuous. -/
theorem continuous_integral_integral :
    Continuous fun f : α × β →₁[μ.prod ν] E => ∫ x, ∫ y, f (x, y) ∂ν ∂μ := by
  rw [continuous_iff_continuousAt]; 

Proof state:
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : MeasurableSpace α'
inst✝⁸ : MeasurableSpace β
inst✝⁷ : MeasurableSpace β'
inst✝⁶ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SigmaFinite ν
inst✝³ : NormedSpace ℝ E
inst✝² : SigmaFinite μ
E' : Type u_7
inst✝¹ : NormedAddCommGroup E'
inst✝ : NormedSpace ℝ E'
⊢ ∀ (x : ↥(Lp E 1)), ContinuousAt (fun f => ∫ (x : α), ∫ (y : β), ↑↑f (x, y) ∂ν ∂μ) x

Next tactic:
intro g
/-- The map that sends an L¹-function `f : α × β → E` to `∫∫f` is continuous. -/
theorem continuous_integral_integral :
    Continuous fun f : α × β →₁[μ.prod ν] E => ∫ x, ∫ y, f (x, y) ∂ν ∂μ := by
  rw [continuous_iff_continuousAt]; intro g
  

Proof state:
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : MeasurableSpace α'
inst✝⁸ : MeasurableSpace β
inst✝⁷ : MeasurableSpace β'
inst✝⁶ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SigmaFinite ν
inst✝³ : NormedSpace ℝ E
inst✝² : SigmaFinite μ
E' : Type u_7
inst✝¹ : NormedAddCommGroup E'
inst✝ : NormedSpace ℝ E'
g : ↥(Lp E 1)
⊢ ContinuousAt (fun f => ∫ (x : α), ∫ (y : β), ↑↑f (x, y) ∂ν ∂μ) g

Next tactic:
refine'
    tendsto_integral_of_L1 _ (L1.integrable_coeFn g).integral_prod_left
      (eventually_of_forall fun h => (L1.integrable_coeFn h).integral_prod_left) _
/-- The map that sends an L¹-function `f : α × β → E` to `∫∫f` is continuous. -/
theorem continuous_integral_integral :
    Continuous fun f : α × β →₁[μ.prod ν] E => ∫ x, ∫ y, f (x, y) ∂ν ∂μ := by
  rw [continuous_iff_continuousAt]; intro g
  refine'
    tendsto_integral_of_L1 _ (L1.integrable_coeFn g).integral_prod_left
      (eventually_of_forall fun h => (L1.integrable_coeFn h).integral_prod_left) _
  

Proof state:
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : MeasurableSpace α'
inst✝⁸ : MeasurableSpace β
inst✝⁷ : MeasurableSpace β'
inst✝⁶ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SigmaFinite ν
inst✝³ : NormedSpace ℝ E
inst✝² : SigmaFinite μ
E' : Type u_7
inst✝¹ : NormedAddCommGroup E'
inst✝ : NormedSpace ℝ E'
g : ↥(Lp E 1)
⊢ Tendsto (fun i => ∫⁻ (x : α), ↑‖∫ (y : β), ↑↑i (x, y) ∂ν - ∫ (y : β), ↑↑g (x, y) ∂ν‖₊ ∂μ) (𝓝 g) (𝓝 0)

Next tactic:
simp_rw [←
    lintegral_fn_integral_sub (fun x => (‖x‖₊ : ℝ≥0∞)) (L1.integrable_coeFn _)
      (L1.integrable_coeFn g)]
/-- The map that sends an L¹-function `f : α × β → E` to `∫∫f` is continuous. -/
theorem continuous_integral_integral :
    Continuous fun f : α × β →₁[μ.prod ν] E => ∫ x, ∫ y, f (x, y) ∂ν ∂μ := by
  rw [continuous_iff_continuousAt]; intro g
  refine'
    tendsto_integral_of_L1 _ (L1.integrable_coeFn g).integral_prod_left
      (eventually_of_forall fun h => (L1.integrable_coeFn h).integral_prod_left) _
  simp_rw [←
    lintegral_fn_integral_sub (fun x => (‖x‖₊ : ℝ≥0∞)) (L1.integrable_coeFn _)
      (L1.integrable_coeFn g)]
  

Proof state:
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : MeasurableSpace α'
inst✝⁸ : MeasurableSpace β
inst✝⁷ : MeasurableSpace β'
inst✝⁶ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SigmaFinite ν
inst✝³ : NormedSpace ℝ E
inst✝² : SigmaFinite μ
E' : Type u_7
inst✝¹ : NormedAddCommGroup E'
inst✝ : NormedSpace ℝ E'
g : ↥(Lp E 1)
⊢ Tendsto (fun i => ∫⁻ (x : α), ↑‖∫ (y : β), ↑↑i (x, y) - ↑↑g (x, y) ∂ν‖₊ ∂μ) (𝓝 g) (𝓝 0)

Next tactic:
refine' tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds _ (fun i => zero_le _) _
/-- The map that sends an L¹-function `f : α × β → E` to `∫∫f` is continuous. -/
theorem continuous_integral_integral :
    Continuous fun f : α × β →₁[μ.prod ν] E => ∫ x, ∫ y, f (x, y) ∂ν ∂μ := by
  rw [continuous_iff_continuousAt]; intro g
  refine'
    tendsto_integral_of_L1 _ (L1.integrable_coeFn g).integral_prod_left
      (eventually_of_forall fun h => (L1.integrable_coeFn h).integral_prod_left) _
  simp_rw [←
    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 _) _
  · 

Proof state:
case refine'_1
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : MeasurableSpace α'
inst✝⁸ : MeasurableSpace β
inst✝⁷ : MeasurableSpace β'
inst✝⁶ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SigmaFinite ν
inst✝³ : NormedSpace ℝ E
inst✝² : SigmaFinite μ
E' : Type u_7
inst✝¹ : NormedAddCommGroup E'
inst✝ : NormedSpace ℝ E'
g : ↥(Lp E 1)
⊢ ↥(Lp E 1) → ℝ≥0∞

Next tactic:
exact fun i => ∫⁻ x, ∫⁻ y, ‖i (x, y) - g (x, y)‖₊ ∂ν ∂μ