l3lab/ntp-mathlib huggingface dataset:
theorem integral_comp_comm (L : E →L[𝕜] F) {φ : α → E} (φ_int : Integrable φ μ) :
    (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ) := by
  apply Integrable.induction (P := fun φ => (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ))
  · intro e s s_meas _
    rw [integral_indicator_const e s_meas, ← @smul_one_smul E ℝ 𝕜 _ _ _ _ _ (μ s).toReal e,
      ContinuousLinearMap.map_smul, @smul_one_smul F ℝ 𝕜 _ _ _ _ _ (μ s).toReal (L e), ←
      integral_indicator_const (L e) s_meas]
    congr 1 with a
    erw [Set.indicator_comp_of_zero L.map_zero]
    rfl
  · intro f g _ f_int g_int hf hg
    simp [L.map_add, integral_add (μ := μ) f_int g_int,
      integral_add (μ := μ) (L.integrable_comp f_int) (L.integrable_comp g_int), hf, hg]
  · exact isClosed_eq L.continuous_integral_comp_L1 (L.continuous.comp continuous_integral)
  · intro f g hfg _ hf
    convert hf using 1 <;> 

Proof state:
case h.e'_3
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁹ : MeasurableSpace α
ι : Type u_5
inst✝⁸ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ E
L : E →L[𝕜] F
φ : α → E
φ_int : Integrable φ
f g : α → E
hfg : f =ᵐ[μ] g
a✝ : Integrable f
hf : ∫ (a : α), L (f a) ∂μ = L (∫ (a : α), f a ∂μ)
⊢ L (∫ (a : α), g a ∂μ) = L (∫ (a : α), f a ∂μ)

Next tactic:
clear hf
theorem integral_comp_comm (L : E →L[𝕜] F) {φ : α → E} (φ_int : Integrable φ μ) :
    (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ) := by
  apply Integrable.induction (P := fun φ => (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ))
  · intro e s s_meas _
    rw [integral_indicator_const e s_meas, ← @smul_one_smul E ℝ 𝕜 _ _ _ _ _ (μ s).toReal e,
      ContinuousLinearMap.map_smul, @smul_one_smul F ℝ 𝕜 _ _ _ _ _ (μ s).toReal (L e), ←
      integral_indicator_const (L e) s_meas]
    congr 1 with a
    erw [Set.indicator_comp_of_zero L.map_zero]
    rfl
  · intro f g _ f_int g_int hf hg
    simp [L.map_add, integral_add (μ := μ) f_int g_int,
      integral_add (μ := μ) (L.integrable_comp f_int) (L.integrable_comp g_int), hf, hg]
  · exact isClosed_eq L.continuous_integral_comp_L1 (L.continuous.comp continuous_integral)
  · intro f g hfg _ hf
    convert hf using 1 <;> clear hf
    · 

Proof state:
case h.e'_2
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁹ : MeasurableSpace α
ι : Type u_5
inst✝⁸ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ E
L : E →L[𝕜] F
φ : α → E
φ_int : Integrable φ
f g : α → E
hfg : f =ᵐ[μ] g
a✝ : Integrable f
⊢ ∫ (a : α), L (g a) ∂μ = ∫ (a : α), L (f a) ∂μ

Next tactic:
exact integral_congr_ae (hfg.fun_comp L).symm
theorem integral_comp_comm (L : E →L[𝕜] F) {φ : α → E} (φ_int : Integrable φ μ) :
    (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ) := by
  apply Integrable.induction (P := fun φ => (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ))
  · intro e s s_meas _
    rw [integral_indicator_const e s_meas, ← @smul_one_smul E ℝ 𝕜 _ _ _ _ _ (μ s).toReal e,
      ContinuousLinearMap.map_smul, @smul_one_smul F ℝ 𝕜 _ _ _ _ _ (μ s).toReal (L e), ←
      integral_indicator_const (L e) s_meas]
    congr 1 with a
    erw [Set.indicator_comp_of_zero L.map_zero]
    rfl
  · intro f g _ f_int g_int hf hg
    simp [L.map_add, integral_add (μ := μ) f_int g_int,
      integral_add (μ := μ) (L.integrable_comp f_int) (L.integrable_comp g_int), hf, hg]
  · exact isClosed_eq L.continuous_integral_comp_L1 (L.continuous.comp continuous_integral)
  · intro f g hfg _ hf
    convert hf using 1 <;> clear hf
    · exact integral_congr_ae (hfg.fun_comp L).symm
    · 

