l3lab/ntp-mathlib huggingface dataset:
theorem snorm_inner_lt_top (f g : α →₂[μ] E) : snorm (fun x : α => ⟪f x, g x⟫) 1 μ < ∞ := by
  have h : ∀ x, ‖⟪f x, g x⟫‖ ≤ ‖‖f x‖ ^ (2 : ℝ) + ‖g x‖ ^ (2 : ℝ)‖ := by
    intro x
    rw [← @Nat.cast_two ℝ, Real.rpow_nat_cast, Real.rpow_nat_cast]
    calc
      ‖⟪f x, g x⟫‖ ≤ ‖f x‖ * ‖g x‖ := norm_inner_le_norm _ _
      _ ≤ 2 * ‖f x‖ * ‖g x‖ :=
        (mul_le_mul_of_nonneg_right (le_mul_of_one_le_left (norm_nonneg _) one_le_two)
          (norm_nonneg _))
      -- TODO(kmill): the type ascription is getting around an elaboration error
      _ ≤ ‖(‖f x‖ ^ 2 + ‖g x‖ ^ 2 : ℝ)‖ := (two_mul_le_add_sq _ _).trans (le_abs_self _)

  refine' (snorm_mono_ae (ae_of_all _ h)).trans_lt ((snorm_add_le _ _ le_rfl).trans_lt _)
  · exact ((Lp.aestronglyMeasurable f).norm.aemeasurable.pow_const _).aestronglyMeasurable
  · 

Proof state:
case refine'_2
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f g : ↥(Lp E 2)
h : ∀ (x : α), ‖inner (↑↑f x) (↑↑g x)‖ ≤ ‖‖↑↑f x‖ ^ 2 + ‖↑↑g x‖ ^ 2‖
⊢ AEStronglyMeasurable (fun a => ‖↑↑g a‖ ^ 2) μ

Next tactic:
exact ((Lp.aestronglyMeasurable g).norm.aemeasurable.pow_const _).aestronglyMeasurable
theorem snorm_inner_lt_top (f g : α →₂[μ] E) : snorm (fun x : α => ⟪f x, g x⟫) 1 μ < ∞ := by
  have h : ∀ x, ‖⟪f x, g x⟫‖ ≤ ‖‖f x‖ ^ (2 : ℝ) + ‖g x‖ ^ (2 : ℝ)‖ := by
    intro x
    rw [← @Nat.cast_two ℝ, Real.rpow_nat_cast, Real.rpow_nat_cast]
    calc
      ‖⟪f x, g x⟫‖ ≤ ‖f x‖ * ‖g x‖ := norm_inner_le_norm _ _
      _ ≤ 2 * ‖f x‖ * ‖g x‖ :=
        (mul_le_mul_of_nonneg_right (le_mul_of_one_le_left (norm_nonneg _) one_le_two)
          (norm_nonneg _))
      -- TODO(kmill): the type ascription is getting around an elaboration error
      _ ≤ ‖(‖f x‖ ^ 2 + ‖g x‖ ^ 2 : ℝ)‖ := (two_mul_le_add_sq _ _).trans (le_abs_self _)

  refine' (snorm_mono_ae (ae_of_all _ h)).trans_lt ((snorm_add_le _ _ le_rfl).trans_lt _)
  · exact ((Lp.aestronglyMeasurable f).norm.aemeasurable.pow_const _).aestronglyMeasurable
  · exact ((Lp.aestronglyMeasurable g).norm.aemeasurable.pow_const _).aestronglyMeasurable
  

Proof state:
case refine'_3
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f g : ↥(Lp E 2)
h : ∀ (x : α), ‖inner (↑↑f x) (↑↑g x)‖ ≤ ‖‖↑↑f x‖ ^ 2 + ‖↑↑g x‖ ^ 2‖
⊢ snorm (fun a => ‖↑↑f a‖ ^ 2) 1 μ + snorm (fun a => ‖↑↑g a‖ ^ 2) 1 μ < ⊤

