l3lab/ntp-mathlib huggingface dataset:
/-- Riemann-Lebesgue lemma for functions on a real inner-product space: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 as `w → ∞`. -/
theorem tendsto_integral_exp_inner_smul_cocompact :
    Tendsto (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
  

Proof state:
E : Type u_1
V : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℂ E
f : V → E
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : MeasurableSpace V
inst✝³ : BorelSpace V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : FiniteDimensional ℝ V
inst✝ : CompleteSpace E
⊢ Tendsto (fun w => ∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • f v) (cocompact V) (𝓝 0)

Next tactic:
by_cases hfi : Integrable f
/-- Riemann-Lebesgue lemma for functions on a real inner-product space: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 as `w → ∞`. -/
theorem tendsto_integral_exp_inner_smul_cocompact :
    Tendsto (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
  by_cases hfi : Integrable f; 

Proof state:
case pos
E : Type u_1
V : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℂ E
f : V → E
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : MeasurableSpace V
inst✝³ : BorelSpace V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : FiniteDimensional ℝ V
inst✝ : CompleteSpace E
hfi : Integrable f
⊢ Tendsto (fun w => ∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • f v) (cocompact V) (𝓝 0)
case neg
E : Type u_1
V : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℂ E
f : V → E
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : MeasurableSpace V
inst✝³ : BorelSpace V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : FiniteDimensional ℝ V
inst✝ : CompleteSpace E
hfi : ¬Integrable f
⊢ Tendsto (fun w => ∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • f v) (cocompact V) (𝓝 0)

Next tactic:
swap
/-- Riemann-Lebesgue lemma for functions on a real inner-product space: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 as `w → ∞`. -/
theorem tendsto_integral_exp_inner_smul_cocompact :
    Tendsto (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
  by_cases hfi : Integrable f; swap
  · 

Proof state:
case neg
E : Type u_1
V : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℂ E
f : V → E
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : MeasurableSpace V
inst✝³ : BorelSpace V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : FiniteDimensional ℝ V
inst✝ : CompleteSpace E
hfi : ¬Integrable f
⊢ Tendsto (fun w => ∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • f v) (cocompact V) (𝓝 0)

Next tactic:
convert tendsto_const_nhds (a := (0 : E)) with w
/-- Riemann-Lebesgue lemma for functions on a real inner-product space: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 as `w → ∞`. -/
theorem tendsto_integral_exp_inner_smul_cocompact :
    Tendsto (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
  by_cases hfi : Integrable f; swap
  · convert tendsto_const_nhds (a := (0 : E)) with w
    

Proof state:
case h.e.h.e'_3.h
E : Type u_1
V : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℂ E
f : V → E
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : MeasurableSpace V
inst✝³ : BorelSpace V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : FiniteDimensional ℝ V
inst✝ : CompleteSpace E
hfi : ¬Integrable f
w : V
⊢ ∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • f v = 0

Next tactic:
apply integral_undef
/-- Riemann-Lebesgue lemma for functions on a real inner-product space: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 as `w → ∞`. -/
theorem tendsto_integral_exp_inner_smul_cocompact :
    Tendsto (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
  by_cases hfi : Integrable f; swap
  · convert tendsto_const_nhds (a := (0 : E)) with w
    apply integral_undef
    

Proof state:
case h.e.h.e'_3.h.h
E : Type u_1
V : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℂ E
f : V → E
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : MeasurableSpace V
inst✝³ : BorelSpace V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : FiniteDimensional ℝ V
inst✝ : CompleteSpace E
hfi : ¬Integrable f
w : V
⊢ ¬Integrable fun a => ↑(e (Multiplicative.ofAdd (-inner a w))) • f a

Next tactic:
rwa [← fourier_integrand_integrable w]
/-- Riemann-Lebesgue lemma for functions on a real inner-product space: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 as `w → ∞`. -/
theorem tendsto_integral_exp_inner_smul_cocompact :
    Tendsto (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
  by_cases hfi : Integrable f; swap
  · convert tendsto_const_nhds (a := (0 : E)) with w
    apply integral_undef
    rwa [← fourier_integrand_integrable w]
  

Proof state:
case pos
E : Type u_1
V : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℂ E
f : V → E
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : MeasurableSpace V
inst✝³ : BorelSpace V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : FiniteDimensional ℝ V
inst✝ : CompleteSpace E
hfi : Integrable f
⊢ Tendsto (fun w => ∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • f v) (cocompact V) (𝓝 0)

Next tactic:
refine' Metric.tendsto_nhds.mpr fun ε hε => _
/-- Riemann-Lebesgue lemma for functions on a real inner-product space: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 as `w → ∞`. -/
theorem tendsto_integral_exp_inner_smul_cocompact :
    Tendsto (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
  by_cases hfi : Integrable f; swap
  · convert tendsto_const_nhds (a := (0 : E)) with w
    apply integral_undef
    rwa [← fourier_integrand_integrable w]
  refine' Metric.tendsto_nhds.mpr fun ε hε => _
  

Proof state:
case pos
E : Type u_1
V : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℂ E
f : V → E
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : MeasurableSpace V
inst✝³ : BorelSpace V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : FiniteDimensional ℝ V
inst✝ : CompleteSpace E
hfi : Integrable f
ε : ℝ
hε : ε > 0
⊢ ∀ᶠ (x : V) in cocompact V, dist (∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v x))) • f v) 0 < ε

Next tactic:
obtain ⟨g, hg_supp, hfg, hg_cont, -⟩ :=
    hfi.exists_hasCompactSupport_integral_sub_le (div_pos hε two_pos)
/-- Riemann-Lebesgue lemma for functions on a real inner-product space: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 as `w → ∞`. -/
theorem tendsto_integral_exp_inner_smul_cocompact :
    Tendsto (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
  by_cases hfi : Integrable f; swap
  · convert tendsto_const_nhds (a := (0 : E)) with w
    apply integral_undef
    rwa [← fourier_integrand_integrable w]
  refine' Metric.tendsto_nhds.mpr fun ε hε => _
  obtain ⟨g, hg_supp, hfg, hg_cont, -⟩ :=
    hfi.exists_hasCompactSupport_integral_sub_le (div_pos hε two_pos)
  

Proof state:
case pos.intro.intro.intro.intro
E : Type u_1
V : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℂ E
f : V → E
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : MeasurableSpace V
inst✝³ : BorelSpace V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : FiniteDimensional ℝ V
inst✝ : CompleteSpace E
hfi : Integrable f
ε : ℝ
hε : ε > 0
g : V → E
hg_supp : HasCompactSupport g
hfg : ∫ (x : V), ‖f x - g x‖ ≤ ε / 2
hg_cont : Continuous g
⊢ ∀ᶠ (x : V) in cocompact V, dist (∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v x))) • f v) 0 < ε

Next tactic:
refine'
    ((Metric.tendsto_nhds.mp
            (tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support hg_cont
              hg_supp))
          _ (div_pos hε two_pos)).mp
      (eventually_of_forall fun w hI => _)
/-- Riemann-Lebesgue lemma for functions on a real inner-product space: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 as `w → ∞`. -/
theorem tendsto_integral_exp_inner_smul_cocompact :
    Tendsto (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
  by_cases hfi : Integrable f; swap
  · convert tendsto_const_nhds (a := (0 : E)) with w
    apply integral_undef
    rwa [← fourier_integrand_integrable w]
  refine' Metric.tendsto_nhds.mpr fun ε hε => _
  obtain ⟨g, hg_supp, hfg, hg_cont, -⟩ :=
    hfi.exists_hasCompactSupport_integral_sub_le (div_pos hε two_pos)
  refine'
    ((Metric.tendsto_nhds.mp
            (tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support hg_cont
              hg_supp))
          _ (div_pos hε two_pos)).mp
      (eventually_of_forall fun w hI => _)
  

Proof state:
case pos.intro.intro.intro.intro
E : Type u_1
V : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℂ E
f : V → E
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : MeasurableSpace V
inst✝³ : BorelSpace V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : FiniteDimensional ℝ V
inst✝ : CompleteSpace E
hfi : Integrable f
ε : ℝ
hε : ε > 0
g : V → E
hg_supp : HasCompactSupport g
hfg : ∫ (x : V), ‖f x - g x‖ ≤ ε / 2
hg_cont : Continuous g
w : V
hI : dist (∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • g v) 0 < ε / 2
⊢ dist (∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • f v) 0 < ε

Next tactic:
rw [dist_eq_norm] at hI ⊢
/-- Riemann-Lebesgue lemma for functions on a real inner-product space: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 as `w → ∞`. -/
theorem tendsto_integral_exp_inner_smul_cocompact :
    Tendsto (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
  by_cases hfi : Integrable f; swap
  · convert tendsto_const_nhds (a := (0 : E)) with w
    apply integral_undef
    rwa [← fourier_integrand_integrable w]
  refine' Metric.tendsto_nhds.mpr fun ε hε => _
  obtain ⟨g, hg_supp, hfg, hg_cont, -⟩ :=
    hfi.exists_hasCompactSupport_integral_sub_le (div_pos hε two_pos)
  refine'
    ((Metric.tendsto_nhds.mp
            (tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support hg_cont
              hg_supp))
          _ (div_pos hε two_pos)).mp
      (eventually_of_forall fun w hI => _)
  rw [dist_eq_norm] at hI ⊢
  

Proof state:
case pos.intro.intro.intro.intro
E : Type u_1
V : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℂ E
f : V → E
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : MeasurableSpace V
inst✝³ : BorelSpace V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : FiniteDimensional ℝ V
inst✝ : CompleteSpace E
hfi : Integrable f
ε : ℝ
hε : ε > 0
g : V → E
hg_supp : HasCompactSupport g
hfg : ∫ (x : V), ‖f x - g x‖ ≤ ε / 2
hg_cont : Continuous g
w : V
hI : ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • g v) - 0‖ < ε / 2
⊢ ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • f v) - 0‖ < ε

Next tactic:
have : ‖(∫ v, e[-⟪v, w⟫] • f v) - ∫ v, e[-⟪v, w⟫] • g v‖ ≤ ε / 2 := by
    refine' le_trans _ hfg
    simp_rw [←
      integral_sub ((fourier_integrand_integrable w).mp hfi)
        ((fourier_integrand_integrable w).mp (hg_cont.integrable_of_hasCompactSupport hg_supp)),
      ← smul_sub, ← Pi.sub_apply]
    exact
      VectorFourier.norm_fourierIntegral_le_integral_norm e volume
        (BilinForm.toLin bilinFormOfRealInner) (f - g) w
/-- Riemann-Lebesgue lemma for functions on a real inner-product space: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 as `w → ∞`. -/
theorem tendsto_integral_exp_inner_smul_cocompact :
    Tendsto (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
  by_cases hfi : Integrable f; swap
  · convert tendsto_const_nhds (a := (0 : E)) with w
    apply integral_undef
    rwa [← fourier_integrand_integrable w]
  refine' Metric.tendsto_nhds.mpr fun ε hε => _
  obtain ⟨g, hg_supp, hfg, hg_cont, -⟩ :=
    hfi.exists_hasCompactSupport_integral_sub_le (div_pos hε two_pos)
  refine'
    ((Metric.tendsto_nhds.mp
            (tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support hg_cont
              hg_supp))
          _ (div_pos hε two_pos)).mp
      (eventually_of_forall fun w hI => _)
  rw [dist_eq_norm] at hI ⊢
  have : ‖(∫ v, e[-⟪v, w⟫] • f v) - ∫ v, e[-⟪v, w⟫] • g v‖ ≤ ε / 2 := by
    

Proof state:
E : Type u_1
V : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℂ E
f : V → E
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : MeasurableSpace V
inst✝³ : BorelSpace V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : FiniteDimensional ℝ V
inst✝ : CompleteSpace E
hfi : Integrable f
ε : ℝ
hε : ε > 0
g : V → E
hg_supp : HasCompactSupport g
hfg : ∫ (x : V), ‖f x - g x‖ ≤ ε / 2
hg_cont : Continuous g
w : V
hI : ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • g v) - 0‖ < ε / 2
⊢ ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • f v) -
        ∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • g v‖ ≤
    ε / 2

Next tactic:
refine' le_trans _ hfg
/-- Riemann-Lebesgue lemma for functions on a real inner-product space: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 as `w → ∞`. -/
theorem tendsto_integral_exp_inner_smul_cocompact :
    Tendsto (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
  by_cases hfi : Integrable f; swap
  · convert tendsto_const_nhds (a := (0 : E)) with w
    apply integral_undef
    rwa [← fourier_integrand_integrable w]
  refine' Metric.tendsto_nhds.mpr fun ε hε => _
  obtain ⟨g, hg_supp, hfg, hg_cont, -⟩ :=
    hfi.exists_hasCompactSupport_integral_sub_le (div_pos hε two_pos)
  refine'
    ((Metric.tendsto_nhds.mp
            (tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support hg_cont
              hg_supp))
          _ (div_pos hε two_pos)).mp
      (eventually_of_forall fun w hI => _)
  rw [dist_eq_norm] at hI ⊢
  have : ‖(∫ v, e[-⟪v, w⟫] • f v) - ∫ v, e[-⟪v, w⟫] • g v‖ ≤ ε / 2 := by
    refine' le_trans _ hfg
    

Proof state:
E : Type u_1
V : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℂ E
f : V → E
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : MeasurableSpace V
inst✝³ : BorelSpace V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : FiniteDimensional ℝ V
inst✝ : CompleteSpace E
hfi : Integrable f
ε : ℝ
hε : ε > 0
g : V → E
hg_supp : HasCompactSupport g
hfg : ∫ (x : V), ‖f x - g x‖ ≤ ε / 2
hg_cont : Continuous g
w : V
hI : ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • g v) - 0‖ < ε / 2
⊢ ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • f v) -
        ∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • g v‖ ≤
    ∫ (x : V), ‖f x - g x‖

