Skip to content

Commit 20ee997

Browse files
committed
Finished results regarding eval_iterate_derivative
1 parent 2edf4b7 commit 20ee997

1 file changed

Lines changed: 58 additions & 8 deletions

File tree

  • Mathlib/Analysis/SpecialFunctions/Trigonometric/Chebyshev

Mathlib/Analysis/SpecialFunctions/Trigonometric/Chebyshev/Extremal.lean

Lines changed: 58 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ public import Mathlib.Topology.Algebra.Polynomial
2020
2121
## Main statements
2222
23-
* `leadingCoeff_le_of_bounded`: If P is a degree n polynomial and |P(x)|≤1 for all |x|≤ 1 then
23+
* `leadingCoeff_le_of_bounded`: If P is a degree n polynomial and |P(x)|≤1 for all |x|≤1 then
2424
the leading coefficient of P is at most 2^(n-1)
25-
* `leadingCoeff_eq_iff_of_bounded`: If P is a degree n polynomial and |P(x)|≤1 for all |x|≤ 1 then
26-
the leading coefficient of P equals 2^(n-1) iff it is the n'th Chebyshev polynomial
25+
* `leadingCoeff_eq_iff_of_bounded`: If P is a degree n polynomial and |P(x)|≤1 for all |x|≤1 then
26+
the leading coefficient of P equals 2^(n-1) iff P = T_n, the n'th Chebyshev polynomial
27+
* `eval_iterate_derivative_le_of_bounded`: If P is a degree n polynomial and |P(x)|≤1 for all |x|≤1
28+
then for all x≥1 and all 0≠k≤n, P^(k)(x) ≤ T_n^(k)(x)
29+
* `eval_iterate_derivative_eq_iff_of_bounded`: If P is a degree n polynomial and |P(x)|≤1 for all
30+
|x|≤1 then for all 0≠k≤n, P^(k)(x) = T_n^(k)(x) iff P = T_n
2731
-/
2832
@[expose] public section
2933
namespace Polynomial.Chebyshev
@@ -190,15 +194,61 @@ theorem leadingCoeff_eq_iff_of_bounded {n : ℕ} {P : ℝ[X]}
190194
(fun i hi => leadingCoeff_eq_sum_chebyshevNode_coeff_pos hi) hPdeg hPbnd
191195
simp
192196