Next tactic:
rw [ENNReal.add_lt_top]
theorem snorm_inner_lt_top (f g : α →₂[μ] E) : snorm (fun x : α => ⟪f x, g x⟫) 1 μ < ∞ := by
  have h : ∀ x, ‖⟪f x, g x⟫‖ ≤ ‖‖f x‖ ^ (2 : ℝ) + ‖g x‖ ^ (2 : ℝ)‖ := by
    intro x
    rw [← @Nat.cast_two ℝ, Real.rpow_nat_cast, Real.rpow_nat_cast]
    calc
      ‖⟪f x, g x⟫‖ ≤ ‖f x‖ * ‖g x‖ := norm_inner_le_norm _ _
      _ ≤ 2 * ‖f x‖ * ‖g x‖ :=
        (mul_le_mul_of_nonneg_right (le_mul_of_one_le_left (norm_nonneg _) one_le_two)
          (norm_nonneg _))
      -- TODO(kmill): the type ascription is getting around an elaboration error
      _ ≤ ‖(‖f x‖ ^ 2 + ‖g x‖ ^ 2 : ℝ)‖ := (two_mul_le_add_sq _ _).trans (le_abs_self _)

  refine' (snorm_mono_ae (ae_of_all _ h)).trans_lt ((snorm_add_le _ _ le_rfl).trans_lt _)
  · exact ((Lp.aestronglyMeasurable f).norm.aemeasurable.pow_const _).aestronglyMeasurable
  · exact ((Lp.aestronglyMeasurable g).norm.aemeasurable.pow_const _).aestronglyMeasurable
  rw [ENNReal.add_lt_top]
  

Proof state:
case refine'_3
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f g : ↥(Lp E 2)
h : ∀ (x : α), ‖inner (↑↑f x) (↑↑g x)‖ ≤ ‖‖↑↑f x‖ ^ 2 + ‖↑↑g x‖ ^ 2‖
⊢ snorm (fun a => ‖↑↑f a‖ ^ 2) 1 μ < ⊤ ∧ snorm (fun a => ‖↑↑g a‖ ^ 2) 1 μ < ⊤

Next tactic:
exact ⟨snorm_rpow_two_norm_lt_top f, snorm_rpow_two_norm_lt_top g⟩
theorem integral_inner_eq_sq_snorm (f : α →₂[μ] E) :
    ∫ a, ⟪f a, f a⟫ ∂μ = ENNReal.toReal (∫⁻ a, (‖f a‖₊ : ℝ≥0∞) ^ (2 : ℝ) ∂μ) := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
⊢ ∫ (a : α), inner (↑↑f a) (↑↑f a) ∂μ = ↑(ENNReal.toReal (∫⁻ (a : α), ↑‖↑↑f a‖₊ ^ 2 ∂μ))

Next tactic:
simp_rw [inner_self_eq_norm_sq_to_K]
theorem integral_inner_eq_sq_snorm (f : α →₂[μ] E) :
    ∫ a, ⟪f a, f a⟫ ∂μ = ENNReal.toReal (∫⁻ a, (‖f a‖₊ : ℝ≥0∞) ^ (2 : ℝ) ∂μ) := by
  simp_rw [inner_self_eq_norm_sq_to_K]
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
⊢ ∫ (a : α), ↑‖↑↑f a‖ ^ 2 ∂μ = ↑(ENNReal.toReal (∫⁻ (a : α), ↑‖↑↑f a‖₊ ^ 2 ∂μ))

Next tactic:
norm_cast
theorem integral_inner_eq_sq_snorm (f : α →₂[μ] E) :
    ∫ a, ⟪f a, f a⟫ ∂μ = ENNReal.toReal (∫⁻ a, (‖f a‖₊ : ℝ≥0∞) ^ (2 : ℝ) ∂μ) := by
  simp_rw [inner_self_eq_norm_sq_to_K]
  norm_cast
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
⊢ ∫ (a : α), ‖↑↑f a‖ ^ 2 ∂μ = ENNReal.toReal (∫⁻ (a : α), ↑(‖↑↑f a‖₊ ^ 2) ∂μ)

