analysis.special_functions.trigonometric.euler_sine_prodMathlib.Analysis.SpecialFunctions.Trigonometric.EulerSineProd

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -328,7 +328,7 @@ theorem tendsto_integral_cos_pow_mul_div {f : ℝ → ℂ} (hf : ContinuousOn f
     rw [interior_Icc, closure_Ioo pi_div_two_pos.ne, left_mem_Icc]
     exact pi_div_two_pos.le
   exact
-    tendsto_set_integral_pow_smul_of_unique_maximum_of_isCompact_of_continuousOn is_compact_Icc
+    tendsto_setIntegral_pow_smul_of_unique_maximum_of_isCompact_of_continuousOn is_compact_Icc
       continuous_on_cos c_lt c_nonneg c_zero_pos zero_mem hf
 #align euler_sine.tendsto_integral_cos_pow_mul_div EulerSine.tendsto_integral_cos_pow_mul_div
 -/
Diff
@@ -117,7 +117,7 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
     · simp only [Complex.ofReal_cos, Complex.ofReal_sin]
       rw [mul_neg, mul_neg, ← sub_eq_add_neg, Function.comp_apply]
       congr 1
-      · rw [← pow_succ, Nat.sub_add_cancel (by linarith : 1 ≤ n)]
+      · rw [← pow_succ', Nat.sub_add_cancel (by linarith : 1 ≤ n)]
       · have : ((n - 1 : ℕ) : ℂ) = (n : ℂ) - 1 := by
           rw [Nat.cast_sub (one_le_two.trans hn), Nat.cast_one]
         rw [Nat.sub_sub, this]
@@ -257,7 +257,7 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
       by
       rw [integral_cos_pow_eq]
       dsimp only [C]
-      rw [integral_cos_pow_eq, aux', integral_sin_pow, sin_zero, sin_pi, pow_succ,
+      rw [integral_cos_pow_eq, aux', integral_sin_pow, sin_zero, sin_pi, pow_succ',
         MulZeroClass.zero_mul, MulZeroClass.zero_mul, MulZeroClass.zero_mul, sub_zero, zero_div,
         zero_add, ← mul_assoc, ← mul_assoc, mul_comm (1 / 2 : ℝ) _, Nat.cast_mul, Nat.cast_bit0,
         Nat.cast_one]
Diff
@@ -169,11 +169,11 @@ theorem integral_cos_mul_cos_pow (hn : 2 ≤ n) (hz : z ≠ 0) :
     (1 - 4 * z ^ 2 / n ^ 2) * ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ n =
       (n - 1 : ℂ) / n * ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ (n - 2) :=
   by
-  have nne : (n : ℂ) ≠ 0 := by contrapose! hn; rw [Nat.cast_eq_zero] at hn ; rw [hn];
+  have nne : (n : ℂ) ≠ 0 := by contrapose! hn; rw [Nat.cast_eq_zero] at hn; rw [hn];
     exact zero_lt_two
   have := integral_cos_mul_cos_pow_aux hn hz
   rw [integral_sin_mul_sin_mul_cos_pow_eq hn hz, sub_eq_neg_add, mul_add, ← sub_eq_iff_eq_add] at
-    this 
+    this
   convert congr_arg (fun u : ℂ => -u * (2 * z) ^ 2 / n ^ 2) this using 1 <;> · field_simp; ring
 #align euler_sine.integral_cos_mul_cos_pow EulerSine.integral_cos_mul_cos_pow
 -/
@@ -348,7 +348,7 @@ theorem Complex.tendsto_euler_sin_prod (z : ℂ) :
       at_top (𝓝 <| _) :=
     tendsto.congr (fun n => sin_pi_mul_eq z n) tendsto_const_nhds
   have : 𝓝 (Complex.sin (π * z)) = 𝓝 (Complex.sin (π * z) * 1) := by rw [mul_one]
-  simp_rw [this, mul_div_assoc] at A 
+  simp_rw [this, mul_div_assoc] at A
   convert (tendsto_mul_iff_of_ne_zero _ one_ne_zero).mp A
   suffices :
     tendsto
Diff
@@ -373,7 +373,7 @@ theorem Real.tendsto_euler_sin_prod (x : ℝ) :
   by
   convert (complex.continuous_re.tendsto _).comp (Complex.tendsto_euler_sin_prod x)
   · ext1 n
-    rw [Function.comp_apply, ← Complex.ofReal_mul, Complex.ofReal_mul_re]
+    rw [Function.comp_apply, ← Complex.ofReal_mul, Complex.re_ofReal_mul]
     suffices
       ∏ j : ℕ in Finset.range n, (1 - (x : ℂ) ^ 2 / (↑j + 1) ^ 2) =
         ↑(∏ j : ℕ in Finset.range n, (1 - x ^ 2 / (↑j + 1) ^ 2))
Diff
@@ -191,8 +191,8 @@ theorem integral_cos_mul_cos_pow_even (n : ℕ) (hz : z ≠ 0) :
     nth_rw_rhs 3 [← mul_one (2 : ℂ)]
     rw [← mul_add, mul_pow, ← div_div]
     ring
-  · push_cast ; ring
-  · push_cast ; ring
+  · push_cast; ring
+  · push_cast; ring
 #align euler_sine.integral_cos_mul_cos_pow_even EulerSine.integral_cos_mul_cos_pow_even
 -/
 
@@ -245,7 +245,7 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
       integral_one, sub_zero]
     rw [integral_cos_mul_complex (mul_ne_zero two_ne_zero hz), Complex.ofReal_zero,
       MulZeroClass.mul_zero, Complex.sin_zero, zero_div, sub_zero,
-      (by push_cast ; field_simp; ring : 2 * z * ↑(π / 2) = π * z)]
+      (by push_cast; field_simp; ring : 2 * z * ↑(π / 2) = π * z)]
     field_simp [complex.of_real_ne_zero.mpr pi_pos.ne']
     ring
   · rw [hn, Finset.prod_range_succ]
@@ -292,7 +292,7 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
       have : 2 * (n : ℂ) + 2 ≠ 0 :=
         by
         convert (Nat.cast_add_one_ne_zero (2 * n + 1) : (↑(2 * n + 1) + 1 : ℂ) ≠ 0) using 1
-        push_cast ; ring
+        push_cast; ring
       field_simp; ring
     convert integral_cos_mul_cos_pow_even n hz
     rw [Nat.cast_succ]
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2023 David Loeffler. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: David Loeffler
 -/
-import Mathbin.Analysis.SpecialFunctions.Integrals
-import Mathbin.MeasureTheory.Integral.PeakFunction
+import Analysis.SpecialFunctions.Integrals
+import MeasureTheory.Integral.PeakFunction
 
 #align_import analysis.special_functions.trigonometric.euler_sine_prod from "leanprover-community/mathlib"@"fd4551cfe4b7484b81c2c9ba3405edae27659676"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2023 David Loeffler. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: David Loeffler
-
-! This file was ported from Lean 3 source module analysis.special_functions.trigonometric.euler_sine_prod
-! leanprover-community/mathlib commit fd4551cfe4b7484b81c2c9ba3405edae27659676
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.SpecialFunctions.Integrals
 import Mathbin.MeasureTheory.Integral.PeakFunction
 
+#align_import analysis.special_functions.trigonometric.euler_sine_prod from "leanprover-community/mathlib"@"fd4551cfe4b7484b81c2c9ba3405edae27659676"
+
 /-! # Euler's infinite product for the sine function
 
 > THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
Diff
@@ -43,6 +43,7 @@ We evaluate the integral of `cos (2 * z * x) * cos x ^ n`, for any complex `z` a
 
 variable {z : ℂ} {n : ℕ}
 
+#print EulerSine.antideriv_cos_comp_const_mul /-
 theorem antideriv_cos_comp_const_mul (hz : z ≠ 0) (x : ℝ) :
     HasDerivAt (fun y : ℝ => Complex.sin (2 * z * y) / (2 * z)) (Complex.cos (2 * z * x)) x :=
   by
@@ -53,7 +54,9 @@ theorem antideriv_cos_comp_const_mul (hz : z ≠ 0) (x : ℝ) :
   · ext1 x; rw [mul_comm _ (2 * z)]
   · field_simp; rw [mul_comm _ (2 * z)]
 #align euler_sine.antideriv_cos_comp_const_mul EulerSine.antideriv_cos_comp_const_mul
+-/
 
+#print EulerSine.antideriv_sin_comp_const_mul /-
 theorem antideriv_sin_comp_const_mul (hz : z ≠ 0) (x : ℝ) :
     HasDerivAt (fun y : ℝ => -Complex.cos (2 * z * y) / (2 * z)) (Complex.sin (2 * z * x)) x :=
   by
@@ -64,7 +67,9 @@ theorem antideriv_sin_comp_const_mul (hz : z ≠ 0) (x : ℝ) :
   · ext1 x; rw [mul_comm _ (2 * z)]; field_simp
   · field_simp; rw [mul_comm _ (2 * z)]
 #align euler_sine.antideriv_sin_comp_const_mul EulerSine.antideriv_sin_comp_const_mul
+-/
 
+#print EulerSine.integral_cos_mul_cos_pow_aux /-
 theorem integral_cos_mul_cos_pow_aux (hn : 2 ≤ n) (hz : z ≠ 0) :
     ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ n =
       n / (2 * z) * ∫ x : ℝ in 0 ..π / 2, Complex.sin (2 * z * x) * sin x * cos x ^ (n - 1) :=
@@ -94,7 +99,9 @@ theorem integral_cos_mul_cos_pow_aux (hn : 2 ≤ n) (hz : z ≠ 0) :
   · apply Continuous.intervalIntegrable
     exact complex.continuous_cos.comp (continuous_const.mul Complex.continuous_ofReal)
 #align euler_sine.integral_cos_mul_cos_pow_aux EulerSine.integral_cos_mul_cos_pow_aux
+-/
 
+#print EulerSine.integral_sin_mul_sin_mul_cos_pow_eq /-
 theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
     ∫ x : ℝ in 0 ..π / 2, Complex.sin (2 * z * x) * sin x * cos x ^ (n - 1) =
       (n / (2 * z) * ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ n) -
@@ -157,7 +164,9 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
   · apply Continuous.intervalIntegrable
     exact complex.continuous_sin.comp (continuous_const.mul Complex.continuous_ofReal)
 #align euler_sine.integral_sin_mul_sin_mul_cos_pow_eq EulerSine.integral_sin_mul_sin_mul_cos_pow_eq
+-/
 
+#print EulerSine.integral_cos_mul_cos_pow /-
 /-- Note this also holds for `z = 0`, but we do not need this case for `sin_pi_mul_eq`.  -/
 theorem integral_cos_mul_cos_pow (hn : 2 ≤ n) (hz : z ≠ 0) :
     (1 - 4 * z ^ 2 / n ^ 2) * ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ n =
@@ -170,7 +179,9 @@ theorem integral_cos_mul_cos_pow (hn : 2 ≤ n) (hz : z ≠ 0) :
     this 
   convert congr_arg (fun u : ℂ => -u * (2 * z) ^ 2 / n ^ 2) this using 1 <;> · field_simp; ring
 #align euler_sine.integral_cos_mul_cos_pow EulerSine.integral_cos_mul_cos_pow
+-/
 
+#print EulerSine.integral_cos_mul_cos_pow_even /-
 /-- Note this also holds for `z = 0`, but we do not need this case for `sin_pi_mul_eq`. -/
 theorem integral_cos_mul_cos_pow_even (n : ℕ) (hz : z ≠ 0) :
     (1 - z ^ 2 / (n + 1) ^ 2) *
@@ -186,6 +197,7 @@ theorem integral_cos_mul_cos_pow_even (n : ℕ) (hz : z ≠ 0) :
   · push_cast ; ring
   · push_cast ; ring
 #align euler_sine.integral_cos_mul_cos_pow_even EulerSine.integral_cos_mul_cos_pow_even
+-/
 
 #print EulerSine.integral_cos_pow_eq /-
 /-- Relate the integral `cos x ^ n` over `[0, π/2]` to the integral of `sin x ^ n` over `[0, π]`,
@@ -214,9 +226,11 @@ theorem integral_cos_pow_eq (n : ℕ) :
 #align euler_sine.integral_cos_pow_eq EulerSine.integral_cos_pow_eq
 -/
 
+#print EulerSine.integral_cos_pow_pos /-
 theorem integral_cos_pow_pos (n : ℕ) : 0 < ∫ x : ℝ in 0 ..π / 2, cos x ^ n :=
   (integral_cos_pow_eq n).symm ▸ mul_pos one_half_pos (integral_sin_pow_pos _)
 #align euler_sine.integral_cos_pow_pos EulerSine.integral_cos_pow_pos
+-/
 
 #print EulerSine.sin_pi_mul_eq /-
 /-- Finite form of Euler's sine product, with remainder term expressed as a ratio of cosine
@@ -299,6 +313,7 @@ stating that the sequence of measures on `[0, π/2]` given by integration agains
 `tendsto_set_integral_pow_smul_of_unique_maximum_of_is_compact_of_continuous_on`. -/
 
 
+#print EulerSine.tendsto_integral_cos_pow_mul_div /-
 theorem tendsto_integral_cos_pow_mul_div {f : ℝ → ℂ} (hf : ContinuousOn f (Icc 0 (π / 2))) :
     Tendsto
       (fun n : ℕ => (∫ x : ℝ in 0 ..π / 2, ↑(cos x) ^ n * f x) / ↑(∫ x : ℝ in 0 ..π / 2, cos x ^ n))
@@ -319,6 +334,7 @@ theorem tendsto_integral_cos_pow_mul_div {f : ℝ → ℂ} (hf : ContinuousOn f
     tendsto_set_integral_pow_smul_of_unique_maximum_of_isCompact_of_continuousOn is_compact_Icc
       continuous_on_cos c_lt c_nonneg c_zero_pos zero_mem hf
 #align euler_sine.tendsto_integral_cos_pow_mul_div EulerSine.tendsto_integral_cos_pow_mul_div
+-/
 
 #print Complex.tendsto_euler_sin_prod /-
 /-- Euler's infinite product formula for the complex sine function. -/
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: David Loeffler
 
 ! This file was ported from Lean 3 source module analysis.special_functions.trigonometric.euler_sine_prod
-! leanprover-community/mathlib commit 2c1d8ca2812b64f88992a5294ea3dba144755cd1
+! leanprover-community/mathlib commit fd4551cfe4b7484b81c2c9ba3405edae27659676
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -13,6 +13,9 @@ import Mathbin.MeasureTheory.Integral.PeakFunction
 
 /-! # Euler's infinite product for the sine function
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file proves the infinite product formula
 
 $$ \sin \pi z = \pi z \prod_{n = 1}^\infty \left(1 - \frac{z ^ 2}{n ^ 2}\right) $$
Diff
@@ -63,7 +63,7 @@ theorem antideriv_sin_comp_const_mul (hz : z ≠ 0) (x : ℝ) :
 #align euler_sine.antideriv_sin_comp_const_mul EulerSine.antideriv_sin_comp_const_mul
 
 theorem integral_cos_mul_cos_pow_aux (hn : 2 ≤ n) (hz : z ≠ 0) :
-    (∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ n) =
+    ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ n =
       n / (2 * z) * ∫ x : ℝ in 0 ..π / 2, Complex.sin (2 * z * x) * sin x * cos x ^ (n - 1) :=
   by
   have der1 :
@@ -93,7 +93,7 @@ theorem integral_cos_mul_cos_pow_aux (hn : 2 ≤ n) (hz : z ≠ 0) :
 #align euler_sine.integral_cos_mul_cos_pow_aux EulerSine.integral_cos_mul_cos_pow_aux
 
 theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
-    (∫ x : ℝ in 0 ..π / 2, Complex.sin (2 * z * x) * sin x * cos x ^ (n - 1)) =
+    ∫ x : ℝ in 0 ..π / 2, Complex.sin (2 * z * x) * sin x * cos x ^ (n - 1) =
       (n / (2 * z) * ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ n) -
         (n - 1) / (2 * z) * ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ (n - 2) :=
   by
@@ -157,7 +157,7 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
 
 /-- Note this also holds for `z = 0`, but we do not need this case for `sin_pi_mul_eq`.  -/
 theorem integral_cos_mul_cos_pow (hn : 2 ≤ n) (hz : z ≠ 0) :
-    ((1 - 4 * z ^ 2 / n ^ 2) * ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ n) =
+    (1 - 4 * z ^ 2 / n ^ 2) * ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ n =
       (n - 1 : ℂ) / n * ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ (n - 2) :=
   by
   have nne : (n : ℂ) ≠ 0 := by contrapose! hn; rw [Nat.cast_eq_zero] at hn ; rw [hn];
@@ -170,8 +170,8 @@ theorem integral_cos_mul_cos_pow (hn : 2 ≤ n) (hz : z ≠ 0) :
 
 /-- Note this also holds for `z = 0`, but we do not need this case for `sin_pi_mul_eq`. -/
 theorem integral_cos_mul_cos_pow_even (n : ℕ) (hz : z ≠ 0) :
-    ((1 - z ^ 2 / (n + 1) ^ 2) *
-        ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ (2 * n + 2)) =
+    (1 - z ^ 2 / (n + 1) ^ 2) *
+        ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ (2 * n + 2) =
       (2 * n + 1 : ℂ) / (2 * n + 2) *
         ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ (2 * n) :=
   by
@@ -188,7 +188,7 @@ theorem integral_cos_mul_cos_pow_even (n : ℕ) (hz : z ≠ 0) :
 /-- Relate the integral `cos x ^ n` over `[0, π/2]` to the integral of `sin x ^ n` over `[0, π]`,
 which is studied in `data.real.pi.wallis` and other places. -/
 theorem integral_cos_pow_eq (n : ℕ) :
-    (∫ x : ℝ in 0 ..π / 2, cos x ^ n) = 1 / 2 * ∫ x : ℝ in 0 ..π, sin x ^ n :=
+    ∫ x : ℝ in 0 ..π / 2, cos x ^ n = 1 / 2 * ∫ x : ℝ in 0 ..π, sin x ^ n :=
   by
   rw [mul_comm (1 / 2 : ℝ), ← div_eq_iff (one_div_ne_zero (two_ne_zero' ℝ)), ← div_mul, div_one,
     mul_two]
@@ -220,7 +220,7 @@ theorem integral_cos_pow_pos (n : ℕ) : 0 < ∫ x : ℝ in 0 ..π / 2, cos x ^
 integrals. -/
 theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
     Complex.sin (π * z) =
-      ((π * z * ∏ j in Finset.range n, 1 - z ^ 2 / (j + 1) ^ 2) *
+      ((π * z * ∏ j in Finset.range n, (1 - z ^ 2 / (j + 1) ^ 2)) *
           ∫ x in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ (2 * n)) /
         ↑(∫ x in 0 ..π / 2, cos x ^ (2 * n)) :=
   by
@@ -235,11 +235,11 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
     field_simp [complex.of_real_ne_zero.mpr pi_pos.ne']
     ring
   · rw [hn, Finset.prod_range_succ]
-    set A := ∏ j in Finset.range n, 1 - z ^ 2 / (j + 1) ^ 2
+    set A := ∏ j in Finset.range n, (1 - z ^ 2 / (j + 1) ^ 2)
     set B := ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ (2 * n)
     set C := ∫ x : ℝ in 0 ..π / 2, cos x ^ (2 * n)
     have aux' : 2 * n.succ = 2 * n + 2 := by rw [Nat.succ_eq_add_one, mul_add, mul_one]
-    have : (∫ x : ℝ in 0 ..π / 2, cos x ^ (2 * n.succ)) = (2 * (n : ℝ) + 1) / (2 * n + 2) * C :=
+    have : ∫ x : ℝ in 0 ..π / 2, cos x ^ (2 * n.succ) = (2 * (n : ℝ) + 1) / (2 * n + 2) * C :=
       by
       rw [integral_cos_pow_eq]
       dsimp only [C]
@@ -254,8 +254,8 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
             ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ (2 * n.succ)) /
           ↑((2 * ↑n + 1) / (2 * ↑n + 2) * C)
     have :
-      (↑π * z * (A * (1 - z ^ 2 / (↑n + 1) ^ 2)) *
-          ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ (2 * n.succ)) =
+      ↑π * z * (A * (1 - z ^ 2 / (↑n + 1) ^ 2)) *
+          ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ (2 * n.succ) =
         ↑π * z * A *
           ((1 - z ^ 2 / ↑n.succ ^ 2) *
             ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ (2 * n.succ)) :=
@@ -265,8 +265,8 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
       ring
     rw [this]
     suffices
-      ((1 - z ^ 2 / ↑n.succ ^ 2) *
-          ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ (2 * n.succ)) =
+      (1 - z ^ 2 / ↑n.succ ^ 2) *
+          ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ (2 * n.succ) =
         (2 * n + 1) / (2 * n + 2) * B
       by
       rw [this, Complex.ofReal_mul, Complex.ofReal_div]
@@ -320,13 +320,13 @@ theorem tendsto_integral_cos_pow_mul_div {f : ℝ → ℂ} (hf : ContinuousOn f
 #print Complex.tendsto_euler_sin_prod /-
 /-- Euler's infinite product formula for the complex sine function. -/
 theorem Complex.tendsto_euler_sin_prod (z : ℂ) :
-    Tendsto (fun n : ℕ => ↑π * z * ∏ j in Finset.range n, 1 - z ^ 2 / (j + 1) ^ 2) atTop
+    Tendsto (fun n : ℕ => ↑π * z * ∏ j in Finset.range n, (1 - z ^ 2 / (j + 1) ^ 2)) atTop
       (𝓝 <| Complex.sin (π * z)) :=
   by
   have A :
     tendsto
       (fun n : ℕ =>
-        ((↑π * z * ∏ j in Finset.range n, 1 - z ^ 2 / (j + 1) ^ 2) *
+        ((↑π * z * ∏ j in Finset.range n, (1 - z ^ 2 / (j + 1) ^ 2)) *
             ∫ x in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ (2 * n)) /
           ↑(∫ x in 0 ..π / 2, cos x ^ (2 * n)))
       at_top (𝓝 <| _) :=
@@ -352,15 +352,15 @@ theorem Complex.tendsto_euler_sin_prod (z : ℂ) :
 #print Real.tendsto_euler_sin_prod /-
 /-- Euler's infinite product formula for the real sine function. -/
 theorem Real.tendsto_euler_sin_prod (x : ℝ) :
-    Tendsto (fun n : ℕ => π * x * ∏ j in Finset.range n, 1 - x ^ 2 / (j + 1) ^ 2) atTop
+    Tendsto (fun n : ℕ => π * x * ∏ j in Finset.range n, (1 - x ^ 2 / (j + 1) ^ 2)) atTop
       (𝓝 <| sin (π * x)) :=
   by
   convert (complex.continuous_re.tendsto _).comp (Complex.tendsto_euler_sin_prod x)
   · ext1 n
     rw [Function.comp_apply, ← Complex.ofReal_mul, Complex.ofReal_mul_re]
     suffices
-      (∏ j : ℕ in Finset.range n, 1 - (x : ℂ) ^ 2 / (↑j + 1) ^ 2) =
-        ↑(∏ j : ℕ in Finset.range n, 1 - x ^ 2 / (↑j + 1) ^ 2)
+      ∏ j : ℕ in Finset.range n, (1 - (x : ℂ) ^ 2 / (↑j + 1) ^ 2) =
+        ↑(∏ j : ℕ in Finset.range n, (1 - x ^ 2 / (↑j + 1) ^ 2))
       by rw [this, Complex.ofReal_re]
     rw [Complex.ofReal_prod]
     refine' Finset.prod_congr (by rfl) fun n hn => _
Diff
@@ -73,7 +73,7 @@ theorem integral_cos_mul_cos_pow_aux (hn : 2 ≤ n) (hz : z ≠ 0) :
     by
     intro x hx
     have b : HasDerivAt (fun y => ↑(cos y) : ℝ → ℂ) (-sin x) x := by
-      simpa using (has_deriv_at_cos x).of_real_comp
+      simpa using (has_deriv_at_cos x).ofReal_comp
     convert HasDerivAt.comp x (hasDerivAt_pow _ _) b using 1
     ring
   convert integral_mul_deriv_eq_deriv_mul der1 (fun x hx => antideriv_cos_comp_const_mul hz x) _ _
@@ -105,7 +105,7 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
     by
     intro x hx
     have c := HasDerivAt.comp (x : ℂ) (hasDerivAt_pow (n - 1) _) (Complex.hasDerivAt_cos x)
-    convert ((Complex.hasDerivAt_sin x).mul c).comp_of_real using 1
+    convert ((Complex.hasDerivAt_sin x).mul c).comp_ofReal using 1
     · ext1 y; simp only [Complex.ofReal_sin, Complex.ofReal_cos]
     · simp only [Complex.ofReal_cos, Complex.ofReal_sin]
       rw [mul_neg, mul_neg, ← sub_eq_add_neg, Function.comp_apply]
Diff
@@ -184,6 +184,7 @@ theorem integral_cos_mul_cos_pow_even (n : ℕ) (hz : z ≠ 0) :
   · push_cast ; ring
 #align euler_sine.integral_cos_mul_cos_pow_even EulerSine.integral_cos_mul_cos_pow_even
 
+#print EulerSine.integral_cos_pow_eq /-
 /-- Relate the integral `cos x ^ n` over `[0, π/2]` to the integral of `sin x ^ n` over `[0, π]`,
 which is studied in `data.real.pi.wallis` and other places. -/
 theorem integral_cos_pow_eq (n : ℕ) :
@@ -208,11 +209,13 @@ theorem integral_cos_pow_eq (n : ℕ) :
     dsimp only
     rw [sin_add_pi_div_two]
 #align euler_sine.integral_cos_pow_eq EulerSine.integral_cos_pow_eq
+-/
 
 theorem integral_cos_pow_pos (n : ℕ) : 0 < ∫ x : ℝ in 0 ..π / 2, cos x ^ n :=
   (integral_cos_pow_eq n).symm ▸ mul_pos one_half_pos (integral_sin_pow_pos _)
 #align euler_sine.integral_cos_pow_pos EulerSine.integral_cos_pow_pos
 
+#print EulerSine.sin_pi_mul_eq /-
 /-- Finite form of Euler's sine product, with remainder term expressed as a ratio of cosine
 integrals. -/
 theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
@@ -280,6 +283,7 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
     convert integral_cos_mul_cos_pow_even n hz
     rw [Nat.cast_succ]
 #align euler_sine.sin_pi_mul_eq EulerSine.sin_pi_mul_eq
+-/
 
 end IntegralRecursion
 
@@ -313,6 +317,7 @@ theorem tendsto_integral_cos_pow_mul_div {f : ℝ → ℂ} (hf : ContinuousOn f
       continuous_on_cos c_lt c_nonneg c_zero_pos zero_mem hf
 #align euler_sine.tendsto_integral_cos_pow_mul_div EulerSine.tendsto_integral_cos_pow_mul_div
 
+#print Complex.tendsto_euler_sin_prod /-
 /-- Euler's infinite product formula for the complex sine function. -/
 theorem Complex.tendsto_euler_sin_prod (z : ℂ) :
     Tendsto (fun n : ℕ => ↑π * z * ∏ j in Finset.range n, 1 - z ^ 2 / (j + 1) ^ 2) atTop
@@ -342,7 +347,9 @@ theorem Complex.tendsto_euler_sin_prod (z : ℂ) :
   · ext1 n; congr 2 with x : 1; rw [mul_comm]
   · rw [Complex.ofReal_zero, MulZeroClass.mul_zero, Complex.cos_zero]
 #align complex.tendsto_euler_sin_prod Complex.tendsto_euler_sin_prod
+-/
 
+#print Real.tendsto_euler_sin_prod /-
 /-- Euler's infinite product formula for the real sine function. -/
 theorem Real.tendsto_euler_sin_prod (x : ℝ) :
     Tendsto (fun n : ℕ => π * x * ∏ j in Finset.range n, 1 - x ^ 2 / (j + 1) ^ 2) atTop
@@ -360,6 +367,7 @@ theorem Real.tendsto_euler_sin_prod (x : ℝ) :
     norm_cast
   · rw [← Complex.ofReal_mul, ← Complex.ofReal_sin, Complex.ofReal_re]
 #align real.tendsto_euler_sin_prod Real.tendsto_euler_sin_prod
+-/
 
 end EulerSine
 
Diff
@@ -57,7 +57,7 @@ theorem antideriv_sin_comp_const_mul (hz : z ≠ 0) (x : ℝ) :
   have a : HasDerivAt _ _ ↑x := hasDerivAt_mul_const _
   have b : HasDerivAt (fun y : ℂ => Complex.cos (y * (2 * z))) _ ↑x :=
     HasDerivAt.comp x (Complex.hasDerivAt_cos (x * (2 * z))) a
-  convert(b.comp_of_real.div_const (2 * z)).neg
+  convert (b.comp_of_real.div_const (2 * z)).neg
   · ext1 x; rw [mul_comm _ (2 * z)]; field_simp
   · field_simp; rw [mul_comm _ (2 * z)]
 #align euler_sine.antideriv_sin_comp_const_mul EulerSine.antideriv_sin_comp_const_mul
@@ -105,7 +105,7 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
     by
     intro x hx
     have c := HasDerivAt.comp (x : ℂ) (hasDerivAt_pow (n - 1) _) (Complex.hasDerivAt_cos x)
-    convert((Complex.hasDerivAt_sin x).mul c).comp_of_real using 1
+    convert ((Complex.hasDerivAt_sin x).mul c).comp_of_real using 1
     · ext1 y; simp only [Complex.ofReal_sin, Complex.ofReal_cos]
     · simp only [Complex.ofReal_cos, Complex.ofReal_sin]
       rw [mul_neg, mul_neg, ← sub_eq_add_neg, Function.comp_apply]
@@ -115,9 +115,8 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
           rw [Nat.cast_sub (one_le_two.trans hn), Nat.cast_one]
         rw [Nat.sub_sub, this]
         ring
-  convert integral_mul_deriv_eq_deriv_mul der1 (fun x hx => antideriv_sin_comp_const_mul hz x) _
-      _ using
-    1
+  convert
+    integral_mul_deriv_eq_deriv_mul der1 (fun x hx => antideriv_sin_comp_const_mul hz x) _ _ using 1
   · refine' integral_congr fun x hx => _
     ring_nf
   · -- now a tedious rearrangement of terms
@@ -271,11 +270,11 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
       have : (C : ℂ) ≠ 0 := complex.of_real_ne_zero.mpr (integral_cos_pow_pos _).ne'
       have : 2 * (n : ℂ) + 1 ≠ 0 :=
         by
-        convert(Nat.cast_add_one_ne_zero (2 * n) : (↑(2 * n) + 1 : ℂ) ≠ 0)
+        convert (Nat.cast_add_one_ne_zero (2 * n) : (↑(2 * n) + 1 : ℂ) ≠ 0)
         simp
       have : 2 * (n : ℂ) + 2 ≠ 0 :=
         by
-        convert(Nat.cast_add_one_ne_zero (2 * n + 1) : (↑(2 * n + 1) + 1 : ℂ) ≠ 0) using 1
+        convert (Nat.cast_add_one_ne_zero (2 * n + 1) : (↑(2 * n + 1) + 1 : ℂ) ≠ 0) using 1
         push_cast ; ring
       field_simp; ring
     convert integral_cos_mul_cos_pow_even n hz
@@ -329,7 +328,7 @@ theorem Complex.tendsto_euler_sin_prod (z : ℂ) :
     tendsto.congr (fun n => sin_pi_mul_eq z n) tendsto_const_nhds
   have : 𝓝 (Complex.sin (π * z)) = 𝓝 (Complex.sin (π * z) * 1) := by rw [mul_one]
   simp_rw [this, mul_div_assoc] at A 
-  convert(tendsto_mul_iff_of_ne_zero _ one_ne_zero).mp A
+  convert (tendsto_mul_iff_of_ne_zero _ one_ne_zero).mp A
   suffices :
     tendsto
       (fun n : ℕ =>
@@ -349,7 +348,7 @@ theorem Real.tendsto_euler_sin_prod (x : ℝ) :
     Tendsto (fun n : ℕ => π * x * ∏ j in Finset.range n, 1 - x ^ 2 / (j + 1) ^ 2) atTop
       (𝓝 <| sin (π * x)) :=
   by
-  convert(complex.continuous_re.tendsto _).comp (Complex.tendsto_euler_sin_prod x)
+  convert (complex.continuous_re.tendsto _).comp (Complex.tendsto_euler_sin_prod x)
   · ext1 n
     rw [Function.comp_apply, ← Complex.ofReal_mul, Complex.ofReal_mul_re]
     suffices
Diff
@@ -161,11 +161,11 @@ theorem integral_cos_mul_cos_pow (hn : 2 ≤ n) (hz : z ≠ 0) :
     ((1 - 4 * z ^ 2 / n ^ 2) * ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ n) =
       (n - 1 : ℂ) / n * ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ (n - 2) :=
   by
-  have nne : (n : ℂ) ≠ 0 := by contrapose! hn; rw [Nat.cast_eq_zero] at hn; rw [hn];
+  have nne : (n : ℂ) ≠ 0 := by contrapose! hn; rw [Nat.cast_eq_zero] at hn ; rw [hn];
     exact zero_lt_two
   have := integral_cos_mul_cos_pow_aux hn hz
   rw [integral_sin_mul_sin_mul_cos_pow_eq hn hz, sub_eq_neg_add, mul_add, ← sub_eq_iff_eq_add] at
-    this
+    this 
   convert congr_arg (fun u : ℂ => -u * (2 * z) ^ 2 / n ^ 2) this using 1 <;> · field_simp; ring
 #align euler_sine.integral_cos_mul_cos_pow EulerSine.integral_cos_mul_cos_pow
 
@@ -328,7 +328,7 @@ theorem Complex.tendsto_euler_sin_prod (z : ℂ) :
       at_top (𝓝 <| _) :=
     tendsto.congr (fun n => sin_pi_mul_eq z n) tendsto_const_nhds
   have : 𝓝 (Complex.sin (π * z)) = 𝓝 (Complex.sin (π * z) * 1) := by rw [mul_one]
-  simp_rw [this, mul_div_assoc] at A
+  simp_rw [this, mul_div_assoc] at A 
   convert(tendsto_mul_iff_of_ne_zero _ one_ne_zero).mp A
   suffices :
     tendsto
Diff
@@ -24,7 +24,7 @@ generalising the arguments used to prove Wallis' limit formula for `π`.
 -/
 
 
-open Real Topology BigOperators
+open scoped Real Topology BigOperators
 
 open Real Set Filter intervalIntegral MeasureTheory.MeasureSpace
 
Diff
@@ -47,10 +47,8 @@ theorem antideriv_cos_comp_const_mul (hz : z ≠ 0) (x : ℝ) :
   have b : HasDerivAt (fun y : ℂ => Complex.sin (y * (2 * z))) _ ↑x :=
     HasDerivAt.comp x (Complex.hasDerivAt_sin (x * (2 * z))) a
   convert b.comp_of_real.div_const (2 * z)
-  · ext1 x
-    rw [mul_comm _ (2 * z)]
-  · field_simp
-    rw [mul_comm _ (2 * z)]
+  · ext1 x; rw [mul_comm _ (2 * z)]
+  · field_simp; rw [mul_comm _ (2 * z)]
 #align euler_sine.antideriv_cos_comp_const_mul EulerSine.antideriv_cos_comp_const_mul
 
 theorem antideriv_sin_comp_const_mul (hz : z ≠ 0) (x : ℝ) :
@@ -60,11 +58,8 @@ theorem antideriv_sin_comp_const_mul (hz : z ≠ 0) (x : ℝ) :
   have b : HasDerivAt (fun y : ℂ => Complex.cos (y * (2 * z))) _ ↑x :=
     HasDerivAt.comp x (Complex.hasDerivAt_cos (x * (2 * z))) a
   convert(b.comp_of_real.div_const (2 * z)).neg
-  · ext1 x
-    rw [mul_comm _ (2 * z)]
-    field_simp
-  · field_simp
-    rw [mul_comm _ (2 * z)]
+  · ext1 x; rw [mul_comm _ (2 * z)]; field_simp
+  · field_simp; rw [mul_comm _ (2 * z)]
 #align euler_sine.antideriv_sin_comp_const_mul EulerSine.antideriv_sin_comp_const_mul
 
 theorem integral_cos_mul_cos_pow_aux (hn : 2 ≤ n) (hz : z ≠ 0) :
@@ -82,15 +77,13 @@ theorem integral_cos_mul_cos_pow_aux (hn : 2 ≤ n) (hz : z ≠ 0) :
     convert HasDerivAt.comp x (hasDerivAt_pow _ _) b using 1
     ring
   convert integral_mul_deriv_eq_deriv_mul der1 (fun x hx => antideriv_cos_comp_const_mul hz x) _ _
-  · ext1 x
-    rw [mul_comm]
+  · ext1 x; rw [mul_comm]
   · rw [Complex.ofReal_zero, MulZeroClass.mul_zero, Complex.sin_zero, zero_div,
       MulZeroClass.mul_zero, sub_zero, cos_pi_div_two, Complex.ofReal_zero,
       zero_pow (by positivity : 0 < n), MulZeroClass.zero_mul, zero_sub, ← integral_neg, ←
       integral_const_mul]
     refine' integral_congr fun x hx => _
-    field_simp
-    ring
+    field_simp; ring
   · apply Continuous.intervalIntegrable
     exact
       (continuous_const.mul (complex.continuous_of_real.comp continuous_sin)).mul
@@ -113,8 +106,7 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
     intro x hx
     have c := HasDerivAt.comp (x : ℂ) (hasDerivAt_pow (n - 1) _) (Complex.hasDerivAt_cos x)
     convert((Complex.hasDerivAt_sin x).mul c).comp_of_real using 1
-    · ext1 y
-      simp only [Complex.ofReal_sin, Complex.ofReal_cos]
+    · ext1 y; simp only [Complex.ofReal_sin, Complex.ofReal_cos]
     · simp only [Complex.ofReal_cos, Complex.ofReal_sin]
       rw [mul_neg, mul_neg, ← sub_eq_add_neg, Function.comp_apply]
       congr 1
@@ -144,8 +136,7 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
         continuous_const.mul
           ((complex.continuous_cos.comp (continuous_const.mul Complex.continuous_ofReal)).mul
             ((complex.continuous_of_real.comp continuous_cos).pow (n - 2)))
-    · apply Nat.sub_pos_of_lt
-      exact one_lt_two.trans_le hn
+    · apply Nat.sub_pos_of_lt; exact one_lt_two.trans_le hn
     refine' integral_congr fun x hx => _
     dsimp only
     -- get rid of real trig functions and divions by 2 * z:
@@ -170,17 +161,12 @@ theorem integral_cos_mul_cos_pow (hn : 2 ≤ n) (hz : z ≠ 0) :
     ((1 - 4 * z ^ 2 / n ^ 2) * ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ n) =
       (n - 1 : ℂ) / n * ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * x) * cos x ^ (n - 2) :=
   by
-  have nne : (n : ℂ) ≠ 0 := by
-    contrapose! hn
-    rw [Nat.cast_eq_zero] at hn
-    rw [hn]
+  have nne : (n : ℂ) ≠ 0 := by contrapose! hn; rw [Nat.cast_eq_zero] at hn; rw [hn];
     exact zero_lt_two
   have := integral_cos_mul_cos_pow_aux hn hz
   rw [integral_sin_mul_sin_mul_cos_pow_eq hn hz, sub_eq_neg_add, mul_add, ← sub_eq_iff_eq_add] at
     this
-  convert congr_arg (fun u : ℂ => -u * (2 * z) ^ 2 / n ^ 2) this using 1 <;>
-    · field_simp
-      ring
+  convert congr_arg (fun u : ℂ => -u * (2 * z) ^ 2 / n ^ 2) this using 1 <;> · field_simp; ring
 #align euler_sine.integral_cos_mul_cos_pow EulerSine.integral_cos_mul_cos_pow
 
 /-- Note this also holds for `z = 0`, but we do not need this case for `sin_pi_mul_eq`. -/
@@ -195,10 +181,8 @@ theorem integral_cos_mul_cos_pow_even (n : ℕ) (hz : z ≠ 0) :
     nth_rw_rhs 3 [← mul_one (2 : ℂ)]
     rw [← mul_add, mul_pow, ← div_div]
     ring
-  · push_cast
-    ring
-  · push_cast
-    ring
+  · push_cast ; ring
+  · push_cast ; ring
 #align euler_sine.integral_cos_mul_cos_pow_even EulerSine.integral_cos_mul_cos_pow_even
 
 /-- Relate the integral `cos x ^ n` over `[0, π/2]` to the integral of `sin x ^ n` over `[0, π]`,
@@ -245,10 +229,7 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
       integral_one, sub_zero]
     rw [integral_cos_mul_complex (mul_ne_zero two_ne_zero hz), Complex.ofReal_zero,
       MulZeroClass.mul_zero, Complex.sin_zero, zero_div, sub_zero,
-      (by
-        push_cast
-        field_simp
-        ring : 2 * z * ↑(π / 2) = π * z)]
+      (by push_cast ; field_simp; ring : 2 * z * ↑(π / 2) = π * z)]
     field_simp [complex.of_real_ne_zero.mpr pi_pos.ne']
     ring
   · rw [hn, Finset.prod_range_succ]
@@ -295,10 +276,8 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
       have : 2 * (n : ℂ) + 2 ≠ 0 :=
         by
         convert(Nat.cast_add_one_ne_zero (2 * n + 1) : (↑(2 * n + 1) + 1 : ℂ) ≠ 0) using 1
-        push_cast
-        ring
-      field_simp
-      ring
+        push_cast ; ring
+      field_simp; ring
     convert integral_cos_mul_cos_pow_even n hz
     rw [Nat.cast_succ]
 #align euler_sine.sin_pi_mul_eq EulerSine.sin_pi_mul_eq
@@ -325,9 +304,7 @@ theorem tendsto_integral_cos_pow_mul_div {f : ℝ → ℂ} (hf : ContinuousOn f
     cos_lt_cos_of_nonneg_of_le_pi_div_two (le_refl 0) hy.2 (lt_of_le_of_ne hy.1 hy'.symm)
   have c_nonneg : ∀ x : ℝ, x ∈ Icc 0 (π / 2) → 0 ≤ cos x := fun x hx =>
     cos_nonneg_of_mem_Icc ((Icc_subset_Icc_left (neg_nonpos_of_nonneg pi_div_two_pos.le)) hx)
-  have c_zero_pos : 0 < cos 0 := by
-    rw [cos_zero]
-    exact zero_lt_one
+  have c_zero_pos : 0 < cos 0 := by rw [cos_zero]; exact zero_lt_one
   have zero_mem : (0 : ℝ) ∈ closure (interior (Icc 0 (π / 2))) :=
     by
     rw [interior_Icc, closure_Ioo pi_div_two_pos.ne, left_mem_Icc]
@@ -363,9 +340,7 @@ theorem Complex.tendsto_euler_sin_prod (z : ℂ) :
   have : ContinuousOn (fun x : ℝ => Complex.cos (2 * z * x)) (Icc 0 (π / 2)) :=
     (complex.continuous_cos.comp (continuous_const.mul Complex.continuous_ofReal)).ContinuousOn
   convert tendsto_integral_cos_pow_mul_div this
-  · ext1 n
-    congr 2 with x : 1
-    rw [mul_comm]
+  · ext1 n; congr 2 with x : 1; rw [mul_comm]
   · rw [Complex.ofReal_zero, MulZeroClass.mul_zero, Complex.cos_zero]
 #align complex.tendsto_euler_sin_prod Complex.tendsto_euler_sin_prod
 
Diff
@@ -96,7 +96,7 @@ theorem integral_cos_mul_cos_pow_aux (hn : 2 ≤ n) (hz : z ≠ 0) :
       (continuous_const.mul (complex.continuous_of_real.comp continuous_sin)).mul
         ((complex.continuous_of_real.comp continuous_cos).pow (n - 1))
   · apply Continuous.intervalIntegrable
-    exact complex.continuous_cos.comp (continuous_const.mul Complex.continuous_of_real)
+    exact complex.continuous_cos.comp (continuous_const.mul Complex.continuous_ofReal)
 #align euler_sine.integral_cos_mul_cos_pow_aux EulerSine.integral_cos_mul_cos_pow_aux
 
 theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
@@ -137,12 +137,12 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
     · apply Continuous.intervalIntegrable
       exact
         continuous_const.mul
-          ((complex.continuous_cos.comp (continuous_const.mul Complex.continuous_of_real)).mul
+          ((complex.continuous_cos.comp (continuous_const.mul Complex.continuous_ofReal)).mul
             ((complex.continuous_of_real.comp continuous_cos).pow n))
     · apply Continuous.intervalIntegrable
       exact
         continuous_const.mul
-          ((complex.continuous_cos.comp (continuous_const.mul Complex.continuous_of_real)).mul
+          ((complex.continuous_cos.comp (continuous_const.mul Complex.continuous_ofReal)).mul
             ((complex.continuous_of_real.comp continuous_cos).pow (n - 2)))
     · apply Nat.sub_pos_of_lt
       exact one_lt_two.trans_le hn
@@ -162,7 +162,7 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
         ((continuous_const.mul ((complex.continuous_of_real.comp continuous_sin).pow 2)).mul
           ((complex.continuous_of_real.comp continuous_cos).pow (n - 2)))
   · apply Continuous.intervalIntegrable
-    exact complex.continuous_sin.comp (continuous_const.mul Complex.continuous_of_real)
+    exact complex.continuous_sin.comp (continuous_const.mul Complex.continuous_ofReal)
 #align euler_sine.integral_sin_mul_sin_mul_cos_pow_eq EulerSine.integral_sin_mul_sin_mul_cos_pow_eq
 
 /-- Note this also holds for `z = 0`, but we do not need this case for `sin_pi_mul_eq`.  -/
@@ -361,7 +361,7 @@ theorem Complex.tendsto_euler_sin_prod (z : ℂ) :
       at_top (𝓝 1)
   exact this.comp (tendsto_id.const_mul_at_top' zero_lt_two)
   have : ContinuousOn (fun x : ℝ => Complex.cos (2 * z * x)) (Icc 0 (π / 2)) :=
-    (complex.continuous_cos.comp (continuous_const.mul Complex.continuous_of_real)).ContinuousOn
+    (complex.continuous_cos.comp (continuous_const.mul Complex.continuous_ofReal)).ContinuousOn
   convert tendsto_integral_cos_pow_mul_div this
   · ext1 n
     congr 2 with x : 1
Diff
@@ -4,11 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: David Loeffler
 
 ! This file was ported from Lean 3 source module analysis.special_functions.trigonometric.euler_sine_prod
-! leanprover-community/mathlib commit 980755c33b9168bc82f774f665eaa27878140fac
+! leanprover-community/mathlib commit 2c1d8ca2812b64f88992a5294ea3dba144755cd1
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
-import Mathbin.Data.Real.Pi.Wallis
+import Mathbin.Analysis.SpecialFunctions.Integrals
 import Mathbin.MeasureTheory.Integral.PeakFunction
 
 /-! # Euler's infinite product for the sine function
Diff
@@ -59,7 +59,7 @@ theorem antideriv_sin_comp_const_mul (hz : z ≠ 0) (x : ℝ) :
   have a : HasDerivAt _ _ ↑x := hasDerivAt_mul_const _
   have b : HasDerivAt (fun y : ℂ => Complex.cos (y * (2 * z))) _ ↑x :=
     HasDerivAt.comp x (Complex.hasDerivAt_cos (x * (2 * z))) a
-  convert (b.comp_of_real.div_const (2 * z)).neg
+  convert(b.comp_of_real.div_const (2 * z)).neg
   · ext1 x
     rw [mul_comm _ (2 * z)]
     field_simp
@@ -112,7 +112,7 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
     by
     intro x hx
     have c := HasDerivAt.comp (x : ℂ) (hasDerivAt_pow (n - 1) _) (Complex.hasDerivAt_cos x)
-    convert ((Complex.hasDerivAt_sin x).mul c).comp_of_real using 1
+    convert((Complex.hasDerivAt_sin x).mul c).comp_of_real using 1
     · ext1 y
       simp only [Complex.ofReal_sin, Complex.ofReal_cos]
     · simp only [Complex.ofReal_cos, Complex.ofReal_sin]
@@ -123,8 +123,9 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
           rw [Nat.cast_sub (one_le_two.trans hn), Nat.cast_one]
         rw [Nat.sub_sub, this]
         ring
-  convert
-    integral_mul_deriv_eq_deriv_mul der1 (fun x hx => antideriv_sin_comp_const_mul hz x) _ _ using 1
+  convert integral_mul_deriv_eq_deriv_mul der1 (fun x hx => antideriv_sin_comp_const_mul hz x) _
+      _ using
+    1
   · refine' integral_congr fun x hx => _
     ring_nf
   · -- now a tedious rearrangement of terms
@@ -289,11 +290,11 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
       have : (C : ℂ) ≠ 0 := complex.of_real_ne_zero.mpr (integral_cos_pow_pos _).ne'
       have : 2 * (n : ℂ) + 1 ≠ 0 :=
         by
-        convert (Nat.cast_add_one_ne_zero (2 * n) : (↑(2 * n) + 1 : ℂ) ≠ 0)
+        convert(Nat.cast_add_one_ne_zero (2 * n) : (↑(2 * n) + 1 : ℂ) ≠ 0)
         simp
       have : 2 * (n : ℂ) + 2 ≠ 0 :=
         by
-        convert (Nat.cast_add_one_ne_zero (2 * n + 1) : (↑(2 * n + 1) + 1 : ℂ) ≠ 0) using 1
+        convert(Nat.cast_add_one_ne_zero (2 * n + 1) : (↑(2 * n + 1) + 1 : ℂ) ≠ 0) using 1
         push_cast
         ring
       field_simp
@@ -351,7 +352,7 @@ theorem Complex.tendsto_euler_sin_prod (z : ℂ) :
     tendsto.congr (fun n => sin_pi_mul_eq z n) tendsto_const_nhds
   have : 𝓝 (Complex.sin (π * z)) = 𝓝 (Complex.sin (π * z) * 1) := by rw [mul_one]
   simp_rw [this, mul_div_assoc] at A
-  convert (tendsto_mul_iff_of_ne_zero _ one_ne_zero).mp A
+  convert(tendsto_mul_iff_of_ne_zero _ one_ne_zero).mp A
   suffices :
     tendsto
       (fun n : ℕ =>
@@ -373,7 +374,7 @@ theorem Real.tendsto_euler_sin_prod (x : ℝ) :
     Tendsto (fun n : ℕ => π * x * ∏ j in Finset.range n, 1 - x ^ 2 / (j + 1) ^ 2) atTop
       (𝓝 <| sin (π * x)) :=
   by
-  convert (complex.continuous_re.tendsto _).comp (Complex.tendsto_euler_sin_prod x)
+  convert(complex.continuous_re.tendsto _).comp (Complex.tendsto_euler_sin_prod x)
   · ext1 n
     rw [Function.comp_apply, ← Complex.ofReal_mul, Complex.ofReal_mul_re]
     suffices
Diff
@@ -114,8 +114,8 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
     have c := HasDerivAt.comp (x : ℂ) (hasDerivAt_pow (n - 1) _) (Complex.hasDerivAt_cos x)
     convert ((Complex.hasDerivAt_sin x).mul c).comp_of_real using 1
     · ext1 y
-      simp only [Complex.of_real_sin, Complex.of_real_cos]
-    · simp only [Complex.of_real_cos, Complex.of_real_sin]
+      simp only [Complex.ofReal_sin, Complex.ofReal_cos]
+    · simp only [Complex.ofReal_cos, Complex.ofReal_sin]
       rw [mul_neg, mul_neg, ← sub_eq_add_neg, Function.comp_apply]
       congr 1
       · rw [← pow_succ, Nat.sub_add_cancel (by linarith : 1 ≤ n)]
@@ -148,7 +148,7 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
     refine' integral_congr fun x hx => _
     dsimp only
     -- get rid of real trig functions and divions by 2 * z:
-    rw [Complex.of_real_cos, Complex.of_real_sin, Complex.sin_sq, ← mul_div_right_comm, ←
+    rw [Complex.ofReal_cos, Complex.ofReal_sin, Complex.sin_sq, ← mul_div_right_comm, ←
       mul_div_right_comm, ← sub_div, mul_div, ← neg_div]
     congr 1
     have : Complex.cos ↑x ^ n = Complex.cos ↑x ^ (n - 2) * Complex.cos ↑x ^ 2 := by
@@ -383,7 +383,7 @@ theorem Real.tendsto_euler_sin_prod (x : ℝ) :
     rw [Complex.ofReal_prod]
     refine' Finset.prod_congr (by rfl) fun n hn => _
     norm_cast
-  · rw [← Complex.ofReal_mul, ← Complex.of_real_sin, Complex.ofReal_re]
+  · rw [← Complex.ofReal_mul, ← Complex.ofReal_sin, Complex.ofReal_re]
 #align real.tendsto_euler_sin_prod Real.tendsto_euler_sin_prod
 
 end EulerSine
Diff
@@ -84,9 +84,10 @@ theorem integral_cos_mul_cos_pow_aux (hn : 2 ≤ n) (hz : z ≠ 0) :
   convert integral_mul_deriv_eq_deriv_mul der1 (fun x hx => antideriv_cos_comp_const_mul hz x) _ _
   · ext1 x
     rw [mul_comm]
-  · rw [Complex.ofReal_zero, mul_zero, Complex.sin_zero, zero_div, mul_zero, sub_zero,
-      cos_pi_div_two, Complex.ofReal_zero, zero_pow (by positivity : 0 < n), zero_mul, zero_sub, ←
-      integral_neg, ← integral_const_mul]
+  · rw [Complex.ofReal_zero, MulZeroClass.mul_zero, Complex.sin_zero, zero_div,
+      MulZeroClass.mul_zero, sub_zero, cos_pi_div_two, Complex.ofReal_zero,
+      zero_pow (by positivity : 0 < n), MulZeroClass.zero_mul, zero_sub, ← integral_neg, ←
+      integral_const_mul]
     refine' integral_congr fun x hx => _
     field_simp
     ring
@@ -128,9 +129,9 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
     ring_nf
   · -- now a tedious rearrangement of terms
     -- gather into a single integral, and deal with continuity subgoals:
-    rw [sin_zero, cos_pi_div_two, Complex.ofReal_zero, zero_pow, zero_mul, mul_zero, zero_mul,
-      zero_mul, sub_zero, zero_sub, ← integral_neg, ← integral_const_mul, ← integral_const_mul, ←
-      integral_sub]
+    rw [sin_zero, cos_pi_div_two, Complex.ofReal_zero, zero_pow, MulZeroClass.zero_mul,
+      MulZeroClass.mul_zero, MulZeroClass.zero_mul, MulZeroClass.zero_mul, sub_zero, zero_sub, ←
+      integral_neg, ← integral_const_mul, ← integral_const_mul, ← integral_sub]
     rotate_left
     · apply Continuous.intervalIntegrable
       exact
@@ -239,9 +240,10 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
   rcases eq_or_ne z 0 with (rfl | hz)
   · simp
   induction' n with n hn
-  · simp_rw [mul_zero, pow_zero, mul_one, Finset.prod_range_zero, mul_one, integral_one, sub_zero]
-    rw [integral_cos_mul_complex (mul_ne_zero two_ne_zero hz), Complex.ofReal_zero, mul_zero,
-      Complex.sin_zero, zero_div, sub_zero,
+  · simp_rw [MulZeroClass.mul_zero, pow_zero, mul_one, Finset.prod_range_zero, mul_one,
+      integral_one, sub_zero]
+    rw [integral_cos_mul_complex (mul_ne_zero two_ne_zero hz), Complex.ofReal_zero,
+      MulZeroClass.mul_zero, Complex.sin_zero, zero_div, sub_zero,
       (by
         push_cast
         field_simp
@@ -257,9 +259,10 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
       by
       rw [integral_cos_pow_eq]
       dsimp only [C]
-      rw [integral_cos_pow_eq, aux', integral_sin_pow, sin_zero, sin_pi, pow_succ, zero_mul,
-        zero_mul, zero_mul, sub_zero, zero_div, zero_add, ← mul_assoc, ← mul_assoc,
-        mul_comm (1 / 2 : ℝ) _, Nat.cast_mul, Nat.cast_bit0, Nat.cast_one]
+      rw [integral_cos_pow_eq, aux', integral_sin_pow, sin_zero, sin_pi, pow_succ,
+        MulZeroClass.zero_mul, MulZeroClass.zero_mul, MulZeroClass.zero_mul, sub_zero, zero_div,
+        zero_add, ← mul_assoc, ← mul_assoc, mul_comm (1 / 2 : ℝ) _, Nat.cast_mul, Nat.cast_bit0,
+        Nat.cast_one]
     rw [this]
     change
       ↑π * z * A * B / ↑C =
@@ -362,7 +365,7 @@ theorem Complex.tendsto_euler_sin_prod (z : ℂ) :
   · ext1 n
     congr 2 with x : 1
     rw [mul_comm]
-  · rw [Complex.ofReal_zero, mul_zero, Complex.cos_zero]
+  · rw [Complex.ofReal_zero, MulZeroClass.mul_zero, Complex.cos_zero]
 #align complex.tendsto_euler_sin_prod Complex.tendsto_euler_sin_prod
 
 /-- Euler's infinite product formula for the real sine function. -/
Diff
@@ -84,8 +84,8 @@ theorem integral_cos_mul_cos_pow_aux (hn : 2 ≤ n) (hz : z ≠ 0) :
   convert integral_mul_deriv_eq_deriv_mul der1 (fun x hx => antideriv_cos_comp_const_mul hz x) _ _
   · ext1 x
     rw [mul_comm]
-  · rw [Complex.of_real_zero, mul_zero, Complex.sin_zero, zero_div, mul_zero, sub_zero,
-      cos_pi_div_two, Complex.of_real_zero, zero_pow (by positivity : 0 < n), zero_mul, zero_sub, ←
+  · rw [Complex.ofReal_zero, mul_zero, Complex.sin_zero, zero_div, mul_zero, sub_zero,
+      cos_pi_div_two, Complex.ofReal_zero, zero_pow (by positivity : 0 < n), zero_mul, zero_sub, ←
       integral_neg, ← integral_const_mul]
     refine' integral_congr fun x hx => _
     field_simp
@@ -128,7 +128,7 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
     ring_nf
   · -- now a tedious rearrangement of terms
     -- gather into a single integral, and deal with continuity subgoals:
-    rw [sin_zero, cos_pi_div_two, Complex.of_real_zero, zero_pow, zero_mul, mul_zero, zero_mul,
+    rw [sin_zero, cos_pi_div_two, Complex.ofReal_zero, zero_pow, zero_mul, mul_zero, zero_mul,
       zero_mul, sub_zero, zero_sub, ← integral_neg, ← integral_const_mul, ← integral_const_mul, ←
       integral_sub]
     rotate_left
@@ -240,7 +240,7 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
   · simp
   induction' n with n hn
   · simp_rw [mul_zero, pow_zero, mul_one, Finset.prod_range_zero, mul_one, integral_one, sub_zero]
-    rw [integral_cos_mul_complex (mul_ne_zero two_ne_zero hz), Complex.of_real_zero, mul_zero,
+    rw [integral_cos_mul_complex (mul_ne_zero two_ne_zero hz), Complex.ofReal_zero, mul_zero,
       Complex.sin_zero, zero_div, sub_zero,
       (by
         push_cast
@@ -282,7 +282,7 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
           ∫ x : ℝ in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ (2 * n.succ)) =
         (2 * n + 1) / (2 * n + 2) * B
       by
-      rw [this, Complex.of_real_mul, Complex.of_real_div]
+      rw [this, Complex.ofReal_mul, Complex.ofReal_div]
       have : (C : ℂ) ≠ 0 := complex.of_real_ne_zero.mpr (integral_cos_pow_pos _).ne'
       have : 2 * (n : ℂ) + 1 ≠ 0 :=
         by
@@ -315,8 +315,8 @@ theorem tendsto_integral_cos_pow_mul_div {f : ℝ → ℂ} (hf : ContinuousOn f
       (fun n : ℕ => (∫ x : ℝ in 0 ..π / 2, ↑(cos x) ^ n * f x) / ↑(∫ x : ℝ in 0 ..π / 2, cos x ^ n))
       atTop (𝓝 <| f 0) :=
   by
-  simp_rw [div_eq_inv_mul _ (coe _), ← Complex.of_real_inv, integral_of_le pi_div_two_pos.le, ←
-    MeasureTheory.integral_Icc_eq_integral_Ioc, ← Complex.of_real_pow, ← Complex.real_smul]
+  simp_rw [div_eq_inv_mul _ (coe _), ← Complex.ofReal_inv, integral_of_le pi_div_two_pos.le, ←
+    MeasureTheory.integral_Icc_eq_integral_Ioc, ← Complex.ofReal_pow, ← Complex.real_smul]
   have c_lt : ∀ y : ℝ, y ∈ Icc 0 (π / 2) → y ≠ 0 → cos y < cos 0 := fun y hy hy' =>
     cos_lt_cos_of_nonneg_of_le_pi_div_two (le_refl 0) hy.2 (lt_of_le_of_ne hy.1 hy'.symm)
   have c_nonneg : ∀ x : ℝ, x ∈ Icc 0 (π / 2) → 0 ≤ cos x := fun x hx =>
@@ -362,7 +362,7 @@ theorem Complex.tendsto_euler_sin_prod (z : ℂ) :
   · ext1 n
     congr 2 with x : 1
     rw [mul_comm]
-  · rw [Complex.of_real_zero, mul_zero, Complex.cos_zero]
+  · rw [Complex.ofReal_zero, mul_zero, Complex.cos_zero]
 #align complex.tendsto_euler_sin_prod Complex.tendsto_euler_sin_prod
 
 /-- Euler's infinite product formula for the real sine function. -/
@@ -372,15 +372,15 @@ theorem Real.tendsto_euler_sin_prod (x : ℝ) :
   by
   convert (complex.continuous_re.tendsto _).comp (Complex.tendsto_euler_sin_prod x)
   · ext1 n
-    rw [Function.comp_apply, ← Complex.of_real_mul, Complex.of_real_mul_re]
+    rw [Function.comp_apply, ← Complex.ofReal_mul, Complex.ofReal_mul_re]
     suffices
       (∏ j : ℕ in Finset.range n, 1 - (x : ℂ) ^ 2 / (↑j + 1) ^ 2) =
         ↑(∏ j : ℕ in Finset.range n, 1 - x ^ 2 / (↑j + 1) ^ 2)
-      by rw [this, Complex.of_real_re]
-    rw [Complex.of_real_prod]
+      by rw [this, Complex.ofReal_re]
+    rw [Complex.ofReal_prod]
     refine' Finset.prod_congr (by rfl) fun n hn => _
     norm_cast
-  · rw [← Complex.of_real_mul, ← Complex.of_real_sin, Complex.of_real_re]
+  · rw [← Complex.ofReal_mul, ← Complex.of_real_sin, Complex.ofReal_re]
 #align real.tendsto_euler_sin_prod Real.tendsto_euler_sin_prod
 
 end EulerSine

Changes in mathlib4

mathlib3
mathlib4
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
@@ -272,7 +272,7 @@ The main theorem `Complex.tendsto_euler_sin_prod`, and its real variant
 `Real.tendsto_euler_sin_prod`, now follow by combining `sin_pi_mul_eq` with a lemma
 stating that the sequence of measures on `[0, π/2]` given by integration against `cos x ^ n`
 (suitably normalised) tends to the Dirac measure at 0, as a special case of the general result
-`tendsto_set_integral_pow_smul_of_unique_maximum_of_isCompact_of_continuousOn`. -/
+`tendsto_setIntegral_pow_smul_of_unique_maximum_of_isCompact_of_continuousOn`. -/
 
 
 theorem tendsto_integral_cos_pow_mul_div {f : ℝ → ℂ} (hf : ContinuousOn f (Icc 0 (π / 2))) :
@@ -291,7 +291,7 @@ theorem tendsto_integral_cos_pow_mul_div {f : ℝ → ℂ} (hf : ContinuousOn f
     rw [interior_Icc, closure_Ioo pi_div_two_pos.ne, left_mem_Icc]
     exact pi_div_two_pos.le
   exact
-    tendsto_set_integral_pow_smul_of_unique_maximum_of_isCompact_of_continuousOn isCompact_Icc
+    tendsto_setIntegral_pow_smul_of_unique_maximum_of_isCompact_of_continuousOn isCompact_Icc
       continuousOn_cos c_lt c_nonneg c_zero_pos zero_mem hf
 #align euler_sine.tendsto_integral_cos_pow_mul_div EulerSine.tendsto_integral_cos_pow_mul_div
 
change the order of operation in zsmulRec and nsmulRec (#11451)

We change the following field in the definition of an additive commutative monoid:

 nsmul_succ : ∀ (n : ℕ) (x : G),
-  AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
+  AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x

where the latter is more natural

We adjust the definitions of ^ in monoids, groups, etc. Originally there was a warning comment about why this natural order was preferred

use x * npowRec n x and not npowRec n x * x in the definition to make sure that definitional unfolding of npowRec is blocked, to avoid deep recursion issues.

but it seems to no longer apply.

Remarks on the PR :

  • pow_succ and pow_succ' have switched their meanings.
  • Most of the time, the proofs were adjusted by priming/unpriming one lemma, or exchanging left and right; a few proofs were more complicated to adjust.
  • In particular, [Mathlib/NumberTheory/RamificationInertia.lean] used Ideal.IsPrime.mul_mem_pow which is defined in [Mathlib/RingTheory/DedekindDomain/Ideal.lean]. Changing the order of operation forced me to add the symmetric lemma Ideal.IsPrime.mem_pow_mul.
  • the docstring for Cauchy condensation test in [Mathlib/Analysis/PSeries.lean] was mathematically incorrect, I added the mention that the function is antitone.
Diff
@@ -102,7 +102,7 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
     · simp only [Complex.ofReal_cos, Complex.ofReal_sin]
       rw [mul_neg, mul_neg, ← sub_eq_add_neg, Function.comp_apply]
       congr 1
-      · rw [← pow_succ, Nat.sub_add_cancel (by omega : 1 ≤ n)]
+      · rw [← pow_succ', Nat.sub_add_cancel (by omega : 1 ≤ n)]
       · have : ((n - 1 : ℕ) : ℂ) = (n : ℂ) - 1 := by
           rw [Nat.cast_sub (one_le_two.trans hn), Nat.cast_one]
         rw [Nat.sub_sub, this]
@@ -228,7 +228,7 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
     have : (∫ x in (0 : ℝ)..π / 2, cos x ^ (2 * n.succ)) = (2 * (n : ℝ) + 1) / (2 * n + 2) * C := by
       rw [integral_cos_pow_eq]
       dsimp only [C]
-      rw [integral_cos_pow_eq, aux', integral_sin_pow, sin_zero, sin_pi, pow_succ,
+      rw [integral_cos_pow_eq, aux', integral_sin_pow, sin_zero, sin_pi, pow_succ',
         zero_mul, zero_mul, zero_mul, sub_zero, zero_div,
         zero_add, ← mul_assoc, ← mul_assoc, mul_comm (1 / 2 : ℝ) _, Nat.cast_mul, Nat.cast_eq_ofNat]
     rw [this]
refactor: optimize proofs with omega (#11093)

I ran tryAtEachStep on all files under Mathlib to find all locations where omega succeeds. For each that was a linarith without an only, I tried replacing it with omega, and I verified that elaboration time got smaller. (In almost all cases, there was a noticeable speedup.) I also replaced some slow aesops along the way.

Diff
@@ -102,7 +102,7 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
     · simp only [Complex.ofReal_cos, Complex.ofReal_sin]
       rw [mul_neg, mul_neg, ← sub_eq_add_neg, Function.comp_apply]
       congr 1
-      · rw [← pow_succ, Nat.sub_add_cancel (by linarith : 1 ≤ n)]
+      · rw [← pow_succ, Nat.sub_add_cancel (by omega : 1 ≤ n)]
       · have : ((n - 1 : ℕ) : ℂ) = (n : ℂ) - 1 := by
           rw [Nat.cast_sub (one_le_two.trans hn), Nat.cast_one]
         rw [Nat.sub_sub, this]
@@ -167,7 +167,7 @@ theorem integral_cos_mul_cos_pow_even (n : ℕ) (hz : z ≠ 0) :
         ∫ x in (0 : ℝ)..π / 2, Complex.cos (2 * z * x) * (cos x : ℂ) ^ (2 * n + 2)) =
       (2 * n + 1 : ℂ) / (2 * n + 2) *
         ∫ x in (0 : ℝ)..π / 2, Complex.cos (2 * z * x) * (cos x : ℂ) ^ (2 * n) := by
-  convert integral_cos_mul_cos_pow (by linarith : 2 ≤ 2 * n + 2) hz using 3
+  convert integral_cos_mul_cos_pow (by omega : 2 ≤ 2 * n + 2) hz using 3
   · simp only [Nat.cast_add, Nat.cast_mul, Nat.cast_two]
     nth_rw 2 [← mul_one (2 : ℂ)]
     rw [← mul_add, mul_pow, ← div_div]
chore: prepare Lean version bump with explicit simp (#10999)

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

Diff
@@ -227,7 +227,7 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
     have aux' : 2 * n.succ = 2 * n + 2 := by rw [Nat.succ_eq_add_one, mul_add, mul_one]
     have : (∫ x in (0 : ℝ)..π / 2, cos x ^ (2 * n.succ)) = (2 * (n : ℝ) + 1) / (2 * n + 2) * C := by
       rw [integral_cos_pow_eq]
-      dsimp only
+      dsimp only [C]
       rw [integral_cos_pow_eq, aux', integral_sin_pow, sin_zero, sin_pi, pow_succ,
         zero_mul, zero_mul, zero_mul, sub_zero, zero_div,
         zero_add, ← mul_assoc, ← mul_assoc, mul_comm (1 / 2 : ℝ) _, Nat.cast_mul, Nat.cast_eq_ofNat]
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -310,13 +310,10 @@ theorem _root_.Complex.tendsto_euler_sin_prod (z : ℂ) :
   have : 𝓝 (Complex.sin (π * z)) = 𝓝 (Complex.sin (π * z) * 1) := by rw [mul_one]
   simp_rw [this, mul_div_assoc] at A
   convert (tendsto_mul_iff_of_ne_zero _ one_ne_zero).mp A
-  suffices :
-    Tendsto
-      (fun n : ℕ =>
+  suffices Tendsto (fun n : ℕ =>
         (∫ x in (0 : ℝ)..π / 2, Complex.cos (2 * z * x) * (cos x : ℂ) ^ n) /
-          (∫ x in (0 : ℝ)..π / 2, cos x ^ n : ℝ))
-      atTop (𝓝 1)
-  exact this.comp (tendsto_id.const_mul_atTop' zero_lt_two)
+          (∫ x in (0 : ℝ)..π / 2, cos x ^ n : ℝ)) atTop (𝓝 1) from
+    this.comp (tendsto_id.const_mul_atTop' zero_lt_two)
   have : ContinuousOn (fun x : ℝ => Complex.cos (2 * z * x)) (Icc 0 (π / 2)) :=
     (Complex.continuous_cos.comp (continuous_const.mul Complex.continuous_ofReal)).continuousOn
   convert tendsto_integral_cos_pow_mul_div this using 1
feat: The support of f ^ n (#9617)

This involves moving lemmas from Algebra.GroupPower.Ring to Algebra.GroupWithZero.Basic and changing some 0 < n assumptions to n ≠ 0.

From LeanAPAP

Diff
@@ -72,10 +72,9 @@ theorem integral_cos_mul_cos_pow_aux (hn : 2 ≤ n) (hz : z ≠ 0) :
   convert (config := { sameFun := true })
     integral_mul_deriv_eq_deriv_mul der1 (fun x _ => antideriv_cos_comp_const_mul hz x) _ _ using 2
   · ext1 x; rw [mul_comm]
-  · rw [Complex.ofReal_zero, mul_zero, Complex.sin_zero, zero_div,
-      mul_zero, sub_zero, cos_pi_div_two, Complex.ofReal_zero,
-      zero_pow (by positivity : 0 < n), zero_mul, zero_sub, ← integral_neg, ←
-      integral_const_mul]
+  · rw [Complex.ofReal_zero, mul_zero, Complex.sin_zero, zero_div, mul_zero, sub_zero,
+      cos_pi_div_two, Complex.ofReal_zero, zero_pow (by positivity : n ≠ 0), zero_mul, zero_sub,
+      ← integral_neg, ← integral_const_mul]
     refine' integral_congr fun x _ => _
     field_simp; ring
   · apply Continuous.intervalIntegrable
@@ -128,7 +127,7 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
         continuous_const.mul
           ((Complex.continuous_cos.comp (continuous_const.mul Complex.continuous_ofReal)).mul
             ((Complex.continuous_ofReal.comp continuous_cos).pow (n - 2)))
-    · apply Nat.sub_pos_of_lt; exact one_lt_two.trans_le hn
+    · exact Nat.sub_ne_zero_of_lt hn
     refine' integral_congr fun x _ => _
     dsimp only
     -- get rid of real trig functions and divisions by 2 * z:
feat: Basic Complex lemmas (#9527)

and rename ofReal_mul_re → re_mul_ofReal, ofReal_mul_im → im_mul_ofReal.

From LeanAPAP

Diff
@@ -331,7 +331,7 @@ theorem _root_.Real.tendsto_euler_sin_prod (x : ℝ) :
       atTop (𝓝 <| sin (π * x)) := by
   convert (Complex.continuous_re.tendsto _).comp (Complex.tendsto_euler_sin_prod x) using 1
   · ext1 n
-    rw [Function.comp_apply, ← Complex.ofReal_mul, Complex.ofReal_mul_re]
+    rw [Function.comp_apply, ← Complex.ofReal_mul, Complex.re_ofReal_mul]
     suffices
       (∏ j : ℕ in Finset.range n, (1 - x ^ 2 / (j + 1) ^ 2) : ℂ) =
         (∏ j : ℕ in Finset.range n, (1 - x ^ 2 / (j + 1) ^ 2) : ℝ) by
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
@@ -20,9 +20,6 @@ is to prove a recurrence relation for the integrals `∫ x in 0..π/2, cos 2 z x
 generalising the arguments used to prove Wallis' limit formula for `π`.
 -/
 
-
-local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue lean4#2220
-
 open scoped Real Topology BigOperators
 
 open Real Set Filter intervalIntegral MeasureTheory.MeasureSpace
@@ -336,8 +333,8 @@ theorem _root_.Real.tendsto_euler_sin_prod (x : ℝ) :
   · ext1 n
     rw [Function.comp_apply, ← Complex.ofReal_mul, Complex.ofReal_mul_re]
     suffices
-      (∏ j : ℕ in Finset.range n, ((1 : ℂ) - (x : ℂ) ^ 2 / ((j : ℂ) + 1) ^ 2)) =
-        (∏ j : ℕ in Finset.range n, ((1 : ℝ) - x ^ 2 / ((j : ℝ) + 1) ^ 2) : ℝ) by
+      (∏ j : ℕ in Finset.range n, (1 - x ^ 2 / (j + 1) ^ 2) : ℂ) =
+        (∏ j : ℕ in Finset.range n, (1 - x ^ 2 / (j + 1) ^ 2) : ℝ) by
       rw [this, Complex.ofReal_re]
     rw [Complex.ofReal_prod]
     refine' Finset.prod_congr (by rfl) fun n _ => _
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
@@ -75,9 +75,9 @@ theorem integral_cos_mul_cos_pow_aux (hn : 2 ≤ n) (hz : z ≠ 0) :
   convert (config := { sameFun := true })
     integral_mul_deriv_eq_deriv_mul der1 (fun x _ => antideriv_cos_comp_const_mul hz x) _ _ using 2
   · ext1 x; rw [mul_comm]
-  · rw [Complex.ofReal_zero, MulZeroClass.mul_zero, Complex.sin_zero, zero_div,
-      MulZeroClass.mul_zero, sub_zero, cos_pi_div_two, Complex.ofReal_zero,
-      zero_pow (by positivity : 0 < n), MulZeroClass.zero_mul, zero_sub, ← integral_neg, ←
+  · rw [Complex.ofReal_zero, mul_zero, Complex.sin_zero, zero_div,
+      mul_zero, sub_zero, cos_pi_div_two, Complex.ofReal_zero,
+      zero_pow (by positivity : 0 < n), zero_mul, zero_sub, ← integral_neg, ←
       integral_const_mul]
     refine' integral_congr fun x _ => _
     field_simp; ring
@@ -117,8 +117,8 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
     ring_nf
   · -- now a tedious rearrangement of terms
     -- gather into a single integral, and deal with continuity subgoals:
-    rw [sin_zero, cos_pi_div_two, Complex.ofReal_zero, zero_pow, MulZeroClass.zero_mul,
-      MulZeroClass.mul_zero, MulZeroClass.zero_mul, MulZeroClass.zero_mul, sub_zero, zero_sub, ←
+    rw [sin_zero, cos_pi_div_two, Complex.ofReal_zero, zero_pow, zero_mul,
+      mul_zero, zero_mul, zero_mul, sub_zero, zero_sub, ←
       integral_neg, ← integral_const_mul, ← integral_const_mul, ← integral_sub]
     rotate_left
     · apply Continuous.intervalIntegrable
@@ -217,10 +217,10 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
   rcases eq_or_ne z 0 with (rfl | hz)
   · simp
   induction' n with n hn
-  · simp_rw [Nat.zero_eq, MulZeroClass.mul_zero, pow_zero, mul_one, Finset.prod_range_zero, mul_one,
+  · simp_rw [Nat.zero_eq, mul_zero, pow_zero, mul_one, Finset.prod_range_zero, mul_one,
       integral_one, sub_zero]
     rw [integral_cos_mul_complex (mul_ne_zero two_ne_zero hz), Complex.ofReal_zero,
-      MulZeroClass.mul_zero, Complex.sin_zero, zero_div, sub_zero,
+      mul_zero, Complex.sin_zero, zero_div, sub_zero,
       (by push_cast; field_simp; ring : 2 * z * ↑(π / 2) = π * z)]
     field_simp [Complex.ofReal_ne_zero.mpr pi_pos.ne']
     ring
@@ -233,7 +233,7 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
       rw [integral_cos_pow_eq]
       dsimp only
       rw [integral_cos_pow_eq, aux', integral_sin_pow, sin_zero, sin_pi, pow_succ,
-        MulZeroClass.zero_mul, MulZeroClass.zero_mul, MulZeroClass.zero_mul, sub_zero, zero_div,
+        zero_mul, zero_mul, zero_mul, sub_zero, zero_div,
         zero_add, ← mul_assoc, ← mul_assoc, mul_comm (1 / 2 : ℝ) _, Nat.cast_mul, Nat.cast_eq_ofNat]
     rw [this]
     change
@@ -325,7 +325,7 @@ theorem _root_.Complex.tendsto_euler_sin_prod (z : ℂ) :
     (Complex.continuous_cos.comp (continuous_const.mul Complex.continuous_ofReal)).continuousOn
   convert tendsto_integral_cos_pow_mul_div this using 1
   · ext1 n; congr 2 with x : 1; rw [mul_comm]
-  · rw [Complex.ofReal_zero, MulZeroClass.mul_zero, Complex.cos_zero]
+  · rw [Complex.ofReal_zero, mul_zero, Complex.cos_zero]
 #align complex.tendsto_euler_sin_prod Complex.tendsto_euler_sin_prod
 
 /-- Euler's infinite product formula for the real sine function. -/
chore: regularize HPow.hPow porting notes (#6465)
Diff
@@ -21,7 +21,7 @@ generalising the arguments used to prove Wallis' limit formula for `π`.
 -/
 
 
-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 Real Topology BigOperators
 
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,15 +2,12 @@
 Copyright (c) 2023 David Loeffler. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: David Loeffler
-
-! This file was ported from Lean 3 source module analysis.special_functions.trigonometric.euler_sine_prod
-! leanprover-community/mathlib commit 2c1d8ca2812b64f88992a5294ea3dba144755cd1
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.SpecialFunctions.Integrals
 import Mathlib.MeasureTheory.Integral.PeakFunction
 
+#align_import analysis.special_functions.trigonometric.euler_sine_prod from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
+
 /-! # Euler's infinite product for the sine function
 
 This file proves the infinite product formula
chore: remove occurrences of semicolon after space (#5713)

This is the second half of the changes originally in #5699, removing all occurrences of ; after a space and implementing a linter rule to enforce it.

In most cases this 2-character substring has a space after it, so the following command was run first:

find . -type f -name "*.lean" -exec sed -i -E 's/ ; /; /g' {} \;

The remaining cases were few enough in number that they were done manually.

Diff
@@ -161,7 +161,7 @@ theorem integral_cos_mul_cos_pow (hn : 2 ≤ n) (hz : z ≠ 0) :
       (n - 1 : ℂ) / n *
         ∫ x in (0 : ℝ)..π / 2, Complex.cos (2 * z * x) * (cos x : ℂ) ^ (n - 2) := by
   have nne : (n : ℂ) ≠ 0 := by
-    contrapose! hn; rw [Nat.cast_eq_zero] at hn ; rw [hn]; exact zero_lt_two
+    contrapose! hn; rw [Nat.cast_eq_zero] at hn; rw [hn]; exact zero_lt_two
   have := integral_cos_mul_cos_pow_aux hn hz
   rw [integral_sin_mul_sin_mul_cos_pow_eq hn hz, sub_eq_neg_add, mul_add, ← sub_eq_iff_eq_add]
     at this
@@ -179,8 +179,8 @@ theorem integral_cos_mul_cos_pow_even (n : ℕ) (hz : z ≠ 0) :
     nth_rw 2 [← mul_one (2 : ℂ)]
     rw [← mul_add, mul_pow, ← div_div]
     ring
-  · push_cast ; ring
-  · push_cast ; ring
+  · push_cast; ring
+  · push_cast; ring
 #align euler_sine.integral_cos_mul_cos_pow_even EulerSine.integral_cos_mul_cos_pow_even
 
 /-- Relate the integral `cos x ^ n` over `[0, π/2]` to the integral of `sin x ^ n` over `[0, π]`,
@@ -224,7 +224,7 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
       integral_one, sub_zero]
     rw [integral_cos_mul_complex (mul_ne_zero two_ne_zero hz), Complex.ofReal_zero,
       MulZeroClass.mul_zero, Complex.sin_zero, zero_div, sub_zero,
-      (by push_cast ; field_simp; ring : 2 * z * ↑(π / 2) = π * z)]
+      (by push_cast; field_simp; ring : 2 * z * ↑(π / 2) = π * z)]
     field_simp [Complex.ofReal_ne_zero.mpr pi_pos.ne']
     ring
   · rw [hn, Finset.prod_range_succ]
@@ -265,7 +265,7 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
         simp
       have : 2 * (n : ℂ) + 2 ≠ 0 := by
         convert (Nat.cast_add_one_ne_zero (2 * n + 1) : (↑(2 * n + 1) + 1 : ℂ) ≠ 0) using 1
-        push_cast ; ring
+        push_cast; ring
       field_simp; ring
     convert integral_cos_mul_cos_pow_even n hz
     rw [Nat.cast_succ]
chore: fix many typos (#4967)

These are all doc fixes

Diff
@@ -137,7 +137,7 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
     · apply Nat.sub_pos_of_lt; exact one_lt_two.trans_le hn
     refine' integral_congr fun x _ => _
     dsimp only
-    -- get rid of real trig functions and divions by 2 * z:
+    -- get rid of real trig functions and divisions by 2 * z:
     rw [Complex.ofReal_cos, Complex.ofReal_sin, Complex.sin_sq, ← mul_div_right_comm, ←
       mul_div_right_comm, ← sub_div, mul_div, ← neg_div]
     congr 1
chore: use ofReal instead of of_real in lemma names (#4934)
Diff
@@ -47,7 +47,7 @@ theorem antideriv_cos_comp_const_mul (hz : z ≠ 0) (x : ℝ) :
   have a : HasDerivAt (fun y : ℂ => y * (2 * z)) _ x := hasDerivAt_mul_const _
   have b : HasDerivAt (fun y : ℂ => Complex.sin (y * (2 * z))) _ x :=
     HasDerivAt.comp (x : ℂ) (Complex.hasDerivAt_sin (x * (2 * z))) a
-  have c := b.comp_of_real.div_const (2 * z)
+  have c := b.comp_ofReal.div_const (2 * z)
   field_simp at c; simp only [fun y => mul_comm y (2 * z)] at c
   exact c
 #align euler_sine.antideriv_cos_comp_const_mul EulerSine.antideriv_cos_comp_const_mul
@@ -57,7 +57,7 @@ theorem antideriv_sin_comp_const_mul (hz : z ≠ 0) (x : ℝ) :
   have a : HasDerivAt (fun y : ℂ => y * (2 * z)) _ x := hasDerivAt_mul_const _
   have b : HasDerivAt (fun y : ℂ => Complex.cos (y * (2 * z))) _ x :=
     HasDerivAt.comp (x : ℂ) (Complex.hasDerivAt_cos (x * (2 * z))) a
-  have c := (b.comp_of_real.div_const (2 * z)).neg
+  have c := (b.comp_ofReal.div_const (2 * z)).neg
   field_simp at c; simp only [fun y => mul_comm y (2 * z)] at c
   exact c
 #align euler_sine.antideriv_sin_comp_const_mul EulerSine.antideriv_sin_comp_const_mul
@@ -72,7 +72,7 @@ theorem integral_cos_mul_cos_pow_aux (hn : 2 ≤ n) (hz : z ≠ 0) :
         HasDerivAt (fun y : ℝ => (cos y : ℂ) ^ n) (-n * sin x * (cos x : ℂ) ^ (n - 1)) x := by
     intro x _
     have b : HasDerivAt (fun y : ℝ => (cos y : ℂ)) (-sin x) x := by
-      simpa using (hasDerivAt_cos x).of_real_comp
+      simpa using (hasDerivAt_cos x).ofReal_comp
     convert HasDerivAt.comp x (hasDerivAt_pow _ _) b using 1
     ring
   convert (config := { sameFun := true })
@@ -104,7 +104,7 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
           ((cos x : ℂ) ^ n - (n - 1) * (sin x : ℂ) ^ 2 * (cos x : ℂ) ^ (n - 2)) x := by
     intro x _
     have c := HasDerivAt.comp (x : ℂ) (hasDerivAt_pow (n - 1) _) (Complex.hasDerivAt_cos x)
-    convert ((Complex.hasDerivAt_sin x).mul c).comp_of_real using 1
+    convert ((Complex.hasDerivAt_sin x).mul c).comp_ofReal using 1
     · ext1 y; simp only [Complex.ofReal_sin, Complex.ofReal_cos, Function.comp]
     · simp only [Complex.ofReal_cos, Complex.ofReal_sin]
       rw [mul_neg, mul_neg, ← sub_eq_add_neg, Function.comp_apply]
feat: port Analysis.SpecialFunctions.Trigonometric.EulerSineProd (#4881)

Dependencies 12 + 1070

1071 files ported (98.9%)
483768 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