Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 67821d2

Browse files
committed
feat(analysis/special_functions/trigonometric/chebyshev): T_real_cos and U_real_cos (#15798)
We prove `T_real_cos` and `U_real_cos` matching `T_complex_cos` and `U_complex_cos`. We also remove two redundant theorems.
1 parent 619eaf8 commit 67821d2

File tree

1 file changed

+56
-20
lines changed

1 file changed

+56
-20
lines changed

src/analysis/special_functions/trigonometric/chebyshev.lean

Lines changed: 56 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,52 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Johan Commelin
55
-/
66
import analysis.complex.basic
7-
import ring_theory.polynomial.chebyshev
87
import data.complex.exponential
8+
import data.polynomial.algebra_map
9+
import ring_theory.polynomial.chebyshev
910

1011
/-!
1112
# Multiple angle formulas in terms of Chebyshev polynomials
1213
13-
* `polynomial.chebyshev.T_complex_cos`: the `n`-th Chebyshev polynomial evaluates on `complex.cos θ`
14-
to the value `complex.cos (n * θ)`.
14+
This file gives the trigonometric characterizations of Chebyshev polynomials, for both the real
15+
(`real.cos`) and complex (`complex.cos`) cosine.
1516
-/
1617

1718
namespace polynomial.chebyshev
19+
open polynomial
20+
21+
variables {R A : Type*} [comm_ring R] [comm_ring A] [algebra R A]
22+
23+
@[simp] lemma aeval_T (x : A) (n : ℕ) : aeval x (T R n) = (T A n).eval x :=
24+
by rw [aeval_def, eval₂_eq_eval_map, map_T]
25+
26+
@[simp] lemma aeval_U (x : A) (n : ℕ) : aeval x (U R n) = (U A n).eval x :=
27+
by rw [aeval_def, eval₂_eq_eval_map, map_U]
28+
29+
@[simp] lemma algebra_map_eval_T (x : R) (n : ℕ) :
30+
algebra_map R A ((T R n).eval x) = (T A n).eval (algebra_map R A x) :=
31+
by rw [←aeval_algebra_map_apply, aeval_T]
32+
33+
@[simp] lemma algebra_map_eval_U (x : R) (n : ℕ) :
34+
algebra_map R A ((U R n).eval x) = (U A n).eval (algebra_map R A x) :=
35+
by rw [←aeval_algebra_map_apply, aeval_U]
36+
37+
@[simp, norm_cast] lemma complex_of_real_eval_T : ∀ x n, ((T ℝ n).eval x : ℂ) = (T ℂ n).eval x :=
38+
@algebra_map_eval_T ℝ ℂ _ _ _
39+
40+
@[simp, norm_cast] lemma complex_of_real_eval_U : ∀ x n, ((U ℝ n).eval x : ℂ) = (U ℂ n).eval x :=
41+
@algebra_map_eval_U ℝ ℂ _ _ _
42+
43+
/-! ### Complex versions -/
44+
45+
section complex
46+
open complex
1847

19-
open polynomial complex
48+
variable (θ : ℂ)
2049

2150
/-- The `n`-th Chebyshev polynomial of the first kind evaluates on `cos θ` to the
2251
value `cos (n * θ)`. -/
23-
lemma T_complex_cos (θ : ℂ) :
24-
∀ n, (T ℂ n).eval (cos θ) = cos (n * θ)
52+
@[simp] lemma T_complex_cos : ∀ n, (T ℂ n).eval (cos θ) = cos (n * θ)
2553
| 0 := by simp only [T_zero, eval_one, nat.cast_zero, zero_mul, cos_zero]
2654
| 1 := by simp only [eval_X, one_mul, T_one, nat.cast_one]
2755
| (n + 2) :=
@@ -34,16 +62,9 @@ begin
3462
ring,
3563
end
3664

37-
/-- `cos (n * θ)` is equal to the `n`-th Chebyshev polynomial of the first kind evaluated
38-
on `cos θ`. -/
39-
lemma cos_nat_mul (n : ℕ) (θ : ℂ) :
40-
cos (n * θ) = (T ℂ n).eval (cos θ) :=
41-
(T_complex_cos θ n).symm
42-
4365
/-- The `n`-th Chebyshev polynomial of the second kind evaluates on `cos θ` to the
44-
value `sin ((n+1) * θ) / sin θ`. -/
45-
lemma U_complex_cos (θ : ℂ) (n : ℕ) :
46-
(U ℂ n).eval (cos θ) * sin θ = sin ((n+1) * θ) :=
66+
value `sin ((n + 1) * θ) / sin θ`. -/
67+
@[simp] lemma U_complex_cos (n : ℕ) : (U ℂ n).eval (cos θ) * sin θ = sin ((n + 1) * θ) :=
4768
begin
4869
induction n with d hd,
4970
{ simp only [U_zero, nat.cast_zero, eval_one, mul_one, zero_add, one_mul] },
@@ -54,10 +75,25 @@ begin
5475
simp only [add_mul, one_mul] }
5576
end
5677

57-
/-- `sin ((n + 1) * θ)` is equal to `sin θ` multiplied with the `n`-th Chebyshev polynomial of the
58-
second kind evaluated on `cos θ`. -/
59-
lemma sin_nat_succ_mul (n : ℕ) (θ : ℂ) :
60-
sin ((n + 1) * θ) = (U ℂ n).eval (cos θ) * sin θ :=
61-
(U_complex_cos θ n).symm
78+
end complex
79+
80+
/- ### Real versions -/
81+
82+
section real
83+
open real
84+
85+
variables (θ : ℝ) (n : ℕ)
86+
87+
/-- The `n`-th Chebyshev polynomial of the first kind evaluates on `cos θ` to the
88+
value `cos (n * θ)`. -/
89+
@[simp] lemma T_real_cos : (T ℝ n).eval (cos θ) = cos (n * θ) :=
90+
by exact_mod_cast T_complex_cos θ n
91+
92+
/-- The `n`-th Chebyshev polynomial of the second kind evaluates on `cos θ` to the
93+
value `sin ((n + 1) * θ) / sin θ`. -/
94+
@[simp] lemma U_real_cos : (U ℝ n).eval (cos θ) * sin θ = sin ((n + 1) * θ) :=
95+
by exact_mod_cast U_complex_cos θ n
96+
97+
end real
6298

6399
end polynomial.chebyshev

0 commit comments

Comments
 (0)