Proof state:
case h.e'_3
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁹ : MeasurableSpace α
ι : Type u_5
inst✝⁸ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ E
L : E →L[𝕜] F
φ : α → E
φ_int : Integrable φ
f g : α → E
hfg : f =ᵐ[μ] g
a✝ : Integrable f
⊢ L (∫ (a : α), g a ∂μ) = L (∫ (a : α), f a ∂μ)

Next tactic:
rw [integral_congr_ae hfg.symm]
theorem integral_comp_comm (L : E →L[𝕜] F) {φ : α → E} (φ_int : Integrable φ μ) :
    (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ) := by
  apply Integrable.induction (P := fun φ => (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ))
  · intro e s s_meas _
    rw [integral_indicator_const e s_meas, ← @smul_one_smul E ℝ 𝕜 _ _ _ _ _ (μ s).toReal e,
      ContinuousLinearMap.map_smul, @smul_one_smul F ℝ 𝕜 _ _ _ _ _ (μ s).toReal (L e), ←
      integral_indicator_const (L e) s_meas]
    congr 1 with a
    erw [Set.indicator_comp_of_zero L.map_zero]
    rfl
  · intro f g _ f_int g_int hf hg
    simp [L.map_add, integral_add (μ := μ) f_int g_int,
      integral_add (μ := μ) (L.integrable_comp f_int) (L.integrable_comp g_int), hf, hg]
  · exact isClosed_eq L.continuous_integral_comp_L1 (L.continuous.comp continuous_integral)
  · intro f g hfg _ hf
    convert hf using 1 <;> clear hf
    · exact integral_congr_ae (hfg.fun_comp L).symm
    · rw [integral_congr_ae hfg.symm]
  

Proof state:
case a
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁹ : MeasurableSpace α
ι : Type u_5
inst✝⁸ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ E
L : E →L[𝕜] F
φ : α → E
φ_int : Integrable φ
⊢ Integrable fun a => φ a

Next tactic:
all_goals assumption
theorem integral_comp_comm (L : E →L[𝕜] F) {φ : α → E} (φ_int : Integrable φ μ) :
    (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ) := by
  apply Integrable.induction (P := fun φ => (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ))
  · intro e s s_meas _
    rw [integral_indicator_const e s_meas, ← @smul_one_smul E ℝ 𝕜 _ _ _ _ _ (μ s).toReal e,
      ContinuousLinearMap.map_smul, @smul_one_smul F ℝ 𝕜 _ _ _ _ _ (μ s).toReal (L e), ←
      integral_indicator_const (L e) s_meas]
    congr 1 with a
    erw [Set.indicator_comp_of_zero L.map_zero]
    rfl
  · intro f g _ f_int g_int hf hg
    simp [L.map_add, integral_add (μ := μ) f_int g_int,
      integral_add (μ := μ) (L.integrable_comp f_int) (L.integrable_comp g_int), hf, hg]
  · exact isClosed_eq L.continuous_integral_comp_L1 (L.continuous.comp continuous_integral)
  · intro f g hfg _ hf
    convert hf using 1 <;> clear hf
    · exact integral_congr_ae (hfg.fun_comp L).symm
    · rw [integral_congr_ae hfg.symm]
  all_goals 

Proof state:
case a
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁹ : MeasurableSpace α
ι : Type u_5
inst✝⁸ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ E
L : E →L[𝕜] F
φ : α → E
φ_int : Integrable φ
⊢ Integrable fun a => φ a

Next tactic:
assumption
theorem integral_comp_comm' (L : E →L[𝕜] F) {K} (hL : AntilipschitzWith K L) (φ : α → E) :
    (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ) := by
  

Proof state:
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁹ : MeasurableSpace α
ι : Type u_5
inst✝⁸ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ E
L : E →L[𝕜] F
K : ℝ≥0
hL : AntilipschitzWith K ⇑L
φ : α → E
⊢ ∫ (a : α), L (φ a) ∂μ = L (∫ (a : α), φ a ∂μ)

