-- Mathlib/Analysis/Fourier/PoissonSummation.lean
theorem Real.tsum_eq_tsum_fourierIntegral {f : C(ℝ, ℂ)}
    (h_norm :
      ∀ K : Compacts ℝ, Summable fun n : ℤ => ‖(f.comp <| ContinuousMap.addRight n).restrict K‖)
    (h_sum : Summable fun n : ℤ => 𝓕 f n) (x : ℝ) :
    ∑' n : ℤ, f (x + n) = ∑' n : ℤ, 𝓕 f n * fourier n (x : UnitAddCircle)

Proof state:
f : C(ℝ, ℂ)
h_norm : ∀ (K : Compacts ℝ), Summable fun n => ‖ContinuousMap.restrict (↑K) (f.comp (ContinuousMap.addRight ↑n))‖
h_sum : Summable fun n => 𝓕 ⇑f ↑n
x : ℝ
⊢ ∑' (n : ℤ), f (x + ↑n) = ∑' (n : ℤ), 𝓕 ⇑f ↑n * (fourier n) ↑x

Tactic:
let F : C(UnitAddCircle, ℂ) :=
  ⟨(f.periodic_tsum_comp_add_zsmul 1).lift, continuous_coinduced_dom.mpr (map_continuous _)⟩

Result:
f : C(ℝ, ℂ)
h_norm : ∀ (K : Compacts ℝ), Summable fun n => ‖ContinuousMap.restrict (↑K) (f.comp (ContinuousMap.addRight ↑n))‖
h_sum : Summable fun n => 𝓕 ⇑f ↑n
x : ℝ
F : C(UnitAddCircle, ℂ) := { toFun := ⋯.lift, continuous_toFun := ⋯ }
⊢ ∑' (n : ℤ), f (x + ↑n) = ∑' (n : ℤ), 𝓕 ⇑f ↑n * (fourier n) ↑x

Proof state:
f : C(ℝ, ℂ)
h_norm : ∀ (K : Compacts ℝ), Summable fun n => ‖ContinuousMap.restrict (↑K) (f.comp (ContinuousMap.addRight ↑n))‖
h_sum : Summable fun n => 𝓕 ⇑f ↑n
x : ℝ
F : C(UnitAddCircle, ℂ) := { toFun := ⋯.lift, continuous_toFun := ⋯ }
⊢ Summable (fourierCoeff ⇑F)

Tactic:
convert h_sum

Result:
case h.e'_5.h
f : C(ℝ, ℂ)
h_norm : ∀ (K : Compacts ℝ), Summable fun n => ‖ContinuousMap.restrict (↑K) (f.comp (ContinuousMap.addRight ↑n))‖
h_sum : Summable fun n => 𝓕 ⇑f ↑n
x : ℝ
F : C(UnitAddCircle, ℂ) := { toFun := ⋯.lift, continuous_toFun := ⋯ }
x✝ : ℤ
⊢ fourierCoeff (⇑F) x✝ = 𝓕 ⇑f ↑x✝

Proof state:
f : C(ℝ, ℂ)
h_norm : ∀ (K : Compacts ℝ), Summable fun n => ‖ContinuousMap.restrict (↑K) (f.comp (ContinuousMap.addRight ↑n))‖
h_sum : Summable fun n => 𝓕 ⇑f ↑n
x : ℝ
F : C(UnitAddCircle, ℂ) := { toFun := ⋯.lift, continuous_toFun := ⋯ }
this : Summable (fourierCoeff ⇑F)
⊢ ∑' (n : ℤ), f (x + ↑n) = ∑' (n : ℤ), 𝓕 ⇑f ↑n * (fourier n) ↑x

Tactic:
convert (has_pointwise_sum_fourier_series_of_summable this x).tsum_eq.symm using 1

Result:
case h.e'_2
f : C(ℝ, ℂ)
h_norm : ∀ (K : Compacts ℝ), Summable fun n => ‖ContinuousMap.restrict (↑K) (f.comp (ContinuousMap.addRight ↑n))‖
h_sum : Summable fun n => 𝓕 ⇑f ↑n
x : ℝ
F : C(UnitAddCircle, ℂ) := { toFun := ⋯.lift, continuous_toFun := ⋯ }
this : Summable (fourierCoeff ⇑F)
⊢ ∑' (n : ℤ), f (x + ↑n) = F ↑x

