Function of #cas
zeta
Exact values of the Riemann zeta function at even positive and nonpositive integers, with a theorem about Mathlib’s riemannZeta.
#cas (zeta s)riemannZeta s in ℂ.zeta gives exact values of the Riemann zeta function at the even positive integers and at the nonpositive integers. At an even positive integer the value is a rational multiple of , as in Euler’s , and at a nonpositive integer it is rational. Both come from Bernoulli numbers that the kernel evaluates. The call has no formula for the odd integers from 3 on, and refuses them.
Examples (11)#
Basic Examples (2)
Euler’s value of , the sum of the reciprocal squares:
#cas (zeta 2)
exact value of ζ
pi^2/6- Domain
ℂ (Mathlib's riemannZeta)- Input (even positive integer)
s = 2
Checked by Lean’s kernel: ζ(2k) by Bernoulli numbers (riemannZeta_two_mul_nat)
riemannZeta 2 = ↑Real.pi ^ 2 / 6
The certificate: 1 checked step
ζ(2k) by Bernoulli numbers (riemannZeta_two_mul_nat)
riemannZeta 2 = ↑Real.pi ^ 2 / 6
At a negative integer the value is rational:
#cas (zeta (-1))
exact value of ζ
-1/12- Domain
ℂ (Mathlib's riemannZeta)- Input (nonpositive integer)
s = -1
Checked by Lean’s kernel: ζ(-k) by Bernoulli numbers (riemannZeta_neg_nat_eq_bernoulli)
riemannZeta (-1) = -(1 / 12)
The certificate: 1 checked step
ζ(-k) by Bernoulli numbers (riemannZeta_neg_nat_eq_bernoulli)
riemannZeta (-1) = -(1 / 12)
Scope (3)
Larger even values bring in Bernoulli numbers of higher index. The 691 in is the numerator of :
#cas (zeta 12)
exact value of ζ
691*pi^12/638512875- Domain
ℂ (Mathlib's riemannZeta)- Input (even positive integer)
s = 12
Checked by Lean’s kernel: ζ(2k) by Bernoulli numbers (riemannZeta_two_mul_nat)
riemannZeta 12 = 691 * ↑Real.pi ^ 12 / 638512875
The certificate: 1 checked step
ζ(2k) by Bernoulli numbers (riemannZeta_two_mul_nat)
riemannZeta 12 = 691 * ↑Real.pi ^ 12 / 638512875
The value at 0:
#cas (zeta 0)
exact value of ζ
-1/2- Domain
ℂ (Mathlib's riemannZeta)- Input (nonpositive integer)
s = 0
Checked by Lean’s kernel: ζ(-k) by Bernoulli numbers (riemannZeta_neg_nat_eq_bernoulli)
riemannZeta 0 = -(1 / 2)
The certificate: 1 checked step
ζ(-k) by Bernoulli numbers (riemannZeta_neg_nat_eq_bernoulli)
riemannZeta 0 = -(1 / 2)
The negative even integers are the trivial zeros of :
#cas (zeta (-2))
exact value of ζ
0- Domain
ℂ (Mathlib's riemannZeta)- Input (nonpositive integer)
s = -2
Checked by Lean’s kernel: ζ(-k) by Bernoulli numbers (riemannZeta_neg_nat_eq_bernoulli)
riemannZeta (-2) = 0
The certificate: 1 checked step
ζ(-k) by Bernoulli numbers (riemannZeta_neg_nat_eq_bernoulli)
riemannZeta (-2) = 0
Applications (1)
A proof can take the printed theorem as a hypothesis and use it. Only the three standard axioms are used:
theorem six_mul_zeta_two (h : riemannZeta 2 = (Real.pi : ℂ) ^ 2 / 6) : 6 * riemannZeta 2 = (Real.pi : ℂ) ^ 2 := by rw [h] ring #print axioms six_mul_zeta_two
six_mul_zeta_two depends on the axioms propext, Classical.choice, Quot.sound.
Properties and Relations (2)
is the sum of the series , and sum proves the sum as a HasSum:
#cas [sum k 1 ∞] (1/k^2)
sum of the series (ζ value)
pi^2/6- Domain
k ∈ ℕ, k ≥ 1- Input (summand)
1/k^2
Checked by Lean’s kernel: Sum of the series by hasSum_zeta_nat
HasSum (fun k ↦ 1 / ↑(k + 1) ^ 2) (Real.pi ^ 2 / 6)
The certificate: 1 checked step
Sum of the series by hasSum_zeta_nat
HasSum (fun k ↦ 1 / ↑(k + 1) ^ 2) (Real.pi ^ 2 / 6)
Euler’s formula ties the even values to the Bernoulli numbers. With it gives :
#cas (zeta 4)
exact value of ζ
pi^4/90- Domain
ℂ (Mathlib's riemannZeta)- Input (even positive integer)
s = 4
Checked by Lean’s kernel: ζ(2k) by Bernoulli numbers (riemannZeta_two_mul_nat)
riemannZeta 4 = ↑Real.pi ^ 4 / 90
The certificate: 1 checked step
ζ(2k) by Bernoulli numbers (riemannZeta_two_mul_nat)
riemannZeta 4 = ↑Real.pi ^ 4 / 90
#cas (BernoulliB 4)
Bernoulli number
-1/30- Domain
ℚ (Mathlib's bernoulli, B₁ = -1/2)- Input (natural number)
4
Checked by Lean’s kernel: Bernoulli number from the kernel-evaluated numerators
bernoulli 4 = -(1 / 30)
The certificate: 1 checked step
Bernoulli number from the kernel-evaluated numerators
bernoulli 4 = -(1 / 30)
Possible Issues (3)
At the odd integers the call has no formula and refuses:
#cas (zeta 3)
Error
zeta: unsupported formula at the odd integer `3`; exact values are computed at even positive and at nonpositive integers
is the pole. Mathlib’s riemannZeta 1 is a convention, not a value of the series, and the call does not report it:
#cas (zeta 1)
Error
zeta: s = 1 is the pole of ζ; Mathlib's riemannZeta 1 is a convention, not a value of the series, and is not reported
The argument is an integer:
#cas (zeta (1/2))
Error
zeta: exact values are computed at integers
See Also
BernoulliB · sum · gamma