Next tactic:
rw [integral_eq_lintegral_of_nonneg_ae]
theorem integral_inner_eq_sq_snorm (f : α →₂[μ] E) :
    ∫ a, ⟪f a, f a⟫ ∂μ = ENNReal.toReal (∫⁻ a, (‖f a‖₊ : ℝ≥0∞) ^ (2 : ℝ) ∂μ) := by
  simp_rw [inner_self_eq_norm_sq_to_K]
  norm_cast
  rw [integral_eq_lintegral_of_nonneg_ae]
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
⊢ ENNReal.toReal (∫⁻ (a : α), ENNReal.ofReal (‖↑↑f a‖ ^ 2) ∂μ) = ENNReal.toReal (∫⁻ (a : α), ↑(‖↑↑f a‖₊ ^ 2) ∂μ)
case hf
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
⊢ 0 ≤ᵐ[μ] fun a => ‖↑↑f a‖ ^ 2
case hfm
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
⊢ AEStronglyMeasurable (fun a => ‖↑↑f a‖ ^ 2) μ

Next tactic:
rotate_left
theorem integral_inner_eq_sq_snorm (f : α →₂[μ] E) :
    ∫ a, ⟪f a, f a⟫ ∂μ = ENNReal.toReal (∫⁻ a, (‖f a‖₊ : ℝ≥0∞) ^ (2 : ℝ) ∂μ) := by
  simp_rw [inner_self_eq_norm_sq_to_K]
  norm_cast
  rw [integral_eq_lintegral_of_nonneg_ae]
  rotate_left
  · 

Proof state:
case hf
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
⊢ 0 ≤ᵐ[μ] fun a => ‖↑↑f a‖ ^ 2

Next tactic:
exact Filter.eventually_of_forall fun x => sq_nonneg _
theorem integral_inner_eq_sq_snorm (f : α →₂[μ] E) :
    ∫ a, ⟪f a, f a⟫ ∂μ = ENNReal.toReal (∫⁻ a, (‖f a‖₊ : ℝ≥0∞) ^ (2 : ℝ) ∂μ) := by
  simp_rw [inner_self_eq_norm_sq_to_K]
  norm_cast
  rw [integral_eq_lintegral_of_nonneg_ae]
  rotate_left
  · exact Filter.eventually_of_forall fun x => sq_nonneg _
  · 

Proof state:
case hfm
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
⊢ AEStronglyMeasurable (fun a => ‖↑↑f a‖ ^ 2) μ

Next tactic:
exact ((Lp.aestronglyMeasurable f).norm.aemeasurable.pow_const _).aestronglyMeasurable
theorem integral_inner_eq_sq_snorm (f : α →₂[μ] E) :
    ∫ a, ⟪f a, f a⟫ ∂μ = ENNReal.toReal (∫⁻ a, (‖f a‖₊ : ℝ≥0∞) ^ (2 : ℝ) ∂μ) := by
  simp_rw [inner_self_eq_norm_sq_to_K]
  norm_cast
  rw [integral_eq_lintegral_of_nonneg_ae]
  rotate_left
  · exact Filter.eventually_of_forall fun x => sq_nonneg _
  · exact ((Lp.aestronglyMeasurable f).norm.aemeasurable.pow_const _).aestronglyMeasurable
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
⊢ ENNReal.toReal (∫⁻ (a : α), ENNReal.ofReal (‖↑↑f a‖ ^ 2) ∂μ) = ENNReal.toReal (∫⁻ (a : α), ↑(‖↑↑f a‖₊ ^ 2) ∂μ)

Next tactic:
congr
theorem integral_inner_eq_sq_snorm (f : α →₂[μ] E) :
    ∫ a, ⟪f a, f a⟫ ∂μ = ENNReal.toReal (∫⁻ a, (‖f a‖₊ : ℝ≥0∞) ^ (2 : ℝ) ∂μ) := by
  simp_rw [inner_self_eq_norm_sq_to_K]
  norm_cast
  rw [integral_eq_lintegral_of_nonneg_ae]
  rotate_left
  · exact Filter.eventually_of_forall fun x => sq_nonneg _
  · exact ((Lp.aestronglyMeasurable f).norm.aemeasurable.pow_const _).aestronglyMeasurable
  congr
  

Proof state:
case e_a.e_f
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
⊢ (fun a => ENNReal.ofReal (‖↑↑f a‖ ^ 2)) = fun a => ↑(‖↑↑f a‖₊ ^ 2)