Next tactic:
simp_rw [←
      integral_sub ((fourier_integrand_integrable w).mp hfi)
        ((fourier_integrand_integrable w).mp (hg_cont.integrable_of_hasCompactSupport hg_supp)),
      ← smul_sub, ← Pi.sub_apply]
/-- Riemann-Lebesgue lemma for functions on a real inner-product space: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 as `w → ∞`. -/
theorem tendsto_integral_exp_inner_smul_cocompact :
    Tendsto (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
  by_cases hfi : Integrable f; swap
  · convert tendsto_const_nhds (a := (0 : E)) with w
    apply integral_undef
    rwa [← fourier_integrand_integrable w]
  refine' Metric.tendsto_nhds.mpr fun ε hε => _
  obtain ⟨g, hg_supp, hfg, hg_cont, -⟩ :=
    hfi.exists_hasCompactSupport_integral_sub_le (div_pos hε two_pos)
  refine'
    ((Metric.tendsto_nhds.mp
            (tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support hg_cont
              hg_supp))
          _ (div_pos hε two_pos)).mp
      (eventually_of_forall fun w hI => _)
  rw [dist_eq_norm] at hI ⊢
  have : ‖(∫ v, e[-⟪v, w⟫] • f v) - ∫ v, e[-⟪v, w⟫] • g v‖ ≤ ε / 2 := by
    refine' le_trans _ hfg
    simp_rw [←
      integral_sub ((fourier_integrand_integrable w).mp hfi)
        ((fourier_integrand_integrable w).mp (hg_cont.integrable_of_hasCompactSupport hg_supp)),
      ← smul_sub, ← Pi.sub_apply]
    

Proof state:
E : Type u_1
V : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℂ E
f : V → E
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : MeasurableSpace V
inst✝³ : BorelSpace V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : FiniteDimensional ℝ V
inst✝ : CompleteSpace E
hfi : Integrable f
ε : ℝ
hε : ε > 0
g : V → E
hg_supp : HasCompactSupport g
hfg : ∫ (x : V), ‖f x - g x‖ ≤ ε / 2
hg_cont : Continuous g
w : V
hI : ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • g v) - 0‖ < ε / 2
⊢ ‖∫ (a : V), ↑(e (Multiplicative.ofAdd (-inner a w))) • (f - g) a‖ ≤ ∫ (x : V), ‖(f - g) x‖