Next tactic:
by_cases h : Integrable φ μ
theorem integral_comp_comm' (L : E →L[𝕜] F) {K} (hL : AntilipschitzWith K L) (φ : α → E) :
    (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ) := by
  by_cases h : Integrable φ μ
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁹ : MeasurableSpace α
ι : Type u_5
inst✝⁸ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ E
L : E →L[𝕜] F
K : ℝ≥0
hL : AntilipschitzWith K ⇑L
φ : α → E
h : Integrable φ
⊢ ∫ (a : α), L (φ a) ∂μ = L (∫ (a : α), φ a ∂μ)

Next tactic:
exact integral_comp_comm L h
theorem integral_comp_comm' (L : E →L[𝕜] F) {K} (hL : AntilipschitzWith K L) (φ : α → E) :
    (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ) := by
  by_cases h : Integrable φ μ
  · exact integral_comp_comm L h
  

Proof state:
case neg
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁹ : MeasurableSpace α
ι : Type u_5
inst✝⁸ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ E
L : E →L[𝕜] F
K : ℝ≥0
hL : AntilipschitzWith K ⇑L
φ : α → E
h : ¬Integrable φ
⊢ ∫ (a : α), L (φ a) ∂μ = L (∫ (a : α), φ a ∂μ)

Next tactic:
have : ¬Integrable (fun a => L (φ a)) μ := by
    rwa [← Function.comp_def,
      LipschitzWith.integrable_comp_iff_of_antilipschitz L.lipschitz hL L.map_zero]
theorem integral_comp_comm' (L : E →L[𝕜] F) {K} (hL : AntilipschitzWith K L) (φ : α → E) :
    (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ) := by
  by_cases h : Integrable φ μ
  · exact integral_comp_comm L h
  have : ¬Integrable (fun a => L (φ a)) μ := by
    

Proof state:
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁹ : MeasurableSpace α
ι : Type u_5
inst✝⁸ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ E
L : E →L[𝕜] F
K : ℝ≥0
hL : AntilipschitzWith K ⇑L
φ : α → E
h : ¬Integrable φ
⊢ ¬Integrable fun a => L (φ a)

Next tactic:
rwa [← Function.comp_def,
      LipschitzWith.integrable_comp_iff_of_antilipschitz L.lipschitz hL L.map_zero]
theorem integral_comp_comm' (L : E →L[𝕜] F) {K} (hL : AntilipschitzWith K L) (φ : α → E) :
    (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ) := by
  by_cases h : Integrable φ μ
  · exact integral_comp_comm L h
  have : ¬Integrable (fun a => L (φ a)) μ := by
    rwa [← Function.comp_def,
      LipschitzWith.integrable_comp_iff_of_antilipschitz L.lipschitz hL L.map_zero]
  

Proof state:
case neg
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁹ : MeasurableSpace α
ι : Type u_5
inst✝⁸ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ E
L : E →L[𝕜] F
K : ℝ≥0
hL : AntilipschitzWith K ⇑L
φ : α → E
h : ¬Integrable φ
this : ¬Integrable fun a => L (φ a)
⊢ ∫ (a : α), L (φ a) ∂μ = L (∫ (a : α), φ a ∂μ)

Next tactic:
simp [integral_undef, h, this]
theorem integral_comp_comm (L : E ≃L[𝕜] F) (φ : α → E) : (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ) := by
  

Proof state:
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁷ : MeasurableSpace α
ι : Type u_5
inst✝⁶ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝¹ : NormedSpace ℝ F
inst✝ : NormedSpace ℝ E
L : E ≃L[𝕜] F
φ : α → E
⊢ ∫ (a : α), L (φ a) ∂μ = L (∫ (a : α), φ a ∂μ)

Next tactic:
have : CompleteSpace E ↔ CompleteSpace F :=
    completeSpace_congr (e := L.toEquiv) L.uniformEmbedding
theorem integral_comp_comm (L : E ≃L[𝕜] F) (φ : α → E) : (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ) := by
  have : CompleteSpace E ↔ CompleteSpace F :=
    completeSpace_congr (e := L.toEquiv) L.uniformEmbedding
  

Proof state:
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁷ : MeasurableSpace α
ι : Type u_5
inst✝⁶ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝¹ : NormedSpace ℝ F
inst✝ : NormedSpace ℝ E
L : E ≃L[𝕜] F
φ : α → E
this : CompleteSpace E ↔ CompleteSpace F
⊢ ∫ (a : α), L (φ a) ∂μ = L (∫ (a : α), φ a ∂μ)

