Function of #cas

HermiteH

The physicists’ Hermite polynomial Hn in monomials, proved at every real x, and its exact values at rational points.

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

There are two families of Hermite polynomials in common use, and HermiteH gives the physicists’ ones, Hn, with the convention of Mathematica’s HermiteH. Mathlib defines only the probabilists’ polynomials Hen, as Polynomial.hermite n, so the theorem cannot name Hn directly. It states Hn through them, as 2nHen(2x), and you will see those factors of 2 in every statement. HermiteHe gives Hen itself.

Details and Options

  • n is a natural number with n≤60, 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.
  • Hn(x)=2nHen(2x). For the printed polynomial p the theorem is ∀ x : ℝ, √2 ^ n * Polynomial.aeval (√2 * x) (Polynomial.hermite n) = p, by CAS.Analysis.SpecialFunctions.sqrt_two_pow_mul_aeval_hermite.
  • At a rational q the theorem is √2 ^ n * Polynomial.aeval (√2 * 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] (HermiteH n x) prints the same polynomial as #cas (HermiteH n x).
  • There are no options.

Examples (9)#

Basic Examples (1)

H4 in monomials, with the theorem at every real x:

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

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

Scope (4)

Degree 1 gives H1=2x:

In[2]:=
#cas (HermiteH 1 x)
Out[2]=

polynomial with integer coefficients

2*x
Domain
√2 ^ 1 Polynomial.hermite 1 (√2 x) (physicists'), x ∈ ℝ
Input (polynomial in x)
HermiteH 1 x

Checked by Lean’s kernel: Monomial expansion of HermiteH 1

∀ (x : ℝ), √2 ^ 1 * (Polynomial.aeval (√2 * x)) (Polynomial.hermite 1) = 2 * x
The certificate: 1 checked step
  1. Monomial expansion of HermiteH 1

    ∀ (x : ℝ), √2 ^ 1 * (Polynomial.aeval (√2 * x)) (Polynomial.hermite 1) = 2 * x

    Checked by Lean’s kernel


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

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

polynomial with integer coefficients

32x5−160x3+120x
32*x^5 - 160*x^3 + 120*x
Domain
√2 ^ 5 Polynomial.hermite 5 (√2 x) (physicists'), x ∈ ℝ
Input (polynomial in x)
HermiteH 5 x

Checked by Lean’s kernel: Monomial expansion of HermiteH 5

∀ (x : ℝ),
  √2 ^ 5 * (Polynomial.aeval (√2 * x)) (Polynomial.hermite 5) = 32 * x ^ 5 - 160 * x ^ 3 + 120 * x
The certificate: 1 checked step
  1. Monomial expansion of HermiteH 5

    ∀ (x : ℝ),
      √2 ^ 5 * (Polynomial.aeval (√2 * x)) (Polynomial.hermite 5) = 32 * x ^ 5 - 160 * x ^ 3 + 120 * 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] (HermiteH 3 (1/2))
Out[4]=

exact rational value and its first 10 significant digits, truncated

-5 = -5.000000000
Domain
HermiteH polynomial at a rational point

Checked by Lean’s kernel: Exact value and digits of HermiteH 3

√2 ^ 3 * (Polynomial.aeval (√2 * (1 / 2))) (Polynomial.hermite 3) = -5 ∧
  -(5000000000 + 1) / 10 ^ 9 < √2 ^ 3 * (Polynomial.aeval (√2 * (1 / 2))) (Polynomial.hermite 3) ∧
    √2 ^ 3 * (Polynomial.aeval (√2 * (1 / 2))) (Polynomial.hermite 3) ≤ -5000000000 / 10 ^ 9
The certificate: 1 checked step
  1. Exact value and digits of HermiteH 3

    √2 ^ 3 * (Polynomial.aeval (√2 * (1 / 2))) (Polynomial.hermite 3) = -5 ∧
      -(5000000000 + 1) / 10 ^ 9 < √2 ^ 3 * (Polynomial.aeval (√2 * (1 / 2))) (Polynomial.hermite 3) ∧
        √2 ^ 3 * (Polynomial.aeval (√2 * (1 / 2))) (Polynomial.hermite 3) ≤ -5000000000 / 10 ^ 9

    Checked by Lean’s kernel


With fewer digits than the value has, the report prints ≈, and the theorem bounds the value between −830 and −820:

In[5]:=
#cas [N 2] (HermiteH 6 2)
Out[5]=

exact rational value and its first 2 significant digits, truncated

−824≈−8.2×102
-824 ≈ -8.2 × 10^2
Domain
HermiteH polynomial at a rational point

Checked by Lean’s kernel: Exact value and digits of HermiteH 6

√2 ^ 6 * (Polynomial.aeval (√2 * 2)) (Polynomial.hermite 6) = -824 ∧
  -(82 + 1) * 10 ^ 1 < √2 ^ 6 * (Polynomial.aeval (√2 * 2)) (Polynomial.hermite 6) ∧
    √2 ^ 6 * (Polynomial.aeval (√2 * 2)) (Polynomial.hermite 6) ≤ -82 * 10 ^ 1
The certificate: 1 checked step
  1. Exact value and digits of HermiteH 6

    √2 ^ 6 * (Polynomial.aeval (√2 * 2)) (Polynomial.hermite 6) = -824 ∧
      -(82 + 1) * 10 ^ 1 < √2 ^ 6 * (Polynomial.aeval (√2 * 2)) (Polynomial.hermite 6) ∧
        √2 ^ 6 * (Polynomial.aeval (√2 * 2)) (Polynomial.hermite 6) ≤ -82 * 10 ^ 1

    Checked by Lean’s kernel

Applications (1)

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

In[6]:=
theorem hermiteH_four_at_zero
    (h : ∀ x : ℝ, √2 ^ 4 * Polynomial.aeval (√2 * x) (Polynomial.hermite 4) =
      16 * x ^ 4 - 48 * x ^ 2 + 12) :
    √2 ^ 4 * Polynomial.aeval (√2 * 0) (Polynomial.hermite 4) = 12 := by
  rw [h 0]
  norm_num

#print axioms hermiteH_four_at_zero
Out[6]=

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

Properties and Relations (1)

HermiteHe gives He4=x4−6x2+3. With H4(x)=4He4(2x)=4(4x4−12x2+3) it gives H4 above:

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

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

Possible Issues (2)

The degree is at most 60. #cas (HermiteHe n x) accepts degrees up to 80, and Hn(x)=2nHen(2x) relates the two:

In[8]:=
#cas (HermiteH 61 x)
Out[8]=

Error

HermiteH accepts degrees up to 60

The call takes two arguments, the degree and then the variable or the point:

In[9]:=
#cas (HermiteH 3)
Out[9]=

Error

HermiteH takes 2 arguments, as in `HermiteH n x`; the call has 1

See Also

HermiteHe · ChebyshevT · LegendreP · expand · N