analysis.fourier.add_circleMathlib.Analysis.Fourier.AddCircle

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -184,7 +184,7 @@ theorem fourier_coe_apply {n : ℤ} {x : ℝ} :
   by
   rw [fourier_apply, ← QuotientAddGroup.mk_zsmul, to_circle, Function.Periodic.lift_coe,
     expMapCircle_apply, Complex.ofReal_mul, Complex.ofReal_div, Complex.ofReal_mul, zsmul_eq_mul,
-    Complex.ofReal_mul, Complex.ofReal_int_cast, Complex.of_real_bit0, Complex.ofReal_one]
+    Complex.ofReal_mul, Complex.ofReal_intCast, Complex.of_real_bit0, Complex.ofReal_one]
   congr 1; ring
 #align fourier_coe_apply fourier_coe_apply
 -/
Diff
@@ -5,10 +5,10 @@ Authors: Heather Macbeth, David Loeffler
 -/
 import Analysis.SpecialFunctions.ExpDeriv
 import Analysis.SpecialFunctions.Complex.Circle
-import Analysis.InnerProductSpace.L2Space
+import Analysis.InnerProductSpace.l2Space
 import MeasureTheory.Function.ContinuousMapDense
 import MeasureTheory.Function.L2Space
-import MeasureTheory.Group.Integration
+import MeasureTheory.Group.Integral
 import MeasureTheory.Integral.Periodic
 import Topology.ContinuousFunction.StoneWeierstrass
 import MeasureTheory.Integral.FundThmCalculus