Next tactic:
exact
      VectorFourier.norm_fourierIntegral_le_integral_norm e volume
        (BilinForm.toLin bilinFormOfRealInner) (f - g) w
/-- Riemann-Lebesgue lemma for functions on a real inner-product space: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 as `w → ∞`. -/
theorem tendsto_integral_exp_inner_smul_cocompact :
    Tendsto (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
  by_cases hfi : Integrable f; swap
  · convert tendsto_const_nhds (a := (0 : E)) with w
    apply integral_undef
    rwa [← fourier_integrand_integrable w]
  refine' Metric.tendsto_nhds.mpr fun ε hε => _
  obtain ⟨g, hg_supp, hfg, hg_cont, -⟩ :=
    hfi.exists_hasCompactSupport_integral_sub_le (div_pos hε two_pos)
  refine'
    ((Metric.tendsto_nhds.mp
            (tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support hg_cont
              hg_supp))
          _ (div_pos hε two_pos)).mp
      (eventually_of_forall fun w hI => _)
  rw [dist_eq_norm] at hI ⊢
  have : ‖(∫ v, e[-⟪v, w⟫] • f v) - ∫ v, e[-⟪v, w⟫] • g v‖ ≤ ε / 2 := by
    refine' le_trans _ hfg
    simp_rw [←
      integral_sub ((fourier_integrand_integrable w).mp hfi)
        ((fourier_integrand_integrable w).mp (hg_cont.integrable_of_hasCompactSupport hg_supp)),
      ← smul_sub, ← Pi.sub_apply]
    exact
      VectorFourier.norm_fourierIntegral_le_integral_norm e volume
        (BilinForm.toLin bilinFormOfRealInner) (f - g) w
  

Proof state:
case pos.intro.intro.intro.intro
E : Type u_1
V : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℂ E
f : V → E
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : MeasurableSpace V
inst✝³ : BorelSpace V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : FiniteDimensional ℝ V
inst✝ : CompleteSpace E
hfi : Integrable f
ε : ℝ
hε : ε > 0
g : V → E
hg_supp : HasCompactSupport g
hfg : ∫ (x : V), ‖f x - g x‖ ≤ ε / 2
hg_cont : Continuous g
w : V
hI : ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • g v) - 0‖ < ε / 2
this :
  ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • f v) -
        ∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • g v‖ ≤
    ε / 2