Next tactic:
ext1 x
theorem integral_inner_eq_sq_snorm (f : α →₂[μ] E) :
    ∫ a, ⟪f a, f a⟫ ∂μ = ENNReal.toReal (∫⁻ a, (‖f a‖₊ : ℝ≥0∞) ^ (2 : ℝ) ∂μ) := by
  simp_rw [inner_self_eq_norm_sq_to_K]
  norm_cast
  rw [integral_eq_lintegral_of_nonneg_ae]
  rotate_left
  · exact Filter.eventually_of_forall fun x => sq_nonneg _
  · exact ((Lp.aestronglyMeasurable f).norm.aemeasurable.pow_const _).aestronglyMeasurable
  congr
  ext1 x
  

Proof state:
case e_a.e_f.h
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
x : α
⊢ ENNReal.ofReal (‖↑↑f x‖ ^ 2) = ↑(‖↑↑f x‖₊ ^ 2)

Next tactic:
have h_two : (2 : ℝ) = ((2 : ℕ) : ℝ) := by simp
theorem integral_inner_eq_sq_snorm (f : α →₂[μ] E) :
    ∫ a, ⟪f a, f a⟫ ∂μ = ENNReal.toReal (∫⁻ a, (‖f a‖₊ : ℝ≥0∞) ^ (2 : ℝ) ∂μ) := by
  simp_rw [inner_self_eq_norm_sq_to_K]
  norm_cast
  rw [integral_eq_lintegral_of_nonneg_ae]
  rotate_left
  · exact Filter.eventually_of_forall fun x => sq_nonneg _
  · exact ((Lp.aestronglyMeasurable f).norm.aemeasurable.pow_const _).aestronglyMeasurable
  congr
  ext1 x
  have h_two : (2 : ℝ) = ((2 : ℕ) : ℝ) := by 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
x : α
⊢ 2 = ↑2

Next tactic:
simp
theorem integral_inner_eq_sq_snorm (f : α →₂[μ] E) :
    ∫ a, ⟪f a, f a⟫ ∂μ = ENNReal.toReal (∫⁻ a, (‖f a‖₊ : ℝ≥0∞) ^ (2 : ℝ) ∂μ) := by
  simp_rw [inner_self_eq_norm_sq_to_K]
  norm_cast
  rw [integral_eq_lintegral_of_nonneg_ae]
  rotate_left
  · exact Filter.eventually_of_forall fun x => sq_nonneg _
  · exact ((Lp.aestronglyMeasurable f).norm.aemeasurable.pow_const _).aestronglyMeasurable
  congr
  ext1 x
  have h_two : (2 : ℝ) = ((2 : ℕ) : ℝ) := by simp
  

Proof state:
case e_a.e_f.h
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
x : α
h_two : 2 = ↑2
⊢ ENNReal.ofReal (‖↑↑f x‖ ^ 2) = ↑(‖↑↑f x‖₊ ^ 2)

Next tactic:
rw [← Real.rpow_nat_cast _ 2, ← h_two, ←
    ENNReal.ofReal_rpow_of_nonneg (norm_nonneg _) zero_le_two, ofReal_norm_eq_coe_nnnorm]
theorem integral_inner_eq_sq_snorm (f : α →₂[μ] E) :
    ∫ a, ⟪f a, f a⟫ ∂μ = ENNReal.toReal (∫⁻ a, (‖f a‖₊ : ℝ≥0∞) ^ (2 : ℝ) ∂μ) := by
  simp_rw [inner_self_eq_norm_sq_to_K]
  norm_cast
  rw [integral_eq_lintegral_of_nonneg_ae]
  rotate_left
  · exact Filter.eventually_of_forall fun x => sq_nonneg _
  · exact ((Lp.aestronglyMeasurable f).norm.aemeasurable.pow_const _).aestronglyMeasurable
  congr
  ext1 x
  have h_two : (2 : ℝ) = ((2 : ℕ) : ℝ) := by simp
  rw [← Real.rpow_nat_cast _ 2, ← h_two, ←
    ENNReal.ofReal_rpow_of_nonneg (norm_nonneg _) zero_le_two, ofReal_norm_eq_coe_nnnorm]
  

Proof state:
case e_a.e_f.h
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
x : α
h_two : 2 = ↑2
⊢ ↑‖↑↑f x‖₊ ^ 2 = ↑(‖↑↑f x‖₊ ^ 2)

Next tactic:
norm_cast
private theorem norm_sq_eq_inner' (f : α →₂[μ] E) : ‖f‖ ^ 2 = IsROrC.re ⟪f, f⟫ := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
⊢ ‖f‖ ^ 2 = IsROrC.re (inner f f)

