Function of #cas
BesselJ
Proved decimal enclosures of Mathlib’s Bessel function Complex.besselJ at an integer order and a rational point.
#cas [N d] (BesselJ n q)BesselJ gives you digits of the Bessel function of the first kind, and a proof that they are right. The function is Mathlib’s Complex.besselJ. The answer is a decimal interval of width at most , with a theorem that is a real number inside it. The call computes enclosures only, so you always say how many digits you want with [N d].
Examples (10)#
Basic Examples (1)
Ten proved digits of :
#cas [N 10] (BesselJ 0 1)
decimal enclosure of width at most 10^-10, with 8 terms of the series
[0.76519768655, 0.76519768656]- Domain
Bessel function J_n at a rational point
Checked by Lean’s kernel: Enclosure of BesselJ 0 1
∃ r, Complex.besselJ ↑0 ↑1 = ↑r ∧ ↑(15303953731 / 20000000000) ≤ r ∧ r ≤ ↑(4782485541 / 6250000000) ∧ ↑(4782485541 / 6250000000) - ↑(15303953731 / 20000000000) ≤ 1 / 10 ^ 10
The certificate: 1 checked step
Enclosure of BesselJ 0 1
∃ r, Complex.besselJ ↑0 ↑1 = ↑r ∧ ↑(15303953731 / 20000000000) ≤ r ∧ r ≤ ↑(4782485541 / 6250000000) ∧ ↑(4782485541 / 6250000000) - ↑(15303953731 / 20000000000) ≤ 1 / 10 ^ 10
Scope (3)
A higher order at a larger point:
#cas [N 10] (BesselJ 2 10)
decimal enclosure of width at most 10^-10, with 22 terms of the series
[0.25463031368, 0.25463031369]- Domain
Bessel function J_n at a rational point
Checked by Lean’s kernel: Enclosure of BesselJ 2 10
∃ r, Complex.besselJ ↑2 ↑10 = ↑r ∧ ↑(3182878921 / 12500000000) ≤ r ∧ r ≤ ↑(25463031369 / 100000000000) ∧ ↑(25463031369 / 100000000000) - ↑(3182878921 / 12500000000) ≤ 1 / 10 ^ 10
The certificate: 1 checked step
Enclosure of BesselJ 2 10
∃ r, Complex.besselJ ↑2 ↑10 = ↑r ∧ ↑(3182878921 / 12500000000) ≤ r ∧ r ≤ ↑(25463031369 / 100000000000) ∧ ↑(25463031369 / 100000000000) - ↑(3182878921 / 12500000000) ≤ 1 / 10 ^ 10
A negative rational point:
#cas [N 20] (BesselJ 1 (-7/3))
decimal enclosure of width at most 10^-20, with 15 terms of the series
[-0.533700789836125818642, -0.533700789836125818641]- Domain
Bessel function J_n at a rational point
Checked by Lean’s kernel: Enclosure of BesselJ 1 -7/3
∃ r, Complex.besselJ ↑1 ↑(-(7 / 3)) = ↑r ∧ ↑(-(266850394918062909321 / 500000000000000000000)) ≤ r ∧ r ≤ ↑(-(533700789836125818641 / 1000000000000000000000)) ∧ ↑(-(533700789836125818641 / 1000000000000000000000)) - ↑(-(266850394918062909321 / 500000000000000000000)) ≤ 1 / 10 ^ 20
The certificate: 1 checked step
Enclosure of BesselJ 1 -7/3
∃ r, Complex.besselJ ↑1 ↑(-(7 / 3)) = ↑r ∧ ↑(-(266850394918062909321 / 500000000000000000000)) ≤ r ∧ r ≤ ↑(-(533700789836125818641 / 1000000000000000000000)) ∧ ↑(-(533700789836125818641 / 1000000000000000000000)) - ↑(-(266850394918062909321 / 500000000000000000000)) ≤ 1 / 10 ^ 20
At 0 the enclosure is a point, and the report prints the exact value :
#cas [N 5] (BesselJ 0 0)
exact value
1- Domain
Bessel function J_n at a rational point
Checked by Lean’s kernel: Enclosure of BesselJ 0 0
∃ r, Complex.besselJ ↑0 ↑0 = ↑r ∧ ↑1 ≤ r ∧ r ≤ ↑1 ∧ ↑1 - ↑1 ≤ 1 / 10 ^ 5
The certificate: 1 checked step
Enclosure of BesselJ 0 0
∃ r, Complex.besselJ ↑0 ↑0 = ↑r ∧ ↑1 ≤ r ∧ r ≤ ↑1 ∧ ↑1 - ↑1 ≤ 1 / 10 ^ 5
Applications (1)
A proof can take an enclosure as a hypothesis, here a coarser one than the printed interval, and show that :
theorem besselJ_zero_one_pos (h : ∃ r : ℝ, Complex.besselJ (0 : ℂ) (1 : ℂ) = r ∧ 3 / 4 ≤ r ∧ r ≤ 4 / 5) : ∃ r : ℝ, Complex.besselJ (0 : ℂ) (1 : ℂ) = r ∧ 0 < r := by obtain ⟨r, hr, hlo, -⟩ := h exact ⟨r, hr, by linarith⟩ #print axioms besselJ_zero_one_pos
besselJ_zero_one_pos depends on the axioms propext, Classical.choice, Quot.sound.
Properties and Relations (1)
A negative order uses , so is positive and is negative:
#cas [N 5] (BesselJ (-2) (1/2))
decimal enclosure of width at most 10^-5, with 3 terms of the series
[0.030604, 0.030605]- Domain
Bessel function J_n at a rational point
Checked by Lean’s kernel: Enclosure of BesselJ -2 1/2
∃ r, Complex.besselJ ↑(-2) ↑(1 / 2) = ↑r ∧ ↑(7651 / 250000) ≤ r ∧ r ≤ ↑(6121 / 200000) ∧ ↑(6121 / 200000) - ↑(7651 / 250000) ≤ 1 / 10 ^ 5
The certificate: 1 checked step
Enclosure of BesselJ -2 1/2
∃ r, Complex.besselJ ↑(-2) ↑(1 / 2) = ↑r ∧ ↑(7651 / 250000) ≤ r ∧ r ≤ ↑(6121 / 200000) ∧ ↑(6121 / 200000) - ↑(7651 / 250000) ≤ 1 / 10 ^ 5
#cas [N 5] (BesselJ (-3) (1/2))
decimal enclosure of width at most 10^-5, with 3 terms of the series
[-0.002564, -0.002563]- Domain
Bessel function J_n at a rational point
Checked by Lean’s kernel: Enclosure of BesselJ -3 1/2
∃ r, Complex.besselJ ↑(-3) ↑(1 / 2) = ↑r ∧ ↑(-(641 / 250000)) ≤ r ∧ r ≤ ↑(-(2563 / 1000000)) ∧ ↑(-(2563 / 1000000)) - ↑(-(641 / 250000)) ≤ 1 / 10 ^ 5
The certificate: 1 checked step
Enclosure of BesselJ -3 1/2
∃ r, Complex.besselJ ↑(-3) ↑(1 / 2) = ↑r ∧ ↑(-(641 / 250000)) ≤ r ∧ r ≤ ↑(-(2563 / 1000000)) ∧ ↑(-(2563 / 1000000)) - ↑(-(641 / 250000)) ≤ 1 / 10 ^ 5
Possible Issues (3)
#cas gives no exact value of BesselJ, and the message points to [N d]:
#cas (BesselJ 0 1)
Error
`#cas` computes no exact value of `BesselJ n x`; `#cas [N d] (BesselJ n x)` gives its digits
Mathlib defines Complex.besselJ at every complex order, but the series check is written for integer orders:
#cas [N 5] (BesselJ (1/2) 1)
Error
BesselJ accepts integer orders
The point is a rational with and a denominator of at most 1000:
#cas [N 5] (BesselJ 0 51)
Error
BesselJ accepts rational points with |q| ≤ 50 and a denominator of at most 1000
Neat Examples (1)
Thirty decimals of , at the end of the range, from 97 terms of the series:
#cas [N 30] (BesselJ 0 50)
decimal enclosure of width at most 10^-30, with 97 terms of the series
[0.0558123276692518150047504785294, 0.0558123276692518150047504785295]- Domain
Bessel function J_n at a rational point
Checked by Lean’s kernel: Enclosure of BesselJ 0 50
∃ r, Complex.besselJ ↑0 ↑50 = ↑r ∧ ↑(279061638346259075023752392647 / 5000000000000000000000000000000) ≤ r ∧ r ≤ ↑(111624655338503630009500957059 / 2000000000000000000000000000000) ∧ ↑(111624655338503630009500957059 / 2000000000000000000000000000000) - ↑(279061638346259075023752392647 / 5000000000000000000000000000000) ≤ 1 / 10 ^ 30
The certificate: 1 checked step
Enclosure of BesselJ 0 50
∃ r, Complex.besselJ ↑0 ↑50 = ↑r ∧ ↑(279061638346259075023752392647 / 5000000000000000000000000000000) ≤ r ∧ r ≤ ↑(111624655338503630009500957059 / 2000000000000000000000000000000) ∧ ↑(111624655338503630009500957059 / 2000000000000000000000000000000) - ↑(279061638346259075023752392647 / 5000000000000000000000000000000) ≤ 1 / 10 ^ 30
