<<

Nine Chapters of Analytic Theory in Isabelle/HOL

Manuel Eberl Technische Universität München 12 September 2019 + + 58 Manuel Eberl Rodrigo Raya 15 library unformalised 173 18 using analytic methods

In this work: only multiplicative (primes, divisors, etc.) Much of the formalised material is not particularly analytic.

Some of these results have already been formalised by other people (Avigad, Harrison, Carneiro, . . . ) – but not in the context of a large library.

What is Analytic Number Theory? Studying the multiplicative and additive structure of the In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic.

Some of these results have already been formalised by other people (Avigad, Harrison, Carneiro, . . . ) – but not in the context of a large library.

What is Analytic Number Theory? Studying the multiplicative and additive structure of the integers using analytic methods Much of the formalised material is not particularly analytic.

Some of these results have already been formalised by other people (Avigad, Harrison, Carneiro, . . . ) – but not in the context of a large library.

What is Analytic Number Theory? Studying the multiplicative and additive structure of the integers using analytic methods

In this work: only multiplicative number theory (primes, divisors, etc.) Some of these results have already been formalised by other people (Avigad, Harrison, Carneiro, . . . ) – but not in the context of a large library.

What is Analytic Number Theory? Studying the multiplicative and additive structure of the integers using analytic methods

In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic. What is Analytic Number Theory? Studying the multiplicative and additive structure of the integers using analytic methods

In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic.

Some of these results have already been formalised by other people (Avigad, Harrison, Carneiro, . . . ) – but not in the context of a large library. − Euler’s totient ϕ and Carmichael’s λ − Divisor σx − Möbius’s µ − Liouville’s λ − Prime-counting functions: π(n), ϑ(n), ψ(n) • Dirichlet (both formal and analytic) • Multiplicative characters • Riemann’s ζ, Hurwitz’s ζ, Dirichlet’s L functions

Material

• Various number-theoretic functions (executable and with many properties proven): − Divisor function σx − Möbius’s µ − Liouville’s λ − Prime-counting functions: π(n), ϑ(n), ψ(n) • (both formal and analytic) • Multiplicative characters • Riemann’s ζ, Hurwitz’s ζ, Dirichlet’s L functions

Material

• Various number-theoretic functions (executable and with many properties proven): − Euler’s totient ϕ and Carmichael’s λ − Möbius’s µ − Liouville’s λ − Prime-counting functions: π(n), ϑ(n), ψ(n) • Dirichlet series (both formal and analytic) • Multiplicative characters • Riemann’s ζ, Hurwitz’s ζ, Dirichlet’s L functions

Material

• Various number-theoretic functions (executable and with many properties proven): − Euler’s totient ϕ and Carmichael’s λ − Divisor function σx − Liouville’s λ − Prime-counting functions: π(n), ϑ(n), ψ(n) • Dirichlet series (both formal and analytic) • Multiplicative characters • Riemann’s ζ, Hurwitz’s ζ, Dirichlet’s L functions

Material

• Various number-theoretic functions (executable and with many properties proven): − Euler’s totient ϕ and Carmichael’s λ − Divisor function σx − Möbius’s µ − Prime-counting functions: π(n), ϑ(n), ψ(n) • Dirichlet series (both formal and analytic) • Multiplicative characters • Riemann’s ζ, Hurwitz’s ζ, Dirichlet’s L functions

Material

• Various number-theoretic functions (executable and with many properties proven): − Euler’s totient ϕ and Carmichael’s λ − Divisor function σx − Möbius’s µ − Liouville’s λ • Dirichlet series (both formal and analytic) • Multiplicative characters • Riemann’s ζ, Hurwitz’s ζ, Dirichlet’s L functions

Material

• Various number-theoretic functions (executable and with many properties proven): − Euler’s totient ϕ and Carmichael’s λ − Divisor function σx − Möbius’s µ − Liouville’s λ − Prime-counting functions: π(n), ϑ(n), ψ(n) • Multiplicative characters • Riemann’s ζ, Hurwitz’s ζ, Dirichlet’s L functions

Material

• Various number-theoretic functions (executable and with many properties proven): − Euler’s totient ϕ and Carmichael’s λ − Divisor function σx − Möbius’s µ − Liouville’s λ − Prime-counting functions: π(n), ϑ(n), ψ(n) • Dirichlet series (both formal and analytic) • Riemann’s ζ, Hurwitz’s ζ, Dirichlet’s L functions

Material

• Various number-theoretic functions (executable and with many properties proven): − Euler’s totient ϕ and Carmichael’s λ − Divisor function σx − Möbius’s µ − Liouville’s λ − Prime-counting functions: π(n), ϑ(n), ψ(n) • Dirichlet series (both formal and analytic) • Multiplicative characters Material

• Various number-theoretic functions (executable and with many properties proven): − Euler’s totient ϕ and Carmichael’s λ − Divisor function σx − Möbius’s µ − Liouville’s λ − Prime-counting functions: π(n), ϑ(n), ψ(n) • Dirichlet series (both formal and analytic) • Multiplicative characters • Riemann’s ζ, Hurwitz’s ζ, Dirichlet’s L functions Dirichlet’s Theorem gcd(k,m) = 1 =⇒ {p | p prime ∧ p ≡ k (mod m)} is infinite Asymptotics ψ(n) • lcm(1,...,n) = e where ψ(x) ∼ x • On average, an n has log n + 2γ − 1 divisors. 2 • The set of square-free integers has density 6/π ≈ 60.8%. • The set of fractions p/q for p,q prime is dense in R. • 1 Prime harmonic series: ∑p≤x p = log log x + M + O(1/log x)