@@ -83,7 +83,7 @@ theorem scaled_exp_map_periodic : Function.Periodic (fun x => expMapCircle (2 *
   -- The case T = 0 is not interesting, but it is true, so we prove it to save hypotheses
   rcases eq_or_ne T 0 with (rfl | hT)
   · intro x; simp
-  · intro x; simp_rw [mul_add]; rw [div_mul_cancel _ hT, periodic_expMapCircle]
+  · intro x; simp_rw [mul_add]; rw [div_mul_cancel₀ _ hT, periodic_expMapCircle]
 #align add_circle.scaled_exp_map_periodic AddCircle.scaled_exp_map_periodic
 -/
 
@@ -184,7 +184,7 @@ theorem fourier_coe_apply {n : ℤ} {x : ℝ} :
   by
   rw [fourier_apply, ← QuotientAddGroup.mk_zsmul, to_circle, Function.Periodic.lift_coe,
     expMapCircle_apply, Complex.ofReal_mul, Complex.ofReal_div, Complex.ofReal_mul, zsmul_eq_mul,
-    Complex.ofReal_mul, Complex.ofReal_int_cast, Complex.ofReal_bit0, Complex.ofReal_one]
+    Complex.ofReal_mul, Complex.ofReal_int_cast, Complex.of_real_bit0, Complex.ofReal_one]
   congr 1; ring
 #align fourier_coe_apply fourier_coe_apply
 -/
@@ -439,12 +439,12 @@ theorem fourierCoeffOn_eq_integral {a b : ℝ} (f : ℝ → E) (n : ℤ) (hab :
   by
   rw [fourierCoeffOn, fourierCoeff_eq_intervalIntegral _ _ a]
   congr 1
-  rw [add_sub, add_sub_cancel']
+  rw [add_sub, add_sub_cancel_left]
   simp_rw [intervalIntegral.integral_of_le hab.le]
   refine' set_integral_congr measurableSet_Ioc fun x hx => _
   dsimp only
   rwa [lift_Ioc_coe_apply]
-  rwa [add_sub, add_sub_cancel']
+  rwa [add_sub, add_sub_cancel_left]
 #align fourier_coeff_on_eq_integral fourierCoeffOn_eq_integral
 -/
 
@@ -465,7 +465,7 @@ theorem fourierCoeffOn.const_mul {a b : ℝ} (f : ℝ → ℂ) (c : ℂ) (n : 
 theorem fourierCoeff_liftIoc_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
     fourierCoeff (AddCircle.liftIoc T a f) n = fourierCoeffOn (lt_add_of_pos_right a hT.out) f n :=
   by
-  rw [fourierCoeffOn_eq_integral, fourierCoeff_eq_intervalIntegral, add_sub_cancel' a T]
+  rw [fourierCoeffOn_eq_integral, fourierCoeff_eq_intervalIntegral, add_sub_cancel_left a T]
   congr 1
   refine' intervalIntegral.integral_congr_ae (ae_of_all _ fun x hx => _)
   rw [lift_Ioc_coe_apply]
@@ -477,7 +477,7 @@ theorem fourierCoeff_liftIoc_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
 theorem fourierCoeff_liftIco_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
     fourierCoeff (AddCircle.liftIco T a f) n = fourierCoeffOn (lt_add_of_pos_right a hT.out) f n :=
   by
-  rw [fourierCoeffOn_eq_integral, fourierCoeff_eq_intervalIntegral _ _ a, add_sub_cancel' a T]
+  rw [fourierCoeffOn_eq_integral, fourierCoeff_eq_intervalIntegral _ _ a, add_sub_cancel_left a T]
   congr 1
   simp_rw [intervalIntegral.integral_of_le (lt_add_of_pos_right a hT.out).le,
     integral_Ioc_eq_integral_Ioo]
@@ -543,7 +543,7 @@ theorem tsum_sq_fourierCoeff (f : Lp ℂ 2 <| @haarAddCircle T hT) :
     exact_mod_cast lp.norm_rpow_eq_tsum _ (fourier_basis.repr f)
     norm_num
   have H₂ : ‖fourier_basis.repr f‖ ^ 2 = ‖f‖ ^ 2 := by simp
-  have H₃ := congr_arg IsROrC.re (@L2.inner_def (AddCircle T) ℂ ℂ _ _ _ _ _ f f)
+  have H₃ := congr_arg RCLike.re (@L2.inner_def (AddCircle T) ℂ ℂ _ _ _ _ _ f f)
   rw [← integral_re] at H₃
   · simp only [← norm_sq_eq_inner] at H₃
     rw [← H₁, H₂, H₃]
@@ -633,7 +633,7 @@ theorem has_antideriv_at_fourier_neg (hT : Fact (0 < T)) {n : ℤ} (hn : n ≠ 0
   by
   convert (hasDerivAt_fourier_neg T n x).div_const (-2 * π * I * n / T) using 1
   · ext1 y; rw [div_div_eq_mul_div]; ring
-  · rw [mul_div_cancel_left]
+  · rw [mul_div_cancel_left₀]
     simp only [Ne.def, div_eq_zero_iff, neg_eq_zero, mul_eq_zero, bit0_eq_zero, one_ne_zero,
       of_real_eq_zero, false_or_iff, Int.cast_eq_zero, not_or]
     exact ⟨⟨⟨Real.pi_ne_zero, I_ne_zero⟩, hn⟩, hT.out.ne'⟩
Diff
@@ -118,11 +118,11 @@ theorem injective_toCircle (hT : T ≠ 0) : Function.Injective (@toCircle T) :=
   intro a b h
   induction a using QuotientAddGroup.induction_on'
   induction b using QuotientAddGroup.induction_on'
-  simp_rw [to_circle, Function.Periodic.lift_coe] at h 
+  simp_rw [to_circle, Function.Periodic.lift_coe] at h
   obtain ⟨m, hm⟩ := exp_map_circle_eq_exp_map_circle.mp h.symm
   simp_rw [QuotientAddGroup.eq, AddSubgroup.mem_zmultiples_iff, zsmul_eq_mul]
   use m
-  field_simp [real.two_pi_pos.ne'] at hm 
+  field_simp [real.two_pi_pos.ne'] at hm
   rw [← mul_right_inj' real.two_pi_pos.ne']
   linarith
 #align add_circle.injective_to_circle AddCircle.injective_toCircle
@@ -302,7 +302,7 @@ theorem fourierSubalgebra_separatesPoints : (@fourierSubalgebra T).SeparatesPoin
   refine' ⟨_, ⟨fourier 1, subset_adjoin ⟨1, rfl⟩, rfl⟩, _⟩
   dsimp only; rw [fourier_one, fourier_one]
   contrapose! hxy
-  rw [Subtype.coe_inj] at hxy 
+  rw [Subtype.coe_inj] at hxy
   exact injective_to_circle hT.elim.ne' hxy
 #align fourier_subalgebra_separates_points fourierSubalgebra_separatesPoints
 -/
@@ -469,7 +469,7 @@ theorem fourierCoeff_liftIoc_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
   congr 1
   refine' intervalIntegral.integral_congr_ae (ae_of_all _ fun x hx => _)
   rw [lift_Ioc_coe_apply]
-  rwa [uIoc_of_le (lt_add_of_pos_right a hT.out).le] at hx 
+  rwa [uIoc_of_le (lt_add_of_pos_right a hT.out).le] at hx
 #align fourier_coeff_lift_Ioc_eq fourierCoeff_liftIoc_eq
 -/
 
@@ -544,8 +544,8 @@ theorem tsum_sq_fourierCoeff (f : Lp ℂ 2 <| @haarAddCircle T hT) :
     norm_num
   have H₂ : ‖fourier_basis.repr f‖ ^ 2 = ‖f‖ ^ 2 := by simp
   have H₃ := congr_arg IsROrC.re (@L2.inner_def (AddCircle T) ℂ ℂ _ _ _ _ _ f f)
-  rw [← integral_re] at H₃ 
-  · simp only [← norm_sq_eq_inner] at H₃ 
+  rw [← integral_re] at H₃
+  · simp only [← norm_sq_eq_inner] at H₃
     rw [← H₁, H₂, H₃]
   · exact L2.integrable_inner f f
 #align tsum_sq_fourier_coeff tsum_sq_fourierCoeff
@@ -574,7 +574,7 @@ theorem hasSum_fourier_series_of_summable (h : Summable (fourierCoeff f)) :
     HasSum (fun i => fourierCoeff f i • fourier i) f :=
   by
   have sum_L2 := hasSum_fourier_series_L2 (to_Lp 2 haar_add_circle ℂ f)
-  simp_rw [fourierCoeff_toLp] at sum_L2 
+  simp_rw [fourierCoeff_toLp] at sum_L2
   refine' ContinuousMap.hasSum_of_hasSum_Lp (Summable.of_norm _) sum_L2
   simp_rw [norm_smul, fourier_norm, mul_one, summable_norm_iff]
   exact h
Diff
@@ -586,7 +586,7 @@ theorem hasSum_fourier_series_of_summable (h : Summable (fourierCoeff f)) :
 converges everywhere pointwise to `f`. -/
 theorem has_pointwise_sum_fourier_series_of_summable (h : Summable (fourierCoeff f))
     (x : AddCircle T) : HasSum (fun i => fourierCoeff f i • fourier i x) (f x) :=
-  (ContinuousMap.evalClm ℂ x).HasSum (hasSum_fourier_series_of_summable h)
+  (ContinuousMap.evalCLM ℂ x).HasSum (hasSum_fourier_series_of_summable h)
 #align has_pointwise_sum_fourier_series_of_summable has_pointwise_sum_fourier_series_of_summable
 -/
 
Diff
@@ -608,8 +608,8 @@ theorem hasDerivAt_fourier (n : ℤ) (x : ℝ) :
       (2 * π * I * n / T * fourier n (x : AddCircle T)) x :=
   by
   simp_rw [fourier_coe_apply]
-  refine' (_ : HasDerivAt (fun y => exp (2 * π * I * n * y / T)) _ _).comp_ofReal
-  rw [(fun α β => by ring : ∀ α β : ℂ, α * exp β = exp β * α)]
+  refine' (_ : HasDerivAt (fun y => NormedSpace.exp (2 * π * I * n * y / T)) _ _).comp_ofReal
+  rw [(fun α β => by ring : ∀ α β : ℂ, α * NormedSpace.exp β = NormedSpace.exp β * α)]
   refine' (hasDerivAt_exp _).comp x _
   convert hasDerivAt_mul_const (2 * ↑π * I * ↑n / T)
   ext1 y; ring
Diff
@@ -575,7 +575,7 @@ theorem hasSum_fourier_series_of_summable (h : Summable (fourierCoeff f)) :
   by
   have sum_L2 := hasSum_fourier_series_L2 (to_Lp 2 haar_add_circle ℂ f)
   simp_rw [fourierCoeff_toLp] at sum_L2 
-  refine' ContinuousMap.hasSum_of_hasSum_Lp (summable_of_summable_norm _) sum_L2
+  refine' ContinuousMap.hasSum_of_hasSum_Lp (Summable.of_norm _) sum_L2
   simp_rw [norm_smul, fourier_norm, mul_one, summable_norm_iff]
   exact h
 #align has_sum_fourier_series_of_summable hasSum_fourier_series_of_summable
Diff
@@ -3,15 +3,15 @@ Copyright (c) 2021 Heather Macbeth. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Heather Macbeth, David Loeffler
 -/
-import Mathbin.Analysis.SpecialFunctions.ExpDeriv
-import Mathbin.Analysis.SpecialFunctions.Complex.Circle
-import Mathbin.Analysis.InnerProductSpace.L2Space
-import Mathbin.MeasureTheory.Function.ContinuousMapDense
-import Mathbin.MeasureTheory.Function.L2Space
-import Mathbin.MeasureTheory.Group.Integration
-import Mathbin.MeasureTheory.Integral.Periodic
-import Mathbin.Topology.ContinuousFunction.StoneWeierstrass
-import Mathbin.MeasureTheory.Integral.FundThmCalculus
+import Analysis.SpecialFunctions.ExpDeriv
+import Analysis.SpecialFunctions.Complex.Circle
+import Analysis.InnerProductSpace.L2Space
+import MeasureTheory.Function.ContinuousMapDense
+import MeasureTheory.Function.L2Space
+import MeasureTheory.Group.Integration
+import MeasureTheory.Integral.Periodic
+import Topology.ContinuousFunction.StoneWeierstrass
+import MeasureTheory.Integral.FundThmCalculus
 
 #align_import analysis.fourier.add_circle from "leanprover-community/mathlib"@"e8e130de9dba4ed6897183c3193c752ffadbcc77"
 
Diff
@@ -281,17 +281,15 @@ theorem fourierSubalgebra_coe : (@fourierSubalgebra T).toSubmodule = span ℂ (r
 #align fourier_subalgebra_coe fourierSubalgebra_coe
 -/
 
-#print fourierSubalgebra_conj_invariant /-
 /-- The subalgebra of `C(add_circle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is invariant under
 complex conjugation. -/
-theorem fourierSubalgebra_conj_invariant :
+theorem fourierSubalgebraConjInvariant :
     ConjInvariantSubalgebra ((@fourierSubalgebra T).restrictScalars ℝ) :=
   by
   apply subalgebra_conj_invariant
   rintro _ ⟨n, rfl⟩
   exact ⟨-n, ext fun _ => fourier_neg⟩
-#align fourier_subalgebra_conj_invariant fourierSubalgebra_conj_invariant
--/
+#align fourier_subalgebra_conj_invariant fourierSubalgebraConjInvariant
 
 variable [hT : Fact (0 < T)]
 
@@ -312,8 +310,8 @@ theorem fourierSubalgebra_separatesPoints : (@fourierSubalgebra T).SeparatesPoin
 #print fourierSubalgebra_closure_eq_top /-
 /-- The subalgebra of `C(add_circle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is dense. -/
 theorem fourierSubalgebra_closure_eq_top : (@fourierSubalgebra T).topologicalClosure = ⊤ :=
-  ContinuousMap.subalgebra_isROrC_topologicalClosure_eq_top_of_separatesPoints fourierSubalgebra
-    fourierSubalgebra_separatesPoints fourierSubalgebra_conj_invariant
+  ContinuousMap.starSubalgebra_topologicalClosure_eq_top_of_separatesPoints fourierSubalgebra
+    fourierSubalgebra_separatesPoints fourierSubalgebraConjInvariant
 #align fourier_subalgebra_closure_eq_top fourierSubalgebra_closure_eq_top
 -/
 
Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2021 Heather Macbeth. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Heather Macbeth, David Loeffler
-
-! This file was ported from Lean 3 source module analysis.fourier.add_circle
-! leanprover-community/mathlib commit e8e130de9dba4ed6897183c3193c752ffadbcc77
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.SpecialFunctions.ExpDeriv
 import Mathbin.Analysis.SpecialFunctions.Complex.Circle
@@ -18,6 +13,8 @@ import Mathbin.MeasureTheory.Integral.Periodic
 import Mathbin.Topology.ContinuousFunction.StoneWeierstrass
 import Mathbin.MeasureTheory.Integral.FundThmCalculus
 
+#align_import analysis.fourier.add_circle from "leanprover-community/mathlib"@"e8e130de9dba4ed6897183c3193c752ffadbcc77"
+
 /-!
 
 # Fourier analysis on the additive circle
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Heather Macbeth, David Loeffler
 
 ! This file was ported from Lean 3 source module analysis.fourier.add_circle
-! leanprover-community/mathlib commit 8f9fea08977f7e450770933ee6abb20733b47c92
+! leanprover-community/mathlib commit e8e130de9dba4ed6897183c3193c752ffadbcc77
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -22,6 +22,9 @@ import Mathbin.MeasureTheory.Integral.FundThmCalculus
 
 # Fourier analysis on the additive circle
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file contains basic results on Fourier series for functions on the additive circle
 `add_circle T = ℝ / ℤ • T`.
 
Diff
@@ -77,6 +77,7 @@ namespace AddCircle
 /-! ### Map from `add_circle` to `circle` -/
 
 
+#print AddCircle.scaled_exp_map_periodic /-
 theorem scaled_exp_map_periodic : Function.Periodic (fun x => expMapCircle (2 * π / T * x)) T :=
   by
   -- The case T = 0 is not interesting, but it is true, so we prove it to save hypotheses
@@ -84,13 +85,17 @@ theorem scaled_exp_map_periodic : Function.Periodic (fun x => expMapCircle (2 *
   · intro x; simp
   · intro x; simp_rw [mul_add]; rw [div_mul_cancel _ hT, periodic_expMapCircle]
 #align add_circle.scaled_exp_map_periodic AddCircle.scaled_exp_map_periodic
+-/
 
+#print AddCircle.toCircle /-
 /-- The canonical map `λ x, exp (2 π i x / T)` from `ℝ / ℤ • T` to the unit circle in `ℂ`.
 If `T = 0` we understand this as the constant function 1. -/
 def toCircle : AddCircle T → circle :=
   (@scaled_exp_map_periodic T).lift
 #align add_circle.to_circle AddCircle.toCircle
+-/
 
+#print AddCircle.toCircle_add /-
 theorem toCircle_add (x : AddCircle T) (y : AddCircle T) :
     toCircle (x + y) = toCircle x * toCircle y :=
   by
@@ -99,11 +104,15 @@ theorem toCircle_add (x : AddCircle T) (y : AddCircle T) :
   simp_rw [← QuotientAddGroup.mk_add, to_circle, Function.Periodic.lift_coe, mul_add,
     expMapCircle_add]
 #align add_circle.to_circle_add AddCircle.toCircle_add
+-/
 
+#print AddCircle.continuous_toCircle /-
 theorem continuous_toCircle : Continuous (@toCircle T) :=
   continuous_coinduced_dom.mpr (expMapCircle.Continuous.comp <| continuous_const.mul continuous_id')
 #align add_circle.continuous_to_circle AddCircle.continuous_toCircle
+-/
 
+#print AddCircle.injective_toCircle /-
 theorem injective_toCircle (hT : T ≠ 0) : Function.Injective (@toCircle T) :=
   by
   intro a b h
@@ -117,6 +126,7 @@ theorem injective_toCircle (hT : T ≠ 0) : Function.Injective (@toCircle T) :=
   rw [← mul_right_inj' real.two_pi_pos.ne']
   linarith
 #align add_circle.injective_to_circle AddCircle.injective_toCircle
+-/
 
 /-! ### Measure on `add_circle T`
 
@@ -126,19 +136,23 @@ In this file we use the Haar measure on `add_circle T` normalised to have total
 
 variable [hT : Fact (0 < T)]
 
+#print AddCircle.haarAddCircle /-
 /-- Haar measure on the additive circle, normalised to have total measure 1. -/
 def haarAddCircle : Measure (AddCircle T) :=
   addHaarMeasure ⊤
 deriving IsAddHaarMeasure
 #align add_circle.haar_add_circle AddCircle.haarAddCircle
+-/
 
 instance : IsProbabilityMeasure (@haarAddCircle T _) :=
   IsProbabilityMeasure.mk addHaarMeasure_self
 
+#print AddCircle.volume_eq_smul_haarAddCircle /-
 theorem volume_eq_smul_haarAddCircle :
     (volume : Measure (AddCircle T)) = ENNReal.ofReal T • haarAddCircle :=
   rfl
 #align add_circle.volume_eq_smul_haar_add_circle AddCircle.volume_eq_smul_haarAddCircle
+-/
 
 end AddCircle
 
@@ -146,6 +160,7 @@ open AddCircle
 
 section Monomials
 
+#print fourier /-
 /-- The family of exponential monomials `λ x, exp (2 π i n x / T)`, parametrized by `n : ℤ` and
 considered as bundled continuous maps from `ℝ / ℤ • T` to `ℂ`. -/
 def fourier (n : ℤ) : C(AddCircle T, ℂ)
@@ -153,12 +168,16 @@ def fourier (n : ℤ) : C(AddCircle T, ℂ)
   toFun x := toCircle (n • x)
   continuous_toFun := continuous_induced_dom.comp <| continuous_toCircle.comp <| continuous_zsmul _
 #align fourier fourier
+-/
 
+#print fourier_apply /-
 @[simp]
 theorem fourier_apply {n : ℤ} {x : AddCircle T} : fourier n x = toCircle (n • x) :=
   rfl
 #align fourier_apply fourier_apply
+-/
 
+#print fourier_coe_apply /-
 @[simp]
 theorem fourier_coe_apply {n : ℤ} {x : ℝ} :
     fourier n (x : AddCircle T) = Complex.exp (2 * π * Complex.I * n * x / T) :=
@@ -168,7 +187,9 @@ theorem fourier_coe_apply {n : ℤ} {x : ℝ} :
     Complex.ofReal_mul, Complex.ofReal_int_cast, Complex.ofReal_bit0, Complex.ofReal_one]
   congr 1; ring
 #align fourier_coe_apply fourier_coe_apply
+-/
 
+#print fourier_zero /-
 @[simp]
 theorem fourier_zero {x : AddCircle T} : fourier 0 x = 1 :=
   by
@@ -176,17 +197,23 @@ theorem fourier_zero {x : AddCircle T} : fourier 0 x = 1 :=
   simp only [fourier_coe_apply, algebraMap.coe_zero, MulZeroClass.mul_zero, MulZeroClass.zero_mul,
     zero_div, Complex.exp_zero]
 #align fourier_zero fourier_zero
+-/
 
+#print fourier_eval_zero /-
 @[simp]
 theorem fourier_eval_zero (n : ℤ) : fourier n (0 : AddCircle T) = 1 := by
   rw [← QuotientAddGroup.mk_zero, fourier_coe_apply, Complex.ofReal_zero, MulZeroClass.mul_zero,
     zero_div, Complex.exp_zero]
 #align fourier_eval_zero fourier_eval_zero
+-/
 
+#print fourier_one /-
 @[simp]
 theorem fourier_one {x : AddCircle T} : fourier 1 x = toCircle x := by rw [fourier_apply, one_zsmul]
 #align fourier_one fourier_one
+-/
 
+#print fourier_neg /-
 @[simp]
 theorem fourier_neg {n : ℤ} {x : AddCircle T} : fourier (-n) x = conj (fourier n x) :=
   by
@@ -194,12 +221,16 @@ theorem fourier_neg {n : ℤ} {x : AddCircle T} : fourier (-n) x = conj (fourier
   simp_rw [fourier_apply, to_circle, ← QuotientAddGroup.mk_zsmul, Function.Periodic.lift_coe, ←
     coe_inv_circle_eq_conj, ← expMapCircle_neg, neg_smul, mul_neg]
 #align fourier_neg fourier_neg
+-/
 
+#print fourier_add /-
 @[simp]
 theorem fourier_add {m n : ℤ} {x : AddCircle T} : fourier (m + n) x = fourier m x * fourier n x :=
   by simp_rw [fourier_apply, add_zsmul, to_circle_add, coe_mul_unitSphere]
 #align fourier_add fourier_add
+-/
 
+#print fourier_norm /-
 theorem fourier_norm [Fact (0 < T)] (n : ℤ) : ‖@fourier T n‖ = 1 :=
   by
   rw [ContinuousMap.norm_eq_iSup_norm]
@@ -207,7 +238,9 @@ theorem fourier_norm [Fact (0 < T)] (n : ℤ) : ‖@fourier T n‖ = 1 :=
   simp_rw [this]
   exact @ciSup_const _ _ _ Zero.nonempty _
 #align fourier_norm fourier_norm
+-/
 
+#print fourier_add_half_inv_index /-
 /-- For `n ≠ 0`, a translation by `T / 2 / n` negates the function `fourier n`. -/
 theorem fourier_add_half_inv_index {n : ℤ} (hn : n ≠ 0) (hT : 0 < T) (x : AddCircle T) :
     fourier n (x + (T / 2 / n : ℝ)) = -fourier n x :=
@@ -222,12 +255,16 @@ theorem fourier_add_half_inv_index {n : ℤ} (hn : n ≠ 0) (hT : 0 < T) (x : Ad
     field_simp; ring
   rw [this]; simp
 #align fourier_add_half_inv_index fourier_add_half_inv_index
+-/
 
+#print fourierSubalgebra /-
 /-- The subalgebra of `C(add_circle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` . -/
 def fourierSubalgebra : Subalgebra ℂ C(AddCircle T, ℂ) :=
   Algebra.adjoin ℂ (range fourier)
 #align fourier_subalgebra fourierSubalgebra
+-/
 
+#print fourierSubalgebra_coe /-
 /-- The subalgebra of `C(add_circle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is in fact the
 linear span of these functions. -/
 theorem fourierSubalgebra_coe : (@fourierSubalgebra T).toSubmodule = span ℂ (range fourier) :=
@@ -242,7 +279,9 @@ theorem fourierSubalgebra_coe : (@fourierSubalgebra T).toSubmodule = span ℂ (r
     exact fourier_add
   · ext1 z; exact fourier_zero
 #align fourier_subalgebra_coe fourierSubalgebra_coe
+-/
 
+#print fourierSubalgebra_conj_invariant /-
 /-- The subalgebra of `C(add_circle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is invariant under
 complex conjugation. -/
 theorem fourierSubalgebra_conj_invariant :
@@ -252,9 +291,11 @@ theorem fourierSubalgebra_conj_invariant :
   rintro _ ⟨n, rfl⟩
   exact ⟨-n, ext fun _ => fourier_neg⟩
 #align fourier_subalgebra_conj_invariant fourierSubalgebra_conj_invariant
+-/
 
 variable [hT : Fact (0 < T)]
 
+#print fourierSubalgebra_separatesPoints /-
 /-- The subalgebra of `C(add_circle T, ℂ)` generated by `fourier n` for `n ∈ ℤ`
 separates points. -/
 theorem fourierSubalgebra_separatesPoints : (@fourierSubalgebra T).SeparatesPoints :=
@@ -266,31 +307,41 @@ theorem fourierSubalgebra_separatesPoints : (@fourierSubalgebra T).SeparatesPoin
   rw [Subtype.coe_inj] at hxy 
   exact injective_to_circle hT.elim.ne' hxy
 #align fourier_subalgebra_separates_points fourierSubalgebra_separatesPoints
+-/
 
+#print fourierSubalgebra_closure_eq_top /-
 /-- The subalgebra of `C(add_circle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is dense. -/
 theorem fourierSubalgebra_closure_eq_top : (@fourierSubalgebra T).topologicalClosure = ⊤ :=
   ContinuousMap.subalgebra_isROrC_topologicalClosure_eq_top_of_separatesPoints fourierSubalgebra
     fourierSubalgebra_separatesPoints fourierSubalgebra_conj_invariant
 #align fourier_subalgebra_closure_eq_top fourierSubalgebra_closure_eq_top
+-/
 
+#print span_fourier_closure_eq_top /-
 /-- The linear span of the monomials `fourier n` is dense in `C(add_circle T, ℂ)`. -/
 theorem span_fourier_closure_eq_top : (span ℂ (range <| @fourier T)).topologicalClosure = ⊤ :=
   by
   rw [← fourierSubalgebra_coe]
   exact congr_arg Subalgebra.toSubmodule fourierSubalgebra_closure_eq_top
 #align span_fourier_closure_eq_top span_fourier_closure_eq_top
+-/
 
+#print fourierLp /-
 /-- The family of monomials `fourier n`, parametrized by `n : ℤ` and considered as
 elements of the `Lp` space of functions `add_circle T → ℂ`. -/
 abbrev fourierLp (p : ℝ≥0∞) [Fact (1 ≤ p)] (n : ℤ) : Lp ℂ p (@haarAddCircle T hT) :=
   toLp p haarAddCircle ℂ (fourier n)
 #align fourier_Lp fourierLp
+-/
 
+#print coeFn_fourierLp /-
 theorem coeFn_fourierLp (p : ℝ≥0∞) [Fact (1 ≤ p)] (n : ℤ) :
     @fourierLp T hT p _ n =ᵐ[haarAddCircle] fourier n :=
   coeFn_toLp haarAddCircle (fourier n)
 #align coe_fn_fourier_Lp coeFn_fourierLp
+-/
 
+#print span_fourierLp_closure_eq_top /-
 /-- For each `1 ≤ p < ∞`, the linear span of the monomials `fourier n` is dense in
 `Lp ℂ p haar_circle`. -/
 theorem span_fourierLp_closure_eq_top {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) :
@@ -302,7 +353,9 @@ theorem span_fourierLp_closure_eq_top {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p
   rw [map_span, range_comp]
   simp only [ContinuousLinearMap.coe_coe]
 #align span_fourier_Lp_closure_eq_top span_fourierLp_closure_eq_top
+-/
 
+#print orthonormal_fourier /-
 /-- The monomials `fourier n` are an orthonormal set with respect to normalised Haar measure. -/
 theorem orthonormal_fourier : Orthonormal ℂ (@fourierLp T _ 2 _) :=
   by
@@ -321,6 +374,7 @@ theorem orthonormal_fourier : Orthonormal ℂ (@fourierLp T _ 2 _) :=
   convert integral_eq_zero_of_add_right_eq_neg (fourier_add_half_inv_index hij hT.elim)
   exact MeasureTheory.IsAddLeftInvariant.isAddRightInvariant
 #align orthonormal_fourier orthonormal_fourier
+-/
 
 end Monomials
 
@@ -333,12 +387,15 @@ section fourierCoeff
 
 variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E]
 
+#print fourierCoeff /-
 /-- The `n`-th Fourier coefficient of a function `add_circle T → E`, for `E` a complete normed
 `ℂ`-vector space, defined as the integral over `add_circle T` of `fourier (-n) t • f t`. -/
 def fourierCoeff (f : AddCircle T → E) (n : ℤ) : E :=
   ∫ t : AddCircle T, fourier (-n) t • f t ∂haarAddCircle
 #align fourier_coeff fourierCoeff
+-/
 
+#print fourierCoeff_eq_intervalIntegral /-
 /-- The Fourier coefficients of a function on `add_circle T` can be computed as an integral
 over `[a, a + T]`, for any real `a`. -/
 theorem fourierCoeff_eq_intervalIntegral (f : AddCircle T → E) (n : ℤ) (a : ℝ) :
@@ -351,25 +408,33 @@ theorem fourierCoeff_eq_intervalIntegral (f : AddCircle T → E) (n : ℤ) (a :
     integral_smul_measure, ENNReal.toReal_ofReal hT.out.le, ← smul_assoc, smul_eq_mul,
     one_div_mul_cancel hT.out.ne', one_smul]
 #align fourier_coeff_eq_interval_integral fourierCoeff_eq_intervalIntegral
+-/
 
+#print fourierCoeff.const_smul /-
 theorem fourierCoeff.const_smul (f : AddCircle T → E) (c : ℂ) (n : ℤ) :
     fourierCoeff (c • f) n = c • fourierCoeff f n := by
   simp_rw [fourierCoeff, Pi.smul_apply, ← smul_assoc, smul_eq_mul, mul_comm, ← smul_eq_mul,
     smul_assoc, integral_smul]
 #align fourier_coeff.const_smul fourierCoeff.const_smul
+-/
 
+#print fourierCoeff.const_mul /-
 theorem fourierCoeff.const_mul (f : AddCircle T → ℂ) (c : ℂ) (n : ℤ) :
     fourierCoeff (fun x => c * f x) n = c * fourierCoeff f n :=
   fourierCoeff.const_smul f c n
 #align fourier_coeff.const_mul fourierCoeff.const_mul
+-/
 
+#print fourierCoeffOn /-
 /-- For a function on `ℝ`, the Fourier coefficients of `f` on `[a, b]` are defined as the
 Fourier coefficients of the unique periodic function agreeing with `f` on `Ioc a b`. -/
 def fourierCoeffOn {a b : ℝ} (hab : a < b) (f : ℝ → E) (n : ℤ) : E :=
   haveI := Fact.mk (by linarith : 0 < b - a)
   fourierCoeff (AddCircle.liftIoc (b - a) a f) n
 #align fourier_coeff_on fourierCoeffOn
+-/
 
+#print fourierCoeffOn_eq_integral /-
 theorem fourierCoeffOn_eq_integral {a b : ℝ} (f : ℝ → E) (n : ℤ) (hab : a < b) :
     fourierCoeffOn hab f n =
       (1 / (b - a)) • ∫ x in a..b, fourier (-n) (x : AddCircle (b - a)) • f x :=
@@ -383,16 +448,22 @@ theorem fourierCoeffOn_eq_integral {a b : ℝ} (f : ℝ → E) (n : ℤ) (hab :
   rwa [lift_Ioc_coe_apply]
   rwa [add_sub, add_sub_cancel']
 #align fourier_coeff_on_eq_integral fourierCoeffOn_eq_integral
+-/
 
+#print fourierCoeffOn.const_smul /-
 theorem fourierCoeffOn.const_smul {a b : ℝ} (f : ℝ → E) (c : ℂ) (n : ℤ) (hab : a < b) :
     fourierCoeffOn hab (c • f) n = c • fourierCoeffOn hab f n := by apply fourierCoeff.const_smul
 #align fourier_coeff_on.const_smul fourierCoeffOn.const_smul
+-/
 
+#print fourierCoeffOn.const_mul /-
 theorem fourierCoeffOn.const_mul {a b : ℝ} (f : ℝ → ℂ) (c : ℂ) (n : ℤ) (hab : a < b) :
     fourierCoeffOn hab (fun x => c * f x) n = c * fourierCoeffOn hab f n :=
   fourierCoeffOn.const_smul _ _ _ _
 #align fourier_coeff_on.const_mul fourierCoeffOn.const_mul
+-/
 
+#print fourierCoeff_liftIoc_eq /-
 theorem fourierCoeff_liftIoc_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
     fourierCoeff (AddCircle.liftIoc T a f) n = fourierCoeffOn (lt_add_of_pos_right a hT.out) f n :=
   by
@@ -402,7 +473,9 @@ theorem fourierCoeff_liftIoc_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
   rw [lift_Ioc_coe_apply]
   rwa [uIoc_of_le (lt_add_of_pos_right a hT.out).le] at hx 
 #align fourier_coeff_lift_Ioc_eq fourierCoeff_liftIoc_eq
+-/
 
+#print fourierCoeff_liftIco_eq /-
 theorem fourierCoeff_liftIco_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
     fourierCoeff (AddCircle.liftIco T a f) n = fourierCoeffOn (lt_add_of_pos_right a hT.out) f n :=
   by
@@ -414,24 +487,30 @@ theorem fourierCoeff_liftIco_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
   dsimp only
   rw [lift_Ico_coe_apply (Ioo_subset_Ico_self hx)]
 #align fourier_coeff_lift_Ico_eq fourierCoeff_liftIco_eq
+-/
 
 end fourierCoeff
 
 section FourierL2
 
+#print fourierBasis /-
 /-- We define `fourier_basis` to be a `ℤ`-indexed Hilbert basis for `Lp ℂ 2 haar_add_circle`,
 which by definition is an isometric isomorphism from `Lp ℂ 2 haar_add_circle` to `ℓ²(ℤ, ℂ)`. -/
 def fourierBasis : HilbertBasis ℤ ℂ (Lp ℂ 2 <| @haarAddCircle T hT) :=
   HilbertBasis.mk orthonormal_fourier (span_fourierLp_closure_eq_top (by norm_num)).ge
 #align fourier_basis fourierBasis
+-/
 
+#print coe_fourierBasis /-
 /-- The elements of the Hilbert basis `fourier_basis` are the functions `fourier_Lp 2`, i.e. the
 monomials `fourier n` on the circle considered as elements of `L²`. -/
 @[simp]
 theorem coe_fourierBasis : ⇑(@fourierBasis _ hT) = fourierLp 2 :=
   HilbertBasis.coe_mk _ _
 #align coe_fourier_basis coe_fourierBasis
+-/
 
+#print fourierBasis_repr /-
 /-- Under the isometric isomorphism `fourier_basis` from `Lp ℂ 2 haar_circle` to `ℓ²(ℤ, ℂ)`, the
 `i`-th coefficient is `fourier_coeff f i`, i.e., the integral over `add_circle T` of
 `λ t, fourier (-i) t * f t` with respect to the Haar measure of total mass 1. -/
@@ -444,13 +523,17 @@ theorem fourierBasis_repr (f : Lp ℂ 2 <| @haarAddCircle T hT) (i : ℤ) :
     filter_upwards [coeFn_fourierLp 2 i] with _ ht
     rw [ht, ← fourier_neg, smul_eq_mul]
 #align fourier_basis_repr fourierBasis_repr
+-/
 
+#print hasSum_fourier_series_L2 /-
 /-- The Fourier series of an `L2` function `f` sums to `f`, in the `L²` space of `add_circle T`. -/
 theorem hasSum_fourier_series_L2 (f : Lp ℂ 2 <| @haarAddCircle T hT) :
     HasSum (fun i => fourierCoeff f i • fourierLp 2 i) f := by simp_rw [← fourierBasis_repr];
   simpa using HilbertBasis.hasSum_repr fourierBasis f
 #align has_sum_fourier_series_L2 hasSum_fourier_series_L2
+-/
 
+#print tsum_sq_fourierCoeff /-
 /-- **Parseval's identity**: for an `L²` function `f` on `add_circle T`, the sum of the squared
 norms of the Fourier coefficients equals the `L²` norm of `f`. -/
 theorem tsum_sq_fourierCoeff (f : Lp ℂ 2 <| @haarAddCircle T hT) :
@@ -468,6 +551,7 @@ theorem tsum_sq_fourierCoeff (f : Lp ℂ 2 <| @haarAddCircle T hT) :
     rw [← H₁, H₂, H₃]
   · exact L2.integrable_inner f f
 #align tsum_sq_fourier_coeff tsum_sq_fourierCoeff
+-/
 
 end FourierL2
 
@@ -475,14 +559,17 @@ section Convergence
 
 variable (f : C(AddCircle T, ℂ))
 
+#print fourierCoeff_toLp /-
 theorem fourierCoeff_toLp (n : ℤ) : fourierCoeff (toLp 2 haarAddCircle ℂ f) n = fourierCoeff f n :=
   integral_congr_ae
     (Filter.EventuallyEq.mul (Filter.eventually_of_forall (by tauto))
       (ContinuousMap.coeFn_toAEEqFun haarAddCircle f))
 #align fourier_coeff_to_Lp fourierCoeff_toLp
+-/
 
 variable {f}
 
+#print hasSum_fourier_series_of_summable /-
 /-- If the sequence of Fourier coefficients of `f` is summable, then the Fourier series converges
 uniformly to `f`. -/
 theorem hasSum_fourier_series_of_summable (h : Summable (fourierCoeff f)) :
@@ -494,13 +581,16 @@ theorem hasSum_fourier_series_of_summable (h : Summable (fourierCoeff f)) :
   simp_rw [norm_smul, fourier_norm, mul_one, summable_norm_iff]
   exact h
 #align has_sum_fourier_series_of_summable hasSum_fourier_series_of_summable
+-/
 
+#print has_pointwise_sum_fourier_series_of_summable /-
 /-- If the sequence of Fourier coefficients of `f` is summable, then the Fourier series of `f`
 converges everywhere pointwise to `f`. -/
 theorem has_pointwise_sum_fourier_series_of_summable (h : Summable (fourierCoeff f))
     (x : AddCircle T) : HasSum (fun i => fourierCoeff f i • fourier i x) (f x) :=
   (ContinuousMap.evalClm ℂ x).HasSum (hasSum_fourier_series_of_summable h)
 #align has_pointwise_sum_fourier_series_of_summable has_pointwise_sum_fourier_series_of_summable
+-/
 
 end Convergence
 
@@ -514,6 +604,7 @@ open scoped Interval
 
 variable (T)
 
+#print hasDerivAt_fourier /-
 theorem hasDerivAt_fourier (n : ℤ) (x : ℝ) :
     HasDerivAt (fun y : ℝ => fourier n (y : AddCircle T))
       (2 * π * I * n / T * fourier n (x : AddCircle T)) x :=
@@ -525,15 +616,19 @@ theorem hasDerivAt_fourier (n : ℤ) (x : ℝ) :
   convert hasDerivAt_mul_const (2 * ↑π * I * ↑n / T)
   ext1 y; ring
 #align has_deriv_at_fourier hasDerivAt_fourier
+-/
 
+#print hasDerivAt_fourier_neg /-
 theorem hasDerivAt_fourier_neg (n : ℤ) (x : ℝ) :
     HasDerivAt (fun y : ℝ => fourier (-n) (y : AddCircle T))
       (-2 * π * I * n / T * fourier (-n) (x : AddCircle T)) x :=
   by simpa using hasDerivAt_fourier T (-n) x
 #align has_deriv_at_fourier_neg hasDerivAt_fourier_neg
+-/
 
 variable {T}
 
+#print has_antideriv_at_fourier_neg /-
 theorem has_antideriv_at_fourier_neg (hT : Fact (0 < T)) {n : ℤ} (hn : n ≠ 0) (x : ℝ) :
     HasDerivAt (fun y : ℝ => (T : ℂ) / (-2 * π * I * n) * fourier (-n) (y : AddCircle T))
       (fourier (-n) (x : AddCircle T)) x :=
@@ -545,7 +640,9 @@ theorem has_antideriv_at_fourier_neg (hT : Fact (0 < T)) {n : ℤ} (hn : n ≠ 0
       of_real_eq_zero, false_or_iff, Int.cast_eq_zero, not_or]
     exact ⟨⟨⟨Real.pi_ne_zero, I_ne_zero⟩, hn⟩, hT.out.ne'⟩
 #align has_antideriv_at_fourier_neg has_antideriv_at_fourier_neg
+-/
 
+#print fourierCoeffOn_of_hasDerivAt /-
 /-- Express Fourier coefficients of `f` on an interval in terms of those of its derivative. -/
 theorem fourierCoeffOn_of_hasDerivAt {a b : ℝ} (hab : a < b) {f f' : ℝ → ℂ} {n : ℤ} (hn : n ≠ 0)
     (hf : ∀ x, x ∈ [a, b] → HasDerivAt f (f' x) x) (hf' : IntervalIntegrable f' volume a b) :
@@ -575,6 +672,7 @@ theorem fourierCoeffOn_of_hasDerivAt {a b : ℝ} (hab : a < b) {f f' : ℝ → 
     ring
   · ring
 #align fourier_coeff_on_of_has_deriv_at fourierCoeffOn_of_hasDerivAt
+-/
 
 end deriv
 
Diff
@@ -126,8 +126,6 @@ In this file we use the Haar measure on `add_circle T` normalised to have total
 
 variable [hT : Fact (0 < T)]
 
-include hT
-
 /-- Haar measure on the additive circle, normalised to have total measure 1. -/
 def haarAddCircle : Measure (AddCircle T) :=
   addHaarMeasure ⊤
@@ -257,8 +255,6 @@ theorem fourierSubalgebra_conj_invariant :
 
 variable [hT : Fact (0 < T)]
 
-include hT
-
 /-- The subalgebra of `C(add_circle T, ℂ)` generated by `fourier n` for `n ∈ ℤ`
 separates points. -/
 theorem fourierSubalgebra_separatesPoints : (@fourierSubalgebra T).SeparatesPoints :=
@@ -333,8 +329,6 @@ section ScopeHT
 -- everything from here on needs `0 < T`
 variable [hT : Fact (0 < T)]
 
-include hT
-
 section fourierCoeff
 
 variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E]
@@ -369,8 +363,6 @@ theorem fourierCoeff.const_mul (f : AddCircle T → ℂ) (c : ℂ) (n : ℤ) :
   fourierCoeff.const_smul f c n
 #align fourier_coeff.const_mul fourierCoeff.const_mul
 
-omit hT
-
 /-- For a function on `ℝ`, the Fourier coefficients of `f` on `[a, b]` are defined as the
 Fourier coefficients of the unique periodic function agreeing with `f` on `Ioc a b`. -/
 def fourierCoeffOn {a b : ℝ} (hab : a < b) (f : ℝ → E) (n : ℤ) : E :=
@@ -401,8 +393,6 @@ theorem fourierCoeffOn.const_mul {a b : ℝ} (f : ℝ → ℂ) (c : ℂ) (n : 
   fourierCoeffOn.const_smul _ _ _ _
 #align fourier_coeff_on.const_mul fourierCoeffOn.const_mul
 
-include hT
-
 theorem fourierCoeff_liftIoc_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
     fourierCoeff (AddCircle.liftIoc T a f) n = fourierCoeffOn (lt_add_of_pos_right a hT.out) f n :=
   by
Diff
@@ -464,7 +464,7 @@ theorem hasSum_fourier_series_L2 (f : Lp ℂ 2 <| @haarAddCircle T hT) :
 /-- **Parseval's identity**: for an `L²` function `f` on `add_circle T`, the sum of the squared
 norms of the Fourier coefficients equals the `L²` norm of `f`. -/
 theorem tsum_sq_fourierCoeff (f : Lp ℂ 2 <| @haarAddCircle T hT) :
-    (∑' i : ℤ, ‖fourierCoeff f i‖ ^ 2) = ∫ t : AddCircle T, ‖f t‖ ^ 2 ∂haarAddCircle :=
+    ∑' i : ℤ, ‖fourierCoeff f i‖ ^ 2 = ∫ t : AddCircle T, ‖f t‖ ^ 2 ∂haarAddCircle :=
   by
   simp_rw [← fourierBasis_repr]
   have H₁ : ‖fourier_basis.repr f‖ ^ 2 = ∑' i, ‖fourier_basis.repr f i‖ ^ 2 :=
Diff
@@ -529,7 +529,7 @@ theorem hasDerivAt_fourier (n : ℤ) (x : ℝ) :
       (2 * π * I * n / T * fourier n (x : AddCircle T)) x :=
   by
   simp_rw [fourier_coe_apply]
-  refine' (_ : HasDerivAt (fun y => exp (2 * π * I * n * y / T)) _ _).comp_of_real
+  refine' (_ : HasDerivAt (fun y => exp (2 * π * I * n * y / T)) _ _).comp_ofReal
   rw [(fun α β => by ring : ∀ α β : ℂ, α * exp β = exp β * α)]
   refine' (hasDerivAt_exp _).comp x _
   convert hasDerivAt_mul_const (2 * ↑π * I * ↑n / T)
Diff
@@ -531,7 +531,7 @@ theorem hasDerivAt_fourier (n : ℤ) (x : ℝ) :
   simp_rw [fourier_coe_apply]
   refine' (_ : HasDerivAt (fun y => exp (2 * π * I * n * y / T)) _ _).comp_of_real
   rw [(fun α β => by ring : ∀ α β : ℂ, α * exp β = exp β * α)]
-  refine' (has_deriv_at_exp _).comp x _
+  refine' (hasDerivAt_exp _).comp x _
   convert hasDerivAt_mul_const (2 * ↑π * I * ↑n / T)
   ext1 y; ring
 #align has_deriv_at_fourier hasDerivAt_fourier
Diff
@@ -247,13 +247,13 @@ theorem fourierSubalgebra_coe : (@fourierSubalgebra T).toSubmodule = span ℂ (r
 
 /-- The subalgebra of `C(add_circle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is invariant under
 complex conjugation. -/
-theorem fourierSubalgebraConjInvariant :
+theorem fourierSubalgebra_conj_invariant :
     ConjInvariantSubalgebra ((@fourierSubalgebra T).restrictScalars ℝ) :=
   by
   apply subalgebra_conj_invariant
   rintro _ ⟨n, rfl⟩
   exact ⟨-n, ext fun _ => fourier_neg⟩
-#align fourier_subalgebra_conj_invariant fourierSubalgebraConjInvariant
+#align fourier_subalgebra_conj_invariant fourierSubalgebra_conj_invariant
 
 variable [hT : Fact (0 < T)]
 
@@ -274,7 +274,7 @@ theorem fourierSubalgebra_separatesPoints : (@fourierSubalgebra T).SeparatesPoin
 /-- The subalgebra of `C(add_circle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is dense. -/
 theorem fourierSubalgebra_closure_eq_top : (@fourierSubalgebra T).topologicalClosure = ⊤ :=
   ContinuousMap.subalgebra_isROrC_topologicalClosure_eq_top_of_separatesPoints fourierSubalgebra
-    fourierSubalgebra_separatesPoints fourierSubalgebraConjInvariant
+    fourierSubalgebra_separatesPoints fourierSubalgebra_conj_invariant
 #align fourier_subalgebra_closure_eq_top fourierSubalgebra_closure_eq_top
 
 /-- The linear span of the monomials `fourier n` is dense in `C(add_circle T, ℂ)`. -/
Diff
@@ -113,7 +113,7 @@ theorem injective_toCircle (hT : T ≠ 0) : Function.Injective (@toCircle T) :=
   obtain ⟨m, hm⟩ := exp_map_circle_eq_exp_map_circle.mp h.symm
   simp_rw [QuotientAddGroup.eq, AddSubgroup.mem_zmultiples_iff, zsmul_eq_mul]
   use m
-  field_simp [real.two_pi_pos.ne']  at hm 
+  field_simp [real.two_pi_pos.ne'] at hm 
   rw [← mul_right_inj' real.two_pi_pos.ne']
   linarith
 #align add_circle.injective_to_circle AddCircle.injective_toCircle
@@ -131,11 +131,11 @@ include hT
 /-- Haar measure on the additive circle, normalised to have total measure 1. -/
 def haarAddCircle : Measure (AddCircle T) :=
   addHaarMeasure ⊤
-deriving AddHaarMeasure
+deriving IsAddHaarMeasure
 #align add_circle.haar_add_circle AddCircle.haarAddCircle
 
-instance : ProbabilityMeasure (@haarAddCircle T _) :=
-  ProbabilityMeasure.mk addHaarMeasure_self
+instance : IsProbabilityMeasure (@haarAddCircle T _) :=
+  IsProbabilityMeasure.mk addHaarMeasure_self
 
 theorem volume_eq_smul_haarAddCircle :
     (volume : Measure (AddCircle T)) = ENNReal.ofReal T • haarAddCircle :=
@@ -300,8 +300,8 @@ theorem coeFn_fourierLp (p : ℝ≥0∞) [Fact (1 ≤ p)] (n : ℤ) :
 theorem span_fourierLp_closure_eq_top {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) :
     (span ℂ (range (@fourierLp T _ p _))).topologicalClosure = ⊤ :=
   by
-  convert(ContinuousMap.toLp_denseRange ℂ (@haar_add_circle T hT) hp
-          ℂ).topologicalClosure_map_submodule
+  convert
+    (ContinuousMap.toLp_denseRange ℂ (@haar_add_circle T hT) hp ℂ).topologicalClosure_map_submodule
       span_fourier_closure_eq_top
   rw [map_span, range_comp]
   simp only [ContinuousLinearMap.coe_coe]
@@ -323,7 +323,7 @@ theorem orthonormal_fourier : Orthonormal ℂ (@fourierLp T _ 2 _) :=
     rw [add_comm]
     exact sub_ne_zero.mpr (Ne.symm h)
   convert integral_eq_zero_of_add_right_eq_neg (fourier_add_half_inv_index hij hT.elim)
-  exact MeasureTheory.AddLeftInvariant.addRightInvariant
+  exact MeasureTheory.IsAddLeftInvariant.isAddRightInvariant
 #align orthonormal_fourier orthonormal_fourier
 
 end Monomials
@@ -451,7 +451,7 @@ theorem fourierBasis_repr (f : Lp ℂ 2 <| @haarAddCircle T hT) (i : ℤ) :
   trans ∫ t : AddCircle T, conj ((@fourierLp T hT 2 _ i : AddCircle T → ℂ) t) * f t ∂haar_add_circle
   · simp [fourier_basis.repr_apply_apply f i, MeasureTheory.L2.inner_def]
   · apply integral_congr_ae
-    filter_upwards [coeFn_fourierLp 2 i]with _ ht
+    filter_upwards [coeFn_fourierLp 2 i] with _ ht
     rw [ht, ← fourier_neg, smul_eq_mul]
 #align fourier_basis_repr fourierBasis_repr
 
@@ -548,7 +548,7 @@ theorem has_antideriv_at_fourier_neg (hT : Fact (0 < T)) {n : ℤ} (hn : n ≠ 0
     HasDerivAt (fun y : ℝ => (T : ℂ) / (-2 * π * I * n) * fourier (-n) (y : AddCircle T))
       (fourier (-n) (x : AddCircle T)) x :=
   by
-  convert(hasDerivAt_fourier_neg T n x).div_const (-2 * π * I * n / T) using 1
+  convert (hasDerivAt_fourier_neg T n x).div_const (-2 * π * I * n / T) using 1
   · ext1 y; rw [div_div_eq_mul_div]; ring
   · rw [mul_div_cancel_left]
     simp only [Ne.def, div_eq_zero_iff, neg_eq_zero, mul_eq_zero, bit0_eq_zero, one_ne_zero,
Diff
@@ -109,11 +109,11 @@ theorem injective_toCircle (hT : T ≠ 0) : Function.Injective (@toCircle T) :=
   intro a b h
   induction a using QuotientAddGroup.induction_on'
   induction b using QuotientAddGroup.induction_on'
-  simp_rw [to_circle, Function.Periodic.lift_coe] at h
+  simp_rw [to_circle, Function.Periodic.lift_coe] at h 
   obtain ⟨m, hm⟩ := exp_map_circle_eq_exp_map_circle.mp h.symm
   simp_rw [QuotientAddGroup.eq, AddSubgroup.mem_zmultiples_iff, zsmul_eq_mul]
   use m
-  field_simp [real.two_pi_pos.ne']  at hm
+  field_simp [real.two_pi_pos.ne']  at hm 
   rw [← mul_right_inj' real.two_pi_pos.ne']
   linarith
 #align add_circle.injective_to_circle AddCircle.injective_toCircle
@@ -130,7 +130,8 @@ include hT
 
 /-- Haar measure on the additive circle, normalised to have total measure 1. -/
 def haarAddCircle : Measure (AddCircle T) :=
-  addHaarMeasure ⊤deriving AddHaarMeasure
+  addHaarMeasure ⊤
+deriving AddHaarMeasure
 #align add_circle.haar_add_circle AddCircle.haarAddCircle
 
 instance : ProbabilityMeasure (@haarAddCircle T _) :=
@@ -266,7 +267,7 @@ theorem fourierSubalgebra_separatesPoints : (@fourierSubalgebra T).SeparatesPoin
   refine' ⟨_, ⟨fourier 1, subset_adjoin ⟨1, rfl⟩, rfl⟩, _⟩
   dsimp only; rw [fourier_one, fourier_one]
   contrapose! hxy
-  rw [Subtype.coe_inj] at hxy
+  rw [Subtype.coe_inj] at hxy 
   exact injective_to_circle hT.elim.ne' hxy
 #align fourier_subalgebra_separates_points fourierSubalgebra_separatesPoints
 
@@ -409,7 +410,7 @@ theorem fourierCoeff_liftIoc_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
   congr 1
   refine' intervalIntegral.integral_congr_ae (ae_of_all _ fun x hx => _)
   rw [lift_Ioc_coe_apply]
-  rwa [uIoc_of_le (lt_add_of_pos_right a hT.out).le] at hx
+  rwa [uIoc_of_le (lt_add_of_pos_right a hT.out).le] at hx 
 #align fourier_coeff_lift_Ioc_eq fourierCoeff_liftIoc_eq
 
 theorem fourierCoeff_liftIco_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
@@ -472,8 +473,8 @@ theorem tsum_sq_fourierCoeff (f : Lp ℂ 2 <| @haarAddCircle T hT) :
     norm_num
   have H₂ : ‖fourier_basis.repr f‖ ^ 2 = ‖f‖ ^ 2 := by simp
   have H₃ := congr_arg IsROrC.re (@L2.inner_def (AddCircle T) ℂ ℂ _ _ _ _ _ f f)
-  rw [← integral_re] at H₃
-  · simp only [← norm_sq_eq_inner] at H₃
+  rw [← integral_re] at H₃ 
+  · simp only [← norm_sq_eq_inner] at H₃ 
     rw [← H₁, H₂, H₃]
   · exact L2.integrable_inner f f
 #align tsum_sq_fourier_coeff tsum_sq_fourierCoeff
@@ -498,7 +499,7 @@ theorem hasSum_fourier_series_of_summable (h : Summable (fourierCoeff f)) :
     HasSum (fun i => fourierCoeff f i • fourier i) f :=
   by
   have sum_L2 := hasSum_fourier_series_L2 (to_Lp 2 haar_add_circle ℂ f)
-  simp_rw [fourierCoeff_toLp] at sum_L2
+  simp_rw [fourierCoeff_toLp] at sum_L2 
   refine' ContinuousMap.hasSum_of_hasSum_Lp (summable_of_summable_norm _) sum_L2
   simp_rw [norm_smul, fourier_norm, mul_one, summable_norm_iff]
   exact h
@@ -569,7 +570,7 @@ theorem fourierCoeffOn_of_hasDerivAt {a b : ℝ} (hab : a < b) {f f' : ℝ → 
   rw [integral_mul_deriv_eq_deriv_mul hf (fun x hx => has_antideriv_at_fourier_neg hT hn x) hf'
       (((map_continuous (fourier (-n))).comp (AddCircle.continuous_mk' _)).IntervalIntegrable _ _)]
   dsimp only
-  have : ∀ u v w : ℂ, u * ((b - a : ℝ) / v * w) = (b - a : ℝ) / v * (u * w) := by intros ; ring
+  have : ∀ u v w : ℂ, u * ((b - a : ℝ) / v * w) = (b - a : ℝ) / v * (u * w) := by intros; ring
   conv in intervalIntegral _ _ _ _ =>
     congr
     ext
Diff
@@ -130,11 +130,11 @@ include hT
 
 /-- Haar measure on the additive circle, normalised to have total measure 1. -/
 def haarAddCircle : Measure (AddCircle T) :=
-  addHaarMeasure ⊤deriving IsAddHaarMeasure
+  addHaarMeasure ⊤deriving AddHaarMeasure
 #align add_circle.haar_add_circle AddCircle.haarAddCircle
 
 instance : ProbabilityMeasure (@haarAddCircle T _) :=
-  ProbabilityMeasure.mk add_haarMeasure_self
+  ProbabilityMeasure.mk addHaarMeasure_self
 
 theorem volume_eq_smul_haarAddCircle :
     (volume : Measure (AddCircle T)) = ENNReal.ofReal T • haarAddCircle :=
@@ -285,7 +285,7 @@ theorem span_fourier_closure_eq_top : (span ℂ (range <| @fourier T)).topologic
 
 /-- The family of monomials `fourier n`, parametrized by `n : ℤ` and considered as
 elements of the `Lp` space of functions `add_circle T → ℂ`. -/
-abbrev fourierLp (p : ℝ≥0∞) [Fact (1 ≤ p)] (n : ℤ) : lp ℂ p (@haarAddCircle T hT) :=
+abbrev fourierLp (p : ℝ≥0∞) [Fact (1 ≤ p)] (n : ℤ) : Lp ℂ p (@haarAddCircle T hT) :=
   toLp p haarAddCircle ℂ (fourier n)
 #align fourier_Lp fourierLp
 
@@ -322,7 +322,7 @@ theorem orthonormal_fourier : Orthonormal ℂ (@fourierLp T _ 2 _) :=
     rw [add_comm]
     exact sub_ne_zero.mpr (Ne.symm h)
   convert integral_eq_zero_of_add_right_eq_neg (fourier_add_half_inv_index hij hT.elim)
-  exact IsAddLeftInvariant.is_add_right_invariant
+  exact MeasureTheory.AddLeftInvariant.addRightInvariant
 #align orthonormal_fourier orthonormal_fourier
 
 end Monomials
@@ -430,7 +430,7 @@ section FourierL2
 
 /-- We define `fourier_basis` to be a `ℤ`-indexed Hilbert basis for `Lp ℂ 2 haar_add_circle`,
 which by definition is an isometric isomorphism from `Lp ℂ 2 haar_add_circle` to `ℓ²(ℤ, ℂ)`. -/
-def fourierBasis : HilbertBasis ℤ ℂ (lp ℂ 2 <| @haarAddCircle T hT) :=
+def fourierBasis : HilbertBasis ℤ ℂ (Lp ℂ 2 <| @haarAddCircle T hT) :=
   HilbertBasis.mk orthonormal_fourier (span_fourierLp_closure_eq_top (by norm_num)).ge
 #align fourier_basis fourierBasis
 
@@ -444,7 +444,7 @@ theorem coe_fourierBasis : ⇑(@fourierBasis _ hT) = fourierLp 2 :=
 /-- Under the isometric isomorphism `fourier_basis` from `Lp ℂ 2 haar_circle` to `ℓ²(ℤ, ℂ)`, the
 `i`-th coefficient is `fourier_coeff f i`, i.e., the integral over `add_circle T` of
 `λ t, fourier (-i) t * f t` with respect to the Haar measure of total mass 1. -/
-theorem fourierBasis_repr (f : lp ℂ 2 <| @haarAddCircle T hT) (i : ℤ) :
+theorem fourierBasis_repr (f : Lp ℂ 2 <| @haarAddCircle T hT) (i : ℤ) :
     fourierBasis.repr f i = fourierCoeff f i :=
   by
   trans ∫ t : AddCircle T, conj ((@fourierLp T hT 2 _ i : AddCircle T → ℂ) t) * f t ∂haar_add_circle
@@ -455,14 +455,14 @@ theorem fourierBasis_repr (f : lp ℂ 2 <| @haarAddCircle T hT) (i : ℤ) :
 #align fourier_basis_repr fourierBasis_repr
 
 /-- The Fourier series of an `L2` function `f` sums to `f`, in the `L²` space of `add_circle T`. -/
-theorem hasSum_fourier_series_L2 (f : lp ℂ 2 <| @haarAddCircle T hT) :
+theorem hasSum_fourier_series_L2 (f : Lp ℂ 2 <| @haarAddCircle T hT) :
     HasSum (fun i => fourierCoeff f i • fourierLp 2 i) f := by simp_rw [← fourierBasis_repr];
   simpa using HilbertBasis.hasSum_repr fourierBasis f
 #align has_sum_fourier_series_L2 hasSum_fourier_series_L2
 
 /-- **Parseval's identity**: for an `L²` function `f` on `add_circle T`, the sum of the squared
 norms of the Fourier coefficients equals the `L²` norm of `f`. -/
-theorem tsum_sq_fourierCoeff (f : lp ℂ 2 <| @haarAddCircle T hT) :
+theorem tsum_sq_fourierCoeff (f : Lp ℂ 2 <| @haarAddCircle T hT) :
     (∑' i : ℤ, ‖fourierCoeff f i‖ ^ 2) = ∫ t : AddCircle T, ‖f t‖ ^ 2 ∂haarAddCircle :=
   by
   simp_rw [← fourierBasis_repr]
@@ -499,7 +499,7 @@ theorem hasSum_fourier_series_of_summable (h : Summable (fourierCoeff f)) :
   by
   have sum_L2 := hasSum_fourier_series_L2 (to_Lp 2 haar_add_circle ℂ f)
   simp_rw [fourierCoeff_toLp] at sum_L2
-  refine' ContinuousMap.hasSum_of_hasSum_lp (summable_of_summable_norm _) sum_L2
+  refine' ContinuousMap.hasSum_of_hasSum_Lp (summable_of_summable_norm _) sum_L2
   simp_rw [norm_smul, fourier_norm, mul_one, summable_norm_iff]
   exact h
 #align has_sum_fourier_series_of_summable hasSum_fourier_series_of_summable
Diff
@@ -66,7 +66,7 @@ converges to `f` in the uniform-convergence topology of `C(add_circle T, ℂ)`.
 
 noncomputable section
 
-open ENNReal ComplexConjugate Real
+open scoped ENNReal ComplexConjugate Real
 
 open TopologicalSpace ContinuousMap MeasureTheory MeasureTheory.Measure Algebra Submodule Set
 
@@ -519,7 +519,7 @@ section deriv
 
 open Complex intervalIntegral
 
-open Interval
+open scoped Interval
 
 variable (T)
 
Diff
@@ -81,11 +81,8 @@ theorem scaled_exp_map_periodic : Function.Periodic (fun x => expMapCircle (2 *
   by
   -- The case T = 0 is not interesting, but it is true, so we prove it to save hypotheses
   rcases eq_or_ne T 0 with (rfl | hT)
-  · intro x
-    simp
-  · intro x
-    simp_rw [mul_add]
-    rw [div_mul_cancel _ hT, periodic_expMapCircle]
+  · intro x; simp
+  · intro x; simp_rw [mul_add]; rw [div_mul_cancel _ hT, periodic_expMapCircle]
 #align add_circle.scaled_exp_map_periodic AddCircle.scaled_exp_map_periodic
 
 /-- The canonical map `λ x, exp (2 π i x / T)` from `ℝ / ℤ • T` to the unit circle in `ℂ`.
@@ -223,10 +220,8 @@ theorem fourier_add_half_inv_index {n : ℤ} (hn : n ≠ 0) (hT : 0 < T) (x : Ad
     rw [zsmul_eq_mul, to_circle, Function.Periodic.lift_coe, expMapCircle_apply]
     replace hT := complex.of_real_ne_zero.mpr hT.ne'
     convert Complex.exp_pi_mul_I using 3
-    field_simp
-    ring
-  rw [this]
-  simp
+    field_simp; ring
+  rw [this]; simp
 #align fourier_add_half_inv_index fourier_add_half_inv_index
 
 /-- The subalgebra of `C(add_circle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` . -/
@@ -246,8 +241,7 @@ theorem fourierSubalgebra_coe : (@fourierSubalgebra T).toSubmodule = span ℂ (r
     refine' ⟨m + n, _⟩
     ext1 z
     exact fourier_add
-  · ext1 z
-    exact fourier_zero
+  · ext1 z; exact fourier_zero
 #align fourier_subalgebra_coe fourierSubalgebra_coe
 
 /-- The subalgebra of `C(add_circle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is invariant under
@@ -321,10 +315,7 @@ theorem orthonormal_fourier : Orthonormal ℂ (@fourierLp T _ 2 _) :=
   simp_rw [← fourier_neg, ← fourier_add]
   split_ifs
   · simp_rw [h, neg_add_self]
-    have : ⇑(@fourier T 0) = (fun x => 1 : AddCircle T → ℂ) :=
-      by
-      ext1
-      exact fourier_zero
+    have : ⇑(@fourier T 0) = (fun x => 1 : AddCircle T → ℂ) := by ext1; exact fourier_zero
     rw [this, integral_const, measure_univ, ENNReal.one_toReal, Complex.real_smul,
       Complex.ofReal_one, mul_one]
   have hij : -i + j ≠ 0 := by
@@ -358,10 +349,8 @@ over `[a, a + T]`, for any real `a`. -/
 theorem fourierCoeff_eq_intervalIntegral (f : AddCircle T → E) (n : ℤ) (a : ℝ) :
     fourierCoeff f n = (1 / T) • ∫ x in a..a + T, @fourier T (-n) x • f x :=
   by
-  have : ∀ x : ℝ, @fourier T (-n) x • f x = (fun z : AddCircle T => @fourier T (-n) z • f z) x :=
-    by
-    intro x
-    rfl
+  have : ∀ x : ℝ, @fourier T (-n) x • f x = (fun z : AddCircle T => @fourier T (-n) z • f z) x := by
+    intro x; rfl
   simp_rw [this]
   rw [fourierCoeff, AddCircle.intervalIntegral_preimage T a, volume_eq_smul_haar_add_circle,
     integral_smul_measure, ENNReal.toReal_ofReal hT.out.le, ← smul_assoc, smul_eq_mul,
@@ -467,9 +456,7 @@ theorem fourierBasis_repr (f : lp ℂ 2 <| @haarAddCircle T hT) (i : ℤ) :
 
 /-- The Fourier series of an `L2` function `f` sums to `f`, in the `L²` space of `add_circle T`. -/
 theorem hasSum_fourier_series_L2 (f : lp ℂ 2 <| @haarAddCircle T hT) :
-    HasSum (fun i => fourierCoeff f i • fourierLp 2 i) f :=
-  by
-  simp_rw [← fourierBasis_repr]
+    HasSum (fun i => fourierCoeff f i • fourierLp 2 i) f := by simp_rw [← fourierBasis_repr];
   simpa using HilbertBasis.hasSum_repr fourierBasis f
 #align has_sum_fourier_series_L2 hasSum_fourier_series_L2
 
@@ -561,9 +548,7 @@ theorem has_antideriv_at_fourier_neg (hT : Fact (0 < T)) {n : ℤ} (hn : n ≠ 0
       (fourier (-n) (x : AddCircle T)) x :=
   by
   convert(hasDerivAt_fourier_neg T n x).div_const (-2 * π * I * n / T) using 1
-  · ext1 y
-    rw [div_div_eq_mul_div]
-    ring
+  · ext1 y; rw [div_div_eq_mul_div]; ring
   · rw [mul_div_cancel_left]
     simp only [Ne.def, div_eq_zero_iff, neg_eq_zero, mul_eq_zero, bit0_eq_zero, one_ne_zero,
       of_real_eq_zero, false_or_iff, Int.cast_eq_zero, not_or]
@@ -584,10 +569,7 @@ theorem fourierCoeffOn_of_hasDerivAt {a b : ℝ} (hab : a < b) {f f' : ℝ → 
   rw [integral_mul_deriv_eq_deriv_mul hf (fun x hx => has_antideriv_at_fourier_neg hT hn x) hf'
       (((map_continuous (fourier (-n))).comp (AddCircle.continuous_mk' _)).IntervalIntegrable _ _)]
   dsimp only
-  have : ∀ u v w : ℂ, u * ((b - a : ℝ) / v * w) = (b - a : ℝ) / v * (u * w) :=
-    by
-    intros
-    ring
+  have : ∀ u v w : ℂ, u * ((b - a : ℝ) / v * w) = (b - a : ℝ) / v * (u * w) := by intros ; ring
   conv in intervalIntegral _ _ _ _ =>
     congr
     ext
Diff
@@ -313,7 +313,7 @@ theorem span_fourierLp_closure_eq_top {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p
 #align span_fourier_Lp_closure_eq_top span_fourierLp_closure_eq_top
 
 /-- The monomials `fourier n` are an orthonormal set with respect to normalised Haar measure. -/
-theorem orthonormalFourier : Orthonormal ℂ (@fourierLp T _ 2 _) :=
+theorem orthonormal_fourier : Orthonormal ℂ (@fourierLp T _ 2 _) :=
   by
   rw [orthonormal_iff_ite]
   intro i j
@@ -332,7 +332,7 @@ theorem orthonormalFourier : Orthonormal ℂ (@fourierLp T _ 2 _) :=
     exact sub_ne_zero.mpr (Ne.symm h)
   convert integral_eq_zero_of_add_right_eq_neg (fourier_add_half_inv_index hij hT.elim)
   exact IsAddLeftInvariant.is_add_right_invariant
-#align orthonormal_fourier orthonormalFourier
+#align orthonormal_fourier orthonormal_fourier
 
 end Monomials
 
@@ -442,7 +442,7 @@ section FourierL2
 /-- We define `fourier_basis` to be a `ℤ`-indexed Hilbert basis for `Lp ℂ 2 haar_add_circle`,
 which by definition is an isometric isomorphism from `Lp ℂ 2 haar_add_circle` to `ℓ²(ℤ, ℂ)`. -/
 def fourierBasis : HilbertBasis ℤ ℂ (lp ℂ 2 <| @haarAddCircle T hT) :=
-  HilbertBasis.mk orthonormalFourier (span_fourierLp_closure_eq_top (by norm_num)).ge
+  HilbertBasis.mk orthonormal_fourier (span_fourierLp_closure_eq_top (by norm_num)).ge
 #align fourier_basis fourierBasis
 
 /-- The elements of the Hilbert basis `fourier_basis` are the functions `fourier_Lp 2`, i.e. the
Diff
@@ -500,7 +500,7 @@ variable (f : C(AddCircle T, ℂ))
 theorem fourierCoeff_toLp (n : ℤ) : fourierCoeff (toLp 2 haarAddCircle ℂ f) n = fourierCoeff f n :=
   integral_congr_ae
     (Filter.EventuallyEq.mul (Filter.eventually_of_forall (by tauto))
-      (ContinuousMap.coeFn_toAeEqFun haarAddCircle f))
+      (ContinuousMap.coeFn_toAEEqFun haarAddCircle f))
 #align fourier_coeff_to_Lp fourierCoeff_toLp
 
 variable {f}
Diff
@@ -4,12 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Heather Macbeth, David Loeffler
 
 ! This file was ported from Lean 3 source module analysis.fourier.add_circle
-! leanprover-community/mathlib commit 011cafb4a5bc695875d186e245d6b3df03bf6c40
+! leanprover-community/mathlib commit 8f9fea08977f7e450770933ee6abb20733b47c92
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
+import Mathbin.Analysis.SpecialFunctions.ExpDeriv
 import Mathbin.Analysis.SpecialFunctions.Complex.Circle
-import Mathbin.Topology.Instances.AddCircle
 import Mathbin.Analysis.InnerProductSpace.L2Space
 import Mathbin.MeasureTheory.Function.ContinuousMapDense
 import Mathbin.MeasureTheory.Function.L2Space
Diff
@@ -222,7 +222,7 @@ theorem fourier_add_half_inv_index {n : ℤ} (hn : n ≠ 0) (hT : 0 < T) (x : Ad
     by
     rw [zsmul_eq_mul, to_circle, Function.Periodic.lift_coe, expMapCircle_apply]
     replace hT := complex.of_real_ne_zero.mpr hT.ne'
-    convert Complex.exp_pi_mul_i using 3
+    convert Complex.exp_pi_mul_I using 3
     field_simp
     ring
   rw [this]
Diff
@@ -206,10 +206,10 @@ theorem fourier_add {m n : ℤ} {x : AddCircle T} : fourier (m + n) x = fourier
 
 theorem fourier_norm [Fact (0 < T)] (n : ℤ) : ‖@fourier T n‖ = 1 :=
   by
-  rw [ContinuousMap.norm_eq_supᵢ_norm]
+  rw [ContinuousMap.norm_eq_iSup_norm]
   have : ∀ x : AddCircle T, ‖fourier n x‖ = 1 := fun x => abs_coe_circle _
   simp_rw [this]
-  exact @csupᵢ_const _ _ _ Zero.nonempty _
+  exact @ciSup_const _ _ _ Zero.nonempty _
 #align fourier_norm fourier_norm
 
 /-- For `n ≠ 0`, a translation by `T / 2 / n` negates the function `fourier n`. -/
Diff
@@ -313,7 +313,7 @@ theorem span_fourierLp_closure_eq_top {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p
 #align span_fourier_Lp_closure_eq_top span_fourierLp_closure_eq_top
 
 /-- The monomials `fourier n` are an orthonormal set with respect to normalised Haar measure. -/
-theorem orthonormal_fourier : Orthonormal ℂ (@fourierLp T _ 2 _) :=
+theorem orthonormalFourier : Orthonormal ℂ (@fourierLp T _ 2 _) :=
   by
   rw [orthonormal_iff_ite]
   intro i j
@@ -332,7 +332,7 @@ theorem orthonormal_fourier : Orthonormal ℂ (@fourierLp T _ 2 _) :=
     exact sub_ne_zero.mpr (Ne.symm h)
   convert integral_eq_zero_of_add_right_eq_neg (fourier_add_half_inv_index hij hT.elim)
   exact IsAddLeftInvariant.is_add_right_invariant
-#align orthonormal_fourier orthonormal_fourier
+#align orthonormal_fourier orthonormalFourier
 
 end Monomials
 
@@ -442,7 +442,7 @@ section FourierL2
 /-- We define `fourier_basis` to be a `ℤ`-indexed Hilbert basis for `Lp ℂ 2 haar_add_circle`,
 which by definition is an isometric isomorphism from `Lp ℂ 2 haar_add_circle` to `ℓ²(ℤ, ℂ)`. -/
 def fourierBasis : HilbertBasis ℤ ℂ (lp ℂ 2 <| @haarAddCircle T hT) :=
-  HilbertBasis.mk orthonormal_fourier (span_fourierLp_closure_eq_top (by norm_num)).ge
+  HilbertBasis.mk orthonormalFourier (span_fourierLp_closure_eq_top (by norm_num)).ge
 #align fourier_basis fourierBasis
 
 /-- The elements of the Hilbert basis `fourier_basis` are the functions `fourier_Lp 2`, i.e. the
Diff
@@ -136,8 +136,8 @@ def haarAddCircle : Measure (AddCircle T) :=
   addHaarMeasure ⊤deriving IsAddHaarMeasure
 #align add_circle.haar_add_circle AddCircle.haarAddCircle
 
-instance : IsProbabilityMeasure (@haarAddCircle T _) :=
-  IsProbabilityMeasure.mk add_haarMeasure_self
+instance : ProbabilityMeasure (@haarAddCircle T _) :=
+  ProbabilityMeasure.mk add_haarMeasure_self
 
 theorem volume_eq_smul_haarAddCircle :
     (volume : Measure (AddCircle T)) = ENNReal.ofReal T • haarAddCircle :=
Diff
@@ -252,13 +252,13 @@ theorem fourierSubalgebra_coe : (@fourierSubalgebra T).toSubmodule = span ℂ (r
 
 /-- The subalgebra of `C(add_circle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is invariant under
 complex conjugation. -/
-theorem fourierSubalgebra_conj_invariant :
+theorem fourierSubalgebraConjInvariant :
     ConjInvariantSubalgebra ((@fourierSubalgebra T).restrictScalars ℝ) :=
   by
   apply subalgebra_conj_invariant
   rintro _ ⟨n, rfl⟩
   exact ⟨-n, ext fun _ => fourier_neg⟩
-#align fourier_subalgebra_conj_invariant fourierSubalgebra_conj_invariant
+#align fourier_subalgebra_conj_invariant fourierSubalgebraConjInvariant
 
 variable [hT : Fact (0 < T)]
 
@@ -279,7 +279,7 @@ theorem fourierSubalgebra_separatesPoints : (@fourierSubalgebra T).SeparatesPoin
 /-- The subalgebra of `C(add_circle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is dense. -/
 theorem fourierSubalgebra_closure_eq_top : (@fourierSubalgebra T).topologicalClosure = ⊤ :=
   ContinuousMap.subalgebra_isROrC_topologicalClosure_eq_top_of_separatesPoints fourierSubalgebra
-    fourierSubalgebra_separatesPoints fourierSubalgebra_conj_invariant
+    fourierSubalgebra_separatesPoints fourierSubalgebraConjInvariant
 #align fourier_subalgebra_closure_eq_top fourierSubalgebra_closure_eq_top
 
 /-- The linear span of the monomials `fourier n` is dense in `C(add_circle T, ℂ)`. -/
Diff
@@ -133,11 +133,11 @@ include hT
 
 /-- Haar measure on the additive circle, normalised to have total measure 1. -/
 def haarAddCircle : Measure (AddCircle T) :=
-  add_haar_measure ⊤deriving IsAddHaarMeasure
+  addHaarMeasure ⊤deriving IsAddHaarMeasure
 #align add_circle.haar_add_circle AddCircle.haarAddCircle
 
 instance : IsProbabilityMeasure (@haarAddCircle T _) :=
-  IsProbabilityMeasure.mk add_haar_measure_self
+  IsProbabilityMeasure.mk add_haarMeasure_self
 
 theorem volume_eq_smul_haarAddCircle :
     (volume : Measure (AddCircle T)) = ENNReal.ofReal T • haarAddCircle :=
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Heather Macbeth, David Loeffler
 
 ! This file was ported from Lean 3 source module analysis.fourier.add_circle
-! leanprover-community/mathlib commit a8c97ed34c07fcfd7ebc6b83179b8f687275eba9
+! leanprover-community/mathlib commit 011cafb4a5bc695875d186e245d6b3df03bf6c40
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -16,6 +16,7 @@ import Mathbin.MeasureTheory.Function.L2Space
 import Mathbin.MeasureTheory.Group.Integration
 import Mathbin.MeasureTheory.Integral.Periodic
 import Mathbin.Topology.ContinuousFunction.StoneWeierstrass
+import Mathbin.MeasureTheory.Integral.FundThmCalculus
 
 /-!
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Heather Macbeth, David Loeffler
 
 ! This file was ported from Lean 3 source module analysis.fourier.add_circle
-! leanprover-community/mathlib commit 46b633fd842bef9469441c0209906f6dddd2b4f5
+! leanprover-community/mathlib commit a8c97ed34c07fcfd7ebc6b83179b8f687275eba9
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -304,7 +304,7 @@ theorem coeFn_fourierLp (p : ℝ≥0∞) [Fact (1 ≤ p)] (n : ℤ) :
 theorem span_fourierLp_closure_eq_top {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) :
     (span ℂ (range (@fourierLp T _ p _))).topologicalClosure = ⊤ :=
   by
-  convert(ContinuousMap.toLp_denseRange ℂ hp (@haar_add_circle T hT)
+  convert(ContinuousMap.toLp_denseRange ℂ (@haar_add_circle T hT) hp
           ℂ).topologicalClosure_map_submodule
       span_fourier_closure_eq_top
   rw [map_span, range_comp]
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Heather Macbeth, David Loeffler
 
 ! This file was ported from Lean 3 source module analysis.fourier.add_circle
-! leanprover-community/mathlib commit 8cce17e5783303db93df6810de9d85dd0f9e402a
+! leanprover-community/mathlib commit 46b633fd842bef9469441c0209906f6dddd2b4f5
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -483,7 +483,7 @@ theorem tsum_sq_fourierCoeff (f : lp ℂ 2 <| @haarAddCircle T hT) :
     exact_mod_cast lp.norm_rpow_eq_tsum _ (fourier_basis.repr f)
     norm_num
   have H₂ : ‖fourier_basis.repr f‖ ^ 2 = ‖f‖ ^ 2 := by simp
-  have H₃ := congr_arg IsROrC.re (@L2.inner_def (AddCircle T) ℂ ℂ _ _ _ _ f f)
+  have H₃ := congr_arg IsROrC.re (@L2.inner_def (AddCircle T) ℂ ℂ _ _ _ _ _ f f)
   rw [← integral_re] at H₃
   · simp only [← norm_sq_eq_inner] at H₃
     rw [← H₁, H₂, H₃]
Diff
@@ -304,8 +304,8 @@ theorem coeFn_fourierLp (p : ℝ≥0∞) [Fact (1 ≤ p)] (n : ℤ) :
 theorem span_fourierLp_closure_eq_top {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) :
     (span ℂ (range (@fourierLp T _ p _))).topologicalClosure = ⊤ :=
   by
-  convert
-    (ContinuousMap.toLp_denseRange ℂ hp (@haar_add_circle T hT) ℂ).topologicalClosure_map_submodule
+  convert(ContinuousMap.toLp_denseRange ℂ hp (@haar_add_circle T hT)
+          ℂ).topologicalClosure_map_submodule
       span_fourier_closure_eq_top
   rw [map_span, range_comp]
   simp only [ContinuousLinearMap.coe_coe]
@@ -559,7 +559,7 @@ theorem has_antideriv_at_fourier_neg (hT : Fact (0 < T)) {n : ℤ} (hn : n ≠ 0
     HasDerivAt (fun y : ℝ => (T : ℂ) / (-2 * π * I * n) * fourier (-n) (y : AddCircle T))
       (fourier (-n) (x : AddCircle T)) x :=
   by
-  convert (hasDerivAt_fourier_neg T n x).div_const (-2 * π * I * n / T) using 1
+  convert(hasDerivAt_fourier_neg T n x).div_const (-2 * π * I * n / T) using 1
   · ext1 y
     rw [div_div_eq_mul_div]
     ring
Diff
@@ -200,7 +200,7 @@ theorem fourier_neg {n : ℤ} {x : AddCircle T} : fourier (-n) x = conj (fourier
 
 @[simp]
 theorem fourier_add {m n : ℤ} {x : AddCircle T} : fourier (m + n) x = fourier m x * fourier n x :=
-  by simp_rw [fourier_apply, add_zsmul, to_circle_add, coe_mul_unit_sphere]
+  by simp_rw [fourier_apply, add_zsmul, to_circle_add, coe_mul_unitSphere]
 #align fourier_add fourier_add
 
 theorem fourier_norm [Fact (0 < T)] (n : ℤ) : ‖@fourier T n‖ = 1 :=
@@ -215,7 +215,7 @@ theorem fourier_norm [Fact (0 < T)] (n : ℤ) : ‖@fourier T n‖ = 1 :=
 theorem fourier_add_half_inv_index {n : ℤ} (hn : n ≠ 0) (hT : 0 < T) (x : AddCircle T) :
     fourier n (x + (T / 2 / n : ℝ)) = -fourier n x :=
   by
-  rw [fourier_apply, zsmul_add, ← QuotientAddGroup.mk_zsmul, to_circle_add, coe_mul_unit_sphere]
+  rw [fourier_apply, zsmul_add, ← QuotientAddGroup.mk_zsmul, to_circle_add, coe_mul_unitSphere]
   have : (n : ℂ) ≠ 0 := by simpa using hn
   have : (@to_circle T (n • (T / 2 / n) : ℝ) : ℂ) = -1 :=
     by
Diff
@@ -251,13 +251,13 @@ theorem fourierSubalgebra_coe : (@fourierSubalgebra T).toSubmodule = span ℂ (r
 
 /-- The subalgebra of `C(add_circle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is invariant under
 complex conjugation. -/
-theorem fourierSubalgebraConjInvariant :
+theorem fourierSubalgebra_conj_invariant :
     ConjInvariantSubalgebra ((@fourierSubalgebra T).restrictScalars ℝ) :=
   by
   apply subalgebra_conj_invariant
   rintro _ ⟨n, rfl⟩
   exact ⟨-n, ext fun _ => fourier_neg⟩
-#align fourier_subalgebra_conj_invariant fourierSubalgebraConjInvariant
+#align fourier_subalgebra_conj_invariant fourierSubalgebra_conj_invariant
 
 variable [hT : Fact (0 < T)]
 
@@ -278,7 +278,7 @@ theorem fourierSubalgebra_separatesPoints : (@fourierSubalgebra T).SeparatesPoin
 /-- The subalgebra of `C(add_circle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is dense. -/
 theorem fourierSubalgebra_closure_eq_top : (@fourierSubalgebra T).topologicalClosure = ⊤ :=
   ContinuousMap.subalgebra_isROrC_topologicalClosure_eq_top_of_separatesPoints fourierSubalgebra
-    fourierSubalgebra_separatesPoints fourierSubalgebraConjInvariant
+    fourierSubalgebra_separatesPoints fourierSubalgebra_conj_invariant
 #align fourier_subalgebra_closure_eq_top fourierSubalgebra_closure_eq_top
 
 /-- The linear span of the monomials `fourier n` is dense in `C(add_circle T, ℂ)`. -/
@@ -312,7 +312,7 @@ theorem span_fourierLp_closure_eq_top {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p
 #align span_fourier_Lp_closure_eq_top span_fourierLp_closure_eq_top
 
 /-- The monomials `fourier n` are an orthonormal set with respect to normalised Haar measure. -/
-theorem orthonormalFourier : Orthonormal ℂ (@fourierLp T _ 2 _) :=
+theorem orthonormal_fourier : Orthonormal ℂ (@fourierLp T _ 2 _) :=
   by
   rw [orthonormal_iff_ite]
   intro i j
@@ -331,7 +331,7 @@ theorem orthonormalFourier : Orthonormal ℂ (@fourierLp T _ 2 _) :=
     exact sub_ne_zero.mpr (Ne.symm h)
   convert integral_eq_zero_of_add_right_eq_neg (fourier_add_half_inv_index hij hT.elim)
   exact IsAddLeftInvariant.is_add_right_invariant
-#align orthonormal_fourier orthonormalFourier
+#align orthonormal_fourier orthonormal_fourier
 
 end Monomials
 
@@ -441,7 +441,7 @@ section FourierL2
 /-- We define `fourier_basis` to be a `ℤ`-indexed Hilbert basis for `Lp ℂ 2 haar_add_circle`,
 which by definition is an isometric isomorphism from `Lp ℂ 2 haar_add_circle` to `ℓ²(ℤ, ℂ)`. -/
 def fourierBasis : HilbertBasis ℤ ℂ (lp ℂ 2 <| @haarAddCircle T hT) :=
-  HilbertBasis.mk orthonormalFourier (span_fourierLp_closure_eq_top (by norm_num)).ge
+  HilbertBasis.mk orthonormal_fourier (span_fourierLp_closure_eq_top (by norm_num)).ge
 #align fourier_basis fourierBasis
 
 /-- The elements of the Hilbert basis `fourier_basis` are the functions `fourier_Lp 2`, i.e. the
Diff
@@ -176,13 +176,14 @@ theorem fourier_coe_apply {n : ℤ} {x : ℝ} :
 theorem fourier_zero {x : AddCircle T} : fourier 0 x = 1 :=
   by
   induction x using QuotientAddGroup.induction_on'
-  simp only [fourier_coe_apply, algebraMap.coe_zero, mul_zero, zero_mul, zero_div, Complex.exp_zero]
+  simp only [fourier_coe_apply, algebraMap.coe_zero, MulZeroClass.mul_zero, MulZeroClass.zero_mul,
+    zero_div, Complex.exp_zero]
 #align fourier_zero fourier_zero
 
 @[simp]
 theorem fourier_eval_zero (n : ℤ) : fourier n (0 : AddCircle T) = 1 := by
-  rw [← QuotientAddGroup.mk_zero, fourier_coe_apply, Complex.ofReal_zero, mul_zero, zero_div,
-    Complex.exp_zero]
+  rw [← QuotientAddGroup.mk_zero, fourier_coe_apply, Complex.ofReal_zero, MulZeroClass.mul_zero,
+    zero_div, Complex.exp_zero]
 #align fourier_eval_zero fourier_eval_zero
 
 @[simp]
Diff
@@ -164,11 +164,11 @@ theorem fourier_apply {n : ℤ} {x : AddCircle T} : fourier n x = toCircle (n 
 
 @[simp]
 theorem fourier_coe_apply {n : ℤ} {x : ℝ} :
-    fourier n (x : AddCircle T) = Complex.exp (2 * π * Complex.i * n * x / T) :=
+    fourier n (x : AddCircle T) = Complex.exp (2 * π * Complex.I * n * x / T) :=
   by
   rw [fourier_apply, ← QuotientAddGroup.mk_zsmul, to_circle, Function.Periodic.lift_coe,
-    expMapCircle_apply, Complex.of_real_mul, Complex.of_real_div, Complex.of_real_mul, zsmul_eq_mul,
-    Complex.of_real_mul, Complex.of_real_int_cast, Complex.of_real_bit0, Complex.of_real_one]
+    expMapCircle_apply, Complex.ofReal_mul, Complex.ofReal_div, Complex.ofReal_mul, zsmul_eq_mul,
+    Complex.ofReal_mul, Complex.ofReal_int_cast, Complex.ofReal_bit0, Complex.ofReal_one]
   congr 1; ring
 #align fourier_coe_apply fourier_coe_apply
 
@@ -181,7 +181,7 @@ theorem fourier_zero {x : AddCircle T} : fourier 0 x = 1 :=
 
 @[simp]
 theorem fourier_eval_zero (n : ℤ) : fourier n (0 : AddCircle T) = 1 := by
-  rw [← QuotientAddGroup.mk_zero, fourier_coe_apply, Complex.of_real_zero, mul_zero, zero_div,
+  rw [← QuotientAddGroup.mk_zero, fourier_coe_apply, Complex.ofReal_zero, mul_zero, zero_div,
     Complex.exp_zero]
 #align fourier_eval_zero fourier_eval_zero
 
@@ -324,7 +324,7 @@ theorem orthonormalFourier : Orthonormal ℂ (@fourierLp T _ 2 _) :=
       ext1
       exact fourier_zero
     rw [this, integral_const, measure_univ, ENNReal.one_toReal, Complex.real_smul,
-      Complex.of_real_one, mul_one]
+      Complex.ofReal_one, mul_one]
   have hij : -i + j ≠ 0 := by
     rw [add_comm]
     exact sub_ne_zero.mpr (Ne.symm h)
@@ -536,7 +536,7 @@ variable (T)
 
 theorem hasDerivAt_fourier (n : ℤ) (x : ℝ) :
     HasDerivAt (fun y : ℝ => fourier n (y : AddCircle T))
-      (2 * π * i * n / T * fourier n (x : AddCircle T)) x :=
+      (2 * π * I * n / T * fourier n (x : AddCircle T)) x :=
   by
   simp_rw [fourier_coe_apply]
   refine' (_ : HasDerivAt (fun y => exp (2 * π * I * n * y / T)) _ _).comp_of_real
@@ -548,14 +548,14 @@ theorem hasDerivAt_fourier (n : ℤ) (x : ℝ) :
 
 theorem hasDerivAt_fourier_neg (n : ℤ) (x : ℝ) :
     HasDerivAt (fun y : ℝ => fourier (-n) (y : AddCircle T))
-      (-2 * π * i * n / T * fourier (-n) (x : AddCircle T)) x :=
+      (-2 * π * I * n / T * fourier (-n) (x : AddCircle T)) x :=
   by simpa using hasDerivAt_fourier T (-n) x
 #align has_deriv_at_fourier_neg hasDerivAt_fourier_neg
 
 variable {T}
 
 theorem has_antideriv_at_fourier_neg (hT : Fact (0 < T)) {n : ℤ} (hn : n ≠ 0) (x : ℝ) :
-    HasDerivAt (fun y : ℝ => (T : ℂ) / (-2 * π * i * n) * fourier (-n) (y : AddCircle T))
+    HasDerivAt (fun y : ℝ => (T : ℂ) / (-2 * π * I * n) * fourier (-n) (y : AddCircle T))
       (fourier (-n) (x : AddCircle T)) x :=
   by
   convert (hasDerivAt_fourier_neg T n x).div_const (-2 * π * I * n / T) using 1
@@ -572,7 +572,7 @@ theorem has_antideriv_at_fourier_neg (hT : Fact (0 < T)) {n : ℤ} (hn : n ≠ 0
 theorem fourierCoeffOn_of_hasDerivAt {a b : ℝ} (hab : a < b) {f f' : ℝ → ℂ} {n : ℤ} (hn : n ≠ 0)
     (hf : ∀ x, x ∈ [a, b] → HasDerivAt f (f' x) x) (hf' : IntervalIntegrable f' volume a b) :
     fourierCoeffOn hab f n =
-      1 / (-2 * π * i * n) *
+      1 / (-2 * π * I * n) *
         (fourier (-n) (a : AddCircle (b - a)) * (f b - f a) - (b - a) * fourierCoeffOn hab f' n) :=
   by
   rw [← of_real_sub]
Diff
@@ -65,7 +65,7 @@ converges to `f` in the uniform-convergence topology of `C(add_circle T, ℂ)`.
 
 noncomputable section
 
-open Ennreal ComplexConjugate Real
+open ENNReal ComplexConjugate Real
 
 open TopologicalSpace ContinuousMap MeasureTheory MeasureTheory.Measure Algebra Submodule Set
 
@@ -139,7 +139,7 @@ instance : IsProbabilityMeasure (@haarAddCircle T _) :=
   IsProbabilityMeasure.mk add_haar_measure_self
 
 theorem volume_eq_smul_haarAddCircle :
-    (volume : Measure (AddCircle T)) = Ennreal.ofReal T • haarAddCircle :=
+    (volume : Measure (AddCircle T)) = ENNReal.ofReal T • haarAddCircle :=
   rfl
 #align add_circle.volume_eq_smul_haar_add_circle AddCircle.volume_eq_smul_haarAddCircle
 
@@ -323,7 +323,7 @@ theorem orthonormalFourier : Orthonormal ℂ (@fourierLp T _ 2 _) :=
       by
       ext1
       exact fourier_zero
-    rw [this, integral_const, measure_univ, Ennreal.one_toReal, Complex.real_smul,
+    rw [this, integral_const, measure_univ, ENNReal.one_toReal, Complex.real_smul,
       Complex.of_real_one, mul_one]
   have hij : -i + j ≠ 0 := by
     rw [add_comm]
@@ -362,7 +362,7 @@ theorem fourierCoeff_eq_intervalIntegral (f : AddCircle T → E) (n : ℤ) (a :
     rfl
   simp_rw [this]
   rw [fourierCoeff, AddCircle.intervalIntegral_preimage T a, volume_eq_smul_haar_add_circle,
-    integral_smul_measure, Ennreal.toReal_ofReal hT.out.le, ← smul_assoc, smul_eq_mul,
+    integral_smul_measure, ENNReal.toReal_ofReal hT.out.le, ← smul_assoc, smul_eq_mul,
     one_div_mul_cancel hT.out.ne', one_smul]
 #align fourier_coeff_eq_interval_integral fourierCoeff_eq_intervalIntegral
 

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
@@ -368,10 +368,10 @@ theorem fourierCoeff_liftIoc_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
     fourierCoeff (AddCircle.liftIoc T a f) n =
     fourierCoeffOn (lt_add_of_pos_right a hT.out) f n := by
   rw [fourierCoeffOn_eq_integral, fourierCoeff_eq_intervalIntegral, add_sub_cancel_left a T]
-  congr 1
-  refine' intervalIntegral.integral_congr_ae (ae_of_all _ fun x hx => _)
-  rw [liftIoc_coe_apply]
-  rwa [uIoc_of_le (lt_add_of_pos_right a hT.out).le] at hx
+  · congr 1
+    refine' intervalIntegral.integral_congr_ae (ae_of_all _ fun x hx => _)
+    rw [liftIoc_coe_apply]
+    rwa [uIoc_of_le (lt_add_of_pos_right a hT.out).le] at hx
 #align fourier_coeff_lift_Ioc_eq fourierCoeff_liftIoc_eq
 
 theorem fourierCoeff_liftIco_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
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
@@ -348,7 +348,7 @@ theorem fourierCoeffOn_eq_integral {a b : ℝ} (f : ℝ → E) (n : ℤ) (hab :
   rw [fourierCoeffOn, fourierCoeff_eq_intervalIntegral _ _ a, add_sub, add_sub_cancel_left]
   congr 1
   simp_rw [intervalIntegral.integral_of_le hab.le]
-  refine' set_integral_congr measurableSet_Ioc fun x hx => _
+  refine' setIntegral_congr measurableSet_Ioc fun x hx => _
   rw [liftIoc_coe_apply]
   rwa [add_sub, add_sub_cancel_left]
 #align fourier_coeff_on_eq_integral fourierCoeffOn_eq_integral
@@ -381,7 +381,7 @@ theorem fourierCoeff_liftIco_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
   congr 1
   simp_rw [intervalIntegral.integral_of_le (lt_add_of_pos_right a hT.out).le]
   iterate 2 rw [integral_Ioc_eq_integral_Ioo]
-  refine' set_integral_congr measurableSet_Ioo fun x hx => _
+  refine' setIntegral_congr measurableSet_Ioo fun x hx => _
   rw [liftIco_coe_apply (Ioo_subset_Ico_self hx)]
 #align fourier_coeff_lift_Ico_eq fourierCoeff_liftIco_eq
 
chore: Rename nat_cast/int_cast/rat_cast to natCast/intCast/ratCast (#11486)

Now that I am defining NNRat.cast, I want a definitive answer to this naming issue. Plenty of lemmas in mathlib already use natCast/intCast/ratCast over nat_cast/int_cast/rat_cast, and this matches with the general expectation that underscore-separated name parts correspond to a single declaration.

Diff
@@ -118,7 +118,7 @@ theorem fourier_coe_apply {n : ℤ} {x : ℝ} :
     fourier n (x : AddCircle T) = Complex.exp (2 * π * Complex.I * n * x / T) := by
   rw [fourier_apply, ← QuotientAddGroup.mk_zsmul, toCircle, Function.Periodic.lift_coe,
     expMapCircle_apply, Complex.ofReal_mul, Complex.ofReal_div, Complex.ofReal_mul, zsmul_eq_mul,
-    Complex.ofReal_mul, Complex.ofReal_int_cast]
+    Complex.ofReal_mul, Complex.ofReal_intCast]
   norm_num
   congr 1; ring
 #align fourier_coe_apply fourier_coe_apply
feat: generalize integration by parts (#11886)

Give versions with weaker conditions for intervalIntegrable.integral_deriv_mul_eq_sub, intervalIntegrable.integral_mul_deriv_eq_deriv_mul and fourierCoeffOn_of_hasDerivAt.

Diff
@@ -512,15 +512,20 @@ theorem has_antideriv_at_fourier_neg (hT : Fact (0 < T)) {n : ℤ} (hn : n ≠ 0
 #align has_antideriv_at_fourier_neg has_antideriv_at_fourier_neg
 
 /-- Express Fourier coefficients of `f` on an interval in terms of those of its derivative. -/
-theorem fourierCoeffOn_of_hasDerivAt {a b : ℝ} (hab : a < b) {f f' : ℝ → ℂ} {n : ℤ} (hn : n ≠ 0)
-    (hf : ∀ x, x ∈ [[a, b]] → HasDerivAt f (f' x) x) (hf' : IntervalIntegrable f' volume a b) :
+theorem fourierCoeffOn_of_hasDeriv_right {a b : ℝ} (hab : a < b) {f f' : ℝ → ℂ}
+    {n : ℤ} (hn : n ≠ 0)
+    (hf : ContinuousOn f [[a, b]])
+    (hff' : ∀ x, x ∈ Ioo (min a b) (max a b) → HasDerivWithinAt f (f' x) (Ioi x) x)
+    (hf' : IntervalIntegrable f' volume a b) :
     fourierCoeffOn hab f n = 1 / (-2 * π * I * n) *
       (fourier (-n) (a : AddCircle (b - a)) * (f b - f a) - (b - a) * fourierCoeffOn hab f' n) := by
   rw [← ofReal_sub]
   have hT : Fact (0 < b - a) := ⟨by linarith⟩
   simp_rw [fourierCoeffOn_eq_integral, smul_eq_mul, real_smul, ofReal_div, ofReal_one]
   conv => pattern (occs := 1 2 3) fourier _ _ * _ <;> (rw [mul_comm])
-  rw [integral_mul_deriv_eq_deriv_mul hf (fun x _ => has_antideriv_at_fourier_neg hT hn x) hf'
+  rw [integral_mul_deriv_eq_deriv_mul_of_hasDeriv_right hf
+    (fun x _ ↦ has_antideriv_at_fourier_neg hT hn x |>.continuousAt |>.continuousWithinAt) hff'
+    (fun x _ ↦ has_antideriv_at_fourier_neg hT hn x |>.hasDerivWithinAt) hf'
     (((map_continuous (fourier (-n))).comp (AddCircle.continuous_mk' _)).intervalIntegrable _ _)]
   have : ∀ u v w : ℂ, u * ((b - a : ℝ) / v * w) = (b - a : ℝ) / v * (u * w) := by intros; ring
   conv in intervalIntegral _ _ _ _ => congr; ext; rw [this]
@@ -533,6 +538,26 @@ theorem fourierCoeffOn_of_hasDerivAt {a b : ℝ} (hab : a < b) {f f' : ℝ → 
     rw [div_eq_iff (ofReal_ne_zero.mpr hT.out.ne')]
     ring
   · ring
+
+/-- Express Fourier coefficients of `f` on an interval in terms of those of its derivative. -/
+theorem fourierCoeffOn_of_hasDerivAt_Ioo {a b : ℝ} (hab : a < b) {f f' : ℝ → ℂ}
+    {n : ℤ} (hn : n ≠ 0)
+    (hf : ContinuousOn f [[a, b]])
+    (hff' : ∀ x, x ∈ Ioo (min a b) (max a b) → HasDerivAt f (f' x) x)
+    (hf' : IntervalIntegrable f' volume a b) :
+    fourierCoeffOn hab f n = 1 / (-2 * π * I * n) *
+      (fourier (-n) (a : AddCircle (b - a)) * (f b - f a) - (b - a) * fourierCoeffOn hab f' n) :=
+  fourierCoeffOn_of_hasDeriv_right hab hn hf (fun x hx ↦ hff' x hx |>.hasDerivWithinAt) hf'
+
+/-- Express Fourier coefficients of `f` on an interval in terms of those of its derivative. -/
+theorem fourierCoeffOn_of_hasDerivAt {a b : ℝ} (hab : a < b) {f f' : ℝ → ℂ} {n : ℤ} (hn : n ≠ 0)
+    (hf : ∀ x, x ∈ [[a, b]] → HasDerivAt f (f' x) x) (hf' : IntervalIntegrable f' volume a b) :
+    fourierCoeffOn hab f n = 1 / (-2 * π * I * n) *
+      (fourier (-n) (a : AddCircle (b - a)) * (f b - f a) - (b - a) * fourierCoeffOn hab f' n) :=
+  fourierCoeffOn_of_hasDerivAt_Ioo hab hn
+    (fun x hx ↦ hf x hx |>.continuousAt.continuousWithinAt)
+    (fun x hx ↦ hf x <| mem_Icc_of_Ioo hx)
+    hf'
 #align fourier_coeff_on_of_has_deriv_at fourierCoeffOn_of_hasDerivAt
 
 end deriv
refactor: Move AddCircle.toCircle to earlier file (#12000)

This PR moves AddCircle.toCircle to the earlier file Analysis/SpecialFunctions/Complex/Circle since AddCircle.toCircle only depends on periodic_expMapCircle and not the heavy imports of Analysis/Fourier/AddCircle.

Diff
@@ -71,53 +71,11 @@ variable {T : ℝ}
 
 namespace AddCircle
 
-/-! ### Map from `AddCircle` to `Circle` -/
-
-
-theorem scaled_exp_map_periodic : Function.Periodic (fun x => expMapCircle (2 * π / T * x)) T := by
-  -- The case T = 0 is not interesting, but it is true, so we prove it to save hypotheses
-  rcases eq_or_ne T 0 with (rfl | hT)
-  · intro x; simp
-  · intro x; simp_rw [mul_add]; rw [div_mul_cancel₀ _ hT, periodic_expMapCircle]
-#align add_circle.scaled_exp_map_periodic AddCircle.scaled_exp_map_periodic
-
-/-- The canonical map `fun x => exp (2 π i x / T)` from `ℝ / ℤ • T` to the unit circle in `ℂ`.
-If `T = 0` we understand this as the constant function 1. -/
-def toCircle : AddCircle T → circle :=
-  (@scaled_exp_map_periodic T).lift
-#align add_circle.to_circle AddCircle.toCircle
-
-theorem toCircle_add (x : AddCircle T) (y : AddCircle T) :
-    @toCircle T (x + y) = toCircle x * toCircle y := by
-  induction x using QuotientAddGroup.induction_on'
-  induction y using QuotientAddGroup.induction_on'
-  rw [← QuotientAddGroup.mk_add]
-  simp_rw [toCircle, Function.Periodic.lift_coe, mul_add, expMapCircle_add]
-#align add_circle.to_circle_add AddCircle.toCircle_add
-
-theorem continuous_toCircle : Continuous (@toCircle T) :=
-  continuous_coinduced_dom.mpr (expMapCircle.continuous.comp <| continuous_const.mul continuous_id')
-#align add_circle.continuous_to_circle AddCircle.continuous_toCircle
-
-theorem injective_toCircle (hT : T ≠ 0) : Function.Injective (@toCircle T) := by
-  intro a b h
-  induction a using QuotientAddGroup.induction_on'
-  induction b using QuotientAddGroup.induction_on'
-  simp_rw [toCircle, Function.Periodic.lift_coe] at h
-  obtain ⟨m, hm⟩ := expMapCircle_eq_expMapCircle.mp h.symm
-  rw [QuotientAddGroup.eq]; simp_rw [AddSubgroup.mem_zmultiples_iff, zsmul_eq_mul]
-  use m
-  field_simp at hm
-  rw [← mul_right_inj' Real.two_pi_pos.ne']
-  linarith
-#align add_circle.injective_to_circle AddCircle.injective_toCircle
-
 /-! ### Measure on `AddCircle T`
 
 In this file we use the Haar measure on `AddCircle T` normalised to have total measure 1 (which is
 **not** the same as the standard measure defined in `Topology.Instances.AddCircle`). -/
 
-
 variable [hT : Fact (0 < T)]
 
 /-- Haar measure on the additive circle, normalised to have total measure 1. -/
chore: remove some mathlib3 names in doc comments (#11931)
Diff
@@ -33,7 +33,7 @@ This file contains basic results on Fourier series for functions on the additive
   monomials `fourier n`.
 * `fourierCoeff f n`, for `f : AddCircle T → E` (with `E` a complete normed `ℂ`-vector space), is
   the `n`-th Fourier coefficient of `f`, defined as an integral over `AddCircle T`. The lemma
-  `fourierCoeff_eq_interval_integral` expresses this as an integral over `[a, a + T]` for any real
+  `fourierCoeff_eq_intervalIntegral` expresses this as an integral over `[a, a + T]` for any real
   `a`.
 * `fourierCoeffOn`, for `f : ℝ → E` and `a < b` reals, is the `n`-th Fourier
   coefficient of the unique periodic function of period `b - a` which agrees with `f` on `(a, b]`.
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
@@ -451,7 +451,7 @@ theorem fourierBasis_repr (f : Lp ℂ 2 <| @haarAddCircle T hT) (i : ℤ) :
     fourierBasis.repr f i = fourierCoeff f i := by
   trans ∫ t : AddCircle T, conj ((@fourierLp T hT 2 _ i : AddCircle T → ℂ) t) * f t ∂haarAddCircle
   · rw [fourierBasis.repr_apply_apply f i, MeasureTheory.L2.inner_def, coe_fourierBasis]
-    simp only [IsROrC.inner_apply]
+    simp only [RCLike.inner_apply]
   · apply integral_congr_ae
     filter_upwards [coeFn_fourierLp 2 i] with _ ht
     rw [ht, ← fourier_neg, smul_eq_mul]
@@ -474,7 +474,7 @@ theorem tsum_sq_fourierCoeff (f : Lp ℂ 2 <| @haarAddCircle T hT) :
     apply_mod_cast lp.norm_rpow_eq_tsum ?_ (fourierBasis.repr f)
     norm_num
   have H₂ : ‖fourierBasis.repr f‖ ^ 2 = ‖f‖ ^ 2 := by simp
-  have H₃ := congr_arg IsROrC.re (@L2.inner_def (AddCircle T) ℂ ℂ _ _ _ _ _ f f)
+  have H₃ := congr_arg RCLike.re (@L2.inner_def (AddCircle T) ℂ ℂ _ _ _ _ _ f f)
   rw [← integral_re] at H₃
   · simp only [← norm_sq_eq_inner] at H₃
     rw [← H₁, H₂, H₃]
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
@@ -78,7 +78,7 @@ theorem scaled_exp_map_periodic : Function.Periodic (fun x => expMapCircle (2 *
   -- The case T = 0 is not interesting, but it is true, so we prove it to save hypotheses
   rcases eq_or_ne T 0 with (rfl | hT)
   · intro x; simp
-  · intro x; simp_rw [mul_add]; rw [div_mul_cancel _ hT, periodic_expMapCircle]
+  · intro x; simp_rw [mul_add]; rw [div_mul_cancel₀ _ hT, periodic_expMapCircle]
 #align add_circle.scaled_exp_map_periodic AddCircle.scaled_exp_map_periodic
 
 /-- The canonical map `fun x => exp (2 π i x / T)` from `ℝ / ℤ • T` to the unit circle in `ℂ`.
@@ -387,12 +387,12 @@ theorem fourierCoeffOn_eq_integral {a b : ℝ} (f : ℝ → E) (n : ℤ) (hab :
     fourierCoeffOn hab f n =
       (1 / (b - a)) • ∫ x in a..b, fourier (-n) (x : AddCircle (b - a)) • f x := by
   haveI := Fact.mk (by linarith : 0 < b - a)
-  rw [fourierCoeffOn, fourierCoeff_eq_intervalIntegral _ _ a, add_sub, add_sub_cancel']
+  rw [fourierCoeffOn, fourierCoeff_eq_intervalIntegral _ _ a, add_sub, add_sub_cancel_left]
   congr 1
   simp_rw [intervalIntegral.integral_of_le hab.le]
   refine' set_integral_congr measurableSet_Ioc fun x hx => _
   rw [liftIoc_coe_apply]
-  rwa [add_sub, add_sub_cancel']
+  rwa [add_sub, add_sub_cancel_left]
 #align fourier_coeff_on_eq_integral fourierCoeffOn_eq_integral
 
 theorem fourierCoeffOn.const_smul {a b : ℝ} (f : ℝ → E) (c : ℂ) (n : ℤ) (hab : a < b) :
@@ -409,7 +409,7 @@ theorem fourierCoeffOn.const_mul {a b : ℝ} (f : ℝ → ℂ) (c : ℂ) (n : 
 theorem fourierCoeff_liftIoc_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
     fourierCoeff (AddCircle.liftIoc T a f) n =
     fourierCoeffOn (lt_add_of_pos_right a hT.out) f n := by
-  rw [fourierCoeffOn_eq_integral, fourierCoeff_eq_intervalIntegral, add_sub_cancel' a T]
+  rw [fourierCoeffOn_eq_integral, fourierCoeff_eq_intervalIntegral, add_sub_cancel_left a T]
   congr 1
   refine' intervalIntegral.integral_congr_ae (ae_of_all _ fun x hx => _)
   rw [liftIoc_coe_apply]
@@ -419,7 +419,7 @@ theorem fourierCoeff_liftIoc_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
 theorem fourierCoeff_liftIco_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
     fourierCoeff (AddCircle.liftIco T a f) n =
     fourierCoeffOn (lt_add_of_pos_right a hT.out) f n := by
-  rw [fourierCoeffOn_eq_integral, fourierCoeff_eq_intervalIntegral _ _ a, add_sub_cancel' a T]
+  rw [fourierCoeffOn_eq_integral, fourierCoeff_eq_intervalIntegral _ _ a, add_sub_cancel_left a T]
   congr 1
   simp_rw [intervalIntegral.integral_of_le (lt_add_of_pos_right a hT.out).le]
   iterate 2 rw [integral_Ioc_eq_integral_Ioo]
@@ -550,7 +550,7 @@ theorem has_antideriv_at_fourier_neg (hT : Fact (0 < T)) {n : ℤ} (hn : n ≠ 0
       (fourier (-n) (x : AddCircle T)) x := by
   convert (hasDerivAt_fourier_neg T n x).div_const (-2 * π * I * n / T) using 1
   · ext1 y; rw [div_div_eq_mul_div]; ring
-  · simp [mul_div_cancel_left, hn, (Fact.out : 0 < T).ne', Real.pi_pos.ne']
+  · simp [mul_div_cancel_left₀, hn, (Fact.out : 0 < T).ne', Real.pi_pos.ne']
 #align has_antideriv_at_fourier_neg has_antideriv_at_fourier_neg
 
 /-- Express Fourier coefficients of `f` on an interval in terms of those of its derivative. -/
fix(Analysis/Normed/Group): make instance helpers reducible (#10726)

Zulip thread

This slightly simplifies two downstream proofs, as a bonus.

Co-authored-by: Matthew Ballard <matt@mrb.email>

Diff
@@ -477,7 +477,6 @@ theorem tsum_sq_fourierCoeff (f : Lp ℂ 2 <| @haarAddCircle T hT) :
   have H₃ := congr_arg IsROrC.re (@L2.inner_def (AddCircle T) ℂ ℂ _ _ _ _ _ f f)
   rw [← integral_re] at H₃
   · simp only [← norm_sq_eq_inner] at H₃
-    conv_rhs at H₃ => enter [2, a]; rw [← norm_sq_eq_inner]
     rw [← H₁, H₂, H₃]
   · exact L2.integrable_inner f f
 #align tsum_sq_fourier_coeff tsum_sq_fourierCoeff
chore: classify simp can do this porting notes (#10619)

Classify by adding issue number (#10618) to porting notes claiming anything semantically equivalent to simp can prove this or simp can simplify this.

Diff
@@ -188,7 +188,7 @@ theorem fourier_eval_zero (n : ℤ) : fourier n (0 : AddCircle T) = 1 := by
     zero_div, Complex.exp_zero]
 #align fourier_eval_zero fourier_eval_zero
 
--- @[simp] -- Porting note: simp can prove this
+-- @[simp] -- Porting note (#10618): simp can prove this
 theorem fourier_one {x : AddCircle T} : fourier 1 x = toCircle x := by rw [fourier_apply, one_zsmul]
 #align fourier_one fourier_one
 
chore: move to v4.6.0-rc1, merging adaptations from bump/v4.6.0 (#10176)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Joachim Breitner <mail@joachim-breitner.de>

Diff
@@ -358,7 +358,8 @@ theorem fourierCoeff_eq_intervalIntegral (f : AddCircle T → E) (n : ℤ) (a :
     fourierCoeff f n = (1 / T) • ∫ x in a..a + T, @fourier T (-n) x • f x := by
   have : ∀ x : ℝ, @fourier T (-n) x • f x = (fun z : AddCircle T => @fourier T (-n) z • f z) x := by
     intro x; rfl
-  simp_rw [this]
+  -- After leanprover/lean4#3124, we need to add `singlePass := true` to avoid an infinite loop.
+  simp_rw (config := {singlePass := true}) [this]
   rw [fourierCoeff, AddCircle.intervalIntegral_preimage T a (fun z => _ • _),
     volume_eq_smul_haarAddCircle, integral_smul_measure, ENNReal.toReal_ofReal hT.out.le,
     ← smul_assoc, smul_eq_mul, one_div_mul_cancel hT.out.ne', one_smul]
fix: Clm -> CLM, Cle -> CLE (#10018)

Rename

  • Complex.equivRealProdClmComplex.equivRealProdCLM;
    • TODO: should this one use CLE?
  • Complex.reClmComplex.reCLM;
  • Complex.imClmComplex.imCLM;
  • Complex.conjLieComplex.conjLIE;
  • Complex.conjCleComplex.conjCLE;
  • Complex.ofRealLiComplex.ofRealLI;
  • Complex.ofRealClmComplex.ofRealCLM;
  • fderivInnerClmfderivInnerCLM;
  • LinearPMap.adjointDomainMkClmLinearPMap.adjointDomainMkCLM;
  • LinearPMap.adjointDomainMkClmExtendLinearPMap.adjointDomainMkCLMExtend;
  • IsROrC.reClmIsROrC.reCLM;
  • IsROrC.imClmIsROrC.imCLM;
  • IsROrC.conjLieIsROrC.conjLIE;
  • IsROrC.conjCleIsROrC.conjCLE;
  • IsROrC.ofRealLiIsROrC.ofRealLI;
  • IsROrC.ofRealClmIsROrC.ofRealCLM;
  • MeasureTheory.condexpL1ClmMeasureTheory.condexpL1CLM;
  • algebraMapClmalgebraMapCLM;
  • WeakDual.CharacterSpace.toClmWeakDual.CharacterSpace.toCLM;
  • BoundedContinuousFunction.evalClmBoundedContinuousFunction.evalCLM;
  • ContinuousMap.evalClmContinuousMap.evalCLM;
  • TrivSqZeroExt.fstClmTrivSqZeroExt.fstClm;
  • TrivSqZeroExt.sndClmTrivSqZeroExt.sndCLM;
  • TrivSqZeroExt.inlClmTrivSqZeroExt.inlCLM;
  • TrivSqZeroExt.inrClmTrivSqZeroExt.inrCLM

and related theorems.

Diff
@@ -511,7 +511,7 @@ theorem hasSum_fourier_series_of_summable (h : Summable (fourierCoeff f)) :
 converges everywhere pointwise to `f`. -/
 theorem has_pointwise_sum_fourier_series_of_summable (h : Summable (fourierCoeff f))
     (x : AddCircle T) : HasSum (fun i => fourierCoeff f i • fourier i x) (f x) := by
-  convert (ContinuousMap.evalClm ℂ x).hasSum (hasSum_fourier_series_of_summable h)
+  convert (ContinuousMap.evalCLM ℂ x).hasSum (hasSum_fourier_series_of_summable h)
 #align has_pointwise_sum_fourier_series_of_summable has_pointwise_sum_fourier_series_of_summable
 
 end Convergence
chore: tidy various files (#9903)
Diff
@@ -219,7 +219,7 @@ theorem fourier_norm [Fact (0 < T)] (n : ℤ) : ‖@fourier T n‖ = 1 := by
   rw [ContinuousMap.norm_eq_iSup_norm]
   have : ∀ x : AddCircle T, ‖fourier n x‖ = 1 := fun x => abs_coe_circle _
   simp_rw [this]
-  exact @ciSup_const _ _ _ Zero.nonempty _
+  exact @ciSup_const _ _ _ Zero.instNonempty _
 #align fourier_norm fourier_norm
 
 /-- For `n ≠ 0`, a translation by `T / 2 / n` negates the function `fourier n`. -/
feat: Basic Complex lemmas (#9527)

and rename ofReal_mul_re → re_mul_ofReal, ofReal_mul_im → im_mul_ofReal.

From LeanAPAP

Diff
@@ -550,11 +550,7 @@ theorem has_antideriv_at_fourier_neg (hT : Fact (0 < T)) {n : ℤ} (hn : n ≠ 0
       (fourier (-n) (x : AddCircle T)) x := by
   convert (hasDerivAt_fourier_neg T n x).div_const (-2 * π * I * n / T) using 1
   · ext1 y; rw [div_div_eq_mul_div]; ring
-  · rw [mul_div_cancel_left]
-    simp only [Ne.def, div_eq_zero_iff, neg_eq_zero, mul_eq_zero, bit0_eq_zero, one_ne_zero,
-      ofReal_eq_zero, false_or_iff, Int.cast_eq_zero, not_or]
-    norm_num
-    exact ⟨⟨⟨Real.pi_ne_zero, I_ne_zero⟩, hn⟩, hT.out.ne'⟩
+  · simp [mul_div_cancel_left, hn, (Fact.out : 0 < T).ne', Real.pi_pos.ne']
 #align has_antideriv_at_fourier_neg has_antideriv_at_fourier_neg
 
 /-- Express Fourier coefficients of `f` on an interval in terms of those of its derivative. -/
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
@@ -63,8 +63,6 @@ converges to `f` in the uniform-convergence topology of `C(AddCircle T, ℂ)`.
 
 noncomputable section
 
-local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue lean4#2220
-
 open scoped ENNReal ComplexConjugate Real
 
 open TopologicalSpace ContinuousMap MeasureTheory MeasureTheory.Measure Algebra Submodule Set
@@ -148,12 +146,12 @@ section Monomials
 /-- The family of exponential monomials `fun x => exp (2 π i n x / T)`, parametrized by `n : ℤ` and
 considered as bundled continuous maps from `ℝ / ℤ • T` to `ℂ`. -/
 def fourier (n : ℤ) : C(AddCircle T, ℂ) where
-  toFun x := toCircle (n • x)
+  toFun x := toCircle (n • x :)
   continuous_toFun := continuous_induced_dom.comp <| continuous_toCircle.comp <| continuous_zsmul _
 #align fourier fourier
 
 @[simp]
-theorem fourier_apply {n : ℤ} {x : AddCircle T} : fourier n x = toCircle (n • x) :=
+theorem fourier_apply {n : ℤ} {x : AddCircle T} : fourier n x = toCircle (n • x :) :=
   rfl
 #align fourier_apply fourier_apply
 
@@ -169,7 +167,7 @@ theorem fourier_coe_apply {n : ℤ} {x : ℝ} :
 
 @[simp]
 theorem fourier_coe_apply' {n : ℤ} {x : ℝ} :
-    toCircle (n • (x : AddCircle T)) = Complex.exp (2 * π * Complex.I * n * x / T) := by
+    toCircle (n • (x : AddCircle T) :) = Complex.exp (2 * π * Complex.I * n * x / T) := by
   rw [← fourier_apply]; exact fourier_coe_apply
 
 -- @[simp] -- Porting note: simp normal form is `fourier_zero'`
@@ -214,7 +212,7 @@ theorem fourier_add {m n : ℤ} {x : AddCircle T} : fourier (m+n) x = fourier m
 
 @[simp]
 theorem fourier_add' {m n : ℤ} {x : AddCircle T} :
-    toCircle ((m + n) • x) = fourier m x * fourier n x := by
+    toCircle ((m + n) • x :) = fourier m x * fourier n x := by
   rw [← fourier_apply]; exact fourier_add
 
 theorem fourier_norm [Fact (0 < T)] (n : ℤ) : ‖@fourier T n‖ = 1 := by
@@ -367,7 +365,7 @@ theorem fourierCoeff_eq_intervalIntegral (f : AddCircle T → E) (n : ℤ) (a :
 #align fourier_coeff_eq_interval_integral fourierCoeff_eq_intervalIntegral
 
 theorem fourierCoeff.const_smul (f : AddCircle T → E) (c : ℂ) (n : ℤ) :
-    fourierCoeff (c • f) n = c • fourierCoeff f n := by
+    fourierCoeff (c • f :) n = c • fourierCoeff f n := by
   simp_rw [fourierCoeff, Pi.smul_apply, ← smul_assoc, smul_eq_mul, mul_comm, ← smul_eq_mul,
     smul_assoc, integral_smul]
 #align fourier_coeff.const_smul fourierCoeff.const_smul
perf(FunLike.Basic): beta reduce CoeFun.coe (#7905)

This eliminates (fun a ↦ β) α in the type when applying a FunLike.

Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -570,7 +570,6 @@ theorem fourierCoeffOn_of_hasDerivAt {a b : ℝ} (hab : a < b) {f f' : ℝ → 
   conv => pattern (occs := 1 2 3) fourier _ _ * _ <;> (rw [mul_comm])
   rw [integral_mul_deriv_eq_deriv_mul hf (fun x _ => has_antideriv_at_fourier_neg hT hn x) hf'
     (((map_continuous (fourier (-n))).comp (AddCircle.continuous_mk' _)).intervalIntegrable _ _)]
-  dsimp only
   have : ∀ u v w : ℂ, u * ((b - a : ℝ) / v * w) = (b - a : ℝ) / v * (u * w) := by intros; ring
   conv in intervalIntegral _ _ _ _ => congr; ext; rw [this]
   rw [(by ring : ((b - a : ℝ) : ℂ) / (-2 * π * I * n) = ((b - a : ℝ) : ℂ) * (1 / (-2 * π * I * n)))]
chore(InfiniteSum): use dot notation (#8358)

Rename

  • summable_of_norm_bounded -> Summable.of_norm_bounded;
  • summable_of_norm_bounded_eventually -> Summable.of_norm_bounded_eventually;
  • summable_of_nnnorm_bounded -> Summable.of_nnnorm_bounded;
  • summable_of_summable_norm -> Summable.of_norm;
  • summable_of_summable_nnnorm -> Summable.of_nnnorm;

New lemmas

  • Summable.of_norm_bounded_eventually_nat
  • Summable.norm

Misc changes

  • Golf a few proofs.
Diff
@@ -504,9 +504,9 @@ theorem hasSum_fourier_series_of_summable (h : Summable (fourierCoeff f)) :
     HasSum (fun i => fourierCoeff f i • fourier i) f := by
   have sum_L2 := hasSum_fourier_series_L2 (toLp (E := ℂ) 2 haarAddCircle ℂ f)
   simp_rw [fourierCoeff_toLp] at sum_L2
-  refine' ContinuousMap.hasSum_of_hasSum_Lp (summable_of_summable_norm _) sum_L2
-  simp_rw [norm_smul, fourier_norm, mul_one, summable_norm_iff]
-  exact h
+  refine ContinuousMap.hasSum_of_hasSum_Lp (.of_norm ?_) sum_L2
+  simp_rw [norm_smul, fourier_norm, mul_one]
+  exact h.norm
 #align has_sum_fourier_series_of_summable hasSum_fourier_series_of_summable
 
 /-- If the sequence of Fourier coefficients of `f` is summable, then the Fourier series of `f`
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
@@ -8,7 +8,7 @@ import Mathlib.Analysis.SpecialFunctions.Complex.Circle
 import Mathlib.Analysis.InnerProductSpace.l2Space
 import Mathlib.MeasureTheory.Function.ContinuousMapDense
 import Mathlib.MeasureTheory.Function.L2Space
-import Mathlib.MeasureTheory.Group.Integration
+import Mathlib.MeasureTheory.Group.Integral
 import Mathlib.MeasureTheory.Integral.Periodic
 import Mathlib.Topology.ContinuousFunction.StoneWeierstrass
 import Mathlib.MeasureTheory.Integral.FundThmCalculus
field_simp: Use positivity as a discharger (#6312)

The main reasons is that having h : 0 < denom in the context should suffice for field_simp to do its job, without the need to manually pass h.ne or similar.

Quite a few have := … ≠ 0 could be dropped, and some field_simp calls no longer need explicit arguments; this is promising.

This does break some proofs where field_simp was not used as a closing tactic, and it now shuffles terms around a bit different. These were fixed. Using field_simp in the middle of a proof seems rather fragile anyways.

As a drive-by contribution, positivity now knows about π > 0.

fixes: #4835

Co-authored-by: Matthew Ballard <matt@mrb.email>

Diff
@@ -109,7 +109,7 @@ theorem injective_toCircle (hT : T ≠ 0) : Function.Injective (@toCircle T) :=
   obtain ⟨m, hm⟩ := expMapCircle_eq_expMapCircle.mp h.symm
   rw [QuotientAddGroup.eq]; simp_rw [AddSubgroup.mem_zmultiples_iff, zsmul_eq_mul]
   use m
-  field_simp [Real.two_pi_pos.ne'] at hm
+  field_simp at hm
   rw [← mul_right_inj' Real.two_pi_pos.ne']
   linarith
 #align add_circle.injective_to_circle AddCircle.injective_toCircle
chore: drop MulZeroClass. in mul_zero/zero_mul (#6682)

Search&replace MulZeroClass.mul_zero -> mul_zero, MulZeroClass.zero_mul -> zero_mul.

These were introduced by Mathport, as the full name of mul_zero is actually MulZeroClass.mul_zero (it's exported with the short name).

Diff
@@ -186,7 +186,7 @@ theorem fourier_zero' {x : AddCircle T} : @toCircle T 0 = (1 : ℂ) := by
 
 -- @[simp] -- Porting note: simp normal form is *also* `fourier_zero'`
 theorem fourier_eval_zero (n : ℤ) : fourier n (0 : AddCircle T) = 1 := by
-  rw [← QuotientAddGroup.mk_zero, fourier_coe_apply, Complex.ofReal_zero, MulZeroClass.mul_zero,
+  rw [← QuotientAddGroup.mk_zero, fourier_coe_apply, Complex.ofReal_zero, mul_zero,
     zero_div, Complex.exp_zero]
 #align fourier_eval_zero fourier_eval_zero
 
chore: regularize HPow.hPow porting notes (#6465)
Diff
@@ -63,7 +63,7 @@ converges to `f` in the uniform-convergence topology of `C(AddCircle T, ℂ)`.
 
 noncomputable section
 
-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
 
 open scoped ENNReal ComplexConjugate Real
 
refactor: link the Stone-Weierstrass theorem to the StarSubalgebra API (#5267)

The Stone-Weierstrass theorem, including the version for IsROrC 𝕜, was developed prior to the introduction of StarSubalgebra. As such, in order to prove it, a predicate ConjInvariantSubalgebra was introduced for -subalgebras of C(X, 𝕜). This refactors the Stone-Weierstrass theorem to instead use the StarSubalgebra API and removes ContinuousMap.ConjInvariantSubalgebra entirely. In addition, we provide a few corollaries concerning polynomial functions which are missing from the library.

Diff
@@ -237,15 +237,22 @@ theorem fourier_add_half_inv_index {n : ℤ} (hn : n ≠ 0) (hT : 0 < T) (x : Ad
   rw [this]; simp
 #align fourier_add_half_inv_index fourier_add_half_inv_index
 
-/-- The subalgebra of `C(AddCircle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` . -/
-def fourierSubalgebra : Subalgebra ℂ C(AddCircle T, ℂ) :=
-  Algebra.adjoin ℂ (range fourier)
+/-- The star subalgebra of `C(AddCircle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` . -/
+def fourierSubalgebra : StarSubalgebra ℂ C(AddCircle T, ℂ) where
+  toSubalgebra := Algebra.adjoin ℂ (range fourier)
+  star_mem' := by
+    show Algebra.adjoin ℂ (range (fourier (T := T))) ≤
+      star (Algebra.adjoin ℂ (range (fourier (T := T))))
+    refine adjoin_le ?_
+    rintro - ⟨n, rfl⟩
+    exact subset_adjoin ⟨-n, ext fun _ => fourier_neg⟩
+
 #align fourier_subalgebra fourierSubalgebra
 
-/-- The subalgebra of `C(AddCircle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is in fact the
+/-- The star subalgebra of `C(AddCircle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is in fact the
 linear span of these functions. -/
 theorem fourierSubalgebra_coe :
-    Subalgebra.toSubmodule (@fourierSubalgebra T) = span ℂ (range (@fourier T)) := by
+    Subalgebra.toSubmodule (@fourierSubalgebra T).toSubalgebra = span ℂ (range (@fourier T)) := by
   apply adjoin_eq_span_of_subset
   refine' Subset.trans _ Submodule.subset_span
   intro x hx
@@ -257,14 +264,9 @@ theorem fourierSubalgebra_coe :
     exact fourier_add
 #align fourier_subalgebra_coe fourierSubalgebra_coe
 
-/-- The subalgebra of `C(AddCircle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is invariant under
-complex conjugation. -/
-theorem fourierSubalgebra_conj_invariant :
-    ConjInvariantSubalgebra ((@fourierSubalgebra T).restrictScalars ℝ) := by
-  apply subalgebraConjInvariant
-  rintro _ ⟨n, rfl⟩
-  exact ⟨-n, ext fun _ => fourier_neg⟩
-#align fourier_subalgebra_conj_invariant fourierSubalgebra_conj_invariant
+/- a post-port refactor made `fourierSubalgebra` into a `StarSubalgebra`, and eliminated
+`conjInvariantSubalgebra` entirely, making this lemma irrelevant. -/
+#noalign fourier_subalgebra_conj_invariant
 
 variable [hT : Fact (0 < T)]
 
@@ -281,14 +283,15 @@ theorem fourierSubalgebra_separatesPoints : (@fourierSubalgebra T).SeparatesPoin
 
 /-- The subalgebra of `C(AddCircle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is dense. -/
 theorem fourierSubalgebra_closure_eq_top : (@fourierSubalgebra T).topologicalClosure = ⊤ :=
-  ContinuousMap.subalgebra_isROrC_topologicalClosure_eq_top_of_separatesPoints fourierSubalgebra
-    fourierSubalgebra_separatesPoints fourierSubalgebra_conj_invariant
+  ContinuousMap.starSubalgebra_topologicalClosure_eq_top_of_separatesPoints fourierSubalgebra
+    fourierSubalgebra_separatesPoints
 #align fourier_subalgebra_closure_eq_top fourierSubalgebra_closure_eq_top
 
 /-- The linear span of the monomials `fourier n` is dense in `C(AddCircle T, ℂ)`. -/
 theorem span_fourier_closure_eq_top : (span ℂ (range <| @fourier T)).topologicalClosure = ⊤ := by
   rw [← fourierSubalgebra_coe]
-  exact congr_arg Subalgebra.toSubmodule fourierSubalgebra_closure_eq_top
+  exact congr_arg (Subalgebra.toSubmodule <| StarSubalgebra.toSubalgebra ·)
+    fourierSubalgebra_closure_eq_top
 #align span_fourier_closure_eq_top span_fourier_closure_eq_top
 
 /-- The family of monomials `fourier n`, parametrized by `n : ℤ` and considered as
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) 2021 Heather Macbeth. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Heather Macbeth, David Loeffler
-
-! This file was ported from Lean 3 source module analysis.fourier.add_circle
-! leanprover-community/mathlib commit 8f9fea08977f7e450770933ee6abb20733b47c92
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.SpecialFunctions.ExpDeriv
 import Mathlib.Analysis.SpecialFunctions.Complex.Circle
@@ -18,6 +13,8 @@ import Mathlib.MeasureTheory.Integral.Periodic
 import Mathlib.Topology.ContinuousFunction.StoneWeierstrass
 import Mathlib.MeasureTheory.Integral.FundThmCalculus
 
+#align_import analysis.fourier.add_circle from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92"
+
 /-!
 
 # Fourier analysis on the additive circle
fix: ∑' precedence (#5615)
  • Also remove most superfluous parentheses around big operators (, and variants).
  • roughly the used regex: ([^a-zA-Zα-ωΑ-Ω'𝓝ℳ₀𝕂ₛ)]) \(([∑∏][^()∑∏]*,[^()∑∏:]*)\) ([⊂⊆=<≤]) replaced by $1 $2 $3
Diff
@@ -469,7 +469,7 @@ set_option linter.uppercaseLean3 false in
 /-- **Parseval's identity**: for an `L²` function `f` on `AddCircle T`, the sum of the squared
 norms of the Fourier coefficients equals the `L²` norm of `f`. -/
 theorem tsum_sq_fourierCoeff (f : Lp ℂ 2 <| @haarAddCircle T hT) :
-    (∑' i : ℤ, ‖fourierCoeff f i‖ ^ 2) = ∫ t : AddCircle T, ‖f t‖ ^ 2 ∂haarAddCircle := by
+    ∑' i : ℤ, ‖fourierCoeff f i‖ ^ 2 = ∫ t : AddCircle T, ‖f t‖ ^ 2 ∂haarAddCircle := by
   simp_rw [← fourierBasis_repr]
   have H₁ : ‖fourierBasis.repr f‖ ^ 2 = ∑' i, ‖fourierBasis.repr f i‖ ^ 2 := by
     apply_mod_cast lp.norm_rpow_eq_tsum ?_ (fourierBasis.repr f)
port Analysis.Fourier.AddCircle (#5273)

Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Dependencies 12 + 1084

1085 files ported (98.9%)
490481 lines ported (98.9%)
Show graph

The unported dependencies are

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