⊢ ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • f v) - 0‖ < ε

Next tactic:
replace := add_lt_add_of_le_of_lt this hI
/-- Riemann-Lebesgue lemma for functions on a real inner-product space: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 as `w → ∞`. -/
theorem tendsto_integral_exp_inner_smul_cocompact :
    Tendsto (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
  by_cases hfi : Integrable f; swap
  · convert tendsto_const_nhds (a := (0 : E)) with w
    apply integral_undef
    rwa [← fourier_integrand_integrable w]
  refine' Metric.tendsto_nhds.mpr fun ε hε => _
  obtain ⟨g, hg_supp, hfg, hg_cont, -⟩ :=
    hfi.exists_hasCompactSupport_integral_sub_le (div_pos hε two_pos)
  refine'
    ((Metric.tendsto_nhds.mp
            (tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support hg_cont
              hg_supp))
          _ (div_pos hε two_pos)).mp
      (eventually_of_forall fun w hI => _)
  rw [dist_eq_norm] at hI ⊢
  have : ‖(∫ v, e[-⟪v, w⟫] • f v) - ∫ v, e[-⟪v, w⟫] • g v‖ ≤ ε / 2 := by
    refine' le_trans _ hfg
    simp_rw [←
      integral_sub ((fourier_integrand_integrable w).mp hfi)
        ((fourier_integrand_integrable w).mp (hg_cont.integrable_of_hasCompactSupport hg_supp)),
      ← smul_sub, ← Pi.sub_apply]
    exact
      VectorFourier.norm_fourierIntegral_le_integral_norm e volume
        (BilinForm.toLin bilinFormOfRealInner) (f - g) w
  replace := add_lt_add_of_le_of_lt this hI
  

Proof state:
case pos.intro.intro.intro.intro
E : Type u_1
V : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℂ E
f : V → E
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : MeasurableSpace V
inst✝³ : BorelSpace V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : FiniteDimensional ℝ V
inst✝ : CompleteSpace E
hfi : Integrable f
ε : ℝ
hε : ε > 0
g : V → E
hg_supp : HasCompactSupport g
hfg : ∫ (x : V), ‖f x - g x‖ ≤ ε / 2
hg_cont : Continuous g
w : V
hI : ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • g v) - 0‖ < ε / 2
this :
  ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • f v) -
          ∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • g v‖ +
      ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • g v) - 0‖ <
    ε / 2 + ε / 2