Next tactic:
by_cases hE : CompleteSpace E
theorem integral_comp_comm (L : E ≃L[𝕜] F) (φ : α → E) : (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ) := by
  have : CompleteSpace E ↔ CompleteSpace F :=
    completeSpace_congr (e := L.toEquiv) L.uniformEmbedding
  by_cases hE : CompleteSpace E
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁷ : MeasurableSpace α
ι : Type u_5
inst✝⁶ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝¹ : NormedSpace ℝ F
inst✝ : NormedSpace ℝ E
L : E ≃L[𝕜] F
φ : α → E
this : CompleteSpace E ↔ CompleteSpace F
hE : CompleteSpace E
⊢ ∫ (a : α), L (φ a) ∂μ = L (∫ (a : α), φ a ∂μ)

Next tactic:
have : CompleteSpace F := this.1 hE
theorem integral_comp_comm (L : E ≃L[𝕜] F) (φ : α → E) : (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ) := by
  have : CompleteSpace E ↔ CompleteSpace F :=
    completeSpace_congr (e := L.toEquiv) L.uniformEmbedding
  by_cases hE : CompleteSpace E
  · have : CompleteSpace F := this.1 hE
    

Proof state:
case pos
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁷ : MeasurableSpace α
ι : Type u_5
inst✝⁶ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝¹ : NormedSpace ℝ F
inst✝ : NormedSpace ℝ E
L : E ≃L[𝕜] F
φ : α → E
this✝ : CompleteSpace E ↔ CompleteSpace F
hE : CompleteSpace E
this : CompleteSpace F
⊢ ∫ (a : α), L (φ a) ∂μ = L (∫ (a : α), φ a ∂μ)

Next tactic:
exact L.toContinuousLinearMap.integral_comp_comm' L.antilipschitz _
theorem integral_comp_comm (L : E ≃L[𝕜] F) (φ : α → E) : (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ) := by
  have : CompleteSpace E ↔ CompleteSpace F :=
    completeSpace_congr (e := L.toEquiv) L.uniformEmbedding
  by_cases hE : CompleteSpace E
  · have : CompleteSpace F := this.1 hE
    exact L.toContinuousLinearMap.integral_comp_comm' L.antilipschitz _
  · 

Proof state:
case neg
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁷ : MeasurableSpace α
ι : Type u_5
inst✝⁶ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝¹ : NormedSpace ℝ F
inst✝ : NormedSpace ℝ E
L : E ≃L[𝕜] F
φ : α → E
this : CompleteSpace E ↔ CompleteSpace F
hE : ¬CompleteSpace E
⊢ ∫ (a : α), L (φ a) ∂μ = L (∫ (a : α), φ a ∂μ)

Next tactic:
have := this.not.1 hE
theorem integral_comp_comm (L : E ≃L[𝕜] F) (φ : α → E) : (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ) := by
  have : CompleteSpace E ↔ CompleteSpace F :=
    completeSpace_congr (e := L.toEquiv) L.uniformEmbedding
  by_cases hE : CompleteSpace E
  · have : CompleteSpace F := this.1 hE
    exact L.toContinuousLinearMap.integral_comp_comm' L.antilipschitz _
  · have := this.not.1 hE
    

Proof state:
case neg
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁷ : MeasurableSpace α
ι : Type u_5
inst✝⁶ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝¹ : NormedSpace ℝ F
inst✝ : NormedSpace ℝ E
L : E ≃L[𝕜] F
φ : α → E
this✝ : CompleteSpace E ↔ CompleteSpace F
hE : ¬CompleteSpace E
this : ¬CompleteSpace F
⊢ ∫ (a : α), L (φ a) ∂μ = L (∫ (a : α), φ a ∂μ)

Next tactic:
simp [integral, *]
theorem integral_coe_re_add_coe_im {f : α → 𝕜} (hf : Integrable f μ) :
    (∫ x, (IsROrC.re (f x) : 𝕜) ∂μ) + (∫ x, (IsROrC.im (f x) : 𝕜) ∂μ) * IsROrC.I = ∫ x, f x ∂μ := by
  

Proof state:
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : MeasurableSpace α
ι : Type u_5
inst✝⁴ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝³ : IsROrC 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
f : α → 𝕜
hf : Integrable f
⊢ ∫ (x : α), ↑(IsROrC.re (f x)) ∂μ + (∫ (x : α), ↑(IsROrC.im (f x)) ∂μ) * IsROrC.I = ∫ (x : α), f x ∂μ