Next tactic:
have h_two : (2 : ℝ≥0∞).toReal = 2 := by simp
private theorem norm_sq_eq_inner' (f : α →₂[μ] E) : ‖f‖ ^ 2 = IsROrC.re ⟪f, f⟫ := by
  have h_two : (2 : ℝ≥0∞).toReal = 2 := by 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
⊢ ENNReal.toReal 2 = 2

Next tactic:
simp
private theorem norm_sq_eq_inner' (f : α →₂[μ] E) : ‖f‖ ^ 2 = IsROrC.re ⟪f, f⟫ := by
  have h_two : (2 : ℝ≥0∞).toReal = 2 := by simp
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
h_two : ENNReal.toReal 2 = 2
⊢ ‖f‖ ^ 2 = IsROrC.re (inner f f)

Next tactic:
rw [inner_def, integral_inner_eq_sq_snorm, norm_def, ← ENNReal.toReal_pow, IsROrC.ofReal_re,
    ENNReal.toReal_eq_toReal (ENNReal.pow_ne_top (Lp.snorm_ne_top f)) _]
private theorem norm_sq_eq_inner' (f : α →₂[μ] E) : ‖f‖ ^ 2 = IsROrC.re ⟪f, f⟫ := by
  have h_two : (2 : ℝ≥0∞).toReal = 2 := by simp
  rw [inner_def, integral_inner_eq_sq_snorm, norm_def, ← ENNReal.toReal_pow, IsROrC.ofReal_re,
    ENNReal.toReal_eq_toReal (ENNReal.pow_ne_top (Lp.snorm_ne_top f)) _]
  · 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
h_two : ENNReal.toReal 2 = 2
⊢ snorm (↑↑f) 2 μ ^ 2 = ∫⁻ (a : α), ↑‖↑↑f a‖₊ ^ 2 ∂μ

Next tactic:
rw [← ENNReal.rpow_nat_cast, snorm_eq_snorm' two_ne_zero ENNReal.two_ne_top, snorm', ←
      ENNReal.rpow_mul, one_div, h_two]
private theorem norm_sq_eq_inner' (f : α →₂[μ] E) : ‖f‖ ^ 2 = IsROrC.re ⟪f, f⟫ := by
  have h_two : (2 : ℝ≥0∞).toReal = 2 := by simp
  rw [inner_def, integral_inner_eq_sq_snorm, norm_def, ← ENNReal.toReal_pow, IsROrC.ofReal_re,
    ENNReal.toReal_eq_toReal (ENNReal.pow_ne_top (Lp.snorm_ne_top f)) _]
  · rw [← ENNReal.rpow_nat_cast, snorm_eq_snorm' two_ne_zero ENNReal.two_ne_top, snorm', ←
      ENNReal.rpow_mul, one_div, h_two]
    

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
h_two : ENNReal.toReal 2 = 2
⊢ (∫⁻ (a : α), ↑‖↑↑f a‖₊ ^ 2 ∂μ) ^ (2⁻¹ * ↑2) = ∫⁻ (a : α), ↑‖↑↑f a‖₊ ^ 2 ∂μ

Next tactic:
simp
private theorem norm_sq_eq_inner' (f : α →₂[μ] E) : ‖f‖ ^ 2 = IsROrC.re ⟪f, f⟫ := by
  have h_two : (2 : ℝ≥0∞).toReal = 2 := by simp
  rw [inner_def, integral_inner_eq_sq_snorm, norm_def, ← ENNReal.toReal_pow, IsROrC.ofReal_re,
    ENNReal.toReal_eq_toReal (ENNReal.pow_ne_top (Lp.snorm_ne_top f)) _]
  · rw [← ENNReal.rpow_nat_cast, snorm_eq_snorm' two_ne_zero ENNReal.two_ne_top, snorm', ←
      ENNReal.rpow_mul, one_div, h_two]
    simp
  · 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
h_two : ENNReal.toReal 2 = 2
⊢ ∫⁻ (a : α), ↑‖↑↑f a‖₊ ^ 2 ∂μ ≠ ⊤

