91
Nine Chapters of Analytic Number Theory in Isabelle/HOL Manuel Eberl Technische Universität München 12 September 2019

Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

  • Upload
    others

  • View
    5

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Nine Chapters of Analytic Number Theoryin Isabelle/HOL

Manuel EberlTechnische Universität München12 September 2019

Page 2: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

+

Page 3: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

+

Page 4: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Manuel Eberl

Rodrigo Raya

library

unformalised173 18

15

58

Page 5: Nine Chapters of Analytic Number Theory [2mm] in …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.

Page 6: Nine Chapters of Analytic Number Theory [2mm] in …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 integersusing 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.

Page 7: Nine Chapters of Analytic Number Theory [2mm] in …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 integersusing 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.

Page 8: Nine Chapters of Analytic Number Theory [2mm] in …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 integersusing 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.

Page 9: Nine Chapters of Analytic Number Theory [2mm] in …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 integersusing 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.

Page 10: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

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

Page 11: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

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

Page 12: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

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

Page 13: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

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

Page 14: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

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

Page 15: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

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

Page 16: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

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

Page 17: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

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

Page 18: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

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

Page 19: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Interesting resultsPrime 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• lcm(1, . . . ,n) = eψ(n) where ψ(x) ∼ x• On average, an integer n has log n + 2γ− 1 divisors.• The set of square-free integers has density 6/π2 ≈ 60.8%.• The set of fractions p/q for p,q prime is dense in R.• Prime harmonic series: ∑p≤x

1p = log log x + M + O(1/log x)

Page 20: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Interesting resultsPrime 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• lcm(1, . . . ,n) = eψ(n) where ψ(x) ∼ x• On average, an integer n has log n + 2γ− 1 divisors.• The set of square-free integers has density 6/π2 ≈ 60.8%.• The set of fractions p/q for p,q prime is dense in R.• Prime harmonic series: ∑p≤x

1p = log log x + M + O(1/log x)

Page 21: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Interesting resultsPrime 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• lcm(1, . . . ,n) = eψ(n) where ψ(x) ∼ x

• On average, an integer n has log n + 2γ− 1 divisors.• The set of square-free integers has density 6/π2 ≈ 60.8%.• The set of fractions p/q for p,q prime is dense in R.• Prime harmonic series: ∑p≤x

1p = log log x + M + O(1/log x)

Page 22: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Interesting resultsPrime 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• lcm(1, . . . ,n) = eψ(n) where ψ(x) ∼ x• On average, an integer n has log n + 2γ− 1 divisors.

• The set of square-free integers has density 6/π2 ≈ 60.8%.• The set of fractions p/q for p,q prime is dense in R.• Prime harmonic series: ∑p≤x

1p = log log x + M + O(1/log x)

Page 23: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Interesting resultsPrime 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• lcm(1, . . . ,n) = eψ(n) where ψ(x) ∼ x• On average, an integer n has log n + 2γ− 1 divisors.• The set of square-free integers has density 6/π2 ≈ 60.8%.

• The set of fractions p/q for p,q prime is dense in R.• Prime harmonic series: ∑p≤x

1p = log log x + M + O(1/log x)

Page 24: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Interesting resultsPrime 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• lcm(1, . . . ,n) = eψ(n) where ψ(x) ∼ x• On average, an integer n has log n + 2γ− 1 divisors.• The set of square-free integers has density 6/π2 ≈ 60.8%.• The set of fractions p/q for p,q prime is dense in R.

• Prime harmonic series: ∑p≤x1p = log log x + M + O(1/log x)

Page 25: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Interesting resultsPrime 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• lcm(1, . . . ,n) = eψ(n) where ψ(x) ∼ x• On average, an integer n has log n + 2γ− 1 divisors.• The set of square-free integers has density 6/π2 ≈ 60.8%.• The set of fractions p/q for p,q prime is dense in R.• Prime harmonic series: ∑p≤x

1p = log log x + M + O(1/log x)

Page 26: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Dirichlet seriesA Dirichlet series is a formal series of the form:

F (s) =∞

∑n=1

an

ns

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.

Page 27: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Dirichlet seriesA Dirichlet series is a formal series of the form:

F (s) =∞

∑n=1

an

ns

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.

Page 28: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Dirichlet seriesA Dirichlet series is a formal series of the form:

F (s) =∞

∑n=1

an

ns

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

Page 29: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Dirichlet seriesA Dirichlet series is a formal series of the form:

F (s) =∞

∑n=1

an

ns

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.

Page 30: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Dirichlet seriesA Dirichlet series is a formal series of the form:

F (s) =∞

∑n=1

an

ns

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.

Page 31: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Dirichlet seriesA Dirichlet series is a formal series of the form:

F (s) =∞

∑n=1

an

ns

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.

Page 32: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

The ζ functionsRiemann ζ function:

ζ(s) =∞

∑n=1

1ns

Dirichlet L functions:

L(s,χ) =∞

∑n=0

χ(n)ns

Hurwitz ζ function:

ζ(s,a) =∞

∑n=0

1(n + a)s

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.

Page 33: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

The ζ functionsRiemann ζ function:

ζ(s) =∞

∑n=1

1ns

Dirichlet L functions:

L(s,χ) =∞

∑n=0

χ(n)ns

Hurwitz ζ function:

ζ(s,a) =∞

∑n=0

1(n + a)s

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.

Page 34: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

The ζ functionsRiemann ζ function:

ζ(s) =∞

∑n=1

1ns

Dirichlet L functions:

L(s,χ) =∞

∑n=0

χ(n)ns

Hurwitz ζ function:

ζ(s,a) =∞

∑n=0

1(n + a)s

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.

Page 35: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

The ζ functionsRiemann ζ function:

ζ(s) =∞

∑n=1

1ns

Dirichlet L functions:

L(s,χ) =∞

∑n=0

χ(n)ns

Hurwitz ζ function:

ζ(s,a) =∞

∑n=0

1(n + a)s

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.

Page 36: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

The ζ functionsRiemann ζ function:

ζ(s) =∞

∑n=1

1ns

Dirichlet L functions:

L(s,χ) =∞

∑n=0

χ(n)ns

Hurwitz ζ function:

ζ(s,a) =∞

∑n=0

1(n + a)s

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.

Page 37: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

The ζ functionsMany basic properties were proven:

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

12

• Reflection formula:

ζ(1− s) = 2(2π)−s cos(πs/2)Γ(s)ζ(s)

• Euler product:

ζ(s) = ∏p

11− p−s for Re(s) > 1

• Connection between Γ and ζ:

Γ(s)ζ(a,s) =∫ ∞

0

xs−1e−ax

1− e−x dx

Page 38: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

The ζ functionsMany basic properties were proven:

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

12

• Reflection formula:

ζ(1− s) = 2(2π)−s cos(πs/2)Γ(s)ζ(s)

• Euler product:

ζ(s) = ∏p

11− p−s for Re(s) > 1

• Connection between Γ and ζ:

Γ(s)ζ(a,s) =∫ ∞

0

xs−1e−ax

1− e−x dx

Page 39: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

The ζ functionsMany basic properties were proven:

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

12

• Reflection formula:

ζ(1− s) = 2(2π)−s cos(πs/2)Γ(s)ζ(s)

• Euler product:

ζ(s) = ∏p

11− p−s for Re(s) > 1

• Connection between Γ and ζ:

Γ(s)ζ(a,s) =∫ ∞

0

xs−1e−ax

1− e−x dx

Page 40: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

The ζ functionsMany basic properties were proven:

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

12

• Reflection formula:

ζ(1− s) = 2(2π)−s cos(πs/2)Γ(s)ζ(s)

• Euler product:

ζ(s) = ∏p

11− p−s for Re(s) > 1

• Connection between Γ and ζ:

Γ(s)ζ(a,s) =∫ ∞

0

xs−1e−ax

1− e−x dx

Page 41: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

The ζ functionsMany basic properties were proven:

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

12

• Reflection formula:

ζ(1− s) = 2(2π)−s cos(πs/2)Γ(s)ζ(s)

• Euler product:

ζ(s) = ∏p

11− p−s for Re(s) > 1

• Connection between Γ and ζ:

Γ(s)ζ(a,s) =∫ ∞

0

xs−1e−ax

1− e−x dx

Page 42: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

The ζ functionsRiemann hypothesis can be stated:

theorem RH:assumes Re s ∈ {1/2 < ..< 1} and zeta s = 0shows Re s = 1/2

sorry

Generalised Riemann hypothesis:

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

Page 43: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

The ζ functionsRiemann hypothesis can be stated:

theorem RH:assumes Re s ∈ {1/2 < ..< 1} and zeta s = 0shows Re s = 1/2sorry