Interesting results Theorem |{p | p prime ∧ p ≤ x}| ∼ x log x Asymptotics ψ(n) • lcm(1,...,n) = e where ψ(x) ∼ x • On average, an integer n has log n + 2γ − 1 divisors. 2 • The set of square-free integers has density 6/π ≈ 60.8%. • The set of fractions p/q for p,q prime is dense in R. • 1 Prime harmonic series: ∑p≤x p = log log x + M + O(1/log x)

Interesting results |{p | p prime ∧ p ≤ x}| ∼ x log x Dirichlet’s Theorem gcd(k,m) = 1 =⇒ {p | p prime ∧ p ≡ k (mod m)} is infinite • On average, an integer n has log n + 2γ − 1 divisors. 2 • The set of square-free integers has density 6/π ≈ 60.8%. • The set of fractions p/q for p,q prime is dense in R. • 1 Prime harmonic series: ∑p≤x p = log log x + M + O(1/log x)

Interesting results Prime Number Theorem |{p | p prime ∧ p ≤ x}| ∼ x log x Dirichlet’s Theorem gcd(k,m) = 1 =⇒ {p | p prime ∧ p ≡ k (mod m)} is infinite Asymptotics ψ(n) • lcm(1,...,n) = e where ψ(x) ∼ x 2 • The set of square-free integers has density 6/π ≈ 60.8%. • The set of fractions p/q for p,q prime is dense in R. • 1 Prime harmonic series: ∑p≤x p = log log x + M + O(1/log x)

Interesting results Prime Number Theorem |{p | p prime ∧ p ≤ x}| ∼ x log x Dirichlet’s Theorem gcd(k,m) = 1 =⇒ {p | p prime ∧ p ≡ k (mod m)} is infinite Asymptotics ψ(n) • lcm(1,...,n) = e where ψ(x) ∼ x • On average, an integer n has log n + 2γ − 1 divisors. • The set of fractions p/q for p,q prime is dense in R. • 1 Prime harmonic series: ∑p≤x p = log log x + M + O(1/log x)

Interesting results Prime Number Theorem |{p | p prime ∧ p ≤ x}| ∼ x log x Dirichlet’s Theorem gcd(k,m) = 1 =⇒ {p | p prime ∧ p ≡ k (mod m)} is infinite Asymptotics ψ(n) • lcm(1,...,n) = e where ψ(x) ∼ x • On average, an integer n has log n + 2γ − 1 divisors. 2 • The set of square-free integers has density 6/π ≈ 60.8%. • 1 Prime harmonic series: ∑p≤x p = log log x + M + O(1/log x)

Interesting results Prime Number Theorem |{p | p prime ∧ p ≤ x}| ∼ x log x Dirichlet’s Theorem gcd(k,m) = 1 =⇒ {p | p prime ∧ p ≡ k (mod m)} is infinite Asymptotics ψ(n) • lcm(1,...,n) = e where ψ(x) ∼ x • On average, an integer n has log n + 2γ − 1 divisors. 2 • The set of square-free integers has density 6/π ≈ 60.8%. • The set of fractions p/q for p,q prime is dense in R. Interesting results Prime Number Theorem |{p | p prime ∧ p ≤ x}| ∼ x log x Dirichlet’s Theorem gcd(k,m) = 1 =⇒ {p | p prime ∧ p ≡ k (mod m)} is infinite Asymptotics ψ(n) • lcm(1,...,n) = e where ψ(x) ∼ x • On average, an integer n has log n + 2γ − 1 divisors. 2 • The set of square-free integers has density 6/π ≈ 60.8%. • The set of fractions p/q for p,q prime is dense in R. • 1 Prime harmonic series: ∑p≤x p = log log x + M + O(1/log x) • They form a commutative (plus many other operations: division, derivative, exponential, logarithm, etc.) • They have a deep connection to number-theoretic functions. • When they converge, the corresponding complex functions often contain useful information. • Transfer between the analytic world and the algebraic world is often possible (in both directions). • Even when they do not converge, they can be very useful.

Dirichlet series A Dirichlet series is a formal series of the form: ∞ a F (s) = n ∑ s n=1 n They are the ‘number-theoretic analogue’ of formal : • They have a deep connection to number-theoretic functions. • When they converge, the corresponding complex functions often contain useful information. • Transfer between the analytic world and the algebraic world is often possible (in both directions). • Even when they do not converge, they can be very useful.

Dirichlet series A Dirichlet series is a formal series of the form: ∞ a F (s) = n ∑ s n=1 n They are the ‘number-theoretic analogue’ of :

• They form a commutative ring (plus many other operations: division, derivative, exponential, logarithm, etc.) • When they converge, the corresponding complex functions often contain useful information. • Transfer between the analytic world and the algebraic world is often possible (in both directions). • Even when they do not converge, they can be very useful.

Dirichlet series A Dirichlet series is a formal series of the form: ∞ a F (s) = n ∑ s n=1 n They are the ‘number-theoretic analogue’ of formal power series:

• They form a commutative ring (plus many other operations: division, derivative, exponential, logarithm, etc.) • They have a deep connection to number-theoretic functions. • Transfer between the analytic world and the algebraic world is often possible (in both directions). • Even when they do not converge, they can be very useful.

Dirichlet series A Dirichlet series is a formal series of the form: ∞ a F (s) = n ∑ s n=1 n They are the ‘number-theoretic analogue’ of formal power series:

• They form a commutative ring (plus many other operations: division, derivative, exponential, logarithm, etc.) • They have a deep connection to number-theoretic functions. • When they converge, the corresponding complex functions often contain useful information. • Even when they do not converge, they can be very useful.

Dirichlet series A Dirichlet series is a formal series of the form: ∞ a F (s) = n ∑ s n=1 n They are the ‘number-theoretic analogue’ of formal power series:

• They form a commutative ring (plus many other operations: division, derivative, exponential, logarithm, etc.) • They have a deep connection to number-theoretic functions. • When they converge, the corresponding complex functions often contain useful information. • Transfer between the analytic world and the algebraic world is often possible (in both directions). Dirichlet series A Dirichlet series is a formal series of the form: ∞ a F (s) = n ∑ s n=1 n They are the ‘number-theoretic analogue’ of formal power series:

• They form a commutative ring (plus many other operations: division, derivative, exponential, logarithm, etc.) • They have a deep connection to number-theoretic functions. • When they converge, the corresponding complex functions often contain useful information. • Transfer between the analytic world and the algebraic world is often possible (in both directions). • Even when they do not converge, they can be very useful. Dirichlet L functions: ∞ χ(n) L(s, ) = χ ∑ s n=0 n Hurwitz ζ function: ∞ 1 (s,a) = ζ ∑ s n=0 (n + a) Definition only valid for Re(s) > 1; elsewhere by .

Luckily, analytic continuation for ζ(s,a) yields continuations for ζ(s) and L(s,χ) for free.

The ζ functions Riemann ζ function: ∞ 1 (s) = ζ ∑ s n=1 n Hurwitz ζ function: ∞ 1 (s,a) = ζ ∑ s n=0 (n + a) Definition only valid for Re(s) > 1; elsewhere by analytic continuation.

Luckily, analytic continuation for ζ(s,a) yields continuations for ζ(s) and L(s,χ) for free.

The ζ functions Riemann ζ function: ∞ 1 (s) = ζ ∑ s n=1 n Dirichlet L functions: ∞ χ(n) L(s, ) = χ ∑ s n=0 n Definition only valid for Re(s) > 1; elsewhere by analytic continuation.

Luckily, analytic continuation for ζ(s,a) yields continuations for ζ(s) and L(s,χ) for free.

The ζ functions Riemann ζ function: ∞ 1 (s) = ζ ∑ s n=1 n Dirichlet L functions: ∞ χ(n) L(s, ) = χ ∑ s n=0 n Hurwitz ζ function: ∞ 1 (s,a) = ζ ∑ s n=0 (n + a) Luckily, analytic continuation for ζ(s,a) yields continuations for ζ(s) and L(s,χ) for free.

The ζ functions Riemann ζ function: ∞ 1 (s) = ζ ∑ s n=1 n Dirichlet L functions: ∞ χ(n) L(s, ) = χ ∑ s n=0 n Hurwitz ζ function: ∞ 1 (s,a) = ζ ∑ s n=0 (n + a) Definition only valid for Re(s) > 1; elsewhere by analytic continuation. The ζ functions Riemann ζ function: ∞ 1 (s) = ζ ∑ s n=1 n Dirichlet L functions: ∞ χ(n) L(s, ) = χ ∑ s n=0 n Hurwitz ζ function: ∞ 1 (s,a) = ζ ∑ s n=0 (n + a) Definition only valid for Re(s) > 1; elsewhere by analytic continuation.

Luckily, analytic continuation for ζ(s,a) yields continuations for ζ(s) and L(s,χ) for free. • Reflection formula: ζ(1 − s) = 2(2π)−s cos(πs/2)Γ(s)ζ(s)

: 1 (s) = for Re(s) > 1 ζ ∏ −s p 1 − p

• Connection between Γ and ζ: Z ∞ xs−1e−ax Γ(s)ζ(a,s) = −x dx 0 1 − e

The ζ functions Many basic properties were proven:

• 2 1 1 ζ(2) = π /6, ζ(0) = −2, ζ(−1) = −12 • Euler product: 1 (s) = for Re(s) > 1 ζ ∏ −s p 1 − p

• Connection between Γ and ζ: Z ∞ xs−1e−ax Γ(s)ζ(a,s) = −x dx 0 1 − e

The ζ functions Many basic properties were proven:

• 2 1 1 ζ(2) = π /6, ζ(0) = −2, ζ(−1) = −12

• Reflection formula: ζ(1 − s) = 2(2π)−s cos(πs/2)Γ(s)ζ(s) • Connection between Γ and ζ: Z ∞ xs−1e−ax Γ(s)ζ(a,s) = −x dx 0 1 − e

The ζ functions Many basic properties were proven:

• 2 1 1 ζ(2) = π /6, ζ(0) = −2, ζ(−1) = −12