case h.e'_3
f : C(ℝ, ℂ)
h_norm : ∀ (K : Compacts ℝ), Summable fun n => ‖ContinuousMap.restrict (↑K) (f.comp (ContinuousMap.addRight ↑n))‖
h_sum : Summable fun n => 𝓕 ⇑f ↑n
x : ℝ
F : C(UnitAddCircle, ℂ) := { toFun := ⋯.lift, continuous_toFun := ⋯ }
this : Summable (fourierCoeff ⇑F)
⊢ ∑' (n : ℤ), 𝓕 ⇑f ↑n * (fourier n) ↑x = ∑' (b : ℤ), fourierCoeff (⇑F) b • (fourier b) ↑x

Proof state:
f : C(ℝ, ℂ)
h_norm : ∀ (K : Compacts ℝ), Summable fun n => ‖ContinuousMap.restrict (↑K) (f.comp (ContinuousMap.addRight ↑n))‖
h_sum : Summable fun n => 𝓕 ⇑f ↑n
x : ℝ
F : C(UnitAddCircle, ℂ) := { toFun := ⋯.lift, continuous_toFun := ⋯ }
⊢ ∑' (n : ℤ), f (x + ↑n) = ∑' (n : ℤ), 𝓕 ⇑f ↑n * (fourier n) ↑x

Tactic:
have : Summable (fourierCoeff F) := by
  convert h_sum
  exact Real.fourierCoeff_tsum_comp_add h_norm _

Result:
f : C(ℝ, ℂ)
h_norm : ∀ (K : Compacts ℝ), Summable fun n => ‖ContinuousMap.restrict (↑K) (f.comp (ContinuousMap.addRight ↑n))‖
h_sum : Summable fun n => 𝓕 ⇑f ↑n
x : ℝ
F : C(UnitAddCircle, ℂ) := { toFun := ⋯.lift, continuous_toFun := ⋯ }
this : Summable (fourierCoeff ⇑F)
⊢ ∑' (n : ℤ), f (x + ↑n) = ∑' (n : ℤ), 𝓕 ⇑f ↑n * (fourier n) ↑x

Proof state:
case h.e'_5.h
f : C(ℝ, ℂ)
h_norm : ∀ (K : Compacts ℝ), Summable fun n => ‖ContinuousMap.restrict (↑K) (f.comp (ContinuousMap.addRight ↑n))‖
h_sum : Summable fun n => 𝓕 ⇑f ↑n
x : ℝ
F : C(UnitAddCircle, ℂ) := { toFun := ⋯.lift, continuous_toFun := ⋯ }
x✝ : ℤ
⊢ fourierCoeff (⇑F) x✝ = 𝓕 ⇑f ↑x✝

Tactic:
exact Real.fourierCoeff_tsum_comp_add h_norm _

Result:
no goals

Proof state:
case h.e'_3
f : C(ℝ, ℂ)
h_norm : ∀ (K : Compacts ℝ), Summable fun n => ‖ContinuousMap.restrict (↑K) (f.comp (ContinuousMap.addRight ↑n))‖
h_sum : Summable fun n => 𝓕 ⇑f ↑n
x : ℝ
F : C(UnitAddCircle, ℂ) := { toFun := ⋯.lift, continuous_toFun := ⋯ }
this : Summable (fourierCoeff ⇑F)
⊢ ∑' (n : ℤ), 𝓕 ⇑f ↑n * (fourier n) ↑x = ∑' (b : ℤ), fourierCoeff (⇑F) b • (fourier b) ↑x

Tactic:
simp_rw [← Real.fourierCoeff_tsum_comp_add h_norm, smul_eq_mul, F, coe_mk]

Result:
no goals

Proof state:
case h.e'_2
f : C(ℝ, ℂ)
h_norm : ∀ (K : Compacts ℝ), Summable fun n => ‖ContinuousMap.restrict (↑K) (f.comp (ContinuousMap.addRight ↑n))‖
h_sum : Summable fun n => 𝓕 ⇑f ↑n
x : ℝ
F : C(UnitAddCircle, ℂ) := { toFun := ⋯.lift, continuous_toFun := ⋯ }
this : Summable (fourierCoeff ⇑F)
⊢ ∑' (n : ℤ), f (x + ↑n) = F ↑x

Tactic:
simpa only [F, coe_mk, ← QuotientAddGroup.mk_zero, Periodic.lift_coe, zsmul_one, comp_apply,
  coe_addRight, zero_add]
   using (hasSum_apply (summable_of_locally_summable_norm h_norm).hasSum x).tsum_eq

Result:
no goals