Next tactic:
rw [mul_comm, ← smul_eq_mul, ← integral_smul, ← integral_add]
theorem integral_coe_re_add_coe_im {f : α → 𝕜} (hf : Integrable f μ) :
    (∫ x, (IsROrC.re (f x) : 𝕜) ∂μ) + (∫ x, (IsROrC.im (f x) : 𝕜) ∂μ) * IsROrC.I = ∫ x, f x ∂μ := by
  rw [mul_comm, ← smul_eq_mul, ← integral_smul, ← integral_add]
  · 

Proof state:
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : MeasurableSpace α
ι : Type u_5
inst✝⁴ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝³ : IsROrC 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
f : α → 𝕜
hf : Integrable f
⊢ ∫ (a : α), ↑(IsROrC.re (f a)) + IsROrC.I • ↑(IsROrC.im (f a)) ∂μ = ∫ (x : α), f x ∂μ

Next tactic:
congr
theorem integral_coe_re_add_coe_im {f : α → 𝕜} (hf : Integrable f μ) :
    (∫ x, (IsROrC.re (f x) : 𝕜) ∂μ) + (∫ x, (IsROrC.im (f x) : 𝕜) ∂μ) * IsROrC.I = ∫ x, f x ∂μ := by
  rw [mul_comm, ← smul_eq_mul, ← integral_smul, ← integral_add]
  · congr
    

Proof state:
case e_f
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : MeasurableSpace α
ι : Type u_5
inst✝⁴ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝³ : IsROrC 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
f : α → 𝕜
hf : Integrable f
⊢ (fun a => ↑(IsROrC.re (f a)) + IsROrC.I • ↑(IsROrC.im (f a))) = fun x => f x

Next tactic:
ext1 x
theorem integral_coe_re_add_coe_im {f : α → 𝕜} (hf : Integrable f μ) :
    (∫ x, (IsROrC.re (f x) : 𝕜) ∂μ) + (∫ x, (IsROrC.im (f x) : 𝕜) ∂μ) * IsROrC.I = ∫ x, f x ∂μ := by
  rw [mul_comm, ← smul_eq_mul, ← integral_smul, ← integral_add]
  · congr
    ext1 x
    

Proof state:
case e_f.h
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : MeasurableSpace α
ι : Type u_5
inst✝⁴ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝³ : IsROrC 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
f : α → 𝕜
hf : Integrable f
x : α
⊢ ↑(IsROrC.re (f x)) + IsROrC.I • ↑(IsROrC.im (f x)) = f x

Next tactic:
rw [smul_eq_mul, mul_comm, IsROrC.re_add_im]
theorem integral_coe_re_add_coe_im {f : α → 𝕜} (hf : Integrable f μ) :
    (∫ x, (IsROrC.re (f x) : 𝕜) ∂μ) + (∫ x, (IsROrC.im (f x) : 𝕜) ∂μ) * IsROrC.I = ∫ x, f x ∂μ := by
  rw [mul_comm, ← smul_eq_mul, ← integral_smul, ← integral_add]
  · congr
    ext1 x
    rw [smul_eq_mul, mul_comm, IsROrC.re_add_im]
  · 

Proof state:
case hf
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : MeasurableSpace α
ι : Type u_5
inst✝⁴ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝³ : IsROrC 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
f : α → 𝕜
hf : Integrable f
⊢ Integrable fun x => ↑(IsROrC.re (f x))

Next tactic:
exact hf.re.ofReal
theorem integral_coe_re_add_coe_im {f : α → 𝕜} (hf : Integrable f μ) :
    (∫ x, (IsROrC.re (f x) : 𝕜) ∂μ) + (∫ x, (IsROrC.im (f x) : 𝕜) ∂μ) * IsROrC.I = ∫ x, f x ∂μ := by
  rw [mul_comm, ← smul_eq_mul, ← integral_smul, ← integral_add]
  · congr
    ext1 x
    rw [smul_eq_mul, mul_comm, IsROrC.re_add_im]
  · exact hf.re.ofReal
  · 

Proof state:
case hg
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : MeasurableSpace α
ι : Type u_5
inst✝⁴ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝³ : IsROrC 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
f : α → 𝕜
hf : Integrable f
⊢ Integrable fun a => IsROrC.I • ↑(IsROrC.im (f a))