193-
theorem eval_iterate_derivative_eq_sum_chebshevNode {n k : ℕ} (hk : k ≤ n) (x : ℝ)
197+
theorem eval_iterate_derivative_eq_sum_chebyshevNode {n k : ℕ} (hk : k ≤ n) (x : ℝ)
194198
(P : ℝ[X]) (hP : P.degree = n) :
195-
(derivative^[k] P).eval x = k.factorial *
199+
(derivative^[k] P).eval x =
196200
∑ i ≤ n, P.eval (chebyshevNode n i) *
197-
((∏ j ∈ (Finset.range (n + 1)).erase i, ((chebyshevNode n i) - (chebyshevNode n j)))⁻¹ *
201+
(k.factorial *
202+
(∏ j ∈ (Finset.range (n + 1)).erase i, ((chebyshevNode n i) - (chebyshevNode n j)))⁻¹ *
198203
∑ t ∈ ((Finset.range (n + 1)).erase i).powerset with t.card = n - k,
199204
∏ a ∈ t, (x - chebyshevNode n a)) := by
200205
rw [Lagrange.eval_iterate_derivative_eq_sum (strictAntiOn_chebyshevNode n).injOn (by simp [hP])
201-
hk x]
202-
sorry
206+
(le_of_le_of_eq (Nat.cast_le.mpr hk) hP.symm) x, Finset.mul_sum, Finset.card_range,
207+
Nat.add_sub_add_right, show Finset.range (n + 1) = Finset.Iic n by grind]
208+
congr! 1 with i hi
209+
ring
210+
211+
theorem eval_iterate_derivative_eq_sum_chebyshevNode_coeff_pos
212+
{n k i : ℕ} (hk₁ : 0 < k) (hk₂ : k ≤ n) (hi : i ≤ n) {x : ℝ} (hx : 1 ≤ x) :
213+
0 < (-1) ^ i *
214+
(k.factorial *
215+
(∏ j ∈ (Finset.range (n + 1)).erase i, ((chebyshevNode n i) - (chebyshevNode n j)))⁻¹ *
216+
∑ t ∈ ((Finset.range (n + 1)).erase i).powerset with t.card = n - k,
217+
∏ a ∈ t, (x - chebyshevNode n a)) := by
218+
rw [← mul_assoc]
219+
refine mul_pos ?_ (Finset.sum_pos' ?_ ?_)
220+
· rw [← mul_assoc, mul_comm (a := (-1) ^ i), mul_assoc]
221+
exact mul_pos (Nat.cast_pos.mpr <| Nat.factorial_pos k)
222+
(leadingCoeff_eq_sum_chebyshevNode_coeff_pos hi)
223+
· refine fun t _ => Finset.prod_nonneg (fun a _ => ?_)
224+
have : chebyshevNode n a ≤ 1 := cos_le_one _
225+
linarith
226+
· have : ∃ s ⊆ (Finset.range (n + 1)).erase i, s.card = n - k ∧ 0 ∉ s := by
227+
by_cases 1 ≤ i ∧ i ≤ n - k
228+
case neg => exact ⟨Finset.Icc 1 (n - k), by grind, by grind [Nat.card_Icc], by simp⟩
229+
case pos => exact ⟨(Finset.Icc 1 (n - k + 1)).erase i, by grind, by grind [Nat.card_Icc],
230+
by simp⟩
231+
obtain ⟨s, hs, hscard, hsn⟩ := this
232+
refine ⟨s, by simp [hs, hscard], Finset.prod_pos (fun a ha => ?_)⟩
233+
have : chebyshevNode n a < 1 := by
234+
rw [← chebyshevNode_eq_one (n := n)]
235+
apply chebyshevNode_lt (Nat.zero_le _) (by grind) (by grind)
236+
linarith
237+
238+
theorem eval_iterate_derivative_le_of_bounded {n : ℕ} {P : ℝ[X]}
239+
{k : ℕ} (hk₁ : 0 < k) (hk₂ : k ≤ n) {x : ℝ} (hx : 1 ≤ x)
240+
(hPdeg : P.degree = n) (hPbnd : ∀ x ∈ Set.Icc (-1) 1, P.eval x ∈ Set.Icc (-1) 1) :
241+
(derivative^[k] P).eval x ≤ (derivative^[k] (T ℝ n)).eval x :=
242+
apply_le_apply_T_real (eval_iterate_derivative_eq_sum_chebyshevNode hk₂ x)
243+
(fun _ hi => le_of_lt <| eval_iterate_derivative_eq_sum_chebyshevNode_coeff_pos hk₁ hk₂ hi hx)
244+
hPdeg hPbnd
245+
246+
theorem eval_iterate_derivative_eq_iff_of_bounded {n : ℕ} {P : ℝ[X]}
247+
{k : ℕ} (hk₁ : 0 < k) (hk₂ : k ≤ n) {x : ℝ} (hx : 1 ≤ x)
248+
(hPdeg : P.degree = n) (hPbnd : ∀ x ∈ Set.Icc (-1) 1, P.eval x ∈ Set.Icc (-1) 1) :
249+
(derivative^[k] P).eval x = (derivative^[k] (T ℝ n)).eval x ↔ P = T ℝ n :=
250+
apply_eq_apply_T_real_iff (eval_iterate_derivative_eq_sum_chebyshevNode hk₂ x)
251+
(fun _ hi => eval_iterate_derivative_eq_sum_chebyshevNode_coeff_pos hk₁ hk₂ hi hx)
252+
hPdeg hPbnd
203253

204254
end Polynomial.Chebyshev

0 commit comments

Comments
 (0)