analysis.fourier.riemann_lebesgue_lemmaMathlib.Analysis.Fourier.RiemannLebesgueLemma

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -7,10 +7,10 @@ import Analysis.Fourier.FourierTransform
 import Analysis.InnerProductSpace.Dual
 import Analysis.InnerProductSpace.EuclideanDist
 import MeasureTheory.Function.ContinuousMapDense
-import MeasureTheory.Group.Integration
+import MeasureTheory.Group.Integral
 import MeasureTheory.Integral.SetIntegral
 import MeasureTheory.Measure.Haar.NormedSpace
-import Topology.MetricSpace.EmetricParacompact
+import Topology.EMetricSpace.Paracompact
 
 #align_import analysis.fourier.riemann_lebesgue_lemma from "leanprover-community/mathlib"@"9240e8be927a0955b9a82c6c85ef499ee3a626b8"
 
@@ -63,31 +63,31 @@ section InnerProductSpace
 variable [NormedAddCommGroup V] [MeasurableSpace V] [BorelSpace V] [InnerProductSpace ℝ V]
   [FiniteDimensional ℝ V]
 
-#print fourier_integrand_integrable /-
+#print Real.fourierIntegral_convergent_iff /-
 /-- The integrand in the Riemann-Lebesgue lemma for `f` is integrable iff `f` is. -/
-theorem fourier_integrand_integrable (w : V) :
+theorem Real.fourierIntegral_convergent_iff (w : V) :
     Integrable f ↔ Integrable fun v : V => e[-⟪v, w⟫] • f v :=
   by
   have hL : Continuous fun p : V × V => bilin_form_of_real_inner.to_lin p.1 p.2 := continuous_inner
-  rw [VectorFourier.fourier_integral_convergent_iff Real.continuous_fourierChar hL w]
+  rw [VectorFourier.fourierIntegral_convergent_iff Real.continuous_fourierChar hL w]
   · simp only [BilinForm.toLin_apply, bilinFormOfRealInner_apply]
   · infer_instance
-#align fourier_integrand_integrable fourier_integrand_integrable
+#align fourier_integrand_integrable Real.fourierIntegral_convergent_iff
 -/
 
 variable [CompleteSpace E]
 
 local notation "i" => fun w => (1 / (2 * ‖w‖ ^ 2)) • w
 
-#print fourier_integral_half_period_translate /-
+#print fourierIntegral_half_period_translate /-
 /-- Shifting `f` by `(1 / (2 * ‖w‖ ^ 2)) • w` negates the integral in the Riemann-Lebesgue lemma. -/
-theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
+theorem fourierIntegral_half_period_translate {w : V} (hw : w ≠ 0) :
     ∫ v : V, e[-⟪v, w⟫] • f (v + i w) = -∫ v : V, e[-⟪v, w⟫] • f v :=
   by
   have hiw : ⟪i w, w⟫ = 1 / 2 :=
     by
-    rw [inner_smul_left, inner_self_eq_norm_sq_to_K, IsROrC.ofReal_real_eq_id, id.def,
-      IsROrC.conj_to_real, ← div_div, div_mul_cancel]
+    rw [inner_smul_left, inner_self_eq_norm_sq_to_K, RCLike.ofReal_real_eq_id, id.def,
+      RCLike.conj_to_real, ← div_div, div_mul_cancel₀]
     rwa [Ne.def, sq_eq_zero_iff, norm_eq_zero]
   have :
     (fun v : V => e[-⟪v, w⟫] • f (v + i w)) = fun v : V =>
@@ -101,22 +101,21 @@ theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
       mul_neg_one, neg_neg]
   rw [this, integral_add_right_eq_self]
   simp only [neg_smul, integral_neg]
-#align fourier_integral_half_period_translate fourier_integral_half_period_translate
+#align fourier_integral_half_period_translate fourierIntegral_half_period_translate
 -/
 
-#print fourier_integral_eq_half_sub_half_period_translate /-
+#print fourierIntegral_eq_half_sub_half_period_translate /-
 /-- Rewrite the Fourier integral in a form that allows us to use uniform continuity. -/
-theorem fourier_integral_eq_half_sub_half_period_translate {w : V} (hw : w ≠ 0)
-    (hf : Integrable f) :
+theorem fourierIntegral_eq_half_sub_half_period_translate {w : V} (hw : w ≠ 0) (hf : Integrable f) :
     ∫ v : V, e[-⟪v, w⟫] • f v = (1 / (2 : ℂ)) • ∫ v : V, e[-⟪v, w⟫] • (f v - f (v + i w)) :=
   by
   simp_rw [smul_sub]
-  rw [integral_sub, fourier_integral_half_period_translate hw, sub_eq_add_neg, neg_neg, ←
+  rw [integral_sub, fourierIntegral_half_period_translate hw, sub_eq_add_neg, neg_neg, ←
     two_smul ℂ _, ← @smul_assoc _ _ _ _ _ _ (IsScalarTower.left ℂ), smul_eq_mul]
   norm_num
-  exacts [(fourier_integrand_integrable w).mp hf,
-    (fourier_integrand_integrable w).mp (hf.comp_add_right _)]
-#align fourier_integral_eq_half_sub_half_period_translate fourier_integral_eq_half_sub_half_period_translate
+  exacts [(Real.fourierIntegral_convergent_iff w).mp hf,
+    (Real.fourierIntegral_convergent_iff w).mp (hf.comp_add_right _)]
+#align fourier_integral_eq_half_sub_half_period_translate fourierIntegral_eq_half_sub_half_period_translate
 -/
 
 #print tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support /-
@@ -163,9 +162,9 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
     exact add_pos one_half_pos (one_div_pos.mpr <| mul_pos two_pos hδ1)
   have hw'_nm : ‖i w‖ = 1 / (2 * ‖w‖) := by
     rw [norm_smul, norm_div, Real.norm_of_nonneg (mul_nonneg two_pos.le <| sq_nonneg _), norm_one,
-      sq, ← div_div, ← div_div, ← div_div, div_mul_cancel _ (norm_eq_zero.not.mpr hw_ne)]
+      sq, ← div_div, ← div_div, ← div_div, div_mul_cancel₀ _ (norm_eq_zero.not.mpr hw_ne)]
   --* Rewrite integral in terms of `f v - f (v + w')`.
