@@ -4,24 +4,52 @@ Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Johan Commelin
5
5
-/
6
6
import analysis.complex.basic
7
- import ring_theory.polynomial.chebyshev
8
7
import data.complex.exponential
8
+ import data.polynomial.algebra_map
9
+ import ring_theory.polynomial.chebyshev
9
10
10
11
/-!
11
12
# Multiple angle formulas in terms of Chebyshev polynomials
12
13
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 .
15
16
-/
16
17
17
18
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
18
47
19
- open polynomial complex
48
+ variable (θ : ℂ)
20
49
21
50
/-- The `n`-th Chebyshev polynomial of the first kind evaluates on `cos θ` to the
22
51
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 * θ)
25
53
| 0 := by simp only [T_zero, eval_one, nat.cast_zero, zero_mul, cos_zero]
26
54
| 1 := by simp only [eval_X, one_mul, T_one, nat.cast_one]
27
55
| (n + 2 ) :=
34
62
ring,
35
63
end
36
64
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
-
43
65
/-- 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 ) * θ) :=
47
68
begin
48
69
induction n with d hd,
49
70
{ simp only [U_zero, nat.cast_zero, eval_one, mul_one, zero_add, one_mul] },
@@ -54,10 +75,25 @@ begin
54
75
simp only [add_mul, one_mul] }
55
76
end
56
77
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
62
98
63
99
end polynomial.chebyshev
0 commit comments