• Reflection formula: ζ(1 − s) = 2(2π)−s cos(πs/2)Γ(s)ζ(s)

• Euler product: 1 (s) = for Re(s) > 1 ζ ∏ −s p 1 − p The ζ functions Many basic properties were proven:

• 2 1 1 ζ(2) = π /6, ζ(0) = −2, ζ(−1) = −12

• Reflection formula: ζ(1 − s) = 2(2π)−s cos(πs/2)Γ(s)ζ(s)

• Euler product: 1 (s) = for Re(s) > 1 ζ ∏ −s p 1 − p

• Connection between Γ and ζ: Z ∞ xs−1e−ax Γ(s)ζ(a,s) = −x dx 0 1 − e The ζ functions Many basic properties were proven:

• 2 1 1 ζ(2) = π /6, ζ(0) = −2, ζ(−1) = −12

• Reflection formula: ζ(1 − s) = 2(2π)−s cos(πs/2)Γ(s)ζ(s)

• Euler product: 1 (s) = for Re(s) > 1 ζ ∏ −s p 1 − p

• Connection between Γ and ζ: Z ∞ xs−1e−ax Γ(s)ζ(a,s) = −x dx 0 1 − e sorry

Generalised : theorem GRH: assumes dcharacter m χ assumes s ∈/ R≤0 and Dirichlet_L m χ s = 0 shows Re s = 1/2 sorry

The ζ functions Riemann hypothesis can be stated: theorem RH: assumes Re s ∈ {1/2 < .. < 1} and zeta s = 0 shows Re s = 1/2 Generalised Riemann hypothesis: theorem GRH: assumes dcharacter m χ assumes s ∈/ R≤0 and Dirichlet_L m χ s = 0 shows Re s = 1/2 sorry

The ζ functions Riemann hypothesis can be stated: theorem RH: assumes Re s ∈ {1/2 < .. < 1} and zeta s = 0 shows Re s = 1/2 sorry The ζ functions Riemann hypothesis can be stated: theorem RH: assumes Re s ∈ {1/2 < .. < 1} and zeta s = 0 shows Re s = 1/2 sorry

Generalised Riemann hypothesis: theorem GRH: assumes dcharacter m χ assumes s ∈/ R≤0 and Dirichlet_L m χ s = 0 shows Re s = 1/2 sorry Proof: For Re(s) > 1: almost for free from Dirichlet series library For Re(s) = 1: • Suppose ζ(1 + it) = 0 for t ∈ R>0. • By symmetry, ζ(1 − it) = 0 as well. 2 • Let h(s) := ζ(s) ζ(s + it)ζ(s − it) and note that: 1. h is analytic everywhere (since the pole of each factor is cancelled by the zero of another factor). 2. The Dirichlet series of h(s) is non-negative (since the coefficients of log h(s) are non-negative by inspection) • By the Pringsheim–Landau Theorem, it then converges everywhere. −s + • This is clearly wrong, since even the subseries for 2 diverges for s → 0 .

Easily generalises to Dirichlet L-functions.

Non-vanishing of ζ Theorem: ζ(s) 6= 0 for Re(s) ≥ 1. For Re(s) = 1: • Suppose ζ(1 + it) = 0 for t ∈ R>0. • By symmetry, ζ(1 − it) = 0 as well. 2 • Let h(s) := ζ(s) ζ(s + it)ζ(s − it) and note that: 1. h is analytic everywhere (since the pole of each factor is cancelled by the zero of another factor). 2. The Dirichlet series of h(s) is non-negative (since the coefficients of log h(s) are non-negative by inspection) • By the Pringsheim–Landau Theorem, it then converges everywhere. −s + • This is clearly wrong, since even the subseries for 2 diverges for s → 0 .

Easily generalises to Dirichlet L-functions.

Non-vanishing of ζ Theorem: ζ(s) 6= 0 for Re(s) ≥ 1. Proof: For Re(s) > 1: almost for free from Dirichlet series library • Suppose ζ(1 + it) = 0 for t ∈ R>0. • By symmetry, ζ(1 − it) = 0 as well. 2 • Let h(s) := ζ(s) ζ(s + it)ζ(s − it) and note that: 1. h is analytic everywhere (since the pole of each factor is cancelled by the zero of another factor). 2. The Dirichlet series of h(s) is non-negative (since the coefficients of log h(s) are non-negative by inspection) • By the Pringsheim–Landau Theorem, it then converges everywhere. −s + • This is clearly wrong, since even the subseries for 2 diverges for s → 0 .

Easily generalises to Dirichlet L-functions.

Non-vanishing of ζ Theorem: ζ(s) 6= 0 for Re(s) ≥ 1. Proof: For Re(s) > 1: almost for free from Dirichlet series library For Re(s) = 1: • By symmetry, ζ(1 − it) = 0 as well. 2 • Let h(s) := ζ(s) ζ(s + it)ζ(s − it) and note that: 1. h is analytic everywhere (since the pole of each factor is cancelled by the zero of another factor). 2. The Dirichlet series of h(s) is non-negative (since the coefficients of log h(s) are non-negative by inspection) • By the Pringsheim–Landau Theorem, it then converges everywhere. −s + • This is clearly wrong, since even the subseries for 2 diverges for s → 0 .

Easily generalises to Dirichlet L-functions.