⊢ ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • f v) - 0‖ < ε

Next tactic:
rw [add_halves] at this
/-- Riemann-Lebesgue lemma for functions on a real inner-product space: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 as `w → ∞`. -/
theorem tendsto_integral_exp_inner_smul_cocompact :
    Tendsto (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
  by_cases hfi : Integrable f; swap
  · convert tendsto_const_nhds (a := (0 : E)) with w
    apply integral_undef
    rwa [← fourier_integrand_integrable w]
  refine' Metric.tendsto_nhds.mpr fun ε hε => _
  obtain ⟨g, hg_supp, hfg, hg_cont, -⟩ :=
    hfi.exists_hasCompactSupport_integral_sub_le (div_pos hε two_pos)
  refine'
    ((Metric.tendsto_nhds.mp
            (tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support hg_cont
              hg_supp))
          _ (div_pos hε two_pos)).mp
      (eventually_of_forall fun w hI => _)
  rw [dist_eq_norm] at hI ⊢
  have : ‖(∫ v, e[-⟪v, w⟫] • f v) - ∫ v, e[-⟪v, w⟫] • g v‖ ≤ ε / 2 := by
    refine' le_trans _ hfg
    simp_rw [←
      integral_sub ((fourier_integrand_integrable w).mp hfi)
        ((fourier_integrand_integrable w).mp (hg_cont.integrable_of_hasCompactSupport hg_supp)),
      ← smul_sub, ← Pi.sub_apply]
    exact
      VectorFourier.norm_fourierIntegral_le_integral_norm e volume
        (BilinForm.toLin bilinFormOfRealInner) (f - g) w
  replace := add_lt_add_of_le_of_lt this hI
  rw [add_halves] at this
  

Proof state:
case pos.intro.intro.intro.intro
E : Type u_1
V : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℂ E
f : V → E
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : MeasurableSpace V
inst✝³ : BorelSpace V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : FiniteDimensional ℝ V
inst✝ : CompleteSpace E
hfi : Integrable f
ε : ℝ
hε : ε > 0
g : V → E
hg_supp : HasCompactSupport g
hfg : ∫ (x : V), ‖f x - g x‖ ≤ ε / 2
hg_cont : Continuous g
w : V
hI : ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • g v) - 0‖ < ε / 2
this :
  ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • f v) -
          ∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • g v‖ +
      ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • g v) - 0‖ <
    ε
⊢ ‖(∫ (v : V), ↑(e (Multiplicative.ofAdd (-inner v w))) • f v) - 0‖ < ε

Next tactic:
refine' ((le_of_eq _).trans (norm_add_le _ _)).trans_lt this