Next tactic:
refine' (lintegral_rpow_nnnorm_lt_top_of_snorm'_lt_top zero_lt_two _).ne
private theorem norm_sq_eq_inner' (f : α →₂[μ] E) : ‖f‖ ^ 2 = IsROrC.re ⟪f, f⟫ := by
  have h_two : (2 : ℝ≥0∞).toReal = 2 := by simp
  rw [inner_def, integral_inner_eq_sq_snorm, norm_def, ← ENNReal.toReal_pow, IsROrC.ofReal_re,
    ENNReal.toReal_eq_toReal (ENNReal.pow_ne_top (Lp.snorm_ne_top f)) _]
  · rw [← ENNReal.rpow_nat_cast, snorm_eq_snorm' two_ne_zero ENNReal.two_ne_top, snorm', ←
      ENNReal.rpow_mul, one_div, h_two]
    simp
  · refine' (lintegral_rpow_nnnorm_lt_top_of_snorm'_lt_top zero_lt_two _).ne
    

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
h_two : ENNReal.toReal 2 = 2
⊢ snorm' (fun a => ↑↑f a) 2 μ < ⊤

Next tactic:
rw [← h_two, ← snorm_eq_snorm' two_ne_zero ENNReal.two_ne_top]
private theorem norm_sq_eq_inner' (f : α →₂[μ] E) : ‖f‖ ^ 2 = IsROrC.re ⟪f, f⟫ := by
  have h_two : (2 : ℝ≥0∞).toReal = 2 := by simp
  rw [inner_def, integral_inner_eq_sq_snorm, norm_def, ← ENNReal.toReal_pow, IsROrC.ofReal_re,
    ENNReal.toReal_eq_toReal (ENNReal.pow_ne_top (Lp.snorm_ne_top f)) _]
  · rw [← ENNReal.rpow_nat_cast, snorm_eq_snorm' two_ne_zero ENNReal.two_ne_top, snorm', ←
      ENNReal.rpow_mul, one_div, h_two]
    simp
  · refine' (lintegral_rpow_nnnorm_lt_top_of_snorm'_lt_top zero_lt_two _).ne
    rw [← h_two, ← snorm_eq_snorm' two_ne_zero ENNReal.two_ne_top]
    

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f : ↥(Lp E 2)
h_two : ENNReal.toReal 2 = 2
⊢ snorm (fun a => ↑↑f a) 2 μ < ⊤

Next tactic:
exact Lp.snorm_lt_top f
theorem mem_L1_inner (f g : α →₂[μ] E) :
    AEEqFun.mk (fun x => ⟪f x, g x⟫)
        ((Lp.aestronglyMeasurable f).inner (Lp.aestronglyMeasurable g)) ∈
      Lp 𝕜 1 μ :=
  by 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f g : ↥(Lp E 2)
⊢ AEEqFun.mk (fun x => inner (↑↑f x) (↑↑g x)) (_ : AEStronglyMeasurable (fun x => inner (↑↑f x) (↑↑g x)) μ) ∈ Lp 𝕜 1

Next tactic:
simp_rw [mem_Lp_iff_snorm_lt_top, snorm_aeeqFun]
theorem mem_L1_inner (f g : α →₂[μ] E) :
    AEEqFun.mk (fun x => ⟪f x, g x⟫)
        ((Lp.aestronglyMeasurable f).inner (Lp.aestronglyMeasurable g)) ∈
      Lp 𝕜 1 μ :=
  by simp_rw [mem_Lp_iff_snorm_lt_top, snorm_aeeqFun]; 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f g : ↥(Lp E 2)
⊢ snorm (fun x => inner (↑↑f x) (↑↑g x)) 1 μ < ⊤

Next tactic:
exact snorm_inner_lt_top f g
private theorem add_left' (f f' g : α →₂[μ] E) : ⟪f + f', g⟫ = inner f g + inner f' g := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f f' g : ↥(Lp E 2)
⊢ inner (f + f') g = inner f g + inner f' g

Next tactic:
simp_rw [inner_def, ← integral_add (integrable_inner f g) (integrable_inner f' g), ←
    inner_add_left]
private theorem add_left' (f f' g : α →₂[μ] E) : ⟪f + f', g⟫ = inner f g + inner f' g := by
  simp_rw [inner_def, ← integral_add (integrable_inner f g) (integrable_inner f' g), ←
    inner_add_left]
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f f' g : ↥(Lp E 2)
⊢ ∫ (a : α), inner (↑↑(f + f') a) (↑↑g a) ∂μ = ∫ (a : α), inner (↑↑f a + ↑↑f' a) (↑↑g a) ∂μ

Next tactic:
refine' integral_congr_ae ((coeFn_add f f').mono fun x hx => _)
private theorem add_left' (f f' g : α →₂[μ] E) : ⟪f + f', g⟫ = inner f g + inner f' g := by
  simp_rw [inner_def, ← integral_add (integrable_inner f g) (integrable_inner f' g), ←
    inner_add_left]
  refine' integral_congr_ae ((coeFn_add f f').mono fun x hx => _)
  -- Porting note: was
  -- congr
  -- rwa [Pi.add_apply] at hx
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f f' g : ↥(Lp E 2)
x : α
hx : ↑↑(f + f') x = (↑↑f + ↑↑f') x
⊢ (fun a => inner (↑↑(f + f') a) (↑↑g a)) x = (fun a => inner (↑↑f a + ↑↑f' a) (↑↑g a)) x

Next tactic:
simp only
private theorem add_left' (f f' g : α →₂[μ] E) : ⟪f + f', g⟫ = inner f g + inner f' g := by
  simp_rw [inner_def, ← integral_add (integrable_inner f g) (integrable_inner f' g), ←
    inner_add_left]
  refine' integral_congr_ae ((coeFn_add f f').mono fun x hx => _)
  -- Porting note: was
  -- congr
  -- rwa [Pi.add_apply] at hx
  simp only
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f f' g : ↥(Lp E 2)
x : α
hx : ↑↑(f + f') x = (↑↑f + ↑↑f') x
⊢ inner (↑↑(f + f') x) (↑↑g x) = inner (↑↑f x + ↑↑f' x) (↑↑g x)

Next tactic:
rw [hx, Pi.add_apply]
private theorem smul_left' (f g : α →₂[μ] E) (r : 𝕜) : ⟪r • f, g⟫ = conj r * inner f g := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f g : ↥(Lp E 2)
r : 𝕜
⊢ inner (r • f) g = (starRingEnd 𝕜) r * inner f g

Next tactic:
rw [inner_def, inner_def, ← smul_eq_mul, ← integral_smul]
private theorem smul_left' (f g : α →₂[μ] E) (r : 𝕜) : ⟪r • f, g⟫ = conj r * inner f g := by
  rw [inner_def, inner_def, ← smul_eq_mul, ← integral_smul]
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f g : ↥(Lp E 2)
r : 𝕜
⊢ ∫ (a : α), inner (↑↑(r • f) a) (↑↑g a) ∂μ = ∫ (a : α), (starRingEnd 𝕜) r • inner (↑↑f a) (↑↑g a) ∂μ

Next tactic:
refine' integral_congr_ae ((coeFn_smul r f).mono fun x hx => _)
private theorem smul_left' (f g : α →₂[μ] E) (r : 𝕜) : ⟪r • f, g⟫ = conj r * inner f g := by
  rw [inner_def, inner_def, ← smul_eq_mul, ← integral_smul]
  refine' integral_congr_ae ((coeFn_smul r f).mono fun x hx => _)
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f g : ↥(Lp E 2)
r : 𝕜
x : α
hx : ↑↑(r • f) x = (r • ↑↑f) x
⊢ (fun a => inner (↑↑(r • f) a) (↑↑g a)) x = (fun a => (starRingEnd 𝕜) r • inner (↑↑f a) (↑↑g a)) x

Next tactic:
simp only
private theorem smul_left' (f g : α →₂[μ] E) (r : 𝕜) : ⟪r • f, g⟫ = conj r * inner f g := by
  rw [inner_def, inner_def, ← smul_eq_mul, ← integral_smul]
  refine' integral_congr_ae ((coeFn_smul r f).mono fun x hx => _)
  simp only
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : NormedAddCommGroup F
f g : ↥(Lp E 2)
r : 𝕜
x : α
hx : ↑↑(r • f) x = (r • ↑↑f) x
⊢ inner (↑↑(r • f) x) (↑↑g x) = (starRingEnd 𝕜) r • inner (↑↑f x) (↑↑g x)

Next tactic:
rw [smul_eq_mul, ← inner_smul_left, hx, Pi.smul_apply]