Non-vanishing of ζ Theorem: ζ(s) 6= 0 for Re(s) ≥ 1. Proof: For Re(s) > 1: almost for free from Dirichlet series library For Re(s) = 1: • Suppose ζ(1 + it) = 0 for t ∈ R>0. 2 • Let h(s) := ζ(s) ζ(s + it)ζ(s − it) and note that: 1. h is analytic everywhere (since the pole of each factor is cancelled by the zero of another factor). 2. The Dirichlet series of h(s) is non-negative (since the coefficients of log h(s) are non-negative by inspection) • By the Pringsheim–Landau Theorem, it then converges everywhere. −s + • This is clearly wrong, since even the subseries for 2 diverges for s → 0 .

Easily generalises to Dirichlet L-functions.

Non-vanishing of ζ Theorem: ζ(s) 6= 0 for Re(s) ≥ 1. Proof: For Re(s) > 1: almost for free from Dirichlet series library For Re(s) = 1: • Suppose ζ(1 + it) = 0 for t ∈ R>0. • By symmetry, ζ(1 − it) = 0 as well. 1. h is analytic everywhere (since the pole of each factor is cancelled by the zero of another factor). 2. The Dirichlet series of h(s) is non-negative (since the coefficients of log h(s) are non-negative by inspection) • By the Pringsheim–Landau Theorem, it then converges everywhere. −s + • This is clearly wrong, since even the subseries for 2 diverges for s → 0 .

Easily generalises to Dirichlet L-functions.

Non-vanishing of ζ Theorem: ζ(s) 6= 0 for Re(s) ≥ 1. Proof: For Re(s) > 1: almost for free from Dirichlet series library For Re(s) = 1: • Suppose ζ(1 + it) = 0 for t ∈ R>0. • By symmetry, ζ(1 − it) = 0 as well. 2 • Let h(s) := ζ(s) ζ(s + it)ζ(s − it) and note that: (since the pole of each factor is cancelled by the zero of another factor). 2. The Dirichlet series of h(s) is non-negative (since the coefficients of log h(s) are non-negative by inspection) • By the Pringsheim–Landau Theorem, it then converges everywhere. −s + • This is clearly wrong, since even the subseries for 2 diverges for s → 0 .

Easily generalises to Dirichlet L-functions.

Non-vanishing of ζ Theorem: ζ(s) 6= 0 for Re(s) ≥ 1. Proof: For Re(s) > 1: almost for free from Dirichlet series library For Re(s) = 1: • Suppose ζ(1 + it) = 0 for t ∈ R>0. • By symmetry, ζ(1 − it) = 0 as well. 2 • Let h(s) := ζ(s) ζ(s + it)ζ(s − it) and note that: 1. h is analytic everywhere 2. The Dirichlet series of h(s) is non-negative (since the coefficients of log h(s) are non-negative by inspection) • By the Pringsheim–Landau Theorem, it then converges everywhere. −s + • This is clearly wrong, since even the subseries for 2 diverges for s → 0 .

Easily generalises to Dirichlet L-functions.

Non-vanishing of ζ Theorem: ζ(s) 6= 0 for Re(s) ≥ 1. Proof: For Re(s) > 1: almost for free from Dirichlet series library For Re(s) = 1: • Suppose ζ(1 + it) = 0 for t ∈ R>0. • By symmetry, ζ(1 − it) = 0 as well. 2 • Let h(s) := ζ(s) ζ(s + it)ζ(s − it) and note that: 1. h is analytic everywhere (since the pole of each factor is cancelled by the zero of another factor). (since the coefficients of log h(s) are non-negative by inspection) • By the Pringsheim–Landau Theorem, it then converges everywhere. −s + • This is clearly wrong, since even the subseries for 2 diverges for s → 0 .

Easily generalises to Dirichlet L-functions.

Non-vanishing of ζ Theorem: ζ(s) 6= 0 for Re(s) ≥ 1. Proof: For Re(s) > 1: almost for free from Dirichlet series library For Re(s) = 1: • Suppose ζ(1 + it) = 0 for t ∈ R>0. • By symmetry, ζ(1 − it) = 0 as well. 2 • Let h(s) := ζ(s) ζ(s + it)ζ(s − it) and note that: 1. h is analytic everywhere (since the pole of each factor is cancelled by the zero of another factor). 2. The Dirichlet series of h(s) is non-negative • By the Pringsheim–Landau Theorem, it then converges everywhere. −s + • This is clearly wrong, since even the subseries for 2 diverges for s → 0 .

Easily generalises to Dirichlet L-functions.

Non-vanishing of ζ Theorem: ζ(s) 6= 0 for Re(s) ≥ 1. Proof: For Re(s) > 1: almost for free from Dirichlet series library For Re(s) = 1: • Suppose ζ(1 + it) = 0 for t ∈ R>0. • By symmetry, ζ(1 − it) = 0 as well. 2 • Let h(s) := ζ(s) ζ(s + it)ζ(s − it) and note that: 1. h is analytic everywhere (since the pole of each factor is cancelled by the zero of another factor). 2. The Dirichlet series of h(s) is non-negative (since the coefficients of log h(s) are non-negative by inspection) −s + • This is clearly wrong, since even the subseries for 2 diverges for s → 0 .

Easily generalises to Dirichlet L-functions.

