Theorem: tsum_sq_fourierCoeff
File: Mathlib/Analysis/Fourier/AddCircle.lean

Proof steps:
state_before: T : ℝ
hT : Fact (0 < T)
f : ↥(Lp ℂ 2 haarAddCircle)
⊢ ∑' (i : ℤ), ‖fourierCoeff (↑↑f) i‖ ^ 2 = ∫ (t : AddCircle T), ‖↑↑f t‖ ^ 2 ∂haarAddCircle
state_after: T : ℝ
hT : Fact (0 < T)
f : ↥(Lp ℂ 2 haarAddCircle)
⊢ ∑' (i : ℤ), ‖↑(fourierBasis.repr f) i‖ ^ 2 = ∫ (t : AddCircle T), ‖↑↑f t‖ ^ 2 ∂haarAddCircle
tactic: simp_rw [← fourierBasis_repr]
state_before: T : ℝ
hT : Fact (0 < T)
f : ↥(Lp ℂ 2 haarAddCircle)
⊢ ∑' (i : ℤ), ‖↑(fourierBasis.repr f) i‖ ^ 2 = ∫ (t : AddCircle T), ‖↑↑f t‖ ^ 2 ∂haarAddCircle
state_after: T : ℝ
hT : Fact (0 < T)
f : ↥(Lp ℂ 2 haarAddCircle)
H₁ : ‖fourierBasis.repr f‖ ^ 2 = ∑' (i : ℤ), ‖↑(fourierBasis.repr f) i‖ ^ 2
⊢ ∑' (i : ℤ), ‖↑(fourierBasis.repr f) i‖ ^ 2 = ∫ (t : AddCircle T), ‖↑↑f t‖ ^ 2 ∂haarAddCircle
tactic: have H₁ : ‖fourierBasis.repr f‖ ^ 2 = ∑' i, ‖fourierBasis.repr f i‖ ^ 2 := by
    apply_mod_cast lp.norm_rpow_eq_tsum ?_ (fourierBasis.repr f)
    norm_num
state_before: T : ℝ
hT : Fact (0 < T)
f : ↥(Lp ℂ 2 haarAddCircle)
H₁ : ‖fourierBasis.repr f‖ ^ 2 = ∑' (i : ℤ), ‖↑(fourierBasis.repr f) i‖ ^ 2
⊢ ∑' (i : ℤ), ‖↑(fourierBasis.repr f) i‖ ^ 2 = ∫ (t : AddCircle T), ‖↑↑f t‖ ^ 2 ∂haarAddCircle
state_after: T : ℝ
hT : Fact (0 < T)
f : ↥(Lp ℂ 2 haarAddCircle)
H₁ : ‖fourierBasis.repr f‖ ^ 2 = ∑' (i : ℤ), ‖↑(fourierBasis.repr f) i‖ ^ 2
H₂ : ‖fourierBasis.repr f‖ ^ 2 = ‖f‖ ^ 2
⊢ ∑' (i : ℤ), ‖↑(fourierBasis.repr f) i‖ ^ 2 = ∫ (t : AddCircle T), ‖↑↑f t‖ ^ 2 ∂haarAddCircle
tactic: have H₂ : ‖fourierBasis.repr f‖ ^ 2 = ‖f‖ ^ 2 := by simp
state_before: T : ℝ
hT : Fact (0 < T)
f : ↥(Lp ℂ 2 haarAddCircle)
H₁ : ‖fourierBasis.repr f‖ ^ 2 = ∑' (i : ℤ), ‖↑(fourierBasis.repr f) i‖ ^ 2
H₂ : ‖fourierBasis.repr f‖ ^ 2 = ‖f‖ ^ 2
⊢ ∑' (i : ℤ), ‖↑(fourierBasis.repr f) i‖ ^ 2 = ∫ (t : AddCircle T), ‖↑↑f t‖ ^ 2 ∂haarAddCircle
state_after: T : ℝ
hT : Fact (0 < T)
f : ↥(Lp ℂ 2 haarAddCircle)
H₁ : ‖fourierBasis.repr f‖ ^ 2 = ∑' (i : ℤ), ‖↑(fourierBasis.repr f) i‖ ^ 2
H₂ : ‖fourierBasis.repr f‖ ^ 2 = ‖f‖ ^ 2
H₃ : RCLike.re ⟪f, f⟫_ℂ = RCLike.re (∫ (a : AddCircle T), ⟪↑↑f a, ↑↑f a⟫_ℂ ∂haarAddCircle)
⊢ ∑' (i : ℤ), ‖↑(fourierBasis.repr f) i‖ ^ 2 = ∫ (t : AddCircle T), ‖↑↑f t‖ ^ 2 ∂haarAddCircle
tactic: have H₃ := congr_arg RCLike.re (@L2.inner_def (AddCircle T) ℂ ℂ _ _ _ _ _ f f)
state_before: T : ℝ
hT : Fact (0 < T)
f : ↥(Lp ℂ 2 haarAddCircle)
H₁ : ‖fourierBasis.repr f‖ ^ 2 = ∑' (i : ℤ), ‖↑(fourierBasis.repr f) i‖ ^ 2
H₂ : ‖fourierBasis.repr f‖ ^ 2 = ‖f‖ ^ 2
H₃ : RCLike.re ⟪f, f⟫_ℂ = RCLike.re (∫ (a : AddCircle T), ⟪↑↑f a, ↑↑f a⟫_ℂ ∂haarAddCircle)
⊢ ∑' (i : ℤ), ‖↑(fourierBasis.repr f) i‖ ^ 2 = ∫ (t : AddCircle T), ‖↑↑f t‖ ^ 2 ∂haarAddCircle
state_after: T : ℝ
hT : Fact (0 < T)
f : ↥(Lp ℂ 2 haarAddCircle)
H₁ : ‖fourierBasis.repr f‖ ^ 2 = ∑' (i : ℤ), ‖↑(fourierBasis.repr f) i‖ ^ 2
H₂ : ‖fourierBasis.repr f‖ ^ 2 = ‖f‖ ^ 2
H₃ : RCLike.re ⟪f, f⟫_ℂ = ∫ (x : AddCircle T), RCLike.re ⟪↑↑f x, ↑↑f x⟫_ℂ ∂haarAddCircle
⊢ ∑' (i : ℤ), ‖↑(fourierBasis.repr f) i‖ ^ 2 = ∫ (t : AddCircle T), ‖↑↑f t‖ ^ 2 ∂haarAddCircle

T : ℝ
hT : Fact (0 < T)
f : ↥(Lp ℂ 2 haarAddCircle)
H₁ : ‖fourierBasis.repr f‖ ^ 2 = ∑' (i : ℤ), ‖↑(fourierBasis.repr f) i‖ ^ 2
H₂ : ‖fourierBasis.repr f‖ ^ 2 = ‖f‖ ^ 2
H₃ : RCLike.re ⟪f, f⟫_ℂ = RCLike.re (∫ (a : AddCircle T), ⟪↑↑f a, ↑↑f a⟫_ℂ ∂haarAddCircle)
⊢ Integrable (fun a => ⟪↑↑f a, ↑↑f a⟫_ℂ) haarAddCircle
tactic: rw [← integral_re] at H₃