Function of #cas
HermiteHe
The probabilists’ Hermite polynomial , Mathlib’s Polynomial.hermite n, in monomials, with its exact values at rational points.
#cas (HermiteHe n x)ℤ[X].#cas (HermiteHe n q)#cas [N d] (HermiteHe n q)HermiteHe gives the probabilists’ Hermite polynomials , the ones SymPy calls hermite_prob. They are Mathlib’s own Polynomial.hermite n, so the theorem is as plain as it can be: an equation of polynomials in ℤ[X], with nothing rescaled on the way. HermiteH gives the physicists’ polynomials .
Examples (8)#
Basic Examples (1)
in monomials, with the theorem in ℤ[X]:
#cas (HermiteHe 4 x)
polynomial with integer coefficients
x^4 - 6*x^2 + 3- Domain
Polynomial.hermite 4 (probabilists'), ℤ[X]- Input (polynomial in x)
HermiteHe 4 x
Checked by Lean’s kernel: Monomial expansion of HermiteHe 4
Polynomial.hermite 4 = Polynomial.X ^ 4 - 6 * Polynomial.X ^ 2 + 3
The certificate: 1 checked step
Monomial expansion of HermiteHe 4
Polynomial.hermite 4 = Polynomial.X ^ 4 - 6 * Polynomial.X ^ 2 + 3
Scope (4)
The variable need not be x:
#cas (HermiteHe 3 t)
polynomial with integer coefficients
t^3 - 3*t- Domain
Polynomial.hermite 3 (probabilists'), ℤ[X]- Input (polynomial in t)
HermiteHe 3 t
Checked by Lean’s kernel: Monomial expansion of HermiteHe 3
Polynomial.hermite 3 = Polynomial.X ^ 3 - 3 * Polynomial.X
The certificate: 1 checked step
Monomial expansion of HermiteHe 3
Polynomial.hermite 3 = Polynomial.X ^ 3 - 3 * Polynomial.X
#cas [expand] prints the same polynomial as #cas alone:
#cas [expand] (HermiteHe 3 x)
polynomial with integer coefficients
x^3 - 3*x- Domain
Polynomial.hermite 3 (probabilists'), ℤ[X]- Input (polynomial in x)
HermiteHe 3 x
Checked by Lean’s kernel: Monomial expansion of HermiteHe 3
Polynomial.hermite 3 = Polynomial.X ^ 3 - 3 * Polynomial.X
The certificate: 1 checked step
Monomial expansion of HermiteHe 3
Polynomial.hermite 3 = Polynomial.X ^ 3 - 3 * Polynomial.X
At a rational point the call gives the exact value, and [N d] adds its first digits. Here they are exact:
#cas [N 10] (HermiteHe 3 2)
exact rational value and its first 10 significant digits, truncated
2 = 2.000000000- Domain
HermiteHe polynomial at a rational point
Checked by Lean’s kernel: Exact value and digits of HermiteHe 3
(Polynomial.aeval 2) (Polynomial.hermite 3) = 2 ∧ 2000000000 / 10 ^ 9 ≤ (Polynomial.aeval 2) (Polynomial.hermite 3) ∧ (Polynomial.aeval 2) (Polynomial.hermite 3) < (2000000000 + 1) / 10 ^ 9
The certificate: 1 checked step
Exact value and digits of HermiteHe 3
(Polynomial.aeval 2) (Polynomial.hermite 3) = 2 ∧ 2000000000 / 10 ^ 9 ≤ (Polynomial.aeval 2) (Polynomial.hermite 3) ∧ (Polynomial.aeval 2) (Polynomial.hermite 3) < (2000000000 + 1) / 10 ^ 9
is odd, so . Significant digits start at the first nonzero digit, and has none, so the report prints the exact value alone:
#cas [N 10] (HermiteHe 3 0)
exact rational value
0- Domain
HermiteHe polynomial at a rational point
Checked by Lean’s kernel: Exact value of HermiteHe 3
(Polynomial.aeval 0) (Polynomial.hermite 3) = 0
The certificate: 1 checked step
Exact value of HermiteHe 3
(Polynomial.aeval 0) (Polynomial.hermite 3) = 0
Applications (1)
A proof can take the printed theorem as a hypothesis and evaluate it, here at . Only the three standard axioms are used:
theorem hermiteHe_four_at_one (h : Polynomial.hermite 4 = Polynomial.X ^ 4 - 6 * Polynomial.X ^ 2 + 3) : (Polynomial.hermite 4).eval 1 = -2 := by rw [h] norm_num #print axioms hermiteHe_four_at_one
hermiteHe_four_at_one depends on the axioms propext, Classical.choice, Quot.sound.
Properties and Relations (1)
The physicists’ polynomials of HermiteH are . For this is :
#cas (HermiteH 4 x)
polynomial with integer coefficients
16*x^4 - 48*x^2 + 12- Domain
√2 ^ 4 Polynomial.hermite 4 (√2 x) (physicists'), x ∈ ℝ- Input (polynomial in x)
HermiteH 4 x
Checked by Lean’s kernel: Monomial expansion of HermiteH 4
∀ (x : ℝ), √2 ^ 4 * (Polynomial.aeval (√2 * x)) (Polynomial.hermite 4) = 16 * x ^ 4 - 48 * x ^ 2 + 12
The certificate: 1 checked step
Monomial expansion of HermiteH 4
∀ (x : ℝ), √2 ^ 4 * (Polynomial.aeval (√2 * x)) (Polynomial.hermite 4) = 16 * x ^ 4 - 48 * x ^ 2 + 12
Possible Issues (1)
The degree is at most 80. Mathlib’s recurrence Polynomial.hermite_succ gives higher degrees from lower ones:
#cas (HermiteHe 81 x)
Error
HermiteHe accepts degrees up to 80
See Also
HermiteH · ChebyshevT · LegendreP · expand · N