Next tactic:
exact hf.im.ofReal.smul (𝕜 := 𝕜) (β := 𝕜) IsROrC.I
theorem integral_re_add_im {f : α → 𝕜} (hf : Integrable f μ) :
    ((∫ x, IsROrC.re (f x) ∂μ : ℝ) : 𝕜) + (∫ x, IsROrC.im (f x) ∂μ : ℝ) * IsROrC.I =
      ∫ x, f x ∂μ := by
  

Proof state:
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : MeasurableSpace α
ι : Type u_5
inst✝⁴ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝³ : IsROrC 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
f : α → 𝕜
hf : Integrable f
⊢ ↑(∫ (x : α), IsROrC.re (f x) ∂μ) + ↑(∫ (x : α), IsROrC.im (f x) ∂μ) * IsROrC.I = ∫ (x : α), f x ∂μ

Next tactic:
rw [← integral_ofReal, ← integral_ofReal, integral_coe_re_add_coe_im hf]
theorem fst_integral [CompleteSpace F] {f : α → E × F} (hf : Integrable f μ) :
    (∫ x, f x ∂μ).1 = ∫ x, (f x).1 ∂μ := by
  

Proof state:
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁸ : MeasurableSpace α
ι : Type u_5
inst✝⁷ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedSpace 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
f : α → E × F
hf : Integrable f
⊢ (∫ (x : α), f x ∂μ).1 = ∫ (x : α), (f x).1 ∂μ

Next tactic:
by_cases hE : CompleteSpace E
theorem fst_integral [CompleteSpace F] {f : α → E × F} (hf : Integrable f μ) :
    (∫ x, f x ∂μ).1 = ∫ x, (f x).1 ∂μ := by
  by_cases hE : CompleteSpace E
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁸ : MeasurableSpace α
ι : Type u_5
inst✝⁷ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedSpace 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
f : α → E × F
hf : Integrable f
hE : CompleteSpace E
⊢ (∫ (x : α), f x ∂μ).1 = ∫ (x : α), (f x).1 ∂μ

Next tactic:
exact ((ContinuousLinearMap.fst ℝ E F).integral_comp_comm hf).symm
theorem fst_integral [CompleteSpace F] {f : α → E × F} (hf : Integrable f μ) :
    (∫ x, f x ∂μ).1 = ∫ x, (f x).1 ∂μ := by
  by_cases hE : CompleteSpace E
  · exact ((ContinuousLinearMap.fst ℝ E F).integral_comp_comm hf).symm
  · 

Proof state:
case neg
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁸ : MeasurableSpace α
ι : Type u_5
inst✝⁷ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedSpace 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
f : α → E × F
hf : Integrable f
hE : ¬CompleteSpace E
⊢ (∫ (x : α), f x ∂μ).1 = ∫ (x : α), (f x).1 ∂μ

Next tactic:
have : ¬(CompleteSpace (E × F)) := fun h ↦ hE <| .fst_of_prod (β := F)
theorem fst_integral [CompleteSpace F] {f : α → E × F} (hf : Integrable f μ) :
    (∫ x, f x ∂μ).1 = ∫ x, (f x).1 ∂μ := by
  by_cases hE : CompleteSpace E
  · exact ((ContinuousLinearMap.fst ℝ E F).integral_comp_comm hf).symm
  · have : ¬(CompleteSpace (E × F)) := fun h ↦ hE <| .fst_of_prod (β := F)
    

Proof state:
case neg
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁸ : MeasurableSpace α
ι : Type u_5
inst✝⁷ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedSpace 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
f : α → E × F
hf : Integrable f
hE : ¬CompleteSpace E
this : ¬CompleteSpace (E × F)
⊢ (∫ (x : α), f x ∂μ).1 = ∫ (x : α), (f x).1 ∂μ

Next tactic:
simp [integral, *]
theorem snd_integral [CompleteSpace E] {f : α → E × F} (hf : Integrable f μ) :
    (∫ x, f x ∂μ).2 = ∫ x, (f x).2 ∂μ := by
  

Proof state:
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁸ : MeasurableSpace α
ι : Type u_5
inst✝⁷ : NormedAddCommGroup E
μ : Measure α
𝕜 : Type u_6
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedSpace 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace E
f : α → E × F
hf : Integrable f
⊢ (∫ (x : α), f x ∂μ).2 = ∫ (x : α), (f x).2 ∂μ

Next tactic:
rw [← Prod.fst_swap, swap_integral]