Theorem: Real.tendsto_euler_sin_prod
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/EulerSineProd.lean

tactic: convert (Complex.continuous_re.tendsto _).comp (Complex.tendsto_euler_sin_prod x) using 1
state_before: x : ℝ
⊢ Tendsto (fun n => π * x * ∏ j ∈ Finset.range n, (1 - x ^ 2 / (↑j + 1) ^ 2)) atTop (𝓝 (sin (π * x)))
state_after: case h.e'_3
x : ℝ
⊢ (fun n => π * x * ∏ j ∈ Finset.range n, (1 - x ^ 2 / (↑j + 1) ^ 2)) =
    Complex.re ∘ fun n => ↑π * ↑x * ∏ j ∈ Finset.range n, (1 - ↑x ^ 2 / (↑j + 1) ^ 2)

case h.e'_5
x : ℝ
⊢ 𝓝 (sin (π * x)) = 𝓝 (Complex.sin (↑π * ↑x)).re

tactic: ext1 n
state_before: case h.e'_3
x : ℝ
⊢ (fun n => π * x * ∏ j ∈ Finset.range n, (1 - x ^ 2 / (↑j + 1) ^ 2)) =
    Complex.re ∘ fun n => ↑π * ↑x * ∏ j ∈ Finset.range n, (1 - ↑x ^ 2 / (↑j + 1) ^ 2)
state_after: case h.e'_3.h
x : ℝ
n : ℕ
⊢ π * x * ∏ j ∈ Finset.range n, (1 - x ^ 2 / (↑j + 1) ^ 2) =
    (Complex.re ∘ fun n => ↑π * ↑x * ∏ j ∈ Finset.range n, (1 - ↑x ^ 2 / (↑j + 1) ^ 2)) n

tactic: rw [Function.comp_apply, ← Complex.ofReal_mul, Complex.re_ofReal_mul]
state_before: case h.e'_3.h
x : ℝ
n : ℕ
⊢ π * x * ∏ j ∈ Finset.range n, (1 - x ^ 2 / (↑j + 1) ^ 2) =
    (Complex.re ∘ fun n => ↑π * ↑x * ∏ j ∈ Finset.range n, (1 - ↑x ^ 2 / (↑j + 1) ^ 2)) n
state_after: case h.e'_3.h
x : ℝ
n : ℕ
⊢ π * x * ∏ j ∈ Finset.range n, (1 - x ^ 2 / (↑j + 1) ^ 2) =
    π * x * (∏ j ∈ Finset.range n, (1 - ↑x ^ 2 / (↑j + 1) ^ 2)).re

tactic: suffices
  (∏ j ∈ Finset.range n, (1 - x ^ 2 / (j + 1) ^ 2) : ℂ) =
    (∏ j ∈ Finset.range n, (1 - x ^ 2 / (j + 1) ^ 2) : ℝ) by
  rw [this, Complex.ofReal_re]
state_before: case h.e'_3.h
x : ℝ
n : ℕ
⊢ π * x * ∏ j ∈ Finset.range n, (1 - x ^ 2 / (↑j + 1) ^ 2) =
    π * x * (∏ j ∈ Finset.range n, (1 - ↑x ^ 2 / (↑j + 1) ^ 2)).re
state_after: case h.e'_3.h
x : ℝ
n : ℕ
⊢ ∏ j ∈ Finset.range n, (1 - ↑x ^ 2 / (↑j + 1) ^ 2) = ↑(∏ j ∈ Finset.range n, (1 - x ^ 2 / (↑j + 1) ^ 2))

tactic: rw [Complex.ofReal_prod]
state_before: case h.e'_3.h
x : ℝ
n : ℕ
⊢ ∏ j ∈ Finset.range n, (1 - ↑x ^ 2 / (↑j + 1) ^ 2) = ↑(∏ j ∈ Finset.range n, (1 - x ^ 2 / (↑j + 1) ^ 2))
state_after: case h.e'_3.h
x : ℝ
n : ℕ
⊢ ∏ j ∈ Finset.range n, (1 - ↑x ^ 2 / (↑j + 1) ^ 2) = ∏ i ∈ Finset.range n, ↑(1 - x ^ 2 / (↑i + 1) ^ 2)

tactic: refine Finset.prod_congr (by rfl) fun n _ => ?_
state_before: case h.e'_3.h
x : ℝ
n : ℕ
⊢ ∏ j ∈ Finset.range n, (1 - ↑x ^ 2 / (↑j + 1) ^ 2) = ∏ i ∈ Finset.range n, ↑(1 - x ^ 2 / (↑i + 1) ^ 2)
state_after: case h.e'_3.h
x : ℝ
n✝ n : ℕ
x✝ : n ∈ Finset.range n✝
⊢ 1 - ↑x ^ 2 / (↑n + 1) ^ 2 = ↑(1 - x ^ 2 / (↑n + 1) ^ 2)

tactic: norm_cast
state_before: case h.e'_3.h
x : ℝ
n✝ n : ℕ
x✝ : n ∈ Finset.range n✝
⊢ 1 - ↑x ^ 2 / (↑n + 1) ^ 2 = ↑(1 - x ^ 2 / (↑n + 1) ^ 2)
state_after: no goals

tactic: rw [this, Complex.ofReal_re]
state_before: x : ℝ
n : ℕ
this : ∏ j ∈ Finset.range n, (1 - ↑x ^ 2 / (↑j + 1) ^ 2) = ↑(∏ j ∈ Finset.range n, (1 - x ^ 2 / (↑j + 1) ^ 2))
⊢ π * x * ∏ j ∈ Finset.range n, (1 - x ^ 2 / (↑j + 1) ^ 2) =
    π * x * (∏ j ∈ Finset.range n, (1 - ↑x ^ 2 / (↑j + 1) ^ 2)).re
state_after: no goals

tactic: rfl
state_before: x : ℝ
n : ℕ
⊢ Finset.range n = Finset.range n
state_after: no goals

tactic: rw [← Complex.ofReal_mul, ← Complex.ofReal_sin, Complex.ofReal_re]
state_before: case h.e'_5
x : ℝ
⊢ 𝓝 (sin (π * x)) = 𝓝 (Complex.sin (↑π * ↑x)).re
state_after: no goals