Non-vanishing of ζ Theorem: ζ(s) 6= 0 for Re(s) ≥ 1. Proof: For Re(s) > 1: almost for free from Dirichlet series library For Re(s) = 1: • Suppose ζ(1 + it) = 0 for t ∈ R>0. • By symmetry, ζ(1 − it) = 0 as well. 2 • Let h(s) := ζ(s) ζ(s + it)ζ(s − it) and note that: 1. h is analytic everywhere (since the pole of each factor is cancelled by the zero of another factor). 2. The Dirichlet series of h(s) is non-negative (since the coefficients of log h(s) are non-negative by inspection) • By the Pringsheim–Landau Theorem, it then converges everywhere. Easily generalises to Dirichlet L-functions.

Non-vanishing of ζ Theorem: ζ(s) 6= 0 for Re(s) ≥ 1. Proof: For Re(s) > 1: almost for free from Dirichlet series library For Re(s) = 1: • Suppose ζ(1 + it) = 0 for t ∈ R>0. • By symmetry, ζ(1 − it) = 0 as well. 2 • Let h(s) := ζ(s) ζ(s + it)ζ(s − it) and note that: 1. h is analytic everywhere (since the pole of each factor is cancelled by the zero of another factor). 2. The Dirichlet series of h(s) is non-negative (since the coefficients of log h(s) are non-negative by inspection) • By the Pringsheim–Landau Theorem, it then converges everywhere. −s + • This is clearly wrong, since even the subseries for 2 diverges for s → 0 . Non-vanishing of ζ Theorem: ζ(s) 6= 0 for Re(s) ≥ 1. Proof: For Re(s) > 1: almost for free from Dirichlet series library For Re(s) = 1: • Suppose ζ(1 + it) = 0 for t ∈ R>0. • By symmetry, ζ(1 − it) = 0 as well. 2 • Let h(s) := ζ(s) ζ(s + it)ζ(s − it) and note that: 1. h is analytic everywhere (since the pole of each factor is cancelled by the zero of another factor). 2. The Dirichlet series of h(s) is non-negative (since the coefficients of log h(s) are non-negative by inspection) • By the Pringsheim–Landau Theorem, it then converges everywhere. −s + • This is clearly wrong, since even the subseries for 2 diverges for s → 0 .

Easily generalises to Dirichlet L-functions. Problems : I f (z)dz = indC(z0) · Res(f ,z0) C ∑ z0 is pole Problem: The horizontal line segments of C lie on the branch cut!

And we take a different branch of f on each side.

Problem: The Residue Theorem

2(N+1)iπ Showing Hurwitz’s formula was tricky. One problem in particular: 2Niπ

4iπ

2iπ ε

−2iπ

−4iπ

−2Niπ

−2(N+1)iπ Problem: The horizontal line segments of C lie on the branch cut!

And we take a different branch of f on each side.

Problem: The Residue Theorem

2(N+1)iπ Showing Hurwitz’s formula was tricky. One problem in particular: 2Niπ Residue Theorem: 4iπ I f (z)dz = indC(z0) · Res(f ,z0) 2iπ C ∑ z0 is pole ε

−2iπ

−4iπ

−2Niπ

−2(N+1)iπ And we take a different branch of f on each side.

Problem: The Residue Theorem

2(N+1)iπ Showing Hurwitz’s formula was tricky. One problem in particular: 2Niπ Residue Theorem: 4iπ I f (z)dz = indC(z0) · Res(f ,z0) 2iπ C ∑ z0 is pole ε Problem: The horizontal line segments of C lie on the branch cut! −2iπ

−4iπ

−2Niπ

−2(N+1)iπ Problem: The Residue Theorem

2(N+1)iπ Showing Hurwitz’s formula was tricky. One problem in particular: 2Niπ Residue Theorem: 4iπ I f (z)dz = indC(z0) · Res(f ,z0) 2iπ C ∑ z0 is pole ε Problem: The horizontal line segments of C lie on the branch cut! −2iπ And we take a different branch of f on −4i π each side.

−2Niπ

−2(N+1)iπ We are not really integrating over a function C → C, but over a Riemann surface.

But we don’t have Riemann surfaces in Isabelle (yet).

What can we do instead?

Problem: The Residue Theorem Mathematical justification: f is a multi-valued function.

Leonid 2 [CC BY-SA 3.0] But we don’t have Riemann surfaces in Isabelle (yet).

What can we do instead?

Problem: The Residue Theorem Mathematical justification: f is a multi-valued function.

We are not really integrating over a function C → C, but over a Riemann surface.

Leonid 2 [CC BY-SA 3.0] Problem: The Residue Theorem Mathematical justification: f is a multi-valued function.

We are not really integrating over a function C → C, but over a Riemann surface.

But we don’t have Riemann surfaces in Isabelle (yet).

What can we do instead?

Leonid 2 [CC BY-SA 3.0] • Only look at the upper half • Lower half follows by symmetry • Move the branch cut out of the way Now the Residue Theorem can easily be applied.

Other problems:

of the integration contour • Establishing of paths • Evaluating winding The last one was made much easier by Wenda Li’s winding-number tactic.

Problem: Residue Theorem

What can we do instead?

2(N+1)iπ

2Niπ

4iπ

2iπ ε • Lower half follows by symmetry • Move the branch cut out of the way Now the Residue Theorem can easily be applied.

Other problems:

