Function of #cas
ChebyshevU
The Chebyshev polynomial in monomials, proved in every commutative ring, and its exact values at rational points.
#cas (ChebyshevU n x)#cas (ChebyshevU n q)#cas [N d] (ChebyshevU n q)ChebyshevU writes the Chebyshev polynomial of the second kind in monomials, or gives its exact value at a rational point. As with ChebyshevT, the theorem for the polynomial is about Mathlib’s Polynomial.Chebyshev.U R n, and it holds in every commutative ring R : Type at once, so one statement serves whichever ring your proof works in.
Examples (6)#
Basic Examples (1)
in monomials, with the theorem in every commutative ring:
#cas (ChebyshevU 4 x)
polynomial with integer coefficients
16*x^4 - 12*x^2 + 1- Domain
Polynomial.Chebyshev.U R 4, every commutative ring R : Type- Input (polynomial in x)
ChebyshevU 4 x
Checked by Lean’s kernel: Monomial expansion of ChebyshevU 4
∀ (R : Type) [inst : CommRing R], Polynomial.Chebyshev.U R 4 = 16 * Polynomial.X ^ 4 - 12 * Polynomial.X ^ 2 + 1
The certificate: 1 checked step
Monomial expansion of ChebyshevU 4
∀ (R : Type) [inst : CommRing R], Polynomial.Chebyshev.U R 4 = 16 * Polynomial.X ^ 4 - 12 * Polynomial.X ^ 2 + 1
Scope (2)
expand prints the same polynomial:
#cas [expand] (ChebyshevU 2 x)
polynomial with integer coefficients
4*x^2 - 1- Domain
Polynomial.Chebyshev.U R 2, every commutative ring R : Type- Input (polynomial in x)
ChebyshevU 2 x
Checked by Lean’s kernel: Monomial expansion of ChebyshevU 2
∀ (R : Type) [inst : CommRing R], Polynomial.Chebyshev.U R 2 = 4 * Polynomial.X ^ 2 - 1
The certificate: 1 checked step
Monomial expansion of ChebyshevU 2
∀ (R : Type) [inst : CommRing R], Polynomial.Chebyshev.U R 2 = 4 * Polynomial.X ^ 2 - 1
At a rational point the call gives the exact value, and [N d] adds its first digits. With at , the value is , and the digits are exact:
#cas [N 10] (ChebyshevU 3 (-1/2))
exact rational value and its first 10 significant digits, truncated
1 = 1.000000000- Domain
ChebyshevU polynomial at a rational point
Checked by Lean’s kernel: Exact value and digits of ChebyshevU 3
Polynomial.eval (-(1 / 2)) (Polynomial.Chebyshev.U ℝ 3) = 1 ∧ 1000000000 / 10 ^ 9 ≤ Polynomial.eval (-(1 / 2)) (Polynomial.Chebyshev.U ℝ 3) ∧ Polynomial.eval (-(1 / 2)) (Polynomial.Chebyshev.U ℝ 3) < (1000000000 + 1) / 10 ^ 9
The certificate: 1 checked step
Exact value and digits of ChebyshevU 3
Polynomial.eval (-(1 / 2)) (Polynomial.Chebyshev.U ℝ 3) = 1 ∧ 1000000000 / 10 ^ 9 ≤ Polynomial.eval (-(1 / 2)) (Polynomial.Chebyshev.U ℝ 3) ∧ Polynomial.eval (-(1 / 2)) (Polynomial.Chebyshev.U ℝ 3) < (1000000000 + 1) / 10 ^ 9
Applications (1)
A proof can take the printed theorem as a hypothesis and specialize it, here to at , where :
theorem chebyshevU_four_at_one (h : ∀ (R : Type) [CommRing R], Polynomial.Chebyshev.U R 4 = 16 * Polynomial.X ^ 4 - 12 * Polynomial.X ^ 2 + 1) : (Polynomial.Chebyshev.U ℝ 4).eval 1 = 5 := by rw [h ℝ] norm_num #print axioms chebyshevU_four_at_one
chebyshevU_four_at_one depends on the axioms propext, Classical.choice, Quot.sound.
Properties and Relations (1)
The derivative of the polynomial of the first kind is . The ChebyshevT polynomial has :
#cas (ChebyshevT 5 x)
polynomial with integer coefficients
16*x^5 - 20*x^3 + 5*x- Domain
Polynomial.Chebyshev.T R 5, every commutative ring R : Type- Input (polynomial in x)
ChebyshevT 5 x
Checked by Lean’s kernel: Monomial expansion of ChebyshevT 5
∀ (R : Type) [inst : CommRing R], Polynomial.Chebyshev.T R 5 = 16 * Polynomial.X ^ 5 - 20 * Polynomial.X ^ 3 + 5 * Polynomial.X
The certificate: 1 checked step
Monomial expansion of ChebyshevT 5
∀ (R : Type) [inst : CommRing R], Polynomial.Chebyshev.T R 5 = 16 * Polynomial.X ^ 5 - 20 * Polynomial.X ^ 3 + 5 * Polynomial.X
Possible Issues (1)
The degree is at most 80. Mathlib’s recurrence Polynomial.Chebyshev.U_add_two gives higher degrees from two lower ones:
#cas (ChebyshevU 81 x)
Error
ChebyshevU accepts degrees up to 80
See Also
ChebyshevT · LegendreP · HermiteHe · expand · N
