Function of #cas

HermiteHe

The probabilists’ Hermite polynomial Hen, Mathlib’s Polynomial.hermite n, in monomials, with its exact values at rational points.

#cas (HermiteHe n x)
gives the probabilists’ Hermite polynomial Hen in the variable x, in monomials with integer coefficients, and proves the expansion in ℤ[X].
#cas (HermiteHe n q)
gives the exact value of Hen at the rational number q and proves it.
#cas [N d] (HermiteHe n q)
gives the exact value of Hen at q with its first d significant digits, truncated toward zero, and proves their decimal bounds.

HermiteHe gives the probabilists’ Hermite polynomials Hen, 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 Hn.

Details and Options

  • n is a natural number with n≤80, a literal or a closed integer expression.
  • The second argument is a variable or a rational number. The polynomial is written in the variable, which may have any name other than pi, π, Pi, e and E.
  • For the printed polynomial p the theorem is Polynomial.hermite n = p in ℤ[X], with p written in Polynomial.X, by CAS.Analysis.SpecialFunctions.hermite_eq_intPoly, proved from Mathlib’s recurrence Polynomial.hermite_succ.
  • At a rational q the theorem is Polynomial.aeval q (Polynomial.hermite n) = v. With [N d] it adds the first d significant digits of v, truncated toward zero, and their decimal bounds. The report prints v = digits when the digits are exact and v ≈ digits otherwise.
  • With [N d], 1≤d≤2000, as for N.
  • #cas [expand] (HermiteHe n x) prints the same polynomial as #cas (HermiteHe n x).
  • There are no options.

Examples (8)#

Basic Examples (1)

He4 in monomials, with the theorem in ℤ[X]:

In[1]:=
#cas (HermiteHe 4 x)
Out[1]=

polynomial with integer coefficients

x4−6x2+3
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
  1. Monomial expansion of HermiteHe 4

    Polynomial.hermite 4 = Polynomial.X ^ 4 - 6 * Polynomial.X ^ 2 + 3

    Checked by Lean’s kernel

Scope (4)

The variable need not be x:

In[2]:=
#cas (HermiteHe 3 t)
Out[2]=

polynomial with integer coefficients

t3−3t
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
  1. Monomial expansion of HermiteHe 3

    Polynomial.hermite 3 = Polynomial.X ^ 3 - 3 * Polynomial.X

    Checked by Lean’s kernel


#cas [expand] prints the same polynomial as #cas alone:

In[3]:=
#cas [expand] (HermiteHe 3 x)
Out[3]=

polynomial with integer coefficients

x3−3x
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
  1. Monomial expansion of HermiteHe 3

    Polynomial.hermite 3 = Polynomial.X ^ 3 - 3 * Polynomial.X

    Checked by Lean’s kernel


At a rational point the call gives the exact value, and [N d] adds its first digits. Here they are exact:

In[4]:=
#cas [N 10] (HermiteHe 3 2)
Out[4]=

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
  1. 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

    Checked by Lean’s kernel


He3=x3−3x is odd, so He3(0)=0. Significant digits start at the first nonzero digit, and 0 has none, so the report prints the exact value alone:

In[5]:=
#cas [N 10] (HermiteHe 3 0)
Out[5]=

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
  1. Exact value of HermiteHe 3

    (Polynomial.aeval 0) (Polynomial.hermite 3) = 0

    Checked by Lean’s kernel

Applications (1)

A proof can take the printed theorem as a hypothesis and evaluate it, here at x=1. Only the three standard axioms are used:

In[6]:=
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
Out[6]=

hermiteHe_four_at_one depends on the axioms propext, Classical.choice, Quot.sound.

Properties and Relations (1)

The physicists’ polynomials of HermiteH are Hn(x)=2nHen(2x). For n=4 this is 4He4(2x)=4(4x4−12x2+3):

In[7]:=
#cas (HermiteH 4 x)
Out[7]=

polynomial with integer coefficients

16x4−48x2+12
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
  1. Monomial expansion of HermiteH 4

    ∀ (x : ℝ),
      √2 ^ 4 * (Polynomial.aeval (√2 * x)) (Polynomial.hermite 4) = 16 * x ^ 4 - 48 * x ^ 2 + 12

    Checked by Lean’s kernel

Possible Issues (1)

The degree is at most 80. Mathlib’s recurrence Polynomial.hermite_succ gives higher degrees from lower ones:

In[8]:=
#cas (HermiteHe 81 x)
Out[8]=

Error

HermiteHe accepts degrees up to 80

See Also

HermiteH · ChebyshevT · LegendreP · expand · N