-  rw [fourier_integral_eq_half_sub_half_period_translate hw_ne
+  rw [fourierIntegral_eq_half_sub_half_period_translate hw_ne
       (hf1.integrable_of_has_compact_support hf2),
     norm_smul, norm_eq_abs, ← Complex.ofReal_one, ← of_real_bit0, ← of_real_div,
     Complex.abs_of_nonneg one_half_pos.le]
@@ -196,7 +195,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
     simp_rw [norm_norm]
     simp_rw [dist_eq_norm] at hδ2
     refine' fun x _ => (hδ2 _).le
-    rw [sub_add_cancel', norm_neg, hw'_nm, ← div_div, div_lt_iff (norm_pos_iff.mpr hw_ne), ←
+    rw [sub_add_cancel_left, norm_neg, hw'_nm, ← div_div, div_lt_iff (norm_pos_iff.mpr hw_ne), ←
       div_lt_iff' hδ1, div_div]
     refine' (lt_add_of_pos_left _ _).trans_le hw_bd
     exact one_half_pos
@@ -232,7 +231,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact :
   · convert tendsto_const_nhds
     ext1 w
     apply integral_undef
-    rwa [← fourier_integrand_integrable w]
+    rwa [← Real.fourierIntegral_convergent_iff w]
   refine' metric.tendsto_nhds.mpr fun ε hε => _
   obtain ⟨g, hg_supp, hfg, hg_cont, -⟩ :=
     hfi.exists_has_compact_support_integral_sub_le (div_pos hε two_pos)
@@ -247,8 +246,9 @@ theorem tendsto_integral_exp_inner_smul_cocompact :
     by
     refine' le_trans _ hfg
     simp_rw [←
-      integral_sub ((fourier_integrand_integrable w).mp hfi)
-        ((fourier_integrand_integrable w).mp (hg_cont.integrable_of_has_compact_support hg_supp)),
+      integral_sub ((Real.fourierIntegral_convergent_iff w).mp hfi)
+        ((Real.fourierIntegral_convergent_iff w).mp
+          (hg_cont.integrable_of_has_compact_support hg_supp)),
       ← smul_sub, ← Pi.sub_apply]
     exact
       VectorFourier.norm_fourierIntegral_le_integral_norm e volume bilin_form_of_real_inner.to_lin
@@ -292,7 +292,7 @@ theorem tendsto_integral_exp_smul_cocompact_of_inner_product (μ : Measure V) [
     by
     ext1 w
     congr 1 with v : 1
-    rw [← inner_conj_symm, IsROrC.conj_to_real, InnerProductSpace.toDual_symm_apply,
+    rw [← inner_conj_symm, RCLike.conj_to_real, InnerProductSpace.toDual_symm_apply,
       Real.fourierChar_apply]
   rw [this]
   exact
Diff
@@ -177,8 +177,8 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
   have int_A : ∫ v : V, ‖f v - f (v + i w)‖ = ∫ v in A, ‖f v - f (v + i w)‖ :=
     by
     refine' (set_integral_eq_integral_of_forall_compl_eq_zero fun v hv => _).symm
-    dsimp only [A] at hv 
-    simp only [A, mem_set_of_eq, not_le] at hv 
+    dsimp only [A] at hv
+    simp only [A, mem_set_of_eq, not_le] at hv
     rw [hR_bd v _, hR_bd (v + i w) _, sub_zero, norm_zero]
     · rw [← sub_neg_eq_add]
       refine' le_trans _ (norm_sub_norm_le _ _)
@@ -194,7 +194,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
   have bdA : ∀ v : V, v ∈ A → ‖‖f v - f (v + i w)‖‖ ≤ ε / B :=
     by
     simp_rw [norm_norm]
-    simp_rw [dist_eq_norm] at hδ2 
+    simp_rw [dist_eq_norm] at hδ2
     refine' fun x _ => (hδ2 _).le
     rw [sub_add_cancel', norm_neg, hw'_nm, ← div_div, div_lt_iff (norm_pos_iff.mpr hw_ne), ←
       div_lt_iff' hδ1, div_div]
@@ -208,11 +208,11 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
         Continuous.sub hf1 <| Continuous.comp hf1 <| continuous_id'.add continuous_const
   have : ‖_‖ = ∫ v : V in A, ‖f v - f (v + i w)‖ :=
     Real.norm_of_nonneg (set_integral_nonneg mA fun x hx => norm_nonneg _)
-  rw [this] at bdA2 
+  rw [this] at bdA2
   refine' bdA2.trans_lt _
   rw [div_mul_eq_mul_div, div_lt_iff (nnreal.coe_pos.mpr hB_pos), mul_comm (2 : ℝ), mul_assoc,
     mul_lt_mul_left hε]
-  rw [← ENNReal.toReal_le_toReal] at hB_vol 
+  rw [← ENNReal.toReal_le_toReal] at hB_vol
   · refine' hB_vol.trans_lt _
     rw [(by rfl : (↑B : ENNReal).toReal = ↑B), two_mul]
     exact lt_add_of_pos_left _ hB_pos
@@ -254,7 +254,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact :
       VectorFourier.norm_fourierIntegral_le_integral_norm e volume bilin_form_of_real_inner.to_lin
         (f - g) w
   replace := add_lt_add_of_le_of_lt this hI
-  rw [add_halves] at this 
+  rw [add_halves] at this
   refine' ((le_of_eq _).trans (norm_add_le _ _)).trans_lt this
   simp only [sub_zero, sub_add_cancel]
 #align tendsto_integral_exp_inner_smul_cocompact tendsto_integral_exp_inner_smul_cocompact
Diff
@@ -95,9 +95,10 @@ theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
     by
     ext1 v
     simp_rw [inner_add_left, hiw, Real.fourierChar_apply, neg_add, mul_add, of_real_add, add_mul,
-      exp_add]
+      NormedSpace.exp_add]
     have : 2 * π * -(1 / 2) = -π := by field_simp; ring
-    rw [this, of_real_neg, neg_mul, exp_neg, exp_pi_mul_I, inv_neg, inv_one, mul_neg_one, neg_neg]
+    rw [this, of_real_neg, neg_mul, NormedSpace.exp_neg, exp_pi_mul_I, inv_neg, inv_one,
+      mul_neg_one, neg_neg]
   rw [this, integral_add_right_eq_self]
   simp only [neg_smul, integral_neg]
 #align fourier_integral_half_period_translate fourier_integral_half_period_translate
Diff
@@ -3,14 +3,14 @@ Copyright (c) 2022 David Loeffler. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: David Loeffler
 -/
-import Mathbin.Analysis.Fourier.FourierTransform
-import Mathbin.Analysis.InnerProductSpace.Dual
-import Mathbin.Analysis.InnerProductSpace.EuclideanDist
-import Mathbin.MeasureTheory.Function.ContinuousMapDense
-import Mathbin.MeasureTheory.Group.Integration
-import Mathbin.MeasureTheory.Integral.SetIntegral
-import Mathbin.MeasureTheory.Measure.Haar.NormedSpace
-import Mathbin.Topology.MetricSpace.EmetricParacompact
+import Analysis.Fourier.FourierTransform
+import Analysis.InnerProductSpace.Dual
+import Analysis.InnerProductSpace.EuclideanDist
+import MeasureTheory.Function.ContinuousMapDense
+import MeasureTheory.Group.Integration
+import MeasureTheory.Integral.SetIntegral
+import MeasureTheory.Measure.Haar.NormedSpace
+import Topology.MetricSpace.EmetricParacompact
 
 #align_import analysis.fourier.riemann_lebesgue_lemma from "leanprover-community/mathlib"@"9240e8be927a0955b9a82c6c85ef499ee3a626b8"
 
Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2022 David Loeffler. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: David Loeffler
-
-! This file was ported from Lean 3 source module analysis.fourier.riemann_lebesgue_lemma
-! leanprover-community/mathlib commit 9240e8be927a0955b9a82c6c85ef499ee3a626b8
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.Fourier.FourierTransform
 import Mathbin.Analysis.InnerProductSpace.Dual
@@ -17,6 +12,8 @@ import Mathbin.MeasureTheory.Integral.SetIntegral
 import Mathbin.MeasureTheory.Measure.Haar.NormedSpace
 import Mathbin.Topology.MetricSpace.EmetricParacompact
 
+#align_import analysis.fourier.riemann_lebesgue_lemma from "leanprover-community/mathlib"@"9240e8be927a0955b9a82c6c85ef499ee3a626b8"
+
 /-!
 # The Riemann-Lebesgue Lemma
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: David Loeffler
 
 ! This file was ported from Lean 3 source module analysis.fourier.riemann_lebesgue_lemma
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
+! leanprover-community/mathlib commit 9240e8be927a0955b9a82c6c85ef499ee3a626b8
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -20,6 +20,9 @@ import Mathbin.Topology.MetricSpace.EmetricParacompact
 /-!
 # The Riemann-Lebesgue Lemma
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file we prove the Riemann-Lebesgue lemma, for functions on finite-dimensional real vector
 spaces `V`: if `f` is a function on `V` (valued in a complete normed space `E`), then the
 Fourier transform of `f`, viewed as a function on the dual space of `V`, tends to 0 along the
Diff
@@ -63,6 +63,7 @@ section InnerProductSpace
 variable [NormedAddCommGroup V] [MeasurableSpace V] [BorelSpace V] [InnerProductSpace ℝ V]
   [FiniteDimensional ℝ V]
 
+#print fourier_integrand_integrable /-
 /-- The integrand in the Riemann-Lebesgue lemma for `f` is integrable iff `f` is. -/
 theorem fourier_integrand_integrable (w : V) :
     Integrable f ↔ Integrable fun v : V => e[-⟪v, w⟫] • f v :=
@@ -72,11 +73,13 @@ theorem fourier_integrand_integrable (w : V) :
   · simp only [BilinForm.toLin_apply, bilinFormOfRealInner_apply]
   · infer_instance
 #align fourier_integrand_integrable fourier_integrand_integrable
+-/
 
 variable [CompleteSpace E]
 
 local notation "i" => fun w => (1 / (2 * ‖w‖ ^ 2)) • w
 
+#print fourier_integral_half_period_translate /-
 /-- Shifting `f` by `(1 / (2 * ‖w‖ ^ 2)) • w` negates the integral in the Riemann-Lebesgue lemma. -/
 theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
     ∫ v : V, e[-⟪v, w⟫] • f (v + i w) = -∫ v : V, e[-⟪v, w⟫] • f v :=
@@ -98,7 +101,9 @@ theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
   rw [this, integral_add_right_eq_self]
   simp only [neg_smul, integral_neg]
 #align fourier_integral_half_period_translate fourier_integral_half_period_translate
+-/
 
+#print fourier_integral_eq_half_sub_half_period_translate /-
 /-- Rewrite the Fourier integral in a form that allows us to use uniform continuity. -/
 theorem fourier_integral_eq_half_sub_half_period_translate {w : V} (hw : w ≠ 0)
     (hf : Integrable f) :
@@ -111,7 +116,9 @@ theorem fourier_integral_eq_half_sub_half_period_translate {w : V} (hw : w ≠ 0
   exacts [(fourier_integrand_integrable w).mp hf,
     (fourier_integrand_integrable w).mp (hf.comp_add_right _)]
 #align fourier_integral_eq_half_sub_half_period_translate fourier_integral_eq_half_sub_half_period_translate
+-/
 
+#print tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support /-
 /-- Riemann-Lebesgue Lemma for continuous and compactly-supported functions: the integral
 `∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 wrt `cocompact V`. Note that this is primarily
 of interest as a preparatory step for the more general result
@@ -210,9 +217,11 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
     exact lt_add_of_pos_left _ hB_pos
   exacts [(hB_vol.trans_lt ENNReal.coe_lt_top).Ne, ennreal.coe_lt_top.ne]
 #align tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
+-/
 
 variable (f)
 
+#print tendsto_integral_exp_inner_smul_cocompact /-
 /-- 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 :
@@ -248,18 +257,24 @@ theorem tendsto_integral_exp_inner_smul_cocompact :
   refine' ((le_of_eq _).trans (norm_add_le _ _)).trans_lt this
   simp only [sub_zero, sub_add_cancel]
 #align tendsto_integral_exp_inner_smul_cocompact tendsto_integral_exp_inner_smul_cocompact
+-/
 
+#print Real.tendsto_integral_exp_smul_cocompact /-
 /-- The Riemann-Lebesgue lemma for functions on `ℝ`. -/
 theorem Real.tendsto_integral_exp_smul_cocompact (f : ℝ → E) :
     Tendsto (fun w : ℝ => ∫ v : ℝ, e[-(v * w)] • f v) (cocompact ℝ) (𝓝 0) :=
   tendsto_integral_exp_inner_smul_cocompact f
 #align real.tendsto_integral_exp_smul_cocompact Real.tendsto_integral_exp_smul_cocompact
+-/
 
+#print Real.zero_at_infty_fourierIntegral /-
 /-- The Riemann-Lebesgue lemma for functions on `ℝ`, formulated via `real.fourier_integral`. -/
 theorem Real.zero_at_infty_fourierIntegral (f : ℝ → E) : Tendsto (𝓕 f) (cocompact ℝ) (𝓝 0) :=
   tendsto_integral_exp_inner_smul_cocompact f
 #align real.zero_at_infty_fourier_integral Real.zero_at_infty_fourierIntegral
+-/
 
+#print tendsto_integral_exp_smul_cocompact_of_inner_product /-
 /-- Riemann-Lebesgue lemma for functions on a finite-dimensional inner-product space, formulated
 via dual space. **Do not use** -- it is only a stepping stone to
 `tendsto_integral_exp_smul_cocompact` where the inner-product-space structure isn't required. -/
@@ -283,6 +298,7 @@ theorem tendsto_integral_exp_smul_cocompact_of_inner_product (μ : Measure V) [
     (tendsto_integral_exp_inner_smul_cocompact f).comp
       A.to_homeomorph.to_cocompact_map.cocompact_tendsto'
 #align tendsto_integral_exp_smul_cocompact_of_inner_product tendsto_integral_exp_smul_cocompact_of_inner_product
+-/
 
 end InnerProductSpace
 
@@ -292,6 +308,7 @@ variable (f) [AddCommGroup V] [TopologicalSpace V] [TopologicalAddGroup V] [T2Sp
   [MeasurableSpace V] [BorelSpace V] [Module ℝ V] [ContinuousSMul ℝ V] [FiniteDimensional ℝ V]
   [CompleteSpace E]
 
+#print tendsto_integral_exp_smul_cocompact /-
 /-- Riemann-Lebesgue lemma for functions on a finite-dimensional real vector space, formulated via
 dual space. -/
 theorem tendsto_integral_exp_smul_cocompact (μ : Measure V) [μ.IsAddHaarMeasure] :
@@ -337,7 +354,9 @@ theorem tendsto_integral_exp_smul_cocompact (μ : Measure V) [μ.IsAddHaarMeasur
   congr 1 with v : 1
   congr <;> exact (ContinuousLinearEquiv.symm_apply_apply A v).symm
 #align tendsto_integral_exp_smul_cocompact tendsto_integral_exp_smul_cocompact
+-/
 
+#print Real.zero_at_infty_vector_fourierIntegral /-
 /-- The Riemann-Lebesgue lemma, formulated in terms of `vector_fourier.fourier_integral` (with the
 pairing in the definition of `fourier_integral` taken to be the canonical pairing between `V` and
 its dual space). -/
@@ -346,6 +365,7 @@ theorem Real.zero_at_infty_vector_fourierIntegral (μ : Measure V) [μ.IsAddHaar
       (𝓝 0) :=
   tendsto_integral_exp_smul_cocompact f μ
 #align real.zero_at_infty_vector_fourier_integral Real.zero_at_infty_vector_fourierIntegral
+-/
 
 end NoInnerProduct
 
Diff
@@ -56,7 +56,6 @@ open scoped Filter Topology Real ENNReal FourierTransform RealInnerProductSpace
 
 variable {E V : Type _} [NormedAddCommGroup E] [NormedSpace ℂ E] {f : V → E}
 
--- mathport name: expre
 local notation "e" => Real.fourierChar
 
 section InnerProductSpace
@@ -76,7 +75,6 @@ theorem fourier_integrand_integrable (w : V) :
 
 variable [CompleteSpace E]
 
--- mathport name: expri
 local notation "i" => fun w => (1 / (2 * ‖w‖ ^ 2)) • w
 
 /-- Shifting `f` by `(1 / (2 * ‖w‖ ^ 2)) • w` negates the integral in the Riemann-Lebesgue lemma. -/
Diff
@@ -81,7 +81,7 @@ local notation "i" => fun w => (1 / (2 * ‖w‖ ^ 2)) • w
 
 /-- Shifting `f` by `(1 / (2 * ‖w‖ ^ 2)) • w` negates the integral in the Riemann-Lebesgue lemma. -/
 theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
-    (∫ v : V, e[-⟪v, w⟫] • f (v + i w)) = -∫ v : V, e[-⟪v, w⟫] • f v :=
+    ∫ v : V, e[-⟪v, w⟫] • f (v + i w) = -∫ v : V, e[-⟪v, w⟫] • f v :=
   by
   have hiw : ⟪i w, w⟫ = 1 / 2 :=
     by
@@ -104,7 +104,7 @@ theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
 /-- Rewrite the Fourier integral in a form that allows us to use uniform continuity. -/
 theorem fourier_integral_eq_half_sub_half_period_translate {w : V} (hw : w ≠ 0)
     (hf : Integrable f) :
-    (∫ v : V, e[-⟪v, w⟫] • f v) = (1 / (2 : ℂ)) • ∫ v : V, e[-⟪v, w⟫] • (f v - f (v + i w)) :=
+    ∫ v : V, e[-⟪v, w⟫] • f v = (1 / (2 : ℂ)) • ∫ v : V, e[-⟪v, w⟫] • (f v - f (v + i w)) :=
   by
   simp_rw [smul_sub]
   rw [integral_sub, fourier_integral_half_period_translate hw, sub_eq_add_neg, neg_neg, ←
@@ -168,7 +168,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
   refine' lt_of_le_of_lt (norm_integral_le_integral_norm _) _
   simp_rw [norm_smul, norm_eq_abs, abs_coe_circle, one_mul]
   --* Show integral can be taken over A only.
-  have int_A : (∫ v : V, ‖f v - f (v + i w)‖) = ∫ v in A, ‖f v - f (v + i w)‖ :=
+  have int_A : ∫ v : V, ‖f v - f (v + i w)‖ = ∫ v in A, ‖f v - f (v + i w)‖ :=
     by
     refine' (set_integral_eq_integral_of_forall_compl_eq_zero fun v hv => _).symm
     dsimp only [A] at hv 
Diff
@@ -132,7 +132,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
       ⟨T, fun b hb v hv => hT v (hv.symm ▸ hb)⟩
   obtain ⟨R, hR_pos, hR_bd⟩ : ∃ R : ℝ, 0 < R ∧ ∀ x : V, R ≤ ‖x‖ → f x = 0
   exact hf2.exists_pos_le_norm
-  let A := { v : V | ‖v‖ ≤ R + 1 }
+  let A := {v : V | ‖v‖ ≤ R + 1}
   have mA : MeasurableSet A :=
     by
     suffices A = Metric.closedBall (0 : V) (R + 1) by rw [this];
@@ -265,7 +265,7 @@ theorem Real.zero_at_infty_fourierIntegral (f : ℝ → E) : Tendsto (𝓕 f) (c
 /-- Riemann-Lebesgue lemma for functions on a finite-dimensional inner-product space, formulated
 via dual space. **Do not use** -- it is only a stepping stone to
 `tendsto_integral_exp_smul_cocompact` where the inner-product-space structure isn't required. -/
-theorem tendsto_integral_exp_smul_cocompact_of_inner_product (μ : Measure V) [μ.AddHaarMeasure] :
+theorem tendsto_integral_exp_smul_cocompact_of_inner_product (μ : Measure V) [μ.IsAddHaarMeasure] :
     Tendsto (fun w : V →L[ℝ] ℝ => ∫ v, e[-w v] • f v ∂μ) (cocompact (V →L[ℝ] ℝ)) (𝓝 0) :=
   by
   obtain ⟨C, C_ne_zero, C_ne_top, hC⟩ := μ.is_add_haar_measure_eq_smul_is_add_haar_measure volume
@@ -296,7 +296,7 @@ variable (f) [AddCommGroup V] [TopologicalSpace V] [TopologicalAddGroup V] [T2Sp
 
 /-- Riemann-Lebesgue lemma for functions on a finite-dimensional real vector space, formulated via
 dual space. -/
-theorem tendsto_integral_exp_smul_cocompact (μ : Measure V) [μ.AddHaarMeasure] :
+theorem tendsto_integral_exp_smul_cocompact (μ : Measure V) [μ.IsAddHaarMeasure] :
     Tendsto (fun w : V →L[ℝ] ℝ => ∫ v, e[-w v] • f v ∂μ) (cocompact (V →L[ℝ] ℝ)) (𝓝 0) :=
   by
   -- We have already proved the result for inner-product spaces, formulated in a way which doesn't
@@ -330,8 +330,9 @@ theorem tendsto_integral_exp_smul_cocompact (μ : Measure V) [μ.AddHaarMeasure]
     { Adualₗ with
       continuous_toFun := Adualₗ.to_linear_map.continuous_of_finite_dimensional
       continuous_invFun := Adualₗ.symm.to_linear_map.continuous_of_finite_dimensional }
-  have : (μ.map Aₘ).AddHaarMeasure := measure.map_continuous_linear_equiv.is_add_haar_measure _ A
-  convert(tendsto_integral_exp_smul_cocompact_of_inner_product (f ∘ A.symm) (μ.map Aₘ)).comp
+  have : (μ.map Aₘ).IsAddHaarMeasure := measure.map_continuous_linear_equiv.is_add_haar_measure _ A
+  convert
+    (tendsto_integral_exp_smul_cocompact_of_inner_product (f ∘ A.symm) (μ.map Aₘ)).comp
       Adual.to_homeomorph.to_cocompact_map.cocompact_tendsto'
   ext1 w
   rw [Function.comp_apply, integral_map_equiv]
@@ -342,7 +343,7 @@ theorem tendsto_integral_exp_smul_cocompact (μ : Measure V) [μ.AddHaarMeasure]
 /-- The Riemann-Lebesgue lemma, formulated in terms of `vector_fourier.fourier_integral` (with the
 pairing in the definition of `fourier_integral` taken to be the canonical pairing between `V` and
 its dual space). -/
-theorem Real.zero_at_infty_vector_fourierIntegral (μ : Measure V) [μ.AddHaarMeasure] :
+theorem Real.zero_at_infty_vector_fourierIntegral (μ : Measure V) [μ.IsAddHaarMeasure] :
     Tendsto (VectorFourier.fourierIntegral e μ (topDualPairing ℝ V).flip f) (cocompact (V →L[ℝ] ℝ))
       (𝓝 0) :=
   tendsto_integral_exp_smul_cocompact f μ
Diff
@@ -110,7 +110,7 @@ theorem fourier_integral_eq_half_sub_half_period_translate {w : V} (hw : w ≠ 0
   rw [integral_sub, fourier_integral_half_period_translate hw, sub_eq_add_neg, neg_neg, ←
     two_smul ℂ _, ← @smul_assoc _ _ _ _ _ _ (IsScalarTower.left ℂ), smul_eq_mul]
   norm_num
-  exacts[(fourier_integrand_integrable w).mp hf,
+  exacts [(fourier_integrand_integrable w).mp hf,
     (fourier_integrand_integrable w).mp (hf.comp_add_right _)]
 #align fourier_integral_eq_half_sub_half_period_translate fourier_integral_eq_half_sub_half_period_translate
 
@@ -171,8 +171,8 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
   have int_A : (∫ v : V, ‖f v - f (v + i w)‖) = ∫ v in A, ‖f v - f (v + i w)‖ :=
     by
     refine' (set_integral_eq_integral_of_forall_compl_eq_zero fun v hv => _).symm
-    dsimp only [A] at hv
-    simp only [A, mem_set_of_eq, not_le] at hv
+    dsimp only [A] at hv 
+    simp only [A, mem_set_of_eq, not_le] at hv 
     rw [hR_bd v _, hR_bd (v + i w) _, sub_zero, norm_zero]
     · rw [← sub_neg_eq_add]
       refine' le_trans _ (norm_sub_norm_le _ _)
@@ -188,7 +188,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
   have bdA : ∀ v : V, v ∈ A → ‖‖f v - f (v + i w)‖‖ ≤ ε / B :=
     by
     simp_rw [norm_norm]
-    simp_rw [dist_eq_norm] at hδ2
+    simp_rw [dist_eq_norm] at hδ2 
     refine' fun x _ => (hδ2 _).le
     rw [sub_add_cancel', norm_neg, hw'_nm, ← div_div, div_lt_iff (norm_pos_iff.mpr hw_ne), ←
       div_lt_iff' hδ1, div_div]
@@ -202,15 +202,15 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
         Continuous.sub hf1 <| Continuous.comp hf1 <| continuous_id'.add continuous_const
   have : ‖_‖ = ∫ v : V in A, ‖f v - f (v + i w)‖ :=
     Real.norm_of_nonneg (set_integral_nonneg mA fun x hx => norm_nonneg _)
-  rw [this] at bdA2
+  rw [this] at bdA2 
   refine' bdA2.trans_lt _
   rw [div_mul_eq_mul_div, div_lt_iff (nnreal.coe_pos.mpr hB_pos), mul_comm (2 : ℝ), mul_assoc,
     mul_lt_mul_left hε]
-  rw [← ENNReal.toReal_le_toReal] at hB_vol
+  rw [← ENNReal.toReal_le_toReal] at hB_vol 
   · refine' hB_vol.trans_lt _
     rw [(by rfl : (↑B : ENNReal).toReal = ↑B), two_mul]
     exact lt_add_of_pos_left _ hB_pos
-  exacts[(hB_vol.trans_lt ENNReal.coe_lt_top).Ne, ennreal.coe_lt_top.ne]
+  exacts [(hB_vol.trans_lt ENNReal.coe_lt_top).Ne, ennreal.coe_lt_top.ne]
 #align tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
 
 variable (f)
@@ -234,7 +234,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact :
               hg_supp))
           _ (div_pos hε two_pos)).mp
       (eventually_of_forall fun w hI => _)
-  rw [dist_eq_norm] at 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
@@ -246,7 +246,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact :
       VectorFourier.norm_fourierIntegral_le_integral_norm e volume bilin_form_of_real_inner.to_lin
         (f - g) w
   replace := add_lt_add_of_le_of_lt this hI
-  rw [add_halves] at this
+  rw [add_halves] at this 
   refine' ((le_of_eq _).trans (norm_add_le _ _)).trans_lt this
   simp only [sub_zero, sub_add_cancel]
 #align tendsto_integral_exp_inner_smul_cocompact tendsto_integral_exp_inner_smul_cocompact
Diff
@@ -265,7 +265,7 @@ theorem Real.zero_at_infty_fourierIntegral (f : ℝ → E) : Tendsto (𝓕 f) (c
 /-- Riemann-Lebesgue lemma for functions on a finite-dimensional inner-product space, formulated
 via dual space. **Do not use** -- it is only a stepping stone to
 `tendsto_integral_exp_smul_cocompact` where the inner-product-space structure isn't required. -/
-theorem tendsto_integral_exp_smul_cocompact_of_inner_product (μ : Measure V) [μ.IsAddHaarMeasure] :
+theorem tendsto_integral_exp_smul_cocompact_of_inner_product (μ : Measure V) [μ.AddHaarMeasure] :
     Tendsto (fun w : V →L[ℝ] ℝ => ∫ v, e[-w v] • f v ∂μ) (cocompact (V →L[ℝ] ℝ)) (𝓝 0) :=
   by
   obtain ⟨C, C_ne_zero, C_ne_top, hC⟩ := μ.is_add_haar_measure_eq_smul_is_add_haar_measure volume
@@ -296,7 +296,7 @@ variable (f) [AddCommGroup V] [TopologicalSpace V] [TopologicalAddGroup V] [T2Sp
 
 /-- Riemann-Lebesgue lemma for functions on a finite-dimensional real vector space, formulated via
 dual space. -/
-theorem tendsto_integral_exp_smul_cocompact (μ : Measure V) [μ.IsAddHaarMeasure] :
+theorem tendsto_integral_exp_smul_cocompact (μ : Measure V) [μ.AddHaarMeasure] :
     Tendsto (fun w : V →L[ℝ] ℝ => ∫ v, e[-w v] • f v ∂μ) (cocompact (V →L[ℝ] ℝ)) (𝓝 0) :=
   by
   -- We have already proved the result for inner-product spaces, formulated in a way which doesn't
@@ -319,16 +319,18 @@ theorem tendsto_integral_exp_smul_cocompact (μ : Measure V) [μ.IsAddHaarMeasur
         simp only [RingHom.id_apply, ContinuousLinearMap.coe_comp', Function.comp_apply,
           ContinuousLinearMap.smul_apply]
       left_inv := by intro w; ext1 v;
-        simp only [[anonymous], ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe,
-          Function.comp_apply, ContinuousLinearEquiv.symm_apply_apply]
+        simp only [ContinuousLinearEquiv.coe_def_rev, ContinuousLinearMap.coe_comp',
+          ContinuousLinearEquiv.coe_coe, Function.comp_apply,
+          ContinuousLinearEquiv.symm_apply_apply]
       right_inv := by intro w; ext1 v;
-        simp only [[anonymous], ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe,
-          Function.comp_apply, ContinuousLinearEquiv.apply_symm_apply] }
+        simp only [ContinuousLinearEquiv.coe_def_rev, ContinuousLinearMap.coe_comp',
+          ContinuousLinearEquiv.coe_coe, Function.comp_apply,
+          ContinuousLinearEquiv.apply_symm_apply] }
   let Adual : (V →L[ℝ] ℝ) ≃L[ℝ] V' →L[ℝ] ℝ :=
     { Adualₗ with
       continuous_toFun := Adualₗ.to_linear_map.continuous_of_finite_dimensional
       continuous_invFun := Adualₗ.symm.to_linear_map.continuous_of_finite_dimensional }
-  have : (μ.map Aₘ).IsAddHaarMeasure := measure.map_continuous_linear_equiv.is_add_haar_measure _ A
+  have : (μ.map Aₘ).AddHaarMeasure := measure.map_continuous_linear_equiv.is_add_haar_measure _ A
   convert(tendsto_integral_exp_smul_cocompact_of_inner_product (f ∘ A.symm) (μ.map Aₘ)).comp
       Adual.to_homeomorph.to_cocompact_map.cocompact_tendsto'
   ext1 w
@@ -340,7 +342,7 @@ theorem tendsto_integral_exp_smul_cocompact (μ : Measure V) [μ.IsAddHaarMeasur
 /-- The Riemann-Lebesgue lemma, formulated in terms of `vector_fourier.fourier_integral` (with the
 pairing in the definition of `fourier_integral` taken to be the canonical pairing between `V` and
 its dual space). -/
-theorem Real.zero_at_infty_vector_fourierIntegral (μ : Measure V) [μ.IsAddHaarMeasure] :
+theorem Real.zero_at_infty_vector_fourierIntegral (μ : Measure V) [μ.AddHaarMeasure] :
     Tendsto (VectorFourier.fourierIntegral e μ (topDualPairing ℝ V).flip f) (cocompact (V →L[ℝ] ℝ))
       (𝓝 0) :=
   tendsto_integral_exp_smul_cocompact f μ
Diff
@@ -52,7 +52,7 @@ noncomputable section
 
 open MeasureTheory Filter Complex Set FiniteDimensional
 
-open Filter Topology Real ENNReal FourierTransform RealInnerProductSpace NNReal
+open scoped Filter Topology Real ENNReal FourierTransform RealInnerProductSpace NNReal
 
 variable {E V : Type _} [NormedAddCommGroup E] [NormedSpace ℂ E] {f : V → E}
 
Diff
@@ -95,9 +95,7 @@ theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
     ext1 v
     simp_rw [inner_add_left, hiw, Real.fourierChar_apply, neg_add, mul_add, of_real_add, add_mul,
       exp_add]
-    have : 2 * π * -(1 / 2) = -π := by
-      field_simp
-      ring
+    have : 2 * π * -(1 / 2) = -π := by field_simp; ring
     rw [this, of_real_neg, neg_mul, exp_neg, exp_pi_mul_I, inv_neg, inv_one, mul_neg_one, neg_neg]
   rw [this, integral_add_right_eq_self]
   simp only [neg_smul, integral_neg]
@@ -137,9 +135,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
   let A := { v : V | ‖v‖ ≤ R + 1 }
   have mA : MeasurableSet A :=
     by
-    suffices A = Metric.closedBall (0 : V) (R + 1)
-      by
-      rw [this]
+    suffices A = Metric.closedBall (0 : V) (R + 1) by rw [this];
       exact metric.is_closed_ball.measurable_set
     simp_rw [A, Metric.closedBall, dist_eq_norm, sub_zero]
   obtain ⟨B, hB_pos, hB_vol⟩ : ∃ B : ℝ≥0, 0 < B ∧ volume A ≤ B :=
@@ -157,8 +153,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
       (div_pos hε hB_pos)
   refine' ⟨1 / 2 + 1 / (2 * δ), fun w hw_bd => _⟩
   have hw_ne : w ≠ 0 := by
-    contrapose! hw_bd
-    rw [hw_bd, norm_zero]
+    contrapose! hw_bd; rw [hw_bd, norm_zero]
     exact add_pos one_half_pos (one_div_pos.mpr <| mul_pos two_pos hδ1)
   have hw'_nm : ‖i w‖ = 1 / (2 * ‖w‖) := by
     rw [norm_smul, norm_div, Real.norm_of_nonneg (mul_nonneg two_pos.le <| sq_nonneg _), norm_one,
@@ -168,9 +163,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
       (hf1.integrable_of_has_compact_support hf2),
     norm_smul, norm_eq_abs, ← Complex.ofReal_one, ← of_real_bit0, ← of_real_div,
     Complex.abs_of_nonneg one_half_pos.le]
-  have : ε = 1 / 2 * (2 * ε) := by
-    field_simp
-    rw [mul_comm]
+  have : ε = 1 / 2 * (2 * ε) := by field_simp; rw [mul_comm]
   rw [this, mul_lt_mul_left (one_half_pos : (0 : ℝ) < 1 / 2)]
   refine' lt_of_le_of_lt (norm_integral_le_integral_norm _) _
   simp_rw [norm_smul, norm_eq_abs, abs_coe_circle, one_mul]
@@ -190,8 +183,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
       refine' le_trans (le_add_of_nonneg_right <| one_div_nonneg.mpr <| _) hw_bd
       exact (mul_pos (zero_lt_two' ℝ) hδ1).le
     · exact ((le_add_iff_nonneg_right _).mpr zero_le_one).trans hv.le
-  rw [int_A]
-  clear int_A
+  rw [int_A]; clear int_A
   --* Bound integral using fact that `‖f v - f (v + w')‖` is small.
   have bdA : ∀ v : V, v ∈ A → ‖‖f v - f (v + i w)‖‖ ≤ ε / B :=
     by
@@ -203,7 +195,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
     refine' (lt_add_of_pos_left _ _).trans_le hw_bd
     exact one_half_pos
   have bdA2 := norm_set_integral_le_of_norm_le_const (hB_vol.trans_lt ENNReal.coe_lt_top) bdA _
-  swap
+  swap;
   · apply Continuous.aestronglyMeasurable
     exact
       continuous_norm.comp <|
@@ -228,8 +220,7 @@ variable (f)
 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
+  by_cases hfi : integrable f; swap
   · convert tendsto_const_nhds
     ext1 w
     apply integral_undef
@@ -321,24 +312,16 @@ theorem tendsto_integral_exp_smul_cocompact (μ : Measure V) [μ.IsAddHaarMeasur
   let Adualₗ : (V →L[ℝ] ℝ) ≃ₗ[ℝ] V' →L[ℝ] ℝ :=
     { toFun := fun t => t.comp A.symm.to_continuous_linear_map
       invFun := fun t => t.comp A.to_continuous_linear_map
-      map_add' := by
-        intro t s
-        ext1 v
+      map_add' := by intro t s; ext1 v;
         simp only [ContinuousLinearMap.coe_comp', Function.comp_apply,
           ContinuousLinearMap.add_apply]
-      map_smul' := by
-        intro x f
-        ext1 v
+      map_smul' := by intro x f; ext1 v;
         simp only [RingHom.id_apply, ContinuousLinearMap.coe_comp', Function.comp_apply,
           ContinuousLinearMap.smul_apply]
-      left_inv := by
-        intro w
-        ext1 v
+      left_inv := by intro w; ext1 v;
         simp only [[anonymous], ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe,
           Function.comp_apply, ContinuousLinearEquiv.symm_apply_apply]
-      right_inv := by
-        intro w
-        ext1 v
+      right_inv := by intro w; ext1 v;
         simp only [[anonymous], ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe,
           Function.comp_apply, ContinuousLinearEquiv.apply_symm_apply] }
   let Adual : (V →L[ℝ] ℝ) ≃L[ℝ] V' →L[ℝ] ℝ :=
Diff
@@ -204,7 +204,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
     exact one_half_pos
   have bdA2 := norm_set_integral_le_of_norm_le_const (hB_vol.trans_lt ENNReal.coe_lt_top) bdA _
   swap
-  · apply Continuous.aeStronglyMeasurable
+  · apply Continuous.aestronglyMeasurable
     exact
       continuous_norm.comp <|
         Continuous.sub hf1 <| Continuous.comp hf1 <| continuous_id'.add continuous_const
Diff
@@ -4,16 +4,18 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: David Loeffler
 
 ! This file was ported from Lean 3 source module analysis.fourier.riemann_lebesgue_lemma
-! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
+! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
-import Mathbin.MeasureTheory.Function.ContinuousMapDense
-import Mathbin.MeasureTheory.Group.Integration
 import Mathbin.Analysis.Fourier.FourierTransform
 import Mathbin.Analysis.InnerProductSpace.Dual
-import Mathbin.Topology.MetricSpace.EmetricParacompact
 import Mathbin.Analysis.InnerProductSpace.EuclideanDist
+import Mathbin.MeasureTheory.Function.ContinuousMapDense
+import Mathbin.MeasureTheory.Group.Integration
+import Mathbin.MeasureTheory.Integral.SetIntegral
+import Mathbin.MeasureTheory.Measure.Haar.NormedSpace
+import Mathbin.Topology.MetricSpace.EmetricParacompact
 
 /-!
 # The Riemann-Lebesgue Lemma
Diff
@@ -83,7 +83,7 @@ theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
   by
   have hiw : ⟪i w, w⟫ = 1 / 2 :=
     by
-    rw [inner_smul_left, inner_self_eq_norm_sq_to_K, IsROrC.coe_real_eq_id, id.def,
+    rw [inner_smul_left, inner_self_eq_norm_sq_to_K, IsROrC.ofReal_real_eq_id, id.def,
       IsROrC.conj_to_real, ← div_div, div_mul_cancel]
     rwa [Ne.def, sq_eq_zero_iff, norm_eq_zero]
   have :
Diff
@@ -4,14 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: David Loeffler
 
 ! This file was ported from Lean 3 source module analysis.fourier.riemann_lebesgue_lemma
-! leanprover-community/mathlib commit 9425b6f8220e53b059f5a4904786c3c4b50fc057
+! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
 import Mathbin.MeasureTheory.Function.ContinuousMapDense
-import Mathbin.MeasureTheory.Integral.IntegralEqImproper
 import Mathbin.MeasureTheory.Group.Integration
-import Mathbin.Topology.ContinuousFunction.ZeroAtInfty
 import Mathbin.Analysis.Fourier.FourierTransform
 import Mathbin.Analysis.InnerProductSpace.Dual
 import Mathbin.Topology.MetricSpace.EmetricParacompact
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: David Loeffler
 
 ! This file was ported from Lean 3 source module analysis.fourier.riemann_lebesgue_lemma
-! leanprover-community/mathlib commit 3353f3371120058977ce1e20bf7fc8986c0fb042
+! leanprover-community/mathlib commit 9425b6f8220e53b059f5a4904786c3c4b50fc057
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -13,196 +13,355 @@ import Mathbin.MeasureTheory.Integral.IntegralEqImproper
 import Mathbin.MeasureTheory.Group.Integration
 import Mathbin.Topology.ContinuousFunction.ZeroAtInfty
 import Mathbin.Analysis.Fourier.FourierTransform
+import Mathbin.Analysis.InnerProductSpace.Dual
+import Mathbin.Topology.MetricSpace.EmetricParacompact
+import Mathbin.Analysis.InnerProductSpace.EuclideanDist
 
 /-!
 # The Riemann-Lebesgue Lemma
 
-In this file we prove a weak form of the Riemann-Lebesgue lemma, stating that for any
-compactly-supported continuous function `f` on `ℝ` (valued in some complete normed space `E`), the
-integral
+In this file we prove the Riemann-Lebesgue lemma, for functions on finite-dimensional real vector
+spaces `V`: if `f` is a function on `V` (valued in a complete normed space `E`), then the
+Fourier transform of `f`, viewed as a function on the dual space of `V`, tends to 0 along the
+cocompact filter. Here the Fourier transform is defined by
 
-`∫ (x : ℝ), exp (↑(t * x) * I) • f x`
+`λ w : V →L[ℝ] ℝ, ∫ (v : V), exp (↑(2 * π * w v) * I) • f x`.
 
-tends to zero as `t → ∞`. (The actual lemma is that this holds for all `L¹` functions `f`, which
-follows from the result proved here together with the fact that continuous, compactly-supported
-functions are dense in `L¹(ℝ)`, which will be proved in a future iteration.)
+This is true for arbitrary functions, but is only interesting for `L¹` functions (if `f` is not
+integrable then the integral is zero for all `w`). This is proved first for continuous
+compactly-supported functions on inner-product spaces; then we pass to arbitrary functions using the
+density of continuous compactly-supported functions in `L¹` space. Finally we generalise from
+inner-product spaces to arbitrary finite-dimensional spaces, by choosing a continuous linear
+equivalence to an inner-product space.
 
 ## Main results
 
-- `tendsto_integral_mul_exp_at_top_of_continuous_compact_support`: the Riemann-Lebesgue lemma for
-  continuous compactly-supported functions on `ℝ`.
+- `tendsto_integral_exp_inner_smul_cocompact` : for `V` a finite-dimensional real inner product
+  space and `f : V → E`, the function `λ w : V, ∫ v : V, exp (2 * π * ⟪w, v⟫ * I) • f v` tends to 0
+  along `cocompact V`.
+- `tendsto_integral_exp_smul_cocompact` : for `V` a finite-dimensional real vector space (endowed
+  with its unique Hausdorff topological vector space structure), and `W` the dual of `V`, the
+  function `λ w : W, ∫ v : V, exp (2 * π * w v * I) • f v` tends to along `cocompact W`.
+- `real.tendsto_integral_exp_smul_cocompact`: special case of functions on `ℝ`.
+- `real.zero_at_infty_fourier_integral` and `real.zero_at_infty_vector_fourier_integral`:
+  reformulations explicitly using the Fourier integral.
 -/
 
 
-open MeasureTheory Filter Complex Set
+noncomputable section
 
-open Filter Topology Real ENNReal
+open MeasureTheory Filter Complex Set FiniteDimensional
 
-section ContinuousCompactSupport
+open Filter Topology Real ENNReal FourierTransform RealInnerProductSpace NNReal
 
-variable {E : Type _} [NormedAddCommGroup E] [NormedSpace ℂ E] {f : ℝ → E}
+variable {E V : Type _} [NormedAddCommGroup E] [NormedSpace ℂ E] {f : V → E}
 
-/-- The integrand in the Riemann-Lebesgue lemma is integrable. -/
-theorem fourierIntegrandIntegrable (hf : Integrable f) (t : ℝ) :
-    Integrable fun x : ℝ => exp (↑(t * x) * I) • f x :=
+-- mathport name: expre
+local notation "e" => Real.fourierChar
+
+section InnerProductSpace
+
+variable [NormedAddCommGroup V] [MeasurableSpace V] [BorelSpace V] [InnerProductSpace ℝ V]
+  [FiniteDimensional ℝ V]
+
+/-- The integrand in the Riemann-Lebesgue lemma for `f` is integrable iff `f` is. -/
+theorem fourier_integrand_integrable (w : V) :
+    Integrable f ↔ Integrable fun v : V => e[-⟪v, w⟫] • f v :=
   by
-  rw [← integrable_norm_iff]
-  simp_rw [norm_smul, norm_exp_of_real_mul_I, one_mul]
-  exacts[hf.norm, (Continuous.aeStronglyMeasurable (by continuity)).smul hf.1]
-#align fourier_integrand_integrable fourierIntegrandIntegrable
+  have hL : Continuous fun p : V × V => bilin_form_of_real_inner.to_lin p.1 p.2 := continuous_inner
+  rw [VectorFourier.fourier_integral_convergent_iff Real.continuous_fourierChar hL w]
+  · simp only [BilinForm.toLin_apply, bilinFormOfRealInner_apply]
+  · infer_instance
+#align fourier_integrand_integrable fourier_integrand_integrable
 
 variable [CompleteSpace E]
 
-/-- Shifting `f` by `π / t` negates the integral in the Riemann-Lebesgue lemma. -/
-theorem fourier_integral_half_period_translate {t : ℝ} (ht : t ≠ 0) :
-    (∫ x : ℝ, exp (↑(t * x) * I) • f (x + π / t)) = -∫ x : ℝ, exp (↑(t * x) * I) • f x :=
+-- mathport name: expri
+local notation "i" => fun w => (1 / (2 * ‖w‖ ^ 2)) • w
+
+/-- Shifting `f` by `(1 / (2 * ‖w‖ ^ 2)) • w` negates the integral in the Riemann-Lebesgue lemma. -/
+theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
+    (∫ v : V, e[-⟪v, w⟫] • f (v + i w)) = -∫ v : V, e[-⟪v, w⟫] • f v :=
   by
+  have hiw : ⟪i w, w⟫ = 1 / 2 :=
+    by
+    rw [inner_smul_left, inner_self_eq_norm_sq_to_K, IsROrC.coe_real_eq_id, id.def,
+      IsROrC.conj_to_real, ← div_div, div_mul_cancel]
+    rwa [Ne.def, sq_eq_zero_iff, norm_eq_zero]
   have :
-    (fun x : ℝ => exp (↑(t * x) * I) • f (x + π / t)) = fun x : ℝ =>
-      (fun y : ℝ => -exp (↑(t * y) * I) • f y) (x + π / t) :=
+    (fun v : V => e[-⟪v, w⟫] • f (v + i w)) = fun v : V =>
+      (fun x : V => -e[-⟪x, w⟫] • f x) (v + i w) :=
     by
-    ext1 x
-    dsimp only
-    rw [of_real_mul, of_real_mul, of_real_add, mul_add, add_mul, exp_add, ← neg_mul]
-    replace ht := complex.of_real_ne_zero.mpr ht
-    have : ↑t * ↑(π / t) * I = π * I := by
+    ext1 v
+    simp_rw [inner_add_left, hiw, Real.fourierChar_apply, neg_add, mul_add, of_real_add, add_mul,
+      exp_add]
+    have : 2 * π * -(1 / 2) = -π := by
       field_simp
       ring
-    rw [this, exp_pi_mul_I]
-    ring_nf
+    rw [this, of_real_neg, neg_mul, exp_neg, exp_pi_mul_I, inv_neg, inv_one, mul_neg_one, neg_neg]
   rw [this, integral_add_right_eq_self]
-  simp_rw [neg_smul, integral_neg]
+  simp only [neg_smul, integral_neg]
 #align fourier_integral_half_period_translate fourier_integral_half_period_translate
 
-/-- Rewrite the Riemann-Lebesgue integral in a form that allows us to use uniform continuity. -/
-theorem fourier_integral_eq_half_sub_half_period_translate {t : ℝ} (ht : t ≠ 0)
+/-- Rewrite the Fourier integral in a form that allows us to use uniform continuity. -/
+theorem fourier_integral_eq_half_sub_half_period_translate {w : V} (hw : w ≠ 0)
     (hf : Integrable f) :
-    (∫ x : ℝ, exp (↑(t * x) * I) • f x) =
-      (1 / (2 : ℂ)) • ∫ x : ℝ, exp (↑(t * x) * I) • (f x - f (x + π / t)) :=
+    (∫ v : V, e[-⟪v, w⟫] • f v) = (1 / (2 : ℂ)) • ∫ v : V, e[-⟪v, w⟫] • (f v - f (v + i w)) :=
   by
   simp_rw [smul_sub]
-  rw [integral_sub, fourier_integral_half_period_translate ht, sub_eq_add_neg, neg_neg, ←
+  rw [integral_sub, fourier_integral_half_period_translate hw, sub_eq_add_neg, neg_neg, ←
     two_smul ℂ _, ← @smul_assoc _ _ _ _ _ _ (IsScalarTower.left ℂ), smul_eq_mul]
   norm_num
-  exacts[fourierIntegrandIntegrable hf t, fourierIntegrandIntegrable (hf.comp_add_right (π / t)) t]
+  exacts[(fourier_integrand_integrable w).mp hf,
+    (fourier_integrand_integrable w).mp (hf.comp_add_right _)]
 #align fourier_integral_eq_half_sub_half_period_translate fourier_integral_eq_half_sub_half_period_translate
 
 /-- Riemann-Lebesgue Lemma for continuous and compactly-supported functions: the integral
-`∫ x, exp (t * x * I) • f x` tends to 0 as `t` gets large.  -/
-theorem tendsto_integral_mul_exp_atTop_of_continuous_compact_support (hf1 : Continuous f)
+`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 wrt `cocompact V`. Note that this is primarily
+of interest as a preparatory step for the more general result
+`tendsto_integral_exp_inner_smul_cocompact` in which `f` can be arbitrary. -/
+theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support (hf1 : Continuous f)
     (hf2 : HasCompactSupport f) :
-    Tendsto (fun t : ℝ => ∫ x : ℝ, exp (↑(t * x) * I) • f x) atTop (𝓝 0) :=
+    Tendsto (fun w : V => ∫ v : V, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) :=
   by
-  simp_rw [NormedAddCommGroup.tendsto_nhds_zero, eventually_at_top, ge_iff_le]
-  intro ε hε
-  -- Extract an explicit candidate bound on `t` from uniform continuity.
-  obtain ⟨R, hR1, hR2⟩ := hf2.exists_pos_le_norm
+  refine' normed_add_comm_group.tendsto_nhds_zero.mpr fun ε hε => _
+  suffices ∃ T : ℝ, ∀ w : V, T ≤ ‖w‖ → ‖∫ v : V, e[-⟪v, w⟫] • f v‖ < ε
+    by
+    simp_rw [← comap_dist_left_atTop_eq_cocompact (0 : V), eventually_comap, eventually_at_top,
+      dist_eq_norm', sub_zero]
+    exact
+      let ⟨T, hT⟩ := this
+      ⟨T, fun b hb v hv => hT v (hv.symm ▸ hb)⟩
+  obtain ⟨R, hR_pos, hR_bd⟩ : ∃ R : ℝ, 0 < R ∧ ∀ x : V, R ≤ ‖x‖ → f x = 0
+  exact hf2.exists_pos_le_norm
+  let A := { v : V | ‖v‖ ≤ R + 1 }
+  have mA : MeasurableSet A :=
+    by
+    suffices A = Metric.closedBall (0 : V) (R + 1)
+      by
+      rw [this]
+      exact metric.is_closed_ball.measurable_set
+    simp_rw [A, Metric.closedBall, dist_eq_norm, sub_zero]
+  obtain ⟨B, hB_pos, hB_vol⟩ : ∃ B : ℝ≥0, 0 < B ∧ volume A ≤ B :=
+    by
+    have hc : IsCompact A := by
+      simpa only [Metric.closedBall, dist_eq_norm, sub_zero] using is_compact_closed_ball (0 : V) _
+    let B₀ := volume A
+    replace hc : B₀ < ⊤ := hc.measure_lt_top
+    refine' ⟨B₀.to_nnreal + 1, add_pos_of_nonneg_of_pos B₀.to_nnreal.coe_nonneg one_pos, _⟩
+    rw [ENNReal.coe_add, ENNReal.coe_one, ENNReal.coe_toNNReal hc.ne]
+    exact le_self_add
+  --* Use uniform continuity to choose δ such that `‖x - y‖ < δ` implies `‖f x - f y‖ < ε / B`.
   obtain ⟨δ, hδ1, hδ2⟩ :=
-    metric.uniform_continuous_iff.mp (hf2.uniform_continuous_of_continuous hf1) (ε / (1 + 2 * R))
-      (div_pos hε (by positivity))
-  refine' ⟨max π (1 + π / δ), fun t ht => _⟩
-  have tpos : 0 < t := lt_of_lt_of_le Real.pi_pos ((le_max_left _ _).trans ht)
-  -- Rewrite integral in terms of `f x - f (x + π / t)`.
-  rw [fourier_integral_eq_half_sub_half_period_translate
-      (lt_of_lt_of_le (lt_max_of_lt_left Real.pi_pos) ht).ne'
-      (hf1.integrable_of_has_compact_support hf2)]
-  rw [norm_smul, norm_eq_abs, ← Complex.ofReal_one, ← of_real_bit0, ← of_real_div,
+    metric.uniform_continuous_iff.mp (hf2.uniform_continuous_of_continuous hf1) (ε / B)
+      (div_pos hε hB_pos)
+  refine' ⟨1 / 2 + 1 / (2 * δ), fun w hw_bd => _⟩
+  have hw_ne : w ≠ 0 := by
+    contrapose! hw_bd
+    rw [hw_bd, norm_zero]
+    exact add_pos one_half_pos (one_div_pos.mpr <| mul_pos two_pos hδ1)
+  have hw'_nm : ‖i w‖ = 1 / (2 * ‖w‖) := by
+    rw [norm_smul, norm_div, Real.norm_of_nonneg (mul_nonneg two_pos.le <| sq_nonneg _), norm_one,
+      sq, ← div_div, ← div_div, ← div_div, div_mul_cancel _ (norm_eq_zero.not.mpr hw_ne)]
+  --* Rewrite integral in terms of `f v - f (v + w')`.
+  rw [fourier_integral_eq_half_sub_half_period_translate hw_ne
+      (hf1.integrable_of_has_compact_support hf2),
+    norm_smul, norm_eq_abs, ← Complex.ofReal_one, ← of_real_bit0, ← of_real_div,
     Complex.abs_of_nonneg one_half_pos.le]
   have : ε = 1 / 2 * (2 * ε) := by
     field_simp
-    ring
+    rw [mul_comm]
   rw [this, mul_lt_mul_left (one_half_pos : (0 : ℝ) < 1 / 2)]
-  have :
-    ‖∫ x : ℝ, exp (↑(t * x) * I) • (f x - f (x + π / t))‖ ≤
-      ∫ x : ℝ, ‖exp (↑(t * x) * I) • (f x - f (x + π / t))‖ :=
-    norm_integral_le_integral_norm _
-  refine' lt_of_le_of_lt this _
-  simp_rw [norm_smul, norm_exp_of_real_mul_I, one_mul]
-  -- Show integral can be taken over `[-(R + 1), R] ⊂ ℝ`.
-  let A := Icc (-(R + 1)) R
-  have int_Icc : (∫ x : ℝ, ‖f x - f (x + π / t)‖) = ∫ x in A, ‖f x - f (x + π / t)‖ :=
+  refine' lt_of_le_of_lt (norm_integral_le_integral_norm _) _
+  simp_rw [norm_smul, norm_eq_abs, abs_coe_circle, one_mul]
+  --* Show integral can be taken over A only.
+  have int_A : (∫ v : V, ‖f v - f (v + i w)‖) = ∫ v in A, ‖f v - f (v + i w)‖ :=
     by
-    refine' (set_integral_eq_integral_of_forall_compl_eq_zero fun x hx => _).symm
-    rw [mem_Icc, not_and_or, not_le, not_le, lt_neg] at hx
-    suffices f x = 0 ∧ f (x + π / t) = 0 by rw [this.1, this.2, sub_zero, norm_zero]
-    have tp : 0 < t := real.pi_pos.trans_le ((le_max_left _ _).trans ht)
-    refine' ⟨hR2 x <| le_abs.mpr _, hR2 _ <| le_abs.mpr _⟩
-    · cases hx
-      · exact Or.inr ((le_add_of_nonneg_right zero_le_one).trans hx.le)
-      · exact Or.inl hx.le
-    · cases hx
-      · refine' Or.inr _
-        rw [neg_add, ← sub_eq_add_neg, le_sub_iff_add_le]
-        refine' le_trans (add_le_add_left _ R) hx.le
-        exact (div_le_one tp).mpr ((le_max_left _ _).trans ht)
-      · exact Or.inl (hx.trans <| lt_add_of_pos_right _ <| div_pos Real.pi_pos tp).le
-  rw [int_Icc]
-  -- Bound integral using fact that ‖f x - f (x + π / t)‖ is small.
-  have bdA : ∀ x : ℝ, x ∈ A → ‖‖f x - f (x + π / t)‖‖ ≤ ε / (1 + 2 * R) :=
+    refine' (set_integral_eq_integral_of_forall_compl_eq_zero fun v hv => _).symm
+    dsimp only [A] at hv
+    simp only [A, mem_set_of_eq, not_le] at hv
+    rw [hR_bd v _, hR_bd (v + i w) _, sub_zero, norm_zero]
+    · rw [← sub_neg_eq_add]
+      refine' le_trans _ (norm_sub_norm_le _ _)
+      rw [le_sub_iff_add_le, norm_neg]
+      refine' le_trans _ hv.le
+      rw [add_le_add_iff_left, hw'_nm, ← div_div]
+      refine' (div_le_one <| norm_pos_iff.mpr hw_ne).mpr _
+      refine' le_trans (le_add_of_nonneg_right <| one_div_nonneg.mpr <| _) hw_bd
+      exact (mul_pos (zero_lt_two' ℝ) hδ1).le
+    · exact ((le_add_iff_nonneg_right _).mpr zero_le_one).trans hv.le
+  rw [int_A]
+  clear int_A
+  --* Bound integral using fact that `‖f v - f (v + w')‖` is small.
+  have bdA : ∀ v : V, v ∈ A → ‖‖f v - f (v + i w)‖‖ ≤ ε / B :=
     by
     simp_rw [norm_norm]
-    refine' fun x _ => le_of_lt _
     simp_rw [dist_eq_norm] at hδ2
-    apply hδ2
-    rw [sub_add_cancel', Real.norm_eq_abs, abs_neg, abs_of_pos (div_pos Real.pi_pos tpos),
-      div_lt_iff tpos, mul_comm, ← div_lt_iff hδ1]
-    linarith [(le_max_right π (1 + π / δ)).trans ht]
-  have bdA2 := norm_set_integral_le_of_norm_le_const (measure_Icc_lt_top : volume A < ∞) bdA _
+    refine' fun x _ => (hδ2 _).le
+    rw [sub_add_cancel', norm_neg, hw'_nm, ← div_div, div_lt_iff (norm_pos_iff.mpr hw_ne), ←
+      div_lt_iff' hδ1, div_div]
+    refine' (lt_add_of_pos_left _ _).trans_le hw_bd
+    exact one_half_pos
+  have bdA2 := norm_set_integral_le_of_norm_le_const (hB_vol.trans_lt ENNReal.coe_lt_top) bdA _
   swap
   · apply Continuous.aeStronglyMeasurable
     exact
       continuous_norm.comp <|
         Continuous.sub hf1 <| Continuous.comp hf1 <| continuous_id'.add continuous_const
-  have : ‖_‖ = ∫ x : ℝ in A, ‖f x - f (x + π / t)‖ :=
-    Real.norm_of_nonneg (set_integral_nonneg measurableSet_Icc fun x hx => norm_nonneg _)
+  have : ‖_‖ = ∫ v : V in A, ‖f v - f (v + i w)‖ :=
+    Real.norm_of_nonneg (set_integral_nonneg mA fun x hx => norm_nonneg _)
   rw [this] at bdA2
-  refine' lt_of_le_of_lt bdA2 _
-  rw [Real.volume_Icc, (by ring : R - -(R + 1) = 1 + 2 * R)]
-  have hh : 0 < 1 + 2 * R := by positivity
-  rw [ENNReal.toReal_ofReal hh.le, div_mul_cancel _ hh.ne', two_mul]
-  exact lt_add_of_pos_left _ hε
-#align tendsto_integral_mul_exp_at_top_of_continuous_compact_support tendsto_integral_mul_exp_atTop_of_continuous_compact_support
-
-theorem tendsto_integral_mul_exp_atBot_of_continuous_compact_support (hf1 : Continuous f)
-    (hf2 : HasCompactSupport f) :
-    Tendsto (fun t : ℝ => ∫ x : ℝ, exp (↑(t * x) * I) • f x) atBot (𝓝 0) :=
+  refine' bdA2.trans_lt _
+  rw [div_mul_eq_mul_div, div_lt_iff (nnreal.coe_pos.mpr hB_pos), mul_comm (2 : ℝ), mul_assoc,
+    mul_lt_mul_left hε]
+  rw [← ENNReal.toReal_le_toReal] at hB_vol
+  · refine' hB_vol.trans_lt _
+    rw [(by rfl : (↑B : ENNReal).toReal = ↑B), two_mul]
+    exact lt_add_of_pos_left _ hB_pos
+  exacts[(hB_vol.trans_lt ENNReal.coe_lt_top).Ne, ennreal.coe_lt_top.ne]
+#align tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
+
+variable (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
-  have hg2 : HasCompactSupport (f ∘ Neg.neg) := by
-    simpa only [neg_one_smul] using hf2.comp_smul (neg_ne_zero.mpr <| one_ne_zero' ℝ)
-  convert(tendsto_integral_mul_exp_atTop_of_continuous_compact_support (hf1.comp continuous_neg)
-          hg2).comp
-      tendsto_neg_at_bot_at_top
-  ext1 t
-  simp_rw [Function.comp_apply, neg_mul, ← mul_neg]
-  rw [← integral_neg_eq_self]
-#align tendsto_integral_mul_exp_at_bot_of_continuous_compact_support tendsto_integral_mul_exp_atBot_of_continuous_compact_support
-
-theorem zero_at_infty_integral_mul_exp_of_continuous_compact_support (hf1 : Continuous f)
-    (hf2 : HasCompactSupport f) :
-    Tendsto (fun t : ℝ => ∫ x : ℝ, exp (↑(t * x) * I) • f x) (cocompact ℝ) (𝓝 0) :=
+  by_cases hfi : integrable f
+  swap
+  · convert tendsto_const_nhds
+    ext1 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_has_compact_support_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_has_compact_support hg_supp)),
+      ← smul_sub, ← Pi.sub_apply]
+    exact
+      VectorFourier.norm_fourierIntegral_le_integral_norm e volume bilin_form_of_real_inner.to_lin
+        (f - g) w
+  replace := add_lt_add_of_le_of_lt this hI
+  rw [add_halves] at this
+  refine' ((le_of_eq _).trans (norm_add_le _ _)).trans_lt this
+  simp only [sub_zero, sub_add_cancel]
+#align tendsto_integral_exp_inner_smul_cocompact tendsto_integral_exp_inner_smul_cocompact
+
+/-- The Riemann-Lebesgue lemma for functions on `ℝ`. -/
+theorem Real.tendsto_integral_exp_smul_cocompact (f : ℝ → E) :
+    Tendsto (fun w : ℝ => ∫ v : ℝ, e[-(v * w)] • f v) (cocompact ℝ) (𝓝 0) :=
+  tendsto_integral_exp_inner_smul_cocompact f
+#align real.tendsto_integral_exp_smul_cocompact Real.tendsto_integral_exp_smul_cocompact
+
+/-- The Riemann-Lebesgue lemma for functions on `ℝ`, formulated via `real.fourier_integral`. -/
+theorem Real.zero_at_infty_fourierIntegral (f : ℝ → E) : Tendsto (𝓕 f) (cocompact ℝ) (𝓝 0) :=
+  tendsto_integral_exp_inner_smul_cocompact f
+#align real.zero_at_infty_fourier_integral Real.zero_at_infty_fourierIntegral
+
+/-- Riemann-Lebesgue lemma for functions on a finite-dimensional inner-product space, formulated
+via dual space. **Do not use** -- it is only a stepping stone to
+`tendsto_integral_exp_smul_cocompact` where the inner-product-space structure isn't required. -/
+theorem tendsto_integral_exp_smul_cocompact_of_inner_product (μ : Measure V) [μ.IsAddHaarMeasure] :
+    Tendsto (fun w : V →L[ℝ] ℝ => ∫ v, e[-w v] • f v ∂μ) (cocompact (V →L[ℝ] ℝ)) (𝓝 0) :=
   by
-  rw [Real.cocompact_eq, tendsto_sup]
+  obtain ⟨C, C_ne_zero, C_ne_top, hC⟩ := μ.is_add_haar_measure_eq_smul_is_add_haar_measure volume
+  rw [hC]
+  simp_rw [integral_smul_measure]
+  rw [← (smul_zero _ : C.to_real • (0 : E) = 0)]
+  apply tendsto.const_smul
+  let A := (InnerProductSpace.toDual ℝ V).symm
+  have : (fun w : V →L[ℝ] ℝ => ∫ v, e[-w v] • f v) = (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) ∘ A :=
+    by
+    ext1 w
+    congr 1 with v : 1
+    rw [← inner_conj_symm, IsROrC.conj_to_real, InnerProductSpace.toDual_symm_apply,
+      Real.fourierChar_apply]
+  rw [this]
   exact
-    ⟨tendsto_integral_mul_exp_atBot_of_continuous_compact_support hf1 hf2,
-      tendsto_integral_mul_exp_atTop_of_continuous_compact_support hf1 hf2⟩
-#align zero_at_infty_integral_mul_exp_of_continuous_compact_support zero_at_infty_integral_mul_exp_of_continuous_compact_support
+    (tendsto_integral_exp_inner_smul_cocompact f).comp
+      A.to_homeomorph.to_cocompact_map.cocompact_tendsto'
+#align tendsto_integral_exp_smul_cocompact_of_inner_product tendsto_integral_exp_smul_cocompact_of_inner_product
+
+end InnerProductSpace
+
+section NoInnerProduct
 
-open FourierTransform
+variable (f) [AddCommGroup V] [TopologicalSpace V] [TopologicalAddGroup V] [T2Space V]
+  [MeasurableSpace V] [BorelSpace V] [Module ℝ V] [ContinuousSMul ℝ V] [FiniteDimensional ℝ V]
+  [CompleteSpace E]
 
-/-- Riemann-Lebesgue lemma for continuous compactly-supported functions: the Fourier transform
-tends to 0 at infinity. -/
-theorem Real.fourierIntegral_zero_at_infty_of_continuous_compact_support (hc : Continuous f)
-    (hs : HasCompactSupport f) : Tendsto (𝓕 f) (cocompact ℝ) (𝓝 0) :=
+/-- Riemann-Lebesgue lemma for functions on a finite-dimensional real vector space, formulated via
+dual space. -/
+theorem tendsto_integral_exp_smul_cocompact (μ : Measure V) [μ.IsAddHaarMeasure] :
+    Tendsto (fun w : V →L[ℝ] ℝ => ∫ v, e[-w v] • f v ∂μ) (cocompact (V →L[ℝ] ℝ)) (𝓝 0) :=
   by
-  refine'
-    ((zero_at_infty_integral_mul_exp_of_continuous_compact_support hc hs).comp
-          (tendsto_cocompact_mul_left₀
-            (mul_ne_zero (neg_ne_zero.mpr two_ne_zero) real.pi_pos.ne'))).congr
-      fun w => _
-  rw [Real.fourierIntegral_eq_integral_exp_smul, Function.comp_apply]
-  congr 1 with x : 1
-  ring_nf
-#align real.fourier_integral_zero_at_infty_of_continuous_compact_support Real.fourierIntegral_zero_at_infty_of_continuous_compact_support
-
-end ContinuousCompactSupport
+  -- We have already proved the result for inner-product spaces, formulated in a way which doesn't
+  -- refer to the inner product. So we choose an arbitrary inner-product space isomorphic to V
+  -- and port the result over from there.
+  let V' := EuclideanSpace ℝ (Fin (finrank ℝ V))
+  have A : V ≃L[ℝ] V' := toEuclidean
+  borelize V'
+  -- various equivs derived from A
+  let Aₘ : MeasurableEquiv V V' := A.to_homeomorph.to_measurable_equiv
+  -- isomorphism between duals derived from A -- need to do continuity as a separate step in order
+  -- to apply `linear_map.continuous_of_finite_dimensional`.
+  let Adualₗ : (V →L[ℝ] ℝ) ≃ₗ[ℝ] V' →L[ℝ] ℝ :=
+    { toFun := fun t => t.comp A.symm.to_continuous_linear_map
+      invFun := fun t => t.comp A.to_continuous_linear_map
+      map_add' := by
+        intro t s
+        ext1 v
+        simp only [ContinuousLinearMap.coe_comp', Function.comp_apply,
+          ContinuousLinearMap.add_apply]
+      map_smul' := by
+        intro x f
+        ext1 v
+        simp only [RingHom.id_apply, ContinuousLinearMap.coe_comp', Function.comp_apply,
+          ContinuousLinearMap.smul_apply]
+      left_inv := by
+        intro w
+        ext1 v
+        simp only [[anonymous], ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe,
+          Function.comp_apply, ContinuousLinearEquiv.symm_apply_apply]
+      right_inv := by
+        intro w
+        ext1 v
+        simp only [[anonymous], ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe,
+          Function.comp_apply, ContinuousLinearEquiv.apply_symm_apply] }
+  let Adual : (V →L[ℝ] ℝ) ≃L[ℝ] V' →L[ℝ] ℝ :=
+    { Adualₗ with
+      continuous_toFun := Adualₗ.to_linear_map.continuous_of_finite_dimensional
+      continuous_invFun := Adualₗ.symm.to_linear_map.continuous_of_finite_dimensional }
+  have : (μ.map Aₘ).IsAddHaarMeasure := measure.map_continuous_linear_equiv.is_add_haar_measure _ A
+  convert(tendsto_integral_exp_smul_cocompact_of_inner_product (f ∘ A.symm) (μ.map Aₘ)).comp
+      Adual.to_homeomorph.to_cocompact_map.cocompact_tendsto'
+  ext1 w
+  rw [Function.comp_apply, integral_map_equiv]
+  congr 1 with v : 1
+  congr <;> exact (ContinuousLinearEquiv.symm_apply_apply A v).symm
+#align tendsto_integral_exp_smul_cocompact tendsto_integral_exp_smul_cocompact
+
+/-- The Riemann-Lebesgue lemma, formulated in terms of `vector_fourier.fourier_integral` (with the
+pairing in the definition of `fourier_integral` taken to be the canonical pairing between `V` and
+its dual space). -/
+theorem Real.zero_at_infty_vector_fourierIntegral (μ : Measure V) [μ.IsAddHaarMeasure] :
+    Tendsto (VectorFourier.fourierIntegral e μ (topDualPairing ℝ V).flip f) (cocompact (V →L[ℝ] ℝ))
+      (𝓝 0) :=
+  tendsto_integral_exp_smul_cocompact f μ
+#align real.zero_at_infty_vector_fourier_integral Real.zero_at_infty_vector_fourierIntegral
+
+end NoInnerProduct
 
Diff
@@ -169,8 +169,7 @@ theorem tendsto_integral_mul_exp_atBot_of_continuous_compact_support (hf1 : Cont
   by
   have hg2 : HasCompactSupport (f ∘ Neg.neg) := by
     simpa only [neg_one_smul] using hf2.comp_smul (neg_ne_zero.mpr <| one_ne_zero' ℝ)
-  convert
-    (tendsto_integral_mul_exp_atTop_of_continuous_compact_support (hf1.comp continuous_neg)
+  convert(tendsto_integral_mul_exp_atTop_of_continuous_compact_support (hf1.comp continuous_neg)
           hg2).comp
       tendsto_neg_at_bot_at_top
   ext1 t
Diff
@@ -44,7 +44,7 @@ variable {E : Type _} [NormedAddCommGroup E] [NormedSpace ℂ E] {f : ℝ → E}
 
 /-- The integrand in the Riemann-Lebesgue lemma is integrable. -/
 theorem fourierIntegrandIntegrable (hf : Integrable f) (t : ℝ) :
-    Integrable fun x : ℝ => exp (↑(t * x) * i) • f x :=
+    Integrable fun x : ℝ => exp (↑(t * x) * I) • f x :=
   by
   rw [← integrable_norm_iff]
   simp_rw [norm_smul, norm_exp_of_real_mul_I, one_mul]
@@ -55,7 +55,7 @@ variable [CompleteSpace E]
 
 /-- Shifting `f` by `π / t` negates the integral in the Riemann-Lebesgue lemma. -/
 theorem fourier_integral_half_period_translate {t : ℝ} (ht : t ≠ 0) :
-    (∫ x : ℝ, exp (↑(t * x) * i) • f (x + π / t)) = -∫ x : ℝ, exp (↑(t * x) * i) • f x :=
+    (∫ x : ℝ, exp (↑(t * x) * I) • f (x + π / t)) = -∫ x : ℝ, exp (↑(t * x) * I) • f x :=
   by
   have :
     (fun x : ℝ => exp (↑(t * x) * I) • f (x + π / t)) = fun x : ℝ =>
@@ -77,8 +77,8 @@ theorem fourier_integral_half_period_translate {t : ℝ} (ht : t ≠ 0) :
 /-- Rewrite the Riemann-Lebesgue integral in a form that allows us to use uniform continuity. -/
 theorem fourier_integral_eq_half_sub_half_period_translate {t : ℝ} (ht : t ≠ 0)
     (hf : Integrable f) :
-    (∫ x : ℝ, exp (↑(t * x) * i) • f x) =
-      (1 / (2 : ℂ)) • ∫ x : ℝ, exp (↑(t * x) * i) • (f x - f (x + π / t)) :=
+    (∫ x : ℝ, exp (↑(t * x) * I) • f x) =
+      (1 / (2 : ℂ)) • ∫ x : ℝ, exp (↑(t * x) * I) • (f x - f (x + π / t)) :=
   by
   simp_rw [smul_sub]
   rw [integral_sub, fourier_integral_half_period_translate ht, sub_eq_add_neg, neg_neg, ←
@@ -91,7 +91,7 @@ theorem fourier_integral_eq_half_sub_half_period_translate {t : ℝ} (ht : t ≠
 `∫ x, exp (t * x * I) • f x` tends to 0 as `t` gets large.  -/
 theorem tendsto_integral_mul_exp_atTop_of_continuous_compact_support (hf1 : Continuous f)
     (hf2 : HasCompactSupport f) :
-    Tendsto (fun t : ℝ => ∫ x : ℝ, exp (↑(t * x) * i) • f x) atTop (𝓝 0) :=
+    Tendsto (fun t : ℝ => ∫ x : ℝ, exp (↑(t * x) * I) • f x) atTop (𝓝 0) :=
   by
   simp_rw [NormedAddCommGroup.tendsto_nhds_zero, eventually_at_top, ge_iff_le]
   intro ε hε
@@ -106,7 +106,7 @@ theorem tendsto_integral_mul_exp_atTop_of_continuous_compact_support (hf1 : Cont
   rw [fourier_integral_eq_half_sub_half_period_translate
       (lt_of_lt_of_le (lt_max_of_lt_left Real.pi_pos) ht).ne'
       (hf1.integrable_of_has_compact_support hf2)]
-  rw [norm_smul, norm_eq_abs, ← Complex.of_real_one, ← of_real_bit0, ← of_real_div,
+  rw [norm_smul, norm_eq_abs, ← Complex.ofReal_one, ← of_real_bit0, ← of_real_div,
     Complex.abs_of_nonneg one_half_pos.le]
   have : ε = 1 / 2 * (2 * ε) := by
     field_simp
@@ -165,7 +165,7 @@ theorem tendsto_integral_mul_exp_atTop_of_continuous_compact_support (hf1 : Cont
 
 theorem tendsto_integral_mul_exp_atBot_of_continuous_compact_support (hf1 : Continuous f)
     (hf2 : HasCompactSupport f) :
-    Tendsto (fun t : ℝ => ∫ x : ℝ, exp (↑(t * x) * i) • f x) atBot (𝓝 0) :=
+    Tendsto (fun t : ℝ => ∫ x : ℝ, exp (↑(t * x) * I) • f x) atBot (𝓝 0) :=
   by
   have hg2 : HasCompactSupport (f ∘ Neg.neg) := by
     simpa only [neg_one_smul] using hf2.comp_smul (neg_ne_zero.mpr <| one_ne_zero' ℝ)
@@ -180,7 +180,7 @@ theorem tendsto_integral_mul_exp_atBot_of_continuous_compact_support (hf1 : Cont
 
 theorem zero_at_infty_integral_mul_exp_of_continuous_compact_support (hf1 : Continuous f)
     (hf2 : HasCompactSupport f) :
-    Tendsto (fun t : ℝ => ∫ x : ℝ, exp (↑(t * x) * i) • f x) (cocompact ℝ) (𝓝 0) :=
+    Tendsto (fun t : ℝ => ∫ x : ℝ, exp (↑(t * x) * I) • f x) (cocompact ℝ) (𝓝 0) :=
   by
   rw [Real.cocompact_eq, tendsto_sup]
   exact
Diff
@@ -36,7 +36,7 @@ functions are dense in `L¹(ℝ)`, which will be proved in a future iteration.)
 
 open MeasureTheory Filter Complex Set
 
-open Filter Topology Real Ennreal
+open Filter Topology Real ENNReal
 
 section ContinuousCompactSupport
 
@@ -159,7 +159,7 @@ theorem tendsto_integral_mul_exp_atTop_of_continuous_compact_support (hf1 : Cont
   refine' lt_of_le_of_lt bdA2 _
   rw [Real.volume_Icc, (by ring : R - -(R + 1) = 1 + 2 * R)]
   have hh : 0 < 1 + 2 * R := by positivity
-  rw [Ennreal.toReal_ofReal hh.le, div_mul_cancel _ hh.ne', two_mul]
+  rw [ENNReal.toReal_ofReal hh.le, div_mul_cancel _ hh.ne', two_mul]
   exact lt_add_of_pos_left _ hε
 #align tendsto_integral_mul_exp_at_top_of_continuous_compact_support tendsto_integral_mul_exp_atTop_of_continuous_compact_support
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: David Loeffler
 
 ! This file was ported from Lean 3 source module analysis.fourier.riemann_lebesgue_lemma
-! leanprover-community/mathlib commit a231f964b9ec8d1e12a28326b556123258a52829
+! leanprover-community/mathlib commit 3353f3371120058977ce1e20bf7fc8986c0fb042
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -193,7 +193,7 @@ open FourierTransform
 /-- Riemann-Lebesgue lemma for continuous compactly-supported functions: the Fourier transform
 tends to 0 at infinity. -/
 theorem Real.fourierIntegral_zero_at_infty_of_continuous_compact_support (hc : Continuous f)
-    (hs : HasCompactSupport f) : Tendsto (Real.fourierIntegral f) (cocompact ℝ) (𝓝 0) :=
+    (hs : HasCompactSupport f) : Tendsto (𝓕 f) (cocompact ℝ) (𝓝 0) :=
   by
   refine'
     ((zero_at_infty_integral_mul_exp_of_continuous_compact_support hc hs).comp

Changes in mathlib4

mathlib3
mathlib4
chore: adapt to multiple goal linter 2 (#12361)

A PR analogous to #12338: reformatting proofs following the multiple goals linter of #12339.

Diff
@@ -99,7 +99,7 @@ theorem fourierIntegral_eq_half_sub_half_period_translate {w : V} (hw : w ≠ 0)
   simp_rw [smul_sub]
   rw [integral_sub, fourierIntegral_half_period_translate hw, sub_eq_add_neg, neg_neg, ←
     two_smul ℂ _, ← @smul_assoc _ _ _ _ _ _ (IsScalarTower.left ℂ), smul_eq_mul]
-  norm_num
+  · norm_num
   exacts [(Real.fourierIntegral_convergent_iff w).2 hf,
     (Real.fourierIntegral_convergent_iff w).2 (hf.comp_add_right _)]
 #align fourier_integral_eq_half_sub_half_period_translate fourierIntegral_eq_half_sub_half_period_translate
chore: replace set_integral with setIntegral (#12215)

Done with a global search and replace, and then (to fix the #align lines), replace (#align \S*)setIntegral with $1set_integral.

Diff
@@ -153,7 +153,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
   simp_rw [norm_circle_smul]
   --* Show integral can be taken over A only.
   have int_A : ∫ v : V, ‖f v - f (v + i w)‖ = ∫ v in A, ‖f v - f (v + i w)‖ := by
-    refine' (set_integral_eq_integral_of_forall_compl_eq_zero fun v hv => _).symm
+    refine' (setIntegral_eq_integral_of_forall_compl_eq_zero fun v hv => _).symm
     dsimp only [A] at hv
     simp only [mem_setOf, not_le] at hv
     rw [hR_bd v _, hR_bd (v + i w) _, sub_zero, norm_zero]
@@ -175,14 +175,14 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
     rw [sub_add_cancel_left, norm_neg, hw'_nm, ← div_div, div_lt_iff (norm_pos_iff.mpr hw_ne), ←
       div_lt_iff' hδ1, div_div]
     exact (lt_add_of_pos_left _ one_half_pos).trans_le hw_bd
-  have bdA2 := norm_set_integral_le_of_norm_le_const (hB_vol.trans_lt ENNReal.coe_lt_top) bdA ?_
+  have bdA2 := norm_setIntegral_le_of_norm_le_const (hB_vol.trans_lt ENNReal.coe_lt_top) bdA ?_
   swap
   · apply Continuous.aestronglyMeasurable
     exact
       continuous_norm.comp <|
         Continuous.sub hf1 <| Continuous.comp hf1 <| continuous_id'.add continuous_const
   have : ‖_‖ = ∫ v : V in A, ‖f v - f (v + i w)‖ :=
-    Real.norm_of_nonneg (set_integral_nonneg mA fun x _ => norm_nonneg _)
+    Real.norm_of_nonneg (setIntegral_nonneg mA fun x _ => norm_nonneg _)
   rw [this] at bdA2
   refine' bdA2.trans_lt _
   rw [div_mul_eq_mul_div, div_lt_iff (NNReal.coe_pos.mpr hB_pos), mul_comm (2 : ℝ), mul_assoc,
chore: backports from #11997, adaptations for nightly-2024-04-07 (#12176)

These are changes from #11997, the latest adaptation PR for nightly-2024-04-07, which can be made directly on master.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>

Diff
@@ -68,9 +68,9 @@ local notation3 "i" => fun (w : V) => (1 / (2 * ‖w‖ ^ 2) : ℝ) • w
 theorem fourierIntegral_half_period_translate {w : V} (hw : w ≠ 0) :
     (∫ v : V, 𝐞 (-⟪v, w⟫) • f (v + i w)) = -∫ v : V, 𝐞 (-⟪v, w⟫) • f v := by
   have hiw : ⟪i w, w⟫ = 1 / 2 := by
-    rw [inner_smul_left, inner_self_eq_norm_sq_to_K, RCLike.ofReal_real_eq_id, id.def,
+    rw [inner_smul_left, inner_self_eq_norm_sq_to_K, RCLike.ofReal_real_eq_id, id,
       RCLike.conj_to_real, ← div_div, div_mul_cancel₀]
-    rwa [Ne.def, sq_eq_zero_iff, norm_eq_zero]
+    rwa [Ne, sq_eq_zero_iff, norm_eq_zero]
   have :
     (fun v : V => 𝐞 (-⟪v, w⟫) • f (v + i w)) =
       fun v : V => (fun x : V => -(𝐞 (-⟪x, w⟫) • f x)) (v + i w) := by
feat: cleanup file on derivative of Fourier transform (#11779)

Rename mul_L to fourierSMulRight for predictability, expand the file-level docstring, extract a few lemmas from proofs, change fourier_integral to fourierIntegral in a few lemma names. There is essentially no new mathematical content. This is a preparation for the study of higher order derivatives in #11776.

Diff
@@ -58,21 +58,14 @@ section InnerProductSpace
 variable [NormedAddCommGroup V] [MeasurableSpace V] [BorelSpace V] [InnerProductSpace ℝ V]
   [FiniteDimensional ℝ V]
 
-/-- The integrand in the Riemann-Lebesgue lemma for `f` is integrable iff `f` is. -/
-theorem fourier_integrand_integrable (w : V) :
-    Integrable f ↔ Integrable fun v : V => 𝐞 (-⟪v, w⟫) • f v := by
-  have hL : Continuous fun p : V × V => bilinFormOfRealInner p.1 p.2 :=
-    continuous_inner
-  rw [VectorFourier.fourier_integral_convergent_iff Real.continuous_fourierChar hL w]
-  simp only [bilinFormOfRealInner_apply_apply, ofAdd_neg, map_inv, coe_inv_unitSphere]
-#align fourier_integrand_integrable fourier_integrand_integrable
+#align fourier_integrand_integrable Real.fourierIntegral_convergent_iff
 
 variable [CompleteSpace E]
 
 local notation3 "i" => fun (w : V) => (1 / (2 * ‖w‖ ^ 2) : ℝ) • w
 
 /-- Shifting `f` by `(1 / (2 * ‖w‖ ^ 2)) • w` negates the integral in the Riemann-Lebesgue lemma. -/
-theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
+theorem fourierIntegral_half_period_translate {w : V} (hw : w ≠ 0) :
     (∫ v : V, 𝐞 (-⟪v, w⟫) • f (v + i w)) = -∫ v : V, 𝐞 (-⟪v, w⟫) • f v := by
   have hiw : ⟪i w, w⟫ = 1 / 2 := by
     rw [inner_smul_left, inner_self_eq_norm_sq_to_K, RCLike.ofReal_real_eq_id, id.def,
@@ -97,19 +90,19 @@ theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
     ((fun w ↦ (1 / (2 * ‖w‖ ^ (2 : ℕ))) • w) w)
   rw [this]
   simp only [neg_smul, integral_neg]
-#align fourier_integral_half_period_translate fourier_integral_half_period_translate
+#align fourier_integral_half_period_translate fourierIntegral_half_period_translate
 
 /-- Rewrite the Fourier integral in a form that allows us to use uniform continuity. -/
-theorem fourier_integral_eq_half_sub_half_period_translate {w : V} (hw : w ≠ 0)
+theorem fourierIntegral_eq_half_sub_half_period_translate {w : V} (hw : w ≠ 0)
     (hf : Integrable f) :
     ∫ v : V, 𝐞 (-⟪v, w⟫) • f v = (1 / (2 : ℂ)) • ∫ v : V, 𝐞 (-⟪v, w⟫) • (f v - f (v + i w)) := by
   simp_rw [smul_sub]
-  rw [integral_sub, fourier_integral_half_period_translate hw, sub_eq_add_neg, neg_neg, ←
+  rw [integral_sub, fourierIntegral_half_period_translate hw, sub_eq_add_neg, neg_neg, ←
     two_smul ℂ _, ← @smul_assoc _ _ _ _ _ _ (IsScalarTower.left ℂ), smul_eq_mul]
   norm_num
-  exacts [(fourier_integrand_integrable w).mp hf,
-    (fourier_integrand_integrable w).mp (hf.comp_add_right _)]
-#align fourier_integral_eq_half_sub_half_period_translate fourier_integral_eq_half_sub_half_period_translate
+  exacts [(Real.fourierIntegral_convergent_iff w).2 hf,
+    (Real.fourierIntegral_convergent_iff w).2 (hf.comp_add_right _)]
+#align fourier_integral_eq_half_sub_half_period_translate fourierIntegral_eq_half_sub_half_period_translate
 
 /-- Riemann-Lebesgue Lemma for continuous and compactly-supported functions: the integral
 `∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 wrt `cocompact V`. Note that this is primarily
@@ -153,7 +146,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
       sq, ← div_div, ← div_div, ← div_div, div_mul_cancel₀ _ (norm_eq_zero.not.mpr hw_ne)]
   --* Rewrite integral in terms of `f v - f (v + w')`.
   have : ‖(1 / 2 : ℂ)‖ = 2⁻¹ := by norm_num
-  rw [fourier_integral_eq_half_sub_half_period_translate hw_ne
+  rw [fourierIntegral_eq_half_sub_half_period_translate hw_ne
       (hf1.integrable_of_hasCompactSupport hf2),
     norm_smul, this, inv_mul_eq_div, div_lt_iff' two_pos]
   refine' lt_of_le_of_lt (norm_integral_le_integral_norm _) _
@@ -210,7 +203,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact :
   by_cases hfi : Integrable f; swap
   · convert tendsto_const_nhds (x := (0 : E)) with w
     apply integral_undef
-    rwa [← fourier_integrand_integrable w]
+    rwa [Real.fourierIntegral_convergent_iff]
   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)
@@ -223,8 +216,8 @@ theorem tendsto_integral_exp_inner_smul_cocompact :
   rw [dist_eq_norm] at hI ⊢
   have : ‖(∫ v, 𝐞 (-⟪v, w⟫) • f v) - ∫ v, 𝐞 (-⟪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)),
+    simp_rw [← integral_sub ((Real.fourierIntegral_convergent_iff w).2 hfi)
+      ((Real.fourierIntegral_convergent_iff w).2 (hg_cont.integrable_of_hasCompactSupport hg_supp)),
       ← smul_sub, ← Pi.sub_apply]
     exact VectorFourier.norm_fourierIntegral_le_integral_norm 𝐞 _ bilinFormOfRealInner (f - g) w
   replace := add_lt_add_of_le_of_lt this hI
chore: Rename IsROrC to RCLike (#10819)

IsROrC contains data, which goes against the expectation that classes prefixed with Is are prop-valued. People have been complaining about this on and off, so this PR renames IsROrC to RCLike.

Diff
@@ -75,8 +75,8 @@ local notation3 "i" => fun (w : V) => (1 / (2 * ‖w‖ ^ 2) : ℝ) • w
 theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
     (∫ v : V, 𝐞 (-⟪v, w⟫) • f (v + i w)) = -∫ v : V, 𝐞 (-⟪v, w⟫) • f v := by
   have hiw : ⟪i w, w⟫ = 1 / 2 := by
-    rw [inner_smul_left, inner_self_eq_norm_sq_to_K, IsROrC.ofReal_real_eq_id, id.def,
-      IsROrC.conj_to_real, ← div_div, div_mul_cancel₀]
+    rw [inner_smul_left, inner_self_eq_norm_sq_to_K, RCLike.ofReal_real_eq_id, id.def,
+      RCLike.conj_to_real, ← div_div, div_mul_cancel₀]
     rwa [Ne.def, sq_eq_zero_iff, norm_eq_zero]
   have :
     (fun v : V => 𝐞 (-⟪v, w⟫) • f (v + i w)) =
@@ -257,7 +257,7 @@ theorem tendsto_integral_exp_smul_cocompact_of_inner_product (μ : Measure V) [
   have : (fun w : V →L[ℝ] ℝ ↦ ∫ v, 𝐞 (-w v) • f v) = (fun w : V ↦ ∫ v, 𝐞 (-⟪v, w⟫) • f v) ∘ A := by
     ext1 w
     congr 1 with v : 1
-    rw [← inner_conj_symm, IsROrC.conj_to_real, InnerProductSpace.toDual_symm_apply]
+    rw [← inner_conj_symm, RCLike.conj_to_real, InnerProductSpace.toDual_symm_apply]
   rw [this]
   exact (tendsto_integral_exp_inner_smul_cocompact f).comp
       A.toHomeomorph.toCocompactMap.cocompact_tendsto'
refactor(Analysis/Fourier): use AddChar machinery in FourierTransform (#11417)

The file Analysis/Fourier/FourierTransform.lean predates the general approach to additive characters elsewhere in the library; this merges the two (getting rid of the rather kludgy notation e [x] in the process). I also rejigged some slow proofs, to make them compile slightly faster.

Diff
@@ -60,7 +60,7 @@ variable [NormedAddCommGroup V] [MeasurableSpace V] [BorelSpace V] [InnerProduct
 
 /-- The integrand in the Riemann-Lebesgue lemma for `f` is integrable iff `f` is. -/
 theorem fourier_integrand_integrable (w : V) :
-    Integrable f ↔ Integrable fun v : V => 𝐞[-⟪v, w⟫] • f v := by
+    Integrable f ↔ Integrable fun v : V => 𝐞 (-⟪v, w⟫) • f v := by
   have hL : Continuous fun p : V × V => bilinFormOfRealInner p.1 p.2 :=
     continuous_inner
   rw [VectorFourier.fourier_integral_convergent_iff Real.continuous_fourierChar hL w]
@@ -73,35 +73,36 @@ local notation3 "i" => fun (w : V) => (1 / (2 * ‖w‖ ^ 2) : ℝ) • w
 
 /-- Shifting `f` by `(1 / (2 * ‖w‖ ^ 2)) • w` negates the integral in the Riemann-Lebesgue lemma. -/
 theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
-    (∫ v : V, 𝐞[-⟪v, w⟫] • f (v + i w)) = -∫ v : V, 𝐞[-⟪v, w⟫] • f v := by
+    (∫ v : V, 𝐞 (-⟪v, w⟫) • f (v + i w)) = -∫ v : V, 𝐞 (-⟪v, w⟫) • f v := by
   have hiw : ⟪i w, w⟫ = 1 / 2 := by
     rw [inner_smul_left, inner_self_eq_norm_sq_to_K, IsROrC.ofReal_real_eq_id, id.def,
       IsROrC.conj_to_real, ← div_div, div_mul_cancel₀]
     rwa [Ne.def, sq_eq_zero_iff, norm_eq_zero]
   have :
-    (fun v : V => 𝐞[-⟪v, w⟫] • f (v + i w)) =
-      fun v : V => (fun x : V => -𝐞[-⟪x, w⟫] • f x) (v + i w) := by
+    (fun v : V => 𝐞 (-⟪v, w⟫) • f (v + i w)) =
+      fun v : V => (fun x : V => -(𝐞 (-⟪x, w⟫) • f x)) (v + i w) := by
     ext1 v
-    simp_rw [inner_add_left, hiw, Real.fourierChar_apply, neg_add, mul_add, ofReal_add, add_mul,
-      exp_add]
+    simp_rw [inner_add_left, hiw, Submonoid.smul_def, Real.fourierChar_apply, neg_add, mul_add,
+      ofReal_add, add_mul, exp_add]
     have : 2 * π * -(1 / 2) = -π := by field_simp; ring
-    rw [this, ofReal_neg, neg_mul, exp_neg, exp_pi_mul_I, inv_neg, inv_one, mul_neg_one, neg_neg]
+    rw [this, ofReal_neg, neg_mul, exp_neg, exp_pi_mul_I, inv_neg, inv_one, mul_neg_one, neg_smul,
+      neg_neg]
   rw [this]
   -- Porting note:
   -- The next three lines had just been
   -- rw [integral_add_right_eq_self (fun (x : V) ↦ -(𝐞[-⟪x, w⟫]) • f x)
   --       ((fun w ↦ (1 / (2 * ‖w‖ ^ (2 : ℕ))) • w) w)]
-  -- Unfortunately now we need to specify `volume`, and call `dsimp`.
-  have := @integral_add_right_eq_self _ _ _ _ _ volume _ _ _ (fun (x : V) ↦ -(𝐞[-⟪x, w⟫]) • f x)
+  -- Unfortunately now we need to specify `volume`.
+  have := integral_add_right_eq_self (μ := volume) (fun (x : V) ↦ -(𝐞 (-⟪x, w⟫) • f x))
     ((fun w ↦ (1 / (2 * ‖w‖ ^ (2 : ℕ))) • w) w)
-  erw [this] -- Porting note, we can avoid `erw` by first calling `dsimp at this ⊢`.
+  rw [this]
   simp only [neg_smul, integral_neg]
 #align fourier_integral_half_period_translate fourier_integral_half_period_translate
 
 /-- Rewrite the Fourier integral in a form that allows us to use uniform continuity. -/
 theorem fourier_integral_eq_half_sub_half_period_translate {w : V} (hw : w ≠ 0)
     (hf : Integrable f) :
-    ∫ v : V, 𝐞[-⟪v, w⟫] • f v = (1 / (2 : ℂ)) • ∫ v : V, 𝐞[-⟪v, w⟫] • (f v - f (v + i w)) := by
+    ∫ v : V, 𝐞 (-⟪v, w⟫) • f v = (1 / (2 : ℂ)) • ∫ v : V, 𝐞 (-⟪v, w⟫) • (f v - f (v + i w)) := by
   simp_rw [smul_sub]
   rw [integral_sub, fourier_integral_half_period_translate hw, sub_eq_add_neg, neg_neg, ←
     two_smul ℂ _, ← @smul_assoc _ _ _ _ _ _ (IsScalarTower.left ℂ), smul_eq_mul]
@@ -116,9 +117,9 @@ of interest as a preparatory step for the more general result
 `tendsto_integral_exp_inner_smul_cocompact` in which `f` can be arbitrary. -/
 theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support (hf1 : Continuous f)
     (hf2 : HasCompactSupport f) :
-    Tendsto (fun w : V => ∫ v : V, 𝐞[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
+    Tendsto (fun w : V => ∫ v : V, 𝐞 (-⟪v, w⟫) • f v) (cocompact V) (𝓝 0) := by
   refine' NormedAddCommGroup.tendsto_nhds_zero.mpr fun ε hε => _
-  suffices ∃ T : ℝ, ∀ w : V, T ≤ ‖w‖ → ‖∫ v : V, 𝐞[-⟪v, w⟫] • f v‖ < ε by
+  suffices ∃ T : ℝ, ∀ w : V, T ≤ ‖w‖ → ‖∫ v : V, 𝐞 (-⟪v, w⟫) • f v‖ < ε by
     simp_rw [← comap_dist_left_atTop_eq_cocompact (0 : V), eventually_comap, eventually_atTop,
       dist_eq_norm', sub_zero]
     exact
@@ -156,7 +157,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
       (hf1.integrable_of_hasCompactSupport hf2),
     norm_smul, this, inv_mul_eq_div, div_lt_iff' two_pos]
   refine' lt_of_le_of_lt (norm_integral_le_integral_norm _) _
-  simp_rw [norm_smul, norm_eq_abs, abs_coe_circle, one_mul]
+  simp_rw [norm_circle_smul]
   --* Show integral can be taken over A only.
   have int_A : ∫ v : V, ‖f v - f (v + i w)‖ = ∫ v in A, ‖f v - f (v + i w)‖ := by
     refine' (set_integral_eq_integral_of_forall_compl_eq_zero fun v hv => _).symm
@@ -205,7 +206,7 @@ variable (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, 𝐞[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
+    Tendsto (fun w : V => ∫ v, 𝐞 (-⟪v, w⟫) • f v) (cocompact V) (𝓝 0) := by
   by_cases hfi : Integrable f; swap
   · convert tendsto_const_nhds (x := (0 : E)) with w
     apply integral_undef
@@ -220,15 +221,12 @@ theorem tendsto_integral_exp_inner_smul_cocompact :
           _ (div_pos hε two_pos)).mp
       (eventually_of_forall fun w hI => _)
   rw [dist_eq_norm] at hI ⊢
-  have : ‖(∫ v, 𝐞[-⟪v, w⟫] • f v) - ∫ v, 𝐞[-⟪v, w⟫] • g v‖ ≤ ε / 2 := by
+  have : ‖(∫ v, 𝐞 (-⟪v, w⟫) • f v) - ∫ v, 𝐞 (-⟪v, w⟫) • g v‖ ≤ ε / 2 := by
     refine' le_trans _ hfg
-    simp_rw [←
-      integral_sub ((fourier_integrand_integrable w).mp hfi)
+    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 𝐞 volume
-        (bilinFormOfRealInner) (f - g) w
+    exact VectorFourier.norm_fourierIntegral_le_integral_norm 𝐞 _ bilinFormOfRealInner (f - g) w
   replace := add_lt_add_of_le_of_lt this hI
   rw [add_halves] at this
   refine' ((le_of_eq _).trans (norm_add_le _ _)).trans_lt this
@@ -237,7 +235,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact :
 
 /-- The Riemann-Lebesgue lemma for functions on `ℝ`. -/
 theorem Real.tendsto_integral_exp_smul_cocompact (f : ℝ → E) :
-    Tendsto (fun w : ℝ => ∫ v : ℝ, 𝐞[-(v * w)] • f v) (cocompact ℝ) (𝓝 0) :=
+    Tendsto (fun w : ℝ => ∫ v : ℝ, 𝐞 (-(v * w)) • f v) (cocompact ℝ) (𝓝 0) :=
   tendsto_integral_exp_inner_smul_cocompact f
 #align real.tendsto_integral_exp_smul_cocompact Real.tendsto_integral_exp_smul_cocompact
 
@@ -250,19 +248,18 @@ theorem Real.zero_at_infty_fourierIntegral (f : ℝ → E) : Tendsto (𝓕 f) (c
 via dual space. **Do not use** -- it is only a stepping stone to
 `tendsto_integral_exp_smul_cocompact` where the inner-product-space structure isn't required. -/
 theorem tendsto_integral_exp_smul_cocompact_of_inner_product (μ : Measure V) [μ.IsAddHaarMeasure] :
-    Tendsto (fun w : V →L[ℝ] ℝ => ∫ v, 𝐞[-w v] • f v ∂μ) (cocompact (V →L[ℝ] ℝ)) (𝓝 0) := by
+    Tendsto (fun w : V →L[ℝ] ℝ => ∫ v, 𝐞 (-w v) • f v ∂μ) (cocompact (V →L[ℝ] ℝ)) (𝓝 0) := by
   rw [μ.isAddLeftInvariant_eq_smul volume]
   simp_rw [integral_smul_nnreal_measure]
   rw [← (smul_zero _ : Measure.addHaarScalarFactor μ volume • (0 : E) = 0)]
   apply Tendsto.const_smul
   let A := (InnerProductSpace.toDual ℝ V).symm
-  have : (fun w : V →L[ℝ] ℝ => ∫ v, 𝐞[-w v] • f v) = (fun w : V => ∫ v, 𝐞[-⟪v, w⟫] • f v) ∘ A := by
+  have : (fun w : V →L[ℝ] ℝ ↦ ∫ v, 𝐞 (-w v) • f v) = (fun w : V ↦ ∫ v, 𝐞 (-⟪v, w⟫) • f v) ∘ A := by
     ext1 w
     congr 1 with v : 1
     rw [← inner_conj_symm, IsROrC.conj_to_real, InnerProductSpace.toDual_symm_apply]
   rw [this]
-  exact
-    (tendsto_integral_exp_inner_smul_cocompact f).comp
+  exact (tendsto_integral_exp_inner_smul_cocompact f).comp
       A.toHomeomorph.toCocompactMap.cocompact_tendsto'
 #align tendsto_integral_exp_smul_cocompact_of_inner_product tendsto_integral_exp_smul_cocompact_of_inner_product
 
@@ -277,7 +274,7 @@ variable (f) [AddCommGroup V] [TopologicalSpace V] [TopologicalAddGroup V] [T2Sp
 /-- Riemann-Lebesgue lemma for functions on a finite-dimensional real vector space, formulated via
 dual space. -/
 theorem tendsto_integral_exp_smul_cocompact (μ : Measure V) [μ.IsAddHaarMeasure] :
-    Tendsto (fun w : V →L[ℝ] ℝ => ∫ v, 𝐞[-w v] • f v ∂μ) (cocompact (V →L[ℝ] ℝ)) (𝓝 0) := by
+    Tendsto (fun w : V →L[ℝ] ℝ => ∫ v, 𝐞 (-w v) • f v ∂μ) (cocompact (V →L[ℝ] ℝ)) (𝓝 0) := by
   -- We have already proved the result for inner-product spaces, formulated in a way which doesn't
   -- refer to the inner product. So we choose an arbitrary inner-product space isomorphic to V
   -- and port the result over from there.
chore: Rename mul-div cancellation lemmas (#11530)

Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero lemma name, the Group lemma, the AddGroup lemma name).

| Statement | New name | Old name | |

Diff
@@ -76,7 +76,7 @@ theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
     (∫ v : V, 𝐞[-⟪v, w⟫] • f (v + i w)) = -∫ v : V, 𝐞[-⟪v, w⟫] • f v := by
   have hiw : ⟪i w, w⟫ = 1 / 2 := by
     rw [inner_smul_left, inner_self_eq_norm_sq_to_K, IsROrC.ofReal_real_eq_id, id.def,
-      IsROrC.conj_to_real, ← div_div, div_mul_cancel]
+      IsROrC.conj_to_real, ← div_div, div_mul_cancel₀]
     rwa [Ne.def, sq_eq_zero_iff, norm_eq_zero]
   have :
     (fun v : V => 𝐞[-⟪v, w⟫] • f (v + i w)) =
@@ -149,7 +149,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
     exact add_pos one_half_pos (one_div_pos.mpr <| mul_pos two_pos hδ1)
   have hw'_nm : ‖i w‖ = 1 / (2 * ‖w‖) := by
     rw [norm_smul, norm_div, Real.norm_of_nonneg (mul_nonneg two_pos.le <| sq_nonneg _), norm_one,
-      sq, ← div_div, ← div_div, ← div_div, div_mul_cancel _ (norm_eq_zero.not.mpr hw_ne)]
+      sq, ← div_div, ← div_div, ← div_div, div_mul_cancel₀ _ (norm_eq_zero.not.mpr hw_ne)]
   --* Rewrite integral in terms of `f v - f (v + w')`.
   have : ‖(1 / 2 : ℂ)‖ = 2⁻¹ := by norm_num
   rw [fourier_integral_eq_half_sub_half_period_translate hw_ne
@@ -178,7 +178,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
     simp_rw [norm_norm]
     simp_rw [dist_eq_norm] at hδ2
     refine' fun x _ => (hδ2 _).le
-    rw [sub_add_cancel', norm_neg, hw'_nm, ← div_div, div_lt_iff (norm_pos_iff.mpr hw_ne), ←
+    rw [sub_add_cancel_left, norm_neg, hw'_nm, ← div_div, div_lt_iff (norm_pos_iff.mpr hw_ne), ←
       div_lt_iff' hδ1, div_div]
     exact (lt_add_of_pos_left _ one_half_pos).trans_le hw_bd
   have bdA2 := norm_set_integral_le_of_norm_le_const (hB_vol.trans_lt ENNReal.coe_lt_top) bdA ?_
chore: tidy various files (#11490)
Diff
@@ -151,15 +151,10 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
     rw [norm_smul, norm_div, Real.norm_of_nonneg (mul_nonneg two_pos.le <| sq_nonneg _), norm_one,
       sq, ← div_div, ← div_div, ← div_div, div_mul_cancel _ (norm_eq_zero.not.mpr hw_ne)]
   --* Rewrite integral in terms of `f v - f (v + w')`.
-  -- Porting note: this was
-  -- rw [norm_eq_abs, ← Complex.ofReal_one, ← ofReal_bit0, ← of_real_div,
-  --   Complex.abs_of_nonneg one_half_pos.le]
-  have : ‖(1 / 2 : ℂ)‖ = 1 / 2 := by norm_num
+  have : ‖(1 / 2 : ℂ)‖ = 2⁻¹ := by norm_num
   rw [fourier_integral_eq_half_sub_half_period_translate hw_ne
       (hf1.integrable_of_hasCompactSupport hf2),
-    norm_smul, this]
-  have : ε = 1 / 2 * (2 * ε) := by field_simp; rw [mul_comm]
-  rw [this, mul_lt_mul_left (one_half_pos : (0 : ℝ) < 1 / 2)]
+    norm_smul, this, inv_mul_eq_div, div_lt_iff' two_pos]
   refine' lt_of_le_of_lt (norm_integral_le_integral_norm _) _
   simp_rw [norm_smul, norm_eq_abs, abs_coe_circle, one_mul]
   --* Show integral can be taken over A only.
@@ -176,7 +171,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
       refine' (div_le_one <| norm_pos_iff.mpr hw_ne).mpr _
       refine' le_trans (le_add_of_nonneg_right <| one_div_nonneg.mpr <| _) hw_bd
       exact (mul_pos (zero_lt_two' ℝ) hδ1).le
-    · exact ((le_add_iff_nonneg_right _).mpr zero_le_one).trans hv.le
+    · exact (le_add_of_nonneg_right zero_le_one).trans hv.le
   rw [int_A]; clear int_A
   --* Bound integral using fact that `‖f v - f (v + w')‖` is small.
   have bdA : ∀ v : V, v ∈ A → ‖‖f v - f (v + i w)‖‖ ≤ ε / B := by
@@ -185,10 +180,9 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
     refine' fun x _ => (hδ2 _).le
     rw [sub_add_cancel', norm_neg, hw'_nm, ← div_div, div_lt_iff (norm_pos_iff.mpr hw_ne), ←
       div_lt_iff' hδ1, div_div]
-    refine' (lt_add_of_pos_left _ _).trans_le hw_bd
-    exact one_half_pos
+    exact (lt_add_of_pos_left _ one_half_pos).trans_le hw_bd
   have bdA2 := norm_set_integral_le_of_norm_le_const (hB_vol.trans_lt ENNReal.coe_lt_top) bdA ?_
-  swap;
+  swap
   · apply Continuous.aestronglyMeasurable
     exact
       continuous_norm.comp <|
Refactor(Analysis): from BilinForm to LinearMap.BilinForm (#11097)

Replaces BilinForm with LinearMap.BilinForm in support of #10553

Co-authored-by: Christopher Hoskin <mans0954@users.noreply.github.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -61,10 +61,10 @@ variable [NormedAddCommGroup V] [MeasurableSpace V] [BorelSpace V] [InnerProduct
 /-- The integrand in the Riemann-Lebesgue lemma for `f` is integrable iff `f` is. -/
 theorem fourier_integrand_integrable (w : V) :
     Integrable f ↔ Integrable fun v : V => 𝐞[-⟪v, w⟫] • f v := by
-  have hL : Continuous fun p : V × V => BilinForm.toLin bilinFormOfRealInner p.1 p.2 :=
+  have hL : Continuous fun p : V × V => bilinFormOfRealInner p.1 p.2 :=
     continuous_inner
   rw [VectorFourier.fourier_integral_convergent_iff Real.continuous_fourierChar hL w]
-  simp only [BilinForm.toLin_apply, bilinFormOfRealInner_apply]
+  simp only [bilinFormOfRealInner_apply_apply, ofAdd_neg, map_inv, coe_inv_unitSphere]
 #align fourier_integrand_integrable fourier_integrand_integrable
 
 variable [CompleteSpace E]
@@ -234,7 +234,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact :
       ← smul_sub, ← Pi.sub_apply]
     exact
       VectorFourier.norm_fourierIntegral_le_integral_norm 𝐞 volume
-        (BilinForm.toLin bilinFormOfRealInner) (f - g) w
+        (bilinFormOfRealInner) (f - g) w
   replace := add_lt_add_of_le_of_lt this hI
   rw [add_halves] at this
   refine' ((le_of_eq _).trans (norm_add_le _ _)).trans_lt this
chore: remove stream-of-conciousness syntax for obtain (#11045)

This covers many instances, but is not exhaustive.

Independently of whether that syntax should be avoided (similar to #10534), I think all these changes are small improvements.

Diff
@@ -124,8 +124,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
     exact
       let ⟨T, hT⟩ := this
       ⟨T, fun b hb v hv => hT v (hv.symm ▸ hb)⟩
-  obtain ⟨R, -, hR_bd⟩ : ∃ R : ℝ, 0 < R ∧ ∀ x : V, R ≤ ‖x‖ → f x = 0
-  exact hf2.exists_pos_le_norm
+  obtain ⟨R, -, hR_bd⟩ : ∃ R : ℝ, 0 < R ∧ ∀ x : V, R ≤ ‖x‖ → f x = 0 := hf2.exists_pos_le_norm
   let A := {v : V | ‖v‖ ≤ R + 1}
   have mA : MeasurableSet A := by
     suffices A = Metric.closedBall (0 : V) (R + 1) by
feat: the Fourier transform is self-adjoint (#10833)

Also extend the notation 𝓕 for the Fourier transform to inner product spaces, introduce a notation 𝓕⁻ for the inverse Fourier transform, and generalize a few results from the real line to inner product spaces.

Diff
@@ -23,7 +23,7 @@ spaces `V`: if `f` is a function on `V` (valued in a complete normed space `E`),
 Fourier transform of `f`, viewed as a function on the dual space of `V`, tends to 0 along the
 cocompact filter. Here the Fourier transform is defined by
 
-`fun w : V →L[ℝ] ℝ ↦ ∫ (v : V), exp (↑(2 * π * w v) * I) • f x`.
+`fun w : V →L[ℝ] ℝ ↦ ∫ (v : V), exp (↑(2 * π * w v) * I) • f v`.
 
 This is true for arbitrary functions, but is only interesting for `L¹` functions (if `f` is not
 integrable then the integral is zero for all `w`). This is proved first for continuous
@@ -53,8 +53,6 @@ open scoped Filter Topology Real ENNReal FourierTransform RealInnerProductSpace
 
 variable {E V : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] {f : V → E}
 
-local notation "e" => Real.fourierChar
-
 section InnerProductSpace
 
 variable [NormedAddCommGroup V] [MeasurableSpace V] [BorelSpace V] [InnerProductSpace ℝ V]
@@ -62,7 +60,7 @@ variable [NormedAddCommGroup V] [MeasurableSpace V] [BorelSpace V] [InnerProduct
 
 /-- The integrand in the Riemann-Lebesgue lemma for `f` is integrable iff `f` is. -/
 theorem fourier_integrand_integrable (w : V) :
-    Integrable f ↔ Integrable fun v : V => e[-⟪v, w⟫] • f v := by
+    Integrable f ↔ Integrable fun v : V => 𝐞[-⟪v, w⟫] • f v := by
   have hL : Continuous fun p : V × V => BilinForm.toLin bilinFormOfRealInner p.1 p.2 :=
     continuous_inner
   rw [VectorFourier.fourier_integral_convergent_iff Real.continuous_fourierChar hL w]
@@ -75,14 +73,14 @@ local notation3 "i" => fun (w : V) => (1 / (2 * ‖w‖ ^ 2) : ℝ) • w
 
 /-- Shifting `f` by `(1 / (2 * ‖w‖ ^ 2)) • w` negates the integral in the Riemann-Lebesgue lemma. -/
 theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
-    (∫ v : V, e[-⟪v, w⟫] • f (v + i w)) = -∫ v : V, e[-⟪v, w⟫] • f v := by
+    (∫ v : V, 𝐞[-⟪v, w⟫] • f (v + i w)) = -∫ v : V, 𝐞[-⟪v, w⟫] • f v := by
   have hiw : ⟪i w, w⟫ = 1 / 2 := by
     rw [inner_smul_left, inner_self_eq_norm_sq_to_K, IsROrC.ofReal_real_eq_id, id.def,
       IsROrC.conj_to_real, ← div_div, div_mul_cancel]
     rwa [Ne.def, sq_eq_zero_iff, norm_eq_zero]
   have :
-    (fun v : V => e[-⟪v, w⟫] • f (v + i w)) =
-      fun v : V => (fun x : V => -e[-⟪x, w⟫] • f x) (v + i w) := by
+    (fun v : V => 𝐞[-⟪v, w⟫] • f (v + i w)) =
+      fun v : V => (fun x : V => -𝐞[-⟪x, w⟫] • f x) (v + i w) := by
     ext1 v
     simp_rw [inner_add_left, hiw, Real.fourierChar_apply, neg_add, mul_add, ofReal_add, add_mul,
       exp_add]
@@ -91,10 +89,10 @@ theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
   rw [this]
   -- Porting note:
   -- The next three lines had just been
-  -- rw [integral_add_right_eq_self (fun (x : V) ↦ -(e[-⟪x, w⟫]) • f x)
+  -- rw [integral_add_right_eq_self (fun (x : V) ↦ -(𝐞[-⟪x, w⟫]) • f x)
   --       ((fun w ↦ (1 / (2 * ‖w‖ ^ (2 : ℕ))) • w) w)]
   -- Unfortunately now we need to specify `volume`, and call `dsimp`.
-  have := @integral_add_right_eq_self _ _ _ _ _ volume _ _ _ (fun (x : V) ↦ -(e[-⟪x, w⟫]) • f x)
+  have := @integral_add_right_eq_self _ _ _ _ _ volume _ _ _ (fun (x : V) ↦ -(𝐞[-⟪x, w⟫]) • f x)
     ((fun w ↦ (1 / (2 * ‖w‖ ^ (2 : ℕ))) • w) w)
   erw [this] -- Porting note, we can avoid `erw` by first calling `dsimp at this ⊢`.
   simp only [neg_smul, integral_neg]
@@ -103,7 +101,7 @@ theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
 /-- Rewrite the Fourier integral in a form that allows us to use uniform continuity. -/
 theorem fourier_integral_eq_half_sub_half_period_translate {w : V} (hw : w ≠ 0)
     (hf : Integrable f) :
-    ∫ v : V, e[-⟪v, w⟫] • f v = (1 / (2 : ℂ)) • ∫ v : V, e[-⟪v, w⟫] • (f v - f (v + i w)) := by
+    ∫ v : V, 𝐞[-⟪v, w⟫] • f v = (1 / (2 : ℂ)) • ∫ v : V, 𝐞[-⟪v, w⟫] • (f v - f (v + i w)) := by
   simp_rw [smul_sub]
   rw [integral_sub, fourier_integral_half_period_translate hw, sub_eq_add_neg, neg_neg, ←
     two_smul ℂ _, ← @smul_assoc _ _ _ _ _ _ (IsScalarTower.left ℂ), smul_eq_mul]
@@ -118,9 +116,9 @@ of interest as a preparatory step for the more general result
 `tendsto_integral_exp_inner_smul_cocompact` in which `f` can be arbitrary. -/
 theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support (hf1 : Continuous f)
     (hf2 : HasCompactSupport f) :
-    Tendsto (fun w : V => ∫ v : V, e[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
+    Tendsto (fun w : V => ∫ v : V, 𝐞[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
   refine' NormedAddCommGroup.tendsto_nhds_zero.mpr fun ε hε => _
-  suffices ∃ T : ℝ, ∀ w : V, T ≤ ‖w‖ → ‖∫ v : V, e[-⟪v, w⟫] • f v‖ < ε by
+  suffices ∃ T : ℝ, ∀ w : V, T ≤ ‖w‖ → ‖∫ v : V, 𝐞[-⟪v, w⟫] • f v‖ < ε by
     simp_rw [← comap_dist_left_atTop_eq_cocompact (0 : V), eventually_comap, eventually_atTop,
       dist_eq_norm', sub_zero]
     exact
@@ -214,7 +212,7 @@ variable (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
+    Tendsto (fun w : V => ∫ v, 𝐞[-⟪v, w⟫] • f v) (cocompact V) (𝓝 0) := by
   by_cases hfi : Integrable f; swap
   · convert tendsto_const_nhds (x := (0 : E)) with w
     apply integral_undef
@@ -229,14 +227,14 @@ theorem tendsto_integral_exp_inner_smul_cocompact :
           _ (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
+  have : ‖(∫ v, 𝐞[-⟪v, w⟫] • f v) - ∫ v, 𝐞[-⟪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
+      VectorFourier.norm_fourierIntegral_le_integral_norm 𝐞 volume
         (BilinForm.toLin bilinFormOfRealInner) (f - g) w
   replace := add_lt_add_of_le_of_lt this hI
   rw [add_halves] at this
@@ -246,7 +244,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact :
 
 /-- The Riemann-Lebesgue lemma for functions on `ℝ`. -/
 theorem Real.tendsto_integral_exp_smul_cocompact (f : ℝ → E) :
-    Tendsto (fun w : ℝ => ∫ v : ℝ, e[-(v * w)] • f v) (cocompact ℝ) (𝓝 0) :=
+    Tendsto (fun w : ℝ => ∫ v : ℝ, 𝐞[-(v * w)] • f v) (cocompact ℝ) (𝓝 0) :=
   tendsto_integral_exp_inner_smul_cocompact f
 #align real.tendsto_integral_exp_smul_cocompact Real.tendsto_integral_exp_smul_cocompact
 
@@ -259,13 +257,13 @@ theorem Real.zero_at_infty_fourierIntegral (f : ℝ → E) : Tendsto (𝓕 f) (c
 via dual space. **Do not use** -- it is only a stepping stone to
 `tendsto_integral_exp_smul_cocompact` where the inner-product-space structure isn't required. -/
 theorem tendsto_integral_exp_smul_cocompact_of_inner_product (μ : Measure V) [μ.IsAddHaarMeasure] :
-    Tendsto (fun w : V →L[ℝ] ℝ => ∫ v, e[-w v] • f v ∂μ) (cocompact (V →L[ℝ] ℝ)) (𝓝 0) := by
+    Tendsto (fun w : V →L[ℝ] ℝ => ∫ v, 𝐞[-w v] • f v ∂μ) (cocompact (V →L[ℝ] ℝ)) (𝓝 0) := by
   rw [μ.isAddLeftInvariant_eq_smul volume]
   simp_rw [integral_smul_nnreal_measure]
   rw [← (smul_zero _ : Measure.addHaarScalarFactor μ volume • (0 : E) = 0)]
   apply Tendsto.const_smul
   let A := (InnerProductSpace.toDual ℝ V).symm
-  have : (fun w : V →L[ℝ] ℝ => ∫ v, e[-w v] • f v) = (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) ∘ A := by
+  have : (fun w : V →L[ℝ] ℝ => ∫ v, 𝐞[-w v] • f v) = (fun w : V => ∫ v, 𝐞[-⟪v, w⟫] • f v) ∘ A := by
     ext1 w
     congr 1 with v : 1
     rw [← inner_conj_symm, IsROrC.conj_to_real, InnerProductSpace.toDual_symm_apply]
@@ -286,7 +284,7 @@ variable (f) [AddCommGroup V] [TopologicalSpace V] [TopologicalAddGroup V] [T2Sp
 /-- Riemann-Lebesgue lemma for functions on a finite-dimensional real vector space, formulated via
 dual space. -/
 theorem tendsto_integral_exp_smul_cocompact (μ : Measure V) [μ.IsAddHaarMeasure] :
-    Tendsto (fun w : V →L[ℝ] ℝ => ∫ v, e[-w v] • f v ∂μ) (cocompact (V →L[ℝ] ℝ)) (𝓝 0) := by
+    Tendsto (fun w : V →L[ℝ] ℝ => ∫ v, 𝐞[-w v] • f v ∂μ) (cocompact (V →L[ℝ] ℝ)) (𝓝 0) := by
   -- We have already proved the result for inner-product spaces, formulated in a way which doesn't
   -- refer to the inner product. So we choose an arbitrary inner-product space isomorphic to V
   -- and port the result over from there.
@@ -343,7 +341,7 @@ theorem tendsto_integral_exp_smul_cocompact (μ : Measure V) [μ.IsAddHaarMeasur
 pairing in the definition of `fourier_integral` taken to be the canonical pairing between `V` and
 its dual space). -/
 theorem Real.zero_at_infty_vector_fourierIntegral (μ : Measure V) [μ.IsAddHaarMeasure] :
-    Tendsto (VectorFourier.fourierIntegral e μ (topDualPairing ℝ V).flip f) (cocompact (V →L[ℝ] ℝ))
+    Tendsto (VectorFourier.fourierIntegral 𝐞 μ (topDualPairing ℝ V).flip f) (cocompact (V →L[ℝ] ℝ))
       (𝓝 0) :=
   _root_.tendsto_integral_exp_smul_cocompact f μ
 #align real.zero_at_infty_vector_fourier_integral Real.zero_at_infty_vector_fourierIntegral
chore: prepare Lean version bump with explicit simp (#10999)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -168,7 +168,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support
   --* Show integral can be taken over A only.
   have int_A : ∫ v : V, ‖f v - f (v + i w)‖ = ∫ v in A, ‖f v - f (v + i w)‖ := by
     refine' (set_integral_eq_integral_of_forall_compl_eq_zero fun v hv => _).symm
-    dsimp only at hv
+    dsimp only [A] at hv
     simp only [mem_setOf, not_le] at hv
     rw [hR_bd v _, hR_bd (v + i w) _, sub_zero, norm_zero]
     · rw [← sub_neg_eq_add]
chore: Remove unnecessary "rw"s (#10704)

Remove unnecessary "rw"s.

Diff
@@ -268,8 +268,7 @@ theorem tendsto_integral_exp_smul_cocompact_of_inner_product (μ : Measure V) [
   have : (fun w : V →L[ℝ] ℝ => ∫ v, e[-w v] • f v) = (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) ∘ A := by
     ext1 w
     congr 1 with v : 1
-    rw [← inner_conj_symm, IsROrC.conj_to_real, InnerProductSpace.toDual_symm_apply,
-      Real.fourierChar_apply]
+    rw [← inner_conj_symm, IsROrC.conj_to_real, InnerProductSpace.toDual_symm_apply]
   rw [this]
   exact
     (tendsto_integral_exp_inner_smul_cocompact f).comp
chore: replace Lean 3 syntax λ x, in doc comments (#10727)

Use Lean 4 syntax fun x ↦ instead, matching the style guide. This is close to exhaustive for doc comments; mathlib has about 460 remaining uses of λ (not all in Lean 3 syntax).

Diff
@@ -35,11 +35,11 @@ equivalence to an inner-product space.
 ## Main results
 
 - `tendsto_integral_exp_inner_smul_cocompact` : for `V` a finite-dimensional real inner product
-  space and `f : V → E`, the function `λ w : V, ∫ v : V, exp (2 * π * ⟪w, v⟫ * I) • f v` tends to 0
-  along `cocompact V`.
+  space and `f : V → E`, the function `fun w : V ↦ ∫ v : V, exp (2 * π * ⟪w, v⟫ * I) • f v`
+  tends to 0 along `cocompact V`.
 - `tendsto_integral_exp_smul_cocompact` : for `V` a finite-dimensional real vector space (endowed
   with its unique Hausdorff topological vector space structure), and `W` the dual of `V`, the
-  function `λ w : W, ∫ v : V, exp (2 * π * w v * I) • f v` tends to along `cocompact W`.
+  function `fun w : W ↦ ∫ v : V, exp (2 * π * w v * I) • f v` tends to along `cocompact W`.
 - `Real.tendsto_integral_exp_smul_cocompact`: special case of functions on `ℝ`.
 - `Real.zero_at_infty_fourierIntegral` and `Real.zero_at_infty_vector_fourierIntegral`:
   reformulations explicitly using the Fourier integral.
feat: better uniqueness results for the Haar measure (#9909)

We show that two Haar measures give the same measure to sets with compact closure, and to open sets, without any regularity assumptions. This is based on McQuillan's answer on https://mathoverflow.net/questions/456670.

Diff
@@ -260,7 +260,7 @@ via dual space. **Do not use** -- it is only a stepping stone to
 `tendsto_integral_exp_smul_cocompact` where the inner-product-space structure isn't required. -/
 theorem tendsto_integral_exp_smul_cocompact_of_inner_product (μ : Measure V) [μ.IsAddHaarMeasure] :
     Tendsto (fun w : V →L[ℝ] ℝ => ∫ v, e[-w v] • f v ∂μ) (cocompact (V →L[ℝ] ℝ)) (𝓝 0) := by
-  rw [μ.isAddHaarMeasure_eq_smul volume]
+  rw [μ.isAddLeftInvariant_eq_smul volume]
   simp_rw [integral_smul_nnreal_measure]
   rw [← (smul_zero _ : Measure.addHaarScalarFactor μ volume • (0 : E) = 0)]
   apply Tendsto.const_smul
chore(Topology/Basic): re-use variables; rename a : X to x : X (#9993)

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>

Diff
@@ -216,7 +216,7 @@ variable (f)
 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
+  · convert tendsto_const_nhds (x := (0 : E)) with w
     apply integral_undef
     rwa [← fourier_integrand_integrable w]
   refine' Metric.tendsto_nhds.mpr fun ε hε => _
feat: construct Haar measure in locally compact non-Hausdorff groups (#9746)

The construction we have is given in T2 spaces, but it works in non-Hausdorff spaces modulo a few modifications.

For this, we introduce an ad hoc class T2OrLocallyCompactRegularSpace, which is just enough to unify the arguments, as a replacement for the class ClosableCompactSubsetOpenSpace (which is not strong enough). In the file Separation.lean, we move some material that was only available on T2 spaces to this new class.

The construction is needed for a forthcoming improvement of uniqueness results for Haar measures, based on https://mathoverflow.net/questions/456670/uniqueness-of-left-invariant-borel-probability-measure-on-compact-groups.

Diff
@@ -23,7 +23,7 @@ spaces `V`: if `f` is a function on `V` (valued in a complete normed space `E`),
 Fourier transform of `f`, viewed as a function on the dual space of `V`, tends to 0 along the
 cocompact filter. Here the Fourier transform is defined by
 
-`λ w : V →L[ℝ] ℝ, ∫ (v : V), exp (↑(2 * π * w v) * I) • f x`.
+`fun w : V →L[ℝ] ℝ ↦ ∫ (v : V), exp (↑(2 * π * w v) * I) • f x`.
 
 This is true for arbitrary functions, but is only interesting for `L¹` functions (if `f` is not
 integrable then the integral is zero for all `w`). This is proved first for continuous
@@ -260,10 +260,9 @@ via dual space. **Do not use** -- it is only a stepping stone to
 `tendsto_integral_exp_smul_cocompact` where the inner-product-space structure isn't required. -/
 theorem tendsto_integral_exp_smul_cocompact_of_inner_product (μ : Measure V) [μ.IsAddHaarMeasure] :
     Tendsto (fun w : V →L[ℝ] ℝ => ∫ v, e[-w v] • f v ∂μ) (cocompact (V →L[ℝ] ℝ)) (𝓝 0) := by
-  obtain ⟨C, _, _, hC⟩ := μ.isAddHaarMeasure_eq_smul volume
-  rw [hC]
-  simp_rw [integral_smul_measure]
-  rw [← (smul_zero _ : C.toReal • (0 : E) = 0)]
+  rw [μ.isAddHaarMeasure_eq_smul volume]
+  simp_rw [integral_smul_nnreal_measure]
+  rw [← (smul_zero _ : Measure.addHaarScalarFactor μ volume • (0 : E) = 0)]
   apply Tendsto.const_smul
   let A := (InnerProductSpace.toDual ℝ V).symm
   have : (fun w : V →L[ℝ] ℝ => ∫ v, e[-w v] • f v) = (fun w : V => ∫ v, e[-⟪v, w⟫] • f v) ∘ A := by
feat: uniqueness of Haar measure in general locally compact groups (#8198)

We prove that two regular Haar measures in a locally compact group coincide up to scalar multiplication, and the same thing for inner regular Haar measures. This is implemented in a new file MeasureTheory.Measure.Haar.Unique. A few results that used to be in the MeasureTheory.Measure.Haar.Basic are moved to this file (and extended) so several imports have to be changed.

Diff
@@ -11,6 +11,7 @@ import Mathlib.MeasureTheory.Group.Integral
 import Mathlib.MeasureTheory.Integral.SetIntegral
 import Mathlib.MeasureTheory.Measure.Haar.NormedSpace
 import Mathlib.Topology.EMetricSpace.Paracompact
+import Mathlib.MeasureTheory.Measure.Haar.Unique
 
 #align_import analysis.fourier.riemann_lebesgue_lemma from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
 
@@ -259,7 +260,7 @@ via dual space. **Do not use** -- it is only a stepping stone to
 `tendsto_integral_exp_smul_cocompact` where the inner-product-space structure isn't required. -/
 theorem tendsto_integral_exp_smul_cocompact_of_inner_product (μ : Measure V) [μ.IsAddHaarMeasure] :
     Tendsto (fun w : V →L[ℝ] ℝ => ∫ v, e[-w v] • f v ∂μ) (cocompact (V →L[ℝ] ℝ)) (𝓝 0) := by
-  obtain ⟨C, _, _, hC⟩ := μ.isAddHaarMeasure_eq_smul_isAddHaarMeasure volume
+  obtain ⟨C, _, _, hC⟩ := μ.isAddHaarMeasure_eq_smul volume
   rw [hC]
   simp_rw [integral_smul_measure]
   rw [← (smul_zero _ : C.toReal • (0 : E) = 0)]
chore: bump to v4.3.0-rc2 (#8366)

PR contents

This is the supremum of

along with some minor fixes from failures on nightly-testing as Mathlib master is merged into it.

Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.

I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0 branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.

Lean PRs involved in this bump

In particular this includes adjustments for the Lean PRs

leanprover/lean4#2778

We can get rid of all the

local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)

macros across Mathlib (and in any projects that want to write natural number powers of reals).

leanprover/lean4#2722

Changes the default behaviour of simp to (config := {decide := false}). This makes simp (and consequentially norm_num) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp or norm_num to decide or rfl, or adding (config := {decide := true}).

leanprover/lean4#2783

This changed the behaviour of simp so that simp [f] will only unfold "fully applied" occurrences of f. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true }). We may in future add a syntax for this, e.g. simp [!f]; please provide feedback! In the meantime, we have made the following changes:

  • switching to using explicit lemmas that have the intended level of application
  • (config := { unfoldPartialApp := true }) in some places, to recover the old behaviour
  • Using @[eqns] to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp and Function.flip.

This change in Lean may require further changes down the line (e.g. adding the !f syntax, and/or upstreaming the special treatment for Function.comp and Function.flip, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!

Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>

Diff
@@ -44,8 +44,6 @@ equivalence to an inner-product space.
   reformulations explicitly using the Fourier integral.
 -/
 
-local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue lean4#2220
-
 noncomputable section
 
 open MeasureTheory Filter Complex Set FiniteDimensional
@@ -72,9 +70,7 @@ theorem fourier_integrand_integrable (w : V) :
 
 variable [CompleteSpace E]
 
--- Porting note: binary operations appear not to work?
--- local notation "i" => fun w => (1 / (2 * ‖w‖ ^ 2)) • w
-local notation "i" => fun (w : V) => HDiv.hDiv (1 : ℝ) (HMul.hMul (2 : ℝ) (HPow.hPow ‖w‖ 2)) • w
+local notation3 "i" => fun (w : V) => (1 / (2 * ‖w‖ ^ 2) : ℝ) • w
 
 /-- Shifting `f` by `(1 / (2 * ‖w‖ ^ 2)) • w` negates the integral in the Riemann-Lebesgue lemma. -/
 theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
chore: move 2 files to a new folder (#6853)

Later I'm going to split files like Lipschitz into 2: one in EMetricSpace/ and one in MetricSpace/.

Diff
@@ -10,7 +10,7 @@ import Mathlib.MeasureTheory.Function.ContinuousMapDense
 import Mathlib.MeasureTheory.Group.Integral
 import Mathlib.MeasureTheory.Integral.SetIntegral
 import Mathlib.MeasureTheory.Measure.Haar.NormedSpace
-import Mathlib.Topology.MetricSpace.EMetricParacompact
+import Mathlib.Topology.EMetricSpace.Paracompact
 
 #align_import analysis.fourier.riemann_lebesgue_lemma from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
 
refactor: split MeasureTheory.Group.Integration (#6715)

I want to use the lemma lintegral_add_right_eq_self in a file that doesn't import Bochner integration.

Diff
@@ -7,7 +7,7 @@ import Mathlib.Analysis.Fourier.FourierTransform
 import Mathlib.Analysis.InnerProductSpace.Dual
 import Mathlib.Analysis.InnerProductSpace.EuclideanDist
 import Mathlib.MeasureTheory.Function.ContinuousMapDense
-import Mathlib.MeasureTheory.Group.Integration
+import Mathlib.MeasureTheory.Group.Integral
 import Mathlib.MeasureTheory.Integral.SetIntegral
 import Mathlib.MeasureTheory.Measure.Haar.NormedSpace
 import Mathlib.Topology.MetricSpace.EMetricParacompact
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -52,7 +52,7 @@ open MeasureTheory Filter Complex Set FiniteDimensional
 
 open scoped Filter Topology Real ENNReal FourierTransform RealInnerProductSpace NNReal
 
-variable {E V : Type _} [NormedAddCommGroup E] [NormedSpace ℂ E] {f : V → E}
+variable {E V : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] {f : V → E}
 
 local notation "e" => Real.fourierChar
 
chore: regularize HPow.hPow porting notes (#6465)
Diff
@@ -44,7 +44,7 @@ equivalence to an inner-product space.
   reformulations explicitly using the Fourier integral.
 -/
 
-local macro_rules | `($x ^ $y)   => `(HPow.hPow $x $y) -- Porting note: See issue #2220
+local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue lean4#2220
 
 noncomputable section
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2022 David Loeffler. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: David Loeffler
-
-! This file was ported from Lean 3 source module analysis.fourier.riemann_lebesgue_lemma
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.Fourier.FourierTransform
 import Mathlib.Analysis.InnerProductSpace.Dual
@@ -17,6 +12,8 @@ import Mathlib.MeasureTheory.Integral.SetIntegral
 import Mathlib.MeasureTheory.Measure.Haar.NormedSpace
 import Mathlib.Topology.MetricSpace.EMetricParacompact
 
+#align_import analysis.fourier.riemann_lebesgue_lemma from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
+
 /-!
 # The Riemann-Lebesgue Lemma
 
feat(MeasureTheory.Integral.Bochner): drop completeness requirement from the definition (#5910)

The notion of Bochner integral of a function taking values in a normed space E requires that E is complete. This means that whenever we write down an integral, the term contains the assertion that E is complete.

In this PR, we remove the completeness requirement from the definition, using the junk value 0 when the space is not complete. Mathematically this does not make any difference, as all reasonable applications will be with a complete E. But it means that terms involving integrals become a little bit simpler and that completeness will not have to be checked by the system when applying a bunch of basic lemmas on integrals.

Diff
@@ -100,7 +100,7 @@ theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
   -- rw [integral_add_right_eq_self (fun (x : V) ↦ -(e[-⟪x, w⟫]) • f x)
   --       ((fun w ↦ (1 / (2 * ‖w‖ ^ (2 : ℕ))) • w) w)]
   -- Unfortunately now we need to specify `volume`, and call `dsimp`.
-  have := @integral_add_right_eq_self _ _ _ _ _ _ volume _ _ _ (fun (x : V) ↦ -(e[-⟪x, w⟫]) • f x)
+  have := @integral_add_right_eq_self _ _ _ _ _ volume _ _ _ (fun (x : V) ↦ -(e[-⟪x, w⟫]) • f x)
     ((fun w ↦ (1 / (2 * ‖w‖ ^ (2 : ℕ))) • w) w)
   erw [this] -- Porting note, we can avoid `erw` by first calling `dsimp at this ⊢`.
   simp only [neg_smul, integral_neg]
chore: remove superfluous parentheses around integrals (#5591)
Diff
@@ -109,7 +109,7 @@ theorem fourier_integral_half_period_translate {w : V} (hw : w ≠ 0) :
 /-- Rewrite the Fourier integral in a form that allows us to use uniform continuity. -/
 theorem fourier_integral_eq_half_sub_half_period_translate {w : V} (hw : w ≠ 0)
     (hf : Integrable f) :
-    (∫ v : V, e[-⟪v, w⟫] • f v) = (1 / (2 : ℂ)) • ∫ v : V, e[-⟪v, w⟫] • (f v - f (v + i w)) := by
+    ∫ v : V, e[-⟪v, w⟫] • f v = (1 / (2 : ℂ)) • ∫ v : V, e[-⟪v, w⟫] • (f v - f (v + i w)) := by
   simp_rw [smul_sub]
   rw [integral_sub, fourier_integral_half_period_translate hw, sub_eq_add_neg, neg_neg, ←
     two_smul ℂ _, ← @smul_assoc _ _ _ _ _ _ (IsScalarTower.left ℂ), smul_eq_mul]
feat: port Analysis.Fourier.RiemannLebesgueLemma (#4950)

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au>

Dependencies 12 + 1051

1052 files ported (98.9%)
476007 lines ported (98.8%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file