Generalised Riemann hypothesis:

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

Page 44: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

The ζ functionsRiemann hypothesis can be stated:

theorem RH:assumes Re s ∈ {1/2 < ..< 1} and zeta s = 0shows Re s = 1/2sorry

Generalised Riemann hypothesis:

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

Page 45: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Non-vanishing of ζTheorem: ζ(s) 6= 0 for Re(s) ≥ 1.

Proof:For Re(s) > 1: almost for free from Dirichlet series libraryFor Re(s) = 1:

• Suppose ζ(1 + it) = 0 for t ∈R>0.• By symmetry, ζ(1− it) = 0 as well.• Let h(s) := ζ(s)2ζ(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.• This is clearly wrong, since even the subseries for 2−s diverges for s→ 0+.

Easily generalises to Dirichlet L-functions.

Page 46: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

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.• Let h(s) := ζ(s)2ζ(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.• This is clearly wrong, since even the subseries for 2−s diverges for s→ 0+.

Easily generalises to Dirichlet L-functions.

Page 47: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Non-vanishing of ζTheorem: ζ(s) 6= 0 for Re(s) ≥ 1.Proof:For Re(s) > 1: almost for free from Dirichlet series libraryFor Re(s) = 1:

• Suppose ζ(1 + it) = 0 for t ∈R>0.• By symmetry, ζ(1− it) = 0 as well.• Let h(s) := ζ(s)2ζ(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.• This is clearly wrong, since even the subseries for 2−s diverges for s→ 0+.

Easily generalises to Dirichlet L-functions.

Page 48: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Non-vanishing of ζTheorem: ζ(s) 6= 0 for Re(s) ≥ 1.Proof:For Re(s) > 1: almost for free from Dirichlet series libraryFor Re(s) = 1:

• Suppose ζ(1 + it) = 0 for t ∈R>0.

• By symmetry, ζ(1− it) = 0 as well.• Let h(s) := ζ(s)2ζ(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.• This is clearly wrong, since even the subseries for 2−s diverges for s→ 0+.

Easily generalises to Dirichlet L-functions.

Page 49: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Non-vanishing of ζTheorem: ζ(s) 6= 0 for Re(s) ≥ 1.Proof:For Re(s) > 1: almost for free from Dirichlet series libraryFor Re(s) = 1:

• Suppose ζ(1 + it) = 0 for t ∈R>0.• By symmetry, ζ(1− it) = 0 as well.

• Let h(s) := ζ(s)2ζ(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.• This is clearly wrong, since even the subseries for 2−s diverges for s→ 0+.

Easily generalises to Dirichlet L-functions.

Page 50: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Non-vanishing of ζTheorem: ζ(s) 6= 0 for Re(s) ≥ 1.Proof:For Re(s) > 1: almost for free from Dirichlet series libraryFor Re(s) = 1:

• Suppose ζ(1 + it) = 0 for t ∈R>0.• By symmetry, ζ(1− it) = 0 as well.• Let h(s) := ζ(s)2ζ(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.• This is clearly wrong, since even the subseries for 2−s diverges for s→ 0+.

Easily generalises to Dirichlet L-functions.

Page 51: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Non-vanishing of ζTheorem: ζ(s) 6= 0 for Re(s) ≥ 1.Proof:For Re(s) > 1: almost for free from Dirichlet series libraryFor Re(s) = 1:

• Suppose ζ(1 + it) = 0 for t ∈R>0.• By symmetry, ζ(1− it) = 0 as well.• Let h(s) := ζ(s)2ζ(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.• This is clearly wrong, since even the subseries for 2−s diverges for s→ 0+.

Easily generalises to Dirichlet L-functions.

Page 52: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Non-vanishing of ζTheorem: ζ(s) 6= 0 for Re(s) ≥ 1.Proof:For Re(s) > 1: almost for free from Dirichlet series libraryFor Re(s) = 1:

• Suppose ζ(1 + it) = 0 for t ∈R>0.• By symmetry, ζ(1− it) = 0 as well.• Let h(s) := ζ(s)2ζ(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.• This is clearly wrong, since even the subseries for 2−s diverges for s→ 0+.

Easily generalises to Dirichlet L-functions.

Page 53: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Non-vanishing of ζTheorem: ζ(s) 6= 0 for Re(s) ≥ 1.Proof:For Re(s) > 1: almost for free from Dirichlet series libraryFor Re(s) = 1:

• Suppose ζ(1 + it) = 0 for t ∈R>0.• By symmetry, ζ(1− it) = 0 as well.• Let h(s) := ζ(s)2ζ(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.• This is clearly wrong, since even the subseries for 2−s diverges for s→ 0+.

Easily generalises to Dirichlet L-functions.

Page 54: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Non-vanishing of ζTheorem: ζ(s) 6= 0 for Re(s) ≥ 1.Proof:For Re(s) > 1: almost for free from Dirichlet series libraryFor Re(s) = 1:

• Suppose ζ(1 + it) = 0 for t ∈R>0.• By symmetry, ζ(1− it) = 0 as well.• Let h(s) := ζ(s)2ζ(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.• This is clearly wrong, since even the subseries for 2−s diverges for s→ 0+.

Easily generalises to Dirichlet L-functions.

Page 55: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Non-vanishing of ζTheorem: ζ(s) 6= 0 for Re(s) ≥ 1.Proof:For Re(s) > 1: almost for free from Dirichlet series libraryFor Re(s) = 1:

• Suppose ζ(1 + it) = 0 for t ∈R>0.• By symmetry, ζ(1− it) = 0 as well.• Let h(s) := ζ(s)2ζ(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.

• This is clearly wrong, since even the subseries for 2−s diverges for s→ 0+.

Easily generalises to Dirichlet L-functions.

Page 56: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Non-vanishing of ζTheorem: ζ(s) 6= 0 for Re(s) ≥ 1.Proof:For Re(s) > 1: almost for free from Dirichlet series libraryFor Re(s) = 1:

• Suppose ζ(1 + it) = 0 for t ∈R>0.• By symmetry, ζ(1− it) = 0 as well.• Let h(s) := ζ(s)2ζ(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.• This is clearly wrong, since even the subseries for 2−s diverges for s→ 0+.

Easily generalises to Dirichlet L-functions.

Page 57: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Non-vanishing of ζTheorem: ζ(s) 6= 0 for Re(s) ≥ 1.Proof:For Re(s) > 1: almost for free from Dirichlet series libraryFor Re(s) = 1:

• Suppose ζ(1 + it) = 0 for t ∈R>0.• By symmetry, ζ(1− it) = 0 as well.• Let h(s) := ζ(s)2ζ(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.• This is clearly wrong, since even the subseries for 2−s diverges for s→ 0+.

Easily generalises to Dirichlet L-functions.

Page 58: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problems

Page 59: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: The Residue Theorem

ε

2iπ

4iπ

2Niπ

2(N+1)iπ

−2iπ

−4iπ

−2Niπ

−2(N+1)iπ

Showing Hurwitz’s formula was tricky.One problem in particular:

Residue Theorem:∮C

f (z)dz = ∑z0 is pole

indC(z0) ·Res(f ,z0)

Problem: The horizontal line segmentsof C lie on the branch cut!

And we take a different branch of f oneach side.

Page 60: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: The Residue Theorem

ε

2iπ

4iπ

2Niπ

2(N+1)iπ

−2iπ

−4iπ

−2Niπ

−2(N+1)iπ

Showing Hurwitz’s formula was tricky.One problem in particular:

Residue Theorem:∮C

f (z)dz = ∑z0 is pole

indC(z0) ·Res(f ,z0)

Problem: The horizontal line segmentsof C lie on the branch cut!

And we take a different branch of f oneach side.

Page 61: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: The Residue Theorem

ε

2iπ

4iπ

2Niπ

2(N+1)iπ

−2iπ

−4iπ

−2Niπ

−2(N+1)iπ

Showing Hurwitz’s formula was tricky.One problem in particular:

Residue Theorem:∮C

f (z)dz = ∑z0 is pole

indC(z0) ·Res(f ,z0)

Problem: The horizontal line segmentsof C lie on the branch cut!

And we take a different branch of f oneach side.

Page 62: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: The Residue Theorem

ε

2iπ

4iπ

2Niπ

2(N+1)iπ

−2iπ

−4iπ

−2Niπ

−2(N+1)iπ

Showing Hurwitz’s formula was tricky.One problem in particular:

Residue Theorem:∮C

f (z)dz = ∑z0 is pole

indC(z0) ·Res(f ,z0)

Problem: The horizontal line segmentsof C lie on the branch cut!

And we take a different branch of f oneach side.

Page 63: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: The Residue Theorem

Leonid 2 [CC BY-SA 3.0]

Mathematical justification:f is a multi-valued function.

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

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

What can we do instead?

Page 64: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: The Residue Theorem

Leonid 2 [CC BY-SA 3.0]

Mathematical justification:f is a multi-valued function.

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

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

What can we do instead?

Page 65: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: The Residue Theorem

Leonid 2 [CC BY-SA 3.0]

Mathematical justification:f is a multi-valued function.

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

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

What can we do instead?

Page 66: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Residue Theorem

ε

2iπ

4iπ

2Niπ

2(N+1)iπ

What can we do instead?

• Only look at the upper half• Lower half follows by symmetry• Move the branch cut out of the way

Now the Residue Theorem can easilybe applied.

Other problems:• Geometry of the integration contour• Establishing homotopy of paths• Evaluating winding numbers

The last one was made much easierby Wenda Li’s winding-number tactic.

Page 67: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Residue Theorem

ε

2iπ

4iπ

2Niπ

2(N+1)iπ

What can we do instead?• Only look at the upper half

• Lower half follows by symmetry• Move the branch cut out of the way

Now the Residue Theorem can easilybe applied.

Other problems:• Geometry of the integration contour• Establishing homotopy of paths• Evaluating winding numbers

The last one was made much easierby Wenda Li’s winding-number tactic.

Page 68: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Residue Theorem

ε

2iπ

4iπ

2Niπ

2(N+1)iπ

What can we do instead?• Only look at the upper half• Lower half follows by symmetry

• Move the branch cut out of the wayNow the Residue Theorem can easilybe applied.

Other problems:• Geometry of the integration contour• Establishing homotopy of paths• Evaluating winding numbers

The last one was made much easierby Wenda Li’s winding-number tactic.

Page 69: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Residue Theorem

ε

2iπ

4iπ

2Niπ

2(N+1)iπ

What can we do instead?• Only look at the upper half• Lower half follows by symmetry• Move the branch cut out of the way

Now the Residue Theorem can easilybe applied.

Other problems:• Geometry of the integration contour• Establishing homotopy of paths• Evaluating winding numbers

The last one was made much easierby Wenda Li’s winding-number tactic.

Page 70: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Residue Theorem

ε

2iπ

4iπ

2Niπ

2(N+1)iπ

What can we do instead?• Only look at the upper half• Lower half follows by symmetry• Move the branch cut out of the way

Now the Residue Theorem can easilybe applied.

Other problems:• Geometry of the integration contour• Establishing homotopy of paths• Evaluating winding numbers

The last one was made much easierby Wenda Li’s winding-number tactic.

Page 71: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Residue Theorem

ε

2iπ

4iπ

2Niπ

2(N+1)iπ

What can we do instead?• Only look at the upper half• Lower half follows by symmetry• Move the branch cut out of the way

Now the Residue Theorem can easilybe applied.

Other problems:

• Geometry of the integration contour• Establishing homotopy of paths• Evaluating winding numbers

The last one was made much easierby Wenda Li’s winding-number tactic.

Page 72: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Residue Theorem

ε

2iπ

4iπ

2Niπ

2(N+1)iπ

What can we do instead?• Only look at the upper half• Lower half follows by symmetry• Move the branch cut out of the way

Now the Residue Theorem can easilybe applied.

Other problems:• Geometry of the integration contour

• Establishing homotopy of paths• Evaluating winding numbers

The last one was made much easierby Wenda Li’s winding-number tactic.

Page 73: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Residue Theorem

ε

2iπ

4iπ

2Niπ

2(N+1)iπ

What can we do instead?• Only look at the upper half• Lower half follows by symmetry• Move the branch cut out of the way

Now the Residue Theorem can easilybe applied.

Other problems:• Geometry of the integration contour• Establishing homotopy of paths

• Evaluating winding numbersThe last one was made much easierby Wenda Li’s winding-number tactic.

Page 74: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Residue Theorem

ε

2iπ

4iπ

2Niπ

2(N+1)iπ

What can we do instead?• Only look at the upper half• Lower half follows by symmetry• Move the branch cut out of the way

Now the Residue Theorem can easilybe applied.

Other problems:• Geometry of the integration contour• Establishing homotopy of paths• Evaluating winding numbers

The last one was made much easierby Wenda Li’s winding-number tactic.

Page 75: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Residue Theorem

ε

2iπ

4iπ

2Niπ

2(N+1)iπ

What can we do instead?• Only look at the upper half• Lower half follows by symmetry• Move the branch cut out of the way

Now the Residue Theorem can easilybe applied.

Other problems:• Geometry of the integration contour• Establishing homotopy of paths• Evaluating winding numbers

The last one was made much easierby Wenda Li’s winding-number tactic.

Page 76: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Ugly Limits

2C/R + C/N + 3MπR log N

+3RMδπNδ

< ε for suff. large N

n1−s

1− s− (n + 1)1−s

1− s∈ O(1) for n→∞

∫ ∞

ε

xse−ax

1− e−x dx exists becausexse−ax

1− e−x ∈ O(e−ax/2)

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

Page 77: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Ugly Limits

2C/R + C/N + 3MπR log N

+3RMδπNδ

< ε for suff. large N

n1−s

1− s− (n + 1)1−s

1− s∈ O(1) for n→∞

∫ ∞

ε

xse−ax

1− e−x dx exists becausexse−ax

1− e−x ∈ O(e−ax/2)

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

Page 78: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Ugly Limits

2C/R + C/N + 3MπR log N

+3RMδπNδ

< ε for suff. large N

n1−s

1− s− (n + 1)1−s

1− s∈ O(1) for n→∞

∫ ∞

ε

xse−ax

1− e−x dx exists

becausexse−ax

1− e−x ∈ O(e−ax/2)

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

Page 79: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Ugly Limits

2C/R + C/N + 3MπR log N

+3RMδπNδ

< ε for suff. large N

n1−s

1− s− (n + 1)1−s

1− s∈ O(1) for n→∞

∫ ∞

ε

xse−ax

1− e−x dx exists becausexse−ax

1− e−x ∈ O(e−ax/2)

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

Page 80: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Ugly Limits

2C/R + C/N + 3MπR log N

+3RMδπNδ

< ε for suff. large N

n1−s

1− s− (n + 1)1−s

1− s∈ O(1) for n→∞

∫ ∞

ε

xse−ax

1− e−x dx exists becausexse−ax

1− e−x ∈ O(e−ax/2)

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

Page 81: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Pole CancellationPart of Newman’s proof of PNT:

ζ ′(s)/ζ(s) has a simple pole at s = 1 with residue −1

, i.e.

ζ ′(s)/ζ(s) ∼ −1s− 1

+ O(1) (for s→ 1)

So there exists some constant C for such thatζ ′(s)

(s− 1)ζ(s)− ζ ′(s)− cζ(s)

is analytic at s = 1.

Such arguments are still a bit tedious in Isabelle.

Page 82: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Pole CancellationPart of Newman’s proof of PNT:

ζ ′(s)/ζ(s) has a simple pole at s = 1 with residue −1, i.e.

ζ ′(s)/ζ(s) ∼ −1s− 1

+ O(1) (for s→ 1)

So there exists some constant C for such thatζ ′(s)

(s− 1)ζ(s)− ζ ′(s)− cζ(s)

is analytic at s = 1.

Such arguments are still a bit tedious in Isabelle.

Page 83: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Pole CancellationPart of Newman’s proof of PNT:

ζ ′(s)/ζ(s) has a simple pole at s = 1 with residue −1, i.e.

ζ ′(s)/ζ(s) ∼ −1s− 1

+ O(1) (for s→ 1)

So there exists some constant C for such thatζ ′(s)

(s− 1)ζ(s)− ζ ′(s)− cζ(s)

is analytic at s = 1.

Such arguments are still a bit tedious in Isabelle.

Page 84: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

Problem: Pole CancellationPart of Newman’s proof of PNT:

ζ ′(s)/ζ(s) has a simple pole at s = 1 with residue −1, i.e.

ζ ′(s)/ζ(s) ∼ −1s− 1

+ O(1) (for s→ 1)

So there exists some constant C for such thatζ ′(s)

(s− 1)ζ(s)− ζ ′(s)− cζ(s)

is analytic at s = 1.

Such arguments are still a bit tedious in Isabelle.

Page 85: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

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?

Page 86: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

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?

Page 87: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

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?

Page 88: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

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?

Page 89: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

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 sideproject,

• Future Work: Maybe the second book?

Page 90: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

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?

Page 91: Nine Chapters of Analytic Number Theory [2mm] in …In this work: only multiplicative number theory (primes, divisors, etc.) Much of the formalised material is not particularly analytic

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?