• Geometry of the integration contour • Establishing homotopy of paths • Evaluating winding numbers The last one was made much easier by Wenda Li’s winding-number tactic.

Problem: Residue Theorem

What can we do instead?

• Only look at the upper half 2(N+1)iπ

2Niπ

4iπ

2iπ ε • Move the branch cut out of the way Now the Residue Theorem can easily be applied.

Other problems:

• Geometry of the integration contour • Establishing homotopy of paths • Evaluating winding numbers The last one was made much easier by Wenda Li’s winding-number tactic.

Problem: Residue Theorem

What can we do instead?

• Only look at the upper half 2(N+1)iπ • Lower half follows by symmetry 2Niπ

4iπ

2iπ ε Now the Residue Theorem can easily be applied.

Other problems:

• Geometry of the integration contour • Establishing homotopy of paths • Evaluating winding numbers The last one was made much easier by Wenda Li’s winding-number tactic.

Problem: Residue Theorem

What can we do instead?

• Only look at the upper half 2(N+1)iπ • Lower half follows by symmetry 2Niπ • Move the branch cut out of the way

4iπ

2iπ ε Other problems:

• Geometry of the integration contour • Establishing homotopy of paths • Evaluating winding numbers The last one was made much easier by Wenda Li’s winding-number tactic.

Problem: Residue Theorem

What can we do instead?

• Only look at the upper half 2(N+1)iπ • Lower half follows by symmetry 2Niπ • Move the branch cut out of the way Now the Residue Theorem can easily 4iπ be applied.

2iπ ε • Geometry of the integration contour • Establishing homotopy of paths • Evaluating winding numbers The last one was made much easier by Wenda Li’s winding-number tactic.

Problem: Residue Theorem

What can we do instead?

• Only look at the upper half 2(N+1)iπ • Lower half follows by symmetry 2Niπ • Move the branch cut out of the way Now the Residue Theorem can easily 4iπ be applied.

2iπ Other problems: ε • Establishing homotopy of paths • Evaluating winding numbers The last one was made much easier by Wenda Li’s winding-number tactic.

Problem: Residue Theorem

What can we do instead?

• Only look at the upper half 2(N+1)iπ • Lower half follows by symmetry 2Niπ • Move the branch cut out of the way Now the Residue Theorem can easily 4iπ be applied.

2iπ Other problems:

ε • Geometry of the integration contour • Evaluating winding numbers The last one was made much easier by Wenda Li’s winding-number tactic.

Problem: Residue Theorem

What can we do instead?

• Only look at the upper half 2(N+1)iπ • Lower half follows by symmetry 2Niπ • Move the branch cut out of the way Now the Residue Theorem can easily 4iπ be applied.

2iπ Other problems:

ε • Geometry of the integration contour • Establishing homotopy of paths The last one was made much easier by Wenda Li’s winding-number tactic.

Problem: Residue Theorem

What can we do instead?

• Only look at the upper half 2(N+1)iπ • Lower half follows by symmetry 2Niπ • Move the branch cut out of the way Now the Residue Theorem can easily 4iπ be applied.

2iπ Other problems:

ε • Geometry of the integration contour • Establishing homotopy of paths • Evaluating winding numbers Problem: Residue Theorem

What can we do instead?

• Only look at the upper half 2(N+1)iπ • Lower half follows by symmetry 2Niπ • Move the branch cut out of the way Now the Residue Theorem can easily 4iπ be applied.

2iπ Other problems:

ε • Geometry of the integration contour • Establishing homotopy of paths • Evaluating winding numbers The last one was made much easier by Wenda Li’s winding-number tactic. n1−s (n + 1)1−s − ∈ O(1) for n → ∞ 1 − s 1 − s Z ∞ s −ax s −ax x e x e −ax/2 −x dx exists because −x ∈ O(e ) ε 1 − e 1 − e

Just kidding: Our ‘real_asymp’ tactic eats problems like that for breakfast. (see ISSAC’19) ,

Problem: Ugly Limits

2C/R + C/N + 3M 3RM + < ε for suff. large N πR log N δπNδ Z ∞ s −ax s −ax x e x e −ax/2 −x dx exists because −x ∈ O(e ) ε 1 − e 1 − e

Just kidding: Our ‘real_asymp’ tactic eats problems like that for breakfast. (see ISSAC’19) ,

Problem: Ugly Limits

2C/R + C/N + 3M 3RM + < ε for suff. large N πR log N δπNδ n1−s (n + 1)1−s − ∈ O(1) for n → ∞ 1 − s 1 − s xse−ax because ∈ O(e−ax/2) 1 − e−x

Just kidding: Our ‘real_asymp’ tactic eats problems like that for breakfast. (see ISSAC’19) ,

Problem: Ugly Limits

2C/R + C/N + 3M 3RM + < ε for suff. large N πR log N δπNδ n1−s (n + 1)1−s − ∈ O(1) for n → ∞ 1 − s 1 − s Z ∞ xse−ax −x dx exists ε 1 − e Just kidding: Our ‘real_asymp’ tactic eats problems like that for breakfast. (see ISSAC’19) ,

Problem: Ugly Limits

2C/R + C/N + 3M 3RM + < ε for suff. large N πR log N δπNδ n1−s (n + 1)1−s − ∈ O(1) for n → ∞ 1 − s 1 − s Z ∞ s −ax s −ax x e x e −ax/2 −x dx exists because −x ∈ O(e ) ε 1 − e 1 − e Problem: Ugly Limits

2C/R + C/N + 3M 3RM + < ε for suff. large N πR log N δπNδ n1−s (n + 1)1−s − ∈ O(1) for n → ∞ 1 − s 1 − s Z ∞ s −ax s −ax x e x e −ax/2 −x dx exists because −x ∈ O(e ) ε 1 − e 1 − e

Just kidding: Our ‘real_asymp’ tactic eats problems like that for breakfast. (see ISSAC’19) , , i.e. −1 ζ0(s)/ζ(s) ∼ + O(1)(for s → 1) s − 1 So there exists some constant C for such that ζ0(s) − ζ0(s) − cζ(s) (s − 1)ζ(s) is analytic at s = 1.

Such arguments are still a bit tedious in Isabelle.

Problem: Pole Cancellation Part of Newman’s proof of PNT: ζ0(s)/ζ(s) has a simple pole at s = 1 with residue −1 So there exists some constant C for such that ζ0(s) − ζ0(s) − cζ(s) (s − 1)ζ(s) is analytic at s = 1.

Such arguments are still a bit tedious in Isabelle.

Problem: Pole Cancellation Part of Newman’s proof of PNT: ζ0(s)/ζ(s) has a simple pole at s = 1 with residue −1, i.e. −1 ζ0(s)/ζ(s) ∼ + O(1)(for s → 1) s − 1 Such arguments are still a bit tedious in Isabelle.

Problem: Pole Cancellation Part of Newman’s proof of PNT: ζ0(s)/ζ(s) has a simple pole at s = 1 with residue −1, i.e. −1 ζ0(s)/ζ(s) ∼ + O(1)(for s → 1) s − 1 So there exists some constant C for such that ζ0(s) − ζ0(s) − cζ(s) (s − 1)ζ(s) is analytic at s = 1. Problem: Pole Cancellation Part of Newman’s proof of PNT: ζ0(s)/ζ(s) has a simple pole at s = 1 with residue −1, i.e. −1 ζ0(s)/ζ(s) ∼ + O(1)(for s → 1) s − 1 So there exists some constant C for such that ζ0(s) − ζ0(s) − cζ(s) (s − 1)ζ(s) is analytic at s = 1.

Such arguments are still a bit tedious in Isabelle. • Many new results that had not been formalised elsewhere • Some nicer, more ‘high-level’ proofs for things already formalised • Formalisation was smooth and pleasant; no major problems • About 25,000 lines of Isabelle, spread over 5 AFP entries • Not only can it be done, but it can be done by a single person as a side project • Future, Work: Maybe the second book?

Conclusion

• Formalised most of the content of an entire undergraduate mathematics textbook on an advanced subject • Some nicer, more ‘high-level’ proofs for things already formalised • Formalisation was smooth and pleasant; no major problems • About 25,000 lines of Isabelle, spread over 5 AFP entries • Not only can it be done, but it can be done by a single person as a side project • Future, Work: Maybe the second book?

Conclusion

• Formalised most of the content of an entire undergraduate mathematics textbook on an advanced subject • Many new results that had not been formalised elsewhere • Formalisation was smooth and pleasant; no major problems • About 25,000 lines of Isabelle, spread over 5 AFP entries • Not only can it be done, but it can be done by a single person as a side project • Future, Work: Maybe the second book?

Conclusion

• Formalised most of the content of an entire undergraduate mathematics textbook on an advanced subject • Many new results that had not been formalised elsewhere • Some nicer, more ‘high-level’ proofs for things already formalised • About 25,000 lines of Isabelle, spread over 5 AFP entries • Not only can it be done, but it can be done by a single person as a side project • Future, Work: Maybe the second book?

Conclusion

• Formalised most of the content of an entire undergraduate mathematics textbook on an advanced subject • Many new results that had not been formalised elsewhere • Some nicer, more ‘high-level’ proofs for things already formalised • Formalisation was smooth and pleasant; no major problems • Not only can it be done, but it can be done by a single person as a side project • Future, Work: Maybe the second book?

Conclusion

• Formalised most of the content of an entire undergraduate mathematics textbook on an advanced subject • Many new results that had not been formalised elsewhere • Some nicer, more ‘high-level’ proofs for things already formalised • Formalisation was smooth and pleasant; no major problems • About 25,000 lines of Isabelle, spread over 5 AFP entries • Future Work: Maybe the second book?

Conclusion

• Formalised most of the content of an entire undergraduate mathematics textbook on an advanced subject • Many new results that had not been formalised elsewhere • Some nicer, more ‘high-level’ proofs for things already formalised • Formalisation was smooth and pleasant; no major problems • About 25,000 lines of Isabelle, spread over 5 AFP entries • Not only can it be done, but it can be done by a single person as a side project , Conclusion

• Formalised most of the content of an entire undergraduate mathematics textbook on an advanced subject • Many new results that had not been formalised elsewhere • Some nicer, more ‘high-level’ proofs for things already formalised • Formalisation was smooth and pleasant; no major problems • About 25,000 lines of Isabelle, spread over 5 AFP entries • Not only can it be done, but it can be done by a single person as a side project • Future, Work: Maybe the second book?